victory-shared-events 38.0.0 → 38.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# victory-shared-events
|
|
2
2
|
|
|
3
|
+
## 38.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#3156](https://github.com/FormidableLabs/victory/pull/3156) [`974becf`](https://github.com/FormidableLabs/victory/commit/974becfcea43beab7f345f1246b831ef44deb1d0) - Fix charts on React 19: Victory reads props from child elements (and props like `labelComponent`) before React renders them, and React 19's JSX runtime no longer adds a class component's `defaultProps` to `element.props`. Charts lost defaults such as `data`, `samples` and VictoryLegend's `titleComponent` (missing bars, wrong lines, a `TypeError` with a titled legend), and VictoryBrushLine lost its width as an `axisComponent`. Victory now adds the missing defaults itself, as React 18 did. Adds `Helpers.getElementProps` and `Helpers.withDefaultProps` to `victory-core`.
|
|
8
|
+
|
|
3
9
|
## 38.0.0
|
|
4
10
|
|
|
5
11
|
### Major Changes
|
|
@@ -96,7 +96,7 @@ var VictorySharedEvents = class extends react.default.Component {
|
|
|
96
96
|
}
|
|
97
97
|
getBaseProps(props) {
|
|
98
98
|
const { container } = props;
|
|
99
|
-
const children = react.default.Children.toArray(this.props.children);
|
|
99
|
+
const children = react.default.Children.toArray(victory_core.Helpers.withDefaultProps(this.props.children));
|
|
100
100
|
const childBaseProps = this.getBasePropsFromChildren(children);
|
|
101
101
|
const parentBaseProps = container ? container.props : {};
|
|
102
102
|
return Object.assign({}, childBaseProps, { parent: parentBaseProps });
|
|
@@ -150,7 +150,7 @@ var VictorySharedEvents = class extends react.default.Component {
|
|
|
150
150
|
}, []);
|
|
151
151
|
};
|
|
152
152
|
const childNames = Object.keys(baseProps);
|
|
153
|
-
return alterChildren(react.default.Children.toArray(props.children), childNames);
|
|
153
|
+
return alterChildren(react.default.Children.toArray(victory_core.Helpers.withDefaultProps(props.children)), childNames);
|
|
154
154
|
}
|
|
155
155
|
getContainer(props, baseProps, events) {
|
|
156
156
|
const children = this.getNewChildren(props, baseProps);
|
|
@@ -89,7 +89,7 @@ var VictorySharedEvents = class extends React.Component {
|
|
|
89
89
|
}
|
|
90
90
|
getBaseProps(props) {
|
|
91
91
|
const { container } = props;
|
|
92
|
-
const children = React.Children.toArray(this.props.children);
|
|
92
|
+
const children = React.Children.toArray(Helpers.withDefaultProps(this.props.children));
|
|
93
93
|
const childBaseProps = this.getBasePropsFromChildren(children);
|
|
94
94
|
const parentBaseProps = container ? container.props : {};
|
|
95
95
|
return Object.assign({}, childBaseProps, { parent: parentBaseProps });
|
|
@@ -143,7 +143,7 @@ var VictorySharedEvents = class extends React.Component {
|
|
|
143
143
|
}, []);
|
|
144
144
|
};
|
|
145
145
|
const childNames = Object.keys(baseProps);
|
|
146
|
-
return alterChildren(React.Children.toArray(props.children), childNames);
|
|
146
|
+
return alterChildren(React.Children.toArray(Helpers.withDefaultProps(props.children)), childNames);
|
|
147
147
|
}
|
|
148
148
|
getContainer(props, baseProps, events) {
|
|
149
149
|
const children = this.getNewChildren(props, baseProps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-shared-events",
|
|
3
|
-
"version": "38.0.
|
|
3
|
+
"version": "38.0.1",
|
|
4
4
|
"description": "Shared Event Helper for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"json-stringify-safe": "^5.0.1",
|
|
35
35
|
"lodash": "^4.17.19",
|
|
36
36
|
"react-fast-compare": "^3.2.0",
|
|
37
|
-
"victory-core": "38.0.
|
|
37
|
+
"victory-core": "38.0.1"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=18"
|