victory-histogram 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 -14
- package/dist/victory-histogram.js +71 -210
- package/dist/victory-histogram.min.js +1 -1
- package/es/helper-methods.d.ts +5 -5
- package/es/index.d.ts +1 -1
- package/es/victory-histogram.d.ts +132 -132
- package/lib/helper-methods.d.ts +5 -5
- package/lib/index.d.ts +1 -1
- package/lib/victory-histogram.d.ts +132 -132
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
# victory-histogram
|
|
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-bar@36.9.2-next.3
|
|
19
|
-
- 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))
|
|
20
10
|
|
|
21
11
|
## 36.9.1
|
|
22
12
|
|
|
@@ -944,83 +944,6 @@ function baseAssignValue(object, key, value) {
|
|
|
944
944
|
module.exports = baseAssignValue;
|
|
945
945
|
|
|
946
946
|
|
|
947
|
-
/***/ }),
|
|
948
|
-
|
|
949
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
950
|
-
/*!*****************************************************************************************!*\
|
|
951
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
952
|
-
\*****************************************************************************************/
|
|
953
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
954
|
-
|
|
955
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
956
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
957
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
958
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
959
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
960
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
961
|
-
|
|
962
|
-
/** Used as the size to enable large array optimizations. */
|
|
963
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
964
|
-
|
|
965
|
-
/**
|
|
966
|
-
* The base implementation of methods like `_.difference` without support
|
|
967
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
968
|
-
*
|
|
969
|
-
* @private
|
|
970
|
-
* @param {Array} array The array to inspect.
|
|
971
|
-
* @param {Array} values The values to exclude.
|
|
972
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
973
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
974
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
975
|
-
*/
|
|
976
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
977
|
-
var index = -1,
|
|
978
|
-
includes = arrayIncludes,
|
|
979
|
-
isCommon = true,
|
|
980
|
-
length = array.length,
|
|
981
|
-
result = [],
|
|
982
|
-
valuesLength = values.length;
|
|
983
|
-
|
|
984
|
-
if (!length) {
|
|
985
|
-
return result;
|
|
986
|
-
}
|
|
987
|
-
if (iteratee) {
|
|
988
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
989
|
-
}
|
|
990
|
-
if (comparator) {
|
|
991
|
-
includes = arrayIncludesWith;
|
|
992
|
-
isCommon = false;
|
|
993
|
-
}
|
|
994
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
995
|
-
includes = cacheHas;
|
|
996
|
-
isCommon = false;
|
|
997
|
-
values = new SetCache(values);
|
|
998
|
-
}
|
|
999
|
-
outer:
|
|
1000
|
-
while (++index < length) {
|
|
1001
|
-
var value = array[index],
|
|
1002
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
1003
|
-
|
|
1004
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
1005
|
-
if (isCommon && computed === computed) {
|
|
1006
|
-
var valuesIndex = valuesLength;
|
|
1007
|
-
while (valuesIndex--) {
|
|
1008
|
-
if (values[valuesIndex] === computed) {
|
|
1009
|
-
continue outer;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1012
|
-
result.push(value);
|
|
1013
|
-
}
|
|
1014
|
-
else if (!includes(values, computed, comparator)) {
|
|
1015
|
-
result.push(value);
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
return result;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
module.exports = baseDifference;
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
947
|
/***/ }),
|
|
1025
948
|
|
|
1026
949
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -3509,49 +3432,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
3509
3432
|
module.exports = defaults;
|
|
3510
3433
|
|
|
3511
3434
|
|
|
3512
|
-
/***/ }),
|
|
3513
|
-
|
|
3514
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
3515
|
-
/*!************************************************************************************!*\
|
|
3516
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
3517
|
-
\************************************************************************************/
|
|
3518
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3519
|
-
|
|
3520
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
3521
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
3522
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
3523
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
3524
|
-
|
|
3525
|
-
/**
|
|
3526
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
3527
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
3528
|
-
* for equality comparisons. The order and references of result values are
|
|
3529
|
-
* determined by the first array.
|
|
3530
|
-
*
|
|
3531
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
3532
|
-
*
|
|
3533
|
-
* @static
|
|
3534
|
-
* @memberOf _
|
|
3535
|
-
* @since 0.1.0
|
|
3536
|
-
* @category Array
|
|
3537
|
-
* @param {Array} array The array to inspect.
|
|
3538
|
-
* @param {...Array} [values] The values to exclude.
|
|
3539
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
3540
|
-
* @see _.without, _.xor
|
|
3541
|
-
* @example
|
|
3542
|
-
*
|
|
3543
|
-
* _.difference([2, 1], [2, 3]);
|
|
3544
|
-
* // => [1]
|
|
3545
|
-
*/
|
|
3546
|
-
var difference = baseRest(function(array, values) {
|
|
3547
|
-
return isArrayLikeObject(array)
|
|
3548
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
3549
|
-
: [];
|
|
3550
|
-
});
|
|
3551
|
-
|
|
3552
|
-
module.exports = difference;
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
3435
|
/***/ }),
|
|
3556
3436
|
|
|
3557
3437
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -3856,49 +3736,6 @@ function isArrayLike(value) {
|
|
|
3856
3736
|
module.exports = isArrayLike;
|
|
3857
3737
|
|
|
3858
3738
|
|
|
3859
|
-
/***/ }),
|
|
3860
|
-
|
|
3861
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
3862
|
-
/*!*******************************************************************************************!*\
|
|
3863
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
3864
|
-
\*******************************************************************************************/
|
|
3865
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3866
|
-
|
|
3867
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
3868
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
3869
|
-
|
|
3870
|
-
/**
|
|
3871
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
3872
|
-
* is an object.
|
|
3873
|
-
*
|
|
3874
|
-
* @static
|
|
3875
|
-
* @memberOf _
|
|
3876
|
-
* @since 4.0.0
|
|
3877
|
-
* @category Lang
|
|
3878
|
-
* @param {*} value The value to check.
|
|
3879
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
3880
|
-
* else `false`.
|
|
3881
|
-
* @example
|
|
3882
|
-
*
|
|
3883
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
3884
|
-
* // => true
|
|
3885
|
-
*
|
|
3886
|
-
* _.isArrayLikeObject(document.body.children);
|
|
3887
|
-
* // => true
|
|
3888
|
-
*
|
|
3889
|
-
* _.isArrayLikeObject('abc');
|
|
3890
|
-
* // => false
|
|
3891
|
-
*
|
|
3892
|
-
* _.isArrayLikeObject(_.noop);
|
|
3893
|
-
* // => false
|
|
3894
|
-
*/
|
|
3895
|
-
function isArrayLikeObject(value) {
|
|
3896
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
3897
|
-
}
|
|
3898
|
-
|
|
3899
|
-
module.exports = isArrayLikeObject;
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
3739
|
/***/ }),
|
|
3903
3740
|
|
|
3904
3741
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|
|
@@ -8697,18 +8534,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8697
8534
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
8698
8535
|
/* 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");
|
|
8699
8536
|
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
8700
|
-
/* harmony import */ var
|
|
8701
|
-
/* harmony import */ var
|
|
8702
|
-
/* harmony import */ var
|
|
8703
|
-
/* harmony import */ var
|
|
8704
|
-
/* harmony import */ var
|
|
8705
|
-
/* harmony import */ var
|
|
8706
|
-
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
8707
|
-
/* 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");
|
|
8708
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_5__);
|
|
8537
|
+
/* 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");
|
|
8538
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
8539
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
8540
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
8541
|
+
/* 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");
|
|
8542
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
8709
8543
|
/* 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");
|
|
8710
|
-
/* harmony import */ var
|
|
8711
|
-
|
|
8544
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8545
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
8546
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8712
8547
|
|
|
8713
8548
|
|
|
8714
8549
|
|
|
@@ -8749,13 +8584,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
8749
8584
|
|
|
8750
8585
|
|
|
8751
8586
|
|
|
8587
|
+
|
|
8752
8588
|
// DISCLAIMER:
|
|
8753
8589
|
// This file is not currently tested, and it is first on the list of files
|
|
8754
8590
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
8755
8591
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
8756
8592
|
|
|
8757
8593
|
var datumHasXandY = function (datum) {
|
|
8758
|
-
return !(0,
|
|
8594
|
+
return !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._x) && !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._y);
|
|
8759
8595
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
8760
8596
|
|
|
8761
8597
|
|
|
@@ -8783,11 +8619,11 @@ function addEvents(WrappedComponent) {
|
|
|
8783
8619
|
|
|
8784
8620
|
_this = _super.call(this, props);
|
|
8785
8621
|
_this.state = {};
|
|
8786
|
-
_this.getEventState =
|
|
8787
|
-
_this.getScopedEvents =
|
|
8622
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
8623
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
8788
8624
|
|
|
8789
8625
|
_this.getEvents = function (p, target, eventKey) {
|
|
8790
|
-
return
|
|
8626
|
+
return _events__WEBPACK_IMPORTED_MODULE_6__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
8791
8627
|
};
|
|
8792
8628
|
|
|
8793
8629
|
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
@@ -8807,7 +8643,7 @@ function addEvents(WrappedComponent) {
|
|
|
8807
8643
|
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
8808
8644
|
|
|
8809
8645
|
var animating = this.props.animating || this.props.animate;
|
|
8810
|
-
var newMutation = !
|
|
8646
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(externalMutations, this.externalMutations);
|
|
8811
8647
|
|
|
8812
8648
|
if (animating || newMutation) {
|
|
8813
8649
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
@@ -8818,12 +8654,12 @@ function addEvents(WrappedComponent) {
|
|
|
8818
8654
|
|
|
8819
8655
|
var calculatedState = this.getStateChanges(nextProps);
|
|
8820
8656
|
|
|
8821
|
-
if (!
|
|
8657
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.calculatedState, calculatedState)) {
|
|
8822
8658
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8823
8659
|
return true;
|
|
8824
8660
|
}
|
|
8825
8661
|
|
|
8826
|
-
if (!
|
|
8662
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
8827
8663
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8828
8664
|
return true;
|
|
8829
8665
|
}
|
|
@@ -8849,15 +8685,11 @@ function addEvents(WrappedComponent) {
|
|
|
8849
8685
|
var calculatedState = this.getStateChanges(prevProps);
|
|
8850
8686
|
this.calculatedState = calculatedState;
|
|
8851
8687
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
8852
|
-
|
|
8853
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
8854
|
-
|
|
8688
|
+
var removedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(this.prevGlobalEventKeys, globalEventKeys);
|
|
8855
8689
|
removedGlobalEventKeys.forEach(function (key) {
|
|
8856
8690
|
return _this3.removeGlobalListener(key);
|
|
8857
8691
|
});
|
|
8858
|
-
|
|
8859
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
8860
|
-
|
|
8692
|
+
var addedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(globalEventKeys, this.prevGlobalEventKeys);
|
|
8861
8693
|
addedGlobalEventKeys.forEach(function (key) {
|
|
8862
8694
|
return _this3.addGlobalListener(key);
|
|
8863
8695
|
});
|
|
@@ -8879,16 +8711,16 @@ function addEvents(WrappedComponent) {
|
|
|
8879
8711
|
|
|
8880
8712
|
var boundListener = function (event) {
|
|
8881
8713
|
var listener = _this5.globalEvents[key];
|
|
8882
|
-
return listener && listener(
|
|
8714
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
8883
8715
|
};
|
|
8884
8716
|
|
|
8885
8717
|
this.boundGlobalEvents[key] = boundListener;
|
|
8886
|
-
window.addEventListener(
|
|
8718
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
8887
8719
|
}
|
|
8888
8720
|
}, {
|
|
8889
8721
|
key: "removeGlobalListener",
|
|
8890
8722
|
value: function removeGlobalListener(key) {
|
|
8891
|
-
window.removeEventListener(
|
|
8723
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
8892
8724
|
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
8893
8725
|
// state change should trigger a re-render
|
|
8894
8726
|
|
|
@@ -8902,7 +8734,7 @@ function addEvents(WrappedComponent) {
|
|
|
8902
8734
|
}
|
|
8903
8735
|
|
|
8904
8736
|
var getState = function (key, type) {
|
|
8905
|
-
var result =
|
|
8737
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
8906
8738
|
|
|
8907
8739
|
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(result) ? undefined : result;
|
|
8908
8740
|
};
|
|
@@ -8925,7 +8757,7 @@ function addEvents(WrappedComponent) {
|
|
|
8925
8757
|
value: function applyExternalMutations(props, externalMutations) {
|
|
8926
8758
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
8927
8759
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
8928
|
-
return (0,
|
|
8760
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
8929
8761
|
}, []);
|
|
8930
8762
|
var compiledCallbacks = callbacks.length ? function () {
|
|
8931
8763
|
callbacks.forEach(function (c) {
|
|
@@ -8940,8 +8772,8 @@ function addEvents(WrappedComponent) {
|
|
|
8940
8772
|
value: function getCalculatedValues(props) {
|
|
8941
8773
|
var sharedEvents = props.sharedEvents;
|
|
8942
8774
|
var components = WrappedComponent.expectedComponents;
|
|
8943
|
-
var componentEvents =
|
|
8944
|
-
var getSharedEventState = sharedEvents && (0,
|
|
8775
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
8776
|
+
var getSharedEventState = sharedEvents && (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
8945
8777
|
return undefined;
|
|
8946
8778
|
};
|
|
8947
8779
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
@@ -8964,7 +8796,7 @@ function addEvents(WrappedComponent) {
|
|
|
8964
8796
|
value: function getExternalMutations(props) {
|
|
8965
8797
|
var sharedEvents = props.sharedEvents,
|
|
8966
8798
|
externalEventMutations = props.externalEventMutations;
|
|
8967
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined :
|
|
8799
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
8968
8800
|
}
|
|
8969
8801
|
}, {
|
|
8970
8802
|
key: "cacheValues",
|
|
@@ -8982,12 +8814,12 @@ function addEvents(WrappedComponent) {
|
|
|
8982
8814
|
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
8983
8815
|
var parentState = this.getEventState("parent", "parent");
|
|
8984
8816
|
|
|
8985
|
-
var baseParentProps =
|
|
8817
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentState, sharedParentState);
|
|
8986
8818
|
|
|
8987
8819
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
8988
8820
|
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(baseParentProps, parentPropsList) : {};
|
|
8989
8821
|
|
|
8990
|
-
var modifiedProps =
|
|
8822
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentProps, props);
|
|
8991
8823
|
|
|
8992
8824
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
8993
8825
|
}
|
|
@@ -9019,21 +8851,21 @@ function addEvents(WrappedComponent) {
|
|
|
9019
8851
|
if (this.hasEvents) {
|
|
9020
8852
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
9021
8853
|
|
|
9022
|
-
var componentProps =
|
|
8854
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
9023
8855
|
index: index,
|
|
9024
8856
|
key: id
|
|
9025
8857
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
9026
8858
|
id: id
|
|
9027
8859
|
});
|
|
9028
8860
|
|
|
9029
|
-
var events =
|
|
8861
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
9030
8862
|
|
|
9031
8863
|
return Object.assign({}, componentProps, {
|
|
9032
8864
|
events: events
|
|
9033
8865
|
});
|
|
9034
8866
|
}
|
|
9035
8867
|
|
|
9036
|
-
return
|
|
8868
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
9037
8869
|
index: index,
|
|
9038
8870
|
key: id
|
|
9039
8871
|
}, currentProps, baseProps, {
|
|
@@ -9047,11 +8879,11 @@ function addEvents(WrappedComponent) {
|
|
|
9047
8879
|
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
9048
8880
|
|
|
9049
8881
|
if (parentProps.events) {
|
|
9050
|
-
this.globalEvents =
|
|
9051
|
-
parentProps.events =
|
|
8882
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
8883
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
9052
8884
|
}
|
|
9053
8885
|
|
|
9054
|
-
return /*#__PURE__*/
|
|
8886
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(component, parentProps, children);
|
|
9055
8887
|
}
|
|
9056
8888
|
}, {
|
|
9057
8889
|
key: "animateComponent",
|
|
@@ -9060,10 +8892,10 @@ function addEvents(WrappedComponent) {
|
|
|
9060
8892
|
|
|
9061
8893
|
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
9062
8894
|
var Comp = this.constructor;
|
|
9063
|
-
return /*#__PURE__*/
|
|
8895
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
9064
8896
|
animate: props.animate,
|
|
9065
8897
|
animationWhitelist: animationWhitelist
|
|
9066
|
-
}, /*#__PURE__*/
|
|
8898
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Comp, props));
|
|
9067
8899
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
9068
8900
|
|
|
9069
8901
|
}, {
|
|
@@ -9083,13 +8915,13 @@ function addEvents(WrappedComponent) {
|
|
|
9083
8915
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
9084
8916
|
|
|
9085
8917
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
9086
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
8918
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps));
|
|
9087
8919
|
}
|
|
9088
8920
|
|
|
9089
8921
|
return newMemo;
|
|
9090
8922
|
}, []);
|
|
9091
8923
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
9092
|
-
var children = [/*#__PURE__*/
|
|
8924
|
+
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
9093
8925
|
return this.renderContainer(groupComponent, children);
|
|
9094
8926
|
}
|
|
9095
8927
|
}, {
|
|
@@ -9105,7 +8937,7 @@ function addEvents(WrappedComponent) {
|
|
|
9105
8937
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
9106
8938
|
|
|
9107
8939
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
9108
|
-
validDataComponents.push( /*#__PURE__*/
|
|
8940
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps));
|
|
9109
8941
|
}
|
|
9110
8942
|
|
|
9111
8943
|
return validDataComponents;
|
|
@@ -9114,7 +8946,7 @@ function addEvents(WrappedComponent) {
|
|
|
9114
8946
|
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
9115
8947
|
|
|
9116
8948
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
9117
|
-
return /*#__PURE__*/
|
|
8949
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps);
|
|
9118
8950
|
}
|
|
9119
8951
|
|
|
9120
8952
|
return undefined;
|
|
@@ -9145,6 +8977,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9145
8977
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
9146
8978
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
9147
8979
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
8980
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
9148
8981
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
9149
8982
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
9150
8983
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -9186,6 +9019,22 @@ function containsOnlyStrings(collection) {
|
|
|
9186
9019
|
return typeof value === "string";
|
|
9187
9020
|
});
|
|
9188
9021
|
}
|
|
9022
|
+
/**
|
|
9023
|
+
* Creates an array of array values not included in the other given arrays
|
|
9024
|
+
* @param a The array to inspect
|
|
9025
|
+
* @param b The values to exclude
|
|
9026
|
+
* @returns The new array of filtered values
|
|
9027
|
+
*/
|
|
9028
|
+
|
|
9029
|
+
function difference(a, b) {
|
|
9030
|
+
if (a && b) {
|
|
9031
|
+
return a.filter(function (value) {
|
|
9032
|
+
return !b.includes(value);
|
|
9033
|
+
});
|
|
9034
|
+
}
|
|
9035
|
+
|
|
9036
|
+
return [];
|
|
9037
|
+
}
|
|
9189
9038
|
function isArrayOfArrays(collection) {
|
|
9190
9039
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
9191
9040
|
}
|
|
@@ -10673,6 +10522,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10673
10522
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
10674
10523
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
10675
10524
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
10525
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
10676
10526
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
10677
10527
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
10678
10528
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -10723,6 +10573,18 @@ function getPolarRange(props, axis) {
|
|
|
10723
10573
|
return [props.innerRadius || 0, getRadius(props)];
|
|
10724
10574
|
} // Exported Functions
|
|
10725
10575
|
|
|
10576
|
+
/**
|
|
10577
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
10578
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
10579
|
+
*/
|
|
10580
|
+
|
|
10581
|
+
|
|
10582
|
+
function invert(original) {
|
|
10583
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
10584
|
+
acc[current[1]] = current[0];
|
|
10585
|
+
return acc;
|
|
10586
|
+
}, {});
|
|
10587
|
+
}
|
|
10726
10588
|
/**
|
|
10727
10589
|
* creates an object with some keys excluded
|
|
10728
10590
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -10731,7 +10593,6 @@ function getPolarRange(props, axis) {
|
|
|
10731
10593
|
* @returns {Object} new object with same properties as originalObject
|
|
10732
10594
|
*/
|
|
10733
10595
|
|
|
10734
|
-
|
|
10735
10596
|
function omit(originalObject) {
|
|
10736
10597
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
10737
10598
|
// code based on babel's _objectWithoutProperties
|