Skip to content

Commit

Permalink
Updating dependencies, supported react peer dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jpb12 committed Apr 30, 2024
1 parent e8dbbfb commit 0a09f6d
Show file tree
Hide file tree
Showing 52 changed files with 2,489 additions and 2,117 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
matrix:
node-version: [ 20.x, 21.x ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
2 changes: 0 additions & 2 deletions __tests__/Components/__snapshots__/containerTests.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ exports[`<Container> renders children 1`] = `
<Link
key="Black"
keyProp="name"
pathFunc={[Function]}
pathProps={{}}
source={
{
Expand Down Expand Up @@ -93,7 +92,6 @@ exports[`<Container> renders correctly 1`] = `
<Link
key="Black"
keyProp="name"
pathFunc={[Function]}
pathProps={{}}
source={
{
Expand Down
3 changes: 1 addition & 2 deletions __tests__/Components/animatedTests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { act } from 'react-dom/test-utils';
import React, { act } from 'react';
import { mount, shallow } from 'enzyme';

import { easeQuadOut } from 'd3-ease';
Expand Down
28 changes: 12 additions & 16 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
require('prop-types'),
require('react'),
require('d3-hierarchy'),
)
)
: typeof define === 'function' && define.amd
? define(
? define(
[
'exports',
'@babel/runtime/helpers/extends',
Expand All @@ -19,17 +19,17 @@
'd3-hierarchy',
],
factory,
)
: ((global =
)
: ((global =
typeof globalThis !== 'undefined' ? globalThis : global || self),
factory(
factory(
(global.ReactTreeGraph = {}),
global._extends,
global.d3,
global.PropTypes,
global.React,
global.d3,
));
));
})(this, function (exports, _extends, d3Ease, PropTypes, React, d3Hierarchy) {
'use strict';

Expand Down Expand Up @@ -107,17 +107,16 @@
}

function diagonal(x1, y1, x2, y2) {
return `M${x1},${y1}C${(x1 + x2) / 2},${y1} ${
(x1 + x2) / 2
},${y2} ${x2},${y2}`;
return `M${x1},${y1}C${(x1 + x2) / 2},${y1} ${(x1 + x2) / 2},${y2} ${x2},${y2}`;
}
function Link(props) {
const wrappedProps = wrapHandlers(
props.pathProps,
props.source.data[props.keyProp],
props.target.data[props.keyProp],
);
const d = props.pathFunc(props.x1, props.y1, props.x2, props.y2);
const pathFunc = props.pathFunc || diagonal;
const d = pathFunc(props.x1, props.y1, props.x2, props.y2);
return /*#__PURE__*/ React__default.default.createElement(
'path',
_extends__default.default({}, wrappedProps, {
Expand All @@ -133,12 +132,9 @@
x2: PropTypes__default.default.number.isRequired,
y1: PropTypes__default.default.number.isRequired,
y2: PropTypes__default.default.number.isRequired,
pathFunc: PropTypes__default.default.func.isRequired,
pathFunc: PropTypes__default.default.func,
pathProps: PropTypes__default.default.object.isRequired,
};
Link.defaultProps = {
pathFunc: diagonal,
};

function Node(props) {
function getTransform() {
Expand Down Expand Up @@ -193,7 +189,7 @@
wrappedTextProps,
),
props[props.labelProp],
)
)
: /*#__PURE__*/ React__default.default.createElement(
'g',
_extends__default.default(
Expand All @@ -203,7 +199,7 @@
wrappedTextProps,
),
props[props.labelProp],
);
);
return /*#__PURE__*/ React__default.default.createElement(
'g',
_extends__default.default({}, wrappedGProps, {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.min.js

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions dist/module/components/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ function diagonal(x1, y1, x2, y2) {
}
function Link(props) {
const wrappedProps = wrapHandlers(props.pathProps, props.source.data[props.keyProp], props.target.data[props.keyProp]);
const d = props.pathFunc(props.x1, props.y1, props.x2, props.y2);
const pathFunc = props.pathFunc || diagonal;
const d = pathFunc(props.x1, props.y1, props.x2, props.y2);
return /*#__PURE__*/React.createElement("path", _extends({}, wrappedProps, {
d: d
}));
Expand All @@ -21,11 +22,8 @@ Link.propTypes = {
x2: PropTypes.number.isRequired,
y1: PropTypes.number.isRequired,
y2: PropTypes.number.isRequired,
pathFunc: PropTypes.func.isRequired,
pathFunc: PropTypes.func,
pathProps: PropTypes.object.isRequired
};
Link.defaultProps = {
pathFunc: diagonal
};

export { Link as default };

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/3.b80f77cd.iframe.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

134 changes: 134 additions & 0 deletions docs/357.695665bc.iframe.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/357.695665bc.iframe.bundle.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/426.2e5a4efb.iframe.bundle.js.map

This file was deleted.

1 change: 0 additions & 1 deletion docs/49.05398b84.iframe.bundle.js

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/71.59fa7449.iframe.bundle.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/729.61f1c718.iframe.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/797.32f650c7.iframe.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/829.8f00b12a.iframe.bundle.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/857.905d42e1.iframe.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/895.6c1db45b.iframe.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

134 changes: 0 additions & 134 deletions docs/937.400d01c0.iframe.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/937.400d01c0.iframe.bundle.js.map

This file was deleted.

1 change: 1 addition & 0 deletions docs/955.dfd3105e.iframe.bundle.js

Large diffs are not rendered by default.

0 comments on commit 0a09f6d

Please sign in to comment.