victory-group 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 +6 -0
- package/dist/victory-group.cjs +1 -1
- package/dist/victory-group.mjs +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# victory-group
|
|
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
|
package/dist/victory-group.cjs
CHANGED
|
@@ -27,7 +27,7 @@ const defaultProps = {
|
|
|
27
27
|
const VictoryGroupBase = (initialProps) => {
|
|
28
28
|
const role = VictoryGroup?.role;
|
|
29
29
|
const { getAnimationProps, setAnimationState, getProps } = victory_core.Hooks.useAnimationState();
|
|
30
|
-
const propsWithDefaults = react.default.useMemo(() => (0, lodash_defaults.default)({}, initialProps, defaultProps), [initialProps]);
|
|
30
|
+
const propsWithDefaults = react.default.useMemo(() => (0, lodash_defaults.default)({ children: victory_core.Helpers.withDefaultProps(initialProps.children) }, initialProps, defaultProps), [initialProps]);
|
|
31
31
|
const props = getProps(propsWithDefaults);
|
|
32
32
|
const modifiedProps = victory_core.Helpers.modifyProps(props, fallbackProps, role);
|
|
33
33
|
const { eventKey, containerComponent, standalone, groupComponent, externalEventMutations, width, height, theme, polar, horizontal, name } = modifiedProps;
|
package/dist/victory-group.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const defaultProps = {
|
|
|
22
22
|
const VictoryGroupBase = (initialProps) => {
|
|
23
23
|
const role = VictoryGroup?.role;
|
|
24
24
|
const { getAnimationProps, setAnimationState, getProps } = Hooks.useAnimationState();
|
|
25
|
-
const propsWithDefaults = React.useMemo(() => defaults({}, initialProps, defaultProps), [initialProps]);
|
|
25
|
+
const propsWithDefaults = React.useMemo(() => defaults({ children: Helpers.withDefaultProps(initialProps.children) }, initialProps, defaultProps), [initialProps]);
|
|
26
26
|
const props = getProps(propsWithDefaults);
|
|
27
27
|
const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
|
|
28
28
|
const { eventKey, containerComponent, standalone, groupComponent, externalEventMutations, width, height, theme, polar, horizontal, name } = modifiedProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-group",
|
|
3
|
-
"version": "38.0.
|
|
3
|
+
"version": "38.0.1",
|
|
4
4
|
"description": "Group Layout Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"lodash": "^4.17.19",
|
|
35
35
|
"react-fast-compare": "^3.2.0",
|
|
36
|
-
"victory-core": "38.0.
|
|
37
|
-
"victory-shared-events": "38.0.
|
|
36
|
+
"victory-core": "38.0.1",
|
|
37
|
+
"victory-shared-events": "38.0.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"victory-bar": "*"
|