victory-group 37.3.2 → 37.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/victory-group.js +271 -224
- package/dist/victory-group.min.js +1 -1
- package/es/helper-methods.d.ts +3 -12
- package/es/helper-methods.js +1 -1
- package/es/victory-group.d.ts +1 -1
- package/es/victory-group.js +5 -5
- package/lib/helper-methods.d.ts +3 -12
- package/lib/helper-methods.js +1 -1
- package/lib/victory-group.d.ts +1 -1
- package/lib/victory-group.js +5 -5
- package/package.json +3 -31
- package/src/helper-methods.tsx +1 -1
- package/src/victory-group.tsx +2 -1
package/dist/victory-group.js
CHANGED
|
@@ -75,7 +75,7 @@ function getCalculatedProps(initialProps, childComponents) {
|
|
|
75
75
|
y: baseScale.y.domain(domain.y).range(props.horizontal ? range.x : range.y)
|
|
76
76
|
};
|
|
77
77
|
const origin = polar ? props.origin : victory_core__WEBPACK_IMPORTED_MODULE_2__.getPolarOrigin(props);
|
|
78
|
-
const padding = victory_core__WEBPACK_IMPORTED_MODULE_2__.getPadding(props);
|
|
78
|
+
const padding = victory_core__WEBPACK_IMPORTED_MODULE_2__.getPadding(props.padding);
|
|
79
79
|
return {
|
|
80
80
|
datasets,
|
|
81
81
|
categories,
|
|
@@ -261,10 +261,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
261
261
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
262
262
|
/* harmony export */ "VictoryGroup": function() { return /* binding */ VictoryGroup; }
|
|
263
263
|
/* harmony export */ });
|
|
264
|
-
/* harmony import */ var
|
|
265
|
-
/* harmony import */ var
|
|
266
|
-
/* harmony import */ var
|
|
267
|
-
/* harmony import */ var
|
|
264
|
+
/* 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");
|
|
265
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
|
|
266
|
+
/* 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");
|
|
267
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
268
268
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
269
269
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
270
270
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
@@ -305,7 +305,7 @@ const VictoryGroupBase = initialProps => {
|
|
|
305
305
|
setAnimationState,
|
|
306
306
|
getProps
|
|
307
307
|
} = victory_core__WEBPACK_IMPORTED_MODULE_6__.useAnimationState();
|
|
308
|
-
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() =>
|
|
308
|
+
const propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, initialProps, defaultProps), [initialProps]);
|
|
309
309
|
const props = getProps(propsWithDefaults);
|
|
310
310
|
const modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_7__.modifyProps(props, fallbackProps, role);
|
|
311
311
|
const {
|
|
@@ -359,7 +359,7 @@ const VictoryGroupBase = initialProps => {
|
|
|
359
359
|
const userProps = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => victory_core__WEBPACK_IMPORTED_MODULE_9__.getSafeUserProps(propsWithDefaults), [propsWithDefaults]);
|
|
360
360
|
const container = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => {
|
|
361
361
|
if (standalone) {
|
|
362
|
-
const defaultContainerProps =
|
|
362
|
+
const defaultContainerProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, containerComponent.props, containerProps, userProps);
|
|
363
363
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(containerComponent, defaultContainerProps);
|
|
364
364
|
}
|
|
365
365
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(groupComponent, userProps);
|
|
@@ -376,7 +376,7 @@ const VictoryGroupBase = initialProps => {
|
|
|
376
376
|
}
|
|
377
377
|
};
|
|
378
378
|
}, [setAnimationState, previousProps, propsWithDefaults, props]);
|
|
379
|
-
if (!
|
|
379
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(events)) {
|
|
380
380
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_shared_events__WEBPACK_IMPORTED_MODULE_12__.VictorySharedEvents, {
|
|
381
381
|
container: container,
|
|
382
382
|
eventKey: eventKey,
|
|
@@ -4998,16 +4998,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4998
4998
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
4999
4999
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
5000
5000
|
/* harmony export */ });
|
|
5001
|
-
/* harmony import */ var
|
|
5002
|
-
/* harmony import */ var
|
|
5003
|
-
/* harmony import */ var
|
|
5004
|
-
/* harmony import */ var
|
|
5001
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5002
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5003
|
+
/* 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");
|
|
5004
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
5005
5005
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5006
5006
|
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
5007
5007
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
5008
5008
|
/* harmony import */ var _victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-portal/portal-outlet */ "../../victory-core/es/victory-portal/portal-outlet.js");
|
|
5009
5009
|
/* harmony import */ var _victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-portal/portal-context */ "../../victory-core/es/victory-portal/portal-context.js");
|
|
5010
|
-
|
|
5011
5010
|
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); }
|
|
5012
5011
|
|
|
5013
5012
|
|
|
@@ -5015,9 +5014,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
5015
5014
|
|
|
5016
5015
|
|
|
5017
5016
|
|
|
5017
|
+
|
|
5018
5018
|
const defaultProps = {
|
|
5019
5019
|
className: "VictoryContainer",
|
|
5020
|
-
portalComponent: /*#__PURE__*/
|
|
5020
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5021
5021
|
portalZIndex: 99,
|
|
5022
5022
|
responsive: true,
|
|
5023
5023
|
role: "img"
|
|
@@ -5034,10 +5034,10 @@ function useVictoryContainer(initialProps) {
|
|
|
5034
5034
|
height,
|
|
5035
5035
|
responsive
|
|
5036
5036
|
} = props;
|
|
5037
|
-
const localContainerRef = (0,
|
|
5037
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
5038
5038
|
|
|
5039
5039
|
// Generated ID stored in ref because it needs to persist across renders
|
|
5040
|
-
const generatedId = (0,
|
|
5040
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
5041
5041
|
const containerId = props.containerId ?? generatedId.current;
|
|
5042
5042
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
5043
5043
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -5096,7 +5096,7 @@ const VictoryContainer = initialProps => {
|
|
|
5096
5096
|
containerRef,
|
|
5097
5097
|
localContainerRef
|
|
5098
5098
|
} = useVictoryContainer(initialProps);
|
|
5099
|
-
|
|
5099
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
5100
5100
|
if (!events?.onWheel) return;
|
|
5101
5101
|
const handleWheel = e => e.preventDefault();
|
|
5102
5102
|
const container = localContainerRef?.current;
|
|
@@ -5106,7 +5106,7 @@ const VictoryContainer = initialProps => {
|
|
|
5106
5106
|
};
|
|
5107
5107
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5108
5108
|
}, []);
|
|
5109
|
-
return /*#__PURE__*/
|
|
5109
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5110
5110
|
className: className,
|
|
5111
5111
|
style: {
|
|
5112
5112
|
...style,
|
|
@@ -5120,7 +5120,7 @@ const VictoryContainer = initialProps => {
|
|
|
5120
5120
|
"data-ouia-component-type": ouiaType,
|
|
5121
5121
|
"data-ouia-safe": ouiaSafe,
|
|
5122
5122
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
5123
|
-
}, /*#__PURE__*/
|
|
5123
|
+
}, /*#__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({
|
|
5124
5124
|
width: width,
|
|
5125
5125
|
height: height,
|
|
5126
5126
|
tabIndex: tabIndex,
|
|
@@ -5133,11 +5133,11 @@ const VictoryContainer = initialProps => {
|
|
|
5133
5133
|
...dimensions,
|
|
5134
5134
|
pointerEvents: "all"
|
|
5135
5135
|
}
|
|
5136
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
5136
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
5137
5137
|
id: titleId
|
|
5138
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
5138
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
5139
5139
|
id: descId
|
|
5140
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
5140
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5141
5141
|
style: {
|
|
5142
5142
|
...dimensions,
|
|
5143
5143
|
zIndex: portalZIndex,
|
|
@@ -5145,7 +5145,7 @@ const VictoryContainer = initialProps => {
|
|
|
5145
5145
|
top: 0,
|
|
5146
5146
|
left: 0
|
|
5147
5147
|
}
|
|
5148
|
-
}, /*#__PURE__*/
|
|
5148
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
5149
5149
|
as: portalComponent,
|
|
5150
5150
|
width: width,
|
|
5151
5151
|
height: height,
|
|
@@ -6413,16 +6413,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6413
6413
|
/* harmony export */ "modifyProps": function() { return /* binding */ modifyProps; },
|
|
6414
6414
|
/* harmony export */ "stringTicks": function() { return /* binding */ stringTicks; }
|
|
6415
6415
|
/* harmony export */ });
|
|
6416
|
-
/* harmony import */ var
|
|
6417
|
-
/* harmony import */ var
|
|
6418
|
-
/* harmony import */ var
|
|
6419
|
-
/* harmony import */ var
|
|
6416
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6417
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6418
|
+
/* 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");
|
|
6419
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
6420
6420
|
/* 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");
|
|
6421
6421
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
6422
|
-
/* harmony import */ var
|
|
6423
|
-
/* harmony import */ var
|
|
6424
|
-
/* harmony import */ var
|
|
6425
|
-
/* harmony import */ var
|
|
6422
|
+
/* 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");
|
|
6423
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
6424
|
+
/* 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");
|
|
6425
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
6426
6426
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
6427
6427
|
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain */ "../../victory-core/es/victory-util/domain.js");
|
|
6428
6428
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -6469,7 +6469,7 @@ function findAxisComponents(childComponents, predicate) {
|
|
|
6469
6469
|
if (child.type && child.type.role === "axis" && predicateFunction(child)) {
|
|
6470
6470
|
return memo.concat(child);
|
|
6471
6471
|
} else if (child.props && child.props.children) {
|
|
6472
|
-
return memo.concat(findAxes(
|
|
6472
|
+
return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
6473
6473
|
}
|
|
6474
6474
|
return memo;
|
|
6475
6475
|
}, []);
|
|
@@ -6507,7 +6507,7 @@ function getAxisComponentsWithParent(childComponents, type) {
|
|
|
6507
6507
|
if (child.type && child.type.role === "axis" && matchesType(child)) {
|
|
6508
6508
|
return memo.concat(child);
|
|
6509
6509
|
} else if (child.props && child.props.children) {
|
|
6510
|
-
const childAxis = findComponents(
|
|
6510
|
+
const childAxis = findComponents(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children));
|
|
6511
6511
|
return childAxis.length > 0 ? memo.concat(child) : memo;
|
|
6512
6512
|
}
|
|
6513
6513
|
return memo;
|
|
@@ -6566,7 +6566,7 @@ function getDefaultTickFormat(props) {
|
|
|
6566
6566
|
return stringTicks(props) ? (x, index) => tickValues[index] : fallbackFormat;
|
|
6567
6567
|
}
|
|
6568
6568
|
const invertedStringMap = stringMap && _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
6569
|
-
const tickValueArray =
|
|
6569
|
+
const tickValueArray = lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default()(Object.values(stringMap), n => n);
|
|
6570
6570
|
const dataNames = tickValueArray.map(tick => invertedStringMap[tick]);
|
|
6571
6571
|
// string ticks should have one tick of padding at the beginning
|
|
6572
6572
|
const dataTicks = ["", ...dataNames, ""];
|
|
@@ -6603,14 +6603,14 @@ function getTickArray(props) {
|
|
|
6603
6603
|
if (tickValues && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickValues)) {
|
|
6604
6604
|
ticks = stringMap ? tickValues.map(tick => stringMap[tick]) : _helpers__WEBPACK_IMPORTED_MODULE_6__.range(1, tickValues.length + 1);
|
|
6605
6605
|
}
|
|
6606
|
-
const tickArray = ticks ?
|
|
6606
|
+
const tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(ticks) : getTicksFromFormat();
|
|
6607
6607
|
const buildTickArray = arr => {
|
|
6608
6608
|
const newTickArray = [];
|
|
6609
6609
|
const domain = props.domain && props.domain[axis] || props.domain;
|
|
6610
6610
|
if (arr) {
|
|
6611
6611
|
arr.forEach((t, index) => {
|
|
6612
6612
|
if (Array.isArray(domain)) {
|
|
6613
|
-
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain) && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain)) {
|
|
6613
|
+
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain).valueOf() && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain).valueOf()) {
|
|
6614
6614
|
newTickArray.push({
|
|
6615
6615
|
value: t,
|
|
6616
6616
|
index
|
|
@@ -6762,7 +6762,7 @@ function modifyProps(props, fallbackProps) {
|
|
|
6762
6762
|
if (role === "axis") {
|
|
6763
6763
|
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
6764
6764
|
}
|
|
6765
|
-
const axisTheme =
|
|
6765
|
+
const axisTheme = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.theme[role], props.theme.axis);
|
|
6766
6766
|
const theme = Object.assign({}, props.theme, {
|
|
6767
6767
|
axis: axisTheme
|
|
6768
6768
|
});
|
|
@@ -6866,24 +6866,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6866
6866
|
/* harmony export */ "getStringsFromData": function() { return /* binding */ getStringsFromData; },
|
|
6867
6867
|
/* harmony export */ "isDataComponent": function() { return /* binding */ isDataComponent; }
|
|
6868
6868
|
/* harmony export */ });
|
|
6869
|
-
/* harmony import */ var
|
|
6870
|
-
/* harmony import */ var
|
|
6871
|
-
/* harmony import */ var
|
|
6872
|
-
/* harmony import */ var
|
|
6869
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
6870
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
6871
|
+
/* 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");
|
|
6872
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
6873
6873
|
/* 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");
|
|
6874
6874
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__);
|
|
6875
|
-
/* harmony import */ var
|
|
6876
|
-
/* harmony import */ var
|
|
6877
|
-
/* harmony import */ var
|
|
6878
|
-
/* harmony import */ var
|
|
6879
|
-
/* harmony import */ var
|
|
6880
|
-
/* harmony import */ var
|
|
6881
|
-
/* harmony import */ var
|
|
6882
|
-
/* harmony import */ var
|
|
6883
|
-
/* harmony import */ var
|
|
6884
|
-
/* harmony import */ var
|
|
6885
|
-
/* harmony import */ var
|
|
6886
|
-
/* harmony import */ var
|
|
6875
|
+
/* 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");
|
|
6876
|
+
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3__);
|
|
6877
|
+
/* 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");
|
|
6878
|
+
/* harmony import */ var lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4__);
|
|
6879
|
+
/* 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");
|
|
6880
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_5__);
|
|
6881
|
+
/* 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");
|
|
6882
|
+
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_6__);
|
|
6883
|
+
/* 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");
|
|
6884
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_7__);
|
|
6885
|
+
/* 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");
|
|
6886
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_8__);
|
|
6887
6887
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6888
6888
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
6889
6889
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
@@ -6917,7 +6917,7 @@ function getLength(data) {
|
|
|
6917
6917
|
|
|
6918
6918
|
// Returns generated data for a given axis based on domain and sample from props
|
|
6919
6919
|
function generateDataArray(props, axis) {
|
|
6920
|
-
const propsDomain =
|
|
6920
|
+
const propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
6921
6921
|
const domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis).domain();
|
|
6922
6922
|
const samples = props.samples || 1;
|
|
6923
6923
|
const domainMax = Math.max(...domain);
|
|
@@ -6942,7 +6942,7 @@ function sortData(dataset, sortKey, sortOrder) {
|
|
|
6942
6942
|
formattedSortKey = `_${sortKey}`;
|
|
6943
6943
|
}
|
|
6944
6944
|
const order = sortOrder === "ascending" ? "asc" : "desc";
|
|
6945
|
-
return
|
|
6945
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default()(dataset, formattedSortKey, order);
|
|
6946
6946
|
}
|
|
6947
6947
|
|
|
6948
6948
|
// This method will remove data points that break certain scales. (log scale only)
|
|
@@ -6986,7 +6986,7 @@ function getEventKey(key) {
|
|
|
6986
6986
|
return () => undefined;
|
|
6987
6987
|
}
|
|
6988
6988
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
6989
|
-
return
|
|
6989
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_7___default()(key);
|
|
6990
6990
|
}
|
|
6991
6991
|
|
|
6992
6992
|
// Returns data with an eventKey prop added to each datum
|
|
@@ -7045,12 +7045,12 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
7045
7045
|
if (isUnderMinY(baseline) && !isUnderMinY(value)) _y0 = minDomainY;
|
|
7046
7046
|
// baseline and value with only baseline above max, set baseline to maxDomainY
|
|
7047
7047
|
if (isOverMaxY(baseline) && !isOverMaxY(value)) _y0 = maxDomainY;
|
|
7048
|
-
return Object.assign({}, datum,
|
|
7048
|
+
return Object.assign({}, datum, lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
7049
7049
|
_x,
|
|
7050
7050
|
_y,
|
|
7051
7051
|
_y0,
|
|
7052
7052
|
_y1
|
|
7053
|
-
}, (
|
|
7053
|
+
}, (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default())));
|
|
7054
7054
|
});
|
|
7055
7055
|
}
|
|
7056
7056
|
|
|
@@ -7064,7 +7064,7 @@ function createStringMap(props, axis) {
|
|
|
7064
7064
|
const stringsFromAxes = getStringsFromAxes(props, axis);
|
|
7065
7065
|
const stringsFromCategories = getStringsFromCategories(props, axis);
|
|
7066
7066
|
const stringsFromData = getStringsFromData(props, axis);
|
|
7067
|
-
const allStrings =
|
|
7067
|
+
const allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default()([...stringsFromAxes, ...stringsFromCategories, ...stringsFromData]);
|
|
7068
7068
|
return allStrings.length === 0 ? null : allStrings.reduce((memo, string, index) => {
|
|
7069
7069
|
memo[string] = index + 1;
|
|
7070
7070
|
return memo;
|
|
@@ -7150,7 +7150,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
7150
7150
|
return memo;
|
|
7151
7151
|
}, {});
|
|
7152
7152
|
const formattedDatum = Object.assign({}, processedValues, parsedDatum);
|
|
7153
|
-
if (!
|
|
7153
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(formattedDatum)) {
|
|
7154
7154
|
dataArr.push(formattedDatum);
|
|
7155
7155
|
}
|
|
7156
7156
|
return dataArr;
|
|
@@ -7277,7 +7277,7 @@ function isDataComponent(component) {
|
|
|
7277
7277
|
};
|
|
7278
7278
|
let role = getRole(component);
|
|
7279
7279
|
if (role === "portal") {
|
|
7280
|
-
const children =
|
|
7280
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
7281
7281
|
role = children.length ? getRole(children[0]) : "";
|
|
7282
7282
|
}
|
|
7283
7283
|
const whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -7308,14 +7308,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7308
7308
|
/* harmony export */ "getSymmetricDomain": function() { return /* binding */ getSymmetricDomain; },
|
|
7309
7309
|
/* harmony export */ "isDomainComponent": function() { return /* binding */ isDomainComponent; }
|
|
7310
7310
|
/* harmony export */ });
|
|
7311
|
-
/* harmony import */ var
|
|
7312
|
-
/* harmony import */ var
|
|
7313
|
-
/* harmony import */ var
|
|
7314
|
-
/* harmony import */ var
|
|
7311
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
7312
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
7313
|
+
/* 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");
|
|
7314
|
+
/* harmony import */ var lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isDate__WEBPACK_IMPORTED_MODULE_1__);
|
|
7315
7315
|
/* 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");
|
|
7316
7316
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
7317
|
-
/* harmony import */ var
|
|
7318
|
-
/* harmony import */ var
|
|
7317
|
+
/* 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");
|
|
7318
|
+
/* harmony import */ var lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
7319
7319
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
7320
7320
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
7321
7321
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -7404,9 +7404,9 @@ function padDomain(domain, props, axis) {
|
|
|
7404
7404
|
max: max.valueOf() + simplePadding.right
|
|
7405
7405
|
};
|
|
7406
7406
|
const singleQuadrantDomainPadding = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.singleQuadrantDomainPadding) ? props.singleQuadrantDomainPadding[axis] : props.singleQuadrantDomainPadding;
|
|
7407
|
-
const addsQuadrants = min >= 0 && paddedDomain.min <= 0 || max <= 0 && paddedDomain.max >= 0;
|
|
7407
|
+
const addsQuadrants = min.valueOf() >= 0 && paddedDomain.min <= 0 || max.valueOf() <= 0 && paddedDomain.max >= 0;
|
|
7408
7408
|
const adjust = (val, type) => {
|
|
7409
|
-
const coerce = type === "min" && min >= 0 && val <= 0 || type === "max" && max <= 0 && val >= 0;
|
|
7409
|
+
const coerce = type === "min" && min.valueOf() >= 0 && val <= 0 || type === "max" && max.valueOf() <= 0 && val >= 0;
|
|
7410
7410
|
return coerce ? 0 : val;
|
|
7411
7411
|
};
|
|
7412
7412
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
@@ -7629,7 +7629,7 @@ function getMaxFromProps(props, axis) {
|
|
|
7629
7629
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.maxDomain) && props.maxDomain[axis] !== undefined) {
|
|
7630
7630
|
return props.maxDomain[axis];
|
|
7631
7631
|
}
|
|
7632
|
-
return typeof props.maxDomain === "number" ||
|
|
7632
|
+
return typeof props.maxDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.maxDomain) ? props.maxDomain : undefined;
|
|
7633
7633
|
}
|
|
7634
7634
|
|
|
7635
7635
|
/**
|
|
@@ -7642,7 +7642,7 @@ function getMinFromProps(props, axis) {
|
|
|
7642
7642
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.minDomain) && props.minDomain[axis] !== undefined) {
|
|
7643
7643
|
return props.minDomain[axis];
|
|
7644
7644
|
}
|
|
7645
|
-
return typeof props.minDomain === "number" ||
|
|
7645
|
+
return typeof props.minDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.minDomain) ? props.minDomain : undefined;
|
|
7646
7646
|
}
|
|
7647
7647
|
|
|
7648
7648
|
/**
|
|
@@ -7653,7 +7653,7 @@ function getMinFromProps(props, axis) {
|
|
|
7653
7653
|
* @returns {Array} the symmetric domain
|
|
7654
7654
|
*/
|
|
7655
7655
|
function getSymmetricDomain(domain, values) {
|
|
7656
|
-
const processedData =
|
|
7656
|
+
const processedData = lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default()(values.sort((a, b) => a - b));
|
|
7657
7657
|
const step = processedData[1] - processedData[0];
|
|
7658
7658
|
return [domain[0], domain[1] + step];
|
|
7659
7659
|
}
|
|
@@ -7669,7 +7669,7 @@ function isDomainComponent(component) {
|
|
|
7669
7669
|
};
|
|
7670
7670
|
let role = getRole(component);
|
|
7671
7671
|
if (role === "portal") {
|
|
7672
|
-
const children =
|
|
7672
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
7673
7673
|
role = children.length ? getRole(children[0]) : "";
|
|
7674
7674
|
}
|
|
7675
7675
|
const whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -7700,14 +7700,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7700
7700
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
7701
7701
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
7702
7702
|
/* harmony export */ });
|
|
7703
|
-
/* harmony import */ var
|
|
7704
|
-
/* harmony import */ var
|
|
7705
|
-
/* harmony import */ var
|
|
7706
|
-
/* harmony import */ var
|
|
7707
|
-
/* harmony import */ var
|
|
7708
|
-
/* harmony import */ var
|
|
7709
|
-
/* harmony import */ var
|
|
7710
|
-
/* harmony import */ var
|
|
7703
|
+
/* 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");
|
|
7704
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
|
|
7705
|
+
/* 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");
|
|
7706
|
+
/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_1__);
|
|
7707
|
+
/* 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");
|
|
7708
|
+
/* harmony import */ var lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_omitBy__WEBPACK_IMPORTED_MODULE_2__);
|
|
7709
|
+
/* 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");
|
|
7710
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_3__);
|
|
7711
7711
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7712
7712
|
|
|
7713
7713
|
|
|
@@ -7783,7 +7783,7 @@ getScopedEvents) {
|
|
|
7783
7783
|
*/
|
|
7784
7784
|
// eslint-disable-next-line max-params
|
|
7785
7785
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
7786
|
-
if (
|
|
7786
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
7787
7787
|
return {};
|
|
7788
7788
|
}
|
|
7789
7789
|
|
|
@@ -7896,7 +7896,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
7896
7896
|
// eslint-disable-next-line max-params
|
|
7897
7897
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
7898
7898
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
7899
|
-
if (!
|
|
7899
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
7900
7900
|
const callbacks = compileCallbacks(eventReturn);
|
|
7901
7901
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
7902
7902
|
}
|
|
@@ -7957,7 +7957,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
7957
7957
|
const childState = baseState[childName];
|
|
7958
7958
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
7959
7959
|
memo[childName] = mutation ? mutation : childState;
|
|
7960
|
-
return
|
|
7960
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
7961
7961
|
}, {});
|
|
7962
7962
|
}
|
|
7963
7963
|
|
|
@@ -7993,7 +7993,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
7993
7993
|
} else {
|
|
7994
7994
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
7995
7995
|
// will be used. (i.e. labels)
|
|
7996
|
-
const targets =
|
|
7996
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
7997
7997
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
7998
7998
|
const identifier = {
|
|
7999
7999
|
eventKey,
|
|
@@ -8002,10 +8002,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8002
8002
|
};
|
|
8003
8003
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
8004
8004
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
8005
|
-
return
|
|
8005
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8006
8006
|
}, {});
|
|
8007
8007
|
}
|
|
8008
|
-
return
|
|
8008
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8009
8009
|
}, {});
|
|
8010
8010
|
}
|
|
8011
8011
|
|
|
@@ -8037,11 +8037,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
8037
8037
|
}
|
|
8038
8038
|
// find any mutation objects that match the target
|
|
8039
8039
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
8040
|
-
if (
|
|
8040
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
8041
8041
|
return undefined;
|
|
8042
8042
|
}
|
|
8043
8043
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
8044
|
-
if (
|
|
8044
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
8045
8045
|
return undefined;
|
|
8046
8046
|
}
|
|
8047
8047
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -8067,8 +8067,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
8067
8067
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
8068
8068
|
return match && match[1] && match[1].toLowerCase();
|
|
8069
8069
|
}
|
|
8070
|
-
const getGlobalEvents = events =>
|
|
8071
|
-
const omitGlobalEvents = events =>
|
|
8070
|
+
const getGlobalEvents = events => lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
8071
|
+
const omitGlobalEvents = events => lodash_omitBy__WEBPACK_IMPORTED_MODULE_2___default()(events, (_, key) => GLOBAL_EVENT_REGEX.test(key));
|
|
8072
8072
|
const emulateReactEvent = event => Object.assign(event, {
|
|
8073
8073
|
nativeEvent: event
|
|
8074
8074
|
});
|
|
@@ -8109,40 +8109,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8109
8109
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
8110
8110
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
8111
8111
|
/* harmony export */ });
|
|
8112
|
-
/* harmony import */ var
|
|
8113
|
-
/* harmony import */ var
|
|
8114
|
-
/* harmony import */ var
|
|
8115
|
-
/* harmony import */ var
|
|
8116
|
-
/* harmony import */ var
|
|
8117
|
-
/* harmony import */ var
|
|
8118
|
-
/* harmony import */ var
|
|
8119
|
-
/* harmony import */ var
|
|
8120
|
-
|
|
8112
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8113
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8114
|
+
/* 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");
|
|
8115
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8116
|
+
/* 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");
|
|
8117
|
+
/* harmony import */ var lodash_property__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_property__WEBPACK_IMPORTED_MODULE_2__);
|
|
8118
|
+
/* 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");
|
|
8119
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_3__);
|
|
8121
8120
|
|
|
8122
8121
|
|
|
8123
8122
|
|
|
8124
|
-
// Private Functions
|
|
8125
8123
|
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8124
|
+
/**
|
|
8125
|
+
* Determine the range of a cartesian axis
|
|
8126
|
+
*/
|
|
8127
|
+
function getCartesianRange(options) {
|
|
8128
|
+
const vertical = options.axis !== "x";
|
|
8130
8129
|
if (vertical) {
|
|
8131
|
-
return [
|
|
8130
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
8132
8131
|
}
|
|
8133
|
-
return [padding.left,
|
|
8132
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
8134
8133
|
}
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8134
|
+
|
|
8135
|
+
/**
|
|
8136
|
+
* Determine the range of a polar axis in radians
|
|
8137
|
+
*/
|
|
8138
|
+
function getPolarRange(options) {
|
|
8139
|
+
if (options.axis === "x") {
|
|
8140
|
+
const startAngle = degreesToRadians(options.startAngle || 0);
|
|
8141
|
+
const endAngle = degreesToRadians(options.endAngle || 360);
|
|
8139
8142
|
return [startAngle, endAngle];
|
|
8140
8143
|
}
|
|
8141
|
-
return [
|
|
8144
|
+
return [options.innerRadius || 0, getRadius({
|
|
8145
|
+
height: options.height,
|
|
8146
|
+
width: options.width,
|
|
8147
|
+
padding: options.padding
|
|
8148
|
+
})];
|
|
8142
8149
|
}
|
|
8143
8150
|
|
|
8144
|
-
// Exported Functions
|
|
8145
|
-
|
|
8146
8151
|
/**
|
|
8147
8152
|
* Creates an object composed of the inverted keys and values of object.
|
|
8148
8153
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -8179,8 +8184,11 @@ function omit(originalObject, ks) {
|
|
|
8179
8184
|
}
|
|
8180
8185
|
return newObject;
|
|
8181
8186
|
}
|
|
8187
|
+
|
|
8188
|
+
/**
|
|
8189
|
+
* Coalesce the x and y values from a data point
|
|
8190
|
+
*/
|
|
8182
8191
|
function getPoint(datum) {
|
|
8183
|
-
const exists = val => val !== undefined;
|
|
8184
8192
|
const {
|
|
8185
8193
|
_x,
|
|
8186
8194
|
_x1,
|
|
@@ -8191,16 +8199,20 @@ function getPoint(datum) {
|
|
|
8191
8199
|
_y0,
|
|
8192
8200
|
_voronoiY
|
|
8193
8201
|
} = datum;
|
|
8194
|
-
const defaultX =
|
|
8195
|
-
const defaultY =
|
|
8202
|
+
const defaultX = _x1 ?? _x;
|
|
8203
|
+
const defaultY = _y1 ?? _y;
|
|
8196
8204
|
const point = {
|
|
8197
|
-
x:
|
|
8198
|
-
x0:
|
|
8199
|
-
y:
|
|
8200
|
-
y0:
|
|
8205
|
+
x: _voronoiX ?? defaultX,
|
|
8206
|
+
x0: _x0 ?? _x,
|
|
8207
|
+
y: _voronoiY ?? defaultY,
|
|
8208
|
+
y0: _y0 ?? _y
|
|
8201
8209
|
};
|
|
8202
|
-
return
|
|
8210
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
8203
8211
|
}
|
|
8212
|
+
|
|
8213
|
+
/**
|
|
8214
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
8215
|
+
*/
|
|
8204
8216
|
function scalePoint(props, datum) {
|
|
8205
8217
|
const {
|
|
8206
8218
|
scale,
|
|
@@ -8223,11 +8235,11 @@ function scalePoint(props, datum) {
|
|
|
8223
8235
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
8224
8236
|
};
|
|
8225
8237
|
}
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8238
|
+
|
|
8239
|
+
/**
|
|
8240
|
+
* Returns a padding value from a number or partial padding values
|
|
8241
|
+
*/
|
|
8242
|
+
function getPadding(padding) {
|
|
8231
8243
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
8232
8244
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
8233
8245
|
return {
|
|
@@ -8237,6 +8249,10 @@ function getPadding(props, name) {
|
|
|
8237
8249
|
right: paddingObj.right || paddingVal
|
|
8238
8250
|
};
|
|
8239
8251
|
}
|
|
8252
|
+
|
|
8253
|
+
/**
|
|
8254
|
+
* Returns true if the component is defined as a tooltip
|
|
8255
|
+
*/
|
|
8240
8256
|
function isTooltip(component) {
|
|
8241
8257
|
const labelRole = component && component.type && component.type.role;
|
|
8242
8258
|
return labelRole === "tooltip";
|
|
@@ -8251,8 +8267,8 @@ function getDefaultStyles(props, role) {
|
|
|
8251
8267
|
return defaultStyles;
|
|
8252
8268
|
}
|
|
8253
8269
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
8254
|
-
const labelStyle =
|
|
8255
|
-
return
|
|
8270
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
8271
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
8256
8272
|
labels: labelStyle
|
|
8257
8273
|
}, defaultStyles);
|
|
8258
8274
|
}
|
|
@@ -8260,7 +8276,7 @@ function getStyles(style, defaultStyles) {
|
|
|
8260
8276
|
const width = "100%";
|
|
8261
8277
|
const height = "100%";
|
|
8262
8278
|
if (!style) {
|
|
8263
|
-
return
|
|
8279
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8264
8280
|
parent: {
|
|
8265
8281
|
height,
|
|
8266
8282
|
width
|
|
@@ -8276,14 +8292,18 @@ function getStyles(style, defaultStyles) {
|
|
|
8276
8292
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
8277
8293
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
8278
8294
|
return {
|
|
8279
|
-
parent:
|
|
8295
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
8280
8296
|
width,
|
|
8281
8297
|
height
|
|
8282
8298
|
}),
|
|
8283
|
-
labels:
|
|
8284
|
-
data:
|
|
8299
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
8300
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
8285
8301
|
};
|
|
8286
8302
|
}
|
|
8303
|
+
|
|
8304
|
+
/**
|
|
8305
|
+
* Returns the value of a prop or accessor function with the given props
|
|
8306
|
+
*/
|
|
8287
8307
|
function evaluateProp(prop, props) {
|
|
8288
8308
|
return isFunction(prop) ? prop(props) : prop;
|
|
8289
8309
|
}
|
|
@@ -8305,19 +8325,28 @@ function degreesToRadians(degrees) {
|
|
|
8305
8325
|
function radiansToDegrees(radians) {
|
|
8306
8326
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
8307
8327
|
}
|
|
8308
|
-
|
|
8328
|
+
|
|
8329
|
+
/**
|
|
8330
|
+
* Get the maximum radius that will fit in the container
|
|
8331
|
+
*/
|
|
8332
|
+
function getRadius(options) {
|
|
8333
|
+
const {
|
|
8334
|
+
width,
|
|
8335
|
+
height,
|
|
8336
|
+
padding
|
|
8337
|
+
} = options;
|
|
8309
8338
|
const {
|
|
8310
8339
|
left,
|
|
8311
8340
|
right,
|
|
8312
8341
|
top,
|
|
8313
8342
|
bottom
|
|
8314
|
-
} =
|
|
8315
|
-
const {
|
|
8316
|
-
width,
|
|
8317
|
-
height
|
|
8318
|
-
} = props;
|
|
8343
|
+
} = padding;
|
|
8319
8344
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
8320
8345
|
}
|
|
8346
|
+
|
|
8347
|
+
/**
|
|
8348
|
+
* Returns the origin for a polar chart within the padded area
|
|
8349
|
+
*/
|
|
8321
8350
|
function getPolarOrigin(props) {
|
|
8322
8351
|
const {
|
|
8323
8352
|
width,
|
|
@@ -8328,7 +8357,7 @@ function getPolarOrigin(props) {
|
|
|
8328
8357
|
bottom,
|
|
8329
8358
|
left,
|
|
8330
8359
|
right
|
|
8331
|
-
} = getPadding(props);
|
|
8360
|
+
} = getPadding(props.padding);
|
|
8332
8361
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
8333
8362
|
const offsetWidth = width / 2 + left - right;
|
|
8334
8363
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -8337,13 +8366,30 @@ function getPolarOrigin(props) {
|
|
|
8337
8366
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
8338
8367
|
};
|
|
8339
8368
|
}
|
|
8369
|
+
|
|
8370
|
+
/**
|
|
8371
|
+
* Determine the range of an axis based on the given props
|
|
8372
|
+
*/
|
|
8340
8373
|
function getRange(props, axis) {
|
|
8341
8374
|
if (props.range && props.range[axis]) {
|
|
8342
8375
|
return props.range[axis];
|
|
8343
8376
|
} else if (props.range && Array.isArray(props.range)) {
|
|
8344
8377
|
return props.range;
|
|
8345
8378
|
}
|
|
8346
|
-
return props.polar ? getPolarRange(
|
|
8379
|
+
return props.polar ? getPolarRange({
|
|
8380
|
+
axis,
|
|
8381
|
+
innerRadius: props.innerRadius,
|
|
8382
|
+
startAngle: props.startAngle,
|
|
8383
|
+
endAngle: props.endAngle,
|
|
8384
|
+
height: props.height,
|
|
8385
|
+
width: props.width,
|
|
8386
|
+
padding: getPadding(props.padding)
|
|
8387
|
+
}) : getCartesianRange({
|
|
8388
|
+
axis,
|
|
8389
|
+
height: props.height,
|
|
8390
|
+
width: props.width,
|
|
8391
|
+
padding: getPadding(props.padding)
|
|
8392
|
+
});
|
|
8347
8393
|
}
|
|
8348
8394
|
|
|
8349
8395
|
/**
|
|
@@ -8375,7 +8421,7 @@ function createAccessor(key) {
|
|
|
8375
8421
|
return x => x;
|
|
8376
8422
|
}
|
|
8377
8423
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
8378
|
-
return
|
|
8424
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
8379
8425
|
}
|
|
8380
8426
|
function modifyProps(props, fallbackProps, role) {
|
|
8381
8427
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -8384,7 +8430,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
8384
8430
|
const defaultObject = horizontal === undefined ? {} : {
|
|
8385
8431
|
horizontal
|
|
8386
8432
|
};
|
|
8387
|
-
return
|
|
8433
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
8388
8434
|
}
|
|
8389
8435
|
|
|
8390
8436
|
/**
|
|
@@ -8471,10 +8517,10 @@ initialMemo, combine) {
|
|
|
8471
8517
|
const childRole = child.type && child.type.role;
|
|
8472
8518
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
8473
8519
|
if (child.props && child.props.children) {
|
|
8474
|
-
const childProps = Object.assign({}, child.props,
|
|
8475
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
8476
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
8477
|
-
return /*#__PURE__*/
|
|
8520
|
+
const childProps = Object.assign({}, child.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(parentProps, sharedProps));
|
|
8521
|
+
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 => {
|
|
8522
|
+
const nestedChildProps = Object.assign({}, c.props, lodash_pick__WEBPACK_IMPORTED_MODULE_3___default()(childProps, sharedProps));
|
|
8523
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(c, nestedChildProps);
|
|
8478
8524
|
});
|
|
8479
8525
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
8480
8526
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -8488,7 +8534,7 @@ initialMemo, combine) {
|
|
|
8488
8534
|
return newMemo;
|
|
8489
8535
|
}, initialMemo);
|
|
8490
8536
|
};
|
|
8491
|
-
const validChildren = children.filter(
|
|
8537
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
8492
8538
|
const childNames = validChildren.map((c, i) => i);
|
|
8493
8539
|
return traverseChildren(validChildren, childNames);
|
|
8494
8540
|
}
|
|
@@ -8508,10 +8554,10 @@ function isHorizontal(props) {
|
|
|
8508
8554
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
8509
8555
|
return memo || childProps.horizontal;
|
|
8510
8556
|
}
|
|
8511
|
-
return traverseChildren(
|
|
8557
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
8512
8558
|
}, false);
|
|
8513
8559
|
};
|
|
8514
|
-
return traverseChildren(
|
|
8560
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
8515
8561
|
}
|
|
8516
8562
|
|
|
8517
8563
|
/***/ }),
|
|
@@ -8527,10 +8573,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8527
8573
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8528
8574
|
/* harmony export */ "useAnimationState": function() { return /* binding */ useAnimationState; }
|
|
8529
8575
|
/* harmony export */ });
|
|
8530
|
-
/* harmony import */ var
|
|
8531
|
-
/* harmony import */ var
|
|
8532
|
-
/* harmony import */ var
|
|
8533
|
-
/* harmony import */ var
|
|
8576
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
8577
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
8578
|
+
/* 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");
|
|
8579
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
8534
8580
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8535
8581
|
/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../transitions */ "../../victory-core/es/victory-util/transitions.js");
|
|
8536
8582
|
|
|
@@ -8546,10 +8592,10 @@ const useAnimationState = function (initialState) {
|
|
|
8546
8592
|
if (initialState === void 0) {
|
|
8547
8593
|
initialState = INITIAL_STATE;
|
|
8548
8594
|
}
|
|
8549
|
-
const [state, _setState] =
|
|
8595
|
+
const [state, _setState] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(initialState);
|
|
8550
8596
|
|
|
8551
8597
|
// This allows us to use a state object and maintain the same API as this.setState
|
|
8552
|
-
const setState =
|
|
8598
|
+
const setState = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(newState => {
|
|
8553
8599
|
_setState(oldState => ({
|
|
8554
8600
|
...oldState,
|
|
8555
8601
|
...newState
|
|
@@ -8557,14 +8603,14 @@ const useAnimationState = function (initialState) {
|
|
|
8557
8603
|
}, [_setState]);
|
|
8558
8604
|
|
|
8559
8605
|
// This is a copy of Wrapper.getAnimationProps
|
|
8560
|
-
const getAnimationProps =
|
|
8606
|
+
const getAnimationProps = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((props, child, index) => {
|
|
8561
8607
|
if (!props?.animate) {
|
|
8562
8608
|
return child.props.animate;
|
|
8563
8609
|
}
|
|
8564
8610
|
const getFilteredState = () => {
|
|
8565
8611
|
let childrenTransitions = state && state.childrenTransitions;
|
|
8566
8612
|
childrenTransitions = _collection__WEBPACK_IMPORTED_MODULE_2__.isArrayOfArrays(childrenTransitions) ? childrenTransitions[index] : childrenTransitions;
|
|
8567
|
-
return
|
|
8613
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8568
8614
|
childrenTransitions
|
|
8569
8615
|
}, state);
|
|
8570
8616
|
};
|
|
@@ -8575,28 +8621,28 @@ const useAnimationState = function (initialState) {
|
|
|
8575
8621
|
const getTransitionProps = _transitions__WEBPACK_IMPORTED_MODULE_3__.getTransitionPropsFactory(props, filteredState, newState => setState(newState));
|
|
8576
8622
|
getTransitions = childComponent => getTransitionProps(childComponent, index);
|
|
8577
8623
|
}
|
|
8578
|
-
return
|
|
8624
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8579
8625
|
getTransitions,
|
|
8580
8626
|
parentState
|
|
8581
8627
|
}, props.animate, child.props.animate);
|
|
8582
8628
|
}, [state, setState]);
|
|
8583
8629
|
|
|
8584
8630
|
// This is a copy of Wrapper.setAnimationState
|
|
8585
|
-
const setAnimationState =
|
|
8631
|
+
const setAnimationState = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((props, nextProps) => {
|
|
8586
8632
|
if (!props?.animate) {
|
|
8587
8633
|
return;
|
|
8588
8634
|
}
|
|
8589
8635
|
if (props.animate.parentState) {
|
|
8590
8636
|
const nodesWillExit = props.animate.parentState.nodesWillExit;
|
|
8591
8637
|
const oldProps = nodesWillExit ? props : null;
|
|
8592
|
-
const newState =
|
|
8638
|
+
const newState = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8593
8639
|
oldProps,
|
|
8594
8640
|
nextProps
|
|
8595
8641
|
}, props.animate.parentState);
|
|
8596
8642
|
setState(newState);
|
|
8597
8643
|
} else {
|
|
8598
|
-
const oldChildren =
|
|
8599
|
-
const nextChildren =
|
|
8644
|
+
const oldChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
8645
|
+
const nextChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextProps.children);
|
|
8600
8646
|
const isContinuous = child => {
|
|
8601
8647
|
const check = c => c.type && c.type.continuous;
|
|
8602
8648
|
return Array.isArray(child) ? child.some(check) : check(child);
|
|
@@ -8621,7 +8667,7 @@ const useAnimationState = function (initialState) {
|
|
|
8621
8667
|
});
|
|
8622
8668
|
}
|
|
8623
8669
|
}, [setState]);
|
|
8624
|
-
const getProps =
|
|
8670
|
+
const getProps = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(initialProps => {
|
|
8625
8671
|
return state && state.nodesWillExit ? state.oldProps || initialProps : initialProps;
|
|
8626
8672
|
}, [state]);
|
|
8627
8673
|
return {
|
|
@@ -8722,11 +8768,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8722
8768
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8723
8769
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
8724
8770
|
/* harmony export */ });
|
|
8725
|
-
/* global console */
|
|
8771
|
+
/* global console process */
|
|
8726
8772
|
/* eslint-disable no-console */
|
|
8727
8773
|
|
|
8728
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
8729
8774
|
function warn(message) {
|
|
8775
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
8776
|
+
// @ts-ignore - Webpack DefinePlugin will replace process.env.NODE_ENV
|
|
8730
8777
|
if (true) {
|
|
8731
8778
|
if (console && console.warn) {
|
|
8732
8779
|
console.warn(message);
|
|
@@ -9110,12 +9157,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9110
9157
|
/* harmony export */ "getInitialTransitionState": function() { return /* binding */ getInitialTransitionState; },
|
|
9111
9158
|
/* harmony export */ "getTransitionPropsFactory": function() { return /* binding */ getTransitionPropsFactory; }
|
|
9112
9159
|
/* harmony export */ });
|
|
9113
|
-
/* harmony import */ var
|
|
9114
|
-
/* harmony import */ var
|
|
9160
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9161
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9115
9162
|
/* 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");
|
|
9116
9163
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
9117
|
-
/* harmony import */ var
|
|
9118
|
-
/* harmony import */ var
|
|
9164
|
+
/* 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");
|
|
9165
|
+
/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_2__);
|
|
9119
9166
|
|
|
9120
9167
|
|
|
9121
9168
|
|
|
@@ -9206,13 +9253,13 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
9206
9253
|
const getTransitionsFromChildren = (old, next) => {
|
|
9207
9254
|
return old.map((child, idx) => {
|
|
9208
9255
|
if (child && child.props && child.props.children && next[idx]) {
|
|
9209
|
-
return getTransitionsFromChildren(
|
|
9256
|
+
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));
|
|
9210
9257
|
}
|
|
9211
9258
|
// get Transition entering and exiting nodes
|
|
9212
9259
|
return getTransition(child, next[idx]);
|
|
9213
9260
|
});
|
|
9214
9261
|
};
|
|
9215
|
-
const childrenTransitions = getTransitionsFromChildren(
|
|
9262
|
+
const childrenTransitions = getTransitionsFromChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(oldChildren), react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(nextChildren));
|
|
9216
9263
|
return {
|
|
9217
9264
|
nodesWillExit,
|
|
9218
9265
|
nodesWillEnter,
|
|
@@ -9226,7 +9273,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
9226
9273
|
};
|
|
9227
9274
|
}
|
|
9228
9275
|
function getInitialChildProps(animate, data) {
|
|
9229
|
-
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (
|
|
9276
|
+
const after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
9230
9277
|
return {
|
|
9231
9278
|
data: data.map((datum, idx) => Object.assign({}, datum, after(datum, idx, data)))
|
|
9232
9279
|
};
|
|
@@ -9243,7 +9290,7 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
9243
9290
|
data
|
|
9244
9291
|
};
|
|
9245
9292
|
}
|
|
9246
|
-
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (
|
|
9293
|
+
const before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
9247
9294
|
// If nodes need to exit, transform them with the provided onLoad.before function.
|
|
9248
9295
|
const newData = data.map((datum, idx) => {
|
|
9249
9296
|
return Object.assign({}, datum, before(datum, idx, data));
|
|
@@ -9265,7 +9312,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
9265
9312
|
data
|
|
9266
9313
|
};
|
|
9267
9314
|
}
|
|
9268
|
-
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (
|
|
9315
|
+
const after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
9269
9316
|
// If nodes need to exit, transform them with the provided onLoad.after function.
|
|
9270
9317
|
newData = data.map((datum, idx) => {
|
|
9271
9318
|
return Object.assign({}, datum, after(datum, idx, data));
|
|
@@ -9287,7 +9334,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
9287
9334
|
// After the exit transition occurs, trigger the animations for
|
|
9288
9335
|
// nodes that are neither exiting nor entering.
|
|
9289
9336
|
animate.onEnd = cb;
|
|
9290
|
-
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (
|
|
9337
|
+
const before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
9291
9338
|
// If nodes need to exit, transform them with the provided onExit.before function.
|
|
9292
9339
|
newData = data.map((datum, idx) => {
|
|
9293
9340
|
const key = (datum.key || idx).toString();
|
|
@@ -9310,7 +9357,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
9310
9357
|
newAnimate = Object.assign({}, animate, {
|
|
9311
9358
|
onEnd: cb
|
|
9312
9359
|
});
|
|
9313
|
-
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (
|
|
9360
|
+
const before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
9314
9361
|
// We want the entering nodes to be included in the transition target
|
|
9315
9362
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
9316
9363
|
// so perform the `onEnter.before` transformation on each node.
|
|
@@ -9337,7 +9384,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
9337
9384
|
// domain should encompass the nodes that will now enter. So perform
|
|
9338
9385
|
// the `onEnter.after` transformation on each node.
|
|
9339
9386
|
newAnimate.onEnd = cb;
|
|
9340
|
-
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (
|
|
9387
|
+
const after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_2___default());
|
|
9341
9388
|
newData = data.map((datum, idx) => {
|
|
9342
9389
|
const key = getDatumKey(datum, idx);
|
|
9343
9390
|
return enteringNodes[key] ? Object.assign({}, datum, after(datum, idx, data)) : datum;
|
|
@@ -9629,16 +9676,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9629
9676
|
/* harmony export */ "getStyle": function() { return /* binding */ getStyle; },
|
|
9630
9677
|
/* harmony export */ "getWidth": function() { return /* binding */ getWidth; }
|
|
9631
9678
|
/* harmony export */ });
|
|
9632
|
-
/* harmony import */ var
|
|
9633
|
-
/* harmony import */ var
|
|
9634
|
-
/* harmony import */ var
|
|
9635
|
-
/* harmony import */ var
|
|
9679
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
9680
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
9681
|
+
/* 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");
|
|
9682
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
9636
9683
|
/* 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");
|
|
9637
9684
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_2__);
|
|
9638
|
-
/* harmony import */ var
|
|
9639
|
-
/* harmony import */ var
|
|
9640
|
-
/* harmony import */ var
|
|
9641
|
-
/* harmony import */ var
|
|
9685
|
+
/* 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");
|
|
9686
|
+
/* harmony import */ var lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3__);
|
|
9687
|
+
/* 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");
|
|
9688
|
+
/* harmony import */ var lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4__);
|
|
9642
9689
|
/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./axis */ "../../victory-core/es/victory-util/axis.js");
|
|
9643
9690
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style */ "../../victory-core/es/victory-util/style.js");
|
|
9644
9691
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
@@ -9732,7 +9779,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
9732
9779
|
maxDomain
|
|
9733
9780
|
};
|
|
9734
9781
|
let stack = 0;
|
|
9735
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
9782
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9736
9783
|
parentProps = addBinsToParentPropsIfHistogram({
|
|
9737
9784
|
children,
|
|
9738
9785
|
props,
|
|
@@ -9746,7 +9793,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
9746
9793
|
if (!_data__WEBPACK_IMPORTED_MODULE_7__.isDataComponent(child)) {
|
|
9747
9794
|
return null;
|
|
9748
9795
|
} else if (child.type && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(child.type.getData)) {
|
|
9749
|
-
childElement = parent ? /*#__PURE__*/
|
|
9796
|
+
childElement = parent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, parent.props) : child;
|
|
9750
9797
|
childData = childElement.type.getData(childProps);
|
|
9751
9798
|
} else {
|
|
9752
9799
|
childData = _data__WEBPACK_IMPORTED_MODULE_7__.getData(childProps);
|
|
@@ -9758,16 +9805,16 @@ function getDataFromChildren(props, childComponents) {
|
|
|
9758
9805
|
}, datum));
|
|
9759
9806
|
};
|
|
9760
9807
|
const stacked = children.filter(c => c.type && c.type.role === "stack").length;
|
|
9761
|
-
const combine = (memo, val) => memo.concat(
|
|
9808
|
+
const combine = (memo, val) => memo.concat(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default()(val, "_group"));
|
|
9762
9809
|
const datasets = _helpers__WEBPACK_IMPORTED_MODULE_6__.reduceChildren(children, iteratee, props, [], combine);
|
|
9763
9810
|
const group = stacked ? "_group" : "_stack";
|
|
9764
|
-
return Object.values(
|
|
9811
|
+
return Object.values(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default()(datasets, group));
|
|
9765
9812
|
}
|
|
9766
9813
|
function getData(props, childComponents) {
|
|
9767
9814
|
if (props.data) {
|
|
9768
9815
|
return _data__WEBPACK_IMPORTED_MODULE_7__.getData(props);
|
|
9769
9816
|
}
|
|
9770
|
-
return getDataFromChildren(props, childComponents ||
|
|
9817
|
+
return getDataFromChildren(props, childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
9771
9818
|
}
|
|
9772
9819
|
function getWidth(props, groupLength, seriesLength) {
|
|
9773
9820
|
const {
|
|
@@ -9819,7 +9866,7 @@ function getDefaultDomainPadding(props, axis, childComponents) {
|
|
|
9819
9866
|
};
|
|
9820
9867
|
}
|
|
9821
9868
|
function getDomainFromChildren(props, axis, childComponents) {
|
|
9822
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
9869
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9823
9870
|
const parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_7__.getData(props) : undefined;
|
|
9824
9871
|
const {
|
|
9825
9872
|
polar,
|
|
@@ -9857,7 +9904,7 @@ function getDomainFromChildren(props, axis, childComponents) {
|
|
|
9857
9904
|
return [min, max];
|
|
9858
9905
|
}
|
|
9859
9906
|
function getDomain(props, axis, childComponents) {
|
|
9860
|
-
const children = childComponents ||
|
|
9907
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9861
9908
|
const propsDomain = _domain__WEBPACK_IMPORTED_MODULE_8__.getDomainFromProps(props, axis);
|
|
9862
9909
|
const domainPadding = getDefaultDomainPadding(props, axis, children);
|
|
9863
9910
|
let domain;
|
|
@@ -9881,7 +9928,7 @@ function getScale(props, axis, childComponents) {
|
|
|
9881
9928
|
if (props.data) {
|
|
9882
9929
|
return _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis);
|
|
9883
9930
|
}
|
|
9884
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
9931
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9885
9932
|
const iteratee = child => {
|
|
9886
9933
|
const sharedProps = Object.assign({}, child.props, {
|
|
9887
9934
|
horizontal: props.horizontal
|
|
@@ -9950,8 +9997,8 @@ function getChildStyle(child, index, calculatedProps, theme) {
|
|
|
9950
9997
|
const dataWidth = role === "stack" ? {} : {
|
|
9951
9998
|
width: getWidth(calculatedProps)
|
|
9952
9999
|
};
|
|
9953
|
-
const dataStyle =
|
|
9954
|
-
const labelsStyle =
|
|
10000
|
+
const dataStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, childStyle.data, Object.assign({}, dataWidth, style.data, defaultColor));
|
|
10001
|
+
const labelsStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, childStyle.labels, style.labels);
|
|
9955
10002
|
return {
|
|
9956
10003
|
...childStyle,
|
|
9957
10004
|
parent: style.parent,
|
|
@@ -10007,7 +10054,7 @@ function getCategoryAndAxisStringsFromChildren(props, axis, childComponents) {
|
|
|
10007
10054
|
return lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default()([...categoryStrings, ...axisStrings].flat());
|
|
10008
10055
|
}
|
|
10009
10056
|
function getStringsFromChildren(props, childComponents) {
|
|
10010
|
-
const children = childComponents ||
|
|
10057
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
10011
10058
|
const xStrings = getCategoryAndAxisStringsFromChildren(props, "x", children);
|
|
10012
10059
|
const yStrings = getCategoryAndAxisStringsFromChildren(props, "y", children);
|
|
10013
10060
|
const dataStrings = getStringsFromData(children);
|
|
@@ -10042,22 +10089,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10042
10089
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10043
10090
|
/* harmony export */ "VictorySharedEvents": function() { return /* binding */ VictorySharedEvents; }
|
|
10044
10091
|
/* harmony export */ });
|
|
10045
|
-
/* harmony import */ var
|
|
10046
|
-
/* harmony import */ var
|
|
10047
|
-
/* harmony import */ var
|
|
10048
|
-
/* harmony import */ var
|
|
10049
|
-
/* harmony import */ var
|
|
10050
|
-
/* harmony import */ var
|
|
10051
|
-
/* harmony import */ var
|
|
10052
|
-
/* harmony import */ var
|
|
10053
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/timer-context.js");
|
|
10054
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/events.js");
|
|
10055
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
|
|
10056
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
10092
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
10093
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
10094
|
+
/* 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");
|
|
10095
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
10096
|
+
/* 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");
|
|
10097
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2__);
|
|
10098
|
+
/* harmony import */ var lodash_fromPairs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/fromPairs */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fromPairs.js");
|
|
10099
|
+
/* harmony import */ var lodash_fromPairs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_fromPairs__WEBPACK_IMPORTED_MODULE_3__);
|
|
10057
10100
|
/* 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");
|
|
10058
10101
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
10059
10102
|
/* harmony import */ var json_stringify_safe__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! json-stringify-safe */ "../../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js");
|
|
10060
10103
|
/* harmony import */ var json_stringify_safe__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(json_stringify_safe__WEBPACK_IMPORTED_MODULE_5__);
|
|
10104
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/timer-context.js");
|
|
10105
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/events.js");
|
|
10106
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
|
|
10107
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
10061
10108
|
|
|
10062
10109
|
|
|
10063
10110
|
|
|
@@ -10073,12 +10120,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10073
10120
|
|
|
10074
10121
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
10075
10122
|
|
|
10076
|
-
class VictorySharedEvents extends (
|
|
10123
|
+
class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
10077
10124
|
static displayName = "VictorySharedEvents";
|
|
10078
10125
|
static role = "shared-event-wrapper";
|
|
10079
10126
|
static contextType = victory_core__WEBPACK_IMPORTED_MODULE_6__["default"];
|
|
10080
10127
|
static defaultProps = {
|
|
10081
|
-
groupComponent: /*#__PURE__*/
|
|
10128
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
10082
10129
|
};
|
|
10083
10130
|
constructor(props) {
|
|
10084
10131
|
super(props);
|
|
@@ -10135,7 +10182,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10135
10182
|
return props.events;
|
|
10136
10183
|
}
|
|
10137
10184
|
applyExternalMutations(props, externalMutations) {
|
|
10138
|
-
if (!
|
|
10185
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
10139
10186
|
const callbacks = props.externalEventMutations.reduce((memo, mutation) => victory_core__WEBPACK_IMPORTED_MODULE_9__.isFunction(mutation.callback) ? memo.concat(mutation.callback) : memo, []);
|
|
10140
10187
|
const compiledCallbacks = callbacks.length ? () => {
|
|
10141
10188
|
callbacks.forEach(c => c());
|
|
@@ -10144,7 +10191,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10144
10191
|
}
|
|
10145
10192
|
}
|
|
10146
10193
|
getExternalMutations(props, baseProps) {
|
|
10147
|
-
return !
|
|
10194
|
+
return !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(props.externalEventMutations) ? victory_core__WEBPACK_IMPORTED_MODULE_7__.getExternalMutationsWithChildren(props.externalEventMutations, baseProps, this.state, Object.keys(baseProps)) : undefined;
|
|
10148
10195
|
}
|
|
10149
10196
|
cacheSharedEvents(name, sharedEvents, cacheValues) {
|
|
10150
10197
|
this.sharedEventsCache[name] = [sharedEvents, cacheValues];
|
|
@@ -10160,7 +10207,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10160
10207
|
const {
|
|
10161
10208
|
container
|
|
10162
10209
|
} = props;
|
|
10163
|
-
const children =
|
|
10210
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(this.props.children);
|
|
10164
10211
|
const childBaseProps = this.getBasePropsFromChildren(children);
|
|
10165
10212
|
const parentBaseProps = container ? container.props : {};
|
|
10166
10213
|
return Object.assign({}, childBaseProps, {
|
|
@@ -10176,7 +10223,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10176
10223
|
return null;
|
|
10177
10224
|
};
|
|
10178
10225
|
const baseProps = victory_core__WEBPACK_IMPORTED_MODULE_9__.reduceChildren(childComponents, iteratee);
|
|
10179
|
-
return
|
|
10226
|
+
return lodash_fromPairs__WEBPACK_IMPORTED_MODULE_3___default()(baseProps);
|
|
10180
10227
|
}
|
|
10181
10228
|
getNewChildren(props, baseProps) {
|
|
10182
10229
|
const {
|
|
@@ -10186,9 +10233,9 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10186
10233
|
const alterChildren = (children, childNames) => {
|
|
10187
10234
|
return children.reduce((memo, child, index) => {
|
|
10188
10235
|
if (child.props.children) {
|
|
10189
|
-
const newChildren =
|
|
10236
|
+
const newChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children);
|
|
10190
10237
|
const names = childNames.slice(index, index + newChildren.length);
|
|
10191
|
-
const results = /*#__PURE__*/
|
|
10238
|
+
const results = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, child.props, alterChildren(newChildren, names));
|
|
10192
10239
|
return memo.concat(results);
|
|
10193
10240
|
} else if (childNames[index] !== "parent" && child.type && victory_core__WEBPACK_IMPORTED_MODULE_9__.isFunction(child.type.getBaseProps)) {
|
|
10194
10241
|
const name = child.props.name || childNames[index];
|
|
@@ -10207,7 +10254,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10207
10254
|
getEventState: (key, target) => this.getEventState(key, target, name)
|
|
10208
10255
|
};
|
|
10209
10256
|
this.cacheSharedEvents(name, sharedEvents, sharedEventsCacheValues);
|
|
10210
|
-
return memo.concat( /*#__PURE__*/
|
|
10257
|
+
return memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, Object.assign({
|
|
10211
10258
|
key: `events-${name}`,
|
|
10212
10259
|
sharedEvents,
|
|
10213
10260
|
eventKey,
|
|
@@ -10218,7 +10265,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10218
10265
|
}, []);
|
|
10219
10266
|
};
|
|
10220
10267
|
const childNames = Object.keys(baseProps);
|
|
10221
|
-
const childComponents =
|
|
10268
|
+
const childComponents = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
10222
10269
|
return alterChildren(childComponents, childNames);
|
|
10223
10270
|
}
|
|
10224
10271
|
getContainer(props, baseProps, events) {
|
|
@@ -10237,22 +10284,22 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10237
10284
|
const parentEvents = sharedEvents && boundGetEvents({
|
|
10238
10285
|
sharedEvents
|
|
10239
10286
|
}, "parent");
|
|
10240
|
-
const parentProps =
|
|
10287
|
+
const parentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.getEventState("parent", "parent"), containerProps, baseProps.parent, {
|
|
10241
10288
|
children
|
|
10242
10289
|
});
|
|
10243
|
-
const containerEvents =
|
|
10290
|
+
const containerEvents = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, victory_core__WEBPACK_IMPORTED_MODULE_7__.getPartialEvents(parentEvents, "parent", parentProps), containerProps.events);
|
|
10244
10291
|
this.globalEvents = victory_core__WEBPACK_IMPORTED_MODULE_7__.getGlobalEvents(containerEvents);
|
|
10245
10292
|
const localEvents = victory_core__WEBPACK_IMPORTED_MODULE_7__.omitGlobalEvents(containerEvents);
|
|
10246
|
-
return role === "container" ? /*#__PURE__*/
|
|
10293
|
+
return role === "container" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(container, Object.assign({}, parentProps, {
|
|
10247
10294
|
events: localEvents
|
|
10248
|
-
})) : /*#__PURE__*/
|
|
10295
|
+
})) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(container, localEvents, children);
|
|
10249
10296
|
}
|
|
10250
10297
|
render() {
|
|
10251
10298
|
const events = this.getAllEvents(this.props);
|
|
10252
10299
|
if (events) {
|
|
10253
10300
|
return this.getContainer(this.props, this.baseProps, events);
|
|
10254
10301
|
}
|
|
10255
|
-
return /*#__PURE__*/
|
|
10302
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(this.props.container, {
|
|
10256
10303
|
children: this.props.children
|
|
10257
10304
|
});
|
|
10258
10305
|
}
|