victory-chart
Advanced tools
Comparing version 36.8.2 to 36.8.3
# victory-chart | ||
## 36.8.3 | ||
### Patch Changes | ||
- Refactor param reassignments ([#2724](https://github.com/FormidableLabs/victory/pull/2724)) | ||
## 36.8.2 | ||
@@ -4,0 +10,0 @@ |
import React from "react"; | ||
export declare function getBackgroundWithProps(props: any, calculatedProps: any): React.DetailedReactHTMLElement<any, HTMLElement>; | ||
export declare function getCalculatedProps(props: any, childComponents: any): { | ||
export declare function getCalculatedProps(initialProps: any, childComponents: any): { | ||
categories: { | ||
@@ -5,0 +5,0 @@ x: any; |
@@ -87,8 +87,7 @@ import _assign from "lodash/assign"; | ||
export function getCalculatedProps(props, childComponents) { | ||
var style = getStyles(props); | ||
props = Helpers.modifyProps(props, fallbackProps, "chart"); | ||
var _props = props, | ||
horizontal = _props.horizontal, | ||
polar = _props.polar; | ||
export function getCalculatedProps(initialProps, childComponents) { | ||
var style = getStyles(initialProps); | ||
var props = Helpers.modifyProps(initialProps, fallbackProps, "chart"); | ||
var horizontal = props.horizontal, | ||
polar = props.polar; | ||
var allStrings = Wrapper.getStringsFromChildren(props, childComponents); | ||
@@ -132,5 +131,5 @@ var categories = Wrapper.getCategories(props, childComponents, allStrings); | ||
export function getChildren(props, childComponents, calculatedProps) { | ||
childComponents = childComponents || getChildComponents(props); | ||
calculatedProps = calculatedProps || getCalculatedProps(props, childComponents); | ||
var baseStyle = calculatedProps.style.parent; | ||
var children = childComponents || getChildComponents(props); | ||
var newCalculatedProps = calculatedProps || getCalculatedProps(props, children); | ||
var baseStyle = newCalculatedProps.style.parent; | ||
var height = props.height, | ||
@@ -140,7 +139,6 @@ polar = props.polar, | ||
width = props.width; | ||
var _calculatedProps = calculatedProps, | ||
origin = _calculatedProps.origin, | ||
horizontal = _calculatedProps.horizontal; | ||
var origin = newCalculatedProps.origin, | ||
horizontal = newCalculatedProps.horizontal; | ||
var parentName = props.name || "chart"; | ||
return childComponents.filter(React.isValidElement).map(function (child, index) { | ||
return children.filter(React.isValidElement).map(function (child, index) { | ||
var role = child.type && child.type.role; | ||
@@ -150,3 +148,3 @@ var style = Array.isArray(child.props.style) ? child.props.style : _defaults({}, child.props.style, { | ||
}); | ||
var childProps = getChildProps(child, props, calculatedProps); | ||
var childProps = getChildProps(child, props, newCalculatedProps); | ||
var name = child.props.name || "".concat(parentName, "-").concat(role, "-").concat(index); | ||
@@ -163,3 +161,3 @@ | ||
origin: polar ? origin : undefined, | ||
padding: calculatedProps.padding, | ||
padding: newCalculatedProps.padding, | ||
key: "".concat(name, "-key-").concat(index), | ||
@@ -192,5 +190,5 @@ standalone: false | ||
var getDomain = function (props, axis, childComponents) { | ||
childComponents = childComponents || React.Children.toArray(props.children); | ||
var domain = Wrapper.getDomain(props, axis, childComponents); | ||
var axisComponent = Axis.getAxisComponent(childComponents, axis); | ||
var children = childComponents || React.Children.toArray(props.children); | ||
var domain = Wrapper.getDomain(props, axis, children); | ||
var axisComponent = Axis.getAxisComponent(children, axis); | ||
var invertDomain = axisComponent && axisComponent.props && axisComponent.props.invertAxis; | ||
@@ -197,0 +195,0 @@ return invertDomain ? domain.concat().reverse() : domain; |
import React from "react"; | ||
export declare function getBackgroundWithProps(props: any, calculatedProps: any): React.DetailedReactHTMLElement<any, HTMLElement>; | ||
export declare function getCalculatedProps(props: any, childComponents: any): { | ||
export declare function getCalculatedProps(initialProps: any, childComponents: any): { | ||
categories: { | ||
@@ -5,0 +5,0 @@ x: any; |
@@ -102,9 +102,10 @@ "use strict"; | ||
function getCalculatedProps(props, childComponents) { | ||
var style = getStyles(props); | ||
props = _victoryCore.Helpers.modifyProps(props, fallbackProps, "chart"); | ||
var _props = props, | ||
horizontal = _props.horizontal, | ||
polar = _props.polar; | ||
function getCalculatedProps(initialProps, childComponents) { | ||
var style = getStyles(initialProps); | ||
var props = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "chart"); | ||
var horizontal = props.horizontal, | ||
polar = props.polar; | ||
var allStrings = _victoryCore.Wrapper.getStringsFromChildren(props, childComponents); | ||
@@ -153,5 +154,5 @@ | ||
function getChildren(props, childComponents, calculatedProps) { | ||
childComponents = childComponents || getChildComponents(props); | ||
calculatedProps = calculatedProps || getCalculatedProps(props, childComponents); | ||
var baseStyle = calculatedProps.style.parent; | ||
var children = childComponents || getChildComponents(props); | ||
var newCalculatedProps = calculatedProps || getCalculatedProps(props, children); | ||
var baseStyle = newCalculatedProps.style.parent; | ||
var height = props.height, | ||
@@ -161,7 +162,6 @@ polar = props.polar, | ||
width = props.width; | ||
var _calculatedProps = calculatedProps, | ||
origin = _calculatedProps.origin, | ||
horizontal = _calculatedProps.horizontal; | ||
var origin = newCalculatedProps.origin, | ||
horizontal = newCalculatedProps.horizontal; | ||
var parentName = props.name || "chart"; | ||
return childComponents.filter(_react.default.isValidElement).map(function (child, index) { | ||
return children.filter(_react.default.isValidElement).map(function (child, index) { | ||
var role = child.type && child.type.role; | ||
@@ -171,3 +171,3 @@ var style = Array.isArray(child.props.style) ? child.props.style : (0, _defaults2.default)({}, child.props.style, { | ||
}); | ||
var childProps = getChildProps(child, props, calculatedProps); | ||
var childProps = getChildProps(child, props, newCalculatedProps); | ||
var name = child.props.name || "".concat(parentName, "-").concat(role, "-").concat(index); | ||
@@ -183,3 +183,3 @@ var newProps = (0, _defaults2.default)({ | ||
origin: polar ? origin : undefined, | ||
padding: calculatedProps.padding, | ||
padding: newCalculatedProps.padding, | ||
key: "".concat(name, "-key-").concat(index), | ||
@@ -214,7 +214,7 @@ standalone: false | ||
var getDomain = function (props, axis, childComponents) { | ||
childComponents = childComponents || _react.default.Children.toArray(props.children); | ||
var children = childComponents || _react.default.Children.toArray(props.children); | ||
var domain = _victoryCore.Wrapper.getDomain(props, axis, childComponents); | ||
var domain = _victoryCore.Wrapper.getDomain(props, axis, children); | ||
var axisComponent = _victoryCore.Axis.getAxisComponent(childComponents, axis); | ||
var axisComponent = _victoryCore.Axis.getAxisComponent(children, axis); | ||
@@ -221,0 +221,0 @@ var invertDomain = axisComponent && axisComponent.props && axisComponent.props.invertAxis; |
{ | ||
"name": "victory-chart", | ||
"version": "36.8.2", | ||
"version": "36.8.3", | ||
"description": "Chart Component for Victory", | ||
@@ -26,6 +26,6 @@ "keywords": [ | ||
"react-fast-compare": "^3.2.0", | ||
"victory-axis": "^36.8.2", | ||
"victory-core": "^36.8.2", | ||
"victory-polar-axis": "^36.8.2", | ||
"victory-shared-events": "^36.8.2" | ||
"victory-axis": "^36.8.3", | ||
"victory-core": "^36.8.3", | ||
"victory-polar-axis": "^36.8.3", | ||
"victory-shared-events": "^36.8.3" | ||
}, | ||
@@ -32,0 +32,0 @@ "peerDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
1470409
23902
+ Added@types/d3-time@3.0.3(transitive)
- Removed@types/d3-time@3.0.4(transitive)
Updatedvictory-axis@^36.8.3
Updatedvictory-core@^36.8.3
Updatedvictory-polar-axis@^36.8.3