victory-group 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-group.js +152 -103
- package/dist/victory-group.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-group.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-group.js +2 -1
- package/package.json +4 -4
- package/src/helper-methods.js +13 -13
- package/src/index.d.ts +1 -1
- package/src/victory-group.js +15 -15
package/dist/victory-group.js
CHANGED
|
@@ -433,7 +433,7 @@ var VictoryGroup = function (initialProps) {
|
|
|
433
433
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(container, container.props, newChildren);
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
VictoryGroup.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_12__.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_12__.dataProps), {}, {
|
|
436
|
+
VictoryGroup.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_12__.CommonProps.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_12__.CommonProps.dataProps), {}, {
|
|
437
437
|
children: prop_types__WEBPACK_IMPORTED_MODULE_13___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_13___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_13___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_13___default().node)]),
|
|
438
438
|
color: prop_types__WEBPACK_IMPORTED_MODULE_13___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_13___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_13___default().func)]),
|
|
439
439
|
colorScale: prop_types__WEBPACK_IMPORTED_MODULE_13___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_13___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_13___default().string)), prop_types__WEBPACK_IMPORTED_MODULE_13___default().oneOf(["grayscale", "qualitative", "heatmap", "warm", "cool", "red", "green", "blue"])]),
|
|
@@ -7842,6 +7842,7 @@ VictoryContainer.defaultProps = {
|
|
|
7842
7842
|
role: "img"
|
|
7843
7843
|
};
|
|
7844
7844
|
VictoryContainer.contextType = _victory_util_timer_context__WEBPACK_IMPORTED_MODULE_12__["default"];
|
|
7845
|
+
//# sourceMappingURL=victory-container.js.map
|
|
7845
7846
|
|
|
7846
7847
|
/***/ }),
|
|
7847
7848
|
|
|
@@ -7866,6 +7867,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7866
7867
|
*/
|
|
7867
7868
|
var PortalContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createContext({});
|
|
7868
7869
|
PortalContext.displayName = "PortalContext";
|
|
7870
|
+
//# sourceMappingURL=portal-context.js.map
|
|
7869
7871
|
|
|
7870
7872
|
/***/ }),
|
|
7871
7873
|
|
|
@@ -7977,6 +7979,7 @@ Portal.propTypes = {
|
|
|
7977
7979
|
viewBox: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string),
|
|
7978
7980
|
width: _victory_util_prop_types__WEBPACK_IMPORTED_MODULE_3__.nonNegative
|
|
7979
7981
|
};
|
|
7982
|
+
//# sourceMappingURL=portal.js.map
|
|
7980
7983
|
|
|
7981
7984
|
/***/ }),
|
|
7982
7985
|
|
|
@@ -8252,6 +8255,7 @@ var grayscale = {
|
|
|
8252
8255
|
}
|
|
8253
8256
|
}, baseProps)
|
|
8254
8257
|
};
|
|
8258
|
+
//# sourceMappingURL=grayscale.js.map
|
|
8255
8259
|
|
|
8256
8260
|
/***/ }),
|
|
8257
8261
|
|
|
@@ -8554,6 +8558,7 @@ var material = {
|
|
|
8554
8558
|
}
|
|
8555
8559
|
}, baseProps)
|
|
8556
8560
|
};
|
|
8561
|
+
//# sourceMappingURL=material.js.map
|
|
8557
8562
|
|
|
8558
8563
|
/***/ }),
|
|
8559
8564
|
|
|
@@ -8577,6 +8582,7 @@ var VictoryTheme = {
|
|
|
8577
8582
|
grayscale: _grayscale__WEBPACK_IMPORTED_MODULE_0__.grayscale,
|
|
8578
8583
|
material: _material__WEBPACK_IMPORTED_MODULE_1__.material
|
|
8579
8584
|
};
|
|
8585
|
+
//# sourceMappingURL=victory-theme.js.map
|
|
8580
8586
|
|
|
8581
8587
|
/***/ }),
|
|
8582
8588
|
|
|
@@ -8661,13 +8667,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
8661
8667
|
|
|
8662
8668
|
|
|
8663
8669
|
|
|
8670
|
+
|
|
8664
8671
|
/**
|
|
8665
8672
|
* Returns the axis (x or y) of a particular axis component
|
|
8666
8673
|
* @param {Object} props: the props object.
|
|
8667
8674
|
* @param {Boolean} horizontal: true for horizontal charts
|
|
8668
8675
|
* @returns {String} the dimension appropriate for the axis given its props
|
|
8669
8676
|
*/
|
|
8670
|
-
|
|
8671
8677
|
function getAxis(props) {
|
|
8672
8678
|
var dependentAxis = props.dependentAxis;
|
|
8673
8679
|
return dependentAxis ? "y" : "x";
|
|
@@ -8853,7 +8859,7 @@ function getTickArray(props) {
|
|
|
8853
8859
|
}) : lodash_range__WEBPACK_IMPORTED_MODULE_4___default()(1, tickValues.length + 1);
|
|
8854
8860
|
}
|
|
8855
8861
|
|
|
8856
|
-
var tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_5___default()(ticks) : getTicksFromFormat(
|
|
8862
|
+
var tickArray = ticks ? lodash_uniq__WEBPACK_IMPORTED_MODULE_5___default()(ticks) : getTicksFromFormat();
|
|
8857
8863
|
|
|
8858
8864
|
var buildTickArray = function (arr) {
|
|
8859
8865
|
var newTickArray = [];
|
|
@@ -8898,11 +8904,11 @@ function getTickFormat(props, scale) {
|
|
|
8898
8904
|
return defaultTickFormat || scaleTickFormat;
|
|
8899
8905
|
} else if (tickFormat && Array.isArray(tickFormat)) {
|
|
8900
8906
|
var tickArray = getTickArray(props);
|
|
8901
|
-
var tickArrayIndices = tickArray ? tickArray.map(function (v) {
|
|
8907
|
+
var tickArrayIndices = tickArray === null || tickArray === void 0 ? void 0 : tickArray.map(function (v) {
|
|
8902
8908
|
return v.index;
|
|
8903
|
-
})
|
|
8909
|
+
});
|
|
8904
8910
|
var filteredTickFormat = tickFormat.filter(function (t, index) {
|
|
8905
|
-
return tickArrayIndices.includes(index);
|
|
8911
|
+
return tickArrayIndices === null || tickArrayIndices === void 0 ? void 0 : tickArrayIndices.includes(index);
|
|
8906
8912
|
});
|
|
8907
8913
|
return function (x, index) {
|
|
8908
8914
|
return filteredTickFormat[index];
|
|
@@ -8936,7 +8942,8 @@ function downsampleTicks(ticks, tickCount) {
|
|
|
8936
8942
|
});
|
|
8937
8943
|
}
|
|
8938
8944
|
|
|
8939
|
-
function getTicks(props, scale
|
|
8945
|
+
function getTicks(props, scale) {
|
|
8946
|
+
var filterZero = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8940
8947
|
var tickCount = props.tickCount;
|
|
8941
8948
|
var tickArray = getTickArray(props);
|
|
8942
8949
|
var tickValues = tickArray ? tickArray.map(function (v) {
|
|
@@ -9059,6 +9066,7 @@ function modifyProps(props, fallbackProps) {
|
|
|
9059
9066
|
theme: theme
|
|
9060
9067
|
}), fallbackProps, "axis");
|
|
9061
9068
|
}
|
|
9069
|
+
//# sourceMappingURL=axis.js.map
|
|
9062
9070
|
|
|
9063
9071
|
/***/ }),
|
|
9064
9072
|
|
|
@@ -9092,7 +9100,6 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
9092
9100
|
|
|
9093
9101
|
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; }
|
|
9094
9102
|
|
|
9095
|
-
/* eslint-disable no-use-before-define */
|
|
9096
9103
|
function isNonEmptyArray(collection) {
|
|
9097
9104
|
return Array.isArray(collection) && collection.length > 0;
|
|
9098
9105
|
}
|
|
@@ -9131,7 +9138,8 @@ function getMaxValue(arr) {
|
|
|
9131
9138
|
}
|
|
9132
9139
|
|
|
9133
9140
|
var array = arr.concat(values);
|
|
9134
|
-
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array)))
|
|
9141
|
+
return containsDates(array) ? new Date(Math.max.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
9142
|
+
: Math.max.apply(Math, _toConsumableArray(array));
|
|
9135
9143
|
}
|
|
9136
9144
|
function getMinValue(arr) {
|
|
9137
9145
|
for (var _len2 = arguments.length, values = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -9139,8 +9147,10 @@ function getMinValue(arr) {
|
|
|
9139
9147
|
}
|
|
9140
9148
|
|
|
9141
9149
|
var array = arr.concat(values);
|
|
9142
|
-
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array)))
|
|
9150
|
+
return containsDates(array) ? new Date(Math.min.apply(Math, _toConsumableArray(array))) // Dates will be coerced to numbers
|
|
9151
|
+
: Math.min.apply(Math, _toConsumableArray(array));
|
|
9143
9152
|
}
|
|
9153
|
+
//# sourceMappingURL=collection.js.map
|
|
9144
9154
|
|
|
9145
9155
|
/***/ }),
|
|
9146
9156
|
|
|
@@ -9153,9 +9163,7 @@ function getMinValue(arr) {
|
|
|
9153
9163
|
"use strict";
|
|
9154
9164
|
__webpack_require__.r(__webpack_exports__);
|
|
9155
9165
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9156
|
-
/* harmony export */ "
|
|
9157
|
-
/* harmony export */ "dataProps": () => (/* binding */ dataProps),
|
|
9158
|
-
/* harmony export */ "primitiveProps": () => (/* binding */ primitiveProps)
|
|
9166
|
+
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
9159
9167
|
/* harmony export */ });
|
|
9160
9168
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
9161
9169
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -9163,26 +9171,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9163
9171
|
|
|
9164
9172
|
|
|
9165
9173
|
var dataProps = {
|
|
9174
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9166
9175
|
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({
|
|
9167
9176
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
9168
9177
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
9169
9178
|
})]),
|
|
9179
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9170
9180
|
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)]),
|
|
9171
9181
|
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
9172
9182
|
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
9173
9183
|
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
9174
9184
|
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)]),
|
|
9175
9185
|
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
9176
|
-
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))]),
|
|
9186
|
+
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))]),
|
|
9177
9187
|
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
9178
9188
|
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9179
9189
|
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
9180
9190
|
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
9181
9191
|
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
9182
9192
|
}),
|
|
9183
|
-
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))]),
|
|
9184
|
-
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))]),
|
|
9185
|
-
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))])
|
|
9193
|
+
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))]),
|
|
9194
|
+
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))]),
|
|
9195
|
+
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))])
|
|
9186
9196
|
};
|
|
9187
9197
|
var baseProps = {
|
|
9188
9198
|
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)]),
|
|
@@ -9191,14 +9201,17 @@ var baseProps = {
|
|
|
9191
9201
|
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
9192
9202
|
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
9193
9203
|
})]),
|
|
9204
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9194
9205
|
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({
|
|
9195
9206
|
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)]),
|
|
9196
9207
|
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)])
|
|
9197
9208
|
})]),
|
|
9209
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9198
9210
|
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({
|
|
9199
9211
|
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)]),
|
|
9200
9212
|
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)])
|
|
9201
9213
|
})]),
|
|
9214
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9202
9215
|
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9203
9216
|
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))]),
|
|
9204
9217
|
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))])
|
|
@@ -9209,6 +9222,7 @@ var baseProps = {
|
|
|
9209
9222
|
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)]),
|
|
9210
9223
|
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
9211
9224
|
})),
|
|
9225
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9212
9226
|
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9213
9227
|
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
9214
9228
|
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)]),
|
|
@@ -9219,10 +9233,12 @@ var baseProps = {
|
|
|
9219
9233
|
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
9220
9234
|
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
9221
9235
|
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
9236
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9222
9237
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9223
9238
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
9224
9239
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
9225
9240
|
}),
|
|
9241
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9226
9242
|
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({
|
|
9227
9243
|
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
9228
9244
|
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
@@ -9231,17 +9247,19 @@ var baseProps = {
|
|
|
9231
9247
|
})]),
|
|
9232
9248
|
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
9233
9249
|
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9234
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
9235
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
9250
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
9251
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
9236
9252
|
})]),
|
|
9237
9253
|
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9238
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
9239
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
9254
|
+
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
9255
|
+
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
9240
9256
|
})]),
|
|
9257
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9241
9258
|
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9242
9259
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
9243
9260
|
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
9244
9261
|
}),
|
|
9262
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9245
9263
|
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({
|
|
9246
9264
|
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
9247
9265
|
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
@@ -9261,6 +9279,7 @@ var primitiveProps = {
|
|
|
9261
9279
|
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
9262
9280
|
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)]),
|
|
9263
9281
|
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)]),
|
|
9282
|
+
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
9264
9283
|
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
9265
9284
|
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
9266
9285
|
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
@@ -9276,6 +9295,12 @@ var primitiveProps = {
|
|
|
9276
9295
|
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)]),
|
|
9277
9296
|
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
9278
9297
|
};
|
|
9298
|
+
var CommonProps = {
|
|
9299
|
+
dataProps: dataProps,
|
|
9300
|
+
baseProps: baseProps,
|
|
9301
|
+
primitiveProps: primitiveProps
|
|
9302
|
+
};
|
|
9303
|
+
//# sourceMappingURL=common-props.js.map
|
|
9279
9304
|
|
|
9280
9305
|
/***/ }),
|
|
9281
9306
|
|
|
@@ -9789,6 +9814,7 @@ function isDataComponent(component) {
|
|
|
9789
9814
|
var whitelist = ["area", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
9790
9815
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_2___default()(whitelist, role);
|
|
9791
9816
|
}
|
|
9817
|
+
//# sourceMappingURL=data.js.map
|
|
9792
9818
|
|
|
9793
9819
|
/***/ }),
|
|
9794
9820
|
|
|
@@ -9890,8 +9916,9 @@ function getDomainPadding(props, axis) {
|
|
|
9890
9916
|
}
|
|
9891
9917
|
|
|
9892
9918
|
function getFlatData(dataset, axis) {
|
|
9919
|
+
var axisKey = "_".concat(axis);
|
|
9893
9920
|
return lodash_flatten__WEBPACK_IMPORTED_MODULE_5___default()(dataset).map(function (datum) {
|
|
9894
|
-
return datum[
|
|
9921
|
+
return datum[axisKey] && datum[axisKey][1] !== undefined ? datum[axisKey][1] : datum[axisKey];
|
|
9895
9922
|
});
|
|
9896
9923
|
}
|
|
9897
9924
|
|
|
@@ -9956,7 +9983,9 @@ function padDomain(domain, props, axis) {
|
|
|
9956
9983
|
if (addsQuadrants && singleQuadrantDomainPadding !== false) {
|
|
9957
9984
|
// Naive initial padding calculation
|
|
9958
9985
|
var initialPadding = {
|
|
9986
|
+
// @ts-expect-error `max/min` might be dates
|
|
9959
9987
|
left: Math.abs(max - min) * padding.left / rangeExtent,
|
|
9988
|
+
// @ts-expect-error `max/min` might be dates
|
|
9960
9989
|
right: Math.abs(max - min) * padding.right / rangeExtent
|
|
9961
9990
|
}; // Adjust the domain by the initial padding
|
|
9962
9991
|
|
|
@@ -10241,6 +10270,7 @@ function isDomainComponent(component) {
|
|
|
10241
10270
|
var whitelist = ["area", "axis", "bar", "boxplot", "candlestick", "errorbar", "group", "histogram", "line", "pie", "scatter", "stack", "voronoi"];
|
|
10242
10271
|
return lodash_includes__WEBPACK_IMPORTED_MODULE_1___default()(whitelist, role);
|
|
10243
10272
|
}
|
|
10273
|
+
//# sourceMappingURL=domain.js.map
|
|
10244
10274
|
|
|
10245
10275
|
/***/ }),
|
|
10246
10276
|
|
|
@@ -10309,15 +10339,16 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
10309
10339
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10310
10340
|
|
|
10311
10341
|
var GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
|
|
10342
|
+
|
|
10312
10343
|
/* Returns all own and shared events that should be attached to a single target element,
|
|
10313
10344
|
* i.e. an individual bar specified by target: "data", eventKey: [index].
|
|
10314
10345
|
* Returned events are scoped to the appropriate state. Either that of the component itself
|
|
10315
10346
|
* (i.e. VictoryBar) in the case of own events, or that of the parent component
|
|
10316
10347
|
* (i.e. VictoryChart) in the case of shared events
|
|
10317
10348
|
*/
|
|
10318
|
-
// eslint-disable-next-line max-params
|
|
10319
|
-
|
|
10320
|
-
|
|
10349
|
+
// eslint-disable-next-line max-params
|
|
10350
|
+
function getEvents(props, target, eventKey, // eslint-disable-next-line no-shadow
|
|
10351
|
+
getScopedEvents) {
|
|
10321
10352
|
var _this = this;
|
|
10322
10353
|
|
|
10323
10354
|
// Returns all events that apply to a particular target element
|
|
@@ -10540,24 +10571,27 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
10540
10571
|
return memo;
|
|
10541
10572
|
}, {});
|
|
10542
10573
|
}
|
|
10543
|
-
/*
|
|
10574
|
+
/*
|
|
10575
|
+
* Returns a partially applied event handler for a specific target element
|
|
10544
10576
|
* This allows event handlers to have access to props controlling each element
|
|
10545
10577
|
*/
|
|
10546
10578
|
|
|
10547
10579
|
function getPartialEvents(events, eventKey, childProps) {
|
|
10548
|
-
|
|
10580
|
+
if (!events) return {};
|
|
10581
|
+
return lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(events).reduce(function (memo, eventName) {
|
|
10549
10582
|
var appliedEvent = function (evt) {
|
|
10550
10583
|
return events[eventName](evt, childProps, eventKey, eventName);
|
|
10551
10584
|
};
|
|
10552
10585
|
|
|
10553
10586
|
memo[eventName] = appliedEvent;
|
|
10554
10587
|
return memo;
|
|
10555
|
-
}, {})
|
|
10588
|
+
}, {});
|
|
10556
10589
|
}
|
|
10590
|
+
|
|
10557
10591
|
/* Returns the property of the state object corresponding to event changes for
|
|
10558
10592
|
* a particular element
|
|
10559
10593
|
*/
|
|
10560
|
-
|
|
10594
|
+
// eslint-disable-next-line max-params
|
|
10561
10595
|
function getEventState(eventKey, namespace, childType) {
|
|
10562
10596
|
// Mandatory usage: `getEventState.bind(this)`
|
|
10563
10597
|
// eslint-disable-next-line no-invalid-this
|
|
@@ -10742,6 +10776,7 @@ var emulateReactEvent = function (event) {
|
|
|
10742
10776
|
nativeEvent: event
|
|
10743
10777
|
});
|
|
10744
10778
|
};
|
|
10779
|
+
//# sourceMappingURL=events.js.map
|
|
10745
10780
|
|
|
10746
10781
|
/***/ }),
|
|
10747
10782
|
|
|
@@ -10823,7 +10858,7 @@ function getPolarRange(props, axis) {
|
|
|
10823
10858
|
|
|
10824
10859
|
/**
|
|
10825
10860
|
* creates an object with some keys excluded
|
|
10826
|
-
* replacement for lodash.omit for performance. does not
|
|
10861
|
+
* replacement for lodash.omit for performance. does not mimic the entire lodash.omit api
|
|
10827
10862
|
* @param {Object} originalObject: created object will be based on this object
|
|
10828
10863
|
* @param {Array<String>} ks: an array of keys to omit from the new object
|
|
10829
10864
|
* @returns {Object} new object with same properties as originalObject
|
|
@@ -10836,6 +10871,7 @@ function omit(originalObject) {
|
|
|
10836
10871
|
var newObject = {};
|
|
10837
10872
|
|
|
10838
10873
|
for (var key in originalObject) {
|
|
10874
|
+
// @ts-expect-error String is not assignable to Key
|
|
10839
10875
|
if (ks.indexOf(key) >= 0) {
|
|
10840
10876
|
continue;
|
|
10841
10877
|
}
|
|
@@ -11068,7 +11104,9 @@ function reduceChildren(children, iteratee) {
|
|
|
11068
11104
|
var parentProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
11069
11105
|
var initialMemo = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
11070
11106
|
var combine = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function (memo, item) {
|
|
11071
|
-
return
|
|
11107
|
+
return (// @ts-expect-error These defaults are hard to type
|
|
11108
|
+
memo.concat(item)
|
|
11109
|
+
);
|
|
11072
11110
|
};
|
|
11073
11111
|
var sharedProps = ["data", "domain", "categories", "polar", "startAngle", "endAngle", "minDomain", "maxDomain", "horizontal"];
|
|
11074
11112
|
|
|
@@ -11112,7 +11150,7 @@ function reduceChildren(children, iteratee) {
|
|
|
11112
11150
|
/**
|
|
11113
11151
|
* @param {Object} props: the props object
|
|
11114
11152
|
* @returns {Boolean} returns true if the props object contains `horizontal: true` of if any
|
|
11115
|
-
* children or nested children are
|
|
11153
|
+
* children or nested children are horizontal
|
|
11116
11154
|
*/
|
|
11117
11155
|
|
|
11118
11156
|
function isHorizontal(props) {
|
|
@@ -11135,6 +11173,7 @@ function isHorizontal(props) {
|
|
|
11135
11173
|
|
|
11136
11174
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(props.children));
|
|
11137
11175
|
}
|
|
11176
|
+
//# sourceMappingURL=helpers.js.map
|
|
11138
11177
|
|
|
11139
11178
|
/***/ }),
|
|
11140
11179
|
|
|
@@ -11202,7 +11241,7 @@ var useAnimationState = function () {
|
|
|
11202
11241
|
}, [_setState]); // This is a copy of Wrapper.getAnimationProps
|
|
11203
11242
|
|
|
11204
11243
|
var getAnimationProps = react__WEBPACK_IMPORTED_MODULE_2___default().useCallback(function (props, child, index) {
|
|
11205
|
-
if (!props.animate) {
|
|
11244
|
+
if (!(props !== null && props !== void 0 && props.animate)) {
|
|
11206
11245
|
return child.props.animate;
|
|
11207
11246
|
}
|
|
11208
11247
|
|
|
@@ -11235,7 +11274,7 @@ var useAnimationState = function () {
|
|
|
11235
11274
|
}, [state, setState]); // This is a copy of Wrapper.setAnimationState
|
|
11236
11275
|
|
|
11237
11276
|
var setAnimationState = react__WEBPACK_IMPORTED_MODULE_2___default().useCallback(function (props, nextProps) {
|
|
11238
|
-
if (!props.animate) {
|
|
11277
|
+
if (!props || !props.animate) {
|
|
11239
11278
|
return;
|
|
11240
11279
|
}
|
|
11241
11280
|
|
|
@@ -11293,6 +11332,7 @@ var useAnimationState = function () {
|
|
|
11293
11332
|
getProps: getProps
|
|
11294
11333
|
};
|
|
11295
11334
|
};
|
|
11335
|
+
//# sourceMappingURL=use-animation-state.js.map
|
|
11296
11336
|
|
|
11297
11337
|
/***/ }),
|
|
11298
11338
|
|
|
@@ -11310,13 +11350,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11310
11350
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
11311
11351
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
11312
11352
|
|
|
11313
|
-
|
|
11353
|
+
function usePreviousProps(props) {
|
|
11314
11354
|
var ref = react__WEBPACK_IMPORTED_MODULE_0___default().useRef();
|
|
11315
11355
|
react__WEBPACK_IMPORTED_MODULE_0___default().useEffect(function () {
|
|
11316
11356
|
ref.current = props;
|
|
11317
11357
|
});
|
|
11318
|
-
return ref.current
|
|
11319
|
-
}
|
|
11358
|
+
return ref.current;
|
|
11359
|
+
}
|
|
11360
|
+
//# sourceMappingURL=use-previous-props.js.map
|
|
11320
11361
|
|
|
11321
11362
|
/***/ }),
|
|
11322
11363
|
|
|
@@ -11360,15 +11401,16 @@ function isMap(x) {
|
|
|
11360
11401
|
return !!(x && x[IMMUTABLE_MAP]);
|
|
11361
11402
|
}
|
|
11362
11403
|
function shallowToJS(x, whitelist) {
|
|
11363
|
-
return isIterable(x) ? x.reduce(function (
|
|
11404
|
+
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
11364
11405
|
if (whitelist && whitelist[key]) {
|
|
11365
11406
|
curr = shallowToJS(curr);
|
|
11366
11407
|
}
|
|
11367
11408
|
|
|
11368
|
-
|
|
11369
|
-
return
|
|
11409
|
+
result[key] = curr;
|
|
11410
|
+
return result;
|
|
11370
11411
|
}, isList(x) ? [] : {}) : x;
|
|
11371
11412
|
}
|
|
11413
|
+
//# sourceMappingURL=immutable.js.map
|
|
11372
11414
|
|
|
11373
11415
|
/***/ }),
|
|
11374
11416
|
|
|
@@ -11394,6 +11436,7 @@ function warn(message) {
|
|
|
11394
11436
|
}
|
|
11395
11437
|
}
|
|
11396
11438
|
}
|
|
11439
|
+
//# sourceMappingURL=log.js.map
|
|
11397
11440
|
|
|
11398
11441
|
/***/ }),
|
|
11399
11442
|
|
|
@@ -11421,12 +11464,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11421
11464
|
/* harmony import */ var lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isRegExp__WEBPACK_IMPORTED_MODULE_0__);
|
|
11422
11465
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/find */ "../../../node_modules/lodash/find.js");
|
|
11423
11466
|
/* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_1__);
|
|
11424
|
-
/* harmony import */ var
|
|
11425
|
-
/* harmony import */ var
|
|
11426
|
-
/* harmony import */ var
|
|
11427
|
-
/* harmony import */ var
|
|
11428
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
11429
|
-
|
|
11467
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./log */ "../../victory-core/es/victory-util/log.js");
|
|
11468
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
|
|
11469
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);
|
|
11470
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
11430
11471
|
|
|
11431
11472
|
|
|
11432
11473
|
|
|
@@ -11434,6 +11475,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11434
11475
|
|
|
11435
11476
|
|
|
11436
11477
|
|
|
11478
|
+
|
|
11479
|
+
|
|
11437
11480
|
/**
|
|
11438
11481
|
* Return a new validator based on `validator` but with the option to chain
|
|
11439
11482
|
* `isRequired` onto the validation. This is nearly identical to how React
|
|
@@ -11441,30 +11484,30 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11441
11484
|
* @param {Function} validator Validation function.
|
|
11442
11485
|
* @returns {Function} Validator with `isRequired` option.
|
|
11443
11486
|
*/
|
|
11444
|
-
|
|
11445
11487
|
var makeChainable = function (validator) {
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11488
|
+
var createChainable = function (isRequired) {
|
|
11489
|
+
return function (props, propName, componentName) {
|
|
11490
|
+
var value = props[propName];
|
|
11449
11491
|
|
|
11450
|
-
|
|
11451
|
-
|
|
11452
|
-
|
|
11453
|
-
|
|
11492
|
+
if (value === undefined || value === null) {
|
|
11493
|
+
if (isRequired) {
|
|
11494
|
+
return new Error("Required `".concat(propName, "` was not specified in `").concat(componentName, "`."));
|
|
11495
|
+
}
|
|
11454
11496
|
|
|
11455
|
-
|
|
11456
|
-
|
|
11497
|
+
return null;
|
|
11498
|
+
}
|
|
11457
11499
|
|
|
11458
|
-
|
|
11459
|
-
|
|
11460
|
-
|
|
11500
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
11501
|
+
rest[_key - 3] = arguments[_key];
|
|
11502
|
+
}
|
|
11461
11503
|
|
|
11462
|
-
|
|
11504
|
+
return validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
11505
|
+
};
|
|
11463
11506
|
};
|
|
11464
11507
|
|
|
11465
|
-
var chainable =
|
|
11466
|
-
|
|
11467
|
-
|
|
11508
|
+
var chainable = Object.assign(createChainable(false), {
|
|
11509
|
+
isRequired: createChainable(true)
|
|
11510
|
+
});
|
|
11468
11511
|
return chainable;
|
|
11469
11512
|
};
|
|
11470
11513
|
|
|
@@ -11494,7 +11537,7 @@ var getConstructor = function (value) {
|
|
|
11494
11537
|
};
|
|
11495
11538
|
/**
|
|
11496
11539
|
* Get the name of the constructor used to create `value`, using
|
|
11497
|
-
* `Object.
|
|
11540
|
+
* `Object.prototype.toString`. If the value is null or undefined, return
|
|
11498
11541
|
* "null" or "undefined", respectively.
|
|
11499
11542
|
* @param {*} value Instance to return the constructor name of.
|
|
11500
11543
|
* @returns {String} Name of the constructor.
|
|
@@ -11524,10 +11567,11 @@ function deprecated(propType, explanation) {
|
|
|
11524
11567
|
var value = props[propName];
|
|
11525
11568
|
|
|
11526
11569
|
if (value !== null && value !== undefined) {
|
|
11527
|
-
|
|
11570
|
+
_log__WEBPACK_IMPORTED_MODULE_2__.warn("\"".concat(propName, "\" property of \"").concat(componentName, "\" has been deprecated ").concat(explanation));
|
|
11528
11571
|
}
|
|
11529
11572
|
|
|
11530
|
-
|
|
11573
|
+
prop_types__WEBPACK_IMPORTED_MODULE_3___default().checkPropTypes(_defineProperty({}, propName, propType), props, propName, componentName);
|
|
11574
|
+
return null;
|
|
11531
11575
|
};
|
|
11532
11576
|
}
|
|
11533
11577
|
/**
|
|
@@ -11546,7 +11590,7 @@ function allOfType(validators) {
|
|
|
11546
11590
|
|
|
11547
11591
|
return validators.reduce(function (result, validator) {
|
|
11548
11592
|
return result || validator.apply(void 0, [props, propName, componentName].concat(rest));
|
|
11549
|
-
},
|
|
11593
|
+
}, null);
|
|
11550
11594
|
});
|
|
11551
11595
|
}
|
|
11552
11596
|
/**
|
|
@@ -11560,7 +11604,7 @@ var nonNegative = makeChainable(function (props, propName, componentName) {
|
|
|
11560
11604
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a non-negative number."));
|
|
11561
11605
|
}
|
|
11562
11606
|
|
|
11563
|
-
return
|
|
11607
|
+
return null;
|
|
11564
11608
|
});
|
|
11565
11609
|
/**
|
|
11566
11610
|
* Check that the value is an integer.
|
|
@@ -11573,7 +11617,7 @@ var integer = makeChainable(function (props, propName, componentName) {
|
|
|
11573
11617
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an integer."));
|
|
11574
11618
|
}
|
|
11575
11619
|
|
|
11576
|
-
return
|
|
11620
|
+
return null;
|
|
11577
11621
|
});
|
|
11578
11622
|
/**
|
|
11579
11623
|
* Check that the value is greater than zero.
|
|
@@ -11586,7 +11630,7 @@ var greaterThanZero = makeChainable(function (props, propName, componentName) {
|
|
|
11586
11630
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a number greater than zero."));
|
|
11587
11631
|
}
|
|
11588
11632
|
|
|
11589
|
-
return
|
|
11633
|
+
return null;
|
|
11590
11634
|
});
|
|
11591
11635
|
/**
|
|
11592
11636
|
* Check that the value is an Array of two unique values.
|
|
@@ -11599,32 +11643,20 @@ var domain = makeChainable(function (props, propName, componentName) {
|
|
|
11599
11643
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be an array of two unique numeric values."));
|
|
11600
11644
|
}
|
|
11601
11645
|
|
|
11602
|
-
return
|
|
11646
|
+
return null;
|
|
11603
11647
|
});
|
|
11604
11648
|
/**
|
|
11605
11649
|
* Check that the value looks like a d3 `scale` function.
|
|
11606
11650
|
*/
|
|
11607
11651
|
|
|
11608
11652
|
var scale = makeChainable(function (props, propName, componentName) {
|
|
11609
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
11610
|
-
|
|
11611
|
-
var validScale = function (scl) {
|
|
11612
|
-
if (lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(scl)) {
|
|
11613
|
-
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);
|
|
11614
|
-
} else if (typeof scl === "string") {
|
|
11615
|
-
return supportedScaleStrings.indexOf(scl) !== -1;
|
|
11616
|
-
}
|
|
11617
|
-
|
|
11618
|
-
return false;
|
|
11619
|
-
};
|
|
11620
|
-
|
|
11621
11653
|
var value = props[propName];
|
|
11622
11654
|
|
|
11623
|
-
if (!validScale(value)) {
|
|
11655
|
+
if (!_scale__WEBPACK_IMPORTED_MODULE_4__.validScale(value)) {
|
|
11624
11656
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a d3 scale."));
|
|
11625
11657
|
}
|
|
11626
11658
|
|
|
11627
|
-
return
|
|
11659
|
+
return null;
|
|
11628
11660
|
});
|
|
11629
11661
|
/**
|
|
11630
11662
|
* Check that an array contains items of the same type.
|
|
@@ -11638,7 +11670,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
11638
11670
|
}
|
|
11639
11671
|
|
|
11640
11672
|
if (values.length < 2) {
|
|
11641
|
-
return
|
|
11673
|
+
return null;
|
|
11642
11674
|
}
|
|
11643
11675
|
|
|
11644
11676
|
var comparisonConstructor = getConstructor(values[0]);
|
|
@@ -11653,7 +11685,7 @@ var homogeneousArray = makeChainable(function (props, propName, componentName) {
|
|
|
11653
11685
|
return new Error("Expected `".concat(propName, "` in `").concat(componentName, "` to be a ") + "homogeneous array, but found types `".concat(constructorName, "` and ") + "`".concat(otherConstructorName, "`."));
|
|
11654
11686
|
}
|
|
11655
11687
|
|
|
11656
|
-
return
|
|
11688
|
+
return null;
|
|
11657
11689
|
});
|
|
11658
11690
|
/**
|
|
11659
11691
|
* Check that array prop length matches props.data.length
|
|
@@ -11664,7 +11696,7 @@ var matchDataLength = makeChainable(function (props, propName) {
|
|
|
11664
11696
|
return new Error("Length of data and ".concat(propName, " arrays must match."));
|
|
11665
11697
|
}
|
|
11666
11698
|
|
|
11667
|
-
return
|
|
11699
|
+
return null;
|
|
11668
11700
|
});
|
|
11669
11701
|
/**
|
|
11670
11702
|
* Check that the value is a regular expression
|
|
@@ -11675,8 +11707,9 @@ var regExp = makeChainable(function (props, propName, componentName) {
|
|
|
11675
11707
|
return new Error("`".concat(propName, "` in `").concat(componentName, "` must be a regular expression."));
|
|
11676
11708
|
}
|
|
11677
11709
|
|
|
11678
|
-
return
|
|
11710
|
+
return null;
|
|
11679
11711
|
});
|
|
11712
|
+
//# sourceMappingURL=prop-types.js.map
|
|
11680
11713
|
|
|
11681
11714
|
/***/ }),
|
|
11682
11715
|
|
|
@@ -11694,7 +11727,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11694
11727
|
/* harmony export */ "getScaleFromName": () => (/* binding */ getScaleFromName),
|
|
11695
11728
|
/* harmony export */ "getScaleFromProps": () => (/* binding */ getScaleFromProps),
|
|
11696
11729
|
/* harmony export */ "getScaleType": () => (/* binding */ getScaleType),
|
|
11697
|
-
/* harmony export */ "getType": () => (/* binding */ getType)
|
|
11730
|
+
/* harmony export */ "getType": () => (/* binding */ getType),
|
|
11731
|
+
/* harmony export */ "validScale": () => (/* binding */ validScale)
|
|
11698
11732
|
/* harmony export */ });
|
|
11699
11733
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
|
|
11700
11734
|
/* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -11712,8 +11746,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11712
11746
|
|
|
11713
11747
|
|
|
11714
11748
|
|
|
11715
|
-
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
11749
|
+
var supportedScaleStrings = ["linear", "time", "log", "sqrt"];
|
|
11716
11750
|
|
|
11751
|
+
// Private Functions
|
|
11717
11752
|
function toNewName(scale) {
|
|
11718
11753
|
// d3 scale changed the naming scheme for scale from "linear" -> "scaleLinear" etc.
|
|
11719
11754
|
var capitalize = function (s) {
|
|
@@ -11783,7 +11818,13 @@ function getScaleTypeFromData(props, axis) {
|
|
|
11783
11818
|
|
|
11784
11819
|
|
|
11785
11820
|
function getScaleFromName(name) {
|
|
11786
|
-
|
|
11821
|
+
if (validScale(name)) {
|
|
11822
|
+
var methodName = toNewName(name); // @ts-expect-error scaleTime is not directly compatible with our D3Scale definition
|
|
11823
|
+
|
|
11824
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_5__[methodName]();
|
|
11825
|
+
}
|
|
11826
|
+
|
|
11827
|
+
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
11787
11828
|
}
|
|
11788
11829
|
function getBaseScale(props, axis) {
|
|
11789
11830
|
var scale = getScaleFromProps(props, axis);
|
|
@@ -11793,7 +11834,7 @@ function getBaseScale(props, axis) {
|
|
|
11793
11834
|
}
|
|
11794
11835
|
|
|
11795
11836
|
var defaultScale = getScaleFromDomain(props, axis) || getScaleTypeFromData(props, axis);
|
|
11796
|
-
return
|
|
11837
|
+
return getScaleFromName(defaultScale);
|
|
11797
11838
|
}
|
|
11798
11839
|
function getDefaultScale() {
|
|
11799
11840
|
return victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_6__["default"]();
|
|
@@ -11806,7 +11847,7 @@ function getScaleFromProps(props, axis) {
|
|
|
11806
11847
|
var scale = props.scale[axis] || props.scale;
|
|
11807
11848
|
|
|
11808
11849
|
if (validScale(scale)) {
|
|
11809
|
-
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale :
|
|
11850
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_1___default()(scale) ? scale : getScaleFromName(scale);
|
|
11810
11851
|
}
|
|
11811
11852
|
|
|
11812
11853
|
return undefined;
|
|
@@ -11841,6 +11882,7 @@ function getType(scale) {
|
|
|
11841
11882
|
})[0];
|
|
11842
11883
|
return scaleType ? scaleType.name : undefined;
|
|
11843
11884
|
}
|
|
11885
|
+
//# sourceMappingURL=scale.js.map
|
|
11844
11886
|
|
|
11845
11887
|
/***/ }),
|
|
11846
11888
|
|
|
@@ -11912,6 +11954,7 @@ function getColorScale(name) {
|
|
|
11912
11954
|
};
|
|
11913
11955
|
return name ? scales[name] : scales.grayscale;
|
|
11914
11956
|
}
|
|
11957
|
+
//# sourceMappingURL=style.js.map
|
|
11915
11958
|
|
|
11916
11959
|
/***/ }),
|
|
11917
11960
|
|
|
@@ -11942,6 +11985,7 @@ var TimerContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().cre
|
|
|
11942
11985
|
});
|
|
11943
11986
|
TimerContext.displayName = "TimerContext";
|
|
11944
11987
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TimerContext);
|
|
11988
|
+
//# sourceMappingURL=timer-context.js.map
|
|
11945
11989
|
|
|
11946
11990
|
/***/ }),
|
|
11947
11991
|
|
|
@@ -12044,6 +12088,7 @@ var Timer = /*#__PURE__*/function () {
|
|
|
12044
12088
|
}();
|
|
12045
12089
|
|
|
12046
12090
|
|
|
12091
|
+
//# sourceMappingURL=timer.js.map
|
|
12047
12092
|
|
|
12048
12093
|
/***/ }),
|
|
12049
12094
|
|
|
@@ -12134,7 +12179,7 @@ function getChildData(child) {
|
|
|
12134
12179
|
}
|
|
12135
12180
|
/**
|
|
12136
12181
|
* If a parent component has animation enabled, calculate the transitions
|
|
12137
|
-
* for any data of any child component that supports data transitions
|
|
12182
|
+
* for any data of any child component that supports data transitions.
|
|
12138
12183
|
* Data transitions are defined as any two datasets where data nodes exist
|
|
12139
12184
|
* in the first set and not the second, in the second and not the first,
|
|
12140
12185
|
* or both.
|
|
@@ -12263,7 +12308,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
12263
12308
|
|
|
12264
12309
|
if (exitingNodes) {
|
|
12265
12310
|
// After the exit transition occurs, trigger the animations for
|
|
12266
|
-
// nodes that are neither exiting
|
|
12311
|
+
// nodes that are neither exiting nor entering.
|
|
12267
12312
|
animate.onEnd = cb;
|
|
12268
12313
|
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.
|
|
12269
12314
|
|
|
@@ -12333,7 +12378,7 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
12333
12378
|
* and its index in the parent's children array.
|
|
12334
12379
|
*
|
|
12335
12380
|
* In particular, this will include an `animate` object that is set appropriately
|
|
12336
|
-
* so that each child will be
|
|
12381
|
+
* so that each child will be synchronized for each stage of a transition
|
|
12337
12382
|
* animation. It will also include a transformed `data` object, where each datum
|
|
12338
12383
|
* is transformed by `animate.onExit` and `animate.onEnter` `before` and `after`
|
|
12339
12384
|
* functions.
|
|
@@ -12478,6 +12523,7 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
12478
12523
|
};
|
|
12479
12524
|
};
|
|
12480
12525
|
}
|
|
12526
|
+
//# sourceMappingURL=transitions.js.map
|
|
12481
12527
|
|
|
12482
12528
|
/***/ }),
|
|
12483
12529
|
|
|
@@ -12516,7 +12562,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12516
12562
|
|
|
12517
12563
|
/*
|
|
12518
12564
|
USER_PROPS_SAFELIST is to contain any string deemed safe for user props.
|
|
12519
|
-
The startsWidth array will contain the start of any accepted user-prop that
|
|
12565
|
+
The startsWidth array will contain the start of any accepted user-prop that
|
|
12520
12566
|
starts with these characters.
|
|
12521
12567
|
The exactMatch will contain a list of exact prop names that are accepted.
|
|
12522
12568
|
*/
|
|
@@ -12525,6 +12571,7 @@ var USER_PROPS_SAFELIST = {
|
|
|
12525
12571
|
startsWith: ["data-", "aria-"],
|
|
12526
12572
|
exactMatch: []
|
|
12527
12573
|
};
|
|
12574
|
+
|
|
12528
12575
|
/**
|
|
12529
12576
|
* doesPropStartWith: Function that takes a prop's key and runs it against all
|
|
12530
12577
|
* options in the USER_PROPS_SAFELIST and checks to see if it starts with any
|
|
@@ -12533,7 +12580,6 @@ var USER_PROPS_SAFELIST = {
|
|
|
12533
12580
|
* @returns {Boolean}: returns true if the key starts with an option or false if
|
|
12534
12581
|
* otherwise
|
|
12535
12582
|
*/
|
|
12536
|
-
|
|
12537
12583
|
var doesPropStartWith = function (key) {
|
|
12538
12584
|
var startsWith = false;
|
|
12539
12585
|
USER_PROPS_SAFELIST.startsWith.forEach(function (starterString) {
|
|
@@ -12610,14 +12656,15 @@ var getSafeUserProps = function (props) {
|
|
|
12610
12656
|
/**
|
|
12611
12657
|
* Wraps a component and adds safe user props
|
|
12612
12658
|
*
|
|
12613
|
-
* @param {
|
|
12659
|
+
* @param {ReactElement} component: parent component
|
|
12614
12660
|
* @param {Object} props: props to be filtered
|
|
12615
|
-
* @returns {
|
|
12661
|
+
* @returns {ReactElement} modified component
|
|
12616
12662
|
*/
|
|
12617
12663
|
|
|
12618
12664
|
var withSafeUserProps = function (component, props) {
|
|
12619
12665
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(component, getSafeUserProps(props));
|
|
12620
12666
|
};
|
|
12667
|
+
//# sourceMappingURL=user-props.js.map
|
|
12621
12668
|
|
|
12622
12669
|
/***/ }),
|
|
12623
12670
|
|
|
@@ -12830,7 +12877,7 @@ function getData(props, childComponents) {
|
|
|
12830
12877
|
}
|
|
12831
12878
|
|
|
12832
12879
|
childComponents = childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
|
|
12833
|
-
return getDataFromChildren(childComponents);
|
|
12880
|
+
return getDataFromChildren(props, childComponents);
|
|
12834
12881
|
}
|
|
12835
12882
|
function getWidth(props, groupLength, seriesLength) {
|
|
12836
12883
|
var datasets = props.datasets,
|
|
@@ -12892,7 +12939,7 @@ function getDefaultDomainPadding(props, axis, childComponents) {
|
|
|
12892
12939
|
function getDomainFromChildren(props, axis, childComponents) {
|
|
12893
12940
|
// eslint-disable-line max-statements, complexity, max-len
|
|
12894
12941
|
var children = childComponents ? childComponents.slice(0) : react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
|
|
12895
|
-
var parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_12__.getData(props
|
|
12942
|
+
var parentData = props.data ? _data__WEBPACK_IMPORTED_MODULE_12__.getData(props) : undefined;
|
|
12896
12943
|
var polar = props.polar,
|
|
12897
12944
|
startAngle = props.startAngle,
|
|
12898
12945
|
endAngle = props.endAngle,
|
|
@@ -13126,6 +13173,7 @@ function getCategories(props, childComponents, allStrings) {
|
|
|
13126
13173
|
y: yCategories.length > 0 ? yCategories : undefined
|
|
13127
13174
|
};
|
|
13128
13175
|
}
|
|
13176
|
+
//# sourceMappingURL=wrapper.js.map
|
|
13129
13177
|
|
|
13130
13178
|
/***/ }),
|
|
13131
13179
|
|
|
@@ -13531,6 +13579,7 @@ VictorySharedEvents.defaultProps = {
|
|
|
13531
13579
|
};
|
|
13532
13580
|
VictorySharedEvents.contextType = victory_core__WEBPACK_IMPORTED_MODULE_14__["default"];
|
|
13533
13581
|
|
|
13582
|
+
//# sourceMappingURL=victory-shared-events.js.map
|
|
13534
13583
|
|
|
13535
13584
|
/***/ }),
|
|
13536
13585
|
|