victory-area 36.2.2 → 36.4.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 +19377 -19354
- package/dist/victory-area.min.js +1 -1
- package/es/area.js +15 -12
- package/es/victory-area.js +63 -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 +63 -99
- package/package.json +4 -4
- package/src/area.js +7 -4
- package/src/victory-area.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-area",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.4.0",
|
|
4
4
|
"description": "Area Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"author": "Formidable",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"d3-shape": "^1.2.0",
|
|
23
22
|
"lodash": "^4.17.19",
|
|
24
23
|
"prop-types": "^15.5.8",
|
|
25
|
-
"victory-core": "^36.
|
|
24
|
+
"victory-core": "^36.4.0",
|
|
25
|
+
"victory-vendor": "^36.4.0"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": "^16.6.0 || ^17.0.0"
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "2e05481eeb34f9801a90023a131a21aa7deff082"
|
|
35
35
|
}
|
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
|
@@ -13,7 +13,8 @@ import {
|
|
|
13
13
|
addEvents,
|
|
14
14
|
VictoryTheme,
|
|
15
15
|
Data,
|
|
16
|
-
Domain
|
|
16
|
+
Domain,
|
|
17
|
+
UserProps
|
|
17
18
|
} from "victory-core";
|
|
18
19
|
|
|
19
20
|
const fallbackProps = {
|
|
@@ -107,8 +108,12 @@ class VictoryArea extends React.Component {
|
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
const children = this.renderContinuousData(props);
|
|
111
|
+
const container = React.cloneElement(
|
|
112
|
+
props.containerComponent,
|
|
113
|
+
UserProps.getSafeUserProps(props)
|
|
114
|
+
);
|
|
110
115
|
return props.standalone
|
|
111
|
-
? this.renderContainer(
|
|
116
|
+
? this.renderContainer(container, children)
|
|
112
117
|
: children;
|
|
113
118
|
}
|
|
114
119
|
}
|