victory-scatter 36.5.0 → 36.5.1
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-scatter.js +237 -171
- package/dist/victory-scatter.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-scatter.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-scatter.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-scatter.js +8 -8
package/dist/victory-scatter.js
CHANGED
|
@@ -316,7 +316,7 @@ VictoryScatter.animationWhitelist = ["data", "domain", "height", "maxBubbleSize"
|
|
|
316
316
|
VictoryScatter.displayName = "VictoryScatter";
|
|
317
317
|
VictoryScatter.role = "scatter";
|
|
318
318
|
VictoryScatter.defaultTransitions = victory_core__WEBPACK_IMPORTED_MODULE_3__.discreteTransitions();
|
|
319
|
-
VictoryScatter.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.dataProps), {}, {
|
|
319
|
+
VictoryScatter.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.dataProps), {}, {
|
|
320
320
|
bubbleProperty: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string),
|
|
321
321
|
maxBubbleSize: victory_core__WEBPACK_IMPORTED_MODULE_6__.nonNegative,
|
|
322
322
|
minBubbleSize: victory_core__WEBPACK_IMPORTED_MODULE_6__.nonNegative,
|
|
@@ -341,7 +341,7 @@ VictoryScatter.getBaseProps = function (props) {
|
|
|
341
341
|
};
|
|
342
342
|
|
|
343
343
|
VictoryScatter.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
344
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_14__
|
|
344
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_14__.addEvents)(VictoryScatter));
|
|
345
345
|
|
|
346
346
|
/***/ }),
|
|
347
347
|
|
|
@@ -6981,7 +6981,7 @@ var isInterpolatable = function (obj) {
|
|
|
6981
6981
|
// component is only going to call the function (in which case it's
|
|
6982
6982
|
// safely interpolatable) or if it's going to access special properties
|
|
6983
6983
|
// (in which case our function generated from `interpolateFunction` will
|
|
6984
|
-
// most likely cause an error. We could check for enumerable properties
|
|
6984
|
+
// most likely cause an error). We could check for enumerable properties
|
|
6985
6985
|
// on the function object here to see if it's a "plain" function, but
|
|
6986
6986
|
// let's just require that components prevent such function props from
|
|
6987
6987
|
// being animated in the first place.
|
|
@@ -7146,16 +7146,18 @@ var victoryInterpolator = function (a, b) {
|
|
|
7146
7146
|
}
|
|
7147
7147
|
|
|
7148
7148
|
if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(a) || lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(b)) {
|
|
7149
|
-
// @ts-expect-error These generics are tough, but they work
|
|
7149
|
+
// @ts-expect-error These generics are tough, but they work :)
|
|
7150
7150
|
return interpolateObject(a, b);
|
|
7151
7151
|
}
|
|
7152
7152
|
|
|
7153
7153
|
if (typeof a === "string" || typeof b === "string") {
|
|
7154
7154
|
return interpolateString(a, b);
|
|
7155
|
-
}
|
|
7155
|
+
} // @ts-expect-error These generics are tough, but they work :)
|
|
7156
|
+
|
|
7156
7157
|
|
|
7157
7158
|
return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__["default"])(a, b);
|
|
7158
7159
|
};
|
|
7160
|
+
//# sourceMappingURL=util.js.map
|
|
7159
7161
|
|
|
7160
7162
|
/***/ }),
|
|
7161
7163
|
|
|
@@ -7418,6 +7420,7 @@ VictoryAnimation.defaultProps = {
|
|
|
7418
7420
|
easing: "quadInOut"
|
|
7419
7421
|
};
|
|
7420
7422
|
VictoryAnimation.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_5__["default"];
|
|
7423
|
+
//# sourceMappingURL=victory-animation.js.map
|
|
7421
7424
|
|
|
7422
7425
|
/***/ }),
|
|
7423
7426
|
|
|
@@ -7731,6 +7734,7 @@ VictoryContainer.defaultProps = {
|
|
|
7731
7734
|
role: "img"
|
|
7732
7735
|
};
|
|
7733
7736
|
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
7737
|
+
//# sourceMappingURL=victory-container.js.map
|
|
7734
7738
|
|
|
7735
7739
|
/***/ }),
|
|
7736
7740
|
|
|
@@ -8336,10 +8340,9 @@ VictoryLabel.propTypes = {
|
|
|
8336
8340
|
inline: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8337
8341
|
labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["parallel", "perpendicular", "vertical"]),
|
|
8338
8342
|
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)]),
|
|
8339
|
-
// @ts-expect-error "x is required in origin"
|
|
8340
8343
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
|
|
8341
|
-
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative,
|
|
8342
|
-
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative
|
|
8344
|
+
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired,
|
|
8345
|
+
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired
|
|
8343
8346
|
}),
|
|
8344
8347
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8345
8348
|
renderInPortal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
@@ -8373,6 +8376,7 @@ VictoryLabel.defaultProps = {
|
|
|
8373
8376
|
// Magic number from d3.
|
|
8374
8377
|
lineHeight: 1
|
|
8375
8378
|
};
|
|
8379
|
+
//# sourceMappingURL=victory-label.js.map
|
|
8376
8380
|
|
|
8377
8381
|
/***/ }),
|
|
8378
8382
|
|
|
@@ -8397,6 +8401,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8397
8401
|
*/
|
|
8398
8402
|
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
8399
8403
|
PortalContext.displayName = "PortalContext";
|
|
8404
|
+
//# sourceMappingURL=portal-context.js.map
|
|
8400
8405
|
|
|
8401
8406
|
/***/ }),
|
|
8402
8407
|
|
|
@@ -8508,6 +8513,7 @@ Portal.propTypes = {
|
|
|
8508
8513
|
viewBox: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8509
8514
|
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_3__.nonNegative
|
|
8510
8515
|
};
|
|
8516
|
+
//# sourceMappingURL=portal.js.map
|
|
8511
8517
|
|
|
8512
8518
|
/***/ }),
|
|
8513
8519
|
|
|
@@ -8651,6 +8657,7 @@ VictoryPortal.defaultProps = {
|
|
|
8651
8657
|
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
8652
8658
|
};
|
|
8653
8659
|
VictoryPortal.contextType = _portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext;
|
|
8660
|
+
//# sourceMappingURL=victory-portal.js.map
|
|
8654
8661
|
|
|
8655
8662
|
/***/ }),
|
|
8656
8663
|
|
|
@@ -8687,6 +8694,7 @@ var Path = function (props) {
|
|
|
8687
8694
|
// @ts-expect-error FIXME: "id cannot be a number"
|
|
8688
8695
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", rest);
|
|
8689
8696
|
};
|
|
8697
|
+
//# sourceMappingURL=path.js.map
|
|
8690
8698
|
|
|
8691
8699
|
/***/ }),
|
|
8692
8700
|
|
|
@@ -8788,7 +8796,7 @@ var Point = function (props) {
|
|
|
8788
8796
|
clipPath: props.clipPath
|
|
8789
8797
|
}, userProps));
|
|
8790
8798
|
};
|
|
8791
|
-
Point.propTypes = _objectSpread(_objectSpread({}, _victory_util_common_props__WEBPACK_IMPORTED_MODULE_5__.primitiveProps), {}, {
|
|
8799
|
+
Point.propTypes = _objectSpread(_objectSpread({}, _victory_util_common_props__WEBPACK_IMPORTED_MODULE_5__.CommonProps.primitiveProps), {}, {
|
|
8792
8800
|
datum: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().object),
|
|
8793
8801
|
getPath: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),
|
|
8794
8802
|
pathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().element),
|
|
@@ -8802,6 +8810,7 @@ Point.defaultProps = {
|
|
|
8802
8810
|
role: "presentation",
|
|
8803
8811
|
shapeRendering: "auto"
|
|
8804
8812
|
};
|
|
8813
|
+
//# sourceMappingURL=point.js.map
|
|
8805
8814
|
|
|
8806
8815
|
/***/ }),
|
|
8807
8816
|
|
|
@@ -8844,6 +8853,7 @@ var Rect = function (props) {
|
|
|
8844
8853
|
vectorEffect: "non-scaling-stroke"
|
|
8845
8854
|
}, rest));
|
|
8846
8855
|
};
|
|
8856
|
+
//# sourceMappingURL=rect.js.map
|
|
8847
8857
|
|
|
8848
8858
|
/***/ }),
|
|
8849
8859
|
|
|
@@ -8887,6 +8897,7 @@ Text.propTypes = {
|
|
|
8887
8897
|
desc: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
8888
8898
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
8889
8899
|
};
|
|
8900
|
+
//# sourceMappingURL=text.js.map
|
|
8890
8901
|
|
|
8891
8902
|
/***/ }),
|
|
8892
8903
|
|
|
@@ -8911,6 +8922,7 @@ var TSpan = function (props) {
|
|
|
8911
8922
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tspan", props)
|
|
8912
8923
|
);
|
|
8913
8924
|
};
|
|
8925
|
+
//# sourceMappingURL=tspan.js.map
|
|
8914
8926
|
|
|
8915
8927
|
/***/ }),
|
|
8916
8928
|
|
|
@@ -9186,6 +9198,7 @@ var grayscale = {
|
|
|
9186
9198
|
}
|
|
9187
9199
|
}, baseProps)
|
|
9188
9200
|
};
|
|
9201
|
+
//# sourceMappingURL=grayscale.js.map
|
|
9189
9202
|
|
|
9190
9203
|
/***/ }),
|
|
9191
9204
|
|
|
@@ -9488,6 +9501,7 @@ var material = {
|
|
|
9488
9501
|
}
|
|
9489
9502
|
}, baseProps)
|
|
9490
9503
|
};
|
|
9504
|
+
//# sourceMappingURL=material.js.map
|
|
9491
9505
|
|
|
9492
9506
|
/***/ }),
|
|
9493
9507
|
|
|
@@ -9511,6 +9525,7 @@ var VictoryTheme = {
|
|
|
9511
9525
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
9512
9526
|
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
9513
9527
|
};
|
|
9528
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
9514
9529
|
|
|
9515
9530
|
/***/ }),
|
|
9516
9531
|
|
|
@@ -9779,6 +9794,7 @@ VictoryTransition.propTypes = {
|
|
|
9779
9794
|
children: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().node)
|
|
9780
9795
|
};
|
|
9781
9796
|
VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_10__["default"];
|
|
9797
|
+
//# sourceMappingURL=victory-transition.js.map
|
|
9782
9798
|
|
|
9783
9799
|
/***/ }),
|
|
9784
9800
|
|
|
@@ -9791,26 +9807,26 @@ VictoryTransition.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MO
|
|
|
9791
9807
|
"use strict";
|
|
9792
9808
|
__webpack_require__.r(__webpack_exports__);
|
|
9793
9809
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9794
|
-
/* harmony export */ "
|
|
9810
|
+
/* harmony export */ "addEvents": () => (/* binding */ addEvents)
|
|
9795
9811
|
/* harmony export */ });
|
|
9796
|
-
/* harmony import */ var
|
|
9797
|
-
/* harmony import */ var
|
|
9798
|
-
/* harmony import */ var
|
|
9799
|
-
/* harmony import */ var
|
|
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
|
|
9812
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/without */ "../../../node_modules/lodash/without.js");
|
|
9813
|
+
/* harmony import */ var lodash_without__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_without__WEBPACK_IMPORTED_MODULE_0__);
|
|
9814
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/pick */ "../../../node_modules/lodash/pick.js");
|
|
9815
|
+
/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_1__);
|
|
9816
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/keys */ "../../../node_modules/lodash/keys.js");
|
|
9817
|
+
/* harmony import */ var lodash_keys__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_keys__WEBPACK_IMPORTED_MODULE_2__);
|
|
9818
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/isNil */ "../../../node_modules/lodash/isNil.js");
|
|
9819
|
+
/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_3__);
|
|
9820
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isFunction */ "../../../node_modules/lodash/isFunction.js");
|
|
9821
|
+
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_4__);
|
|
9822
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/lodash/isEmpty.js");
|
|
9823
|
+
/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5__);
|
|
9824
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/difference */ "../../../node_modules/lodash/difference.js");
|
|
9825
|
+
/* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_difference__WEBPACK_IMPORTED_MODULE_6__);
|
|
9826
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! lodash/defaults */ "../../../node_modules/lodash/defaults.js");
|
|
9827
|
+
/* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_7__);
|
|
9828
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/lodash/assign.js");
|
|
9829
|
+
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_8__);
|
|
9814
9830
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "react");
|
|
9815
9831
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__);
|
|
9816
9832
|
/* harmony import */ var _events__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./events */ "../../victory-core/es/victory-util/events.js");
|
|
@@ -9863,13 +9879,14 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
9863
9879
|
|
|
9864
9880
|
|
|
9865
9881
|
|
|
9866
|
-
|
|
9882
|
+
|
|
9883
|
+
|
|
9884
|
+
// DISCLAIMER:
|
|
9867
9885
|
// This file is not currently tested, and it is first on the list of files
|
|
9868
9886
|
// to refactor in our current refactoring effort. Please do not make changes
|
|
9869
9887
|
// to this file without manual testing and/or refactoring and adding tests.
|
|
9870
|
-
|
|
9871
9888
|
var datumHasXandY = function (datum) {
|
|
9872
|
-
return !
|
|
9889
|
+
return !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._x) && !lodash_isNil__WEBPACK_IMPORTED_MODULE_3___default()(datum._y);
|
|
9873
9890
|
}; // used for checking state changes. Expected components can be passed in via options
|
|
9874
9891
|
|
|
9875
9892
|
|
|
@@ -9881,44 +9898,45 @@ var defaultComponents = [{
|
|
|
9881
9898
|
}, {
|
|
9882
9899
|
name: "labels"
|
|
9883
9900
|
}];
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9901
|
+
function addEvents(WrappedComponent) {
|
|
9902
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9903
|
+
|
|
9904
|
+
// @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
|
|
9905
|
+
var AddEventsMixin = /*#__PURE__*/function (_WrappedComponent) {
|
|
9906
|
+
_inherits(AddEventsMixin, _WrappedComponent);
|
|
9887
9907
|
|
|
9888
|
-
var _super = _createSuper(
|
|
9908
|
+
var _super = _createSuper(AddEventsMixin);
|
|
9889
9909
|
|
|
9890
|
-
function
|
|
9910
|
+
function AddEventsMixin(props) {
|
|
9891
9911
|
var _this;
|
|
9892
9912
|
|
|
9893
|
-
_classCallCheck(this,
|
|
9913
|
+
_classCallCheck(this, AddEventsMixin);
|
|
9894
9914
|
|
|
9895
9915
|
_this = _super.call(this, props);
|
|
9896
|
-
var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9897
|
-
var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
|
|
9898
9916
|
_this.state = {};
|
|
9917
|
+
_this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
|
|
9918
|
+
_this.getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
|
|
9899
9919
|
|
|
9900
9920
|
_this.getEvents = function (p, target, eventKey) {
|
|
9901
|
-
return
|
|
9921
|
+
return _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.call(_assertThisInitialized(_this), p, target, eventKey, _this.getScopedEvents);
|
|
9902
9922
|
};
|
|
9903
9923
|
|
|
9904
|
-
_this.
|
|
9905
|
-
|
|
9906
|
-
var calculatedValues = _this.getCalculatedValues(props);
|
|
9907
|
-
|
|
9908
|
-
_this.cacheValues(calculatedValues);
|
|
9909
|
-
|
|
9910
|
-
_this.externalMutations = _this.getExternalMutations(props);
|
|
9911
|
-
_this.calculatedState = _this.getStateChanges(props);
|
|
9924
|
+
_this.externalMutations = _this.getExternalMutations(_this.props);
|
|
9925
|
+
_this.calculatedState = _this.getStateChanges(_this.props);
|
|
9912
9926
|
_this.globalEvents = {};
|
|
9913
9927
|
_this.prevGlobalEventKeys = [];
|
|
9914
9928
|
_this.boundGlobalEvents = {};
|
|
9929
|
+
|
|
9930
|
+
_this.cacheValues(_this.getCalculatedValues(props));
|
|
9931
|
+
|
|
9915
9932
|
return _this;
|
|
9916
9933
|
}
|
|
9917
9934
|
|
|
9918
|
-
_createClass(
|
|
9935
|
+
_createClass(AddEventsMixin, [{
|
|
9919
9936
|
key: "shouldComponentUpdate",
|
|
9920
9937
|
value: function shouldComponentUpdate(nextProps) {
|
|
9921
|
-
var externalMutations = this.getExternalMutations(nextProps);
|
|
9938
|
+
var externalMutations = this.getExternalMutations(nextProps); // @ts-expect-error "Property 'animating' does not exist on type EventMixinCommonProps"
|
|
9939
|
+
|
|
9922
9940
|
var animating = this.props.animating || this.props.animate;
|
|
9923
9941
|
var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
|
|
9924
9942
|
|
|
@@ -9948,7 +9966,7 @@ var defaultComponents = [{
|
|
|
9948
9966
|
value: function componentDidMount() {
|
|
9949
9967
|
var _this2 = this;
|
|
9950
9968
|
|
|
9951
|
-
var globalEventKeys =
|
|
9969
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
9952
9970
|
|
|
9953
9971
|
globalEventKeys.forEach(function (key) {
|
|
9954
9972
|
return _this2.addGlobalListener(key);
|
|
@@ -9963,15 +9981,15 @@ var defaultComponents = [{
|
|
|
9963
9981
|
var calculatedState = this.getStateChanges(prevProps);
|
|
9964
9982
|
this.calculatedState = calculatedState;
|
|
9965
9983
|
|
|
9966
|
-
var globalEventKeys =
|
|
9984
|
+
var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(this.globalEvents);
|
|
9967
9985
|
|
|
9968
|
-
var removedGlobalEventKeys =
|
|
9986
|
+
var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(this.prevGlobalEventKeys, globalEventKeys);
|
|
9969
9987
|
|
|
9970
9988
|
removedGlobalEventKeys.forEach(function (key) {
|
|
9971
9989
|
return _this3.removeGlobalListener(key);
|
|
9972
9990
|
});
|
|
9973
9991
|
|
|
9974
|
-
var addedGlobalEventKeys =
|
|
9992
|
+
var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_6___default()(globalEventKeys, this.prevGlobalEventKeys);
|
|
9975
9993
|
|
|
9976
9994
|
addedGlobalEventKeys.forEach(function (key) {
|
|
9977
9995
|
return _this3.addGlobalListener(key);
|
|
@@ -10017,12 +10035,11 @@ var defaultComponents = [{
|
|
|
10017
10035
|
}
|
|
10018
10036
|
|
|
10019
10037
|
var getState = function (key, type) {
|
|
10020
|
-
var result =
|
|
10038
|
+
var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
|
|
10021
10039
|
|
|
10022
|
-
return
|
|
10040
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(result) ? undefined : result;
|
|
10023
10041
|
};
|
|
10024
10042
|
|
|
10025
|
-
options = options || {};
|
|
10026
10043
|
var components = options.components || defaultComponents;
|
|
10027
10044
|
var stateChanges = components.map(function (component) {
|
|
10028
10045
|
if (!props.standalone && component.name === "parent") {
|
|
@@ -10039,9 +10056,9 @@ var defaultComponents = [{
|
|
|
10039
10056
|
}, {
|
|
10040
10057
|
key: "applyExternalMutations",
|
|
10041
10058
|
value: function applyExternalMutations(props, externalMutations) {
|
|
10042
|
-
if (!
|
|
10059
|
+
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
|
|
10043
10060
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
10044
|
-
memo =
|
|
10061
|
+
memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
10045
10062
|
return memo;
|
|
10046
10063
|
}, []);
|
|
10047
10064
|
var compiledCallbacks = callbacks.length ? function () {
|
|
@@ -10058,12 +10075,12 @@ var defaultComponents = [{
|
|
|
10058
10075
|
var sharedEvents = props.sharedEvents;
|
|
10059
10076
|
var components = WrappedComponent.expectedComponents;
|
|
10060
10077
|
var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
|
|
10061
|
-
var getSharedEventState = sharedEvents &&
|
|
10078
|
+
var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
|
|
10062
10079
|
return undefined;
|
|
10063
10080
|
};
|
|
10064
10081
|
var baseProps = this.getBaseProps(props, getSharedEventState);
|
|
10065
10082
|
|
|
10066
|
-
var dataKeys =
|
|
10083
|
+
var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(baseProps).filter(function (key) {
|
|
10067
10084
|
return key !== "parent";
|
|
10068
10085
|
});
|
|
10069
10086
|
|
|
@@ -10083,32 +10100,32 @@ var defaultComponents = [{
|
|
|
10083
10100
|
value: function getExternalMutations(props) {
|
|
10084
10101
|
var sharedEvents = props.sharedEvents,
|
|
10085
10102
|
externalEventMutations = props.externalEventMutations;
|
|
10086
|
-
return
|
|
10103
|
+
return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
|
|
10087
10104
|
}
|
|
10088
10105
|
}, {
|
|
10089
10106
|
key: "cacheValues",
|
|
10090
10107
|
value: function cacheValues(obj) {
|
|
10091
10108
|
var _this7 = this;
|
|
10092
10109
|
|
|
10093
|
-
|
|
10110
|
+
lodash_keys__WEBPACK_IMPORTED_MODULE_2___default()(obj).forEach(function (key) {
|
|
10094
10111
|
_this7[key] = obj[key];
|
|
10095
10112
|
});
|
|
10096
10113
|
}
|
|
10097
10114
|
}, {
|
|
10098
10115
|
key: "getBaseProps",
|
|
10099
10116
|
value: function getBaseProps(props, getSharedEventState) {
|
|
10100
|
-
getSharedEventState = getSharedEventState || this.getSharedEventState;
|
|
10117
|
+
getSharedEventState = getSharedEventState || this.getSharedEventState.bind(this);
|
|
10101
10118
|
var sharedParentState = getSharedEventState("parent", "parent");
|
|
10102
10119
|
var parentState = this.getEventState("parent", "parent");
|
|
10103
10120
|
|
|
10104
|
-
var baseParentProps =
|
|
10121
|
+
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
|
|
10105
10122
|
|
|
10106
10123
|
var parentPropsList = baseParentProps.parentControlledProps;
|
|
10107
|
-
var parentProps = parentPropsList ?
|
|
10124
|
+
var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_1___default()(baseParentProps, parentPropsList) : {};
|
|
10108
10125
|
|
|
10109
|
-
var modifiedProps =
|
|
10126
|
+
var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentProps, props);
|
|
10110
10127
|
|
|
10111
|
-
return
|
|
10128
|
+
return typeof WrappedComponent.getBaseProps === "function" ? WrappedComponent.getBaseProps(modifiedProps) : {};
|
|
10112
10129
|
}
|
|
10113
10130
|
}, {
|
|
10114
10131
|
key: "getAllEvents",
|
|
@@ -10136,21 +10153,21 @@ var defaultComponents = [{
|
|
|
10136
10153
|
if (this.hasEvents) {
|
|
10137
10154
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
10138
10155
|
|
|
10139
|
-
var componentProps =
|
|
10156
|
+
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10140
10157
|
index: index,
|
|
10141
10158
|
key: id
|
|
10142
10159
|
}, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
|
|
10143
10160
|
id: id
|
|
10144
10161
|
});
|
|
10145
10162
|
|
|
10146
|
-
var events =
|
|
10163
|
+
var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
|
|
10147
10164
|
|
|
10148
|
-
return
|
|
10165
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, componentProps, {
|
|
10149
10166
|
events: events
|
|
10150
10167
|
});
|
|
10151
10168
|
}
|
|
10152
10169
|
|
|
10153
|
-
return
|
|
10170
|
+
return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
10154
10171
|
index: index,
|
|
10155
10172
|
key: id
|
|
10156
10173
|
}, component.props, baseProps, {
|
|
@@ -10173,11 +10190,14 @@ var defaultComponents = [{
|
|
|
10173
10190
|
}, {
|
|
10174
10191
|
key: "animateComponent",
|
|
10175
10192
|
value: function animateComponent(props, defaultAnimationWhitelist) {
|
|
10176
|
-
var
|
|
10193
|
+
var _props$animate;
|
|
10194
|
+
|
|
10195
|
+
var animationWhitelist = typeof props.animate === "object" && ((_props$animate = props.animate) === null || _props$animate === void 0 ? void 0 : _props$animate.animationWhitelist) || defaultAnimationWhitelist;
|
|
10196
|
+
var Comp = this.constructor;
|
|
10177
10197
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.VictoryTransition, {
|
|
10178
10198
|
animate: props.animate,
|
|
10179
10199
|
animationWhitelist: animationWhitelist
|
|
10180
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(
|
|
10200
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(Comp, props));
|
|
10181
10201
|
} // Used by `VictoryLine` and `VictoryArea`
|
|
10182
10202
|
|
|
10183
10203
|
}, {
|
|
@@ -10189,7 +10209,7 @@ var defaultComponents = [{
|
|
|
10189
10209
|
labelComponent = props.labelComponent,
|
|
10190
10210
|
groupComponent = props.groupComponent;
|
|
10191
10211
|
|
|
10192
|
-
var dataKeys =
|
|
10212
|
+
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
|
|
10193
10213
|
|
|
10194
10214
|
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
10195
10215
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
@@ -10236,9 +10256,12 @@ var defaultComponents = [{
|
|
|
10236
10256
|
}
|
|
10237
10257
|
}]);
|
|
10238
10258
|
|
|
10239
|
-
return
|
|
10259
|
+
return AddEventsMixin;
|
|
10240
10260
|
}(WrappedComponent);
|
|
10241
|
-
|
|
10261
|
+
|
|
10262
|
+
return AddEventsMixin;
|
|
10263
|
+
}
|
|
10264
|
+
//# sourceMappingURL=add-events.js.map
|
|
10242
10265
|
|
|
10243
10266
|
/***/ }),
|
|
10244
10267
|
|
|
@@ -10272,7 +10295,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10272
10295
|
|
|
10273
10296
|
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; }
|
|
10274
10297
|
|
|
10275
|
-
/* eslint-disable no-use-before-define */
|
|
10276
10298
|
function isNonEmptyArray(collection) {
|
|
10277
10299
|
return Array.isArray(collection) && collection.length > 0;
|
|
10278
10300
|
}
|
|
@@ -10311,7 +10333,8 @@ function getMaxValue(arr) {
|
|
|
10311
10333
|
}
|
|
10312
10334
|
|
|
10313
10335
|
var array = arr.concat(values);
|
|
10314
|
-
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array)))
|
|
10336
|
+
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10337
|
+
: Math.max.apply(Math, _toConsumableArray(array));
|
|
10315
10338
|
}
|
|
10316
10339
|
function getMinValue(arr) {
|
|
10317
10340
|
for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -10319,8 +10342,10 @@ function getMinValue(arr) {
|
|
|
10319
10342
|
}
|
|
10320
10343
|
|
|
10321
10344
|
var array = arr.concat(values);
|
|
10322
|
-
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array)))
|
|
10345
|
+
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
10346
|
+
: Math.min.apply(Math, _toConsumableArray(array));
|
|
10323
10347
|
}
|
|
10348
|
+
//# sourceMappingURL=collection.js.map
|
|
10324
10349
|
|
|
10325
10350
|
/***/ }),
|
|
10326
10351
|
|
|
@@ -10333,9 +10358,7 @@ function getMinValue(arr) {
|
|
|
10333
10358
|
"use strict";
|
|
10334
10359
|
__webpack_require__.r(__webpack_exports__);
|
|
10335
10360
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10336
|
-
/* harmony export */ "
|
|
10337
|
-
/* harmony export */ "dataProps": () => (/* binding */ dataProps),
|
|
10338
|
-
/* harmony export */ "primitiveProps": () => (/* binding */ primitiveProps)
|
|
10361
|
+
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
10339
10362
|
/* harmony export */ });
|
|
10340
10363
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
10341
10364
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -10343,26 +10366,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10343
10366
|
|
|
10344
10367
|
|
|
10345
10368
|
var dataProps = {
|
|
10369
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10346
10370
|
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({
|
|
10347
10371
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
10348
10372
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
10349
10373
|
})]),
|
|
10374
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10350
10375
|
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)]),
|
|
10351
10376
|
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10352
10377
|
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10353
10378
|
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10354
10379
|
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)]),
|
|
10355
10380
|
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10356
|
-
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))]),
|
|
10381
|
+
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))]),
|
|
10357
10382
|
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
10358
10383
|
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10359
10384
|
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10360
10385
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10361
10386
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10362
10387
|
}),
|
|
10363
|
-
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))]),
|
|
10364
|
-
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))]),
|
|
10365
|
-
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))])
|
|
10388
|
+
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))]),
|
|
10389
|
+
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))]),
|
|
10390
|
+
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))])
|
|
10366
10391
|
};
|
|
10367
10392
|
var baseProps = {
|
|
10368
10393
|
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)]),
|
|
@@ -10371,14 +10396,17 @@ var baseProps = {
|
|
|
10371
10396
|
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10372
10397
|
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10373
10398
|
})]),
|
|
10399
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10374
10400
|
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({
|
|
10375
10401
|
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)]),
|
|
10376
10402
|
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)])
|
|
10377
10403
|
})]),
|
|
10404
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10378
10405
|
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({
|
|
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
|
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([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().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))]),
|
|
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().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))])
|
|
@@ -10389,6 +10417,7 @@ var baseProps = {
|
|
|
10389
10417
|
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)]),
|
|
10390
10418
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
10391
10419
|
})),
|
|
10420
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10392
10421
|
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10393
10422
|
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
10394
10423
|
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)]),
|
|
@@ -10399,10 +10428,12 @@ var baseProps = {
|
|
|
10399
10428
|
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
10400
10429
|
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
10401
10430
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
10431
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10402
10432
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10403
10433
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10404
10434
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
10405
10435
|
}),
|
|
10436
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10406
10437
|
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({
|
|
10407
10438
|
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10408
10439
|
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
@@ -10411,17 +10442,19 @@ var baseProps = {
|
|
|
10411
10442
|
})]),
|
|
10412
10443
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
10413
10444
|
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10414
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
10415
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
10445
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
10446
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
10416
10447
|
})]),
|
|
10417
10448
|
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10418
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
10419
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
10449
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
10450
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
10420
10451
|
})]),
|
|
10452
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10421
10453
|
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10422
10454
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
10423
10455
|
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
10424
10456
|
}),
|
|
10457
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10425
10458
|
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({
|
|
10426
10459
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
10427
10460
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
@@ -10441,6 +10474,7 @@ var primitiveProps = {
|
|
|
10441
10474
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
10442
10475
|
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)]),
|
|
10443
10476
|
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)]),
|
|
10477
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
10444
10478
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
10445
10479
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
10446
10480
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
@@ -10456,6 +10490,12 @@ var primitiveProps = {
|
|
|
10456
10490
|
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)]),
|
|
10457
10491
|
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
10458
10492
|
};
|
|
10493
|
+
var CommonProps = {
|
|
10494
|
+
dataProps: dataProps,
|
|
10495
|
+
baseProps: baseProps,
|
|
10496
|
+
primitiveProps: primitiveProps
|
|
10497
|
+
};
|
|
10498
|
+
//# sourceMappingURL=common-props.js.map
|
|
10459
10499
|
|
|
10460
10500
|
/***/ }),
|
|
10461
10501
|
|
|
@@ -10969,6 +11009,7 @@ function isDataComponent(component) {
|
|
|
10969
11009
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
10970
11010
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_2___default()(whitelist, role);
|
|
10971
11011
|
}
|
|
11012
|
+
//# sourceMappingURL=data.js.map
|
|
10972
11013
|
|
|
10973
11014
|
/***/ }),
|
|
10974
11015
|
|
|
@@ -11091,6 +11132,7 @@ function discreteTransitions() {
|
|
|
11091
11132
|
}
|
|
11092
11133
|
};
|
|
11093
11134
|
}
|
|
11135
|
+
//# sourceMappingURL=default-transitions.js.map
|
|
11094
11136
|
|
|
11095
11137
|
/***/ }),
|
|
11096
11138
|
|
|
@@ -11192,8 +11234,9 @@ function getDomainPadding(props, axis) {
|
|
|
11192
11234
|
}
|
|
11193
11235
|
|
|
11194
11236
|
function getFlatData(dataset, axis) {
|
|
11237
|
+
var axisKey = "_".concat(axis);
|
|
11195
11238
|
return lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(dataset).map(function (datum) {
|
|
11196
|
-
return datum[
|
|
11239
|
+
return datum[axisKey] && datum[axisKey][1] !== undefined ? datum[axisKey][1] : datum[axisKey];
|
|
11197
11240
|
});
|
|
11198
11241
|
}
|
|
11199
11242
|
|
|
@@ -11258,7 +11301,9 @@ function padDomain(domain, props, axis) {
|
|
|
11258
11301
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
11259
11302
|
// Naive initial padding calculation
|
|
11260
11303
|
var initialPadding = {
|
|
11304
|
+
// @ts-expect-error `max/min` might be dates
|
|
11261
11305
|
left: Math.abs(max - min) * padding.left / rangeExtent,
|
|
11306
|
+
// @ts-expect-error `max/min` might be dates
|
|
11262
11307
|
right: Math.abs(max - min) * padding.right / rangeExtent
|
|
11263
11308
|
}; // Adjust the domain by the initial padding
|
|
11264
11309
|
|
|
@@ -11543,6 +11588,7 @@ function isDomainComponent(component) {
|
|
|
11543
11588
|
var whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
11544
11589
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_1___default()(whitelist, role);
|
|
11545
11590
|
}
|
|
11591
|
+
//# sourceMappingURL=domain.js.map
|
|
11546
11592
|
|
|
11547
11593
|
/***/ }),
|
|
11548
11594
|
|
|
@@ -11611,15 +11657,16 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
11611
11657
|
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; }
|
|
11612
11658
|
|
|
11613
11659
|
var GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
11660
|
+
|
|
11614
11661
|
/* Returns all own and shared events that should be attached to a single target element,
|
|
11615
11662
|
* i.e. an individual bar specified by target: "data", eventKey: [index].
|
|
11616
11663
|
* Returned events are scoped to the appropriate state. Either that of the component itself
|
|
11617
11664
|
* (i.e. VictoryBar) in the case of own events, or that of the parent component
|
|
11618
11665
|
* (i.e. VictoryChart) in the case of shared events
|
|
11619
11666
|
*/
|
|
11620
|
-
// eslint-disable-next-line max-params
|
|
11621
|
-
|
|
11622
|
-
|
|
11667
|
+
// eslint-disable-next-line max-params
|
|
11668
|
+
function getEvents(props, target, eventKey, // eslint-disable-next-line no-shadow
|
|
11669
|
+
getScopedEvents) {
|
|
11623
11670
|
var _this = this;
|
|
11624
11671
|
|
|
11625
11672
|
// Returns all events that apply to a particular target element
|
|
@@ -11842,24 +11889,27 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
11842
11889
|
return memo;
|
|
11843
11890
|
}, {});
|
|
11844
11891
|
}
|
|
11845
|
-
/*
|
|
11892
|
+
/*
|
|
11893
|
+
* Returns a partially applied event handler for a specific target element
|
|
11846
11894
|
* This allows event handlers to have access to props controlling each element
|
|
11847
11895
|
*/
|
|
11848
11896
|
|
|
11849
11897
|
function getPartialEvents(events, eventKey, childProps) {
|
|
11850
|
-
|
|
11898
|
+
if (!events) return {};
|
|
11899
|
+
return lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(events).reduce(function (memo, eventName) {
|
|
11851
11900
|
var appliedEvent = function (evt) {
|
|
11852
11901
|
return events[eventName](evt, childProps, eventKey, eventName);
|
|
11853
11902
|
};
|
|
11854
11903
|
|
|
11855
11904
|
memo[eventName] = appliedEvent;
|
|
11856
11905
|
return memo;
|
|
11857
|
-
}, {})
|
|
11906
|
+
}, {});
|
|
11858
11907
|
}
|
|
11908
|
+
|
|
11859
11909
|
/* Returns the property of the state object corresponding to event changes for
|
|
11860
11910
|
* a particular element
|
|
11861
11911
|
*/
|
|
11862
|
-
|
|
11912
|
+
// eslint-disable-next-line max-params
|
|
11863
11913
|
function getEventState(eventKey, namespace, childType) {
|
|
11864
11914
|
// Mandatory usage: `getEventState.bind(this)`
|
|
11865
11915
|
// eslint-disable-next-line no-invalid-this
|
|
@@ -12044,6 +12094,7 @@ var emulateReactEvent = function (event) {
|
|
|
12044
12094
|
nativeEvent: event
|
|
12045
12095
|
});
|
|
12046
12096
|
};
|
|
12097
|
+
//# sourceMappingURL=events.js.map
|
|
12047
12098
|
|
|
12048
12099
|
/***/ }),
|
|
12049
12100
|
|
|
@@ -12125,7 +12176,7 @@ function getPolarRange(props, axis) {
|
|
|
12125
12176
|
|
|
12126
12177
|
/**
|
|
12127
12178
|
* creates an object with some keys excluded
|
|
12128
|
-
* replacement for lodash.omit for performance. does not
|
|
12179
|
+
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
12129
12180
|
* @param {Object} originalObject: created object will be based on this object
|
|
12130
12181
|
* @param {Array<String>} ks: an array of keys to omit from the new object
|
|
12131
12182
|
* @returns {Object} new object with same properties as originalObject
|
|
@@ -12138,6 +12189,7 @@ function omit(originalObject) {
|
|
|
12138
12189
|
var newObject = {};
|
|
12139
12190
|
|
|
12140
12191
|
for (var key in originalObject) {
|
|
12192
|
+
// @ts-expect-error String is not assignable to Key
|
|
12141
12193
|
if (ks.indexOf(key) >= 0) {
|
|
12142
12194
|
continue;
|
|
12143
12195
|
}
|
|
@@ -12370,7 +12422,9 @@ function reduceChildren(children, iteratee) {
|
|
|
12370
12422
|
var parentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12371
12423
|
var initialMemo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
12372
12424
|
var combine = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (memo, item) {
|
|
12373
|
-
return
|
|
12425
|
+
return (// @ts-expect-error These defaults are hard to type
|
|
12426
|
+
memo.concat(item)
|
|
12427
|
+
);
|
|
12374
12428
|
};
|
|
12375
12429
|
var sharedProps = ["data", "domain", "categories", "polar", "startAngle", "endAngle", "minDomain", "maxDomain", "horizontal"];
|
|
12376
12430
|
|
|
@@ -12414,7 +12468,7 @@ function reduceChildren(children, iteratee) {
|
|
|
12414
12468
|
/**
|
|
12415
12469
|
* @param {Object} props: the props object
|
|
12416
12470
|
* @returns {Boolean} returns true if the props object contains `horizontal: true` of if any
|
|
12417
|
-
* children or nested children are
|
|
12471
|
+
* children or nested children are horizontal
|
|
12418
12472
|
*/
|
|
12419
12473
|
|
|
12420
12474
|
function isHorizontal(props) {
|
|
@@ -12437,6 +12491,7 @@ function isHorizontal(props) {
|
|
|
12437
12491
|
|
|
12438
12492
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children));
|
|
12439
12493
|
}
|
|
12494
|
+
//# sourceMappingURL=helpers.js.map
|
|
12440
12495
|
|
|
12441
12496
|
/***/ }),
|
|
12442
12497
|
|
|
@@ -12480,15 +12535,16 @@ function isMap(x) {
|
|
|
12480
12535
|
return !!(x && x[IMMUTABLE_MAP]);
|
|
12481
12536
|
}
|
|
12482
12537
|
function shallowToJS(x, whitelist) {
|
|
12483
|
-
return isIterable(x) ? x.reduce(function (
|
|
12538
|
+
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
12484
12539
|
if (whitelist && whitelist[key]) {
|
|
12485
12540
|
curr = shallowToJS(curr);
|
|
12486
12541
|
}
|
|
12487
12542
|
|
|
12488
|
-
|
|
12489
|
-
return
|
|
12543
|
+
result[key] = curr;
|
|
12544
|
+
return result;
|
|
12490
12545
|
}, isList(x) ? [] : {}) : x;
|
|
12491
12546
|
}
|
|
12547
|
+
//# sourceMappingURL=immutable.js.map
|
|
12492
12548
|
|
|
12493
12549
|
/***/ }),
|
|
12494
12550
|
|
|
@@ -12746,6 +12802,7 @@ function getProps(props, index) {
|
|
|
12746
12802
|
var tooltipTheme = theme && theme.tooltip || {};
|
|
12747
12803
|
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelProps, _helpers__WEBPACK_IMPORTED_MODULE_1__.omit(tooltipTheme, ["style"]));
|
|
12748
12804
|
}
|
|
12805
|
+
//# sourceMappingURL=label-helpers.js.map
|
|
12749
12806
|
|
|
12750
12807
|
/***/ }),
|
|
12751
12808
|
|
|
@@ -12771,6 +12828,7 @@ function warn(message) {
|
|
|
12771
12828
|
}
|
|
12772
12829
|
}
|
|
12773
12830
|
}
|
|
12831
|
+
//# sourceMappingURL=log.js.map
|
|
12774
12832
|
|
|
12775
12833
|
/***/ }),
|
|
12776
12834
|
|
|
@@ -12866,6 +12924,7 @@ function star(x, y, size) {
|
|
|
12866
12924
|
|
|
12867
12925
|
return "M ".concat(starCoords.join("L"), " z");
|
|
12868
12926
|
}
|
|
12927
|
+
//# sourceMappingURL=point-path-helpers.js.map
|
|
12869
12928
|
|
|
12870
12929
|
/***/ }),
|
|
12871
12930
|
|
|
@@ -12893,12 +12952,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12893
12952
|
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0__);
|
|
12894
12953
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/find */ "../../../node_modules/lodash/find.js");
|
|
12895
12954
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
|
|
12896
|
-
/* harmony import */ var
|
|
12897
|
-
/* harmony import */ var
|
|
12898
|
-
/* harmony import */ var
|
|
12899
|
-
/* harmony import */ var
|
|
12900
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
12901
|
-
|
|
12955
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
12956
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
12957
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
12958
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
12902
12959
|
|
|
12903
12960
|
|
|
12904
12961
|
|
|
@@ -12906,6 +12963,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12906
12963
|
|
|
12907
12964
|
|
|
12908
12965
|
|
|
12966
|
+
|
|
12967
|
+
|
|
12909
12968
|
/**
|
|
12910
12969
|
* Return a new validator based on `validator` but with the option to chain
|
|
12911
12970
|
* `isRequired` onto the validation. This is nearly identical to how React
|
|
@@ -12913,30 +12972,30 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12913
12972
|
* @param {Function} validator Validation function.
|
|
12914
12973
|
* @returns {Function} Validator with `isRequired` option.
|
|
12915
12974
|
*/
|
|
12916
|
-
|
|
12917
12975
|
var makeChainable = function (validator) {
|
|
12918
|
-
|
|
12919
|
-
|
|
12920
|
-
|
|
12976
|
+
var createChainable = function (isRequired) {
|
|
12977
|
+
return function (props, propName, componentName) {
|
|
12978
|
+
var value = props[propName];
|
|
12921
12979
|
|
|
12922
|
-
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12980
|
+
if (value === undefined || value === null) {
|
|
12981
|
+
if (isRequired) {
|
|
12982
|
+
return new Error("Required `".concat(propName, "` was not specified in `").concat(componentName, "`."));
|
|
12983
|
+
}
|
|
12926
12984
|
|
|
12927
|
-
|
|
12928
|
-
|
|
12985
|
+
return null;
|
|
12986
|
+
}
|
|
12929
12987
|
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
|
|
12988
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
12989
|
+
rest[_key - 3] = arguments[_key];
|
|
12990
|
+
}
|
|
12933
12991
|
|
|
12934
|
-
|
|
12992
|
+
return validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
12993
|
+
};
|
|
12935
12994
|
};
|
|
12936
12995
|
|
|
12937
|
-
var chainable =
|
|
12938
|
-
|
|
12939
|
-
|
|
12996
|
+
var chainable = Object.assign(createChainable(false), {
|
|
12997
|
+
isRequired: createChainable(true)
|
|
12998
|
+
});
|
|
12940
12999
|
return chainable;
|
|
12941
13000
|
};
|
|
12942
13001
|
|
|
@@ -12966,7 +13025,7 @@ var getConstructor = function (value) {
|
|
|
12966
13025
|
};
|
|
12967
13026
|
/**
|
|
12968
13027
|
* Get the name of the constructor used to create `value`, using
|
|
12969
|
-
* `Object.
|
|
13028
|
+
* `Object.prototype.toString`. If the value is null or undefined, return
|
|
12970
13029
|
* "null" or "undefined", respectively.
|
|
12971
13030
|
* @param {*} value Instance to return the constructor name of.
|
|
12972
13031
|
* @returns {String} Name of the constructor.
|
|
@@ -12996,10 +13055,11 @@ function deprecated(propType, explanation) {
|
|
|
12996
13055
|
var value = props[propName];
|
|
12997
13056
|
|
|
12998
13057
|
if (value !== null && value !== undefined) {
|
|
12999
|
-
|
|
13058
|
+
_log__WEBPACK_IMPORTED_MODULE_2__.warn("\"".concat(propName, "\" property of \"").concat(componentName, "\" has been deprecated ").concat(explanation));
|
|
13000
13059
|
}
|
|
13001
13060
|
|
|
13002
|
-
|
|
13061
|
+
prop_types__WEBPACK_IMPORTED_MODULE_3___default().checkPropTypes(_defineProperty({}, propName, propType), props, propName, componentName);
|
|
13062
|
+
return null;
|
|
13003
13063
|
};
|
|
13004
13064
|
}
|
|
13005
13065
|
/**
|
|
@@ -13018,7 +13078,7 @@ function allOfType(validators) {
|
|
|
13018
13078
|
|
|
13019
13079
|
return validators.reduce(function (result, validator) {
|
|
13020
13080
|
return result || validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
13021
|
-
},
|
|
13081
|
+
}, null);
|
|
13022
13082
|
});
|
|
13023
13083
|
}
|
|
13024
13084
|
/**
|
|
@@ -13032,7 +13092,7 @@ var nonNegative = makeChainable(function (props, propName, componentName) {
|
|
|
13032
13092
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a non-negative number."));
|
|
13033
13093
|
}
|
|
13034
13094
|
|
|
13035
|
-
return
|
|
13095
|
+
return null;
|
|
13036
13096
|
});
|
|
13037
13097
|
/**
|
|
13038
13098
|
* Check that the value is an integer.
|
|
@@ -13045,7 +13105,7 @@ var integer = makeChainable(function (props, propName, componentName) {
|
|
|
13045
13105
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an integer."));
|
|
13046
13106
|
}
|
|
13047
13107
|
|
|
13048
|
-
return
|
|
13108
|
+
return null;
|
|
13049
13109
|
});
|
|
13050
13110
|
/**
|
|
13051
13111
|
* Check that the value is greater than zero.
|
|
@@ -13058,7 +13118,7 @@ var greaterThanZero = makeChainable(function (props, propName, componentName) {
|
|
|
13058
13118
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a number greater than zero."));
|
|
13059
13119
|
}
|
|
13060
13120
|
|
|
13061
|
-
return
|
|
13121
|
+
return null;
|
|
13062
13122
|
});
|
|
13063
13123
|
/**
|
|
13064
13124
|
* Check that the value is an Array of two unique values.
|
|
@@ -13071,32 +13131,20 @@ var domain = makeChainable(function (props, propName, componentName) {
|
|
|
13071
13131
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an array of two unique numeric values."));
|
|
13072
13132
|
}
|
|
13073
13133
|
|
|
13074
|
-
return
|
|
13134
|
+
return null;
|
|
13075
13135
|
});
|
|
13076
13136
|
/**
|
|
13077
13137
|
* Check that the value looks like a d3 `scale` function.
|
|
13078
13138
|
*/
|
|
13079
13139
|
|
|
13080
13140
|
var scale = makeChainable(function (props, propName, componentName) {
|
|
13081
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13082
|
-
|
|
13083
|
-
var validScale = function (scl) {
|
|
13084
|
-
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl)) {
|
|
13085
|
-
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);
|
|
13086
|
-
} else if (typeof scl === "string") {
|
|
13087
|
-
return supportedScaleStrings.indexOf(scl) !== -1;
|
|
13088
|
-
}
|
|
13089
|
-
|
|
13090
|
-
return false;
|
|
13091
|
-
};
|
|
13092
|
-
|
|
13093
13141
|
var value = props[propName];
|
|
13094
13142
|
|
|
13095
|
-
if (!validScale(value)) {
|
|
13143
|
+
if (!_scale__WEBPACK_IMPORTED_MODULE_4__.validScale(value)) {
|
|
13096
13144
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a d3 scale."));
|
|
13097
13145
|
}
|
|
13098
13146
|
|
|
13099
|
-
return
|
|
13147
|
+
return null;
|
|
13100
13148
|
});
|
|
13101
13149
|
/**
|
|
13102
13150
|
* Check that an array contains items of the same type.
|
|
@@ -13110,7 +13158,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
13110
13158
|
}
|
|
13111
13159
|
|
|
13112
13160
|
if (values.length < 2) {
|
|
13113
|
-
return
|
|
13161
|
+
return null;
|
|
13114
13162
|
}
|
|
13115
13163
|
|
|
13116
13164
|
var comparisonConstructor = getConstructor(values[0]);
|
|
@@ -13125,7 +13173,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
13125
13173
|
return new Error("Expected `".concat(propName, "` in `").concat(componentName, "` to be a ") + "homogeneous array, but found types `".concat(constructorName, "` and ") + "`".concat(otherConstructorName, "`."));
|
|
13126
13174
|
}
|
|
13127
13175
|
|
|
13128
|
-
return
|
|
13176
|
+
return null;
|
|
13129
13177
|
});
|
|
13130
13178
|
/**
|
|
13131
13179
|
* Check that array prop length matches props.data.length
|
|
@@ -13136,7 +13184,7 @@ var matchDataLength = makeChainable(function (props, propName) {
|
|
|
13136
13184
|
return new Error("Length of data and ".concat(propName, " arrays must match."));
|
|
13137
13185
|
}
|
|
13138
13186
|
|
|
13139
|
-
return
|
|
13187
|
+
return null;
|
|
13140
13188
|
});
|
|
13141
13189
|
/**
|
|
13142
13190
|
* Check that the value is a regular expression
|
|
@@ -13147,8 +13195,9 @@ var regExp = makeChainable(function (props, propName, componentName) {
|
|
|
13147
13195
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a regular expression."));
|
|
13148
13196
|
}
|
|
13149
13197
|
|
|
13150
|
-
return
|
|
13198
|
+
return null;
|
|
13151
13199
|
});
|
|
13200
|
+
//# sourceMappingURL=prop-types.js.map
|
|
13152
13201
|
|
|
13153
13202
|
/***/ }),
|
|
13154
13203
|
|
|
@@ -13166,7 +13215,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13166
13215
|
/* harmony export */ "getScaleFromName": () => (/* binding */ getScaleFromName),
|
|
13167
13216
|
/* harmony export */ "getScaleFromProps": () => (/* binding */ getScaleFromProps),
|
|
13168
13217
|
/* harmony export */ "getScaleType": () => (/* binding */ getScaleType),
|
|
13169
|
-
/* harmony export */ "getType": () => (/* binding */ getType)
|
|
13218
|
+
/* harmony export */ "getType": () => (/* binding */ getType),
|
|
13219
|
+
/* harmony export */ "validScale": () => (/* binding */ validScale)
|
|
13170
13220
|
/* harmony export */ });
|
|
13171
13221
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
|
|
13172
13222
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -13184,8 +13234,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13184
13234
|
|
|
13185
13235
|
|
|
13186
13236
|
|
|
13187
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13237
|
+
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
13188
13238
|
|
|
13239
|
+
// Private Functions
|
|
13189
13240
|
function toNewName(scale) {
|
|
13190
13241
|
// d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
|
|
13191
13242
|
var capitalize = function (s) {
|
|
@@ -13255,7 +13306,13 @@ function getScaleTypeFromData(props, axis) {
|
|
|
13255
13306
|
|
|
13256
13307
|
|
|
13257
13308
|
function getScaleFromName(name) {
|
|
13258
|
-
|
|
13309
|
+
if (validScale(name)) {
|
|
13310
|
+
var methodName = toNewName(name); // @ts-expect-error scaleTime is not directly compatible with our D3Scale definition
|
|
13311
|
+
|
|
13312
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_5__[methodName]();
|
|
13313
|
+
}
|
|
13314
|
+
|
|
13315
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
13259
13316
|
}
|
|
13260
13317
|
function getBaseScale(props, axis) {
|
|
13261
13318
|
var scale = getScaleFromProps(props, axis);
|
|
@@ -13265,7 +13322,7 @@ function getBaseScale(props, axis) {
|
|
|
13265
13322
|
}
|
|
13266
13323
|
|
|
13267
13324
|
var defaultScale = getScaleFromDomain(props, axis) || getScaleTypeFromData(props, axis);
|
|
13268
|
-
return
|
|
13325
|
+
return getScaleFromName(defaultScale);
|
|
13269
13326
|
}
|
|
13270
13327
|
function getDefaultScale() {
|
|
13271
13328
|
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
@@ -13278,7 +13335,7 @@ function getScaleFromProps(props, axis) {
|
|
|
13278
13335
|
var scale = props.scale[axis] || props.scale;
|
|
13279
13336
|
|
|
13280
13337
|
if (validScale(scale)) {
|
|
13281
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale :
|
|
13338
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale : getScaleFromName(scale);
|
|
13282
13339
|
}
|
|
13283
13340
|
|
|
13284
13341
|
return undefined;
|
|
@@ -13313,6 +13370,7 @@ function getType(scale) {
|
|
|
13313
13370
|
})[0];
|
|
13314
13371
|
return scaleType ? scaleType.name : undefined;
|
|
13315
13372
|
}
|
|
13373
|
+
//# sourceMappingURL=scale.js.map
|
|
13316
13374
|
|
|
13317
13375
|
/***/ }),
|
|
13318
13376
|
|
|
@@ -13384,6 +13442,7 @@ function getColorScale(name) {
|
|
|
13384
13442
|
};
|
|
13385
13443
|
return name ? scales[name] : scales.grayscale;
|
|
13386
13444
|
}
|
|
13445
|
+
//# sourceMappingURL=style.js.map
|
|
13387
13446
|
|
|
13388
13447
|
/***/ }),
|
|
13389
13448
|
|
|
@@ -13588,8 +13647,10 @@ var _getSizeWithRotate = function (axisSize, dependentSize, angle) {
|
|
|
13588
13647
|
|
|
13589
13648
|
|
|
13590
13649
|
var convertLengthToPixels = function (length, fontSize) {
|
|
13591
|
-
var
|
|
13592
|
-
|
|
13650
|
+
var _length$match;
|
|
13651
|
+
|
|
13652
|
+
var attribute = (_length$match = length.match(/[a-zA-Z%]+/)) === null || _length$match === void 0 ? void 0 : _length$match[0];
|
|
13653
|
+
var value = Number(length.match(/[0-9.,]+/));
|
|
13593
13654
|
var result;
|
|
13594
13655
|
|
|
13595
13656
|
if (!attribute) {
|
|
@@ -13655,9 +13716,9 @@ var _approximateTextHeightInternal = function (text, style) {
|
|
|
13655
13716
|
var height = containsCaps ? lineStyle.fontSize * coefficients.lineCapitalCoef : lineStyle.fontSize;
|
|
13656
13717
|
return total + lineStyle.lineHeight * height;
|
|
13657
13718
|
}, 0);
|
|
13658
|
-
};
|
|
13659
|
-
|
|
13719
|
+
};
|
|
13660
13720
|
|
|
13721
|
+
// Stubbable implementation.
|
|
13661
13722
|
var _approximateTextSizeInternal = {
|
|
13662
13723
|
impl: function (text, style) {
|
|
13663
13724
|
var angle = Array.isArray(style) ? style[0] && style[0].angle : style && style.angle;
|
|
@@ -13676,7 +13737,7 @@ var _approximateTextSizeInternal = {
|
|
|
13676
13737
|
};
|
|
13677
13738
|
/**
|
|
13678
13739
|
* Predict text size by font params.
|
|
13679
|
-
* @param {string} text Content for width calculation.
|
|
13740
|
+
* @param {string|string[]} text Content for width calculation.
|
|
13680
13741
|
* @param {Object} style Text styles, ,fontFamily, fontSize, etc.
|
|
13681
13742
|
* @param {string} style.fontFamily Text fontFamily.
|
|
13682
13743
|
* @param {(number|string)} style.fontSize Text fontSize.
|
|
@@ -13689,6 +13750,7 @@ var _approximateTextSizeInternal = {
|
|
|
13689
13750
|
var approximateTextSize = function (text, style) {
|
|
13690
13751
|
return _approximateTextSizeInternal.impl(text, style);
|
|
13691
13752
|
};
|
|
13753
|
+
//# sourceMappingURL=textsize.js.map
|
|
13692
13754
|
|
|
13693
13755
|
/***/ }),
|
|
13694
13756
|
|
|
@@ -13719,6 +13781,7 @@ var TimerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cre
|
|
|
13719
13781
|
});
|
|
13720
13782
|
TimerContext.displayName = "TimerContext";
|
|
13721
13783
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimerContext);
|
|
13784
|
+
//# sourceMappingURL=timer-context.js.map
|
|
13722
13785
|
|
|
13723
13786
|
/***/ }),
|
|
13724
13787
|
|
|
@@ -13821,6 +13884,7 @@ var Timer = /*#__PURE__*/function () {
|
|
|
13821
13884
|
}();
|
|
13822
13885
|
|
|
13823
13886
|
|
|
13887
|
+
//# sourceMappingURL=timer.js.map
|
|
13824
13888
|
|
|
13825
13889
|
/***/ }),
|
|
13826
13890
|
|
|
@@ -13911,7 +13975,7 @@ function getChildData(child) {
|
|
|
13911
13975
|
}
|
|
13912
13976
|
/**
|
|
13913
13977
|
* If a parent component has animation enabled, calculate the transitions
|
|
13914
|
-
* for any data of any child component that supports data transitions
|
|
13978
|
+
* for any data of any child component that supports data transitions.
|
|
13915
13979
|
* Data transitions are defined as any two datasets where data nodes exist
|
|
13916
13980
|
* in the first set and not the second, in the second and not the first,
|
|
13917
13981
|
* or both.
|
|
@@ -14040,7 +14104,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
14040
14104
|
|
|
14041
14105
|
if (exitingNodes) {
|
|
14042
14106
|
// After the exit transition occurs, trigger the animations for
|
|
14043
|
-
// nodes that are neither exiting
|
|
14107
|
+
// nodes that are neither exiting nor entering.
|
|
14044
14108
|
animate.onEnd = cb;
|
|
14045
14109
|
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.
|
|
14046
14110
|
|
|
@@ -14110,7 +14174,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
14110
14174
|
* and its index in the parent's children array.
|
|
14111
14175
|
*
|
|
14112
14176
|
* In particular, this will include an `animate` object that is set appropriately
|
|
14113
|
-
* so that each child will be
|
|
14177
|
+
* so that each child will be synchronized for each stage of a transition
|
|
14114
14178
|
* animation. It will also include a transformed `data` object, where each datum
|
|
14115
14179
|
* is transformed by `animate.onExit` and `animate.onEnter` `before` and `after`
|
|
14116
14180
|
* functions.
|
|
@@ -14255,6 +14319,7 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
14255
14319
|
};
|
|
14256
14320
|
};
|
|
14257
14321
|
}
|
|
14322
|
+
//# sourceMappingURL=transitions.js.map
|
|
14258
14323
|
|
|
14259
14324
|
/***/ }),
|
|
14260
14325
|
|
|
@@ -14293,7 +14358,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
14293
14358
|
|
|
14294
14359
|
/*
|
|
14295
14360
|
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
14296
|
-
The startsWidth array will contain the start of any accepted user-prop that
|
|
14361
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
14297
14362
|
starts with these characters.
|
|
14298
14363
|
The exactMatch will contain a list of exact prop names that are accepted.
|
|
14299
14364
|
*/
|
|
@@ -14302,6 +14367,7 @@ var USER_PROPS_SAFELIST = {
|
|
|
14302
14367
|
startsWith: ["data-", "aria-"],
|
|
14303
14368
|
exactMatch: []
|
|
14304
14369
|
};
|
|
14370
|
+
|
|
14305
14371
|
/**
|
|
14306
14372
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
14307
14373
|
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
@@ -14310,7 +14376,6 @@ var USER_PROPS_SAFELIST = {
|
|
|
14310
14376
|
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
14311
14377
|
* otherwise
|
|
14312
14378
|
*/
|
|
14313
|
-
|
|
14314
14379
|
var doesPropStartWith = function (key) {
|
|
14315
14380
|
var startsWith = false;
|
|
14316
14381
|
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
@@ -14387,14 +14452,15 @@ var getSafeUserProps = function (props) {
|
|
|
14387
14452
|
/**
|
|
14388
14453
|
* Wraps a component and adds safe user props
|
|
14389
14454
|
*
|
|
14390
|
-
* @param {
|
|
14455
|
+
* @param {ReactElement} component: parent component
|
|
14391
14456
|
* @param {Object} props: props to be filtered
|
|
14392
|
-
* @returns {
|
|
14457
|
+
* @returns {ReactElement} modified component
|
|
14393
14458
|
*/
|
|
14394
14459
|
|
|
14395
14460
|
var withSafeUserProps = function (component, props) {
|
|
14396
14461
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(component, getSafeUserProps(props));
|
|
14397
14462
|
};
|
|
14463
|
+
//# sourceMappingURL=user-props.js.map
|
|
14398
14464
|
|
|
14399
14465
|
/***/ }),
|
|
14400
14466
|
|