victory-legend 37.3.1 → 37.3.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/CHANGELOG.md +10 -0
- package/dist/victory-legend.js +290 -260
- package/dist/victory-legend.min.js +1 -1
- package/es/helper-methods.js +16 -20
- package/es/victory-legend.d.ts +8 -8
- package/es/victory-legend.js +1 -1
- package/lib/helper-methods.js +16 -20
- package/lib/victory-legend.d.ts +8 -8
- package/lib/victory-legend.js +1 -1
- package/package.json +6 -38
- package/src/helper-methods.ts +4 -3
- package/src/victory-legend.tsx +1 -1
package/dist/victory-legend.js
CHANGED
|
@@ -23,12 +23,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23
23
|
/* harmony export */ "getBaseProps": function() { return /* binding */ getBaseProps; },
|
|
24
24
|
/* harmony export */ "getDimensions": function() { return /* binding */ getDimensions; }
|
|
25
25
|
/* harmony export */ });
|
|
26
|
-
/* harmony import */ var
|
|
27
|
-
/* harmony import */ var
|
|
26
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
27
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
28
28
|
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/groupBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/groupBy.js");
|
|
29
29
|
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
30
|
-
/* harmony import */ var
|
|
31
|
-
/* harmony import */ var
|
|
30
|
+
/* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/range */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js");
|
|
31
|
+
/* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_range__WEBPACK_IMPORTED_MODULE_2__);
|
|
32
32
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/style.js");
|
|
33
33
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
34
34
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/textsize.js");
|
|
@@ -49,7 +49,7 @@ const getLabelStyles = props => {
|
|
|
49
49
|
style
|
|
50
50
|
} = props;
|
|
51
51
|
return data.map((datum, index) => {
|
|
52
|
-
const baseLabelStyles =
|
|
52
|
+
const baseLabelStyles = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, datum.labels, style.labels);
|
|
53
53
|
return victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(baseLabelStyles, {
|
|
54
54
|
datum,
|
|
55
55
|
index,
|
|
@@ -67,11 +67,11 @@ const getStyles = function (props, styleObject) {
|
|
|
67
67
|
width: "100%"
|
|
68
68
|
};
|
|
69
69
|
return {
|
|
70
|
-
parent:
|
|
71
|
-
data:
|
|
72
|
-
labels:
|
|
73
|
-
border:
|
|
74
|
-
title:
|
|
70
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()(style.parent, styleObject.parent, parentStyleProps),
|
|
71
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, style.data, styleObject.data),
|
|
72
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, style.labels, styleObject.labels),
|
|
73
|
+
border: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, style.border, styleObject.border),
|
|
74
|
+
title: lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, style.title, styleObject.title)
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
const getCalculatedValues = props => {
|
|
@@ -83,9 +83,7 @@ const getCalculatedValues = props => {
|
|
|
83
83
|
const style = getStyles(props, defaultStyles);
|
|
84
84
|
const colorScale = getColorScale(props);
|
|
85
85
|
const isHorizontal = orientation === "horizontal";
|
|
86
|
-
const borderPadding = victory_core__WEBPACK_IMPORTED_MODULE_4__.getPadding(
|
|
87
|
-
padding: props.borderPadding
|
|
88
|
-
});
|
|
86
|
+
const borderPadding = victory_core__WEBPACK_IMPORTED_MODULE_4__.getPadding(props.borderPadding);
|
|
89
87
|
return Object.assign({}, props, {
|
|
90
88
|
style,
|
|
91
89
|
isHorizontal,
|
|
@@ -179,8 +177,8 @@ const getOffset = (datum, rowHeights, columnWidths) => {
|
|
|
179
177
|
row
|
|
180
178
|
} = datum;
|
|
181
179
|
return {
|
|
182
|
-
x:
|
|
183
|
-
y:
|
|
180
|
+
x: lodash_range__WEBPACK_IMPORTED_MODULE_2___default()(column).reduce((memo, curr) => memo + columnWidths[curr], 0),
|
|
181
|
+
y: lodash_range__WEBPACK_IMPORTED_MODULE_2___default()(row).reduce((memo, curr) => memo + rowHeights[curr], 0)
|
|
184
182
|
};
|
|
185
183
|
};
|
|
186
184
|
const getAnchors = (titleOrientation, centerTitle) => {
|
|
@@ -206,10 +204,8 @@ const getTitleStyle = props => {
|
|
|
206
204
|
const baseStyle = props.style && props.style.title || {};
|
|
207
205
|
const componentStyle = titleComponent.props && titleComponent.props.style || {};
|
|
208
206
|
const anchors = getAnchors(titleOrientation, centerTitle);
|
|
209
|
-
return Array.isArray(componentStyle) ? componentStyle.map(obj =>
|
|
207
|
+
return Array.isArray(componentStyle) ? componentStyle.map(obj => lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, obj, baseStyle, anchors)) : lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, componentStyle, baseStyle, anchors);
|
|
210
208
|
};
|
|
211
|
-
|
|
212
|
-
// eslint-disable-next-line complexity
|
|
213
209
|
const getTitleProps = (props, borderProps) => {
|
|
214
210
|
const {
|
|
215
211
|
title,
|
|
@@ -339,7 +335,7 @@ const getBaseProps = (initialProps, fallbackProps) => {
|
|
|
339
335
|
};
|
|
340
336
|
return groupedData.reduce((childProps, datum, i) => {
|
|
341
337
|
const color = colorScale[i % colorScale.length];
|
|
342
|
-
const dataStyle =
|
|
338
|
+
const dataStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, datum.symbol, style.data, {
|
|
343
339
|
fill: color
|
|
344
340
|
});
|
|
345
341
|
const eventKey = !victory_core__WEBPACK_IMPORTED_MODULE_4__.isNil(datum.eventKey) ? datum.eventKey : i;
|
|
@@ -428,7 +424,7 @@ const defaultLegendData = [{
|
|
|
428
424
|
name: "Series 2"
|
|
429
425
|
}];
|
|
430
426
|
|
|
431
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
427
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
432
428
|
|
|
433
429
|
class VictoryLegendBase extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
434
430
|
static displayName = "VictoryLegend";
|
|
@@ -5031,10 +5027,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5031
5027
|
/* harmony export */ "isInterpolatable": function() { return /* binding */ isInterpolatable; },
|
|
5032
5028
|
/* harmony export */ "victoryInterpolator": function() { return /* binding */ victoryInterpolator; }
|
|
5033
5029
|
/* harmony export */ });
|
|
5034
|
-
/* harmony import */ var
|
|
5035
|
-
/* harmony import */ var
|
|
5036
|
-
/* harmony import */ var
|
|
5037
|
-
/* harmony import */ var
|
|
5030
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
5031
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
5032
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
|
|
5033
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
5038
5034
|
/* harmony import */ var victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-interpolate */ "../../victory-vendor/es/d3-interpolate.js");
|
|
5039
5035
|
|
|
5040
5036
|
|
|
@@ -5060,7 +5056,7 @@ const isInterpolatable = function (obj) {
|
|
|
5060
5056
|
return false;
|
|
5061
5057
|
case "object":
|
|
5062
5058
|
// Don't try to interpolate class instances (except Date or Array).
|
|
5063
|
-
return obj instanceof Date || Array.isArray(obj) ||
|
|
5059
|
+
return obj instanceof Date || Array.isArray(obj) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(obj);
|
|
5064
5060
|
case "function":
|
|
5065
5061
|
// Careful! There may be extra properties on function objects that the
|
|
5066
5062
|
// component expects to access - for instance, it may be a `d3.scale()`
|
|
@@ -5120,7 +5116,7 @@ const interpolateFunction = function (a, b) {
|
|
|
5120
5116
|
return b;
|
|
5121
5117
|
}
|
|
5122
5118
|
return function () {
|
|
5123
|
-
/* eslint-disable
|
|
5119
|
+
/* eslint-disable prefer-rest-params */
|
|
5124
5120
|
const aval = typeof a === "function" ? a.apply(this, arguments) : a;
|
|
5125
5121
|
const bval = typeof b === "function" ? b.apply(this, arguments) : b;
|
|
5126
5122
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(aval, bval)(t);
|
|
@@ -5146,7 +5142,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
5146
5142
|
if (typeof x === "function" || typeof y === "function") {
|
|
5147
5143
|
return interpolateFunction(x, y);
|
|
5148
5144
|
}
|
|
5149
|
-
if (typeof x === "object" &&
|
|
5145
|
+
if (typeof x === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(x) || typeof y === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(y)) {
|
|
5150
5146
|
return interpolateObject(x, y);
|
|
5151
5147
|
}
|
|
5152
5148
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(x, y);
|
|
@@ -5155,7 +5151,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
5155
5151
|
// When the value is an array, attempt to sort by "key" so that animating nodes may be identified
|
|
5156
5152
|
// based on "key" instead of index
|
|
5157
5153
|
const keyData = val => {
|
|
5158
|
-
return Array.isArray(val) ?
|
|
5154
|
+
return Array.isArray(val) ? lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default()(val, "key") : val;
|
|
5159
5155
|
};
|
|
5160
5156
|
const i = {};
|
|
5161
5157
|
const c = {};
|
|
@@ -5222,7 +5218,7 @@ const victoryInterpolator = function (a, b) {
|
|
|
5222
5218
|
if (typeof a === "function" || typeof b === "function") {
|
|
5223
5219
|
return interpolateFunction(a, b);
|
|
5224
5220
|
}
|
|
5225
|
-
if (
|
|
5221
|
+
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(b)) {
|
|
5226
5222
|
// @ts-expect-error These generics are tough, but they work :)
|
|
5227
5223
|
return interpolateObject(a, b);
|
|
5228
5224
|
}
|
|
@@ -5398,16 +5394,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5398
5394
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
5399
5395
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
5400
5396
|
/* harmony export */ });
|
|
5401
|
-
/* harmony import */ var
|
|
5402
|
-
/* harmony import */ var
|
|
5403
|
-
/* harmony import */ var
|
|
5404
|
-
/* harmony import */ var
|
|
5397
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5398
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5399
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
5400
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
5405
5401
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5406
5402
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
5407
5403
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
5408
5404
|
/* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-portal/portal-outlet */ "../../victory-core/es/victory-portal/portal-outlet.js");
|
|
5409
5405
|
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
5410
|
-
|
|
5411
5406
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5412
5407
|
|
|
5413
5408
|
|
|
@@ -5415,9 +5410,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
5415
5410
|
|
|
5416
5411
|
|
|
5417
5412
|
|
|
5413
|
+
|
|
5418
5414
|
const defaultProps = {
|
|
5419
5415
|
className: "VictoryContainer",
|
|
5420
|
-
portalComponent: /*#__PURE__*/
|
|
5416
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5421
5417
|
portalZIndex: 99,
|
|
5422
5418
|
responsive: true,
|
|
5423
5419
|
role: "img"
|
|
@@ -5434,10 +5430,10 @@ function useVictoryContainer(initialProps) {
|
|
|
5434
5430
|
height,
|
|
5435
5431
|
responsive
|
|
5436
5432
|
} = props;
|
|
5437
|
-
const localContainerRef = (0,
|
|
5433
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
5438
5434
|
|
|
5439
5435
|
// Generated ID stored in ref because it needs to persist across renders
|
|
5440
|
-
const generatedId = (0,
|
|
5436
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
5441
5437
|
const containerId = props.containerId ?? generatedId.current;
|
|
5442
5438
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
5443
5439
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -5496,7 +5492,7 @@ const VictoryContainer = initialProps => {
|
|
|
5496
5492
|
containerRef,
|
|
5497
5493
|
localContainerRef
|
|
5498
5494
|
} = useVictoryContainer(initialProps);
|
|
5499
|
-
|
|
5495
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
5500
5496
|
if (!events?.onWheel) return;
|
|
5501
5497
|
const handleWheel = e => e.preventDefault();
|
|
5502
5498
|
const container = localContainerRef?.current;
|
|
@@ -5506,21 +5502,21 @@ const VictoryContainer = initialProps => {
|
|
|
5506
5502
|
};
|
|
5507
5503
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5508
5504
|
}, []);
|
|
5509
|
-
return /*#__PURE__*/
|
|
5505
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5510
5506
|
className: className,
|
|
5511
5507
|
style: {
|
|
5512
5508
|
...style,
|
|
5513
5509
|
width: responsive ? style?.width : dimensions.width,
|
|
5514
5510
|
height: responsive ? style?.height : dimensions.height,
|
|
5515
|
-
pointerEvents: "none",
|
|
5516
|
-
touchAction: "none",
|
|
5517
|
-
position: "relative"
|
|
5511
|
+
pointerEvents: style?.pointerEvents ?? "none",
|
|
5512
|
+
touchAction: style?.touchAction ?? "none",
|
|
5513
|
+
position: style?.position ?? "relative"
|
|
5518
5514
|
},
|
|
5519
5515
|
"data-ouia-component-id": ouiaId,
|
|
5520
5516
|
"data-ouia-component-type": ouiaType,
|
|
5521
5517
|
"data-ouia-safe": ouiaSafe,
|
|
5522
5518
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
5523
|
-
}, /*#__PURE__*/
|
|
5519
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalProvider, null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
5524
5520
|
width: width,
|
|
5525
5521
|
height: height,
|
|
5526
5522
|
tabIndex: tabIndex,
|
|
@@ -5533,11 +5529,11 @@ const VictoryContainer = initialProps => {
|
|
|
5533
5529
|
...dimensions,
|
|
5534
5530
|
pointerEvents: "all"
|
|
5535
5531
|
}
|
|
5536
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
5532
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
5537
5533
|
id: titleId
|
|
5538
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
5534
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
5539
5535
|
id: descId
|
|
5540
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
5536
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5541
5537
|
style: {
|
|
5542
5538
|
...dimensions,
|
|
5543
5539
|
zIndex: portalZIndex,
|
|
@@ -5545,7 +5541,7 @@ const VictoryContainer = initialProps => {
|
|
|
5545
5541
|
top: 0,
|
|
5546
5542
|
left: 0
|
|
5547
5543
|
}
|
|
5548
|
-
}, /*#__PURE__*/
|
|
5544
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
5549
5545
|
as: portalComponent,
|
|
5550
5546
|
width: width,
|
|
5551
5547
|
height: height,
|
|
@@ -5572,12 +5568,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5572
5568
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5573
5569
|
/* harmony export */ "VictoryLabel": function() { return /* binding */ VictoryLabel; }
|
|
5574
5570
|
/* harmony export */ });
|
|
5575
|
-
/* harmony import */ var
|
|
5576
|
-
/* harmony import */ var
|
|
5571
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5572
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5577
5573
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
5578
5574
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
5579
|
-
/* harmony import */ var
|
|
5580
|
-
/* harmony import */ var
|
|
5575
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
5576
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
5581
5577
|
/* harmony import */ var _victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../victory-portal/victory-portal */ "../../victory-core/es/victory-portal/victory-portal.js");
|
|
5582
5578
|
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-primitives/rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
5583
5579
|
/* harmony import */ var _victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../victory-primitives/text */ "../../victory-core/es/victory-primitives/text.js");
|
|
@@ -5588,9 +5584,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5588
5584
|
/* harmony import */ var _victory_util_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/style */ "../../victory-core/es/victory-util/style.js");
|
|
5589
5585
|
/* harmony import */ var _victory_util_textsize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../victory-util/textsize */ "../../victory-core/es/victory-util/textsize.js");
|
|
5590
5586
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
5587
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
5591
5588
|
|
|
5592
5589
|
|
|
5593
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
5594
5590
|
|
|
5595
5591
|
|
|
5596
5592
|
|
|
@@ -5642,7 +5638,7 @@ const shouldUseMultilineBackgrounds = props => {
|
|
|
5642
5638
|
backgroundStyle,
|
|
5643
5639
|
backgroundPadding
|
|
5644
5640
|
} = props;
|
|
5645
|
-
return Array.isArray(backgroundStyle) && !
|
|
5641
|
+
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundPadding);
|
|
5646
5642
|
};
|
|
5647
5643
|
const getStyles = (style, props) => {
|
|
5648
5644
|
if (props.disableInlineStyles) {
|
|
@@ -5658,32 +5654,28 @@ const getStyles = (style, props) => {
|
|
|
5658
5654
|
fontSize: getFontSize(baseStyles)
|
|
5659
5655
|
});
|
|
5660
5656
|
};
|
|
5661
|
-
return Array.isArray(style) && !
|
|
5657
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => getSingleStyle(s)) : getSingleStyle(style);
|
|
5662
5658
|
};
|
|
5663
5659
|
const getBackgroundStyles = (style, props) => {
|
|
5664
5660
|
if (!style) {
|
|
5665
5661
|
return undefined;
|
|
5666
5662
|
}
|
|
5667
|
-
return Array.isArray(style) && !
|
|
5663
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(s, props)) : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(style, props);
|
|
5668
5664
|
};
|
|
5669
5665
|
const getBackgroundPadding = props => {
|
|
5670
5666
|
if (props.backgroundPadding && Array.isArray(props.backgroundPadding)) {
|
|
5671
5667
|
return props.backgroundPadding.map(backgroundPadding => {
|
|
5672
5668
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(backgroundPadding, props);
|
|
5673
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
5674
|
-
padding
|
|
5675
|
-
});
|
|
5669
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
5676
5670
|
});
|
|
5677
5671
|
}
|
|
5678
5672
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.backgroundPadding, props);
|
|
5679
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
5680
|
-
padding
|
|
5681
|
-
});
|
|
5673
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
5682
5674
|
};
|
|
5683
5675
|
const getLineHeight = props => {
|
|
5684
5676
|
const lineHeight = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.lineHeight, props);
|
|
5685
5677
|
if (Array.isArray(lineHeight)) {
|
|
5686
|
-
return
|
|
5678
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(lineHeight) ? [1] : lineHeight;
|
|
5687
5679
|
}
|
|
5688
5680
|
return lineHeight;
|
|
5689
5681
|
};
|
|
@@ -5803,7 +5795,7 @@ const getFullBackground = (calculatedProps, tspanValues) => {
|
|
|
5803
5795
|
x: inline ? xCoordinate - backgroundPadding.left : xCoordinate + dx - backgroundPadding.left,
|
|
5804
5796
|
y: yCoordinate
|
|
5805
5797
|
};
|
|
5806
|
-
return /*#__PURE__*/
|
|
5798
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
5807
5799
|
};
|
|
5808
5800
|
const getInlineXOffset = (calculatedProps, textElements, index) => {
|
|
5809
5801
|
const {
|
|
@@ -5873,7 +5865,7 @@ const getChildBackgrounds = (calculatedProps, tspanValues) => {
|
|
|
5873
5865
|
x: xCoord - padding.left,
|
|
5874
5866
|
y: yCoord
|
|
5875
5867
|
};
|
|
5876
|
-
return /*#__PURE__*/
|
|
5868
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
5877
5869
|
});
|
|
5878
5870
|
};
|
|
5879
5871
|
const getBackgroundElement = (calculatedProps, tspanValues) => {
|
|
@@ -6004,16 +5996,16 @@ const renderLabel = (calculatedProps, tspanValues) => {
|
|
|
6004
5996
|
style: currentStyle,
|
|
6005
5997
|
children: line
|
|
6006
5998
|
};
|
|
6007
|
-
return /*#__PURE__*/
|
|
5999
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(tspanComponent, tspanProps);
|
|
6008
6000
|
});
|
|
6009
|
-
return /*#__PURE__*/
|
|
6001
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(textComponent, textProps, tspans);
|
|
6010
6002
|
};
|
|
6011
6003
|
const defaultProps = {
|
|
6012
|
-
backgroundComponent: /*#__PURE__*/
|
|
6013
|
-
groupComponent: /*#__PURE__*/
|
|
6004
|
+
backgroundComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__.Rect, null),
|
|
6005
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
6014
6006
|
direction: "inherit",
|
|
6015
|
-
textComponent: /*#__PURE__*/
|
|
6016
|
-
tspanComponent: /*#__PURE__*/
|
|
6007
|
+
textComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__.Text, null),
|
|
6008
|
+
tspanComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_tspan__WEBPACK_IMPORTED_MODULE_10__.TSpan, null),
|
|
6017
6009
|
capHeight: 0.71,
|
|
6018
6010
|
// Magic number from d3.
|
|
6019
6011
|
lineHeight: 1
|
|
@@ -6050,10 +6042,10 @@ const VictoryLabel = initialProps => {
|
|
|
6050
6042
|
if (props.backgroundStyle) {
|
|
6051
6043
|
const backgroundElement = getBackgroundElement(calculatedProps, tspanValues);
|
|
6052
6044
|
const children = [backgroundElement, label];
|
|
6053
|
-
const backgroundWithLabel = /*#__PURE__*/
|
|
6054
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
6045
|
+
const backgroundWithLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.groupComponent, {}, children);
|
|
6046
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, backgroundWithLabel) : backgroundWithLabel;
|
|
6055
6047
|
}
|
|
6056
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
6048
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, label) : label;
|
|
6057
6049
|
};
|
|
6058
6050
|
VictoryLabel.displayName = "VictoryLabel";
|
|
6059
6051
|
VictoryLabel.role = "label";
|
|
@@ -6179,12 +6171,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6179
6171
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6180
6172
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
6181
6173
|
/* harmony export */ });
|
|
6182
|
-
/* harmony import */ var
|
|
6183
|
-
/* harmony import */ var
|
|
6174
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6175
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6184
6176
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6185
6177
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6186
|
-
/* harmony import */ var
|
|
6187
|
-
/* harmony import */ var
|
|
6178
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniqueId */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js");
|
|
6179
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
6188
6180
|
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
|
|
6189
6181
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6190
6182
|
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
@@ -6195,14 +6187,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6195
6187
|
|
|
6196
6188
|
|
|
6197
6189
|
const defaultProps = {
|
|
6198
|
-
groupComponent: /*#__PURE__*/
|
|
6190
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
6199
6191
|
};
|
|
6200
6192
|
const VictoryPortal = initialProps => {
|
|
6201
6193
|
const props = {
|
|
6202
6194
|
...defaultProps,
|
|
6203
6195
|
...initialProps
|
|
6204
6196
|
};
|
|
6205
|
-
const [id] = (0,
|
|
6197
|
+
const [id] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()());
|
|
6206
6198
|
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
6207
6199
|
if (!portalContext) {
|
|
6208
6200
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
@@ -6220,12 +6212,12 @@ const VictoryPortal = initialProps => {
|
|
|
6220
6212
|
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
6221
6213
|
key: childProps.key ?? id
|
|
6222
6214
|
});
|
|
6223
|
-
const child = children && /*#__PURE__*/
|
|
6224
|
-
|
|
6215
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(children, newProps);
|
|
6216
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
6225
6217
|
portalContext?.addChild(id, child);
|
|
6226
6218
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6227
6219
|
}, [props.children]);
|
|
6228
|
-
|
|
6220
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
6229
6221
|
return () => portalContext?.removeChild(id);
|
|
6230
6222
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6231
6223
|
}, []);
|
|
@@ -6246,10 +6238,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6246
6238
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6247
6239
|
/* harmony export */ "Border": function() { return /* binding */ Border; }
|
|
6248
6240
|
/* harmony export */ });
|
|
6249
|
-
/* harmony import */ var
|
|
6250
|
-
/* harmony import */ var
|
|
6251
|
-
/* harmony import */ var
|
|
6252
|
-
/* harmony import */ var
|
|
6241
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6242
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6243
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6244
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6253
6245
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6254
6246
|
/* harmony import */ var _rect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
6255
6247
|
|
|
@@ -6281,13 +6273,13 @@ const evaluateProps = props => {
|
|
|
6281
6273
|
});
|
|
6282
6274
|
};
|
|
6283
6275
|
const defaultProps = {
|
|
6284
|
-
rectComponent: /*#__PURE__*/
|
|
6276
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_rect__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
6285
6277
|
role: "presentation",
|
|
6286
6278
|
shapeRendering: "auto"
|
|
6287
6279
|
};
|
|
6288
6280
|
const Border = initialProps => {
|
|
6289
|
-
const props = evaluateProps(
|
|
6290
|
-
return /*#__PURE__*/
|
|
6281
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
6282
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.rectComponent, {
|
|
6291
6283
|
...props.events,
|
|
6292
6284
|
"aria-label": props.ariaLabel,
|
|
6293
6285
|
style: props.style,
|
|
@@ -6360,10 +6352,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6360
6352
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6361
6353
|
/* harmony export */ "Point": function() { return /* binding */ Point; }
|
|
6362
6354
|
/* harmony export */ });
|
|
6363
|
-
/* harmony import */ var
|
|
6364
|
-
/* harmony import */ var
|
|
6365
|
-
/* harmony import */ var
|
|
6366
|
-
/* harmony import */ var
|
|
6355
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6356
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6357
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6358
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6367
6359
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6368
6360
|
/* harmony import */ var _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/point-path-helpers */ "../../victory-core/es/victory-util/point-path-helpers.js");
|
|
6369
6361
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
@@ -6417,14 +6409,14 @@ const evaluateProps = props => {
|
|
|
6417
6409
|
});
|
|
6418
6410
|
};
|
|
6419
6411
|
const defaultProps = {
|
|
6420
|
-
pathComponent: /*#__PURE__*/
|
|
6412
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_path__WEBPACK_IMPORTED_MODULE_4__.Path, null),
|
|
6421
6413
|
role: "presentation",
|
|
6422
6414
|
shapeRendering: "auto"
|
|
6423
6415
|
};
|
|
6424
6416
|
const Point = initialProps => {
|
|
6425
|
-
const props = evaluateProps(
|
|
6417
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
6426
6418
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_5__.getSafeUserProps(props);
|
|
6427
|
-
return /*#__PURE__*/
|
|
6419
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
6428
6420
|
...props.events,
|
|
6429
6421
|
"aria-label": props.ariaLabel,
|
|
6430
6422
|
d: getPath(props),
|
|
@@ -7694,22 +7686,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7694
7686
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7695
7687
|
/* harmony export */ "VictoryTransition": function() { return /* binding */ VictoryTransition; }
|
|
7696
7688
|
/* harmony export */ });
|
|
7697
|
-
/* harmony import */ var
|
|
7698
|
-
/* harmony import */ var
|
|
7689
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7690
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7699
7691
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
7700
7692
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7701
|
-
/* harmony import */ var
|
|
7702
|
-
/* harmony import */ var
|
|
7693
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
7694
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_2__);
|
|
7695
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
|
|
7696
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
7703
7697
|
/* harmony import */ var _victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-animation/victory-animation */ "../../victory-core/es/victory-animation/victory-animation.js");
|
|
7704
7698
|
/* harmony import */ var _victory_util_collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/collection */ "../../victory-core/es/victory-util/collection.js");
|
|
7705
7699
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7706
7700
|
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
7707
7701
|
/* harmony import */ var _victory_util_transitions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/transitions */ "../../victory-core/es/victory-util/transitions.js");
|
|
7708
|
-
|
|
7709
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
7702
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7710
7703
|
|
|
7711
7704
|
|
|
7712
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7713
7705
|
|
|
7714
7706
|
|
|
7715
7707
|
|
|
@@ -7717,7 +7709,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
7717
7709
|
|
|
7718
7710
|
|
|
7719
7711
|
|
|
7720
|
-
class VictoryTransition extends (
|
|
7712
|
+
class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
7721
7713
|
static displayName = "VictoryTransition";
|
|
7722
7714
|
static contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
7723
7715
|
constructor(props, context) {
|
|
@@ -7734,7 +7726,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7734
7726
|
componentDidMount() {
|
|
7735
7727
|
this.setState({
|
|
7736
7728
|
nodesShouldLoad: true
|
|
7737
|
-
});
|
|
7729
|
+
});
|
|
7738
7730
|
}
|
|
7739
7731
|
shouldComponentUpdate(nextProps) {
|
|
7740
7732
|
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default()(this.props, nextProps)) {
|
|
@@ -7760,8 +7752,8 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7760
7752
|
nextProps
|
|
7761
7753
|
};
|
|
7762
7754
|
}
|
|
7763
|
-
const oldChildren =
|
|
7764
|
-
const nextChildren =
|
|
7755
|
+
const oldChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
7756
|
+
const nextChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextProps.children);
|
|
7765
7757
|
const {
|
|
7766
7758
|
nodesWillExit,
|
|
7767
7759
|
nodesWillEnter,
|
|
@@ -7784,12 +7776,12 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7784
7776
|
const childDomain = child.props && child.type.getDomain(child.props, axis);
|
|
7785
7777
|
return childDomain ? memo.concat(childDomain) : memo;
|
|
7786
7778
|
} else if (child.props && child.props.children) {
|
|
7787
|
-
return memo.concat(getChildDomains(
|
|
7779
|
+
return memo.concat(getChildDomains(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
7788
7780
|
}
|
|
7789
7781
|
return memo;
|
|
7790
7782
|
}, []);
|
|
7791
7783
|
};
|
|
7792
|
-
const child =
|
|
7784
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
7793
7785
|
const childProps = child.props || {};
|
|
7794
7786
|
const domain = Array.isArray(childProps.domain) ? childProps.domain : childProps.domain && childProps.domain[axis];
|
|
7795
7787
|
if (!childProps.children && domain) {
|
|
@@ -7822,7 +7814,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7822
7814
|
render() {
|
|
7823
7815
|
const props = this.pickProps();
|
|
7824
7816
|
const getTransitionProps = this.props.animate?.getTransitions ? this.props.animate.getTransitions : _victory_util_transitions__WEBPACK_IMPORTED_MODULE_5__.getTransitionPropsFactory(props, this.state, newState => this.setState(newState));
|
|
7825
|
-
const child =
|
|
7817
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
7826
7818
|
const transitionProps = getTransitionProps(child);
|
|
7827
7819
|
this.transitionProps = transitionProps;
|
|
7828
7820
|
const domain = {
|
|
@@ -7836,21 +7828,21 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7836
7828
|
}, transitionProps, child.props);
|
|
7837
7829
|
const animationWhitelist = props.animationWhitelist || [];
|
|
7838
7830
|
const whitelist = animationWhitelist.concat(["clipWidth"]);
|
|
7839
|
-
const propsToAnimate = whitelist.length ?
|
|
7840
|
-
return /*#__PURE__*/
|
|
7831
|
+
const propsToAnimate = whitelist.length ? lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(combinedProps, whitelist) : combinedProps;
|
|
7832
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_8__.VictoryAnimation, _extends({}, combinedProps.animate, {
|
|
7841
7833
|
data: propsToAnimate
|
|
7842
7834
|
}), newProps => {
|
|
7843
7835
|
if (child.props.groupComponent) {
|
|
7844
|
-
const groupComponent = this.continuous ? /*#__PURE__*/
|
|
7836
|
+
const groupComponent = this.continuous ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child.props.groupComponent, {
|
|
7845
7837
|
clipWidth: newProps.clipWidth || 0
|
|
7846
7838
|
}) : child.props.groupComponent;
|
|
7847
|
-
return /*#__PURE__*/
|
|
7839
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
7848
7840
|
animate: null,
|
|
7849
7841
|
animating: true,
|
|
7850
7842
|
groupComponent
|
|
7851
7843
|
}, newProps, combinedProps));
|
|
7852
7844
|
}
|
|
7853
|
-
return /*#__PURE__*/
|
|
7845
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
7854
7846
|
animate: null,
|
|
7855
7847
|
animating: true
|
|
7856
7848
|
}, newProps, combinedProps));
|
|
@@ -7871,14 +7863,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7871
7863
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7872
7864
|
/* harmony export */ "addEvents": function() { return /* binding */ addEvents; }
|
|
7873
7865
|
/* harmony export */ });
|
|
7874
|
-
/* harmony import */ var
|
|
7875
|
-
/* harmony import */ var
|
|
7876
|
-
/* harmony import */ var
|
|
7877
|
-
/* harmony import */ var
|
|
7878
|
-
/* harmony import */ var
|
|
7879
|
-
/* harmony import */ var
|
|
7880
|
-
/* harmony import */ var
|
|
7881
|
-
/* harmony import */ var
|
|
7866
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7867
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7868
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
7869
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7870
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
7871
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
7872
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
7873
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
7882
7874
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
|
|
7883
7875
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
7884
7876
|
/* harmony import */ var _victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-transition/victory-transition */ "../../victory-core/es/victory-transition/victory-transition.js");
|
|
@@ -7948,7 +7940,7 @@ const defaultComponents = [{
|
|
|
7948
7940
|
function addEvents(WrappedComponent, options) {
|
|
7949
7941
|
if (options === void 0) {
|
|
7950
7942
|
options = {};
|
|
7951
|
-
} // eslint-disable-next-line @typescript-eslint/no-empty-
|
|
7943
|
+
} // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
7952
7944
|
// @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
|
|
7953
7945
|
class AddEventsMixin extends WrappedComponent {
|
|
7954
7946
|
constructor(props) {
|
|
@@ -8025,8 +8017,8 @@ function addEvents(WrappedComponent, options) {
|
|
|
8025
8017
|
return {};
|
|
8026
8018
|
}
|
|
8027
8019
|
const getState = (key, type) => {
|
|
8028
|
-
const result =
|
|
8029
|
-
return
|
|
8020
|
+
const result = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.getEventState(key, type), this.getSharedEventState(key, type));
|
|
8021
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
|
|
8030
8022
|
};
|
|
8031
8023
|
const components = options.components || defaultComponents;
|
|
8032
8024
|
const stateChanges = components.map(component => {
|
|
@@ -8039,7 +8031,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
8039
8031
|
return stateChanges;
|
|
8040
8032
|
}
|
|
8041
8033
|
applyExternalMutations(props, externalMutations) {
|
|
8042
|
-
if (!
|
|
8034
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
8043
8035
|
const callbacks = props.externalEventMutations.reduce((memo, mutation) => (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo, []);
|
|
8044
8036
|
const compiledCallbacks = callbacks.length ? () => {
|
|
8045
8037
|
callbacks.forEach(c => c());
|
|
@@ -8072,7 +8064,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
8072
8064
|
sharedEvents,
|
|
8073
8065
|
externalEventMutations
|
|
8074
8066
|
} = props;
|
|
8075
|
-
return
|
|
8067
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
8076
8068
|
}
|
|
8077
8069
|
cacheValues(obj) {
|
|
8078
8070
|
Object.keys(obj).forEach(key => {
|
|
@@ -8083,10 +8075,10 @@ function addEvents(WrappedComponent, options) {
|
|
|
8083
8075
|
const getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
|
|
8084
8076
|
const sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
8085
8077
|
const parentState = this.getEventState("parent", "parent");
|
|
8086
|
-
const baseParentProps =
|
|
8078
|
+
const baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentState, sharedParentState);
|
|
8087
8079
|
const parentPropsList = baseParentProps.parentControlledProps;
|
|
8088
|
-
const parentProps = parentPropsList ?
|
|
8089
|
-
const modifiedProps =
|
|
8080
|
+
const parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(baseParentProps, parentPropsList) : {};
|
|
8081
|
+
const modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentProps, props);
|
|
8090
8082
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
8091
8083
|
}
|
|
8092
8084
|
getAllEvents(props) {
|
|
@@ -8106,18 +8098,18 @@ function addEvents(WrappedComponent, options) {
|
|
|
8106
8098
|
const currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
|
|
8107
8099
|
if (this.hasEvents) {
|
|
8108
8100
|
const baseEvents = this.getEvents(this.props, type, key);
|
|
8109
|
-
const componentProps =
|
|
8101
|
+
const componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8110
8102
|
index,
|
|
8111
8103
|
key: id
|
|
8112
8104
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
8113
8105
|
id
|
|
8114
8106
|
});
|
|
8115
|
-
const events =
|
|
8107
|
+
const events = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
8116
8108
|
return Object.assign({}, componentProps, {
|
|
8117
8109
|
events
|
|
8118
8110
|
});
|
|
8119
8111
|
}
|
|
8120
|
-
return
|
|
8112
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8121
8113
|
index,
|
|
8122
8114
|
key: id
|
|
8123
8115
|
}, currentProps, baseProps, {
|
|
@@ -8131,15 +8123,15 @@ function addEvents(WrappedComponent, options) {
|
|
|
8131
8123
|
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
8132
8124
|
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
8133
8125
|
}
|
|
8134
|
-
return /*#__PURE__*/
|
|
8126
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(component, parentProps, children);
|
|
8135
8127
|
}
|
|
8136
8128
|
animateComponent(props, defaultAnimationWhitelist) {
|
|
8137
8129
|
const animationWhitelist = typeof props.animate === "object" && props.animate?.animationWhitelist || defaultAnimationWhitelist;
|
|
8138
8130
|
const Comp = this.constructor;
|
|
8139
|
-
return /*#__PURE__*/
|
|
8131
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
8140
8132
|
animate: props.animate,
|
|
8141
8133
|
animationWhitelist: animationWhitelist
|
|
8142
|
-
}, /*#__PURE__*/
|
|
8134
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, props));
|
|
8143
8135
|
}
|
|
8144
8136
|
|
|
8145
8137
|
// Used by `VictoryLine` and `VictoryArea`
|
|
@@ -8154,12 +8146,12 @@ function addEvents(WrappedComponent, options) {
|
|
|
8154
8146
|
let newMemo = memo;
|
|
8155
8147
|
const labelProps = this.getComponentProps(labelComponent, "labels", key);
|
|
8156
8148
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
8157
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
8149
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps));
|
|
8158
8150
|
}
|
|
8159
8151
|
return newMemo;
|
|
8160
8152
|
}, []);
|
|
8161
8153
|
const dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
8162
|
-
const children = [/*#__PURE__*/
|
|
8154
|
+
const children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps), ...labelComponents];
|
|
8163
8155
|
return this.renderContainer(groupComponent, children);
|
|
8164
8156
|
}
|
|
8165
8157
|
renderData(props, shouldRenderDatum) {
|
|
@@ -8174,14 +8166,14 @@ function addEvents(WrappedComponent, options) {
|
|
|
8174
8166
|
const dataComponents = this.dataKeys.reduce((validDataComponents, _dataKey, index) => {
|
|
8175
8167
|
const dataProps = this.getComponentProps(dataComponent, "data", index);
|
|
8176
8168
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
8177
|
-
validDataComponents.push( /*#__PURE__*/
|
|
8169
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps));
|
|
8178
8170
|
}
|
|
8179
8171
|
return validDataComponents;
|
|
8180
8172
|
}, []);
|
|
8181
8173
|
const labelComponents = this.dataKeys.map((_dataKey, index) => {
|
|
8182
8174
|
const labelProps = this.getComponentProps(labelComponent, "labels", index);
|
|
8183
8175
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
8184
|
-
return /*#__PURE__*/
|
|
8176
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps);
|
|
8185
8177
|
}
|
|
8186
8178
|
return undefined;
|
|
8187
8179
|
}).filter(Boolean);
|
|
@@ -8288,20 +8280,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8288
8280
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
8289
8281
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
8290
8282
|
/* harmony export */ });
|
|
8291
|
-
/* harmony import */ var
|
|
8292
|
-
/* harmony import */ var
|
|
8293
|
-
/* harmony import */ var
|
|
8294
|
-
/* harmony import */ var
|
|
8295
|
-
/* harmony import */ var
|
|
8296
|
-
/* harmony import */ var
|
|
8297
|
-
/* harmony import */ var
|
|
8298
|
-
/* harmony import */ var
|
|
8283
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
8284
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
8285
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pickBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pickBy.js");
|
|
8286
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
8287
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/omitBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omitBy.js");
|
|
8288
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
8289
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
8290
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
8299
8291
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8300
8292
|
|
|
8301
8293
|
|
|
8302
8294
|
|
|
8303
8295
|
|
|
8304
|
-
/* eslint-disable no-use-before-define */
|
|
8305
8296
|
|
|
8306
8297
|
const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
8307
8298
|
|
|
@@ -8349,11 +8340,10 @@ getScopedEvents) {
|
|
|
8349
8340
|
*/
|
|
8350
8341
|
const getAllEvents = () => {
|
|
8351
8342
|
// Mandatory usage: `getEvents.bind(this)`
|
|
8352
|
-
|
|
8343
|
+
|
|
8353
8344
|
if (Array.isArray(this.componentEvents)) {
|
|
8354
8345
|
return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
|
|
8355
8346
|
}
|
|
8356
|
-
/* eslint-enable no-invalid-this */
|
|
8357
8347
|
return props.events;
|
|
8358
8348
|
};
|
|
8359
8349
|
const allEvents = getAllEvents();
|
|
@@ -8373,12 +8363,12 @@ getScopedEvents) {
|
|
|
8373
8363
|
*/
|
|
8374
8364
|
// eslint-disable-next-line max-params
|
|
8375
8365
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
8376
|
-
if (
|
|
8366
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
8377
8367
|
return {};
|
|
8378
8368
|
}
|
|
8379
8369
|
|
|
8380
8370
|
// Mandatory usage: `getScopedEvents.bind(this)`
|
|
8381
|
-
|
|
8371
|
+
|
|
8382
8372
|
const newBaseProps = baseProps || this.baseProps;
|
|
8383
8373
|
// returns the original base props or base state of a given target element
|
|
8384
8374
|
const getTargetProps = (identifier, type) => {
|
|
@@ -8387,7 +8377,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
8387
8377
|
target,
|
|
8388
8378
|
key
|
|
8389
8379
|
} = identifier;
|
|
8390
|
-
// eslint-disable-next-line no-invalid-this
|
|
8391
8380
|
const baseType = type === "props" ? newBaseProps : this.state || {};
|
|
8392
8381
|
const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
|
|
8393
8382
|
return key === "parent" ? base.parent : base[key] && base[key][target];
|
|
@@ -8414,7 +8403,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
8414
8403
|
|
|
8415
8404
|
// returns the state object with mutated props applied for a single key
|
|
8416
8405
|
const getMutationObject = (key, childName) => {
|
|
8417
|
-
// eslint-disable-next-line no-invalid-this
|
|
8418
8406
|
const baseState = this.state || {};
|
|
8419
8407
|
if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
|
|
8420
8408
|
return baseState;
|
|
@@ -8487,11 +8475,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
8487
8475
|
// into a state mutation, and calls setState
|
|
8488
8476
|
// eslint-disable-next-line max-params
|
|
8489
8477
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
8490
|
-
// eslint-disable-next-line no-invalid-this
|
|
8491
8478
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
8492
|
-
if (!
|
|
8479
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
8493
8480
|
const callbacks = compileCallbacks(eventReturn);
|
|
8494
|
-
// eslint-disable-next-line no-invalid-this
|
|
8495
8481
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
8496
8482
|
}
|
|
8497
8483
|
};
|
|
@@ -8521,7 +8507,7 @@ function getPartialEvents(events, eventKey, childProps) {
|
|
|
8521
8507
|
// eslint-disable-next-line max-params
|
|
8522
8508
|
function getEventState(eventKey, namespace, childType) {
|
|
8523
8509
|
// Mandatory usage: `getEventState.bind(this)`
|
|
8524
|
-
|
|
8510
|
+
|
|
8525
8511
|
const state = this.state || {};
|
|
8526
8512
|
if (!childType) {
|
|
8527
8513
|
return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
|
|
@@ -8551,7 +8537,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
8551
8537
|
const childState = baseState[childName];
|
|
8552
8538
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
8553
8539
|
memo[childName] = mutation ? mutation : childState;
|
|
8554
|
-
return
|
|
8540
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8555
8541
|
}, {});
|
|
8556
8542
|
}
|
|
8557
8543
|
|
|
@@ -8587,7 +8573,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8587
8573
|
} else {
|
|
8588
8574
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
8589
8575
|
// will be used. (i.e. labels)
|
|
8590
|
-
const targets =
|
|
8576
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
8591
8577
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
8592
8578
|
const identifier = {
|
|
8593
8579
|
eventKey,
|
|
@@ -8596,10 +8582,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8596
8582
|
};
|
|
8597
8583
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
8598
8584
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
8599
|
-
return
|
|
8585
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8600
8586
|
}, {});
|
|
8601
8587
|
}
|
|
8602
|
-
return
|
|
8588
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8603
8589
|
}, {});
|
|
8604
8590
|
}
|
|
8605
8591
|
|
|
@@ -8631,11 +8617,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
8631
8617
|
}
|
|
8632
8618
|
// find any mutation objects that match the target
|
|
8633
8619
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
8634
|
-
if (
|
|
8620
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
8635
8621
|
return undefined;
|
|
8636
8622
|
}
|
|
8637
8623
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
8638
|
-
if (
|
|
8624
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
8639
8625
|
return undefined;
|
|
8640
8626
|
}
|
|
8641
8627
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -8661,8 +8647,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
8661
8647
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
8662
8648
|
return match && match[1] && match[1].toLowerCase();
|
|
8663
8649
|
}
|
|
8664
|
-
const getGlobalEvents = events =>
|
|
8665
|
-
const omitGlobalEvents = events =>
|
|
8650
|
+
const getGlobalEvents = events => lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
8651
|
+
const omitGlobalEvents = events => lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
8666
8652
|
const emulateReactEvent = event => Object.assign(event, {
|
|
8667
8653
|
nativeEvent: event
|
|
8668
8654
|
});
|
|
@@ -8703,41 +8689,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8703
8689
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
8704
8690
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
8705
8691
|
/* harmony export */ });
|
|
8706
|
-
/* harmony import */ var
|
|
8707
|
-
/* harmony import */ var
|
|
8708
|
-
/* harmony import */ var
|
|
8709
|
-
/* harmony import */ var
|
|
8710
|
-
/* harmony import */ var
|
|
8711
|
-
/* harmony import */ var
|
|
8712
|
-
/* harmony import */ var
|
|
8713
|
-
/* harmony import */ var
|
|
8714
|
-
|
|
8692
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8693
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8694
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
8695
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8696
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
|
|
8697
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
|
|
8698
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js");
|
|
8699
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
8715
8700
|
|
|
8716
8701
|
|
|
8717
|
-
/* eslint-disable no-use-before-define */
|
|
8718
8702
|
|
|
8719
|
-
// Private Functions
|
|
8720
8703
|
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8704
|
+
/**
|
|
8705
|
+
* Determine the range of a cartesian axis
|
|
8706
|
+
*/
|
|
8707
|
+
function getCartesianRange(options) {
|
|
8708
|
+
const vertical = options.axis !== "x";
|
|
8725
8709
|
if (vertical) {
|
|
8726
|
-
return [
|
|
8710
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
8727
8711
|
}
|
|
8728
|
-
return [padding.left,
|
|
8712
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
8729
8713
|
}
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8714
|
+
|
|
8715
|
+
/**
|
|
8716
|
+
* Determine the range of a polar axis in radians
|
|
8717
|
+
*/
|
|
8718
|
+
function getPolarRange(options) {
|
|
8719
|
+
if (options.axis === "x") {
|
|
8720
|
+
const startAngle = degreesToRadians(options.startAngle || 0);
|
|
8721
|
+
const endAngle = degreesToRadians(options.endAngle || 360);
|
|
8734
8722
|
return [startAngle, endAngle];
|
|
8735
8723
|
}
|
|
8736
|
-
return [
|
|
8724
|
+
return [options.innerRadius || 0, getRadius({
|
|
8725
|
+
height: options.height,
|
|
8726
|
+
width: options.width,
|
|
8727
|
+
padding: options.padding
|
|
8728
|
+
})];
|
|
8737
8729
|
}
|
|
8738
8730
|
|
|
8739
|
-
// Exported Functions
|
|
8740
|
-
|
|
8741
8731
|
/**
|
|
8742
8732
|
* Creates an object composed of the inverted keys and values of object.
|
|
8743
8733
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -8774,8 +8764,11 @@ function omit(originalObject, ks) {
|
|
|
8774
8764
|
}
|
|
8775
8765
|
return newObject;
|
|
8776
8766
|
}
|
|
8767
|
+
|
|
8768
|
+
/**
|
|
8769
|
+
* Coalesce the x and y values from a data point
|
|
8770
|
+
*/
|
|
8777
8771
|
function getPoint(datum) {
|
|
8778
|
-
const exists = val => val !== undefined;
|
|
8779
8772
|
const {
|
|
8780
8773
|
_x,
|
|
8781
8774
|
_x1,
|
|
@@ -8786,16 +8779,20 @@ function getPoint(datum) {
|
|
|
8786
8779
|
_y0,
|
|
8787
8780
|
_voronoiY
|
|
8788
8781
|
} = datum;
|
|
8789
|
-
const defaultX =
|
|
8790
|
-
const defaultY =
|
|
8782
|
+
const defaultX = _x1 ?? _x;
|
|
8783
|
+
const defaultY = _y1 ?? _y;
|
|
8791
8784
|
const point = {
|
|
8792
|
-
x:
|
|
8793
|
-
x0:
|
|
8794
|
-
y:
|
|
8795
|
-
y0:
|
|
8785
|
+
x: _voronoiX ?? defaultX,
|
|
8786
|
+
x0: _x0 ?? _x,
|
|
8787
|
+
y: _voronoiY ?? defaultY,
|
|
8788
|
+
y0: _y0 ?? _y
|
|
8796
8789
|
};
|
|
8797
|
-
return
|
|
8790
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
8798
8791
|
}
|
|
8792
|
+
|
|
8793
|
+
/**
|
|
8794
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
8795
|
+
*/
|
|
8799
8796
|
function scalePoint(props, datum) {
|
|
8800
8797
|
const {
|
|
8801
8798
|
scale,
|
|
@@ -8818,11 +8815,11 @@ function scalePoint(props, datum) {
|
|
|
8818
8815
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
8819
8816
|
};
|
|
8820
8817
|
}
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8818
|
+
|
|
8819
|
+
/**
|
|
8820
|
+
* Returns a padding value from a number or partial padding values
|
|
8821
|
+
*/
|
|
8822
|
+
function getPadding(padding) {
|
|
8826
8823
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
8827
8824
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
8828
8825
|
return {
|
|
@@ -8832,6 +8829,10 @@ function getPadding(props, name) {
|
|
|
8832
8829
|
right: paddingObj.right || paddingVal
|
|
8833
8830
|
};
|
|
8834
8831
|
}
|
|
8832
|
+
|
|
8833
|
+
/**
|
|
8834
|
+
* Returns true if the component is defined as a tooltip
|
|
8835
|
+
*/
|
|
8835
8836
|
function isTooltip(component) {
|
|
8836
8837
|
const labelRole = component && component.type && component.type.role;
|
|
8837
8838
|
return labelRole === "tooltip";
|
|
@@ -8846,8 +8847,8 @@ function getDefaultStyles(props, role) {
|
|
|
8846
8847
|
return defaultStyles;
|
|
8847
8848
|
}
|
|
8848
8849
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
8849
|
-
const labelStyle =
|
|
8850
|
-
return
|
|
8850
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
8851
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
8851
8852
|
labels: labelStyle
|
|
8852
8853
|
}, defaultStyles);
|
|
8853
8854
|
}
|
|
@@ -8855,7 +8856,7 @@ function getStyles(style, defaultStyles) {
|
|
|
8855
8856
|
const width = "100%";
|
|
8856
8857
|
const height = "100%";
|
|
8857
8858
|
if (!style) {
|
|
8858
|
-
return
|
|
8859
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8859
8860
|
parent: {
|
|
8860
8861
|
height,
|
|
8861
8862
|
width
|
|
@@ -8871,14 +8872,18 @@ function getStyles(style, defaultStyles) {
|
|
|
8871
8872
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
8872
8873
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
8873
8874
|
return {
|
|
8874
|
-
parent:
|
|
8875
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
8875
8876
|
width,
|
|
8876
8877
|
height
|
|
8877
8878
|
}),
|
|
8878
|
-
labels:
|
|
8879
|
-
data:
|
|
8879
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
8880
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
8880
8881
|
};
|
|
8881
8882
|
}
|
|
8883
|
+
|
|
8884
|
+
/**
|
|
8885
|
+
* Returns the value of a prop or accessor function with the given props
|
|
8886
|
+
*/
|
|
8882
8887
|
function evaluateProp(prop, props) {
|
|
8883
8888
|
return isFunction(prop) ? prop(props) : prop;
|
|
8884
8889
|
}
|
|
@@ -8900,19 +8905,28 @@ function degreesToRadians(degrees) {
|
|
|
8900
8905
|
function radiansToDegrees(radians) {
|
|
8901
8906
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
8902
8907
|
}
|
|
8903
|
-
|
|
8908
|
+
|
|
8909
|
+
/**
|
|
8910
|
+
* Get the maximum radius that will fit in the container
|
|
8911
|
+
*/
|
|
8912
|
+
function getRadius(options) {
|
|
8913
|
+
const {
|
|
8914
|
+
width,
|
|
8915
|
+
height,
|
|
8916
|
+
padding
|
|
8917
|
+
} = options;
|
|
8904
8918
|
const {
|
|
8905
8919
|
left,
|
|
8906
8920
|
right,
|
|
8907
8921
|
top,
|
|
8908
8922
|
bottom
|
|
8909
|
-
} =
|
|
8910
|
-
const {
|
|
8911
|
-
width,
|
|
8912
|
-
height
|
|
8913
|
-
} = props;
|
|
8923
|
+
} = padding;
|
|
8914
8924
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
8915
8925
|
}
|
|
8926
|
+
|
|
8927
|
+
/**
|
|
8928
|
+
* Returns the origin for a polar chart within the padded area
|
|
8929
|
+
*/
|
|
8916
8930
|
function getPolarOrigin(props) {
|
|
8917
8931
|
const {
|
|
8918
8932
|
width,
|
|
@@ -8923,7 +8937,7 @@ function getPolarOrigin(props) {
|
|
|
8923
8937
|
bottom,
|
|
8924
8938
|
left,
|
|
8925
8939
|
right
|
|
8926
|
-
} = getPadding(props);
|
|
8940
|
+
} = getPadding(props.padding);
|
|
8927
8941
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
8928
8942
|
const offsetWidth = width / 2 + left - right;
|
|
8929
8943
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -8932,13 +8946,30 @@ function getPolarOrigin(props) {
|
|
|
8932
8946
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
8933
8947
|
};
|
|
8934
8948
|
}
|
|
8949
|
+
|
|
8950
|
+
/**
|
|
8951
|
+
* Determine the range of an axis based on the given props
|
|
8952
|
+
*/
|
|
8935
8953
|
function getRange(props, axis) {
|
|
8936
8954
|
if (props.range && props.range[axis]) {
|
|
8937
8955
|
return props.range[axis];
|
|
8938
8956
|
} else if (props.range && Array.isArray(props.range)) {
|
|
8939
8957
|
return props.range;
|
|
8940
8958
|
}
|
|
8941
|
-
return props.polar ? getPolarRange(
|
|
8959
|
+
return props.polar ? getPolarRange({
|
|
8960
|
+
axis,
|
|
8961
|
+
innerRadius: props.innerRadius,
|
|
8962
|
+
startAngle: props.startAngle,
|
|
8963
|
+
endAngle: props.endAngle,
|
|
8964
|
+
height: props.height,
|
|
8965
|
+
width: props.width,
|
|
8966
|
+
padding: getPadding(props.padding)
|
|
8967
|
+
}) : getCartesianRange({
|
|
8968
|
+
axis,
|
|
8969
|
+
height: props.height,
|
|
8970
|
+
width: props.width,
|
|
8971
|
+
padding: getPadding(props.padding)
|
|
8972
|
+
});
|
|
8942
8973
|
}
|
|
8943
8974
|
|
|
8944
8975
|
/**
|
|
@@ -8970,7 +9001,7 @@ function createAccessor(key) {
|
|
|
8970
9001
|
return x => x;
|
|
8971
9002
|
}
|
|
8972
9003
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
8973
|
-
return
|
|
9004
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
8974
9005
|
}
|
|
8975
9006
|
function modifyProps(props, fallbackProps, role) {
|
|
8976
9007
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -8979,7 +9010,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
8979
9010
|
const defaultObject = horizontal === undefined ? {} : {
|
|
8980
9011
|
horizontal
|
|
8981
9012
|
};
|
|
8982
|
-
return
|
|
9013
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
8983
9014
|
}
|
|
8984
9015
|
|
|
8985
9016
|
/**
|
|
@@ -9066,10 +9097,10 @@ initialMemo, combine) {
|
|
|
9066
9097
|
const childRole = child.type && child.type.role;
|
|
9067
9098
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
9068
9099
|
if (child.props && child.props.children) {
|
|
9069
|
-
const childProps = Object.assign({}, child.props,
|
|
9070
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
9071
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
9072
|
-
return /*#__PURE__*/
|
|
9100
|
+
const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
|
|
9101
|
+
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children).map(c => {
|
|
9102
|
+
const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
|
|
9103
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
|
|
9073
9104
|
});
|
|
9074
9105
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
9075
9106
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -9083,7 +9114,7 @@ initialMemo, combine) {
|
|
|
9083
9114
|
return newMemo;
|
|
9084
9115
|
}, initialMemo);
|
|
9085
9116
|
};
|
|
9086
|
-
const validChildren = children.filter(
|
|
9117
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
9087
9118
|
const childNames = validChildren.map((c, i) => i);
|
|
9088
9119
|
return traverseChildren(validChildren, childNames);
|
|
9089
9120
|
}
|
|
@@ -9103,10 +9134,10 @@ function isHorizontal(props) {
|
|
|
9103
9134
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
9104
9135
|
return memo || childProps.horizontal;
|
|
9105
9136
|
}
|
|
9106
|
-
return traverseChildren(
|
|
9137
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
9107
9138
|
}, false);
|
|
9108
9139
|
};
|
|
9109
|
-
return traverseChildren(
|
|
9140
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
9110
9141
|
}
|
|
9111
9142
|
|
|
9112
9143
|
/***/ }),
|
|
@@ -9127,11 +9158,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9127
9158
|
/* harmony export */ "getProps": function() { return /* binding */ getProps; },
|
|
9128
9159
|
/* harmony export */ "getText": function() { return /* binding */ getText; }
|
|
9129
9160
|
/* harmony export */ });
|
|
9161
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
9130
9162
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
9131
9163
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
9132
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
9133
9164
|
|
|
9134
|
-
|
|
9165
|
+
|
|
9135
9166
|
|
|
9136
9167
|
// Private Functions
|
|
9137
9168
|
|
|
@@ -9376,11 +9407,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9376
9407
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9377
9408
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
9378
9409
|
/* harmony export */ });
|
|
9379
|
-
/* global console */
|
|
9410
|
+
/* global console process */
|
|
9380
9411
|
/* eslint-disable no-console */
|
|
9381
9412
|
|
|
9382
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
9383
9413
|
function warn(message) {
|
|
9414
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9415
|
+
// @ts-ignore - Webpack DefinePlugin will replace process.env.NODE_ENV
|
|
9384
9416
|
if (true) {
|
|
9385
9417
|
if (console && console.warn) {
|
|
9386
9418
|
console.warn(message);
|
|
@@ -9661,13 +9693,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9661
9693
|
/* harmony export */ "approximateTextSize": function() { return /* binding */ approximateTextSize; },
|
|
9662
9694
|
/* harmony export */ "convertLengthToPixels": function() { return /* binding */ convertLengthToPixels; }
|
|
9663
9695
|
/* harmony export */ });
|
|
9664
|
-
/* harmony import */ var
|
|
9665
|
-
/* harmony import */ var
|
|
9666
|
-
/* harmony import */ var
|
|
9667
|
-
/* harmony import */ var
|
|
9668
|
-
|
|
9669
|
-
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
9696
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
9697
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
9698
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/memoize */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js");
|
|
9699
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_memoize__WEBPACK_IMPORTED_MODULE_1__);
|
|
9700
|
+
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
9670
9701
|
/* eslint-disable no-magic-numbers */
|
|
9702
|
+
|
|
9703
|
+
|
|
9704
|
+
|
|
9671
9705
|
// Based on measuring specific character widths
|
|
9672
9706
|
// as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
|
|
9673
9707
|
// For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
|
|
@@ -9846,7 +9880,7 @@ const convertLengthToPixels = (length, fontSize) => {
|
|
|
9846
9880
|
};
|
|
9847
9881
|
const _prepareParams = (inputStyle, index) => {
|
|
9848
9882
|
const lineStyle = Array.isArray(inputStyle) ? inputStyle[index] : inputStyle;
|
|
9849
|
-
const style =
|
|
9883
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, lineStyle, defaultStyle);
|
|
9850
9884
|
return Object.assign({}, style, {
|
|
9851
9885
|
fontFamily: style.fontFamily,
|
|
9852
9886
|
letterSpacing: typeof style.letterSpacing === "number" ? style.letterSpacing : convertLengthToPixels(String(style.letterSpacing), style.fontSize),
|
|
@@ -9894,7 +9928,7 @@ const _approximateDimensionsInternal = (text, style) => {
|
|
|
9894
9928
|
height: heightWithRotate * coefficients.heightOverlapCoef
|
|
9895
9929
|
};
|
|
9896
9930
|
};
|
|
9897
|
-
const _getMeasurementContainer =
|
|
9931
|
+
const _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
9898
9932
|
const element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
9899
9933
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
9900
9934
|
element.setAttribute("width", "300");
|
|
@@ -9915,7 +9949,7 @@ const styleToKeyComponent = style => {
|
|
|
9915
9949
|
}
|
|
9916
9950
|
return `${style.angle}:${style.fontFamily}:${style.fontSize}:${style.letterSpacing}:${style.lineHeight}`;
|
|
9917
9951
|
};
|
|
9918
|
-
const _measureDimensionsInternal =
|
|
9952
|
+
const _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()((text, style) => {
|
|
9919
9953
|
let containerElement = _getMeasurementContainer();
|
|
9920
9954
|
if (!containerElement.isConnected) {
|
|
9921
9955
|
_getMeasurementContainer.cache.clear?.();
|
|
@@ -10085,12 +10119,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10085
10119
|
/* harmony export */ "getInitialTransitionState": function() { return /* binding */ getInitialTransitionState; },
|
|
10086
10120
|
/* harmony export */ "getTransitionPropsFactory": function() { return /* binding */ getTransitionPropsFactory; }
|
|
10087
10121
|
/* harmony export */ });
|
|
10088
|
-
/* harmony import */ var
|
|
10089
|
-
/* harmony import */ var
|
|
10122
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
10123
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10090
10124
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
10091
10125
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
10092
|
-
/* harmony import */ var
|
|
10093
|
-
/* harmony import */ var
|
|
10126
|
+
/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/identity */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js");
|
|
10127
|
+
/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_2__);
|
|
10094
10128
|
|
|
10095
10129
|
|
|
10096
10130
|
|
|
@@ -10181,13 +10215,13 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
10181
10215
|
const getTransitionsFromChildren = (old, next) => {
|
|
10182
10216
|
return old.map((child, idx) => {
|
|
10183
10217
|
if (child && child.props && child.props.children && next[idx]) {
|
|
10184
|
-
return getTransitionsFromChildren(
|
|
10218
|
+
return getTransitionsFromChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(old[idx].props.children), react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(next[idx].props.children));
|
|
10185
10219
|
}
|
|
10186
10220
|
// get Transition entering and exiting nodes
|
|
10187
10221
|
return getTransition(child, next[idx]);
|
|
10188
10222
|
});
|
|
10189
10223
|
};
|
|
10190
|
-
const childrenTransitions = getTransitionsFromChildren(
|
|
10224
|
+
const childrenTransitions = getTransitionsFromChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(oldChildren), react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextChildren));
|
|
10191
10225
|
return {
|
|
10192
10226
|
nodesWillExit,
|
|
10193
10227
|
nodesWillEnter,
|
|
@@ -10201,7 +10235,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
10201
10235
|
};
|
|
10202
10236
|
}
|
|
10203
10237
|
function getInitialChildProps(animate, data) {
|
|
10204
|
-
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (
|
|
10238
|
+
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10205
10239
|
return {
|
|
10206
10240
|
data: data.map((datum, idx) => Object.assign({}, datum, after(datum, idx, data)))
|
|
10207
10241
|
};
|
|
@@ -10218,7 +10252,7 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
10218
10252
|
data
|
|
10219
10253
|
};
|
|
10220
10254
|
}
|
|
10221
|
-
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (
|
|
10255
|
+
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10222
10256
|
// If nodes need to exit, transform them with the provided onLoad.before function.
|
|
10223
10257
|
const newData = data.map((datum, idx) => {
|
|
10224
10258
|
return Object.assign({}, datum, before(datum, idx, data));
|
|
@@ -10229,8 +10263,6 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
10229
10263
|
clipWidth: 0
|
|
10230
10264
|
};
|
|
10231
10265
|
}
|
|
10232
|
-
|
|
10233
|
-
// eslint-disable-next-line max-params
|
|
10234
10266
|
function getChildOnLoad(animate, data, cb) {
|
|
10235
10267
|
const newAnimate = Object.assign({}, animate, {
|
|
10236
10268
|
onEnd: cb
|
|
@@ -10242,7 +10274,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
10242
10274
|
data
|
|
10243
10275
|
};
|
|
10244
10276
|
}
|
|
10245
|
-
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (
|
|
10277
|
+
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10246
10278
|
// If nodes need to exit, transform them with the provided onLoad.after function.
|
|
10247
10279
|
newData = data.map((datum, idx) => {
|
|
10248
10280
|
return Object.assign({}, datum, after(datum, idx, data));
|
|
@@ -10253,7 +10285,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
10253
10285
|
};
|
|
10254
10286
|
}
|
|
10255
10287
|
|
|
10256
|
-
// eslint-disable-next-line max-params
|
|
10288
|
+
// eslint-disable-next-line max-params
|
|
10257
10289
|
function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
10258
10290
|
// Whether or not _this_ child has exiting nodes, we want the exit-
|
|
10259
10291
|
// transition for all children to have the same duration, delay, etc.
|
|
@@ -10264,7 +10296,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
10264
10296
|
// After the exit transition occurs, trigger the animations for
|
|
10265
10297
|
// nodes that are neither exiting nor entering.
|
|
10266
10298
|
animate.onEnd = cb;
|
|
10267
|
-
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (
|
|
10299
|
+
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10268
10300
|
// If nodes need to exit, transform them with the provided onExit.before function.
|
|
10269
10301
|
newData = data.map((datum, idx) => {
|
|
10270
10302
|
const key = (datum.key || idx).toString();
|
|
@@ -10277,7 +10309,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
10277
10309
|
};
|
|
10278
10310
|
}
|
|
10279
10311
|
|
|
10280
|
-
// eslint-disable-next-line max-params
|
|
10312
|
+
// eslint-disable-next-line max-params
|
|
10281
10313
|
function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
10282
10314
|
let newAnimate = animate;
|
|
10283
10315
|
let newData = data;
|
|
@@ -10287,7 +10319,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
10287
10319
|
newAnimate = Object.assign({}, animate, {
|
|
10288
10320
|
onEnd: cb
|
|
10289
10321
|
});
|
|
10290
|
-
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (
|
|
10322
|
+
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10291
10323
|
// We want the entering nodes to be included in the transition target
|
|
10292
10324
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
10293
10325
|
// so perform the `onEnter.before` transformation on each node.
|
|
@@ -10302,7 +10334,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
10302
10334
|
};
|
|
10303
10335
|
}
|
|
10304
10336
|
|
|
10305
|
-
// eslint-disable-next-line max-params
|
|
10337
|
+
// eslint-disable-next-line max-params
|
|
10306
10338
|
function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
10307
10339
|
// Whether or not _this_ child has entering nodes, we want the entering-
|
|
10308
10340
|
// transition for all children to have the same duration, delay, etc.
|
|
@@ -10314,7 +10346,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
10314
10346
|
// domain should encompass the nodes that will now enter. So perform
|
|
10315
10347
|
// the `onEnter.after` transformation on each node.
|
|
10316
10348
|
newAnimate.onEnd = cb;
|
|
10317
|
-
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (
|
|
10349
|
+
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10318
10350
|
newData = data.map((datum, idx) => {
|
|
10319
10351
|
const key = getDatumKey(datum, idx);
|
|
10320
10352
|
return enteringNodes[key] ? Object.assign({}, datum, after(datum, idx, data)) : datum;
|
|
@@ -10409,8 +10441,6 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
10409
10441
|
}
|
|
10410
10442
|
return {};
|
|
10411
10443
|
};
|
|
10412
|
-
|
|
10413
|
-
// eslint-disable-next-line max-statements, complexity, max-len
|
|
10414
10444
|
return function getTransitionProps(child, index) {
|
|
10415
10445
|
const data = getChildData(child) || [];
|
|
10416
10446
|
const animate = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.animate, child.props.animate);
|