victory-pie 36.5.0 → 36.5.3
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/dist/victory-pie.js +228 -169
- package/dist/victory-pie.min.js +1 -1
- package/es/helper-methods.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -1
- package/es/slice.js +2 -1
- package/es/victory-pie.js +2 -1
- package/lib/helper-methods.js +2 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/slice.js +2 -1
- package/lib/victory-pie.js +2 -1
- package/package.json +4 -4
- package/src/helper-methods.js +16 -16
- package/src/index.d.ts +1 -1
- package/src/slice.js +6 -6
- package/src/victory-pie.js +41 -41
package/dist/victory-pie.js
CHANGED
|
@@ -460,7 +460,7 @@ var Slice = function (props) {
|
|
|
460
460
|
}));
|
|
461
461
|
};
|
|
462
462
|
|
|
463
|
-
Slice.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.primitiveProps), {}, {
|
|
463
|
+
Slice.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.CommonProps.primitiveProps), {}, {
|
|
464
464
|
cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
465
465
|
datum: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object),
|
|
466
466
|
innerRadius: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
@@ -704,7 +704,7 @@ VictoryPie.getBaseProps = function (props) {
|
|
|
704
704
|
|
|
705
705
|
VictoryPie.getData = victory_core__WEBPACK_IMPORTED_MODULE_10__.getData;
|
|
706
706
|
VictoryPie.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
707
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_11__
|
|
707
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_11__.addEvents)(VictoryPie));
|
|
708
708
|
|
|
709
709
|
/***/ }),
|
|
710
710
|
|
|
@@ -7132,7 +7132,7 @@ var isInterpolatable = function (obj) {
|
|
|
7132
7132
|
// component is only going to call the function (in which case it's
|
|
7133
7133
|
// safely interpolatable) or if it's going to access special properties
|
|
7134
7134
|
// (in which case our function generated from `interpolateFunction` will
|
|
7135
|
-
// most likely cause an error. We could check for enumerable properties
|
|
7135
|
+
// most likely cause an error). We could check for enumerable properties
|
|
7136
7136
|
// on the function object here to see if it's a "plain" function, but
|
|
7137
7137
|
// let's just require that components prevent such function props from
|
|
7138
7138
|
// being animated in the first place.
|
|
@@ -7297,16 +7297,18 @@ var victoryInterpolator = function (a, b) {
|
|
|
7297
7297
|
}
|
|
7298
7298
|
|
|
7299
7299
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(b)) {
|
|
7300
|
-
// @ts-expect-error These generics are tough, but they work
|
|
7300
|
+
// @ts-expect-error These generics are tough, but they work :)
|
|
7301
7301
|
return interpolateObject(a, b);
|
|
7302
7302
|
}
|
|
7303
7303
|
|
|
7304
7304
|
if (typeof a === "string" || typeof b === "string") {
|
|
7305
7305
|
return interpolateString(a, b);
|
|
7306
|
-
}
|
|
7306
|
+
} // @ts-expect-error These generics are tough, but they work :)
|
|
7307
|
+
|
|
7307
7308
|
|
|
7308
7309
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b);
|
|
7309
7310
|
};
|
|
7311
|
+
//# sourceMappingURL=util.js.map
|
|
7310
7312
|
|
|
7311
7313
|
/***/ }),
|
|
7312
7314
|
|
|
@@ -7569,6 +7571,7 @@ VictoryAnimation.defaultProps = {
|
|
|
7569
7571
|
easing: "quadInOut"
|
|
7570
7572
|
};
|
|
7571
7573
|
VictoryAnimation.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
7574
|
+
//# sourceMappingURL=victory-animation.js.map
|
|
7572
7575
|
|
|
7573
7576
|
/***/ }),
|
|
7574
7577
|
|
|
@@ -7882,6 +7885,7 @@ VictoryContainer.defaultProps = {
|
|
|
7882
7885
|
role: "img"
|
|
7883
7886
|
};
|
|
7884
7887
|
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
7888
|
+
//# sourceMappingURL=victory-container.js.map
|
|
7885
7889
|
|
|
7886
7890
|
/***/ }),
|
|
7887
7891
|
|
|
@@ -8487,10 +8491,9 @@ VictoryLabel.propTypes = {
|
|
|
8487
8491
|
inline: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8488
8492
|
labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["parallel", "perpendicular", "vertical"]),
|
|
8489
8493
|
lineHeight: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().string), _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative, (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().array)]),
|
|
8490
|
-
// @ts-expect-error "x is required in origin"
|
|
8491
8494
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
|
|
8492
|
-
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative,
|
|
8493
|
-
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative
|
|
8495
|
+
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired,
|
|
8496
|
+
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired
|
|
8494
8497
|
}),
|
|
8495
8498
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8496
8499
|
renderInPortal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
@@ -8524,6 +8527,7 @@ VictoryLabel.defaultProps = {
|
|
|
8524
8527
|
// Magic number from d3.
|
|
8525
8528
|
lineHeight: 1
|
|
8526
8529
|
};
|
|
8530
|
+
//# sourceMappingURL=victory-label.js.map
|
|
8527
8531
|
|
|
8528
8532
|
/***/ }),
|
|
8529
8533
|
|
|
@@ -8548,6 +8552,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8548
8552
|
*/
|
|
8549
8553
|
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
8550
8554
|
PortalContext.displayName = "PortalContext";
|
|
8555
|
+
//# sourceMappingURL=portal-context.js.map
|
|
8551
8556
|
|
|
8552
8557
|
/***/ }),
|
|
8553
8558
|
|
|
@@ -8659,6 +8664,7 @@ Portal.propTypes = {
|
|
|
8659
8664
|
viewBox: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8660
8665
|
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_3__.nonNegative
|
|
8661
8666
|
};
|
|
8667
|
+
//# sourceMappingURL=portal.js.map
|
|
8662
8668
|
|
|
8663
8669
|
/***/ }),
|
|
8664
8670
|
|
|
@@ -8802,6 +8808,7 @@ VictoryPortal.defaultProps = {
|
|
|
8802
8808
|
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
8803
8809
|
};
|
|
8804
8810
|
VictoryPortal.contextType = _portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext;
|
|
8811
|
+
//# sourceMappingURL=victory-portal.js.map
|
|
8805
8812
|
|
|
8806
8813
|
/***/ }),
|
|
8807
8814
|
|
|
@@ -8838,6 +8845,7 @@ var Path = function (props) {
|
|
|
8838
8845
|
// @ts-expect-error FIXME: "id cannot be a number"
|
|
8839
8846
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", rest);
|
|
8840
8847
|
};
|
|
8848
|
+
//# sourceMappingURL=path.js.map
|
|
8841
8849
|
|
|
8842
8850
|
/***/ }),
|
|
8843
8851
|
|
|
@@ -8880,6 +8888,7 @@ var Rect = function (props) {
|
|
|
8880
8888
|
vectorEffect: "non-scaling-stroke"
|
|
8881
8889
|
}, rest));
|
|
8882
8890
|
};
|
|
8891
|
+
//# sourceMappingURL=rect.js.map
|
|
8883
8892
|
|
|
8884
8893
|
/***/ }),
|
|
8885
8894
|
|
|
@@ -8923,6 +8932,7 @@ Text.propTypes = {
|
|
|
8923
8932
|
desc: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8924
8933
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
8925
8934
|
};
|
|
8935
|
+
//# sourceMappingURL=text.js.map
|
|
8926
8936
|
|
|
8927
8937
|
/***/ }),
|
|
8928
8938
|
|
|
@@ -8947,6 +8957,7 @@ var TSpan = function (props) {
|
|
|
8947
8957
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tspan", props)
|
|
8948
8958
|
);
|
|
8949
8959
|
};
|
|
8960
|
+
//# sourceMappingURL=tspan.js.map
|
|
8950
8961
|
|
|
8951
8962
|
/***/ }),
|
|
8952
8963
|
|
|
@@ -9222,6 +9233,7 @@ var grayscale = {
|
|
|
9222
9233
|
}
|
|
9223
9234
|
}, baseProps)
|
|
9224
9235
|
};
|
|
9236
|
+
//# sourceMappingURL=grayscale.js.map
|
|
9225
9237
|
|
|
9226
9238
|
/***/ }),
|
|
9227
9239
|
|
|
@@ -9524,6 +9536,7 @@ var material = {
|
|
|
9524
9536
|
}
|
|
9525
9537
|
}, baseProps)
|
|
9526
9538
|
};
|
|
9539
|
+
//# sourceMappingURL=material.js.map
|
|
9527
9540
|
|
|
9528
9541
|
/***/ }),
|
|
9529
9542
|
|
|
@@ -9547,6 +9560,7 @@ var VictoryTheme = {
|
|
|
9547
9560
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
9548
9561
|
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
9549
9562
|
};
|
|
9563
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
9550
9564
|
|
|
9551
9565
|
/***/ }),
|
|
9552
9566
|
|
|
@@ -9815,6 +9829,7 @@ VictoryTransition.propTypes = {
|
|
|
9815
9829
|
children: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().node)
|
|
9816
9830
|
};
|
|
9817
9831
|
VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
9832
|
+
//# sourceMappingURL=victory-transition.js.map
|
|
9818
9833
|
|
|
9819
9834
|
/***/ }),
|
|
9820
9835
|
|
|
@@ -9827,26 +9842,26 @@ VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MO
|
|
|
9827
9842
|
"use strict";
|
|
9828
9843
|
__webpack_require__.r(__webpack_exports__);
|
|
9829
9844
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9830
|
-
/* harmony export */ "
|
|
9845
|
+
/* harmony export */ "addEvents": () => (/* binding */ addEvents)
|
|
9831
9846
|
/* harmony export */ });
|
|
9832
|
-
/* harmony import */ var
|
|
9833
|
-
/* harmony import */ var
|
|
9834
|
-
/* harmony import */ var
|
|
9835
|
-
/* harmony import */ var
|
|
9836
|
-
/* harmony import */ var
|
|
9837
|
-
/* harmony import */ var
|
|
9838
|
-
/* harmony import */ var
|
|
9839
|
-
/* harmony import */ var
|
|
9840
|
-
/* harmony import */ var
|
|
9841
|
-
/* harmony import */ var
|
|
9842
|
-
/* harmony import */ var
|
|
9843
|
-
/* harmony import */ var
|
|
9844
|
-
/* harmony import */ var
|
|
9845
|
-
/* harmony import */ var
|
|
9846
|
-
/* harmony import */ var
|
|
9847
|
-
/* harmony import */ var
|
|
9848
|
-
/* harmony import */ var
|
|
9849
|
-
/* harmony import */ var
|
|
9847
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/without */ "../../../node_modules/lodash/without.js");
|
|
9848
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_without__WEBPACK_IMPORTED_MODULE_0__);
|
|
9849
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/lodash/pick.js");
|
|
9850
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_1__);
|
|
9851
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/keys */ "../../../node_modules/lodash/keys.js");
|
|
9852
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_2__);
|
|
9853
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isNil */ "../../../node_modules/lodash/isNil.js");
|
|
9854
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_3__);
|
|
9855
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isFunction */ "../../../node_modules/lodash/isFunction.js");
|
|
9856
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__);
|
|
9857
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/lodash/isEmpty.js");
|
|
9858
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__);
|
|
9859
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/difference */ "../../../node_modules/lodash/difference.js");
|
|
9860
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_difference__WEBPACK_IMPORTED_MODULE_6__);
|
|
9861
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/lodash/defaults.js");
|
|
9862
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_7__);
|
|
9863
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/lodash/assign.js");
|
|
9864
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_8__);
|
|
9850
9865
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "react");
|
|
9851
9866
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
|
9852
9867
|
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
@@ -9899,13 +9914,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9899
9914
|
|
|
9900
9915
|
|
|
9901
9916
|
|
|
9902
|
-
|
|
9917
|
+
|
|
9918
|
+
|
|
9919
|
+
// DISCLAIMER:
|
|
9903
9920
|
// This file is not currently tested, and it is first on the list of files
|
|
9904
9921
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
9905
9922
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
9906
|
-
|
|
9907
9923
|
var datumHasXandY = function (datum) {
|
|
9908
|
-
return !
|
|
9924
|
+
return !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._x) && !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._y);
|
|
9909
9925
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
9910
9926
|
|
|
9911
9927
|
|
|
@@ -9917,44 +9933,45 @@ var defaultComponents = [{
|
|
|
9917
9933
|
}, {
|
|
9918
9934
|
name: "labels"
|
|
9919
9935
|
}];
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
_inherits(addEvents, _WrappedComponent);
|
|
9936
|
+
function addEvents(WrappedComponent) {
|
|
9937
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9923
9938
|
|
|
9924
|
-
|
|
9939
|
+
// @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
|
|
9940
|
+
var AddEventsMixin = /*#__PURE__*/function (_WrappedComponent) {
|
|
9941
|
+
_inherits(AddEventsMixin, _WrappedComponent);
|
|
9925
9942
|
|
|
9926
|
-
|
|
9943
|
+
var _super = _createSuper(AddEventsMixin);
|
|
9944
|
+
|
|
9945
|
+
function AddEventsMixin(props) {
|
|
9927
9946
|
var _this;
|
|
9928
9947
|
|
|
9929
|
-
_classCallCheck(this,
|
|
9948
|
+
_classCallCheck(this, AddEventsMixin);
|
|
9930
9949
|
|
|
9931
9950
|
_this = _super.call(this, props);
|
|
9932
|
-
var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9933
|
-
var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
|
|
9934
9951
|
_this.state = {};
|
|
9952
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
9953
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9935
9954
|
|
|
9936
9955
|
_this.getEvents = function (p, target, eventKey) {
|
|
9937
|
-
return
|
|
9956
|
+
return _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
9938
9957
|
};
|
|
9939
9958
|
|
|
9940
|
-
_this.
|
|
9941
|
-
|
|
9942
|
-
var calculatedValues = _this.getCalculatedValues(props);
|
|
9943
|
-
|
|
9944
|
-
_this.cacheValues(calculatedValues);
|
|
9945
|
-
|
|
9946
|
-
_this.externalMutations = _this.getExternalMutations(props);
|
|
9947
|
-
_this.calculatedState = _this.getStateChanges(props);
|
|
9959
|
+
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
9960
|
+
_this.calculatedState = _this.getStateChanges(_this.props);
|
|
9948
9961
|
_this.globalEvents = {};
|
|
9949
9962
|
_this.prevGlobalEventKeys = [];
|
|
9950
9963
|
_this.boundGlobalEvents = {};
|
|
9964
|
+
|
|
9965
|
+
_this.cacheValues(_this.getCalculatedValues(props));
|
|
9966
|
+
|
|
9951
9967
|
return _this;
|
|
9952
9968
|
}
|
|
9953
9969
|
|
|
9954
|
-
_createClass(
|
|
9970
|
+
_createClass(AddEventsMixin, [{
|
|
9955
9971
|
key: "shouldComponentUpdate",
|
|
9956
9972
|
value: function shouldComponentUpdate(nextProps) {
|
|
9957
|
-
var externalMutations = this.getExternalMutations(nextProps);
|
|
9973
|
+
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
9974
|
+
|
|
9958
9975
|
var animating = this.props.animating || this.props.animate;
|
|
9959
9976
|
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
|
|
9960
9977
|
|
|
@@ -9984,7 +10001,7 @@ var defaultComponents = [{
|
|
|
9984
10001
|
value: function componentDidMount() {
|
|
9985
10002
|
var _this2 = this;
|
|
9986
10003
|
|
|
9987
|
-
var globalEventKeys =
|
|
10004
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
9988
10005
|
|
|
9989
10006
|
globalEventKeys.forEach(function (key) {
|
|
9990
10007
|
return _this2.addGlobalListener(key);
|
|
@@ -9999,15 +10016,15 @@ var defaultComponents = [{
|
|
|
9999
10016
|
var calculatedState = this.getStateChanges(prevProps);
|
|
10000
10017
|
this.calculatedState = calculatedState;
|
|
10001
10018
|
|
|
10002
|
-
var globalEventKeys =
|
|
10019
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
10003
10020
|
|
|
10004
|
-
var removedGlobalEventKeys =
|
|
10021
|
+
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
10005
10022
|
|
|
10006
10023
|
removedGlobalEventKeys.forEach(function (key) {
|
|
10007
10024
|
return _this3.removeGlobalListener(key);
|
|
10008
10025
|
});
|
|
10009
10026
|
|
|
10010
|
-
var addedGlobalEventKeys =
|
|
10027
|
+
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
10011
10028
|
|
|
10012
10029
|
addedGlobalEventKeys.forEach(function (key) {
|
|
10013
10030
|
return _this3.addGlobalListener(key);
|
|
@@ -10053,12 +10070,11 @@ var defaultComponents = [{
|
|
|
10053
10070
|
}
|
|
10054
10071
|
|
|
10055
10072
|
var getState = function (key, type) {
|
|
10056
|
-
var result =
|
|
10073
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
10057
10074
|
|
|
10058
|
-
return
|
|
10075
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(result) ? undefined : result;
|
|
10059
10076
|
};
|
|
10060
10077
|
|
|
10061
|
-
options = options || {};
|
|
10062
10078
|
var components = options.components || defaultComponents;
|
|
10063
10079
|
var stateChanges = components.map(function (component) {
|
|
10064
10080
|
if (!props.standalone && component.name === "parent") {
|
|
@@ -10075,9 +10091,9 @@ var defaultComponents = [{
|
|
|
10075
10091
|
}, {
|
|
10076
10092
|
key: "applyExternalMutations",
|
|
10077
10093
|
value: function applyExternalMutations(props, externalMutations) {
|
|
10078
|
-
if (!
|
|
10094
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
|
|
10079
10095
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
10080
|
-
memo =
|
|
10096
|
+
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
10081
10097
|
return memo;
|
|
10082
10098
|
}, []);
|
|
10083
10099
|
var compiledCallbacks = callbacks.length ? function () {
|
|
@@ -10094,12 +10110,12 @@ var defaultComponents = [{
|
|
|
10094
10110
|
var sharedEvents = props.sharedEvents;
|
|
10095
10111
|
var components = WrappedComponent.expectedComponents;
|
|
10096
10112
|
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
10097
|
-
var getSharedEventState = sharedEvents &&
|
|
10113
|
+
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
10098
10114
|
return undefined;
|
|
10099
10115
|
};
|
|
10100
10116
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
10101
10117
|
|
|
10102
|
-
var dataKeys =
|
|
10118
|
+
var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(baseProps).filter(function (key) {
|
|
10103
10119
|
return key !== "parent";
|
|
10104
10120
|
});
|
|
10105
10121
|
|
|
@@ -10119,32 +10135,32 @@ var defaultComponents = [{
|
|
|
10119
10135
|
value: function getExternalMutations(props) {
|
|
10120
10136
|
var sharedEvents = props.sharedEvents,
|
|
10121
10137
|
externalEventMutations = props.externalEventMutations;
|
|
10122
|
-
return
|
|
10138
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
10123
10139
|
}
|
|
10124
10140
|
}, {
|
|
10125
10141
|
key: "cacheValues",
|
|
10126
10142
|
value: function cacheValues(obj) {
|
|
10127
10143
|
var _this7 = this;
|
|
10128
10144
|
|
|
10129
|
-
|
|
10145
|
+
lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(obj).forEach(function (key) {
|
|
10130
10146
|
_this7[key] = obj[key];
|
|
10131
10147
|
});
|
|
10132
10148
|
}
|
|
10133
10149
|
}, {
|
|
10134
10150
|
key: "getBaseProps",
|
|
10135
10151
|
value: function getBaseProps(props, getSharedEventState) {
|
|
10136
|
-
getSharedEventState = getSharedEventState || this.getSharedEventState;
|
|
10152
|
+
getSharedEventState = getSharedEventState || this.getSharedEventState.bind(this);
|
|
10137
10153
|
var sharedParentState = getSharedEventState("parent", "parent");
|
|
10138
10154
|
var parentState = this.getEventState("parent", "parent");
|
|
10139
10155
|
|
|
10140
|
-
var baseParentProps =
|
|
10156
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
|
|
10141
10157
|
|
|
10142
10158
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
10143
|
-
var parentProps = parentPropsList ?
|
|
10159
|
+
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_1___default()(baseParentProps, parentPropsList) : {};
|
|
10144
10160
|
|
|
10145
|
-
var modifiedProps =
|
|
10161
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentProps, props);
|
|
10146
10162
|
|
|
10147
|
-
return
|
|
10163
|
+
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
10148
10164
|
}
|
|
10149
10165
|
}, {
|
|
10150
10166
|
key: "getAllEvents",
|
|
@@ -10172,21 +10188,21 @@ var defaultComponents = [{
|
|
|
10172
10188
|
if (this.hasEvents) {
|
|
10173
10189
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
10174
10190
|
|
|
10175
|
-
var componentProps =
|
|
10191
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10176
10192
|
index: index,
|
|
10177
10193
|
key: id
|
|
10178
10194
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
10179
10195
|
id: id
|
|
10180
10196
|
});
|
|
10181
10197
|
|
|
10182
|
-
var events =
|
|
10198
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
10183
10199
|
|
|
10184
|
-
return
|
|
10200
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, componentProps, {
|
|
10185
10201
|
events: events
|
|
10186
10202
|
});
|
|
10187
10203
|
}
|
|
10188
10204
|
|
|
10189
|
-
return
|
|
10205
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10190
10206
|
index: index,
|
|
10191
10207
|
key: id
|
|
10192
10208
|
}, component.props, baseProps, {
|
|
@@ -10209,11 +10225,14 @@ var defaultComponents = [{
|
|
|
10209
10225
|
}, {
|
|
10210
10226
|
key: "animateComponent",
|
|
10211
10227
|
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
10212
|
-
var
|
|
10228
|
+
var _props$animate;
|
|
10229
|
+
|
|
10230
|
+
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
10231
|
+
var Comp = this.constructor;
|
|
10213
10232
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.VictoryTransition, {
|
|
10214
10233
|
animate: props.animate,
|
|
10215
10234
|
animationWhitelist: animationWhitelist
|
|
10216
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(
|
|
10235
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(Comp, props));
|
|
10217
10236
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
10218
10237
|
|
|
10219
10238
|
}, {
|
|
@@ -10225,7 +10244,7 @@ var defaultComponents = [{
|
|
|
10225
10244
|
labelComponent = props.labelComponent,
|
|
10226
10245
|
groupComponent = props.groupComponent;
|
|
10227
10246
|
|
|
10228
|
-
var dataKeys =
|
|
10247
|
+
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
|
|
10229
10248
|
|
|
10230
10249
|
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
10231
10250
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
@@ -10272,9 +10291,12 @@ var defaultComponents = [{
|
|
|
10272
10291
|
}
|
|
10273
10292
|
}]);
|
|
10274
10293
|
|
|
10275
|
-
return
|
|
10294
|
+
return AddEventsMixin;
|
|
10276
10295
|
}(WrappedComponent);
|
|
10277
|
-
|
|
10296
|
+
|
|
10297
|
+
return AddEventsMixin;
|
|
10298
|
+
}
|
|
10299
|
+
//# sourceMappingURL=add-events.js.map
|
|
10278
10300
|
|
|
10279
10301
|
/***/ }),
|
|
10280
10302
|
|
|
@@ -10308,7 +10330,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10308
10330
|
|
|
10309
10331
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10310
10332
|
|
|
10311
|
-
/* eslint-disable no-use-before-define */
|
|
10312
10333
|
function isNonEmptyArray(collection) {
|
|
10313
10334
|
return Array.isArray(collection) && collection.length > 0;
|
|
10314
10335
|
}
|
|
@@ -10347,7 +10368,8 @@ function getMaxValue(arr) {
|
|
|
10347
10368
|
}
|
|
10348
10369
|
|
|
10349
10370
|
var array = arr.concat(values);
|
|
10350
|
-
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array)))
|
|
10371
|
+
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10372
|
+
: Math.max.apply(Math, _toConsumableArray(array));
|
|
10351
10373
|
}
|
|
10352
10374
|
function getMinValue(arr) {
|
|
10353
10375
|
for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -10355,8 +10377,10 @@ function getMinValue(arr) {
|
|
|
10355
10377
|
}
|
|
10356
10378
|
|
|
10357
10379
|
var array = arr.concat(values);
|
|
10358
|
-
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array)))
|
|
10380
|
+
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10381
|
+
: Math.min.apply(Math, _toConsumableArray(array));
|
|
10359
10382
|
}
|
|
10383
|
+
//# sourceMappingURL=collection.js.map
|
|
10360
10384
|
|
|
10361
10385
|
/***/ }),
|
|
10362
10386
|
|
|
@@ -10369,9 +10393,7 @@ function getMinValue(arr) {
|
|
|
10369
10393
|
"use strict";
|
|
10370
10394
|
__webpack_require__.r(__webpack_exports__);
|
|
10371
10395
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10372
|
-
/* harmony export */ "
|
|
10373
|
-
/* harmony export */ "dataProps": () => (/* binding */ dataProps),
|
|
10374
|
-
/* harmony export */ "primitiveProps": () => (/* binding */ primitiveProps)
|
|
10396
|
+
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
10375
10397
|
/* harmony export */ });
|
|
10376
10398
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
10377
10399
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -10379,26 +10401,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10379
10401
|
|
|
10380
10402
|
|
|
10381
10403
|
var dataProps = {
|
|
10404
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10382
10405
|
categories: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10383
10406
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
10384
10407
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
10385
10408
|
})]),
|
|
10409
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10386
10410
|
data: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)]),
|
|
10387
10411
|
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10388
10412
|
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10389
10413
|
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10390
10414
|
labels: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array)]),
|
|
10391
10415
|
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10392
|
-
sortKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))]),
|
|
10416
|
+
sortKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))]),
|
|
10393
10417
|
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
10394
10418
|
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10395
10419
|
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10396
10420
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10397
10421
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10398
10422
|
}),
|
|
10399
|
-
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))]),
|
|
10400
|
-
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))]),
|
|
10401
|
-
y0: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))])
|
|
10423
|
+
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))]),
|
|
10424
|
+
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))]),
|
|
10425
|
+
y0: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string.isRequired))])
|
|
10402
10426
|
};
|
|
10403
10427
|
var baseProps = {
|
|
10404
10428
|
animate: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)]),
|
|
@@ -10407,14 +10431,17 @@ var baseProps = {
|
|
|
10407
10431
|
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10408
10432
|
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10409
10433
|
})]),
|
|
10434
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10410
10435
|
maxDomain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10411
10436
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)]),
|
|
10412
10437
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)])
|
|
10413
10438
|
})]),
|
|
10439
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10414
10440
|
minDomain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10415
10441
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)]),
|
|
10416
10442
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().instanceOf(Date)])
|
|
10417
10443
|
})]),
|
|
10444
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10418
10445
|
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10419
10446
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))]),
|
|
10420
10447
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))])
|
|
@@ -10425,6 +10452,7 @@ var baseProps = {
|
|
|
10425
10452
|
eventKey: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().array), _prop_types__WEBPACK_IMPORTED_MODULE_1__.allOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.integer, _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)]),
|
|
10426
10453
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10427
10454
|
})),
|
|
10455
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10428
10456
|
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10429
10457
|
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
10430
10458
|
childName: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array)]),
|
|
@@ -10435,10 +10463,12 @@ var baseProps = {
|
|
|
10435
10463
|
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10436
10464
|
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10437
10465
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
10466
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10438
10467
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10439
10468
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10440
10469
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
10441
10470
|
}),
|
|
10471
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10442
10472
|
padding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10443
10473
|
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10444
10474
|
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
@@ -10447,17 +10477,19 @@ var baseProps = {
|
|
|
10447
10477
|
})]),
|
|
10448
10478
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10449
10479
|
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10450
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10451
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10480
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
10481
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
10452
10482
|
})]),
|
|
10453
10483
|
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10454
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
10455
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
10484
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
10485
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
10456
10486
|
})]),
|
|
10487
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10457
10488
|
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10458
10489
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
10459
10490
|
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
10460
10491
|
}),
|
|
10492
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10461
10493
|
singleQuadrantDomainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool), prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10462
10494
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
10463
10495
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
@@ -10477,6 +10509,7 @@ var primitiveProps = {
|
|
|
10477
10509
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10478
10510
|
id: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
|
|
10479
10511
|
index: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)]),
|
|
10512
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10480
10513
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10481
10514
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10482
10515
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
@@ -10492,6 +10525,12 @@ var primitiveProps = {
|
|
|
10492
10525
|
tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
|
|
10493
10526
|
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
10494
10527
|
};
|
|
10528
|
+
var CommonProps = {
|
|
10529
|
+
dataProps: dataProps,
|
|
10530
|
+
baseProps: baseProps,
|
|
10531
|
+
primitiveProps: primitiveProps
|
|
10532
|
+
};
|
|
10533
|
+
//# sourceMappingURL=common-props.js.map
|
|
10495
10534
|
|
|
10496
10535
|
/***/ }),
|
|
10497
10536
|
|
|
@@ -11005,6 +11044,7 @@ function isDataComponent(component) {
|
|
|
11005
11044
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
11006
11045
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_2___default()(whitelist, role);
|
|
11007
11046
|
}
|
|
11047
|
+
//# sourceMappingURL=data.js.map
|
|
11008
11048
|
|
|
11009
11049
|
/***/ }),
|
|
11010
11050
|
|
|
@@ -11073,15 +11113,16 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
11073
11113
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11074
11114
|
|
|
11075
11115
|
var GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
11116
|
+
|
|
11076
11117
|
/* Returns all own and shared events that should be attached to a single target element,
|
|
11077
11118
|
* i.e. an individual bar specified by target: "data", eventKey: [index].
|
|
11078
11119
|
* Returned events are scoped to the appropriate state. Either that of the component itself
|
|
11079
11120
|
* (i.e. VictoryBar) in the case of own events, or that of the parent component
|
|
11080
11121
|
* (i.e. VictoryChart) in the case of shared events
|
|
11081
11122
|
*/
|
|
11082
|
-
// eslint-disable-next-line max-params
|
|
11083
|
-
|
|
11084
|
-
|
|
11123
|
+
// eslint-disable-next-line max-params
|
|
11124
|
+
function getEvents(props, target, eventKey, // eslint-disable-next-line no-shadow
|
|
11125
|
+
getScopedEvents) {
|
|
11085
11126
|
var _this = this;
|
|
11086
11127
|
|
|
11087
11128
|
// Returns all events that apply to a particular target element
|
|
@@ -11304,24 +11345,27 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11304
11345
|
return memo;
|
|
11305
11346
|
}, {});
|
|
11306
11347
|
}
|
|
11307
|
-
/*
|
|
11348
|
+
/*
|
|
11349
|
+
* Returns a partially applied event handler for a specific target element
|
|
11308
11350
|
* This allows event handlers to have access to props controlling each element
|
|
11309
11351
|
*/
|
|
11310
11352
|
|
|
11311
11353
|
function getPartialEvents(events, eventKey, childProps) {
|
|
11312
|
-
|
|
11354
|
+
if (!events) return {};
|
|
11355
|
+
return lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(events).reduce(function (memo, eventName) {
|
|
11313
11356
|
var appliedEvent = function (evt) {
|
|
11314
11357
|
return events[eventName](evt, childProps, eventKey, eventName);
|
|
11315
11358
|
};
|
|
11316
11359
|
|
|
11317
11360
|
memo[eventName] = appliedEvent;
|
|
11318
11361
|
return memo;
|
|
11319
|
-
}, {})
|
|
11362
|
+
}, {});
|
|
11320
11363
|
}
|
|
11364
|
+
|
|
11321
11365
|
/* Returns the property of the state object corresponding to event changes for
|
|
11322
11366
|
* a particular element
|
|
11323
11367
|
*/
|
|
11324
|
-
|
|
11368
|
+
// eslint-disable-next-line max-params
|
|
11325
11369
|
function getEventState(eventKey, namespace, childType) {
|
|
11326
11370
|
// Mandatory usage: `getEventState.bind(this)`
|
|
11327
11371
|
// eslint-disable-next-line no-invalid-this
|
|
@@ -11506,6 +11550,7 @@ var emulateReactEvent = function (event) {
|
|
|
11506
11550
|
nativeEvent: event
|
|
11507
11551
|
});
|
|
11508
11552
|
};
|
|
11553
|
+
//# sourceMappingURL=events.js.map
|
|
11509
11554
|
|
|
11510
11555
|
/***/ }),
|
|
11511
11556
|
|
|
@@ -11587,7 +11632,7 @@ function getPolarRange(props, axis) {
|
|
|
11587
11632
|
|
|
11588
11633
|
/**
|
|
11589
11634
|
* creates an object with some keys excluded
|
|
11590
|
-
* replacement for lodash.omit for performance. does not
|
|
11635
|
+
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
11591
11636
|
* @param {Object} originalObject: created object will be based on this object
|
|
11592
11637
|
* @param {Array<String>} ks: an array of keys to omit from the new object
|
|
11593
11638
|
* @returns {Object} new object with same properties as originalObject
|
|
@@ -11600,6 +11645,7 @@ function omit(originalObject) {
|
|
|
11600
11645
|
var newObject = {};
|
|
11601
11646
|
|
|
11602
11647
|
for (var key in originalObject) {
|
|
11648
|
+
// @ts-expect-error String is not assignable to Key
|
|
11603
11649
|
if (ks.indexOf(key) >= 0) {
|
|
11604
11650
|
continue;
|
|
11605
11651
|
}
|
|
@@ -11832,7 +11878,9 @@ function reduceChildren(children, iteratee) {
|
|
|
11832
11878
|
var parentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
11833
11879
|
var initialMemo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
11834
11880
|
var combine = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (memo, item) {
|
|
11835
|
-
return
|
|
11881
|
+
return (// @ts-expect-error These defaults are hard to type
|
|
11882
|
+
memo.concat(item)
|
|
11883
|
+
);
|
|
11836
11884
|
};
|
|
11837
11885
|
var sharedProps = ["data", "domain", "categories", "polar", "startAngle", "endAngle", "minDomain", "maxDomain", "horizontal"];
|
|
11838
11886
|
|
|
@@ -11876,7 +11924,7 @@ function reduceChildren(children, iteratee) {
|
|
|
11876
11924
|
/**
|
|
11877
11925
|
* @param {Object} props: the props object
|
|
11878
11926
|
* @returns {Boolean} returns true if the props object contains `horizontal: true` of if any
|
|
11879
|
-
* children or nested children are
|
|
11927
|
+
* children or nested children are horizontal
|
|
11880
11928
|
*/
|
|
11881
11929
|
|
|
11882
11930
|
function isHorizontal(props) {
|
|
@@ -11899,6 +11947,7 @@ function isHorizontal(props) {
|
|
|
11899
11947
|
|
|
11900
11948
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children));
|
|
11901
11949
|
}
|
|
11950
|
+
//# sourceMappingURL=helpers.js.map
|
|
11902
11951
|
|
|
11903
11952
|
/***/ }),
|
|
11904
11953
|
|
|
@@ -11942,15 +11991,16 @@ function isMap(x) {
|
|
|
11942
11991
|
return !!(x && x[IMMUTABLE_MAP]);
|
|
11943
11992
|
}
|
|
11944
11993
|
function shallowToJS(x, whitelist) {
|
|
11945
|
-
return isIterable(x) ? x.reduce(function (
|
|
11994
|
+
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
11946
11995
|
if (whitelist && whitelist[key]) {
|
|
11947
11996
|
curr = shallowToJS(curr);
|
|
11948
11997
|
}
|
|
11949
11998
|
|
|
11950
|
-
|
|
11951
|
-
return
|
|
11999
|
+
result[key] = curr;
|
|
12000
|
+
return result;
|
|
11952
12001
|
}, isList(x) ? [] : {}) : x;
|
|
11953
12002
|
}
|
|
12003
|
+
//# sourceMappingURL=immutable.js.map
|
|
11954
12004
|
|
|
11955
12005
|
/***/ }),
|
|
11956
12006
|
|
|
@@ -12208,6 +12258,7 @@ function getProps(props, index) {
|
|
|
12208
12258
|
var tooltipTheme = theme && theme.tooltip || {};
|
|
12209
12259
|
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelProps, _helpers__WEBPACK_IMPORTED_MODULE_1__.omit(tooltipTheme, ["style"]));
|
|
12210
12260
|
}
|
|
12261
|
+
//# sourceMappingURL=label-helpers.js.map
|
|
12211
12262
|
|
|
12212
12263
|
/***/ }),
|
|
12213
12264
|
|
|
@@ -12233,6 +12284,7 @@ function warn(message) {
|
|
|
12233
12284
|
}
|
|
12234
12285
|
}
|
|
12235
12286
|
}
|
|
12287
|
+
//# sourceMappingURL=log.js.map
|
|
12236
12288
|
|
|
12237
12289
|
/***/ }),
|
|
12238
12290
|
|
|
@@ -12260,12 +12312,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12260
12312
|
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0__);
|
|
12261
12313
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/find */ "../../../node_modules/lodash/find.js");
|
|
12262
12314
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
|
|
12263
|
-
/* harmony import */ var
|
|
12264
|
-
/* harmony import */ var
|
|
12265
|
-
/* harmony import */ var
|
|
12266
|
-
/* harmony import */ var
|
|
12267
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
12268
|
-
|
|
12315
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
12316
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
12317
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
12318
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
12269
12319
|
|
|
12270
12320
|
|
|
12271
12321
|
|
|
@@ -12273,6 +12323,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12273
12323
|
|
|
12274
12324
|
|
|
12275
12325
|
|
|
12326
|
+
|
|
12327
|
+
|
|
12276
12328
|
/**
|
|
12277
12329
|
* Return a new validator based on `validator` but with the option to chain
|
|
12278
12330
|
* `isRequired` onto the validation. This is nearly identical to how React
|
|
@@ -12280,30 +12332,30 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12280
12332
|
* @param {Function} validator Validation function.
|
|
12281
12333
|
* @returns {Function} Validator with `isRequired` option.
|
|
12282
12334
|
*/
|
|
12283
|
-
|
|
12284
12335
|
var makeChainable = function (validator) {
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
|
|
12336
|
+
var createChainable = function (isRequired) {
|
|
12337
|
+
return function (props, propName, componentName) {
|
|
12338
|
+
var value = props[propName];
|
|
12288
12339
|
|
|
12289
|
-
|
|
12290
|
-
|
|
12291
|
-
|
|
12292
|
-
|
|
12340
|
+
if (value === undefined || value === null) {
|
|
12341
|
+
if (isRequired) {
|
|
12342
|
+
return new Error("Required `".concat(propName, "` was not specified in `").concat(componentName, "`."));
|
|
12343
|
+
}
|
|
12293
12344
|
|
|
12294
|
-
|
|
12295
|
-
|
|
12345
|
+
return null;
|
|
12346
|
+
}
|
|
12296
12347
|
|
|
12297
|
-
|
|
12298
|
-
|
|
12299
|
-
|
|
12348
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
12349
|
+
rest[_key - 3] = arguments[_key];
|
|
12350
|
+
}
|
|
12300
12351
|
|
|
12301
|
-
|
|
12352
|
+
return validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12353
|
+
};
|
|
12302
12354
|
};
|
|
12303
12355
|
|
|
12304
|
-
var chainable =
|
|
12305
|
-
|
|
12306
|
-
|
|
12356
|
+
var chainable = Object.assign(createChainable(false), {
|
|
12357
|
+
isRequired: createChainable(true)
|
|
12358
|
+
});
|
|
12307
12359
|
return chainable;
|
|
12308
12360
|
};
|
|
12309
12361
|
|
|
@@ -12333,7 +12385,7 @@ var getConstructor = function (value) {
|
|
|
12333
12385
|
};
|
|
12334
12386
|
/**
|
|
12335
12387
|
* Get the name of the constructor used to create `value`, using
|
|
12336
|
-
* `Object.
|
|
12388
|
+
* `Object.prototype.toString`. If the value is null or undefined, return
|
|
12337
12389
|
* "null" or "undefined", respectively.
|
|
12338
12390
|
* @param {*} value Instance to return the constructor name of.
|
|
12339
12391
|
* @returns {String} Name of the constructor.
|
|
@@ -12363,10 +12415,11 @@ function deprecated(propType, explanation) {
|
|
|
12363
12415
|
var value = props[propName];
|
|
12364
12416
|
|
|
12365
12417
|
if (value !== null && value !== undefined) {
|
|
12366
|
-
|
|
12418
|
+
_log__WEBPACK_IMPORTED_MODULE_2__.warn("\"".concat(propName, "\" property of \"").concat(componentName, "\" has been deprecated ").concat(explanation));
|
|
12367
12419
|
}
|
|
12368
12420
|
|
|
12369
|
-
|
|
12421
|
+
prop_types__WEBPACK_IMPORTED_MODULE_3___default().checkPropTypes(_defineProperty({}, propName, propType), props, propName, componentName);
|
|
12422
|
+
return null;
|
|
12370
12423
|
};
|
|
12371
12424
|
}
|
|
12372
12425
|
/**
|
|
@@ -12385,7 +12438,7 @@ function allOfType(validators) {
|
|
|
12385
12438
|
|
|
12386
12439
|
return validators.reduce(function (result, validator) {
|
|
12387
12440
|
return result || validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12388
|
-
},
|
|
12441
|
+
}, null);
|
|
12389
12442
|
});
|
|
12390
12443
|
}
|
|
12391
12444
|
/**
|
|
@@ -12399,7 +12452,7 @@ var nonNegative = makeChainable(function (props, propName, componentName) {
|
|
|
12399
12452
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a non-negative number."));
|
|
12400
12453
|
}
|
|
12401
12454
|
|
|
12402
|
-
return
|
|
12455
|
+
return null;
|
|
12403
12456
|
});
|
|
12404
12457
|
/**
|
|
12405
12458
|
* Check that the value is an integer.
|
|
@@ -12412,7 +12465,7 @@ var integer = makeChainable(function (props, propName, componentName) {
|
|
|
12412
12465
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an integer."));
|
|
12413
12466
|
}
|
|
12414
12467
|
|
|
12415
|
-
return
|
|
12468
|
+
return null;
|
|
12416
12469
|
});
|
|
12417
12470
|
/**
|
|
12418
12471
|
* Check that the value is greater than zero.
|
|
@@ -12425,7 +12478,7 @@ var greaterThanZero = makeChainable(function (props, propName, componentName) {
|
|
|
12425
12478
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a number greater than zero."));
|
|
12426
12479
|
}
|
|
12427
12480
|
|
|
12428
|
-
return
|
|
12481
|
+
return null;
|
|
12429
12482
|
});
|
|
12430
12483
|
/**
|
|
12431
12484
|
* Check that the value is an Array of two unique values.
|
|
@@ -12438,32 +12491,20 @@ var domain = makeChainable(function (props, propName, componentName) {
|
|
|
12438
12491
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an array of two unique numeric values."));
|
|
12439
12492
|
}
|
|
12440
12493
|
|
|
12441
|
-
return
|
|
12494
|
+
return null;
|
|
12442
12495
|
});
|
|
12443
12496
|
/**
|
|
12444
12497
|
* Check that the value looks like a d3 `scale` function.
|
|
12445
12498
|
*/
|
|
12446
12499
|
|
|
12447
12500
|
var scale = makeChainable(function (props, propName, componentName) {
|
|
12448
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
12449
|
-
|
|
12450
|
-
var validScale = function (scl) {
|
|
12451
|
-
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl)) {
|
|
12452
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl.copy) && lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl.domain) && lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl.range);
|
|
12453
|
-
} else if (typeof scl === "string") {
|
|
12454
|
-
return supportedScaleStrings.indexOf(scl) !== -1;
|
|
12455
|
-
}
|
|
12456
|
-
|
|
12457
|
-
return false;
|
|
12458
|
-
};
|
|
12459
|
-
|
|
12460
12501
|
var value = props[propName];
|
|
12461
12502
|
|
|
12462
|
-
if (!validScale(value)) {
|
|
12503
|
+
if (!_scale__WEBPACK_IMPORTED_MODULE_4__.validScale(value)) {
|
|
12463
12504
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a d3 scale."));
|
|
12464
12505
|
}
|
|
12465
12506
|
|
|
12466
|
-
return
|
|
12507
|
+
return null;
|
|
12467
12508
|
});
|
|
12468
12509
|
/**
|
|
12469
12510
|
* Check that an array contains items of the same type.
|
|
@@ -12477,7 +12518,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
12477
12518
|
}
|
|
12478
12519
|
|
|
12479
12520
|
if (values.length < 2) {
|
|
12480
|
-
return
|
|
12521
|
+
return null;
|
|
12481
12522
|
}
|
|
12482
12523
|
|
|
12483
12524
|
var comparisonConstructor = getConstructor(values[0]);
|
|
@@ -12492,7 +12533,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
12492
12533
|
return new Error("Expected `".concat(propName, "` in `").concat(componentName, "` to be a ") + "homogeneous array, but found types `".concat(constructorName, "` and ") + "`".concat(otherConstructorName, "`."));
|
|
12493
12534
|
}
|
|
12494
12535
|
|
|
12495
|
-
return
|
|
12536
|
+
return null;
|
|
12496
12537
|
});
|
|
12497
12538
|
/**
|
|
12498
12539
|
* Check that array prop length matches props.data.length
|
|
@@ -12503,7 +12544,7 @@ var matchDataLength = makeChainable(function (props, propName) {
|
|
|
12503
12544
|
return new Error("Length of data and ".concat(propName, " arrays must match."));
|
|
12504
12545
|
}
|
|
12505
12546
|
|
|
12506
|
-
return
|
|
12547
|
+
return null;
|
|
12507
12548
|
});
|
|
12508
12549
|
/**
|
|
12509
12550
|
* Check that the value is a regular expression
|
|
@@ -12514,8 +12555,9 @@ var regExp = makeChainable(function (props, propName, componentName) {
|
|
|
12514
12555
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a regular expression."));
|
|
12515
12556
|
}
|
|
12516
12557
|
|
|
12517
|
-
return
|
|
12558
|
+
return null;
|
|
12518
12559
|
});
|
|
12560
|
+
//# sourceMappingURL=prop-types.js.map
|
|
12519
12561
|
|
|
12520
12562
|
/***/ }),
|
|
12521
12563
|
|
|
@@ -12533,7 +12575,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12533
12575
|
/* harmony export */ "getScaleFromName": () => (/* binding */ getScaleFromName),
|
|
12534
12576
|
/* harmony export */ "getScaleFromProps": () => (/* binding */ getScaleFromProps),
|
|
12535
12577
|
/* harmony export */ "getScaleType": () => (/* binding */ getScaleType),
|
|
12536
|
-
/* harmony export */ "getType": () => (/* binding */ getType)
|
|
12578
|
+
/* harmony export */ "getType": () => (/* binding */ getType),
|
|
12579
|
+
/* harmony export */ "validScale": () => (/* binding */ validScale)
|
|
12537
12580
|
/* harmony export */ });
|
|
12538
12581
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
|
|
12539
12582
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -12551,8 +12594,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12551
12594
|
|
|
12552
12595
|
|
|
12553
12596
|
|
|
12554
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
12597
|
+
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
12555
12598
|
|
|
12599
|
+
// Private Functions
|
|
12556
12600
|
function toNewName(scale) {
|
|
12557
12601
|
// d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
|
|
12558
12602
|
var capitalize = function (s) {
|
|
@@ -12622,7 +12666,13 @@ function getScaleTypeFromData(props, axis) {
|
|
|
12622
12666
|
|
|
12623
12667
|
|
|
12624
12668
|
function getScaleFromName(name) {
|
|
12625
|
-
|
|
12669
|
+
if (validScale(name)) {
|
|
12670
|
+
var methodName = toNewName(name); // @ts-expect-error scaleTime is not directly compatible with our D3Scale definition
|
|
12671
|
+
|
|
12672
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_5__[methodName]();
|
|
12673
|
+
}
|
|
12674
|
+
|
|
12675
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
12626
12676
|
}
|
|
12627
12677
|
function getBaseScale(props, axis) {
|
|
12628
12678
|
var scale = getScaleFromProps(props, axis);
|
|
@@ -12632,7 +12682,7 @@ function getBaseScale(props, axis) {
|
|
|
12632
12682
|
}
|
|
12633
12683
|
|
|
12634
12684
|
var defaultScale = getScaleFromDomain(props, axis) || getScaleTypeFromData(props, axis);
|
|
12635
|
-
return
|
|
12685
|
+
return getScaleFromName(defaultScale);
|
|
12636
12686
|
}
|
|
12637
12687
|
function getDefaultScale() {
|
|
12638
12688
|
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
@@ -12645,7 +12695,7 @@ function getScaleFromProps(props, axis) {
|
|
|
12645
12695
|
var scale = props.scale[axis] || props.scale;
|
|
12646
12696
|
|
|
12647
12697
|
if (validScale(scale)) {
|
|
12648
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale :
|
|
12698
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale : getScaleFromName(scale);
|
|
12649
12699
|
}
|
|
12650
12700
|
|
|
12651
12701
|
return undefined;
|
|
@@ -12680,6 +12730,7 @@ function getType(scale) {
|
|
|
12680
12730
|
})[0];
|
|
12681
12731
|
return scaleType ? scaleType.name : undefined;
|
|
12682
12732
|
}
|
|
12733
|
+
//# sourceMappingURL=scale.js.map
|
|
12683
12734
|
|
|
12684
12735
|
/***/ }),
|
|
12685
12736
|
|
|
@@ -12751,6 +12802,7 @@ function getColorScale(name) {
|
|
|
12751
12802
|
};
|
|
12752
12803
|
return name ? scales[name] : scales.grayscale;
|
|
12753
12804
|
}
|
|
12805
|
+
//# sourceMappingURL=style.js.map
|
|
12754
12806
|
|
|
12755
12807
|
/***/ }),
|
|
12756
12808
|
|
|
@@ -12955,8 +13007,10 @@ var _getSizeWithRotate = function (axisSize, dependentSize, angle) {
|
|
|
12955
13007
|
|
|
12956
13008
|
|
|
12957
13009
|
var convertLengthToPixels = function (length, fontSize) {
|
|
12958
|
-
var
|
|
12959
|
-
|
|
13010
|
+
var _length$match;
|
|
13011
|
+
|
|
13012
|
+
var attribute = (_length$match = length.match(/[a-zA-Z%]+/)) === null || _length$match === void 0 ? void 0 : _length$match[0];
|
|
13013
|
+
var value = Number(length.match(/[0-9.,]+/));
|
|
12960
13014
|
var result;
|
|
12961
13015
|
|
|
12962
13016
|
if (!attribute) {
|
|
@@ -13022,9 +13076,9 @@ var _approximateTextHeightInternal = function (text, style) {
|
|
|
13022
13076
|
var height = containsCaps ? lineStyle.fontSize * coefficients.lineCapitalCoef : lineStyle.fontSize;
|
|
13023
13077
|
return total + lineStyle.lineHeight * height;
|
|
13024
13078
|
}, 0);
|
|
13025
|
-
};
|
|
13026
|
-
|
|
13079
|
+
};
|
|
13027
13080
|
|
|
13081
|
+
// Stubbable implementation.
|
|
13028
13082
|
var _approximateTextSizeInternal = {
|
|
13029
13083
|
impl: function (text, style) {
|
|
13030
13084
|
var angle = Array.isArray(style) ? style[0] && style[0].angle : style && style.angle;
|
|
@@ -13043,7 +13097,7 @@ var _approximateTextSizeInternal = {
|
|
|
13043
13097
|
};
|
|
13044
13098
|
/**
|
|
13045
13099
|
* Predict text size by font params.
|
|
13046
|
-
* @param {string} text Content for width calculation.
|
|
13100
|
+
* @param {string|string[]} text Content for width calculation.
|
|
13047
13101
|
* @param {Object} style Text styles, ,fontFamily, fontSize, etc.
|
|
13048
13102
|
* @param {string} style.fontFamily Text fontFamily.
|
|
13049
13103
|
* @param {(number|string)} style.fontSize Text fontSize.
|
|
@@ -13056,6 +13110,7 @@ var _approximateTextSizeInternal = {
|
|
|
13056
13110
|
var approximateTextSize = function (text, style) {
|
|
13057
13111
|
return _approximateTextSizeInternal.impl(text, style);
|
|
13058
13112
|
};
|
|
13113
|
+
//# sourceMappingURL=textsize.js.map
|
|
13059
13114
|
|
|
13060
13115
|
/***/ }),
|
|
13061
13116
|
|
|
@@ -13086,6 +13141,7 @@ var TimerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cre
|
|
|
13086
13141
|
});
|
|
13087
13142
|
TimerContext.displayName = "TimerContext";
|
|
13088
13143
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimerContext);
|
|
13144
|
+
//# sourceMappingURL=timer-context.js.map
|
|
13089
13145
|
|
|
13090
13146
|
/***/ }),
|
|
13091
13147
|
|
|
@@ -13188,6 +13244,7 @@ var Timer = /*#__PURE__*/function () {
|
|
|
13188
13244
|
}();
|
|
13189
13245
|
|
|
13190
13246
|
|
|
13247
|
+
//# sourceMappingURL=timer.js.map
|
|
13191
13248
|
|
|
13192
13249
|
/***/ }),
|
|
13193
13250
|
|
|
@@ -13278,7 +13335,7 @@ function getChildData(child) {
|
|
|
13278
13335
|
}
|
|
13279
13336
|
/**
|
|
13280
13337
|
* If a parent component has animation enabled, calculate the transitions
|
|
13281
|
-
* for any data of any child component that supports data transitions
|
|
13338
|
+
* for any data of any child component that supports data transitions.
|
|
13282
13339
|
* Data transitions are defined as any two datasets where data nodes exist
|
|
13283
13340
|
* in the first set and not the second, in the second and not the first,
|
|
13284
13341
|
* or both.
|
|
@@ -13407,7 +13464,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
13407
13464
|
|
|
13408
13465
|
if (exitingNodes) {
|
|
13409
13466
|
// After the exit transition occurs, trigger the animations for
|
|
13410
|
-
// nodes that are neither exiting
|
|
13467
|
+
// nodes that are neither exiting nor entering.
|
|
13411
13468
|
animate.onEnd = cb;
|
|
13412
13469
|
var before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onExit.before function.
|
|
13413
13470
|
|
|
@@ -13477,7 +13534,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
13477
13534
|
* and its index in the parent's children array.
|
|
13478
13535
|
*
|
|
13479
13536
|
* In particular, this will include an `animate` object that is set appropriately
|
|
13480
|
-
* so that each child will be
|
|
13537
|
+
* so that each child will be synchronized for each stage of a transition
|
|
13481
13538
|
* animation. It will also include a transformed `data` object, where each datum
|
|
13482
13539
|
* is transformed by `animate.onExit` and `animate.onEnter` `before` and `after`
|
|
13483
13540
|
* functions.
|
|
@@ -13622,6 +13679,7 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
13622
13679
|
};
|
|
13623
13680
|
};
|
|
13624
13681
|
}
|
|
13682
|
+
//# sourceMappingURL=transitions.js.map
|
|
13625
13683
|
|
|
13626
13684
|
/***/ }),
|
|
13627
13685
|
|
|
@@ -13660,7 +13718,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
13660
13718
|
|
|
13661
13719
|
/*
|
|
13662
13720
|
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
13663
|
-
The startsWidth array will contain the start of any accepted user-prop that
|
|
13721
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
13664
13722
|
starts with these characters.
|
|
13665
13723
|
The exactMatch will contain a list of exact prop names that are accepted.
|
|
13666
13724
|
*/
|
|
@@ -13669,6 +13727,7 @@ var USER_PROPS_SAFELIST = {
|
|
|
13669
13727
|
startsWith: ["data-", "aria-"],
|
|
13670
13728
|
exactMatch: []
|
|
13671
13729
|
};
|
|
13730
|
+
|
|
13672
13731
|
/**
|
|
13673
13732
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
13674
13733
|
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
@@ -13677,7 +13736,6 @@ var USER_PROPS_SAFELIST = {
|
|
|
13677
13736
|
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
13678
13737
|
* otherwise
|
|
13679
13738
|
*/
|
|
13680
|
-
|
|
13681
13739
|
var doesPropStartWith = function (key) {
|
|
13682
13740
|
var startsWith = false;
|
|
13683
13741
|
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
@@ -13754,14 +13812,15 @@ var getSafeUserProps = function (props) {
|
|
|
13754
13812
|
/**
|
|
13755
13813
|
* Wraps a component and adds safe user props
|
|
13756
13814
|
*
|
|
13757
|
-
* @param {
|
|
13815
|
+
* @param {ReactElement} component: parent component
|
|
13758
13816
|
* @param {Object} props: props to be filtered
|
|
13759
|
-
* @returns {
|
|
13817
|
+
* @returns {ReactElement} modified component
|
|
13760
13818
|
*/
|
|
13761
13819
|
|
|
13762
13820
|
var withSafeUserProps = function (component, props) {
|
|
13763
13821
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(component, getSafeUserProps(props));
|
|
13764
13822
|
};
|
|
13823
|
+
//# sourceMappingURL=user-props.js.map
|
|
13765
13824
|
|
|
13766
13825
|
/***/ }),
|
|
13767
13826
|
|