victory-bar 36.8.1 → 36.8.2
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/CHANGELOG.md +6 -0
- package/dist/victory-bar.js +84 -279
- package/dist/victory-bar.min.js +1 -1
- package/es/bar-helper-methods.d.ts +7 -0
- package/es/bar-helper-methods.js +7 -3
- package/es/bar.d.ts +20 -0
- package/es/bar.js +8 -27
- package/es/geometry-helper-methods.d.ts +91 -0
- package/es/geometry-helper-methods.js +4 -13
- package/es/helper-methods.d.ts +8 -0
- package/es/index.d.ts +6 -73
- package/es/index.js +2 -2
- package/es/path-helper-methods.d.ts +7 -0
- package/es/path-helper-methods.js +2 -2
- package/es/victory-bar.d.ts +129 -0
- package/es/victory-bar.js +24 -42
- package/lib/bar-helper-methods.d.ts +7 -0
- package/lib/bar-helper-methods.js +8 -3
- package/lib/bar.d.ts +20 -0
- package/lib/bar.js +7 -27
- package/lib/geometry-helper-methods.d.ts +91 -0
- package/lib/geometry-helper-methods.js +3 -10
- package/lib/helper-methods.d.ts +8 -0
- package/lib/index.d.ts +6 -73
- package/lib/index.js +39 -17
- package/lib/path-helper-methods.d.ts +7 -0
- package/lib/path-helper-methods.js +2 -2
- package/lib/victory-bar.d.ts +129 -0
- package/lib/victory-bar.js +26 -47
- package/package.json +3 -3
- package/src/{bar-helper-methods.js → bar-helper-methods.ts} +36 -11
- package/src/{bar.js → bar.tsx} +39 -35
- package/src/geometry-helper-methods.ts +103 -0
- package/src/{helper-methods.js → helper-methods.ts} +2 -2
- package/src/{index.js → index.ts} +2 -2
- package/src/{path-helper-methods.js → path-helper-methods.ts} +11 -8
- package/src/{victory-bar.js → victory-bar.tsx} +57 -32
- package/src/geometry-helper-methods.js +0 -113
- package/src/index.d.ts +0 -73
package/CHANGELOG.md
CHANGED
package/dist/victory-bar.js
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
12
|
/******/ var __webpack_modules__ = ({
|
|
13
13
|
|
|
14
|
-
/***/ "./bar-helper-methods.
|
|
14
|
+
/***/ "./bar-helper-methods.ts":
|
|
15
15
|
/*!*******************************!*\
|
|
16
|
-
!*** ./bar-helper-methods.
|
|
16
|
+
!*** ./bar-helper-methods.ts ***!
|
|
17
17
|
\*******************************/
|
|
18
18
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
19
19
|
|
|
@@ -35,10 +35,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
var DEFAULT_BAR_WIDTH = 8;
|
|
38
39
|
var getBarWidth = function (barWidth, props) {
|
|
39
40
|
var scale = props.scale,
|
|
40
41
|
data = props.data,
|
|
41
|
-
defaultBarWidth = props.defaultBarWidth,
|
|
42
42
|
style = props.style;
|
|
43
43
|
|
|
44
44
|
if (barWidth) {
|
|
@@ -51,7 +51,7 @@ var getBarWidth = function (barWidth, props) {
|
|
|
51
51
|
var extent = Math.abs(range[1] - range[0]);
|
|
52
52
|
var bars = data.length + 2;
|
|
53
53
|
var barRatio = props.barRatio || 0.5;
|
|
54
|
-
var defaultWidth = barRatio * (data.length < 2 ?
|
|
54
|
+
var defaultWidth = barRatio * (data.length < 2 ? DEFAULT_BAR_WIDTH : extent / bars);
|
|
55
55
|
return Math.max(1, defaultWidth);
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -78,6 +78,10 @@ var getCornerRadiusFromObject = function (cornerRadius, props) {
|
|
|
78
78
|
return realCornerRadius;
|
|
79
79
|
};
|
|
80
80
|
|
|
81
|
+
function isCornerRadiusObject(cornerRadius) {
|
|
82
|
+
return lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(cornerRadius);
|
|
83
|
+
}
|
|
84
|
+
|
|
81
85
|
var getCornerRadius = function (cornerRadius, props) {
|
|
82
86
|
var realCornerRadius = {
|
|
83
87
|
topLeft: 0,
|
|
@@ -90,7 +94,7 @@ var getCornerRadius = function (cornerRadius, props) {
|
|
|
90
94
|
return realCornerRadius;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
|
-
if (
|
|
97
|
+
if (isCornerRadiusObject(cornerRadius)) {
|
|
94
98
|
return getCornerRadiusFromObject(cornerRadius, props);
|
|
95
99
|
}
|
|
96
100
|
|
|
@@ -116,28 +120,25 @@ var getStyle = function () {
|
|
|
116
120
|
|
|
117
121
|
/***/ }),
|
|
118
122
|
|
|
119
|
-
/***/ "./bar.
|
|
120
|
-
|
|
121
|
-
!*** ./bar.
|
|
122
|
-
|
|
123
|
+
/***/ "./bar.tsx":
|
|
124
|
+
/*!*****************!*\
|
|
125
|
+
!*** ./bar.tsx ***!
|
|
126
|
+
\*****************/
|
|
123
127
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
124
128
|
|
|
125
129
|
"use strict";
|
|
126
130
|
__webpack_require__.r(__webpack_exports__);
|
|
127
131
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
128
|
-
/* harmony export */ "
|
|
132
|
+
/* harmony export */ "Bar": () => (/* binding */ Bar)
|
|
129
133
|
/* harmony export */ });
|
|
130
134
|
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/assign.js");
|
|
131
135
|
/* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_0__);
|
|
132
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
|
|
133
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);
|
|
134
136
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
|
|
135
137
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
|
136
138
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
137
139
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
|
|
138
|
-
/* harmony import */ var
|
|
139
|
-
/* harmony import */ var
|
|
140
|
-
/* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-helper-methods */ "./path-helper-methods.js");
|
|
140
|
+
/* harmony import */ var _bar_helper_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bar-helper-methods */ "./bar-helper-methods.ts");
|
|
141
|
+
/* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-helper-methods */ "./path-helper-methods.ts");
|
|
141
142
|
|
|
142
143
|
|
|
143
144
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -151,7 +152,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
151
152
|
|
|
152
153
|
|
|
153
154
|
|
|
154
|
-
|
|
155
155
|
var evaluateProps = function (props) {
|
|
156
156
|
/**
|
|
157
157
|
* Potential evaluated props of following must be evaluated in this order:
|
|
@@ -189,7 +189,6 @@ var evaluateProps = function (props) {
|
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
var defaultProps = {
|
|
192
|
-
defaultBarWidth: 8,
|
|
193
192
|
pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Path, null),
|
|
194
193
|
role: "presentation",
|
|
195
194
|
shapeRendering: "auto"
|
|
@@ -205,6 +204,11 @@ var Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(functio
|
|
|
205
204
|
cornerRadius = _props.cornerRadius;
|
|
206
205
|
var path = polar ? (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getPolarBarPath)(props, cornerRadius) : (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getBarPath)(props, barWidth, cornerRadius);
|
|
207
206
|
var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;
|
|
207
|
+
|
|
208
|
+
if (!props.pathComponent) {
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
|
|
208
212
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
|
|
209
213
|
"aria-label": props.ariaLabel,
|
|
210
214
|
style: style,
|
|
@@ -220,34 +224,12 @@ var Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(functio
|
|
|
220
224
|
ref: ref
|
|
221
225
|
}));
|
|
222
226
|
});
|
|
223
|
-
Bar.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.CommonProps.primitiveProps), {}, {
|
|
224
|
-
alignment: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOf(["start", "middle", "end"]),
|
|
225
|
-
barRatio: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
|
|
226
|
-
barWidth: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
227
|
-
cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func), prop_types__WEBPACK_IMPORTED_MODULE_7___default().shape({
|
|
228
|
-
top: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
229
|
-
topLeft: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
230
|
-
topRight: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
231
|
-
bottom: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
232
|
-
bottomLeft: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)]),
|
|
233
|
-
bottomRight: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_7___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func)])
|
|
234
|
-
})]),
|
|
235
|
-
datum: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object),
|
|
236
|
-
getPath: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func),
|
|
237
|
-
horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool),
|
|
238
|
-
pathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().element),
|
|
239
|
-
width: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
|
|
240
|
-
x: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
|
|
241
|
-
y: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
|
|
242
|
-
y0: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number)
|
|
243
|
-
});
|
|
244
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Bar);
|
|
245
227
|
|
|
246
228
|
/***/ }),
|
|
247
229
|
|
|
248
|
-
/***/ "./geometry-helper-methods.
|
|
230
|
+
/***/ "./geometry-helper-methods.ts":
|
|
249
231
|
/*!************************************!*\
|
|
250
|
-
!*** ./geometry-helper-methods.
|
|
232
|
+
!*** ./geometry-helper-methods.ts ***!
|
|
251
233
|
\************************************/
|
|
252
234
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
253
235
|
|
|
@@ -259,9 +241,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
259
241
|
/* harmony export */ });
|
|
260
242
|
/**
|
|
261
243
|
* A point in the 2d plane
|
|
262
|
-
* @param {number} x - x coordinate
|
|
263
|
-
* @param {number} y - y coordinate
|
|
264
|
-
* @returns {object} - point object
|
|
265
244
|
*/
|
|
266
245
|
var point = function (x, y) {
|
|
267
246
|
return {
|
|
@@ -295,14 +274,10 @@ var point = function (x, y) {
|
|
|
295
274
|
}
|
|
296
275
|
};
|
|
297
276
|
};
|
|
277
|
+
|
|
298
278
|
/**
|
|
299
279
|
* A circle in the 2d plane
|
|
300
|
-
* @param {point} center - center of circle
|
|
301
|
-
* @param {number} radius - radius of circle
|
|
302
|
-
* @returns {object} - point object
|
|
303
280
|
*/
|
|
304
|
-
|
|
305
|
-
|
|
306
281
|
var circle = function (center, radius) {
|
|
307
282
|
return {
|
|
308
283
|
center: center,
|
|
@@ -373,13 +348,11 @@ var circle = function (center, radius) {
|
|
|
373
348
|
};
|
|
374
349
|
};
|
|
375
350
|
|
|
376
|
-
|
|
377
|
-
|
|
378
351
|
/***/ }),
|
|
379
352
|
|
|
380
|
-
/***/ "./helper-methods.
|
|
353
|
+
/***/ "./helper-methods.ts":
|
|
381
354
|
/*!***************************!*\
|
|
382
|
-
!*** ./helper-methods.
|
|
355
|
+
!*** ./helper-methods.ts ***!
|
|
383
356
|
\***************************/
|
|
384
357
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
385
358
|
|
|
@@ -545,9 +518,9 @@ var getBaseProps = function (props, fallbackProps) {
|
|
|
545
518
|
|
|
546
519
|
/***/ }),
|
|
547
520
|
|
|
548
|
-
/***/ "./path-helper-methods.
|
|
521
|
+
/***/ "./path-helper-methods.ts":
|
|
549
522
|
/*!********************************!*\
|
|
550
|
-
!*** ./path-helper-methods.
|
|
523
|
+
!*** ./path-helper-methods.ts ***!
|
|
551
524
|
\********************************/
|
|
552
525
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
553
526
|
|
|
@@ -562,7 +535,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
562
535
|
/* harmony export */ "getVerticalPolarBarPath": () => (/* binding */ getVerticalPolarBarPath)
|
|
563
536
|
/* harmony export */ });
|
|
564
537
|
/* harmony import */ var victory_vendor_d3_shape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! victory-vendor/d3-shape */ "../../victory-vendor/es/d3-shape.js");
|
|
565
|
-
/* harmony import */ var _geometry_helper_methods__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./geometry-helper-methods */ "./geometry-helper-methods.
|
|
538
|
+
/* harmony import */ var _geometry_helper_methods__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./geometry-helper-methods */ "./geometry-helper-methods.ts");
|
|
566
539
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
567
540
|
|
|
568
541
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -915,11 +888,11 @@ var getVerticalPolarBarPath = function (props, cornerRadius) {
|
|
|
915
888
|
|
|
916
889
|
var getPathData = function (edge) {
|
|
917
890
|
var rightPath = getPath("".concat(edge, "Right"));
|
|
918
|
-
var rightMoves = rightPath.match(/[A-Z]/g);
|
|
891
|
+
var rightMoves = rightPath.match(/[A-Z]/g) || [];
|
|
919
892
|
var rightCoords = rightPath.split(/[A-Z]/).slice(1);
|
|
920
893
|
var rightMiddle = rightMoves.indexOf("L");
|
|
921
894
|
var leftPath = getPath("".concat(edge, "Left"));
|
|
922
|
-
var leftMoves = leftPath.match(/[A-Z]/g);
|
|
895
|
+
var leftMoves = leftPath.match(/[A-Z]/g) || [];
|
|
923
896
|
var leftCoords = leftPath.split(/[A-Z]/).slice(1);
|
|
924
897
|
var leftMiddle = leftMoves.indexOf("L");
|
|
925
898
|
return {
|
|
@@ -1052,38 +1025,29 @@ var getPolarBarPath = function (props, cornerRadius) {
|
|
|
1052
1025
|
|
|
1053
1026
|
/***/ }),
|
|
1054
1027
|
|
|
1055
|
-
/***/ "./victory-bar.
|
|
1056
|
-
|
|
1057
|
-
!*** ./victory-bar.
|
|
1058
|
-
|
|
1028
|
+
/***/ "./victory-bar.tsx":
|
|
1029
|
+
/*!*************************!*\
|
|
1030
|
+
!*** ./victory-bar.tsx ***!
|
|
1031
|
+
\*************************/
|
|
1059
1032
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1060
1033
|
|
|
1061
1034
|
"use strict";
|
|
1062
1035
|
__webpack_require__.r(__webpack_exports__);
|
|
1063
1036
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1064
|
-
/* harmony export */ "
|
|
1037
|
+
/* harmony export */ "VictoryBar": () => (/* binding */ VictoryBar)
|
|
1065
1038
|
/* harmony export */ });
|
|
1066
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
|
|
1067
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
|
|
1068
1039
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
1069
1040
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
1070
|
-
/* harmony import */ var
|
|
1071
|
-
/* harmony import */ var
|
|
1041
|
+
/* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.ts");
|
|
1042
|
+
/* harmony import */ var _bar__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bar */ "./bar.tsx");
|
|
1072
1043
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
|
|
1073
1044
|
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
|
|
1074
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
1075
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-
|
|
1076
|
-
/* harmony import */ var
|
|
1077
|
-
/* harmony import */ var
|
|
1078
|
-
/* harmony import */ var
|
|
1079
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/
|
|
1080
|
-
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
|
|
1081
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1082
|
-
|
|
1083
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1084
|
-
|
|
1085
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1086
|
-
|
|
1045
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
|
|
1046
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
|
|
1047
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
|
|
1048
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/domain.js");
|
|
1049
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/data.js");
|
|
1050
|
+
/* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
|
|
1087
1051
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1088
1052
|
|
|
1089
1053
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -1108,7 +1072,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
|
|
|
1108
1072
|
|
|
1109
1073
|
|
|
1110
1074
|
|
|
1111
|
-
|
|
1112
1075
|
var fallbackProps = {
|
|
1113
1076
|
width: 450,
|
|
1114
1077
|
height: 300,
|
|
@@ -1126,20 +1089,24 @@ var defaultData = [{
|
|
|
1126
1089
|
}, {
|
|
1127
1090
|
x: 4,
|
|
1128
1091
|
y: 4
|
|
1129
|
-
}];
|
|
1092
|
+
}]; // eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
1130
1093
|
|
|
1131
|
-
|
|
1132
|
-
|
|
1094
|
+
/**
|
|
1095
|
+
* Draw SVG bar charts with React. VictoryBar is a composable component, so it doesn"t include axes
|
|
1096
|
+
* Check out VictoryChart for complete bar charts and more.
|
|
1097
|
+
*/
|
|
1098
|
+
var VictoryBarBase = /*#__PURE__*/function (_React$Component) {
|
|
1099
|
+
_inherits(VictoryBarBase, _React$Component);
|
|
1133
1100
|
|
|
1134
|
-
var _super = _createSuper(
|
|
1101
|
+
var _super = _createSuper(VictoryBarBase);
|
|
1135
1102
|
|
|
1136
|
-
function
|
|
1137
|
-
_classCallCheck(this,
|
|
1103
|
+
function VictoryBarBase() {
|
|
1104
|
+
_classCallCheck(this, VictoryBarBase);
|
|
1138
1105
|
|
|
1139
1106
|
return _super.apply(this, arguments);
|
|
1140
1107
|
}
|
|
1141
1108
|
|
|
1142
|
-
_createClass(
|
|
1109
|
+
_createClass(VictoryBarBase, [{
|
|
1143
1110
|
key: "shouldAnimate",
|
|
1144
1111
|
value: // Overridden in native versions
|
|
1145
1112
|
function shouldAnimate() {
|
|
@@ -1162,13 +1129,13 @@ var VictoryBar = /*#__PURE__*/function (_React$Component) {
|
|
|
1162
1129
|
}
|
|
1163
1130
|
}]);
|
|
1164
1131
|
|
|
1165
|
-
return
|
|
1132
|
+
return VictoryBarBase;
|
|
1166
1133
|
}((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
|
|
1167
1134
|
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1135
|
+
VictoryBarBase.animationWhitelist = ["data", "domain", "height", "padding", "style", "width"];
|
|
1136
|
+
VictoryBarBase.displayName = "VictoryBar";
|
|
1137
|
+
VictoryBarBase.role = "bar";
|
|
1138
|
+
VictoryBarBase.defaultTransitions = {
|
|
1172
1139
|
onLoad: {
|
|
1173
1140
|
duration: 2000,
|
|
1174
1141
|
before: function () {
|
|
@@ -1213,43 +1180,28 @@ VictoryBar.defaultTransitions = {
|
|
|
1213
1180
|
}
|
|
1214
1181
|
}
|
|
1215
1182
|
};
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
barRatio: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
|
|
1219
|
-
barWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
|
|
1220
|
-
cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func), prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
|
|
1221
|
-
top: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
|
|
1222
|
-
topLeft: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
|
|
1223
|
-
topRight: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
|
|
1224
|
-
bottom: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
|
|
1225
|
-
bottomLeft: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
|
|
1226
|
-
bottomRight: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)])
|
|
1227
|
-
})]),
|
|
1228
|
-
getPath: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func),
|
|
1229
|
-
horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool)
|
|
1230
|
-
});
|
|
1231
|
-
VictoryBar.defaultProps = {
|
|
1232
|
-
containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryContainer, null),
|
|
1183
|
+
VictoryBarBase.defaultProps = {
|
|
1184
|
+
containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_3__.VictoryContainer, null),
|
|
1233
1185
|
data: defaultData,
|
|
1234
|
-
dataComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1186
|
+
dataComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_bar__WEBPACK_IMPORTED_MODULE_4__.Bar, null),
|
|
1235
1187
|
groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
|
|
1236
1188
|
role: "presentation"
|
|
1237
1189
|
}),
|
|
1238
|
-
labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
1190
|
+
labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryLabel, null),
|
|
1239
1191
|
samples: 50,
|
|
1240
1192
|
sortOrder: "ascending",
|
|
1241
1193
|
standalone: true,
|
|
1242
|
-
theme:
|
|
1194
|
+
theme: victory_core__WEBPACK_IMPORTED_MODULE_6__.VictoryTheme.grayscale
|
|
1243
1195
|
};
|
|
1244
|
-
|
|
1245
|
-
|
|
1196
|
+
VictoryBarBase.getDomain = victory_core__WEBPACK_IMPORTED_MODULE_7__.getDomainWithZero;
|
|
1197
|
+
VictoryBarBase.getData = victory_core__WEBPACK_IMPORTED_MODULE_8__.getData;
|
|
1246
1198
|
|
|
1247
|
-
|
|
1248
|
-
return (0,
|
|
1199
|
+
VictoryBarBase.getBaseProps = function (props) {
|
|
1200
|
+
return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_9__.getBaseProps)(props, fallbackProps);
|
|
1249
1201
|
};
|
|
1250
1202
|
|
|
1251
|
-
|
|
1252
|
-
|
|
1203
|
+
VictoryBarBase.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
|
|
1204
|
+
var VictoryBar = (0,victory_core__WEBPACK_IMPORTED_MODULE_10__.addEvents)(VictoryBarBase);
|
|
1253
1205
|
|
|
1254
1206
|
/***/ }),
|
|
1255
1207
|
|
|
@@ -9172,7 +9124,7 @@ var getCalculatedProps = function (props) {
|
|
|
9172
9124
|
verticalAnchor: verticalAnchor,
|
|
9173
9125
|
dx: dx,
|
|
9174
9126
|
dy: dy,
|
|
9175
|
-
originalDy: props.dy,
|
|
9127
|
+
originalDy: _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.dy, props),
|
|
9176
9128
|
transform: transform,
|
|
9177
9129
|
x: x,
|
|
9178
9130
|
y: y
|
|
@@ -11048,13 +11000,15 @@ function addEvents(WrappedComponent) {
|
|
|
11048
11000
|
return undefined;
|
|
11049
11001
|
}
|
|
11050
11002
|
|
|
11003
|
+
var currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
|
|
11004
|
+
|
|
11051
11005
|
if (this.hasEvents) {
|
|
11052
11006
|
var baseEvents = this.getEvents(this.props, type, key);
|
|
11053
11007
|
|
|
11054
11008
|
var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
11055
11009
|
index: index,
|
|
11056
11010
|
key: id
|
|
11057
|
-
}, this.getEventState(key, type), this.getSharedEventState(key, type),
|
|
11011
|
+
}, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
|
|
11058
11012
|
id: id
|
|
11059
11013
|
});
|
|
11060
11014
|
|
|
@@ -11068,7 +11022,7 @@ function addEvents(WrappedComponent) {
|
|
|
11068
11022
|
return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
|
|
11069
11023
|
index: index,
|
|
11070
11024
|
key: id
|
|
11071
|
-
},
|
|
11025
|
+
}, currentProps, baseProps, {
|
|
11072
11026
|
id: id
|
|
11073
11027
|
});
|
|
11074
11028
|
}
|
|
@@ -11245,155 +11199,6 @@ function getMinValue(arr) {
|
|
|
11245
11199
|
|
|
11246
11200
|
/***/ }),
|
|
11247
11201
|
|
|
11248
|
-
/***/ "../../victory-core/es/victory-util/common-props.js":
|
|
11249
|
-
/*!**********************************************************!*\
|
|
11250
|
-
!*** ../../victory-core/es/victory-util/common-props.js ***!
|
|
11251
|
-
\**********************************************************/
|
|
11252
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
11253
|
-
|
|
11254
|
-
"use strict";
|
|
11255
|
-
__webpack_require__.r(__webpack_exports__);
|
|
11256
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11257
|
-
/* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
|
|
11258
|
-
/* harmony export */ });
|
|
11259
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
|
|
11260
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
11261
|
-
/* harmony import */ var _prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prop-types */ "../../victory-core/es/victory-util/prop-types.js");
|
|
11262
|
-
|
|
11263
|
-
|
|
11264
|
-
var dataProps = {
|
|
11265
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11266
|
-
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({
|
|
11267
|
-
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
|
|
11268
|
-
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
|
|
11269
|
-
})]),
|
|
11270
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11271
|
-
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)]),
|
|
11272
|
-
dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
11273
|
-
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
11274
|
-
labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
11275
|
-
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)]),
|
|
11276
|
-
samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
11277
|
-
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))]),
|
|
11278
|
-
sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
|
|
11279
|
-
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11280
|
-
parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
11281
|
-
data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
11282
|
-
labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
11283
|
-
}),
|
|
11284
|
-
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))]),
|
|
11285
|
-
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))]),
|
|
11286
|
-
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))])
|
|
11287
|
-
};
|
|
11288
|
-
var baseProps = {
|
|
11289
|
-
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)]),
|
|
11290
|
-
containerComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
11291
|
-
domain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11292
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
|
|
11293
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
|
|
11294
|
-
})]),
|
|
11295
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11296
|
-
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({
|
|
11297
|
-
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)]),
|
|
11298
|
-
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)])
|
|
11299
|
-
})]),
|
|
11300
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11301
|
-
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({
|
|
11302
|
-
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)]),
|
|
11303
|
-
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)])
|
|
11304
|
-
})]),
|
|
11305
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11306
|
-
domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11307
|
-
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))]),
|
|
11308
|
-
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))])
|
|
11309
|
-
}), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))]),
|
|
11310
|
-
eventKey: 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)]),
|
|
11311
|
-
events: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11312
|
-
target: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["data", "labels", "parent"]),
|
|
11313
|
-
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)]),
|
|
11314
|
-
eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
|
|
11315
|
-
})),
|
|
11316
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11317
|
-
externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11318
|
-
callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
11319
|
-
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)]),
|
|
11320
|
-
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)]),
|
|
11321
|
-
mutation: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
|
|
11322
|
-
target: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array)])
|
|
11323
|
-
})),
|
|
11324
|
-
groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
|
|
11325
|
-
height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
|
|
11326
|
-
name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
11327
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11328
|
-
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11329
|
-
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
11330
|
-
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
11331
|
-
}),
|
|
11332
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11333
|
-
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({
|
|
11334
|
-
top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
11335
|
-
bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
11336
|
-
left: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
11337
|
-
right: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
11338
|
-
})]),
|
|
11339
|
-
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
11340
|
-
range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11341
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
|
|
11342
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
|
|
11343
|
-
})]),
|
|
11344
|
-
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11345
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
|
|
11346
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
|
|
11347
|
-
})]),
|
|
11348
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11349
|
-
sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11350
|
-
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
|
|
11351
|
-
getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
|
|
11352
|
-
}),
|
|
11353
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11354
|
-
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({
|
|
11355
|
-
x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
|
|
11356
|
-
y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
|
|
11357
|
-
})]),
|
|
11358
|
-
standalone: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
11359
|
-
theme: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
11360
|
-
width: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative
|
|
11361
|
-
};
|
|
11362
|
-
var primitiveProps = {
|
|
11363
|
-
active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
11364
|
-
ariaLabel: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
|
|
11365
|
-
className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
11366
|
-
clipPath: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
11367
|
-
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)]),
|
|
11368
|
-
desc: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)]),
|
|
11369
|
-
disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
11370
|
-
events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
11371
|
-
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)]),
|
|
11372
|
-
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)]),
|
|
11373
|
-
// @ts-expect-error TODO: synchronize the type with this PropTypes
|
|
11374
|
-
origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11375
|
-
x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
|
|
11376
|
-
y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
|
|
11377
|
-
}),
|
|
11378
|
-
polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
|
|
11379
|
-
role: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
11380
|
-
scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
|
|
11381
|
-
x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
|
|
11382
|
-
y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
|
|
11383
|
-
})]),
|
|
11384
|
-
shapeRendering: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
|
|
11385
|
-
style: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
|
|
11386
|
-
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)]),
|
|
11387
|
-
transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
|
|
11388
|
-
};
|
|
11389
|
-
var CommonProps = {
|
|
11390
|
-
dataProps: dataProps,
|
|
11391
|
-
baseProps: baseProps,
|
|
11392
|
-
primitiveProps: primitiveProps
|
|
11393
|
-
};
|
|
11394
|
-
|
|
11395
|
-
/***/ }),
|
|
11396
|
-
|
|
11397
11202
|
/***/ "../../victory-core/es/victory-util/data.js":
|
|
11398
11203
|
/*!**************************************************!*\
|
|
11399
11204
|
!*** ../../victory-core/es/victory-util/data.js ***!
|
|
@@ -25922,12 +25727,12 @@ var __webpack_exports__ = {};
|
|
|
25922
25727
|
(() => {
|
|
25923
25728
|
"use strict";
|
|
25924
25729
|
/*!******************!*\
|
|
25925
|
-
!*** ./index.
|
|
25730
|
+
!*** ./index.ts ***!
|
|
25926
25731
|
\******************/
|
|
25927
25732
|
__webpack_require__.r(__webpack_exports__);
|
|
25928
25733
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25929
|
-
/* harmony export */ "Bar": () => (/* reexport safe */ _bar__WEBPACK_IMPORTED_MODULE_1__
|
|
25930
|
-
/* harmony export */ "VictoryBar": () => (/* reexport safe */ _victory_bar__WEBPACK_IMPORTED_MODULE_0__
|
|
25734
|
+
/* harmony export */ "Bar": () => (/* reexport safe */ _bar__WEBPACK_IMPORTED_MODULE_1__.Bar),
|
|
25735
|
+
/* harmony export */ "VictoryBar": () => (/* reexport safe */ _victory_bar__WEBPACK_IMPORTED_MODULE_0__.VictoryBar),
|
|
25931
25736
|
/* harmony export */ "getBarPath": () => (/* reexport safe */ _path_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getBarPath),
|
|
25932
25737
|
/* harmony export */ "getBarPosition": () => (/* reexport safe */ _helper_methods__WEBPACK_IMPORTED_MODULE_2__.getBarPosition),
|
|
25933
25738
|
/* harmony export */ "getBarWidth": () => (/* reexport safe */ _bar_helper_methods__WEBPACK_IMPORTED_MODULE_4__.getBarWidth),
|
|
@@ -25939,11 +25744,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
25939
25744
|
/* harmony export */ "getVerticalBarPath": () => (/* reexport safe */ _path_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getVerticalBarPath),
|
|
25940
25745
|
/* harmony export */ "getVerticalPolarBarPath": () => (/* reexport safe */ _path_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getVerticalPolarBarPath)
|
|
25941
25746
|
/* harmony export */ });
|
|
25942
|
-
/* harmony import */ var _victory_bar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-bar */ "./victory-bar.
|
|
25943
|
-
/* harmony import */ var _bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bar */ "./bar.
|
|
25944
|
-
/* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.
|
|
25945
|
-
/* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path-helper-methods */ "./path-helper-methods.
|
|
25946
|
-
/* harmony import */ var _bar_helper_methods__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bar-helper-methods */ "./bar-helper-methods.
|
|
25747
|
+
/* harmony import */ var _victory_bar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-bar */ "./victory-bar.tsx");
|
|
25748
|
+
/* harmony import */ var _bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bar */ "./bar.tsx");
|
|
25749
|
+
/* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.ts");
|
|
25750
|
+
/* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path-helper-methods */ "./path-helper-methods.ts");
|
|
25751
|
+
/* harmony import */ var _bar_helper_methods__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bar-helper-methods */ "./bar-helper-methods.ts");
|
|
25947
25752
|
|
|
25948
25753
|
|
|
25949
25754
|
|