victory-core 37.3.1 → 37.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/victory-core.js +436 -405
- package/dist/victory-core.min.js +1 -1
- package/es/types/callbacks.d.ts +11 -11
- package/es/types/prop-types.d.ts +28 -28
- package/es/victory-animation/util.js +7 -7
- package/es/victory-animation/victory-animation.d.ts +3 -3
- package/es/victory-clip-container/victory-clip-container.d.ts +6 -1
- package/es/victory-clip-container/victory-clip-container.js +20 -12
- package/es/victory-container/victory-container.js +5 -5
- package/es/victory-label/victory-label.d.ts +3 -3
- package/es/victory-label/victory-label.js +12 -16
- package/es/victory-portal/victory-portal.js +4 -4
- package/es/victory-primitives/arc.js +2 -2
- package/es/victory-primitives/background.js +2 -2
- package/es/victory-primitives/border.js +2 -2
- package/es/victory-primitives/line-segment.js +2 -2
- package/es/victory-primitives/point.js +2 -2
- package/es/victory-primitives/tspan.d.ts +0 -1
- package/es/victory-primitives/types.d.ts +1 -1
- package/es/victory-primitives/whisker.d.ts +1 -1
- package/es/victory-primitives/whisker.js +2 -2
- package/es/victory-theme/types.d.ts +11 -11
- package/es/victory-transition/victory-transition.d.ts +1 -1
- package/es/victory-transition/victory-transition.js +8 -8
- package/es/victory-util/add-events.d.ts +8 -8
- package/es/victory-util/add-events.js +14 -14
- package/es/victory-util/axis.js +12 -12
- package/es/victory-util/data.js +16 -20
- package/es/victory-util/domain.js +13 -16
- package/es/victory-util/events.d.ts +5 -5
- package/es/victory-util/events.js +17 -23
- package/es/victory-util/helpers.d.ts +94 -19
- package/es/victory-util/helpers.js +95 -50
- package/es/victory-util/hooks/use-animation-state.d.ts +2 -2
- package/es/victory-util/hooks/use-animation-state.js +4 -4
- package/es/victory-util/label-helpers.d.ts +4 -3
- package/es/victory-util/label-helpers.js +3 -3
- package/es/victory-util/line-helpers.d.ts +1 -1
- package/es/victory-util/log.js +3 -2
- package/es/victory-util/merge-refs.d.ts +2 -2
- package/es/victory-util/scale.js +2 -3
- package/es/victory-util/selection.d.ts +3 -3
- package/es/victory-util/textsize.js +7 -5
- package/es/victory-util/timer.d.ts +1 -1
- package/es/victory-util/transitions.d.ts +1 -1
- package/es/victory-util/transitions.js +15 -19
- package/es/victory-util/type-helpers.d.ts +0 -1
- package/es/victory-util/type-helpers.js +0 -5
- package/es/victory-util/user-props.d.ts +2 -2
- package/es/victory-util/wrapper.js +12 -13
- package/lib/types/callbacks.d.ts +11 -11
- package/lib/types/prop-types.d.ts +28 -28
- package/lib/victory-animation/util.js +7 -7
- package/lib/victory-animation/victory-animation.d.ts +3 -3
- package/lib/victory-clip-container/victory-clip-container.d.ts +6 -1
- package/lib/victory-clip-container/victory-clip-container.js +20 -12
- package/lib/victory-container/victory-container.js +6 -6
- package/lib/victory-label/victory-label.d.ts +3 -3
- package/lib/victory-label/victory-label.js +12 -16
- package/lib/victory-portal/victory-portal.js +5 -5
- package/lib/victory-primitives/arc.js +2 -2
- package/lib/victory-primitives/background.js +2 -2
- package/lib/victory-primitives/border.js +2 -2
- package/lib/victory-primitives/line-segment.js +2 -2
- package/lib/victory-primitives/point.js +2 -2
- package/lib/victory-primitives/tspan.d.ts +0 -1
- package/lib/victory-primitives/types.d.ts +1 -1
- package/lib/victory-primitives/whisker.d.ts +1 -1
- package/lib/victory-primitives/whisker.js +2 -2
- package/lib/victory-theme/types.d.ts +11 -11
- package/lib/victory-transition/victory-transition.d.ts +1 -1
- package/lib/victory-transition/victory-transition.js +8 -8
- package/lib/victory-util/add-events.d.ts +8 -8
- package/lib/victory-util/add-events.js +14 -14
- package/lib/victory-util/axis.js +12 -12
- package/lib/victory-util/data.js +16 -21
- package/lib/victory-util/domain.js +13 -17
- package/lib/victory-util/events.d.ts +5 -5
- package/lib/victory-util/events.js +17 -24
- package/lib/victory-util/helpers.d.ts +94 -19
- package/lib/victory-util/helpers.js +96 -52
- package/lib/victory-util/hooks/use-animation-state.d.ts +2 -2
- package/lib/victory-util/hooks/use-animation-state.js +4 -4
- package/lib/victory-util/label-helpers.d.ts +4 -3
- package/lib/victory-util/label-helpers.js +3 -5
- package/lib/victory-util/line-helpers.d.ts +1 -1
- package/lib/victory-util/log.js +3 -2
- package/lib/victory-util/merge-refs.d.ts +2 -2
- package/lib/victory-util/scale.js +2 -4
- package/lib/victory-util/selection.d.ts +3 -3
- package/lib/victory-util/textsize.js +5 -5
- package/lib/victory-util/timer.d.ts +1 -1
- package/lib/victory-util/transitions.d.ts +1 -1
- package/lib/victory-util/transitions.js +15 -19
- package/lib/victory-util/type-helpers.d.ts +0 -1
- package/lib/victory-util/type-helpers.js +0 -6
- package/lib/victory-util/user-props.d.ts +2 -2
- package/lib/victory-util/wrapper.js +12 -13
- package/package.json +6 -38
- package/src/victory-animation/util.ts +4 -2
- package/src/victory-clip-container/victory-clip-container.tsx +26 -11
- package/src/victory-container/victory-container.tsx +4 -4
- package/src/victory-label/victory-label.tsx +5 -3
- package/src/victory-portal/victory-portal.tsx +3 -1
- package/src/victory-primitives/arc.tsx +1 -1
- package/src/victory-primitives/background.tsx +1 -1
- package/src/victory-primitives/border.tsx +1 -1
- package/src/victory-primitives/line-segment.tsx +1 -1
- package/src/victory-primitives/point.tsx +3 -3
- package/src/victory-primitives/whisker.tsx +1 -1
- package/src/victory-transition/victory-transition.tsx +5 -3
- package/src/victory-util/add-events.tsx +6 -3
- package/src/victory-util/axis.tsx +8 -4
- package/src/victory-util/common-props.tsx +3 -3
- package/src/victory-util/data.ts +9 -13
- package/src/victory-util/domain.ts +8 -6
- package/src/victory-util/events.ts +18 -13
- package/src/victory-util/helpers.ts +155 -40
- package/src/victory-util/hooks/use-animation-state.ts +1 -1
- package/src/victory-util/label-helpers.ts +1 -2
- package/src/victory-util/log.ts +3 -2
- package/src/victory-util/merge-refs.ts +2 -0
- package/src/victory-util/scale.ts +1 -2
- package/src/victory-util/textsize.ts +2 -1
- package/src/victory-util/transitions.ts +6 -6
- package/src/victory-util/type-helpers.ts +0 -5
- package/src/victory-util/user-props.ts +1 -1
- package/src/victory-util/wrapper.tsx +5 -2
package/dist/victory-core.js
CHANGED
|
@@ -67,10 +67,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
67
67
|
/* harmony export */ "isInterpolatable": function() { return /* binding */ isInterpolatable; },
|
|
68
68
|
/* harmony export */ "victoryInterpolator": function() { return /* binding */ victoryInterpolator; }
|
|
69
69
|
/* harmony export */ });
|
|
70
|
-
/* harmony import */ var
|
|
71
|
-
/* harmony import */ var
|
|
72
|
-
/* harmony import */ var
|
|
73
|
-
/* harmony import */ var
|
|
70
|
+
/* 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");
|
|
71
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
72
|
+
/* 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");
|
|
73
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
74
74
|
/* harmony import */ var victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-vendor/d3-interpolate */ "../../victory-vendor/es/d3-interpolate.js");
|
|
75
75
|
|
|
76
76
|
|
|
@@ -96,7 +96,7 @@ const isInterpolatable = function (obj) {
|
|
|
96
96
|
return false;
|
|
97
97
|
case "object":
|
|
98
98
|
// Don't try to interpolate class instances (except Date or Array).
|
|
99
|
-
return obj instanceof Date || Array.isArray(obj) ||
|
|
99
|
+
return obj instanceof Date || Array.isArray(obj) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(obj);
|
|
100
100
|
case "function":
|
|
101
101
|
// Careful! There may be extra properties on function objects that the
|
|
102
102
|
// component expects to access - for instance, it may be a `d3.scale()`
|
|
@@ -156,7 +156,7 @@ const interpolateFunction = function (a, b) {
|
|
|
156
156
|
return b;
|
|
157
157
|
}
|
|
158
158
|
return function () {
|
|
159
|
-
/* eslint-disable
|
|
159
|
+
/* eslint-disable prefer-rest-params */
|
|
160
160
|
const aval = typeof a === "function" ? a.apply(this, arguments) : a;
|
|
161
161
|
const bval = typeof b === "function" ? b.apply(this, arguments) : b;
|
|
162
162
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(aval, bval)(t);
|
|
@@ -182,7 +182,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
182
182
|
if (typeof x === "function" || typeof y === "function") {
|
|
183
183
|
return interpolateFunction(x, y);
|
|
184
184
|
}
|
|
185
|
-
if (typeof x === "object" &&
|
|
185
|
+
if (typeof x === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(x) || typeof y === "object" && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(y)) {
|
|
186
186
|
return interpolateObject(x, y);
|
|
187
187
|
}
|
|
188
188
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(x, y);
|
|
@@ -191,7 +191,7 @@ const interpolateObject = function (startValue, endValue) {
|
|
|
191
191
|
// When the value is an array, attempt to sort by "key" so that animating nodes may be identified
|
|
192
192
|
// based on "key" instead of index
|
|
193
193
|
const keyData = val => {
|
|
194
|
-
return Array.isArray(val) ?
|
|
194
|
+
return Array.isArray(val) ? lodash_orderBy__WEBPACK_IMPORTED_MODULE_1___default()(val, "key") : val;
|
|
195
195
|
};
|
|
196
196
|
const i = {};
|
|
197
197
|
const c = {};
|
|
@@ -258,7 +258,7 @@ const victoryInterpolator = function (a, b) {
|
|
|
258
258
|
if (typeof a === "function" || typeof b === "function") {
|
|
259
259
|
return interpolateFunction(a, b);
|
|
260
260
|
}
|
|
261
|
-
if (
|
|
261
|
+
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(b)) {
|
|
262
262
|
// @ts-expect-error These generics are tough, but they work :)
|
|
263
263
|
return interpolateObject(a, b);
|
|
264
264
|
}
|
|
@@ -433,20 +433,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
433
433
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
434
434
|
/* harmony export */ "VictoryClipContainer": function() { return /* binding */ VictoryClipContainer; }
|
|
435
435
|
/* harmony export */ });
|
|
436
|
-
/* harmony import */ var
|
|
437
|
-
/* harmony import */ var
|
|
438
|
-
/* harmony import */ var
|
|
439
|
-
/* harmony import */ var
|
|
440
|
-
/* harmony import */ var
|
|
441
|
-
/* harmony import */ var
|
|
442
|
-
/* harmony import */ var
|
|
443
|
-
/* harmony import */ var
|
|
444
|
-
/* harmony import */ var
|
|
445
|
-
/* harmony import */ var
|
|
446
|
-
/* harmony import */ var
|
|
447
|
-
/* harmony import */ var _victory_primitives_circle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-primitives/circle */ "./victory-primitives/circle.tsx");
|
|
448
|
-
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-primitives/rect */ "./victory-primitives/rect.tsx");
|
|
449
|
-
|
|
436
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
437
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
438
|
+
/* 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");
|
|
439
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
440
|
+
/* 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");
|
|
441
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
442
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
443
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/user-props */ "./victory-util/user-props.ts");
|
|
444
|
+
/* harmony import */ var _victory_primitives_clip_path__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-primitives/clip-path */ "./victory-primitives/clip-path.tsx");
|
|
445
|
+
/* harmony import */ var _victory_primitives_circle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-primitives/circle */ "./victory-primitives/circle.tsx");
|
|
446
|
+
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-primitives/rect */ "./victory-primitives/rect.tsx");
|
|
450
447
|
|
|
451
448
|
|
|
452
449
|
|
|
@@ -455,18 +452,31 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
455
452
|
|
|
456
453
|
|
|
457
454
|
|
|
458
|
-
class VictoryClipContainer extends (
|
|
455
|
+
class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
459
456
|
static displayName = "VictoryClipContainer";
|
|
460
457
|
static role = "container";
|
|
461
458
|
static defaultProps = {
|
|
462
|
-
circleComponent: /*#__PURE__*/
|
|
463
|
-
rectComponent: /*#__PURE__*/
|
|
464
|
-
clipPathComponent: /*#__PURE__*/
|
|
465
|
-
groupComponent: /*#__PURE__*/
|
|
459
|
+
circleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_circle__WEBPACK_IMPORTED_MODULE_3__.Circle, null),
|
|
460
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_4__.Rect, null),
|
|
461
|
+
clipPathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_clip_path__WEBPACK_IMPORTED_MODULE_5__.ClipPath, null),
|
|
462
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
466
463
|
};
|
|
467
464
|
constructor(props) {
|
|
468
465
|
super(props);
|
|
469
|
-
this.
|
|
466
|
+
this.state = {
|
|
467
|
+
clipId: props?.clipId
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// The clipId state is used to prevent hydration mismatches between the server and client (issue #2941).
|
|
472
|
+
// A better alternative would be to utilize React 18's useId hook instead of uniqueId, which would avoid needing state for this purpose.
|
|
473
|
+
// However, this component currently supports React 16 at the time of writing, so this workaround is necessary.
|
|
474
|
+
componentDidMount() {
|
|
475
|
+
if (!this.state.clipId) {
|
|
476
|
+
this.setState({
|
|
477
|
+
clipId: lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()("victory-clip-")
|
|
478
|
+
});
|
|
479
|
+
}
|
|
470
480
|
}
|
|
471
481
|
calculateAttributes(props) {
|
|
472
482
|
const {
|
|
@@ -477,10 +487,8 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
477
487
|
translateX = 0,
|
|
478
488
|
translateY = 0
|
|
479
489
|
} = props;
|
|
480
|
-
const clipPadding =
|
|
481
|
-
|
|
482
|
-
});
|
|
483
|
-
const radius = props.radius || _victory_util_helpers__WEBPACK_IMPORTED_MODULE_7__.getRadius(props);
|
|
490
|
+
const clipPadding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getPadding(props.clipPadding);
|
|
491
|
+
const radius = props.radius || _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRadius(props);
|
|
484
492
|
return {
|
|
485
493
|
x: (polar ? origin.x : translateX) - clipPadding.left,
|
|
486
494
|
y: (polar ? origin.y : translateY) - clipPadding.top,
|
|
@@ -489,7 +497,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
489
497
|
};
|
|
490
498
|
}
|
|
491
499
|
renderClippedGroup(props, clipId) {
|
|
492
|
-
const userProps =
|
|
500
|
+
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__.getSafeUserProps(props);
|
|
493
501
|
const {
|
|
494
502
|
style,
|
|
495
503
|
events,
|
|
@@ -507,11 +515,11 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
507
515
|
key: `clipped-group-${clipId}`,
|
|
508
516
|
clipPath: `url(#${clipId})`
|
|
509
517
|
}, events);
|
|
510
|
-
return /*#__PURE__*/
|
|
518
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(groupComponent, {
|
|
511
519
|
...groupProps,
|
|
512
520
|
tabIndex,
|
|
513
521
|
...userProps
|
|
514
|
-
}, [clipComponent, ...
|
|
522
|
+
}, [clipComponent, ...react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(children)]);
|
|
515
523
|
}
|
|
516
524
|
renderGroup(props) {
|
|
517
525
|
const {
|
|
@@ -523,7 +531,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
523
531
|
groupComponent,
|
|
524
532
|
tabIndex
|
|
525
533
|
} = props;
|
|
526
|
-
return /*#__PURE__*/
|
|
534
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(groupComponent, Object.assign({
|
|
527
535
|
className,
|
|
528
536
|
style,
|
|
529
537
|
transform,
|
|
@@ -548,18 +556,16 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
548
556
|
bottom,
|
|
549
557
|
left,
|
|
550
558
|
right
|
|
551
|
-
} =
|
|
552
|
-
padding: props.clipPadding
|
|
553
|
-
});
|
|
559
|
+
} = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getPadding(props.clipPadding);
|
|
554
560
|
let child;
|
|
555
561
|
if (polar) {
|
|
556
|
-
const radius = props.radius ||
|
|
562
|
+
const radius = props.radius || _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRadius(props);
|
|
557
563
|
const circleProps = {
|
|
558
564
|
r: Math.max(radius + left + right, radius + top + bottom, 0),
|
|
559
565
|
cx: origin.x - left,
|
|
560
566
|
cy: origin.y - top
|
|
561
567
|
};
|
|
562
|
-
child = /*#__PURE__*/
|
|
568
|
+
child = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(circleComponent, circleProps);
|
|
563
569
|
} else {
|
|
564
570
|
const rectProps = {
|
|
565
571
|
x: translateX - left,
|
|
@@ -567,9 +573,9 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
567
573
|
width: Math.max(clipWidth + left + right, 0),
|
|
568
574
|
height: Math.max(clipHeight + top + bottom, 0)
|
|
569
575
|
};
|
|
570
|
-
child = /*#__PURE__*/
|
|
576
|
+
child = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(rectComponent, rectProps);
|
|
571
577
|
}
|
|
572
|
-
return /*#__PURE__*/
|
|
578
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(clipPathComponent, Object.assign({
|
|
573
579
|
key: `clip-path-${clipId}`
|
|
574
580
|
}, props, {
|
|
575
581
|
clipId
|
|
@@ -583,7 +589,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
583
589
|
if (clipValues[axis] !== undefined) {
|
|
584
590
|
return clipValues[axis];
|
|
585
591
|
}
|
|
586
|
-
const range =
|
|
592
|
+
const range = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRange(props, axis);
|
|
587
593
|
return range ? Math.abs(range[0] - range[1]) || undefined : undefined;
|
|
588
594
|
}
|
|
589
595
|
getTranslateValue(props, axis) {
|
|
@@ -594,7 +600,7 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
594
600
|
if (translateValues[axis] !== undefined) {
|
|
595
601
|
return translateValues[axis];
|
|
596
602
|
}
|
|
597
|
-
const range =
|
|
603
|
+
const range = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__.getRange(props, axis);
|
|
598
604
|
return range ? Math.min(...range) : undefined;
|
|
599
605
|
}
|
|
600
606
|
render() {
|
|
@@ -605,13 +611,13 @@ class VictoryClipContainer extends (react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
|
605
611
|
}
|
|
606
612
|
const translateX = this.getTranslateValue(this.props, "x");
|
|
607
613
|
const translateY = this.getTranslateValue(this.props, "y");
|
|
608
|
-
const clipProps =
|
|
614
|
+
const clipProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.props, {
|
|
609
615
|
clipHeight,
|
|
610
616
|
clipWidth,
|
|
611
617
|
translateX,
|
|
612
618
|
translateY
|
|
613
619
|
});
|
|
614
|
-
return this.renderClippedGroup(clipProps, this.clipId);
|
|
620
|
+
return this.renderClippedGroup(clipProps, this.state.clipId);
|
|
615
621
|
}
|
|
616
622
|
}
|
|
617
623
|
|
|
@@ -629,16 +635,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
629
635
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
630
636
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
631
637
|
/* harmony export */ });
|
|
632
|
-
/* harmony import */ var
|
|
633
|
-
/* harmony import */ var
|
|
634
|
-
/* harmony import */ var
|
|
635
|
-
/* harmony import */ var
|
|
638
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
639
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
640
|
+
/* 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");
|
|
641
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
636
642
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "./victory-portal/portal.tsx");
|
|
637
643
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/user-props */ "./victory-util/user-props.ts");
|
|
638
644
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "./victory-util/merge-refs.ts");
|
|
639
645
|
/* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-portal/portal-outlet */ "./victory-portal/portal-outlet.tsx");
|
|
640
646
|
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "./victory-portal/portal-context.tsx");
|
|
641
|
-
|
|
642
647
|
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); }
|
|
643
648
|
|
|
644
649
|
|
|
@@ -646,9 +651,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
646
651
|
|
|
647
652
|
|
|
648
653
|
|
|
654
|
+
|
|
649
655
|
const defaultProps = {
|
|
650
656
|
className: "VictoryContainer",
|
|
651
|
-
portalComponent: /*#__PURE__*/
|
|
657
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
652
658
|
portalZIndex: 99,
|
|
653
659
|
responsive: true,
|
|
654
660
|
role: "img"
|
|
@@ -665,10 +671,10 @@ function useVictoryContainer(initialProps) {
|
|
|
665
671
|
height,
|
|
666
672
|
responsive
|
|
667
673
|
} = props;
|
|
668
|
-
const localContainerRef = (0,
|
|
674
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
669
675
|
|
|
670
676
|
// Generated ID stored in ref because it needs to persist across renders
|
|
671
|
-
const generatedId = (0,
|
|
677
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
672
678
|
const containerId = props.containerId ?? generatedId.current;
|
|
673
679
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
674
680
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -727,7 +733,7 @@ const VictoryContainer = initialProps => {
|
|
|
727
733
|
containerRef,
|
|
728
734
|
localContainerRef
|
|
729
735
|
} = useVictoryContainer(initialProps);
|
|
730
|
-
|
|
736
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
731
737
|
if (!events?.onWheel) return;
|
|
732
738
|
const handleWheel = e => e.preventDefault();
|
|
733
739
|
const container = localContainerRef?.current;
|
|
@@ -737,21 +743,21 @@ const VictoryContainer = initialProps => {
|
|
|
737
743
|
};
|
|
738
744
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
739
745
|
}, []);
|
|
740
|
-
return /*#__PURE__*/
|
|
746
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
741
747
|
className: className,
|
|
742
748
|
style: {
|
|
743
749
|
...style,
|
|
744
750
|
width: responsive ? style?.width : dimensions.width,
|
|
745
751
|
height: responsive ? style?.height : dimensions.height,
|
|
746
|
-
pointerEvents: "none",
|
|
747
|
-
touchAction: "none",
|
|
748
|
-
position: "relative"
|
|
752
|
+
pointerEvents: style?.pointerEvents ?? "none",
|
|
753
|
+
touchAction: style?.touchAction ?? "none",
|
|
754
|
+
position: style?.position ?? "relative"
|
|
749
755
|
},
|
|
750
756
|
"data-ouia-component-id": ouiaId,
|
|
751
757
|
"data-ouia-component-type": ouiaType,
|
|
752
758
|
"data-ouia-safe": ouiaSafe,
|
|
753
759
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
754
|
-
}, /*#__PURE__*/
|
|
760
|
+
}, /*#__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({
|
|
755
761
|
width: width,
|
|
756
762
|
height: height,
|
|
757
763
|
tabIndex: tabIndex,
|
|
@@ -764,11 +770,11 @@ const VictoryContainer = initialProps => {
|
|
|
764
770
|
...dimensions,
|
|
765
771
|
pointerEvents: "all"
|
|
766
772
|
}
|
|
767
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
773
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
768
774
|
id: titleId
|
|
769
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
775
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
770
776
|
id: descId
|
|
771
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
777
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
772
778
|
style: {
|
|
773
779
|
...dimensions,
|
|
774
780
|
zIndex: portalZIndex,
|
|
@@ -776,7 +782,7 @@ const VictoryContainer = initialProps => {
|
|
|
776
782
|
top: 0,
|
|
777
783
|
left: 0
|
|
778
784
|
}
|
|
779
|
-
}, /*#__PURE__*/
|
|
785
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
780
786
|
as: portalComponent,
|
|
781
787
|
width: width,
|
|
782
788
|
height: height,
|
|
@@ -803,12 +809,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
803
809
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
804
810
|
/* harmony export */ "VictoryLabel": function() { return /* binding */ VictoryLabel; }
|
|
805
811
|
/* harmony export */ });
|
|
806
|
-
/* harmony import */ var
|
|
807
|
-
/* harmony import */ var
|
|
812
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
813
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
808
814
|
/* 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");
|
|
809
815
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
810
|
-
/* harmony import */ var
|
|
811
|
-
/* harmony import */ var
|
|
816
|
+
/* 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");
|
|
817
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
812
818
|
/* harmony import */ var _victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../victory-portal/victory-portal */ "./victory-portal/victory-portal.tsx");
|
|
813
819
|
/* harmony import */ var _victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-primitives/rect */ "./victory-primitives/rect.tsx");
|
|
814
820
|
/* harmony import */ var _victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../victory-primitives/text */ "./victory-primitives/text.tsx");
|
|
@@ -819,9 +825,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
819
825
|
/* harmony import */ var _victory_util_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/style */ "./victory-util/style.ts");
|
|
820
826
|
/* harmony import */ var _victory_util_textsize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../victory-util/textsize */ "./victory-util/textsize.ts");
|
|
821
827
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/user-props */ "./victory-util/user-props.ts");
|
|
828
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
822
829
|
|
|
823
830
|
|
|
824
|
-
/* eslint no-magic-numbers: ["error", { "ignore": [-0.5, 0.5, 0, 1, 2] }]*/
|
|
825
831
|
|
|
826
832
|
|
|
827
833
|
|
|
@@ -873,7 +879,7 @@ const shouldUseMultilineBackgrounds = props => {
|
|
|
873
879
|
backgroundStyle,
|
|
874
880
|
backgroundPadding
|
|
875
881
|
} = props;
|
|
876
|
-
return Array.isArray(backgroundStyle) && !
|
|
882
|
+
return Array.isArray(backgroundStyle) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundStyle) || Array.isArray(backgroundPadding) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(backgroundPadding);
|
|
877
883
|
};
|
|
878
884
|
const getStyles = (style, props) => {
|
|
879
885
|
if (props.disableInlineStyles) {
|
|
@@ -889,32 +895,28 @@ const getStyles = (style, props) => {
|
|
|
889
895
|
fontSize: getFontSize(baseStyles)
|
|
890
896
|
});
|
|
891
897
|
};
|
|
892
|
-
return Array.isArray(style) && !
|
|
898
|
+
return Array.isArray(style) && !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(style) ? style.map(s => getSingleStyle(s)) : getSingleStyle(style);
|
|
893
899
|
};
|
|
894
900
|
const getBackgroundStyles = (style, props) => {
|
|
895
901
|
if (!style) {
|
|
896
902
|
return undefined;
|
|
897
903
|
}
|
|
898
|
-
return Array.isArray(style) && !
|
|
904
|
+
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);
|
|
899
905
|
};
|
|
900
906
|
const getBackgroundPadding = props => {
|
|
901
907
|
if (props.backgroundPadding && Array.isArray(props.backgroundPadding)) {
|
|
902
908
|
return props.backgroundPadding.map(backgroundPadding => {
|
|
903
909
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(backgroundPadding, props);
|
|
904
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
905
|
-
padding
|
|
906
|
-
});
|
|
910
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
907
911
|
});
|
|
908
912
|
}
|
|
909
913
|
const padding = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.backgroundPadding, props);
|
|
910
|
-
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(
|
|
911
|
-
padding
|
|
912
|
-
});
|
|
914
|
+
return _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.getPadding(padding);
|
|
913
915
|
};
|
|
914
916
|
const getLineHeight = props => {
|
|
915
917
|
const lineHeight = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(props.lineHeight, props);
|
|
916
918
|
if (Array.isArray(lineHeight)) {
|
|
917
|
-
return
|
|
919
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(lineHeight) ? [1] : lineHeight;
|
|
918
920
|
}
|
|
919
921
|
return lineHeight;
|
|
920
922
|
};
|
|
@@ -1034,7 +1036,7 @@ const getFullBackground = (calculatedProps, tspanValues) => {
|
|
|
1034
1036
|
x: inline ? xCoordinate - backgroundPadding.left : xCoordinate + dx - backgroundPadding.left,
|
|
1035
1037
|
y: yCoordinate
|
|
1036
1038
|
};
|
|
1037
|
-
return /*#__PURE__*/
|
|
1039
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
1038
1040
|
};
|
|
1039
1041
|
const getInlineXOffset = (calculatedProps, textElements, index) => {
|
|
1040
1042
|
const {
|
|
@@ -1104,7 +1106,7 @@ const getChildBackgrounds = (calculatedProps, tspanValues) => {
|
|
|
1104
1106
|
x: xCoord - padding.left,
|
|
1105
1107
|
y: yCoord
|
|
1106
1108
|
};
|
|
1107
|
-
return /*#__PURE__*/
|
|
1109
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(backgroundComponent, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, backgroundComponent.props, backgroundProps));
|
|
1108
1110
|
});
|
|
1109
1111
|
};
|
|
1110
1112
|
const getBackgroundElement = (calculatedProps, tspanValues) => {
|
|
@@ -1235,16 +1237,16 @@ const renderLabel = (calculatedProps, tspanValues) => {
|
|
|
1235
1237
|
style: currentStyle,
|
|
1236
1238
|
children: line
|
|
1237
1239
|
};
|
|
1238
|
-
return /*#__PURE__*/
|
|
1240
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(tspanComponent, tspanProps);
|
|
1239
1241
|
});
|
|
1240
|
-
return /*#__PURE__*/
|
|
1242
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(textComponent, textProps, tspans);
|
|
1241
1243
|
};
|
|
1242
1244
|
const defaultProps = {
|
|
1243
|
-
backgroundComponent: /*#__PURE__*/
|
|
1244
|
-
groupComponent: /*#__PURE__*/
|
|
1245
|
+
backgroundComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_rect__WEBPACK_IMPORTED_MODULE_8__.Rect, null),
|
|
1246
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
1245
1247
|
direction: "inherit",
|
|
1246
|
-
textComponent: /*#__PURE__*/
|
|
1247
|
-
tspanComponent: /*#__PURE__*/
|
|
1248
|
+
textComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_text__WEBPACK_IMPORTED_MODULE_9__.Text, null),
|
|
1249
|
+
tspanComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_primitives_tspan__WEBPACK_IMPORTED_MODULE_10__.TSpan, null),
|
|
1248
1250
|
capHeight: 0.71,
|
|
1249
1251
|
// Magic number from d3.
|
|
1250
1252
|
lineHeight: 1
|
|
@@ -1281,10 +1283,10 @@ const VictoryLabel = initialProps => {
|
|
|
1281
1283
|
if (props.backgroundStyle) {
|
|
1282
1284
|
const backgroundElement = getBackgroundElement(calculatedProps, tspanValues);
|
|
1283
1285
|
const children = [backgroundElement, label];
|
|
1284
|
-
const backgroundWithLabel = /*#__PURE__*/
|
|
1285
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
1286
|
+
const backgroundWithLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.groupComponent, {}, children);
|
|
1287
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, backgroundWithLabel) : backgroundWithLabel;
|
|
1286
1288
|
}
|
|
1287
|
-
return props.renderInPortal ? /*#__PURE__*/
|
|
1289
|
+
return props.renderInPortal ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_victory_portal__WEBPACK_IMPORTED_MODULE_12__.VictoryPortal, null, label) : label;
|
|
1288
1290
|
};
|
|
1289
1291
|
VictoryLabel.displayName = "VictoryLabel";
|
|
1290
1292
|
VictoryLabel.role = "label";
|
|
@@ -1410,12 +1412,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1410
1412
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1411
1413
|
/* harmony export */ "VictoryPortal": function() { return /* binding */ VictoryPortal; }
|
|
1412
1414
|
/* harmony export */ });
|
|
1413
|
-
/* harmony import */ var
|
|
1414
|
-
/* harmony import */ var
|
|
1415
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1416
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1415
1417
|
/* 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");
|
|
1416
1418
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
1417
|
-
/* harmony import */ var
|
|
1418
|
-
/* harmony import */ var
|
|
1419
|
+
/* 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");
|
|
1420
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2__);
|
|
1419
1421
|
/* harmony import */ var _victory_util_log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/log */ "./victory-util/log.ts");
|
|
1420
1422
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
1421
1423
|
/* harmony import */ var _portal_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./portal-context */ "./victory-portal/portal-context.tsx");
|
|
@@ -1426,14 +1428,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1426
1428
|
|
|
1427
1429
|
|
|
1428
1430
|
const defaultProps = {
|
|
1429
|
-
groupComponent: /*#__PURE__*/
|
|
1431
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
1430
1432
|
};
|
|
1431
1433
|
const VictoryPortal = initialProps => {
|
|
1432
1434
|
const props = {
|
|
1433
1435
|
...defaultProps,
|
|
1434
1436
|
...initialProps
|
|
1435
1437
|
};
|
|
1436
|
-
const [id] = (0,
|
|
1438
|
+
const [id] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_2___default()());
|
|
1437
1439
|
const portalContext = (0,_portal_context__WEBPACK_IMPORTED_MODULE_3__.usePortalContext)();
|
|
1438
1440
|
if (!portalContext) {
|
|
1439
1441
|
const msg = "`renderInPortal` is not supported outside of `VictoryContainer`. " + "Component will be rendered in place";
|
|
@@ -1451,12 +1453,12 @@ const VictoryPortal = initialProps => {
|
|
|
1451
1453
|
const newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(standardProps, childProps, _victory_util_helpers__WEBPACK_IMPORTED_MODULE_5__.omit(props, ["children", "groupComponent"]), {
|
|
1452
1454
|
key: childProps.key ?? id
|
|
1453
1455
|
});
|
|
1454
|
-
const child = children && /*#__PURE__*/
|
|
1455
|
-
|
|
1456
|
+
const child = children && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(children, newProps);
|
|
1457
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
1456
1458
|
portalContext?.addChild(id, child);
|
|
1457
1459
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1458
1460
|
}, [props.children]);
|
|
1459
|
-
|
|
1461
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
1460
1462
|
return () => portalContext?.removeChild(id);
|
|
1461
1463
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1462
1464
|
}, []);
|
|
@@ -1477,17 +1479,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1477
1479
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1478
1480
|
/* harmony export */ "Arc": function() { return /* binding */ Arc; }
|
|
1479
1481
|
/* harmony export */ });
|
|
1480
|
-
/* harmony import */ var
|
|
1481
|
-
/* harmony import */ var
|
|
1482
|
-
/* harmony import */ var
|
|
1483
|
-
/* harmony import */ var
|
|
1482
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1483
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1484
|
+
/* 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");
|
|
1485
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
1484
1486
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
1485
1487
|
/* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path */ "./victory-primitives/path.tsx");
|
|
1486
|
-
|
|
1487
1488
|
/* eslint no-magic-numbers: ["error", { "ignore": [0, 1, 2, 180] }]*/
|
|
1488
1489
|
|
|
1489
1490
|
|
|
1490
1491
|
|
|
1492
|
+
|
|
1491
1493
|
const getArcPath = props => {
|
|
1492
1494
|
const {
|
|
1493
1495
|
cx,
|
|
@@ -1539,13 +1541,13 @@ const evaluateProps = props => {
|
|
|
1539
1541
|
});
|
|
1540
1542
|
};
|
|
1541
1543
|
const defaultProps = {
|
|
1542
|
-
pathComponent: /*#__PURE__*/
|
|
1544
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_path__WEBPACK_IMPORTED_MODULE_3__.Path, null),
|
|
1543
1545
|
role: "presentation",
|
|
1544
1546
|
shapeRendering: "auto"
|
|
1545
1547
|
};
|
|
1546
1548
|
const Arc = initialProps => {
|
|
1547
|
-
const props = evaluateProps(
|
|
1548
|
-
return /*#__PURE__*/
|
|
1549
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
1550
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
1549
1551
|
...props.events,
|
|
1550
1552
|
"aria-label": props.ariaLabel,
|
|
1551
1553
|
d: getArcPath(props),
|
|
@@ -1573,10 +1575,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1573
1575
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1574
1576
|
/* harmony export */ "Background": function() { return /* binding */ Background; }
|
|
1575
1577
|
/* harmony export */ });
|
|
1576
|
-
/* harmony import */ var
|
|
1577
|
-
/* harmony import */ var
|
|
1578
|
-
/* harmony import */ var
|
|
1579
|
-
/* harmony import */ var
|
|
1578
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1579
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1580
|
+
/* 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");
|
|
1581
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
1580
1582
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
1581
1583
|
/* harmony import */ var _rect__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./rect */ "./victory-primitives/rect.tsx");
|
|
1582
1584
|
/* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle */ "./victory-primitives/circle.tsx");
|
|
@@ -1596,14 +1598,14 @@ const evaluateProps = props => {
|
|
|
1596
1598
|
});
|
|
1597
1599
|
};
|
|
1598
1600
|
const defaultProps = {
|
|
1599
|
-
circleComponent: /*#__PURE__*/
|
|
1600
|
-
rectComponent: /*#__PURE__*/
|
|
1601
|
+
circleComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_circle__WEBPACK_IMPORTED_MODULE_3__.Circle, null),
|
|
1602
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_rect__WEBPACK_IMPORTED_MODULE_4__.Rect, null),
|
|
1601
1603
|
role: "presentation",
|
|
1602
1604
|
shapeRendering: "auto"
|
|
1603
1605
|
};
|
|
1604
1606
|
const Background = initialProps => {
|
|
1605
|
-
const props = evaluateProps(
|
|
1606
|
-
return props.polar ? /*#__PURE__*/
|
|
1607
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
1608
|
+
return props.polar ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.circleComponent, {
|
|
1607
1609
|
...props.events,
|
|
1608
1610
|
style: props.style,
|
|
1609
1611
|
role: props.role,
|
|
@@ -1612,7 +1614,7 @@ const Background = initialProps => {
|
|
|
1612
1614
|
cy: props.y,
|
|
1613
1615
|
r: props.height,
|
|
1614
1616
|
className: props.className
|
|
1615
|
-
}) : /*#__PURE__*/
|
|
1617
|
+
}) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.rectComponent, {
|
|
1616
1618
|
...props.events,
|
|
1617
1619
|
style: props.style,
|
|
1618
1620
|
role: props.role,
|
|
@@ -1640,10 +1642,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1640
1642
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1641
1643
|
/* harmony export */ "Border": function() { return /* binding */ Border; }
|
|
1642
1644
|
/* harmony export */ });
|
|
1643
|
-
/* harmony import */ var
|
|
1644
|
-
/* harmony import */ var
|
|
1645
|
-
/* harmony import */ var
|
|
1646
|
-
/* harmony import */ var
|
|
1645
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1646
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1647
|
+
/* 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");
|
|
1648
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
1647
1649
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
1648
1650
|
/* harmony import */ var _rect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rect */ "./victory-primitives/rect.tsx");
|
|
1649
1651
|
|
|
@@ -1675,13 +1677,13 @@ const evaluateProps = props => {
|
|
|
1675
1677
|
});
|
|
1676
1678
|
};
|
|
1677
1679
|
const defaultProps = {
|
|
1678
|
-
rectComponent: /*#__PURE__*/
|
|
1680
|
+
rectComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_rect__WEBPACK_IMPORTED_MODULE_3__.Rect, null),
|
|
1679
1681
|
role: "presentation",
|
|
1680
1682
|
shapeRendering: "auto"
|
|
1681
1683
|
};
|
|
1682
1684
|
const Border = initialProps => {
|
|
1683
|
-
const props = evaluateProps(
|
|
1684
|
-
return /*#__PURE__*/
|
|
1685
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
1686
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.rectComponent, {
|
|
1685
1687
|
...props.events,
|
|
1686
1688
|
"aria-label": props.ariaLabel,
|
|
1687
1689
|
style: props.style,
|
|
@@ -1828,10 +1830,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1828
1830
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1829
1831
|
/* harmony export */ "LineSegment": function() { return /* binding */ LineSegment; }
|
|
1830
1832
|
/* harmony export */ });
|
|
1831
|
-
/* harmony import */ var
|
|
1832
|
-
/* harmony import */ var
|
|
1833
|
-
/* harmony import */ var
|
|
1834
|
-
/* harmony import */ var
|
|
1833
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1834
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1835
|
+
/* 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");
|
|
1836
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
1835
1837
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
1836
1838
|
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "./victory-primitives/line.tsx");
|
|
1837
1839
|
|
|
@@ -1863,13 +1865,13 @@ const evaluateProps = props => {
|
|
|
1863
1865
|
});
|
|
1864
1866
|
};
|
|
1865
1867
|
const defaultProps = {
|
|
1866
|
-
lineComponent: /*#__PURE__*/
|
|
1868
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
1867
1869
|
role: "presentation",
|
|
1868
1870
|
shapeRendering: "auto"
|
|
1869
1871
|
};
|
|
1870
1872
|
const LineSegment = initialProps => {
|
|
1871
|
-
const props = evaluateProps(
|
|
1872
|
-
return /*#__PURE__*/
|
|
1873
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
1874
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.lineComponent, {
|
|
1873
1875
|
...props.events,
|
|
1874
1876
|
"aria-label": props.ariaLabel,
|
|
1875
1877
|
style: props.style,
|
|
@@ -1985,10 +1987,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1985
1987
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1986
1988
|
/* harmony export */ "Point": function() { return /* binding */ Point; }
|
|
1987
1989
|
/* harmony export */ });
|
|
1988
|
-
/* harmony import */ var
|
|
1989
|
-
/* harmony import */ var
|
|
1990
|
-
/* harmony import */ var
|
|
1991
|
-
/* harmony import */ var
|
|
1990
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1991
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1992
|
+
/* 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");
|
|
1993
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
1992
1994
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
1993
1995
|
/* harmony import */ var _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/point-path-helpers */ "./victory-util/point-path-helpers.ts");
|
|
1994
1996
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/user-props */ "./victory-util/user-props.ts");
|
|
@@ -2042,14 +2044,14 @@ const evaluateProps = props => {
|
|
|
2042
2044
|
});
|
|
2043
2045
|
};
|
|
2044
2046
|
const defaultProps = {
|
|
2045
|
-
pathComponent: /*#__PURE__*/
|
|
2047
|
+
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_path__WEBPACK_IMPORTED_MODULE_4__.Path, null),
|
|
2046
2048
|
role: "presentation",
|
|
2047
2049
|
shapeRendering: "auto"
|
|
2048
2050
|
};
|
|
2049
2051
|
const Point = initialProps => {
|
|
2050
|
-
const props = evaluateProps(
|
|
2052
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
2051
2053
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_5__.getSafeUserProps(props);
|
|
2052
|
-
return /*#__PURE__*/
|
|
2054
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(props.pathComponent, {
|
|
2053
2055
|
...props.events,
|
|
2054
2056
|
"aria-label": props.ariaLabel,
|
|
2055
2057
|
d: getPath(props),
|
|
@@ -2197,10 +2199,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2197
2199
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2198
2200
|
/* harmony export */ "Whisker": function() { return /* binding */ Whisker; }
|
|
2199
2201
|
/* harmony export */ });
|
|
2200
|
-
/* harmony import */ var
|
|
2201
|
-
/* harmony import */ var
|
|
2202
|
-
/* harmony import */ var
|
|
2203
|
-
/* harmony import */ var
|
|
2202
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
2203
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
2204
|
+
/* 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");
|
|
2205
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
2204
2206
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
2205
2207
|
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line */ "./victory-primitives/line.tsx");
|
|
2206
2208
|
|
|
@@ -2230,13 +2232,13 @@ const evaluateProps = props => {
|
|
|
2230
2232
|
});
|
|
2231
2233
|
};
|
|
2232
2234
|
const defaultProps = {
|
|
2233
|
-
groupComponent: /*#__PURE__*/
|
|
2234
|
-
lineComponent: /*#__PURE__*/
|
|
2235
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null),
|
|
2236
|
+
lineComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_line__WEBPACK_IMPORTED_MODULE_3__.Line, null),
|
|
2235
2237
|
role: "presentation",
|
|
2236
2238
|
shapeRendering: "auto"
|
|
2237
2239
|
};
|
|
2238
2240
|
const Whisker = initialProps => {
|
|
2239
|
-
const props = evaluateProps(
|
|
2241
|
+
const props = evaluateProps(lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, initialProps, defaultProps));
|
|
2240
2242
|
const {
|
|
2241
2243
|
ariaLabel,
|
|
2242
2244
|
groupComponent,
|
|
@@ -2264,10 +2266,10 @@ const Whisker = initialProps => {
|
|
|
2264
2266
|
role,
|
|
2265
2267
|
shapeRendering
|
|
2266
2268
|
};
|
|
2267
|
-
return /*#__PURE__*/
|
|
2269
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(groupComponent, {}, [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(lineComponent, Object.assign({
|
|
2268
2270
|
key: "major-whisker",
|
|
2269
2271
|
"aria-label": ariaLabel
|
|
2270
|
-
}, baseProps, majorWhisker)), /*#__PURE__*/
|
|
2272
|
+
}, baseProps, majorWhisker)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(lineComponent, Object.assign({
|
|
2271
2273
|
key: "minor-whisker",
|
|
2272
2274
|
"aria-label": ariaLabel
|
|
2273
2275
|
}, baseProps, minorWhisker))]);
|
|
@@ -3408,22 +3410,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3408
3410
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3409
3411
|
/* harmony export */ "VictoryTransition": function() { return /* binding */ VictoryTransition; }
|
|
3410
3412
|
/* harmony export */ });
|
|
3411
|
-
/* harmony import */ var
|
|
3412
|
-
/* harmony import */ var
|
|
3413
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
3414
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3413
3415
|
/* 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");
|
|
3414
3416
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
3415
|
-
/* harmony import */ var
|
|
3416
|
-
/* harmony import */ var
|
|
3417
|
+
/* 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");
|
|
3418
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_2__);
|
|
3419
|
+
/* 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");
|
|
3420
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
3417
3421
|
/* harmony import */ var _victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-animation/victory-animation */ "./victory-animation/victory-animation.tsx");
|
|
3418
3422
|
/* harmony import */ var _victory_util_collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-util/collection */ "./victory-util/collection.tsx");
|
|
3419
3423
|
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/helpers */ "./victory-util/helpers.ts");
|
|
3420
3424
|
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/timer-context */ "./victory-util/timer-context.ts");
|
|
3421
3425
|
/* harmony import */ var _victory_util_transitions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/transitions */ "./victory-util/transitions.ts");
|
|
3422
|
-
|
|
3423
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_3__);
|
|
3426
|
+
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); }
|
|
3424
3427
|
|
|
3425
3428
|
|
|
3426
|
-
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); }
|
|
3427
3429
|
|
|
3428
3430
|
|
|
3429
3431
|
|
|
@@ -3431,7 +3433,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
3431
3433
|
|
|
3432
3434
|
|
|
3433
3435
|
|
|
3434
|
-
class VictoryTransition extends (
|
|
3436
|
+
class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
3435
3437
|
static displayName = "VictoryTransition";
|
|
3436
3438
|
static contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_4__["default"];
|
|
3437
3439
|
constructor(props, context) {
|
|
@@ -3448,7 +3450,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
3448
3450
|
componentDidMount() {
|
|
3449
3451
|
this.setState({
|
|
3450
3452
|
nodesShouldLoad: true
|
|
3451
|
-
});
|
|
3453
|
+
});
|
|
3452
3454
|
}
|
|
3453
3455
|
shouldComponentUpdate(nextProps) {
|
|
3454
3456
|
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default()(this.props, nextProps)) {
|
|
@@ -3474,8 +3476,8 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
3474
3476
|
nextProps
|
|
3475
3477
|
};
|
|
3476
3478
|
}
|
|
3477
|
-
const oldChildren =
|
|
3478
|
-
const nextChildren =
|
|
3479
|
+
const oldChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
3480
|
+
const nextChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextProps.children);
|
|
3479
3481
|
const {
|
|
3480
3482
|
nodesWillExit,
|
|
3481
3483
|
nodesWillEnter,
|
|
@@ -3498,12 +3500,12 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
3498
3500
|
const childDomain = child.props && child.type.getDomain(child.props, axis);
|
|
3499
3501
|
return childDomain ? memo.concat(childDomain) : memo;
|
|
3500
3502
|
} else if (child.props && child.props.children) {
|
|
3501
|
-
return memo.concat(getChildDomains(
|
|
3503
|
+
return memo.concat(getChildDomains(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
3502
3504
|
}
|
|
3503
3505
|
return memo;
|
|
3504
3506
|
}, []);
|
|
3505
3507
|
};
|
|
3506
|
-
const child =
|
|
3508
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
3507
3509
|
const childProps = child.props || {};
|
|
3508
3510
|
const domain = Array.isArray(childProps.domain) ? childProps.domain : childProps.domain && childProps.domain[axis];
|
|
3509
3511
|
if (!childProps.children && domain) {
|
|
@@ -3536,7 +3538,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
3536
3538
|
render() {
|
|
3537
3539
|
const props = this.pickProps();
|
|
3538
3540
|
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));
|
|
3539
|
-
const child =
|
|
3541
|
+
const child = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children)[0];
|
|
3540
3542
|
const transitionProps = getTransitionProps(child);
|
|
3541
3543
|
this.transitionProps = transitionProps;
|
|
3542
3544
|
const domain = {
|
|
@@ -3550,21 +3552,21 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
|
|
|
3550
3552
|
}, transitionProps, child.props);
|
|
3551
3553
|
const animationWhitelist = props.animationWhitelist || [];
|
|
3552
3554
|
const whitelist = animationWhitelist.concat(["clipWidth"]);
|
|
3553
|
-
const propsToAnimate = whitelist.length ?
|
|
3554
|
-
return /*#__PURE__*/
|
|
3555
|
+
const propsToAnimate = whitelist.length ? lodash_pick__WEBPACK_IMPORTED_MODULE_2___default()(combinedProps, whitelist) : combinedProps;
|
|
3556
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_animation_victory_animation__WEBPACK_IMPORTED_MODULE_8__.VictoryAnimation, _extends({}, combinedProps.animate, {
|
|
3555
3557
|
data: propsToAnimate
|
|
3556
3558
|
}), newProps => {
|
|
3557
3559
|
if (child.props.groupComponent) {
|
|
3558
|
-
const groupComponent = this.continuous ? /*#__PURE__*/
|
|
3560
|
+
const groupComponent = this.continuous ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child.props.groupComponent, {
|
|
3559
3561
|
clipWidth: newProps.clipWidth || 0
|
|
3560
3562
|
}) : child.props.groupComponent;
|
|
3561
|
-
return /*#__PURE__*/
|
|
3563
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
3562
3564
|
animate: null,
|
|
3563
3565
|
animating: true,
|
|
3564
3566
|
groupComponent
|
|
3565
3567
|
}, newProps, combinedProps));
|
|
3566
3568
|
}
|
|
3567
|
-
return /*#__PURE__*/
|
|
3569
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
3568
3570
|
animate: null,
|
|
3569
3571
|
animating: true
|
|
3570
3572
|
}, newProps, combinedProps));
|
|
@@ -3585,14 +3587,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3585
3587
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3586
3588
|
/* harmony export */ "addEvents": function() { return /* binding */ addEvents; }
|
|
3587
3589
|
/* harmony export */ });
|
|
3588
|
-
/* harmony import */ var
|
|
3589
|
-
/* harmony import */ var
|
|
3590
|
-
/* harmony import */ var
|
|
3591
|
-
/* harmony import */ var
|
|
3592
|
-
/* harmony import */ var
|
|
3593
|
-
/* harmony import */ var
|
|
3594
|
-
/* harmony import */ var
|
|
3595
|
-
/* harmony import */ var
|
|
3590
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
3591
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3592
|
+
/* 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");
|
|
3593
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
3594
|
+
/* 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");
|
|
3595
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
3596
|
+
/* 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");
|
|
3597
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
3596
3598
|
/* 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");
|
|
3597
3599
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
3598
3600
|
/* harmony import */ var _victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-transition/victory-transition */ "./victory-transition/victory-transition.tsx");
|
|
@@ -3662,7 +3664,7 @@ const defaultComponents = [{
|
|
|
3662
3664
|
function addEvents(WrappedComponent, options) {
|
|
3663
3665
|
if (options === void 0) {
|
|
3664
3666
|
options = {};
|
|
3665
|
-
} // eslint-disable-next-line @typescript-eslint/no-empty-
|
|
3667
|
+
} // eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
3666
3668
|
// @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
|
|
3667
3669
|
class AddEventsMixin extends WrappedComponent {
|
|
3668
3670
|
constructor(props) {
|
|
@@ -3739,8 +3741,8 @@ function addEvents(WrappedComponent, options) {
|
|
|
3739
3741
|
return {};
|
|
3740
3742
|
}
|
|
3741
3743
|
const getState = (key, type) => {
|
|
3742
|
-
const result =
|
|
3743
|
-
return
|
|
3744
|
+
const result = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.getEventState(key, type), this.getSharedEventState(key, type));
|
|
3745
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
|
|
3744
3746
|
};
|
|
3745
3747
|
const components = options.components || defaultComponents;
|
|
3746
3748
|
const stateChanges = components.map(component => {
|
|
@@ -3753,7 +3755,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
3753
3755
|
return stateChanges;
|
|
3754
3756
|
}
|
|
3755
3757
|
applyExternalMutations(props, externalMutations) {
|
|
3756
|
-
if (!
|
|
3758
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
3757
3759
|
const callbacks = props.externalEventMutations.reduce((memo, mutation) => (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo, []);
|
|
3758
3760
|
const compiledCallbacks = callbacks.length ? () => {
|
|
3759
3761
|
callbacks.forEach(c => c());
|
|
@@ -3786,7 +3788,7 @@ function addEvents(WrappedComponent, options) {
|
|
|
3786
3788
|
sharedEvents,
|
|
3787
3789
|
externalEventMutations
|
|
3788
3790
|
} = props;
|
|
3789
|
-
return
|
|
3791
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
3790
3792
|
}
|
|
3791
3793
|
cacheValues(obj) {
|
|
3792
3794
|
Object.keys(obj).forEach(key => {
|
|
@@ -3797,10 +3799,10 @@ function addEvents(WrappedComponent, options) {
|
|
|
3797
3799
|
const getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
|
|
3798
3800
|
const sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
3799
3801
|
const parentState = this.getEventState("parent", "parent");
|
|
3800
|
-
const baseParentProps =
|
|
3802
|
+
const baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentState, sharedParentState);
|
|
3801
3803
|
const parentPropsList = baseParentProps.parentControlledProps;
|
|
3802
|
-
const parentProps = parentPropsList ?
|
|
3803
|
-
const modifiedProps =
|
|
3804
|
+
const parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(baseParentProps, parentPropsList) : {};
|
|
3805
|
+
const modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parentProps, props);
|
|
3804
3806
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
3805
3807
|
}
|
|
3806
3808
|
getAllEvents(props) {
|
|
@@ -3820,18 +3822,18 @@ function addEvents(WrappedComponent, options) {
|
|
|
3820
3822
|
const currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
|
|
3821
3823
|
if (this.hasEvents) {
|
|
3822
3824
|
const baseEvents = this.getEvents(this.props, type, key);
|
|
3823
|
-
const componentProps =
|
|
3825
|
+
const componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
3824
3826
|
index,
|
|
3825
3827
|
key: id
|
|
3826
3828
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
3827
3829
|
id
|
|
3828
3830
|
});
|
|
3829
|
-
const events =
|
|
3831
|
+
const events = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
3830
3832
|
return Object.assign({}, componentProps, {
|
|
3831
3833
|
events
|
|
3832
3834
|
});
|
|
3833
3835
|
}
|
|
3834
|
-
return
|
|
3836
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
3835
3837
|
index,
|
|
3836
3838
|
key: id
|
|
3837
3839
|
}, currentProps, baseProps, {
|
|
@@ -3845,15 +3847,15 @@ function addEvents(WrappedComponent, options) {
|
|
|
3845
3847
|
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
3846
3848
|
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
3847
3849
|
}
|
|
3848
|
-
return /*#__PURE__*/
|
|
3850
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(component, parentProps, children);
|
|
3849
3851
|
}
|
|
3850
3852
|
animateComponent(props, defaultAnimationWhitelist) {
|
|
3851
3853
|
const animationWhitelist = typeof props.animate === "object" && props.animate?.animationWhitelist || defaultAnimationWhitelist;
|
|
3852
3854
|
const Comp = this.constructor;
|
|
3853
|
-
return /*#__PURE__*/
|
|
3855
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
3854
3856
|
animate: props.animate,
|
|
3855
3857
|
animationWhitelist: animationWhitelist
|
|
3856
|
-
}, /*#__PURE__*/
|
|
3858
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Comp, props));
|
|
3857
3859
|
}
|
|
3858
3860
|
|
|
3859
3861
|
// Used by `VictoryLine` and `VictoryArea`
|
|
@@ -3868,12 +3870,12 @@ function addEvents(WrappedComponent, options) {
|
|
|
3868
3870
|
let newMemo = memo;
|
|
3869
3871
|
const labelProps = this.getComponentProps(labelComponent, "labels", key);
|
|
3870
3872
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
3871
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
3873
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps));
|
|
3872
3874
|
}
|
|
3873
3875
|
return newMemo;
|
|
3874
3876
|
}, []);
|
|
3875
3877
|
const dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
3876
|
-
const children = [/*#__PURE__*/
|
|
3878
|
+
const children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps), ...labelComponents];
|
|
3877
3879
|
return this.renderContainer(groupComponent, children);
|
|
3878
3880
|
}
|
|
3879
3881
|
renderData(props, shouldRenderDatum) {
|
|
@@ -3888,14 +3890,14 @@ function addEvents(WrappedComponent, options) {
|
|
|
3888
3890
|
const dataComponents = this.dataKeys.reduce((validDataComponents, _dataKey, index) => {
|
|
3889
3891
|
const dataProps = this.getComponentProps(dataComponent, "data", index);
|
|
3890
3892
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
3891
|
-
validDataComponents.push( /*#__PURE__*/
|
|
3893
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(dataComponent, dataProps));
|
|
3892
3894
|
}
|
|
3893
3895
|
return validDataComponents;
|
|
3894
3896
|
}, []);
|
|
3895
3897
|
const labelComponents = this.dataKeys.map((_dataKey, index) => {
|
|
3896
3898
|
const labelProps = this.getComponentProps(labelComponent, "labels", index);
|
|
3897
3899
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
3898
|
-
return /*#__PURE__*/
|
|
3900
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(labelComponent, labelProps);
|
|
3899
3901
|
}
|
|
3900
3902
|
return undefined;
|
|
3901
3903
|
}).filter(Boolean);
|
|
@@ -3931,16 +3933,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3931
3933
|
/* harmony export */ "modifyProps": function() { return /* binding */ modifyProps; },
|
|
3932
3934
|
/* harmony export */ "stringTicks": function() { return /* binding */ stringTicks; }
|
|
3933
3935
|
/* harmony export */ });
|
|
3934
|
-
/* harmony import */ var
|
|
3935
|
-
/* harmony import */ var
|
|
3936
|
-
/* harmony import */ var
|
|
3937
|
-
/* harmony import */ var
|
|
3936
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
3937
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
3938
|
+
/* 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");
|
|
3939
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
3938
3940
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
3939
3941
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
3940
|
-
/* harmony import */ var
|
|
3941
|
-
/* harmony import */ var
|
|
3942
|
-
/* harmony import */ var
|
|
3943
|
-
/* harmony import */ var
|
|
3942
|
+
/* 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");
|
|
3943
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
3944
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/orderBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/orderBy.js");
|
|
3945
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
3944
3946
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
3945
3947
|
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain */ "./victory-util/domain.ts");
|
|
3946
3948
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
@@ -3987,7 +3989,7 @@ function findAxisComponents(childComponents, predicate) {
|
|
|
3987
3989
|
if (child.type && child.type.role === "axis" && predicateFunction(child)) {
|
|
3988
3990
|
return memo.concat(child);
|
|
3989
3991
|
} else if (child.props && child.props.children) {
|
|
3990
|
-
return memo.concat(findAxes(
|
|
3992
|
+
return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
3991
3993
|
}
|
|
3992
3994
|
return memo;
|
|
3993
3995
|
}, []);
|
|
@@ -4025,7 +4027,7 @@ function getAxisComponentsWithParent(childComponents, type) {
|
|
|
4025
4027
|
if (child.type && child.type.role === "axis" && matchesType(child)) {
|
|
4026
4028
|
return memo.concat(child);
|
|
4027
4029
|
} else if (child.props && child.props.children) {
|
|
4028
|
-
const childAxis = findComponents(
|
|
4030
|
+
const childAxis = findComponents(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children));
|
|
4029
4031
|
return childAxis.length > 0 ? memo.concat(child) : memo;
|
|
4030
4032
|
}
|
|
4031
4033
|
return memo;
|
|
@@ -4084,7 +4086,7 @@ function getDefaultTickFormat(props) {
|
|
|
4084
4086
|
return stringTicks(props) ? (x, index) => tickValues[index] : fallbackFormat;
|
|
4085
4087
|
}
|
|
4086
4088
|
const invertedStringMap = stringMap && _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
4087
|
-
const tickValueArray =
|
|
4089
|
+
const tickValueArray = lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default()(Object.values(stringMap), n => n);
|
|
4088
4090
|
const dataNames = tickValueArray.map(tick => invertedStringMap[tick]);
|
|
4089
4091
|
// string ticks should have one tick of padding at the beginning
|
|
4090
4092
|
const dataTicks = ["", ...dataNames, ""];
|
|
@@ -4121,14 +4123,14 @@ function getTickArray(props) {
|
|
|
4121
4123
|
if (tickValues && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickValues)) {
|
|
4122
4124
|
ticks = stringMap ? tickValues.map(tick => stringMap[tick]) : _helpers__WEBPACK_IMPORTED_MODULE_6__.range(1, tickValues.length + 1);
|
|
4123
4125
|
}
|
|
4124
|
-
const tickArray = ticks ?
|
|
4126
|
+
const tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(ticks) : getTicksFromFormat();
|
|
4125
4127
|
const buildTickArray = arr => {
|
|
4126
4128
|
const newTickArray = [];
|
|
4127
4129
|
const domain = props.domain && props.domain[axis] || props.domain;
|
|
4128
4130
|
if (arr) {
|
|
4129
4131
|
arr.forEach((t, index) => {
|
|
4130
4132
|
if (Array.isArray(domain)) {
|
|
4131
|
-
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain) && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain)) {
|
|
4133
|
+
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain).valueOf() && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain).valueOf()) {
|
|
4132
4134
|
newTickArray.push({
|
|
4133
4135
|
value: t,
|
|
4134
4136
|
index
|
|
@@ -4217,7 +4219,7 @@ function getTicks(props, scale, filterZero) {
|
|
|
4217
4219
|
* @param {String} axis: either x or y
|
|
4218
4220
|
* @returns {Array} returns a domain from tickValues
|
|
4219
4221
|
*/
|
|
4220
|
-
|
|
4222
|
+
|
|
4221
4223
|
function getDomainFromData(props, axis) {
|
|
4222
4224
|
const {
|
|
4223
4225
|
polar,
|
|
@@ -4280,7 +4282,7 @@ function modifyProps(props, fallbackProps) {
|
|
|
4280
4282
|
if (role === "axis") {
|
|
4281
4283
|
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
4282
4284
|
}
|
|
4283
|
-
const axisTheme =
|
|
4285
|
+
const axisTheme = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.theme[role], props.theme.axis);
|
|
4284
4286
|
const theme = Object.assign({}, props.theme, {
|
|
4285
4287
|
axis: axisTheme
|
|
4286
4288
|
});
|
|
@@ -4384,24 +4386,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4384
4386
|
/* harmony export */ "getStringsFromData": function() { return /* binding */ getStringsFromData; },
|
|
4385
4387
|
/* harmony export */ "isDataComponent": function() { return /* binding */ isDataComponent; }
|
|
4386
4388
|
/* harmony export */ });
|
|
4387
|
-
/* harmony import */ var
|
|
4388
|
-
/* harmony import */ var
|
|
4389
|
-
/* harmony import */ var
|
|
4390
|
-
/* harmony import */ var
|
|
4389
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
4390
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4391
|
+
/* 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");
|
|
4392
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
4391
4393
|
/* 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");
|
|
4392
4394
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__);
|
|
4393
|
-
/* harmony import */ var
|
|
4394
|
-
/* harmony import */ var
|
|
4395
|
-
/* harmony import */ var
|
|
4396
|
-
/* harmony import */ var
|
|
4397
|
-
/* harmony import */ var
|
|
4398
|
-
/* harmony import */ var
|
|
4399
|
-
/* harmony import */ var
|
|
4400
|
-
/* harmony import */ var
|
|
4401
|
-
/* harmony import */ var
|
|
4402
|
-
/* harmony import */ var
|
|
4403
|
-
/* harmony import */ var
|
|
4404
|
-
/* harmony import */ var
|
|
4395
|
+
/* 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");
|
|
4396
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__);
|
|
4397
|
+
/* 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");
|
|
4398
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__);
|
|
4399
|
+
/* 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");
|
|
4400
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__);
|
|
4401
|
+
/* 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");
|
|
4402
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__);
|
|
4403
|
+
/* 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");
|
|
4404
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_7__);
|
|
4405
|
+
/* 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");
|
|
4406
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_8__);
|
|
4405
4407
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
4406
4408
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
4407
4409
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scale */ "./victory-util/scale.ts");
|
|
@@ -4414,7 +4416,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4414
4416
|
|
|
4415
4417
|
|
|
4416
4418
|
|
|
4417
|
-
/* eslint-disable no-use-before-define */
|
|
4418
4419
|
|
|
4419
4420
|
|
|
4420
4421
|
|
|
@@ -4436,7 +4437,7 @@ function getLength(data) {
|
|
|
4436
4437
|
|
|
4437
4438
|
// Returns generated data for a given axis based on domain and sample from props
|
|
4438
4439
|
function generateDataArray(props, axis) {
|
|
4439
|
-
const propsDomain =
|
|
4440
|
+
const propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
4440
4441
|
const domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis).domain();
|
|
4441
4442
|
const samples = props.samples || 1;
|
|
4442
4443
|
const domainMax = Math.max(...domain);
|
|
@@ -4461,7 +4462,7 @@ function sortData(dataset, sortKey, sortOrder) {
|
|
|
4461
4462
|
formattedSortKey = `_${sortKey}`;
|
|
4462
4463
|
}
|
|
4463
4464
|
const order = sortOrder === "ascending" ? "asc" : "desc";
|
|
4464
|
-
return
|
|
4465
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default()(dataset, formattedSortKey, order);
|
|
4465
4466
|
}
|
|
4466
4467
|
|
|
4467
4468
|
// This method will remove data points that break certain scales. (log scale only)
|
|
@@ -4505,7 +4506,7 @@ function getEventKey(key) {
|
|
|
4505
4506
|
return () => undefined;
|
|
4506
4507
|
}
|
|
4507
4508
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
4508
|
-
return
|
|
4509
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_7___default()(key);
|
|
4509
4510
|
}
|
|
4510
4511
|
|
|
4511
4512
|
// Returns data with an eventKey prop added to each datum
|
|
@@ -4540,8 +4541,6 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
4540
4541
|
const isUnderMinY = underMin(minDomainY);
|
|
4541
4542
|
const isOverMaxX = overMax(maxDomainX);
|
|
4542
4543
|
const isOverMaxY = overMax(maxDomainY);
|
|
4543
|
-
|
|
4544
|
-
// eslint-disable-next-line complexity
|
|
4545
4544
|
return dataset.map(datum => {
|
|
4546
4545
|
let {
|
|
4547
4546
|
_x,
|
|
@@ -4566,12 +4565,12 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
4566
4565
|
if (isUnderMinY(baseline) && !isUnderMinY(value)) _y0 = minDomainY;
|
|
4567
4566
|
// baseline and value with only baseline above max, set baseline to maxDomainY
|
|
4568
4567
|
if (isOverMaxY(baseline) && !isOverMaxY(value)) _y0 = maxDomainY;
|
|
4569
|
-
return Object.assign({}, datum,
|
|
4568
|
+
return Object.assign({}, datum, lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
4570
4569
|
_x,
|
|
4571
4570
|
_y,
|
|
4572
4571
|
_y0,
|
|
4573
4572
|
_y1
|
|
4574
|
-
}, (
|
|
4573
|
+
}, (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default())));
|
|
4575
4574
|
});
|
|
4576
4575
|
}
|
|
4577
4576
|
|
|
@@ -4585,7 +4584,7 @@ function createStringMap(props, axis) {
|
|
|
4585
4584
|
const stringsFromAxes = getStringsFromAxes(props, axis);
|
|
4586
4585
|
const stringsFromCategories = getStringsFromCategories(props, axis);
|
|
4587
4586
|
const stringsFromData = getStringsFromData(props, axis);
|
|
4588
|
-
const allStrings =
|
|
4587
|
+
const allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default()([...stringsFromAxes, ...stringsFromCategories, ...stringsFromData]);
|
|
4589
4588
|
return allStrings.length === 0 ? null : allStrings.reduce((memo, string, index) => {
|
|
4590
4589
|
memo[string] = index + 1;
|
|
4591
4590
|
return memo;
|
|
@@ -4652,7 +4651,6 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
4652
4651
|
};
|
|
4653
4652
|
}
|
|
4654
4653
|
const data = preformattedData ? dataset : dataset.reduce((dataArr, datum, index) => {
|
|
4655
|
-
// eslint-disable-line complexity
|
|
4656
4654
|
const parsedDatum = parseDatum(datum);
|
|
4657
4655
|
const fallbackValues = {
|
|
4658
4656
|
x: index,
|
|
@@ -4672,7 +4670,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
4672
4670
|
return memo;
|
|
4673
4671
|
}, {});
|
|
4674
4672
|
const formattedDatum = Object.assign({}, processedValues, parsedDatum);
|
|
4675
|
-
if (!
|
|
4673
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(formattedDatum)) {
|
|
4676
4674
|
dataArr.push(formattedDatum);
|
|
4677
4675
|
}
|
|
4678
4676
|
return dataArr;
|
|
@@ -4799,7 +4797,7 @@ function isDataComponent(component) {
|
|
|
4799
4797
|
};
|
|
4800
4798
|
let role = getRole(component);
|
|
4801
4799
|
if (role === "portal") {
|
|
4802
|
-
const children =
|
|
4800
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
4803
4801
|
role = children.length ? getRole(children[0]) : "";
|
|
4804
4802
|
}
|
|
4805
4803
|
const whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -4934,14 +4932,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4934
4932
|
/* harmony export */ "getSymmetricDomain": function() { return /* binding */ getSymmetricDomain; },
|
|
4935
4933
|
/* harmony export */ "isDomainComponent": function() { return /* binding */ isDomainComponent; }
|
|
4936
4934
|
/* harmony export */ });
|
|
4937
|
-
/* harmony import */ var
|
|
4938
|
-
/* harmony import */ var
|
|
4939
|
-
/* harmony import */ var
|
|
4940
|
-
/* harmony import */ var
|
|
4935
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
4936
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
4937
|
+
/* 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");
|
|
4938
|
+
/* harmony import */ var lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isDate__WEBPACK_IMPORTED_MODULE_1__);
|
|
4941
4939
|
/* 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");
|
|
4942
4940
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
4943
|
-
/* harmony import */ var
|
|
4944
|
-
/* harmony import */ var
|
|
4941
|
+
/* 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");
|
|
4942
|
+
/* harmony import */ var lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
4945
4943
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "./victory-util/data.ts");
|
|
4946
4944
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "./victory-util/scale.ts");
|
|
4947
4945
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
@@ -4949,7 +4947,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4949
4947
|
|
|
4950
4948
|
|
|
4951
4949
|
|
|
4952
|
-
/* eslint-disable no-use-before-define */
|
|
4953
4950
|
|
|
4954
4951
|
|
|
4955
4952
|
|
|
@@ -5005,8 +5002,6 @@ function getExtremeFromData(dataset, axis, type) {
|
|
|
5005
5002
|
}, initialValue);
|
|
5006
5003
|
return containsDate ? new Date(result) : result;
|
|
5007
5004
|
}
|
|
5008
|
-
|
|
5009
|
-
// eslint-disable-next-line max-statements
|
|
5010
5005
|
function padDomain(domain, props, axis) {
|
|
5011
5006
|
if (!props.domainPadding) {
|
|
5012
5007
|
return domain;
|
|
@@ -5033,9 +5028,9 @@ function padDomain(domain, props, axis) {
|
|
|
5033
5028
|
max: max.valueOf() + simplePadding.right
|
|
5034
5029
|
};
|
|
5035
5030
|
const singleQuadrantDomainPadding = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.singleQuadrantDomainPadding) ? props.singleQuadrantDomainPadding[axis] : props.singleQuadrantDomainPadding;
|
|
5036
|
-
const addsQuadrants = min >= 0 && paddedDomain.min <= 0 || max <= 0 && paddedDomain.max >= 0;
|
|
5031
|
+
const addsQuadrants = min.valueOf() >= 0 && paddedDomain.min <= 0 || max.valueOf() <= 0 && paddedDomain.max >= 0;
|
|
5037
5032
|
const adjust = (val, type) => {
|
|
5038
|
-
const coerce = type === "min" && min >= 0 && val <= 0 || type === "max" && max <= 0 && val >= 0;
|
|
5033
|
+
const coerce = type === "min" && min.valueOf() >= 0 && val <= 0 || type === "max" && max.valueOf() <= 0 && val >= 0;
|
|
5039
5034
|
return coerce ? 0 : val;
|
|
5040
5035
|
};
|
|
5041
5036
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
@@ -5258,7 +5253,7 @@ function getMaxFromProps(props, axis) {
|
|
|
5258
5253
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.maxDomain) && props.maxDomain[axis] !== undefined) {
|
|
5259
5254
|
return props.maxDomain[axis];
|
|
5260
5255
|
}
|
|
5261
|
-
return typeof props.maxDomain === "number" ||
|
|
5256
|
+
return typeof props.maxDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.maxDomain) ? props.maxDomain : undefined;
|
|
5262
5257
|
}
|
|
5263
5258
|
|
|
5264
5259
|
/**
|
|
@@ -5271,7 +5266,7 @@ function getMinFromProps(props, axis) {
|
|
|
5271
5266
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.minDomain) && props.minDomain[axis] !== undefined) {
|
|
5272
5267
|
return props.minDomain[axis];
|
|
5273
5268
|
}
|
|
5274
|
-
return typeof props.minDomain === "number" ||
|
|
5269
|
+
return typeof props.minDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.minDomain) ? props.minDomain : undefined;
|
|
5275
5270
|
}
|
|
5276
5271
|
|
|
5277
5272
|
/**
|
|
@@ -5282,7 +5277,7 @@ function getMinFromProps(props, axis) {
|
|
|
5282
5277
|
* @returns {Array} the symmetric domain
|
|
5283
5278
|
*/
|
|
5284
5279
|
function getSymmetricDomain(domain, values) {
|
|
5285
|
-
const processedData =
|
|
5280
|
+
const processedData = lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default()(values.sort((a, b) => a - b));
|
|
5286
5281
|
const step = processedData[1] - processedData[0];
|
|
5287
5282
|
return [domain[0], domain[1] + step];
|
|
5288
5283
|
}
|
|
@@ -5298,7 +5293,7 @@ function isDomainComponent(component) {
|
|
|
5298
5293
|
};
|
|
5299
5294
|
let role = getRole(component);
|
|
5300
5295
|
if (role === "portal") {
|
|
5301
|
-
const children =
|
|
5296
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
5302
5297
|
role = children.length ? getRole(children[0]) : "";
|
|
5303
5298
|
}
|
|
5304
5299
|
const whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -5329,20 +5324,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5329
5324
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
5330
5325
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
5331
5326
|
/* harmony export */ });
|
|
5332
|
-
/* harmony import */ var
|
|
5333
|
-
/* harmony import */ var
|
|
5334
|
-
/* harmony import */ var
|
|
5335
|
-
/* harmony import */ var
|
|
5336
|
-
/* harmony import */ var
|
|
5337
|
-
/* harmony import */ var
|
|
5338
|
-
/* harmony import */ var
|
|
5339
|
-
/* harmony import */ var
|
|
5327
|
+
/* 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");
|
|
5328
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
5329
|
+
/* 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");
|
|
5330
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
5331
|
+
/* 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");
|
|
5332
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
5333
|
+
/* 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");
|
|
5334
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
5340
5335
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
5341
5336
|
|
|
5342
5337
|
|
|
5343
5338
|
|
|
5344
5339
|
|
|
5345
|
-
/* eslint-disable no-use-before-define */
|
|
5346
5340
|
|
|
5347
5341
|
const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
5348
5342
|
|
|
@@ -5390,11 +5384,10 @@ getScopedEvents) {
|
|
|
5390
5384
|
*/
|
|
5391
5385
|
const getAllEvents = () => {
|
|
5392
5386
|
// Mandatory usage: `getEvents.bind(this)`
|
|
5393
|
-
|
|
5387
|
+
|
|
5394
5388
|
if (Array.isArray(this.componentEvents)) {
|
|
5395
5389
|
return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
|
|
5396
5390
|
}
|
|
5397
|
-
/* eslint-enable no-invalid-this */
|
|
5398
5391
|
return props.events;
|
|
5399
5392
|
};
|
|
5400
5393
|
const allEvents = getAllEvents();
|
|
@@ -5414,12 +5407,12 @@ getScopedEvents) {
|
|
|
5414
5407
|
*/
|
|
5415
5408
|
// eslint-disable-next-line max-params
|
|
5416
5409
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
5417
|
-
if (
|
|
5410
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
5418
5411
|
return {};
|
|
5419
5412
|
}
|
|
5420
5413
|
|
|
5421
5414
|
// Mandatory usage: `getScopedEvents.bind(this)`
|
|
5422
|
-
|
|
5415
|
+
|
|
5423
5416
|
const newBaseProps = baseProps || this.baseProps;
|
|
5424
5417
|
// returns the original base props or base state of a given target element
|
|
5425
5418
|
const getTargetProps = (identifier, type) => {
|
|
@@ -5428,7 +5421,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
5428
5421
|
target,
|
|
5429
5422
|
key
|
|
5430
5423
|
} = identifier;
|
|
5431
|
-
// eslint-disable-next-line no-invalid-this
|
|
5432
5424
|
const baseType = type === "props" ? newBaseProps : this.state || {};
|
|
5433
5425
|
const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
|
|
5434
5426
|
return key === "parent" ? base.parent : base[key] && base[key][target];
|
|
@@ -5455,7 +5447,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
5455
5447
|
|
|
5456
5448
|
// returns the state object with mutated props applied for a single key
|
|
5457
5449
|
const getMutationObject = (key, childName) => {
|
|
5458
|
-
// eslint-disable-next-line no-invalid-this
|
|
5459
5450
|
const baseState = this.state || {};
|
|
5460
5451
|
if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
|
|
5461
5452
|
return baseState;
|
|
@@ -5528,11 +5519,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
5528
5519
|
// into a state mutation, and calls setState
|
|
5529
5520
|
// eslint-disable-next-line max-params
|
|
5530
5521
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
5531
|
-
// eslint-disable-next-line no-invalid-this
|
|
5532
5522
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
5533
|
-
if (!
|
|
5523
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
5534
5524
|
const callbacks = compileCallbacks(eventReturn);
|
|
5535
|
-
// eslint-disable-next-line no-invalid-this
|
|
5536
5525
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
5537
5526
|
}
|
|
5538
5527
|
};
|
|
@@ -5562,7 +5551,7 @@ function getPartialEvents(events, eventKey, childProps) {
|
|
|
5562
5551
|
// eslint-disable-next-line max-params
|
|
5563
5552
|
function getEventState(eventKey, namespace, childType) {
|
|
5564
5553
|
// Mandatory usage: `getEventState.bind(this)`
|
|
5565
|
-
|
|
5554
|
+
|
|
5566
5555
|
const state = this.state || {};
|
|
5567
5556
|
if (!childType) {
|
|
5568
5557
|
return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
|
|
@@ -5592,7 +5581,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
5592
5581
|
const childState = baseState[childName];
|
|
5593
5582
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
5594
5583
|
memo[childName] = mutation ? mutation : childState;
|
|
5595
|
-
return
|
|
5584
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
5596
5585
|
}, {});
|
|
5597
5586
|
}
|
|
5598
5587
|
|
|
@@ -5628,7 +5617,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
5628
5617
|
} else {
|
|
5629
5618
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
5630
5619
|
// will be used. (i.e. labels)
|
|
5631
|
-
const targets =
|
|
5620
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
5632
5621
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
5633
5622
|
const identifier = {
|
|
5634
5623
|
eventKey,
|
|
@@ -5637,10 +5626,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
5637
5626
|
};
|
|
5638
5627
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
5639
5628
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
5640
|
-
return
|
|
5629
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
5641
5630
|
}, {});
|
|
5642
5631
|
}
|
|
5643
|
-
return
|
|
5632
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
5644
5633
|
}, {});
|
|
5645
5634
|
}
|
|
5646
5635
|
|
|
@@ -5672,11 +5661,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
5672
5661
|
}
|
|
5673
5662
|
// find any mutation objects that match the target
|
|
5674
5663
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
5675
|
-
if (
|
|
5664
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
5676
5665
|
return undefined;
|
|
5677
5666
|
}
|
|
5678
5667
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
5679
|
-
if (
|
|
5668
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
5680
5669
|
return undefined;
|
|
5681
5670
|
}
|
|
5682
5671
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -5702,8 +5691,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
5702
5691
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
5703
5692
|
return match && match[1] && match[1].toLowerCase();
|
|
5704
5693
|
}
|
|
5705
|
-
const getGlobalEvents = events =>
|
|
5706
|
-
const omitGlobalEvents = events =>
|
|
5694
|
+
const getGlobalEvents = events => lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
5695
|
+
const omitGlobalEvents = events => lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
5707
5696
|
const emulateReactEvent = event => Object.assign(event, {
|
|
5708
5697
|
nativeEvent: event
|
|
5709
5698
|
});
|
|
@@ -5744,41 +5733,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5744
5733
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
5745
5734
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
5746
5735
|
/* harmony export */ });
|
|
5747
|
-
/* harmony import */ var
|
|
5748
|
-
/* harmony import */ var
|
|
5749
|
-
/* harmony import */ var
|
|
5750
|
-
/* harmony import */ var
|
|
5751
|
-
/* harmony import */ var
|
|
5752
|
-
/* harmony import */ var
|
|
5753
|
-
/* harmony import */ var
|
|
5754
|
-
/* harmony import */ var
|
|
5755
|
-
|
|
5736
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5737
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5738
|
+
/* 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");
|
|
5739
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
5740
|
+
/* 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");
|
|
5741
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
|
|
5742
|
+
/* 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");
|
|
5743
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
5756
5744
|
|
|
5757
5745
|
|
|
5758
|
-
/* eslint-disable no-use-before-define */
|
|
5759
5746
|
|
|
5760
|
-
// Private Functions
|
|
5761
5747
|
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5748
|
+
/**
|
|
5749
|
+
* Determine the range of a cartesian axis
|
|
5750
|
+
*/
|
|
5751
|
+
function getCartesianRange(options) {
|
|
5752
|
+
const vertical = options.axis !== "x";
|
|
5766
5753
|
if (vertical) {
|
|
5767
|
-
return [
|
|
5754
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
5768
5755
|
}
|
|
5769
|
-
return [padding.left,
|
|
5756
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
5770
5757
|
}
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5758
|
+
|
|
5759
|
+
/**
|
|
5760
|
+
* Determine the range of a polar axis in radians
|
|
5761
|
+
*/
|
|
5762
|
+
function getPolarRange(options) {
|
|
5763
|
+
if (options.axis === "x") {
|
|
5764
|
+
const startAngle = degreesToRadians(options.startAngle || 0);
|
|
5765
|
+
const endAngle = degreesToRadians(options.endAngle || 360);
|
|
5775
5766
|
return [startAngle, endAngle];
|
|
5776
5767
|
}
|
|
5777
|
-
return [
|
|
5768
|
+
return [options.innerRadius || 0, getRadius({
|
|
5769
|
+
height: options.height,
|
|
5770
|
+
width: options.width,
|
|
5771
|
+
padding: options.padding
|
|
5772
|
+
})];
|
|
5778
5773
|
}
|
|
5779
5774
|
|
|
5780
|
-
// Exported Functions
|
|
5781
|
-
|
|
5782
5775
|
/**
|
|
5783
5776
|
* Creates an object composed of the inverted keys and values of object.
|
|
5784
5777
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -5815,8 +5808,11 @@ function omit(originalObject, ks) {
|
|
|
5815
5808
|
}
|
|
5816
5809
|
return newObject;
|
|
5817
5810
|
}
|
|
5811
|
+
|
|
5812
|
+
/**
|
|
5813
|
+
* Coalesce the x and y values from a data point
|
|
5814
|
+
*/
|
|
5818
5815
|
function getPoint(datum) {
|
|
5819
|
-
const exists = val => val !== undefined;
|
|
5820
5816
|
const {
|
|
5821
5817
|
_x,
|
|
5822
5818
|
_x1,
|
|
@@ -5827,16 +5823,20 @@ function getPoint(datum) {
|
|
|
5827
5823
|
_y0,
|
|
5828
5824
|
_voronoiY
|
|
5829
5825
|
} = datum;
|
|
5830
|
-
const defaultX =
|
|
5831
|
-
const defaultY =
|
|
5826
|
+
const defaultX = _x1 ?? _x;
|
|
5827
|
+
const defaultY = _y1 ?? _y;
|
|
5832
5828
|
const point = {
|
|
5833
|
-
x:
|
|
5834
|
-
x0:
|
|
5835
|
-
y:
|
|
5836
|
-
y0:
|
|
5829
|
+
x: _voronoiX ?? defaultX,
|
|
5830
|
+
x0: _x0 ?? _x,
|
|
5831
|
+
y: _voronoiY ?? defaultY,
|
|
5832
|
+
y0: _y0 ?? _y
|
|
5837
5833
|
};
|
|
5838
|
-
return
|
|
5834
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
5839
5835
|
}
|
|
5836
|
+
|
|
5837
|
+
/**
|
|
5838
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
5839
|
+
*/
|
|
5840
5840
|
function scalePoint(props, datum) {
|
|
5841
5841
|
const {
|
|
5842
5842
|
scale,
|
|
@@ -5859,11 +5859,11 @@ function scalePoint(props, datum) {
|
|
|
5859
5859
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
5860
5860
|
};
|
|
5861
5861
|
}
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5862
|
+
|
|
5863
|
+
/**
|
|
5864
|
+
* Returns a padding value from a number or partial padding values
|
|
5865
|
+
*/
|
|
5866
|
+
function getPadding(padding) {
|
|
5867
5867
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
5868
5868
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
5869
5869
|
return {
|
|
@@ -5873,6 +5873,10 @@ function getPadding(props, name) {
|
|
|
5873
5873
|
right: paddingObj.right || paddingVal
|
|
5874
5874
|
};
|
|
5875
5875
|
}
|
|
5876
|
+
|
|
5877
|
+
/**
|
|
5878
|
+
* Returns true if the component is defined as a tooltip
|
|
5879
|
+
*/
|
|
5876
5880
|
function isTooltip(component) {
|
|
5877
5881
|
const labelRole = component && component.type && component.type.role;
|
|
5878
5882
|
return labelRole === "tooltip";
|
|
@@ -5887,8 +5891,8 @@ function getDefaultStyles(props, role) {
|
|
|
5887
5891
|
return defaultStyles;
|
|
5888
5892
|
}
|
|
5889
5893
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
5890
|
-
const labelStyle =
|
|
5891
|
-
return
|
|
5894
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
5895
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
5892
5896
|
labels: labelStyle
|
|
5893
5897
|
}, defaultStyles);
|
|
5894
5898
|
}
|
|
@@ -5896,7 +5900,7 @@ function getStyles(style, defaultStyles) {
|
|
|
5896
5900
|
const width = "100%";
|
|
5897
5901
|
const height = "100%";
|
|
5898
5902
|
if (!style) {
|
|
5899
|
-
return
|
|
5903
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
5900
5904
|
parent: {
|
|
5901
5905
|
height,
|
|
5902
5906
|
width
|
|
@@ -5912,14 +5916,18 @@ function getStyles(style, defaultStyles) {
|
|
|
5912
5916
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
5913
5917
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
5914
5918
|
return {
|
|
5915
|
-
parent:
|
|
5919
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
5916
5920
|
width,
|
|
5917
5921
|
height
|
|
5918
5922
|
}),
|
|
5919
|
-
labels:
|
|
5920
|
-
data:
|
|
5923
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
5924
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
5921
5925
|
};
|
|
5922
5926
|
}
|
|
5927
|
+
|
|
5928
|
+
/**
|
|
5929
|
+
* Returns the value of a prop or accessor function with the given props
|
|
5930
|
+
*/
|
|
5923
5931
|
function evaluateProp(prop, props) {
|
|
5924
5932
|
return isFunction(prop) ? prop(props) : prop;
|
|
5925
5933
|
}
|
|
@@ -5941,19 +5949,28 @@ function degreesToRadians(degrees) {
|
|
|
5941
5949
|
function radiansToDegrees(radians) {
|
|
5942
5950
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
5943
5951
|
}
|
|
5944
|
-
|
|
5952
|
+
|
|
5953
|
+
/**
|
|
5954
|
+
* Get the maximum radius that will fit in the container
|
|
5955
|
+
*/
|
|
5956
|
+
function getRadius(options) {
|
|
5957
|
+
const {
|
|
5958
|
+
width,
|
|
5959
|
+
height,
|
|
5960
|
+
padding
|
|
5961
|
+
} = options;
|
|
5945
5962
|
const {
|
|
5946
5963
|
left,
|
|
5947
5964
|
right,
|
|
5948
5965
|
top,
|
|
5949
5966
|
bottom
|
|
5950
|
-
} =
|
|
5951
|
-
const {
|
|
5952
|
-
width,
|
|
5953
|
-
height
|
|
5954
|
-
} = props;
|
|
5967
|
+
} = padding;
|
|
5955
5968
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
5956
5969
|
}
|
|
5970
|
+
|
|
5971
|
+
/**
|
|
5972
|
+
* Returns the origin for a polar chart within the padded area
|
|
5973
|
+
*/
|
|
5957
5974
|
function getPolarOrigin(props) {
|
|
5958
5975
|
const {
|
|
5959
5976
|
width,
|
|
@@ -5964,7 +5981,7 @@ function getPolarOrigin(props) {
|
|
|
5964
5981
|
bottom,
|
|
5965
5982
|
left,
|
|
5966
5983
|
right
|
|
5967
|
-
} = getPadding(props);
|
|
5984
|
+
} = getPadding(props.padding);
|
|
5968
5985
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
5969
5986
|
const offsetWidth = width / 2 + left - right;
|
|
5970
5987
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -5973,13 +5990,30 @@ function getPolarOrigin(props) {
|
|
|
5973
5990
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
5974
5991
|
};
|
|
5975
5992
|
}
|
|
5993
|
+
|
|
5994
|
+
/**
|
|
5995
|
+
* Determine the range of an axis based on the given props
|
|
5996
|
+
*/
|
|
5976
5997
|
function getRange(props, axis) {
|
|
5977
5998
|
if (props.range && props.range[axis]) {
|
|
5978
5999
|
return props.range[axis];
|
|
5979
6000
|
} else if (props.range && Array.isArray(props.range)) {
|
|
5980
6001
|
return props.range;
|
|
5981
6002
|
}
|
|
5982
|
-
return props.polar ? getPolarRange(
|
|
6003
|
+
return props.polar ? getPolarRange({
|
|
6004
|
+
axis,
|
|
6005
|
+
innerRadius: props.innerRadius,
|
|
6006
|
+
startAngle: props.startAngle,
|
|
6007
|
+
endAngle: props.endAngle,
|
|
6008
|
+
height: props.height,
|
|
6009
|
+
width: props.width,
|
|
6010
|
+
padding: getPadding(props.padding)
|
|
6011
|
+
}) : getCartesianRange({
|
|
6012
|
+
axis,
|
|
6013
|
+
height: props.height,
|
|
6014
|
+
width: props.width,
|
|
6015
|
+
padding: getPadding(props.padding)
|
|
6016
|
+
});
|
|
5983
6017
|
}
|
|
5984
6018
|
|
|
5985
6019
|
/**
|
|
@@ -6011,7 +6045,7 @@ function createAccessor(key) {
|
|
|
6011
6045
|
return x => x;
|
|
6012
6046
|
}
|
|
6013
6047
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
6014
|
-
return
|
|
6048
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
6015
6049
|
}
|
|
6016
6050
|
function modifyProps(props, fallbackProps, role) {
|
|
6017
6051
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -6020,7 +6054,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
6020
6054
|
const defaultObject = horizontal === undefined ? {} : {
|
|
6021
6055
|
horizontal
|
|
6022
6056
|
};
|
|
6023
|
-
return
|
|
6057
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
6024
6058
|
}
|
|
6025
6059
|
|
|
6026
6060
|
/**
|
|
@@ -6107,10 +6141,10 @@ initialMemo, combine) {
|
|
|
6107
6141
|
const childRole = child.type && child.type.role;
|
|
6108
6142
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
6109
6143
|
if (child.props && child.props.children) {
|
|
6110
|
-
const childProps = Object.assign({}, child.props,
|
|
6111
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
6112
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
6113
|
-
return /*#__PURE__*/
|
|
6144
|
+
const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
|
|
6145
|
+
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 => {
|
|
6146
|
+
const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
|
|
6147
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
|
|
6114
6148
|
});
|
|
6115
6149
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
6116
6150
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -6124,7 +6158,7 @@ initialMemo, combine) {
|
|
|
6124
6158
|
return newMemo;
|
|
6125
6159
|
}, initialMemo);
|
|
6126
6160
|
};
|
|
6127
|
-
const validChildren = children.filter(
|
|
6161
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
6128
6162
|
const childNames = validChildren.map((c, i) => i);
|
|
6129
6163
|
return traverseChildren(validChildren, childNames);
|
|
6130
6164
|
}
|
|
@@ -6144,10 +6178,10 @@ function isHorizontal(props) {
|
|
|
6144
6178
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
6145
6179
|
return memo || childProps.horizontal;
|
|
6146
6180
|
}
|
|
6147
|
-
return traverseChildren(
|
|
6181
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
6148
6182
|
}, false);
|
|
6149
6183
|
};
|
|
6150
|
-
return traverseChildren(
|
|
6184
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
6151
6185
|
}
|
|
6152
6186
|
|
|
6153
6187
|
/***/ }),
|
|
@@ -6182,10 +6216,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6182
6216
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6183
6217
|
/* harmony export */ "useAnimationState": function() { return /* binding */ useAnimationState; }
|
|
6184
6218
|
/* harmony export */ });
|
|
6185
|
-
/* harmony import */ var
|
|
6186
|
-
/* harmony import */ var
|
|
6187
|
-
/* harmony import */ var
|
|
6188
|
-
/* harmony import */ var
|
|
6219
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6220
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6221
|
+
/* 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");
|
|
6222
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6189
6223
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../collection */ "./victory-util/collection.tsx");
|
|
6190
6224
|
/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../transitions */ "./victory-util/transitions.ts");
|
|
6191
6225
|
|
|
@@ -6201,10 +6235,10 @@ const useAnimationState = function (initialState) {
|
|
|
6201
6235
|
if (initialState === void 0) {
|
|
6202
6236
|
initialState = INITIAL_STATE;
|
|
6203
6237
|
}
|
|
6204
|
-
const [state, _setState] =
|
|
6238
|
+
const [state, _setState] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(initialState);
|
|
6205
6239
|
|
|
6206
6240
|
// This allows us to use a state object and maintain the same API as this.setState
|
|
6207
|
-
const setState =
|
|
6241
|
+
const setState = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(newState => {
|
|
6208
6242
|
_setState(oldState => ({
|
|
6209
6243
|
...oldState,
|
|
6210
6244
|
...newState
|
|
@@ -6212,14 +6246,14 @@ const useAnimationState = function (initialState) {
|
|
|
6212
6246
|
}, [_setState]);
|
|
6213
6247
|
|
|
6214
6248
|
// This is a copy of Wrapper.getAnimationProps
|
|
6215
|
-
const getAnimationProps =
|
|
6249
|
+
const getAnimationProps = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((props, child, index) => {
|
|
6216
6250
|
if (!props?.animate) {
|
|
6217
6251
|
return child.props.animate;
|
|
6218
6252
|
}
|
|
6219
6253
|
const getFilteredState = () => {
|
|
6220
6254
|
let childrenTransitions = state && state.childrenTransitions;
|
|
6221
6255
|
childrenTransitions = _collection__WEBPACK_IMPORTED_MODULE_2__.isArrayOfArrays(childrenTransitions) ? childrenTransitions[index] : childrenTransitions;
|
|
6222
|
-
return
|
|
6256
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
6223
6257
|
childrenTransitions
|
|
6224
6258
|
}, state);
|
|
6225
6259
|
};
|
|
@@ -6230,28 +6264,28 @@ const useAnimationState = function (initialState) {
|
|
|
6230
6264
|
const getTransitionProps = _transitions__WEBPACK_IMPORTED_MODULE_3__.getTransitionPropsFactory(props, filteredState, newState => setState(newState));
|
|
6231
6265
|
getTransitions = childComponent => getTransitionProps(childComponent, index);
|
|
6232
6266
|
}
|
|
6233
|
-
return
|
|
6267
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
6234
6268
|
getTransitions,
|
|
6235
6269
|
parentState
|
|
6236
6270
|
}, props.animate, child.props.animate);
|
|
6237
6271
|
}, [state, setState]);
|
|
6238
6272
|
|
|
6239
6273
|
// This is a copy of Wrapper.setAnimationState
|
|
6240
|
-
const setAnimationState =
|
|
6274
|
+
const setAnimationState = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((props, nextProps) => {
|
|
6241
6275
|
if (!props?.animate) {
|
|
6242
6276
|
return;
|
|
6243
6277
|
}
|
|
6244
6278
|
if (props.animate.parentState) {
|
|
6245
6279
|
const nodesWillExit = props.animate.parentState.nodesWillExit;
|
|
6246
6280
|
const oldProps = nodesWillExit ? props : null;
|
|
6247
|
-
const newState =
|
|
6281
|
+
const newState = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
6248
6282
|
oldProps,
|
|
6249
6283
|
nextProps
|
|
6250
6284
|
}, props.animate.parentState);
|
|
6251
6285
|
setState(newState);
|
|
6252
6286
|
} else {
|
|
6253
|
-
const oldChildren =
|
|
6254
|
-
const nextChildren =
|
|
6287
|
+
const oldChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
6288
|
+
const nextChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextProps.children);
|
|
6255
6289
|
const isContinuous = child => {
|
|
6256
6290
|
const check = c => c.type && c.type.continuous;
|
|
6257
6291
|
return Array.isArray(child) ? child.some(check) : check(child);
|
|
@@ -6276,7 +6310,7 @@ const useAnimationState = function (initialState) {
|
|
|
6276
6310
|
});
|
|
6277
6311
|
}
|
|
6278
6312
|
}, [setState]);
|
|
6279
|
-
const getProps =
|
|
6313
|
+
const getProps = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(initialProps => {
|
|
6280
6314
|
return state && state.nodesWillExit ? state.oldProps || initialProps : initialProps;
|
|
6281
6315
|
}, [state]);
|
|
6282
6316
|
return {
|
|
@@ -6488,11 +6522,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6488
6522
|
/* harmony export */ "getProps": function() { return /* binding */ getProps; },
|
|
6489
6523
|
/* harmony export */ "getText": function() { return /* binding */ getText; }
|
|
6490
6524
|
/* harmony export */ });
|
|
6525
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
6491
6526
|
/* 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");
|
|
6492
6527
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
6493
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
6494
6528
|
|
|
6495
|
-
|
|
6529
|
+
|
|
6496
6530
|
|
|
6497
6531
|
// Private Functions
|
|
6498
6532
|
|
|
@@ -6803,11 +6837,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6803
6837
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6804
6838
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
6805
6839
|
/* harmony export */ });
|
|
6806
|
-
/* global console */
|
|
6840
|
+
/* global console process */
|
|
6807
6841
|
/* eslint-disable no-console */
|
|
6808
6842
|
|
|
6809
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
6810
6843
|
function warn(message) {
|
|
6844
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6845
|
+
// @ts-ignore - Webpack DefinePlugin will replace process.env.NODE_ENV
|
|
6811
6846
|
if (true) {
|
|
6812
6847
|
if (console && console.warn) {
|
|
6813
6848
|
console.warn(message);
|
|
@@ -7012,7 +7047,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7012
7047
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
7013
7048
|
/* harmony import */ var victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-vendor/d3-scale */ "../../victory-vendor/es/d3-scale.js");
|
|
7014
7049
|
|
|
7015
|
-
/* eslint-disable no-use-before-define */
|
|
7016
7050
|
|
|
7017
7051
|
|
|
7018
7052
|
|
|
@@ -7366,13 +7400,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7366
7400
|
/* harmony export */ "approximateTextSize": function() { return /* binding */ approximateTextSize; },
|
|
7367
7401
|
/* harmony export */ "convertLengthToPixels": function() { return /* binding */ convertLengthToPixels; }
|
|
7368
7402
|
/* harmony export */ });
|
|
7369
|
-
/* harmony import */ var
|
|
7370
|
-
/* harmony import */ var
|
|
7371
|
-
/* harmony import */ var
|
|
7372
|
-
/* harmony import */ var
|
|
7373
|
-
|
|
7374
|
-
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
7403
|
+
/* 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");
|
|
7404
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
7405
|
+
/* 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");
|
|
7406
|
+
/* harmony import */ var lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_memoize__WEBPACK_IMPORTED_MODULE_1__);
|
|
7407
|
+
// http://www.pearsonified.com/2012/01/characters-per-line.php
|
|
7375
7408
|
/* eslint-disable no-magic-numbers */
|
|
7409
|
+
|
|
7410
|
+
|
|
7411
|
+
|
|
7376
7412
|
// Based on measuring specific character widths
|
|
7377
7413
|
// as in the following example https://bl.ocks.org/tophtucker/62f93a4658387bb61e4510c37e2e97cf
|
|
7378
7414
|
// For new fonts: pull gist, open index.html locally, add font files (if not generic), enter font name in `font-family` input
|
|
@@ -7551,7 +7587,7 @@ const convertLengthToPixels = (length, fontSize) => {
|
|
|
7551
7587
|
};
|
|
7552
7588
|
const _prepareParams = (inputStyle, index) => {
|
|
7553
7589
|
const lineStyle = Array.isArray(inputStyle) ? inputStyle[index] : inputStyle;
|
|
7554
|
-
const style =
|
|
7590
|
+
const style = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, lineStyle, defaultStyle);
|
|
7555
7591
|
return Object.assign({}, style, {
|
|
7556
7592
|
fontFamily: style.fontFamily,
|
|
7557
7593
|
letterSpacing: typeof style.letterSpacing === "number" ? style.letterSpacing : convertLengthToPixels(String(style.letterSpacing), style.fontSize),
|
|
@@ -7599,7 +7635,7 @@ const _approximateDimensionsInternal = (text, style) => {
|
|
|
7599
7635
|
height: heightWithRotate * coefficients.heightOverlapCoef
|
|
7600
7636
|
};
|
|
7601
7637
|
};
|
|
7602
|
-
const _getMeasurementContainer =
|
|
7638
|
+
const _getMeasurementContainer = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()(() => {
|
|
7603
7639
|
const element = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
7604
7640
|
element.setAttribute("xlink", "http://www.w3.org/1999/xlink");
|
|
7605
7641
|
element.setAttribute("width", "300");
|
|
@@ -7620,7 +7656,7 @@ const styleToKeyComponent = style => {
|
|
|
7620
7656
|
}
|
|
7621
7657
|
return `${style.angle}:${style.fontFamily}:${style.fontSize}:${style.letterSpacing}:${style.lineHeight}`;
|
|
7622
7658
|
};
|
|
7623
|
-
const _measureDimensionsInternal =
|
|
7659
|
+
const _measureDimensionsInternal = lodash_memoize__WEBPACK_IMPORTED_MODULE_1___default()((text, style) => {
|
|
7624
7660
|
let containerElement = _getMeasurementContainer();
|
|
7625
7661
|
if (!containerElement.isConnected) {
|
|
7626
7662
|
_getMeasurementContainer.cache.clear?.();
|
|
@@ -7790,12 +7826,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7790
7826
|
/* harmony export */ "getInitialTransitionState": function() { return /* binding */ getInitialTransitionState; },
|
|
7791
7827
|
/* harmony export */ "getTransitionPropsFactory": function() { return /* binding */ getTransitionPropsFactory; }
|
|
7792
7828
|
/* harmony export */ });
|
|
7793
|
-
/* harmony import */ var
|
|
7794
|
-
/* harmony import */ var
|
|
7829
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7830
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7795
7831
|
/* 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");
|
|
7796
7832
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
7797
|
-
/* harmony import */ var
|
|
7798
|
-
/* harmony import */ var
|
|
7833
|
+
/* 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");
|
|
7834
|
+
/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_2__);
|
|
7799
7835
|
|
|
7800
7836
|
|
|
7801
7837
|
|
|
@@ -7886,13 +7922,13 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
7886
7922
|
const getTransitionsFromChildren = (old, next) => {
|
|
7887
7923
|
return old.map((child, idx) => {
|
|
7888
7924
|
if (child && child.props && child.props.children && next[idx]) {
|
|
7889
|
-
return getTransitionsFromChildren(
|
|
7925
|
+
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));
|
|
7890
7926
|
}
|
|
7891
7927
|
// get Transition entering and exiting nodes
|
|
7892
7928
|
return getTransition(child, next[idx]);
|
|
7893
7929
|
});
|
|
7894
7930
|
};
|
|
7895
|
-
const childrenTransitions = getTransitionsFromChildren(
|
|
7931
|
+
const childrenTransitions = getTransitionsFromChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(oldChildren), react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextChildren));
|
|
7896
7932
|
return {
|
|
7897
7933
|
nodesWillExit,
|
|
7898
7934
|
nodesWillEnter,
|
|
@@ -7906,7 +7942,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
7906
7942
|
};
|
|
7907
7943
|
}
|
|
7908
7944
|
function getInitialChildProps(animate, data) {
|
|
7909
|
-
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (
|
|
7945
|
+
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
7910
7946
|
return {
|
|
7911
7947
|
data: data.map((datum, idx) => Object.assign({}, datum, after(datum, idx, data)))
|
|
7912
7948
|
};
|
|
@@ -7923,7 +7959,7 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
7923
7959
|
data
|
|
7924
7960
|
};
|
|
7925
7961
|
}
|
|
7926
|
-
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (
|
|
7962
|
+
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
7927
7963
|
// If nodes need to exit, transform them with the provided onLoad.before function.
|
|
7928
7964
|
const newData = data.map((datum, idx) => {
|
|
7929
7965
|
return Object.assign({}, datum, before(datum, idx, data));
|
|
@@ -7934,8 +7970,6 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
7934
7970
|
clipWidth: 0
|
|
7935
7971
|
};
|
|
7936
7972
|
}
|
|
7937
|
-
|
|
7938
|
-
// eslint-disable-next-line max-params
|
|
7939
7973
|
function getChildOnLoad(animate, data, cb) {
|
|
7940
7974
|
const newAnimate = Object.assign({}, animate, {
|
|
7941
7975
|
onEnd: cb
|
|
@@ -7947,7 +7981,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
7947
7981
|
data
|
|
7948
7982
|
};
|
|
7949
7983
|
}
|
|
7950
|
-
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (
|
|
7984
|
+
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
7951
7985
|
// If nodes need to exit, transform them with the provided onLoad.after function.
|
|
7952
7986
|
newData = data.map((datum, idx) => {
|
|
7953
7987
|
return Object.assign({}, datum, after(datum, idx, data));
|
|
@@ -7958,7 +7992,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
7958
7992
|
};
|
|
7959
7993
|
}
|
|
7960
7994
|
|
|
7961
|
-
// eslint-disable-next-line max-params
|
|
7995
|
+
// eslint-disable-next-line max-params
|
|
7962
7996
|
function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
7963
7997
|
// Whether or not _this_ child has exiting nodes, we want the exit-
|
|
7964
7998
|
// transition for all children to have the same duration, delay, etc.
|
|
@@ -7969,7 +8003,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
7969
8003
|
// After the exit transition occurs, trigger the animations for
|
|
7970
8004
|
// nodes that are neither exiting nor entering.
|
|
7971
8005
|
animate.onEnd = cb;
|
|
7972
|
-
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (
|
|
8006
|
+
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
7973
8007
|
// If nodes need to exit, transform them with the provided onExit.before function.
|
|
7974
8008
|
newData = data.map((datum, idx) => {
|
|
7975
8009
|
const key = (datum.key || idx).toString();
|
|
@@ -7982,7 +8016,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
7982
8016
|
};
|
|
7983
8017
|
}
|
|
7984
8018
|
|
|
7985
|
-
// eslint-disable-next-line max-params
|
|
8019
|
+
// eslint-disable-next-line max-params
|
|
7986
8020
|
function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
7987
8021
|
let newAnimate = animate;
|
|
7988
8022
|
let newData = data;
|
|
@@ -7992,7 +8026,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
7992
8026
|
newAnimate = Object.assign({}, animate, {
|
|
7993
8027
|
onEnd: cb
|
|
7994
8028
|
});
|
|
7995
|
-
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (
|
|
8029
|
+
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
7996
8030
|
// We want the entering nodes to be included in the transition target
|
|
7997
8031
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
7998
8032
|
// so perform the `onEnter.before` transformation on each node.
|
|
@@ -8007,7 +8041,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
8007
8041
|
};
|
|
8008
8042
|
}
|
|
8009
8043
|
|
|
8010
|
-
// eslint-disable-next-line max-params
|
|
8044
|
+
// eslint-disable-next-line max-params
|
|
8011
8045
|
function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
8012
8046
|
// Whether or not _this_ child has entering nodes, we want the entering-
|
|
8013
8047
|
// transition for all children to have the same duration, delay, etc.
|
|
@@ -8019,7 +8053,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
8019
8053
|
// domain should encompass the nodes that will now enter. So perform
|
|
8020
8054
|
// the `onEnter.after` transformation on each node.
|
|
8021
8055
|
newAnimate.onEnd = cb;
|
|
8022
|
-
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (
|
|
8056
|
+
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
8023
8057
|
newData = data.map((datum, idx) => {
|
|
8024
8058
|
const key = getDatumKey(datum, idx);
|
|
8025
8059
|
return enteringNodes[key] ? Object.assign({}, datum, after(datum, idx, data)) : datum;
|
|
@@ -8114,8 +8148,6 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
8114
8148
|
}
|
|
8115
8149
|
return {};
|
|
8116
8150
|
};
|
|
8117
|
-
|
|
8118
|
-
// eslint-disable-next-line max-statements, complexity, max-len
|
|
8119
8151
|
return function getTransitionProps(child, index) {
|
|
8120
8152
|
const data = getChildData(child) || [];
|
|
8121
8153
|
const animate = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.animate, child.props.animate);
|
|
@@ -8313,16 +8345,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8313
8345
|
/* harmony export */ "getStyle": function() { return /* binding */ getStyle; },
|
|
8314
8346
|
/* harmony export */ "getWidth": function() { return /* binding */ getWidth; }
|
|
8315
8347
|
/* harmony export */ });
|
|
8316
|
-
/* harmony import */ var
|
|
8317
|
-
/* harmony import */ var
|
|
8318
|
-
/* harmony import */ var
|
|
8319
|
-
/* harmony import */ var
|
|
8348
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8349
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8350
|
+
/* 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");
|
|
8351
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8320
8352
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
8321
8353
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_2__);
|
|
8322
|
-
/* harmony import */ var
|
|
8323
|
-
/* harmony import */ var
|
|
8324
|
-
/* harmony import */ var
|
|
8325
|
-
/* harmony import */ var
|
|
8354
|
+
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/groupBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/groupBy.js");
|
|
8355
|
+
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3__);
|
|
8356
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/uniqBy */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqBy.js");
|
|
8357
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
8326
8358
|
/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./axis */ "./victory-util/axis.tsx");
|
|
8327
8359
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style */ "./victory-util/style.ts");
|
|
8328
8360
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "./victory-util/data.ts");
|
|
@@ -8416,7 +8448,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
8416
8448
|
maxDomain
|
|
8417
8449
|
};
|
|
8418
8450
|
let stack = 0;
|
|
8419
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
8451
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8420
8452
|
parentProps = addBinsToParentPropsIfHistogram({
|
|
8421
8453
|
children,
|
|
8422
8454
|
props,
|
|
@@ -8430,7 +8462,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
8430
8462
|
if (!_data__WEBPACK_IMPORTED_MODULE_7__.isDataComponent(child)) {
|
|
8431
8463
|
return null;
|
|
8432
8464
|
} else if (child.type && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(child.type.getData)) {
|
|
8433
|
-
childElement = parent ? /*#__PURE__*/
|
|
8465
|
+
childElement = parent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, parent.props) : child;
|
|
8434
8466
|
childData = childElement.type.getData(childProps);
|
|
8435
8467
|
} else {
|
|
8436
8468
|
childData = _data__WEBPACK_IMPORTED_MODULE_7__.getData(childProps);
|
|
@@ -8442,16 +8474,16 @@ function getDataFromChildren(props, childComponents) {
|
|
|
8442
8474
|
}, datum));
|
|
8443
8475
|
};
|
|
8444
8476
|
const stacked = children.filter(c => c.type && c.type.role === "stack").length;
|
|
8445
|
-
const combine = (memo, val) => memo.concat(
|
|
8477
|
+
const combine = (memo, val) => memo.concat(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default()(val, "_group"));
|
|
8446
8478
|
const datasets = _helpers__WEBPACK_IMPORTED_MODULE_6__.reduceChildren(children, iteratee, props, [], combine);
|
|
8447
8479
|
const group = stacked ? "_group" : "_stack";
|
|
8448
|
-
return Object.values(
|
|
8480
|
+
return Object.values(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default()(datasets, group));
|
|
8449
8481
|
}
|
|
8450
8482
|
function getData(props, childComponents) {
|
|
8451
8483
|
if (props.data) {
|
|
8452
8484
|
return _data__WEBPACK_IMPORTED_MODULE_7__.getData(props);
|
|
8453
8485
|
}
|
|
8454
|
-
return getDataFromChildren(props, childComponents ||
|
|
8486
|
+
return getDataFromChildren(props, childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
8455
8487
|
}
|
|
8456
8488
|
function getWidth(props, groupLength, seriesLength) {
|
|
8457
8489
|
const {
|
|
@@ -8503,8 +8535,7 @@ function getDefaultDomainPadding(props, axis, childComponents) {
|
|
|
8503
8535
|
};
|
|
8504
8536
|
}
|
|
8505
8537
|
function getDomainFromChildren(props, axis, childComponents) {
|
|
8506
|
-
|
|
8507
|
-
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(props.children);
|
|
8538
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8508
8539
|
const parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_7__.getData(props) : undefined;
|
|
8509
8540
|
const {
|
|
8510
8541
|
polar,
|
|
@@ -8542,7 +8573,7 @@ function getDomainFromChildren(props, axis, childComponents) {
|
|
|
8542
8573
|
return [min, max];
|
|
8543
8574
|
}
|
|
8544
8575
|
function getDomain(props, axis, childComponents) {
|
|
8545
|
-
const children = childComponents ||
|
|
8576
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8546
8577
|
const propsDomain = _domain__WEBPACK_IMPORTED_MODULE_8__.getDomainFromProps(props, axis);
|
|
8547
8578
|
const domainPadding = getDefaultDomainPadding(props, axis, children);
|
|
8548
8579
|
let domain;
|
|
@@ -8566,7 +8597,7 @@ function getScale(props, axis, childComponents) {
|
|
|
8566
8597
|
if (props.data) {
|
|
8567
8598
|
return _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis);
|
|
8568
8599
|
}
|
|
8569
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
8600
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8570
8601
|
const iteratee = child => {
|
|
8571
8602
|
const sharedProps = Object.assign({}, child.props, {
|
|
8572
8603
|
horizontal: props.horizontal
|
|
@@ -8635,8 +8666,8 @@ function getChildStyle(child, index, calculatedProps, theme) {
|
|
|
8635
8666
|
const dataWidth = role === "stack" ? {} : {
|
|
8636
8667
|
width: getWidth(calculatedProps)
|
|
8637
8668
|
};
|
|
8638
|
-
const dataStyle =
|
|
8639
|
-
const labelsStyle =
|
|
8669
|
+
const dataStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, childStyle.data, Object.assign({}, dataWidth, style.data, defaultColor));
|
|
8670
|
+
const labelsStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, childStyle.labels, style.labels);
|
|
8640
8671
|
return {
|
|
8641
8672
|
...childStyle,
|
|
8642
8673
|
parent: style.parent,
|
|
@@ -8692,7 +8723,7 @@ function getCategoryAndAxisStringsFromChildren(props, axis, childComponents) {
|
|
|
8692
8723
|
return lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default()([...categoryStrings, ...axisStrings].flat());
|
|
8693
8724
|
}
|
|
8694
8725
|
function getStringsFromChildren(props, childComponents) {
|
|
8695
|
-
const children = childComponents ||
|
|
8726
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8696
8727
|
const xStrings = getCategoryAndAxisStringsFromChildren(props, "x", children);
|
|
8697
8728
|
const yStrings = getCategoryAndAxisStringsFromChildren(props, "y", children);
|
|
8698
8729
|
const dataStrings = getStringsFromData(children);
|