victory-bar 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 +7 -16
- package/README.md +1 -1
- package/dist/victory-bar.js +71 -210
- package/dist/victory-bar.min.js +1 -1
- package/es/bar-helper-methods.d.ts +6 -6
- package/es/bar.d.ts +19 -19
- package/es/geometry-helper-methods.d.ts +90 -90
- package/es/helper-methods.d.ts +7 -7
- package/es/index.d.ts +5 -5
- package/es/path-helper-methods.d.ts +7 -7
- package/es/victory-bar.d.ts +129 -129
- package/lib/bar-helper-methods.d.ts +6 -6
- package/lib/bar.d.ts +19 -19
- package/lib/geometry-helper-methods.d.ts +90 -90
- package/lib/helper-methods.d.ts +7 -7
- package/lib/index.d.ts +5 -5
- package/lib/path-helper-methods.d.ts +7 -7
- package/lib/victory-bar.d.ts +129 -129
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
# victory-bar
|
|
2
2
|
|
|
3
|
-
## 36.9.2
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Updated dependencies [3f2da66e3]
|
|
11
|
-
- Updated dependencies [c13308624]
|
|
12
|
-
- Updated dependencies [65d02419f]
|
|
13
|
-
- Updated dependencies [7efd582cc]
|
|
14
|
-
- Updated dependencies [9cdaf2c08]
|
|
15
|
-
- Updated dependencies [f6f7cc515]
|
|
16
|
-
- Updated dependencies [6e34169a5]
|
|
17
|
-
- victory-core@36.9.2-next.3
|
|
18
|
-
- victory-vendor@36.9.2-next.3
|
|
3
|
+
## 36.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Replace lodash isNil and isNan with native code ([#2800](https://github.com/FormidableLabs/victory/pull/2800))
|
|
8
|
+
|
|
9
|
+
* Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
|
|
19
10
|
|
|
20
11
|
## 36.9.1
|
|
21
12
|
|
package/README.md
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
`victory-bar@^30.0.0` exports `VictoryBar` and `Bar` components
|
|
4
4
|
|
|
5
|
-
To view documentation for `VictoryBar` please see https://
|
|
5
|
+
To view documentation for `VictoryBar` please see https://commerce.nearform.com/open-source/victory/docs/victory-bar
|
|
6
6
|
|
|
7
7
|
To suggest an addition or correction to documentation for `VictoryBar` please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs/victory-bar.md
|
package/dist/victory-bar.js
CHANGED
|
@@ -1627,83 +1627,6 @@ function baseAssignValue(object, key, value) {
|
|
|
1627
1627
|
module.exports = baseAssignValue;
|
|
1628
1628
|
|
|
1629
1629
|
|
|
1630
|
-
/***/ }),
|
|
1631
|
-
|
|
1632
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
1633
|
-
/*!*****************************************************************************************!*\
|
|
1634
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
1635
|
-
\*****************************************************************************************/
|
|
1636
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1637
|
-
|
|
1638
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
1639
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
1640
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
1641
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
1642
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
1643
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
1644
|
-
|
|
1645
|
-
/** Used as the size to enable large array optimizations. */
|
|
1646
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
1647
|
-
|
|
1648
|
-
/**
|
|
1649
|
-
* The base implementation of methods like `_.difference` without support
|
|
1650
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
1651
|
-
*
|
|
1652
|
-
* @private
|
|
1653
|
-
* @param {Array} array The array to inspect.
|
|
1654
|
-
* @param {Array} values The values to exclude.
|
|
1655
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
1656
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
1657
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
1658
|
-
*/
|
|
1659
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
1660
|
-
var index = -1,
|
|
1661
|
-
includes = arrayIncludes,
|
|
1662
|
-
isCommon = true,
|
|
1663
|
-
length = array.length,
|
|
1664
|
-
result = [],
|
|
1665
|
-
valuesLength = values.length;
|
|
1666
|
-
|
|
1667
|
-
if (!length) {
|
|
1668
|
-
return result;
|
|
1669
|
-
}
|
|
1670
|
-
if (iteratee) {
|
|
1671
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
1672
|
-
}
|
|
1673
|
-
if (comparator) {
|
|
1674
|
-
includes = arrayIncludesWith;
|
|
1675
|
-
isCommon = false;
|
|
1676
|
-
}
|
|
1677
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
1678
|
-
includes = cacheHas;
|
|
1679
|
-
isCommon = false;
|
|
1680
|
-
values = new SetCache(values);
|
|
1681
|
-
}
|
|
1682
|
-
outer:
|
|
1683
|
-
while (++index < length) {
|
|
1684
|
-
var value = array[index],
|
|
1685
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
1686
|
-
|
|
1687
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
1688
|
-
if (isCommon && computed === computed) {
|
|
1689
|
-
var valuesIndex = valuesLength;
|
|
1690
|
-
while (valuesIndex--) {
|
|
1691
|
-
if (values[valuesIndex] === computed) {
|
|
1692
|
-
continue outer;
|
|
1693
|
-
}
|
|
1694
|
-
}
|
|
1695
|
-
result.push(value);
|
|
1696
|
-
}
|
|
1697
|
-
else if (!includes(values, computed, comparator)) {
|
|
1698
|
-
result.push(value);
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
return result;
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
module.exports = baseDifference;
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
1630
|
/***/ }),
|
|
1708
1631
|
|
|
1709
1632
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -4192,49 +4115,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
4192
4115
|
module.exports = defaults;
|
|
4193
4116
|
|
|
4194
4117
|
|
|
4195
|
-
/***/ }),
|
|
4196
|
-
|
|
4197
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
4198
|
-
/*!************************************************************************************!*\
|
|
4199
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
4200
|
-
\************************************************************************************/
|
|
4201
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4202
|
-
|
|
4203
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
4204
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
4205
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
4206
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
4207
|
-
|
|
4208
|
-
/**
|
|
4209
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
4210
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
4211
|
-
* for equality comparisons. The order and references of result values are
|
|
4212
|
-
* determined by the first array.
|
|
4213
|
-
*
|
|
4214
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
4215
|
-
*
|
|
4216
|
-
* @static
|
|
4217
|
-
* @memberOf _
|
|
4218
|
-
* @since 0.1.0
|
|
4219
|
-
* @category Array
|
|
4220
|
-
* @param {Array} array The array to inspect.
|
|
4221
|
-
* @param {...Array} [values] The values to exclude.
|
|
4222
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
4223
|
-
* @see _.without, _.xor
|
|
4224
|
-
* @example
|
|
4225
|
-
*
|
|
4226
|
-
* _.difference([2, 1], [2, 3]);
|
|
4227
|
-
* // => [1]
|
|
4228
|
-
*/
|
|
4229
|
-
var difference = baseRest(function(array, values) {
|
|
4230
|
-
return isArrayLikeObject(array)
|
|
4231
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
4232
|
-
: [];
|
|
4233
|
-
});
|
|
4234
|
-
|
|
4235
|
-
module.exports = difference;
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
4118
|
/***/ }),
|
|
4239
4119
|
|
|
4240
4120
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -4539,49 +4419,6 @@ function isArrayLike(value) {
|
|
|
4539
4419
|
module.exports = isArrayLike;
|
|
4540
4420
|
|
|
4541
4421
|
|
|
4542
|
-
/***/ }),
|
|
4543
|
-
|
|
4544
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
4545
|
-
/*!*******************************************************************************************!*\
|
|
4546
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
4547
|
-
\*******************************************************************************************/
|
|
4548
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
4549
|
-
|
|
4550
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
4551
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
4552
|
-
|
|
4553
|
-
/**
|
|
4554
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
4555
|
-
* is an object.
|
|
4556
|
-
*
|
|
4557
|
-
* @static
|
|
4558
|
-
* @memberOf _
|
|
4559
|
-
* @since 4.0.0
|
|
4560
|
-
* @category Lang
|
|
4561
|
-
* @param {*} value The value to check.
|
|
4562
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
4563
|
-
* else `false`.
|
|
4564
|
-
* @example
|
|
4565
|
-
*
|
|
4566
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
4567
|
-
* // => true
|
|
4568
|
-
*
|
|
4569
|
-
* _.isArrayLikeObject(document.body.children);
|
|
4570
|
-
* // => true
|
|
4571
|
-
*
|
|
4572
|
-
* _.isArrayLikeObject('abc');
|
|
4573
|
-
* // => false
|
|
4574
|
-
*
|
|
4575
|
-
* _.isArrayLikeObject(_.noop);
|
|
4576
|
-
* // => false
|
|
4577
|
-
*/
|
|
4578
|
-
function isArrayLikeObject(value) {
|
|
4579
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
4580
|
-
}
|
|
4581
|
-
|
|
4582
|
-
module.exports = isArrayLikeObject;
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
4422
|
/***/ }),
|
|
4586
4423
|
|
|
4587
4424
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|
|
@@ -8384,18 +8221,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8384
8221
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
8385
8222
|
/* 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");
|
|
8386
8223
|
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
8387
|
-
/* harmony import */ var
|
|
8388
|
-
/* harmony import */ var
|
|
8389
|
-
/* harmony import */ var
|
|
8390
|
-
/* harmony import */ var
|
|
8391
|
-
/* harmony import */ var
|
|
8392
|
-
/* harmony import */ var
|
|
8393
|
-
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
8394
|
-
/* 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");
|
|
8395
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_5__);
|
|
8224
|
+
/* 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");
|
|
8225
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
8226
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
8227
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
8228
|
+
/* 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");
|
|
8229
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
8396
8230
|
/* 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");
|
|
8397
|
-
/* harmony import */ var
|
|
8398
|
-
|
|
8231
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
8232
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
8233
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
8399
8234
|
|
|
8400
8235
|
|
|
8401
8236
|
|
|
@@ -8436,13 +8271,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
8436
8271
|
|
|
8437
8272
|
|
|
8438
8273
|
|
|
8274
|
+
|
|
8439
8275
|
// DISCLAIMER:
|
|
8440
8276
|
// This file is not currently tested, and it is first on the list of files
|
|
8441
8277
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
8442
8278
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
8443
8279
|
|
|
8444
8280
|
var datumHasXandY = function (datum) {
|
|
8445
|
-
return !(0,
|
|
8281
|
+
return !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._x) && !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._y);
|
|
8446
8282
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
8447
8283
|
|
|
8448
8284
|
|
|
@@ -8470,11 +8306,11 @@ function addEvents(WrappedComponent) {
|
|
|
8470
8306
|
|
|
8471
8307
|
_this = _super.call(this, props);
|
|
8472
8308
|
_this.state = {};
|
|
8473
|
-
_this.getEventState =
|
|
8474
|
-
_this.getScopedEvents =
|
|
8309
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
8310
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
8475
8311
|
|
|
8476
8312
|
_this.getEvents = function (p, target, eventKey) {
|
|
8477
|
-
return
|
|
8313
|
+
return _events__WEBPACK_IMPORTED_MODULE_6__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
8478
8314
|
};
|
|
8479
8315
|
|
|
8480
8316
|
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
@@ -8494,7 +8330,7 @@ function addEvents(WrappedComponent) {
|
|
|
8494
8330
|
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
8495
8331
|
|
|
8496
8332
|
var animating = this.props.animating || this.props.animate;
|
|
8497
|
-
var newMutation = !
|
|
8333
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(externalMutations, this.externalMutations);
|
|
8498
8334
|
|
|
8499
8335
|
if (animating || newMutation) {
|
|
8500
8336
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
@@ -8505,12 +8341,12 @@ function addEvents(WrappedComponent) {
|
|
|
8505
8341
|
|
|
8506
8342
|
var calculatedState = this.getStateChanges(nextProps);
|
|
8507
8343
|
|
|
8508
|
-
if (!
|
|
8344
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.calculatedState, calculatedState)) {
|
|
8509
8345
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8510
8346
|
return true;
|
|
8511
8347
|
}
|
|
8512
8348
|
|
|
8513
|
-
if (!
|
|
8349
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
8514
8350
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
8515
8351
|
return true;
|
|
8516
8352
|
}
|
|
@@ -8536,15 +8372,11 @@ function addEvents(WrappedComponent) {
|
|
|
8536
8372
|
var calculatedState = this.getStateChanges(prevProps);
|
|
8537
8373
|
this.calculatedState = calculatedState;
|
|
8538
8374
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
8539
|
-
|
|
8540
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
8541
|
-
|
|
8375
|
+
var removedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(this.prevGlobalEventKeys, globalEventKeys);
|
|
8542
8376
|
removedGlobalEventKeys.forEach(function (key) {
|
|
8543
8377
|
return _this3.removeGlobalListener(key);
|
|
8544
8378
|
});
|
|
8545
|
-
|
|
8546
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
8547
|
-
|
|
8379
|
+
var addedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(globalEventKeys, this.prevGlobalEventKeys);
|
|
8548
8380
|
addedGlobalEventKeys.forEach(function (key) {
|
|
8549
8381
|
return _this3.addGlobalListener(key);
|
|
8550
8382
|
});
|
|
@@ -8566,16 +8398,16 @@ function addEvents(WrappedComponent) {
|
|
|
8566
8398
|
|
|
8567
8399
|
var boundListener = function (event) {
|
|
8568
8400
|
var listener = _this5.globalEvents[key];
|
|
8569
|
-
return listener && listener(
|
|
8401
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
8570
8402
|
};
|
|
8571
8403
|
|
|
8572
8404
|
this.boundGlobalEvents[key] = boundListener;
|
|
8573
|
-
window.addEventListener(
|
|
8405
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
8574
8406
|
}
|
|
8575
8407
|
}, {
|
|
8576
8408
|
key: "removeGlobalListener",
|
|
8577
8409
|
value: function removeGlobalListener(key) {
|
|
8578
|
-
window.removeEventListener(
|
|
8410
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
8579
8411
|
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
8580
8412
|
// state change should trigger a re-render
|
|
8581
8413
|
|
|
@@ -8589,7 +8421,7 @@ function addEvents(WrappedComponent) {
|
|
|
8589
8421
|
}
|
|
8590
8422
|
|
|
8591
8423
|
var getState = function (key, type) {
|
|
8592
|
-
var result =
|
|
8424
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
8593
8425
|
|
|
8594
8426
|
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(result) ? undefined : result;
|
|
8595
8427
|
};
|
|
@@ -8612,7 +8444,7 @@ function addEvents(WrappedComponent) {
|
|
|
8612
8444
|
value: function applyExternalMutations(props, externalMutations) {
|
|
8613
8445
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
8614
8446
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
8615
|
-
return (0,
|
|
8447
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
8616
8448
|
}, []);
|
|
8617
8449
|
var compiledCallbacks = callbacks.length ? function () {
|
|
8618
8450
|
callbacks.forEach(function (c) {
|
|
@@ -8627,8 +8459,8 @@ function addEvents(WrappedComponent) {
|
|
|
8627
8459
|
value: function getCalculatedValues(props) {
|
|
8628
8460
|
var sharedEvents = props.sharedEvents;
|
|
8629
8461
|
var components = WrappedComponent.expectedComponents;
|
|
8630
|
-
var componentEvents =
|
|
8631
|
-
var getSharedEventState = sharedEvents && (0,
|
|
8462
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
8463
|
+
var getSharedEventState = sharedEvents && (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
8632
8464
|
return undefined;
|
|
8633
8465
|
};
|
|
8634
8466
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
@@ -8651,7 +8483,7 @@ function addEvents(WrappedComponent) {
|
|
|
8651
8483
|
value: function getExternalMutations(props) {
|
|
8652
8484
|
var sharedEvents = props.sharedEvents,
|
|
8653
8485
|
externalEventMutations = props.externalEventMutations;
|
|
8654
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined :
|
|
8486
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
8655
8487
|
}
|
|
8656
8488
|
}, {
|
|
8657
8489
|
key: "cacheValues",
|
|
@@ -8669,12 +8501,12 @@ function addEvents(WrappedComponent) {
|
|
|
8669
8501
|
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
8670
8502
|
var parentState = this.getEventState("parent", "parent");
|
|
8671
8503
|
|
|
8672
|
-
var baseParentProps =
|
|
8504
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentState, sharedParentState);
|
|
8673
8505
|
|
|
8674
8506
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
8675
8507
|
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(baseParentProps, parentPropsList) : {};
|
|
8676
8508
|
|
|
8677
|
-
var modifiedProps =
|
|
8509
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentProps, props);
|
|
8678
8510
|
|
|
8679
8511
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
8680
8512
|
}
|
|
@@ -8706,21 +8538,21 @@ function addEvents(WrappedComponent) {
|
|
|
8706
8538
|
if (this.hasEvents) {
|
|
8707
8539
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
8708
8540
|
|
|
8709
|
-
var componentProps =
|
|
8541
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
8710
8542
|
index: index,
|
|
8711
8543
|
key: id
|
|
8712
8544
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
8713
8545
|
id: id
|
|
8714
8546
|
});
|
|
8715
8547
|
|
|
8716
|
-
var events =
|
|
8548
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
8717
8549
|
|
|
8718
8550
|
return Object.assign({}, componentProps, {
|
|
8719
8551
|
events: events
|
|
8720
8552
|
});
|
|
8721
8553
|
}
|
|
8722
8554
|
|
|
8723
|
-
return
|
|
8555
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
8724
8556
|
index: index,
|
|
8725
8557
|
key: id
|
|
8726
8558
|
}, currentProps, baseProps, {
|
|
@@ -8734,11 +8566,11 @@ function addEvents(WrappedComponent) {
|
|
|
8734
8566
|
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
8735
8567
|
|
|
8736
8568
|
if (parentProps.events) {
|
|
8737
|
-
this.globalEvents =
|
|
8738
|
-
parentProps.events =
|
|
8569
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
8570
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
8739
8571
|
}
|
|
8740
8572
|
|
|
8741
|
-
return /*#__PURE__*/
|
|
8573
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(component, parentProps, children);
|
|
8742
8574
|
}
|
|
8743
8575
|
}, {
|
|
8744
8576
|
key: "animateComponent",
|
|
@@ -8747,10 +8579,10 @@ function addEvents(WrappedComponent) {
|
|
|
8747
8579
|
|
|
8748
8580
|
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
8749
8581
|
var Comp = this.constructor;
|
|
8750
|
-
return /*#__PURE__*/
|
|
8582
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
8751
8583
|
animate: props.animate,
|
|
8752
8584
|
animationWhitelist: animationWhitelist
|
|
8753
|
-
}, /*#__PURE__*/
|
|
8585
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Comp, props));
|
|
8754
8586
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
8755
8587
|
|
|
8756
8588
|
}, {
|
|
@@ -8770,13 +8602,13 @@ function addEvents(WrappedComponent) {
|
|
|
8770
8602
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
8771
8603
|
|
|
8772
8604
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
8773
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
8605
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps));
|
|
8774
8606
|
}
|
|
8775
8607
|
|
|
8776
8608
|
return newMemo;
|
|
8777
8609
|
}, []);
|
|
8778
8610
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
8779
|
-
var children = [/*#__PURE__*/
|
|
8611
|
+
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
8780
8612
|
return this.renderContainer(groupComponent, children);
|
|
8781
8613
|
}
|
|
8782
8614
|
}, {
|
|
@@ -8792,7 +8624,7 @@ function addEvents(WrappedComponent) {
|
|
|
8792
8624
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
8793
8625
|
|
|
8794
8626
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
8795
|
-
validDataComponents.push( /*#__PURE__*/
|
|
8627
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps));
|
|
8796
8628
|
}
|
|
8797
8629
|
|
|
8798
8630
|
return validDataComponents;
|
|
@@ -8801,7 +8633,7 @@ function addEvents(WrappedComponent) {
|
|
|
8801
8633
|
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
8802
8634
|
|
|
8803
8635
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
8804
|
-
return /*#__PURE__*/
|
|
8636
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps);
|
|
8805
8637
|
}
|
|
8806
8638
|
|
|
8807
8639
|
return undefined;
|
|
@@ -8832,6 +8664,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8832
8664
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
8833
8665
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
8834
8666
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
8667
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
8835
8668
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
8836
8669
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
8837
8670
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -8873,6 +8706,22 @@ function containsOnlyStrings(collection) {
|
|
|
8873
8706
|
return typeof value === "string";
|
|
8874
8707
|
});
|
|
8875
8708
|
}
|
|
8709
|
+
/**
|
|
8710
|
+
* Creates an array of array values not included in the other given arrays
|
|
8711
|
+
* @param a The array to inspect
|
|
8712
|
+
* @param b The values to exclude
|
|
8713
|
+
* @returns The new array of filtered values
|
|
8714
|
+
*/
|
|
8715
|
+
|
|
8716
|
+
function difference(a, b) {
|
|
8717
|
+
if (a && b) {
|
|
8718
|
+
return a.filter(function (value) {
|
|
8719
|
+
return !b.includes(value);
|
|
8720
|
+
});
|
|
8721
|
+
}
|
|
8722
|
+
|
|
8723
|
+
return [];
|
|
8724
|
+
}
|
|
8876
8725
|
function isArrayOfArrays(collection) {
|
|
8877
8726
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
8878
8727
|
}
|
|
@@ -10360,6 +10209,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10360
10209
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
10361
10210
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
10362
10211
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
10212
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
10363
10213
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
10364
10214
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
10365
10215
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -10410,6 +10260,18 @@ function getPolarRange(props, axis) {
|
|
|
10410
10260
|
return [props.innerRadius || 0, getRadius(props)];
|
|
10411
10261
|
} // Exported Functions
|
|
10412
10262
|
|
|
10263
|
+
/**
|
|
10264
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
10265
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
10266
|
+
*/
|
|
10267
|
+
|
|
10268
|
+
|
|
10269
|
+
function invert(original) {
|
|
10270
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
10271
|
+
acc[current[1]] = current[0];
|
|
10272
|
+
return acc;
|
|
10273
|
+
}, {});
|
|
10274
|
+
}
|
|
10413
10275
|
/**
|
|
10414
10276
|
* creates an object with some keys excluded
|
|
10415
10277
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -10418,7 +10280,6 @@ function getPolarRange(props, axis) {
|
|
|
10418
10280
|
* @returns {Object} new object with same properties as originalObject
|
|
10419
10281
|
*/
|
|
10420
10282
|
|
|
10421
|
-
|
|
10422
10283
|
function omit(originalObject) {
|
|
10423
10284
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
10424
10285
|
// code based on babel's _objectWithoutProperties
|