victory-polar-axis
Advanced tools
Comparing version 36.8.2 to 36.8.3
# victory-polar-axis | ||
## 36.8.3 | ||
### Patch Changes | ||
- Refactor param reassignments ([#2724](https://github.com/FormidableLabs/victory/pull/2724)) | ||
## 36.8.2 | ||
@@ -4,0 +10,0 @@ |
import { VictoryPolarAxisProps } from "./types"; | ||
export declare const getScale: (props: VictoryPolarAxisProps) => import("victory-core").D3Scale<any>; | ||
export declare const getStyles: (props: VictoryPolarAxisProps, styleObject: any) => { | ||
export declare const getStyles: (props: VictoryPolarAxisProps, styleObject?: VictoryPolarAxisProps["style"]) => { | ||
parent?: undefined; | ||
@@ -11,10 +11,13 @@ axis?: undefined; | ||
} | { | ||
parent: any; | ||
axis: any; | ||
axisLabel: any; | ||
grid: any; | ||
ticks: any; | ||
tickLabels: any; | ||
parent: import("victory-core").VictoryStyleObject & { | ||
height: string; | ||
width: string; | ||
}; | ||
axis: import("victory-core").VictoryStyleObject; | ||
axisLabel: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
grid: import("victory-core").VictoryStyleObject; | ||
ticks: import("victory-core").VictoryTickStyleObject; | ||
tickLabels: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
}; | ||
export declare const getBaseProps: (props: VictoryPolarAxisProps, fallbackProps: any) => any; | ||
export declare const getBaseProps: (initialProps: VictoryPolarAxisProps, fallbackProps: any) => any; | ||
//# sourceMappingURL=helper-methods.d.ts.map |
@@ -100,3 +100,5 @@ import _defaults from "lodash/defaults"; | ||
}; | ||
export var getStyles = function (props, styleObject) { | ||
export var getStyles = function (props) { | ||
var styleObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
if (props.disableInlineStyles) { | ||
@@ -107,3 +109,2 @@ return {}; | ||
var style = props.style || {}; | ||
styleObject = styleObject || {}; | ||
var parentStyleProps = { | ||
@@ -351,6 +352,7 @@ height: "auto", | ||
var getCalculatedValues = function (props) { | ||
props = _assign({ | ||
var getCalculatedValues = function (initialProps) { | ||
var props = _assign({ | ||
polar: true | ||
}, props); | ||
}, initialProps); | ||
var defaultStyles = getStyleObject(props); | ||
@@ -386,4 +388,4 @@ var style = getStyles(props, defaultStyles); | ||
export var getBaseProps = function (props, fallbackProps) { | ||
props = Axis.modifyProps(props, fallbackProps); | ||
export var getBaseProps = function (initialProps, fallbackProps) { | ||
var props = Axis.modifyProps(initialProps, fallbackProps); | ||
var calculatedValues = getCalculatedValues(props); | ||
@@ -394,8 +396,7 @@ var style = calculatedValues.style, | ||
domain = calculatedValues.domain; | ||
var _props = props, | ||
width = _props.width, | ||
height = _props.height, | ||
standalone = _props.standalone, | ||
theme = _props.theme, | ||
name = _props.name; | ||
var width = props.width, | ||
height = props.height, | ||
standalone = props.standalone, | ||
theme = props.theme, | ||
name = props.name; | ||
var axisProps = getAxisProps(props, calculatedValues); | ||
@@ -402,0 +403,0 @@ var axisLabelProps = getAxisLabelProps(props, calculatedValues); |
@@ -45,8 +45,11 @@ import React from "react"; | ||
} | { | ||
parent: any; | ||
axis: any; | ||
axisLabel: any; | ||
grid: any; | ||
ticks: any; | ||
tickLabels: any; | ||
parent: import("victory-core").VictoryStyleObject & { | ||
height: string; | ||
width: string; | ||
}; | ||
axis: import("victory-core").VictoryStyleObject; | ||
axisLabel: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
grid: import("victory-core").VictoryStyleObject; | ||
ticks: import("victory-core").VictoryTickStyleObject; | ||
tickLabels: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
}; | ||
@@ -53,0 +56,0 @@ static getBaseProps: (props: any) => any; |
import { VictoryPolarAxisProps } from "./types"; | ||
export declare const getScale: (props: VictoryPolarAxisProps) => import("victory-core").D3Scale<any>; | ||
export declare const getStyles: (props: VictoryPolarAxisProps, styleObject: any) => { | ||
export declare const getStyles: (props: VictoryPolarAxisProps, styleObject?: VictoryPolarAxisProps["style"]) => { | ||
parent?: undefined; | ||
@@ -11,10 +11,13 @@ axis?: undefined; | ||
} | { | ||
parent: any; | ||
axis: any; | ||
axisLabel: any; | ||
grid: any; | ||
ticks: any; | ||
tickLabels: any; | ||
parent: import("victory-core").VictoryStyleObject & { | ||
height: string; | ||
width: string; | ||
}; | ||
axis: import("victory-core").VictoryStyleObject; | ||
axisLabel: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
grid: import("victory-core").VictoryStyleObject; | ||
ticks: import("victory-core").VictoryTickStyleObject; | ||
tickLabels: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
}; | ||
export declare const getBaseProps: (props: VictoryPolarAxisProps, fallbackProps: any) => any; | ||
export declare const getBaseProps: (initialProps: VictoryPolarAxisProps, fallbackProps: any) => any; | ||
//# sourceMappingURL=helper-methods.d.ts.map |
@@ -119,3 +119,5 @@ "use strict"; | ||
var getStyles = function (props, styleObject) { | ||
var getStyles = function (props) { | ||
var styleObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
if (props.disableInlineStyles) { | ||
@@ -126,3 +128,2 @@ return {}; | ||
var style = props.style || {}; | ||
styleObject = styleObject || {}; | ||
var parentStyleProps = { | ||
@@ -381,6 +382,6 @@ height: "auto", | ||
var getCalculatedValues = function (props) { | ||
props = (0, _assign2.default)({ | ||
var getCalculatedValues = function (initialProps) { | ||
var props = (0, _assign2.default)({ | ||
polar: true | ||
}, props); | ||
}, initialProps); | ||
var defaultStyles = getStyleObject(props); | ||
@@ -427,4 +428,5 @@ var style = getStyles(props, defaultStyles); | ||
var getBaseProps = function (props, fallbackProps) { | ||
props = _victoryCore.Axis.modifyProps(props, fallbackProps); | ||
var getBaseProps = function (initialProps, fallbackProps) { | ||
var props = _victoryCore.Axis.modifyProps(initialProps, fallbackProps); | ||
var calculatedValues = getCalculatedValues(props); | ||
@@ -435,8 +437,7 @@ var style = calculatedValues.style, | ||
domain = calculatedValues.domain; | ||
var _props = props, | ||
width = _props.width, | ||
height = _props.height, | ||
standalone = _props.standalone, | ||
theme = _props.theme, | ||
name = _props.name; | ||
var width = props.width, | ||
height = props.height, | ||
standalone = props.standalone, | ||
theme = props.theme, | ||
name = props.name; | ||
var axisProps = getAxisProps(props, calculatedValues); | ||
@@ -443,0 +444,0 @@ var axisLabelProps = getAxisLabelProps(props, calculatedValues); |
@@ -45,8 +45,11 @@ import React from "react"; | ||
} | { | ||
parent: any; | ||
axis: any; | ||
axisLabel: any; | ||
grid: any; | ||
ticks: any; | ||
tickLabels: any; | ||
parent: import("victory-core").VictoryStyleObject & { | ||
height: string; | ||
width: string; | ||
}; | ||
axis: import("victory-core").VictoryStyleObject; | ||
axisLabel: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
grid: import("victory-core").VictoryStyleObject; | ||
ticks: import("victory-core").VictoryTickStyleObject; | ||
tickLabels: import("victory-core").VictoryLabelStyleObject | import("victory-core").VictoryLabelStyleObject[]; | ||
}; | ||
@@ -53,0 +56,0 @@ static getBaseProps: (props: any) => any; |
{ | ||
"name": "victory-polar-axis", | ||
"version": "36.8.2", | ||
"version": "36.8.3", | ||
"description": "Polar Axis Component for Victory", | ||
@@ -25,3 +25,3 @@ "keywords": [ | ||
"prop-types": "^15.8.1", | ||
"victory-core": "^36.8.2" | ||
"victory-core": "^36.8.3" | ||
}, | ||
@@ -28,0 +28,0 @@ "peerDependencies": { |
@@ -104,3 +104,6 @@ import { assign, uniqBy, defaults } from "lodash"; | ||
export const getStyles = (props: VictoryPolarAxisProps, styleObject) => { | ||
export const getStyles = ( | ||
props: VictoryPolarAxisProps, | ||
styleObject: VictoryPolarAxisProps["style"] = {}, | ||
) => { | ||
if (props.disableInlineStyles) { | ||
@@ -110,3 +113,2 @@ return {}; | ||
const style = props.style || {}; | ||
styleObject = styleObject || {}; | ||
const parentStyleProps = { height: "auto", width: "100%" }; | ||
@@ -437,4 +439,4 @@ return { | ||
const getCalculatedValues = (props: VictoryPolarAxisProps) => { | ||
props = assign({ polar: true }, props); | ||
const getCalculatedValues = (initialProps: VictoryPolarAxisProps) => { | ||
const props = assign({ polar: true }, initialProps); | ||
const defaultStyles = getStyleObject(props); | ||
@@ -471,4 +473,7 @@ const style = getStyles(props, defaultStyles); | ||
export const getBaseProps = (props: VictoryPolarAxisProps, fallbackProps) => { | ||
props = Axis.modifyProps(props, fallbackProps); | ||
export const getBaseProps = ( | ||
initialProps: VictoryPolarAxisProps, | ||
fallbackProps, | ||
) => { | ||
const props = Axis.modifyProps(initialProps, fallbackProps); | ||
const calculatedValues = getCalculatedValues(props); | ||
@@ -475,0 +480,0 @@ const { style, scale, ticks, domain } = calculatedValues; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1319736
22171
0
Updatedvictory-core@^36.8.3