victory-stack
Advanced tools
Comparing version 36.3.0 to 36.3.2
@@ -11,3 +11,3 @@ import _isEmpty from "lodash/isEmpty"; | ||
import React from "react"; | ||
import { Helpers, VictoryContainer, VictoryTheme, CommonProps, Wrapper, PropTypes as CustomPropTypes, Hooks } from "victory-core"; | ||
import { CommonProps, Helpers, Hooks, PropTypes as CustomPropTypes, UserProps, VictoryContainer, VictoryTheme, Wrapper } from "victory-core"; | ||
import { VictorySharedEvents } from "victory-shared-events"; | ||
@@ -86,5 +86,8 @@ import { getChildren, useMemoizedProps } from "./helper-methods"; | ||
}, [standalone, domain, scale, width, height, theme, style, horizontal, polar, origin, name]); | ||
var userProps = React.useMemo(function () { | ||
return UserProps.getSafeUserProps(initialProps); | ||
}, [initialProps]); | ||
var container = React.useMemo(function () { | ||
if (standalone) { | ||
var defaultContainerProps = _defaults({}, containerComponent.props, containerProps); | ||
var defaultContainerProps = _defaults({}, containerComponent.props, containerProps, userProps); | ||
@@ -94,4 +97,4 @@ return React.cloneElement(containerComponent, defaultContainerProps); | ||
return groupComponent; | ||
}, [groupComponent, standalone, containerComponent, containerProps]); | ||
return React.cloneElement(groupComponent, userProps); | ||
}, [groupComponent, standalone, containerComponent, containerProps, userProps]); | ||
var events = React.useMemo(function () { | ||
@@ -98,0 +101,0 @@ return Wrapper.getAllEvents(props); |
@@ -108,10 +108,14 @@ "use strict"; | ||
var userProps = _react.default.useMemo(function () { | ||
return _victoryCore.UserProps.getSafeUserProps(initialProps); | ||
}, [initialProps]); | ||
var container = _react.default.useMemo(function () { | ||
if (standalone) { | ||
var defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps); | ||
var defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps, userProps); | ||
return _react.default.cloneElement(containerComponent, defaultContainerProps); | ||
} | ||
return groupComponent; | ||
}, [groupComponent, standalone, containerComponent, containerProps]); | ||
return _react.default.cloneElement(groupComponent, userProps); | ||
}, [groupComponent, standalone, containerComponent, containerProps, userProps]); | ||
@@ -118,0 +122,0 @@ var events = _react.default.useMemo(function () { |
{ | ||
"name": "victory-stack", | ||
"version": "36.3.0", | ||
"version": "36.3.2", | ||
"description": "Stack Layout Component for Victory", | ||
@@ -25,4 +25,4 @@ "keywords": [ | ||
"react-fast-compare": "^2.0.0", | ||
"victory-core": "^36.3.0", | ||
"victory-shared-events": "^36.3.0" | ||
"victory-core": "^36.3.2", | ||
"victory-shared-events": "^36.3.2" | ||
}, | ||
@@ -36,3 +36,3 @@ "peerDependencies": { | ||
"sideEffects": false, | ||
"gitHead": "ebafd849d2ded3f1d2aabf0d6e64dcbd48e4c9d6" | ||
"gitHead": "18895d1290245732d14332bbbda10336032c9aab" | ||
} |
@@ -5,9 +5,10 @@ import { assign, defaults, isEmpty } from "lodash"; | ||
import { | ||
CommonProps, | ||
Helpers, | ||
Hooks, | ||
PropTypes as CustomPropTypes, | ||
UserProps, | ||
VictoryContainer, | ||
VictoryTheme, | ||
CommonProps, | ||
Wrapper, | ||
PropTypes as CustomPropTypes, | ||
Hooks | ||
Wrapper | ||
} from "victory-core"; | ||
@@ -98,2 +99,6 @@ import { VictorySharedEvents } from "victory-shared-events"; | ||
]); | ||
const userProps = React.useMemo( | ||
() => UserProps.getSafeUserProps(initialProps), | ||
[initialProps] | ||
); | ||
@@ -105,8 +110,15 @@ const container = React.useMemo(() => { | ||
containerComponent.props, | ||
containerProps | ||
containerProps, | ||
userProps | ||
); | ||
return React.cloneElement(containerComponent, defaultContainerProps); | ||
} | ||
return groupComponent; | ||
}, [groupComponent, standalone, containerComponent, containerProps]); | ||
return React.cloneElement(groupComponent, userProps); | ||
}, [ | ||
groupComponent, | ||
standalone, | ||
containerComponent, | ||
containerProps, | ||
userProps | ||
]); | ||
@@ -113,0 +125,0 @@ const events = React.useMemo(() => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
949754
18278
Updatedvictory-core@^36.3.2