victory-voronoi 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 +6 -0
- package/dist/victory-voronoi.js +298 -252
- package/dist/victory-voronoi.min.js +1 -1
- package/es/victory-voronoi.d.ts +7 -7
- package/es/voronoi.d.ts +1 -1
- package/es/voronoi.js +2 -2
- package/lib/victory-voronoi.d.ts +7 -7
- package/lib/voronoi.d.ts +1 -1
- package/lib/voronoi.js +2 -2
- package/package.json +2 -30
- package/src/voronoi.tsx +1 -1
package/dist/victory-voronoi.js
CHANGED
|
@@ -252,10 +252,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
252
252
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
253
253
|
/* harmony export */ "Voronoi": function() { return /* binding */ Voronoi; }
|
|
254
254
|
/* harmony export */ });
|
|
255
|
-
/* harmony import */ var
|
|
256
|
-
/* harmony import */ var
|
|
257
|
-
/* harmony import */ var
|
|
258
|
-
/* harmony import */ var
|
|
255
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
256
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
257
|
+
/* 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");
|
|
258
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
259
259
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
260
260
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
261
261
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/circle.js");
|
|
@@ -293,15 +293,15 @@ function evaluateProps(props) {
|
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
const defaultProps = {
|
|
296
|
-
pathComponent: /*#__PURE__*/
|
|
297
|
-
circleComponent: /*#__PURE__*/
|
|
298
|
-
clipPathComponent: /*#__PURE__*/
|
|
299
|
-
groupComponent: /*#__PURE__*/
|
|
296
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
297
|
+
circleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Circle, null),
|
|
298
|
+
clipPathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.ClipPath, null),
|
|
299
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
300
300
|
role: "presentation",
|
|
301
301
|
shapeRendering: "auto"
|
|
302
302
|
};
|
|
303
303
|
const Voronoi = initialProps => {
|
|
304
|
-
const props = evaluateProps(
|
|
304
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
305
305
|
const {
|
|
306
306
|
ariaLabel,
|
|
307
307
|
role,
|
|
@@ -326,7 +326,7 @@ const Voronoi = initialProps => {
|
|
|
326
326
|
};
|
|
327
327
|
const userProps = victory_core__WEBPACK_IMPORTED_MODULE_6__.getSafeUserProps(props);
|
|
328
328
|
if (size) {
|
|
329
|
-
const circle = /*#__PURE__*/
|
|
329
|
+
const circle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.circleComponent, {
|
|
330
330
|
...sharedProps,
|
|
331
331
|
key: `${props.id}-circle-clip`,
|
|
332
332
|
clipPath: `url(#${props.clipId})`,
|
|
@@ -334,16 +334,16 @@ const Voronoi = initialProps => {
|
|
|
334
334
|
cy: props.y,
|
|
335
335
|
r: size
|
|
336
336
|
});
|
|
337
|
-
const voronoiClipPath = /*#__PURE__*/
|
|
337
|
+
const voronoiClipPath = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.clipPathComponent, {
|
|
338
338
|
key: `${props.id}-voronoi-clip`,
|
|
339
339
|
clipId: props.clipId
|
|
340
|
-
}, /*#__PURE__*/
|
|
340
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
341
341
|
d: voronoiPath,
|
|
342
342
|
className
|
|
343
343
|
}));
|
|
344
|
-
return /*#__PURE__*/
|
|
344
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.groupComponent, {}, [voronoiClipPath, circle]);
|
|
345
345
|
}
|
|
346
|
-
return /*#__PURE__*/
|
|
346
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
347
347
|
...sharedProps,
|
|
348
348
|
...userProps,
|
|
349
349
|
d: voronoiPath
|
|
@@ -6010,10 +6010,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6010
6010
|
/* harmony export */ "isInterpolatable": function() { return /* binding */ isInterpolatable; },
|
|
6011
6011
|
/* harmony export */ "victoryInterpolator": function() { return /* binding */ victoryInterpolator; }
|
|
6012
6012
|
/* harmony export */ });
|
|
6013
|
-
/* harmony import */ var
|
|
6014
|
-
/* harmony import */ var
|
|
6015
|
-
/* harmony import */ var
|
|
6016
|
-
/* harmony import */ var
|
|
6013
|
+
/* 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");
|
|
6014
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
6015
|
+
/* 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");
|
|
6016
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
6017
6017
|
/* harmony import */ var victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-interpolate */ "../../victory-vendor/es/d3-interpolate.js");
|
|
6018
6018
|
|
|
6019
6019
|
|
|
@@ -6039,7 +6039,7 @@ const isInterpolatable = function (obj) {
|
|
|
6039
6039
|
return false;
|
|
6040
6040
|
case "object":
|
|
6041
6041
|
// Don't try to interpolate class instances (except Date or Array).
|
|
6042
|
-
return obj instanceof Date || Array.isArray(obj) ||
|
|
6042
|
+
return obj instanceof Date || Array.isArray(obj) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(obj);
|
|
6043
6043
|
case "function":
|
|
6044
6044
|
// Careful! There may be extra properties on function objects that the
|
|
6045
6045
|
// component expects to access - for instance, it may be a `d3.scale()`
|
|
@@ -6125,7 +6125,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
6125
6125
|
if (typeof x === "function" || typeof y === "function") {
|
|
6126
6126
|
return interpolateFunction(x, y);
|
|
6127
6127
|
}
|
|
6128
|
-
if (typeof x === "object" &&
|
|
6128
|
+
if (typeof x === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(x) || typeof y === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(y)) {
|
|
6129
6129
|
return interpolateObject(x, y);
|
|
6130
6130
|
}
|
|
6131
6131
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(x, y);
|
|
@@ -6134,7 +6134,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
6134
6134
|
// When the value is an array, attempt to sort by "key" so that animating nodes may be identified
|
|
6135
6135
|
// based on "key" instead of index
|
|
6136
6136
|
const keyData = val => {
|
|
6137
|
-
return Array.isArray(val) ?
|
|
6137
|
+
return Array.isArray(val) ? lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default()(val, "key") : val;
|
|
6138
6138
|
};
|
|
6139
6139
|
const i = {};
|
|
6140
6140
|
const c = {};
|
|
@@ -6201,7 +6201,7 @@ const victoryInterpolator = function (a, b) {
|
|
|
6201
6201
|
if (typeof a === "function" || typeof b === "function") {
|
|
6202
6202
|
return interpolateFunction(a, b);
|
|
6203
6203
|
}
|
|
6204
|
-
if (
|
|
6204
|
+
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(b)) {
|
|
6205
6205
|
// @ts-expect-error These generics are tough, but they work :)
|
|
6206
6206
|
return interpolateObject(a, b);
|
|
6207
6207
|
}
|
|
@@ -6377,16 +6377,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6377
6377
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
6378
6378
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
6379
6379
|
/* harmony export */ });
|
|
6380
|
-
/* harmony import */ var
|
|
6381
|
-
/* harmony import */ var
|
|
6382
|
-
/* harmony import */ var
|
|
6383
|
-
/* harmony import */ var
|
|
6380
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6381
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6382
|
+
/* 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");
|
|
6383
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
6384
6384
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
6385
6385
|
/* 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");
|
|
6386
6386
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
6387
6387
|
/* 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");
|
|
6388
6388
|
/* 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");
|
|
6389
|
-
|
|
6390
6389
|
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); }
|
|
6391
6390
|
|
|
6392
6391
|
|
|
@@ -6394,9 +6393,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
6394
6393
|
|
|
6395
6394
|
|
|
6396
6395
|
|
|
6396
|
+
|
|
6397
6397
|
const defaultProps = {
|
|
6398
6398
|
className: "VictoryContainer",
|
|
6399
|
-
portalComponent: /*#__PURE__*/
|
|
6399
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
6400
6400
|
portalZIndex: 99,
|
|
6401
6401
|
responsive: true,
|
|
6402
6402
|
role: "img"
|
|
@@ -6413,10 +6413,10 @@ function useVictoryContainer(initialProps) {
|
|
|
6413
6413
|
height,
|
|
6414
6414
|
responsive
|
|
6415
6415
|
} = props;
|
|
6416
|
-
const localContainerRef = (0,
|
|
6416
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
6417
6417
|
|
|
6418
6418
|
// Generated ID stored in ref because it needs to persist across renders
|
|
6419
|
-
const generatedId = (0,
|
|
6419
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
6420
6420
|
const containerId = props.containerId ?? generatedId.current;
|
|
6421
6421
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
6422
6422
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -6475,7 +6475,7 @@ const VictoryContainer = initialProps => {
|
|
|
6475
6475
|
containerRef,
|
|
6476
6476
|
localContainerRef
|
|
6477
6477
|
} = useVictoryContainer(initialProps);
|
|
6478
|
-
|
|
6478
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
6479
6479
|
if (!events?.onWheel) return;
|
|
6480
6480
|
const handleWheel = e => e.preventDefault();
|
|
6481
6481
|
const container = localContainerRef?.current;
|
|
@@ -6485,7 +6485,7 @@ const VictoryContainer = initialProps => {
|
|
|
6485
6485
|
};
|
|
6486
6486
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6487
6487
|
}, []);
|
|
6488
|
-
return /*#__PURE__*/
|
|
6488
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
6489
6489
|
className: className,
|
|
6490
6490
|
style: {
|
|
6491
6491
|
...style,
|
|
@@ -6499,7 +6499,7 @@ const VictoryContainer = initialProps => {
|
|
|
6499
6499
|
"data-ouia-component-type": ouiaType,
|
|
6500
6500
|
"data-ouia-safe": ouiaSafe,
|
|
6501
6501
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
6502
|
-
}, /*#__PURE__*/
|
|
6502
|
+
}, /*#__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({
|
|
6503
6503
|
width: width,
|
|
6504
6504
|
height: height,
|
|
6505
6505
|
tabIndex: tabIndex,
|
|
@@ -6512,11 +6512,11 @@ const VictoryContainer = initialProps => {
|
|
|
6512
6512
|
...dimensions,
|
|
6513
6513
|
pointerEvents: "all"
|
|
6514
6514
|
}
|
|
6515
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
6515
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
6516
6516
|
id: titleId
|
|
6517
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
6517
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
6518
6518
|
id: descId
|
|
6519
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
6519
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
6520
6520
|
style: {
|
|
6521
6521
|
...dimensions,
|
|
6522
6522
|
zIndex: portalZIndex,
|
|
@@ -6524,7 +6524,7 @@ const VictoryContainer = initialProps => {
|
|
|
6524
6524
|
top: 0,
|
|
6525
6525
|
left: 0
|
|
6526
6526
|
}
|
|
6527
|
-
}, /*#__PURE__*/
|
|
6527
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
6528
6528
|
as: portalComponent,
|
|
6529
6529
|
width: width,
|
|
6530
6530
|
height: height,
|
|
@@ -6551,12 +6551,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6551
6551
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6552
6552
|
/* harmony export */ "VictoryLabel": function() { return /* binding */ VictoryLabel; }
|
|
6553
6553
|
/* harmony export */ });
|
|
6554
|
-
/* harmony import */ var
|
|
6555
|
-
/* harmony import */ var
|
|
6554
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6555
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6556
6556
|
/* 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");
|
|
6557
6557
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6558
|
-
/* harmony import */ var
|
|
6559
|
-
/* harmony import */ var
|
|
6558
|
+
/* 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");
|
|
6559
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
6560
6560
|
/* 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");
|
|
6561
6561
|
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-primitives/rect */ "../../victory-core/es/victory-primitives/rect.js");
|
|
6562
6562
|
/* harmony import */ var _victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../victory-primitives/text */ "../../victory-core/es/victory-primitives/text.js");
|
|
@@ -6567,9 +6567,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6567
6567
|
/* harmony import */ var _victory_util_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/style */ "../../victory-core/es/victory-util/style.js");
|
|
6568
6568
|
/* harmony import */ var _victory_util_textsize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../victory-util/textsize */ "../../victory-core/es/victory-util/textsize.js");
|
|
6569
6569
|
/* 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");
|
|
6570
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
6570
6571
|
|
|
6571
6572
|
|
|
6572
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
6573
6573
|
|
|
6574
6574
|
|
|
6575
6575
|
|
|
@@ -6621,7 +6621,7 @@ const shouldUseMultilineBackgrounds = props => {
|
|
|
6621
6621
|
backgroundStyle,
|
|
6622
6622
|
backgroundPadding
|
|
6623
6623
|
} = props;
|
|
6624
|
-
return Array.isArray(backgroundStyle) && !
|
|
6624
|
+
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundPadding);
|
|
6625
6625
|
};
|
|
6626
6626
|
const getStyles = (style, props) => {
|
|
6627
6627
|
if (props.disableInlineStyles) {
|
|
@@ -6637,32 +6637,28 @@ const getStyles = (style, props) => {
|
|
|
6637
6637
|
fontSize: getFontSize(baseStyles)
|
|
6638
6638
|
});
|
|
6639
6639
|
};
|
|
6640
|
-
return Array.isArray(style) && !
|
|
6640
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => getSingleStyle(s)) : getSingleStyle(style);
|
|
6641
6641
|
};
|
|
6642
6642
|
const getBackgroundStyles = (style, props) => {
|
|
6643
6643
|
if (!style) {
|
|
6644
6644
|
return undefined;
|
|
6645
6645
|
}
|
|
6646
|
-
return Array.isArray(style) && !
|
|
6646
|
+
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);
|
|
6647
6647
|
};
|
|
6648
6648
|
const getBackgroundPadding = props => {
|
|
6649
6649
|
if (props.backgroundPadding && Array.isArray(props.backgroundPadding)) {
|
|
6650
6650
|
return props.backgroundPadding.map(backgroundPadding => {
|
|
6651
6651
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(backgroundPadding, props);
|
|
6652
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
6653
|
-
padding
|
|
6654
|
-
});
|
|
6652
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
6655
6653
|
});
|
|
6656
6654
|
}
|
|
6657
6655
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.backgroundPadding, props);
|
|
6658
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
6659
|
-
padding
|
|
6660
|
-
});
|
|
6656
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
6661
6657
|
};
|
|
6662
6658
|
const getLineHeight = props => {
|
|
6663
6659
|
const lineHeight = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.lineHeight, props);
|
|
6664
6660
|
if (Array.isArray(lineHeight)) {
|
|
6665
|
-
return
|
|
6661
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(lineHeight) ? [1] : lineHeight;
|
|
6666
6662
|
}
|
|
6667
6663
|
return lineHeight;
|
|
6668
6664
|
};
|
|
@@ -6782,7 +6778,7 @@ const getFullBackground = (calculatedProps, tspanValues) => {
|
|
|
6782
6778
|
x: inline ? xCoordinate - backgroundPadding.left : xCoordinate + dx - backgroundPadding.left,
|
|
6783
6779
|
y: yCoordinate
|
|
6784
6780
|
};
|
|
6785
|
-
return /*#__PURE__*/
|
|
6781
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
6786
6782
|
};
|
|
6787
6783
|
const getInlineXOffset = (calculatedProps, textElements, index) => {
|
|
6788
6784
|
const {
|
|
@@ -6852,7 +6848,7 @@ const getChildBackgrounds = (calculatedProps, tspanValues) => {
|
|
|
6852
6848
|
x: xCoord - padding.left,
|
|
6853
6849
|
y: yCoord
|
|
6854
6850
|
};
|
|
6855
|
-
return /*#__PURE__*/
|
|
6851
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
6856
6852
|
});
|
|
6857
6853
|
};
|
|
6858
6854
|
const getBackgroundElement = (calculatedProps, tspanValues) => {
|
|
@@ -6983,16 +6979,16 @@ const renderLabel = (calculatedProps, tspanValues) => {
|
|
|
6983
6979
|
style: currentStyle,
|
|
6984
6980
|
children: line
|
|
6985
6981
|
};
|
|
6986
|
-
return /*#__PURE__*/
|
|
6982
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(tspanComponent, tspanProps);
|
|
6987
6983
|
});
|
|
6988
|
-
return /*#__PURE__*/
|
|
6984
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(textComponent, textProps, tspans);
|
|
6989
6985
|
};
|
|
6990
6986
|
const defaultProps = {
|
|
6991
|
-
backgroundComponent: /*#__PURE__*/
|
|
6992
|
-
groupComponent: /*#__PURE__*/
|
|
6987
|
+
backgroundComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__.Rect, null),
|
|
6988
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
6993
6989
|
direction: "inherit",
|
|
6994
|
-
textComponent: /*#__PURE__*/
|
|
6995
|
-
tspanComponent: /*#__PURE__*/
|
|
6990
|
+
textComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__.Text, null),
|
|
6991
|
+
tspanComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_tspan__WEBPACK_IMPORTED_MODULE_10__.TSpan, null),
|
|
6996
6992
|
capHeight: 0.71,
|
|
6997
6993
|
// Magic number from d3.
|
|
6998
6994
|
lineHeight: 1
|
|
@@ -7029,10 +7025,10 @@ const VictoryLabel = initialProps => {
|
|
|
7029
7025
|
if (props.backgroundStyle) {
|
|
7030
7026
|
const backgroundElement = getBackgroundElement(calculatedProps, tspanValues);
|
|
7031
7027
|
const children = [backgroundElement, label];
|
|
7032
|
-
const backgroundWithLabel = /*#__PURE__*/
|
|
7033
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
7028
|
+
const backgroundWithLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.groupComponent, {}, children);
|
|
7029
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, backgroundWithLabel) : backgroundWithLabel;
|
|
7034
7030
|
}
|
|
7035
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
7031
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, label) : label;
|
|
7036
7032
|
};
|
|
7037
7033
|
VictoryLabel.displayName = "VictoryLabel";
|
|
7038
7034
|
VictoryLabel.role = "label";
|
|
@@ -7158,12 +7154,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7158
7154
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7159
7155
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
7160
7156
|
/* harmony export */ });
|
|
7161
|
-
/* harmony import */ var
|
|
7162
|
-
/* harmony import */ var
|
|
7157
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7158
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7163
7159
|
/* 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");
|
|
7164
7160
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7165
|
-
/* harmony import */ var
|
|
7166
|
-
/* harmony import */ var
|
|
7161
|
+
/* 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");
|
|
7162
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
7167
7163
|
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "../../victory-core/es/victory-util/log.js");
|
|
7168
7164
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7169
7165
|
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
@@ -7174,14 +7170,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7174
7170
|
|
|
7175
7171
|
|
|
7176
7172
|
const defaultProps = {
|
|
7177
|
-
groupComponent: /*#__PURE__*/
|
|
7173
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
7178
7174
|
};
|
|
7179
7175
|
const VictoryPortal = initialProps => {
|
|
7180
7176
|
const props = {
|
|
7181
7177
|
...defaultProps,
|
|
7182
7178
|
...initialProps
|
|
7183
7179
|
};
|
|
7184
|
-
const [id] = (0,
|
|
7180
|
+
const [id] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()());
|
|
7185
7181
|
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
7186
7182
|
if (!portalContext) {
|
|
7187
7183
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
@@ -7199,12 +7195,12 @@ const VictoryPortal = initialProps => {
|
|
|
7199
7195
|
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
7200
7196
|
key: childProps.key ?? id
|
|
7201
7197
|
});
|
|
7202
|
-
const child = children && /*#__PURE__*/
|
|
7203
|
-
|
|
7198
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(children, newProps);
|
|
7199
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
7204
7200
|
portalContext?.addChild(id, child);
|
|
7205
7201
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7206
7202
|
}, [props.children]);
|
|
7207
|
-
|
|
7203
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
7208
7204
|
return () => portalContext?.removeChild(id);
|
|
7209
7205
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7210
7206
|
}, []);
|
|
@@ -8571,22 +8567,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8571
8567
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8572
8568
|
/* harmony export */ "VictoryTransition": function() { return /* binding */ VictoryTransition; }
|
|
8573
8569
|
/* harmony export */ });
|
|
8574
|
-
/* harmony import */ var
|
|
8575
|
-
/* harmony import */ var
|
|
8570
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8571
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8576
8572
|
/* 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");
|
|
8577
8573
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8578
|
-
/* harmony import */ var
|
|
8579
|
-
/* harmony import */ var
|
|
8574
|
+
/* 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");
|
|
8575
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_2__);
|
|
8576
|
+
/* 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");
|
|
8577
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
8580
8578
|
/* 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");
|
|
8581
8579
|
/* harmony import */ var _victory_util_collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8582
8580
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8583
8581
|
/* 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");
|
|
8584
8582
|
/* harmony import */ var _victory_util_transitions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/transitions */ "../../victory-core/es/victory-util/transitions.js");
|
|
8585
|
-
|
|
8586
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
8583
|
+
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); }
|
|
8587
8584
|
|
|
8588
8585
|
|
|
8589
|
-
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); }
|
|
8590
8586
|
|
|
8591
8587
|
|
|
8592
8588
|
|
|
@@ -8594,7 +8590,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
8594
8590
|
|
|
8595
8591
|
|
|
8596
8592
|
|
|
8597
|
-
class VictoryTransition extends (
|
|
8593
|
+
class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
8598
8594
|
static displayName = "VictoryTransition";
|
|
8599
8595
|
static contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
8600
8596
|
constructor(props, context) {
|
|
@@ -8637,8 +8633,8 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
8637
8633
|
nextProps
|
|
8638
8634
|
};
|
|
8639
8635
|
}
|
|
8640
|
-
const oldChildren =
|
|
8641
|
-
const nextChildren =
|
|
8636
|
+
const oldChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8637
|
+
const nextChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextProps.children);
|
|
8642
8638
|
const {
|
|
8643
8639
|
nodesWillExit,
|
|
8644
8640
|
nodesWillEnter,
|
|
@@ -8661,12 +8657,12 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
8661
8657
|
const childDomain = child.props && child.type.getDomain(child.props, axis);
|
|
8662
8658
|
return childDomain ? memo.concat(childDomain) : memo;
|
|
8663
8659
|
} else if (child.props && child.props.children) {
|
|
8664
|
-
return memo.concat(getChildDomains(
|
|
8660
|
+
return memo.concat(getChildDomains(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
8665
8661
|
}
|
|
8666
8662
|
return memo;
|
|
8667
8663
|
}, []);
|
|
8668
8664
|
};
|
|
8669
|
-
const child =
|
|
8665
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
8670
8666
|
const childProps = child.props || {};
|
|
8671
8667
|
const domain = Array.isArray(childProps.domain) ? childProps.domain : childProps.domain && childProps.domain[axis];
|
|
8672
8668
|
if (!childProps.children && domain) {
|
|
@@ -8699,7 +8695,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
8699
8695
|
render() {
|
|
8700
8696
|
const props = this.pickProps();
|
|
8701
8697
|
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));
|
|
8702
|
-
const child =
|
|
8698
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
8703
8699
|
const transitionProps = getTransitionProps(child);
|
|
8704
8700
|
this.transitionProps = transitionProps;
|
|
8705
8701
|
const domain = {
|
|
@@ -8713,21 +8709,21 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
8713
8709
|
}, transitionProps, child.props);
|
|
8714
8710
|
const animationWhitelist = props.animationWhitelist || [];
|
|
8715
8711
|
const whitelist = animationWhitelist.concat(["clipWidth"]);
|
|
8716
|
-
const propsToAnimate = whitelist.length ?
|
|
8717
|
-
return /*#__PURE__*/
|
|
8712
|
+
const propsToAnimate = whitelist.length ? lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(combinedProps, whitelist) : combinedProps;
|
|
8713
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_8__.VictoryAnimation, _extends({}, combinedProps.animate, {
|
|
8718
8714
|
data: propsToAnimate
|
|
8719
8715
|
}), newProps => {
|
|
8720
8716
|
if (child.props.groupComponent) {
|
|
8721
|
-
const groupComponent = this.continuous ? /*#__PURE__*/
|
|
8717
|
+
const groupComponent = this.continuous ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child.props.groupComponent, {
|
|
8722
8718
|
clipWidth: newProps.clipWidth || 0
|
|
8723
8719
|
}) : child.props.groupComponent;
|
|
8724
|
-
return /*#__PURE__*/
|
|
8720
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8725
8721
|
animate: null,
|
|
8726
8722
|
animating: true,
|
|
8727
8723
|
groupComponent
|
|
8728
8724
|
}, newProps, combinedProps));
|
|
8729
8725
|
}
|
|
8730
|
-
return /*#__PURE__*/
|
|
8726
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8731
8727
|
animate: null,
|
|
8732
8728
|
animating: true
|
|
8733
8729
|
}, newProps, combinedProps));
|
|
@@ -8748,14 +8744,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8748
8744
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8749
8745
|
/* harmony export */ "addEvents": function() { return /* binding */ addEvents; }
|
|
8750
8746
|
/* harmony export */ });
|
|
8751
|
-
/* harmony import */ var
|
|
8752
|
-
/* harmony import */ var
|
|
8753
|
-
/* harmony import */ var
|
|
8754
|
-
/* harmony import */ var
|
|
8755
|
-
/* harmony import */ var
|
|
8756
|
-
/* harmony import */ var
|
|
8757
|
-
/* harmony import */ var
|
|
8758
|
-
/* harmony import */ var
|
|
8747
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8748
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8749
|
+
/* 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");
|
|
8750
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8751
|
+
/* 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");
|
|
8752
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
8753
|
+
/* 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");
|
|
8754
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
8759
8755
|
/* 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");
|
|
8760
8756
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
8761
8757
|
/* 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");
|
|
@@ -8902,8 +8898,8 @@ function addEvents(WrappedComponent, options) {
|
|
|
8902
8898
|
return {};
|
|
8903
8899
|
}
|
|
8904
8900
|
const getState = (key, type) => {
|
|
8905
|
-
const result =
|
|
8906
|
-
return
|
|
8901
|
+
const result = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.getEventState(key, type), this.getSharedEventState(key, type));
|
|
8902
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
|
|
8907
8903
|
};
|
|
8908
8904
|
const components = options.components || defaultComponents;
|
|
8909
8905
|
const stateChanges = components.map(component => {
|
|
@@ -8916,7 +8912,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
8916
8912
|
return stateChanges;
|
|
8917
8913
|
}
|
|
8918
8914
|
applyExternalMutations(props, externalMutations) {
|
|
8919
|
-
if (!
|
|
8915
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
8920
8916
|
const callbacks = props.externalEventMutations.reduce((memo, mutation) => (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo, []);
|
|
8921
8917
|
const compiledCallbacks = callbacks.length ? () => {
|
|
8922
8918
|
callbacks.forEach(c => c());
|
|
@@ -8949,7 +8945,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
8949
8945
|
sharedEvents,
|
|
8950
8946
|
externalEventMutations
|
|
8951
8947
|
} = props;
|
|
8952
|
-
return
|
|
8948
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
8953
8949
|
}
|
|
8954
8950
|
cacheValues(obj) {
|
|
8955
8951
|
Object.keys(obj).forEach(key => {
|
|
@@ -8960,10 +8956,10 @@ function addEvents(WrappedComponent, options) {
|
|
|
8960
8956
|
const getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
|
|
8961
8957
|
const sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
8962
8958
|
const parentState = this.getEventState("parent", "parent");
|
|
8963
|
-
const baseParentProps =
|
|
8959
|
+
const baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentState, sharedParentState);
|
|
8964
8960
|
const parentPropsList = baseParentProps.parentControlledProps;
|
|
8965
|
-
const parentProps = parentPropsList ?
|
|
8966
|
-
const modifiedProps =
|
|
8961
|
+
const parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(baseParentProps, parentPropsList) : {};
|
|
8962
|
+
const modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentProps, props);
|
|
8967
8963
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
8968
8964
|
}
|
|
8969
8965
|
getAllEvents(props) {
|
|
@@ -8983,18 +8979,18 @@ function addEvents(WrappedComponent, options) {
|
|
|
8983
8979
|
const currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
|
|
8984
8980
|
if (this.hasEvents) {
|
|
8985
8981
|
const baseEvents = this.getEvents(this.props, type, key);
|
|
8986
|
-
const componentProps =
|
|
8982
|
+
const componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8987
8983
|
index,
|
|
8988
8984
|
key: id
|
|
8989
8985
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
8990
8986
|
id
|
|
8991
8987
|
});
|
|
8992
|
-
const events =
|
|
8988
|
+
const events = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
8993
8989
|
return Object.assign({}, componentProps, {
|
|
8994
8990
|
events
|
|
8995
8991
|
});
|
|
8996
8992
|
}
|
|
8997
|
-
return
|
|
8993
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8998
8994
|
index,
|
|
8999
8995
|
key: id
|
|
9000
8996
|
}, currentProps, baseProps, {
|
|
@@ -9008,15 +9004,15 @@ function addEvents(WrappedComponent, options) {
|
|
|
9008
9004
|
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
9009
9005
|
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
9010
9006
|
}
|
|
9011
|
-
return /*#__PURE__*/
|
|
9007
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(component, parentProps, children);
|
|
9012
9008
|
}
|
|
9013
9009
|
animateComponent(props, defaultAnimationWhitelist) {
|
|
9014
9010
|
const animationWhitelist = typeof props.animate === "object" && props.animate?.animationWhitelist || defaultAnimationWhitelist;
|
|
9015
9011
|
const Comp = this.constructor;
|
|
9016
|
-
return /*#__PURE__*/
|
|
9012
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
9017
9013
|
animate: props.animate,
|
|
9018
9014
|
animationWhitelist: animationWhitelist
|
|
9019
|
-
}, /*#__PURE__*/
|
|
9015
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, props));
|
|
9020
9016
|
}
|
|
9021
9017
|
|
|
9022
9018
|
// Used by `VictoryLine` and `VictoryArea`
|
|
@@ -9031,12 +9027,12 @@ function addEvents(WrappedComponent, options) {
|
|
|
9031
9027
|
let newMemo = memo;
|
|
9032
9028
|
const labelProps = this.getComponentProps(labelComponent, "labels", key);
|
|
9033
9029
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
9034
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
9030
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps));
|
|
9035
9031
|
}
|
|
9036
9032
|
return newMemo;
|
|
9037
9033
|
}, []);
|
|
9038
9034
|
const dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
9039
|
-
const children = [/*#__PURE__*/
|
|
9035
|
+
const children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps), ...labelComponents];
|
|
9040
9036
|
return this.renderContainer(groupComponent, children);
|
|
9041
9037
|
}
|
|
9042
9038
|
renderData(props, shouldRenderDatum) {
|
|
@@ -9051,14 +9047,14 @@ function addEvents(WrappedComponent, options) {
|
|
|
9051
9047
|
const dataComponents = this.dataKeys.reduce((validDataComponents, _dataKey, index) => {
|
|
9052
9048
|
const dataProps = this.getComponentProps(dataComponent, "data", index);
|
|
9053
9049
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
9054
|
-
validDataComponents.push( /*#__PURE__*/
|
|
9050
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps));
|
|
9055
9051
|
}
|
|
9056
9052
|
return validDataComponents;
|
|
9057
9053
|
}, []);
|
|
9058
9054
|
const labelComponents = this.dataKeys.map((_dataKey, index) => {
|
|
9059
9055
|
const labelProps = this.getComponentProps(labelComponent, "labels", index);
|
|
9060
9056
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
9061
|
-
return /*#__PURE__*/
|
|
9057
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps);
|
|
9062
9058
|
}
|
|
9063
9059
|
return undefined;
|
|
9064
9060
|
}).filter(Boolean);
|
|
@@ -9164,24 +9160,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9164
9160
|
/* harmony export */ "getStringsFromData": function() { return /* binding */ getStringsFromData; },
|
|
9165
9161
|
/* harmony export */ "isDataComponent": function() { return /* binding */ isDataComponent; }
|
|
9166
9162
|
/* harmony export */ });
|
|
9167
|
-
/* harmony import */ var
|
|
9168
|
-
/* harmony import */ var
|
|
9169
|
-
/* harmony import */ var
|
|
9170
|
-
/* harmony import */ var
|
|
9163
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9164
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9165
|
+
/* 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");
|
|
9166
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
9171
9167
|
/* 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");
|
|
9172
9168
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__);
|
|
9173
|
-
/* harmony import */ var
|
|
9174
|
-
/* harmony import */ var
|
|
9175
|
-
/* harmony import */ var
|
|
9176
|
-
/* harmony import */ var
|
|
9177
|
-
/* harmony import */ var
|
|
9178
|
-
/* harmony import */ var
|
|
9179
|
-
/* harmony import */ var
|
|
9180
|
-
/* harmony import */ var
|
|
9181
|
-
/* harmony import */ var
|
|
9182
|
-
/* harmony import */ var
|
|
9183
|
-
/* harmony import */ var
|
|
9184
|
-
/* harmony import */ var
|
|
9169
|
+
/* 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");
|
|
9170
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__);
|
|
9171
|
+
/* 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");
|
|
9172
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__);
|
|
9173
|
+
/* 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");
|
|
9174
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__);
|
|
9175
|
+
/* 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");
|
|
9176
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__);
|
|
9177
|
+
/* 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");
|
|
9178
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_7__);
|
|
9179
|
+
/* 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");
|
|
9180
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_8__);
|
|
9185
9181
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
9186
9182
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
9187
9183
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
@@ -9215,7 +9211,7 @@ function getLength(data) {
|
|
|
9215
9211
|
|
|
9216
9212
|
// Returns generated data for a given axis based on domain and sample from props
|
|
9217
9213
|
function generateDataArray(props, axis) {
|
|
9218
|
-
const propsDomain =
|
|
9214
|
+
const propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
9219
9215
|
const domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis).domain();
|
|
9220
9216
|
const samples = props.samples || 1;
|
|
9221
9217
|
const domainMax = Math.max(...domain);
|
|
@@ -9240,7 +9236,7 @@ function sortData(dataset, sortKey, sortOrder) {
|
|
|
9240
9236
|
formattedSortKey = `_${sortKey}`;
|
|
9241
9237
|
}
|
|
9242
9238
|
const order = sortOrder === "ascending" ? "asc" : "desc";
|
|
9243
|
-
return
|
|
9239
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default()(dataset, formattedSortKey, order);
|
|
9244
9240
|
}
|
|
9245
9241
|
|
|
9246
9242
|
// This method will remove data points that break certain scales. (log scale only)
|
|
@@ -9284,7 +9280,7 @@ function getEventKey(key) {
|
|
|
9284
9280
|
return () => undefined;
|
|
9285
9281
|
}
|
|
9286
9282
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
9287
|
-
return
|
|
9283
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_7___default()(key);
|
|
9288
9284
|
}
|
|
9289
9285
|
|
|
9290
9286
|
// Returns data with an eventKey prop added to each datum
|
|
@@ -9343,12 +9339,12 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
9343
9339
|
if (isUnderMinY(baseline) && !isUnderMinY(value)) _y0 = minDomainY;
|
|
9344
9340
|
// baseline and value with only baseline above max, set baseline to maxDomainY
|
|
9345
9341
|
if (isOverMaxY(baseline) && !isOverMaxY(value)) _y0 = maxDomainY;
|
|
9346
|
-
return Object.assign({}, datum,
|
|
9342
|
+
return Object.assign({}, datum, lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
9347
9343
|
_x,
|
|
9348
9344
|
_y,
|
|
9349
9345
|
_y0,
|
|
9350
9346
|
_y1
|
|
9351
|
-
}, (
|
|
9347
|
+
}, (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default())));
|
|
9352
9348
|
});
|
|
9353
9349
|
}
|
|
9354
9350
|
|
|
@@ -9362,7 +9358,7 @@ function createStringMap(props, axis) {
|
|
|
9362
9358
|
const stringsFromAxes = getStringsFromAxes(props, axis);
|
|
9363
9359
|
const stringsFromCategories = getStringsFromCategories(props, axis);
|
|
9364
9360
|
const stringsFromData = getStringsFromData(props, axis);
|
|
9365
|
-
const allStrings =
|
|
9361
|
+
const allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default()([...stringsFromAxes, ...stringsFromCategories, ...stringsFromData]);
|
|
9366
9362
|
return allStrings.length === 0 ? null : allStrings.reduce((memo, string, index) => {
|
|
9367
9363
|
memo[string] = index + 1;
|
|
9368
9364
|
return memo;
|
|
@@ -9448,7 +9444,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
9448
9444
|
return memo;
|
|
9449
9445
|
}, {});
|
|
9450
9446
|
const formattedDatum = Object.assign({}, processedValues, parsedDatum);
|
|
9451
|
-
if (!
|
|
9447
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(formattedDatum)) {
|
|
9452
9448
|
dataArr.push(formattedDatum);
|
|
9453
9449
|
}
|
|
9454
9450
|
return dataArr;
|
|
@@ -9575,7 +9571,7 @@ function isDataComponent(component) {
|
|
|
9575
9571
|
};
|
|
9576
9572
|
let role = getRole(component);
|
|
9577
9573
|
if (role === "portal") {
|
|
9578
|
-
const children =
|
|
9574
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
9579
9575
|
role = children.length ? getRole(children[0]) : "";
|
|
9580
9576
|
}
|
|
9581
9577
|
const whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -9710,14 +9706,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9710
9706
|
/* harmony export */ "getSymmetricDomain": function() { return /* binding */ getSymmetricDomain; },
|
|
9711
9707
|
/* harmony export */ "isDomainComponent": function() { return /* binding */ isDomainComponent; }
|
|
9712
9708
|
/* harmony export */ });
|
|
9713
|
-
/* harmony import */ var
|
|
9714
|
-
/* harmony import */ var
|
|
9715
|
-
/* harmony import */ var
|
|
9716
|
-
/* harmony import */ var
|
|
9709
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9710
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9711
|
+
/* harmony import */ var lodash_isDate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isDate */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isDate.js");
|
|
9712
|
+
/* harmony import */ var lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isDate__WEBPACK_IMPORTED_MODULE_1__);
|
|
9717
9713
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js");
|
|
9718
9714
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
9719
|
-
/* harmony import */ var
|
|
9720
|
-
/* harmony import */ var
|
|
9715
|
+
/* harmony import */ var lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/sortedUniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/sortedUniq.js");
|
|
9716
|
+
/* harmony import */ var lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
9721
9717
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
9722
9718
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
9723
9719
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -9806,9 +9802,9 @@ function padDomain(domain, props, axis) {
|
|
|
9806
9802
|
max: max.valueOf() + simplePadding.right
|
|
9807
9803
|
};
|
|
9808
9804
|
const singleQuadrantDomainPadding = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.singleQuadrantDomainPadding) ? props.singleQuadrantDomainPadding[axis] : props.singleQuadrantDomainPadding;
|
|
9809
|
-
const addsQuadrants = min >= 0 && paddedDomain.min <= 0 || max <= 0 && paddedDomain.max >= 0;
|
|
9805
|
+
const addsQuadrants = min.valueOf() >= 0 && paddedDomain.min <= 0 || max.valueOf() <= 0 && paddedDomain.max >= 0;
|
|
9810
9806
|
const adjust = (val, type) => {
|
|
9811
|
-
const coerce = type === "min" && min >= 0 && val <= 0 || type === "max" && max <= 0 && val >= 0;
|
|
9807
|
+
const coerce = type === "min" && min.valueOf() >= 0 && val <= 0 || type === "max" && max.valueOf() <= 0 && val >= 0;
|
|
9812
9808
|
return coerce ? 0 : val;
|
|
9813
9809
|
};
|
|
9814
9810
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
@@ -10031,7 +10027,7 @@ function getMaxFromProps(props, axis) {
|
|
|
10031
10027
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.maxDomain) && props.maxDomain[axis] !== undefined) {
|
|
10032
10028
|
return props.maxDomain[axis];
|
|
10033
10029
|
}
|
|
10034
|
-
return typeof props.maxDomain === "number" ||
|
|
10030
|
+
return typeof props.maxDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.maxDomain) ? props.maxDomain : undefined;
|
|
10035
10031
|
}
|
|
10036
10032
|
|
|
10037
10033
|
/**
|
|
@@ -10044,7 +10040,7 @@ function getMinFromProps(props, axis) {
|
|
|
10044
10040
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.minDomain) && props.minDomain[axis] !== undefined) {
|
|
10045
10041
|
return props.minDomain[axis];
|
|
10046
10042
|
}
|
|
10047
|
-
return typeof props.minDomain === "number" ||
|
|
10043
|
+
return typeof props.minDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.minDomain) ? props.minDomain : undefined;
|
|
10048
10044
|
}
|
|
10049
10045
|
|
|
10050
10046
|
/**
|
|
@@ -10055,7 +10051,7 @@ function getMinFromProps(props, axis) {
|
|
|
10055
10051
|
* @returns {Array} the symmetric domain
|
|
10056
10052
|
*/
|
|
10057
10053
|
function getSymmetricDomain(domain, values) {
|
|
10058
|
-
const processedData =
|
|
10054
|
+
const processedData = lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default()(values.sort((a, b) => a - b));
|
|
10059
10055
|
const step = processedData[1] - processedData[0];
|
|
10060
10056
|
return [domain[0], domain[1] + step];
|
|
10061
10057
|
}
|
|
@@ -10071,7 +10067,7 @@ function isDomainComponent(component) {
|
|
|
10071
10067
|
};
|
|
10072
10068
|
let role = getRole(component);
|
|
10073
10069
|
if (role === "portal") {
|
|
10074
|
-
const children =
|
|
10070
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
10075
10071
|
role = children.length ? getRole(children[0]) : "";
|
|
10076
10072
|
}
|
|
10077
10073
|
const whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -10102,14 +10098,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10102
10098
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
10103
10099
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
10104
10100
|
/* harmony export */ });
|
|
10105
|
-
/* harmony import */ var
|
|
10106
|
-
/* harmony import */ var
|
|
10107
|
-
/* harmony import */ var
|
|
10108
|
-
/* harmony import */ var
|
|
10109
|
-
/* harmony import */ var
|
|
10110
|
-
/* harmony import */ var
|
|
10111
|
-
/* harmony import */ var
|
|
10112
|
-
/* harmony import */ var
|
|
10101
|
+
/* 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");
|
|
10102
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
10103
|
+
/* 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");
|
|
10104
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
10105
|
+
/* 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");
|
|
10106
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
10107
|
+
/* 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");
|
|
10108
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
10113
10109
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10114
10110
|
|
|
10115
10111
|
|
|
@@ -10185,7 +10181,7 @@ getScopedEvents) {
|
|
|
10185
10181
|
*/
|
|
10186
10182
|
// eslint-disable-next-line max-params
|
|
10187
10183
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
10188
|
-
if (
|
|
10184
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
10189
10185
|
return {};
|
|
10190
10186
|
}
|
|
10191
10187
|
|
|
@@ -10298,7 +10294,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
10298
10294
|
// eslint-disable-next-line max-params
|
|
10299
10295
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
10300
10296
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
10301
|
-
if (!
|
|
10297
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
10302
10298
|
const callbacks = compileCallbacks(eventReturn);
|
|
10303
10299
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
10304
10300
|
}
|
|
@@ -10359,7 +10355,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
10359
10355
|
const childState = baseState[childName];
|
|
10360
10356
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
10361
10357
|
memo[childName] = mutation ? mutation : childState;
|
|
10362
|
-
return
|
|
10358
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
10363
10359
|
}, {});
|
|
10364
10360
|
}
|
|
10365
10361
|
|
|
@@ -10395,7 +10391,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
10395
10391
|
} else {
|
|
10396
10392
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
10397
10393
|
// will be used. (i.e. labels)
|
|
10398
|
-
const targets =
|
|
10394
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
10399
10395
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
10400
10396
|
const identifier = {
|
|
10401
10397
|
eventKey,
|
|
@@ -10404,10 +10400,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
10404
10400
|
};
|
|
10405
10401
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
10406
10402
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
10407
|
-
return
|
|
10403
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
10408
10404
|
}, {});
|
|
10409
10405
|
}
|
|
10410
|
-
return
|
|
10406
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
10411
10407
|
}, {});
|
|
10412
10408
|
}
|
|
10413
10409
|
|
|
@@ -10439,11 +10435,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
10439
10435
|
}
|
|
10440
10436
|
// find any mutation objects that match the target
|
|
10441
10437
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
10442
|
-
if (
|
|
10438
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
10443
10439
|
return undefined;
|
|
10444
10440
|
}
|
|
10445
10441
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
10446
|
-
if (
|
|
10442
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
10447
10443
|
return undefined;
|
|
10448
10444
|
}
|
|
10449
10445
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -10469,8 +10465,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
10469
10465
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
10470
10466
|
return match && match[1] && match[1].toLowerCase();
|
|
10471
10467
|
}
|
|
10472
|
-
const getGlobalEvents = events =>
|
|
10473
|
-
const omitGlobalEvents = events =>
|
|
10468
|
+
const getGlobalEvents = events => lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
10469
|
+
const omitGlobalEvents = events => lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
10474
10470
|
const emulateReactEvent = event => Object.assign(event, {
|
|
10475
10471
|
nativeEvent: event
|
|
10476
10472
|
});
|
|
@@ -10511,40 +10507,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10511
10507
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
10512
10508
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
10513
10509
|
/* harmony export */ });
|
|
10514
|
-
/* harmony import */ var
|
|
10515
|
-
/* harmony import */ var
|
|
10516
|
-
/* harmony import */ var
|
|
10517
|
-
/* harmony import */ var
|
|
10518
|
-
/* harmony import */ var
|
|
10519
|
-
/* harmony import */ var
|
|
10520
|
-
/* harmony import */ var
|
|
10521
|
-
/* harmony import */ var
|
|
10522
|
-
|
|
10510
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
10511
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10512
|
+
/* 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");
|
|
10513
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
10514
|
+
/* 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");
|
|
10515
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
|
|
10516
|
+
/* 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");
|
|
10517
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
10523
10518
|
|
|
10524
10519
|
|
|
10525
10520
|
|
|
10526
|
-
// Private Functions
|
|
10527
10521
|
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10522
|
+
/**
|
|
10523
|
+
* Determine the range of a cartesian axis
|
|
10524
|
+
*/
|
|
10525
|
+
function getCartesianRange(options) {
|
|
10526
|
+
const vertical = options.axis !== "x";
|
|
10532
10527
|
if (vertical) {
|
|
10533
|
-
return [
|
|
10528
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
10534
10529
|
}
|
|
10535
|
-
return [padding.left,
|
|
10530
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
10536
10531
|
}
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10532
|
+
|
|
10533
|
+
/**
|
|
10534
|
+
* Determine the range of a polar axis in radians
|
|
10535
|
+
*/
|
|
10536
|
+
function getPolarRange(options) {
|
|
10537
|
+
if (options.axis === "x") {
|
|
10538
|
+
const startAngle = degreesToRadians(options.startAngle || 0);
|
|
10539
|
+
const endAngle = degreesToRadians(options.endAngle || 360);
|
|
10541
10540
|
return [startAngle, endAngle];
|
|
10542
10541
|
}
|
|
10543
|
-
return [
|
|
10542
|
+
return [options.innerRadius || 0, getRadius({
|
|
10543
|
+
height: options.height,
|
|
10544
|
+
width: options.width,
|
|
10545
|
+
padding: options.padding
|
|
10546
|
+
})];
|
|
10544
10547
|
}
|
|
10545
10548
|
|
|
10546
|
-
// Exported Functions
|
|
10547
|
-
|
|
10548
10549
|
/**
|
|
10549
10550
|
* Creates an object composed of the inverted keys and values of object.
|
|
10550
10551
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -10581,8 +10582,11 @@ function omit(originalObject, ks) {
|
|
|
10581
10582
|
}
|
|
10582
10583
|
return newObject;
|
|
10583
10584
|
}
|
|
10585
|
+
|
|
10586
|
+
/**
|
|
10587
|
+
* Coalesce the x and y values from a data point
|
|
10588
|
+
*/
|
|
10584
10589
|
function getPoint(datum) {
|
|
10585
|
-
const exists = val => val !== undefined;
|
|
10586
10590
|
const {
|
|
10587
10591
|
_x,
|
|
10588
10592
|
_x1,
|
|
@@ -10593,16 +10597,20 @@ function getPoint(datum) {
|
|
|
10593
10597
|
_y0,
|
|
10594
10598
|
_voronoiY
|
|
10595
10599
|
} = datum;
|
|
10596
|
-
const defaultX =
|
|
10597
|
-
const defaultY =
|
|
10600
|
+
const defaultX = _x1 ?? _x;
|
|
10601
|
+
const defaultY = _y1 ?? _y;
|
|
10598
10602
|
const point = {
|
|
10599
|
-
x:
|
|
10600
|
-
x0:
|
|
10601
|
-
y:
|
|
10602
|
-
y0:
|
|
10603
|
+
x: _voronoiX ?? defaultX,
|
|
10604
|
+
x0: _x0 ?? _x,
|
|
10605
|
+
y: _voronoiY ?? defaultY,
|
|
10606
|
+
y0: _y0 ?? _y
|
|
10603
10607
|
};
|
|
10604
|
-
return
|
|
10608
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
10605
10609
|
}
|
|
10610
|
+
|
|
10611
|
+
/**
|
|
10612
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
10613
|
+
*/
|
|
10606
10614
|
function scalePoint(props, datum) {
|
|
10607
10615
|
const {
|
|
10608
10616
|
scale,
|
|
@@ -10625,11 +10633,11 @@ function scalePoint(props, datum) {
|
|
|
10625
10633
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
10626
10634
|
};
|
|
10627
10635
|
}
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10636
|
+
|
|
10637
|
+
/**
|
|
10638
|
+
* Returns a padding value from a number or partial padding values
|
|
10639
|
+
*/
|
|
10640
|
+
function getPadding(padding) {
|
|
10633
10641
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
10634
10642
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
10635
10643
|
return {
|
|
@@ -10639,6 +10647,10 @@ function getPadding(props, name) {
|
|
|
10639
10647
|
right: paddingObj.right || paddingVal
|
|
10640
10648
|
};
|
|
10641
10649
|
}
|
|
10650
|
+
|
|
10651
|
+
/**
|
|
10652
|
+
* Returns true if the component is defined as a tooltip
|
|
10653
|
+
*/
|
|
10642
10654
|
function isTooltip(component) {
|
|
10643
10655
|
const labelRole = component && component.type && component.type.role;
|
|
10644
10656
|
return labelRole === "tooltip";
|
|
@@ -10653,8 +10665,8 @@ function getDefaultStyles(props, role) {
|
|
|
10653
10665
|
return defaultStyles;
|
|
10654
10666
|
}
|
|
10655
10667
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
10656
|
-
const labelStyle =
|
|
10657
|
-
return
|
|
10668
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
10669
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
10658
10670
|
labels: labelStyle
|
|
10659
10671
|
}, defaultStyles);
|
|
10660
10672
|
}
|
|
@@ -10662,7 +10674,7 @@ function getStyles(style, defaultStyles) {
|
|
|
10662
10674
|
const width = "100%";
|
|
10663
10675
|
const height = "100%";
|
|
10664
10676
|
if (!style) {
|
|
10665
|
-
return
|
|
10677
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
10666
10678
|
parent: {
|
|
10667
10679
|
height,
|
|
10668
10680
|
width
|
|
@@ -10678,14 +10690,18 @@ function getStyles(style, defaultStyles) {
|
|
|
10678
10690
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
10679
10691
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
10680
10692
|
return {
|
|
10681
|
-
parent:
|
|
10693
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
10682
10694
|
width,
|
|
10683
10695
|
height
|
|
10684
10696
|
}),
|
|
10685
|
-
labels:
|
|
10686
|
-
data:
|
|
10697
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
10698
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
10687
10699
|
};
|
|
10688
10700
|
}
|
|
10701
|
+
|
|
10702
|
+
/**
|
|
10703
|
+
* Returns the value of a prop or accessor function with the given props
|
|
10704
|
+
*/
|
|
10689
10705
|
function evaluateProp(prop, props) {
|
|
10690
10706
|
return isFunction(prop) ? prop(props) : prop;
|
|
10691
10707
|
}
|
|
@@ -10707,19 +10723,28 @@ function degreesToRadians(degrees) {
|
|
|
10707
10723
|
function radiansToDegrees(radians) {
|
|
10708
10724
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
10709
10725
|
}
|
|
10710
|
-
|
|
10726
|
+
|
|
10727
|
+
/**
|
|
10728
|
+
* Get the maximum radius that will fit in the container
|
|
10729
|
+
*/
|
|
10730
|
+
function getRadius(options) {
|
|
10731
|
+
const {
|
|
10732
|
+
width,
|
|
10733
|
+
height,
|
|
10734
|
+
padding
|
|
10735
|
+
} = options;
|
|
10711
10736
|
const {
|
|
10712
10737
|
left,
|
|
10713
10738
|
right,
|
|
10714
10739
|
top,
|
|
10715
10740
|
bottom
|
|
10716
|
-
} =
|
|
10717
|
-
const {
|
|
10718
|
-
width,
|
|
10719
|
-
height
|
|
10720
|
-
} = props;
|
|
10741
|
+
} = padding;
|
|
10721
10742
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
10722
10743
|
}
|
|
10744
|
+
|
|
10745
|
+
/**
|
|
10746
|
+
* Returns the origin for a polar chart within the padded area
|
|
10747
|
+
*/
|
|
10723
10748
|
function getPolarOrigin(props) {
|
|
10724
10749
|
const {
|
|
10725
10750
|
width,
|
|
@@ -10730,7 +10755,7 @@ function getPolarOrigin(props) {
|
|
|
10730
10755
|
bottom,
|
|
10731
10756
|
left,
|
|
10732
10757
|
right
|
|
10733
|
-
} = getPadding(props);
|
|
10758
|
+
} = getPadding(props.padding);
|
|
10734
10759
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
10735
10760
|
const offsetWidth = width / 2 + left - right;
|
|
10736
10761
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -10739,13 +10764,30 @@ function getPolarOrigin(props) {
|
|
|
10739
10764
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
10740
10765
|
};
|
|
10741
10766
|
}
|
|
10767
|
+
|
|
10768
|
+
/**
|
|
10769
|
+
* Determine the range of an axis based on the given props
|
|
10770
|
+
*/
|
|
10742
10771
|
function getRange(props, axis) {
|
|
10743
10772
|
if (props.range && props.range[axis]) {
|
|
10744
10773
|
return props.range[axis];
|
|
10745
10774
|
} else if (props.range && Array.isArray(props.range)) {
|
|
10746
10775
|
return props.range;
|
|
10747
10776
|
}
|
|
10748
|
-
return props.polar ? getPolarRange(
|
|
10777
|
+
return props.polar ? getPolarRange({
|
|
10778
|
+
axis,
|
|
10779
|
+
innerRadius: props.innerRadius,
|
|
10780
|
+
startAngle: props.startAngle,
|
|
10781
|
+
endAngle: props.endAngle,
|
|
10782
|
+
height: props.height,
|
|
10783
|
+
width: props.width,
|
|
10784
|
+
padding: getPadding(props.padding)
|
|
10785
|
+
}) : getCartesianRange({
|
|
10786
|
+
axis,
|
|
10787
|
+
height: props.height,
|
|
10788
|
+
width: props.width,
|
|
10789
|
+
padding: getPadding(props.padding)
|
|
10790
|
+
});
|
|
10749
10791
|
}
|
|
10750
10792
|
|
|
10751
10793
|
/**
|
|
@@ -10777,7 +10819,7 @@ function createAccessor(key) {
|
|
|
10777
10819
|
return x => x;
|
|
10778
10820
|
}
|
|
10779
10821
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
10780
|
-
return
|
|
10822
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
10781
10823
|
}
|
|
10782
10824
|
function modifyProps(props, fallbackProps, role) {
|
|
10783
10825
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -10786,7 +10828,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
10786
10828
|
const defaultObject = horizontal === undefined ? {} : {
|
|
10787
10829
|
horizontal
|
|
10788
10830
|
};
|
|
10789
|
-
return
|
|
10831
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
10790
10832
|
}
|
|
10791
10833
|
|
|
10792
10834
|
/**
|
|
@@ -10873,10 +10915,10 @@ initialMemo, combine) {
|
|
|
10873
10915
|
const childRole = child.type && child.type.role;
|
|
10874
10916
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
10875
10917
|
if (child.props && child.props.children) {
|
|
10876
|
-
const childProps = Object.assign({}, child.props,
|
|
10877
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
10878
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
10879
|
-
return /*#__PURE__*/
|
|
10918
|
+
const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
|
|
10919
|
+
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 => {
|
|
10920
|
+
const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
|
|
10921
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
|
|
10880
10922
|
});
|
|
10881
10923
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
10882
10924
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -10890,7 +10932,7 @@ initialMemo, combine) {
|
|
|
10890
10932
|
return newMemo;
|
|
10891
10933
|
}, initialMemo);
|
|
10892
10934
|
};
|
|
10893
|
-
const validChildren = children.filter(
|
|
10935
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
10894
10936
|
const childNames = validChildren.map((c, i) => i);
|
|
10895
10937
|
return traverseChildren(validChildren, childNames);
|
|
10896
10938
|
}
|
|
@@ -10910,10 +10952,10 @@ function isHorizontal(props) {
|
|
|
10910
10952
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
10911
10953
|
return memo || childProps.horizontal;
|
|
10912
10954
|
}
|
|
10913
|
-
return traverseChildren(
|
|
10955
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
10914
10956
|
}, false);
|
|
10915
10957
|
};
|
|
10916
|
-
return traverseChildren(
|
|
10958
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
10917
10959
|
}
|
|
10918
10960
|
|
|
10919
10961
|
/***/ }),
|
|
@@ -10986,9 +11028,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10986
11028
|
/* harmony export */ "getProps": function() { return /* binding */ getProps; },
|
|
10987
11029
|
/* harmony export */ "getText": function() { return /* binding */ getText; }
|
|
10988
11030
|
/* harmony export */ });
|
|
11031
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10989
11032
|
/* 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");
|
|
10990
11033
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
10991
|
-
|
|
11034
|
+
|
|
10992
11035
|
|
|
10993
11036
|
|
|
10994
11037
|
// Private Functions
|
|
@@ -11234,11 +11277,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11234
11277
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11235
11278
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
11236
11279
|
/* harmony export */ });
|
|
11237
|
-
/* global console */
|
|
11280
|
+
/* global console process */
|
|
11238
11281
|
/* eslint-disable no-console */
|
|
11239
11282
|
|
|
11240
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
11241
11283
|
function warn(message) {
|
|
11284
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11285
|
+
// @ts-ignore - Webpack DefinePlugin will replace process.env.NODE_ENV
|
|
11242
11286
|
if (true) {
|
|
11243
11287
|
if (console && console.warn) {
|
|
11244
11288
|
console.warn(message);
|
|
@@ -11531,13 +11575,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11531
11575
|
/* harmony export */ "approximateTextSize": function() { return /* binding */ approximateTextSize; },
|
|
11532
11576
|
/* harmony export */ "convertLengthToPixels": function() { return /* binding */ convertLengthToPixels; }
|
|
11533
11577
|
/* harmony export */ });
|
|
11534
|
-
/* harmony import */ var
|
|
11535
|
-
/* harmony import */ var
|
|
11536
|
-
/* harmony import */ var
|
|
11537
|
-
/* harmony import */ var
|
|
11538
|
-
|
|
11539
|
-
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
11578
|
+
/* 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");
|
|
11579
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
11580
|
+
/* 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");
|
|
11581
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_memoize__WEBPACK_IMPORTED_MODULE_1__);
|
|
11582
|
+
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
11540
11583
|
/* eslint-disable no-magic-numbers */
|
|
11584
|
+
|
|
11585
|
+
|
|
11586
|
+
|
|
11541
11587
|
// Based on measuring specific character widths
|
|
11542
11588
|
// as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
|
|
11543
11589
|
// For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
|
|
@@ -11716,7 +11762,7 @@ const convertLengthToPixels = (length, fontSize) => {
|
|
|
11716
11762
|
};
|
|
11717
11763
|
const _prepareParams = (inputStyle, index) => {
|
|
11718
11764
|
const lineStyle = Array.isArray(inputStyle) ? inputStyle[index] : inputStyle;
|
|
11719
|
-
const style =
|
|
11765
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, lineStyle, defaultStyle);
|
|
11720
11766
|
return Object.assign({}, style, {
|
|
11721
11767
|
fontFamily: style.fontFamily,
|
|
11722
11768
|
letterSpacing: typeof style.letterSpacing === "number" ? style.letterSpacing : convertLengthToPixels(String(style.letterSpacing), style.fontSize),
|
|
@@ -11764,7 +11810,7 @@ const _approximateDimensionsInternal = (text, style) => {
|
|
|
11764
11810
|
height: heightWithRotate * coefficients.heightOverlapCoef
|
|
11765
11811
|
};
|
|
11766
11812
|
};
|
|
11767
|
-
const _getMeasurementContainer =
|
|
11813
|
+
const _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
11768
11814
|
const element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
11769
11815
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
11770
11816
|
element.setAttribute("width", "300");
|
|
@@ -11785,7 +11831,7 @@ const styleToKeyComponent = style => {
|
|
|
11785
11831
|
}
|
|
11786
11832
|
return `${style.angle}:${style.fontFamily}:${style.fontSize}:${style.letterSpacing}:${style.lineHeight}`;
|
|
11787
11833
|
};
|
|
11788
|
-
const _measureDimensionsInternal =
|
|
11834
|
+
const _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()((text, style) => {
|
|
11789
11835
|
let containerElement = _getMeasurementContainer();
|
|
11790
11836
|
if (!containerElement.isConnected) {
|
|
11791
11837
|
_getMeasurementContainer.cache.clear?.();
|
|
@@ -11955,12 +12001,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11955
12001
|
/* harmony export */ "getInitialTransitionState": function() { return /* binding */ getInitialTransitionState; },
|
|
11956
12002
|
/* harmony export */ "getTransitionPropsFactory": function() { return /* binding */ getTransitionPropsFactory; }
|
|
11957
12003
|
/* harmony export */ });
|
|
11958
|
-
/* harmony import */ var
|
|
11959
|
-
/* harmony import */ var
|
|
12004
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
12005
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11960
12006
|
/* 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");
|
|
11961
12007
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
11962
|
-
/* harmony import */ var
|
|
11963
|
-
/* harmony import */ var
|
|
12008
|
+
/* 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");
|
|
12009
|
+
/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_2__);
|
|
11964
12010
|
|
|
11965
12011
|
|
|
11966
12012
|
|
|
@@ -12051,13 +12097,13 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
12051
12097
|
const getTransitionsFromChildren = (old, next) => {
|
|
12052
12098
|
return old.map((child, idx) => {
|
|
12053
12099
|
if (child && child.props && child.props.children && next[idx]) {
|
|
12054
|
-
return getTransitionsFromChildren(
|
|
12100
|
+
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));
|
|
12055
12101
|
}
|
|
12056
12102
|
// get Transition entering and exiting nodes
|
|
12057
12103
|
return getTransition(child, next[idx]);
|
|
12058
12104
|
});
|
|
12059
12105
|
};
|
|
12060
|
-
const childrenTransitions = getTransitionsFromChildren(
|
|
12106
|
+
const childrenTransitions = getTransitionsFromChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(oldChildren), react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextChildren));
|
|
12061
12107
|
return {
|
|
12062
12108
|
nodesWillExit,
|
|
12063
12109
|
nodesWillEnter,
|
|
@@ -12071,7 +12117,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
12071
12117
|
};
|
|
12072
12118
|
}
|
|
12073
12119
|
function getInitialChildProps(animate, data) {
|
|
12074
|
-
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (
|
|
12120
|
+
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
12075
12121
|
return {
|
|
12076
12122
|
data: data.map((datum, idx) => Object.assign({}, datum, after(datum, idx, data)))
|
|
12077
12123
|
};
|
|
@@ -12088,7 +12134,7 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
12088
12134
|
data
|
|
12089
12135
|
};
|
|
12090
12136
|
}
|
|
12091
|
-
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (
|
|
12137
|
+
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
12092
12138
|
// If nodes need to exit, transform them with the provided onLoad.before function.
|
|
12093
12139
|
const newData = data.map((datum, idx) => {
|
|
12094
12140
|
return Object.assign({}, datum, before(datum, idx, data));
|
|
@@ -12110,7 +12156,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
12110
12156
|
data
|
|
12111
12157
|
};
|
|
12112
12158
|
}
|
|
12113
|
-
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (
|
|
12159
|
+
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
12114
12160
|
// If nodes need to exit, transform them with the provided onLoad.after function.
|
|
12115
12161
|
newData = data.map((datum, idx) => {
|
|
12116
12162
|
return Object.assign({}, datum, after(datum, idx, data));
|
|
@@ -12132,7 +12178,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
12132
12178
|
// After the exit transition occurs, trigger the animations for
|
|
12133
12179
|
// nodes that are neither exiting nor entering.
|
|
12134
12180
|
animate.onEnd = cb;
|
|
12135
|
-
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (
|
|
12181
|
+
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
12136
12182
|
// If nodes need to exit, transform them with the provided onExit.before function.
|
|
12137
12183
|
newData = data.map((datum, idx) => {
|
|
12138
12184
|
const key = (datum.key || idx).toString();
|
|
@@ -12155,7 +12201,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
12155
12201
|
newAnimate = Object.assign({}, animate, {
|
|
12156
12202
|
onEnd: cb
|
|
12157
12203
|
});
|
|
12158
|
-
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (
|
|
12204
|
+
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
12159
12205
|
// We want the entering nodes to be included in the transition target
|
|
12160
12206
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
12161
12207
|
// so perform the `onEnter.before` transformation on each node.
|
|
@@ -12182,7 +12228,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
12182
12228
|
// domain should encompass the nodes that will now enter. So perform
|
|
12183
12229
|
// the `onEnter.after` transformation on each node.
|
|
12184
12230
|
newAnimate.onEnd = cb;
|
|
12185
|
-
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (
|
|
12231
|
+
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
12186
12232
|
newData = data.map((datum, idx) => {
|
|
12187
12233
|
const key = getDatumKey(datum, idx);
|
|
12188
12234
|
return enteringNodes[key] ? Object.assign({}, datum, after(datum, idx, data)) : datum;
|