victory-pie 36.9.2-next.3 → 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 +4 -13
- package/README.md +2 -2
- package/dist/victory-pie.js +71 -210
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.d.ts +13 -13
- package/es/index.d.ts +2 -2
- package/es/slice.d.ts +28 -28
- package/es/victory-pie.d.ts +116 -116
- package/lib/helper-methods.d.ts +13 -13
- package/lib/index.d.ts +2 -2
- package/lib/slice.d.ts +28 -28
- package/lib/victory-pie.d.ts +116 -116
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
# victory-pie
|
|
2
2
|
|
|
3
|
-
## 36.9.2
|
|
3
|
+
## 36.9.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Updated dependencies [3f2da66e3]
|
|
11
|
-
- Updated dependencies [c13308624]
|
|
12
|
-
- Updated dependencies [65d02419f]
|
|
13
|
-
- Updated dependencies [7efd582cc]
|
|
14
|
-
- Updated dependencies [9cdaf2c08]
|
|
15
|
-
- Updated dependencies [f6f7cc515]
|
|
16
|
-
- Updated dependencies [6e34169a5]
|
|
17
|
-
- victory-core@36.9.2-next.3
|
|
18
|
-
- victory-vendor@36.9.2-next.3
|
|
7
|
+
- Replace lodash isNil and isNan with native code ([#2800](https://github.com/FormidableLabs/victory/pull/2800))
|
|
8
|
+
|
|
9
|
+
* Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
|
|
19
10
|
|
|
20
11
|
## 36.9.1
|
|
21
12
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`victory-pie@^30.0.0` exports `VictoryPie` and `Slice` components
|
|
4
4
|
|
|
5
|
-
To view documentation for `VictoryPie` please see https://
|
|
5
|
+
To view documentation for `VictoryPie` please see https://commerce.nearform.com/open-source/victory/docs/victory-pie
|
|
6
6
|
|
|
7
|
-
To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-pie.md
|
|
7
|
+
To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-pie.md
|
package/dist/victory-pie.js
CHANGED
|
@@ -1198,83 +1198,6 @@ function baseAssignValue(object, key, value) {
|
|
|
1198
1198
|
module.exports = baseAssignValue;
|
|
1199
1199
|
|
|
1200
1200
|
|
|
1201
|
-
/***/ }),
|
|
1202
|
-
|
|
1203
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
1204
|
-
/*!*****************************************************************************************!*\
|
|
1205
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
1206
|
-
\*****************************************************************************************/
|
|
1207
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1208
|
-
|
|
1209
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
1210
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
1211
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
1212
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
1213
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
1214
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
1215
|
-
|
|
1216
|
-
/** Used as the size to enable large array optimizations. */
|
|
1217
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1218
|
-
|
|
1219
|
-
/**
|
|
1220
|
-
* The base implementation of methods like `_.difference` without support
|
|
1221
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
1222
|
-
*
|
|
1223
|
-
* @private
|
|
1224
|
-
* @param {Array} array The array to inspect.
|
|
1225
|
-
* @param {Array} values The values to exclude.
|
|
1226
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
1227
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
1228
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
1229
|
-
*/
|
|
1230
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
1231
|
-
var index = -1,
|
|
1232
|
-
includes = arrayIncludes,
|
|
1233
|
-
isCommon = true,
|
|
1234
|
-
length = array.length,
|
|
1235
|
-
result = [],
|
|
1236
|
-
valuesLength = values.length;
|
|
1237
|
-
|
|
1238
|
-
if (!length) {
|
|
1239
|
-
return result;
|
|
1240
|
-
}
|
|
1241
|
-
if (iteratee) {
|
|
1242
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
1243
|
-
}
|
|
1244
|
-
if (comparator) {
|
|
1245
|
-
includes = arrayIncludesWith;
|
|
1246
|
-
isCommon = false;
|
|
1247
|
-
}
|
|
1248
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
1249
|
-
includes = cacheHas;
|
|
1250
|
-
isCommon = false;
|
|
1251
|
-
values = new SetCache(values);
|
|
1252
|
-
}
|
|
1253
|
-
outer:
|
|
1254
|
-
while (++index < length) {
|
|
1255
|
-
var value = array[index],
|
|
1256
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
1257
|
-
|
|
1258
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
1259
|
-
if (isCommon && computed === computed) {
|
|
1260
|
-
var valuesIndex = valuesLength;
|
|
1261
|
-
while (valuesIndex--) {
|
|
1262
|
-
if (values[valuesIndex] === computed) {
|
|
1263
|
-
continue outer;
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
result.push(value);
|
|
1267
|
-
}
|
|
1268
|
-
else if (!includes(values, computed, comparator)) {
|
|
1269
|
-
result.push(value);
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
return result;
|
|
1273
|
-
}
|
|
1274
|
-
|
|
1275
|
-
module.exports = baseDifference;
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
1201
|
/***/ }),
|
|
1279
1202
|
|
|
1280
1203
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -3654,49 +3577,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
3654
3577
|
module.exports = defaults;
|
|
3655
3578
|
|
|
3656
3579
|
|
|
3657
|
-
/***/ }),
|
|
3658
|
-
|
|
3659
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
3660
|
-
/*!************************************************************************************!*\
|
|
3661
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
3662
|
-
\************************************************************************************/
|
|
3663
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3664
|
-
|
|
3665
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
3666
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
3667
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
3668
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
3669
|
-
|
|
3670
|
-
/**
|
|
3671
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
3672
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
3673
|
-
* for equality comparisons. The order and references of result values are
|
|
3674
|
-
* determined by the first array.
|
|
3675
|
-
*
|
|
3676
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
3677
|
-
*
|
|
3678
|
-
* @static
|
|
3679
|
-
* @memberOf _
|
|
3680
|
-
* @since 0.1.0
|
|
3681
|
-
* @category Array
|
|
3682
|
-
* @param {Array} array The array to inspect.
|
|
3683
|
-
* @param {...Array} [values] The values to exclude.
|
|
3684
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
3685
|
-
* @see _.without, _.xor
|
|
3686
|
-
* @example
|
|
3687
|
-
*
|
|
3688
|
-
* _.difference([2, 1], [2, 3]);
|
|
3689
|
-
* // => [1]
|
|
3690
|
-
*/
|
|
3691
|
-
var difference = baseRest(function(array, values) {
|
|
3692
|
-
return isArrayLikeObject(array)
|
|
3693
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
3694
|
-
: [];
|
|
3695
|
-
});
|
|
3696
|
-
|
|
3697
|
-
module.exports = difference;
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
3580
|
/***/ }),
|
|
3701
3581
|
|
|
3702
3582
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -4001,49 +3881,6 @@ function isArrayLike(value) {
|
|
|
4001
3881
|
module.exports = isArrayLike;
|
|
4002
3882
|
|
|
4003
3883
|
|
|
4004
|
-
/***/ }),
|
|
4005
|
-
|
|
4006
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
4007
|
-
/*!*******************************************************************************************!*\
|
|
4008
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
4009
|
-
\*******************************************************************************************/
|
|
4010
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4011
|
-
|
|
4012
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
4013
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
4014
|
-
|
|
4015
|
-
/**
|
|
4016
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
4017
|
-
* is an object.
|
|
4018
|
-
*
|
|
4019
|
-
* @static
|
|
4020
|
-
* @memberOf _
|
|
4021
|
-
* @since 4.0.0
|
|
4022
|
-
* @category Lang
|
|
4023
|
-
* @param {*} value The value to check.
|
|
4024
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
4025
|
-
* else `false`.
|
|
4026
|
-
* @example
|
|
4027
|
-
*
|
|
4028
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
4029
|
-
* // => true
|
|
4030
|
-
*
|
|
4031
|
-
* _.isArrayLikeObject(document.body.children);
|
|
4032
|
-
* // => true
|
|
4033
|
-
*
|
|
4034
|
-
* _.isArrayLikeObject('abc');
|
|
4035
|
-
* // => false
|
|
4036
|
-
*
|
|
4037
|
-
* _.isArrayLikeObject(_.noop);
|
|
4038
|
-
* // => false
|
|
4039
|
-
*/
|
|
4040
|
-
function isArrayLikeObject(value) {
|
|
4041
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
4042
|
-
}
|
|
4043
|
-
|
|
4044
|
-
module.exports = isArrayLikeObject;
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
3884
|
/***/ }),
|
|
4048
3885
|
|
|
4049
3886
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|
|
@@ -7908,18 +7745,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7908
7745
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
7909
7746
|
/* 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");
|
|
7910
7747
|
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
7911
|
-
/* harmony import */ var
|
|
7912
|
-
/* harmony import */ var
|
|
7913
|
-
/* harmony import */ var
|
|
7914
|
-
/* harmony import */ var
|
|
7915
|
-
/* harmony import */ var
|
|
7916
|
-
/* harmony import */ var
|
|
7917
|
-
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
7918
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
|
|
7919
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_5__);
|
|
7748
|
+
/* 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");
|
|
7749
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
7750
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
7751
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
7752
|
+
/* 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");
|
|
7753
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
7920
7754
|
/* harmony import */ var _victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-transition/victory-transition */ "../../victory-core/es/victory-transition/victory-transition.js");
|
|
7921
|
-
/* harmony import */ var
|
|
7922
|
-
|
|
7755
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
7756
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
7757
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7923
7758
|
|
|
7924
7759
|
|
|
7925
7760
|
|
|
@@ -7960,13 +7795,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
7960
7795
|
|
|
7961
7796
|
|
|
7962
7797
|
|
|
7798
|
+
|
|
7963
7799
|
// DISCLAIMER:
|
|
7964
7800
|
// This file is not currently tested, and it is first on the list of files
|
|
7965
7801
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
7966
7802
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
7967
7803
|
|
|
7968
7804
|
var datumHasXandY = function (datum) {
|
|
7969
|
-
return !(0,
|
|
7805
|
+
return !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._x) && !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._y);
|
|
7970
7806
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
7971
7807
|
|
|
7972
7808
|
|
|
@@ -7994,11 +7830,11 @@ function addEvents(WrappedComponent) {
|
|
|
7994
7830
|
|
|
7995
7831
|
_this = _super.call(this, props);
|
|
7996
7832
|
_this.state = {};
|
|
7997
|
-
_this.getEventState =
|
|
7998
|
-
_this.getScopedEvents =
|
|
7833
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
7834
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
7999
7835
|
|
|
8000
7836
|
_this.getEvents = function (p, target, eventKey) {
|
|
8001
|
-
return
|
|
7837
|
+
return _events__WEBPACK_IMPORTED_MODULE_6__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
8002
7838
|
};
|
|
8003
7839
|
|
|
8004
7840
|
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
@@ -8018,7 +7854,7 @@ function addEvents(WrappedComponent) {
|
|
|
8018
7854
|
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
8019
7855
|
|
|
8020
7856
|
var animating = this.props.animating || this.props.animate;
|
|
8021
|
-
var newMutation = !
|
|
7857
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(externalMutations, this.externalMutations);
|
|
8022
7858
|
|
|
8023
7859
|
if (animating || newMutation) {
|
|
8024
7860
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
@@ -8029,12 +7865,12 @@ function addEvents(WrappedComponent) {
|
|
|
8029
7865
|
|
|
8030
7866
|
var calculatedState = this.getStateChanges(nextProps);
|
|
8031
7867
|
|
|
8032
|
-
if (!
|
|
7868
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.calculatedState, calculatedState)) {
|
|
8033
7869
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8034
7870
|
return true;
|
|
8035
7871
|
}
|
|
8036
7872
|
|
|
8037
|
-
if (!
|
|
7873
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
8038
7874
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8039
7875
|
return true;
|
|
8040
7876
|
}
|
|
@@ -8060,15 +7896,11 @@ function addEvents(WrappedComponent) {
|
|
|
8060
7896
|
var calculatedState = this.getStateChanges(prevProps);
|
|
8061
7897
|
this.calculatedState = calculatedState;
|
|
8062
7898
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
8063
|
-
|
|
8064
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
8065
|
-
|
|
7899
|
+
var removedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(this.prevGlobalEventKeys, globalEventKeys);
|
|
8066
7900
|
removedGlobalEventKeys.forEach(function (key) {
|
|
8067
7901
|
return _this3.removeGlobalListener(key);
|
|
8068
7902
|
});
|
|
8069
|
-
|
|
8070
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
8071
|
-
|
|
7903
|
+
var addedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(globalEventKeys, this.prevGlobalEventKeys);
|
|
8072
7904
|
addedGlobalEventKeys.forEach(function (key) {
|
|
8073
7905
|
return _this3.addGlobalListener(key);
|
|
8074
7906
|
});
|
|
@@ -8090,16 +7922,16 @@ function addEvents(WrappedComponent) {
|
|
|
8090
7922
|
|
|
8091
7923
|
var boundListener = function (event) {
|
|
8092
7924
|
var listener = _this5.globalEvents[key];
|
|
8093
|
-
return listener && listener(
|
|
7925
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
8094
7926
|
};
|
|
8095
7927
|
|
|
8096
7928
|
this.boundGlobalEvents[key] = boundListener;
|
|
8097
|
-
window.addEventListener(
|
|
7929
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
8098
7930
|
}
|
|
8099
7931
|
}, {
|
|
8100
7932
|
key: "removeGlobalListener",
|
|
8101
7933
|
value: function removeGlobalListener(key) {
|
|
8102
|
-
window.removeEventListener(
|
|
7934
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
8103
7935
|
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
8104
7936
|
// state change should trigger a re-render
|
|
8105
7937
|
|
|
@@ -8113,7 +7945,7 @@ function addEvents(WrappedComponent) {
|
|
|
8113
7945
|
}
|
|
8114
7946
|
|
|
8115
7947
|
var getState = function (key, type) {
|
|
8116
|
-
var result =
|
|
7948
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
8117
7949
|
|
|
8118
7950
|
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(result) ? undefined : result;
|
|
8119
7951
|
};
|
|
@@ -8136,7 +7968,7 @@ function addEvents(WrappedComponent) {
|
|
|
8136
7968
|
value: function applyExternalMutations(props, externalMutations) {
|
|
8137
7969
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
8138
7970
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
8139
|
-
return (0,
|
|
7971
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
8140
7972
|
}, []);
|
|
8141
7973
|
var compiledCallbacks = callbacks.length ? function () {
|
|
8142
7974
|
callbacks.forEach(function (c) {
|
|
@@ -8151,8 +7983,8 @@ function addEvents(WrappedComponent) {
|
|
|
8151
7983
|
value: function getCalculatedValues(props) {
|
|
8152
7984
|
var sharedEvents = props.sharedEvents;
|
|
8153
7985
|
var components = WrappedComponent.expectedComponents;
|
|
8154
|
-
var componentEvents =
|
|
8155
|
-
var getSharedEventState = sharedEvents && (0,
|
|
7986
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
7987
|
+
var getSharedEventState = sharedEvents && (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
8156
7988
|
return undefined;
|
|
8157
7989
|
};
|
|
8158
7990
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
@@ -8175,7 +8007,7 @@ function addEvents(WrappedComponent) {
|
|
|
8175
8007
|
value: function getExternalMutations(props) {
|
|
8176
8008
|
var sharedEvents = props.sharedEvents,
|
|
8177
8009
|
externalEventMutations = props.externalEventMutations;
|
|
8178
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined :
|
|
8010
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
8179
8011
|
}
|
|
8180
8012
|
}, {
|
|
8181
8013
|
key: "cacheValues",
|
|
@@ -8193,12 +8025,12 @@ function addEvents(WrappedComponent) {
|
|
|
8193
8025
|
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
8194
8026
|
var parentState = this.getEventState("parent", "parent");
|
|
8195
8027
|
|
|
8196
|
-
var baseParentProps =
|
|
8028
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentState, sharedParentState);
|
|
8197
8029
|
|
|
8198
8030
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
8199
8031
|
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(baseParentProps, parentPropsList) : {};
|
|
8200
8032
|
|
|
8201
|
-
var modifiedProps =
|
|
8033
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentProps, props);
|
|
8202
8034
|
|
|
8203
8035
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
8204
8036
|
}
|
|
@@ -8230,21 +8062,21 @@ function addEvents(WrappedComponent) {
|
|
|
8230
8062
|
if (this.hasEvents) {
|
|
8231
8063
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
8232
8064
|
|
|
8233
|
-
var componentProps =
|
|
8065
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
8234
8066
|
index: index,
|
|
8235
8067
|
key: id
|
|
8236
8068
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
8237
8069
|
id: id
|
|
8238
8070
|
});
|
|
8239
8071
|
|
|
8240
|
-
var events =
|
|
8072
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
8241
8073
|
|
|
8242
8074
|
return Object.assign({}, componentProps, {
|
|
8243
8075
|
events: events
|
|
8244
8076
|
});
|
|
8245
8077
|
}
|
|
8246
8078
|
|
|
8247
|
-
return
|
|
8079
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
8248
8080
|
index: index,
|
|
8249
8081
|
key: id
|
|
8250
8082
|
}, currentProps, baseProps, {
|
|
@@ -8258,11 +8090,11 @@ function addEvents(WrappedComponent) {
|
|
|
8258
8090
|
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
8259
8091
|
|
|
8260
8092
|
if (parentProps.events) {
|
|
8261
|
-
this.globalEvents =
|
|
8262
|
-
parentProps.events =
|
|
8093
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
8094
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
8263
8095
|
}
|
|
8264
8096
|
|
|
8265
|
-
return /*#__PURE__*/
|
|
8097
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(component, parentProps, children);
|
|
8266
8098
|
}
|
|
8267
8099
|
}, {
|
|
8268
8100
|
key: "animateComponent",
|
|
@@ -8271,10 +8103,10 @@ function addEvents(WrappedComponent) {
|
|
|
8271
8103
|
|
|
8272
8104
|
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
8273
8105
|
var Comp = this.constructor;
|
|
8274
|
-
return /*#__PURE__*/
|
|
8106
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
8275
8107
|
animate: props.animate,
|
|
8276
8108
|
animationWhitelist: animationWhitelist
|
|
8277
|
-
}, /*#__PURE__*/
|
|
8109
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Comp, props));
|
|
8278
8110
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
8279
8111
|
|
|
8280
8112
|
}, {
|
|
@@ -8294,13 +8126,13 @@ function addEvents(WrappedComponent) {
|
|
|
8294
8126
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
8295
8127
|
|
|
8296
8128
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
8297
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
8129
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps));
|
|
8298
8130
|
}
|
|
8299
8131
|
|
|
8300
8132
|
return newMemo;
|
|
8301
8133
|
}, []);
|
|
8302
8134
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
8303
|
-
var children = [/*#__PURE__*/
|
|
8135
|
+
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
8304
8136
|
return this.renderContainer(groupComponent, children);
|
|
8305
8137
|
}
|
|
8306
8138
|
}, {
|
|
@@ -8316,7 +8148,7 @@ function addEvents(WrappedComponent) {
|
|
|
8316
8148
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
8317
8149
|
|
|
8318
8150
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
8319
|
-
validDataComponents.push( /*#__PURE__*/
|
|
8151
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps));
|
|
8320
8152
|
}
|
|
8321
8153
|
|
|
8322
8154
|
return validDataComponents;
|
|
@@ -8325,7 +8157,7 @@ function addEvents(WrappedComponent) {
|
|
|
8325
8157
|
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
8326
8158
|
|
|
8327
8159
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
8328
|
-
return /*#__PURE__*/
|
|
8160
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps);
|
|
8329
8161
|
}
|
|
8330
8162
|
|
|
8331
8163
|
return undefined;
|
|
@@ -8356,6 +8188,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8356
8188
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
8357
8189
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
8358
8190
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
8191
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
8359
8192
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
8360
8193
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
8361
8194
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -8397,6 +8230,22 @@ function containsOnlyStrings(collection) {
|
|
|
8397
8230
|
return typeof value === "string";
|
|
8398
8231
|
});
|
|
8399
8232
|
}
|
|
8233
|
+
/**
|
|
8234
|
+
* Creates an array of array values not included in the other given arrays
|
|
8235
|
+
* @param a The array to inspect
|
|
8236
|
+
* @param b The values to exclude
|
|
8237
|
+
* @returns The new array of filtered values
|
|
8238
|
+
*/
|
|
8239
|
+
|
|
8240
|
+
function difference(a, b) {
|
|
8241
|
+
if (a && b) {
|
|
8242
|
+
return a.filter(function (value) {
|
|
8243
|
+
return !b.includes(value);
|
|
8244
|
+
});
|
|
8245
|
+
}
|
|
8246
|
+
|
|
8247
|
+
return [];
|
|
8248
|
+
}
|
|
8400
8249
|
function isArrayOfArrays(collection) {
|
|
8401
8250
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
8402
8251
|
}
|
|
@@ -9440,6 +9289,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9440
9289
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
9441
9290
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
9442
9291
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
9292
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
9443
9293
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
9444
9294
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
9445
9295
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -9490,6 +9340,18 @@ function getPolarRange(props, axis) {
|
|
|
9490
9340
|
return [props.innerRadius || 0, getRadius(props)];
|
|
9491
9341
|
} // Exported Functions
|
|
9492
9342
|
|
|
9343
|
+
/**
|
|
9344
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
9345
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
9346
|
+
*/
|
|
9347
|
+
|
|
9348
|
+
|
|
9349
|
+
function invert(original) {
|
|
9350
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
9351
|
+
acc[current[1]] = current[0];
|
|
9352
|
+
return acc;
|
|
9353
|
+
}, {});
|
|
9354
|
+
}
|
|
9493
9355
|
/**
|
|
9494
9356
|
* creates an object with some keys excluded
|
|
9495
9357
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -9498,7 +9360,6 @@ function getPolarRange(props, axis) {
|
|
|
9498
9360
|
* @returns {Object} new object with same properties as originalObject
|
|
9499
9361
|
*/
|
|
9500
9362
|
|
|
9501
|
-
|
|
9502
9363
|
function omit(originalObject) {
|
|
9503
9364
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
9504
9365
|
// code based on babel's _objectWithoutProperties
|