victory-area 36.8.2 → 36.8.4
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 +4 -0
- package/dist/victory-area.js +179 -155
- package/dist/victory-area.min.js +1 -1
- package/es/area.js +17 -18
- package/es/helper-methods.d.ts +1 -1
- package/es/helper-methods.js +24 -23
- package/es/victory-area.d.ts +4 -3
- package/lib/area.js +17 -18
- package/lib/helper-methods.d.ts +1 -1
- package/lib/helper-methods.js +23 -24
- package/lib/victory-area.d.ts +4 -3
- package/package.json +3 -3
- package/src/area.tsx +2 -2
- package/src/helper-methods.tsx +7 -3
package/es/area.js
CHANGED
|
@@ -91,24 +91,23 @@ var defaultProps = {
|
|
|
91
91
|
* The area primitive used by VictoryArea
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
|
-
export var Area = function (
|
|
95
|
-
props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps),
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
tabIndex = _props.tabIndex;
|
|
94
|
+
export var Area = function (initialProps) {
|
|
95
|
+
var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
|
|
96
|
+
var ariaLabel = props.ariaLabel,
|
|
97
|
+
role = props.role,
|
|
98
|
+
shapeRendering = props.shapeRendering,
|
|
99
|
+
className = props.className,
|
|
100
|
+
polar = props.polar,
|
|
101
|
+
origin = props.origin,
|
|
102
|
+
data = props.data,
|
|
103
|
+
pathComponent = props.pathComponent,
|
|
104
|
+
events = props.events,
|
|
105
|
+
groupComponent = props.groupComponent,
|
|
106
|
+
clipPath = props.clipPath,
|
|
107
|
+
id = props.id,
|
|
108
|
+
style = props.style,
|
|
109
|
+
desc = props.desc,
|
|
110
|
+
tabIndex = props.tabIndex;
|
|
112
111
|
var userProps = UserProps.getSafeUserProps(props);
|
|
113
112
|
var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;
|
|
114
113
|
var transform = props.transform || defaultTransform;
|
package/es/helper-methods.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const getDataWithBaseline: (props: any, scale: any) => any;
|
|
2
|
-
export declare const getBaseProps: (
|
|
2
|
+
export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
|
|
3
3
|
//# sourceMappingURL=helper-methods.d.ts.map
|
package/es/helper-methods.js
CHANGED
|
@@ -69,29 +69,30 @@ var getCalculatedValues = function (props) {
|
|
|
69
69
|
};
|
|
70
70
|
};
|
|
71
71
|
|
|
72
|
-
export var getBaseProps = function (
|
|
73
|
-
var modifiedProps = Helpers.modifyProps(
|
|
74
|
-
|
|
75
|
-
var
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
72
|
+
export var getBaseProps = function (initialProps, fallbackProps) {
|
|
73
|
+
var modifiedProps = Helpers.modifyProps(initialProps, fallbackProps, "area");
|
|
74
|
+
|
|
75
|
+
var props = _assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
76
|
+
|
|
77
|
+
var data = props.data,
|
|
78
|
+
domain = props.domain,
|
|
79
|
+
events = props.events,
|
|
80
|
+
groupComponent = props.groupComponent,
|
|
81
|
+
height = props.height,
|
|
82
|
+
horizontal = props.horizontal,
|
|
83
|
+
interpolation = props.interpolation,
|
|
84
|
+
origin = props.origin,
|
|
85
|
+
padding = props.padding,
|
|
86
|
+
polar = props.polar,
|
|
87
|
+
scale = props.scale,
|
|
88
|
+
sharedEvents = props.sharedEvents,
|
|
89
|
+
standalone = props.standalone,
|
|
90
|
+
style = props.style,
|
|
91
|
+
theme = props.theme,
|
|
92
|
+
width = props.width,
|
|
93
|
+
labels = props.labels,
|
|
94
|
+
name = props.name,
|
|
95
|
+
disableInlineStyles = props.disableInlineStyles;
|
|
95
96
|
var initialChildProps = {
|
|
96
97
|
parent: {
|
|
97
98
|
style: style.parent,
|
package/es/victory-area.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ declare class VictoryAreaBase extends React.Component<VictoryAreaProps> {
|
|
|
35
35
|
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
36
36
|
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
37
37
|
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
38
|
+
disableInlineStyles?: React.Validator<boolean | null | undefined> | undefined;
|
|
38
39
|
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], import("victory-core").StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
39
40
|
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
40
41
|
height?: React.Validator<number | null | undefined> | undefined;
|
|
@@ -52,9 +53,9 @@ declare class VictoryAreaBase extends React.Component<VictoryAreaProps> {
|
|
|
52
53
|
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
53
54
|
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
54
55
|
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
55
|
-
scale?: React.Validator<import("victory-core").
|
|
56
|
-
x?: import("victory-core").
|
|
57
|
-
y?: import("victory-core").
|
|
56
|
+
scale?: React.Validator<import("victory-core").ScaleName | import("victory-core").D3Scale<any> | {
|
|
57
|
+
x?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
58
|
+
y?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
58
59
|
} | null | undefined> | undefined;
|
|
59
60
|
sharedEvents?: React.Validator<{
|
|
60
61
|
events: any[];
|
package/lib/area.js
CHANGED
|
@@ -115,24 +115,23 @@ var defaultProps = {
|
|
|
115
115
|
* The area primitive used by VictoryArea
|
|
116
116
|
*/
|
|
117
117
|
|
|
118
|
-
var Area = function (
|
|
119
|
-
props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps),
|
|
120
|
-
var
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
tabIndex = _props.tabIndex;
|
|
118
|
+
var Area = function (initialProps) {
|
|
119
|
+
var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
|
|
120
|
+
var ariaLabel = props.ariaLabel,
|
|
121
|
+
role = props.role,
|
|
122
|
+
shapeRendering = props.shapeRendering,
|
|
123
|
+
className = props.className,
|
|
124
|
+
polar = props.polar,
|
|
125
|
+
origin = props.origin,
|
|
126
|
+
data = props.data,
|
|
127
|
+
pathComponent = props.pathComponent,
|
|
128
|
+
events = props.events,
|
|
129
|
+
groupComponent = props.groupComponent,
|
|
130
|
+
clipPath = props.clipPath,
|
|
131
|
+
id = props.id,
|
|
132
|
+
style = props.style,
|
|
133
|
+
desc = props.desc,
|
|
134
|
+
tabIndex = props.tabIndex;
|
|
136
135
|
|
|
137
136
|
var userProps = _victoryCore.UserProps.getSafeUserProps(props);
|
|
138
137
|
|
package/lib/helper-methods.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const getDataWithBaseline: (props: any, scale: any) => any;
|
|
2
|
-
export declare const getBaseProps: (
|
|
2
|
+
export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
|
|
3
3
|
//# sourceMappingURL=helper-methods.d.ts.map
|
package/lib/helper-methods.js
CHANGED
|
@@ -89,30 +89,29 @@ var getCalculatedValues = function (props) {
|
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
-
var getBaseProps = function (
|
|
93
|
-
var modifiedProps = _victoryCore.Helpers.modifyProps(
|
|
94
|
-
|
|
95
|
-
props = (0, _assign2.default)({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
96
|
-
var
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
disableInlineStyles = _props.disableInlineStyles;
|
|
92
|
+
var getBaseProps = function (initialProps, fallbackProps) {
|
|
93
|
+
var modifiedProps = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "area");
|
|
94
|
+
|
|
95
|
+
var props = (0, _assign2.default)({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
96
|
+
var data = props.data,
|
|
97
|
+
domain = props.domain,
|
|
98
|
+
events = props.events,
|
|
99
|
+
groupComponent = props.groupComponent,
|
|
100
|
+
height = props.height,
|
|
101
|
+
horizontal = props.horizontal,
|
|
102
|
+
interpolation = props.interpolation,
|
|
103
|
+
origin = props.origin,
|
|
104
|
+
padding = props.padding,
|
|
105
|
+
polar = props.polar,
|
|
106
|
+
scale = props.scale,
|
|
107
|
+
sharedEvents = props.sharedEvents,
|
|
108
|
+
standalone = props.standalone,
|
|
109
|
+
style = props.style,
|
|
110
|
+
theme = props.theme,
|
|
111
|
+
width = props.width,
|
|
112
|
+
labels = props.labels,
|
|
113
|
+
name = props.name,
|
|
114
|
+
disableInlineStyles = props.disableInlineStyles;
|
|
116
115
|
var initialChildProps = {
|
|
117
116
|
parent: {
|
|
118
117
|
style: style.parent,
|
package/lib/victory-area.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ declare class VictoryAreaBase extends React.Component<VictoryAreaProps> {
|
|
|
35
35
|
animate?: React.Validator<boolean | import("victory-core").AnimatePropTypeInterface | null | undefined> | undefined;
|
|
36
36
|
colorScale?: React.Validator<import("victory-core").ColorScalePropType | null | undefined> | undefined;
|
|
37
37
|
containerComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
38
|
+
disableInlineStyles?: React.Validator<boolean | null | undefined> | undefined;
|
|
38
39
|
externalEventMutations?: React.Validator<import("victory-core").EventCallbackInterface<string | string[], import("victory-core").StringOrNumberOrList>[] | null | undefined> | undefined;
|
|
39
40
|
groupComponent?: React.Validator<React.ReactElement<any, string | React.JSXElementConstructor<any>> | null | undefined> | undefined;
|
|
40
41
|
height?: React.Validator<number | null | undefined> | undefined;
|
|
@@ -52,9 +53,9 @@ declare class VictoryAreaBase extends React.Component<VictoryAreaProps> {
|
|
|
52
53
|
padding?: React.Validator<import("victory-core").PaddingProps | null | undefined> | undefined;
|
|
53
54
|
polar?: React.Validator<boolean | null | undefined> | undefined;
|
|
54
55
|
range?: React.Validator<import("victory-core").ForAxes<import("victory-core").RangeTuple> | null | undefined> | undefined;
|
|
55
|
-
scale?: React.Validator<import("victory-core").
|
|
56
|
-
x?: import("victory-core").
|
|
57
|
-
y?: import("victory-core").
|
|
56
|
+
scale?: React.Validator<import("victory-core").ScaleName | import("victory-core").D3Scale<any> | {
|
|
57
|
+
x?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
58
|
+
y?: import("victory-core").ScaleName | import("victory-core").D3Scale<any> | undefined;
|
|
58
59
|
} | null | undefined> | undefined;
|
|
59
60
|
sharedEvents?: React.Validator<{
|
|
60
61
|
events: any[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-area",
|
|
3
|
-
"version": "36.8.
|
|
3
|
+
"version": "36.8.4",
|
|
4
4
|
"description": "Area Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"prop-types": "^15.8.1",
|
|
25
|
-
"victory-core": "^36.8.
|
|
26
|
-
"victory-vendor": "^36.8.
|
|
25
|
+
"victory-core": "^36.8.4",
|
|
26
|
+
"victory-vendor": "^36.8.4"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": ">=16.6.0"
|
package/src/area.tsx
CHANGED
|
@@ -102,8 +102,8 @@ const defaultProps = {
|
|
|
102
102
|
/**
|
|
103
103
|
* The area primitive used by VictoryArea
|
|
104
104
|
*/
|
|
105
|
-
export const Area: React.FC<AreaProps> = (
|
|
106
|
-
props = evaluateProps({ ...defaultProps, ...
|
|
105
|
+
export const Area: React.FC<AreaProps> = (initialProps) => {
|
|
106
|
+
const props = evaluateProps({ ...defaultProps, ...initialProps });
|
|
107
107
|
const {
|
|
108
108
|
ariaLabel,
|
|
109
109
|
role,
|
package/src/helper-methods.tsx
CHANGED
|
@@ -64,9 +64,13 @@ const getCalculatedValues = (props) => {
|
|
|
64
64
|
return { style, data, scale, domain, origin };
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
export const getBaseProps = (
|
|
68
|
-
const modifiedProps = Helpers.modifyProps(
|
|
69
|
-
|
|
67
|
+
export const getBaseProps = (initialProps, fallbackProps) => {
|
|
68
|
+
const modifiedProps = Helpers.modifyProps(
|
|
69
|
+
initialProps,
|
|
70
|
+
fallbackProps,
|
|
71
|
+
"area",
|
|
72
|
+
);
|
|
73
|
+
const props = assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
70
74
|
const {
|
|
71
75
|
data,
|
|
72
76
|
domain,
|