victory-errorbar 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-errorbar.js +235 -171
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.js +2 -1
- package/es/helper-methods.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +2 -1
- package/es/victory-errorbar.js +2 -1
- package/lib/error-bar.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/victory-errorbar.js +2 -1
- package/package.json +3 -3
- package/src/error-bar.js +10 -10
- package/src/helper-methods.js +13 -13
- package/src/index.d.ts +1 -1
- package/src/victory-errorbar.js +11 -11
package/dist/victory-errorbar.js
CHANGED
|
@@ -151,7 +151,7 @@ var ErrorBar = function (props) {
|
|
|
151
151
|
}, userProps), children);
|
|
152
152
|
};
|
|
153
153
|
|
|
154
|
-
ErrorBar.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.primitiveProps), {}, {
|
|
154
|
+
ErrorBar.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.primitiveProps), {}, {
|
|
155
155
|
borderWidth: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),
|
|
156
156
|
datum: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
|
|
157
157
|
errorX: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool)]),
|
|
@@ -561,7 +561,7 @@ VictoryErrorBar.animationWhitelist = ["data", "domain", "height", "padding", "sa
|
|
|
561
561
|
VictoryErrorBar.displayName = "VictoryErrorBar";
|
|
562
562
|
VictoryErrorBar.role = "errorbar";
|
|
563
563
|
VictoryErrorBar.defaultTransitions = victory_core__WEBPACK_IMPORTED_MODULE_3__.discreteTransitions();
|
|
564
|
-
VictoryErrorBar.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.dataProps), {}, {
|
|
564
|
+
VictoryErrorBar.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.dataProps), {}, {
|
|
565
565
|
borderWidth: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),
|
|
566
566
|
errorX: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().func), victory_core__WEBPACK_IMPORTED_MODULE_6__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_6__.integer, victory_core__WEBPACK_IMPORTED_MODULE_6__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), prop_types__WEBPACK_IMPORTED_MODULE_5___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_5___default().string))]),
|
|
567
567
|
errorY: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().func), victory_core__WEBPACK_IMPORTED_MODULE_6__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_6__.integer, victory_core__WEBPACK_IMPORTED_MODULE_6__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), prop_types__WEBPACK_IMPORTED_MODULE_5___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_5___default().string))]),
|
|
@@ -588,7 +588,7 @@ VictoryErrorBar.getBaseProps = function (props) {
|
|
|
588
588
|
};
|
|
589
589
|
|
|
590
590
|
VictoryErrorBar.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
591
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_12__
|
|
591
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_12__.addEvents)(VictoryErrorBar));
|
|
592
592
|
|
|
593
593
|
/***/ }),
|
|
594
594
|
|
|
@@ -7155,7 +7155,7 @@ var isInterpolatable = function (obj) {
|
|
|
7155
7155
|
// component is only going to call the function (in which case it's
|
|
7156
7156
|
// safely interpolatable) or if it's going to access special properties
|
|
7157
7157
|
// (in which case our function generated from `interpolateFunction` will
|
|
7158
|
-
// most likely cause an error. We could check for enumerable properties
|
|
7158
|
+
// most likely cause an error). We could check for enumerable properties
|
|
7159
7159
|
// on the function object here to see if it's a "plain" function, but
|
|
7160
7160
|
// let's just require that components prevent such function props from
|
|
7161
7161
|
// being animated in the first place.
|
|
@@ -7320,16 +7320,18 @@ var victoryInterpolator = function (a, b) {
|
|
|
7320
7320
|
}
|
|
7321
7321
|
|
|
7322
7322
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(b)) {
|
|
7323
|
-
// @ts-expect-error These generics are tough, but they work
|
|
7323
|
+
// @ts-expect-error These generics are tough, but they work :)
|
|
7324
7324
|
return interpolateObject(a, b);
|
|
7325
7325
|
}
|
|
7326
7326
|
|
|
7327
7327
|
if (typeof a === "string" || typeof b === "string") {
|
|
7328
7328
|
return interpolateString(a, b);
|
|
7329
|
-
}
|
|
7329
|
+
} // @ts-expect-error These generics are tough, but they work :)
|
|
7330
|
+
|
|
7330
7331
|
|
|
7331
7332
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b);
|
|
7332
7333
|
};
|
|
7334
|
+
//# sourceMappingURL=util.js.map
|
|
7333
7335
|
|
|
7334
7336
|
/***/ }),
|
|
7335
7337
|
|
|
@@ -7592,6 +7594,7 @@ VictoryAnimation.defaultProps = {
|
|
|
7592
7594
|
easing: "quadInOut"
|
|
7593
7595
|
};
|
|
7594
7596
|
VictoryAnimation.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
7597
|
+
//# sourceMappingURL=victory-animation.js.map
|
|
7595
7598
|
|
|
7596
7599
|
/***/ }),
|
|
7597
7600
|
|
|
@@ -7905,6 +7908,7 @@ VictoryContainer.defaultProps = {
|
|
|
7905
7908
|
role: "img"
|
|
7906
7909
|
};
|
|
7907
7910
|
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
7911
|
+
//# sourceMappingURL=victory-container.js.map
|
|
7908
7912
|
|
|
7909
7913
|
/***/ }),
|
|
7910
7914
|
|
|
@@ -8510,10 +8514,9 @@ VictoryLabel.propTypes = {
|
|
|
8510
8514
|
inline: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8511
8515
|
labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["parallel", "perpendicular", "vertical"]),
|
|
8512
8516
|
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)]),
|
|
8513
|
-
// @ts-expect-error "x is required in origin"
|
|
8514
8517
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
|
|
8515
|
-
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative,
|
|
8516
|
-
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative
|
|
8518
|
+
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired,
|
|
8519
|
+
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired
|
|
8517
8520
|
}),
|
|
8518
8521
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8519
8522
|
renderInPortal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
@@ -8547,6 +8550,7 @@ VictoryLabel.defaultProps = {
|
|
|
8547
8550
|
// Magic number from d3.
|
|
8548
8551
|
lineHeight: 1
|
|
8549
8552
|
};
|
|
8553
|
+
//# sourceMappingURL=victory-label.js.map
|
|
8550
8554
|
|
|
8551
8555
|
/***/ }),
|
|
8552
8556
|
|
|
@@ -8571,6 +8575,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8571
8575
|
*/
|
|
8572
8576
|
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
8573
8577
|
PortalContext.displayName = "PortalContext";
|
|
8578
|
+
//# sourceMappingURL=portal-context.js.map
|
|
8574
8579
|
|
|
8575
8580
|
/***/ }),
|
|
8576
8581
|
|
|
@@ -8682,6 +8687,7 @@ Portal.propTypes = {
|
|
|
8682
8687
|
viewBox: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8683
8688
|
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_3__.nonNegative
|
|
8684
8689
|
};
|
|
8690
|
+
//# sourceMappingURL=portal.js.map
|
|
8685
8691
|
|
|
8686
8692
|
/***/ }),
|
|
8687
8693
|
|
|
@@ -8825,6 +8831,7 @@ VictoryPortal.defaultProps = {
|
|
|
8825
8831
|
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
8826
8832
|
};
|
|
8827
8833
|
VictoryPortal.contextType = _portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext;
|
|
8834
|
+
//# sourceMappingURL=victory-portal.js.map
|
|
8828
8835
|
|
|
8829
8836
|
/***/ }),
|
|
8830
8837
|
|
|
@@ -8867,6 +8874,7 @@ var Line = function (props) {
|
|
|
8867
8874
|
vectorEffect: "non-scaling-stroke"
|
|
8868
8875
|
}, rest));
|
|
8869
8876
|
};
|
|
8877
|
+
//# sourceMappingURL=line.js.map
|
|
8870
8878
|
|
|
8871
8879
|
/***/ }),
|
|
8872
8880
|
|
|
@@ -8909,6 +8917,7 @@ var Rect = function (props) {
|
|
|
8909
8917
|
vectorEffect: "non-scaling-stroke"
|
|
8910
8918
|
}, rest));
|
|
8911
8919
|
};
|
|
8920
|
+
//# sourceMappingURL=rect.js.map
|
|
8912
8921
|
|
|
8913
8922
|
/***/ }),
|
|
8914
8923
|
|
|
@@ -8952,6 +8961,7 @@ Text.propTypes = {
|
|
|
8952
8961
|
desc: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8953
8962
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
8954
8963
|
};
|
|
8964
|
+
//# sourceMappingURL=text.js.map
|
|
8955
8965
|
|
|
8956
8966
|
/***/ }),
|
|
8957
8967
|
|
|
@@ -8976,6 +8986,7 @@ var TSpan = function (props) {
|
|
|
8976
8986
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tspan", props)
|
|
8977
8987
|
);
|
|
8978
8988
|
};
|
|
8989
|
+
//# sourceMappingURL=tspan.js.map
|
|
8979
8990
|
|
|
8980
8991
|
/***/ }),
|
|
8981
8992
|
|
|
@@ -9251,6 +9262,7 @@ var grayscale = {
|
|
|
9251
9262
|
}
|
|
9252
9263
|
}, baseProps)
|
|
9253
9264
|
};
|
|
9265
|
+
//# sourceMappingURL=grayscale.js.map
|
|
9254
9266
|
|
|
9255
9267
|
/***/ }),
|
|
9256
9268
|
|
|
@@ -9553,6 +9565,7 @@ var material = {
|
|
|
9553
9565
|
}
|
|
9554
9566
|
}, baseProps)
|
|
9555
9567
|
};
|
|
9568
|
+
//# sourceMappingURL=material.js.map
|
|
9556
9569
|
|
|
9557
9570
|
/***/ }),
|
|
9558
9571
|
|
|
@@ -9576,6 +9589,7 @@ var VictoryTheme = {
|
|
|
9576
9589
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
9577
9590
|
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
9578
9591
|
};
|
|
9592
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
9579
9593
|
|
|
9580
9594
|
/***/ }),
|
|
9581
9595
|
|
|
@@ -9844,6 +9858,7 @@ VictoryTransition.propTypes = {
|
|
|
9844
9858
|
children: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().node)
|
|
9845
9859
|
};
|
|
9846
9860
|
VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
9861
|
+
//# sourceMappingURL=victory-transition.js.map
|
|
9847
9862
|
|
|
9848
9863
|
/***/ }),
|
|
9849
9864
|
|
|
@@ -9856,26 +9871,26 @@ VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MO
|
|
|
9856
9871
|
"use strict";
|
|
9857
9872
|
__webpack_require__.r(__webpack_exports__);
|
|
9858
9873
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9859
|
-
/* harmony export */ "
|
|
9874
|
+
/* harmony export */ "addEvents": () => (/* binding */ addEvents)
|
|
9860
9875
|
/* harmony export */ });
|
|
9861
|
-
/* harmony import */ var
|
|
9862
|
-
/* harmony import */ var
|
|
9863
|
-
/* harmony import */ var
|
|
9864
|
-
/* harmony import */ var
|
|
9865
|
-
/* harmony import */ var
|
|
9866
|
-
/* harmony import */ var
|
|
9867
|
-
/* harmony import */ var
|
|
9868
|
-
/* harmony import */ var
|
|
9869
|
-
/* harmony import */ var
|
|
9870
|
-
/* harmony import */ var
|
|
9871
|
-
/* harmony import */ var
|
|
9872
|
-
/* harmony import */ var
|
|
9873
|
-
/* harmony import */ var
|
|
9874
|
-
/* harmony import */ var
|
|
9875
|
-
/* harmony import */ var
|
|
9876
|
-
/* harmony import */ var
|
|
9877
|
-
/* harmony import */ var
|
|
9878
|
-
/* harmony import */ var
|
|
9876
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/without */ "../../../node_modules/lodash/without.js");
|
|
9877
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_without__WEBPACK_IMPORTED_MODULE_0__);
|
|
9878
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/lodash/pick.js");
|
|
9879
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_1__);
|
|
9880
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/keys */ "../../../node_modules/lodash/keys.js");
|
|
9881
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_2__);
|
|
9882
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isNil */ "../../../node_modules/lodash/isNil.js");
|
|
9883
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_3__);
|
|
9884
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isFunction */ "../../../node_modules/lodash/isFunction.js");
|
|
9885
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__);
|
|
9886
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/lodash/isEmpty.js");
|
|
9887
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__);
|
|
9888
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/difference */ "../../../node_modules/lodash/difference.js");
|
|
9889
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_difference__WEBPACK_IMPORTED_MODULE_6__);
|
|
9890
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/lodash/defaults.js");
|
|
9891
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_7__);
|
|
9892
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/lodash/assign.js");
|
|
9893
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_8__);
|
|
9879
9894
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "react");
|
|
9880
9895
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
|
9881
9896
|
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
@@ -9928,13 +9943,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9928
9943
|
|
|
9929
9944
|
|
|
9930
9945
|
|
|
9931
|
-
|
|
9946
|
+
|
|
9947
|
+
|
|
9948
|
+
// DISCLAIMER:
|
|
9932
9949
|
// This file is not currently tested, and it is first on the list of files
|
|
9933
9950
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
9934
9951
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
9935
|
-
|
|
9936
9952
|
var datumHasXandY = function (datum) {
|
|
9937
|
-
return !
|
|
9953
|
+
return !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._x) && !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._y);
|
|
9938
9954
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
9939
9955
|
|
|
9940
9956
|
|
|
@@ -9946,44 +9962,45 @@ var defaultComponents = [{
|
|
|
9946
9962
|
}, {
|
|
9947
9963
|
name: "labels"
|
|
9948
9964
|
}];
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9965
|
+
function addEvents(WrappedComponent) {
|
|
9966
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9967
|
+
|
|
9968
|
+
// @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
|
|
9969
|
+
var AddEventsMixin = /*#__PURE__*/function (_WrappedComponent) {
|
|
9970
|
+
_inherits(AddEventsMixin, _WrappedComponent);
|
|
9952
9971
|
|
|
9953
|
-
var _super = _createSuper(
|
|
9972
|
+
var _super = _createSuper(AddEventsMixin);
|
|
9954
9973
|
|
|
9955
|
-
function
|
|
9974
|
+
function AddEventsMixin(props) {
|
|
9956
9975
|
var _this;
|
|
9957
9976
|
|
|
9958
|
-
_classCallCheck(this,
|
|
9977
|
+
_classCallCheck(this, AddEventsMixin);
|
|
9959
9978
|
|
|
9960
9979
|
_this = _super.call(this, props);
|
|
9961
|
-
var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9962
|
-
var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
|
|
9963
9980
|
_this.state = {};
|
|
9981
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
9982
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9964
9983
|
|
|
9965
9984
|
_this.getEvents = function (p, target, eventKey) {
|
|
9966
|
-
return
|
|
9985
|
+
return _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
9967
9986
|
};
|
|
9968
9987
|
|
|
9969
|
-
_this.
|
|
9970
|
-
|
|
9971
|
-
var calculatedValues = _this.getCalculatedValues(props);
|
|
9972
|
-
|
|
9973
|
-
_this.cacheValues(calculatedValues);
|
|
9974
|
-
|
|
9975
|
-
_this.externalMutations = _this.getExternalMutations(props);
|
|
9976
|
-
_this.calculatedState = _this.getStateChanges(props);
|
|
9988
|
+
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
9989
|
+
_this.calculatedState = _this.getStateChanges(_this.props);
|
|
9977
9990
|
_this.globalEvents = {};
|
|
9978
9991
|
_this.prevGlobalEventKeys = [];
|
|
9979
9992
|
_this.boundGlobalEvents = {};
|
|
9993
|
+
|
|
9994
|
+
_this.cacheValues(_this.getCalculatedValues(props));
|
|
9995
|
+
|
|
9980
9996
|
return _this;
|
|
9981
9997
|
}
|
|
9982
9998
|
|
|
9983
|
-
_createClass(
|
|
9999
|
+
_createClass(AddEventsMixin, [{
|
|
9984
10000
|
key: "shouldComponentUpdate",
|
|
9985
10001
|
value: function shouldComponentUpdate(nextProps) {
|
|
9986
|
-
var externalMutations = this.getExternalMutations(nextProps);
|
|
10002
|
+
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
10003
|
+
|
|
9987
10004
|
var animating = this.props.animating || this.props.animate;
|
|
9988
10005
|
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
|
|
9989
10006
|
|
|
@@ -10013,7 +10030,7 @@ var defaultComponents = [{
|
|
|
10013
10030
|
value: function componentDidMount() {
|
|
10014
10031
|
var _this2 = this;
|
|
10015
10032
|
|
|
10016
|
-
var globalEventKeys =
|
|
10033
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
10017
10034
|
|
|
10018
10035
|
globalEventKeys.forEach(function (key) {
|
|
10019
10036
|
return _this2.addGlobalListener(key);
|
|
@@ -10028,15 +10045,15 @@ var defaultComponents = [{
|
|
|
10028
10045
|
var calculatedState = this.getStateChanges(prevProps);
|
|
10029
10046
|
this.calculatedState = calculatedState;
|
|
10030
10047
|
|
|
10031
|
-
var globalEventKeys =
|
|
10048
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
10032
10049
|
|
|
10033
|
-
var removedGlobalEventKeys =
|
|
10050
|
+
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
10034
10051
|
|
|
10035
10052
|
removedGlobalEventKeys.forEach(function (key) {
|
|
10036
10053
|
return _this3.removeGlobalListener(key);
|
|
10037
10054
|
});
|
|
10038
10055
|
|
|
10039
|
-
var addedGlobalEventKeys =
|
|
10056
|
+
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
10040
10057
|
|
|
10041
10058
|
addedGlobalEventKeys.forEach(function (key) {
|
|
10042
10059
|
return _this3.addGlobalListener(key);
|
|
@@ -10082,12 +10099,11 @@ var defaultComponents = [{
|
|
|
10082
10099
|
}
|
|
10083
10100
|
|
|
10084
10101
|
var getState = function (key, type) {
|
|
10085
|
-
var result =
|
|
10102
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
10086
10103
|
|
|
10087
|
-
return
|
|
10104
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(result) ? undefined : result;
|
|
10088
10105
|
};
|
|
10089
10106
|
|
|
10090
|
-
options = options || {};
|
|
10091
10107
|
var components = options.components || defaultComponents;
|
|
10092
10108
|
var stateChanges = components.map(function (component) {
|
|
10093
10109
|
if (!props.standalone && component.name === "parent") {
|
|
@@ -10104,9 +10120,9 @@ var defaultComponents = [{
|
|
|
10104
10120
|
}, {
|
|
10105
10121
|
key: "applyExternalMutations",
|
|
10106
10122
|
value: function applyExternalMutations(props, externalMutations) {
|
|
10107
|
-
if (!
|
|
10123
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
|
|
10108
10124
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
10109
|
-
memo =
|
|
10125
|
+
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
10110
10126
|
return memo;
|
|
10111
10127
|
}, []);
|
|
10112
10128
|
var compiledCallbacks = callbacks.length ? function () {
|
|
@@ -10123,12 +10139,12 @@ var defaultComponents = [{
|
|
|
10123
10139
|
var sharedEvents = props.sharedEvents;
|
|
10124
10140
|
var components = WrappedComponent.expectedComponents;
|
|
10125
10141
|
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
10126
|
-
var getSharedEventState = sharedEvents &&
|
|
10142
|
+
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
10127
10143
|
return undefined;
|
|
10128
10144
|
};
|
|
10129
10145
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
10130
10146
|
|
|
10131
|
-
var dataKeys =
|
|
10147
|
+
var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(baseProps).filter(function (key) {
|
|
10132
10148
|
return key !== "parent";
|
|
10133
10149
|
});
|
|
10134
10150
|
|
|
@@ -10148,32 +10164,32 @@ var defaultComponents = [{
|
|
|
10148
10164
|
value: function getExternalMutations(props) {
|
|
10149
10165
|
var sharedEvents = props.sharedEvents,
|
|
10150
10166
|
externalEventMutations = props.externalEventMutations;
|
|
10151
|
-
return
|
|
10167
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
10152
10168
|
}
|
|
10153
10169
|
}, {
|
|
10154
10170
|
key: "cacheValues",
|
|
10155
10171
|
value: function cacheValues(obj) {
|
|
10156
10172
|
var _this7 = this;
|
|
10157
10173
|
|
|
10158
|
-
|
|
10174
|
+
lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(obj).forEach(function (key) {
|
|
10159
10175
|
_this7[key] = obj[key];
|
|
10160
10176
|
});
|
|
10161
10177
|
}
|
|
10162
10178
|
}, {
|
|
10163
10179
|
key: "getBaseProps",
|
|
10164
10180
|
value: function getBaseProps(props, getSharedEventState) {
|
|
10165
|
-
getSharedEventState = getSharedEventState || this.getSharedEventState;
|
|
10181
|
+
getSharedEventState = getSharedEventState || this.getSharedEventState.bind(this);
|
|
10166
10182
|
var sharedParentState = getSharedEventState("parent", "parent");
|
|
10167
10183
|
var parentState = this.getEventState("parent", "parent");
|
|
10168
10184
|
|
|
10169
|
-
var baseParentProps =
|
|
10185
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
|
|
10170
10186
|
|
|
10171
10187
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
10172
|
-
var parentProps = parentPropsList ?
|
|
10188
|
+
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_1___default()(baseParentProps, parentPropsList) : {};
|
|
10173
10189
|
|
|
10174
|
-
var modifiedProps =
|
|
10190
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentProps, props);
|
|
10175
10191
|
|
|
10176
|
-
return
|
|
10192
|
+
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
10177
10193
|
}
|
|
10178
10194
|
}, {
|
|
10179
10195
|
key: "getAllEvents",
|
|
@@ -10201,21 +10217,21 @@ var defaultComponents = [{
|
|
|
10201
10217
|
if (this.hasEvents) {
|
|
10202
10218
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
10203
10219
|
|
|
10204
|
-
var componentProps =
|
|
10220
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10205
10221
|
index: index,
|
|
10206
10222
|
key: id
|
|
10207
10223
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
10208
10224
|
id: id
|
|
10209
10225
|
});
|
|
10210
10226
|
|
|
10211
|
-
var events =
|
|
10227
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
10212
10228
|
|
|
10213
|
-
return
|
|
10229
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, componentProps, {
|
|
10214
10230
|
events: events
|
|
10215
10231
|
});
|
|
10216
10232
|
}
|
|
10217
10233
|
|
|
10218
|
-
return
|
|
10234
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10219
10235
|
index: index,
|
|
10220
10236
|
key: id
|
|
10221
10237
|
}, component.props, baseProps, {
|
|
@@ -10238,11 +10254,14 @@ var defaultComponents = [{
|
|
|
10238
10254
|
}, {
|
|
10239
10255
|
key: "animateComponent",
|
|
10240
10256
|
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
10241
|
-
var
|
|
10257
|
+
var _props$animate;
|
|
10258
|
+
|
|
10259
|
+
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
10260
|
+
var Comp = this.constructor;
|
|
10242
10261
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.VictoryTransition, {
|
|
10243
10262
|
animate: props.animate,
|
|
10244
10263
|
animationWhitelist: animationWhitelist
|
|
10245
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(
|
|
10264
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(Comp, props));
|
|
10246
10265
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
10247
10266
|
|
|
10248
10267
|
}, {
|
|
@@ -10254,7 +10273,7 @@ var defaultComponents = [{
|
|
|
10254
10273
|
labelComponent = props.labelComponent,
|
|
10255
10274
|
groupComponent = props.groupComponent;
|
|
10256
10275
|
|
|
10257
|
-
var dataKeys =
|
|
10276
|
+
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
|
|
10258
10277
|
|
|
10259
10278
|
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
10260
10279
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
@@ -10301,9 +10320,12 @@ var defaultComponents = [{
|
|
|
10301
10320
|
}
|
|
10302
10321
|
}]);
|
|
10303
10322
|
|
|
10304
|
-
return
|
|
10323
|
+
return AddEventsMixin;
|
|
10305
10324
|
}(WrappedComponent);
|
|
10306
|
-
|
|
10325
|
+
|
|
10326
|
+
return AddEventsMixin;
|
|
10327
|
+
}
|
|
10328
|
+
//# sourceMappingURL=add-events.js.map
|
|
10307
10329
|
|
|
10308
10330
|
/***/ }),
|
|
10309
10331
|
|
|
@@ -10337,7 +10359,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10337
10359
|
|
|
10338
10360
|
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; }
|
|
10339
10361
|
|
|
10340
|
-
/* eslint-disable no-use-before-define */
|
|
10341
10362
|
function isNonEmptyArray(collection) {
|
|
10342
10363
|
return Array.isArray(collection) && collection.length > 0;
|
|
10343
10364
|
}
|
|
@@ -10376,7 +10397,8 @@ function getMaxValue(arr) {
|
|
|
10376
10397
|
}
|
|
10377
10398
|
|
|
10378
10399
|
var array = arr.concat(values);
|
|
10379
|
-
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array)))
|
|
10400
|
+
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10401
|
+
: Math.max.apply(Math, _toConsumableArray(array));
|
|
10380
10402
|
}
|
|
10381
10403
|
function getMinValue(arr) {
|
|
10382
10404
|
for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -10384,8 +10406,10 @@ function getMinValue(arr) {
|
|
|
10384
10406
|
}
|
|
10385
10407
|
|
|
10386
10408
|
var array = arr.concat(values);
|
|
10387
|
-
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array)))
|
|
10409
|
+
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10410
|
+
: Math.min.apply(Math, _toConsumableArray(array));
|
|
10388
10411
|
}
|
|
10412
|
+
//# sourceMappingURL=collection.js.map
|
|
10389
10413
|
|
|
10390
10414
|
/***/ }),
|
|
10391
10415
|
|
|
@@ -10398,9 +10422,7 @@ function getMinValue(arr) {
|
|
|
10398
10422
|
"use strict";
|
|
10399
10423
|
__webpack_require__.r(__webpack_exports__);
|
|
10400
10424
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10401
|
-
/* harmony export */ "
|
|
10402
|
-
/* harmony export */ "dataProps": () => (/* binding */ dataProps),
|
|
10403
|
-
/* harmony export */ "primitiveProps": () => (/* binding */ primitiveProps)
|
|
10425
|
+
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
10404
10426
|
/* harmony export */ });
|
|
10405
10427
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
10406
10428
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -10408,26 +10430,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10408
10430
|
|
|
10409
10431
|
|
|
10410
10432
|
var dataProps = {
|
|
10433
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10411
10434
|
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({
|
|
10412
10435
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
10413
10436
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
10414
10437
|
})]),
|
|
10438
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10415
10439
|
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)]),
|
|
10416
10440
|
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10417
10441
|
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10418
10442
|
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10419
10443
|
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)]),
|
|
10420
10444
|
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10421
|
-
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))]),
|
|
10445
|
+
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))]),
|
|
10422
10446
|
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
10423
10447
|
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10424
10448
|
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10425
10449
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10426
10450
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10427
10451
|
}),
|
|
10428
|
-
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))]),
|
|
10429
|
-
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))]),
|
|
10430
|
-
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))])
|
|
10452
|
+
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))]),
|
|
10453
|
+
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))]),
|
|
10454
|
+
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))])
|
|
10431
10455
|
};
|
|
10432
10456
|
var baseProps = {
|
|
10433
10457
|
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)]),
|
|
@@ -10436,14 +10460,17 @@ var baseProps = {
|
|
|
10436
10460
|
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10437
10461
|
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10438
10462
|
})]),
|
|
10463
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10439
10464
|
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({
|
|
10440
10465
|
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)]),
|
|
10441
10466
|
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)])
|
|
10442
10467
|
})]),
|
|
10468
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10443
10469
|
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({
|
|
10444
10470
|
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)]),
|
|
10445
10471
|
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)])
|
|
10446
10472
|
})]),
|
|
10473
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10447
10474
|
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10448
10475
|
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))]),
|
|
10449
10476
|
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))])
|
|
@@ -10454,6 +10481,7 @@ var baseProps = {
|
|
|
10454
10481
|
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)]),
|
|
10455
10482
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10456
10483
|
})),
|
|
10484
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10457
10485
|
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10458
10486
|
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
10459
10487
|
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)]),
|
|
@@ -10464,10 +10492,12 @@ var baseProps = {
|
|
|
10464
10492
|
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10465
10493
|
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10466
10494
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
10495
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10467
10496
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10468
10497
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10469
10498
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
10470
10499
|
}),
|
|
10500
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10471
10501
|
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({
|
|
10472
10502
|
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10473
10503
|
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
@@ -10476,17 +10506,19 @@ var baseProps = {
|
|
|
10476
10506
|
})]),
|
|
10477
10507
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10478
10508
|
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10479
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10480
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10509
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
10510
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
10481
10511
|
})]),
|
|
10482
10512
|
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10483
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
10484
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
10513
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
10514
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
10485
10515
|
})]),
|
|
10516
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10486
10517
|
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10487
10518
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
10488
10519
|
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
10489
10520
|
}),
|
|
10521
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10490
10522
|
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({
|
|
10491
10523
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
10492
10524
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
@@ -10506,6 +10538,7 @@ var primitiveProps = {
|
|
|
10506
10538
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10507
10539
|
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)]),
|
|
10508
10540
|
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)]),
|
|
10541
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10509
10542
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10510
10543
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10511
10544
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
@@ -10521,6 +10554,12 @@ var primitiveProps = {
|
|
|
10521
10554
|
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)]),
|
|
10522
10555
|
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
10523
10556
|
};
|
|
10557
|
+
var CommonProps = {
|
|
10558
|
+
dataProps: dataProps,
|
|
10559
|
+
baseProps: baseProps,
|
|
10560
|
+
primitiveProps: primitiveProps
|
|
10561
|
+
};
|
|
10562
|
+
//# sourceMappingURL=common-props.js.map
|
|
10524
10563
|
|
|
10525
10564
|
/***/ }),
|
|
10526
10565
|
|
|
@@ -11034,6 +11073,7 @@ function isDataComponent(component) {
|
|
|
11034
11073
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
11035
11074
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_2___default()(whitelist, role);
|
|
11036
11075
|
}
|
|
11076
|
+
//# sourceMappingURL=data.js.map
|
|
11037
11077
|
|
|
11038
11078
|
/***/ }),
|
|
11039
11079
|
|
|
@@ -11156,6 +11196,7 @@ function discreteTransitions() {
|
|
|
11156
11196
|
}
|
|
11157
11197
|
};
|
|
11158
11198
|
}
|
|
11199
|
+
//# sourceMappingURL=default-transitions.js.map
|
|
11159
11200
|
|
|
11160
11201
|
/***/ }),
|
|
11161
11202
|
|
|
@@ -11257,8 +11298,9 @@ function getDomainPadding(props, axis) {
|
|
|
11257
11298
|
}
|
|
11258
11299
|
|
|
11259
11300
|
function getFlatData(dataset, axis) {
|
|
11301
|
+
var axisKey = "_".concat(axis);
|
|
11260
11302
|
return lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(dataset).map(function (datum) {
|
|
11261
|
-
return datum[
|
|
11303
|
+
return datum[axisKey] && datum[axisKey][1] !== undefined ? datum[axisKey][1] : datum[axisKey];
|
|
11262
11304
|
});
|
|
11263
11305
|
}
|
|
11264
11306
|
|
|
@@ -11323,7 +11365,9 @@ function padDomain(domain, props, axis) {
|
|
|
11323
11365
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
11324
11366
|
// Naive initial padding calculation
|
|
11325
11367
|
var initialPadding = {
|
|
11368
|
+
// @ts-expect-error `max/min` might be dates
|
|
11326
11369
|
left: Math.abs(max - min) * padding.left / rangeExtent,
|
|
11370
|
+
// @ts-expect-error `max/min` might be dates
|
|
11327
11371
|
right: Math.abs(max - min) * padding.right / rangeExtent
|
|
11328
11372
|
}; // Adjust the domain by the initial padding
|
|
11329
11373
|
|
|
@@ -11608,6 +11652,7 @@ function isDomainComponent(component) {
|
|
|
11608
11652
|
var whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
11609
11653
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_1___default()(whitelist, role);
|
|
11610
11654
|
}
|
|
11655
|
+
//# sourceMappingURL=domain.js.map
|
|
11611
11656
|
|
|
11612
11657
|
/***/ }),
|
|
11613
11658
|
|
|
@@ -11676,15 +11721,16 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
11676
11721
|
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; }
|
|
11677
11722
|
|
|
11678
11723
|
var GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
11724
|
+
|
|
11679
11725
|
/* Returns all own and shared events that should be attached to a single target element,
|
|
11680
11726
|
* i.e. an individual bar specified by target: "data", eventKey: [index].
|
|
11681
11727
|
* Returned events are scoped to the appropriate state. Either that of the component itself
|
|
11682
11728
|
* (i.e. VictoryBar) in the case of own events, or that of the parent component
|
|
11683
11729
|
* (i.e. VictoryChart) in the case of shared events
|
|
11684
11730
|
*/
|
|
11685
|
-
// eslint-disable-next-line max-params
|
|
11686
|
-
|
|
11687
|
-
|
|
11731
|
+
// eslint-disable-next-line max-params
|
|
11732
|
+
function getEvents(props, target, eventKey, // eslint-disable-next-line no-shadow
|
|
11733
|
+
getScopedEvents) {
|
|
11688
11734
|
var _this = this;
|
|
11689
11735
|
|
|
11690
11736
|
// Returns all events that apply to a particular target element
|
|
@@ -11907,24 +11953,27 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11907
11953
|
return memo;
|
|
11908
11954
|
}, {});
|
|
11909
11955
|
}
|
|
11910
|
-
/*
|
|
11956
|
+
/*
|
|
11957
|
+
* Returns a partially applied event handler for a specific target element
|
|
11911
11958
|
* This allows event handlers to have access to props controlling each element
|
|
11912
11959
|
*/
|
|
11913
11960
|
|
|
11914
11961
|
function getPartialEvents(events, eventKey, childProps) {
|
|
11915
|
-
|
|
11962
|
+
if (!events) return {};
|
|
11963
|
+
return lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(events).reduce(function (memo, eventName) {
|
|
11916
11964
|
var appliedEvent = function (evt) {
|
|
11917
11965
|
return events[eventName](evt, childProps, eventKey, eventName);
|
|
11918
11966
|
};
|
|
11919
11967
|
|
|
11920
11968
|
memo[eventName] = appliedEvent;
|
|
11921
11969
|
return memo;
|
|
11922
|
-
}, {})
|
|
11970
|
+
}, {});
|
|
11923
11971
|
}
|
|
11972
|
+
|
|
11924
11973
|
/* Returns the property of the state object corresponding to event changes for
|
|
11925
11974
|
* a particular element
|
|
11926
11975
|
*/
|
|
11927
|
-
|
|
11976
|
+
// eslint-disable-next-line max-params
|
|
11928
11977
|
function getEventState(eventKey, namespace, childType) {
|
|
11929
11978
|
// Mandatory usage: `getEventState.bind(this)`
|
|
11930
11979
|
// eslint-disable-next-line no-invalid-this
|
|
@@ -12109,6 +12158,7 @@ var emulateReactEvent = function (event) {
|
|
|
12109
12158
|
nativeEvent: event
|
|
12110
12159
|
});
|
|
12111
12160
|
};
|
|
12161
|
+
//# sourceMappingURL=events.js.map
|
|
12112
12162
|
|
|
12113
12163
|
/***/ }),
|
|
12114
12164
|
|
|
@@ -12190,7 +12240,7 @@ function getPolarRange(props, axis) {
|
|
|
12190
12240
|
|
|
12191
12241
|
/**
|
|
12192
12242
|
* creates an object with some keys excluded
|
|
12193
|
-
* replacement for lodash.omit for performance. does not
|
|
12243
|
+
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
12194
12244
|
* @param {Object} originalObject: created object will be based on this object
|
|
12195
12245
|
* @param {Array<String>} ks: an array of keys to omit from the new object
|
|
12196
12246
|
* @returns {Object} new object with same properties as originalObject
|
|
@@ -12203,6 +12253,7 @@ function omit(originalObject) {
|
|
|
12203
12253
|
var newObject = {};
|
|
12204
12254
|
|
|
12205
12255
|
for (var key in originalObject) {
|
|
12256
|
+
// @ts-expect-error String is not assignable to Key
|
|
12206
12257
|
if (ks.indexOf(key) >= 0) {
|
|
12207
12258
|
continue;
|
|
12208
12259
|
}
|
|
@@ -12435,7 +12486,9 @@ function reduceChildren(children, iteratee) {
|
|
|
12435
12486
|
var parentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12436
12487
|
var initialMemo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
12437
12488
|
var combine = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (memo, item) {
|
|
12438
|
-
return
|
|
12489
|
+
return (// @ts-expect-error These defaults are hard to type
|
|
12490
|
+
memo.concat(item)
|
|
12491
|
+
);
|
|
12439
12492
|
};
|
|
12440
12493
|
var sharedProps = ["data", "domain", "categories", "polar", "startAngle", "endAngle", "minDomain", "maxDomain", "horizontal"];
|
|
12441
12494
|
|
|
@@ -12479,7 +12532,7 @@ function reduceChildren(children, iteratee) {
|
|
|
12479
12532
|
/**
|
|
12480
12533
|
* @param {Object} props: the props object
|
|
12481
12534
|
* @returns {Boolean} returns true if the props object contains `horizontal: true` of if any
|
|
12482
|
-
* children or nested children are
|
|
12535
|
+
* children or nested children are horizontal
|
|
12483
12536
|
*/
|
|
12484
12537
|
|
|
12485
12538
|
function isHorizontal(props) {
|
|
@@ -12502,6 +12555,7 @@ function isHorizontal(props) {
|
|
|
12502
12555
|
|
|
12503
12556
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children));
|
|
12504
12557
|
}
|
|
12558
|
+
//# sourceMappingURL=helpers.js.map
|
|
12505
12559
|
|
|
12506
12560
|
/***/ }),
|
|
12507
12561
|
|
|
@@ -12545,15 +12599,16 @@ function isMap(x) {
|
|
|
12545
12599
|
return !!(x && x[IMMUTABLE_MAP]);
|
|
12546
12600
|
}
|
|
12547
12601
|
function shallowToJS(x, whitelist) {
|
|
12548
|
-
return isIterable(x) ? x.reduce(function (
|
|
12602
|
+
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
12549
12603
|
if (whitelist && whitelist[key]) {
|
|
12550
12604
|
curr = shallowToJS(curr);
|
|
12551
12605
|
}
|
|
12552
12606
|
|
|
12553
|
-
|
|
12554
|
-
return
|
|
12607
|
+
result[key] = curr;
|
|
12608
|
+
return result;
|
|
12555
12609
|
}, isList(x) ? [] : {}) : x;
|
|
12556
12610
|
}
|
|
12611
|
+
//# sourceMappingURL=immutable.js.map
|
|
12557
12612
|
|
|
12558
12613
|
/***/ }),
|
|
12559
12614
|
|
|
@@ -12811,6 +12866,7 @@ function getProps(props, index) {
|
|
|
12811
12866
|
var tooltipTheme = theme && theme.tooltip || {};
|
|
12812
12867
|
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelProps, _helpers__WEBPACK_IMPORTED_MODULE_1__.omit(tooltipTheme, ["style"]));
|
|
12813
12868
|
}
|
|
12869
|
+
//# sourceMappingURL=label-helpers.js.map
|
|
12814
12870
|
|
|
12815
12871
|
/***/ }),
|
|
12816
12872
|
|
|
@@ -12836,6 +12892,7 @@ function warn(message) {
|
|
|
12836
12892
|
}
|
|
12837
12893
|
}
|
|
12838
12894
|
}
|
|
12895
|
+
//# sourceMappingURL=log.js.map
|
|
12839
12896
|
|
|
12840
12897
|
/***/ }),
|
|
12841
12898
|
|
|
@@ -12863,12 +12920,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12863
12920
|
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0__);
|
|
12864
12921
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/find */ "../../../node_modules/lodash/find.js");
|
|
12865
12922
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
|
|
12866
|
-
/* harmony import */ var
|
|
12867
|
-
/* harmony import */ var
|
|
12868
|
-
/* harmony import */ var
|
|
12869
|
-
/* harmony import */ var
|
|
12870
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
12871
|
-
|
|
12923
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
12924
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
12925
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
12926
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
12872
12927
|
|
|
12873
12928
|
|
|
12874
12929
|
|
|
@@ -12876,6 +12931,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12876
12931
|
|
|
12877
12932
|
|
|
12878
12933
|
|
|
12934
|
+
|
|
12935
|
+
|
|
12879
12936
|
/**
|
|
12880
12937
|
* Return a new validator based on `validator` but with the option to chain
|
|
12881
12938
|
* `isRequired` onto the validation. This is nearly identical to how React
|
|
@@ -12883,30 +12940,30 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12883
12940
|
* @param {Function} validator Validation function.
|
|
12884
12941
|
* @returns {Function} Validator with `isRequired` option.
|
|
12885
12942
|
*/
|
|
12886
|
-
|
|
12887
12943
|
var makeChainable = function (validator) {
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12944
|
+
var createChainable = function (isRequired) {
|
|
12945
|
+
return function (props, propName, componentName) {
|
|
12946
|
+
var value = props[propName];
|
|
12891
12947
|
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12948
|
+
if (value === undefined || value === null) {
|
|
12949
|
+
if (isRequired) {
|
|
12950
|
+
return new Error("Required `".concat(propName, "` was not specified in `").concat(componentName, "`."));
|
|
12951
|
+
}
|
|
12896
12952
|
|
|
12897
|
-
|
|
12898
|
-
|
|
12953
|
+
return null;
|
|
12954
|
+
}
|
|
12899
12955
|
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12956
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
12957
|
+
rest[_key - 3] = arguments[_key];
|
|
12958
|
+
}
|
|
12903
12959
|
|
|
12904
|
-
|
|
12960
|
+
return validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12961
|
+
};
|
|
12905
12962
|
};
|
|
12906
12963
|
|
|
12907
|
-
var chainable =
|
|
12908
|
-
|
|
12909
|
-
|
|
12964
|
+
var chainable = Object.assign(createChainable(false), {
|
|
12965
|
+
isRequired: createChainable(true)
|
|
12966
|
+
});
|
|
12910
12967
|
return chainable;
|
|
12911
12968
|
};
|
|
12912
12969
|
|
|
@@ -12936,7 +12993,7 @@ var getConstructor = function (value) {
|
|
|
12936
12993
|
};
|
|
12937
12994
|
/**
|
|
12938
12995
|
* Get the name of the constructor used to create `value`, using
|
|
12939
|
-
* `Object.
|
|
12996
|
+
* `Object.prototype.toString`. If the value is null or undefined, return
|
|
12940
12997
|
* "null" or "undefined", respectively.
|
|
12941
12998
|
* @param {*} value Instance to return the constructor name of.
|
|
12942
12999
|
* @returns {String} Name of the constructor.
|
|
@@ -12966,10 +13023,11 @@ function deprecated(propType, explanation) {
|
|
|
12966
13023
|
var value = props[propName];
|
|
12967
13024
|
|
|
12968
13025
|
if (value !== null && value !== undefined) {
|
|
12969
|
-
|
|
13026
|
+
_log__WEBPACK_IMPORTED_MODULE_2__.warn("\"".concat(propName, "\" property of \"").concat(componentName, "\" has been deprecated ").concat(explanation));
|
|
12970
13027
|
}
|
|
12971
13028
|
|
|
12972
|
-
|
|
13029
|
+
prop_types__WEBPACK_IMPORTED_MODULE_3___default().checkPropTypes(_defineProperty({}, propName, propType), props, propName, componentName);
|
|
13030
|
+
return null;
|
|
12973
13031
|
};
|
|
12974
13032
|
}
|
|
12975
13033
|
/**
|
|
@@ -12988,7 +13046,7 @@ function allOfType(validators) {
|
|
|
12988
13046
|
|
|
12989
13047
|
return validators.reduce(function (result, validator) {
|
|
12990
13048
|
return result || validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12991
|
-
},
|
|
13049
|
+
}, null);
|
|
12992
13050
|
});
|
|
12993
13051
|
}
|
|
12994
13052
|
/**
|
|
@@ -13002,7 +13060,7 @@ var nonNegative = makeChainable(function (props, propName, componentName) {
|
|
|
13002
13060
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a non-negative number."));
|
|
13003
13061
|
}
|
|
13004
13062
|
|
|
13005
|
-
return
|
|
13063
|
+
return null;
|
|
13006
13064
|
});
|
|
13007
13065
|
/**
|
|
13008
13066
|
* Check that the value is an integer.
|
|
@@ -13015,7 +13073,7 @@ var integer = makeChainable(function (props, propName, componentName) {
|
|
|
13015
13073
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an integer."));
|
|
13016
13074
|
}
|
|
13017
13075
|
|
|
13018
|
-
return
|
|
13076
|
+
return null;
|
|
13019
13077
|
});
|
|
13020
13078
|
/**
|
|
13021
13079
|
* Check that the value is greater than zero.
|
|
@@ -13028,7 +13086,7 @@ var greaterThanZero = makeChainable(function (props, propName, componentName) {
|
|
|
13028
13086
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a number greater than zero."));
|
|
13029
13087
|
}
|
|
13030
13088
|
|
|
13031
|
-
return
|
|
13089
|
+
return null;
|
|
13032
13090
|
});
|
|
13033
13091
|
/**
|
|
13034
13092
|
* Check that the value is an Array of two unique values.
|
|
@@ -13041,32 +13099,20 @@ var domain = makeChainable(function (props, propName, componentName) {
|
|
|
13041
13099
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an array of two unique numeric values."));
|
|
13042
13100
|
}
|
|
13043
13101
|
|
|
13044
|
-
return
|
|
13102
|
+
return null;
|
|
13045
13103
|
});
|
|
13046
13104
|
/**
|
|
13047
13105
|
* Check that the value looks like a d3 `scale` function.
|
|
13048
13106
|
*/
|
|
13049
13107
|
|
|
13050
13108
|
var scale = makeChainable(function (props, propName, componentName) {
|
|
13051
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13052
|
-
|
|
13053
|
-
var validScale = function (scl) {
|
|
13054
|
-
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl)) {
|
|
13055
|
-
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);
|
|
13056
|
-
} else if (typeof scl === "string") {
|
|
13057
|
-
return supportedScaleStrings.indexOf(scl) !== -1;
|
|
13058
|
-
}
|
|
13059
|
-
|
|
13060
|
-
return false;
|
|
13061
|
-
};
|
|
13062
|
-
|
|
13063
13109
|
var value = props[propName];
|
|
13064
13110
|
|
|
13065
|
-
if (!validScale(value)) {
|
|
13111
|
+
if (!_scale__WEBPACK_IMPORTED_MODULE_4__.validScale(value)) {
|
|
13066
13112
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a d3 scale."));
|
|
13067
13113
|
}
|
|
13068
13114
|
|
|
13069
|
-
return
|
|
13115
|
+
return null;
|
|
13070
13116
|
});
|
|
13071
13117
|
/**
|
|
13072
13118
|
* Check that an array contains items of the same type.
|
|
@@ -13080,7 +13126,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
13080
13126
|
}
|
|
13081
13127
|
|
|
13082
13128
|
if (values.length < 2) {
|
|
13083
|
-
return
|
|
13129
|
+
return null;
|
|
13084
13130
|
}
|
|
13085
13131
|
|
|
13086
13132
|
var comparisonConstructor = getConstructor(values[0]);
|
|
@@ -13095,7 +13141,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
13095
13141
|
return new Error("Expected `".concat(propName, "` in `").concat(componentName, "` to be a ") + "homogeneous array, but found types `".concat(constructorName, "` and ") + "`".concat(otherConstructorName, "`."));
|
|
13096
13142
|
}
|
|
13097
13143
|
|
|
13098
|
-
return
|
|
13144
|
+
return null;
|
|
13099
13145
|
});
|
|
13100
13146
|
/**
|
|
13101
13147
|
* Check that array prop length matches props.data.length
|
|
@@ -13106,7 +13152,7 @@ var matchDataLength = makeChainable(function (props, propName) {
|
|
|
13106
13152
|
return new Error("Length of data and ".concat(propName, " arrays must match."));
|
|
13107
13153
|
}
|
|
13108
13154
|
|
|
13109
|
-
return
|
|
13155
|
+
return null;
|
|
13110
13156
|
});
|
|
13111
13157
|
/**
|
|
13112
13158
|
* Check that the value is a regular expression
|
|
@@ -13117,8 +13163,9 @@ var regExp = makeChainable(function (props, propName, componentName) {
|
|
|
13117
13163
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a regular expression."));
|
|
13118
13164
|
}
|
|
13119
13165
|
|
|
13120
|
-
return
|
|
13166
|
+
return null;
|
|
13121
13167
|
});
|
|
13168
|
+
//# sourceMappingURL=prop-types.js.map
|
|
13122
13169
|
|
|
13123
13170
|
/***/ }),
|
|
13124
13171
|
|
|
@@ -13136,7 +13183,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13136
13183
|
/* harmony export */ "getScaleFromName": () => (/* binding */ getScaleFromName),
|
|
13137
13184
|
/* harmony export */ "getScaleFromProps": () => (/* binding */ getScaleFromProps),
|
|
13138
13185
|
/* harmony export */ "getScaleType": () => (/* binding */ getScaleType),
|
|
13139
|
-
/* harmony export */ "getType": () => (/* binding */ getType)
|
|
13186
|
+
/* harmony export */ "getType": () => (/* binding */ getType),
|
|
13187
|
+
/* harmony export */ "validScale": () => (/* binding */ validScale)
|
|
13140
13188
|
/* harmony export */ });
|
|
13141
13189
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
|
|
13142
13190
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -13154,8 +13202,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13154
13202
|
|
|
13155
13203
|
|
|
13156
13204
|
|
|
13157
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13205
|
+
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13158
13206
|
|
|
13207
|
+
// Private Functions
|
|
13159
13208
|
function toNewName(scale) {
|
|
13160
13209
|
// d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
|
|
13161
13210
|
var capitalize = function (s) {
|
|
@@ -13225,7 +13274,13 @@ function getScaleTypeFromData(props, axis) {
|
|
|
13225
13274
|
|
|
13226
13275
|
|
|
13227
13276
|
function getScaleFromName(name) {
|
|
13228
|
-
|
|
13277
|
+
if (validScale(name)) {
|
|
13278
|
+
var methodName = toNewName(name); // @ts-expect-error scaleTime is not directly compatible with our D3Scale definition
|
|
13279
|
+
|
|
13280
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_5__[methodName]();
|
|
13281
|
+
}
|
|
13282
|
+
|
|
13283
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
13229
13284
|
}
|
|
13230
13285
|
function getBaseScale(props, axis) {
|
|
13231
13286
|
var scale = getScaleFromProps(props, axis);
|
|
@@ -13235,7 +13290,7 @@ function getBaseScale(props, axis) {
|
|
|
13235
13290
|
}
|
|
13236
13291
|
|
|
13237
13292
|
var defaultScale = getScaleFromDomain(props, axis) || getScaleTypeFromData(props, axis);
|
|
13238
|
-
return
|
|
13293
|
+
return getScaleFromName(defaultScale);
|
|
13239
13294
|
}
|
|
13240
13295
|
function getDefaultScale() {
|
|
13241
13296
|
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
@@ -13248,7 +13303,7 @@ function getScaleFromProps(props, axis) {
|
|
|
13248
13303
|
var scale = props.scale[axis] || props.scale;
|
|
13249
13304
|
|
|
13250
13305
|
if (validScale(scale)) {
|
|
13251
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale :
|
|
13306
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale : getScaleFromName(scale);
|
|
13252
13307
|
}
|
|
13253
13308
|
|
|
13254
13309
|
return undefined;
|
|
@@ -13283,6 +13338,7 @@ function getType(scale) {
|
|
|
13283
13338
|
})[0];
|
|
13284
13339
|
return scaleType ? scaleType.name : undefined;
|
|
13285
13340
|
}
|
|
13341
|
+
//# sourceMappingURL=scale.js.map
|
|
13286
13342
|
|
|
13287
13343
|
/***/ }),
|
|
13288
13344
|
|
|
@@ -13354,6 +13410,7 @@ function getColorScale(name) {
|
|
|
13354
13410
|
};
|
|
13355
13411
|
return name ? scales[name] : scales.grayscale;
|
|
13356
13412
|
}
|
|
13413
|
+
//# sourceMappingURL=style.js.map
|
|
13357
13414
|
|
|
13358
13415
|
/***/ }),
|
|
13359
13416
|
|
|
@@ -13558,8 +13615,10 @@ var _getSizeWithRotate = function (axisSize, dependentSize, angle) {
|
|
|
13558
13615
|
|
|
13559
13616
|
|
|
13560
13617
|
var convertLengthToPixels = function (length, fontSize) {
|
|
13561
|
-
var
|
|
13562
|
-
|
|
13618
|
+
var _length$match;
|
|
13619
|
+
|
|
13620
|
+
var attribute = (_length$match = length.match(/[a-zA-Z%]+/)) === null || _length$match === void 0 ? void 0 : _length$match[0];
|
|
13621
|
+
var value = Number(length.match(/[0-9.,]+/));
|
|
13563
13622
|
var result;
|
|
13564
13623
|
|
|
13565
13624
|
if (!attribute) {
|
|
@@ -13625,9 +13684,9 @@ var _approximateTextHeightInternal = function (text, style) {
|
|
|
13625
13684
|
var height = containsCaps ? lineStyle.fontSize * coefficients.lineCapitalCoef : lineStyle.fontSize;
|
|
13626
13685
|
return total + lineStyle.lineHeight * height;
|
|
13627
13686
|
}, 0);
|
|
13628
|
-
};
|
|
13629
|
-
|
|
13687
|
+
};
|
|
13630
13688
|
|
|
13689
|
+
// Stubbable implementation.
|
|
13631
13690
|
var _approximateTextSizeInternal = {
|
|
13632
13691
|
impl: function (text, style) {
|
|
13633
13692
|
var angle = Array.isArray(style) ? style[0] && style[0].angle : style && style.angle;
|
|
@@ -13646,7 +13705,7 @@ var _approximateTextSizeInternal = {
|
|
|
13646
13705
|
};
|
|
13647
13706
|
/**
|
|
13648
13707
|
* Predict text size by font params.
|
|
13649
|
-
* @param {string} text Content for width calculation.
|
|
13708
|
+
* @param {string|string[]} text Content for width calculation.
|
|
13650
13709
|
* @param {Object} style Text styles, ,fontFamily, fontSize, etc.
|
|
13651
13710
|
* @param {string} style.fontFamily Text fontFamily.
|
|
13652
13711
|
* @param {(number|string)} style.fontSize Text fontSize.
|
|
@@ -13659,6 +13718,7 @@ var _approximateTextSizeInternal = {
|
|
|
13659
13718
|
var approximateTextSize = function (text, style) {
|
|
13660
13719
|
return _approximateTextSizeInternal.impl(text, style);
|
|
13661
13720
|
};
|
|
13721
|
+
//# sourceMappingURL=textsize.js.map
|
|
13662
13722
|
|
|
13663
13723
|
/***/ }),
|
|
13664
13724
|
|
|
@@ -13689,6 +13749,7 @@ var TimerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cre
|
|
|
13689
13749
|
});
|
|
13690
13750
|
TimerContext.displayName = "TimerContext";
|
|
13691
13751
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimerContext);
|
|
13752
|
+
//# sourceMappingURL=timer-context.js.map
|
|
13692
13753
|
|
|
13693
13754
|
/***/ }),
|
|
13694
13755
|
|
|
@@ -13791,6 +13852,7 @@ var Timer = /*#__PURE__*/function () {
|
|
|
13791
13852
|
}();
|
|
13792
13853
|
|
|
13793
13854
|
|
|
13855
|
+
//# sourceMappingURL=timer.js.map
|
|
13794
13856
|
|
|
13795
13857
|
/***/ }),
|
|
13796
13858
|
|
|
@@ -13881,7 +13943,7 @@ function getChildData(child) {
|
|
|
13881
13943
|
}
|
|
13882
13944
|
/**
|
|
13883
13945
|
* If a parent component has animation enabled, calculate the transitions
|
|
13884
|
-
* for any data of any child component that supports data transitions
|
|
13946
|
+
* for any data of any child component that supports data transitions.
|
|
13885
13947
|
* Data transitions are defined as any two datasets where data nodes exist
|
|
13886
13948
|
* in the first set and not the second, in the second and not the first,
|
|
13887
13949
|
* or both.
|
|
@@ -14010,7 +14072,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
14010
14072
|
|
|
14011
14073
|
if (exitingNodes) {
|
|
14012
14074
|
// After the exit transition occurs, trigger the animations for
|
|
14013
|
-
// nodes that are neither exiting
|
|
14075
|
+
// nodes that are neither exiting nor entering.
|
|
14014
14076
|
animate.onEnd = cb;
|
|
14015
14077
|
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.
|
|
14016
14078
|
|
|
@@ -14080,7 +14142,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
14080
14142
|
* and its index in the parent's children array.
|
|
14081
14143
|
*
|
|
14082
14144
|
* In particular, this will include an `animate` object that is set appropriately
|
|
14083
|
-
* so that each child will be
|
|
14145
|
+
* so that each child will be synchronized for each stage of a transition
|
|
14084
14146
|
* animation. It will also include a transformed `data` object, where each datum
|
|
14085
14147
|
* is transformed by `animate.onExit` and `animate.onEnter` `before` and `after`
|
|
14086
14148
|
* functions.
|
|
@@ -14225,6 +14287,7 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
14225
14287
|
};
|
|
14226
14288
|
};
|
|
14227
14289
|
}
|
|
14290
|
+
//# sourceMappingURL=transitions.js.map
|
|
14228
14291
|
|
|
14229
14292
|
/***/ }),
|
|
14230
14293
|
|
|
@@ -14263,7 +14326,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
14263
14326
|
|
|
14264
14327
|
/*
|
|
14265
14328
|
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
14266
|
-
The startsWidth array will contain the start of any accepted user-prop that
|
|
14329
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
14267
14330
|
starts with these characters.
|
|
14268
14331
|
The exactMatch will contain a list of exact prop names that are accepted.
|
|
14269
14332
|
*/
|
|
@@ -14272,6 +14335,7 @@ var USER_PROPS_SAFELIST = {
|
|
|
14272
14335
|
startsWith: ["data-", "aria-"],
|
|
14273
14336
|
exactMatch: []
|
|
14274
14337
|
};
|
|
14338
|
+
|
|
14275
14339
|
/**
|
|
14276
14340
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
14277
14341
|
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
@@ -14280,7 +14344,6 @@ var USER_PROPS_SAFELIST = {
|
|
|
14280
14344
|
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
14281
14345
|
* otherwise
|
|
14282
14346
|
*/
|
|
14283
|
-
|
|
14284
14347
|
var doesPropStartWith = function (key) {
|
|
14285
14348
|
var startsWith = false;
|
|
14286
14349
|
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
@@ -14357,14 +14420,15 @@ var getSafeUserProps = function (props) {
|
|
|
14357
14420
|
/**
|
|
14358
14421
|
* Wraps a component and adds safe user props
|
|
14359
14422
|
*
|
|
14360
|
-
* @param {
|
|
14423
|
+
* @param {ReactElement} component: parent component
|
|
14361
14424
|
* @param {Object} props: props to be filtered
|
|
14362
|
-
* @returns {
|
|
14425
|
+
* @returns {ReactElement} modified component
|
|
14363
14426
|
*/
|
|
14364
14427
|
|
|
14365
14428
|
var withSafeUserProps = function (component, props) {
|
|
14366
14429
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(component, getSafeUserProps(props));
|
|
14367
14430
|
};
|
|
14431
|
+
//# sourceMappingURL=user-props.js.map
|
|
14368
14432
|
|
|
14369
14433
|
/***/ }),
|
|
14370
14434
|
|