victory-scatter 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 +8 -14
- package/README.md +2 -2
- package/dist/victory-scatter.js +71 -210
- package/dist/victory-scatter.min.js +1 -1
- package/es/helper-methods.d.ts +4 -4
- package/es/index.d.ts +1 -1
- package/es/victory-scatter.d.ts +96 -96
- package/lib/helper-methods.d.ts +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/victory-scatter.d.ts +96 -96
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
# victory-scatter
|
|
2
2
|
|
|
3
|
-
## 36.9.2
|
|
3
|
+
## 36.9.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- Updated dependencies [65d02419f]
|
|
15
|
-
- Updated dependencies [7efd582cc]
|
|
16
|
-
- Updated dependencies [9cdaf2c08]
|
|
17
|
-
- Updated dependencies [f6f7cc515]
|
|
18
|
-
- Updated dependencies [6e34169a5]
|
|
19
|
-
- victory-core@36.9.2-next.3
|
|
7
|
+
- Replace lodash array utils with native code ([#2810](https://github.com/FormidableLabs/victory/pull/2810))
|
|
8
|
+
|
|
9
|
+
* Replace lodash values and mapValues with native code ([#2808](https://github.com/FormidableLabs/victory/pull/2808))
|
|
10
|
+
|
|
11
|
+
- Replace lodash isNil and isNan with native code ([#2800](https://github.com/FormidableLabs/victory/pull/2800))
|
|
12
|
+
|
|
13
|
+
* Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
|
|
20
14
|
|
|
21
15
|
## 36.9.1
|
|
22
16
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`victory-scatter@^30.0.0` exports `VictoryScatter`
|
|
4
4
|
|
|
5
|
-
To view documentation for `VictoryScatter` please see https://
|
|
5
|
+
To view documentation for `VictoryScatter` please see https://commerce.nearform.com/open-source/victory/docs/victory-scatter
|
|
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-scatter.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-scatter.md
|
package/dist/victory-scatter.js
CHANGED
|
@@ -760,83 +760,6 @@ function baseAssignValue(object, key, value) {
|
|
|
760
760
|
module.exports = baseAssignValue;
|
|
761
761
|
|
|
762
762
|
|
|
763
|
-
/***/ }),
|
|
764
|
-
|
|
765
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
766
|
-
/*!*****************************************************************************************!*\
|
|
767
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
768
|
-
\*****************************************************************************************/
|
|
769
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
770
|
-
|
|
771
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
772
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
773
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
774
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
775
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
776
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
777
|
-
|
|
778
|
-
/** Used as the size to enable large array optimizations. */
|
|
779
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* The base implementation of methods like `_.difference` without support
|
|
783
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
784
|
-
*
|
|
785
|
-
* @private
|
|
786
|
-
* @param {Array} array The array to inspect.
|
|
787
|
-
* @param {Array} values The values to exclude.
|
|
788
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
789
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
790
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
791
|
-
*/
|
|
792
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
793
|
-
var index = -1,
|
|
794
|
-
includes = arrayIncludes,
|
|
795
|
-
isCommon = true,
|
|
796
|
-
length = array.length,
|
|
797
|
-
result = [],
|
|
798
|
-
valuesLength = values.length;
|
|
799
|
-
|
|
800
|
-
if (!length) {
|
|
801
|
-
return result;
|
|
802
|
-
}
|
|
803
|
-
if (iteratee) {
|
|
804
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
805
|
-
}
|
|
806
|
-
if (comparator) {
|
|
807
|
-
includes = arrayIncludesWith;
|
|
808
|
-
isCommon = false;
|
|
809
|
-
}
|
|
810
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
811
|
-
includes = cacheHas;
|
|
812
|
-
isCommon = false;
|
|
813
|
-
values = new SetCache(values);
|
|
814
|
-
}
|
|
815
|
-
outer:
|
|
816
|
-
while (++index < length) {
|
|
817
|
-
var value = array[index],
|
|
818
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
819
|
-
|
|
820
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
821
|
-
if (isCommon && computed === computed) {
|
|
822
|
-
var valuesIndex = valuesLength;
|
|
823
|
-
while (valuesIndex--) {
|
|
824
|
-
if (values[valuesIndex] === computed) {
|
|
825
|
-
continue outer;
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
result.push(value);
|
|
829
|
-
}
|
|
830
|
-
else if (!includes(values, computed, comparator)) {
|
|
831
|
-
result.push(value);
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
return result;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
module.exports = baseDifference;
|
|
838
|
-
|
|
839
|
-
|
|
840
763
|
/***/ }),
|
|
841
764
|
|
|
842
765
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -3325,49 +3248,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
3325
3248
|
module.exports = defaults;
|
|
3326
3249
|
|
|
3327
3250
|
|
|
3328
|
-
/***/ }),
|
|
3329
|
-
|
|
3330
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
3331
|
-
/*!************************************************************************************!*\
|
|
3332
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
3333
|
-
\************************************************************************************/
|
|
3334
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3335
|
-
|
|
3336
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
3337
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
3338
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
3339
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
3340
|
-
|
|
3341
|
-
/**
|
|
3342
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
3343
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
3344
|
-
* for equality comparisons. The order and references of result values are
|
|
3345
|
-
* determined by the first array.
|
|
3346
|
-
*
|
|
3347
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
3348
|
-
*
|
|
3349
|
-
* @static
|
|
3350
|
-
* @memberOf _
|
|
3351
|
-
* @since 0.1.0
|
|
3352
|
-
* @category Array
|
|
3353
|
-
* @param {Array} array The array to inspect.
|
|
3354
|
-
* @param {...Array} [values] The values to exclude.
|
|
3355
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
3356
|
-
* @see _.without, _.xor
|
|
3357
|
-
* @example
|
|
3358
|
-
*
|
|
3359
|
-
* _.difference([2, 1], [2, 3]);
|
|
3360
|
-
* // => [1]
|
|
3361
|
-
*/
|
|
3362
|
-
var difference = baseRest(function(array, values) {
|
|
3363
|
-
return isArrayLikeObject(array)
|
|
3364
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
3365
|
-
: [];
|
|
3366
|
-
});
|
|
3367
|
-
|
|
3368
|
-
module.exports = difference;
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
3251
|
/***/ }),
|
|
3372
3252
|
|
|
3373
3253
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -3672,49 +3552,6 @@ function isArrayLike(value) {
|
|
|
3672
3552
|
module.exports = isArrayLike;
|
|
3673
3553
|
|
|
3674
3554
|
|
|
3675
|
-
/***/ }),
|
|
3676
|
-
|
|
3677
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
3678
|
-
/*!*******************************************************************************************!*\
|
|
3679
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
3680
|
-
\*******************************************************************************************/
|
|
3681
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
3682
|
-
|
|
3683
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
3684
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
3685
|
-
|
|
3686
|
-
/**
|
|
3687
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
3688
|
-
* is an object.
|
|
3689
|
-
*
|
|
3690
|
-
* @static
|
|
3691
|
-
* @memberOf _
|
|
3692
|
-
* @since 4.0.0
|
|
3693
|
-
* @category Lang
|
|
3694
|
-
* @param {*} value The value to check.
|
|
3695
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
3696
|
-
* else `false`.
|
|
3697
|
-
* @example
|
|
3698
|
-
*
|
|
3699
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
3700
|
-
* // => true
|
|
3701
|
-
*
|
|
3702
|
-
* _.isArrayLikeObject(document.body.children);
|
|
3703
|
-
* // => true
|
|
3704
|
-
*
|
|
3705
|
-
* _.isArrayLikeObject('abc');
|
|
3706
|
-
* // => false
|
|
3707
|
-
*
|
|
3708
|
-
* _.isArrayLikeObject(_.noop);
|
|
3709
|
-
* // => false
|
|
3710
|
-
*/
|
|
3711
|
-
function isArrayLikeObject(value) {
|
|
3712
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
3713
|
-
}
|
|
3714
|
-
|
|
3715
|
-
module.exports = isArrayLikeObject;
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
3555
|
/***/ }),
|
|
3719
3556
|
|
|
3720
3557
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|
|
@@ -7614,18 +7451,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7614
7451
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
7615
7452
|
/* 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");
|
|
7616
7453
|
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
7617
|
-
/* harmony import */ var
|
|
7618
|
-
/* harmony import */ var
|
|
7619
|
-
/* harmony import */ var
|
|
7620
|
-
/* harmony import */ var
|
|
7621
|
-
/* harmony import */ var
|
|
7622
|
-
/* harmony import */ var
|
|
7623
|
-
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
7624
|
-
/* 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");
|
|
7625
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_5__);
|
|
7454
|
+
/* 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");
|
|
7455
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
7456
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
7457
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
7458
|
+
/* 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");
|
|
7459
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
7626
7460
|
/* 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");
|
|
7627
|
-
/* harmony import */ var
|
|
7628
|
-
|
|
7461
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
7462
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
7463
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
7629
7464
|
|
|
7630
7465
|
|
|
7631
7466
|
|
|
@@ -7666,13 +7501,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
7666
7501
|
|
|
7667
7502
|
|
|
7668
7503
|
|
|
7504
|
+
|
|
7669
7505
|
// DISCLAIMER:
|
|
7670
7506
|
// This file is not currently tested, and it is first on the list of files
|
|
7671
7507
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
7672
7508
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
7673
7509
|
|
|
7674
7510
|
var datumHasXandY = function (datum) {
|
|
7675
|
-
return !(0,
|
|
7511
|
+
return !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._x) && !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._y);
|
|
7676
7512
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
7677
7513
|
|
|
7678
7514
|
|
|
@@ -7700,11 +7536,11 @@ function addEvents(WrappedComponent) {
|
|
|
7700
7536
|
|
|
7701
7537
|
_this = _super.call(this, props);
|
|
7702
7538
|
_this.state = {};
|
|
7703
|
-
_this.getEventState =
|
|
7704
|
-
_this.getScopedEvents =
|
|
7539
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
7540
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
7705
7541
|
|
|
7706
7542
|
_this.getEvents = function (p, target, eventKey) {
|
|
7707
|
-
return
|
|
7543
|
+
return _events__WEBPACK_IMPORTED_MODULE_6__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
7708
7544
|
};
|
|
7709
7545
|
|
|
7710
7546
|
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
@@ -7724,7 +7560,7 @@ function addEvents(WrappedComponent) {
|
|
|
7724
7560
|
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
7725
7561
|
|
|
7726
7562
|
var animating = this.props.animating || this.props.animate;
|
|
7727
|
-
var newMutation = !
|
|
7563
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(externalMutations, this.externalMutations);
|
|
7728
7564
|
|
|
7729
7565
|
if (animating || newMutation) {
|
|
7730
7566
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
@@ -7735,12 +7571,12 @@ function addEvents(WrappedComponent) {
|
|
|
7735
7571
|
|
|
7736
7572
|
var calculatedState = this.getStateChanges(nextProps);
|
|
7737
7573
|
|
|
7738
|
-
if (!
|
|
7574
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.calculatedState, calculatedState)) {
|
|
7739
7575
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
7740
7576
|
return true;
|
|
7741
7577
|
}
|
|
7742
7578
|
|
|
7743
|
-
if (!
|
|
7579
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
7744
7580
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
7745
7581
|
return true;
|
|
7746
7582
|
}
|
|
@@ -7766,15 +7602,11 @@ function addEvents(WrappedComponent) {
|
|
|
7766
7602
|
var calculatedState = this.getStateChanges(prevProps);
|
|
7767
7603
|
this.calculatedState = calculatedState;
|
|
7768
7604
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
7769
|
-
|
|
7770
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
7771
|
-
|
|
7605
|
+
var removedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(this.prevGlobalEventKeys, globalEventKeys);
|
|
7772
7606
|
removedGlobalEventKeys.forEach(function (key) {
|
|
7773
7607
|
return _this3.removeGlobalListener(key);
|
|
7774
7608
|
});
|
|
7775
|
-
|
|
7776
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
7777
|
-
|
|
7609
|
+
var addedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(globalEventKeys, this.prevGlobalEventKeys);
|
|
7778
7610
|
addedGlobalEventKeys.forEach(function (key) {
|
|
7779
7611
|
return _this3.addGlobalListener(key);
|
|
7780
7612
|
});
|
|
@@ -7796,16 +7628,16 @@ function addEvents(WrappedComponent) {
|
|
|
7796
7628
|
|
|
7797
7629
|
var boundListener = function (event) {
|
|
7798
7630
|
var listener = _this5.globalEvents[key];
|
|
7799
|
-
return listener && listener(
|
|
7631
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
7800
7632
|
};
|
|
7801
7633
|
|
|
7802
7634
|
this.boundGlobalEvents[key] = boundListener;
|
|
7803
|
-
window.addEventListener(
|
|
7635
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
7804
7636
|
}
|
|
7805
7637
|
}, {
|
|
7806
7638
|
key: "removeGlobalListener",
|
|
7807
7639
|
value: function removeGlobalListener(key) {
|
|
7808
|
-
window.removeEventListener(
|
|
7640
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
7809
7641
|
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
7810
7642
|
// state change should trigger a re-render
|
|
7811
7643
|
|
|
@@ -7819,7 +7651,7 @@ function addEvents(WrappedComponent) {
|
|
|
7819
7651
|
}
|
|
7820
7652
|
|
|
7821
7653
|
var getState = function (key, type) {
|
|
7822
|
-
var result =
|
|
7654
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
7823
7655
|
|
|
7824
7656
|
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(result) ? undefined : result;
|
|
7825
7657
|
};
|
|
@@ -7842,7 +7674,7 @@ function addEvents(WrappedComponent) {
|
|
|
7842
7674
|
value: function applyExternalMutations(props, externalMutations) {
|
|
7843
7675
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
7844
7676
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
7845
|
-
return (0,
|
|
7677
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
7846
7678
|
}, []);
|
|
7847
7679
|
var compiledCallbacks = callbacks.length ? function () {
|
|
7848
7680
|
callbacks.forEach(function (c) {
|
|
@@ -7857,8 +7689,8 @@ function addEvents(WrappedComponent) {
|
|
|
7857
7689
|
value: function getCalculatedValues(props) {
|
|
7858
7690
|
var sharedEvents = props.sharedEvents;
|
|
7859
7691
|
var components = WrappedComponent.expectedComponents;
|
|
7860
|
-
var componentEvents =
|
|
7861
|
-
var getSharedEventState = sharedEvents && (0,
|
|
7692
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
7693
|
+
var getSharedEventState = sharedEvents && (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
7862
7694
|
return undefined;
|
|
7863
7695
|
};
|
|
7864
7696
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
@@ -7881,7 +7713,7 @@ function addEvents(WrappedComponent) {
|
|
|
7881
7713
|
value: function getExternalMutations(props) {
|
|
7882
7714
|
var sharedEvents = props.sharedEvents,
|
|
7883
7715
|
externalEventMutations = props.externalEventMutations;
|
|
7884
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined :
|
|
7716
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
7885
7717
|
}
|
|
7886
7718
|
}, {
|
|
7887
7719
|
key: "cacheValues",
|
|
@@ -7899,12 +7731,12 @@ function addEvents(WrappedComponent) {
|
|
|
7899
7731
|
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
7900
7732
|
var parentState = this.getEventState("parent", "parent");
|
|
7901
7733
|
|
|
7902
|
-
var baseParentProps =
|
|
7734
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentState, sharedParentState);
|
|
7903
7735
|
|
|
7904
7736
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
7905
7737
|
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(baseParentProps, parentPropsList) : {};
|
|
7906
7738
|
|
|
7907
|
-
var modifiedProps =
|
|
7739
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentProps, props);
|
|
7908
7740
|
|
|
7909
7741
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
7910
7742
|
}
|
|
@@ -7936,21 +7768,21 @@ function addEvents(WrappedComponent) {
|
|
|
7936
7768
|
if (this.hasEvents) {
|
|
7937
7769
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
7938
7770
|
|
|
7939
|
-
var componentProps =
|
|
7771
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
7940
7772
|
index: index,
|
|
7941
7773
|
key: id
|
|
7942
7774
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
7943
7775
|
id: id
|
|
7944
7776
|
});
|
|
7945
7777
|
|
|
7946
|
-
var events =
|
|
7778
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
7947
7779
|
|
|
7948
7780
|
return Object.assign({}, componentProps, {
|
|
7949
7781
|
events: events
|
|
7950
7782
|
});
|
|
7951
7783
|
}
|
|
7952
7784
|
|
|
7953
|
-
return
|
|
7785
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
7954
7786
|
index: index,
|
|
7955
7787
|
key: id
|
|
7956
7788
|
}, currentProps, baseProps, {
|
|
@@ -7964,11 +7796,11 @@ function addEvents(WrappedComponent) {
|
|
|
7964
7796
|
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
7965
7797
|
|
|
7966
7798
|
if (parentProps.events) {
|
|
7967
|
-
this.globalEvents =
|
|
7968
|
-
parentProps.events =
|
|
7799
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
7800
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
7969
7801
|
}
|
|
7970
7802
|
|
|
7971
|
-
return /*#__PURE__*/
|
|
7803
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(component, parentProps, children);
|
|
7972
7804
|
}
|
|
7973
7805
|
}, {
|
|
7974
7806
|
key: "animateComponent",
|
|
@@ -7977,10 +7809,10 @@ function addEvents(WrappedComponent) {
|
|
|
7977
7809
|
|
|
7978
7810
|
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
7979
7811
|
var Comp = this.constructor;
|
|
7980
|
-
return /*#__PURE__*/
|
|
7812
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
7981
7813
|
animate: props.animate,
|
|
7982
7814
|
animationWhitelist: animationWhitelist
|
|
7983
|
-
}, /*#__PURE__*/
|
|
7815
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Comp, props));
|
|
7984
7816
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
7985
7817
|
|
|
7986
7818
|
}, {
|
|
@@ -8000,13 +7832,13 @@ function addEvents(WrappedComponent) {
|
|
|
8000
7832
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
8001
7833
|
|
|
8002
7834
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
8003
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
7835
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps));
|
|
8004
7836
|
}
|
|
8005
7837
|
|
|
8006
7838
|
return newMemo;
|
|
8007
7839
|
}, []);
|
|
8008
7840
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
8009
|
-
var children = [/*#__PURE__*/
|
|
7841
|
+
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
8010
7842
|
return this.renderContainer(groupComponent, children);
|
|
8011
7843
|
}
|
|
8012
7844
|
}, {
|
|
@@ -8022,7 +7854,7 @@ function addEvents(WrappedComponent) {
|
|
|
8022
7854
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
8023
7855
|
|
|
8024
7856
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
8025
|
-
validDataComponents.push( /*#__PURE__*/
|
|
7857
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps));
|
|
8026
7858
|
}
|
|
8027
7859
|
|
|
8028
7860
|
return validDataComponents;
|
|
@@ -8031,7 +7863,7 @@ function addEvents(WrappedComponent) {
|
|
|
8031
7863
|
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
8032
7864
|
|
|
8033
7865
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
8034
|
-
return /*#__PURE__*/
|
|
7866
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps);
|
|
8035
7867
|
}
|
|
8036
7868
|
|
|
8037
7869
|
return undefined;
|
|
@@ -8062,6 +7894,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8062
7894
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
8063
7895
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
8064
7896
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
7897
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
8065
7898
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
8066
7899
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
8067
7900
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -8103,6 +7936,22 @@ function containsOnlyStrings(collection) {
|
|
|
8103
7936
|
return typeof value === "string";
|
|
8104
7937
|
});
|
|
8105
7938
|
}
|
|
7939
|
+
/**
|
|
7940
|
+
* Creates an array of array values not included in the other given arrays
|
|
7941
|
+
* @param a The array to inspect
|
|
7942
|
+
* @param b The values to exclude
|
|
7943
|
+
* @returns The new array of filtered values
|
|
7944
|
+
*/
|
|
7945
|
+
|
|
7946
|
+
function difference(a, b) {
|
|
7947
|
+
if (a && b) {
|
|
7948
|
+
return a.filter(function (value) {
|
|
7949
|
+
return !b.includes(value);
|
|
7950
|
+
});
|
|
7951
|
+
}
|
|
7952
|
+
|
|
7953
|
+
return [];
|
|
7954
|
+
}
|
|
8106
7955
|
function isArrayOfArrays(collection) {
|
|
8107
7956
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
8108
7957
|
}
|
|
@@ -9712,6 +9561,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9712
9561
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
9713
9562
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
9714
9563
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
9564
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
9715
9565
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
9716
9566
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
9717
9567
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -9762,6 +9612,18 @@ function getPolarRange(props, axis) {
|
|
|
9762
9612
|
return [props.innerRadius || 0, getRadius(props)];
|
|
9763
9613
|
} // Exported Functions
|
|
9764
9614
|
|
|
9615
|
+
/**
|
|
9616
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
9617
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
9618
|
+
*/
|
|
9619
|
+
|
|
9620
|
+
|
|
9621
|
+
function invert(original) {
|
|
9622
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
9623
|
+
acc[current[1]] = current[0];
|
|
9624
|
+
return acc;
|
|
9625
|
+
}, {});
|
|
9626
|
+
}
|
|
9765
9627
|
/**
|
|
9766
9628
|
* creates an object with some keys excluded
|
|
9767
9629
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -9770,7 +9632,6 @@ function getPolarRange(props, axis) {
|
|
|
9770
9632
|
* @returns {Object} new object with same properties as originalObject
|
|
9771
9633
|
*/
|
|
9772
9634
|
|
|
9773
|
-
|
|
9774
9635
|
function omit(originalObject) {
|
|
9775
9636
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
9776
9637
|
// code based on babel's _objectWithoutProperties
|