victory-voronoi-container 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-container.js +157 -102
- package/dist/victory-voronoi-container.min.js +1 -1
- package/es/index.d.ts +17 -0
- package/es/index.js +2 -1
- package/es/victory-voronoi-container.js +2 -1
- package/es/voronoi-helpers.js +2 -1
- package/lib/index.d.ts +17 -0
- package/lib/index.js +2 -1
- package/lib/victory-voronoi-container.js +2 -1
- package/lib/voronoi-helpers.js +2 -1
- package/package.json +4 -4
- package/src/index.d.ts +17 -0
- package/src/index.js +1 -1
- package/src/victory-voronoi-container.js +20 -20
- package/src/voronoi-helpers.js +18 -18
|
@@ -8060,6 +8060,7 @@ VictoryContainer.defaultProps = {
|
|
|
8060
8060
|
role: "img"
|
|
8061
8061
|
};
|
|
8062
8062
|
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
8063
|
+
//# sourceMappingURL=victory-container.js.map
|
|
8063
8064
|
|
|
8064
8065
|
/***/ }),
|
|
8065
8066
|
|
|
@@ -8665,10 +8666,9 @@ VictoryLabel.propTypes = {
|
|
|
8665
8666
|
inline: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8666
8667
|
labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(["parallel", "perpendicular", "vertical"]),
|
|
8667
8668
|
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)]),
|
|
8668
|
-
// @ts-expect-error "x is required in origin"
|
|
8669
8669
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_11___default().shape({
|
|
8670
|
-
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative,
|
|
8671
|
-
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative
|
|
8670
|
+
x: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired,
|
|
8671
|
+
y: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_12__.nonNegative.isRequired
|
|
8672
8672
|
}),
|
|
8673
8673
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
8674
8674
|
renderInPortal: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),
|
|
@@ -8702,6 +8702,7 @@ VictoryLabel.defaultProps = {
|
|
|
8702
8702
|
// Magic number from d3.
|
|
8703
8703
|
lineHeight: 1
|
|
8704
8704
|
};
|
|
8705
|
+
//# sourceMappingURL=victory-label.js.map
|
|
8705
8706
|
|
|
8706
8707
|
/***/ }),
|
|
8707
8708
|
|
|
@@ -8726,6 +8727,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8726
8727
|
*/
|
|
8727
8728
|
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
8728
8729
|
PortalContext.displayName = "PortalContext";
|
|
8730
|
+
//# sourceMappingURL=portal-context.js.map
|
|
8729
8731
|
|
|
8730
8732
|
/***/ }),
|
|
8731
8733
|
|
|
@@ -8837,6 +8839,7 @@ Portal.propTypes = {
|
|
|
8837
8839
|
viewBox: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
8838
8840
|
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_3__.nonNegative
|
|
8839
8841
|
};
|
|
8842
|
+
//# sourceMappingURL=portal.js.map
|
|
8840
8843
|
|
|
8841
8844
|
/***/ }),
|
|
8842
8845
|
|
|
@@ -8980,6 +8983,7 @@ VictoryPortal.defaultProps = {
|
|
|
8980
8983
|
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null)
|
|
8981
8984
|
};
|
|
8982
8985
|
VictoryPortal.contextType = _portal_context__WEBPACK_IMPORTED_MODULE_5__.PortalContext;
|
|
8986
|
+
//# sourceMappingURL=victory-portal.js.map
|
|
8983
8987
|
|
|
8984
8988
|
/***/ }),
|
|
8985
8989
|
|
|
@@ -9016,6 +9020,7 @@ var Path = function (props) {
|
|
|
9016
9020
|
// @ts-expect-error FIXME: "id cannot be a number"
|
|
9017
9021
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", rest);
|
|
9018
9022
|
};
|
|
9023
|
+
//# sourceMappingURL=path.js.map
|
|
9019
9024
|
|
|
9020
9025
|
/***/ }),
|
|
9021
9026
|
|
|
@@ -9058,6 +9063,7 @@ var Rect = function (props) {
|
|
|
9058
9063
|
vectorEffect: "non-scaling-stroke"
|
|
9059
9064
|
}, rest));
|
|
9060
9065
|
};
|
|
9066
|
+
//# sourceMappingURL=rect.js.map
|
|
9061
9067
|
|
|
9062
9068
|
/***/ }),
|
|
9063
9069
|
|
|
@@ -9101,6 +9107,7 @@ Text.propTypes = {
|
|
|
9101
9107
|
desc: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
9102
9108
|
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
9103
9109
|
};
|
|
9110
|
+
//# sourceMappingURL=text.js.map
|
|
9104
9111
|
|
|
9105
9112
|
/***/ }),
|
|
9106
9113
|
|
|
@@ -9125,6 +9132,7 @@ var TSpan = function (props) {
|
|
|
9125
9132
|
react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tspan", props)
|
|
9126
9133
|
);
|
|
9127
9134
|
};
|
|
9135
|
+
//# sourceMappingURL=tspan.js.map
|
|
9128
9136
|
|
|
9129
9137
|
/***/ }),
|
|
9130
9138
|
|
|
@@ -9400,6 +9408,7 @@ var grayscale = {
|
|
|
9400
9408
|
}
|
|
9401
9409
|
}, baseProps)
|
|
9402
9410
|
};
|
|
9411
|
+
//# sourceMappingURL=grayscale.js.map
|
|
9403
9412
|
|
|
9404
9413
|
/***/ }),
|
|
9405
9414
|
|
|
@@ -9702,6 +9711,7 @@ var material = {
|
|
|
9702
9711
|
}
|
|
9703
9712
|
}, baseProps)
|
|
9704
9713
|
};
|
|
9714
|
+
//# sourceMappingURL=material.js.map
|
|
9705
9715
|
|
|
9706
9716
|
/***/ }),
|
|
9707
9717
|
|
|
@@ -9725,6 +9735,7 @@ var VictoryTheme = {
|
|
|
9725
9735
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
9726
9736
|
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
9727
9737
|
};
|
|
9738
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
9728
9739
|
|
|
9729
9740
|
/***/ }),
|
|
9730
9741
|
|
|
@@ -9758,7 +9769,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
9758
9769
|
|
|
9759
9770
|
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; }
|
|
9760
9771
|
|
|
9761
|
-
/* eslint-disable no-use-before-define */
|
|
9762
9772
|
function isNonEmptyArray(collection) {
|
|
9763
9773
|
return Array.isArray(collection) && collection.length > 0;
|
|
9764
9774
|
}
|
|
@@ -9797,7 +9807,8 @@ function getMaxValue(arr) {
|
|
|
9797
9807
|
}
|
|
9798
9808
|
|
|
9799
9809
|
var array = arr.concat(values);
|
|
9800
|
-
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array)))
|
|
9810
|
+
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
9811
|
+
: Math.max.apply(Math, _toConsumableArray(array));
|
|
9801
9812
|
}
|
|
9802
9813
|
function getMinValue(arr) {
|
|
9803
9814
|
for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -9805,8 +9816,10 @@ function getMinValue(arr) {
|
|
|
9805
9816
|
}
|
|
9806
9817
|
|
|
9807
9818
|
var array = arr.concat(values);
|
|
9808
|
-
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array)))
|
|
9819
|
+
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
9820
|
+
: Math.min.apply(Math, _toConsumableArray(array));
|
|
9809
9821
|
}
|
|
9822
|
+
//# sourceMappingURL=collection.js.map
|
|
9810
9823
|
|
|
9811
9824
|
/***/ }),
|
|
9812
9825
|
|
|
@@ -9819,9 +9832,7 @@ function getMinValue(arr) {
|
|
|
9819
9832
|
"use strict";
|
|
9820
9833
|
__webpack_require__.r(__webpack_exports__);
|
|
9821
9834
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9822
|
-
/* harmony export */ "
|
|
9823
|
-
/* harmony export */ "dataProps": () => (/* binding */ dataProps),
|
|
9824
|
-
/* harmony export */ "primitiveProps": () => (/* binding */ primitiveProps)
|
|
9835
|
+
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
9825
9836
|
/* harmony export */ });
|
|
9826
9837
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
9827
9838
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -9829,26 +9840,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9829
9840
|
|
|
9830
9841
|
|
|
9831
9842
|
var dataProps = {
|
|
9843
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9832
9844
|
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({
|
|
9833
9845
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
9834
9846
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
9835
9847
|
})]),
|
|
9848
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9836
9849
|
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)]),
|
|
9837
9850
|
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
9838
9851
|
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
9839
9852
|
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
9840
9853
|
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)]),
|
|
9841
9854
|
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
9842
|
-
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))]),
|
|
9855
|
+
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))]),
|
|
9843
9856
|
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
9844
9857
|
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9845
9858
|
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
9846
9859
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
9847
9860
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
9848
9861
|
}),
|
|
9849
|
-
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))]),
|
|
9850
|
-
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))]),
|
|
9851
|
-
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))])
|
|
9862
|
+
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))]),
|
|
9863
|
+
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))]),
|
|
9864
|
+
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))])
|
|
9852
9865
|
};
|
|
9853
9866
|
var baseProps = {
|
|
9854
9867
|
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)]),
|
|
@@ -9857,14 +9870,17 @@ var baseProps = {
|
|
|
9857
9870
|
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
9858
9871
|
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
9859
9872
|
})]),
|
|
9873
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9860
9874
|
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({
|
|
9861
9875
|
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)]),
|
|
9862
9876
|
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)])
|
|
9863
9877
|
})]),
|
|
9878
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9864
9879
|
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({
|
|
9865
9880
|
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)]),
|
|
9866
9881
|
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)])
|
|
9867
9882
|
})]),
|
|
9883
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9868
9884
|
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9869
9885
|
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))]),
|
|
9870
9886
|
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))])
|
|
@@ -9875,6 +9891,7 @@ var baseProps = {
|
|
|
9875
9891
|
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)]),
|
|
9876
9892
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
9877
9893
|
})),
|
|
9894
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9878
9895
|
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9879
9896
|
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
9880
9897
|
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)]),
|
|
@@ -9885,10 +9902,12 @@ var baseProps = {
|
|
|
9885
9902
|
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
9886
9903
|
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
9887
9904
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
9905
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9888
9906
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9889
9907
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
9890
9908
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
9891
9909
|
}),
|
|
9910
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9892
9911
|
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({
|
|
9893
9912
|
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
9894
9913
|
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
@@ -9897,17 +9916,19 @@ var baseProps = {
|
|
|
9897
9916
|
})]),
|
|
9898
9917
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
9899
9918
|
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9900
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
9901
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
9919
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
9920
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
9902
9921
|
})]),
|
|
9903
9922
|
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9904
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
9905
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
9923
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
9924
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
9906
9925
|
})]),
|
|
9926
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9907
9927
|
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9908
9928
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
9909
9929
|
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
9910
9930
|
}),
|
|
9931
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9911
9932
|
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({
|
|
9912
9933
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
9913
9934
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
@@ -9927,6 +9948,7 @@ var primitiveProps = {
|
|
|
9927
9948
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
9928
9949
|
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)]),
|
|
9929
9950
|
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)]),
|
|
9951
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9930
9952
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9931
9953
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
9932
9954
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
@@ -9942,6 +9964,12 @@ var primitiveProps = {
|
|
|
9942
9964
|
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)]),
|
|
9943
9965
|
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
9944
9966
|
};
|
|
9967
|
+
var CommonProps = {
|
|
9968
|
+
dataProps: dataProps,
|
|
9969
|
+
baseProps: baseProps,
|
|
9970
|
+
primitiveProps: primitiveProps
|
|
9971
|
+
};
|
|
9972
|
+
//# sourceMappingURL=common-props.js.map
|
|
9945
9973
|
|
|
9946
9974
|
/***/ }),
|
|
9947
9975
|
|
|
@@ -10455,6 +10483,7 @@ function isDataComponent(component) {
|
|
|
10455
10483
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
10456
10484
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_2___default()(whitelist, role);
|
|
10457
10485
|
}
|
|
10486
|
+
//# sourceMappingURL=data.js.map
|
|
10458
10487
|
|
|
10459
10488
|
/***/ }),
|
|
10460
10489
|
|
|
@@ -10536,7 +10565,7 @@ function getPolarRange(props, axis) {
|
|
|
10536
10565
|
|
|
10537
10566
|
/**
|
|
10538
10567
|
* creates an object with some keys excluded
|
|
10539
|
-
* replacement for lodash.omit for performance. does not
|
|
10568
|
+
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
10540
10569
|
* @param {Object} originalObject: created object will be based on this object
|
|
10541
10570
|
* @param {Array<String>} ks: an array of keys to omit from the new object
|
|
10542
10571
|
* @returns {Object} new object with same properties as originalObject
|
|
@@ -10549,6 +10578,7 @@ function omit(originalObject) {
|
|
|
10549
10578
|
var newObject = {};
|
|
10550
10579
|
|
|
10551
10580
|
for (var key in originalObject) {
|
|
10581
|
+
// @ts-expect-error String is not assignable to Key
|
|
10552
10582
|
if (ks.indexOf(key) >= 0) {
|
|
10553
10583
|
continue;
|
|
10554
10584
|
}
|
|
@@ -10781,7 +10811,9 @@ function reduceChildren(children, iteratee) {
|
|
|
10781
10811
|
var parentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
10782
10812
|
var initialMemo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
10783
10813
|
var combine = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (memo, item) {
|
|
10784
|
-
return
|
|
10814
|
+
return (// @ts-expect-error These defaults are hard to type
|
|
10815
|
+
memo.concat(item)
|
|
10816
|
+
);
|
|
10785
10817
|
};
|
|
10786
10818
|
var sharedProps = ["data", "domain", "categories", "polar", "startAngle", "endAngle", "minDomain", "maxDomain", "horizontal"];
|
|
10787
10819
|
|
|
@@ -10825,7 +10857,7 @@ function reduceChildren(children, iteratee) {
|
|
|
10825
10857
|
/**
|
|
10826
10858
|
* @param {Object} props: the props object
|
|
10827
10859
|
* @returns {Boolean} returns true if the props object contains `horizontal: true` of if any
|
|
10828
|
-
* children or nested children are
|
|
10860
|
+
* children or nested children are horizontal
|
|
10829
10861
|
*/
|
|
10830
10862
|
|
|
10831
10863
|
function isHorizontal(props) {
|
|
@@ -10848,6 +10880,7 @@ function isHorizontal(props) {
|
|
|
10848
10880
|
|
|
10849
10881
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children));
|
|
10850
10882
|
}
|
|
10883
|
+
//# sourceMappingURL=helpers.js.map
|
|
10851
10884
|
|
|
10852
10885
|
/***/ }),
|
|
10853
10886
|
|
|
@@ -10891,15 +10924,16 @@ function isMap(x) {
|
|
|
10891
10924
|
return !!(x && x[IMMUTABLE_MAP]);
|
|
10892
10925
|
}
|
|
10893
10926
|
function shallowToJS(x, whitelist) {
|
|
10894
|
-
return isIterable(x) ? x.reduce(function (
|
|
10927
|
+
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
10895
10928
|
if (whitelist && whitelist[key]) {
|
|
10896
10929
|
curr = shallowToJS(curr);
|
|
10897
10930
|
}
|
|
10898
10931
|
|
|
10899
|
-
|
|
10900
|
-
return
|
|
10932
|
+
result[key] = curr;
|
|
10933
|
+
return result;
|
|
10901
10934
|
}, isList(x) ? [] : {}) : x;
|
|
10902
10935
|
}
|
|
10936
|
+
//# sourceMappingURL=immutable.js.map
|
|
10903
10937
|
|
|
10904
10938
|
/***/ }),
|
|
10905
10939
|
|
|
@@ -11157,6 +11191,7 @@ function getProps(props, index) {
|
|
|
11157
11191
|
var tooltipTheme = theme && theme.tooltip || {};
|
|
11158
11192
|
return lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, labelProps, _helpers__WEBPACK_IMPORTED_MODULE_1__.omit(tooltipTheme, ["style"]));
|
|
11159
11193
|
}
|
|
11194
|
+
//# sourceMappingURL=label-helpers.js.map
|
|
11160
11195
|
|
|
11161
11196
|
/***/ }),
|
|
11162
11197
|
|
|
@@ -11182,6 +11217,7 @@ function warn(message) {
|
|
|
11182
11217
|
}
|
|
11183
11218
|
}
|
|
11184
11219
|
}
|
|
11220
|
+
//# sourceMappingURL=log.js.map
|
|
11185
11221
|
|
|
11186
11222
|
/***/ }),
|
|
11187
11223
|
|
|
@@ -11209,12 +11245,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11209
11245
|
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0__);
|
|
11210
11246
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/find */ "../../../node_modules/lodash/find.js");
|
|
11211
11247
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
|
|
11212
|
-
/* harmony import */ var
|
|
11213
|
-
/* harmony import */ var
|
|
11214
|
-
/* harmony import */ var
|
|
11215
|
-
/* harmony import */ var
|
|
11216
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
11217
|
-
|
|
11248
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
11249
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
11250
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
11251
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
11218
11252
|
|
|
11219
11253
|
|
|
11220
11254
|
|
|
@@ -11222,6 +11256,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11222
11256
|
|
|
11223
11257
|
|
|
11224
11258
|
|
|
11259
|
+
|
|
11260
|
+
|
|
11225
11261
|
/**
|
|
11226
11262
|
* Return a new validator based on `validator` but with the option to chain
|
|
11227
11263
|
* `isRequired` onto the validation. This is nearly identical to how React
|
|
@@ -11229,30 +11265,30 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11229
11265
|
* @param {Function} validator Validation function.
|
|
11230
11266
|
* @returns {Function} Validator with `isRequired` option.
|
|
11231
11267
|
*/
|
|
11232
|
-
|
|
11233
11268
|
var makeChainable = function (validator) {
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11269
|
+
var createChainable = function (isRequired) {
|
|
11270
|
+
return function (props, propName, componentName) {
|
|
11271
|
+
var value = props[propName];
|
|
11237
11272
|
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11273
|
+
if (value === undefined || value === null) {
|
|
11274
|
+
if (isRequired) {
|
|
11275
|
+
return new Error("Required `".concat(propName, "` was not specified in `").concat(componentName, "`."));
|
|
11276
|
+
}
|
|
11242
11277
|
|
|
11243
|
-
|
|
11244
|
-
|
|
11278
|
+
return null;
|
|
11279
|
+
}
|
|
11245
11280
|
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11281
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
11282
|
+
rest[_key - 3] = arguments[_key];
|
|
11283
|
+
}
|
|
11249
11284
|
|
|
11250
|
-
|
|
11285
|
+
return validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
11286
|
+
};
|
|
11251
11287
|
};
|
|
11252
11288
|
|
|
11253
|
-
var chainable =
|
|
11254
|
-
|
|
11255
|
-
|
|
11289
|
+
var chainable = Object.assign(createChainable(false), {
|
|
11290
|
+
isRequired: createChainable(true)
|
|
11291
|
+
});
|
|
11256
11292
|
return chainable;
|
|
11257
11293
|
};
|
|
11258
11294
|
|
|
@@ -11282,7 +11318,7 @@ var getConstructor = function (value) {
|
|
|
11282
11318
|
};
|
|
11283
11319
|
/**
|
|
11284
11320
|
* Get the name of the constructor used to create `value`, using
|
|
11285
|
-
* `Object.
|
|
11321
|
+
* `Object.prototype.toString`. If the value is null or undefined, return
|
|
11286
11322
|
* "null" or "undefined", respectively.
|
|
11287
11323
|
* @param {*} value Instance to return the constructor name of.
|
|
11288
11324
|
* @returns {String} Name of the constructor.
|
|
@@ -11312,10 +11348,11 @@ function deprecated(propType, explanation) {
|
|
|
11312
11348
|
var value = props[propName];
|
|
11313
11349
|
|
|
11314
11350
|
if (value !== null && value !== undefined) {
|
|
11315
|
-
|
|
11351
|
+
_log__WEBPACK_IMPORTED_MODULE_2__.warn("\"".concat(propName, "\" property of \"").concat(componentName, "\" has been deprecated ").concat(explanation));
|
|
11316
11352
|
}
|
|
11317
11353
|
|
|
11318
|
-
|
|
11354
|
+
prop_types__WEBPACK_IMPORTED_MODULE_3___default().checkPropTypes(_defineProperty({}, propName, propType), props, propName, componentName);
|
|
11355
|
+
return null;
|
|
11319
11356
|
};
|
|
11320
11357
|
}
|
|
11321
11358
|
/**
|
|
@@ -11334,7 +11371,7 @@ function allOfType(validators) {
|
|
|
11334
11371
|
|
|
11335
11372
|
return validators.reduce(function (result, validator) {
|
|
11336
11373
|
return result || validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
11337
|
-
},
|
|
11374
|
+
}, null);
|
|
11338
11375
|
});
|
|
11339
11376
|
}
|
|
11340
11377
|
/**
|
|
@@ -11348,7 +11385,7 @@ var nonNegative = makeChainable(function (props, propName, componentName) {
|
|
|
11348
11385
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a non-negative number."));
|
|
11349
11386
|
}
|
|
11350
11387
|
|
|
11351
|
-
return
|
|
11388
|
+
return null;
|
|
11352
11389
|
});
|
|
11353
11390
|
/**
|
|
11354
11391
|
* Check that the value is an integer.
|
|
@@ -11361,7 +11398,7 @@ var integer = makeChainable(function (props, propName, componentName) {
|
|
|
11361
11398
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an integer."));
|
|
11362
11399
|
}
|
|
11363
11400
|
|
|
11364
|
-
return
|
|
11401
|
+
return null;
|
|
11365
11402
|
});
|
|
11366
11403
|
/**
|
|
11367
11404
|
* Check that the value is greater than zero.
|
|
@@ -11374,7 +11411,7 @@ var greaterThanZero = makeChainable(function (props, propName, componentName) {
|
|
|
11374
11411
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a number greater than zero."));
|
|
11375
11412
|
}
|
|
11376
11413
|
|
|
11377
|
-
return
|
|
11414
|
+
return null;
|
|
11378
11415
|
});
|
|
11379
11416
|
/**
|
|
11380
11417
|
* Check that the value is an Array of two unique values.
|
|
@@ -11387,32 +11424,20 @@ var domain = makeChainable(function (props, propName, componentName) {
|
|
|
11387
11424
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an array of two unique numeric values."));
|
|
11388
11425
|
}
|
|
11389
11426
|
|
|
11390
|
-
return
|
|
11427
|
+
return null;
|
|
11391
11428
|
});
|
|
11392
11429
|
/**
|
|
11393
11430
|
* Check that the value looks like a d3 `scale` function.
|
|
11394
11431
|
*/
|
|
11395
11432
|
|
|
11396
11433
|
var scale = makeChainable(function (props, propName, componentName) {
|
|
11397
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
11398
|
-
|
|
11399
|
-
var validScale = function (scl) {
|
|
11400
|
-
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl)) {
|
|
11401
|
-
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);
|
|
11402
|
-
} else if (typeof scl === "string") {
|
|
11403
|
-
return supportedScaleStrings.indexOf(scl) !== -1;
|
|
11404
|
-
}
|
|
11405
|
-
|
|
11406
|
-
return false;
|
|
11407
|
-
};
|
|
11408
|
-
|
|
11409
11434
|
var value = props[propName];
|
|
11410
11435
|
|
|
11411
|
-
if (!validScale(value)) {
|
|
11436
|
+
if (!_scale__WEBPACK_IMPORTED_MODULE_4__.validScale(value)) {
|
|
11412
11437
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a d3 scale."));
|
|
11413
11438
|
}
|
|
11414
11439
|
|
|
11415
|
-
return
|
|
11440
|
+
return null;
|
|
11416
11441
|
});
|
|
11417
11442
|
/**
|
|
11418
11443
|
* Check that an array contains items of the same type.
|
|
@@ -11426,7 +11451,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
11426
11451
|
}
|
|
11427
11452
|
|
|
11428
11453
|
if (values.length < 2) {
|
|
11429
|
-
return
|
|
11454
|
+
return null;
|
|
11430
11455
|
}
|
|
11431
11456
|
|
|
11432
11457
|
var comparisonConstructor = getConstructor(values[0]);
|
|
@@ -11441,7 +11466,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
11441
11466
|
return new Error("Expected `".concat(propName, "` in `").concat(componentName, "` to be a ") + "homogeneous array, but found types `".concat(constructorName, "` and ") + "`".concat(otherConstructorName, "`."));
|
|
11442
11467
|
}
|
|
11443
11468
|
|
|
11444
|
-
return
|
|
11469
|
+
return null;
|
|
11445
11470
|
});
|
|
11446
11471
|
/**
|
|
11447
11472
|
* Check that array prop length matches props.data.length
|
|
@@ -11452,7 +11477,7 @@ var matchDataLength = makeChainable(function (props, propName) {
|
|
|
11452
11477
|
return new Error("Length of data and ".concat(propName, " arrays must match."));
|
|
11453
11478
|
}
|
|
11454
11479
|
|
|
11455
|
-
return
|
|
11480
|
+
return null;
|
|
11456
11481
|
});
|
|
11457
11482
|
/**
|
|
11458
11483
|
* Check that the value is a regular expression
|
|
@@ -11463,8 +11488,9 @@ var regExp = makeChainable(function (props, propName, componentName) {
|
|
|
11463
11488
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a regular expression."));
|
|
11464
11489
|
}
|
|
11465
11490
|
|
|
11466
|
-
return
|
|
11491
|
+
return null;
|
|
11467
11492
|
});
|
|
11493
|
+
//# sourceMappingURL=prop-types.js.map
|
|
11468
11494
|
|
|
11469
11495
|
/***/ }),
|
|
11470
11496
|
|
|
@@ -11482,7 +11508,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11482
11508
|
/* harmony export */ "getScaleFromName": () => (/* binding */ getScaleFromName),
|
|
11483
11509
|
/* harmony export */ "getScaleFromProps": () => (/* binding */ getScaleFromProps),
|
|
11484
11510
|
/* harmony export */ "getScaleType": () => (/* binding */ getScaleType),
|
|
11485
|
-
/* harmony export */ "getType": () => (/* binding */ getType)
|
|
11511
|
+
/* harmony export */ "getType": () => (/* binding */ getType),
|
|
11512
|
+
/* harmony export */ "validScale": () => (/* binding */ validScale)
|
|
11486
11513
|
/* harmony export */ });
|
|
11487
11514
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
|
|
11488
11515
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -11500,8 +11527,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11500
11527
|
|
|
11501
11528
|
|
|
11502
11529
|
|
|
11503
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
11530
|
+
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
11504
11531
|
|
|
11532
|
+
// Private Functions
|
|
11505
11533
|
function toNewName(scale) {
|
|
11506
11534
|
// d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
|
|
11507
11535
|
var capitalize = function (s) {
|
|
@@ -11571,7 +11599,13 @@ function getScaleTypeFromData(props, axis) {
|
|
|
11571
11599
|
|
|
11572
11600
|
|
|
11573
11601
|
function getScaleFromName(name) {
|
|
11574
|
-
|
|
11602
|
+
if (validScale(name)) {
|
|
11603
|
+
var methodName = toNewName(name); // @ts-expect-error scaleTime is not directly compatible with our D3Scale definition
|
|
11604
|
+
|
|
11605
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_5__[methodName]();
|
|
11606
|
+
}
|
|
11607
|
+
|
|
11608
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
11575
11609
|
}
|
|
11576
11610
|
function getBaseScale(props, axis) {
|
|
11577
11611
|
var scale = getScaleFromProps(props, axis);
|
|
@@ -11581,7 +11615,7 @@ function getBaseScale(props, axis) {
|
|
|
11581
11615
|
}
|
|
11582
11616
|
|
|
11583
11617
|
var defaultScale = getScaleFromDomain(props, axis) || getScaleTypeFromData(props, axis);
|
|
11584
|
-
return
|
|
11618
|
+
return getScaleFromName(defaultScale);
|
|
11585
11619
|
}
|
|
11586
11620
|
function getDefaultScale() {
|
|
11587
11621
|
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
@@ -11594,7 +11628,7 @@ function getScaleFromProps(props, axis) {
|
|
|
11594
11628
|
var scale = props.scale[axis] || props.scale;
|
|
11595
11629
|
|
|
11596
11630
|
if (validScale(scale)) {
|
|
11597
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale :
|
|
11631
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale : getScaleFromName(scale);
|
|
11598
11632
|
}
|
|
11599
11633
|
|
|
11600
11634
|
return undefined;
|
|
@@ -11629,6 +11663,7 @@ function getType(scale) {
|
|
|
11629
11663
|
})[0];
|
|
11630
11664
|
return scaleType ? scaleType.name : undefined;
|
|
11631
11665
|
}
|
|
11666
|
+
//# sourceMappingURL=scale.js.map
|
|
11632
11667
|
|
|
11633
11668
|
/***/ }),
|
|
11634
11669
|
|
|
@@ -11647,10 +11682,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11647
11682
|
/* harmony export */ "getParentSVG": () => (/* binding */ getParentSVG),
|
|
11648
11683
|
/* harmony export */ "getSVGEventCoordinates": () => (/* binding */ getSVGEventCoordinates)
|
|
11649
11684
|
/* harmony export */ });
|
|
11650
|
-
/* harmony import */ var
|
|
11651
|
-
|
|
11652
|
-
// Private Functions
|
|
11685
|
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "../../victory-core/es/victory-util/collection.js");
|
|
11686
|
+
|
|
11653
11687
|
|
|
11688
|
+
// Private Functions
|
|
11654
11689
|
function transformTarget(target, matrix, dimension) {
|
|
11655
11690
|
var a = matrix.a,
|
|
11656
11691
|
d = matrix.d,
|
|
@@ -11661,11 +11696,20 @@ function transformTarget(target, matrix, dimension) {
|
|
|
11661
11696
|
|
|
11662
11697
|
function getTransformationMatrix(svg) {
|
|
11663
11698
|
return svg.getScreenCTM().inverse();
|
|
11699
|
+
}
|
|
11700
|
+
|
|
11701
|
+
function isNativeTouchEvent(nativeEvent) {
|
|
11702
|
+
return !!(nativeEvent && nativeEvent.identifier !== undefined);
|
|
11703
|
+
}
|
|
11704
|
+
|
|
11705
|
+
function isReactTouchEvent(evt) {
|
|
11706
|
+
return evt.changedTouches && evt.changedTouches.length > 0;
|
|
11664
11707
|
} // Exported Functions
|
|
11665
11708
|
|
|
11666
11709
|
|
|
11667
11710
|
function getParentSVG(evt) {
|
|
11668
|
-
if (evt.nativeEvent
|
|
11711
|
+
if (isNativeTouchEvent(evt.nativeEvent)) {
|
|
11712
|
+
// @ts-expect-error Seems like a superfluous check.
|
|
11669
11713
|
return undefined;
|
|
11670
11714
|
}
|
|
11671
11715
|
|
|
@@ -11680,7 +11724,7 @@ function getParentSVG(evt) {
|
|
|
11680
11724
|
return getParent(evt.target);
|
|
11681
11725
|
}
|
|
11682
11726
|
function getSVGEventCoordinates(evt, svg) {
|
|
11683
|
-
if (evt.nativeEvent
|
|
11727
|
+
if (isNativeTouchEvent(evt.nativeEvent)) {
|
|
11684
11728
|
// react-native override. relies on the RN.View being the _exact_ same size as its child SVG.
|
|
11685
11729
|
// this should be fine: the svg is the only child of View and the View shirks to its children
|
|
11686
11730
|
return {
|
|
@@ -11689,24 +11733,25 @@ function getSVGEventCoordinates(evt, svg) {
|
|
|
11689
11733
|
};
|
|
11690
11734
|
}
|
|
11691
11735
|
|
|
11692
|
-
|
|
11693
|
-
svg = svg || getParentSVG(
|
|
11736
|
+
var location = isReactTouchEvent(evt) ? evt.changedTouches[0] : evt;
|
|
11737
|
+
svg = svg || getParentSVG(location);
|
|
11694
11738
|
var matrix = getTransformationMatrix(svg);
|
|
11695
11739
|
return {
|
|
11696
|
-
x: transformTarget(
|
|
11697
|
-
y: transformTarget(
|
|
11740
|
+
x: transformTarget(location.clientX, matrix, "x"),
|
|
11741
|
+
y: transformTarget(location.clientY, matrix, "y")
|
|
11698
11742
|
};
|
|
11699
11743
|
}
|
|
11700
11744
|
function getDomainCoordinates(props, domain) {
|
|
11701
|
-
var
|
|
11702
|
-
|
|
11703
|
-
|
|
11745
|
+
var horizontal = props.horizontal;
|
|
11746
|
+
var scale = props.scale; // FIXME: add support for DomainTuple: [number, number]
|
|
11747
|
+
|
|
11748
|
+
var domainObj = domain || {
|
|
11704
11749
|
x: scale.x.domain(),
|
|
11705
11750
|
y: scale.y.domain()
|
|
11706
11751
|
};
|
|
11707
11752
|
return {
|
|
11708
|
-
x: horizontal ? [scale.y(
|
|
11709
|
-
y: horizontal ? [scale.x(
|
|
11753
|
+
x: horizontal ? [scale.y(domainObj.y[0]), scale.y(domainObj.y[1])] : [scale.x(domainObj.x[0]), scale.x(domainObj.x[1])],
|
|
11754
|
+
y: horizontal ? [scale.x(domainObj.x[0]), scale.x(domainObj.x[1])] : [scale.y(domainObj.y[0]), scale.y(domainObj.y[1])]
|
|
11710
11755
|
};
|
|
11711
11756
|
} // eslint-disable-next-line max-params
|
|
11712
11757
|
|
|
@@ -11744,7 +11789,7 @@ function getBounds(props) {
|
|
|
11744
11789
|
var point2 = getDataCoordinates(props, scale, x2, y2);
|
|
11745
11790
|
|
|
11746
11791
|
var makeBound = function (a, b) {
|
|
11747
|
-
return [
|
|
11792
|
+
return [_index__WEBPACK_IMPORTED_MODULE_0__.getMinValue([a, b]), _index__WEBPACK_IMPORTED_MODULE_0__.getMaxValue([a, b])];
|
|
11748
11793
|
};
|
|
11749
11794
|
|
|
11750
11795
|
return {
|
|
@@ -11752,6 +11797,7 @@ function getBounds(props) {
|
|
|
11752
11797
|
y: makeBound(point1.y, point2.y)
|
|
11753
11798
|
};
|
|
11754
11799
|
}
|
|
11800
|
+
//# sourceMappingURL=selection.js.map
|
|
11755
11801
|
|
|
11756
11802
|
/***/ }),
|
|
11757
11803
|
|
|
@@ -11823,6 +11869,7 @@ function getColorScale(name) {
|
|
|
11823
11869
|
};
|
|
11824
11870
|
return name ? scales[name] : scales.grayscale;
|
|
11825
11871
|
}
|
|
11872
|
+
//# sourceMappingURL=style.js.map
|
|
11826
11873
|
|
|
11827
11874
|
/***/ }),
|
|
11828
11875
|
|
|
@@ -12027,8 +12074,10 @@ var _getSizeWithRotate = function (axisSize, dependentSize, angle) {
|
|
|
12027
12074
|
|
|
12028
12075
|
|
|
12029
12076
|
var convertLengthToPixels = function (length, fontSize) {
|
|
12030
|
-
var
|
|
12031
|
-
|
|
12077
|
+
var _length$match;
|
|
12078
|
+
|
|
12079
|
+
var attribute = (_length$match = length.match(/[a-zA-Z%]+/)) === null || _length$match === void 0 ? void 0 : _length$match[0];
|
|
12080
|
+
var value = Number(length.match(/[0-9.,]+/));
|
|
12032
12081
|
var result;
|
|
12033
12082
|
|
|
12034
12083
|
if (!attribute) {
|
|
@@ -12094,9 +12143,9 @@ var _approximateTextHeightInternal = function (text, style) {
|
|
|
12094
12143
|
var height = containsCaps ? lineStyle.fontSize * coefficients.lineCapitalCoef : lineStyle.fontSize;
|
|
12095
12144
|
return total + lineStyle.lineHeight * height;
|
|
12096
12145
|
}, 0);
|
|
12097
|
-
};
|
|
12098
|
-
|
|
12146
|
+
};
|
|
12099
12147
|
|
|
12148
|
+
// Stubbable implementation.
|
|
12100
12149
|
var _approximateTextSizeInternal = {
|
|
12101
12150
|
impl: function (text, style) {
|
|
12102
12151
|
var angle = Array.isArray(style) ? style[0] && style[0].angle : style && style.angle;
|
|
@@ -12115,7 +12164,7 @@ var _approximateTextSizeInternal = {
|
|
|
12115
12164
|
};
|
|
12116
12165
|
/**
|
|
12117
12166
|
* Predict text size by font params.
|
|
12118
|
-
* @param {string} text Content for width calculation.
|
|
12167
|
+
* @param {string|string[]} text Content for width calculation.
|
|
12119
12168
|
* @param {Object} style Text styles, ,fontFamily, fontSize, etc.
|
|
12120
12169
|
* @param {string} style.fontFamily Text fontFamily.
|
|
12121
12170
|
* @param {(number|string)} style.fontSize Text fontSize.
|
|
@@ -12128,6 +12177,7 @@ var _approximateTextSizeInternal = {
|
|
|
12128
12177
|
var approximateTextSize = function (text, style) {
|
|
12129
12178
|
return _approximateTextSizeInternal.impl(text, style);
|
|
12130
12179
|
};
|
|
12180
|
+
//# sourceMappingURL=textsize.js.map
|
|
12131
12181
|
|
|
12132
12182
|
/***/ }),
|
|
12133
12183
|
|
|
@@ -12158,6 +12208,7 @@ var TimerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cre
|
|
|
12158
12208
|
});
|
|
12159
12209
|
TimerContext.displayName = "TimerContext";
|
|
12160
12210
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimerContext);
|
|
12211
|
+
//# sourceMappingURL=timer-context.js.map
|
|
12161
12212
|
|
|
12162
12213
|
/***/ }),
|
|
12163
12214
|
|
|
@@ -12260,6 +12311,7 @@ var Timer = /*#__PURE__*/function () {
|
|
|
12260
12311
|
}();
|
|
12261
12312
|
|
|
12262
12313
|
|
|
12314
|
+
//# sourceMappingURL=timer.js.map
|
|
12263
12315
|
|
|
12264
12316
|
/***/ }),
|
|
12265
12317
|
|
|
@@ -12298,7 +12350,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12298
12350
|
|
|
12299
12351
|
/*
|
|
12300
12352
|
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
12301
|
-
The startsWidth array will contain the start of any accepted user-prop that
|
|
12353
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
12302
12354
|
starts with these characters.
|
|
12303
12355
|
The exactMatch will contain a list of exact prop names that are accepted.
|
|
12304
12356
|
*/
|
|
@@ -12307,6 +12359,7 @@ var USER_PROPS_SAFELIST = {
|
|
|
12307
12359
|
startsWith: ["data-", "aria-"],
|
|
12308
12360
|
exactMatch: []
|
|
12309
12361
|
};
|
|
12362
|
+
|
|
12310
12363
|
/**
|
|
12311
12364
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
12312
12365
|
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
@@ -12315,7 +12368,6 @@ var USER_PROPS_SAFELIST = {
|
|
|
12315
12368
|
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
12316
12369
|
* otherwise
|
|
12317
12370
|
*/
|
|
12318
|
-
|
|
12319
12371
|
var doesPropStartWith = function (key) {
|
|
12320
12372
|
var startsWith = false;
|
|
12321
12373
|
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
@@ -12392,14 +12444,15 @@ var getSafeUserProps = function (props) {
|
|
|
12392
12444
|
/**
|
|
12393
12445
|
* Wraps a component and adds safe user props
|
|
12394
12446
|
*
|
|
12395
|
-
* @param {
|
|
12447
|
+
* @param {ReactElement} component: parent component
|
|
12396
12448
|
* @param {Object} props: props to be filtered
|
|
12397
|
-
* @returns {
|
|
12449
|
+
* @returns {ReactElement} modified component
|
|
12398
12450
|
*/
|
|
12399
12451
|
|
|
12400
12452
|
var withSafeUserProps = function (component, props) {
|
|
12401
12453
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(component, getSafeUserProps(props));
|
|
12402
12454
|
};
|
|
12455
|
+
//# sourceMappingURL=user-props.js.map
|
|
12403
12456
|
|
|
12404
12457
|
/***/ }),
|
|
12405
12458
|
|
|
@@ -12517,7 +12570,7 @@ var Flyout = function (props) {
|
|
|
12517
12570
|
}));
|
|
12518
12571
|
};
|
|
12519
12572
|
|
|
12520
|
-
Flyout.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_5__.primitiveProps), {}, {
|
|
12573
|
+
Flyout.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_5__.CommonProps.primitiveProps), {}, {
|
|
12521
12574
|
center: prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
|
|
12522
12575
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number),
|
|
12523
12576
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().number)
|
|
@@ -12541,6 +12594,7 @@ Flyout.defaultProps = {
|
|
|
12541
12594
|
shapeRendering: "auto"
|
|
12542
12595
|
};
|
|
12543
12596
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Flyout);
|
|
12597
|
+
//# sourceMappingURL=flyout.js.map
|
|
12544
12598
|
|
|
12545
12599
|
/***/ }),
|
|
12546
12600
|
|
|
@@ -13225,6 +13279,7 @@ VictoryTooltip.defaultEvents = function (props) {
|
|
|
13225
13279
|
};
|
|
13226
13280
|
|
|
13227
13281
|
|
|
13282
|
+
//# sourceMappingURL=victory-tooltip.js.map
|
|
13228
13283
|
|
|
13229
13284
|
/***/ }),
|
|
13230
13285
|
|