victory-group 37.3.1 → 37.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/victory-group.js +282 -259
- package/dist/victory-group.min.js +1 -1
- package/es/helper-methods.d.ts +3 -12
- package/es/helper-methods.js +1 -4
- package/es/victory-group.d.ts +1 -1
- package/es/victory-group.js +5 -6
- package/lib/helper-methods.d.ts +3 -12
- package/lib/helper-methods.js +1 -5
- package/lib/victory-group.d.ts +1 -1
- package/lib/victory-group.js +5 -6
- package/package.json +7 -39
- package/src/helper-methods.tsx +1 -3
- package/src/victory-group.tsx +2 -6
package/dist/victory-group.js
CHANGED
|
@@ -32,7 +32,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
32
32
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
33
33
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
|
|
34
34
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_1__);
|
|
35
|
-
/* eslint-disable no-use-before-define */
|
|
36
35
|
|
|
37
36
|
|
|
38
37
|
|
|
@@ -42,8 +41,6 @@ const fallbackProps = {
|
|
|
42
41
|
padding: 50,
|
|
43
42
|
offset: 0
|
|
44
43
|
};
|
|
45
|
-
|
|
46
|
-
// eslint-disable-next-line max-statements
|
|
47
44
|
function getCalculatedProps(initialProps, childComponents) {
|
|
48
45
|
const role = "group";
|
|
49
46
|
const props = victory_core__WEBPACK_IMPORTED_MODULE_2__.modifyProps(initialProps, fallbackProps, role);
|
|
@@ -78,7 +75,7 @@ function getCalculatedProps(initialProps, childComponents) {
|
|
|
78
75
|
y: baseScale.y.domain(domain.y).range(props.horizontal ? range.x : range.y)
|
|
79
76
|
};
|
|
80
77
|
const origin = polar ? props.origin : victory_core__WEBPACK_IMPORTED_MODULE_2__.getPolarOrigin(props);
|
|
81
|
-
const padding = victory_core__WEBPACK_IMPORTED_MODULE_2__.getPadding(props);
|
|
78
|
+
const padding = victory_core__WEBPACK_IMPORTED_MODULE_2__.getPadding(props.padding);
|
|
82
79
|
return {
|
|
83
80
|
datasets,
|
|
84
81
|
categories,
|
|
@@ -264,10 +261,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
264
261
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
265
262
|
/* harmony export */ "VictoryGroup": function() { return /* binding */ VictoryGroup; }
|
|
266
263
|
/* harmony export */ });
|
|
267
|
-
/* harmony import */ var
|
|
268
|
-
/* harmony import */ var
|
|
269
|
-
/* harmony import */ var
|
|
270
|
-
/* 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__);
|
|
271
268
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
|
|
272
269
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
|
|
273
270
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
@@ -302,14 +299,13 @@ const defaultProps = {
|
|
|
302
299
|
theme: victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryTheme.grayscale
|
|
303
300
|
};
|
|
304
301
|
const VictoryGroupBase = initialProps => {
|
|
305
|
-
// eslint-disable-next-line no-use-before-define
|
|
306
302
|
const role = VictoryGroup?.role;
|
|
307
303
|
const {
|
|
308
304
|
getAnimationProps,
|
|
309
305
|
setAnimationState,
|
|
310
306
|
getProps
|
|
311
307
|
} = victory_core__WEBPACK_IMPORTED_MODULE_6__.useAnimationState();
|
|
312
|
-
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]);
|
|
313
309
|
const props = getProps(propsWithDefaults);
|
|
314
310
|
const modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_7__.modifyProps(props, fallbackProps, role);
|
|
315
311
|
const {
|
|
@@ -363,7 +359,7 @@ const VictoryGroupBase = initialProps => {
|
|
|
363
359
|
const userProps = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => victory_core__WEBPACK_IMPORTED_MODULE_9__.getSafeUserProps(propsWithDefaults), [propsWithDefaults]);
|
|
364
360
|
const container = react__WEBPACK_IMPORTED_MODULE_2___default().useMemo(() => {
|
|
365
361
|
if (standalone) {
|
|
366
|
-
const defaultContainerProps =
|
|
362
|
+
const defaultContainerProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, containerComponent.props, containerProps, userProps);
|
|
367
363
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(containerComponent, defaultContainerProps);
|
|
368
364
|
}
|
|
369
365
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(groupComponent, userProps);
|
|
@@ -380,7 +376,7 @@ const VictoryGroupBase = initialProps => {
|
|
|
380
376
|
}
|
|
381
377
|
};
|
|
382
378
|
}, [setAnimationState, previousProps, propsWithDefaults, props]);
|
|
383
|
-
if (!
|
|
379
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(events)) {
|
|
384
380
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_shared_events__WEBPACK_IMPORTED_MODULE_12__.VictorySharedEvents, {
|
|
385
381
|
container: container,
|
|
386
382
|
eventKey: eventKey,
|
|
@@ -5002,16 +4998,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5002
4998
|
/* harmony export */ "VictoryContainer": function() { return /* binding */ VictoryContainer; },
|
|
5003
4999
|
/* harmony export */ "useVictoryContainer": function() { return /* binding */ useVictoryContainer; }
|
|
5004
5000
|
/* harmony export */ });
|
|
5005
|
-
/* harmony import */ var
|
|
5006
|
-
/* harmony import */ var
|
|
5007
|
-
/* harmony import */ var
|
|
5008
|
-
/* 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__);
|
|
5009
5005
|
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5010
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");
|
|
5011
5007
|
/* harmony import */ var _victory_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util */ "../../victory-core/es/victory-util/merge-refs.js");
|
|
5012
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");
|
|
5013
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");
|
|
5014
|
-
|
|
5015
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); }
|
|
5016
5011
|
|
|
5017
5012
|
|
|
@@ -5019,9 +5014,10 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
5019
5014
|
|
|
5020
5015
|
|
|
5021
5016
|
|
|
5017
|
+
|
|
5022
5018
|
const defaultProps = {
|
|
5023
5019
|
className: "VictoryContainer",
|
|
5024
|
-
portalComponent: /*#__PURE__*/
|
|
5020
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5025
5021
|
portalZIndex: 99,
|
|
5026
5022
|
responsive: true,
|
|
5027
5023
|
role: "img"
|
|
@@ -5038,10 +5034,10 @@ function useVictoryContainer(initialProps) {
|
|
|
5038
5034
|
height,
|
|
5039
5035
|
responsive
|
|
5040
5036
|
} = props;
|
|
5041
|
-
const localContainerRef = (0,
|
|
5037
|
+
const localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
5042
5038
|
|
|
5043
5039
|
// Generated ID stored in ref because it needs to persist across renders
|
|
5044
|
-
const generatedId = (0,
|
|
5040
|
+
const generatedId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-"));
|
|
5045
5041
|
const containerId = props.containerId ?? generatedId.current;
|
|
5046
5042
|
const getIdForElement = elName => `${containerId}-${elName}`;
|
|
5047
5043
|
const userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_3__.getSafeUserProps(props);
|
|
@@ -5100,7 +5096,7 @@ const VictoryContainer = initialProps => {
|
|
|
5100
5096
|
containerRef,
|
|
5101
5097
|
localContainerRef
|
|
5102
5098
|
} = useVictoryContainer(initialProps);
|
|
5103
|
-
|
|
5099
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(() => {
|
|
5104
5100
|
if (!events?.onWheel) return;
|
|
5105
5101
|
const handleWheel = e => e.preventDefault();
|
|
5106
5102
|
const container = localContainerRef?.current;
|
|
@@ -5110,21 +5106,21 @@ const VictoryContainer = initialProps => {
|
|
|
5110
5106
|
};
|
|
5111
5107
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5112
5108
|
}, []);
|
|
5113
|
-
return /*#__PURE__*/
|
|
5109
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5114
5110
|
className: className,
|
|
5115
5111
|
style: {
|
|
5116
5112
|
...style,
|
|
5117
5113
|
width: responsive ? style?.width : dimensions.width,
|
|
5118
5114
|
height: responsive ? style?.height : dimensions.height,
|
|
5119
|
-
pointerEvents: "none",
|
|
5120
|
-
touchAction: "none",
|
|
5121
|
-
position: "relative"
|
|
5115
|
+
pointerEvents: style?.pointerEvents ?? "none",
|
|
5116
|
+
touchAction: style?.touchAction ?? "none",
|
|
5117
|
+
position: style?.position ?? "relative"
|
|
5122
5118
|
},
|
|
5123
5119
|
"data-ouia-component-id": ouiaId,
|
|
5124
5120
|
"data-ouia-component-type": ouiaType,
|
|
5125
5121
|
"data-ouia-safe": ouiaSafe,
|
|
5126
5122
|
ref: (0,_victory_util__WEBPACK_IMPORTED_MODULE_4__.mergeRefs)([localContainerRef, containerRef])
|
|
5127
|
-
}, /*#__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({
|
|
5128
5124
|
width: width,
|
|
5129
5125
|
height: height,
|
|
5130
5126
|
tabIndex: tabIndex,
|
|
@@ -5137,11 +5133,11 @@ const VictoryContainer = initialProps => {
|
|
|
5137
5133
|
...dimensions,
|
|
5138
5134
|
pointerEvents: "all"
|
|
5139
5135
|
}
|
|
5140
|
-
}, userProps, events), title ? /*#__PURE__*/
|
|
5136
|
+
}, userProps, events), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("title", {
|
|
5141
5137
|
id: titleId
|
|
5142
|
-
}, title) : null, desc ? /*#__PURE__*/
|
|
5138
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("desc", {
|
|
5143
5139
|
id: descId
|
|
5144
|
-
}, desc) : null, children), /*#__PURE__*/
|
|
5140
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5145
5141
|
style: {
|
|
5146
5142
|
...dimensions,
|
|
5147
5143
|
zIndex: portalZIndex,
|
|
@@ -5149,7 +5145,7 @@ const VictoryContainer = initialProps => {
|
|
|
5149
5145
|
top: 0,
|
|
5150
5146
|
left: 0
|
|
5151
5147
|
}
|
|
5152
|
-
}, /*#__PURE__*/
|
|
5148
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_victory_portal_portal_outlet__WEBPACK_IMPORTED_MODULE_6__.PortalOutlet, {
|
|
5153
5149
|
as: portalComponent,
|
|
5154
5150
|
width: width,
|
|
5155
5151
|
height: height,
|
|
@@ -6417,16 +6413,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6417
6413
|
/* harmony export */ "modifyProps": function() { return /* binding */ modifyProps; },
|
|
6418
6414
|
/* harmony export */ "stringTicks": function() { return /* binding */ stringTicks; }
|
|
6419
6415
|
/* harmony export */ });
|
|
6420
|
-
/* harmony import */ var
|
|
6421
|
-
/* harmony import */ var
|
|
6422
|
-
/* harmony import */ var
|
|
6423
|
-
/* 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__);
|
|
6424
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");
|
|
6425
6421
|
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
6426
|
-
/* harmony import */ var
|
|
6427
|
-
/* harmony import */ var
|
|
6428
|
-
/* harmony import */ var
|
|
6429
|
-
/* 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__);
|
|
6430
6426
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
6431
6427
|
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain */ "../../victory-core/es/victory-util/domain.js");
|
|
6432
6428
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -6473,7 +6469,7 @@ function findAxisComponents(childComponents, predicate) {
|
|
|
6473
6469
|
if (child.type && child.type.role === "axis" && predicateFunction(child)) {
|
|
6474
6470
|
return memo.concat(child);
|
|
6475
6471
|
} else if (child.props && child.props.children) {
|
|
6476
|
-
return memo.concat(findAxes(
|
|
6472
|
+
return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children)));
|
|
6477
6473
|
}
|
|
6478
6474
|
return memo;
|
|
6479
6475
|
}, []);
|
|
@@ -6511,7 +6507,7 @@ function getAxisComponentsWithParent(childComponents, type) {
|
|
|
6511
6507
|
if (child.type && child.type.role === "axis" && matchesType(child)) {
|
|
6512
6508
|
return memo.concat(child);
|
|
6513
6509
|
} else if (child.props && child.props.children) {
|
|
6514
|
-
const childAxis = findComponents(
|
|
6510
|
+
const childAxis = findComponents(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children));
|
|
6515
6511
|
return childAxis.length > 0 ? memo.concat(child) : memo;
|
|
6516
6512
|
}
|
|
6517
6513
|
return memo;
|
|
@@ -6570,7 +6566,7 @@ function getDefaultTickFormat(props) {
|
|
|
6570
6566
|
return stringTicks(props) ? (x, index) => tickValues[index] : fallbackFormat;
|
|
6571
6567
|
}
|
|
6572
6568
|
const invertedStringMap = stringMap && _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
6573
|
-
const tickValueArray =
|
|
6569
|
+
const tickValueArray = lodash_orderBy__WEBPACK_IMPORTED_MODULE_4___default()(Object.values(stringMap), n => n);
|
|
6574
6570
|
const dataNames = tickValueArray.map(tick => invertedStringMap[tick]);
|
|
6575
6571
|
// string ticks should have one tick of padding at the beginning
|
|
6576
6572
|
const dataTicks = ["", ...dataNames, ""];
|
|
@@ -6607,14 +6603,14 @@ function getTickArray(props) {
|
|
|
6607
6603
|
if (tickValues && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickValues)) {
|
|
6608
6604
|
ticks = stringMap ? tickValues.map(tick => stringMap[tick]) : _helpers__WEBPACK_IMPORTED_MODULE_6__.range(1, tickValues.length + 1);
|
|
6609
6605
|
}
|
|
6610
|
-
const tickArray = ticks ?
|
|
6606
|
+
const tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(ticks) : getTicksFromFormat();
|
|
6611
6607
|
const buildTickArray = arr => {
|
|
6612
6608
|
const newTickArray = [];
|
|
6613
6609
|
const domain = props.domain && props.domain[axis] || props.domain;
|
|
6614
6610
|
if (arr) {
|
|
6615
6611
|
arr.forEach((t, index) => {
|
|
6616
6612
|
if (Array.isArray(domain)) {
|
|
6617
|
-
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()) {
|
|
6618
6614
|
newTickArray.push({
|
|
6619
6615
|
value: t,
|
|
6620
6616
|
index
|
|
@@ -6703,7 +6699,7 @@ function getTicks(props, scale, filterZero) {
|
|
|
6703
6699
|
* @param {String} axis: either x or y
|
|
6704
6700
|
* @returns {Array} returns a domain from tickValues
|
|
6705
6701
|
*/
|
|
6706
|
-
|
|
6702
|
+
|
|
6707
6703
|
function getDomainFromData(props, axis) {
|
|
6708
6704
|
const {
|
|
6709
6705
|
polar,
|
|
@@ -6766,7 +6762,7 @@ function modifyProps(props, fallbackProps) {
|
|
|
6766
6762
|
if (role === "axis") {
|
|
6767
6763
|
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
6768
6764
|
}
|
|
6769
|
-
const axisTheme =
|
|
6765
|
+
const axisTheme = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.theme[role], props.theme.axis);
|
|
6770
6766
|
const theme = Object.assign({}, props.theme, {
|
|
6771
6767
|
axis: axisTheme
|
|
6772
6768
|
});
|
|
@@ -6870,24 +6866,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6870
6866
|
/* harmony export */ "getStringsFromData": function() { return /* binding */ getStringsFromData; },
|
|
6871
6867
|
/* harmony export */ "isDataComponent": function() { return /* binding */ isDataComponent; }
|
|
6872
6868
|
/* harmony export */ });
|
|
6873
|
-
/* harmony import */ var
|
|
6874
|
-
/* harmony import */ var
|
|
6875
|
-
/* harmony import */ var
|
|
6876
|
-
/* 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__);
|
|
6877
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");
|
|
6878
6874
|
/* harmony import */ var lodash_isEqual__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isEqual__WEBPACK_IMPORTED_MODULE_2__);
|
|
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
|
|
6887
|
-
/* harmony import */ var
|
|
6888
|
-
/* harmony import */ var
|
|
6889
|
-
/* harmony import */ var
|
|
6890
|
-
/* 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__);
|
|
6891
6887
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6892
6888
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
6893
6889
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
@@ -6900,7 +6896,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6900
6896
|
|
|
6901
6897
|
|
|
6902
6898
|
|
|
6903
|
-
/* eslint-disable no-use-before-define */
|
|
6904
6899
|
|
|
6905
6900
|
|
|
6906
6901
|
|
|
@@ -6922,7 +6917,7 @@ function getLength(data) {
|
|
|
6922
6917
|
|
|
6923
6918
|
// Returns generated data for a given axis based on domain and sample from props
|
|
6924
6919
|
function generateDataArray(props, axis) {
|
|
6925
|
-
const propsDomain =
|
|
6920
|
+
const propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_3___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
6926
6921
|
const domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis).domain();
|
|
6927
6922
|
const samples = props.samples || 1;
|
|
6928
6923
|
const domainMax = Math.max(...domain);
|
|
@@ -6947,7 +6942,7 @@ function sortData(dataset, sortKey, sortOrder) {
|
|
|
6947
6942
|
formattedSortKey = `_${sortKey}`;
|
|
6948
6943
|
}
|
|
6949
6944
|
const order = sortOrder === "ascending" ? "asc" : "desc";
|
|
6950
|
-
return
|
|
6945
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_6___default()(dataset, formattedSortKey, order);
|
|
6951
6946
|
}
|
|
6952
6947
|
|
|
6953
6948
|
// This method will remove data points that break certain scales. (log scale only)
|
|
@@ -6991,7 +6986,7 @@ function getEventKey(key) {
|
|
|
6991
6986
|
return () => undefined;
|
|
6992
6987
|
}
|
|
6993
6988
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
6994
|
-
return
|
|
6989
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_7___default()(key);
|
|
6995
6990
|
}
|
|
6996
6991
|
|
|
6997
6992
|
// Returns data with an eventKey prop added to each datum
|
|
@@ -7026,8 +7021,6 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
7026
7021
|
const isUnderMinY = underMin(minDomainY);
|
|
7027
7022
|
const isOverMaxX = overMax(maxDomainX);
|
|
7028
7023
|
const isOverMaxY = overMax(maxDomainY);
|
|
7029
|
-
|
|
7030
|
-
// eslint-disable-next-line complexity
|
|
7031
7024
|
return dataset.map(datum => {
|
|
7032
7025
|
let {
|
|
7033
7026
|
_x,
|
|
@@ -7052,12 +7045,12 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
|
|
|
7052
7045
|
if (isUnderMinY(baseline) && !isUnderMinY(value)) _y0 = minDomainY;
|
|
7053
7046
|
// baseline and value with only baseline above max, set baseline to maxDomainY
|
|
7054
7047
|
if (isOverMaxY(baseline) && !isOverMaxY(value)) _y0 = maxDomainY;
|
|
7055
|
-
return Object.assign({}, datum,
|
|
7048
|
+
return Object.assign({}, datum, lodash_omitBy__WEBPACK_IMPORTED_MODULE_5___default()({
|
|
7056
7049
|
_x,
|
|
7057
7050
|
_y,
|
|
7058
7051
|
_y0,
|
|
7059
7052
|
_y1
|
|
7060
|
-
}, (
|
|
7053
|
+
}, (lodash_isUndefined__WEBPACK_IMPORTED_MODULE_4___default())));
|
|
7061
7054
|
});
|
|
7062
7055
|
}
|
|
7063
7056
|
|
|
@@ -7071,7 +7064,7 @@ function createStringMap(props, axis) {
|
|
|
7071
7064
|
const stringsFromAxes = getStringsFromAxes(props, axis);
|
|
7072
7065
|
const stringsFromCategories = getStringsFromCategories(props, axis);
|
|
7073
7066
|
const stringsFromData = getStringsFromData(props, axis);
|
|
7074
|
-
const allStrings =
|
|
7067
|
+
const allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_8___default()([...stringsFromAxes, ...stringsFromCategories, ...stringsFromData]);
|
|
7075
7068
|
return allStrings.length === 0 ? null : allStrings.reduce((memo, string, index) => {
|
|
7076
7069
|
memo[string] = index + 1;
|
|
7077
7070
|
return memo;
|
|
@@ -7138,7 +7131,6 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
7138
7131
|
};
|
|
7139
7132
|
}
|
|
7140
7133
|
const data = preformattedData ? dataset : dataset.reduce((dataArr, datum, index) => {
|
|
7141
|
-
// eslint-disable-line complexity
|
|
7142
7134
|
const parsedDatum = parseDatum(datum);
|
|
7143
7135
|
const fallbackValues = {
|
|
7144
7136
|
x: index,
|
|
@@ -7158,7 +7150,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
7158
7150
|
return memo;
|
|
7159
7151
|
}, {});
|
|
7160
7152
|
const formattedDatum = Object.assign({}, processedValues, parsedDatum);
|
|
7161
|
-
if (!
|
|
7153
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(formattedDatum)) {
|
|
7162
7154
|
dataArr.push(formattedDatum);
|
|
7163
7155
|
}
|
|
7164
7156
|
return dataArr;
|
|
@@ -7285,7 +7277,7 @@ function isDataComponent(component) {
|
|
|
7285
7277
|
};
|
|
7286
7278
|
let role = getRole(component);
|
|
7287
7279
|
if (role === "portal") {
|
|
7288
|
-
const children =
|
|
7280
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
7289
7281
|
role = children.length ? getRole(children[0]) : "";
|
|
7290
7282
|
}
|
|
7291
7283
|
const whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -7316,14 +7308,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7316
7308
|
/* harmony export */ "getSymmetricDomain": function() { return /* binding */ getSymmetricDomain; },
|
|
7317
7309
|
/* harmony export */ "isDomainComponent": function() { return /* binding */ isDomainComponent; }
|
|
7318
7310
|
/* harmony export */ });
|
|
7319
|
-
/* harmony import */ var
|
|
7320
|
-
/* harmony import */ var
|
|
7321
|
-
/* harmony import */ var
|
|
7322
|
-
/* 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__);
|
|
7323
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");
|
|
7324
7316
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
7325
|
-
/* harmony import */ var
|
|
7326
|
-
/* 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__);
|
|
7327
7319
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
7328
7320
|
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
7329
7321
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
@@ -7331,7 +7323,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7331
7323
|
|
|
7332
7324
|
|
|
7333
7325
|
|
|
7334
|
-
/* eslint-disable no-use-before-define */
|
|
7335
7326
|
|
|
7336
7327
|
|
|
7337
7328
|
|
|
@@ -7387,8 +7378,6 @@ function getExtremeFromData(dataset, axis, type) {
|
|
|
7387
7378
|
}, initialValue);
|
|
7388
7379
|
return containsDate ? new Date(result) : result;
|
|
7389
7380
|
}
|
|
7390
|
-
|
|
7391
|
-
// eslint-disable-next-line max-statements
|
|
7392
7381
|
function padDomain(domain, props, axis) {
|
|
7393
7382
|
if (!props.domainPadding) {
|
|
7394
7383
|
return domain;
|
|
@@ -7415,9 +7404,9 @@ function padDomain(domain, props, axis) {
|
|
|
7415
7404
|
max: max.valueOf() + simplePadding.right
|
|
7416
7405
|
};
|
|
7417
7406
|
const singleQuadrantDomainPadding = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.singleQuadrantDomainPadding) ? props.singleQuadrantDomainPadding[axis] : props.singleQuadrantDomainPadding;
|
|
7418
|
-
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;
|
|
7419
7408
|
const adjust = (val, type) => {
|
|
7420
|
-
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;
|
|
7421
7410
|
return coerce ? 0 : val;
|
|
7422
7411
|
};
|
|
7423
7412
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
@@ -7640,7 +7629,7 @@ function getMaxFromProps(props, axis) {
|
|
|
7640
7629
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.maxDomain) && props.maxDomain[axis] !== undefined) {
|
|
7641
7630
|
return props.maxDomain[axis];
|
|
7642
7631
|
}
|
|
7643
|
-
return typeof props.maxDomain === "number" ||
|
|
7632
|
+
return typeof props.maxDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.maxDomain) ? props.maxDomain : undefined;
|
|
7644
7633
|
}
|
|
7645
7634
|
|
|
7646
7635
|
/**
|
|
@@ -7653,7 +7642,7 @@ function getMinFromProps(props, axis) {
|
|
|
7653
7642
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(props.minDomain) && props.minDomain[axis] !== undefined) {
|
|
7654
7643
|
return props.minDomain[axis];
|
|
7655
7644
|
}
|
|
7656
|
-
return typeof props.minDomain === "number" ||
|
|
7645
|
+
return typeof props.minDomain === "number" || lodash_isDate__WEBPACK_IMPORTED_MODULE_1___default()(props.minDomain) ? props.minDomain : undefined;
|
|
7657
7646
|
}
|
|
7658
7647
|
|
|
7659
7648
|
/**
|
|
@@ -7664,7 +7653,7 @@ function getMinFromProps(props, axis) {
|
|
|
7664
7653
|
* @returns {Array} the symmetric domain
|
|
7665
7654
|
*/
|
|
7666
7655
|
function getSymmetricDomain(domain, values) {
|
|
7667
|
-
const processedData =
|
|
7656
|
+
const processedData = lodash_sortedUniq__WEBPACK_IMPORTED_MODULE_3___default()(values.sort((a, b) => a - b));
|
|
7668
7657
|
const step = processedData[1] - processedData[0];
|
|
7669
7658
|
return [domain[0], domain[1] + step];
|
|
7670
7659
|
}
|
|
@@ -7680,7 +7669,7 @@ function isDomainComponent(component) {
|
|
|
7680
7669
|
};
|
|
7681
7670
|
let role = getRole(component);
|
|
7682
7671
|
if (role === "portal") {
|
|
7683
|
-
const children =
|
|
7672
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(component.props.children);
|
|
7684
7673
|
role = children.length ? getRole(children[0]) : "";
|
|
7685
7674
|
}
|
|
7686
7675
|
const whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
@@ -7711,20 +7700,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7711
7700
|
/* harmony export */ "getScopedEvents": function() { return /* binding */ getScopedEvents; },
|
|
7712
7701
|
/* harmony export */ "omitGlobalEvents": function() { return /* binding */ omitGlobalEvents; }
|
|
7713
7702
|
/* harmony export */ });
|
|
7714
|
-
/* harmony import */ var
|
|
7715
|
-
/* harmony import */ var
|
|
7716
|
-
/* harmony import */ var
|
|
7717
|
-
/* harmony import */ var
|
|
7718
|
-
/* harmony import */ var
|
|
7719
|
-
/* harmony import */ var
|
|
7720
|
-
/* harmony import */ var
|
|
7721
|
-
/* 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__);
|
|
7722
7711
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7723
7712
|
|
|
7724
7713
|
|
|
7725
7714
|
|
|
7726
7715
|
|
|
7727
|
-
/* eslint-disable no-use-before-define */
|
|
7728
7716
|
|
|
7729
7717
|
const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
7730
7718
|
|
|
@@ -7772,11 +7760,10 @@ getScopedEvents) {
|
|
|
7772
7760
|
*/
|
|
7773
7761
|
const getAllEvents = () => {
|
|
7774
7762
|
// Mandatory usage: `getEvents.bind(this)`
|
|
7775
|
-
|
|
7763
|
+
|
|
7776
7764
|
if (Array.isArray(this.componentEvents)) {
|
|
7777
7765
|
return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
|
|
7778
7766
|
}
|
|
7779
|
-
/* eslint-enable no-invalid-this */
|
|
7780
7767
|
return props.events;
|
|
7781
7768
|
};
|
|
7782
7769
|
const allEvents = getAllEvents();
|
|
@@ -7796,12 +7783,12 @@ getScopedEvents) {
|
|
|
7796
7783
|
*/
|
|
7797
7784
|
// eslint-disable-next-line max-params
|
|
7798
7785
|
function getScopedEvents(events, namespace, childType, baseProps) {
|
|
7799
|
-
if (
|
|
7786
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
|
|
7800
7787
|
return {};
|
|
7801
7788
|
}
|
|
7802
7789
|
|
|
7803
7790
|
// Mandatory usage: `getScopedEvents.bind(this)`
|
|
7804
|
-
|
|
7791
|
+
|
|
7805
7792
|
const newBaseProps = baseProps || this.baseProps;
|
|
7806
7793
|
// returns the original base props or base state of a given target element
|
|
7807
7794
|
const getTargetProps = (identifier, type) => {
|
|
@@ -7810,7 +7797,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
7810
7797
|
target,
|
|
7811
7798
|
key
|
|
7812
7799
|
} = identifier;
|
|
7813
|
-
// eslint-disable-next-line no-invalid-this
|
|
7814
7800
|
const baseType = type === "props" ? newBaseProps : this.state || {};
|
|
7815
7801
|
const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
|
|
7816
7802
|
return key === "parent" ? base.parent : base[key] && base[key][target];
|
|
@@ -7837,7 +7823,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
7837
7823
|
|
|
7838
7824
|
// returns the state object with mutated props applied for a single key
|
|
7839
7825
|
const getMutationObject = (key, childName) => {
|
|
7840
|
-
// eslint-disable-next-line no-invalid-this
|
|
7841
7826
|
const baseState = this.state || {};
|
|
7842
7827
|
if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
|
|
7843
7828
|
return baseState;
|
|
@@ -7910,11 +7895,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
7910
7895
|
// into a state mutation, and calls setState
|
|
7911
7896
|
// eslint-disable-next-line max-params
|
|
7912
7897
|
const onEvent = (evt, childProps, eventKey, eventName) => {
|
|
7913
|
-
// eslint-disable-next-line no-invalid-this
|
|
7914
7898
|
const eventReturn = events[eventName](evt, childProps, eventKey, this);
|
|
7915
|
-
if (!
|
|
7899
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(eventReturn)) {
|
|
7916
7900
|
const callbacks = compileCallbacks(eventReturn);
|
|
7917
|
-
// eslint-disable-next-line no-invalid-this
|
|
7918
7901
|
this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
|
|
7919
7902
|
}
|
|
7920
7903
|
};
|
|
@@ -7944,7 +7927,7 @@ function getPartialEvents(events, eventKey, childProps) {
|
|
|
7944
7927
|
// eslint-disable-next-line max-params
|
|
7945
7928
|
function getEventState(eventKey, namespace, childType) {
|
|
7946
7929
|
// Mandatory usage: `getEventState.bind(this)`
|
|
7947
|
-
|
|
7930
|
+
|
|
7948
7931
|
const state = this.state || {};
|
|
7949
7932
|
if (!childType) {
|
|
7950
7933
|
return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
|
|
@@ -7974,7 +7957,7 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
7974
7957
|
const childState = baseState[childName];
|
|
7975
7958
|
const mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
7976
7959
|
memo[childName] = mutation ? mutation : childState;
|
|
7977
|
-
return
|
|
7960
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
7978
7961
|
}, {});
|
|
7979
7962
|
}
|
|
7980
7963
|
|
|
@@ -8010,7 +7993,7 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8010
7993
|
} else {
|
|
8011
7994
|
// use keys from both state and props so that elements not intially included in baseProps
|
|
8012
7995
|
// will be used. (i.e. labels)
|
|
8013
|
-
const targets =
|
|
7996
|
+
const targets = lodash_uniq__WEBPACK_IMPORTED_MODULE_3___default()(Object.keys(keyProps).concat(Object.keys(keyState)));
|
|
8014
7997
|
memo[eventKey] = targets.reduce((m, target) => {
|
|
8015
7998
|
const identifier = {
|
|
8016
7999
|
eventKey,
|
|
@@ -8019,10 +8002,10 @@ function getExternalMutations(mutations, baseProps, baseState, childName) {
|
|
|
8019
8002
|
};
|
|
8020
8003
|
const mutation = getExternalMutation(mutations, keyProps[target], keyState[target], identifier);
|
|
8021
8004
|
m[target] = mutation !== undefined ? Object.assign({}, keyState[target], mutation) : keyState[target];
|
|
8022
|
-
return
|
|
8005
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(m, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8023
8006
|
}, {});
|
|
8024
8007
|
}
|
|
8025
|
-
return
|
|
8008
|
+
return lodash_pickBy__WEBPACK_IMPORTED_MODULE_1___default()(memo, v => !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(v));
|
|
8026
8009
|
}, {});
|
|
8027
8010
|
}
|
|
8028
8011
|
|
|
@@ -8054,11 +8037,11 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
8054
8037
|
}
|
|
8055
8038
|
// find any mutation objects that match the target
|
|
8056
8039
|
const targetMutations = scopedMutations.filter(m => filterMutations(m, "target"));
|
|
8057
|
-
if (
|
|
8040
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(targetMutations)) {
|
|
8058
8041
|
return undefined;
|
|
8059
8042
|
}
|
|
8060
8043
|
const keyMutations = targetMutations.filter(m => filterMutations(m, "eventKey"));
|
|
8061
|
-
if (
|
|
8044
|
+
if (lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(keyMutations)) {
|
|
8062
8045
|
return undefined;
|
|
8063
8046
|
}
|
|
8064
8047
|
return keyMutations.reduce((memo, curr) => {
|
|
@@ -8084,8 +8067,8 @@ function getGlobalEventNameFromKey(key) {
|
|
|
8084
8067
|
const match = key.match(GLOBAL_EVENT_REGEX);
|
|
8085
8068
|
return match && match[1] && match[1].toLowerCase();
|
|
8086
8069
|
}
|
|
8087
|
-
const getGlobalEvents = events =>
|
|
8088
|
-
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));
|
|
8089
8072
|
const emulateReactEvent = event => Object.assign(event, {
|
|
8090
8073
|
nativeEvent: event
|
|
8091
8074
|
});
|
|
@@ -8126,41 +8109,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8126
8109
|
/* harmony export */ "reduceChildren": function() { return /* binding */ reduceChildren; },
|
|
8127
8110
|
/* harmony export */ "scalePoint": function() { return /* binding */ scalePoint; }
|
|
8128
8111
|
/* harmony export */ });
|
|
8129
|
-
/* harmony import */ var
|
|
8130
|
-
/* harmony import */ var
|
|
8131
|
-
/* harmony import */ var
|
|
8132
|
-
/* harmony import */ var
|
|
8133
|
-
/* harmony import */ var
|
|
8134
|
-
/* harmony import */ var
|
|
8135
|
-
/* harmony import */ var
|
|
8136
|
-
/* harmony import */ var
|
|
8137
|
-
|
|
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__);
|
|
8138
8120
|
|
|
8139
8121
|
|
|
8140
|
-
/* eslint-disable no-use-before-define */
|
|
8141
8122
|
|
|
8142
|
-
// Private Functions
|
|
8143
8123
|
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8124
|
+
/**
|
|
8125
|
+
* Determine the range of a cartesian axis
|
|
8126
|
+
*/
|
|
8127
|
+
function getCartesianRange(options) {
|
|
8128
|
+
const vertical = options.axis !== "x";
|
|
8148
8129
|
if (vertical) {
|
|
8149
|
-
return [
|
|
8130
|
+
return [options.height - options.padding.bottom, options.padding.top];
|
|
8150
8131
|
}
|
|
8151
|
-
return [padding.left,
|
|
8132
|
+
return [options.padding.left, options.width - options.padding.right];
|
|
8152
8133
|
}
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8156
|
-
|
|
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);
|
|
8157
8142
|
return [startAngle, endAngle];
|
|
8158
8143
|
}
|
|
8159
|
-
return [
|
|
8144
|
+
return [options.innerRadius || 0, getRadius({
|
|
8145
|
+
height: options.height,
|
|
8146
|
+
width: options.width,
|
|
8147
|
+
padding: options.padding
|
|
8148
|
+
})];
|
|
8160
8149
|
}
|
|
8161
8150
|
|
|
8162
|
-
// Exported Functions
|
|
8163
|
-
|
|
8164
8151
|
/**
|
|
8165
8152
|
* Creates an object composed of the inverted keys and values of object.
|
|
8166
8153
|
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
@@ -8197,8 +8184,11 @@ function omit(originalObject, ks) {
|
|
|
8197
8184
|
}
|
|
8198
8185
|
return newObject;
|
|
8199
8186
|
}
|
|
8187
|
+
|
|
8188
|
+
/**
|
|
8189
|
+
* Coalesce the x and y values from a data point
|
|
8190
|
+
*/
|
|
8200
8191
|
function getPoint(datum) {
|
|
8201
|
-
const exists = val => val !== undefined;
|
|
8202
8192
|
const {
|
|
8203
8193
|
_x,
|
|
8204
8194
|
_x1,
|
|
@@ -8209,16 +8199,20 @@ function getPoint(datum) {
|
|
|
8209
8199
|
_y0,
|
|
8210
8200
|
_voronoiY
|
|
8211
8201
|
} = datum;
|
|
8212
|
-
const defaultX =
|
|
8213
|
-
const defaultY =
|
|
8202
|
+
const defaultX = _x1 ?? _x;
|
|
8203
|
+
const defaultY = _y1 ?? _y;
|
|
8214
8204
|
const point = {
|
|
8215
|
-
x:
|
|
8216
|
-
x0:
|
|
8217
|
-
y:
|
|
8218
|
-
y0:
|
|
8205
|
+
x: _voronoiX ?? defaultX,
|
|
8206
|
+
x0: _x0 ?? _x,
|
|
8207
|
+
y: _voronoiY ?? defaultY,
|
|
8208
|
+
y0: _y0 ?? _y
|
|
8219
8209
|
};
|
|
8220
|
-
return
|
|
8210
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, point, datum);
|
|
8221
8211
|
}
|
|
8212
|
+
|
|
8213
|
+
/**
|
|
8214
|
+
* Scale a point based on the origin, direction, and given scale function
|
|
8215
|
+
*/
|
|
8222
8216
|
function scalePoint(props, datum) {
|
|
8223
8217
|
const {
|
|
8224
8218
|
scale,
|
|
@@ -8241,11 +8235,11 @@ function scalePoint(props, datum) {
|
|
|
8241
8235
|
y0: polar ? -y0 * Math.sin(x0) + origin.x : y0
|
|
8242
8236
|
};
|
|
8243
8237
|
}
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8238
|
+
|
|
8239
|
+
/**
|
|
8240
|
+
* Returns a padding value from a number or partial padding values
|
|
8241
|
+
*/
|
|
8242
|
+
function getPadding(padding) {
|
|
8249
8243
|
const paddingVal = typeof padding === "number" ? padding : 0;
|
|
8250
8244
|
const paddingObj = typeof padding === "object" ? padding : {};
|
|
8251
8245
|
return {
|
|
@@ -8255,6 +8249,10 @@ function getPadding(props, name) {
|
|
|
8255
8249
|
right: paddingObj.right || paddingVal
|
|
8256
8250
|
};
|
|
8257
8251
|
}
|
|
8252
|
+
|
|
8253
|
+
/**
|
|
8254
|
+
* Returns true if the component is defined as a tooltip
|
|
8255
|
+
*/
|
|
8258
8256
|
function isTooltip(component) {
|
|
8259
8257
|
const labelRole = component && component.type && component.type.role;
|
|
8260
8258
|
return labelRole === "tooltip";
|
|
@@ -8269,8 +8267,8 @@ function getDefaultStyles(props, role) {
|
|
|
8269
8267
|
return defaultStyles;
|
|
8270
8268
|
}
|
|
8271
8269
|
const tooltipStyle = theme.tooltip && theme.tooltip.style || {};
|
|
8272
|
-
const labelStyle =
|
|
8273
|
-
return
|
|
8270
|
+
const labelStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, tooltipStyle, defaultStyles.labels);
|
|
8271
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, {
|
|
8274
8272
|
labels: labelStyle
|
|
8275
8273
|
}, defaultStyles);
|
|
8276
8274
|
}
|
|
@@ -8278,7 +8276,7 @@ function getStyles(style, defaultStyles) {
|
|
|
8278
8276
|
const width = "100%";
|
|
8279
8277
|
const height = "100%";
|
|
8280
8278
|
if (!style) {
|
|
8281
|
-
return
|
|
8279
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8282
8280
|
parent: {
|
|
8283
8281
|
height,
|
|
8284
8282
|
width
|
|
@@ -8294,14 +8292,18 @@ function getStyles(style, defaultStyles) {
|
|
|
8294
8292
|
const defaultLabels = defaultStyles && defaultStyles.labels || {};
|
|
8295
8293
|
const defaultData = defaultStyles && defaultStyles.data || {};
|
|
8296
8294
|
return {
|
|
8297
|
-
parent:
|
|
8295
|
+
parent: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, parent, defaultParent, {
|
|
8298
8296
|
width,
|
|
8299
8297
|
height
|
|
8300
8298
|
}),
|
|
8301
|
-
labels:
|
|
8302
|
-
data:
|
|
8299
|
+
labels: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, labels, defaultLabels),
|
|
8300
|
+
data: lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, data, defaultData)
|
|
8303
8301
|
};
|
|
8304
8302
|
}
|
|
8303
|
+
|
|
8304
|
+
/**
|
|
8305
|
+
* Returns the value of a prop or accessor function with the given props
|
|
8306
|
+
*/
|
|
8305
8307
|
function evaluateProp(prop, props) {
|
|
8306
8308
|
return isFunction(prop) ? prop(props) : prop;
|
|
8307
8309
|
}
|
|
@@ -8323,19 +8325,28 @@ function degreesToRadians(degrees) {
|
|
|
8323
8325
|
function radiansToDegrees(radians) {
|
|
8324
8326
|
return typeof radians === "number" ? radians / (Math.PI / 180) : radians;
|
|
8325
8327
|
}
|
|
8326
|
-
|
|
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;
|
|
8327
8338
|
const {
|
|
8328
8339
|
left,
|
|
8329
8340
|
right,
|
|
8330
8341
|
top,
|
|
8331
8342
|
bottom
|
|
8332
|
-
} =
|
|
8333
|
-
const {
|
|
8334
|
-
width,
|
|
8335
|
-
height
|
|
8336
|
-
} = props;
|
|
8343
|
+
} = padding;
|
|
8337
8344
|
return Math.min(width - left - right, height - top - bottom) / 2;
|
|
8338
8345
|
}
|
|
8346
|
+
|
|
8347
|
+
/**
|
|
8348
|
+
* Returns the origin for a polar chart within the padded area
|
|
8349
|
+
*/
|
|
8339
8350
|
function getPolarOrigin(props) {
|
|
8340
8351
|
const {
|
|
8341
8352
|
width,
|
|
@@ -8346,7 +8357,7 @@ function getPolarOrigin(props) {
|
|
|
8346
8357
|
bottom,
|
|
8347
8358
|
left,
|
|
8348
8359
|
right
|
|
8349
|
-
} = getPadding(props);
|
|
8360
|
+
} = getPadding(props.padding);
|
|
8350
8361
|
const radius = Math.min(width - left - right, height - top - bottom) / 2;
|
|
8351
8362
|
const offsetWidth = width / 2 + left - right;
|
|
8352
8363
|
const offsetHeight = height / 2 + top - bottom;
|
|
@@ -8355,13 +8366,30 @@ function getPolarOrigin(props) {
|
|
|
8355
8366
|
y: offsetHeight + radius > height ? radius + top - bottom : offsetHeight
|
|
8356
8367
|
};
|
|
8357
8368
|
}
|
|
8369
|
+
|
|
8370
|
+
/**
|
|
8371
|
+
* Determine the range of an axis based on the given props
|
|
8372
|
+
*/
|
|
8358
8373
|
function getRange(props, axis) {
|
|
8359
8374
|
if (props.range && props.range[axis]) {
|
|
8360
8375
|
return props.range[axis];
|
|
8361
8376
|
} else if (props.range && Array.isArray(props.range)) {
|
|
8362
8377
|
return props.range;
|
|
8363
8378
|
}
|
|
8364
|
-
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
|
+
});
|
|
8365
8393
|
}
|
|
8366
8394
|
|
|
8367
8395
|
/**
|
|
@@ -8393,7 +8421,7 @@ function createAccessor(key) {
|
|
|
8393
8421
|
return x => x;
|
|
8394
8422
|
}
|
|
8395
8423
|
// otherwise, assume it is an array index, property key or path (_.property handles all three)
|
|
8396
|
-
return
|
|
8424
|
+
return lodash_property__WEBPACK_IMPORTED_MODULE_2___default()(key);
|
|
8397
8425
|
}
|
|
8398
8426
|
function modifyProps(props, fallbackProps, role) {
|
|
8399
8427
|
const theme = props.theme && props.theme[role] ? props.theme[role] : {};
|
|
@@ -8402,7 +8430,7 @@ function modifyProps(props, fallbackProps, role) {
|
|
|
8402
8430
|
const defaultObject = horizontal === undefined ? {} : {
|
|
8403
8431
|
horizontal
|
|
8404
8432
|
};
|
|
8405
|
-
return
|
|
8433
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()(defaultObject, props, themeProps, fallbackProps);
|
|
8406
8434
|
}
|
|
8407
8435
|
|
|
8408
8436
|
/**
|
|
@@ -8489,10 +8517,10 @@ initialMemo, combine) {
|
|
|
8489
8517
|
const childRole = child.type && child.type.role;
|
|
8490
8518
|
const childName = child.props.name || `${childRole}-${names[index]}`;
|
|
8491
8519
|
if (child.props && child.props.children) {
|
|
8492
|
-
const childProps = Object.assign({}, child.props,
|
|
8493
|
-
const nestedChildren = child.type && child.type.role === "stack" && isFunction(child.type.getChildren) ? child.type.getChildren(childProps) :
|
|
8494
|
-
const nestedChildProps = Object.assign({}, c.props,
|
|
8495
|
-
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);
|
|
8496
8524
|
});
|
|
8497
8525
|
const childNames = nestedChildren.map((c, i) => `${childName}-${i}`);
|
|
8498
8526
|
const nestedResults = traverseChildren(nestedChildren, childNames, child);
|
|
@@ -8506,7 +8534,7 @@ initialMemo, combine) {
|
|
|
8506
8534
|
return newMemo;
|
|
8507
8535
|
}, initialMemo);
|
|
8508
8536
|
};
|
|
8509
|
-
const validChildren = children.filter(
|
|
8537
|
+
const validChildren = children.filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement);
|
|
8510
8538
|
const childNames = validChildren.map((c, i) => i);
|
|
8511
8539
|
return traverseChildren(validChildren, childNames);
|
|
8512
8540
|
}
|
|
@@ -8526,10 +8554,10 @@ function isHorizontal(props) {
|
|
|
8526
8554
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
8527
8555
|
return memo || childProps.horizontal;
|
|
8528
8556
|
}
|
|
8529
|
-
return traverseChildren(
|
|
8557
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(childProps.children));
|
|
8530
8558
|
}, false);
|
|
8531
8559
|
};
|
|
8532
|
-
return traverseChildren(
|
|
8560
|
+
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
8533
8561
|
}
|
|
8534
8562
|
|
|
8535
8563
|
/***/ }),
|
|
@@ -8545,10 +8573,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8545
8573
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8546
8574
|
/* harmony export */ "useAnimationState": function() { return /* binding */ useAnimationState; }
|
|
8547
8575
|
/* harmony export */ });
|
|
8548
|
-
/* harmony import */ var
|
|
8549
|
-
/* harmony import */ var
|
|
8550
|
-
/* harmony import */ var
|
|
8551
|
-
/* 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__);
|
|
8552
8580
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8553
8581
|
/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../transitions */ "../../victory-core/es/victory-util/transitions.js");
|
|
8554
8582
|
|
|
@@ -8564,10 +8592,10 @@ const useAnimationState = function (initialState) {
|
|
|
8564
8592
|
if (initialState === void 0) {
|
|
8565
8593
|
initialState = INITIAL_STATE;
|
|
8566
8594
|
}
|
|
8567
|
-
const [state, _setState] =
|
|
8595
|
+
const [state, _setState] = react__WEBPACK_IMPORTED_MODULE_0___default().useState(initialState);
|
|
8568
8596
|
|
|
8569
8597
|
// This allows us to use a state object and maintain the same API as this.setState
|
|
8570
|
-
const setState =
|
|
8598
|
+
const setState = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(newState => {
|
|
8571
8599
|
_setState(oldState => ({
|
|
8572
8600
|
...oldState,
|
|
8573
8601
|
...newState
|
|
@@ -8575,14 +8603,14 @@ const useAnimationState = function (initialState) {
|
|
|
8575
8603
|
}, [_setState]);
|
|
8576
8604
|
|
|
8577
8605
|
// This is a copy of Wrapper.getAnimationProps
|
|
8578
|
-
const getAnimationProps =
|
|
8606
|
+
const getAnimationProps = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((props, child, index) => {
|
|
8579
8607
|
if (!props?.animate) {
|
|
8580
8608
|
return child.props.animate;
|
|
8581
8609
|
}
|
|
8582
8610
|
const getFilteredState = () => {
|
|
8583
8611
|
let childrenTransitions = state && state.childrenTransitions;
|
|
8584
8612
|
childrenTransitions = _collection__WEBPACK_IMPORTED_MODULE_2__.isArrayOfArrays(childrenTransitions) ? childrenTransitions[index] : childrenTransitions;
|
|
8585
|
-
return
|
|
8613
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8586
8614
|
childrenTransitions
|
|
8587
8615
|
}, state);
|
|
8588
8616
|
};
|
|
@@ -8593,28 +8621,28 @@ const useAnimationState = function (initialState) {
|
|
|
8593
8621
|
const getTransitionProps = _transitions__WEBPACK_IMPORTED_MODULE_3__.getTransitionPropsFactory(props, filteredState, newState => setState(newState));
|
|
8594
8622
|
getTransitions = childComponent => getTransitionProps(childComponent, index);
|
|
8595
8623
|
}
|
|
8596
|
-
return
|
|
8624
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8597
8625
|
getTransitions,
|
|
8598
8626
|
parentState
|
|
8599
8627
|
}, props.animate, child.props.animate);
|
|
8600
8628
|
}, [state, setState]);
|
|
8601
8629
|
|
|
8602
8630
|
// This is a copy of Wrapper.setAnimationState
|
|
8603
|
-
const setAnimationState =
|
|
8631
|
+
const setAnimationState = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback((props, nextProps) => {
|
|
8604
8632
|
if (!props?.animate) {
|
|
8605
8633
|
return;
|
|
8606
8634
|
}
|
|
8607
8635
|
if (props.animate.parentState) {
|
|
8608
8636
|
const nodesWillExit = props.animate.parentState.nodesWillExit;
|
|
8609
8637
|
const oldProps = nodesWillExit ? props : null;
|
|
8610
|
-
const newState =
|
|
8638
|
+
const newState = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
|
|
8611
8639
|
oldProps,
|
|
8612
8640
|
nextProps
|
|
8613
8641
|
}, props.animate.parentState);
|
|
8614
8642
|
setState(newState);
|
|
8615
8643
|
} else {
|
|
8616
|
-
const oldChildren =
|
|
8617
|
-
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);
|
|
8618
8646
|
const isContinuous = child => {
|
|
8619
8647
|
const check = c => c.type && c.type.continuous;
|
|
8620
8648
|
return Array.isArray(child) ? child.some(check) : check(child);
|
|
@@ -8639,7 +8667,7 @@ const useAnimationState = function (initialState) {
|
|
|
8639
8667
|
});
|
|
8640
8668
|
}
|
|
8641
8669
|
}, [setState]);
|
|
8642
|
-
const getProps =
|
|
8670
|
+
const getProps = react__WEBPACK_IMPORTED_MODULE_0___default().useCallback(initialProps => {
|
|
8643
8671
|
return state && state.nodesWillExit ? state.oldProps || initialProps : initialProps;
|
|
8644
8672
|
}, [state]);
|
|
8645
8673
|
return {
|
|
@@ -8740,11 +8768,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8740
8768
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8741
8769
|
/* harmony export */ "warn": function() { return /* binding */ warn; }
|
|
8742
8770
|
/* harmony export */ });
|
|
8743
|
-
/* global console */
|
|
8771
|
+
/* global console process */
|
|
8744
8772
|
/* eslint-disable no-console */
|
|
8745
8773
|
|
|
8746
|
-
// TODO: Use "warning" npm module like React is switching to.
|
|
8747
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
|
|
8748
8777
|
if (true) {
|
|
8749
8778
|
if (console && console.warn) {
|
|
8750
8779
|
console.warn(message);
|
|
@@ -8815,7 +8844,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8815
8844
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8816
8845
|
/* harmony import */ var victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-vendor/d3-scale */ "../../victory-vendor/es/d3-scale.js");
|
|
8817
8846
|
|
|
8818
|
-
/* eslint-disable no-use-before-define */
|
|
8819
8847
|
|
|
8820
8848
|
|
|
8821
8849
|
|
|
@@ -9129,12 +9157,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9129
9157
|
/* harmony export */ "getInitialTransitionState": function() { return /* binding */ getInitialTransitionState; },
|
|
9130
9158
|
/* harmony export */ "getTransitionPropsFactory": function() { return /* binding */ getTransitionPropsFactory; }
|
|
9131
9159
|
/* harmony export */ });
|
|
9132
|
-
/* harmony import */ var
|
|
9133
|
-
/* 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__);
|
|
9134
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");
|
|
9135
9163
|
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_1__);
|
|
9136
|
-
/* harmony import */ var
|
|
9137
|
-
/* 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__);
|
|
9138
9166
|
|
|
9139
9167
|
|
|
9140
9168
|
|
|
@@ -9225,13 +9253,13 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
9225
9253
|
const getTransitionsFromChildren = (old, next) => {
|
|
9226
9254
|
return old.map((child, idx) => {
|
|
9227
9255
|
if (child && child.props && child.props.children && next[idx]) {
|
|
9228
|
-
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));
|
|
9229
9257
|
}
|
|
9230
9258
|
// get Transition entering and exiting nodes
|
|
9231
9259
|
return getTransition(child, next[idx]);
|
|
9232
9260
|
});
|
|
9233
9261
|
};
|
|
9234
|
-
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));
|
|
9235
9263
|
return {
|
|
9236
9264
|
nodesWillExit,
|
|
9237
9265
|
nodesWillEnter,
|
|
@@ -9245,7 +9273,7 @@ function getInitialTransitionState(oldChildren, nextChildren) {
|
|
|
9245
9273
|
};
|
|
9246
9274
|
}
|
|
9247
9275
|
function getInitialChildProps(animate, data) {
|
|
9248
|
-
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());
|
|
9249
9277
|
return {
|
|
9250
9278
|
data: data.map((datum, idx) => Object.assign({}, datum, after(datum, idx, data)))
|
|
9251
9279
|
};
|
|
@@ -9262,7 +9290,7 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
9262
9290
|
data
|
|
9263
9291
|
};
|
|
9264
9292
|
}
|
|
9265
|
-
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());
|
|
9266
9294
|
// If nodes need to exit, transform them with the provided onLoad.before function.
|
|
9267
9295
|
const newData = data.map((datum, idx) => {
|
|
9268
9296
|
return Object.assign({}, datum, before(datum, idx, data));
|
|
@@ -9273,8 +9301,6 @@ function getChildBeforeLoad(animate, child, data, cb) {
|
|
|
9273
9301
|
clipWidth: 0
|
|
9274
9302
|
};
|
|
9275
9303
|
}
|
|
9276
|
-
|
|
9277
|
-
// eslint-disable-next-line max-params
|
|
9278
9304
|
function getChildOnLoad(animate, data, cb) {
|
|
9279
9305
|
const newAnimate = Object.assign({}, animate, {
|
|
9280
9306
|
onEnd: cb
|
|
@@ -9286,7 +9312,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
9286
9312
|
data
|
|
9287
9313
|
};
|
|
9288
9314
|
}
|
|
9289
|
-
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());
|
|
9290
9316
|
// If nodes need to exit, transform them with the provided onLoad.after function.
|
|
9291
9317
|
newData = data.map((datum, idx) => {
|
|
9292
9318
|
return Object.assign({}, datum, after(datum, idx, data));
|
|
@@ -9297,7 +9323,7 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
9297
9323
|
};
|
|
9298
9324
|
}
|
|
9299
9325
|
|
|
9300
|
-
// eslint-disable-next-line max-params
|
|
9326
|
+
// eslint-disable-next-line max-params
|
|
9301
9327
|
function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
9302
9328
|
// Whether or not _this_ child has exiting nodes, we want the exit-
|
|
9303
9329
|
// transition for all children to have the same duration, delay, etc.
|
|
@@ -9308,7 +9334,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
9308
9334
|
// After the exit transition occurs, trigger the animations for
|
|
9309
9335
|
// nodes that are neither exiting nor entering.
|
|
9310
9336
|
animate.onEnd = cb;
|
|
9311
|
-
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());
|
|
9312
9338
|
// If nodes need to exit, transform them with the provided onExit.before function.
|
|
9313
9339
|
newData = data.map((datum, idx) => {
|
|
9314
9340
|
const key = (datum.key || idx).toString();
|
|
@@ -9321,7 +9347,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
9321
9347
|
};
|
|
9322
9348
|
}
|
|
9323
9349
|
|
|
9324
|
-
// eslint-disable-next-line max-params
|
|
9350
|
+
// eslint-disable-next-line max-params
|
|
9325
9351
|
function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
9326
9352
|
let newAnimate = animate;
|
|
9327
9353
|
let newData = data;
|
|
@@ -9331,7 +9357,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
9331
9357
|
newAnimate = Object.assign({}, animate, {
|
|
9332
9358
|
onEnd: cb
|
|
9333
9359
|
});
|
|
9334
|
-
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());
|
|
9335
9361
|
// We want the entering nodes to be included in the transition target
|
|
9336
9362
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
9337
9363
|
// so perform the `onEnter.before` transformation on each node.
|
|
@@ -9346,7 +9372,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
|
9346
9372
|
};
|
|
9347
9373
|
}
|
|
9348
9374
|
|
|
9349
|
-
// eslint-disable-next-line max-params
|
|
9375
|
+
// eslint-disable-next-line max-params
|
|
9350
9376
|
function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
9351
9377
|
// Whether or not _this_ child has entering nodes, we want the entering-
|
|
9352
9378
|
// transition for all children to have the same duration, delay, etc.
|
|
@@ -9358,7 +9384,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
9358
9384
|
// domain should encompass the nodes that will now enter. So perform
|
|
9359
9385
|
// the `onEnter.after` transformation on each node.
|
|
9360
9386
|
newAnimate.onEnd = cb;
|
|
9361
|
-
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());
|
|
9362
9388
|
newData = data.map((datum, idx) => {
|
|
9363
9389
|
const key = getDatumKey(datum, idx);
|
|
9364
9390
|
return enteringNodes[key] ? Object.assign({}, datum, after(datum, idx, data)) : datum;
|
|
@@ -9453,8 +9479,6 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
9453
9479
|
}
|
|
9454
9480
|
return {};
|
|
9455
9481
|
};
|
|
9456
|
-
|
|
9457
|
-
// eslint-disable-next-line max-statements, complexity, max-len
|
|
9458
9482
|
return function getTransitionProps(child, index) {
|
|
9459
9483
|
const data = getChildData(child) || [];
|
|
9460
9484
|
const animate = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.animate, child.props.animate);
|
|
@@ -9652,16 +9676,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9652
9676
|
/* harmony export */ "getStyle": function() { return /* binding */ getStyle; },
|
|
9653
9677
|
/* harmony export */ "getWidth": function() { return /* binding */ getWidth; }
|
|
9654
9678
|
/* harmony export */ });
|
|
9655
|
-
/* harmony import */ var
|
|
9656
|
-
/* harmony import */ var
|
|
9657
|
-
/* harmony import */ var
|
|
9658
|
-
/* 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__);
|
|
9659
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");
|
|
9660
9684
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_2__);
|
|
9661
|
-
/* harmony import */ var
|
|
9662
|
-
/* harmony import */ var
|
|
9663
|
-
/* harmony import */ var
|
|
9664
|
-
/* 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__);
|
|
9665
9689
|
/* harmony import */ var _axis__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./axis */ "../../victory-core/es/victory-util/axis.js");
|
|
9666
9690
|
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style */ "../../victory-core/es/victory-util/style.js");
|
|
9667
9691
|
/* harmony import */ var _data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data */ "../../victory-core/es/victory-util/data.js");
|
|
@@ -9755,7 +9779,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
9755
9779
|
maxDomain
|
|
9756
9780
|
};
|
|
9757
9781
|
let stack = 0;
|
|
9758
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
9782
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9759
9783
|
parentProps = addBinsToParentPropsIfHistogram({
|
|
9760
9784
|
children,
|
|
9761
9785
|
props,
|
|
@@ -9769,7 +9793,7 @@ function getDataFromChildren(props, childComponents) {
|
|
|
9769
9793
|
if (!_data__WEBPACK_IMPORTED_MODULE_7__.isDataComponent(child)) {
|
|
9770
9794
|
return null;
|
|
9771
9795
|
} else if (child.type && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(child.type.getData)) {
|
|
9772
|
-
childElement = parent ? /*#__PURE__*/
|
|
9796
|
+
childElement = parent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, parent.props) : child;
|
|
9773
9797
|
childData = childElement.type.getData(childProps);
|
|
9774
9798
|
} else {
|
|
9775
9799
|
childData = _data__WEBPACK_IMPORTED_MODULE_7__.getData(childProps);
|
|
@@ -9781,16 +9805,16 @@ function getDataFromChildren(props, childComponents) {
|
|
|
9781
9805
|
}, datum));
|
|
9782
9806
|
};
|
|
9783
9807
|
const stacked = children.filter(c => c.type && c.type.role === "stack").length;
|
|
9784
|
-
const combine = (memo, val) => memo.concat(
|
|
9808
|
+
const combine = (memo, val) => memo.concat(lodash_uniqBy__WEBPACK_IMPORTED_MODULE_4___default()(val, "_group"));
|
|
9785
9809
|
const datasets = _helpers__WEBPACK_IMPORTED_MODULE_6__.reduceChildren(children, iteratee, props, [], combine);
|
|
9786
9810
|
const group = stacked ? "_group" : "_stack";
|
|
9787
|
-
return Object.values(
|
|
9811
|
+
return Object.values(lodash_groupBy__WEBPACK_IMPORTED_MODULE_3___default()(datasets, group));
|
|
9788
9812
|
}
|
|
9789
9813
|
function getData(props, childComponents) {
|
|
9790
9814
|
if (props.data) {
|
|
9791
9815
|
return _data__WEBPACK_IMPORTED_MODULE_7__.getData(props);
|
|
9792
9816
|
}
|
|
9793
|
-
return getDataFromChildren(props, childComponents ||
|
|
9817
|
+
return getDataFromChildren(props, childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children));
|
|
9794
9818
|
}
|
|
9795
9819
|
function getWidth(props, groupLength, seriesLength) {
|
|
9796
9820
|
const {
|
|
@@ -9842,8 +9866,7 @@ function getDefaultDomainPadding(props, axis, childComponents) {
|
|
|
9842
9866
|
};
|
|
9843
9867
|
}
|
|
9844
9868
|
function getDomainFromChildren(props, axis, childComponents) {
|
|
9845
|
-
|
|
9846
|
-
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(props.children);
|
|
9869
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9847
9870
|
const parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_7__.getData(props) : undefined;
|
|
9848
9871
|
const {
|
|
9849
9872
|
polar,
|
|
@@ -9881,7 +9904,7 @@ function getDomainFromChildren(props, axis, childComponents) {
|
|
|
9881
9904
|
return [min, max];
|
|
9882
9905
|
}
|
|
9883
9906
|
function getDomain(props, axis, childComponents) {
|
|
9884
|
-
const children = childComponents ||
|
|
9907
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9885
9908
|
const propsDomain = _domain__WEBPACK_IMPORTED_MODULE_8__.getDomainFromProps(props, axis);
|
|
9886
9909
|
const domainPadding = getDefaultDomainPadding(props, axis, children);
|
|
9887
9910
|
let domain;
|
|
@@ -9905,7 +9928,7 @@ function getScale(props, axis, childComponents) {
|
|
|
9905
9928
|
if (props.data) {
|
|
9906
9929
|
return _scale__WEBPACK_IMPORTED_MODULE_10__.getBaseScale(props, axis);
|
|
9907
9930
|
}
|
|
9908
|
-
const children = childComponents ? childComponents.slice(0) :
|
|
9931
|
+
const children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
9909
9932
|
const iteratee = child => {
|
|
9910
9933
|
const sharedProps = Object.assign({}, child.props, {
|
|
9911
9934
|
horizontal: props.horizontal
|
|
@@ -9974,8 +9997,8 @@ function getChildStyle(child, index, calculatedProps, theme) {
|
|
|
9974
9997
|
const dataWidth = role === "stack" ? {} : {
|
|
9975
9998
|
width: getWidth(calculatedProps)
|
|
9976
9999
|
};
|
|
9977
|
-
const dataStyle =
|
|
9978
|
-
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);
|
|
9979
10002
|
return {
|
|
9980
10003
|
...childStyle,
|
|
9981
10004
|
parent: style.parent,
|
|
@@ -10031,7 +10054,7 @@ function getCategoryAndAxisStringsFromChildren(props, axis, childComponents) {
|
|
|
10031
10054
|
return lodash_uniq__WEBPACK_IMPORTED_MODULE_2___default()([...categoryStrings, ...axisStrings].flat());
|
|
10032
10055
|
}
|
|
10033
10056
|
function getStringsFromChildren(props, childComponents) {
|
|
10034
|
-
const children = childComponents ||
|
|
10057
|
+
const children = childComponents || react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
10035
10058
|
const xStrings = getCategoryAndAxisStringsFromChildren(props, "x", children);
|
|
10036
10059
|
const yStrings = getCategoryAndAxisStringsFromChildren(props, "y", children);
|
|
10037
10060
|
const dataStrings = getStringsFromData(children);
|
|
@@ -10066,22 +10089,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10066
10089
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10067
10090
|
/* harmony export */ "VictorySharedEvents": function() { return /* binding */ VictorySharedEvents; }
|
|
10068
10091
|
/* harmony export */ });
|
|
10069
|
-
/* harmony import */ var
|
|
10070
|
-
/* harmony import */ var
|
|
10071
|
-
/* harmony import */ var
|
|
10072
|
-
/* harmony import */ var
|
|
10073
|
-
/* harmony import */ var
|
|
10074
|
-
/* harmony import */ var
|
|
10075
|
-
/* harmony import */ var
|
|
10076
|
-
/* harmony import */ var
|
|
10077
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/timer-context.js");
|
|
10078
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/events.js");
|
|
10079
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
|
|
10080
|
-
/* 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__);
|
|
10081
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");
|
|
10082
10101
|
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
10083
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");
|
|
10084
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");
|
|
10085
10108
|
|
|
10086
10109
|
|
|
10087
10110
|
|
|
@@ -10095,14 +10118,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10095
10118
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
10096
10119
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
10097
10120
|
|
|
10098
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-
|
|
10121
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
10099
10122
|
|
|
10100
|
-
class VictorySharedEvents extends (
|
|
10123
|
+
class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
|
|
10101
10124
|
static displayName = "VictorySharedEvents";
|
|
10102
10125
|
static role = "shared-event-wrapper";
|
|
10103
10126
|
static contextType = victory_core__WEBPACK_IMPORTED_MODULE_6__["default"];
|
|
10104
10127
|
static defaultProps = {
|
|
10105
|
-
groupComponent: /*#__PURE__*/
|
|
10128
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", null)
|
|
10106
10129
|
};
|
|
10107
10130
|
constructor(props) {
|
|
10108
10131
|
super(props);
|
|
@@ -10159,7 +10182,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10159
10182
|
return props.events;
|
|
10160
10183
|
}
|
|
10161
10184
|
applyExternalMutations(props, externalMutations) {
|
|
10162
|
-
if (!
|
|
10185
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
|
|
10163
10186
|
const callbacks = props.externalEventMutations.reduce((memo, mutation) => victory_core__WEBPACK_IMPORTED_MODULE_9__.isFunction(mutation.callback) ? memo.concat(mutation.callback) : memo, []);
|
|
10164
10187
|
const compiledCallbacks = callbacks.length ? () => {
|
|
10165
10188
|
callbacks.forEach(c => c());
|
|
@@ -10168,7 +10191,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10168
10191
|
}
|
|
10169
10192
|
}
|
|
10170
10193
|
getExternalMutations(props, baseProps) {
|
|
10171
|
-
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;
|
|
10172
10195
|
}
|
|
10173
10196
|
cacheSharedEvents(name, sharedEvents, cacheValues) {
|
|
10174
10197
|
this.sharedEventsCache[name] = [sharedEvents, cacheValues];
|
|
@@ -10184,7 +10207,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10184
10207
|
const {
|
|
10185
10208
|
container
|
|
10186
10209
|
} = props;
|
|
10187
|
-
const children =
|
|
10210
|
+
const children = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(this.props.children);
|
|
10188
10211
|
const childBaseProps = this.getBasePropsFromChildren(children);
|
|
10189
10212
|
const parentBaseProps = container ? container.props : {};
|
|
10190
10213
|
return Object.assign({}, childBaseProps, {
|
|
@@ -10200,7 +10223,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10200
10223
|
return null;
|
|
10201
10224
|
};
|
|
10202
10225
|
const baseProps = victory_core__WEBPACK_IMPORTED_MODULE_9__.reduceChildren(childComponents, iteratee);
|
|
10203
|
-
return
|
|
10226
|
+
return lodash_fromPairs__WEBPACK_IMPORTED_MODULE_3___default()(baseProps);
|
|
10204
10227
|
}
|
|
10205
10228
|
getNewChildren(props, baseProps) {
|
|
10206
10229
|
const {
|
|
@@ -10210,9 +10233,9 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10210
10233
|
const alterChildren = (children, childNames) => {
|
|
10211
10234
|
return children.reduce((memo, child, index) => {
|
|
10212
10235
|
if (child.props.children) {
|
|
10213
|
-
const newChildren =
|
|
10236
|
+
const newChildren = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(child.props.children);
|
|
10214
10237
|
const names = childNames.slice(index, index + newChildren.length);
|
|
10215
|
-
const results = /*#__PURE__*/
|
|
10238
|
+
const results = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, child.props, alterChildren(newChildren, names));
|
|
10216
10239
|
return memo.concat(results);
|
|
10217
10240
|
} else if (childNames[index] !== "parent" && child.type && victory_core__WEBPACK_IMPORTED_MODULE_9__.isFunction(child.type.getBaseProps)) {
|
|
10218
10241
|
const name = child.props.name || childNames[index];
|
|
@@ -10231,7 +10254,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10231
10254
|
getEventState: (key, target) => this.getEventState(key, target, name)
|
|
10232
10255
|
};
|
|
10233
10256
|
this.cacheSharedEvents(name, sharedEvents, sharedEventsCacheValues);
|
|
10234
|
-
return memo.concat( /*#__PURE__*/
|
|
10257
|
+
return memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(child, Object.assign({
|
|
10235
10258
|
key: `events-${name}`,
|
|
10236
10259
|
sharedEvents,
|
|
10237
10260
|
eventKey,
|
|
@@ -10242,7 +10265,7 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10242
10265
|
}, []);
|
|
10243
10266
|
};
|
|
10244
10267
|
const childNames = Object.keys(baseProps);
|
|
10245
|
-
const childComponents =
|
|
10268
|
+
const childComponents = react__WEBPACK_IMPORTED_MODULE_0___default().Children.toArray(props.children);
|
|
10246
10269
|
return alterChildren(childComponents, childNames);
|
|
10247
10270
|
}
|
|
10248
10271
|
getContainer(props, baseProps, events) {
|
|
@@ -10261,22 +10284,22 @@ class VictorySharedEvents extends (react__WEBPACK_IMPORTED_MODULE_3___default().
|
|
|
10261
10284
|
const parentEvents = sharedEvents && boundGetEvents({
|
|
10262
10285
|
sharedEvents
|
|
10263
10286
|
}, "parent");
|
|
10264
|
-
const parentProps =
|
|
10287
|
+
const parentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, this.getEventState("parent", "parent"), containerProps, baseProps.parent, {
|
|
10265
10288
|
children
|
|
10266
10289
|
});
|
|
10267
|
-
const containerEvents =
|
|
10290
|
+
const containerEvents = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, victory_core__WEBPACK_IMPORTED_MODULE_7__.getPartialEvents(parentEvents, "parent", parentProps), containerProps.events);
|
|
10268
10291
|
this.globalEvents = victory_core__WEBPACK_IMPORTED_MODULE_7__.getGlobalEvents(containerEvents);
|
|
10269
10292
|
const localEvents = victory_core__WEBPACK_IMPORTED_MODULE_7__.omitGlobalEvents(containerEvents);
|
|
10270
|
-
return role === "container" ? /*#__PURE__*/
|
|
10293
|
+
return role === "container" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(container, Object.assign({}, parentProps, {
|
|
10271
10294
|
events: localEvents
|
|
10272
|
-
})) : /*#__PURE__*/
|
|
10295
|
+
})) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(container, localEvents, children);
|
|
10273
10296
|
}
|
|
10274
10297
|
render() {
|
|
10275
10298
|
const events = this.getAllEvents(this.props);
|
|
10276
10299
|
if (events) {
|
|
10277
10300
|
return this.getContainer(this.props, this.baseProps, events);
|
|
10278
10301
|
}
|
|
10279
|
-
return /*#__PURE__*/
|
|
10302
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(this.props.container, {
|
|
10280
10303
|
children: this.props.children
|
|
10281
10304
|
});
|
|
10282
10305
|
}
|