victory-pie 36.4.1 → 36.5.2
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-pie.js +743 -704
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -1
- package/es/slice.js +2 -1
- package/es/victory-pie.js +17 -25
- package/lib/helper-methods.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/slice.js +2 -1
- package/lib/victory-pie.js +17 -24
- package/package.json +5 -5
- package/src/helper-methods.js +16 -16
- package/src/index.d.ts +1 -1
- package/src/slice.js +6 -6
- package/src/victory-pie.js +41 -41
package/es/helper-methods.js
CHANGED
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/slice.js
CHANGED
package/es/victory-pie.js
CHANGED
|
@@ -6,7 +6,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
6
6
|
|
|
7
7
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
8
|
|
|
9
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
10
|
|
|
11
11
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
12
|
|
|
@@ -16,9 +16,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
16
16
|
|
|
17
17
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
18
|
|
|
19
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
-
|
|
21
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
22
20
|
|
|
23
21
|
/*eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2] }]*/
|
|
24
22
|
import React from "react";
|
|
@@ -76,13 +74,10 @@ var VictoryPie = /*#__PURE__*/function (_React$Component) {
|
|
|
76
74
|
return VictoryPie;
|
|
77
75
|
}(React.Component);
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
_defineProperty(VictoryPie, "role", "pie");
|
|
84
|
-
|
|
85
|
-
_defineProperty(VictoryPie, "defaultTransitions", {
|
|
77
|
+
VictoryPie.animationWhitelist = ["data", "endAngle", "height", "innerRadius", "cornerRadius", "padAngle", "padding", "colorScale", "startAngle", "style", "width"];
|
|
78
|
+
VictoryPie.displayName = "VictoryPie";
|
|
79
|
+
VictoryPie.role = "pie";
|
|
80
|
+
VictoryPie.defaultTransitions = {
|
|
86
81
|
onExit: {
|
|
87
82
|
duration: 500,
|
|
88
83
|
before: function () {
|
|
@@ -107,9 +102,8 @@ _defineProperty(VictoryPie, "defaultTransitions", {
|
|
|
107
102
|
};
|
|
108
103
|
}
|
|
109
104
|
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
_defineProperty(VictoryPie, "propTypes", {
|
|
105
|
+
};
|
|
106
|
+
VictoryPie.propTypes = {
|
|
113
107
|
animate: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
|
114
108
|
colorScale: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.oneOf(["grayscale", "qualitative", "heatmap", "warm", "cool", "red", "green", "blue"])]),
|
|
115
109
|
containerComponent: PropTypes.element,
|
|
@@ -169,9 +163,8 @@ _defineProperty(VictoryPie, "propTypes", {
|
|
|
169
163
|
width: CustomPropTypes.nonNegative,
|
|
170
164
|
x: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
171
165
|
y: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)])
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
_defineProperty(VictoryPie, "defaultProps", {
|
|
166
|
+
};
|
|
167
|
+
VictoryPie.defaultProps = {
|
|
175
168
|
data: [{
|
|
176
169
|
x: "A",
|
|
177
170
|
y: 1
|
|
@@ -195,14 +188,13 @@ _defineProperty(VictoryPie, "defaultProps", {
|
|
|
195
188
|
groupComponent: /*#__PURE__*/React.createElement("g", null),
|
|
196
189
|
sortOrder: "ascending",
|
|
197
190
|
theme: VictoryTheme.grayscale
|
|
198
|
-
}
|
|
191
|
+
};
|
|
199
192
|
|
|
200
|
-
|
|
193
|
+
VictoryPie.getBaseProps = function (props) {
|
|
201
194
|
return getBaseProps(props, fallbackProps);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
_defineProperty(VictoryPie, "getData", Data.getData);
|
|
205
|
-
|
|
206
|
-
_defineProperty(VictoryPie, "expectedComponents", ["dataComponent", "labelComponent", "groupComponent", "containerComponent"]);
|
|
195
|
+
};
|
|
207
196
|
|
|
208
|
-
|
|
197
|
+
VictoryPie.getData = Data.getData;
|
|
198
|
+
VictoryPie.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
199
|
+
export default addEvents(VictoryPie);
|
|
200
|
+
//# sourceMappingURL=victory-pie.js.map
|
package/lib/helper-methods.js
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -20,4 +20,5 @@ var _victoryPie = _interopRequireDefault(require("./victory-pie"));
|
|
|
20
20
|
|
|
21
21
|
var _slice = _interopRequireDefault(require("./slice"));
|
|
22
22
|
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
package/lib/slice.js
CHANGED
package/lib/victory-pie.js
CHANGED
|
@@ -25,7 +25,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
25
25
|
|
|
26
26
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
27
27
|
|
|
28
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
29
|
|
|
30
30
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
31
|
|
|
@@ -35,9 +35,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
35
35
|
|
|
36
36
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
37
|
|
|
38
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
-
|
|
40
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
39
|
|
|
42
40
|
var fallbackProps = {
|
|
43
41
|
endAngle: 360,
|
|
@@ -90,13 +88,10 @@ var VictoryPie = /*#__PURE__*/function (_React$Component) {
|
|
|
90
88
|
return VictoryPie;
|
|
91
89
|
}(_react.default.Component);
|
|
92
90
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
_defineProperty(VictoryPie, "role", "pie");
|
|
98
|
-
|
|
99
|
-
_defineProperty(VictoryPie, "defaultTransitions", {
|
|
91
|
+
VictoryPie.animationWhitelist = ["data", "endAngle", "height", "innerRadius", "cornerRadius", "padAngle", "padding", "colorScale", "startAngle", "style", "width"];
|
|
92
|
+
VictoryPie.displayName = "VictoryPie";
|
|
93
|
+
VictoryPie.role = "pie";
|
|
94
|
+
VictoryPie.defaultTransitions = {
|
|
100
95
|
onExit: {
|
|
101
96
|
duration: 500,
|
|
102
97
|
before: function () {
|
|
@@ -121,9 +116,8 @@ _defineProperty(VictoryPie, "defaultTransitions", {
|
|
|
121
116
|
};
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
_defineProperty(VictoryPie, "propTypes", {
|
|
119
|
+
};
|
|
120
|
+
VictoryPie.propTypes = {
|
|
127
121
|
animate: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.object]),
|
|
128
122
|
colorScale: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.oneOf(["grayscale", "qualitative", "heatmap", "warm", "cool", "red", "green", "blue"])]),
|
|
129
123
|
containerComponent: _propTypes.default.element,
|
|
@@ -183,9 +177,8 @@ _defineProperty(VictoryPie, "propTypes", {
|
|
|
183
177
|
width: _victoryCore.PropTypes.nonNegative,
|
|
184
178
|
x: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
185
179
|
y: _propTypes.default.oneOfType([_propTypes.default.func, _victoryCore.PropTypes.allOfType([_victoryCore.PropTypes.integer, _victoryCore.PropTypes.nonNegative]), _propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)])
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
_defineProperty(VictoryPie, "defaultProps", {
|
|
180
|
+
};
|
|
181
|
+
VictoryPie.defaultProps = {
|
|
189
182
|
data: [{
|
|
190
183
|
x: "A",
|
|
191
184
|
y: 1
|
|
@@ -209,16 +202,16 @@ _defineProperty(VictoryPie, "defaultProps", {
|
|
|
209
202
|
groupComponent: /*#__PURE__*/_react.default.createElement("g", null),
|
|
210
203
|
sortOrder: "ascending",
|
|
211
204
|
theme: _victoryCore.VictoryTheme.grayscale
|
|
212
|
-
}
|
|
205
|
+
};
|
|
213
206
|
|
|
214
|
-
|
|
207
|
+
VictoryPie.getBaseProps = function (props) {
|
|
215
208
|
return (0, _helperMethods.getBaseProps)(props, fallbackProps);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
_defineProperty(VictoryPie, "getData", _victoryCore.Data.getData);
|
|
209
|
+
};
|
|
219
210
|
|
|
220
|
-
|
|
211
|
+
VictoryPie.getData = _victoryCore.Data.getData;
|
|
212
|
+
VictoryPie.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
221
213
|
|
|
222
214
|
var _default = (0, _victoryCore.addEvents)(VictoryPie);
|
|
223
215
|
|
|
224
|
-
exports.default = _default;
|
|
216
|
+
exports.default = _default;
|
|
217
|
+
//# sourceMappingURL=victory-pie.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-pie",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.5.2",
|
|
4
4
|
"description": "Pie Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.19",
|
|
23
23
|
"prop-types": "^15.8.1",
|
|
24
|
-
"victory-core": "^36.
|
|
25
|
-
"victory-vendor": "^36.
|
|
24
|
+
"victory-core": "^36.5.2",
|
|
25
|
+
"victory-vendor": "^36.5.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"react": "
|
|
28
|
+
"react": ">=16.6.0"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "def218e9749ecafc159ef458dd03a8b92e227666"
|
|
35
35
|
}
|
package/src/helper-methods.js
CHANGED
|
@@ -26,7 +26,7 @@ const getRadius = (props, padding) => {
|
|
|
26
26
|
return (
|
|
27
27
|
Math.min(
|
|
28
28
|
props.width - padding.left - padding.right,
|
|
29
|
-
props.height - padding.top - padding.bottom
|
|
29
|
+
props.height - padding.top - padding.bottom,
|
|
30
30
|
) / 2
|
|
31
31
|
);
|
|
32
32
|
};
|
|
@@ -42,7 +42,7 @@ const getOrigin = (props, padding) => {
|
|
|
42
42
|
y:
|
|
43
43
|
origin.y !== undefined
|
|
44
44
|
? origin.y
|
|
45
|
-
: (padding.top - padding.bottom + height) / 2
|
|
45
|
+
: (padding.top - padding.bottom + height) / 2,
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
|
|
@@ -79,7 +79,7 @@ const getCalculatedValues = (props) => {
|
|
|
79
79
|
defaultRadius,
|
|
80
80
|
data,
|
|
81
81
|
slices,
|
|
82
|
-
origin
|
|
82
|
+
origin,
|
|
83
83
|
});
|
|
84
84
|
};
|
|
85
85
|
|
|
@@ -110,7 +110,7 @@ const getLabelArc = (radius, labelRadius, style) => {
|
|
|
110
110
|
const getLabelPosition = (arc, slice, position) => {
|
|
111
111
|
const construct = {
|
|
112
112
|
startAngle: position === "startAngle" ? slice.startAngle : slice.endAngle,
|
|
113
|
-
endAngle: position === "endAngle" ? slice.endAngle : slice.startAngle
|
|
113
|
+
endAngle: position === "endAngle" ? slice.endAngle : slice.startAngle,
|
|
114
114
|
};
|
|
115
115
|
const clonedArc = assign({}, slice, construct);
|
|
116
116
|
return arc.centroid(clonedArc);
|
|
@@ -153,7 +153,7 @@ const getBaseLabelAngle = (slice, labelPosition, labelStyle) => {
|
|
|
153
153
|
baseAngle = labelStyle.angle;
|
|
154
154
|
} else if (labelPosition === "centroid") {
|
|
155
155
|
baseAngle = Helpers.radiansToDegrees(
|
|
156
|
-
(slice.startAngle + slice.endAngle) / 2
|
|
156
|
+
(slice.startAngle + slice.endAngle) / 2,
|
|
157
157
|
);
|
|
158
158
|
} else {
|
|
159
159
|
baseAngle =
|
|
@@ -180,22 +180,22 @@ const getLabelProps = (text, dataProps, calculatedValues) => {
|
|
|
180
180
|
const { style, defaultRadius, origin, width, height } = calculatedValues;
|
|
181
181
|
const labelRadius = Helpers.evaluateProp(
|
|
182
182
|
calculatedValues.labelRadius,
|
|
183
|
-
assign({ text }, dataProps)
|
|
183
|
+
assign({ text }, dataProps),
|
|
184
184
|
);
|
|
185
185
|
const labelPosition =
|
|
186
186
|
Helpers.evaluateProp(
|
|
187
187
|
calculatedValues.labelPosition,
|
|
188
|
-
assign({ text }, dataProps)
|
|
188
|
+
assign({ text }, dataProps),
|
|
189
189
|
) || "centroid";
|
|
190
190
|
const labelPlacement =
|
|
191
191
|
Helpers.evaluateProp(
|
|
192
192
|
calculatedValues.labelPlacement,
|
|
193
|
-
assign({ text }, dataProps)
|
|
193
|
+
assign({ text }, dataProps),
|
|
194
194
|
) || "vertical";
|
|
195
195
|
const labelStyle = assign({ padding: 0 }, style.labels);
|
|
196
196
|
const evaluatedStyle = Helpers.evaluateStyle(
|
|
197
197
|
labelStyle,
|
|
198
|
-
assign({ labelRadius, text }, dataProps)
|
|
198
|
+
assign({ labelRadius, text }, dataProps),
|
|
199
199
|
);
|
|
200
200
|
const labelArc = getLabelArc(defaultRadius, labelRadius, evaluatedStyle);
|
|
201
201
|
const position = getLabelPosition(labelArc, slice, labelPosition);
|
|
@@ -220,7 +220,7 @@ const getLabelProps = (text, dataProps, calculatedValues) => {
|
|
|
220
220
|
y: Math.round(position[1]) + origin.y,
|
|
221
221
|
textAnchor,
|
|
222
222
|
verticalAnchor,
|
|
223
|
-
angle: labelAngle
|
|
223
|
+
angle: labelAngle,
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
if (!Helpers.isTooltip(labelComponent)) {
|
|
@@ -249,18 +249,18 @@ export const getBaseProps = (props, fallbackProps) => {
|
|
|
249
249
|
innerRadius,
|
|
250
250
|
cornerRadius,
|
|
251
251
|
padAngle,
|
|
252
|
-
disableInlineStyles
|
|
252
|
+
disableInlineStyles,
|
|
253
253
|
} = calculatedValues;
|
|
254
254
|
const radius = props.radius || defaultRadius;
|
|
255
255
|
const initialChildProps = {
|
|
256
|
-
parent: { standalone, height, width, slices, name, style: style.parent }
|
|
256
|
+
parent: { standalone, height, width, slices, name, style: style.parent },
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
return slices.reduce((childProps, slice, index) => {
|
|
260
260
|
const datum = defaults({}, data[index], {
|
|
261
261
|
startAngle: Helpers.radiansToDegrees(slice.startAngle),
|
|
262
262
|
endAngle: Helpers.radiansToDegrees(slice.endAngle),
|
|
263
|
-
padAngle: Helpers.radiansToDegrees(slice.padAngle)
|
|
263
|
+
padAngle: Helpers.radiansToDegrees(slice.padAngle),
|
|
264
264
|
});
|
|
265
265
|
const eventKey = !isNil(datum.eventKey) ? datum.eventKey : index;
|
|
266
266
|
const dataProps = {
|
|
@@ -274,10 +274,10 @@ export const getBaseProps = (props, fallbackProps) => {
|
|
|
274
274
|
cornerRadius,
|
|
275
275
|
padAngle,
|
|
276
276
|
style: disableInlineStyles ? {} : getSliceStyle(index, calculatedValues),
|
|
277
|
-
disableInlineStyles
|
|
277
|
+
disableInlineStyles,
|
|
278
278
|
};
|
|
279
279
|
childProps[eventKey] = {
|
|
280
|
-
data: dataProps
|
|
280
|
+
data: dataProps,
|
|
281
281
|
};
|
|
282
282
|
const text = getLabelText(props, datum, index);
|
|
283
283
|
if (
|
|
@@ -288,7 +288,7 @@ export const getBaseProps = (props, fallbackProps) => {
|
|
|
288
288
|
childProps[eventKey].labels = getLabelProps(
|
|
289
289
|
evaluatedText,
|
|
290
290
|
assign({}, props, dataProps),
|
|
291
|
-
calculatedValues
|
|
291
|
+
calculatedValues,
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
294
|
return childProps;
|
package/src/index.d.ts
CHANGED
package/src/slice.js
CHANGED
|
@@ -39,11 +39,11 @@ const evaluateProps = (props) => {
|
|
|
39
39
|
const style = Helpers.evaluateStyle(props.style, props);
|
|
40
40
|
const radius = Helpers.evaluateProp(
|
|
41
41
|
props.radius,
|
|
42
|
-
assign({}, props, { style })
|
|
42
|
+
assign({}, props, { style }),
|
|
43
43
|
);
|
|
44
44
|
const innerRadius = Helpers.evaluateProp(
|
|
45
45
|
props.innerRadius,
|
|
46
|
-
assign({}, props, { style, radius })
|
|
46
|
+
assign({}, props, { style, radius }),
|
|
47
47
|
);
|
|
48
48
|
|
|
49
49
|
const ariaLabel = Helpers.evaluateProp(props.ariaLabel, props);
|
|
@@ -64,7 +64,7 @@ const evaluateProps = (props) => {
|
|
|
64
64
|
padAngle,
|
|
65
65
|
sliceStartAngle,
|
|
66
66
|
sliceEndAngle,
|
|
67
|
-
tabIndex
|
|
67
|
+
tabIndex,
|
|
68
68
|
});
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -84,7 +84,7 @@ const Slice = (props) => {
|
|
|
84
84
|
role: props.role,
|
|
85
85
|
shapeRendering: props.shapeRendering,
|
|
86
86
|
clipPath: props.clipPath,
|
|
87
|
-
tabIndex: props.tabIndex
|
|
87
|
+
tabIndex: props.tabIndex,
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
90
|
|
|
@@ -99,13 +99,13 @@ Slice.propTypes = {
|
|
|
99
99
|
radius: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
100
100
|
slice: PropTypes.object,
|
|
101
101
|
sliceEndAngle: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
102
|
-
sliceStartAngle: PropTypes.oneOfType([PropTypes.number, PropTypes.func])
|
|
102
|
+
sliceStartAngle: PropTypes.oneOfType([PropTypes.number, PropTypes.func]),
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
Slice.defaultProps = {
|
|
106
106
|
pathComponent: <Path />,
|
|
107
107
|
role: "presentation",
|
|
108
|
-
shapeRendering: "auto"
|
|
108
|
+
shapeRendering: "auto",
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
export default Slice;
|