victory-area 36.8.2 → 36.8.3

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/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 (props) {
95
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
96
- var _props = props,
97
- ariaLabel = _props.ariaLabel,
98
- role = _props.role,
99
- shapeRendering = _props.shapeRendering,
100
- className = _props.className,
101
- polar = _props.polar,
102
- origin = _props.origin,
103
- data = _props.data,
104
- pathComponent = _props.pathComponent,
105
- events = _props.events,
106
- groupComponent = _props.groupComponent,
107
- clipPath = _props.clipPath,
108
- id = _props.id,
109
- style = _props.style,
110
- desc = _props.desc,
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;
@@ -1,3 +1,3 @@
1
1
  export declare const getDataWithBaseline: (props: any, scale: any) => any;
2
- export declare const getBaseProps: (props: any, fallbackProps: any) => any;
2
+ export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
3
3
  //# sourceMappingURL=helper-methods.d.ts.map
@@ -69,29 +69,30 @@ var getCalculatedValues = function (props) {
69
69
  };
70
70
  };
71
71
 
72
- export var getBaseProps = function (props, fallbackProps) {
73
- var modifiedProps = Helpers.modifyProps(props, fallbackProps, "area");
74
- props = _assign({}, modifiedProps, getCalculatedValues(modifiedProps));
75
- var _props = props,
76
- data = _props.data,
77
- domain = _props.domain,
78
- events = _props.events,
79
- groupComponent = _props.groupComponent,
80
- height = _props.height,
81
- horizontal = _props.horizontal,
82
- interpolation = _props.interpolation,
83
- origin = _props.origin,
84
- padding = _props.padding,
85
- polar = _props.polar,
86
- scale = _props.scale,
87
- sharedEvents = _props.sharedEvents,
88
- standalone = _props.standalone,
89
- style = _props.style,
90
- theme = _props.theme,
91
- width = _props.width,
92
- labels = _props.labels,
93
- name = _props.name,
94
- disableInlineStyles = _props.disableInlineStyles;
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,
@@ -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").D3Scale<any> | import("victory-core").ScaleName | {
56
- x?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
57
- y?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
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 (props) {
119
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
120
- var _props = props,
121
- ariaLabel = _props.ariaLabel,
122
- role = _props.role,
123
- shapeRendering = _props.shapeRendering,
124
- className = _props.className,
125
- polar = _props.polar,
126
- origin = _props.origin,
127
- data = _props.data,
128
- pathComponent = _props.pathComponent,
129
- events = _props.events,
130
- groupComponent = _props.groupComponent,
131
- clipPath = _props.clipPath,
132
- id = _props.id,
133
- style = _props.style,
134
- desc = _props.desc,
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
 
@@ -1,3 +1,3 @@
1
1
  export declare const getDataWithBaseline: (props: any, scale: any) => any;
2
- export declare const getBaseProps: (props: any, fallbackProps: any) => any;
2
+ export declare const getBaseProps: (initialProps: any, fallbackProps: any) => any;
3
3
  //# sourceMappingURL=helper-methods.d.ts.map
@@ -89,30 +89,29 @@ var getCalculatedValues = function (props) {
89
89
  };
90
90
  };
91
91
 
92
- var getBaseProps = function (props, fallbackProps) {
93
- var modifiedProps = _victoryCore.Helpers.modifyProps(props, fallbackProps, "area");
94
-
95
- props = (0, _assign2.default)({}, modifiedProps, getCalculatedValues(modifiedProps));
96
- var _props = props,
97
- data = _props.data,
98
- domain = _props.domain,
99
- events = _props.events,
100
- groupComponent = _props.groupComponent,
101
- height = _props.height,
102
- horizontal = _props.horizontal,
103
- interpolation = _props.interpolation,
104
- origin = _props.origin,
105
- padding = _props.padding,
106
- polar = _props.polar,
107
- scale = _props.scale,
108
- sharedEvents = _props.sharedEvents,
109
- standalone = _props.standalone,
110
- style = _props.style,
111
- theme = _props.theme,
112
- width = _props.width,
113
- labels = _props.labels,
114
- name = _props.name,
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,
@@ -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").D3Scale<any> | import("victory-core").ScaleName | {
56
- x?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
57
- y?: import("victory-core").D3Scale<any> | import("victory-core").ScaleName | undefined;
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.2",
3
+ "version": "36.8.3",
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.2",
26
- "victory-vendor": "^36.8.2"
25
+ "victory-core": "^36.8.3",
26
+ "victory-vendor": "^36.8.3"
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> = (props) => {
106
- props = evaluateProps({ ...defaultProps, ...props });
105
+ export const Area: React.FC<AreaProps> = (initialProps) => {
106
+ const props = evaluateProps({ ...defaultProps, ...initialProps });
107
107
  const {
108
108
  ariaLabel,
109
109
  role,
@@ -64,9 +64,13 @@ const getCalculatedValues = (props) => {
64
64
  return { style, data, scale, domain, origin };
65
65
  };
66
66
 
67
- export const getBaseProps = (props, fallbackProps) => {
68
- const modifiedProps = Helpers.modifyProps(props, fallbackProps, "area");
69
- props = assign({}, modifiedProps, getCalculatedValues(modifiedProps));
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,