victory-core 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 +22 -10
- package/README.md +1 -1
- package/dist/victory-core.js +124 -493
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +17 -17
- package/es/types/callbacks.d.ts +36 -36
- package/es/types/prop-types.d.ts +129 -129
- package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/es/victory-animation/util.d.ts +66 -66
- package/es/victory-animation/victory-animation.d.ts +34 -34
- package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/es/victory-container/victory-container.d.ts +68 -68
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-portal/portal-context.d.ts +11 -11
- package/es/victory-portal/portal.d.ts +20 -20
- package/es/victory-portal/victory-portal.d.ts +26 -26
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/circle.d.ts +3 -3
- package/es/victory-primitives/clip-path.d.ts +7 -7
- package/es/victory-primitives/index.d.ts +14 -14
- package/es/victory-primitives/line-segment.d.ts +11 -11
- package/es/victory-primitives/line.d.ts +3 -3
- package/es/victory-primitives/path.d.ts +3 -3
- package/es/victory-primitives/point.d.ts +13 -13
- package/es/victory-primitives/rect.d.ts +3 -3
- package/es/victory-primitives/text.d.ts +8 -8
- package/es/victory-primitives/tspan.d.ts +3 -3
- package/es/victory-primitives/types.d.ts +7 -7
- package/es/victory-primitives/whisker.d.ts +15 -15
- package/es/victory-theme/grayscale.d.ts +2 -2
- package/es/victory-theme/material.d.ts +2 -2
- package/es/victory-theme/types.d.ts +238 -238
- package/es/victory-theme/victory-theme.d.ts +5 -5
- package/es/victory-transition/victory-transition.d.ts +53 -53
- package/es/victory-util/add-events.d.ts +126 -126
- package/es/victory-util/add-events.js +4 -8
- package/es/victory-util/axis.d.ts +50 -50
- package/es/victory-util/axis.js +13 -6
- package/es/victory-util/collection.d.ts +15 -8
- package/es/victory-util/collection.js +16 -0
- package/es/victory-util/common-props.d.ts +79 -79
- package/es/victory-util/data.d.ts +74 -74
- package/es/victory-util/default-transitions.d.ts +4 -4
- package/es/victory-util/domain.d.ts +90 -90
- package/es/victory-util/events.d.ts +64 -64
- package/es/victory-util/helpers.d.ts +96 -91
- package/es/victory-util/helpers.js +12 -1
- package/es/victory-util/hooks/index.d.ts +2 -2
- package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/es/victory-util/immutable.d.ts +11 -11
- package/es/victory-util/index.d.ts +26 -26
- package/es/victory-util/label-helpers.d.ts +26 -26
- package/es/victory-util/line-helpers.d.ts +4 -4
- package/es/victory-util/log.d.ts +1 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -9
- package/es/victory-util/scale.d.ts +9 -9
- package/es/victory-util/selection.d.ts +28 -28
- package/es/victory-util/style.d.ts +18 -18
- package/es/victory-util/textsize.d.ts +35 -35
- package/es/victory-util/timer-context.d.ts +11 -11
- package/es/victory-util/timer.d.ts +16 -16
- package/es/victory-util/transitions.d.ts +48 -48
- package/es/victory-util/type-helpers.d.ts +9 -9
- package/es/victory-util/user-props.d.ts +26 -26
- package/es/victory-util/wrapper.d.ts +33 -37
- package/es/victory-util/wrapper.js +2 -2
- package/lib/index.d.ts +17 -17
- package/lib/types/callbacks.d.ts +36 -36
- package/lib/types/prop-types.d.ts +129 -129
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/lib/victory-animation/util.d.ts +66 -66
- package/lib/victory-animation/victory-animation.d.ts +34 -34
- package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/lib/victory-container/victory-container.d.ts +68 -68
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-portal/portal-context.d.ts +11 -11
- package/lib/victory-portal/portal.d.ts +20 -20
- package/lib/victory-portal/victory-portal.d.ts +26 -26
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/circle.d.ts +3 -3
- package/lib/victory-primitives/clip-path.d.ts +7 -7
- package/lib/victory-primitives/index.d.ts +14 -14
- package/lib/victory-primitives/line-segment.d.ts +11 -11
- package/lib/victory-primitives/line.d.ts +3 -3
- package/lib/victory-primitives/path.d.ts +3 -3
- package/lib/victory-primitives/point.d.ts +13 -13
- package/lib/victory-primitives/rect.d.ts +3 -3
- package/lib/victory-primitives/text.d.ts +8 -8
- package/lib/victory-primitives/tspan.d.ts +3 -3
- package/lib/victory-primitives/types.d.ts +7 -7
- package/lib/victory-primitives/whisker.d.ts +15 -15
- package/lib/victory-theme/grayscale.d.ts +2 -2
- package/lib/victory-theme/material.d.ts +2 -2
- package/lib/victory-theme/types.d.ts +238 -238
- package/lib/victory-theme/victory-theme.d.ts +5 -5
- package/lib/victory-transition/victory-transition.d.ts +53 -53
- package/lib/victory-util/add-events.d.ts +126 -126
- package/lib/victory-util/add-events.js +6 -6
- package/lib/victory-util/axis.d.ts +50 -50
- package/lib/victory-util/axis.js +13 -7
- package/lib/victory-util/collection.d.ts +15 -8
- package/lib/victory-util/collection.js +18 -0
- package/lib/victory-util/common-props.d.ts +79 -79
- package/lib/victory-util/data.d.ts +74 -74
- package/lib/victory-util/default-transitions.d.ts +4 -4
- package/lib/victory-util/domain.d.ts +90 -90
- package/lib/victory-util/events.d.ts +64 -64
- package/lib/victory-util/helpers.d.ts +96 -91
- package/lib/victory-util/helpers.js +13 -0
- package/lib/victory-util/hooks/index.d.ts +2 -2
- package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/lib/victory-util/immutable.d.ts +11 -11
- package/lib/victory-util/index.d.ts +26 -26
- package/lib/victory-util/label-helpers.d.ts +26 -26
- package/lib/victory-util/line-helpers.d.ts +4 -4
- package/lib/victory-util/log.d.ts +1 -1
- package/lib/victory-util/point-path-helpers.d.ts +9 -9
- package/lib/victory-util/scale.d.ts +9 -9
- package/lib/victory-util/selection.d.ts +28 -28
- package/lib/victory-util/style.d.ts +18 -18
- package/lib/victory-util/textsize.d.ts +35 -35
- package/lib/victory-util/timer-context.d.ts +11 -11
- package/lib/victory-util/timer.d.ts +16 -16
- package/lib/victory-util/transitions.d.ts +48 -48
- package/lib/victory-util/type-helpers.d.ts +9 -9
- package/lib/victory-util/user-props.d.ts +26 -26
- package/lib/victory-util/wrapper.d.ts +33 -37
- package/lib/victory-util/wrapper.js +2 -2
- package/package.json +6 -3
- package/src/types/prop-types.ts +0 -7
- package/src/victory-container/victory-container.tsx +195 -171
- package/src/victory-portal/portal-context.ts +4 -5
- package/src/victory-portal/portal.tsx +42 -5
- package/src/victory-portal/victory-portal.tsx +71 -34
- package/src/victory-util/add-events.tsx +6 -4
- package/src/victory-util/axis.tsx +12 -3
- package/src/victory-util/collection.tsx +13 -0
- package/src/victory-util/helpers.ts +11 -0
- package/src/victory-util/index.ts +0 -1
- package/src/victory-util/wrapper.tsx +1 -0
- package/src/victory-util/merge-refs.ts +0 -13
package/dist/victory-core.js
CHANGED
|
@@ -3613,18 +3613,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3613
3613
|
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__);
|
|
3614
3614
|
/* 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");
|
|
3615
3615
|
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1__);
|
|
3616
|
-
/* harmony import */ var
|
|
3617
|
-
/* harmony import */ var
|
|
3618
|
-
/* harmony import */ var
|
|
3619
|
-
/* harmony import */ var
|
|
3620
|
-
/* harmony import */ var
|
|
3621
|
-
/* harmony import */ var
|
|
3622
|
-
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./events */ "./victory-util/events.ts");
|
|
3623
|
-
/* 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");
|
|
3624
|
-
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_5__);
|
|
3616
|
+
/* 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");
|
|
3617
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_2__);
|
|
3618
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
|
|
3619
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
|
|
3620
|
+
/* 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");
|
|
3621
|
+
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_4__);
|
|
3625
3622
|
/* harmony import */ var _victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../victory-transition/victory-transition */ "./victory-transition/victory-transition.tsx");
|
|
3626
|
-
/* harmony import */ var
|
|
3627
|
-
|
|
3623
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
3624
|
+
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./events */ "./victory-util/events.ts");
|
|
3625
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
3628
3626
|
|
|
3629
3627
|
|
|
3630
3628
|
|
|
@@ -3665,13 +3663,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
3665
3663
|
|
|
3666
3664
|
|
|
3667
3665
|
|
|
3666
|
+
|
|
3668
3667
|
// DISCLAIMER:
|
|
3669
3668
|
// This file is not currently tested, and it is first on the list of files
|
|
3670
3669
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
3671
3670
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
3672
3671
|
|
|
3673
3672
|
var datumHasXandY = function (datum) {
|
|
3674
|
-
return !(0,
|
|
3673
|
+
return !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._x) && !(0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isNil)(datum._y);
|
|
3675
3674
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
3676
3675
|
|
|
3677
3676
|
|
|
@@ -3699,11 +3698,11 @@ function addEvents(WrappedComponent) {
|
|
|
3699
3698
|
|
|
3700
3699
|
_this = _super.call(this, props);
|
|
3701
3700
|
_this.state = {};
|
|
3702
|
-
_this.getEventState =
|
|
3703
|
-
_this.getScopedEvents =
|
|
3701
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_6__.getEventState.bind(_assertThisInitialized(_this));
|
|
3702
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
3704
3703
|
|
|
3705
3704
|
_this.getEvents = function (p, target, eventKey) {
|
|
3706
|
-
return
|
|
3705
|
+
return _events__WEBPACK_IMPORTED_MODULE_6__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
3707
3706
|
};
|
|
3708
3707
|
|
|
3709
3708
|
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
@@ -3723,7 +3722,7 @@ function addEvents(WrappedComponent) {
|
|
|
3723
3722
|
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
3724
3723
|
|
|
3725
3724
|
var animating = this.props.animating || this.props.animate;
|
|
3726
|
-
var newMutation = !
|
|
3725
|
+
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(externalMutations, this.externalMutations);
|
|
3727
3726
|
|
|
3728
3727
|
if (animating || newMutation) {
|
|
3729
3728
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
@@ -3734,12 +3733,12 @@ function addEvents(WrappedComponent) {
|
|
|
3734
3733
|
|
|
3735
3734
|
var calculatedState = this.getStateChanges(nextProps);
|
|
3736
3735
|
|
|
3737
|
-
if (!
|
|
3736
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.calculatedState, calculatedState)) {
|
|
3738
3737
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
3739
3738
|
return true;
|
|
3740
3739
|
}
|
|
3741
3740
|
|
|
3742
|
-
if (!
|
|
3741
|
+
if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_4___default()(this.props, nextProps)) {
|
|
3743
3742
|
this.cacheValues(this.getCalculatedValues(nextProps));
|
|
3744
3743
|
return true;
|
|
3745
3744
|
}
|
|
@@ -3765,15 +3764,11 @@ function addEvents(WrappedComponent) {
|
|
|
3765
3764
|
var calculatedState = this.getStateChanges(prevProps);
|
|
3766
3765
|
this.calculatedState = calculatedState;
|
|
3767
3766
|
var globalEventKeys = Object.keys(this.globalEvents);
|
|
3768
|
-
|
|
3769
|
-
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
3770
|
-
|
|
3767
|
+
var removedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(this.prevGlobalEventKeys, globalEventKeys);
|
|
3771
3768
|
removedGlobalEventKeys.forEach(function (key) {
|
|
3772
3769
|
return _this3.removeGlobalListener(key);
|
|
3773
3770
|
});
|
|
3774
|
-
|
|
3775
|
-
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_2___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
3776
|
-
|
|
3771
|
+
var addedGlobalEventKeys = (0,_collection__WEBPACK_IMPORTED_MODULE_7__.difference)(globalEventKeys, this.prevGlobalEventKeys);
|
|
3777
3772
|
addedGlobalEventKeys.forEach(function (key) {
|
|
3778
3773
|
return _this3.addGlobalListener(key);
|
|
3779
3774
|
});
|
|
@@ -3795,16 +3790,16 @@ function addEvents(WrappedComponent) {
|
|
|
3795
3790
|
|
|
3796
3791
|
var boundListener = function (event) {
|
|
3797
3792
|
var listener = _this5.globalEvents[key];
|
|
3798
|
-
return listener && listener(
|
|
3793
|
+
return listener && listener(_events__WEBPACK_IMPORTED_MODULE_6__.emulateReactEvent(event));
|
|
3799
3794
|
};
|
|
3800
3795
|
|
|
3801
3796
|
this.boundGlobalEvents[key] = boundListener;
|
|
3802
|
-
window.addEventListener(
|
|
3797
|
+
window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), boundListener);
|
|
3803
3798
|
}
|
|
3804
3799
|
}, {
|
|
3805
3800
|
key: "removeGlobalListener",
|
|
3806
3801
|
value: function removeGlobalListener(key) {
|
|
3807
|
-
window.removeEventListener(
|
|
3802
|
+
window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
|
|
3808
3803
|
} // compile all state changes from own and parent state. Order doesn't matter, as any state
|
|
3809
3804
|
// state change should trigger a re-render
|
|
3810
3805
|
|
|
@@ -3818,7 +3813,7 @@ function addEvents(WrappedComponent) {
|
|
|
3818
3813
|
}
|
|
3819
3814
|
|
|
3820
3815
|
var getState = function (key, type) {
|
|
3821
|
-
var result =
|
|
3816
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
3822
3817
|
|
|
3823
3818
|
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(result) ? undefined : result;
|
|
3824
3819
|
};
|
|
@@ -3841,7 +3836,7 @@ function addEvents(WrappedComponent) {
|
|
|
3841
3836
|
value: function applyExternalMutations(props, externalMutations) {
|
|
3842
3837
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalMutations)) {
|
|
3843
3838
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
3844
|
-
return (0,
|
|
3839
|
+
return (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
3845
3840
|
}, []);
|
|
3846
3841
|
var compiledCallbacks = callbacks.length ? function () {
|
|
3847
3842
|
callbacks.forEach(function (c) {
|
|
@@ -3856,8 +3851,8 @@ function addEvents(WrappedComponent) {
|
|
|
3856
3851
|
value: function getCalculatedValues(props) {
|
|
3857
3852
|
var sharedEvents = props.sharedEvents;
|
|
3858
3853
|
var components = WrappedComponent.expectedComponents;
|
|
3859
|
-
var componentEvents =
|
|
3860
|
-
var getSharedEventState = sharedEvents && (0,
|
|
3854
|
+
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getComponentEvents(props, components);
|
|
3855
|
+
var getSharedEventState = sharedEvents && (0,_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
3861
3856
|
return undefined;
|
|
3862
3857
|
};
|
|
3863
3858
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
@@ -3880,7 +3875,7 @@ function addEvents(WrappedComponent) {
|
|
|
3880
3875
|
value: function getExternalMutations(props) {
|
|
3881
3876
|
var sharedEvents = props.sharedEvents,
|
|
3882
3877
|
externalEventMutations = props.externalEventMutations;
|
|
3883
|
-
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined :
|
|
3878
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_1___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_6__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
3884
3879
|
}
|
|
3885
3880
|
}, {
|
|
3886
3881
|
key: "cacheValues",
|
|
@@ -3898,12 +3893,12 @@ function addEvents(WrappedComponent) {
|
|
|
3898
3893
|
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
3899
3894
|
var parentState = this.getEventState("parent", "parent");
|
|
3900
3895
|
|
|
3901
|
-
var baseParentProps =
|
|
3896
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentState, sharedParentState);
|
|
3902
3897
|
|
|
3903
3898
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
3904
3899
|
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(baseParentProps, parentPropsList) : {};
|
|
3905
3900
|
|
|
3906
|
-
var modifiedProps =
|
|
3901
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, parentProps, props);
|
|
3907
3902
|
|
|
3908
3903
|
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
3909
3904
|
}
|
|
@@ -3935,21 +3930,21 @@ function addEvents(WrappedComponent) {
|
|
|
3935
3930
|
if (this.hasEvents) {
|
|
3936
3931
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
3937
3932
|
|
|
3938
|
-
var componentProps =
|
|
3933
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
3939
3934
|
index: index,
|
|
3940
3935
|
key: id
|
|
3941
3936
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
3942
3937
|
id: id
|
|
3943
3938
|
});
|
|
3944
3939
|
|
|
3945
|
-
var events =
|
|
3940
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, _events__WEBPACK_IMPORTED_MODULE_6__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
3946
3941
|
|
|
3947
3942
|
return Object.assign({}, componentProps, {
|
|
3948
3943
|
events: events
|
|
3949
3944
|
});
|
|
3950
3945
|
}
|
|
3951
3946
|
|
|
3952
|
-
return
|
|
3947
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({
|
|
3953
3948
|
index: index,
|
|
3954
3949
|
key: id
|
|
3955
3950
|
}, currentProps, baseProps, {
|
|
@@ -3963,11 +3958,11 @@ function addEvents(WrappedComponent) {
|
|
|
3963
3958
|
var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
|
|
3964
3959
|
|
|
3965
3960
|
if (parentProps.events) {
|
|
3966
|
-
this.globalEvents =
|
|
3967
|
-
parentProps.events =
|
|
3961
|
+
this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_6__.getGlobalEvents(parentProps.events);
|
|
3962
|
+
parentProps.events = _events__WEBPACK_IMPORTED_MODULE_6__.omitGlobalEvents(parentProps.events);
|
|
3968
3963
|
}
|
|
3969
3964
|
|
|
3970
|
-
return /*#__PURE__*/
|
|
3965
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(component, parentProps, children);
|
|
3971
3966
|
}
|
|
3972
3967
|
}, {
|
|
3973
3968
|
key: "animateComponent",
|
|
@@ -3976,10 +3971,10 @@ function addEvents(WrappedComponent) {
|
|
|
3976
3971
|
|
|
3977
3972
|
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
3978
3973
|
var Comp = this.constructor;
|
|
3979
|
-
return /*#__PURE__*/
|
|
3974
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_8__.VictoryTransition, {
|
|
3980
3975
|
animate: props.animate,
|
|
3981
3976
|
animationWhitelist: animationWhitelist
|
|
3982
|
-
}, /*#__PURE__*/
|
|
3977
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Comp, props));
|
|
3983
3978
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
3984
3979
|
|
|
3985
3980
|
}, {
|
|
@@ -3999,13 +3994,13 @@ function addEvents(WrappedComponent) {
|
|
|
3999
3994
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
4000
3995
|
|
|
4001
3996
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
4002
|
-
newMemo = newMemo.concat( /*#__PURE__*/
|
|
3997
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps));
|
|
4003
3998
|
}
|
|
4004
3999
|
|
|
4005
4000
|
return newMemo;
|
|
4006
4001
|
}, []);
|
|
4007
4002
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
4008
|
-
var children = [/*#__PURE__*/
|
|
4003
|
+
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
4009
4004
|
return this.renderContainer(groupComponent, children);
|
|
4010
4005
|
}
|
|
4011
4006
|
}, {
|
|
@@ -4021,7 +4016,7 @@ function addEvents(WrappedComponent) {
|
|
|
4021
4016
|
var dataProps = _this9.getComponentProps(dataComponent, "data", index);
|
|
4022
4017
|
|
|
4023
4018
|
if (shouldRenderDatum(dataProps.datum)) {
|
|
4024
|
-
validDataComponents.push( /*#__PURE__*/
|
|
4019
|
+
validDataComponents.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(dataComponent, dataProps));
|
|
4025
4020
|
}
|
|
4026
4021
|
|
|
4027
4022
|
return validDataComponents;
|
|
@@ -4030,7 +4025,7 @@ function addEvents(WrappedComponent) {
|
|
|
4030
4025
|
var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
|
|
4031
4026
|
|
|
4032
4027
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
4033
|
-
return /*#__PURE__*/
|
|
4028
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(labelComponent, labelProps);
|
|
4034
4029
|
}
|
|
4035
4030
|
|
|
4036
4031
|
return undefined;
|
|
@@ -4075,21 +4070,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4075
4070
|
/* harmony import */ var lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_orderBy__WEBPACK_IMPORTED_MODULE_0__);
|
|
4076
4071
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
|
|
4077
4072
|
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_1__);
|
|
4078
|
-
/* harmony import */ var
|
|
4079
|
-
/* harmony import */ var
|
|
4080
|
-
/* harmony import */ var
|
|
4081
|
-
/* harmony import */ var
|
|
4082
|
-
/* harmony import */ var
|
|
4083
|
-
/* harmony import */ var
|
|
4084
|
-
/* harmony import */ var
|
|
4085
|
-
/* harmony import */ var
|
|
4086
|
-
/* harmony import */ var
|
|
4087
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
|
|
4088
|
-
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
4089
|
-
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./domain */ "./victory-util/domain.ts");
|
|
4090
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
4091
|
-
|
|
4092
|
-
|
|
4073
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/isObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js");
|
|
4074
|
+
/* harmony import */ var lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_isObject__WEBPACK_IMPORTED_MODULE_2__);
|
|
4075
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js");
|
|
4076
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_3__);
|
|
4077
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "react");
|
|
4078
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
|
|
4079
|
+
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./collection */ "./victory-util/collection.tsx");
|
|
4080
|
+
/* harmony import */ var _domain__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./domain */ "./victory-util/domain.ts");
|
|
4081
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers */ "./victory-util/helpers.ts");
|
|
4093
4082
|
|
|
4094
4083
|
|
|
4095
4084
|
|
|
@@ -4112,12 +4101,22 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
4112
4101
|
|
|
4113
4102
|
|
|
4114
4103
|
|
|
4104
|
+
/**
|
|
4105
|
+
* Returns the first argument it receives
|
|
4106
|
+
* @param value The value to return
|
|
4107
|
+
* @returns The value given
|
|
4108
|
+
*/
|
|
4109
|
+
function identity(value) {
|
|
4110
|
+
return value;
|
|
4111
|
+
}
|
|
4115
4112
|
/**
|
|
4116
4113
|
* Returns the axis (x or y) of a particular axis component
|
|
4117
4114
|
* @param {Object} props: the props object.
|
|
4118
4115
|
* @param {Boolean} horizontal: true for horizontal charts
|
|
4119
4116
|
* @returns {String} the dimension appropriate for the axis given its props
|
|
4120
4117
|
*/
|
|
4118
|
+
|
|
4119
|
+
|
|
4121
4120
|
function getAxis(props) {
|
|
4122
4121
|
var dependentAxis = props.dependentAxis;
|
|
4123
4122
|
return dependentAxis ? "y" : "x";
|
|
@@ -4130,14 +4129,14 @@ function getAxis(props) {
|
|
|
4130
4129
|
*/
|
|
4131
4130
|
|
|
4132
4131
|
function findAxisComponents(childComponents, predicate) {
|
|
4133
|
-
var predicateFunction = predicate ||
|
|
4132
|
+
var predicateFunction = predicate || identity;
|
|
4134
4133
|
|
|
4135
4134
|
var findAxes = function (children) {
|
|
4136
4135
|
return children.reduce(function (memo, child) {
|
|
4137
4136
|
if (child.type && child.type.role === "axis" && predicateFunction(child)) {
|
|
4138
4137
|
return memo.concat(child);
|
|
4139
4138
|
} else if (child.props && child.props.children) {
|
|
4140
|
-
return memo.concat(findAxes(
|
|
4139
|
+
return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(child.props.children)));
|
|
4141
4140
|
}
|
|
4142
4141
|
|
|
4143
4142
|
return memo;
|
|
@@ -4179,7 +4178,7 @@ function getAxisComponentsWithParent(childComponents, type) {
|
|
|
4179
4178
|
if (child.type && child.type.role === "axis" && matchesType(child)) {
|
|
4180
4179
|
return memo.concat(child);
|
|
4181
4180
|
} else if (child.props && child.props.children) {
|
|
4182
|
-
var childAxis = findComponents(
|
|
4181
|
+
var childAxis = findComponents(react__WEBPACK_IMPORTED_MODULE_4___default().Children.toArray(child.props.children));
|
|
4183
4182
|
return childAxis.length > 0 ? memo.concat(child) : memo;
|
|
4184
4183
|
}
|
|
4185
4184
|
|
|
@@ -4197,8 +4196,8 @@ function getOrigin(domain) {
|
|
|
4197
4196
|
};
|
|
4198
4197
|
|
|
4199
4198
|
return {
|
|
4200
|
-
x:
|
|
4201
|
-
y:
|
|
4199
|
+
x: _collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(domain.x) ? new Date(Math.min.apply(Math, _toConsumableArray(domain.x))) : getSingleOrigin(domain.x),
|
|
4200
|
+
y: _collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(domain.y) ? new Date(Math.min.apply(Math, _toConsumableArray(domain.y))) : getSingleOrigin(domain.y)
|
|
4202
4201
|
};
|
|
4203
4202
|
}
|
|
4204
4203
|
function getOriginSign(origin, domain) {
|
|
@@ -4206,7 +4205,7 @@ function getOriginSign(origin, domain) {
|
|
|
4206
4205
|
return origin <= 0 && Math.max.apply(Math, _toConsumableArray(domain)) <= 0 ? "negative" : "positive";
|
|
4207
4206
|
};
|
|
4208
4207
|
|
|
4209
|
-
return
|
|
4208
|
+
return _collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(domain) ? "positive" : getSign();
|
|
4210
4209
|
}
|
|
4211
4210
|
/**
|
|
4212
4211
|
* @param {Object} props: axis component props
|
|
@@ -4229,14 +4228,14 @@ function isVertical(props) {
|
|
|
4229
4228
|
*/
|
|
4230
4229
|
|
|
4231
4230
|
function stringTicks(props) {
|
|
4232
|
-
return props.tickValues !== undefined &&
|
|
4231
|
+
return props.tickValues !== undefined && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(props.tickValues);
|
|
4233
4232
|
}
|
|
4234
4233
|
|
|
4235
4234
|
function getDefaultTickFormat(props) {
|
|
4236
4235
|
var tickValues = props.tickValues;
|
|
4237
4236
|
var axis = getAxis(props);
|
|
4238
4237
|
var stringMap = props.stringMap && props.stringMap[axis];
|
|
4239
|
-
var fallbackFormat = tickValues && !
|
|
4238
|
+
var fallbackFormat = tickValues && !_collection__WEBPACK_IMPORTED_MODULE_5__.containsDates(tickValues) ? function (x) {
|
|
4240
4239
|
return x;
|
|
4241
4240
|
} : undefined;
|
|
4242
4241
|
|
|
@@ -4246,7 +4245,7 @@ function getDefaultTickFormat(props) {
|
|
|
4246
4245
|
} : fallbackFormat;
|
|
4247
4246
|
}
|
|
4248
4247
|
|
|
4249
|
-
var invertedStringMap = stringMap &&
|
|
4248
|
+
var invertedStringMap = stringMap && _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
4250
4249
|
|
|
4251
4250
|
var tickValueArray = lodash_orderBy__WEBPACK_IMPORTED_MODULE_0___default()(Object.values(stringMap), function (n) {
|
|
4252
4251
|
return n;
|
|
@@ -4266,7 +4265,7 @@ function getStringTicks(props) {
|
|
|
4266
4265
|
var axis = getAxis(props);
|
|
4267
4266
|
var stringMap = props.stringMap && props.stringMap[axis];
|
|
4268
4267
|
var categories = Array.isArray(props.categories) ? props.categories : props.categories && props.categories[axis];
|
|
4269
|
-
var ticksFromCategories = categories &&
|
|
4268
|
+
var ticksFromCategories = categories && _collection__WEBPACK_IMPORTED_MODULE_5__.containsOnlyStrings(categories) ? categories.map(function (tick) {
|
|
4270
4269
|
return stringMap[tick];
|
|
4271
4270
|
}) : undefined;
|
|
4272
4271
|
var ticksFromStringMap = stringMap && Object.values(stringMap);
|
|
@@ -4289,7 +4288,7 @@ function getTickArray(props) {
|
|
|
4289
4288
|
return undefined;
|
|
4290
4289
|
}
|
|
4291
4290
|
|
|
4292
|
-
return
|
|
4291
|
+
return _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickFormat) ? tickFormat.map(function (t, i) {
|
|
4293
4292
|
return i;
|
|
4294
4293
|
}) : tickFormat;
|
|
4295
4294
|
};
|
|
@@ -4300,10 +4299,10 @@ function getTickArray(props) {
|
|
|
4300
4299
|
ticks = getStringTicks(props);
|
|
4301
4300
|
}
|
|
4302
4301
|
|
|
4303
|
-
if (tickValues &&
|
|
4302
|
+
if (tickValues && _collection__WEBPACK_IMPORTED_MODULE_5__.containsStrings(tickValues)) {
|
|
4304
4303
|
ticks = stringMap ? tickValues.map(function (tick) {
|
|
4305
4304
|
return stringMap[tick];
|
|
4306
|
-
}) :
|
|
4305
|
+
}) : _helpers__WEBPACK_IMPORTED_MODULE_6__.range(1, tickValues.length + 1);
|
|
4307
4306
|
}
|
|
4308
4307
|
|
|
4309
4308
|
var tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_1___default()(ticks) : getTicksFromFormat();
|
|
@@ -4315,7 +4314,7 @@ function getTickArray(props) {
|
|
|
4315
4314
|
if (arr) {
|
|
4316
4315
|
arr.forEach(function (t, index) {
|
|
4317
4316
|
if (Array.isArray(domain)) {
|
|
4318
|
-
if (t >=
|
|
4317
|
+
if (t >= _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(domain) && t <= _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(domain)) {
|
|
4319
4318
|
newTickArray.push({
|
|
4320
4319
|
value: t,
|
|
4321
4320
|
index: index
|
|
@@ -4347,7 +4346,7 @@ function getTickFormat(props, scale) {
|
|
|
4347
4346
|
// by default. This changed the default formatting for some scale types when
|
|
4348
4347
|
// we upgraded to d3-scale@4..
|
|
4349
4348
|
|
|
4350
|
-
var scaleTickFormat = scale.tickFormat &&
|
|
4349
|
+
var scaleTickFormat = scale.tickFormat && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(scale.tickFormat) ? scale.tickFormat() : function (x) {
|
|
4351
4350
|
return x;
|
|
4352
4351
|
};
|
|
4353
4352
|
return defaultTickFormat || scaleTickFormat;
|
|
@@ -4362,10 +4361,9 @@ function getTickFormat(props, scale) {
|
|
|
4362
4361
|
return function (x, index) {
|
|
4363
4362
|
return filteredTickFormat[index];
|
|
4364
4363
|
};
|
|
4365
|
-
} else if (tickFormat &&
|
|
4364
|
+
} else if (tickFormat && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(tickFormat)) {
|
|
4366
4365
|
var applyStringTicks = function (tick, index, ticks) {
|
|
4367
|
-
var invertedStringMap =
|
|
4368
|
-
|
|
4366
|
+
var invertedStringMap = _helpers__WEBPACK_IMPORTED_MODULE_6__.invert(stringMap);
|
|
4369
4367
|
var stringTickArray = ticks.map(function (t) {
|
|
4370
4368
|
return invertedStringMap[t];
|
|
4371
4369
|
});
|
|
@@ -4406,7 +4404,7 @@ function getTicks(props, scale) {
|
|
|
4406
4404
|
|
|
4407
4405
|
if (tickValues) {
|
|
4408
4406
|
return downsampleTicks(tickValues, tickCount);
|
|
4409
|
-
} else if (scale.ticks &&
|
|
4407
|
+
} else if (scale.ticks && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(scale.ticks)) {
|
|
4410
4408
|
// eslint-disable-next-line no-magic-numbers
|
|
4411
4409
|
var defaultTickCount = tickCount || 5;
|
|
4412
4410
|
var scaleTicks = scale.ticks(defaultTickCount);
|
|
@@ -4448,18 +4446,18 @@ function getDomainFromData(props, axis) {
|
|
|
4448
4446
|
return undefined;
|
|
4449
4447
|
}
|
|
4450
4448
|
|
|
4451
|
-
var minDomain =
|
|
4452
|
-
var maxDomain =
|
|
4449
|
+
var minDomain = _domain__WEBPACK_IMPORTED_MODULE_7__.getMinFromProps(props, axis);
|
|
4450
|
+
var maxDomain = _domain__WEBPACK_IMPORTED_MODULE_7__.getMaxFromProps(props, axis);
|
|
4453
4451
|
var tickStrings = stringTicks(props);
|
|
4454
4452
|
var ticks = tickValues.map(function (value) {
|
|
4455
4453
|
return Number(value);
|
|
4456
4454
|
});
|
|
4457
|
-
var defaultMin = tickStrings ? 1 :
|
|
4458
|
-
var defaultMax = tickStrings ? tickValues.length :
|
|
4455
|
+
var defaultMin = tickStrings ? 1 : _collection__WEBPACK_IMPORTED_MODULE_5__.getMinValue(ticks);
|
|
4456
|
+
var defaultMax = tickStrings ? tickValues.length : _collection__WEBPACK_IMPORTED_MODULE_5__.getMaxValue(ticks);
|
|
4459
4457
|
var min = minDomain !== undefined ? minDomain : defaultMin;
|
|
4460
4458
|
var max = maxDomain !== undefined ? maxDomain : defaultMax;
|
|
4461
|
-
var initialDomain =
|
|
4462
|
-
var domain = polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ?
|
|
4459
|
+
var initialDomain = _domain__WEBPACK_IMPORTED_MODULE_7__.getDomainFromMinMax(min, max);
|
|
4460
|
+
var domain = polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? _domain__WEBPACK_IMPORTED_MODULE_7__.getSymmetricDomain(initialDomain, ticks) : initialDomain;
|
|
4463
4461
|
|
|
4464
4462
|
if (isVertical(props) && !polar) {
|
|
4465
4463
|
domain.reverse();
|
|
@@ -4476,7 +4474,7 @@ function getDomain(props, axis) {
|
|
|
4476
4474
|
return undefined;
|
|
4477
4475
|
}
|
|
4478
4476
|
|
|
4479
|
-
return
|
|
4477
|
+
return _domain__WEBPACK_IMPORTED_MODULE_7__.createDomainFunction(getDomainFromData)(props, inherentAxis);
|
|
4480
4478
|
}
|
|
4481
4479
|
function getAxisValue(props, axis) {
|
|
4482
4480
|
if (!props.axisValue) {
|
|
@@ -4484,20 +4482,20 @@ function getAxisValue(props, axis) {
|
|
|
4484
4482
|
}
|
|
4485
4483
|
|
|
4486
4484
|
var scaleAxis = axis === "x" ? "y" : "x";
|
|
4487
|
-
var scale =
|
|
4485
|
+
var scale = lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(props.scale) && _helpers__WEBPACK_IMPORTED_MODULE_6__.isFunction(props.scale[scaleAxis]) ? props.scale[scaleAxis] : undefined;
|
|
4488
4486
|
|
|
4489
4487
|
if (!scale) {
|
|
4490
4488
|
return undefined;
|
|
4491
4489
|
}
|
|
4492
4490
|
|
|
4493
4491
|
var stringMapAxis = axis === "x" ? "y" : "x";
|
|
4494
|
-
var stringMap =
|
|
4492
|
+
var stringMap = lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(props.stringMap) && props.stringMap[stringMapAxis];
|
|
4495
4493
|
var axisValue = stringMap && typeof props.axisValue === "string" ? stringMap[props.axisValue] : props.axisValue;
|
|
4496
4494
|
return scale(axisValue);
|
|
4497
4495
|
}
|
|
4498
4496
|
function modifyProps(props, fallbackProps) {
|
|
4499
|
-
if (!
|
|
4500
|
-
return
|
|
4497
|
+
if (!lodash_isObject__WEBPACK_IMPORTED_MODULE_2___default()(props.theme)) {
|
|
4498
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
4501
4499
|
}
|
|
4502
4500
|
|
|
4503
4501
|
var role = "axis";
|
|
@@ -4509,15 +4507,15 @@ function modifyProps(props, fallbackProps) {
|
|
|
4509
4507
|
}
|
|
4510
4508
|
|
|
4511
4509
|
if (role === "axis") {
|
|
4512
|
-
return
|
|
4510
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(props, fallbackProps, "axis");
|
|
4513
4511
|
}
|
|
4514
4512
|
|
|
4515
|
-
var axisTheme =
|
|
4513
|
+
var axisTheme = lodash_defaults__WEBPACK_IMPORTED_MODULE_3___default()({}, props.theme[role], props.theme.axis);
|
|
4516
4514
|
|
|
4517
4515
|
var theme = Object.assign({}, props.theme, {
|
|
4518
4516
|
axis: axisTheme
|
|
4519
4517
|
});
|
|
4520
|
-
return
|
|
4518
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_6__.modifyProps(Object.assign({}, props, {
|
|
4521
4519
|
theme: theme
|
|
4522
4520
|
}), fallbackProps, "axis");
|
|
4523
4521
|
}
|
|
@@ -4537,6 +4535,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4537
4535
|
/* harmony export */ "containsNumbers": () => (/* binding */ containsNumbers),
|
|
4538
4536
|
/* harmony export */ "containsOnlyStrings": () => (/* binding */ containsOnlyStrings),
|
|
4539
4537
|
/* harmony export */ "containsStrings": () => (/* binding */ containsStrings),
|
|
4538
|
+
/* harmony export */ "difference": () => (/* binding */ difference),
|
|
4540
4539
|
/* harmony export */ "getMaxValue": () => (/* binding */ getMaxValue),
|
|
4541
4540
|
/* harmony export */ "getMinValue": () => (/* binding */ getMinValue),
|
|
4542
4541
|
/* harmony export */ "isArrayOfArrays": () => (/* binding */ isArrayOfArrays),
|
|
@@ -4578,6 +4577,22 @@ function containsOnlyStrings(collection) {
|
|
|
4578
4577
|
return typeof value === "string";
|
|
4579
4578
|
});
|
|
4580
4579
|
}
|
|
4580
|
+
/**
|
|
4581
|
+
* Creates an array of array values not included in the other given arrays
|
|
4582
|
+
* @param a The array to inspect
|
|
4583
|
+
* @param b The values to exclude
|
|
4584
|
+
* @returns The new array of filtered values
|
|
4585
|
+
*/
|
|
4586
|
+
|
|
4587
|
+
function difference(a, b) {
|
|
4588
|
+
if (a && b) {
|
|
4589
|
+
return a.filter(function (value) {
|
|
4590
|
+
return !b.includes(value);
|
|
4591
|
+
});
|
|
4592
|
+
}
|
|
4593
|
+
|
|
4594
|
+
return [];
|
|
4595
|
+
}
|
|
4581
4596
|
function isArrayOfArrays(collection) {
|
|
4582
4597
|
return isNonEmptyArray(collection) && collection.every(Array.isArray);
|
|
4583
4598
|
}
|
|
@@ -6187,6 +6202,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6187
6202
|
/* harmony export */ "getRadius": () => (/* binding */ getRadius),
|
|
6188
6203
|
/* harmony export */ "getRange": () => (/* binding */ getRange),
|
|
6189
6204
|
/* harmony export */ "getStyles": () => (/* binding */ getStyles),
|
|
6205
|
+
/* harmony export */ "invert": () => (/* binding */ invert),
|
|
6190
6206
|
/* harmony export */ "isFunction": () => (/* binding */ isFunction),
|
|
6191
6207
|
/* harmony export */ "isHorizontal": () => (/* binding */ isHorizontal),
|
|
6192
6208
|
/* harmony export */ "isNil": () => (/* binding */ isNil),
|
|
@@ -6237,6 +6253,18 @@ function getPolarRange(props, axis) {
|
|
|
6237
6253
|
return [props.innerRadius || 0, getRadius(props)];
|
|
6238
6254
|
} // Exported Functions
|
|
6239
6255
|
|
|
6256
|
+
/**
|
|
6257
|
+
* Creates an object composed of the inverted keys and values of object.
|
|
6258
|
+
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
|
|
6259
|
+
*/
|
|
6260
|
+
|
|
6261
|
+
|
|
6262
|
+
function invert(original) {
|
|
6263
|
+
return Object.entries(original).reduce(function (acc, current) {
|
|
6264
|
+
acc[current[1]] = current[0];
|
|
6265
|
+
return acc;
|
|
6266
|
+
}, {});
|
|
6267
|
+
}
|
|
6240
6268
|
/**
|
|
6241
6269
|
* creates an object with some keys excluded
|
|
6242
6270
|
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
@@ -6245,7 +6273,6 @@ function getPolarRange(props, axis) {
|
|
|
6245
6273
|
* @returns {Object} new object with same properties as originalObject
|
|
6246
6274
|
*/
|
|
6247
6275
|
|
|
6248
|
-
|
|
6249
6276
|
function omit(originalObject) {
|
|
6250
6277
|
var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
6251
6278
|
// code based on babel's _objectWithoutProperties
|
|
@@ -9303,11 +9330,11 @@ function getChildStyle(child, index, calculatedProps) {
|
|
|
9303
9330
|
|
|
9304
9331
|
var labelsStyle = lodash_defaults__WEBPACK_IMPORTED_MODULE_4___default()({}, childStyle.labels, style.labels);
|
|
9305
9332
|
|
|
9306
|
-
return {
|
|
9333
|
+
return _objectSpread(_objectSpread({}, childStyle), {}, {
|
|
9307
9334
|
parent: style.parent,
|
|
9308
9335
|
data: dataStyle,
|
|
9309
9336
|
labels: labelsStyle
|
|
9310
|
-
};
|
|
9337
|
+
});
|
|
9311
9338
|
}
|
|
9312
9339
|
function getStringsFromCategories(childComponents, axis) {
|
|
9313
9340
|
var iteratee = function (child) {
|
|
@@ -9903,83 +9930,6 @@ function baseAssignValue(object, key, value) {
|
|
|
9903
9930
|
module.exports = baseAssignValue;
|
|
9904
9931
|
|
|
9905
9932
|
|
|
9906
|
-
/***/ }),
|
|
9907
|
-
|
|
9908
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js":
|
|
9909
|
-
/*!*****************************************************************************************!*\
|
|
9910
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js ***!
|
|
9911
|
-
\*****************************************************************************************/
|
|
9912
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9913
|
-
|
|
9914
|
-
var SetCache = __webpack_require__(/*! ./_SetCache */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"),
|
|
9915
|
-
arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludes.js"),
|
|
9916
|
-
arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayIncludesWith.js"),
|
|
9917
|
-
arrayMap = __webpack_require__(/*! ./_arrayMap */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"),
|
|
9918
|
-
baseUnary = __webpack_require__(/*! ./_baseUnary */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"),
|
|
9919
|
-
cacheHas = __webpack_require__(/*! ./_cacheHas */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js");
|
|
9920
|
-
|
|
9921
|
-
/** Used as the size to enable large array optimizations. */
|
|
9922
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
9923
|
-
|
|
9924
|
-
/**
|
|
9925
|
-
* The base implementation of methods like `_.difference` without support
|
|
9926
|
-
* for excluding multiple arrays or iteratee shorthands.
|
|
9927
|
-
*
|
|
9928
|
-
* @private
|
|
9929
|
-
* @param {Array} array The array to inspect.
|
|
9930
|
-
* @param {Array} values The values to exclude.
|
|
9931
|
-
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
9932
|
-
* @param {Function} [comparator] The comparator invoked per element.
|
|
9933
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
9934
|
-
*/
|
|
9935
|
-
function baseDifference(array, values, iteratee, comparator) {
|
|
9936
|
-
var index = -1,
|
|
9937
|
-
includes = arrayIncludes,
|
|
9938
|
-
isCommon = true,
|
|
9939
|
-
length = array.length,
|
|
9940
|
-
result = [],
|
|
9941
|
-
valuesLength = values.length;
|
|
9942
|
-
|
|
9943
|
-
if (!length) {
|
|
9944
|
-
return result;
|
|
9945
|
-
}
|
|
9946
|
-
if (iteratee) {
|
|
9947
|
-
values = arrayMap(values, baseUnary(iteratee));
|
|
9948
|
-
}
|
|
9949
|
-
if (comparator) {
|
|
9950
|
-
includes = arrayIncludesWith;
|
|
9951
|
-
isCommon = false;
|
|
9952
|
-
}
|
|
9953
|
-
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
9954
|
-
includes = cacheHas;
|
|
9955
|
-
isCommon = false;
|
|
9956
|
-
values = new SetCache(values);
|
|
9957
|
-
}
|
|
9958
|
-
outer:
|
|
9959
|
-
while (++index < length) {
|
|
9960
|
-
var value = array[index],
|
|
9961
|
-
computed = iteratee == null ? value : iteratee(value);
|
|
9962
|
-
|
|
9963
|
-
value = (comparator || value !== 0) ? value : 0;
|
|
9964
|
-
if (isCommon && computed === computed) {
|
|
9965
|
-
var valuesIndex = valuesLength;
|
|
9966
|
-
while (valuesIndex--) {
|
|
9967
|
-
if (values[valuesIndex] === computed) {
|
|
9968
|
-
continue outer;
|
|
9969
|
-
}
|
|
9970
|
-
}
|
|
9971
|
-
result.push(value);
|
|
9972
|
-
}
|
|
9973
|
-
else if (!includes(values, computed, comparator)) {
|
|
9974
|
-
result.push(value);
|
|
9975
|
-
}
|
|
9976
|
-
}
|
|
9977
|
-
return result;
|
|
9978
|
-
}
|
|
9979
|
-
|
|
9980
|
-
module.exports = baseDifference;
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
9933
|
/***/ }),
|
|
9984
9934
|
|
|
9985
9935
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js":
|
|
@@ -10028,58 +9978,6 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
|
10028
9978
|
module.exports = baseFlatten;
|
|
10029
9979
|
|
|
10030
9980
|
|
|
10031
|
-
/***/ }),
|
|
10032
|
-
|
|
10033
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js":
|
|
10034
|
-
/*!**********************************************************************************!*\
|
|
10035
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js ***!
|
|
10036
|
-
\**********************************************************************************/
|
|
10037
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10038
|
-
|
|
10039
|
-
var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js");
|
|
10040
|
-
|
|
10041
|
-
/**
|
|
10042
|
-
* The base implementation of `baseForOwn` which iterates over `object`
|
|
10043
|
-
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
10044
|
-
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
10045
|
-
*
|
|
10046
|
-
* @private
|
|
10047
|
-
* @param {Object} object The object to iterate over.
|
|
10048
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
10049
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
10050
|
-
* @returns {Object} Returns `object`.
|
|
10051
|
-
*/
|
|
10052
|
-
var baseFor = createBaseFor();
|
|
10053
|
-
|
|
10054
|
-
module.exports = baseFor;
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
/***/ }),
|
|
10058
|
-
|
|
10059
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js":
|
|
10060
|
-
/*!*************************************************************************************!*\
|
|
10061
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js ***!
|
|
10062
|
-
\*************************************************************************************/
|
|
10063
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10064
|
-
|
|
10065
|
-
var baseFor = __webpack_require__(/*! ./_baseFor */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js"),
|
|
10066
|
-
keys = __webpack_require__(/*! ./keys */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js");
|
|
10067
|
-
|
|
10068
|
-
/**
|
|
10069
|
-
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
10070
|
-
*
|
|
10071
|
-
* @private
|
|
10072
|
-
* @param {Object} object The object to iterate over.
|
|
10073
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
10074
|
-
* @returns {Object} Returns `object`.
|
|
10075
|
-
*/
|
|
10076
|
-
function baseForOwn(object, iteratee) {
|
|
10077
|
-
return object && baseFor(object, iteratee, keys);
|
|
10078
|
-
}
|
|
10079
|
-
|
|
10080
|
-
module.exports = baseForOwn;
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
9981
|
/***/ }),
|
|
10084
9982
|
|
|
10085
9983
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js":
|
|
@@ -10202,37 +10100,6 @@ function strictIndexOf(array, value, fromIndex) {
|
|
|
10202
10100
|
module.exports = strictIndexOf;
|
|
10203
10101
|
|
|
10204
10102
|
|
|
10205
|
-
/***/ }),
|
|
10206
|
-
|
|
10207
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseInverter.js":
|
|
10208
|
-
/*!***************************************************************************************!*\
|
|
10209
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseInverter.js ***!
|
|
10210
|
-
\***************************************************************************************/
|
|
10211
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10212
|
-
|
|
10213
|
-
var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js");
|
|
10214
|
-
|
|
10215
|
-
/**
|
|
10216
|
-
* The base implementation of `_.invert` and `_.invertBy` which inverts
|
|
10217
|
-
* `object` with values transformed by `iteratee` and set by `setter`.
|
|
10218
|
-
*
|
|
10219
|
-
* @private
|
|
10220
|
-
* @param {Object} object The object to iterate over.
|
|
10221
|
-
* @param {Function} setter The function to set `accumulator` values.
|
|
10222
|
-
* @param {Function} iteratee The iteratee to transform values.
|
|
10223
|
-
* @param {Object} accumulator The initial inverted object.
|
|
10224
|
-
* @returns {Function} Returns `accumulator`.
|
|
10225
|
-
*/
|
|
10226
|
-
function baseInverter(object, setter, iteratee, accumulator) {
|
|
10227
|
-
baseForOwn(object, function(value, key, object) {
|
|
10228
|
-
setter(accumulator, iteratee(value), key, object);
|
|
10229
|
-
});
|
|
10230
|
-
return accumulator;
|
|
10231
|
-
}
|
|
10232
|
-
|
|
10233
|
-
module.exports = baseInverter;
|
|
10234
|
-
|
|
10235
|
-
|
|
10236
10103
|
/***/ }),
|
|
10237
10104
|
|
|
10238
10105
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsDate.js":
|
|
@@ -11313,68 +11180,6 @@ function createAggregator(setter, initializer) {
|
|
|
11313
11180
|
module.exports = createAggregator;
|
|
11314
11181
|
|
|
11315
11182
|
|
|
11316
|
-
/***/ }),
|
|
11317
|
-
|
|
11318
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js":
|
|
11319
|
-
/*!****************************************************************************************!*\
|
|
11320
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js ***!
|
|
11321
|
-
\****************************************************************************************/
|
|
11322
|
-
/***/ ((module) => {
|
|
11323
|
-
|
|
11324
|
-
/**
|
|
11325
|
-
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
11326
|
-
*
|
|
11327
|
-
* @private
|
|
11328
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
11329
|
-
* @returns {Function} Returns the new base function.
|
|
11330
|
-
*/
|
|
11331
|
-
function createBaseFor(fromRight) {
|
|
11332
|
-
return function(object, iteratee, keysFunc) {
|
|
11333
|
-
var index = -1,
|
|
11334
|
-
iterable = Object(object),
|
|
11335
|
-
props = keysFunc(object),
|
|
11336
|
-
length = props.length;
|
|
11337
|
-
|
|
11338
|
-
while (length--) {
|
|
11339
|
-
var key = props[fromRight ? length : ++index];
|
|
11340
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
11341
|
-
break;
|
|
11342
|
-
}
|
|
11343
|
-
}
|
|
11344
|
-
return object;
|
|
11345
|
-
};
|
|
11346
|
-
}
|
|
11347
|
-
|
|
11348
|
-
module.exports = createBaseFor;
|
|
11349
|
-
|
|
11350
|
-
|
|
11351
|
-
/***/ }),
|
|
11352
|
-
|
|
11353
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createInverter.js":
|
|
11354
|
-
/*!*****************************************************************************************!*\
|
|
11355
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createInverter.js ***!
|
|
11356
|
-
\*****************************************************************************************/
|
|
11357
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
11358
|
-
|
|
11359
|
-
var baseInverter = __webpack_require__(/*! ./_baseInverter */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseInverter.js");
|
|
11360
|
-
|
|
11361
|
-
/**
|
|
11362
|
-
* Creates a function like `_.invertBy`.
|
|
11363
|
-
*
|
|
11364
|
-
* @private
|
|
11365
|
-
* @param {Function} setter The function to set accumulator values.
|
|
11366
|
-
* @param {Function} toIteratee The function to resolve iteratees.
|
|
11367
|
-
* @returns {Function} Returns the new inverter function.
|
|
11368
|
-
*/
|
|
11369
|
-
function createInverter(setter, toIteratee) {
|
|
11370
|
-
return function(object, iteratee) {
|
|
11371
|
-
return baseInverter(object, setter, toIteratee(iteratee), {});
|
|
11372
|
-
};
|
|
11373
|
-
}
|
|
11374
|
-
|
|
11375
|
-
module.exports = createInverter;
|
|
11376
|
-
|
|
11377
|
-
|
|
11378
11183
|
/***/ }),
|
|
11379
11184
|
|
|
11380
11185
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js":
|
|
@@ -12572,42 +12377,6 @@ function toKey(value) {
|
|
|
12572
12377
|
module.exports = toKey;
|
|
12573
12378
|
|
|
12574
12379
|
|
|
12575
|
-
/***/ }),
|
|
12576
|
-
|
|
12577
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js":
|
|
12578
|
-
/*!**********************************************************************************!*\
|
|
12579
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js ***!
|
|
12580
|
-
\**********************************************************************************/
|
|
12581
|
-
/***/ ((module) => {
|
|
12582
|
-
|
|
12583
|
-
/**
|
|
12584
|
-
* Creates a function that returns `value`.
|
|
12585
|
-
*
|
|
12586
|
-
* @static
|
|
12587
|
-
* @memberOf _
|
|
12588
|
-
* @since 2.4.0
|
|
12589
|
-
* @category Util
|
|
12590
|
-
* @param {*} value The value to return from the new function.
|
|
12591
|
-
* @returns {Function} Returns the new constant function.
|
|
12592
|
-
* @example
|
|
12593
|
-
*
|
|
12594
|
-
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
12595
|
-
*
|
|
12596
|
-
* console.log(objects);
|
|
12597
|
-
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
12598
|
-
*
|
|
12599
|
-
* console.log(objects[0] === objects[1]);
|
|
12600
|
-
* // => true
|
|
12601
|
-
*/
|
|
12602
|
-
function constant(value) {
|
|
12603
|
-
return function() {
|
|
12604
|
-
return value;
|
|
12605
|
-
};
|
|
12606
|
-
}
|
|
12607
|
-
|
|
12608
|
-
module.exports = constant;
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
12380
|
/***/ }),
|
|
12612
12381
|
|
|
12613
12382
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js":
|
|
@@ -12682,49 +12451,6 @@ var defaults = baseRest(function(object, sources) {
|
|
|
12682
12451
|
module.exports = defaults;
|
|
12683
12452
|
|
|
12684
12453
|
|
|
12685
|
-
/***/ }),
|
|
12686
|
-
|
|
12687
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js":
|
|
12688
|
-
/*!************************************************************************************!*\
|
|
12689
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js ***!
|
|
12690
|
-
\************************************************************************************/
|
|
12691
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12692
|
-
|
|
12693
|
-
var baseDifference = __webpack_require__(/*! ./_baseDifference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseDifference.js"),
|
|
12694
|
-
baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js"),
|
|
12695
|
-
baseRest = __webpack_require__(/*! ./_baseRest */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js"),
|
|
12696
|
-
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js");
|
|
12697
|
-
|
|
12698
|
-
/**
|
|
12699
|
-
* Creates an array of `array` values not included in the other given arrays
|
|
12700
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
12701
|
-
* for equality comparisons. The order and references of result values are
|
|
12702
|
-
* determined by the first array.
|
|
12703
|
-
*
|
|
12704
|
-
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
12705
|
-
*
|
|
12706
|
-
* @static
|
|
12707
|
-
* @memberOf _
|
|
12708
|
-
* @since 0.1.0
|
|
12709
|
-
* @category Array
|
|
12710
|
-
* @param {Array} array The array to inspect.
|
|
12711
|
-
* @param {...Array} [values] The values to exclude.
|
|
12712
|
-
* @returns {Array} Returns the new array of filtered values.
|
|
12713
|
-
* @see _.without, _.xor
|
|
12714
|
-
* @example
|
|
12715
|
-
*
|
|
12716
|
-
* _.difference([2, 1], [2, 3]);
|
|
12717
|
-
* // => [1]
|
|
12718
|
-
*/
|
|
12719
|
-
var difference = baseRest(function(array, values) {
|
|
12720
|
-
return isArrayLikeObject(array)
|
|
12721
|
-
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
12722
|
-
: [];
|
|
12723
|
-
});
|
|
12724
|
-
|
|
12725
|
-
module.exports = difference;
|
|
12726
|
-
|
|
12727
|
-
|
|
12728
12454
|
/***/ }),
|
|
12729
12455
|
|
|
12730
12456
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js":
|
|
@@ -12973,58 +12699,6 @@ function identity(value) {
|
|
|
12973
12699
|
module.exports = identity;
|
|
12974
12700
|
|
|
12975
12701
|
|
|
12976
|
-
/***/ }),
|
|
12977
|
-
|
|
12978
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/invert.js":
|
|
12979
|
-
/*!********************************************************************************!*\
|
|
12980
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/invert.js ***!
|
|
12981
|
-
\********************************************************************************/
|
|
12982
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12983
|
-
|
|
12984
|
-
var constant = __webpack_require__(/*! ./constant */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js"),
|
|
12985
|
-
createInverter = __webpack_require__(/*! ./_createInverter */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createInverter.js"),
|
|
12986
|
-
identity = __webpack_require__(/*! ./identity */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js");
|
|
12987
|
-
|
|
12988
|
-
/** Used for built-in method references. */
|
|
12989
|
-
var objectProto = Object.prototype;
|
|
12990
|
-
|
|
12991
|
-
/**
|
|
12992
|
-
* Used to resolve the
|
|
12993
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
12994
|
-
* of values.
|
|
12995
|
-
*/
|
|
12996
|
-
var nativeObjectToString = objectProto.toString;
|
|
12997
|
-
|
|
12998
|
-
/**
|
|
12999
|
-
* Creates an object composed of the inverted keys and values of `object`.
|
|
13000
|
-
* If `object` contains duplicate values, subsequent values overwrite
|
|
13001
|
-
* property assignments of previous values.
|
|
13002
|
-
*
|
|
13003
|
-
* @static
|
|
13004
|
-
* @memberOf _
|
|
13005
|
-
* @since 0.7.0
|
|
13006
|
-
* @category Object
|
|
13007
|
-
* @param {Object} object The object to invert.
|
|
13008
|
-
* @returns {Object} Returns the new inverted object.
|
|
13009
|
-
* @example
|
|
13010
|
-
*
|
|
13011
|
-
* var object = { 'a': 1, 'b': 2, 'c': 1 };
|
|
13012
|
-
*
|
|
13013
|
-
* _.invert(object);
|
|
13014
|
-
* // => { '1': 'c', '2': 'b' }
|
|
13015
|
-
*/
|
|
13016
|
-
var invert = createInverter(function(result, value, key) {
|
|
13017
|
-
if (value != null &&
|
|
13018
|
-
typeof value.toString != 'function') {
|
|
13019
|
-
value = nativeObjectToString.call(value);
|
|
13020
|
-
}
|
|
13021
|
-
|
|
13022
|
-
result[value] = key;
|
|
13023
|
-
}, constant(identity));
|
|
13024
|
-
|
|
13025
|
-
module.exports = invert;
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
12702
|
/***/ }),
|
|
13029
12703
|
|
|
13030
12704
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js":
|
|
@@ -13132,49 +12806,6 @@ function isArrayLike(value) {
|
|
|
13132
12806
|
module.exports = isArrayLike;
|
|
13133
12807
|
|
|
13134
12808
|
|
|
13135
|
-
/***/ }),
|
|
13136
|
-
|
|
13137
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js":
|
|
13138
|
-
/*!*******************************************************************************************!*\
|
|
13139
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLikeObject.js ***!
|
|
13140
|
-
\*******************************************************************************************/
|
|
13141
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13142
|
-
|
|
13143
|
-
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"),
|
|
13144
|
-
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js");
|
|
13145
|
-
|
|
13146
|
-
/**
|
|
13147
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
13148
|
-
* is an object.
|
|
13149
|
-
*
|
|
13150
|
-
* @static
|
|
13151
|
-
* @memberOf _
|
|
13152
|
-
* @since 4.0.0
|
|
13153
|
-
* @category Lang
|
|
13154
|
-
* @param {*} value The value to check.
|
|
13155
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
13156
|
-
* else `false`.
|
|
13157
|
-
* @example
|
|
13158
|
-
*
|
|
13159
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
13160
|
-
* // => true
|
|
13161
|
-
*
|
|
13162
|
-
* _.isArrayLikeObject(document.body.children);
|
|
13163
|
-
* // => true
|
|
13164
|
-
*
|
|
13165
|
-
* _.isArrayLikeObject('abc');
|
|
13166
|
-
* // => false
|
|
13167
|
-
*
|
|
13168
|
-
* _.isArrayLikeObject(_.noop);
|
|
13169
|
-
* // => false
|
|
13170
|
-
*/
|
|
13171
|
-
function isArrayLikeObject(value) {
|
|
13172
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
13173
|
-
}
|
|
13174
|
-
|
|
13175
|
-
module.exports = isArrayLikeObject;
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
12809
|
/***/ }),
|
|
13179
12810
|
|
|
13180
12811
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js":
|