victory-area 36.3.2 → 36.5.0
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/dist/victory-area.js +19470 -19493
- package/dist/victory-area.min.js +1 -1
- package/es/area.js +15 -12
- package/es/victory-area.js +52 -100
- package/lib/area.js +19 -12
- package/lib/helper-methods.js +1 -1
- package/lib/index.js +4 -4
- package/lib/victory-area.js +52 -102
- package/package.json +6 -6
- package/src/area.js +7 -4
- package/src/victory-area.js +4 -6
package/src/area.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { assign } from "lodash";
|
|
5
|
-
import * as d3Shape from "d3-shape";
|
|
6
|
-
import { Helpers, CommonProps, Path } from "victory-core";
|
|
5
|
+
import * as d3Shape from "victory-vendor/d3-shape";
|
|
6
|
+
import { Helpers, CommonProps, Path, UserProps } from "victory-core";
|
|
7
7
|
|
|
8
8
|
const defined = (d) => {
|
|
9
9
|
const y = d._y1 !== undefined ? d._y1 : d._y;
|
|
@@ -136,6 +136,7 @@ const Area = (props) => {
|
|
|
136
136
|
desc,
|
|
137
137
|
tabIndex
|
|
138
138
|
} = props;
|
|
139
|
+
const userProps = UserProps.getSafeUserProps(props);
|
|
139
140
|
const defaultTransform =
|
|
140
141
|
polar && origin ? `translate(${origin.x}, ${origin.y})` : undefined;
|
|
141
142
|
const transform = props.transform || defaultTransform;
|
|
@@ -156,6 +157,7 @@ const Area = (props) => {
|
|
|
156
157
|
clipPath,
|
|
157
158
|
tabIndex
|
|
158
159
|
};
|
|
160
|
+
|
|
159
161
|
const area = React.cloneElement(
|
|
160
162
|
pathComponent,
|
|
161
163
|
assign(
|
|
@@ -166,7 +168,8 @@ const Area = (props) => {
|
|
|
166
168
|
desc,
|
|
167
169
|
tabIndex
|
|
168
170
|
},
|
|
169
|
-
sharedProps
|
|
171
|
+
sharedProps,
|
|
172
|
+
userProps
|
|
170
173
|
)
|
|
171
174
|
);
|
|
172
175
|
|
|
@@ -185,7 +188,7 @@ const Area = (props) => {
|
|
|
185
188
|
: null;
|
|
186
189
|
|
|
187
190
|
return renderLine
|
|
188
|
-
? React.cloneElement(groupComponent,
|
|
191
|
+
? React.cloneElement(groupComponent, userProps, [area, line])
|
|
189
192
|
: area;
|
|
190
193
|
};
|
|
191
194
|
|
package/src/victory-area.js
CHANGED
|
@@ -108,13 +108,11 @@ class VictoryArea extends React.Component {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
const children = this.renderContinuousData(props);
|
|
111
|
-
const
|
|
112
|
-
props.containerComponent,
|
|
113
|
-
UserProps.getSafeUserProps(props)
|
|
114
|
-
);
|
|
115
|
-
return props.standalone
|
|
116
|
-
? this.renderContainer(container, children)
|
|
111
|
+
const component = props.standalone
|
|
112
|
+
? this.renderContainer(props.containerComponent, children)
|
|
117
113
|
: children;
|
|
114
|
+
|
|
115
|
+
return UserProps.withSafeUserProps(component, props);
|
|
118
116
|
}
|
|
119
117
|
}
|
|
120
118
|
|