victory-voronoi 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-voronoi.js +237 -171
- package/dist/victory-voronoi.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/victory-voronoi.js +2 -1
- package/es/voronoi.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-voronoi.js +2 -1
- package/lib/voronoi.js +2 -1
- package/package.json +3 -3
- package/src/helper-methods.js +7 -7
- package/src/index.d.ts +1 -1
- package/src/victory-voronoi.js +6 -6
- package/src/voronoi.js +9 -9
package/dist/victory-voronoi.js
CHANGED
|
@@ -299,7 +299,7 @@ VictoryVoronoi.animationWhitelist = ["data", "domain", "height", "padding", "sam
|
|
|
299
299
|
VictoryVoronoi.displayName = "VictoryVoronoi";
|
|
300
300
|
VictoryVoronoi.role = "voronoi";
|
|
301
301
|
VictoryVoronoi.defaultTransitions = victory_core__WEBPACK_IMPORTED_MODULE_3__.discreteTransitions();
|
|
302
|
-
VictoryVoronoi.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.dataProps), {}, {
|
|
302
|
+
VictoryVoronoi.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.dataProps), {}, {
|
|
303
303
|
size: victory_core__WEBPACK_IMPORTED_MODULE_5__.nonNegative
|
|
304
304
|
});
|
|
305
305
|
VictoryVoronoi.defaultProps = {
|
|
@@ -322,7 +322,7 @@ VictoryVoronoi.getBaseProps = function (props) {
|
|
|
322
322
|
};
|
|
323
323
|
|
|
324
324
|
VictoryVoronoi.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
325
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_13__
|
|
325
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_13__.addEvents)(VictoryVoronoi));
|
|
326
326
|
|
|
327
327
|
/***/ }),
|
|
328
328
|
|
|
@@ -439,7 +439,7 @@ var Voronoi = function (props) {
|
|
|
439
439
|
}));
|
|
440
440
|
};
|
|
441
441
|
|
|
442
|
-
Voronoi.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.primitiveProps), {}, {
|
|
442
|
+
Voronoi.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.primitiveProps), {}, {
|
|
443
443
|
circleComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
|
|
444
444
|
clipId: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)]),
|
|
445
445
|
clipPathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
|
|
@@ -7026,7 +7026,7 @@ var isInterpolatable = function (obj) {
|
|
|
7026
7026
|
// component is only going to call the function (in which case it's
|
|
7027
7027
|
// safely interpolatable) or if it's going to access special properties
|
|
7028
7028
|
// (in which case our function generated from `interpolateFunction` will
|
|
7029
|
-
// most likely cause an error. We could check for enumerable properties
|
|
7029
|
+
// most likely cause an error). We could check for enumerable properties
|
|
7030
7030
|
// on the function object here to see if it's a "plain" function, but
|
|
7031
7031
|
// let's just require that components prevent such function props from
|
|
7032
7032
|
// being animated in the first place.
|
|
@@ -7191,16 +7191,18 @@ var victoryInterpolator = function (a, b) {
|
|
|
7191
7191
|
}
|
|
7192
7192
|
|
|
7193
7193
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(b)) {
|
|
7194
|
-
// @ts-expect-error These generics are tough, but they work
|
|
7194
|
+
// @ts-expect-error These generics are tough, but they work :)
|
|
7195
7195
|
return interpolateObject(a, b);
|
|
7196
7196
|
}
|
|
7197
7197
|
|
|
7198
7198
|
if (typeof a === "string" || typeof b === "string") {
|
|
7199
7199
|
return interpolateString(a, b);
|
|
7200
|
-
}
|
|
7200
|
+
} // @ts-expect-error These generics are tough, but they work :)
|
|
7201
|
+
|
|
7201
7202
|
|
|
7202
7203
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b);
|
|
7203
7204
|
};
|
|
7205
|
+
//# sourceMappingURL=util.js.map
|
|
7204
7206
|
|
|
7205
7207
|
/***/ }),
|
|
7206
7208
|
|
|
@@ -7463,6 +7465,7 @@ VictoryAnimation.defaultProps = {
|
|
|
7463
7465
|
easing: "quadInOut"
|
|
7464
7466
|
};
|
|
7465
7467
|
VictoryAnimation.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
7468
|
+
//# sourceMappingURL=victory-animation.js.map
|
|
7466
7469
|
|
|
7467
7470
|
/***/ }),
|
|
7468
7471
|
|
|
@@ -7776,6 +7779,7 @@ VictoryContainer.defaultProps = {
|
|
|
7776
7779
|
role: "img"
|
|
7777
7780
|
};
|
|
7778
7781
|
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
7782
|
+
//# sourceMappingURL=victory-container.js.map
|
|
7779
7783
|
|
|
7780
7784
|
/***/ }),
|
|
7781
7785
|
|
|
@@ -8381,10 +8385,9 @@ VictoryLabel.propTypes = {
|
|
|
8381
8385
|
inline: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8382
8386
|
labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["parallel", "perpendicular", "vertical"]),
|
|
8383
8387
|
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)]),
|
|
8384
|
-
// @ts-expect-error "x is required in origin"
|
|
8385
8388
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
|
|
8386
|
-
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative,
|
|
8387
|
-
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative
|
|
8389
|
+
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired,
|
|
8390
|
+
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired
|
|
8388
8391
|
}),
|
|
8389
8392
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8390
8393
|
renderInPortal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
@@ -8418,6 +8421,7 @@ VictoryLabel.defaultProps = {
|
|
|
8418
8421
|
// Magic number from d3.
|
|
8419
8422
|
lineHeight: 1
|
|
8420
8423
|
};
|
|
8424
|
+
//# sourceMappingURL=victory-label.js.map
|
|
8421
8425
|
|
|
8422
8426
|
/***/ }),
|
|
8423
8427
|
|
|
@@ -8442,6 +8446,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8442
8446
|
*/
|
|
8443
8447
|
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
8444
8448
|
PortalContext.displayName = "PortalContext";
|
|
8449
|
+
//# sourceMappingURL=portal-context.js.map
|
|
8445
8450
|
|
|
8446
8451
|
/***/ }),
|
|
8447
8452
|
|
|
@@ -8553,6 +8558,7 @@ Portal.propTypes = {
|
|
|
8553
8558
|
viewBox: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8554
8559
|
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_3__.nonNegative
|
|
8555
8560
|
};
|
|
8561
|
+
//# sourceMappingURL=portal.js.map
|
|
8556
8562
|
|
|
8557
8563
|
/***/ }),
|
|
8558
8564
|
|
|
@@ -8696,6 +8702,7 @@ VictoryPortal.defaultProps = {
|
|
|
8696
8702
|
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
8697
8703
|
};
|
|
8698
8704
|
VictoryPortal.contextType = _portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext;
|
|
8705
|
+
//# sourceMappingURL=victory-portal.js.map
|
|
8699
8706
|
|
|
8700
8707
|
/***/ }),
|
|
8701
8708
|
|
|
@@ -8738,6 +8745,7 @@ var Circle = function (props) {
|
|
|
8738
8745
|
vectorEffect: "non-scaling-stroke"
|
|
8739
8746
|
}, rest));
|
|
8740
8747
|
};
|
|
8748
|
+
//# sourceMappingURL=circle.js.map
|
|
8741
8749
|
|
|
8742
8750
|
/***/ }),
|
|
8743
8751
|
|
|
@@ -8770,6 +8778,7 @@ ClipPath.propTypes = {
|
|
|
8770
8778
|
children: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)]),
|
|
8771
8779
|
clipId: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)])
|
|
8772
8780
|
};
|
|
8781
|
+
//# sourceMappingURL=clip-path.js.map
|
|
8773
8782
|
|
|
8774
8783
|
/***/ }),
|
|
8775
8784
|
|
|
@@ -8806,6 +8815,7 @@ var Path = function (props) {
|
|
|
8806
8815
|
// @ts-expect-error FIXME: "id cannot be a number"
|
|
8807
8816
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", rest);
|
|
8808
8817
|
};
|
|
8818
|
+
//# sourceMappingURL=path.js.map
|
|
8809
8819
|
|
|
8810
8820
|
/***/ }),
|
|
8811
8821
|
|
|
@@ -8848,6 +8858,7 @@ var Rect = function (props) {
|
|
|
8848
8858
|
vectorEffect: "non-scaling-stroke"
|
|
8849
8859
|
}, rest));
|
|
8850
8860
|
};
|
|
8861
|
+
//# sourceMappingURL=rect.js.map
|
|
8851
8862
|
|
|
8852
8863
|
/***/ }),
|
|
8853
8864
|
|
|
@@ -8891,6 +8902,7 @@ Text.propTypes = {
|
|
|
8891
8902
|
desc: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8892
8903
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
8893
8904
|
};
|
|
8905
|
+
//# sourceMappingURL=text.js.map
|
|
8894
8906
|
|
|
8895
8907
|
/***/ }),
|
|
8896
8908
|
|
|
@@ -8915,6 +8927,7 @@ var TSpan = function (props) {
|
|
|
8915
8927
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tspan", props)
|
|
8916
8928
|
);
|
|
8917
8929
|
};
|
|
8930
|
+
//# sourceMappingURL=tspan.js.map
|
|
8918
8931
|
|
|
8919
8932
|
/***/ }),
|
|
8920
8933
|
|
|
@@ -9190,6 +9203,7 @@ var grayscale = {
|
|
|
9190
9203
|
}
|
|
9191
9204
|
}, baseProps)
|
|
9192
9205
|
};
|
|
9206
|
+
//# sourceMappingURL=grayscale.js.map
|
|
9193
9207
|
|
|
9194
9208
|
/***/ }),
|
|
9195
9209
|
|
|
@@ -9492,6 +9506,7 @@ var material = {
|
|
|
9492
9506
|
}
|
|
9493
9507
|
}, baseProps)
|
|
9494
9508
|
};
|
|
9509
|
+
//# sourceMappingURL=material.js.map
|
|
9495
9510
|
|
|
9496
9511
|
/***/ }),
|
|
9497
9512
|
|
|
@@ -9515,6 +9530,7 @@ var VictoryTheme = {
|
|
|
9515
9530
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
9516
9531
|
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
9517
9532
|
};
|
|
9533
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
9518
9534
|
|
|
9519
9535
|
/***/ }),
|
|
9520
9536
|
|
|
@@ -9783,6 +9799,7 @@ VictoryTransition.propTypes = {
|
|
|
9783
9799
|
children: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().node)
|
|
9784
9800
|
};
|
|
9785
9801
|
VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
9802
|
+
//# sourceMappingURL=victory-transition.js.map
|
|
9786
9803
|
|
|
9787
9804
|
/***/ }),
|
|
9788
9805
|
|
|
@@ -9795,26 +9812,26 @@ VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MO
|
|
|
9795
9812
|
"use strict";
|
|
9796
9813
|
__webpack_require__.r(__webpack_exports__);
|
|
9797
9814
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9798
|
-
/* harmony export */ "
|
|
9815
|
+
/* harmony export */ "addEvents": () => (/* binding */ addEvents)
|
|
9799
9816
|
/* harmony export */ });
|
|
9800
|
-
/* harmony import */ var
|
|
9801
|
-
/* harmony import */ var
|
|
9802
|
-
/* harmony import */ var
|
|
9803
|
-
/* harmony import */ var
|
|
9804
|
-
/* harmony import */ var
|
|
9805
|
-
/* harmony import */ var
|
|
9806
|
-
/* harmony import */ var
|
|
9807
|
-
/* harmony import */ var
|
|
9808
|
-
/* harmony import */ var
|
|
9809
|
-
/* harmony import */ var
|
|
9810
|
-
/* harmony import */ var
|
|
9811
|
-
/* harmony import */ var
|
|
9812
|
-
/* harmony import */ var
|
|
9813
|
-
/* harmony import */ var
|
|
9814
|
-
/* harmony import */ var
|
|
9815
|
-
/* harmony import */ var
|
|
9816
|
-
/* harmony import */ var
|
|
9817
|
-
/* harmony import */ var
|
|
9817
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/without */ "../../../node_modules/lodash/without.js");
|
|
9818
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_without__WEBPACK_IMPORTED_MODULE_0__);
|
|
9819
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/lodash/pick.js");
|
|
9820
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_1__);
|
|
9821
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/keys */ "../../../node_modules/lodash/keys.js");
|
|
9822
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_2__);
|
|
9823
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isNil */ "../../../node_modules/lodash/isNil.js");
|
|
9824
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_3__);
|
|
9825
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isFunction */ "../../../node_modules/lodash/isFunction.js");
|
|
9826
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__);
|
|
9827
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/lodash/isEmpty.js");
|
|
9828
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__);
|
|
9829
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/difference */ "../../../node_modules/lodash/difference.js");
|
|
9830
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_difference__WEBPACK_IMPORTED_MODULE_6__);
|
|
9831
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/lodash/defaults.js");
|
|
9832
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_7__);
|
|
9833
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/lodash/assign.js");
|
|
9834
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_8__);
|
|
9818
9835
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "react");
|
|
9819
9836
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
|
9820
9837
|
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
@@ -9867,13 +9884,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9867
9884
|
|
|
9868
9885
|
|
|
9869
9886
|
|
|
9870
|
-
|
|
9887
|
+
|
|
9888
|
+
|
|
9889
|
+
// DISCLAIMER:
|
|
9871
9890
|
// This file is not currently tested, and it is first on the list of files
|
|
9872
9891
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
9873
9892
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
9874
|
-
|
|
9875
9893
|
var datumHasXandY = function (datum) {
|
|
9876
|
-
return !
|
|
9894
|
+
return !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._x) && !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._y);
|
|
9877
9895
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
9878
9896
|
|
|
9879
9897
|
|
|
@@ -9885,44 +9903,45 @@ var defaultComponents = [{
|
|
|
9885
9903
|
}, {
|
|
9886
9904
|
name: "labels"
|
|
9887
9905
|
}];
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9906
|
+
function addEvents(WrappedComponent) {
|
|
9907
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9908
|
+
|
|
9909
|
+
// @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
|
|
9910
|
+
var AddEventsMixin = /*#__PURE__*/function (_WrappedComponent) {
|
|
9911
|
+
_inherits(AddEventsMixin, _WrappedComponent);
|
|
9891
9912
|
|
|
9892
|
-
var _super = _createSuper(
|
|
9913
|
+
var _super = _createSuper(AddEventsMixin);
|
|
9893
9914
|
|
|
9894
|
-
function
|
|
9915
|
+
function AddEventsMixin(props) {
|
|
9895
9916
|
var _this;
|
|
9896
9917
|
|
|
9897
|
-
_classCallCheck(this,
|
|
9918
|
+
_classCallCheck(this, AddEventsMixin);
|
|
9898
9919
|
|
|
9899
9920
|
_this = _super.call(this, props);
|
|
9900
|
-
var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9901
|
-
var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
|
|
9902
9921
|
_this.state = {};
|
|
9922
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
9923
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9903
9924
|
|
|
9904
9925
|
_this.getEvents = function (p, target, eventKey) {
|
|
9905
|
-
return
|
|
9926
|
+
return _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
9906
9927
|
};
|
|
9907
9928
|
|
|
9908
|
-
_this.
|
|
9909
|
-
|
|
9910
|
-
var calculatedValues = _this.getCalculatedValues(props);
|
|
9911
|
-
|
|
9912
|
-
_this.cacheValues(calculatedValues);
|
|
9913
|
-
|
|
9914
|
-
_this.externalMutations = _this.getExternalMutations(props);
|
|
9915
|
-
_this.calculatedState = _this.getStateChanges(props);
|
|
9929
|
+
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
9930
|
+
_this.calculatedState = _this.getStateChanges(_this.props);
|
|
9916
9931
|
_this.globalEvents = {};
|
|
9917
9932
|
_this.prevGlobalEventKeys = [];
|
|
9918
9933
|
_this.boundGlobalEvents = {};
|
|
9934
|
+
|
|
9935
|
+
_this.cacheValues(_this.getCalculatedValues(props));
|
|
9936
|
+
|
|
9919
9937
|
return _this;
|
|
9920
9938
|
}
|
|
9921
9939
|
|
|
9922
|
-
_createClass(
|
|
9940
|
+
_createClass(AddEventsMixin, [{
|
|
9923
9941
|
key: "shouldComponentUpdate",
|
|
9924
9942
|
value: function shouldComponentUpdate(nextProps) {
|
|
9925
|
-
var externalMutations = this.getExternalMutations(nextProps);
|
|
9943
|
+
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
9944
|
+
|
|
9926
9945
|
var animating = this.props.animating || this.props.animate;
|
|
9927
9946
|
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
|
|
9928
9947
|
|
|
@@ -9952,7 +9971,7 @@ var defaultComponents = [{
|
|
|
9952
9971
|
value: function componentDidMount() {
|
|
9953
9972
|
var _this2 = this;
|
|
9954
9973
|
|
|
9955
|
-
var globalEventKeys =
|
|
9974
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
9956
9975
|
|
|
9957
9976
|
globalEventKeys.forEach(function (key) {
|
|
9958
9977
|
return _this2.addGlobalListener(key);
|
|
@@ -9967,15 +9986,15 @@ var defaultComponents = [{
|
|
|
9967
9986
|
var calculatedState = this.getStateChanges(prevProps);
|
|
9968
9987
|
this.calculatedState = calculatedState;
|
|
9969
9988
|
|
|
9970
|
-
var globalEventKeys =
|
|
9989
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
9971
9990
|
|
|
9972
|
-
var removedGlobalEventKeys =
|
|
9991
|
+
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
9973
9992
|
|
|
9974
9993
|
removedGlobalEventKeys.forEach(function (key) {
|
|
9975
9994
|
return _this3.removeGlobalListener(key);
|
|
9976
9995
|
});
|
|
9977
9996
|
|
|
9978
|
-
var addedGlobalEventKeys =
|
|
9997
|
+
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
9979
9998
|
|
|
9980
9999
|
addedGlobalEventKeys.forEach(function (key) {
|
|
9981
10000
|
return _this3.addGlobalListener(key);
|
|
@@ -10021,12 +10040,11 @@ var defaultComponents = [{
|
|
|
10021
10040
|
}
|
|
10022
10041
|
|
|
10023
10042
|
var getState = function (key, type) {
|
|
10024
|
-
var result =
|
|
10043
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
10025
10044
|
|
|
10026
|
-
return
|
|
10045
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(result) ? undefined : result;
|
|
10027
10046
|
};
|
|
10028
10047
|
|
|
10029
|
-
options = options || {};
|
|
10030
10048
|
var components = options.components || defaultComponents;
|
|
10031
10049
|
var stateChanges = components.map(function (component) {
|
|
10032
10050
|
if (!props.standalone && component.name === "parent") {
|
|
@@ -10043,9 +10061,9 @@ var defaultComponents = [{
|
|
|
10043
10061
|
}, {
|
|
10044
10062
|
key: "applyExternalMutations",
|
|
10045
10063
|
value: function applyExternalMutations(props, externalMutations) {
|
|
10046
|
-
if (!
|
|
10064
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
|
|
10047
10065
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
10048
|
-
memo =
|
|
10066
|
+
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
10049
10067
|
return memo;
|
|
10050
10068
|
}, []);
|
|
10051
10069
|
var compiledCallbacks = callbacks.length ? function () {
|
|
@@ -10062,12 +10080,12 @@ var defaultComponents = [{
|
|
|
10062
10080
|
var sharedEvents = props.sharedEvents;
|
|
10063
10081
|
var components = WrappedComponent.expectedComponents;
|
|
10064
10082
|
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
10065
|
-
var getSharedEventState = sharedEvents &&
|
|
10083
|
+
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
10066
10084
|
return undefined;
|
|
10067
10085
|
};
|
|
10068
10086
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
10069
10087
|
|
|
10070
|
-
var dataKeys =
|
|
10088
|
+
var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(baseProps).filter(function (key) {
|
|
10071
10089
|
return key !== "parent";
|
|
10072
10090
|
});
|
|
10073
10091
|
|
|
@@ -10087,32 +10105,32 @@ var defaultComponents = [{
|
|
|
10087
10105
|
value: function getExternalMutations(props) {
|
|
10088
10106
|
var sharedEvents = props.sharedEvents,
|
|
10089
10107
|
externalEventMutations = props.externalEventMutations;
|
|
10090
|
-
return
|
|
10108
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
10091
10109
|
}
|
|
10092
10110
|
}, {
|
|
10093
10111
|
key: "cacheValues",
|
|
10094
10112
|
value: function cacheValues(obj) {
|
|
10095
10113
|
var _this7 = this;
|
|
10096
10114
|
|
|
10097
|
-
|
|
10115
|
+
lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(obj).forEach(function (key) {
|
|
10098
10116
|
_this7[key] = obj[key];
|
|
10099
10117
|
});
|
|
10100
10118
|
}
|
|
10101
10119
|
}, {
|
|
10102
10120
|
key: "getBaseProps",
|
|
10103
10121
|
value: function getBaseProps(props, getSharedEventState) {
|
|
10104
|
-
getSharedEventState = getSharedEventState || this.getSharedEventState;
|
|
10122
|
+
getSharedEventState = getSharedEventState || this.getSharedEventState.bind(this);
|
|
10105
10123
|
var sharedParentState = getSharedEventState("parent", "parent");
|
|
10106
10124
|
var parentState = this.getEventState("parent", "parent");
|
|
10107
10125
|
|
|
10108
|
-
var baseParentProps =
|
|
10126
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
|
|
10109
10127
|
|
|
10110
10128
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
10111
|
-
var parentProps = parentPropsList ?
|
|
10129
|
+
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_1___default()(baseParentProps, parentPropsList) : {};
|
|
10112
10130
|
|
|
10113
|
-
var modifiedProps =
|
|
10131
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentProps, props);
|
|
10114
10132
|
|
|
10115
|
-
return
|
|
10133
|
+
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
10116
10134
|
}
|
|
10117
10135
|
}, {
|
|
10118
10136
|
key: "getAllEvents",
|
|
@@ -10140,21 +10158,21 @@ var defaultComponents = [{
|
|
|
10140
10158
|
if (this.hasEvents) {
|
|
10141
10159
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
10142
10160
|
|
|
10143
|
-
var componentProps =
|
|
10161
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10144
10162
|
index: index,
|
|
10145
10163
|
key: id
|
|
10146
10164
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
10147
10165
|
id: id
|
|
10148
10166
|
});
|
|
10149
10167
|
|
|
10150
|
-
var events =
|
|
10168
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
10151
10169
|
|
|
10152
|
-
return
|
|
10170
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, componentProps, {
|
|
10153
10171
|
events: events
|
|
10154
10172
|
});
|
|
10155
10173
|
}
|
|
10156
10174
|
|
|
10157
|
-
return
|
|
10175
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10158
10176
|
index: index,
|
|
10159
10177
|
key: id
|
|
10160
10178
|
}, component.props, baseProps, {
|
|
@@ -10177,11 +10195,14 @@ var defaultComponents = [{
|
|
|
10177
10195
|
}, {
|
|
10178
10196
|
key: "animateComponent",
|
|
10179
10197
|
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
10180
|
-
var
|
|
10198
|
+
var _props$animate;
|
|
10199
|
+
|
|
10200
|
+
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
10201
|
+
var Comp = this.constructor;
|
|
10181
10202
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.VictoryTransition, {
|
|
10182
10203
|
animate: props.animate,
|
|
10183
10204
|
animationWhitelist: animationWhitelist
|
|
10184
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(
|
|
10205
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(Comp, props));
|
|
10185
10206
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
10186
10207
|
|
|
10187
10208
|
}, {
|
|
@@ -10193,7 +10214,7 @@ var defaultComponents = [{
|
|
|
10193
10214
|
labelComponent = props.labelComponent,
|
|
10194
10215
|
groupComponent = props.groupComponent;
|
|
10195
10216
|
|
|
10196
|
-
var dataKeys =
|
|
10217
|
+
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
|
|
10197
10218
|
|
|
10198
10219
|
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
10199
10220
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
@@ -10240,9 +10261,12 @@ var defaultComponents = [{
|
|
|
10240
10261
|
}
|
|
10241
10262
|
}]);
|
|
10242
10263
|
|
|
10243
|
-
return
|
|
10264
|
+
return AddEventsMixin;
|
|
10244
10265
|
}(WrappedComponent);
|
|
10245
|
-
|
|
10266
|
+
|
|
10267
|
+
return AddEventsMixin;
|
|
10268
|
+
}
|
|
10269
|
+
//# sourceMappingURL=add-events.js.map
|
|
10246
10270
|
|
|
10247
10271
|
/***/ }),
|
|
10248
10272
|
|
|
@@ -10276,7 +10300,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10276
10300
|
|
|
10277
10301
|
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; }
|
|
10278
10302
|
|
|
10279
|
-
/* eslint-disable no-use-before-define */
|
|
10280
10303
|
function isNonEmptyArray(collection) {
|
|
10281
10304
|
return Array.isArray(collection) && collection.length > 0;
|
|
10282
10305
|
}
|
|
@@ -10315,7 +10338,8 @@ function getMaxValue(arr) {
|
|
|
10315
10338
|
}
|
|
10316
10339
|
|
|
10317
10340
|
var array = arr.concat(values);
|
|
10318
|
-
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array)))
|
|
10341
|
+
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10342
|
+
: Math.max.apply(Math, _toConsumableArray(array));
|
|
10319
10343
|
}
|
|
10320
10344
|
function getMinValue(arr) {
|
|
10321
10345
|
for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -10323,8 +10347,10 @@ function getMinValue(arr) {
|
|
|
10323
10347
|
}
|
|
10324
10348
|
|
|
10325
10349
|
var array = arr.concat(values);
|
|
10326
|
-
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array)))
|
|
10350
|
+
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10351
|
+
: Math.min.apply(Math, _toConsumableArray(array));
|
|
10327
10352
|
}
|
|
10353
|
+
//# sourceMappingURL=collection.js.map
|
|
10328
10354
|
|
|
10329
10355
|
/***/ }),
|
|
10330
10356
|
|
|
@@ -10337,9 +10363,7 @@ function getMinValue(arr) {
|
|
|
10337
10363
|
"use strict";
|
|
10338
10364
|
__webpack_require__.r(__webpack_exports__);
|
|
10339
10365
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10340
|
-
/* harmony export */ "
|
|
10341
|
-
/* harmony export */ "dataProps": () => (/* binding */ dataProps),
|
|
10342
|
-
/* harmony export */ "primitiveProps": () => (/* binding */ primitiveProps)
|
|
10366
|
+
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
10343
10367
|
/* harmony export */ });
|
|
10344
10368
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
10345
10369
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -10347,26 +10371,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10347
10371
|
|
|
10348
10372
|
|
|
10349
10373
|
var dataProps = {
|
|
10374
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10350
10375
|
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({
|
|
10351
10376
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
10352
10377
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
10353
10378
|
})]),
|
|
10379
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10354
10380
|
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)]),
|
|
10355
10381
|
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10356
10382
|
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10357
10383
|
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10358
10384
|
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)]),
|
|
10359
10385
|
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10360
|
-
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))]),
|
|
10386
|
+
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))]),
|
|
10361
10387
|
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
10362
10388
|
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10363
10389
|
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10364
10390
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10365
10391
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10366
10392
|
}),
|
|
10367
|
-
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))]),
|
|
10368
|
-
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))]),
|
|
10369
|
-
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))])
|
|
10393
|
+
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))]),
|
|
10394
|
+
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))]),
|
|
10395
|
+
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))])
|
|
10370
10396
|
};
|
|
10371
10397
|
var baseProps = {
|
|
10372
10398
|
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)]),
|
|
@@ -10375,14 +10401,17 @@ var baseProps = {
|
|
|
10375
10401
|
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10376
10402
|
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10377
10403
|
})]),
|
|
10404
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10378
10405
|
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({
|
|
10379
10406
|
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)]),
|
|
10380
10407
|
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)])
|
|
10381
10408
|
})]),
|
|
10409
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10382
10410
|
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({
|
|
10383
10411
|
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)]),
|
|
10384
10412
|
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)])
|
|
10385
10413
|
})]),
|
|
10414
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10386
10415
|
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10387
10416
|
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))]),
|
|
10388
10417
|
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))])
|
|
@@ -10393,6 +10422,7 @@ var baseProps = {
|
|
|
10393
10422
|
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)]),
|
|
10394
10423
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10395
10424
|
})),
|
|
10425
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10396
10426
|
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10397
10427
|
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
10398
10428
|
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)]),
|
|
@@ -10403,10 +10433,12 @@ var baseProps = {
|
|
|
10403
10433
|
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10404
10434
|
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10405
10435
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
10436
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10406
10437
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10407
10438
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10408
10439
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
10409
10440
|
}),
|
|
10441
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10410
10442
|
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({
|
|
10411
10443
|
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10412
10444
|
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
@@ -10415,17 +10447,19 @@ var baseProps = {
|
|
|
10415
10447
|
})]),
|
|
10416
10448
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10417
10449
|
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10418
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10419
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10450
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
10451
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
10420
10452
|
})]),
|
|
10421
10453
|
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10422
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
10423
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
10454
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
10455
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
10424
10456
|
})]),
|
|
10457
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10425
10458
|
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10426
10459
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
10427
10460
|
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
10428
10461
|
}),
|
|
10462
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10429
10463
|
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({
|
|
10430
10464
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
10431
10465
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
@@ -10445,6 +10479,7 @@ var primitiveProps = {
|
|
|
10445
10479
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10446
10480
|
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)]),
|
|
10447
10481
|
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)]),
|
|
10482
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10448
10483
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10449
10484
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10450
10485
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
@@ -10460,6 +10495,12 @@ var primitiveProps = {
|
|
|
10460
10495
|
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)]),
|
|
10461
10496
|
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
10462
10497
|
};
|
|
10498
|
+
var CommonProps = {
|
|
10499
|
+
dataProps: dataProps,
|
|
10500
|
+
baseProps: baseProps,
|
|
10501
|
+
primitiveProps: primitiveProps
|
|
10502
|
+
};
|
|
10503
|
+
//# sourceMappingURL=common-props.js.map
|
|
10463
10504
|
|
|
10464
10505
|
/***/ }),
|
|
10465
10506
|
|
|
@@ -10973,6 +11014,7 @@ function isDataComponent(component) {
|
|
|
10973
11014
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
10974
11015
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_2___default()(whitelist, role);
|
|
10975
11016
|
}
|
|
11017
|
+
//# sourceMappingURL=data.js.map
|
|
10976
11018
|
|
|
10977
11019
|
/***/ }),
|
|
10978
11020
|
|
|
@@ -11095,6 +11137,7 @@ function discreteTransitions() {
|
|
|
11095
11137
|
}
|
|
11096
11138
|
};
|
|
11097
11139
|
}
|
|
11140
|
+
//# sourceMappingURL=default-transitions.js.map
|
|
11098
11141
|
|
|
11099
11142
|
/***/ }),
|
|
11100
11143
|
|
|
@@ -11196,8 +11239,9 @@ function getDomainPadding(props, axis) {
|
|
|
11196
11239
|
}
|
|
11197
11240
|
|
|
11198
11241
|
function getFlatData(dataset, axis) {
|
|
11242
|
+
var axisKey = "_".concat(axis);
|
|
11199
11243
|
return lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(dataset).map(function (datum) {
|
|
11200
|
-
return datum[
|
|
11244
|
+
return datum[axisKey] && datum[axisKey][1] !== undefined ? datum[axisKey][1] : datum[axisKey];
|
|
11201
11245
|
});
|
|
11202
11246
|
}
|
|
11203
11247
|
|
|
@@ -11262,7 +11306,9 @@ function padDomain(domain, props, axis) {
|
|
|
11262
11306
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
11263
11307
|
// Naive initial padding calculation
|
|
11264
11308
|
var initialPadding = {
|
|
11309
|
+
// @ts-expect-error `max/min` might be dates
|
|
11265
11310
|
left: Math.abs(max - min) * padding.left / rangeExtent,
|
|
11311
|
+
// @ts-expect-error `max/min` might be dates
|
|
11266
11312
|
right: Math.abs(max - min) * padding.right / rangeExtent
|
|
11267
11313
|
}; // Adjust the domain by the initial padding
|
|
11268
11314
|
|
|
@@ -11547,6 +11593,7 @@ function isDomainComponent(component) {
|
|
|
11547
11593
|
var whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
11548
11594
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_1___default()(whitelist, role);
|
|
11549
11595
|
}
|
|
11596
|
+
//# sourceMappingURL=domain.js.map
|
|
11550
11597
|
|
|
11551
11598
|
/***/ }),
|
|
11552
11599
|
|
|
@@ -11615,15 +11662,16 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
11615
11662
|
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; }
|
|
11616
11663
|
|
|
11617
11664
|
var GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
11665
|
+
|
|
11618
11666
|
/* Returns all own and shared events that should be attached to a single target element,
|
|
11619
11667
|
* i.e. an individual bar specified by target: "data", eventKey: [index].
|
|
11620
11668
|
* Returned events are scoped to the appropriate state. Either that of the component itself
|
|
11621
11669
|
* (i.e. VictoryBar) in the case of own events, or that of the parent component
|
|
11622
11670
|
* (i.e. VictoryChart) in the case of shared events
|
|
11623
11671
|
*/
|
|
11624
|
-
// eslint-disable-next-line max-params
|
|
11625
|
-
|
|
11626
|
-
|
|
11672
|
+
// eslint-disable-next-line max-params
|
|
11673
|
+
function getEvents(props, target, eventKey, // eslint-disable-next-line no-shadow
|
|
11674
|
+
getScopedEvents) {
|
|
11627
11675
|
var _this = this;
|
|
11628
11676
|
|
|
11629
11677
|
// Returns all events that apply to a particular target element
|
|
@@ -11846,24 +11894,27 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11846
11894
|
return memo;
|
|
11847
11895
|
}, {});
|
|
11848
11896
|
}
|
|
11849
|
-
/*
|
|
11897
|
+
/*
|
|
11898
|
+
* Returns a partially applied event handler for a specific target element
|
|
11850
11899
|
* This allows event handlers to have access to props controlling each element
|
|
11851
11900
|
*/
|
|
11852
11901
|
|
|
11853
11902
|
function getPartialEvents(events, eventKey, childProps) {
|
|
11854
|
-
|
|
11903
|
+
if (!events) return {};
|
|
11904
|
+
return lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(events).reduce(function (memo, eventName) {
|
|
11855
11905
|
var appliedEvent = function (evt) {
|
|
11856
11906
|
return events[eventName](evt, childProps, eventKey, eventName);
|
|
11857
11907
|
};
|
|
11858
11908
|
|
|
11859
11909
|
memo[eventName] = appliedEvent;
|
|
11860
11910
|
return memo;
|
|
11861
|
-
}, {})
|
|
11911
|
+
}, {});
|
|
11862
11912
|
}
|
|
11913
|
+
|
|
11863
11914
|
/* Returns the property of the state object corresponding to event changes for
|
|
11864
11915
|
* a particular element
|
|
11865
11916
|
*/
|
|
11866
|
-
|
|
11917
|
+
// eslint-disable-next-line max-params
|
|
11867
11918
|
function getEventState(eventKey, namespace, childType) {
|
|
11868
11919
|
// Mandatory usage: `getEventState.bind(this)`
|
|
11869
11920
|
// eslint-disable-next-line no-invalid-this
|
|
@@ -12048,6 +12099,7 @@ var emulateReactEvent = function (event) {
|
|
|
12048
12099
|
nativeEvent: event
|
|
12049
12100
|
});
|
|
12050
12101
|
};
|
|
12102
|
+
//# sourceMappingURL=events.js.map
|
|
12051
12103
|
|
|
12052
12104
|
/***/ }),
|
|
12053
12105
|
|
|
@@ -12129,7 +12181,7 @@ function getPolarRange(props, axis) {
|
|
|
12129
12181
|
|
|
12130
12182
|
/**
|
|
12131
12183
|
* creates an object with some keys excluded
|
|
12132
|
-
* replacement for lodash.omit for performance. does not
|
|
12184
|
+
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
12133
12185
|
* @param {Object} originalObject: created object will be based on this object
|
|
12134
12186
|
* @param {Array<String>} ks: an array of keys to omit from the new object
|
|
12135
12187
|
* @returns {Object} new object with same properties as originalObject
|
|
@@ -12142,6 +12194,7 @@ function omit(originalObject) {
|
|
|
12142
12194
|
var newObject = {};
|
|
12143
12195
|
|
|
12144
12196
|
for (var key in originalObject) {
|
|
12197
|
+
// @ts-expect-error String is not assignable to Key
|
|
12145
12198
|
if (ks.indexOf(key) >= 0) {
|
|
12146
12199
|
continue;
|
|
12147
12200
|
}
|
|
@@ -12374,7 +12427,9 @@ function reduceChildren(children, iteratee) {
|
|
|
12374
12427
|
var parentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12375
12428
|
var initialMemo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
12376
12429
|
var combine = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (memo, item) {
|
|
12377
|
-
return
|
|
12430
|
+
return (// @ts-expect-error These defaults are hard to type
|
|
12431
|
+
memo.concat(item)
|
|
12432
|
+
);
|
|
12378
12433
|
};
|
|
12379
12434
|
var sharedProps = ["data", "domain", "categories", "polar", "startAngle", "endAngle", "minDomain", "maxDomain", "horizontal"];
|
|
12380
12435
|
|
|
@@ -12418,7 +12473,7 @@ function reduceChildren(children, iteratee) {
|
|
|
12418
12473
|
/**
|
|
12419
12474
|
* @param {Object} props: the props object
|
|
12420
12475
|
* @returns {Boolean} returns true if the props object contains `horizontal: true` of if any
|
|
12421
|
-
* children or nested children are
|
|
12476
|
+
* children or nested children are horizontal
|
|
12422
12477
|
*/
|
|
12423
12478
|
|
|
12424
12479
|
function isHorizontal(props) {
|
|
@@ -12441,6 +12496,7 @@ function isHorizontal(props) {
|
|
|
12441
12496
|
|
|
12442
12497
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children));
|
|
12443
12498
|
}
|
|
12499
|
+
//# sourceMappingURL=helpers.js.map
|
|
12444
12500
|
|
|
12445
12501
|
/***/ }),
|
|
12446
12502
|
|
|
@@ -12484,15 +12540,16 @@ function isMap(x) {
|
|
|
12484
12540
|
return !!(x && x[IMMUTABLE_MAP]);
|
|
12485
12541
|
}
|
|
12486
12542
|
function shallowToJS(x, whitelist) {
|
|
12487
|
-
return isIterable(x) ? x.reduce(function (
|
|
12543
|
+
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
12488
12544
|
if (whitelist && whitelist[key]) {
|
|
12489
12545
|
curr = shallowToJS(curr);
|
|
12490
12546
|
}
|
|
12491
12547
|
|
|
12492
|
-
|
|
12493
|
-
return
|
|
12548
|
+
result[key] = curr;
|
|
12549
|
+
return result;
|
|
12494
12550
|
}, isList(x) ? [] : {}) : x;
|
|
12495
12551
|
}
|
|
12552
|
+
//# sourceMappingURL=immutable.js.map
|
|
12496
12553
|
|
|
12497
12554
|
/***/ }),
|
|
12498
12555
|
|
|
@@ -12750,6 +12807,7 @@ function getProps(props, index) {
|
|
|
12750
12807
|
var tooltipTheme = theme && theme.tooltip || {};
|
|
12751
12808
|
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelProps, _helpers__WEBPACK_IMPORTED_MODULE_1__.omit(tooltipTheme, ["style"]));
|
|
12752
12809
|
}
|
|
12810
|
+
//# sourceMappingURL=label-helpers.js.map
|
|
12753
12811
|
|
|
12754
12812
|
/***/ }),
|
|
12755
12813
|
|
|
@@ -12775,6 +12833,7 @@ function warn(message) {
|
|
|
12775
12833
|
}
|
|
12776
12834
|
}
|
|
12777
12835
|
}
|
|
12836
|
+
//# sourceMappingURL=log.js.map
|
|
12778
12837
|
|
|
12779
12838
|
/***/ }),
|
|
12780
12839
|
|
|
@@ -12802,12 +12861,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12802
12861
|
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0__);
|
|
12803
12862
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/find */ "../../../node_modules/lodash/find.js");
|
|
12804
12863
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
|
|
12805
|
-
/* harmony import */ var
|
|
12806
|
-
/* harmony import */ var
|
|
12807
|
-
/* harmony import */ var
|
|
12808
|
-
/* harmony import */ var
|
|
12809
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
12810
|
-
|
|
12864
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
12865
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
12866
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
12867
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
12811
12868
|
|
|
12812
12869
|
|
|
12813
12870
|
|
|
@@ -12815,6 +12872,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12815
12872
|
|
|
12816
12873
|
|
|
12817
12874
|
|
|
12875
|
+
|
|
12876
|
+
|
|
12818
12877
|
/**
|
|
12819
12878
|
* Return a new validator based on `validator` but with the option to chain
|
|
12820
12879
|
* `isRequired` onto the validation. This is nearly identical to how React
|
|
@@ -12822,30 +12881,30 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12822
12881
|
* @param {Function} validator Validation function.
|
|
12823
12882
|
* @returns {Function} Validator with `isRequired` option.
|
|
12824
12883
|
*/
|
|
12825
|
-
|
|
12826
12884
|
var makeChainable = function (validator) {
|
|
12827
|
-
|
|
12828
|
-
|
|
12829
|
-
|
|
12885
|
+
var createChainable = function (isRequired) {
|
|
12886
|
+
return function (props, propName, componentName) {
|
|
12887
|
+
var value = props[propName];
|
|
12830
12888
|
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12889
|
+
if (value === undefined || value === null) {
|
|
12890
|
+
if (isRequired) {
|
|
12891
|
+
return new Error("Required `".concat(propName, "` was not specified in `").concat(componentName, "`."));
|
|
12892
|
+
}
|
|
12835
12893
|
|
|
12836
|
-
|
|
12837
|
-
|
|
12894
|
+
return null;
|
|
12895
|
+
}
|
|
12838
12896
|
|
|
12839
|
-
|
|
12840
|
-
|
|
12841
|
-
|
|
12897
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
12898
|
+
rest[_key - 3] = arguments[_key];
|
|
12899
|
+
}
|
|
12842
12900
|
|
|
12843
|
-
|
|
12901
|
+
return validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12902
|
+
};
|
|
12844
12903
|
};
|
|
12845
12904
|
|
|
12846
|
-
var chainable =
|
|
12847
|
-
|
|
12848
|
-
|
|
12905
|
+
var chainable = Object.assign(createChainable(false), {
|
|
12906
|
+
isRequired: createChainable(true)
|
|
12907
|
+
});
|
|
12849
12908
|
return chainable;
|
|
12850
12909
|
};
|
|
12851
12910
|
|
|
@@ -12875,7 +12934,7 @@ var getConstructor = function (value) {
|
|
|
12875
12934
|
};
|
|
12876
12935
|
/**
|
|
12877
12936
|
* Get the name of the constructor used to create `value`, using
|
|
12878
|
-
* `Object.
|
|
12937
|
+
* `Object.prototype.toString`. If the value is null or undefined, return
|
|
12879
12938
|
* "null" or "undefined", respectively.
|
|
12880
12939
|
* @param {*} value Instance to return the constructor name of.
|
|
12881
12940
|
* @returns {String} Name of the constructor.
|
|
@@ -12905,10 +12964,11 @@ function deprecated(propType, explanation) {
|
|
|
12905
12964
|
var value = props[propName];
|
|
12906
12965
|
|
|
12907
12966
|
if (value !== null && value !== undefined) {
|
|
12908
|
-
|
|
12967
|
+
_log__WEBPACK_IMPORTED_MODULE_2__.warn("\"".concat(propName, "\" property of \"").concat(componentName, "\" has been deprecated ").concat(explanation));
|
|
12909
12968
|
}
|
|
12910
12969
|
|
|
12911
|
-
|
|
12970
|
+
prop_types__WEBPACK_IMPORTED_MODULE_3___default().checkPropTypes(_defineProperty({}, propName, propType), props, propName, componentName);
|
|
12971
|
+
return null;
|
|
12912
12972
|
};
|
|
12913
12973
|
}
|
|
12914
12974
|
/**
|
|
@@ -12927,7 +12987,7 @@ function allOfType(validators) {
|
|
|
12927
12987
|
|
|
12928
12988
|
return validators.reduce(function (result, validator) {
|
|
12929
12989
|
return result || validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12930
|
-
},
|
|
12990
|
+
}, null);
|
|
12931
12991
|
});
|
|
12932
12992
|
}
|
|
12933
12993
|
/**
|
|
@@ -12941,7 +13001,7 @@ var nonNegative = makeChainable(function (props, propName, componentName) {
|
|
|
12941
13001
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a non-negative number."));
|
|
12942
13002
|
}
|
|
12943
13003
|
|
|
12944
|
-
return
|
|
13004
|
+
return null;
|
|
12945
13005
|
});
|
|
12946
13006
|
/**
|
|
12947
13007
|
* Check that the value is an integer.
|
|
@@ -12954,7 +13014,7 @@ var integer = makeChainable(function (props, propName, componentName) {
|
|
|
12954
13014
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an integer."));
|
|
12955
13015
|
}
|
|
12956
13016
|
|
|
12957
|
-
return
|
|
13017
|
+
return null;
|
|
12958
13018
|
});
|
|
12959
13019
|
/**
|
|
12960
13020
|
* Check that the value is greater than zero.
|
|
@@ -12967,7 +13027,7 @@ var greaterThanZero = makeChainable(function (props, propName, componentName) {
|
|
|
12967
13027
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a number greater than zero."));
|
|
12968
13028
|
}
|
|
12969
13029
|
|
|
12970
|
-
return
|
|
13030
|
+
return null;
|
|
12971
13031
|
});
|
|
12972
13032
|
/**
|
|
12973
13033
|
* Check that the value is an Array of two unique values.
|
|
@@ -12980,32 +13040,20 @@ var domain = makeChainable(function (props, propName, componentName) {
|
|
|
12980
13040
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an array of two unique numeric values."));
|
|
12981
13041
|
}
|
|
12982
13042
|
|
|
12983
|
-
return
|
|
13043
|
+
return null;
|
|
12984
13044
|
});
|
|
12985
13045
|
/**
|
|
12986
13046
|
* Check that the value looks like a d3 `scale` function.
|
|
12987
13047
|
*/
|
|
12988
13048
|
|
|
12989
13049
|
var scale = makeChainable(function (props, propName, componentName) {
|
|
12990
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
12991
|
-
|
|
12992
|
-
var validScale = function (scl) {
|
|
12993
|
-
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl)) {
|
|
12994
|
-
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);
|
|
12995
|
-
} else if (typeof scl === "string") {
|
|
12996
|
-
return supportedScaleStrings.indexOf(scl) !== -1;
|
|
12997
|
-
}
|
|
12998
|
-
|
|
12999
|
-
return false;
|
|
13000
|
-
};
|
|
13001
|
-
|
|
13002
13050
|
var value = props[propName];
|
|
13003
13051
|
|
|
13004
|
-
if (!validScale(value)) {
|
|
13052
|
+
if (!_scale__WEBPACK_IMPORTED_MODULE_4__.validScale(value)) {
|
|
13005
13053
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a d3 scale."));
|
|
13006
13054
|
}
|
|
13007
13055
|
|
|
13008
|
-
return
|
|
13056
|
+
return null;
|
|
13009
13057
|
});
|
|
13010
13058
|
/**
|
|
13011
13059
|
* Check that an array contains items of the same type.
|
|
@@ -13019,7 +13067,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
13019
13067
|
}
|
|
13020
13068
|
|
|
13021
13069
|
if (values.length < 2) {
|
|
13022
|
-
return
|
|
13070
|
+
return null;
|
|
13023
13071
|
}
|
|
13024
13072
|
|
|
13025
13073
|
var comparisonConstructor = getConstructor(values[0]);
|
|
@@ -13034,7 +13082,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
13034
13082
|
return new Error("Expected `".concat(propName, "` in `").concat(componentName, "` to be a ") + "homogeneous array, but found types `".concat(constructorName, "` and ") + "`".concat(otherConstructorName, "`."));
|
|
13035
13083
|
}
|
|
13036
13084
|
|
|
13037
|
-
return
|
|
13085
|
+
return null;
|
|
13038
13086
|
});
|
|
13039
13087
|
/**
|
|
13040
13088
|
* Check that array prop length matches props.data.length
|
|
@@ -13045,7 +13093,7 @@ var matchDataLength = makeChainable(function (props, propName) {
|
|
|
13045
13093
|
return new Error("Length of data and ".concat(propName, " arrays must match."));
|
|
13046
13094
|
}
|
|
13047
13095
|
|
|
13048
|
-
return
|
|
13096
|
+
return null;
|
|
13049
13097
|
});
|
|
13050
13098
|
/**
|
|
13051
13099
|
* Check that the value is a regular expression
|
|
@@ -13056,8 +13104,9 @@ var regExp = makeChainable(function (props, propName, componentName) {
|
|
|
13056
13104
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a regular expression."));
|
|
13057
13105
|
}
|
|
13058
13106
|
|
|
13059
|
-
return
|
|
13107
|
+
return null;
|
|
13060
13108
|
});
|
|
13109
|
+
//# sourceMappingURL=prop-types.js.map
|
|
13061
13110
|
|
|
13062
13111
|
/***/ }),
|
|
13063
13112
|
|
|
@@ -13075,7 +13124,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13075
13124
|
/* harmony export */ "getScaleFromName": () => (/* binding */ getScaleFromName),
|
|
13076
13125
|
/* harmony export */ "getScaleFromProps": () => (/* binding */ getScaleFromProps),
|
|
13077
13126
|
/* harmony export */ "getScaleType": () => (/* binding */ getScaleType),
|
|
13078
|
-
/* harmony export */ "getType": () => (/* binding */ getType)
|
|
13127
|
+
/* harmony export */ "getType": () => (/* binding */ getType),
|
|
13128
|
+
/* harmony export */ "validScale": () => (/* binding */ validScale)
|
|
13079
13129
|
/* harmony export */ });
|
|
13080
13130
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
|
|
13081
13131
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -13093,8 +13143,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13093
13143
|
|
|
13094
13144
|
|
|
13095
13145
|
|
|
13096
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13146
|
+
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13097
13147
|
|
|
13148
|
+
// Private Functions
|
|
13098
13149
|
function toNewName(scale) {
|
|
13099
13150
|
// d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
|
|
13100
13151
|
var capitalize = function (s) {
|
|
@@ -13164,7 +13215,13 @@ function getScaleTypeFromData(props, axis) {
|
|
|
13164
13215
|
|
|
13165
13216
|
|
|
13166
13217
|
function getScaleFromName(name) {
|
|
13167
|
-
|
|
13218
|
+
if (validScale(name)) {
|
|
13219
|
+
var methodName = toNewName(name); // @ts-expect-error scaleTime is not directly compatible with our D3Scale definition
|
|
13220
|
+
|
|
13221
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_5__[methodName]();
|
|
13222
|
+
}
|
|
13223
|
+
|
|
13224
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
13168
13225
|
}
|
|
13169
13226
|
function getBaseScale(props, axis) {
|
|
13170
13227
|
var scale = getScaleFromProps(props, axis);
|
|
@@ -13174,7 +13231,7 @@ function getBaseScale(props, axis) {
|
|
|
13174
13231
|
}
|
|
13175
13232
|
|
|
13176
13233
|
var defaultScale = getScaleFromDomain(props, axis) || getScaleTypeFromData(props, axis);
|
|
13177
|
-
return
|
|
13234
|
+
return getScaleFromName(defaultScale);
|
|
13178
13235
|
}
|
|
13179
13236
|
function getDefaultScale() {
|
|
13180
13237
|
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
@@ -13187,7 +13244,7 @@ function getScaleFromProps(props, axis) {
|
|
|
13187
13244
|
var scale = props.scale[axis] || props.scale;
|
|
13188
13245
|
|
|
13189
13246
|
if (validScale(scale)) {
|
|
13190
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale :
|
|
13247
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale : getScaleFromName(scale);
|
|
13191
13248
|
}
|
|
13192
13249
|
|
|
13193
13250
|
return undefined;
|
|
@@ -13222,6 +13279,7 @@ function getType(scale) {
|
|
|
13222
13279
|
})[0];
|
|
13223
13280
|
return scaleType ? scaleType.name : undefined;
|
|
13224
13281
|
}
|
|
13282
|
+
//# sourceMappingURL=scale.js.map
|
|
13225
13283
|
|
|
13226
13284
|
/***/ }),
|
|
13227
13285
|
|
|
@@ -13293,6 +13351,7 @@ function getColorScale(name) {
|
|
|
13293
13351
|
};
|
|
13294
13352
|
return name ? scales[name] : scales.grayscale;
|
|
13295
13353
|
}
|
|
13354
|
+
//# sourceMappingURL=style.js.map
|
|
13296
13355
|
|
|
13297
13356
|
/***/ }),
|
|
13298
13357
|
|
|
@@ -13497,8 +13556,10 @@ var _getSizeWithRotate = function (axisSize, dependentSize, angle) {
|
|
|
13497
13556
|
|
|
13498
13557
|
|
|
13499
13558
|
var convertLengthToPixels = function (length, fontSize) {
|
|
13500
|
-
var
|
|
13501
|
-
|
|
13559
|
+
var _length$match;
|
|
13560
|
+
|
|
13561
|
+
var attribute = (_length$match = length.match(/[a-zA-Z%]+/)) === null || _length$match === void 0 ? void 0 : _length$match[0];
|
|
13562
|
+
var value = Number(length.match(/[0-9.,]+/));
|
|
13502
13563
|
var result;
|
|
13503
13564
|
|
|
13504
13565
|
if (!attribute) {
|
|
@@ -13564,9 +13625,9 @@ var _approximateTextHeightInternal = function (text, style) {
|
|
|
13564
13625
|
var height = containsCaps ? lineStyle.fontSize * coefficients.lineCapitalCoef : lineStyle.fontSize;
|
|
13565
13626
|
return total + lineStyle.lineHeight * height;
|
|
13566
13627
|
}, 0);
|
|
13567
|
-
};
|
|
13568
|
-
|
|
13628
|
+
};
|
|
13569
13629
|
|
|
13630
|
+
// Stubbable implementation.
|
|
13570
13631
|
var _approximateTextSizeInternal = {
|
|
13571
13632
|
impl: function (text, style) {
|
|
13572
13633
|
var angle = Array.isArray(style) ? style[0] && style[0].angle : style && style.angle;
|
|
@@ -13585,7 +13646,7 @@ var _approximateTextSizeInternal = {
|
|
|
13585
13646
|
};
|
|
13586
13647
|
/**
|
|
13587
13648
|
* Predict text size by font params.
|
|
13588
|
-
* @param {string} text Content for width calculation.
|
|
13649
|
+
* @param {string|string[]} text Content for width calculation.
|
|
13589
13650
|
* @param {Object} style Text styles, ,fontFamily, fontSize, etc.
|
|
13590
13651
|
* @param {string} style.fontFamily Text fontFamily.
|
|
13591
13652
|
* @param {(number|string)} style.fontSize Text fontSize.
|
|
@@ -13598,6 +13659,7 @@ var _approximateTextSizeInternal = {
|
|
|
13598
13659
|
var approximateTextSize = function (text, style) {
|
|
13599
13660
|
return _approximateTextSizeInternal.impl(text, style);
|
|
13600
13661
|
};
|
|
13662
|
+
//# sourceMappingURL=textsize.js.map
|
|
13601
13663
|
|
|
13602
13664
|
/***/ }),
|
|
13603
13665
|
|
|
@@ -13628,6 +13690,7 @@ var TimerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cre
|
|
|
13628
13690
|
});
|
|
13629
13691
|
TimerContext.displayName = "TimerContext";
|
|
13630
13692
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimerContext);
|
|
13693
|
+
//# sourceMappingURL=timer-context.js.map
|
|
13631
13694
|
|
|
13632
13695
|
/***/ }),
|
|
13633
13696
|
|
|
@@ -13730,6 +13793,7 @@ var Timer = /*#__PURE__*/function () {
|
|
|
13730
13793
|
}();
|
|
13731
13794
|
|
|
13732
13795
|
|
|
13796
|
+
//# sourceMappingURL=timer.js.map
|
|
13733
13797
|
|
|
13734
13798
|
/***/ }),
|
|
13735
13799
|
|
|
@@ -13820,7 +13884,7 @@ function getChildData(child) {
|
|
|
13820
13884
|
}
|
|
13821
13885
|
/**
|
|
13822
13886
|
* If a parent component has animation enabled, calculate the transitions
|
|
13823
|
-
* for any data of any child component that supports data transitions
|
|
13887
|
+
* for any data of any child component that supports data transitions.
|
|
13824
13888
|
* Data transitions are defined as any two datasets where data nodes exist
|
|
13825
13889
|
* in the first set and not the second, in the second and not the first,
|
|
13826
13890
|
* or both.
|
|
@@ -13949,7 +14013,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
13949
14013
|
|
|
13950
14014
|
if (exitingNodes) {
|
|
13951
14015
|
// After the exit transition occurs, trigger the animations for
|
|
13952
|
-
// nodes that are neither exiting
|
|
14016
|
+
// nodes that are neither exiting nor entering.
|
|
13953
14017
|
animate.onEnd = cb;
|
|
13954
14018
|
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.
|
|
13955
14019
|
|
|
@@ -14019,7 +14083,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
14019
14083
|
* and its index in the parent's children array.
|
|
14020
14084
|
*
|
|
14021
14085
|
* In particular, this will include an `animate` object that is set appropriately
|
|
14022
|
-
* so that each child will be
|
|
14086
|
+
* so that each child will be synchronized for each stage of a transition
|
|
14023
14087
|
* animation. It will also include a transformed `data` object, where each datum
|
|
14024
14088
|
* is transformed by `animate.onExit` and `animate.onEnter` `before` and `after`
|
|
14025
14089
|
* functions.
|
|
@@ -14164,6 +14228,7 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
14164
14228
|
};
|
|
14165
14229
|
};
|
|
14166
14230
|
}
|
|
14231
|
+
//# sourceMappingURL=transitions.js.map
|
|
14167
14232
|
|
|
14168
14233
|
/***/ }),
|
|
14169
14234
|
|
|
@@ -14202,7 +14267,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
14202
14267
|
|
|
14203
14268
|
/*
|
|
14204
14269
|
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
14205
|
-
The startsWidth array will contain the start of any accepted user-prop that
|
|
14270
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
14206
14271
|
starts with these characters.
|
|
14207
14272
|
The exactMatch will contain a list of exact prop names that are accepted.
|
|
14208
14273
|
*/
|
|
@@ -14211,6 +14276,7 @@ var USER_PROPS_SAFELIST = {
|
|
|
14211
14276
|
startsWith: ["data-", "aria-"],
|
|
14212
14277
|
exactMatch: []
|
|
14213
14278
|
};
|
|
14279
|
+
|
|
14214
14280
|
/**
|
|
14215
14281
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
14216
14282
|
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
@@ -14219,7 +14285,6 @@ var USER_PROPS_SAFELIST = {
|
|
|
14219
14285
|
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
14220
14286
|
* otherwise
|
|
14221
14287
|
*/
|
|
14222
|
-
|
|
14223
14288
|
var doesPropStartWith = function (key) {
|
|
14224
14289
|
var startsWith = false;
|
|
14225
14290
|
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
@@ -14296,14 +14361,15 @@ var getSafeUserProps = function (props) {
|
|
|
14296
14361
|
/**
|
|
14297
14362
|
* Wraps a component and adds safe user props
|
|
14298
14363
|
*
|
|
14299
|
-
* @param {
|
|
14364
|
+
* @param {ReactElement} component: parent component
|
|
14300
14365
|
* @param {Object} props: props to be filtered
|
|
14301
|
-
* @returns {
|
|
14366
|
+
* @returns {ReactElement} modified component
|
|
14302
14367
|
*/
|
|
14303
14368
|
|
|
14304
14369
|
var withSafeUserProps = function (component, props) {
|
|
14305
14370
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(component, getSafeUserProps(props));
|
|
14306
14371
|
};
|
|
14372
|
+
//# sourceMappingURL=user-props.js.map
|
|
14307
14373
|
|
|
14308
14374
|
/***/ }),
|
|
14309
14375
|
|