victory-pie 37.3.2 → 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 +8 -0
- package/dist/victory-pie.js +297 -251
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.js +7 -7
- package/es/slice.d.ts +3 -3
- package/es/slice.js +3 -3
- package/es/victory-pie.d.ts +6 -6
- package/lib/helper-methods.js +7 -7
- package/lib/slice.d.ts +3 -3
- package/lib/slice.js +3 -3
- package/lib/victory-pie.d.ts +6 -6
- package/package.json +3 -31
- package/src/helper-methods.ts +3 -2
- package/src/slice.tsx +1 -1
package/dist/victory-pie.js
CHANGED
|
@@ -28,17 +28,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28
28
|
/* harmony export */ "getYOffset": function() { return /* binding */ getYOffset; },
|
|
29
29
|
/* harmony export */ "getYOffsetMultiplayerByAngle": function() { return /* binding */ getYOffsetMultiplayerByAngle; }
|
|
30
30
|
/* harmony export */ });
|
|
31
|
-
/* harmony import */ var
|
|
32
|
-
/* harmony import */ var
|
|
33
|
-
/* harmony import */ var
|
|
34
|
-
/* harmony import */ var
|
|
31
|
+
/* 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");
|
|
32
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
33
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
34
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__);
|
|
35
35
|
/* harmony import */ var victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-shape */ "../../victory-vendor/es/d3-shape.js");
|
|
36
36
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
37
37
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/style.js");
|
|
38
38
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
39
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 90, 135, 180, 225, 270, 315, 360] }]*/
|
|
39
40
|
|
|
40
41
|
|
|
41
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1, 2, 45, 90, 135, 180, 225, 270, 315, 360] }]*/
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
const checkForValidText = text => {
|
|
@@ -64,7 +64,7 @@ const getOrigin = (props, padding) => {
|
|
|
64
64
|
width,
|
|
65
65
|
height
|
|
66
66
|
} = props;
|
|
67
|
-
const origin =
|
|
67
|
+
const origin = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(props.origin) ? props.origin : {};
|
|
68
68
|
return {
|
|
69
69
|
x: origin.x !== undefined ? origin.x : (padding.left - padding.right + width) / 2,
|
|
70
70
|
y: origin.y !== undefined ? origin.y : (padding.top - padding.bottom + height) / 2
|
|
@@ -109,7 +109,7 @@ const getCalculatedValues = props => {
|
|
|
109
109
|
const styleObject = victory_core__WEBPACK_IMPORTED_MODULE_3__.getDefaultStyles(props, "pie");
|
|
110
110
|
const style = victory_core__WEBPACK_IMPORTED_MODULE_3__.getStyles(props.style, styleObject);
|
|
111
111
|
const colors = Array.isArray(colorScale) ? colorScale : victory_core__WEBPACK_IMPORTED_MODULE_4__.getColorScale(colorScale, theme);
|
|
112
|
-
const padding = victory_core__WEBPACK_IMPORTED_MODULE_3__.getPadding(props);
|
|
112
|
+
const padding = victory_core__WEBPACK_IMPORTED_MODULE_3__.getPadding(props.padding);
|
|
113
113
|
const defaultRadius = getRadius(props, padding);
|
|
114
114
|
const origin = getOrigin(props, padding);
|
|
115
115
|
const data = getDataSortedByCategories(props, victory_core__WEBPACK_IMPORTED_MODULE_5__.getData(props));
|
|
@@ -269,7 +269,7 @@ const getLabelProps = (text, dataProps, calculatedValues) => {
|
|
|
269
269
|
return labelProps;
|
|
270
270
|
}
|
|
271
271
|
const tooltipTheme = theme && theme.tooltip || {};
|
|
272
|
-
return
|
|
272
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelProps, victory_core__WEBPACK_IMPORTED_MODULE_3__.omit(tooltipTheme, ["style"]));
|
|
273
273
|
};
|
|
274
274
|
const getXOffsetMultiplayerByAngle = angle => Math.cos(angle - victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(90));
|
|
275
275
|
const getYOffsetMultiplayerByAngle = angle => Math.sin(angle - victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(90));
|
|
@@ -313,7 +313,7 @@ const getLabelIndicatorPropsForLineSegment = (props, calculatedValues, labelProp
|
|
|
313
313
|
y2,
|
|
314
314
|
index
|
|
315
315
|
};
|
|
316
|
-
return
|
|
316
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelIndicatorProps);
|
|
317
317
|
};
|
|
318
318
|
const getBaseProps = (initialProps, fallbackProps) => {
|
|
319
319
|
const props = victory_core__WEBPACK_IMPORTED_MODULE_3__.modifyProps(initialProps, fallbackProps, "pie");
|
|
@@ -349,7 +349,7 @@ const getBaseProps = (initialProps, fallbackProps) => {
|
|
|
349
349
|
}
|
|
350
350
|
};
|
|
351
351
|
return slices.reduce((childProps, slice, index) => {
|
|
352
|
-
const datum =
|
|
352
|
+
const datum = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, data[index], {
|
|
353
353
|
startAngle: victory_core__WEBPACK_IMPORTED_MODULE_3__.radiansToDegrees(slice.startAngle),
|
|
354
354
|
endAngle: victory_core__WEBPACK_IMPORTED_MODULE_3__.radiansToDegrees(slice.endAngle),
|
|
355
355
|
padAngle: victory_core__WEBPACK_IMPORTED_MODULE_3__.radiansToDegrees(slice.padAngle)
|
|
@@ -399,12 +399,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
399
399
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
400
400
|
/* harmony export */ "Slice": function() { return /* binding */ Slice; }
|
|
401
401
|
/* harmony export */ });
|
|
402
|
-
/* harmony import */ var
|
|
403
|
-
/* harmony import */ var
|
|
404
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
405
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
402
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
403
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
406
404
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
407
405
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
406
|
+
/* 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");
|
|
407
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
408
408
|
/* harmony import */ var victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-shape */ "../../victory-vendor/es/d3-shape.js");
|
|
409
409
|
|
|
410
410
|
|
|
@@ -424,7 +424,7 @@ const getPath = props => {
|
|
|
424
424
|
const startAngle = victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(props.sliceStartAngle);
|
|
425
425
|
const endAngle = victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(props.sliceEndAngle);
|
|
426
426
|
const pathFunction = victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_2__.arc().cornerRadius(cornerRadius).outerRadius(radius).innerRadius(innerRadius || 0);
|
|
427
|
-
return pathFunction(
|
|
427
|
+
return pathFunction(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
428
428
|
startAngle,
|
|
429
429
|
endAngle,
|
|
430
430
|
padAngle
|
|
@@ -475,14 +475,14 @@ const evaluateProps = props => {
|
|
|
475
475
|
});
|
|
476
476
|
};
|
|
477
477
|
const defaultProps = {
|
|
478
|
-
pathComponent: /*#__PURE__*/
|
|
478
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Path, null),
|
|
479
479
|
role: "presentation",
|
|
480
480
|
shapeRendering: "auto"
|
|
481
481
|
};
|
|
482
482
|
const Slice = initialProps => {
|
|
483
|
-
const props = evaluateProps(
|
|
483
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
484
484
|
const defaultTransform = props.origin ? `translate(${props.origin.x}, ${props.origin.y})` : undefined;
|
|
485
|
-
return /*#__PURE__*/
|
|
485
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
486
486
|
...props.events,
|
|
487
487
|
"aria-label": props.ariaLabel,
|
|
488
488
|
d: getPath(props),
|
|
@@ -4959,10 +4959,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4959
4959
|
/* harmony export */ "isInterpolatable": function() { return /* binding */ isInterpolatable; },
|
|
4960
4960
|
/* harmony export */ "victoryInterpolator": function() { return /* binding */ victoryInterpolator; }
|
|
4961
4961
|
/* harmony export */ });
|
|
4962
|
-
/* harmony import */ var
|
|
4963
|
-
/* harmony import */ var
|
|
4964
|
-
/* harmony import */ var
|
|
4965
|
-
/* harmony import */ var
|
|
4962
|
+
/* 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");
|
|
4963
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
4964
|
+
/* 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");
|
|
4965
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
4966
4966
|
/* harmony import */ var victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-interpolate */ "../../victory-vendor/es/d3-interpolate.js");
|
|
4967
4967
|
|
|
4968
4968
|
|
|
@@ -4988,7 +4988,7 @@ const isInterpolatable = function (obj) {
|
|
|
4988
4988
|
return false;
|
|
4989
4989
|
case "object":
|
|
4990
4990
|
// Don't try to interpolate class instances (except Date or Array).
|
|
4991
|
-
return obj instanceof Date || Array.isArray(obj) ||
|
|
4991
|
+
return obj instanceof Date || Array.isArray(obj) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(obj);
|
|
4992
4992
|
case "function":
|
|
4993
4993
|
// Careful! There may be extra properties on function objects that the
|
|
4994
4994
|
// component expects to access - for instance, it may be a `d3.scale()`
|
|
@@ -5074,7 +5074,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
5074
5074
|
if (typeof x === "function" || typeof y === "function") {
|
|
5075
5075
|
return interpolateFunction(x, y);
|
|
5076
5076
|
}
|
|
5077
|
-
if (typeof x === "object" &&
|
|
5077
|
+
if (typeof x === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(x) || typeof y === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(y)) {
|
|
5078
5078
|
return interpolateObject(x, y);
|
|
5079
5079
|
}
|
|
5080
5080
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(x, y);
|
|
@@ -5083,7 +5083,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
5083
5083
|
// When the value is an array, attempt to sort by "key" so that animating nodes may be identified
|
|
5084
5084
|
// based on "key" instead of index
|
|
5085
5085
|
const keyData = val => {
|
|
5086
|
-
return Array.isArray(val) ?
|
|
5086
|
+
return Array.isArray(val) ? lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default()(val, "key") : val;
|
|
5087
5087
|
};
|
|
5088
5088
|
const i = {};
|
|
5089
5089
|
const c = {};
|
|
@@ -5150,7 +5150,7 @@ const victoryInterpolator = function (a, b) {
|
|
|
5150
5150
|
if (typeof a === "function" || typeof b === "function") {
|
|
5151
5151
|
return interpolateFunction(a, b);
|
|
5152
5152
|
}
|
|
5153
|
-
if (
|
|
5153
|
+
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(b)) {
|
|
5154
5154
|
// @ts-expect-error These generics are tough, but they work :)
|
|
5155
5155
|
return interpolateObject(a, b);
|
|
5156
5156
|
}
|
|
@@ -5326,16 +5326,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5326
5326
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
5327
5327
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
5328
5328
|
/* harmony export */ });
|
|
5329
|
-
/* harmony import */ var
|
|
5330
|
-
/* harmony import */ var
|
|
5331
|
-
/* harmony import */ var
|
|
5332
|
-
/* harmony import */ var
|
|
5329
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5330
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5331
|
+
/* 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");
|
|
5332
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
5333
5333
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5334
5334
|
/* 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");
|
|
5335
5335
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
5336
5336
|
/* 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");
|
|
5337
5337
|
/* 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");
|
|
5338
|
-
|
|
5339
5338
|
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); }
|
|
5340
5339
|
|
|
5341
5340
|
|
|
@@ -5343,9 +5342,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
5343
5342
|
|
|
5344
5343
|
|
|
5345
5344
|
|
|
5345
|
+
|
|
5346
5346
|
const defaultProps = {
|
|
5347
5347
|
className: "VictoryContainer",
|
|
5348
|
-
portalComponent: /*#__PURE__*/
|
|
5348
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5349
5349
|
portalZIndex: 99,
|
|
5350
5350
|
responsive: true,
|
|
5351
5351
|
role: "img"
|
|
@@ -5362,10 +5362,10 @@ function useVictoryContainer(initialProps) {
|
|
|
5362
5362
|
height,
|
|
5363
5363
|
responsive
|
|
5364
5364
|
} = props;
|
|
5365
|
-
const localContainerRef = (0,
|
|
5365
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
5366
5366
|
|
|
5367
5367
|
// Generated ID stored in ref because it needs to persist across renders
|
|
5368
|
-
const generatedId = (0,
|
|
5368
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
5369
5369
|
const containerId = props.containerId ?? generatedId.current;
|
|
5370
5370
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
5371
5371
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -5424,7 +5424,7 @@ const VictoryContainer = initialProps => {
|
|
|
5424
5424
|
containerRef,
|
|
5425
5425
|
localContainerRef
|
|
5426
5426
|
} = useVictoryContainer(initialProps);
|
|
5427
|
-
|
|
5427
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
5428
5428
|
if (!events?.onWheel) return;
|
|
5429
5429
|
const handleWheel = e => e.preventDefault();
|
|
5430
5430
|
const container = localContainerRef?.current;
|
|
@@ -5434,7 +5434,7 @@ const VictoryContainer = initialProps => {
|
|
|
5434
5434
|
};
|
|
5435
5435
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5436
5436
|
}, []);
|
|
5437
|
-
return /*#__PURE__*/
|
|
5437
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5438
5438
|
className: className,
|
|
5439
5439
|
style: {
|
|
5440
5440
|
...style,
|
|
@@ -5448,7 +5448,7 @@ const VictoryContainer = initialProps => {
|
|
|
5448
5448
|
"data-ouia-component-type": ouiaType,
|
|
5449
5449
|
"data-ouia-safe": ouiaSafe,
|
|
5450
5450
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
5451
|
-
}, /*#__PURE__*/
|
|
5451
|
+
}, /*#__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({
|
|
5452
5452
|
width: width,
|
|
5453
5453
|
height: height,
|
|
5454
5454
|
tabIndex: tabIndex,
|
|
@@ -5461,11 +5461,11 @@ const VictoryContainer = initialProps => {
|
|
|
5461
5461
|
...dimensions,
|
|
5462
5462
|
pointerEvents: "all"
|
|
5463
5463
|
}
|
|
5464
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
5464
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
5465
5465
|
id: titleId
|
|
5466
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
5466
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
5467
5467
|
id: descId
|
|
5468
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
5468
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5469
5469
|
style: {
|
|
5470
5470
|
...dimensions,
|
|
5471
5471
|
zIndex: portalZIndex,
|
|
@@ -5473,7 +5473,7 @@ const VictoryContainer = initialProps => {
|
|
|
5473
5473
|
top: 0,
|
|
5474
5474
|
left: 0
|
|
5475
5475
|
}
|
|
5476
|
-
}, /*#__PURE__*/
|
|
5476
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
5477
5477
|
as: portalComponent,
|
|
5478
5478
|
width: width,
|
|
5479
5479
|
height: height,
|
|
@@ -5500,12 +5500,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5500
5500
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5501
5501
|
/* harmony export */ "VictoryLabel": function() { return /* binding */ VictoryLabel; }
|
|
5502
5502
|
/* harmony export */ });
|
|
5503
|
-
/* harmony import */ var
|
|
5504
|
-
/* harmony import */ var
|
|
5503
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5504
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5505
5505
|
/* 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");
|
|
5506
5506
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
5507
|
-
/* harmony import */ var
|
|
5508
|
-
/* harmony import */ var
|
|
5507
|
+
/* 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");
|
|
5508
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
5509
5509
|
/* 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");
|
|
5510
5510
|
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-primitives/rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
5511
5511
|
/* harmony import */ var _victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../victory-primitives/text */ "../../victory-core/es/victory-primitives/text.js");
|
|
@@ -5516,9 +5516,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5516
5516
|
/* harmony import */ var _victory_util_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/style */ "../../victory-core/es/victory-util/style.js");
|
|
5517
5517
|
/* harmony import */ var _victory_util_textsize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../victory-util/textsize */ "../../victory-core/es/victory-util/textsize.js");
|
|
5518
5518
|
/* 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");
|
|
5519
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
5519
5520
|
|
|
5520
5521
|
|
|
5521
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
5522
5522
|
|
|
5523
5523
|
|
|
5524
5524
|
|
|
@@ -5570,7 +5570,7 @@ const shouldUseMultilineBackgrounds = props => {
|
|
|
5570
5570
|
backgroundStyle,
|
|
5571
5571
|
backgroundPadding
|
|
5572
5572
|
} = props;
|
|
5573
|
-
return Array.isArray(backgroundStyle) && !
|
|
5573
|
+
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundPadding);
|
|
5574
5574
|
};
|
|
5575
5575
|
const getStyles = (style, props) => {
|
|
5576
5576
|
if (props.disableInlineStyles) {
|
|
@@ -5586,32 +5586,28 @@ const getStyles = (style, props) => {
|
|
|
5586
5586
|
fontSize: getFontSize(baseStyles)
|
|
5587
5587
|
});
|
|
5588
5588
|
};
|
|
5589
|
-
return Array.isArray(style) && !
|
|
5589
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => getSingleStyle(s)) : getSingleStyle(style);
|
|
5590
5590
|
};
|
|
5591
5591
|
const getBackgroundStyles = (style, props) => {
|
|
5592
5592
|
if (!style) {
|
|
5593
5593
|
return undefined;
|
|
5594
5594
|
}
|
|
5595
|
-
return Array.isArray(style) && !
|
|
5595
|
+
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);
|
|
5596
5596
|
};
|
|
5597
5597
|
const getBackgroundPadding = props => {
|
|
5598
5598
|
if (props.backgroundPadding && Array.isArray(props.backgroundPadding)) {
|
|
5599
5599
|
return props.backgroundPadding.map(backgroundPadding => {
|
|
5600
5600
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(backgroundPadding, props);
|
|
5601
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
5602
|
-
padding
|
|
5603
|
-
});
|
|
5601
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
5604
5602
|
});
|
|
5605
5603
|
}
|
|
5606
5604
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.backgroundPadding, props);
|
|
5607
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
5608
|
-
padding
|
|
5609
|
-
});
|
|
5605
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
5610
5606
|
};
|
|
5611
5607
|
const getLineHeight = props => {
|
|
5612
5608
|
const lineHeight = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.lineHeight, props);
|
|
5613
5609
|
if (Array.isArray(lineHeight)) {
|
|
5614
|
-
return
|
|
5610
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(lineHeight) ? [1] : lineHeight;
|
|
5615
5611
|
}
|
|
5616
5612
|
return lineHeight;
|
|
5617
5613
|
};
|
|
@@ -5731,7 +5727,7 @@ const getFullBackground = (calculatedProps, tspanValues) => {
|
|
|
5731
5727
|
x: inline ? xCoordinate - backgroundPadding.left : xCoordinate + dx - backgroundPadding.left,
|
|
5732
5728
|
y: yCoordinate
|
|
5733
5729
|
};
|
|
5734
|
-
return /*#__PURE__*/
|
|
5730
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
5735
5731
|
};
|
|
5736
5732
|
const getInlineXOffset = (calculatedProps, textElements, index) => {
|
|
5737
5733
|
const {
|
|
@@ -5801,7 +5797,7 @@ const getChildBackgrounds = (calculatedProps, tspanValues) => {
|
|
|
5801
5797
|
x: xCoord - padding.left,
|
|
5802
5798
|
y: yCoord
|
|
5803
5799
|
};
|
|
5804
|
-
return /*#__PURE__*/
|
|
5800
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
5805
5801
|
});
|
|
5806
5802
|
};
|
|
5807
5803
|
const getBackgroundElement = (calculatedProps, tspanValues) => {
|
|
@@ -5932,16 +5928,16 @@ const renderLabel = (calculatedProps, tspanValues) => {
|
|
|
5932
5928
|
style: currentStyle,
|
|
5933
5929
|
children: line
|
|
5934
5930
|
};
|
|
5935
|
-
return /*#__PURE__*/
|
|
5931
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(tspanComponent, tspanProps);
|
|
5936
5932
|
});
|
|
5937
|
-
return /*#__PURE__*/
|
|
5933
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(textComponent, textProps, tspans);
|
|
5938
5934
|
};
|
|
5939
5935
|
const defaultProps = {
|
|
5940
|
-
backgroundComponent: /*#__PURE__*/
|
|
5941
|
-
groupComponent: /*#__PURE__*/
|
|
5936
|
+
backgroundComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__.Rect, null),
|
|
5937
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
5942
5938
|
direction: "inherit",
|
|
5943
|
-
textComponent: /*#__PURE__*/
|
|
5944
|
-
tspanComponent: /*#__PURE__*/
|
|
5939
|
+
textComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__.Text, null),
|
|
5940
|
+
tspanComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_tspan__WEBPACK_IMPORTED_MODULE_10__.TSpan, null),
|
|
5945
5941
|
capHeight: 0.71,
|
|
5946
5942
|
// Magic number from d3.
|
|
5947
5943
|
lineHeight: 1
|
|
@@ -5978,10 +5974,10 @@ const VictoryLabel = initialProps => {
|
|
|
5978
5974
|
if (props.backgroundStyle) {
|
|
5979
5975
|
const backgroundElement = getBackgroundElement(calculatedProps, tspanValues);
|
|
5980
5976
|
const children = [backgroundElement, label];
|
|
5981
|
-
const backgroundWithLabel = /*#__PURE__*/
|
|
5982
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
5977
|
+
const backgroundWithLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.groupComponent, {}, children);
|
|
5978
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, backgroundWithLabel) : backgroundWithLabel;
|
|
5983
5979
|
}
|
|
5984
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
5980
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, label) : label;
|
|
5985
5981
|
};
|
|
5986
5982
|
VictoryLabel.displayName = "VictoryLabel";
|
|
5987
5983
|
VictoryLabel.role = "label";
|
|
@@ -6107,12 +6103,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6107
6103
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6108
6104
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
6109
6105
|
/* harmony export */ });
|
|
6110
|
-
/* harmony import */ var
|
|
6111
|
-
/* harmony import */ var
|
|
6106
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6107
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6112
6108
|
/* 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");
|
|
6113
6109
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6114
|
-
/* harmony import */ var
|
|
6115
|
-
/* harmony import */ var
|
|
6110
|
+
/* 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");
|
|
6111
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
6116
6112
|
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
|
|
6117
6113
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6118
6114
|
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
@@ -6123,14 +6119,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6123
6119
|
|
|
6124
6120
|
|
|
6125
6121
|
const defaultProps = {
|
|
6126
|
-
groupComponent: /*#__PURE__*/
|
|
6122
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
6127
6123
|
};
|
|
6128
6124
|
const VictoryPortal = initialProps => {
|
|
6129
6125
|
const props = {
|
|
6130
6126
|
...defaultProps,
|
|
6131
6127
|
...initialProps
|
|
6132
6128
|
};
|
|
6133
|
-
const [id] = (0,
|
|
6129
|
+
const [id] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()());
|
|
6134
6130
|
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
6135
6131
|
if (!portalContext) {
|
|
6136
6132
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
@@ -6148,12 +6144,12 @@ const VictoryPortal = initialProps => {
|
|
|
6148
6144
|
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
6149
6145
|
key: childProps.key ?? id
|
|
6150
6146
|
});
|
|
6151
|
-
const child = children && /*#__PURE__*/
|
|
6152
|
-
|
|
6147
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(children, newProps);
|
|
6148
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
6153
6149
|
portalContext?.addChild(id, child);
|
|
6154
6150
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6155
6151
|
}, [props.children]);
|
|
6156
|
-
|
|
6152
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
6157
6153
|
return () => portalContext?.removeChild(id);
|
|
6158
6154
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6159
6155
|
}, []);
|
|
@@ -6174,10 +6170,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6174
6170
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6175
6171
|
/* harmony export */ "LineSegment": function() { return /* binding */ LineSegment; }
|
|
6176
6172
|
/* harmony export */ });
|
|
6177
|
-
/* harmony import */ var
|
|
6178
|
-
/* harmony import */ var
|
|
6179
|
-
/* harmony import */ var
|
|
6180
|
-
/* harmony import */ var
|
|
6173
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6174
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6175
|
+
/* 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");
|
|
6176
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6181
6177
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6182
6178
|
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "../../victory-core/es/victory-primitives/line.js");
|
|
6183
6179
|
|
|
@@ -6209,13 +6205,13 @@ const evaluateProps = props => {
|
|
|
6209
6205
|
});
|
|
6210
6206
|
};
|
|
6211
6207
|
const defaultProps = {
|
|
6212
|
-
lineComponent: /*#__PURE__*/
|
|
6208
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
6213
6209
|
role: "presentation",
|
|
6214
6210
|
shapeRendering: "auto"
|
|
6215
6211
|
};
|
|
6216
6212
|
const LineSegment = initialProps => {
|
|
6217
|
-
const props = evaluateProps(
|
|
6218
|
-
return /*#__PURE__*/
|
|
6213
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
6214
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.lineComponent, {
|
|
6219
6215
|
...props.events,
|
|
6220
6216
|
"aria-label": props.ariaLabel,
|
|
6221
6217
|
style: props.style,
|
|
@@ -7572,22 +7568,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7572
7568
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7573
7569
|
/* harmony export */ "VictoryTransition": function() { return /* binding */ VictoryTransition; }
|
|
7574
7570
|
/* harmony export */ });
|
|
7575
|
-
/* harmony import */ var
|
|
7576
|
-
/* harmony import */ var
|
|
7571
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7572
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7577
7573
|
/* 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");
|
|
7578
7574
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7579
|
-
/* harmony import */ var
|
|
7580
|
-
/* harmony import */ var
|
|
7575
|
+
/* 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");
|
|
7576
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_2__);
|
|
7577
|
+
/* 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");
|
|
7578
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
7581
7579
|
/* 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");
|
|
7582
7580
|
/* harmony import */ var _victory_util_collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/collection */ "../../victory-core/es/victory-util/collection.js");
|
|
7583
7581
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7584
7582
|
/* 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");
|
|
7585
7583
|
/* harmony import */ var _victory_util_transitions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/transitions */ "../../victory-core/es/victory-util/transitions.js");
|
|
7586
|
-
|
|
7587
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
7584
|
+
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); }
|
|
7588
7585
|
|
|
7589
7586
|
|
|
7590
|
-
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); }
|
|
7591
7587
|
|
|
7592
7588
|
|
|
7593
7589
|
|
|
@@ -7595,7 +7591,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
7595
7591
|
|
|
7596
7592
|
|
|
7597
7593
|
|
|
7598
|
-
class VictoryTransition extends (
|
|
7594
|
+
class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
7599
7595
|
static displayName = "VictoryTransition";
|
|
7600
7596
|
static contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
7601
7597
|
constructor(props, context) {
|
|
@@ -7638,8 +7634,8 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7638
7634
|
nextProps
|
|
7639
7635
|
};
|
|
7640
7636
|
}
|
|
7641
|
-
const oldChildren =
|
|
7642
|
-
const nextChildren =
|
|
7637
|
+
const oldChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
7638
|
+
const nextChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextProps.children);
|
|
7643
7639
|
const {
|
|
7644
7640
|
nodesWillExit,
|
|
7645
7641
|
nodesWillEnter,
|
|
@@ -7662,12 +7658,12 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7662
7658
|
const childDomain = child.props && child.type.getDomain(child.props, axis);
|
|
7663
7659
|
return childDomain ? memo.concat(childDomain) : memo;
|
|
7664
7660
|
} else if (child.props && child.props.children) {
|
|
7665
|
-
return memo.concat(getChildDomains(
|
|
7661
|
+
return memo.concat(getChildDomains(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
7666
7662
|
}
|
|
7667
7663
|
return memo;
|
|
7668
7664
|
}, []);
|
|
7669
7665
|
};
|
|
7670
|
-
const child =
|
|
7666
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
7671
7667
|
const childProps = child.props || {};
|
|
7672
7668
|
const domain = Array.isArray(childProps.domain) ? childProps.domain : childProps.domain && childProps.domain[axis];
|
|
7673
7669
|
if (!childProps.children && domain) {
|
|
@@ -7700,7 +7696,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7700
7696
|
render() {
|
|
7701
7697
|
const props = this.pickProps();
|
|
7702
7698
|
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));
|
|
7703
|
-
const child =
|
|
7699
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
7704
7700
|
const transitionProps = getTransitionProps(child);
|
|
7705
7701
|
this.transitionProps = transitionProps;
|
|
7706
7702
|
const domain = {
|
|
@@ -7714,21 +7710,21 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
7714
7710
|
}, transitionProps, child.props);
|
|
7715
7711
|
const animationWhitelist = props.animationWhitelist || [];
|
|
7716
7712
|
const whitelist = animationWhitelist.concat(["clipWidth"]);
|
|
7717
|
-
const propsToAnimate = whitelist.length ?
|
|
7718
|
-
return /*#__PURE__*/
|
|
7713
|
+
const propsToAnimate = whitelist.length ? lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(combinedProps, whitelist) : combinedProps;
|
|
7714
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_8__.VictoryAnimation, _extends({}, combinedProps.animate, {
|
|
7719
7715
|
data: propsToAnimate
|
|
7720
7716
|
}), newProps => {
|
|
7721
7717
|
if (child.props.groupComponent) {
|
|
7722
|
-
const groupComponent = this.continuous ? /*#__PURE__*/
|
|
7718
|
+
const groupComponent = this.continuous ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child.props.groupComponent, {
|
|
7723
7719
|
clipWidth: newProps.clipWidth || 0
|
|
7724
7720
|
}) : child.props.groupComponent;
|
|
7725
|
-
return /*#__PURE__*/
|
|
7721
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
7726
7722
|
animate: null,
|
|
7727
7723
|
animating: true,
|
|
7728
7724
|
groupComponent
|
|
7729
7725
|
}, newProps, combinedProps));
|
|
7730
7726
|
}
|
|
7731
|
-
return /*#__PURE__*/
|
|
7727
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
7732
7728
|
animate: null,
|
|
7733
7729
|
animating: true
|
|
7734
7730
|
}, newProps, combinedProps));
|
|
@@ -7749,14 +7745,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7749
7745
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7750
7746
|
/* harmony export */ "addEvents": function() { return /* binding */ addEvents; }
|
|
7751
7747
|
/* harmony export */ });
|
|
7752
|
-
/* harmony import */ var
|
|
7753
|
-
/* harmony import */ var
|
|
7754
|
-
/* harmony import */ var
|
|
7755
|
-
/* harmony import */ var
|
|
7756
|
-
/* harmony import */ var
|
|
7757
|
-
/* harmony import */ var
|
|
7758
|
-
/* harmony import */ var
|
|
7759
|
-
/* harmony import */ var
|
|
7748
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7749
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7750
|
+
/* 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");
|
|
7751
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7752
|
+
/* 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");
|
|
7753
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
7754
|
+
/* 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");
|
|
7755
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
7760
7756
|
/* 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");
|
|
7761
7757
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
7762
7758
|
/* 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");
|
|
@@ -7903,8 +7899,8 @@ function addEvents(WrappedComponent, options) {
|
|
|
7903
7899
|
return {};
|
|
7904
7900
|
}
|
|
7905
7901
|
const getState = (key, type) => {
|
|
7906
|
-
const result =
|
|
7907
|
-
return
|
|
7902
|
+
const result = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.getEventState(key, type), this.getSharedEventState(key, type));
|
|
7903
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
|
|
7908
7904
|
};
|
|
7909
7905
|
const components = options.components || defaultComponents;
|
|
7910
7906
|
const stateChanges = components.map(component => {
|
|
@@ -7917,7 +7913,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
7917
7913
|
return stateChanges;
|
|
7918
7914
|
}
|
|
7919
7915
|
applyExternalMutations(props, externalMutations) {
|
|
7920
|
-
if (!
|
|
7916
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
7921
7917
|
const callbacks = props.externalEventMutations.reduce((memo, mutation) => (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo, []);
|
|
7922
7918
|
const compiledCallbacks = callbacks.length ? () => {
|
|
7923
7919
|
callbacks.forEach(c => c());
|
|
@@ -7950,7 +7946,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
7950
7946
|
sharedEvents,
|
|
7951
7947
|
externalEventMutations
|
|
7952
7948
|
} = props;
|
|
7953
|
-
return
|
|
7949
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
7954
7950
|
}
|
|
7955
7951
|
cacheValues(obj) {
|
|
7956
7952
|
Object.keys(obj).forEach(key => {
|
|
@@ -7961,10 +7957,10 @@ function addEvents(WrappedComponent, options) {
|
|
|
7961
7957
|
const getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
|
|
7962
7958
|
const sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
7963
7959
|
const parentState = this.getEventState("parent", "parent");
|
|
7964
|
-
const baseParentProps =
|
|
7960
|
+
const baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentState, sharedParentState);
|
|
7965
7961
|
const parentPropsList = baseParentProps.parentControlledProps;
|
|
7966
|
-
const parentProps = parentPropsList ?
|
|
7967
|
-
const modifiedProps =
|
|
7962
|
+
const parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(baseParentProps, parentPropsList) : {};
|
|
7963
|
+
const modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentProps, props);
|
|
7968
7964
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
7969
7965
|
}
|
|
7970
7966
|
getAllEvents(props) {
|
|
@@ -7984,18 +7980,18 @@ function addEvents(WrappedComponent, options) {
|
|
|
7984
7980
|
const currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
|
|
7985
7981
|
if (this.hasEvents) {
|
|
7986
7982
|
const baseEvents = this.getEvents(this.props, type, key);
|
|
7987
|
-
const componentProps =
|
|
7983
|
+
const componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
7988
7984
|
index,
|
|
7989
7985
|
key: id
|
|
7990
7986
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
7991
7987
|
id
|
|
7992
7988
|
});
|
|
7993
|
-
const events =
|
|
7989
|
+
const events = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
7994
7990
|
return Object.assign({}, componentProps, {
|
|
7995
7991
|
events
|
|
7996
7992
|
});
|
|
7997
7993
|
}
|
|
7998
|
-
return
|
|
7994
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
7999
7995
|
index,
|
|
8000
7996
|
key: id
|
|
8001
7997
|
}, currentProps, baseProps, {
|
|
@@ -8009,15 +8005,15 @@ function addEvents(WrappedComponent, options) {
|
|
|
8009
8005
|
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
8010
8006
|
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
8011
8007
|
}
|
|
8012
|
-
return /*#__PURE__*/
|
|
8008
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(component, parentProps, children);
|
|
8013
8009
|
}
|
|
8014
8010
|
animateComponent(props, defaultAnimationWhitelist) {
|
|
8015
8011
|
const animationWhitelist = typeof props.animate === "object" && props.animate?.animationWhitelist || defaultAnimationWhitelist;
|
|
8016
8012
|
const Comp = this.constructor;
|
|
8017
|
-
return /*#__PURE__*/
|
|
8013
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
8018
8014
|
animate: props.animate,
|
|
8019
8015
|
animationWhitelist: animationWhitelist
|
|
8020
|
-
}, /*#__PURE__*/
|
|
8016
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, props));
|
|
8021
8017
|
}
|
|
8022
8018
|
|
|
8023
8019
|
// Used by `VictoryLine` and `VictoryArea`
|
|
@@ -8032,12 +8028,12 @@ function addEvents(WrappedComponent, options) {
|
|
|
8032
8028
|
let newMemo = memo;
|
|
8033
8029
|
const labelProps = this.getComponentProps(labelComponent, "labels", key);
|
|
8034
8030
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
8035
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
8031
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps));
|
|
8036
8032
|
}
|
|
8037
8033
|
return newMemo;
|
|
8038
8034
|
}, []);
|
|
8039
8035
|
const dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
8040
|
-
const children = [/*#__PURE__*/
|
|
8036
|
+
const children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps), ...labelComponents];
|
|
8041
8037
|
return this.renderContainer(groupComponent, children);
|
|
8042
8038
|
}
|
|
8043
8039
|
renderData(props, shouldRenderDatum) {
|
|
@@ -8052,14 +8048,14 @@ function addEvents(WrappedComponent, options) {
|
|
|
8052
8048
|
const dataComponents = this.dataKeys.reduce((validDataComponents, _dataKey, index) => {
|
|
8053
8049
|
const dataProps = this.getComponentProps(dataComponent, "data", index);
|
|
8054
8050
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
8055
|
-
validDataComponents.push( /*#__PURE__*/
|
|
8051
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps));
|
|
8056
8052
|
}
|
|
8057
8053
|
return validDataComponents;
|
|
8058
8054
|
}, []);
|
|
8059
8055
|
const labelComponents = this.dataKeys.map((_dataKey, index) => {
|
|
8060
8056
|
const labelProps = this.getComponentProps(labelComponent, "labels", index);
|
|
8061
8057
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
8062
|
-
return /*#__PURE__*/
|
|
8058
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps);
|
|
8063
8059
|
}
|
|
8064
8060
|
return undefined;
|
|
8065
8061
|
}).filter(Boolean);
|
|
@@ -8165,24 +8161,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8165
8161
|
/* harmony export */ "getStringsFromData": function() { return /* binding */ getStringsFromData; },
|
|
8166
8162
|
/* harmony export */ "isDataComponent": function() { return /* binding */ isDataComponent; }
|
|
8167
8163
|
/* harmony export */ });
|
|
8168
|
-
/* harmony import */ var
|
|
8169
|
-
/* harmony import */ var
|
|
8170
|
-
/* harmony import */ var
|
|
8171
|
-
/* harmony import */ var
|
|
8164
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8165
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8166
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
|
|
8167
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
8172
8168
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isEqual */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEqual.js");
|
|
8173
8169
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__);
|
|
8174
|
-
/* harmony import */ var
|
|
8175
|
-
/* harmony import */ var
|
|
8176
|
-
/* harmony import */ var
|
|
8177
|
-
/* harmony import */ var
|
|
8178
|
-
/* harmony import */ var
|
|
8179
|
-
/* harmony import */ var
|
|
8180
|
-
/* harmony import */ var
|
|
8181
|
-
/* harmony import */ var
|
|
8182
|
-
/* harmony import */ var
|
|
8183
|
-
/* harmony import */ var
|
|
8184
|
-
/* harmony import */ var
|
|
8185
|
-
/* harmony import */ var
|
|
8170
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
8171
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__);
|
|
8172
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isUndefined */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isUndefined.js");
|
|
8173
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__);
|
|
8174
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/omitBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/omitBy.js");
|
|
8175
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__);
|
|
8176
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
|
|
8177
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__);
|
|
8178
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/property */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js");
|
|
8179
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_7__);
|
|
8180
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
8181
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_8__);
|
|
8186
8182
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8187
8183
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8188
8184
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
@@ -8216,7 +8212,7 @@ function getLength(data) {
|
|
|
8216
8212
|
|
|
8217
8213
|
// Returns generated data for a given axis based on domain and sample from props
|
|
8218
8214
|
function generateDataArray(props, axis) {
|
|
8219
|
-
const propsDomain =
|
|
8215
|
+
const propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
8220
8216
|
const domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis).domain();
|
|
8221
8217
|
const samples = props.samples || 1;
|
|
8222
8218
|
const domainMax = Math.max(...domain);
|
|
@@ -8241,7 +8237,7 @@ function sortData(dataset, sortKey, sortOrder) {
|
|
|
8241
8237
|
formattedSortKey = `_${sortKey}`;
|
|
8242
8238
|
}
|
|
8243
8239
|
const order = sortOrder === "ascending" ? "asc" : "desc";
|
|
8244
|
-
return
|
|
8240
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default()(dataset, formattedSortKey, order);
|
|
8245
8241
|
}
|
|
8246
8242
|
|
|
8247
8243
|
// This method will remove data points that break certain scales. (log scale only)
|
|
@@ -8285,7 +8281,7 @@ function getEventKey(key) {
|
|
|
8285
8281
|
return () => undefined;
|
|
8286
8282
|
}
|
|
8287
8283
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
8288
|
-
return
|
|
8284
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_7___default()(key);
|
|
8289
8285
|
}
|
|
8290
8286
|
|
|
8291
8287
|
// Returns data with an eventKey prop added to each datum
|
|
@@ -8344,12 +8340,12 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
8344
8340
|
if (isUnderMinY(baseline) && !isUnderMinY(value)) _y0 = minDomainY;
|
|
8345
8341
|
// baseline and value with only baseline above max, set baseline to maxDomainY
|
|
8346
8342
|
if (isOverMaxY(baseline) && !isOverMaxY(value)) _y0 = maxDomainY;
|
|
8347
|
-
return Object.assign({}, datum,
|
|
8343
|
+
return Object.assign({}, datum, lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
8348
8344
|
_x,
|
|
8349
8345
|
_y,
|
|
8350
8346
|
_y0,
|
|
8351
8347
|
_y1
|
|
8352
|
-
}, (
|
|
8348
|
+
}, (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default())));
|
|
8353
8349
|
});
|
|
8354
8350
|
}
|
|
8355
8351
|
|
|
@@ -8363,7 +8359,7 @@ function createStringMap(props, axis) {
|
|
|
8363
8359
|
const stringsFromAxes = getStringsFromAxes(props, axis);
|
|
8364
8360
|
const stringsFromCategories = getStringsFromCategories(props, axis);
|
|
8365
8361
|
const stringsFromData = getStringsFromData(props, axis);
|
|
8366
|
-
const allStrings =
|
|
8362
|
+
const allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default()([...stringsFromAxes, ...stringsFromCategories, ...stringsFromData]);
|
|
8367
8363
|
return allStrings.length === 0 ? null : allStrings.reduce((memo, string, index) => {
|
|
8368
8364
|
memo[string] = index + 1;
|
|
8369
8365
|
return memo;
|
|
@@ -8449,7 +8445,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
8449
8445
|
return memo;
|
|
8450
8446
|
}, {});
|
|
8451
8447
|
const formattedDatum = Object.assign({}, processedValues, parsedDatum);
|
|
8452
|
-
if (!
|
|
8448
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(formattedDatum)) {
|
|
8453
8449
|
dataArr.push(formattedDatum);
|
|
8454
8450
|
}
|
|
8455
8451
|
return dataArr;
|
|
@@ -8576,7 +8572,7 @@ function isDataComponent(component) {
|
|
|
8576
8572
|
};
|
|
8577
8573
|
let role = getRole(component);
|
|
8578
8574
|
if (role === "portal") {
|
|
8579
|
-
const children =
|
|
8575
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
8580
8576
|
role = children.length ? getRole(children[0]) : "";
|
|
8581
8577
|
}
|
|
8582
8578
|
const whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -8607,14 +8603,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8607
8603
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
8608
8604
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
8609
8605
|
/* harmony export */ });
|
|
8610
|
-
/* harmony import */ var
|
|
8611
|
-
/* harmony import */ var
|
|
8612
|
-
/* harmony import */ var
|
|
8613
|
-
/* harmony import */ var
|
|
8614
|
-
/* harmony import */ var
|
|
8615
|
-
/* harmony import */ var
|
|
8616
|
-
/* harmony import */ var
|
|
8617
|
-
/* harmony import */ var
|
|
8606
|
+
/* 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");
|
|
8607
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
8608
|
+
/* 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");
|
|
8609
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
8610
|
+
/* 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");
|
|
8611
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
8612
|
+
/* 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");
|
|
8613
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
8618
8614
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8619
8615
|
|
|
8620
8616
|
|
|
@@ -8690,7 +8686,7 @@ getScopedEvents) {
|
|
|
8690
8686
|
*/
|
|
8691
8687
|
// eslint-disable-next-line max-params
|
|
8692
8688
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
8693
|
-
if (
|
|
8689
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
8694
8690
|
return {};
|
|
8695
8691
|
}
|
|
8696
8692
|
|
|
@@ -8803,7 +8799,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
8803
8799
|
// eslint-disable-next-line max-params
|
|
8804
8800
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
8805
8801
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
8806
|
-
if (!
|
|
8802
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
8807
8803
|
const callbacks = compileCallbacks(eventReturn);
|
|
8808
8804
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
8809
8805
|
}
|
|
@@ -8864,7 +8860,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
8864
8860
|
const childState = baseState[childName];
|
|
8865
8861
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
8866
8862
|
memo[childName] = mutation ? mutation : childState;
|
|
8867
|
-
return
|
|
8863
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8868
8864
|
}, {});
|
|
8869
8865
|
}
|
|
8870
8866
|
|
|
@@ -8900,7 +8896,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8900
8896
|
} else {
|
|
8901
8897
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
8902
8898
|
// will be used. (i.e. labels)
|
|
8903
|
-
const targets =
|
|
8899
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
8904
8900
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
8905
8901
|
const identifier = {
|
|
8906
8902
|
eventKey,
|
|
@@ -8909,10 +8905,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8909
8905
|
};
|
|
8910
8906
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
8911
8907
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
8912
|
-
return
|
|
8908
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8913
8909
|
}, {});
|
|
8914
8910
|
}
|
|
8915
|
-
return
|
|
8911
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8916
8912
|
}, {});
|
|
8917
8913
|
}
|
|
8918
8914
|
|
|
@@ -8944,11 +8940,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
8944
8940
|
}
|
|
8945
8941
|
// find any mutation objects that match the target
|
|
8946
8942
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
8947
|
-
if (
|
|
8943
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
8948
8944
|
return undefined;
|
|
8949
8945
|
}
|
|
8950
8946
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
8951
|
-
if (
|
|
8947
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
8952
8948
|
return undefined;
|
|
8953
8949
|
}
|
|
8954
8950
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -8974,8 +8970,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
8974
8970
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
8975
8971
|
return match && match[1] && match[1].toLowerCase();
|
|
8976
8972
|
}
|
|
8977
|
-
const getGlobalEvents = events =>
|
|
8978
|
-
const omitGlobalEvents = events =>
|
|
8973
|
+
const getGlobalEvents = events => lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
8974
|
+
const omitGlobalEvents = events => lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
8979
8975
|
const emulateReactEvent = event => Object.assign(event, {
|
|
8980
8976
|
nativeEvent: event
|
|
8981
8977
|
});
|
|
@@ -9016,40 +9012,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9016
9012
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
9017
9013
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
9018
9014
|
/* harmony export */ });
|
|
9019
|
-
/* harmony import */ var
|
|
9020
|
-
/* harmony import */ var
|
|
9021
|
-
/* harmony import */ var
|
|
9022
|
-
/* harmony import */ var
|
|
9023
|
-
/* harmony import */ var
|
|
9024
|
-
/* harmony import */ var
|
|
9025
|
-
/* harmony import */ var
|
|
9026
|
-
/* harmony import */ var
|
|
9027
|
-
|
|
9015
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9016
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9017
|
+
/* 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");
|
|
9018
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
9019
|
+
/* 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");
|
|
9020
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
|
|
9021
|
+
/* 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");
|
|
9022
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
9028
9023
|
|
|
9029
9024
|
|
|
9030
9025
|
|
|
9031
|
-
// Private Functions
|
|
9032
9026
|
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9027
|
+
/**
|
|
9028
|
+
* Determine the range of a cartesian axis
|
|
9029
|
+
*/
|
|
9030
|
+
function getCartesianRange(options) {
|
|
9031
|
+
const vertical = options.axis !== "x";
|
|
9037
9032
|
if (vertical) {
|
|
9038
|
-
return [
|
|
9033
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
9039
9034
|
}
|
|
9040
|
-
return [padding.left,
|
|
9035
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
9041
9036
|
}
|
|
9042
|
-
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9037
|
+
|
|
9038
|
+
/**
|
|
9039
|
+
* Determine the range of a polar axis in radians
|
|
9040
|
+
*/
|
|
9041
|
+
function getPolarRange(options) {
|
|
9042
|
+
if (options.axis === "x") {
|
|
9043
|
+
const startAngle = degreesToRadians(options.startAngle || 0);
|
|
9044
|
+
const endAngle = degreesToRadians(options.endAngle || 360);
|
|
9046
9045
|
return [startAngle, endAngle];
|
|
9047
9046
|
}
|
|
9048
|
-
return [
|
|
9047
|
+
return [options.innerRadius || 0, getRadius({
|
|
9048
|
+
height: options.height,
|
|
9049
|
+
width: options.width,
|
|
9050
|
+
padding: options.padding
|
|
9051
|
+
})];
|
|
9049
9052
|
}
|
|
9050
9053
|
|
|
9051
|
-
// Exported Functions
|
|
9052
|
-
|
|
9053
9054
|
/**
|
|
9054
9055
|
* Creates an object composed of the inverted keys and values of object.
|
|
9055
9056
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -9086,8 +9087,11 @@ function omit(originalObject, ks) {
|
|
|
9086
9087
|
}
|
|
9087
9088
|
return newObject;
|
|
9088
9089
|
}
|
|
9090
|
+
|
|
9091
|
+
/**
|
|
9092
|
+
* Coalesce the x and y values from a data point
|
|
9093
|
+
*/
|
|
9089
9094
|
function getPoint(datum) {
|
|
9090
|
-
const exists = val => val !== undefined;
|
|
9091
9095
|
const {
|
|
9092
9096
|
_x,
|
|
9093
9097
|
_x1,
|
|
@@ -9098,16 +9102,20 @@ function getPoint(datum) {
|
|
|
9098
9102
|
_y0,
|
|
9099
9103
|
_voronoiY
|
|
9100
9104
|
} = datum;
|
|
9101
|
-
const defaultX =
|
|
9102
|
-
const defaultY =
|
|
9105
|
+
const defaultX = _x1 ?? _x;
|
|
9106
|
+
const defaultY = _y1 ?? _y;
|
|
9103
9107
|
const point = {
|
|
9104
|
-
x:
|
|
9105
|
-
x0:
|
|
9106
|
-
y:
|
|
9107
|
-
y0:
|
|
9108
|
+
x: _voronoiX ?? defaultX,
|
|
9109
|
+
x0: _x0 ?? _x,
|
|
9110
|
+
y: _voronoiY ?? defaultY,
|
|
9111
|
+
y0: _y0 ?? _y
|
|
9108
9112
|
};
|
|
9109
|
-
return
|
|
9113
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
9110
9114
|
}
|
|
9115
|
+
|
|
9116
|
+
/**
|
|
9117
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
9118
|
+
*/
|
|
9111
9119
|
function scalePoint(props, datum) {
|
|
9112
9120
|
const {
|
|
9113
9121
|
scale,
|
|
@@ -9130,11 +9138,11 @@ function scalePoint(props, datum) {
|
|
|
9130
9138
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
9131
9139
|
};
|
|
9132
9140
|
}
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9141
|
+
|
|
9142
|
+
/**
|
|
9143
|
+
* Returns a padding value from a number or partial padding values
|
|
9144
|
+
*/
|
|
9145
|
+
function getPadding(padding) {
|
|
9138
9146
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
9139
9147
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
9140
9148
|
return {
|
|
@@ -9144,6 +9152,10 @@ function getPadding(props, name) {
|
|
|
9144
9152
|
right: paddingObj.right || paddingVal
|
|
9145
9153
|
};
|
|
9146
9154
|
}
|
|
9155
|
+
|
|
9156
|
+
/**
|
|
9157
|
+
* Returns true if the component is defined as a tooltip
|
|
9158
|
+
*/
|
|
9147
9159
|
function isTooltip(component) {
|
|
9148
9160
|
const labelRole = component && component.type && component.type.role;
|
|
9149
9161
|
return labelRole === "tooltip";
|
|
@@ -9158,8 +9170,8 @@ function getDefaultStyles(props, role) {
|
|
|
9158
9170
|
return defaultStyles;
|
|
9159
9171
|
}
|
|
9160
9172
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
9161
|
-
const labelStyle =
|
|
9162
|
-
return
|
|
9173
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
9174
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
9163
9175
|
labels: labelStyle
|
|
9164
9176
|
}, defaultStyles);
|
|
9165
9177
|
}
|
|
@@ -9167,7 +9179,7 @@ function getStyles(style, defaultStyles) {
|
|
|
9167
9179
|
const width = "100%";
|
|
9168
9180
|
const height = "100%";
|
|
9169
9181
|
if (!style) {
|
|
9170
|
-
return
|
|
9182
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
9171
9183
|
parent: {
|
|
9172
9184
|
height,
|
|
9173
9185
|
width
|
|
@@ -9183,14 +9195,18 @@ function getStyles(style, defaultStyles) {
|
|
|
9183
9195
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
9184
9196
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
9185
9197
|
return {
|
|
9186
|
-
parent:
|
|
9198
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
9187
9199
|
width,
|
|
9188
9200
|
height
|
|
9189
9201
|
}),
|
|
9190
|
-
labels:
|
|
9191
|
-
data:
|
|
9202
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
9203
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
9192
9204
|
};
|
|
9193
9205
|
}
|
|
9206
|
+
|
|
9207
|
+
/**
|
|
9208
|
+
* Returns the value of a prop or accessor function with the given props
|
|
9209
|
+
*/
|
|
9194
9210
|
function evaluateProp(prop, props) {
|
|
9195
9211
|
return isFunction(prop) ? prop(props) : prop;
|
|
9196
9212
|
}
|
|
@@ -9212,19 +9228,28 @@ function degreesToRadians(degrees) {
|
|
|
9212
9228
|
function radiansToDegrees(radians) {
|
|
9213
9229
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
9214
9230
|
}
|
|
9215
|
-
|
|
9231
|
+
|
|
9232
|
+
/**
|
|
9233
|
+
* Get the maximum radius that will fit in the container
|
|
9234
|
+
*/
|
|
9235
|
+
function getRadius(options) {
|
|
9236
|
+
const {
|
|
9237
|
+
width,
|
|
9238
|
+
height,
|
|
9239
|
+
padding
|
|
9240
|
+
} = options;
|
|
9216
9241
|
const {
|
|
9217
9242
|
left,
|
|
9218
9243
|
right,
|
|
9219
9244
|
top,
|
|
9220
9245
|
bottom
|
|
9221
|
-
} =
|
|
9222
|
-
const {
|
|
9223
|
-
width,
|
|
9224
|
-
height
|
|
9225
|
-
} = props;
|
|
9246
|
+
} = padding;
|
|
9226
9247
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
9227
9248
|
}
|
|
9249
|
+
|
|
9250
|
+
/**
|
|
9251
|
+
* Returns the origin for a polar chart within the padded area
|
|
9252
|
+
*/
|
|
9228
9253
|
function getPolarOrigin(props) {
|
|
9229
9254
|
const {
|
|
9230
9255
|
width,
|
|
@@ -9235,7 +9260,7 @@ function getPolarOrigin(props) {
|
|
|
9235
9260
|
bottom,
|
|
9236
9261
|
left,
|
|
9237
9262
|
right
|
|
9238
|
-
} = getPadding(props);
|
|
9263
|
+
} = getPadding(props.padding);
|
|
9239
9264
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
9240
9265
|
const offsetWidth = width / 2 + left - right;
|
|
9241
9266
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -9244,13 +9269,30 @@ function getPolarOrigin(props) {
|
|
|
9244
9269
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
9245
9270
|
};
|
|
9246
9271
|
}
|
|
9272
|
+
|
|
9273
|
+
/**
|
|
9274
|
+
* Determine the range of an axis based on the given props
|
|
9275
|
+
*/
|
|
9247
9276
|
function getRange(props, axis) {
|
|
9248
9277
|
if (props.range && props.range[axis]) {
|
|
9249
9278
|
return props.range[axis];
|
|
9250
9279
|
} else if (props.range && Array.isArray(props.range)) {
|
|
9251
9280
|
return props.range;
|
|
9252
9281
|
}
|
|
9253
|
-
return props.polar ? getPolarRange(
|
|
9282
|
+
return props.polar ? getPolarRange({
|
|
9283
|
+
axis,
|
|
9284
|
+
innerRadius: props.innerRadius,
|
|
9285
|
+
startAngle: props.startAngle,
|
|
9286
|
+
endAngle: props.endAngle,
|
|
9287
|
+
height: props.height,
|
|
9288
|
+
width: props.width,
|
|
9289
|
+
padding: getPadding(props.padding)
|
|
9290
|
+
}) : getCartesianRange({
|
|
9291
|
+
axis,
|
|
9292
|
+
height: props.height,
|
|
9293
|
+
width: props.width,
|
|
9294
|
+
padding: getPadding(props.padding)
|
|
9295
|
+
});
|
|
9254
9296
|
}
|
|
9255
9297
|
|
|
9256
9298
|
/**
|
|
@@ -9282,7 +9324,7 @@ function createAccessor(key) {
|
|
|
9282
9324
|
return x => x;
|
|
9283
9325
|
}
|
|
9284
9326
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
9285
|
-
return
|
|
9327
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
9286
9328
|
}
|
|
9287
9329
|
function modifyProps(props, fallbackProps, role) {
|
|
9288
9330
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -9291,7 +9333,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
9291
9333
|
const defaultObject = horizontal === undefined ? {} : {
|
|
9292
9334
|
horizontal
|
|
9293
9335
|
};
|
|
9294
|
-
return
|
|
9336
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
9295
9337
|
}
|
|
9296
9338
|
|
|
9297
9339
|
/**
|
|
@@ -9378,10 +9420,10 @@ initialMemo, combine) {
|
|
|
9378
9420
|
const childRole = child.type && child.type.role;
|
|
9379
9421
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
9380
9422
|
if (child.props && child.props.children) {
|
|
9381
|
-
const childProps = Object.assign({}, child.props,
|
|
9382
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
9383
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
9384
|
-
return /*#__PURE__*/
|
|
9423
|
+
const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
|
|
9424
|
+
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 => {
|
|
9425
|
+
const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
|
|
9426
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
|
|
9385
9427
|
});
|
|
9386
9428
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
9387
9429
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -9395,7 +9437,7 @@ initialMemo, combine) {
|
|
|
9395
9437
|
return newMemo;
|
|
9396
9438
|
}, initialMemo);
|
|
9397
9439
|
};
|
|
9398
|
-
const validChildren = children.filter(
|
|
9440
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
9399
9441
|
const childNames = validChildren.map((c, i) => i);
|
|
9400
9442
|
return traverseChildren(validChildren, childNames);
|
|
9401
9443
|
}
|
|
@@ -9415,10 +9457,10 @@ function isHorizontal(props) {
|
|
|
9415
9457
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
9416
9458
|
return memo || childProps.horizontal;
|
|
9417
9459
|
}
|
|
9418
|
-
return traverseChildren(
|
|
9460
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
9419
9461
|
}, false);
|
|
9420
9462
|
};
|
|
9421
|
-
return traverseChildren(
|
|
9463
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
9422
9464
|
}
|
|
9423
9465
|
|
|
9424
9466
|
/***/ }),
|
|
@@ -9491,9 +9533,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9491
9533
|
/* harmony export */ "getProps": function() { return /* binding */ getProps; },
|
|
9492
9534
|
/* harmony export */ "getText": function() { return /* binding */ getText; }
|
|
9493
9535
|
/* harmony export */ });
|
|
9536
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
9494
9537
|
/* 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");
|
|
9495
9538
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
9496
|
-
|
|
9539
|
+
|
|
9497
9540
|
|
|
9498
9541
|
|
|
9499
9542
|
// Private Functions
|
|
@@ -9739,11 +9782,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9739
9782
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9740
9783
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
9741
9784
|
/* harmony export */ });
|
|
9742
|
-
/* global console */
|
|
9785
|
+
/* global console process */
|
|
9743
9786
|
/* eslint-disable no-console */
|
|
9744
9787
|
|
|
9745
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
9746
9788
|
function warn(message) {
|
|
9789
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9790
|
+
// @ts-ignore - Webpack DefinePlugin will replace process.env.NODE_ENV
|
|
9747
9791
|
if (true) {
|
|
9748
9792
|
if (console && console.warn) {
|
|
9749
9793
|
console.warn(message);
|
|
@@ -10036,13 +10080,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10036
10080
|
/* harmony export */ "approximateTextSize": function() { return /* binding */ approximateTextSize; },
|
|
10037
10081
|
/* harmony export */ "convertLengthToPixels": function() { return /* binding */ convertLengthToPixels; }
|
|
10038
10082
|
/* harmony export */ });
|
|
10039
|
-
/* harmony import */ var
|
|
10040
|
-
/* harmony import */ var
|
|
10041
|
-
/* harmony import */ var
|
|
10042
|
-
/* harmony import */ var
|
|
10043
|
-
|
|
10044
|
-
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
10083
|
+
/* 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");
|
|
10084
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
10085
|
+
/* 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");
|
|
10086
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_memoize__WEBPACK_IMPORTED_MODULE_1__);
|
|
10087
|
+
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
10045
10088
|
/* eslint-disable no-magic-numbers */
|
|
10089
|
+
|
|
10090
|
+
|
|
10091
|
+
|
|
10046
10092
|
// Based on measuring specific character widths
|
|
10047
10093
|
// as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
|
|
10048
10094
|
// For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
|
|
@@ -10221,7 +10267,7 @@ const convertLengthToPixels = (length, fontSize) => {
|
|
|
10221
10267
|
};
|
|
10222
10268
|
const _prepareParams = (inputStyle, index) => {
|
|
10223
10269
|
const lineStyle = Array.isArray(inputStyle) ? inputStyle[index] : inputStyle;
|
|
10224
|
-
const style =
|
|
10270
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, lineStyle, defaultStyle);
|
|
10225
10271
|
return Object.assign({}, style, {
|
|
10226
10272
|
fontFamily: style.fontFamily,
|
|
10227
10273
|
letterSpacing: typeof style.letterSpacing === "number" ? style.letterSpacing : convertLengthToPixels(String(style.letterSpacing), style.fontSize),
|
|
@@ -10269,7 +10315,7 @@ const _approximateDimensionsInternal = (text, style) => {
|
|
|
10269
10315
|
height: heightWithRotate * coefficients.heightOverlapCoef
|
|
10270
10316
|
};
|
|
10271
10317
|
};
|
|
10272
|
-
const _getMeasurementContainer =
|
|
10318
|
+
const _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
10273
10319
|
const element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
10274
10320
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
10275
10321
|
element.setAttribute("width", "300");
|
|
@@ -10290,7 +10336,7 @@ const styleToKeyComponent = style => {
|
|
|
10290
10336
|
}
|
|
10291
10337
|
return `${style.angle}:${style.fontFamily}:${style.fontSize}:${style.letterSpacing}:${style.lineHeight}`;
|
|
10292
10338
|
};
|
|
10293
|
-
const _measureDimensionsInternal =
|
|
10339
|
+
const _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()((text, style) => {
|
|
10294
10340
|
let containerElement = _getMeasurementContainer();
|
|
10295
10341
|
if (!containerElement.isConnected) {
|
|
10296
10342
|
_getMeasurementContainer.cache.clear?.();
|
|
@@ -10460,12 +10506,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10460
10506
|
/* harmony export */ "getInitialTransitionState": function() { return /* binding */ getInitialTransitionState; },
|
|
10461
10507
|
/* harmony export */ "getTransitionPropsFactory": function() { return /* binding */ getTransitionPropsFactory; }
|
|
10462
10508
|
/* harmony export */ });
|
|
10463
|
-
/* harmony import */ var
|
|
10464
|
-
/* harmony import */ var
|
|
10509
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
10510
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10465
10511
|
/* 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");
|
|
10466
10512
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
10467
|
-
/* harmony import */ var
|
|
10468
|
-
/* harmony import */ var
|
|
10513
|
+
/* 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");
|
|
10514
|
+
/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_2__);
|
|
10469
10515
|
|
|
10470
10516
|
|
|
10471
10517
|
|
|
@@ -10556,13 +10602,13 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
10556
10602
|
const getTransitionsFromChildren = (old, next) => {
|
|
10557
10603
|
return old.map((child, idx) => {
|
|
10558
10604
|
if (child && child.props && child.props.children && next[idx]) {
|
|
10559
|
-
return getTransitionsFromChildren(
|
|
10605
|
+
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));
|
|
10560
10606
|
}
|
|
10561
10607
|
// get Transition entering and exiting nodes
|
|
10562
10608
|
return getTransition(child, next[idx]);
|
|
10563
10609
|
});
|
|
10564
10610
|
};
|
|
10565
|
-
const childrenTransitions = getTransitionsFromChildren(
|
|
10611
|
+
const childrenTransitions = getTransitionsFromChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(oldChildren), react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextChildren));
|
|
10566
10612
|
return {
|
|
10567
10613
|
nodesWillExit,
|
|
10568
10614
|
nodesWillEnter,
|
|
@@ -10576,7 +10622,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
10576
10622
|
};
|
|
10577
10623
|
}
|
|
10578
10624
|
function getInitialChildProps(animate, data) {
|
|
10579
|
-
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (
|
|
10625
|
+
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10580
10626
|
return {
|
|
10581
10627
|
data: data.map((datum, idx) => Object.assign({}, datum, after(datum, idx, data)))
|
|
10582
10628
|
};
|
|
@@ -10593,7 +10639,7 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
10593
10639
|
data
|
|
10594
10640
|
};
|
|
10595
10641
|
}
|
|
10596
|
-
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (
|
|
10642
|
+
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10597
10643
|
// If nodes need to exit, transform them with the provided onLoad.before function.
|
|
10598
10644
|
const newData = data.map((datum, idx) => {
|
|
10599
10645
|
return Object.assign({}, datum, before(datum, idx, data));
|
|
@@ -10615,7 +10661,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
10615
10661
|
data
|
|
10616
10662
|
};
|
|
10617
10663
|
}
|
|
10618
|
-
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (
|
|
10664
|
+
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10619
10665
|
// If nodes need to exit, transform them with the provided onLoad.after function.
|
|
10620
10666
|
newData = data.map((datum, idx) => {
|
|
10621
10667
|
return Object.assign({}, datum, after(datum, idx, data));
|
|
@@ -10637,7 +10683,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
10637
10683
|
// After the exit transition occurs, trigger the animations for
|
|
10638
10684
|
// nodes that are neither exiting nor entering.
|
|
10639
10685
|
animate.onEnd = cb;
|
|
10640
|
-
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (
|
|
10686
|
+
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10641
10687
|
// If nodes need to exit, transform them with the provided onExit.before function.
|
|
10642
10688
|
newData = data.map((datum, idx) => {
|
|
10643
10689
|
const key = (datum.key || idx).toString();
|
|
@@ -10660,7 +10706,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
10660
10706
|
newAnimate = Object.assign({}, animate, {
|
|
10661
10707
|
onEnd: cb
|
|
10662
10708
|
});
|
|
10663
|
-
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (
|
|
10709
|
+
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10664
10710
|
// We want the entering nodes to be included in the transition target
|
|
10665
10711
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
10666
10712
|
// so perform the `onEnter.before` transformation on each node.
|
|
@@ -10687,7 +10733,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
10687
10733
|
// domain should encompass the nodes that will now enter. So perform
|
|
10688
10734
|
// the `onEnter.after` transformation on each node.
|
|
10689
10735
|
newAnimate.onEnd = cb;
|
|
10690
|
-
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (
|
|
10736
|
+
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
10691
10737
|
newData = data.map((datum, idx) => {
|
|
10692
10738
|
const key = getDatumKey(datum, idx);
|
|
10693
10739
|
return enteringNodes[key] ? Object.assign({}, datum, after(datum, idx, data)) : datum;
|