victory-stack 36.9.2-next.1 → 36.9.2
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 +2 -11
- package/README.md +2 -2
- package/dist/victory-stack.js +424 -692
- package/dist/victory-stack.min.js +1 -1
- package/es/helper-methods.d.ts +52 -52
- package/es/index.d.ts +1 -1
- package/es/victory-stack.d.ts +18 -18
- package/lib/helper-methods.d.ts +52 -52
- package/lib/index.d.ts +1 -1
- package/lib/victory-stack.d.ts +18 -18
- package/package.json +9 -6
package/dist/victory-stack.js
CHANGED
|
@@ -986,83 +986,6 @@ function baseAssignValue(object, key, value) {
|
|
|
986
986
|
module.exports = baseAssignValue;
|
|
987
987
|
|
|
988
988
|
|
|
989
|
-
/***/ }),
|
|
990
|
-
|
|
991
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
992
|
-
/*!*****************************************************************************************!*\
|
|
993
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
994
|
-
\*****************************************************************************************/
|
|
995
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
996
|
-
|
|
997
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
998
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
999
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
1000
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
1001
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
1002
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
1003
|
-
|
|
1004
|
-
/** Used as the size to enable large array optimizations. */
|
|
1005
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1006
|
-
|
|
1007
|
-
/**
|
|
1008
|
-
* The base implementation of methods like `_.difference` without support
|
|
1009
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
1010
|
-
*
|
|
1011
|
-
* @private
|
|
1012
|
-
* @param {Array} array The array to inspect.
|
|
1013
|
-
* @param {Array} values The values to exclude.
|
|
1014
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
1015
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
1016
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
1017
|
-
*/
|
|
1018
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
1019
|
-
var index = -1,
|
|
1020
|
-
includes = arrayIncludes,
|
|
1021
|
-
isCommon = true,
|
|
1022
|
-
length = array.length,
|
|
1023
|
-
result = [],
|
|
1024
|
-
valuesLength = values.length;
|
|
1025
|
-
|
|
1026
|
-
if (!length) {
|
|
1027
|
-
return result;
|
|
1028
|
-
}
|
|
1029
|
-
if (iteratee) {
|
|
1030
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
1031
|
-
}
|
|
1032
|
-
if (comparator) {
|
|
1033
|
-
includes = arrayIncludesWith;
|
|
1034
|
-
isCommon = false;
|
|
1035
|
-
}
|
|
1036
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
1037
|
-
includes = cacheHas;
|
|
1038
|
-
isCommon = false;
|
|
1039
|
-
values = new SetCache(values);
|
|
1040
|
-
}
|
|
1041
|
-
outer:
|
|
1042
|
-
while (++index < length) {
|
|
1043
|
-
var value = array[index],
|
|
1044
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
1045
|
-
|
|
1046
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
1047
|
-
if (isCommon && computed === computed) {
|
|
1048
|
-
var valuesIndex = valuesLength;
|
|
1049
|
-
while (valuesIndex--) {
|
|
1050
|
-
if (values[valuesIndex] === computed) {
|
|
1051
|
-
continue outer;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
result.push(value);
|
|
1055
|
-
}
|
|
1056
|
-
else if (!includes(values, computed, comparator)) {
|
|
1057
|
-
result.push(value);
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
return result;
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
module.exports = baseDifference;
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
989
|
/***/ }),
|
|
1067
990
|
|
|
1068
991
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -1111,58 +1034,6 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
|
1111
1034
|
module.exports = baseFlatten;
|
|
1112
1035
|
|
|
1113
1036
|
|
|
1114
|
-
/***/ }),
|
|
1115
|
-
|
|
1116
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js":
|
|
1117
|
-
/*!**********************************************************************************!*\
|
|
1118
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js ***!
|
|
1119
|
-
\**********************************************************************************/
|
|
1120
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1121
|
-
|
|
1122
|
-
var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js");
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* The base implementation of `baseForOwn` which iterates over `object`
|
|
1126
|
-
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
1127
|
-
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
1128
|
-
*
|
|
1129
|
-
* @private
|
|
1130
|
-
* @param {Object} object The object to iterate over.
|
|
1131
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1132
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
1133
|
-
* @returns {Object} Returns `object`.
|
|
1134
|
-
*/
|
|
1135
|
-
var baseFor = createBaseFor();
|
|
1136
|
-
|
|
1137
|
-
module.exports = baseFor;
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
/***/ }),
|
|
1141
|
-
|
|
1142
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js":
|
|
1143
|
-
/*!*************************************************************************************!*\
|
|
1144
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js ***!
|
|
1145
|
-
\*************************************************************************************/
|
|
1146
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1147
|
-
|
|
1148
|
-
var baseFor = __webpack_require__(/*! ./_baseFor */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js"),
|
|
1149
|
-
keys = __webpack_require__(/*! ./keys */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js");
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
1153
|
-
*
|
|
1154
|
-
* @private
|
|
1155
|
-
* @param {Object} object The object to iterate over.
|
|
1156
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1157
|
-
* @returns {Object} Returns `object`.
|
|
1158
|
-
*/
|
|
1159
|
-
function baseForOwn(object, iteratee) {
|
|
1160
|
-
return object && baseFor(object, iteratee, keys);
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
module.exports = baseForOwn;
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
1037
|
/***/ }),
|
|
1167
1038
|
|
|
1168
1039
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js":
|
|
@@ -1285,37 +1156,6 @@ function strictIndexOf(array, value, fromIndex) {
|
|
|
1285
1156
|
module.exports = strictIndexOf;
|
|
1286
1157
|
|
|
1287
1158
|
|
|
1288
|
-
/***/ }),
|
|
1289
|
-
|
|
1290
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseInverter.js":
|
|
1291
|
-
/*!***************************************************************************************!*\
|
|
1292
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseInverter.js ***!
|
|
1293
|
-
\***************************************************************************************/
|
|
1294
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1295
|
-
|
|
1296
|
-
var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js");
|
|
1297
|
-
|
|
1298
|
-
/**
|
|
1299
|
-
* The base implementation of `_.invert` and `_.invertBy` which inverts
|
|
1300
|
-
* `object` with values transformed by `iteratee` and set by `setter`.
|
|
1301
|
-
*
|
|
1302
|
-
* @private
|
|
1303
|
-
* @param {Object} object The object to iterate over.
|
|
1304
|
-
* @param {Function} setter The function to set `accumulator` values.
|
|
1305
|
-
* @param {Function} iteratee The iteratee to transform values.
|
|
1306
|
-
* @param {Object} accumulator The initial inverted object.
|
|
1307
|
-
* @returns {Function} Returns `accumulator`.
|
|
1308
|
-
*/
|
|
1309
|
-
function baseInverter(object, setter, iteratee, accumulator) {
|
|
1310
|
-
baseForOwn(object, function(value, key, object) {
|
|
1311
|
-
setter(accumulator, iteratee(value), key, object);
|
|
1312
|
-
});
|
|
1313
|
-
return accumulator;
|
|
1314
|
-
}
|
|
1315
|
-
|
|
1316
|
-
module.exports = baseInverter;
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
1159
|
/***/ }),
|
|
1320
1160
|
|
|
1321
1161
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsDate.js":
|
|
@@ -2396,68 +2236,6 @@ function createAggregator(setter, initializer) {
|
|
|
2396
2236
|
module.exports = createAggregator;
|
|
2397
2237
|
|
|
2398
2238
|
|
|
2399
|
-
/***/ }),
|
|
2400
|
-
|
|
2401
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js":
|
|
2402
|
-
/*!****************************************************************************************!*\
|
|
2403
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js ***!
|
|
2404
|
-
\****************************************************************************************/
|
|
2405
|
-
/***/ ((module) => {
|
|
2406
|
-
|
|
2407
|
-
/**
|
|
2408
|
-
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
2409
|
-
*
|
|
2410
|
-
* @private
|
|
2411
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2412
|
-
* @returns {Function} Returns the new base function.
|
|
2413
|
-
*/
|
|
2414
|
-
function createBaseFor(fromRight) {
|
|
2415
|
-
return function(object, iteratee, keysFunc) {
|
|
2416
|
-
var index = -1,
|
|
2417
|
-
iterable = Object(object),
|
|
2418
|
-
props = keysFunc(object),
|
|
2419
|
-
length = props.length;
|
|
2420
|
-
|
|
2421
|
-
while (length--) {
|
|
2422
|
-
var key = props[fromRight ? length : ++index];
|
|
2423
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
2424
|
-
break;
|
|
2425
|
-
}
|
|
2426
|
-
}
|
|
2427
|
-
return object;
|
|
2428
|
-
};
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
module.exports = createBaseFor;
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
/***/ }),
|
|
2435
|
-
|
|
2436
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createInverter.js":
|
|
2437
|
-
/*!*****************************************************************************************!*\
|
|
2438
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createInverter.js ***!
|
|
2439
|
-
\*****************************************************************************************/
|
|
2440
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2441
|
-
|
|
2442
|
-
var baseInverter = __webpack_require__(/*! ./_baseInverter */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseInverter.js");
|
|
2443
|
-
|
|
2444
|
-
/**
|
|
2445
|
-
* Creates a function like `_.invertBy`.
|
|
2446
|
-
*
|
|
2447
|
-
* @private
|
|
2448
|
-
* @param {Function} setter The function to set accumulator values.
|
|
2449
|
-
* @param {Function} toIteratee The function to resolve iteratees.
|
|
2450
|
-
* @returns {Function} Returns the new inverter function.
|
|
2451
|
-
*/
|
|
2452
|
-
function createInverter(setter, toIteratee) {
|
|
2453
|
-
return function(object, iteratee) {
|
|
2454
|
-
return baseInverter(object, setter, toIteratee(iteratee), {});
|
|
2455
|
-
};
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
module.exports = createInverter;
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
2239
|
/***/ }),
|
|
2462
2240
|
|
|
2463
2241
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js":
|
|
@@ -3655,42 +3433,6 @@ function identity(value) {
|
|
|
3655
3433
|
module.exports = identity;
|
|
3656
3434
|
|
|
3657
3435
|
|
|
3658
|
-
/***/ }),
|
|
3659
|
-
|
|
3660
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js":
|
|
3661
|
-
/*!**********************************************************************************!*\
|
|
3662
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js ***!
|
|
3663
|
-
\**********************************************************************************/
|
|
3664
|
-
/***/ ((module) => {
|
|
3665
|
-
|
|
3666
|
-
/**
|
|
3667
|
-
* Creates a function that returns `value`.
|
|
3668
|
-
*
|
|
3669
|
-
* @static
|
|
3670
|
-
* @memberOf _
|
|
3671
|
-
* @since 2.4.0
|
|
3672
|
-
* @category Util
|
|
3673
|
-
* @param {*} value The value to return from the new function.
|
|
3674
|
-
* @returns {Function} Returns the new constant function.
|
|
3675
|
-
* @example
|
|
3676
|
-
*
|
|
3677
|
-
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
3678
|
-
*
|
|
3679
|
-
* console.log(objects);
|
|
3680
|
-
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
3681
|
-
*
|
|
3682
|
-
* console.log(objects[0] === objects[1]);
|
|
3683
|
-
* // => true
|
|
3684
|
-
*/
|
|
3685
|
-
function constant(value) {
|
|
3686
|
-
return function() {
|
|
3687
|
-
return value;
|
|
3688
|
-
};
|
|
3689
|
-
}
|
|
3690
|
-
|
|
3691
|
-
module.exports = constant;
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
3436
|
/***/ }),
|
|
3695
3437
|
|
|
3696
3438
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js":
|
|
@@ -3765,49 +3507,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
3765
3507
|
module.exports = defaults;
|
|
3766
3508
|
|
|
3767
3509
|
|
|
3768
|
-
/***/ }),
|
|
3769
|
-
|
|
3770
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
3771
|
-
/*!************************************************************************************!*\
|
|
3772
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
3773
|
-
\************************************************************************************/
|
|
3774
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3775
|
-
|
|
3776
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
3777
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
3778
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
3779
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
3780
|
-
|
|
3781
|
-
/**
|
|
3782
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
3783
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
3784
|
-
* for equality comparisons. The order and references of result values are
|
|
3785
|
-
* determined by the first array.
|
|
3786
|
-
*
|
|
3787
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
3788
|
-
*
|
|
3789
|
-
* @static
|
|
3790
|
-
* @memberOf _
|
|
3791
|
-
* @since 0.1.0
|
|
3792
|
-
* @category Array
|
|
3793
|
-
* @param {Array} array The array to inspect.
|
|
3794
|
-
* @param {...Array} [values] The values to exclude.
|
|
3795
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
3796
|
-
* @see _.without, _.xor
|
|
3797
|
-
* @example
|
|
3798
|
-
*
|
|
3799
|
-
* _.difference([2, 1], [2, 3]);
|
|
3800
|
-
* // => [1]
|
|
3801
|
-
*/
|
|
3802
|
-
var difference = baseRest(function(array, values) {
|
|
3803
|
-
return isArrayLikeObject(array)
|
|
3804
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
3805
|
-
: [];
|
|
3806
|
-
});
|
|
3807
|
-
|
|
3808
|
-
module.exports = difference;
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
3510
|
/***/ }),
|
|
3812
3511
|
|
|
3813
3512
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -4094,58 +3793,6 @@ function identity(value) {
|
|
|
4094
3793
|
module.exports = identity;
|
|
4095
3794
|
|
|
4096
3795
|
|
|
4097
|
-
/***/ }),
|
|
4098
|
-
|
|
4099
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/invert.js":
|
|
4100
|
-
/*!********************************************************************************!*\
|
|
4101
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/invert.js ***!
|
|
4102
|
-
\********************************************************************************/
|
|
4103
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4104
|
-
|
|
4105
|
-
var constant = __webpack_require__(/*! ./constant */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js"),
|
|
4106
|
-
createInverter = __webpack_require__(/*! ./_createInverter */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createInverter.js"),
|
|
4107
|
-
identity = __webpack_require__(/*! ./identity */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js");
|
|
4108
|
-
|
|
4109
|
-
/** Used for built-in method references. */
|
|
4110
|
-
var objectProto = Object.prototype;
|
|
4111
|
-
|
|
4112
|
-
/**
|
|
4113
|
-
* Used to resolve the
|
|
4114
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
4115
|
-
* of values.
|
|
4116
|
-
*/
|
|
4117
|
-
var nativeObjectToString = objectProto.toString;
|
|
4118
|
-
|
|
4119
|
-
/**
|
|
4120
|
-
* Creates an object composed of the inverted keys and values of `object`.
|
|
4121
|
-
* If `object` contains duplicate values, subsequent values overwrite
|
|
4122
|
-
* property assignments of previous values.
|
|
4123
|
-
*
|
|
4124
|
-
* @static
|
|
4125
|
-
* @memberOf _
|
|
4126
|
-
* @since 0.7.0
|
|
4127
|
-
* @category Object
|
|
4128
|
-
* @param {Object} object The object to invert.
|
|
4129
|
-
* @returns {Object} Returns the new inverted object.
|
|
4130
|
-
* @example
|
|
4131
|
-
*
|
|
4132
|
-
* var object = { 'a': 1, 'b': 2, 'c': 1 };
|
|
4133
|
-
*
|
|
4134
|
-
* _.invert(object);
|
|
4135
|
-
* // => { '1': 'c', '2': 'b' }
|
|
4136
|
-
*/
|
|
4137
|
-
var invert = createInverter(function(result, value, key) {
|
|
4138
|
-
if (value != null &&
|
|
4139
|
-
typeof value.toString != 'function') {
|
|
4140
|
-
value = nativeObjectToString.call(value);
|
|
4141
|
-
}
|
|
4142
|
-
|
|
4143
|
-
result[value] = key;
|
|
4144
|
-
}, constant(identity));
|
|
4145
|
-
|
|
4146
|
-
module.exports = invert;
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
3796
|
/***/ }),
|
|
4150
3797
|
|
|
4151
3798
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js":
|
|
@@ -4253,49 +3900,6 @@ function isArrayLike(value) {
|
|
|
4253
3900
|
module.exports = isArrayLike;
|
|
4254
3901
|
|
|
4255
3902
|
|
|
4256
|
-
/***/ }),
|
|
4257
|
-
|
|
4258
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
4259
|
-
/*!*******************************************************************************************!*\
|
|
4260
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
4261
|
-
\*******************************************************************************************/
|
|
4262
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4263
|
-
|
|
4264
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
4265
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
4266
|
-
|
|
4267
|
-
/**
|
|
4268
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
4269
|
-
* is an object.
|
|
4270
|
-
*
|
|
4271
|
-
* @static
|
|
4272
|
-
* @memberOf _
|
|
4273
|
-
* @since 4.0.0
|
|
4274
|
-
* @category Lang
|
|
4275
|
-
* @param {*} value The value to check.
|
|
4276
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
4277
|
-
* else `false`.
|
|
4278
|
-
* @example
|
|
4279
|
-
*
|
|
4280
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
4281
|
-
* // => true
|
|
4282
|
-
*
|
|
4283
|
-
* _.isArrayLikeObject(document.body.children);
|
|
4284
|
-
* // => true
|
|
4285
|
-
*
|
|
4286
|
-
* _.isArrayLikeObject('abc');
|
|
4287
|
-
* // => false
|
|
4288
|
-
*
|
|
4289
|
-
* _.isArrayLikeObject(_.noop);
|
|
4290
|
-
* // => false
|
|
4291
|
-
*/
|
|
4292
|
-
function isArrayLikeObject(value) {
|
|
4293
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
4294
|
-
}
|
|
4295
|
-
|
|
4296
|
-
module.exports = isArrayLikeObject;
|
|
4297
|
-
|
|
4298
|
-
|
|
4299
3903
|
/***/ }),
|
|
4300
3904
|
|
|
4301
3905
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|
|
@@ -5482,203 +5086,259 @@ module.exports = function isEqual(a, b) {
|
|
|
5482
5086
|
"use strict";
|
|
5483
5087
|
__webpack_require__.r(__webpack_exports__);
|
|
5484
5088
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5485
|
-
/* harmony export */ "VictoryContainer": () => (/* binding */ VictoryContainer)
|
|
5486
|
-
/* harmony export */ "useVictoryContainer": () => (/* binding */ useVictoryContainer)
|
|
5089
|
+
/* harmony export */ "VictoryContainer": () => (/* binding */ VictoryContainer)
|
|
5487
5090
|
/* harmony export */ });
|
|
5488
|
-
/* harmony import */ var
|
|
5489
|
-
/* harmony import */ var
|
|
5490
|
-
/* harmony import */ var
|
|
5491
|
-
/* harmony import */ var
|
|
5492
|
-
/* harmony import */ var
|
|
5493
|
-
/* harmony import */ var
|
|
5494
|
-
/* harmony import */ var
|
|
5495
|
-
/* harmony import */ var
|
|
5091
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
5092
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
5093
|
+
/* 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");
|
|
5094
|
+
/* harmony import */ var lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1__);
|
|
5095
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
5096
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
5097
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
5098
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
5099
|
+
/* harmony import */ var _victory_portal_portal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../victory-portal/portal */ "../../victory-core/es/victory-portal/portal.js");
|
|
5100
|
+
/* 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");
|
|
5101
|
+
/* harmony import */ var _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-util/timer-context */ "../../victory-core/es/victory-util/timer-context.js");
|
|
5102
|
+
/* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
5103
|
+
/* harmony import */ var _victory_util_user_props__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../victory-util/user-props */ "../../victory-core/es/victory-util/user-props.js");
|
|
5104
|
+
|
|
5105
|
+
|
|
5496
5106
|
|
|
5497
5107
|
|
|
5498
5108
|
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); }
|
|
5499
5109
|
|
|
5500
|
-
function
|
|
5110
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5501
5111
|
|
|
5502
|
-
function
|
|
5112
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5503
5113
|
|
|
5504
|
-
function
|
|
5114
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5505
5115
|
|
|
5506
|
-
function
|
|
5116
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5507
5117
|
|
|
5508
|
-
function
|
|
5118
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5509
5119
|
|
|
5510
|
-
function
|
|
5120
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5511
5121
|
|
|
5512
|
-
function
|
|
5122
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5513
5123
|
|
|
5514
|
-
function
|
|
5124
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5515
5125
|
|
|
5516
|
-
function
|
|
5126
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5517
5127
|
|
|
5128
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
5518
5129
|
|
|
5130
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5519
5131
|
|
|
5132
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5520
5133
|
|
|
5134
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5521
5135
|
|
|
5522
5136
|
|
|
5523
|
-
var defaultProps = {
|
|
5524
|
-
className: "VictoryContainer",
|
|
5525
|
-
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_2__.Portal, null),
|
|
5526
|
-
portalZIndex: 99,
|
|
5527
|
-
responsive: true,
|
|
5528
|
-
role: "img"
|
|
5529
|
-
};
|
|
5530
|
-
function useVictoryContainer(initialProps) {
|
|
5531
|
-
var props = _objectSpread(_objectSpread({}, defaultProps), initialProps);
|
|
5532
5137
|
|
|
5533
|
-
var title = props.title,
|
|
5534
|
-
desc = props.desc,
|
|
5535
|
-
width = props.width,
|
|
5536
|
-
height = props.height,
|
|
5537
|
-
responsive = props.responsive;
|
|
5538
|
-
var localContainerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
|
|
5539
5138
|
|
|
5540
|
-
var _React$useState = react__WEBPACK_IMPORTED_MODULE_1___default().useState(),
|
|
5541
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
5542
|
-
portalElement = _React$useState2[0],
|
|
5543
|
-
setPortalElement = _React$useState2[1];
|
|
5544
5139
|
|
|
5545
|
-
var portalRef = function (element) {
|
|
5546
|
-
return setPortalElement(element);
|
|
5547
|
-
}; // Generated ID stored in ref because it needs to persist across renders
|
|
5548
5140
|
|
|
5549
5141
|
|
|
5550
|
-
|
|
5551
|
-
|
|
5142
|
+
var VictoryContainer = /*#__PURE__*/function (_React$Component) {
|
|
5143
|
+
_inherits(VictoryContainer, _React$Component);
|
|
5552
5144
|
|
|
5553
|
-
var
|
|
5554
|
-
return "".concat(containerId, "-").concat(elName);
|
|
5555
|
-
};
|
|
5145
|
+
var _super = _createSuper(VictoryContainer);
|
|
5556
5146
|
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
} : {
|
|
5562
|
-
width: width,
|
|
5563
|
-
height: height
|
|
5564
|
-
};
|
|
5565
|
-
var viewBox = responsive ? "0 0 ".concat(width, " ").concat(height) : undefined;
|
|
5566
|
-
var preserveAspectRatio = responsive ? props.preserveAspectRatio : undefined;
|
|
5567
|
-
var ariaLabelledBy = [title && getIdForElement("title"), props["aria-labelledby"]].filter(Boolean).join(" ") || undefined;
|
|
5568
|
-
var ariaDescribedBy = [desc && getIdForElement("desc"), props["aria-describedby"]].filter(Boolean).join(" ") || undefined;
|
|
5569
|
-
var titleId = getIdForElement("title");
|
|
5570
|
-
var descId = getIdForElement("desc");
|
|
5571
|
-
return _objectSpread(_objectSpread({}, props), {}, {
|
|
5572
|
-
titleId: titleId,
|
|
5573
|
-
descId: descId,
|
|
5574
|
-
dimensions: dimensions,
|
|
5575
|
-
viewBox: viewBox,
|
|
5576
|
-
preserveAspectRatio: preserveAspectRatio,
|
|
5577
|
-
ariaLabelledBy: ariaLabelledBy,
|
|
5578
|
-
ariaDescribedBy: ariaDescribedBy,
|
|
5579
|
-
userProps: userProps,
|
|
5580
|
-
portalRef: portalRef,
|
|
5581
|
-
portalElement: portalElement,
|
|
5582
|
-
localContainerRef: localContainerRef
|
|
5583
|
-
});
|
|
5584
|
-
}
|
|
5585
|
-
var VictoryContainer = function (initialProps) {
|
|
5586
|
-
var _useVictoryContainer = useVictoryContainer(initialProps),
|
|
5587
|
-
role = _useVictoryContainer.role,
|
|
5588
|
-
title = _useVictoryContainer.title,
|
|
5589
|
-
desc = _useVictoryContainer.desc,
|
|
5590
|
-
children = _useVictoryContainer.children,
|
|
5591
|
-
className = _useVictoryContainer.className,
|
|
5592
|
-
portalZIndex = _useVictoryContainer.portalZIndex,
|
|
5593
|
-
portalComponent = _useVictoryContainer.portalComponent,
|
|
5594
|
-
width = _useVictoryContainer.width,
|
|
5595
|
-
height = _useVictoryContainer.height,
|
|
5596
|
-
style = _useVictoryContainer.style,
|
|
5597
|
-
tabIndex = _useVictoryContainer.tabIndex,
|
|
5598
|
-
responsive = _useVictoryContainer.responsive,
|
|
5599
|
-
events = _useVictoryContainer.events,
|
|
5600
|
-
ouiaId = _useVictoryContainer.ouiaId,
|
|
5601
|
-
ouiaSafe = _useVictoryContainer.ouiaSafe,
|
|
5602
|
-
ouiaType = _useVictoryContainer.ouiaType,
|
|
5603
|
-
dimensions = _useVictoryContainer.dimensions,
|
|
5604
|
-
ariaDescribedBy = _useVictoryContainer.ariaDescribedBy,
|
|
5605
|
-
ariaLabelledBy = _useVictoryContainer.ariaLabelledBy,
|
|
5606
|
-
viewBox = _useVictoryContainer.viewBox,
|
|
5607
|
-
preserveAspectRatio = _useVictoryContainer.preserveAspectRatio,
|
|
5608
|
-
userProps = _useVictoryContainer.userProps,
|
|
5609
|
-
titleId = _useVictoryContainer.titleId,
|
|
5610
|
-
descId = _useVictoryContainer.descId,
|
|
5611
|
-
portalElement = _useVictoryContainer.portalElement,
|
|
5612
|
-
portalRef = _useVictoryContainer.portalRef,
|
|
5613
|
-
containerRef = _useVictoryContainer.containerRef,
|
|
5614
|
-
localContainerRef = _useVictoryContainer.localContainerRef;
|
|
5147
|
+
// @ts-expect-error Ref will be initialized on mount
|
|
5148
|
+
// @ts-expect-error Ref will be initialized on mount
|
|
5149
|
+
function VictoryContainer(props) {
|
|
5150
|
+
var _this;
|
|
5615
5151
|
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5152
|
+
_classCallCheck(this, VictoryContainer);
|
|
5153
|
+
|
|
5154
|
+
_this = _super.call(this, props);
|
|
5155
|
+
_this.containerId = void 0;
|
|
5156
|
+
_this.portalRef = void 0;
|
|
5157
|
+
_this.containerRef = void 0;
|
|
5158
|
+
_this.shouldHandleWheel = void 0;
|
|
5159
|
+
|
|
5160
|
+
_this.savePortalRef = function (portal) {
|
|
5161
|
+
_this.portalRef = portal;
|
|
5162
|
+
return portal;
|
|
5163
|
+
};
|
|
5164
|
+
|
|
5165
|
+
_this.portalUpdate = function (key, el) {
|
|
5166
|
+
return _this.portalRef.portalUpdate(key, el);
|
|
5167
|
+
};
|
|
5168
|
+
|
|
5169
|
+
_this.portalRegister = function () {
|
|
5170
|
+
return _this.portalRef.portalRegister();
|
|
5171
|
+
};
|
|
5172
|
+
|
|
5173
|
+
_this.portalDeregister = function (key) {
|
|
5174
|
+
return _this.portalRef.portalDeregister(key);
|
|
5175
|
+
};
|
|
5176
|
+
|
|
5177
|
+
_this.saveContainerRef = function (container) {
|
|
5178
|
+
if (_victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction(_this.props.containerRef)) {
|
|
5179
|
+
_this.props.containerRef(container);
|
|
5180
|
+
}
|
|
5181
|
+
|
|
5182
|
+
_this.containerRef = container;
|
|
5183
|
+
return container;
|
|
5184
|
+
};
|
|
5619
5185
|
|
|
5620
|
-
|
|
5186
|
+
_this.handleWheel = function (e) {
|
|
5621
5187
|
return e.preventDefault();
|
|
5622
5188
|
};
|
|
5623
5189
|
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
return
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
value: {
|
|
5632
|
-
|
|
5190
|
+
_this.containerId = !lodash_isObject__WEBPACK_IMPORTED_MODULE_0___default()(props) || props.containerId === undefined ? lodash_uniqueId__WEBPACK_IMPORTED_MODULE_1___default()("victory-container-") : props.containerId;
|
|
5191
|
+
_this.shouldHandleWheel = !!(props && props.events && props.events.onWheel);
|
|
5192
|
+
return _this;
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5195
|
+
_createClass(VictoryContainer, [{
|
|
5196
|
+
key: "componentDidMount",
|
|
5197
|
+
value: function componentDidMount() {
|
|
5198
|
+
if (this.shouldHandleWheel && this.containerRef) {
|
|
5199
|
+
this.containerRef.addEventListener("wheel", this.handleWheel);
|
|
5200
|
+
}
|
|
5633
5201
|
}
|
|
5634
|
-
},
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
},
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5202
|
+
}, {
|
|
5203
|
+
key: "componentWillUnmount",
|
|
5204
|
+
value: function componentWillUnmount() {
|
|
5205
|
+
if (this.shouldHandleWheel && this.containerRef) {
|
|
5206
|
+
this.containerRef.removeEventListener("wheel", this.handleWheel);
|
|
5207
|
+
}
|
|
5208
|
+
}
|
|
5209
|
+
}, {
|
|
5210
|
+
key: "getIdForElement",
|
|
5211
|
+
value: function getIdForElement(elementName) {
|
|
5212
|
+
return "".concat(this.containerId, "-").concat(elementName);
|
|
5213
|
+
} // overridden in custom containers
|
|
5214
|
+
|
|
5215
|
+
}, {
|
|
5216
|
+
key: "getChildren",
|
|
5217
|
+
value: function getChildren(props) {
|
|
5218
|
+
return props.children;
|
|
5219
|
+
} // Get props defined by the Open UI Automation (OUIA) 1.0-RC spec
|
|
5220
|
+
// See https://ouia.readthedocs.io/en/latest/README.html#ouia-component
|
|
5221
|
+
|
|
5222
|
+
}, {
|
|
5223
|
+
key: "getOUIAProps",
|
|
5224
|
+
value: function getOUIAProps(props) {
|
|
5225
|
+
var ouiaId = props.ouiaId,
|
|
5226
|
+
ouiaSafe = props.ouiaSafe,
|
|
5227
|
+
ouiaType = props.ouiaType;
|
|
5228
|
+
return _objectSpread(_objectSpread(_objectSpread({}, ouiaId && {
|
|
5229
|
+
"data-ouia-component-id": ouiaId
|
|
5230
|
+
}), ouiaType && {
|
|
5231
|
+
"data-ouia-component-type": ouiaType
|
|
5232
|
+
}), ouiaSafe !== undefined && {
|
|
5233
|
+
"data-ouia-safe": ouiaSafe
|
|
5234
|
+
});
|
|
5235
|
+
}
|
|
5236
|
+
}, {
|
|
5237
|
+
key: "renderContainer",
|
|
5238
|
+
value: function renderContainer(props, svgProps, style) {
|
|
5239
|
+
var title = props.title,
|
|
5240
|
+
desc = props.desc,
|
|
5241
|
+
portalComponent = props.portalComponent,
|
|
5242
|
+
className = props.className,
|
|
5243
|
+
width = props.width,
|
|
5244
|
+
height = props.height,
|
|
5245
|
+
portalZIndex = props.portalZIndex,
|
|
5246
|
+
responsive = props.responsive;
|
|
5247
|
+
var children = this.getChildren(props);
|
|
5248
|
+
var dimensions = responsive ? {
|
|
5249
|
+
width: "100%",
|
|
5250
|
+
height: "100%"
|
|
5251
|
+
} : {
|
|
5252
|
+
width: width,
|
|
5253
|
+
height: height
|
|
5254
|
+
};
|
|
5255
|
+
var divStyle = Object.assign({
|
|
5256
|
+
pointerEvents: "none",
|
|
5257
|
+
touchAction: "none",
|
|
5258
|
+
position: "relative"
|
|
5259
|
+
}, dimensions);
|
|
5260
|
+
var portalDivStyle = Object.assign({
|
|
5261
|
+
zIndex: portalZIndex,
|
|
5262
|
+
position: "absolute",
|
|
5263
|
+
top: 0,
|
|
5264
|
+
left: 0
|
|
5265
|
+
}, dimensions);
|
|
5266
|
+
var svgStyle = Object.assign({
|
|
5267
|
+
pointerEvents: "all"
|
|
5268
|
+
}, dimensions);
|
|
5269
|
+
var portalSvgStyle = Object.assign({
|
|
5270
|
+
overflow: "visible"
|
|
5271
|
+
}, dimensions);
|
|
5272
|
+
var portalProps = {
|
|
5273
|
+
width: width,
|
|
5274
|
+
height: height,
|
|
5275
|
+
viewBox: svgProps.viewBox,
|
|
5276
|
+
preserveAspectRatio: svgProps.preserveAspectRatio,
|
|
5277
|
+
style: portalSvgStyle
|
|
5278
|
+
};
|
|
5279
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_portal_portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext.Provider, {
|
|
5280
|
+
value: {
|
|
5281
|
+
portalUpdate: this.portalUpdate,
|
|
5282
|
+
portalRegister: this.portalRegister,
|
|
5283
|
+
portalDeregister: this.portalDeregister
|
|
5284
|
+
}
|
|
5285
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", _extends({
|
|
5286
|
+
style: lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, style, divStyle),
|
|
5287
|
+
className: className,
|
|
5288
|
+
ref: this.saveContainerRef
|
|
5289
|
+
}, this.getOUIAProps(props)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("svg", _extends({}, svgProps, {
|
|
5290
|
+
style: svgStyle
|
|
5291
|
+
}), title ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("title", {
|
|
5292
|
+
id: this.getIdForElement("title")
|
|
5293
|
+
}, title) : null, desc ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("desc", {
|
|
5294
|
+
id: this.getIdForElement("desc")
|
|
5295
|
+
}, desc) : null, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
|
5296
|
+
style: portalDivStyle
|
|
5297
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(portalComponent, _objectSpread(_objectSpread({}, portalProps), {}, {
|
|
5298
|
+
ref: this.savePortalRef
|
|
5299
|
+
})))));
|
|
5300
|
+
}
|
|
5301
|
+
}, {
|
|
5302
|
+
key: "render",
|
|
5303
|
+
value: function render() {
|
|
5304
|
+
var _this$props = this.props,
|
|
5305
|
+
width = _this$props.width,
|
|
5306
|
+
height = _this$props.height,
|
|
5307
|
+
responsive = _this$props.responsive,
|
|
5308
|
+
events = _this$props.events,
|
|
5309
|
+
title = _this$props.title,
|
|
5310
|
+
desc = _this$props.desc,
|
|
5311
|
+
tabIndex = _this$props.tabIndex,
|
|
5312
|
+
preserveAspectRatio = _this$props.preserveAspectRatio,
|
|
5313
|
+
role = _this$props.role;
|
|
5314
|
+
var style = responsive ? this.props.style : _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.omit(this.props.style, ["height", "width"]);
|
|
5315
|
+
var userProps = _victory_util_user_props__WEBPACK_IMPORTED_MODULE_6__.getSafeUserProps(this.props);
|
|
5316
|
+
var svgProps = Object.assign(_objectSpread({
|
|
5317
|
+
width: width,
|
|
5318
|
+
height: height,
|
|
5319
|
+
tabIndex: tabIndex,
|
|
5320
|
+
role: role,
|
|
5321
|
+
"aria-labelledby": [title && this.getIdForElement("title"), this.props["aria-labelledby"]].filter(Boolean).join(" ") || undefined,
|
|
5322
|
+
"aria-describedby": [desc && this.getIdForElement("desc"), this.props["aria-describedby"]].filter(Boolean).join(" ") || undefined,
|
|
5323
|
+
viewBox: responsive ? "0 0 ".concat(width, " ").concat(height) : undefined,
|
|
5324
|
+
preserveAspectRatio: responsive ? preserveAspectRatio : undefined
|
|
5325
|
+
}, userProps), events);
|
|
5326
|
+
return this.renderContainer(this.props, svgProps, style);
|
|
5327
|
+
}
|
|
5328
|
+
}]);
|
|
5329
|
+
|
|
5330
|
+
return VictoryContainer;
|
|
5331
|
+
}((react__WEBPACK_IMPORTED_MODULE_3___default().Component));
|
|
5332
|
+
VictoryContainer.displayName = "VictoryContainer";
|
|
5681
5333
|
VictoryContainer.role = "container";
|
|
5334
|
+
VictoryContainer.defaultProps = {
|
|
5335
|
+
className: "VictoryContainer",
|
|
5336
|
+
portalComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_portal_portal__WEBPACK_IMPORTED_MODULE_7__.Portal, null),
|
|
5337
|
+
portalZIndex: 99,
|
|
5338
|
+
responsive: true,
|
|
5339
|
+
role: "img"
|
|
5340
|
+
};
|
|
5341
|
+
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_8__["default"];
|
|
5682
5342
|
|
|
5683
5343
|
/***/ }),
|
|
5684
5344
|
|
|
@@ -5701,7 +5361,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5701
5361
|
* The React context object consumers may use to access the context of the
|
|
5702
5362
|
* portal.
|
|
5703
5363
|
*/
|
|
5704
|
-
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext(
|
|
5364
|
+
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
5705
5365
|
PortalContext.displayName = "PortalContext";
|
|
5706
5366
|
|
|
5707
5367
|
/***/ }),
|
|
@@ -5719,14 +5379,85 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5719
5379
|
/* harmony export */ });
|
|
5720
5380
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
5721
5381
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
5722
|
-
function
|
|
5382
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5723
5383
|
|
|
5384
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5724
5385
|
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
});
|
|
5386
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5387
|
+
|
|
5388
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5389
|
+
|
|
5390
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5391
|
+
|
|
5392
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5393
|
+
|
|
5394
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
5395
|
+
|
|
5396
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5397
|
+
|
|
5398
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
5399
|
+
|
|
5400
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5401
|
+
|
|
5402
|
+
|
|
5403
|
+
var Portal = /*#__PURE__*/function (_ref) {
|
|
5404
|
+
_inherits(Portal, _ref);
|
|
5405
|
+
|
|
5406
|
+
var _super = _createSuper(Portal);
|
|
5407
|
+
|
|
5408
|
+
function Portal(props) {
|
|
5409
|
+
var _this;
|
|
5410
|
+
|
|
5411
|
+
_classCallCheck(this, Portal);
|
|
5412
|
+
|
|
5413
|
+
_this = _super.call(this, props);
|
|
5414
|
+
_this.map = void 0;
|
|
5415
|
+
_this.index = void 0;
|
|
5416
|
+
|
|
5417
|
+
_this.portalRegister = function () {
|
|
5418
|
+
return ++_this.index;
|
|
5419
|
+
};
|
|
5420
|
+
|
|
5421
|
+
_this.portalUpdate = function (key, element) {
|
|
5422
|
+
_this.map[key] = element;
|
|
5423
|
+
|
|
5424
|
+
_this.forceUpdate();
|
|
5425
|
+
};
|
|
5426
|
+
|
|
5427
|
+
_this.portalDeregister = function (key) {
|
|
5428
|
+
delete _this.map[key];
|
|
5429
|
+
|
|
5430
|
+
_this.forceUpdate();
|
|
5431
|
+
};
|
|
5432
|
+
|
|
5433
|
+
_this.map = {};
|
|
5434
|
+
_this.index = 1;
|
|
5435
|
+
return _this;
|
|
5436
|
+
}
|
|
5437
|
+
|
|
5438
|
+
_createClass(Portal, [{
|
|
5439
|
+
key: "getChildren",
|
|
5440
|
+
value: function getChildren() {
|
|
5441
|
+
var _this2 = this;
|
|
5442
|
+
|
|
5443
|
+
return Object.keys(this.map).map(function (key) {
|
|
5444
|
+
var el = _this2.map[key];
|
|
5445
|
+
return el ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cloneElement(el, {
|
|
5446
|
+
key: key
|
|
5447
|
+
}) : el;
|
|
5448
|
+
});
|
|
5449
|
+
} // Overridden in victory-core-native
|
|
5450
|
+
|
|
5451
|
+
}, {
|
|
5452
|
+
key: "render",
|
|
5453
|
+
value: function render() {
|
|
5454
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", this.props, this.getChildren());
|
|
5455
|
+
}
|
|
5456
|
+
}]);
|
|
5457
|
+
|
|
5458
|
+
return Portal;
|
|
5459
|
+
}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
|
|
5460
|
+
Portal.displayName = "Portal";
|
|
5730
5461
|
|
|
5731
5462
|
/***/ }),
|
|
5732
5463
|
|
|
@@ -6347,21 +6078,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6347
6078
|
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_0__);
|
|
6348
6079
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
6349
6080
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_1__);
|
|
6350
|
-
/* harmony import */ var
|
|
6351
|
-
/* harmony import */ var
|
|
6352
|
-
/* harmony import */ var
|
|
6353
|
-
/* harmony import */ var
|
|
6354
|
-
/* harmony import */ var
|
|
6355
|
-
/* harmony import */ var
|
|
6356
|
-
/* harmony import */ var
|
|
6357
|
-
/* harmony import */ var
|
|
6358
|
-
/* harmony import */ var
|
|
6359
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
|
|
6360
|
-
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
6361
|
-
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./domain */ "../../victory-core/es/victory-util/domain.js");
|
|
6362
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6363
|
-
|
|
6364
|
-
|
|
6081
|
+
/* 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");
|
|
6082
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
6083
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
6084
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_3__);
|
|
6085
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
|
|
6086
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
6087
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
6088
|
+
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain */ "../../victory-core/es/victory-util/domain.js");
|
|
6089
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
6365
6090
|
|
|
6366
6091
|
|
|
6367
6092
|
|
|
@@ -6384,12 +6109,22 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
6384
6109
|
|
|
6385
6110
|
|
|
6386
6111
|
|
|
6112
|
+
/**
|
|
6113
|
+
* Returns the first argument it receives
|
|
6114
|
+
* @param value The value to return
|
|
6115
|
+
* @returns The value given
|
|
6116
|
+
*/
|
|
6117
|
+
function identity(value) {
|
|
6118
|
+
return value;
|
|
6119
|
+
}
|
|
6387
6120
|
/**
|
|
6388
6121
|
* Returns the axis (x or y) of a particular axis component
|
|
6389
6122
|
* @param {Object} props: the props object.
|
|
6390
6123
|
* @param {Boolean} horizontal: true for horizontal charts
|
|
6391
6124
|
* @returns {String} the dimension appropriate for the axis given its props
|
|
6392
6125
|
*/
|
|
6126
|
+
|
|
6127
|
+
|
|
6393
6128
|
function getAxis(props) {
|
|
6394
6129
|
var dependentAxis = props.dependentAxis;
|
|
6395
6130
|
return dependentAxis ? "y" : "x";
|
|
@@ -6402,14 +6137,14 @@ function getAxis(props) {
|
|
|
6402
6137
|
*/
|
|
6403
6138
|
|
|
6404
6139
|
function findAxisComponents(childComponents, predicate) {
|
|
6405
|
-
var predicateFunction = predicate ||
|
|
6140
|
+
var predicateFunction = predicate || identity;
|
|
6406
6141
|
|
|
6407
6142
|
var findAxes = function (children) {
|
|
6408
6143
|
return children.reduce(function (memo, child) {
|
|
6409
6144
|
if (child.type && child.type.role === "axis" && predicateFunction(child)) {
|
|
6410
6145
|
return memo.concat(child);
|
|
6411
6146
|
} else if (child.props && child.props.children) {
|
|
6412
|
-
return memo.concat(findAxes(
|
|
6147
|
+
return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(child.props.children)));
|
|
6413
6148
|
}
|
|
6414
6149
|
|
|
6415
6150
|
return memo;
|
|
@@ -6451,7 +6186,7 @@ function getAxisComponentsWithParent(childComponents, type) {
|
|
|
6451
6186
|
if (child.type && child.type.role === "axis" && matchesType(child)) {
|
|
6452
6187
|
return memo.concat(child);
|
|
6453
6188
|
} else if (child.props && child.props.children) {
|
|
6454
|
-
var childAxis = findComponents(
|
|
6189
|
+
var childAxis = findComponents(react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(child.props.children));
|
|
6455
6190
|
return childAxis.length > 0 ? memo.concat(child) : memo;
|
|
6456
6191
|
}
|
|
6457
6192
|
|
|
@@ -6469,8 +6204,8 @@ function getOrigin(domain) {
|
|
|
6469
6204
|
};
|
|
6470
6205
|
|
|
6471
6206
|
return {
|
|
6472
|
-
x:
|
|
6473
|
-
y:
|
|
6207
|
+
x: _collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(domain.x) ? new Date(Math.min.apply(Math, _toConsumableArray(domain.x))) : getSingleOrigin(domain.x),
|
|
6208
|
+
y: _collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(domain.y) ? new Date(Math.min.apply(Math, _toConsumableArray(domain.y))) : getSingleOrigin(domain.y)
|
|
6474
6209
|
};
|
|
6475
6210
|
}
|
|
6476
6211
|
function getOriginSign(origin, domain) {
|
|
@@ -6478,7 +6213,7 @@ function getOriginSign(origin, domain) {
|
|
|
6478
6213
|
return origin <= 0 && Math.max.apply(Math, _toConsumableArray(domain)) <= 0 ? "negative" : "positive";
|
|
6479
6214
|
};
|
|
6480
6215
|
|
|
6481
|
-
return
|
|
6216
|
+
return _collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(domain) ? "positive" : getSign();
|
|
6482
6217
|
}
|
|
6483
6218
|
/**
|
|
6484
6219
|
* @param {Object} props: axis component props
|
|
@@ -6501,14 +6236,14 @@ function isVertical(props) {
|
|
|
6501
6236
|
*/
|
|
6502
6237
|
|
|
6503
6238
|
function stringTicks(props) {
|
|
6504
|
-
return props.tickValues !== undefined &&
|
|
6239
|
+
return props.tickValues !== undefined && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(props.tickValues);
|
|
6505
6240
|
}
|
|
6506
6241
|
|
|
6507
6242
|
function getDefaultTickFormat(props) {
|
|
6508
6243
|
var tickValues = props.tickValues;
|
|
6509
6244
|
var axis = getAxis(props);
|
|
6510
6245
|
var stringMap = props.stringMap && props.stringMap[axis];
|
|
6511
|
-
var fallbackFormat = tickValues && !
|
|
6246
|
+
var fallbackFormat = tickValues && !_collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(tickValues) ? function (x) {
|
|
6512
6247
|
return x;
|
|
6513
6248
|
} : undefined;
|
|
6514
6249
|
|
|
@@ -6518,7 +6253,7 @@ function getDefaultTickFormat(props) {
|
|
|
6518
6253
|
} : fallbackFormat;
|
|
6519
6254
|
}
|
|
6520
6255
|
|
|
6521
|
-
var invertedStringMap = stringMap &&
|
|
6256
|
+
var invertedStringMap = stringMap && _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
6522
6257
|
|
|
6523
6258
|
var tickValueArray = lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default()(Object.values(stringMap), function (n) {
|
|
6524
6259
|
return n;
|
|
@@ -6538,7 +6273,7 @@ function getStringTicks(props) {
|
|
|
6538
6273
|
var axis = getAxis(props);
|
|
6539
6274
|
var stringMap = props.stringMap && props.stringMap[axis];
|
|
6540
6275
|
var categories = Array.isArray(props.categories) ? props.categories : props.categories && props.categories[axis];
|
|
6541
|
-
var ticksFromCategories = categories &&
|
|
6276
|
+
var ticksFromCategories = categories && _collection__WEBPACK_IMPORTED_MODULE_5__.containsOnlyStrings(categories) ? categories.map(function (tick) {
|
|
6542
6277
|
return stringMap[tick];
|
|
6543
6278
|
}) : undefined;
|
|
6544
6279
|
var ticksFromStringMap = stringMap && Object.values(stringMap);
|
|
@@ -6561,7 +6296,7 @@ function getTickArray(props) {
|
|
|
6561
6296
|
return undefined;
|
|
6562
6297
|
}
|
|
6563
6298
|
|
|
6564
|
-
return
|
|
6299
|
+
return _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickFormat) ? tickFormat.map(function (t, i) {
|
|
6565
6300
|
return i;
|
|
6566
6301
|
}) : tickFormat;
|
|
6567
6302
|
};
|
|
@@ -6572,10 +6307,10 @@ function getTickArray(props) {
|
|
|
6572
6307
|
ticks = getStringTicks(props);
|
|
6573
6308
|
}
|
|
6574
6309
|
|
|
6575
|
-
if (tickValues &&
|
|
6310
|
+
if (tickValues && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickValues)) {
|
|
6576
6311
|
ticks = stringMap ? tickValues.map(function (tick) {
|
|
6577
6312
|
return stringMap[tick];
|
|
6578
|
-
}) :
|
|
6313
|
+
}) : _helpers__WEBPACK_IMPORTED_MODULE_6__.range(1, tickValues.length + 1);
|
|
6579
6314
|
}
|
|
6580
6315
|
|
|
6581
6316
|
var tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_1___default()(ticks) : getTicksFromFormat();
|
|
@@ -6587,7 +6322,7 @@ function getTickArray(props) {
|
|
|
6587
6322
|
if (arr) {
|
|
6588
6323
|
arr.forEach(function (t, index) {
|
|
6589
6324
|
if (Array.isArray(domain)) {
|
|
6590
|
-
if (t >=
|
|
6325
|
+
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain) && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain)) {
|
|
6591
6326
|
newTickArray.push({
|
|
6592
6327
|
value: t,
|
|
6593
6328
|
index: index
|
|
@@ -6619,7 +6354,7 @@ function getTickFormat(props, scale) {
|
|
|
6619
6354
|
// by default. This changed the default formatting for some scale types when
|
|
6620
6355
|
// we upgraded to d3-scale@4..
|
|
6621
6356
|
|
|
6622
|
-
var scaleTickFormat = scale.tickFormat &&
|
|
6357
|
+
var scaleTickFormat = scale.tickFormat && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(scale.tickFormat) ? scale.tickFormat() : function (x) {
|
|
6623
6358
|
return x;
|
|
6624
6359
|
};
|
|
6625
6360
|
return defaultTickFormat || scaleTickFormat;
|
|
@@ -6634,10 +6369,9 @@ function getTickFormat(props, scale) {
|
|
|
6634
6369
|
return function (x, index) {
|
|
6635
6370
|
return filteredTickFormat[index];
|
|
6636
6371
|
};
|
|
6637
|
-
} else if (tickFormat &&
|
|
6372
|
+
} else if (tickFormat && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(tickFormat)) {
|
|
6638
6373
|
var applyStringTicks = function (tick, index, ticks) {
|
|
6639
|
-
var invertedStringMap =
|
|
6640
|
-
|
|
6374
|
+
var invertedStringMap = _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
6641
6375
|
var stringTickArray = ticks.map(function (t) {
|
|
6642
6376
|
return invertedStringMap[t];
|
|
6643
6377
|
});
|
|
@@ -6678,7 +6412,7 @@ function getTicks(props, scale) {
|
|
|
6678
6412
|
|
|
6679
6413
|
if (tickValues) {
|
|
6680
6414
|
return downsampleTicks(tickValues, tickCount);
|
|
6681
|
-
} else if (scale.ticks &&
|
|
6415
|
+
} else if (scale.ticks && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(scale.ticks)) {
|
|
6682
6416
|
// eslint-disable-next-line no-magic-numbers
|
|
6683
6417
|
var defaultTickCount = tickCount || 5;
|
|
6684
6418
|
var scaleTicks = scale.ticks(defaultTickCount);
|
|
@@ -6720,18 +6454,18 @@ function getDomainFromData(props, axis) {
|
|
|
6720
6454
|
return undefined;
|
|
6721
6455
|
}
|
|
6722
6456
|
|
|
6723
|
-
var minDomain =
|
|
6724
|
-
var maxDomain =
|
|
6457
|
+
var minDomain = _domain__WEBPACK_IMPORTED_MODULE_7__.getMinFromProps(props, axis);
|
|
6458
|
+
var maxDomain = _domain__WEBPACK_IMPORTED_MODULE_7__.getMaxFromProps(props, axis);
|
|
6725
6459
|
var tickStrings = stringTicks(props);
|
|
6726
6460
|
var ticks = tickValues.map(function (value) {
|
|
6727
6461
|
return Number(value);
|
|
6728
6462
|
});
|
|
6729
|
-
var defaultMin = tickStrings ? 1 :
|
|
6730
|
-
var defaultMax = tickStrings ? tickValues.length :
|
|
6463
|
+
var defaultMin = tickStrings ? 1 : _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(ticks);
|
|
6464
|
+
var defaultMax = tickStrings ? tickValues.length : _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(ticks);
|
|
6731
6465
|
var min = minDomain !== undefined ? minDomain : defaultMin;
|
|
6732
6466
|
var max = maxDomain !== undefined ? maxDomain : defaultMax;
|
|
6733
|
-
var initialDomain =
|
|
6734
|
-
var domain = polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ?
|
|
6467
|
+
var initialDomain = _domain__WEBPACK_IMPORTED_MODULE_7__.getDomainFromMinMax(min, max);
|
|
6468
|
+
var domain = polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? _domain__WEBPACK_IMPORTED_MODULE_7__.getSymmetricDomain(initialDomain, ticks) : initialDomain;
|
|
6735
6469
|
|
|
6736
6470
|
if (isVertical(props) && !polar) {
|
|
6737
6471
|
domain.reverse();
|
|
@@ -6748,7 +6482,7 @@ function getDomain(props, axis) {
|
|
|
6748
6482
|
return undefined;
|
|
6749
6483
|
}
|
|
6750
6484
|
|
|
6751
|
-
return
|
|
6485
|
+
return _domain__WEBPACK_IMPORTED_MODULE_7__.createDomainFunction(getDomainFromData)(props, inherentAxis);
|
|
6752
6486
|
}
|
|
6753
6487
|
function getAxisValue(props, axis) {
|
|
6754
6488
|
if (!props.axisValue) {
|
|
@@ -6756,20 +6490,20 @@ function getAxisValue(props, axis) {
|
|
|
6756
6490
|
}
|
|
6757
6491
|
|
|
6758
6492
|
var scaleAxis = axis === "x" ? "y" : "x";
|
|
6759
|
-
var scale =
|
|
6493
|
+
var scale = lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(props.scale) && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(props.scale[scaleAxis]) ? props.scale[scaleAxis] : undefined;
|
|
6760
6494
|
|
|
6761
6495
|
if (!scale) {
|
|
6762
6496
|
return undefined;
|
|
6763
6497
|
}
|
|
6764
6498
|
|
|
6765
6499
|
var stringMapAxis = axis === "x" ? "y" : "x";
|
|
6766
|
-
var stringMap =
|
|
6500
|
+
var stringMap = lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(props.stringMap) && props.stringMap[stringMapAxis];
|
|
6767
6501
|
var axisValue = stringMap && typeof props.axisValue === "string" ? stringMap[props.axisValue] : props.axisValue;
|
|
6768
6502
|
return scale(axisValue);
|
|
6769
6503
|
}
|
|
6770
6504
|
function modifyProps(props, fallbackProps) {
|
|
6771
|
-
if (!
|
|
6772
|
-
return
|
|
6505
|
+
if (!lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(props.theme)) {
|
|
6506
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
6773
6507
|
}
|
|
6774
6508
|
|
|
6775
6509
|
var role = "axis";
|
|
@@ -6781,15 +6515,15 @@ function modifyProps(props, fallbackProps) {
|
|
|
6781
6515
|
}
|
|
6782
6516
|
|
|
6783
6517
|
if (role === "axis") {
|
|
6784
|
-
return
|
|
6518
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
6785
6519
|
}
|
|
6786
6520
|
|
|
6787
|
-
var axisTheme =
|
|
6521
|
+
var axisTheme = lodash_defaults__WEBPACK_IMPORTED_MODULE_3___default()({}, props.theme[role], props.theme.axis);
|
|
6788
6522
|
|
|
6789
6523
|
var theme = Object.assign({}, props.theme, {
|
|
6790
6524
|
axis: axisTheme
|
|
6791
6525
|
});
|
|
6792
|
-
return
|
|
6526
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(Object.assign({}, props, {
|
|
6793
6527
|
theme: theme
|
|
6794
6528
|
}), fallbackProps, "axis");
|
|
6795
6529
|
}
|
|
@@ -6809,6 +6543,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6809
6543
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
6810
6544
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
6811
6545
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
6546
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
6812
6547
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
6813
6548
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
6814
6549
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -6850,6 +6585,22 @@ function containsOnlyStrings(collection) {
|
|
|
6850
6585
|
return typeof value === "string";
|
|
6851
6586
|
});
|
|
6852
6587
|
}
|
|
6588
|
+
/**
|
|
6589
|
+
* Creates an array of array values not included in the other given arrays
|
|
6590
|
+
* @param a The array to inspect
|
|
6591
|
+
* @param b The values to exclude
|
|
6592
|
+
* @returns The new array of filtered values
|
|
6593
|
+
*/
|
|
6594
|
+
|
|
6595
|
+
function difference(a, b) {
|
|
6596
|
+
if (a && b) {
|
|
6597
|
+
return a.filter(function (value) {
|
|
6598
|
+
return !b.includes(value);
|
|
6599
|
+
});
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6602
|
+
return [];
|
|
6603
|
+
}
|
|
6853
6604
|
function isArrayOfArrays(collection) {
|
|
6854
6605
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
6855
6606
|
}
|
|
@@ -8337,6 +8088,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8337
8088
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
8338
8089
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
8339
8090
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
8091
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
8340
8092
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
8341
8093
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
8342
8094
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -8387,6 +8139,18 @@ function getPolarRange(props, axis) {
|
|
|
8387
8139
|
return [props.innerRadius || 0, getRadius(props)];
|
|
8388
8140
|
} // Exported Functions
|
|
8389
8141
|
|
|
8142
|
+
/**
|
|
8143
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
8144
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
8145
|
+
*/
|
|
8146
|
+
|
|
8147
|
+
|
|
8148
|
+
function invert(original) {
|
|
8149
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
8150
|
+
acc[current[1]] = current[0];
|
|
8151
|
+
return acc;
|
|
8152
|
+
}, {});
|
|
8153
|
+
}
|
|
8390
8154
|
/**
|
|
8391
8155
|
* creates an object with some keys excluded
|
|
8392
8156
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -8395,7 +8159,6 @@ function getPolarRange(props, axis) {
|
|
|
8395
8159
|
* @returns {Object} new object with same properties as originalObject
|
|
8396
8160
|
*/
|
|
8397
8161
|
|
|
8398
|
-
|
|
8399
8162
|
function omit(originalObject) {
|
|
8400
8163
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
8401
8164
|
// code based on babel's _objectWithoutProperties
|
|
@@ -9031,31 +8794,6 @@ function warn(message) {
|
|
|
9031
8794
|
|
|
9032
8795
|
/***/ }),
|
|
9033
8796
|
|
|
9034
|
-
/***/ "../../victory-core/es/victory-util/merge-refs.js":
|
|
9035
|
-
/*!********************************************************!*\
|
|
9036
|
-
!*** ../../victory-core/es/victory-util/merge-refs.js ***!
|
|
9037
|
-
\********************************************************/
|
|
9038
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9039
|
-
|
|
9040
|
-
"use strict";
|
|
9041
|
-
__webpack_require__.r(__webpack_exports__);
|
|
9042
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9043
|
-
/* harmony export */ "mergeRefs": () => (/* binding */ mergeRefs)
|
|
9044
|
-
/* harmony export */ });
|
|
9045
|
-
function mergeRefs(refs) {
|
|
9046
|
-
return function (value) {
|
|
9047
|
-
refs.forEach(function (ref) {
|
|
9048
|
-
if (typeof ref === "function") {
|
|
9049
|
-
ref(value);
|
|
9050
|
-
} else if (ref !== null && ref !== undefined) {
|
|
9051
|
-
ref.current = value;
|
|
9052
|
-
}
|
|
9053
|
-
});
|
|
9054
|
-
};
|
|
9055
|
-
}
|
|
9056
|
-
|
|
9057
|
-
/***/ }),
|
|
9058
|
-
|
|
9059
8797
|
/***/ "../../victory-core/es/victory-util/scale.js":
|
|
9060
8798
|
/*!***************************************************!*\
|
|
9061
8799
|
!*** ../../victory-core/es/victory-util/scale.js ***!
|
|
@@ -10394,11 +10132,11 @@ function getChildStyle(child, index, calculatedProps) {
|
|
|
10394
10132
|
|
|
10395
10133
|
var labelsStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_4___default()({}, childStyle.labels, style.labels);
|
|
10396
10134
|
|
|
10397
|
-
return {
|
|
10135
|
+
return _objectSpread(_objectSpread({}, childStyle), {}, {
|
|
10398
10136
|
parent: style.parent,
|
|
10399
10137
|
data: dataStyle,
|
|
10400
10138
|
labels: labelsStyle
|
|
10401
|
-
};
|
|
10139
|
+
});
|
|
10402
10140
|
}
|
|
10403
10141
|
function getStringsFromCategories(childComponents, axis) {
|
|
10404
10142
|
var iteratee = function (child) {
|
|
@@ -10501,24 +10239,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10501
10239
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10502
10240
|
/* harmony export */ "VictorySharedEvents": () => (/* binding */ VictorySharedEvents)
|
|
10503
10241
|
/* harmony export */ });
|
|
10504
|
-
/* harmony import */ var
|
|
10505
|
-
/* harmony import */ var
|
|
10506
|
-
/* harmony import */ var
|
|
10507
|
-
/* harmony import */ var
|
|
10508
|
-
/* harmony import */ var
|
|
10509
|
-
/* harmony import */ var
|
|
10510
|
-
/* harmony import */ var
|
|
10511
|
-
/* harmony import */ var
|
|
10512
|
-
/* harmony import */ var
|
|
10513
|
-
/* harmony import */ var
|
|
10514
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/events.js");
|
|
10242
|
+
/* harmony import */ var lodash_fromPairs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/fromPairs */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/fromPairs.js");
|
|
10243
|
+
/* harmony import */ var lodash_fromPairs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_fromPairs__WEBPACK_IMPORTED_MODULE_0__);
|
|
10244
|
+
/* 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");
|
|
10245
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
10246
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
10247
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
10248
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
10249
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
10250
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/events.js");
|
|
10251
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/collection.js");
|
|
10515
10252
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
10516
10253
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/timer-context.js");
|
|
10517
|
-
/* harmony import */ var
|
|
10518
|
-
/* harmony import */ var
|
|
10519
|
-
/* harmony import */ var
|
|
10520
|
-
/* harmony import */ var
|
|
10521
|
-
|
|
10254
|
+
/* 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");
|
|
10255
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
10256
|
+
/* 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");
|
|
10257
|
+
/* harmony import */ var json_stringify_safe__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(json_stringify_safe__WEBPACK_IMPORTED_MODULE_5__);
|
|
10522
10258
|
|
|
10523
10259
|
|
|
10524
10260
|
|
|
@@ -10585,8 +10321,8 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10585
10321
|
_this.globalEvents = void 0;
|
|
10586
10322
|
_this.prevGlobalEventKeys = void 0;
|
|
10587
10323
|
_this.boundGlobalEvents = void 0;
|
|
10588
|
-
_this.getScopedEvents =
|
|
10589
|
-
_this.getEventState =
|
|
10324
|
+
_this.getScopedEvents = victory_core__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
10325
|
+
_this.getEventState = victory_core__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
10590
10326
|
_this.state = _this.state || {};
|
|
10591
10327
|
_this.sharedEventsCache = {};
|
|
10592
10328
|
_this.globalEvents = {};
|
|
@@ -10599,7 +10335,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10599
10335
|
_createClass(VictorySharedEvents, [{
|
|
10600
10336
|
key: "shouldComponentUpdate",
|
|
10601
10337
|
value: function shouldComponentUpdate(nextProps) {
|
|
10602
|
-
if (!
|
|
10338
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
10603
10339
|
this.baseProps = this.getBaseProps(nextProps);
|
|
10604
10340
|
var externalMutations = this.getExternalMutations(nextProps, this.baseProps);
|
|
10605
10341
|
this.applyExternalMutations(nextProps, externalMutations);
|
|
@@ -10624,15 +10360,11 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10624
10360
|
var _this3 = this;
|
|
10625
10361
|
|
|
10626
10362
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
10627
|
-
|
|
10628
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
10629
|
-
|
|
10363
|
+
var removedGlobalEventKeys = victory_core__WEBPACK_IMPORTED_MODULE_7__.difference(this.prevGlobalEventKeys, globalEventKeys);
|
|
10630
10364
|
removedGlobalEventKeys.forEach(function (key) {
|
|
10631
10365
|
return _this3.removeGlobalListener(key);
|
|
10632
10366
|
});
|
|
10633
|
-
|
|
10634
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
10635
|
-
|
|
10367
|
+
var addedGlobalEventKeys = victory_core__WEBPACK_IMPORTED_MODULE_7__.difference(globalEventKeys, this.prevGlobalEventKeys);
|
|
10636
10368
|
addedGlobalEventKeys.forEach(function (key) {
|
|
10637
10369
|
return _this3.addGlobalListener(key);
|
|
10638
10370
|
});
|
|
@@ -10654,22 +10386,22 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10654
10386
|
|
|
10655
10387
|
var boundListener = function (event) {
|
|
10656
10388
|
var listener = _this5.globalEvents[key];
|
|
10657
|
-
return listener && listener(
|
|
10389
|
+
return listener && listener(victory_core__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
10658
10390
|
};
|
|
10659
10391
|
|
|
10660
10392
|
this.boundGlobalEvents[key] = boundListener;
|
|
10661
|
-
window.addEventListener(
|
|
10393
|
+
window.addEventListener(victory_core__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
10662
10394
|
}
|
|
10663
10395
|
}, {
|
|
10664
10396
|
key: "removeGlobalListener",
|
|
10665
10397
|
value: function removeGlobalListener(key) {
|
|
10666
|
-
window.removeEventListener(
|
|
10398
|
+
window.removeEventListener(victory_core__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
10667
10399
|
}
|
|
10668
10400
|
}, {
|
|
10669
10401
|
key: "getAllEvents",
|
|
10670
10402
|
value: function getAllEvents(props) {
|
|
10671
10403
|
var components = ["container", "groupComponent"];
|
|
10672
|
-
var componentEvents =
|
|
10404
|
+
var componentEvents = victory_core__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
10673
10405
|
|
|
10674
10406
|
if (Array.isArray(componentEvents)) {
|
|
10675
10407
|
return Array.isArray(props.events) ? componentEvents.concat.apply(componentEvents, _toConsumableArray(props.events)) : componentEvents;
|
|
@@ -10680,7 +10412,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10680
10412
|
}, {
|
|
10681
10413
|
key: "applyExternalMutations",
|
|
10682
10414
|
value: function applyExternalMutations(props, externalMutations) {
|
|
10683
|
-
if (!
|
|
10415
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
10684
10416
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
10685
10417
|
return victory_core__WEBPACK_IMPORTED_MODULE_8__.isFunction(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
10686
10418
|
}, []);
|
|
@@ -10695,7 +10427,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10695
10427
|
}, {
|
|
10696
10428
|
key: "getExternalMutations",
|
|
10697
10429
|
value: function getExternalMutations(props, baseProps) {
|
|
10698
|
-
return !
|
|
10430
|
+
return !lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(props.externalEventMutations) ? victory_core__WEBPACK_IMPORTED_MODULE_6__.getExternalMutationsWithChildren(props.externalEventMutations, baseProps, this.state, Object.keys(baseProps)) : undefined;
|
|
10699
10431
|
}
|
|
10700
10432
|
}, {
|
|
10701
10433
|
key: "cacheSharedEvents",
|
|
@@ -10710,7 +10442,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10710
10442
|
sharedEvents = _ref2[0],
|
|
10711
10443
|
prevCacheValues = _ref2[1];
|
|
10712
10444
|
|
|
10713
|
-
if (sharedEvents &&
|
|
10445
|
+
if (sharedEvents && react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(cacheValues, prevCacheValues)) {
|
|
10714
10446
|
return sharedEvents;
|
|
10715
10447
|
}
|
|
10716
10448
|
|
|
@@ -10720,7 +10452,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10720
10452
|
key: "getBaseProps",
|
|
10721
10453
|
value: function getBaseProps(props) {
|
|
10722
10454
|
var container = props.container;
|
|
10723
|
-
var children =
|
|
10455
|
+
var children = react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(this.props.children);
|
|
10724
10456
|
var childBaseProps = this.getBasePropsFromChildren(children);
|
|
10725
10457
|
var parentBaseProps = container ? container.props : {};
|
|
10726
10458
|
return Object.assign({}, childBaseProps, {
|
|
@@ -10741,7 +10473,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10741
10473
|
};
|
|
10742
10474
|
|
|
10743
10475
|
var baseProps = victory_core__WEBPACK_IMPORTED_MODULE_8__.reduceChildren(childComponents, iteratee);
|
|
10744
|
-
return
|
|
10476
|
+
return lodash_fromPairs__WEBPACK_IMPORTED_MODULE_0___default()(baseProps);
|
|
10745
10477
|
}
|
|
10746
10478
|
}, {
|
|
10747
10479
|
key: "getNewChildren",
|
|
@@ -10754,9 +10486,9 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10754
10486
|
var alterChildren = function (children, childNames) {
|
|
10755
10487
|
return children.reduce(function (memo, child, index) {
|
|
10756
10488
|
if (child.props.children) {
|
|
10757
|
-
var newChildren =
|
|
10489
|
+
var newChildren = react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(child.props.children);
|
|
10758
10490
|
var names = childNames.slice(index, index + newChildren.length);
|
|
10759
|
-
var results = /*#__PURE__*/
|
|
10491
|
+
var results = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(child, child.props, alterChildren(newChildren, names));
|
|
10760
10492
|
return memo.concat(results);
|
|
10761
10493
|
} else if (childNames[index] !== "parent" && child.type && victory_core__WEBPACK_IMPORTED_MODULE_8__.isFunction(child.type.getBaseProps)) {
|
|
10762
10494
|
var name = child.props.name || childNames[index];
|
|
@@ -10767,7 +10499,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10767
10499
|
|
|
10768
10500
|
return Array.isArray(event.childName) ? event.childName.indexOf(name) > -1 : event.childName === name || event.childName === "all";
|
|
10769
10501
|
});
|
|
10770
|
-
var sharedEventsCacheValues = [name, baseProps, childEvents,
|
|
10502
|
+
var sharedEventsCacheValues = [name, baseProps, childEvents, json_stringify_safe__WEBPACK_IMPORTED_MODULE_5___default()(_this6.state[name])];
|
|
10771
10503
|
var sharedEvents = _this6.getCachedSharedEvents(name, sharedEventsCacheValues) || {
|
|
10772
10504
|
events: childEvents,
|
|
10773
10505
|
// partially apply child name and baseProps,
|
|
@@ -10782,7 +10514,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10782
10514
|
|
|
10783
10515
|
_this6.cacheSharedEvents(name, sharedEvents, sharedEventsCacheValues);
|
|
10784
10516
|
|
|
10785
|
-
return memo.concat( /*#__PURE__*/
|
|
10517
|
+
return memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(child, Object.assign({
|
|
10786
10518
|
key: "events-".concat(name),
|
|
10787
10519
|
sharedEvents: sharedEvents,
|
|
10788
10520
|
eventKey: eventKey,
|
|
@@ -10795,7 +10527,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10795
10527
|
};
|
|
10796
10528
|
|
|
10797
10529
|
var childNames = Object.keys(baseProps);
|
|
10798
|
-
var childComponents =
|
|
10530
|
+
var childComponents = react__WEBPACK_IMPORTED_MODULE_3___default().Children.toArray(props.children);
|
|
10799
10531
|
return alterChildren(childComponents, childNames);
|
|
10800
10532
|
}
|
|
10801
10533
|
}, {
|
|
@@ -10818,22 +10550,22 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10818
10550
|
var container = props.container || props.groupComponent;
|
|
10819
10551
|
var role = container.type && container.type.role;
|
|
10820
10552
|
var containerProps = container.props || {};
|
|
10821
|
-
var boundGetEvents =
|
|
10553
|
+
var boundGetEvents = victory_core__WEBPACK_IMPORTED_MODULE_6__.getEvents.bind(this);
|
|
10822
10554
|
var parentEvents = sharedEvents && boundGetEvents({
|
|
10823
10555
|
sharedEvents: sharedEvents
|
|
10824
10556
|
}, "parent");
|
|
10825
10557
|
|
|
10826
|
-
var parentProps =
|
|
10558
|
+
var parentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, this.getEventState("parent", "parent"), containerProps, baseProps.parent, {
|
|
10827
10559
|
children: children
|
|
10828
10560
|
});
|
|
10829
10561
|
|
|
10830
|
-
var containerEvents =
|
|
10562
|
+
var containerEvents = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(parentEvents, "parent", parentProps), containerProps.events);
|
|
10831
10563
|
|
|
10832
|
-
this.globalEvents =
|
|
10833
|
-
var localEvents =
|
|
10834
|
-
return role === "container" ? /*#__PURE__*/
|
|
10564
|
+
this.globalEvents = victory_core__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(containerEvents);
|
|
10565
|
+
var localEvents = victory_core__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(containerEvents);
|
|
10566
|
+
return role === "container" ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(container, Object.assign({}, parentProps, {
|
|
10835
10567
|
events: localEvents
|
|
10836
|
-
})) : /*#__PURE__*/
|
|
10568
|
+
})) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(container, localEvents, children);
|
|
10837
10569
|
}
|
|
10838
10570
|
}, {
|
|
10839
10571
|
key: "render",
|
|
@@ -10844,19 +10576,19 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
|
|
|
10844
10576
|
return this.getContainer(this.props, this.baseProps, events);
|
|
10845
10577
|
}
|
|
10846
10578
|
|
|
10847
|
-
return /*#__PURE__*/
|
|
10579
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(this.props.container, {
|
|
10848
10580
|
children: this.props.children
|
|
10849
10581
|
});
|
|
10850
10582
|
}
|
|
10851
10583
|
}]);
|
|
10852
10584
|
|
|
10853
10585
|
return VictorySharedEvents;
|
|
10854
|
-
}((
|
|
10586
|
+
}((react__WEBPACK_IMPORTED_MODULE_3___default().Component));
|
|
10855
10587
|
VictorySharedEvents.displayName = "VictorySharedEvents";
|
|
10856
10588
|
VictorySharedEvents.role = "shared-event-wrapper";
|
|
10857
10589
|
VictorySharedEvents.contextType = victory_core__WEBPACK_IMPORTED_MODULE_9__["default"];
|
|
10858
10590
|
VictorySharedEvents.defaultProps = {
|
|
10859
|
-
groupComponent: /*#__PURE__*/
|
|
10591
|
+
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("g", null)
|
|
10860
10592
|
};
|
|
10861
10593
|
|
|
10862
10594
|
/***/ }),
|