victory-errorbar 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 -12
- package/README.md +2 -2
- package/dist/victory-errorbar.js +71 -210
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.d.ts +31 -31
- package/es/helper-methods.d.ts +3 -3
- package/es/index.d.ts +2 -2
- package/es/victory-errorbar.d.ts +85 -85
- package/lib/error-bar.d.ts +31 -31
- package/lib/helper-methods.d.ts +3 -3
- package/lib/index.d.ts +2 -2
- package/lib/victory-errorbar.d.ts +85 -85
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
# victory-errorbar
|
|
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
|
|
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))
|
|
18
10
|
|
|
19
11
|
## 36.9.1
|
|
20
12
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`victory-errorbar@^30.0.0` exports `VictoryErrorBar` and `ErrorBar` components
|
|
4
4
|
|
|
5
|
-
To view documentation for `VictoryErrorBar` please see https://
|
|
5
|
+
To view documentation for `VictoryErrorBar` please see https://commerce.nearform.com/open-source/victory/docs/victory-error-bar
|
|
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-errorbar.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-errorbar.md
|
package/dist/victory-errorbar.js
CHANGED
|
@@ -991,83 +991,6 @@ function baseAssignValue(object, key, value) {
|
|
|
991
991
|
module.exports = baseAssignValue;
|
|
992
992
|
|
|
993
993
|
|
|
994
|
-
/***/ }),
|
|
995
|
-
|
|
996
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
997
|
-
/*!*****************************************************************************************!*\
|
|
998
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
999
|
-
\*****************************************************************************************/
|
|
1000
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1001
|
-
|
|
1002
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
1003
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
1004
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
1005
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
1006
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
1007
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
1008
|
-
|
|
1009
|
-
/** Used as the size to enable large array optimizations. */
|
|
1010
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
* The base implementation of methods like `_.difference` without support
|
|
1014
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
1015
|
-
*
|
|
1016
|
-
* @private
|
|
1017
|
-
* @param {Array} array The array to inspect.
|
|
1018
|
-
* @param {Array} values The values to exclude.
|
|
1019
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
1020
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
1021
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
1022
|
-
*/
|
|
1023
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
1024
|
-
var index = -1,
|
|
1025
|
-
includes = arrayIncludes,
|
|
1026
|
-
isCommon = true,
|
|
1027
|
-
length = array.length,
|
|
1028
|
-
result = [],
|
|
1029
|
-
valuesLength = values.length;
|
|
1030
|
-
|
|
1031
|
-
if (!length) {
|
|
1032
|
-
return result;
|
|
1033
|
-
}
|
|
1034
|
-
if (iteratee) {
|
|
1035
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
1036
|
-
}
|
|
1037
|
-
if (comparator) {
|
|
1038
|
-
includes = arrayIncludesWith;
|
|
1039
|
-
isCommon = false;
|
|
1040
|
-
}
|
|
1041
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
1042
|
-
includes = cacheHas;
|
|
1043
|
-
isCommon = false;
|
|
1044
|
-
values = new SetCache(values);
|
|
1045
|
-
}
|
|
1046
|
-
outer:
|
|
1047
|
-
while (++index < length) {
|
|
1048
|
-
var value = array[index],
|
|
1049
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
1050
|
-
|
|
1051
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
1052
|
-
if (isCommon && computed === computed) {
|
|
1053
|
-
var valuesIndex = valuesLength;
|
|
1054
|
-
while (valuesIndex--) {
|
|
1055
|
-
if (values[valuesIndex] === computed) {
|
|
1056
|
-
continue outer;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
result.push(value);
|
|
1060
|
-
}
|
|
1061
|
-
else if (!includes(values, computed, comparator)) {
|
|
1062
|
-
result.push(value);
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
return result;
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
module.exports = baseDifference;
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
994
|
/***/ }),
|
|
1072
995
|
|
|
1073
996
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -3721,49 +3644,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
3721
3644
|
module.exports = defaults;
|
|
3722
3645
|
|
|
3723
3646
|
|
|
3724
|
-
/***/ }),
|
|
3725
|
-
|
|
3726
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
3727
|
-
/*!************************************************************************************!*\
|
|
3728
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
3729
|
-
\************************************************************************************/
|
|
3730
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3731
|
-
|
|
3732
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
3733
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
3734
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
3735
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
3736
|
-
|
|
3737
|
-
/**
|
|
3738
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
3739
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
3740
|
-
* for equality comparisons. The order and references of result values are
|
|
3741
|
-
* determined by the first array.
|
|
3742
|
-
*
|
|
3743
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
3744
|
-
*
|
|
3745
|
-
* @static
|
|
3746
|
-
* @memberOf _
|
|
3747
|
-
* @since 0.1.0
|
|
3748
|
-
* @category Array
|
|
3749
|
-
* @param {Array} array The array to inspect.
|
|
3750
|
-
* @param {...Array} [values] The values to exclude.
|
|
3751
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
3752
|
-
* @see _.without, _.xor
|
|
3753
|
-
* @example
|
|
3754
|
-
*
|
|
3755
|
-
* _.difference([2, 1], [2, 3]);
|
|
3756
|
-
* // => [1]
|
|
3757
|
-
*/
|
|
3758
|
-
var difference = baseRest(function(array, values) {
|
|
3759
|
-
return isArrayLikeObject(array)
|
|
3760
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
3761
|
-
: [];
|
|
3762
|
-
});
|
|
3763
|
-
|
|
3764
|
-
module.exports = difference;
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
3647
|
/***/ }),
|
|
3768
3648
|
|
|
3769
3649
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -4068,49 +3948,6 @@ function isArrayLike(value) {
|
|
|
4068
3948
|
module.exports = isArrayLike;
|
|
4069
3949
|
|
|
4070
3950
|
|
|
4071
|
-
/***/ }),
|
|
4072
|
-
|
|
4073
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
4074
|
-
/*!*******************************************************************************************!*\
|
|
4075
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
4076
|
-
\*******************************************************************************************/
|
|
4077
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4078
|
-
|
|
4079
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
4080
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
4081
|
-
|
|
4082
|
-
/**
|
|
4083
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
4084
|
-
* is an object.
|
|
4085
|
-
*
|
|
4086
|
-
* @static
|
|
4087
|
-
* @memberOf _
|
|
4088
|
-
* @since 4.0.0
|
|
4089
|
-
* @category Lang
|
|
4090
|
-
* @param {*} value The value to check.
|
|
4091
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
4092
|
-
* else `false`.
|
|
4093
|
-
* @example
|
|
4094
|
-
*
|
|
4095
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
4096
|
-
* // => true
|
|
4097
|
-
*
|
|
4098
|
-
* _.isArrayLikeObject(document.body.children);
|
|
4099
|
-
* // => true
|
|
4100
|
-
*
|
|
4101
|
-
* _.isArrayLikeObject('abc');
|
|
4102
|
-
* // => false
|
|
4103
|
-
*
|
|
4104
|
-
* _.isArrayLikeObject(_.noop);
|
|
4105
|
-
* // => false
|
|
4106
|
-
*/
|
|
4107
|
-
function isArrayLikeObject(value) {
|
|
4108
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
4109
|
-
}
|
|
4110
|
-
|
|
4111
|
-
module.exports = isArrayLikeObject;
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
3951
|
/***/ }),
|
|
4115
3952
|
|
|
4116
3953
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|
|
@@ -7914,18 +7751,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7914
7751
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
7915
7752
|
/* 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");
|
|
7916
7753
|
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
7917
|
-
/* harmony import */ var
|
|
7918
|
-
/* harmony import */ var
|
|
7919
|
-
/* harmony import */ var
|
|
7920
|
-
/* harmony import */ var
|
|
7921
|
-
/* harmony import */ var
|
|
7922
|
-
/* harmony import */ var
|
|
7923
|
-
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
7924
|
-
/* 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");
|
|
7925
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_5__);
|
|
7754
|
+
/* 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");
|
|
7755
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
7756
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
7757
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
7758
|
+
/* 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");
|
|
7759
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
7926
7760
|
/* 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");
|
|
7927
|
-
/* harmony import */ var
|
|
7928
|
-
|
|
7761
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
7762
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
7763
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7929
7764
|
|
|
7930
7765
|
|
|
7931
7766
|
|
|
@@ -7966,13 +7801,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
7966
7801
|
|
|
7967
7802
|
|
|
7968
7803
|
|
|
7804
|
+
|
|
7969
7805
|
// DISCLAIMER:
|
|
7970
7806
|
// This file is not currently tested, and it is first on the list of files
|
|
7971
7807
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
7972
7808
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
7973
7809
|
|
|
7974
7810
|
var datumHasXandY = function (datum) {
|
|
7975
|
-
return !(0,
|
|
7811
|
+
return !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._x) && !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._y);
|
|
7976
7812
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
7977
7813
|
|
|
7978
7814
|
|
|
@@ -8000,11 +7836,11 @@ function addEvents(WrappedComponent) {
|
|
|
8000
7836
|
|
|
8001
7837
|
_this = _super.call(this, props);
|
|
8002
7838
|
_this.state = {};
|
|
8003
|
-
_this.getEventState =
|
|
8004
|
-
_this.getScopedEvents =
|
|
7839
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
7840
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
8005
7841
|
|
|
8006
7842
|
_this.getEvents = function (p, target, eventKey) {
|
|
8007
|
-
return
|
|
7843
|
+
return _events__WEBPACK_IMPORTED_MODULE_6__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
8008
7844
|
};
|
|
8009
7845
|
|
|
8010
7846
|
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
@@ -8024,7 +7860,7 @@ function addEvents(WrappedComponent) {
|
|
|
8024
7860
|
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
8025
7861
|
|
|
8026
7862
|
var animating = this.props.animating || this.props.animate;
|
|
8027
|
-
var newMutation = !
|
|
7863
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(externalMutations, this.externalMutations);
|
|
8028
7864
|
|
|
8029
7865
|
if (animating || newMutation) {
|
|
8030
7866
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
@@ -8035,12 +7871,12 @@ function addEvents(WrappedComponent) {
|
|
|
8035
7871
|
|
|
8036
7872
|
var calculatedState = this.getStateChanges(nextProps);
|
|
8037
7873
|
|
|
8038
|
-
if (!
|
|
7874
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.calculatedState, calculatedState)) {
|
|
8039
7875
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8040
7876
|
return true;
|
|
8041
7877
|
}
|
|
8042
7878
|
|
|
8043
|
-
if (!
|
|
7879
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
8044
7880
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8045
7881
|
return true;
|
|
8046
7882
|
}
|
|
@@ -8066,15 +7902,11 @@ function addEvents(WrappedComponent) {
|
|
|
8066
7902
|
var calculatedState = this.getStateChanges(prevProps);
|
|
8067
7903
|
this.calculatedState = calculatedState;
|
|
8068
7904
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
8069
|
-
|
|
8070
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
8071
|
-
|
|
7905
|
+
var removedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(this.prevGlobalEventKeys, globalEventKeys);
|
|
8072
7906
|
removedGlobalEventKeys.forEach(function (key) {
|
|
8073
7907
|
return _this3.removeGlobalListener(key);
|
|
8074
7908
|
});
|
|
8075
|
-
|
|
8076
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
8077
|
-
|
|
7909
|
+
var addedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(globalEventKeys, this.prevGlobalEventKeys);
|
|
8078
7910
|
addedGlobalEventKeys.forEach(function (key) {
|
|
8079
7911
|
return _this3.addGlobalListener(key);
|
|
8080
7912
|
});
|
|
@@ -8096,16 +7928,16 @@ function addEvents(WrappedComponent) {
|
|
|
8096
7928
|
|
|
8097
7929
|
var boundListener = function (event) {
|
|
8098
7930
|
var listener = _this5.globalEvents[key];
|
|
8099
|
-
return listener && listener(
|
|
7931
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
8100
7932
|
};
|
|
8101
7933
|
|
|
8102
7934
|
this.boundGlobalEvents[key] = boundListener;
|
|
8103
|
-
window.addEventListener(
|
|
7935
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
8104
7936
|
}
|
|
8105
7937
|
}, {
|
|
8106
7938
|
key: "removeGlobalListener",
|
|
8107
7939
|
value: function removeGlobalListener(key) {
|
|
8108
|
-
window.removeEventListener(
|
|
7940
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
8109
7941
|
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
8110
7942
|
// state change should trigger a re-render
|
|
8111
7943
|
|
|
@@ -8119,7 +7951,7 @@ function addEvents(WrappedComponent) {
|
|
|
8119
7951
|
}
|
|
8120
7952
|
|
|
8121
7953
|
var getState = function (key, type) {
|
|
8122
|
-
var result =
|
|
7954
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
8123
7955
|
|
|
8124
7956
|
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(result) ? undefined : result;
|
|
8125
7957
|
};
|
|
@@ -8142,7 +7974,7 @@ function addEvents(WrappedComponent) {
|
|
|
8142
7974
|
value: function applyExternalMutations(props, externalMutations) {
|
|
8143
7975
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
8144
7976
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
8145
|
-
return (0,
|
|
7977
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
8146
7978
|
}, []);
|
|
8147
7979
|
var compiledCallbacks = callbacks.length ? function () {
|
|
8148
7980
|
callbacks.forEach(function (c) {
|
|
@@ -8157,8 +7989,8 @@ function addEvents(WrappedComponent) {
|
|
|
8157
7989
|
value: function getCalculatedValues(props) {
|
|
8158
7990
|
var sharedEvents = props.sharedEvents;
|
|
8159
7991
|
var components = WrappedComponent.expectedComponents;
|
|
8160
|
-
var componentEvents =
|
|
8161
|
-
var getSharedEventState = sharedEvents && (0,
|
|
7992
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
7993
|
+
var getSharedEventState = sharedEvents && (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
8162
7994
|
return undefined;
|
|
8163
7995
|
};
|
|
8164
7996
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
@@ -8181,7 +8013,7 @@ function addEvents(WrappedComponent) {
|
|
|
8181
8013
|
value: function getExternalMutations(props) {
|
|
8182
8014
|
var sharedEvents = props.sharedEvents,
|
|
8183
8015
|
externalEventMutations = props.externalEventMutations;
|
|
8184
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined :
|
|
8016
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
8185
8017
|
}
|
|
8186
8018
|
}, {
|
|
8187
8019
|
key: "cacheValues",
|
|
@@ -8199,12 +8031,12 @@ function addEvents(WrappedComponent) {
|
|
|
8199
8031
|
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
8200
8032
|
var parentState = this.getEventState("parent", "parent");
|
|
8201
8033
|
|
|
8202
|
-
var baseParentProps =
|
|
8034
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentState, sharedParentState);
|
|
8203
8035
|
|
|
8204
8036
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
8205
8037
|
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(baseParentProps, parentPropsList) : {};
|
|
8206
8038
|
|
|
8207
|
-
var modifiedProps =
|
|
8039
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentProps, props);
|
|
8208
8040
|
|
|
8209
8041
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
8210
8042
|
}
|
|
@@ -8236,21 +8068,21 @@ function addEvents(WrappedComponent) {
|
|
|
8236
8068
|
if (this.hasEvents) {
|
|
8237
8069
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
8238
8070
|
|
|
8239
|
-
var componentProps =
|
|
8071
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
8240
8072
|
index: index,
|
|
8241
8073
|
key: id
|
|
8242
8074
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
8243
8075
|
id: id
|
|
8244
8076
|
});
|
|
8245
8077
|
|
|
8246
|
-
var events =
|
|
8078
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
8247
8079
|
|
|
8248
8080
|
return Object.assign({}, componentProps, {
|
|
8249
8081
|
events: events
|
|
8250
8082
|
});
|
|
8251
8083
|
}
|
|
8252
8084
|
|
|
8253
|
-
return
|
|
8085
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
8254
8086
|
index: index,
|
|
8255
8087
|
key: id
|
|
8256
8088
|
}, currentProps, baseProps, {
|
|
@@ -8264,11 +8096,11 @@ function addEvents(WrappedComponent) {
|
|
|
8264
8096
|
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
8265
8097
|
|
|
8266
8098
|
if (parentProps.events) {
|
|
8267
|
-
this.globalEvents =
|
|
8268
|
-
parentProps.events =
|
|
8099
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
8100
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
8269
8101
|
}
|
|
8270
8102
|
|
|
8271
|
-
return /*#__PURE__*/
|
|
8103
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(component, parentProps, children);
|
|
8272
8104
|
}
|
|
8273
8105
|
}, {
|
|
8274
8106
|
key: "animateComponent",
|
|
@@ -8277,10 +8109,10 @@ function addEvents(WrappedComponent) {
|
|
|
8277
8109
|
|
|
8278
8110
|
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
8279
8111
|
var Comp = this.constructor;
|
|
8280
|
-
return /*#__PURE__*/
|
|
8112
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
8281
8113
|
animate: props.animate,
|
|
8282
8114
|
animationWhitelist: animationWhitelist
|
|
8283
|
-
}, /*#__PURE__*/
|
|
8115
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Comp, props));
|
|
8284
8116
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
8285
8117
|
|
|
8286
8118
|
}, {
|
|
@@ -8300,13 +8132,13 @@ function addEvents(WrappedComponent) {
|
|
|
8300
8132
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
8301
8133
|
|
|
8302
8134
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
8303
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
8135
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps));
|
|
8304
8136
|
}
|
|
8305
8137
|
|
|
8306
8138
|
return newMemo;
|
|
8307
8139
|
}, []);
|
|
8308
8140
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
8309
|
-
var children = [/*#__PURE__*/
|
|
8141
|
+
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
8310
8142
|
return this.renderContainer(groupComponent, children);
|
|
8311
8143
|
}
|
|
8312
8144
|
}, {
|
|
@@ -8322,7 +8154,7 @@ function addEvents(WrappedComponent) {
|
|
|
8322
8154
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
8323
8155
|
|
|
8324
8156
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
8325
|
-
validDataComponents.push( /*#__PURE__*/
|
|
8157
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps));
|
|
8326
8158
|
}
|
|
8327
8159
|
|
|
8328
8160
|
return validDataComponents;
|
|
@@ -8331,7 +8163,7 @@ function addEvents(WrappedComponent) {
|
|
|
8331
8163
|
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
8332
8164
|
|
|
8333
8165
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
8334
|
-
return /*#__PURE__*/
|
|
8166
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps);
|
|
8335
8167
|
}
|
|
8336
8168
|
|
|
8337
8169
|
return undefined;
|
|
@@ -8362,6 +8194,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8362
8194
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
8363
8195
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
8364
8196
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
8197
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
8365
8198
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
8366
8199
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
8367
8200
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -8403,6 +8236,22 @@ function containsOnlyStrings(collection) {
|
|
|
8403
8236
|
return typeof value === "string";
|
|
8404
8237
|
});
|
|
8405
8238
|
}
|
|
8239
|
+
/**
|
|
8240
|
+
* Creates an array of array values not included in the other given arrays
|
|
8241
|
+
* @param a The array to inspect
|
|
8242
|
+
* @param b The values to exclude
|
|
8243
|
+
* @returns The new array of filtered values
|
|
8244
|
+
*/
|
|
8245
|
+
|
|
8246
|
+
function difference(a, b) {
|
|
8247
|
+
if (a && b) {
|
|
8248
|
+
return a.filter(function (value) {
|
|
8249
|
+
return !b.includes(value);
|
|
8250
|
+
});
|
|
8251
|
+
}
|
|
8252
|
+
|
|
8253
|
+
return [];
|
|
8254
|
+
}
|
|
8406
8255
|
function isArrayOfArrays(collection) {
|
|
8407
8256
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
8408
8257
|
}
|
|
@@ -10012,6 +9861,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10012
9861
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
10013
9862
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
10014
9863
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
9864
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
10015
9865
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
10016
9866
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
10017
9867
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -10062,6 +9912,18 @@ function getPolarRange(props, axis) {
|
|
|
10062
9912
|
return [props.innerRadius || 0, getRadius(props)];
|
|
10063
9913
|
} // Exported Functions
|
|
10064
9914
|
|
|
9915
|
+
/**
|
|
9916
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
9917
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
9918
|
+
*/
|
|
9919
|
+
|
|
9920
|
+
|
|
9921
|
+
function invert(original) {
|
|
9922
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
9923
|
+
acc[current[1]] = current[0];
|
|
9924
|
+
return acc;
|
|
9925
|
+
}, {});
|
|
9926
|
+
}
|
|
10065
9927
|
/**
|
|
10066
9928
|
* creates an object with some keys excluded
|
|
10067
9929
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -10070,7 +9932,6 @@ function getPolarRange(props, axis) {
|
|
|
10070
9932
|
* @returns {Object} new object with same properties as originalObject
|
|
10071
9933
|
*/
|
|
10072
9934
|
|
|
10073
|
-
|
|
10074
9935
|
function omit(originalObject) {
|
|
10075
9936
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
10076
9937
|
// code based on babel's _objectWithoutProperties
|