victory-histogram 36.8.1 → 36.8.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.
@@ -11,9 +11,9 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ "./helper-methods.js":
14
+ /***/ "./helper-methods.ts":
15
15
  /*!***************************!*\
16
- !*** ./helper-methods.js ***!
16
+ !*** ./helper-methods.ts ***!
17
17
  \***************************/
18
18
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
19
19
 
@@ -92,9 +92,9 @@ var dataOrBinsContainDates = function (_ref) {
92
92
  bins = _ref.bins,
93
93
  x = _ref.x;
94
94
  var xAccessor = victory_core__WEBPACK_IMPORTED_MODULE_5__.createAccessor(x || "x");
95
- var dataIsDates = data.some(function (datum) {
95
+ var dataIsDates = (data === null || data === void 0 ? void 0 : data.some(function (datum) {
96
96
  return xAccessor(datum) instanceof Date;
97
- });
97
+ })) || false;
98
98
  var binsHasDates = Array.isArray(bins) && bins.some(function (bin) {
99
99
  return bin instanceof Date;
100
100
  });
@@ -154,19 +154,21 @@ var getFormattedData = cacheLastValue(function (_ref3) {
154
154
  dataOrBinsContainsDates: dataOrBinsContainsDates
155
155
  });
156
156
  var foo = binFunc(data);
157
- var binnedData = foo.filter(function (_ref4) {
157
+
158
+ var binnedData = _toConsumableArray(foo).filter(function (_ref4) {
158
159
  var x0 = _ref4.x0,
159
160
  x1 = _ref4.x1;
160
161
 
161
- if (dataOrBinsContainsDates) {
162
+ if (x0 instanceof Date && x1 instanceof Date) {
162
163
  return new Date(x0).getTime() !== new Date(x1).getTime();
163
164
  }
164
165
 
165
166
  return x0 !== x1;
166
167
  });
168
+
167
169
  var formattedData = binnedData.map(function (bin) {
168
- var x0 = dataOrBinsContainsDates ? new Date(bin.x0) : bin.x0;
169
- var x1 = dataOrBinsContainsDates ? new Date(bin.x1) : bin.x1;
170
+ var x0 = dataOrBinsContainsDates ? new Date(bin.x0) : bin.x0 || 0;
171
+ var x1 = dataOrBinsContainsDates ? new Date(bin.x1) : bin.x1 || 0;
170
172
  return {
171
173
  x0: x0,
172
174
  x1: x1,
@@ -181,7 +183,7 @@ var getData = function (props) {
181
183
  var bins = props.bins,
182
184
  data = props.data,
183
185
  x = props.x;
184
- var dataIsPreformatted = data.some(function (_ref5) {
186
+ var dataIsPreformatted = data === null || data === void 0 ? void 0 : data.some(function (_ref5) {
185
187
  var _y = _ref5._y;
186
188
  return !lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(_y);
187
189
  });
@@ -196,6 +198,8 @@ var getData = function (props) {
196
198
  }));
197
199
  };
198
200
  var getDomain = function (props, axis) {
201
+ var _props$data;
202
+
199
203
  var data = getData(props);
200
204
 
201
205
  if (!data.length) {
@@ -215,7 +219,7 @@ var getDomain = function (props, axis) {
215
219
  }), "x");
216
220
  }
217
221
 
218
- return props.data.length ? victory_core__WEBPACK_IMPORTED_MODULE_7__.getDomainWithZero(_objectSpread(_objectSpread({}, props), {}, {
222
+ return (_props$data = props.data) !== null && _props$data !== void 0 && _props$data.length ? victory_core__WEBPACK_IMPORTED_MODULE_7__.getDomainWithZero(_objectSpread(_objectSpread({}, props), {}, {
219
223
  data: data
220
224
  }), "y") : [0, 1];
221
225
  };
@@ -245,28 +249,29 @@ var getCalculatedValues = function (props) {
245
249
  };
246
250
  };
247
251
 
248
- var getBaseProps = function (props, fallbackProps) {
249
- var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_5__.modifyProps(props, fallbackProps, "histogram");
250
- props = lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, modifiedProps, getCalculatedValues(modifiedProps));
251
- var _props = props,
252
- binSpacing = _props.binSpacing,
253
- cornerRadius = _props.cornerRadius,
254
- data = _props.data,
255
- domain = _props.domain,
256
- events = _props.events,
257
- height = _props.height,
258
- horizontal = _props.horizontal,
259
- padding = _props.padding,
260
- scale = _props.scale,
261
- sharedEvents = _props.sharedEvents,
262
- standalone = _props.standalone,
263
- style = _props.style,
264
- theme = _props.theme,
265
- width = _props.width,
266
- labels = _props.labels,
267
- name = _props.name,
268
- getPath = _props.getPath,
269
- disableInlineStyles = _props.disableInlineStyles;
252
+ var getBaseProps = function (initialProps, fallbackProps) {
253
+ var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_5__.modifyProps(initialProps, fallbackProps, "histogram");
254
+
255
+ var props = lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, modifiedProps, getCalculatedValues(modifiedProps));
256
+
257
+ var binSpacing = props.binSpacing,
258
+ cornerRadius = props.cornerRadius,
259
+ data = props.data,
260
+ domain = props.domain,
261
+ events = props.events,
262
+ height = props.height,
263
+ horizontal = props.horizontal,
264
+ padding = props.padding,
265
+ scale = props.scale,
266
+ sharedEvents = props.sharedEvents,
267
+ standalone = props.standalone,
268
+ style = props.style,
269
+ theme = props.theme,
270
+ width = props.width,
271
+ labels = props.labels,
272
+ name = props.name,
273
+ getPath = props.getPath,
274
+ disableInlineStyles = props.disableInlineStyles;
270
275
  var initialChildProps = {
271
276
  parent: {
272
277
  horizontal: horizontal,
@@ -341,38 +346,27 @@ var getBaseProps = function (props, fallbackProps) {
341
346
 
342
347
  /***/ }),
343
348
 
344
- /***/ "./victory-histogram.js":
345
- /*!******************************!*\
346
- !*** ./victory-histogram.js ***!
347
- \******************************/
349
+ /***/ "./victory-histogram.tsx":
350
+ /*!*******************************!*\
351
+ !*** ./victory-histogram.tsx ***!
352
+ \*******************************/
348
353
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
349
354
 
350
355
  "use strict";
351
356
  __webpack_require__.r(__webpack_exports__);
352
357
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
353
- /* harmony export */ "VictoryHistogram": () => (/* binding */ VictoryHistogram),
354
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
358
+ /* harmony export */ "VictoryHistogram": () => (/* binding */ VictoryHistogram)
355
359
  /* harmony export */ });
356
360
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
357
361
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
358
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
359
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);
360
- /* harmony import */ var victory_bar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-bar */ "../../victory-bar/es/bar.js");
362
+ /* harmony import */ var victory_bar__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-bar */ "../../victory-bar/es/bar.js");
361
363
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
362
364
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
363
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
364
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/prop-types.js");
365
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
366
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
367
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
368
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
369
- /* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.js");
370
- 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; }
371
-
372
- 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; }
373
-
374
- 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; }
375
-
365
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
366
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
367
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
368
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
369
+ /* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helper-methods */ "./helper-methods.ts");
376
370
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
377
371
 
378
372
  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); } }
@@ -397,25 +391,29 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
397
391
 
398
392
 
399
393
 
400
-
401
394
  var fallbackProps = {
402
395
  width: 450,
403
396
  height: 300,
404
397
  padding: 50
405
398
  };
406
- var defaultData = [];
407
- var VictoryHistogram = /*#__PURE__*/function (_React$Component) {
408
- _inherits(VictoryHistogram, _React$Component);
399
+ var defaultData = []; // eslint-disable-next-line @typescript-eslint/no-empty-interface
400
+
401
+ /**
402
+ * Draw SVG histogram charts with React. VictoryHistogram is a composable component, so it doesn't include axes
403
+ * Check out VictoryChart for complete histogram charts and more.
404
+ */
405
+ var VictoryHistogramBase = /*#__PURE__*/function (_React$Component) {
406
+ _inherits(VictoryHistogramBase, _React$Component);
409
407
 
410
- var _super = _createSuper(VictoryHistogram);
408
+ var _super = _createSuper(VictoryHistogramBase);
411
409
 
412
- function VictoryHistogram() {
413
- _classCallCheck(this, VictoryHistogram);
410
+ function VictoryHistogramBase() {
411
+ _classCallCheck(this, VictoryHistogramBase);
414
412
 
415
413
  return _super.apply(this, arguments);
416
414
  }
417
415
 
418
- _createClass(VictoryHistogram, [{
416
+ _createClass(VictoryHistogramBase, [{
419
417
  key: "shouldAnimate",
420
418
  value: // Overridden in native versions
421
419
  function shouldAnimate() {
@@ -424,8 +422,8 @@ var VictoryHistogram = /*#__PURE__*/function (_React$Component) {
424
422
  }, {
425
423
  key: "render",
426
424
  value: function render() {
427
- var animationWhitelist = VictoryHistogram.animationWhitelist,
428
- role = VictoryHistogram.role;
425
+ var animationWhitelist = VictoryHistogramBase.animationWhitelist,
426
+ role = VictoryHistogramBase.role;
429
427
  var props = victory_core__WEBPACK_IMPORTED_MODULE_1__.modifyProps(this.props, fallbackProps, role);
430
428
 
431
429
  if (this.shouldAnimate()) {
@@ -438,12 +436,13 @@ var VictoryHistogram = /*#__PURE__*/function (_React$Component) {
438
436
  }
439
437
  }]);
440
438
 
441
- return VictoryHistogram;
439
+ return VictoryHistogramBase;
442
440
  }((react__WEBPACK_IMPORTED_MODULE_0___default().Component));
443
- VictoryHistogram.animationWhitelist = ["data", "domain", "height", "padding", "style", "width"];
444
- VictoryHistogram.displayName = "VictoryHistogram";
445
- VictoryHistogram.role = "histogram";
446
- VictoryHistogram.defaultTransitions = {
441
+
442
+ VictoryHistogramBase.animationWhitelist = ["data", "domain", "height", "padding", "style", "width"];
443
+ VictoryHistogramBase.displayName = "VictoryHistogram";
444
+ VictoryHistogramBase.role = "histogram";
445
+ VictoryHistogramBase.defaultTransitions = {
447
446
  onLoad: {
448
447
  duration: 2000,
449
448
  before: function () {
@@ -488,43 +487,29 @@ VictoryHistogram.defaultTransitions = {
488
487
  }
489
488
  }
490
489
  };
491
- VictoryHistogram.getFormattedData = _helper_methods__WEBPACK_IMPORTED_MODULE_3__.getFormattedData;
492
- VictoryHistogram.propTypes = _objectSpread(_objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.baseProps), victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.dataProps), {}, {
493
- binSpacing: victory_core__WEBPACK_IMPORTED_MODULE_5__.nonNegative,
494
- bins: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_6___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), prop_types__WEBPACK_IMPORTED_MODULE_6___default().instanceOf(Date)])), victory_core__WEBPACK_IMPORTED_MODULE_5__.nonNegative]),
495
- cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func), prop_types__WEBPACK_IMPORTED_MODULE_6___default().shape({
496
- top: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),
497
- topLeft: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),
498
- topRight: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),
499
- bottom: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),
500
- bottomLeft: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)]),
501
- bottomRight: prop_types__WEBPACK_IMPORTED_MODULE_6___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_6___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func)])
502
- })]),
503
- getPath: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().func),
504
- horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_6___default().bool)
505
- });
506
- VictoryHistogram.defaultProps = {
507
- containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.VictoryContainer, null),
490
+ VictoryHistogramBase.getFormattedData = _helper_methods__WEBPACK_IMPORTED_MODULE_3__.getFormattedData;
491
+ VictoryHistogramBase.defaultProps = {
492
+ containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.VictoryContainer, null),
508
493
  data: defaultData,
509
- dataComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_bar__WEBPACK_IMPORTED_MODULE_8__["default"], null),
494
+ dataComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_bar__WEBPACK_IMPORTED_MODULE_5__.Bar, null),
510
495
  groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", {
511
496
  role: "presentation"
512
497
  }),
513
- labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_9__.VictoryLabel, null),
498
+ labelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_6__.VictoryLabel, null),
514
499
  samples: 50,
515
500
  sortOrder: "ascending",
516
501
  standalone: true,
517
- theme: victory_core__WEBPACK_IMPORTED_MODULE_10__.VictoryTheme.grayscale
502
+ theme: victory_core__WEBPACK_IMPORTED_MODULE_7__.VictoryTheme.grayscale
518
503
  };
519
- VictoryHistogram.getDomain = _helper_methods__WEBPACK_IMPORTED_MODULE_3__.getDomain;
520
- VictoryHistogram.getData = _helper_methods__WEBPACK_IMPORTED_MODULE_3__.getData;
504
+ VictoryHistogramBase.getDomain = _helper_methods__WEBPACK_IMPORTED_MODULE_3__.getDomain;
505
+ VictoryHistogramBase.getData = _helper_methods__WEBPACK_IMPORTED_MODULE_3__.getData;
521
506
 
522
- VictoryHistogram.getBaseProps = function (props) {
507
+ VictoryHistogramBase.getBaseProps = function (props) {
523
508
  return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getBaseProps)(props, fallbackProps);
524
509
  };
525
510
 
526
- VictoryHistogram.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
527
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_11__.addEvents)(VictoryHistogram));
511
+ VictoryHistogramBase.expectedComponents = ["dataComponent", "labelComponent", "groupComponent", "containerComponent"];
512
+ var VictoryHistogram = (0,victory_core__WEBPACK_IMPORTED_MODULE_8__.addEvents)(VictoryHistogramBase);
528
513
 
529
514
  /***/ }),
530
515
 
@@ -7182,10 +7167,10 @@ __webpack_require__.r(__webpack_exports__);
7182
7167
 
7183
7168
 
7184
7169
 
7170
+ var DEFAULT_BAR_WIDTH = 8;
7185
7171
  var getBarWidth = function (barWidth, props) {
7186
7172
  var scale = props.scale,
7187
7173
  data = props.data,
7188
- defaultBarWidth = props.defaultBarWidth,
7189
7174
  style = props.style;
7190
7175
 
7191
7176
  if (barWidth) {
@@ -7198,7 +7183,7 @@ var getBarWidth = function (barWidth, props) {
7198
7183
  var extent = Math.abs(range[1] - range[0]);
7199
7184
  var bars = data.length + 2;
7200
7185
  var barRatio = props.barRatio || 0.5;
7201
- var defaultWidth = barRatio * (data.length < 2 ? defaultBarWidth : extent / bars);
7186
+ var defaultWidth = barRatio * (data.length < 2 ? DEFAULT_BAR_WIDTH : extent / bars);
7202
7187
  return Math.max(1, defaultWidth);
7203
7188
  };
7204
7189
 
@@ -7225,6 +7210,10 @@ var getCornerRadiusFromObject = function (cornerRadius, props) {
7225
7210
  return realCornerRadius;
7226
7211
  };
7227
7212
 
7213
+ function isCornerRadiusObject(cornerRadius) {
7214
+ return lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(cornerRadius);
7215
+ }
7216
+
7228
7217
  var getCornerRadius = function (cornerRadius, props) {
7229
7218
  var realCornerRadius = {
7230
7219
  topLeft: 0,
@@ -7237,7 +7226,7 @@ var getCornerRadius = function (cornerRadius, props) {
7237
7226
  return realCornerRadius;
7238
7227
  }
7239
7228
 
7240
- if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(cornerRadius)) {
7229
+ if (isCornerRadiusObject(cornerRadius)) {
7241
7230
  return getCornerRadiusFromObject(cornerRadius, props);
7242
7231
  }
7243
7232
 
@@ -7272,17 +7261,14 @@ var getStyle = function () {
7272
7261
  "use strict";
7273
7262
  __webpack_require__.r(__webpack_exports__);
7274
7263
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7275
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
7264
+ /* harmony export */ "Bar": () => (/* binding */ Bar)
7276
7265
  /* harmony export */ });
7277
7266
  /* 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");
7278
7267
  /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_0__);
7279
- /* 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");
7280
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);
7281
7268
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react");
7282
7269
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
7283
7270
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
7284
7271
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
7285
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
7286
7272
  /* harmony import */ var _bar_helper_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bar-helper-methods */ "../../victory-bar/es/bar-helper-methods.js");
7287
7273
  /* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-helper-methods */ "../../victory-bar/es/path-helper-methods.js");
7288
7274
 
@@ -7298,7 +7284,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
7298
7284
 
7299
7285
 
7300
7286
 
7301
-
7302
7287
  var evaluateProps = function (props) {
7303
7288
  /**
7304
7289
  * Potential evaluated props of following must be evaluated in this order:
@@ -7336,22 +7321,25 @@ var evaluateProps = function (props) {
7336
7321
  };
7337
7322
 
7338
7323
  var defaultProps = {
7339
- defaultBarWidth: 8,
7340
7324
  pathComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.Path, null),
7341
7325
  role: "presentation",
7342
7326
  shapeRendering: "auto"
7343
7327
  }; // eslint-disable-next-line prefer-arrow-callback
7344
7328
 
7345
- var Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Bar(props, ref) {
7346
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
7347
- var _props = props,
7348
- polar = _props.polar,
7349
- origin = _props.origin,
7350
- style = _props.style,
7351
- barWidth = _props.barWidth,
7352
- cornerRadius = _props.cornerRadius;
7329
+ var Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function Bar(initialProps, ref) {
7330
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
7331
+ var polar = props.polar,
7332
+ origin = props.origin,
7333
+ style = props.style,
7334
+ barWidth = props.barWidth,
7335
+ cornerRadius = props.cornerRadius;
7353
7336
  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);
7354
7337
  var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;
7338
+
7339
+ if (!props.pathComponent) {
7340
+ return null;
7341
+ }
7342
+
7355
7343
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
7356
7344
  "aria-label": props.ariaLabel,
7357
7345
  style: style,
@@ -7367,28 +7355,6 @@ var Bar = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(functio
7367
7355
  ref: ref
7368
7356
  }));
7369
7357
  });
7370
- Bar.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.CommonProps.primitiveProps), {}, {
7371
- alignment: prop_types__WEBPACK_IMPORTED_MODULE_7___default().oneOf(["start", "middle", "end"]),
7372
- barRatio: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
7373
- 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)]),
7374
- 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({
7375
- 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)]),
7376
- 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)]),
7377
- 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)]),
7378
- 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)]),
7379
- 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)]),
7380
- 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)])
7381
- })]),
7382
- datum: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().object),
7383
- getPath: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().func),
7384
- horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().bool),
7385
- pathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().element),
7386
- width: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
7387
- x: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
7388
- y: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number),
7389
- y0: (prop_types__WEBPACK_IMPORTED_MODULE_7___default().number)
7390
- });
7391
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Bar);
7392
7358
 
7393
7359
  /***/ }),
7394
7360
 
@@ -7406,9 +7372,6 @@ __webpack_require__.r(__webpack_exports__);
7406
7372
  /* harmony export */ });
7407
7373
  /**
7408
7374
  * A point in the 2d plane
7409
- * @param {number} x - x coordinate
7410
- * @param {number} y - y coordinate
7411
- * @returns {object} - point object
7412
7375
  */
7413
7376
  var point = function (x, y) {
7414
7377
  return {
@@ -7442,14 +7405,10 @@ var point = function (x, y) {
7442
7405
  }
7443
7406
  };
7444
7407
  };
7408
+
7445
7409
  /**
7446
7410
  * A circle in the 2d plane
7447
- * @param {point} center - center of circle
7448
- * @param {number} radius - radius of circle
7449
- * @returns {object} - point object
7450
7411
  */
7451
-
7452
-
7453
7412
  var circle = function (center, radius) {
7454
7413
  return {
7455
7414
  center: center,
@@ -7520,8 +7479,6 @@ var circle = function (center, radius) {
7520
7479
  };
7521
7480
  };
7522
7481
 
7523
-
7524
-
7525
7482
  /***/ }),
7526
7483
 
7527
7484
  /***/ "../../victory-bar/es/helper-methods.js":
@@ -7603,32 +7560,33 @@ var getCalculatedValues = function (props) {
7603
7560
  };
7604
7561
  };
7605
7562
 
7606
- var getBaseProps = function (props, fallbackProps) {
7607
- var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.modifyProps(props, fallbackProps, "bar");
7608
- props = lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, modifiedProps, getCalculatedValues(modifiedProps));
7609
- var _props = props,
7610
- alignment = _props.alignment,
7611
- barRatio = _props.barRatio,
7612
- cornerRadius = _props.cornerRadius,
7613
- data = _props.data,
7614
- disableInlineStyles = _props.disableInlineStyles,
7615
- domain = _props.domain,
7616
- events = _props.events,
7617
- height = _props.height,
7618
- horizontal = _props.horizontal,
7619
- origin = _props.origin,
7620
- padding = _props.padding,
7621
- polar = _props.polar,
7622
- scale = _props.scale,
7623
- sharedEvents = _props.sharedEvents,
7624
- standalone = _props.standalone,
7625
- style = _props.style,
7626
- theme = _props.theme,
7627
- width = _props.width,
7628
- labels = _props.labels,
7629
- name = _props.name,
7630
- barWidth = _props.barWidth,
7631
- getPath = _props.getPath;
7563
+ var getBaseProps = function (initialProps, fallbackProps) {
7564
+ var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_4__.modifyProps(initialProps, fallbackProps, "bar");
7565
+
7566
+ var props = lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, modifiedProps, getCalculatedValues(modifiedProps));
7567
+
7568
+ var alignment = props.alignment,
7569
+ barRatio = props.barRatio,
7570
+ cornerRadius = props.cornerRadius,
7571
+ data = props.data,
7572
+ disableInlineStyles = props.disableInlineStyles,
7573
+ domain = props.domain,
7574
+ events = props.events,
7575
+ height = props.height,
7576
+ horizontal = props.horizontal,
7577
+ origin = props.origin,
7578
+ padding = props.padding,
7579
+ polar = props.polar,
7580
+ scale = props.scale,
7581
+ sharedEvents = props.sharedEvents,
7582
+ standalone = props.standalone,
7583
+ style = props.style,
7584
+ theme = props.theme,
7585
+ width = props.width,
7586
+ labels = props.labels,
7587
+ name = props.name,
7588
+ barWidth = props.barWidth,
7589
+ getPath = props.getPath;
7632
7590
  var initialChildProps = {
7633
7591
  parent: {
7634
7592
  horizontal: horizontal,
@@ -7780,9 +7738,11 @@ var transformAngle = function (angle) {
7780
7738
  var getCustomBarPath = function (props, width) {
7781
7739
  var getPath = props.getPath;
7782
7740
 
7783
- var propsWithCalculatedValues = _objectSpread(_objectSpread({}, props), getPosition(props, width));
7741
+ if (typeof getPath === "function") {
7742
+ var propsWithCalculatedValues = _objectSpread(_objectSpread({}, props), getPosition(props, width));
7784
7743
 
7785
- return getPath(propsWithCalculatedValues);
7744
+ return getPath(propsWithCalculatedValues);
7745
+ }
7786
7746
  };
7787
7747
 
7788
7748
  var getStartAngle = function (props, index) {
@@ -7827,8 +7787,7 @@ var mapPointsToPath = function (coords, cornerRadius, direction) {
7827
7787
  var bottomRightPath = "".concat(cornerRadius.bottomRight, " ").concat(cornerRadius.bottomRight, " ").concat(direction);
7828
7788
  var commands = ["M", "A ".concat(bottomLeftPath, ","), "L", "A ".concat(topLeftPath, ","), "L", "A ".concat(topRightPath, ","), "L", "A ".concat(bottomRightPath, ",")];
7829
7789
  var path = commands.reduce(function (acc, command, i) {
7830
- acc += "".concat(command, " ").concat(coords[i].x, ", ").concat(coords[i].y, " \n");
7831
- return acc;
7790
+ return "".concat(acc).concat(command, " ").concat(coords[i].x, ", ").concat(coords[i].y, " \n");
7832
7791
  }, "");
7833
7792
  return "".concat(path, " z");
7834
7793
  };
@@ -8051,8 +8010,8 @@ var getVerticalPolarBarPath = function (props, cornerRadius) {
8051
8010
  start = alignment === "start" ? currentAngle : currentAngle - size;
8052
8011
  end = alignment === "end" ? currentAngle : currentAngle + size;
8053
8012
  } else {
8054
- start = getStartAngle(props, index);
8055
- end = getEndAngle(props, index);
8013
+ start = getStartAngle(props, Number(index));
8014
+ end = getEndAngle(props, Number(index));
8056
8015
  }
8057
8016
 
8058
8017
  var getPath = function (edge) {
@@ -8062,11 +8021,11 @@ var getVerticalPolarBarPath = function (props, cornerRadius) {
8062
8021
 
8063
8022
  var getPathData = function (edge) {
8064
8023
  var rightPath = getPath("".concat(edge, "Right"));
8065
- var rightMoves = rightPath.match(/[A-Z]/g);
8024
+ var rightMoves = rightPath.match(/[A-Z]/g) || [];
8066
8025
  var rightCoords = rightPath.split(/[A-Z]/).slice(1);
8067
8026
  var rightMiddle = rightMoves.indexOf("L");
8068
8027
  var leftPath = getPath("".concat(edge, "Left"));
8069
- var leftMoves = leftPath.match(/[A-Z]/g);
8028
+ var leftMoves = leftPath.match(/[A-Z]/g) || [];
8070
8029
  var leftCoords = leftPath.split(/[A-Z]/).slice(1);
8071
8030
  var leftMiddle = leftMoves.indexOf("L");
8072
8031
  return {
@@ -8180,8 +8139,7 @@ var getVerticalPolarBarPath = function (props, cornerRadius) {
8180
8139
  var bottomPath = getBottomPath();
8181
8140
  var moves = [].concat(_toConsumableArray(topPath), _toConsumableArray(bottomPath));
8182
8141
  var path = moves.reduce(function (memo, move) {
8183
- memo += "".concat(move.command, " ").concat(move.coords.join());
8184
- return memo;
8142
+ return "".concat(memo).concat(move.command, " ").concat(move.coords.join());
8185
8143
  }, "");
8186
8144
  return "".concat(path, " z");
8187
8145
  };
@@ -8322,12 +8280,12 @@ var interpolateFunction = function (a, b) {
8322
8280
  * differs in that it uses our custom interpolators when interpolating the value of each property in
8323
8281
  * an object. This allows the correct interpolation of nested objects, including styles
8324
8282
  *
8325
- * @param {any} a - Start value.
8326
- * @param {any} b - End value.
8283
+ * @param {any} startValue - Start value.
8284
+ * @param {any} endValue - End value.
8327
8285
  * @returns {Function} An interpolation function.
8328
8286
  */
8329
8287
 
8330
- var interpolateObject = function (a, b) {
8288
+ var interpolateObject = function (startValue, endValue) {
8331
8289
  var interpolateTypes = function (x, y) {
8332
8290
  if (x === y || !isInterpolatable(x) || !isInterpolatable(y)) {
8333
8291
  return interpolateImmediate(x, y);
@@ -8352,6 +8310,8 @@ var interpolateObject = function (a, b) {
8352
8310
 
8353
8311
  var i = {};
8354
8312
  var c = {};
8313
+ var a = startValue;
8314
+ var b = endValue;
8355
8315
  var k;
8356
8316
 
8357
8317
  if (a === null || typeof a !== "object") {
@@ -8519,8 +8479,8 @@ var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
8519
8479
  step can generate imprecise values, sometimes greater than 1
8520
8480
  if this happens set the state to 1 and return, cancelling the timer
8521
8481
  */
8522
- duration = duration !== undefined ? duration : _this.props.duration;
8523
- var step = duration ? elapsed / duration : 1;
8482
+ var animationDuration = duration !== undefined ? duration : _this.props.duration;
8483
+ var step = animationDuration ? elapsed / animationDuration : 1;
8524
8484
 
8525
8485
  if (step >= 1) {
8526
8486
  _this.setState({
@@ -9136,8 +9096,7 @@ var getStyles = function (style, props) {
9136
9096
  }
9137
9097
 
9138
9098
  var getSingleStyle = function (s) {
9139
- s = s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles;
9140
- var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s, props);
9099
+ var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles, props);
9141
9100
  return lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, baseStyles, {
9142
9101
  fontSize: getFontSize(baseStyles)
9143
9102
  });
@@ -9341,22 +9300,19 @@ var getInlineXOffset = function (calculatedProps, textElements, index) {
9341
9300
  switch (textAnchor) {
9342
9301
  case "start":
9343
9302
  return widths.reduce(function (memo, width, i) {
9344
- memo = i < index ? memo + width : memo;
9345
- return memo;
9303
+ return i < index ? memo + width : memo;
9346
9304
  }, 0);
9347
9305
 
9348
9306
  case "end":
9349
9307
  return widths.reduce(function (memo, width, i) {
9350
- memo = i > index ? memo - width : memo;
9351
- return memo;
9308
+ return i > index ? memo - width : memo;
9352
9309
  }, 0);
9353
9310
 
9354
9311
  default:
9355
9312
  // middle
9356
9313
  return widths.reduce(function (memo, width, i) {
9357
9314
  var offsetWidth = i < index ? width : 0;
9358
- memo = i === index ? memo + width / 2 : memo + offsetWidth;
9359
- return memo;
9315
+ return i === index ? memo + width / 2 : memo + offsetWidth;
9360
9316
  }, centerOffset);
9361
9317
  }
9362
9318
  };
@@ -9488,7 +9444,7 @@ var getCalculatedProps = function (props) {
9488
9444
  verticalAnchor: verticalAnchor,
9489
9445
  dx: dx,
9490
9446
  dy: dy,
9491
- originalDy: props.dy,
9447
+ originalDy: _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.dy, props),
9492
9448
  transform: transform,
9493
9449
  x: x,
9494
9450
  y: y
@@ -9558,8 +9514,8 @@ var defaultProps = {
9558
9514
  // Magic number from d3.
9559
9515
  lineHeight: 1
9560
9516
  };
9561
- var VictoryLabel = function (props) {
9562
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
9517
+ var VictoryLabel = function (initialProps) {
9518
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
9563
9519
 
9564
9520
  if (props.text === null || props.text === undefined) {
9565
9521
  return null;
@@ -9580,7 +9536,7 @@ var VictoryLabel = function (props) {
9580
9536
  fontSize: currentStyle.fontSize || defaultStyles.fontSize,
9581
9537
  capHeight: capHeightPx,
9582
9538
  text: line,
9583
- // @ts-expect-error TODO: This looks like a bug:
9539
+ // TODO: This looks like a bug:
9584
9540
  textSize: _victory_util_textsize__WEBPACK_IMPORTED_MODULE_12__.approximateTextSize(line, currentStyle),
9585
9541
  lineHeight: currentLineHeight,
9586
9542
  backgroundPadding: getSingleValue(backgroundPadding, i)
@@ -11272,8 +11228,7 @@ function addEvents(WrappedComponent) {
11272
11228
  value: function applyExternalMutations(props, externalMutations) {
11273
11229
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
11274
11230
  var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
11275
- memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
11276
- return memo;
11231
+ return lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
11277
11232
  }, []);
11278
11233
  var compiledCallbacks = callbacks.length ? function () {
11279
11234
  callbacks.forEach(function (c) {
@@ -11328,8 +11283,8 @@ function addEvents(WrappedComponent) {
11328
11283
  }, {
11329
11284
  key: "getBaseProps",
11330
11285
  value: function getBaseProps(props, getSharedEventState) {
11331
- getSharedEventState = getSharedEventState || this.getSharedEventState.bind(this);
11332
- var sharedParentState = getSharedEventState("parent", "parent");
11286
+ var getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
11287
+ var sharedParentState = getSharedEventStateFunction("parent", "parent");
11333
11288
  var parentState = this.getEventState("parent", "parent");
11334
11289
 
11335
11290
  var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
@@ -11364,13 +11319,15 @@ function addEvents(WrappedComponent) {
11364
11319
  return undefined;
11365
11320
  }
11366
11321
 
11322
+ var currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
11323
+
11367
11324
  if (this.hasEvents) {
11368
11325
  var baseEvents = this.getEvents(this.props, type, key);
11369
11326
 
11370
11327
  var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
11371
11328
  index: index,
11372
11329
  key: id
11373
- }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
11330
+ }, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
11374
11331
  id: id
11375
11332
  });
11376
11333
 
@@ -11384,7 +11341,7 @@ function addEvents(WrappedComponent) {
11384
11341
  return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
11385
11342
  index: index,
11386
11343
  key: id
11387
- }, component.props, baseProps, {
11344
+ }, currentProps, baseProps, {
11388
11345
  id: id
11389
11346
  });
11390
11347
  }
@@ -11426,13 +11383,15 @@ function addEvents(WrappedComponent) {
11426
11383
  var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
11427
11384
 
11428
11385
  var labelComponents = dataKeys.reduce(function (memo, key) {
11386
+ var newMemo = memo;
11387
+
11429
11388
  var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
11430
11389
 
11431
11390
  if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
11432
- memo = memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
11391
+ newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
11433
11392
  }
11434
11393
 
11435
- return memo;
11394
+ return newMemo;
11436
11395
  }, []);
11437
11396
  var dataProps = this.getComponentProps(dataComponent, "data", "all");
11438
11397
  var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
@@ -11561,155 +11520,6 @@ function getMinValue(arr) {
11561
11520
 
11562
11521
  /***/ }),
11563
11522
 
11564
- /***/ "../../victory-core/es/victory-util/common-props.js":
11565
- /*!**********************************************************!*\
11566
- !*** ../../victory-core/es/victory-util/common-props.js ***!
11567
- \**********************************************************/
11568
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
11569
-
11570
- "use strict";
11571
- __webpack_require__.r(__webpack_exports__);
11572
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11573
- /* harmony export */ "CommonProps": () => (/* binding */ CommonProps)
11574
- /* harmony export */ });
11575
- /* 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");
11576
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
11577
- /* harmony import */ var _prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prop-types */ "../../victory-core/es/victory-util/prop-types.js");
11578
-
11579
-
11580
- var dataProps = {
11581
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11582
- 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({
11583
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)),
11584
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().string))
11585
- })]),
11586
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11587
- 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)]),
11588
- dataComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
11589
- disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
11590
- labelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
11591
- 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)]),
11592
- samples: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
11593
- 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))]),
11594
- sortOrder: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["ascending", "descending"]),
11595
- style: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11596
- parent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
11597
- data: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
11598
- labels: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
11599
- }),
11600
- 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))]),
11601
- 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))]),
11602
- 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))])
11603
- };
11604
- var baseProps = {
11605
- 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)]),
11606
- containerComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
11607
- domain: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11608
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain,
11609
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain
11610
- })]),
11611
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11612
- 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({
11613
- 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)]),
11614
- 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)])
11615
- })]),
11616
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11617
- 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({
11618
- 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)]),
11619
- 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)])
11620
- })]),
11621
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11622
- domainPadding: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11623
- 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))]),
11624
- 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))])
11625
- }), (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number), prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_0___default().number))]),
11626
- 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)]),
11627
- events: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11628
- target: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOf(["data", "labels", "parent"]),
11629
- 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)]),
11630
- eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object)
11631
- })),
11632
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11633
- externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_0___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11634
- callback: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
11635
- 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)]),
11636
- 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)]),
11637
- mutation: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func),
11638
- 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)])
11639
- })),
11640
- groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().element),
11641
- height: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative,
11642
- name: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
11643
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11644
- origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11645
- x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
11646
- y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
11647
- }),
11648
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11649
- 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({
11650
- top: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
11651
- bottom: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
11652
- left: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
11653
- right: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
11654
- })]),
11655
- polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
11656
- range: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.domain, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11657
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired,
11658
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.domain.isRequired
11659
- })]),
11660
- scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11661
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired,
11662
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale.isRequired
11663
- })]),
11664
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11665
- sharedEvents: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11666
- events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().array),
11667
- getEventState: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func)
11668
- }),
11669
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11670
- 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({
11671
- x: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)]),
11672
- y: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool)])
11673
- })]),
11674
- standalone: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
11675
- theme: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
11676
- width: _prop_types__WEBPACK_IMPORTED_MODULE_1__.nonNegative
11677
- };
11678
- var primitiveProps = {
11679
- active: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
11680
- 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)]),
11681
- className: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
11682
- clipPath: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
11683
- 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)]),
11684
- 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)]),
11685
- disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
11686
- events: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
11687
- 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)]),
11688
- 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)]),
11689
- // @ts-expect-error TODO: synchronize the type with this PropTypes
11690
- origin: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11691
- x: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number),
11692
- y: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().number)
11693
- }),
11694
- polar: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().bool),
11695
- role: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
11696
- scale: prop_types__WEBPACK_IMPORTED_MODULE_0___default().oneOfType([_prop_types__WEBPACK_IMPORTED_MODULE_1__.scale, prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({
11697
- x: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale,
11698
- y: _prop_types__WEBPACK_IMPORTED_MODULE_1__.scale
11699
- })]),
11700
- shapeRendering: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string),
11701
- style: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().object),
11702
- 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)]),
11703
- transform: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().string)
11704
- };
11705
- var CommonProps = {
11706
- dataProps: dataProps,
11707
- baseProps: baseProps,
11708
- primitiveProps: primitiveProps
11709
- };
11710
-
11711
- /***/ }),
11712
-
11713
11523
  /***/ "../../victory-core/es/victory-util/data.js":
11714
11524
  /*!**************************************************!*\
11715
11525
  !*** ../../victory-core/es/victory-util/data.js ***!
@@ -11831,12 +11641,14 @@ function sortData(dataset, sortKey) {
11831
11641
  } // Ensures previous VictoryLine api for sortKey prop stays consistent
11832
11642
 
11833
11643
 
11644
+ var formattedSortKey = sortKey;
11645
+
11834
11646
  if (sortKey === "x" || sortKey === "y") {
11835
- sortKey = "_".concat(sortKey);
11647
+ formattedSortKey = "_".concat(sortKey);
11836
11648
  }
11837
11649
 
11838
11650
  var order = sortOrder === "ascending" ? "asc" : "desc";
11839
- return lodash_orderBy__WEBPACK_IMPORTED_MODULE_5___default()(dataset, sortKey, order);
11651
+ return lodash_orderBy__WEBPACK_IMPORTED_MODULE_5___default()(dataset, formattedSortKey, order);
11840
11652
  } // This method will remove data points that break certain scales. (log scale only)
11841
11653
 
11842
11654
 
@@ -12027,7 +11839,10 @@ function formatData(dataset, props, expectedKeys) {
12027
11839
  return [];
12028
11840
  }
12029
11841
 
12030
- var defaultKeys = ["x", "y", "y0"];
11842
+ var defaultKeys = ["x", "y", "y0"]; // TODO: We shouldn’t mutate the expectedKeys param here,
11843
+ // but we need to figure out why changing it causes regressions in tests.
11844
+ // eslint-disable-next-line no-param-reassign
11845
+
12031
11846
  expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
12032
11847
 
12033
11848
  var createAccessor = function (name) {
@@ -12052,13 +11867,13 @@ function formatData(dataset, props, expectedKeys) {
12052
11867
 
12053
11868
  var data = preformattedData ? dataset : dataset.reduce(function (dataArr, datum, index) {
12054
11869
  // eslint-disable-line complexity
12055
- datum = parseDatum(datum);
11870
+ var parsedDatum = parseDatum(datum);
12056
11871
  var fallbackValues = {
12057
11872
  x: index,
12058
- y: datum
11873
+ y: parsedDatum
12059
11874
  };
12060
11875
  var processedValues = expectedKeys.reduce(function (memo, type) {
12061
- var processedValue = accessor[type](datum);
11876
+ var processedValue = accessor[type](parsedDatum);
12062
11877
  var value = processedValue !== undefined ? processedValue : fallbackValues[type];
12063
11878
 
12064
11879
  if (value !== undefined) {
@@ -12073,7 +11888,7 @@ function formatData(dataset, props, expectedKeys) {
12073
11888
  return memo;
12074
11889
  }, {});
12075
11890
 
12076
- var formattedDatum = lodash_assign__WEBPACK_IMPORTED_MODULE_12___default()({}, processedValues, datum);
11891
+ var formattedDatum = lodash_assign__WEBPACK_IMPORTED_MODULE_12___default()({}, processedValues, parsedDatum);
12077
11892
 
12078
11893
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(formattedDatum)) {
12079
11894
  dataArr.push(formattedDatum);
@@ -12184,8 +11999,8 @@ function getStringsFromData(props, axis) {
12184
11999
  }, []);
12185
12000
  var sortedData = sortData(data, props.sortKey, props.sortOrder);
12186
12001
  var dataStrings = sortedData.reduce(function (dataArr, datum) {
12187
- datum = parseDatum(datum);
12188
- dataArr.push(accessor(datum));
12002
+ var parsedDatum = parseDatum(datum);
12003
+ dataArr.push(accessor(parsedDatum));
12189
12004
  return dataArr;
12190
12005
  }, []).filter(function (datum) {
12191
12006
  return typeof datum === "string";
@@ -12429,18 +12244,18 @@ function padDomain(domain, props, axis) {
12429
12244
 
12430
12245
 
12431
12246
  function createDomainFunction(getDomainFromDataFunction, formatDomainFunction) {
12432
- getDomainFromDataFunction = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(getDomainFromDataFunction) ? getDomainFromDataFunction : getDomainFromData;
12433
- formatDomainFunction = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(formatDomainFunction) ? formatDomainFunction : formatDomain;
12247
+ var getDomainFromDataFn = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(getDomainFromDataFunction) ? getDomainFromDataFunction : getDomainFromData;
12248
+ var formatDomainFn = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(formatDomainFunction) ? formatDomainFunction : formatDomain;
12434
12249
  return function (props, axis) {
12435
12250
  var propsDomain = getDomainFromProps(props, axis);
12436
12251
 
12437
12252
  if (propsDomain) {
12438
- return formatDomainFunction(propsDomain, props, axis);
12253
+ return formatDomainFn(propsDomain, props, axis);
12439
12254
  }
12440
12255
 
12441
12256
  var categories = _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
12442
- var domain = categories ? getDomainFromCategories(props, axis, categories) : getDomainFromDataFunction(props, axis);
12443
- return domain ? formatDomainFunction(domain, props, axis) : undefined;
12257
+ var domain = categories ? getDomainFromCategories(props, axis, categories) : getDomainFromDataFn(props, axis);
12258
+ return domain ? formatDomainFn(domain, props, axis) : undefined;
12444
12259
  };
12445
12260
  }
12446
12261
  /**
@@ -12473,27 +12288,27 @@ function getDomain(props, axis) {
12473
12288
  */
12474
12289
 
12475
12290
  function getDomainFromCategories(props, axis, categories) {
12476
- categories = categories || _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
12291
+ var categoriesArray = categories || _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
12477
12292
  var polar = props.polar,
12478
12293
  _props$startAngle = props.startAngle,
12479
12294
  startAngle = _props$startAngle === void 0 ? 0 : _props$startAngle,
12480
12295
  _props$endAngle = props.endAngle,
12481
12296
  endAngle = _props$endAngle === void 0 ? 360 : _props$endAngle;
12482
12297
 
12483
- if (!categories) {
12298
+ if (!categoriesArray) {
12484
12299
  return undefined;
12485
12300
  }
12486
12301
 
12487
12302
  var minDomain = getMinFromProps(props, axis);
12488
12303
  var maxDomain = getMaxFromProps(props, axis);
12489
- var stringArray = _collection__WEBPACK_IMPORTED_MODULE_8__.containsStrings(categories) ? _data__WEBPACK_IMPORTED_MODULE_10__.getStringsFromCategories(props, axis) : [];
12304
+ var stringArray = _collection__WEBPACK_IMPORTED_MODULE_8__.containsStrings(categoriesArray) ? _data__WEBPACK_IMPORTED_MODULE_10__.getStringsFromCategories(props, axis) : [];
12490
12305
  var stringMap = stringArray.length === 0 ? null : stringArray.reduce(function (memo, string, index) {
12491
12306
  memo[string] = index + 1;
12492
12307
  return memo;
12493
12308
  }, {});
12494
- var categoryValues = stringMap ? categories.map(function (value) {
12309
+ var categoryValues = stringMap ? categoriesArray.map(function (value) {
12495
12310
  return stringMap[value];
12496
- }) : categories;
12311
+ }) : categoriesArray;
12497
12312
  var min = minDomain !== undefined ? minDomain : _collection__WEBPACK_IMPORTED_MODULE_8__.getMinValue(categoryValues);
12498
12313
  var max = maxDomain !== undefined ? maxDomain : _collection__WEBPACK_IMPORTED_MODULE_8__.getMaxValue(categoryValues);
12499
12314
  var categoryDomain = getDomainFromMinMax(min, max);
@@ -12508,7 +12323,7 @@ function getDomainFromCategories(props, axis, categories) {
12508
12323
  */
12509
12324
 
12510
12325
  function getDomainFromData(props, axis, dataset) {
12511
- dataset = dataset || _data__WEBPACK_IMPORTED_MODULE_10__.getData(props);
12326
+ var datasetArray = dataset || _data__WEBPACK_IMPORTED_MODULE_10__.getData(props);
12512
12327
  var polar = props.polar,
12513
12328
  _props$startAngle2 = props.startAngle,
12514
12329
  startAngle = _props$startAngle2 === void 0 ? 0 : _props$startAngle2,
@@ -12517,14 +12332,14 @@ function getDomainFromData(props, axis, dataset) {
12517
12332
  var minDomain = getMinFromProps(props, axis);
12518
12333
  var maxDomain = getMaxFromProps(props, axis);
12519
12334
 
12520
- if (dataset.length < 1) {
12335
+ if (datasetArray.length < 1) {
12521
12336
  return minDomain !== undefined && maxDomain !== undefined ? getDomainFromMinMax(minDomain, maxDomain) : undefined;
12522
12337
  }
12523
12338
 
12524
- var min = minDomain !== undefined ? minDomain : getExtremeFromData(dataset, axis, "min");
12525
- var max = maxDomain !== undefined ? maxDomain : getExtremeFromData(dataset, axis, "max");
12339
+ var min = minDomain !== undefined ? minDomain : getExtremeFromData(datasetArray, axis, "min");
12340
+ var max = maxDomain !== undefined ? maxDomain : getExtremeFromData(datasetArray, axis, "max");
12526
12341
  var domain = getDomainFromMinMax(min, max);
12527
- return polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? getSymmetricDomain(domain, getFlatData(dataset, axis)) : domain;
12342
+ return polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? getSymmetricDomain(domain, getFlatData(datasetArray, axis)) : domain;
12528
12343
  }
12529
12344
  /**
12530
12345
  * Returns a domain in the form of a two element array given a min and max value.
@@ -12837,14 +12652,14 @@ function getScopedEvents(events, namespace, childType, baseProps) {
12837
12652
  // eslint-disable-next-line no-invalid-this
12838
12653
 
12839
12654
 
12840
- baseProps = baseProps || this.baseProps; // returns the original base props or base state of a given target element
12655
+ var newBaseProps = baseProps || this.baseProps; // returns the original base props or base state of a given target element
12841
12656
 
12842
12657
  var getTargetProps = function (identifier, type) {
12843
12658
  var childName = identifier.childName,
12844
12659
  target = identifier.target,
12845
12660
  key = identifier.key; // eslint-disable-next-line no-invalid-this
12846
12661
 
12847
- var baseType = type === "props" ? baseProps : _this2.state || {};
12662
+ var baseType = type === "props" ? newBaseProps : _this2.state || {};
12848
12663
  var base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
12849
12664
  return key === "parent" ? base.parent : base[key] && base[key][target];
12850
12665
  }; // Returns the state object with the mutation caused by a given eventReturn
@@ -12932,8 +12747,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
12932
12747
 
12933
12748
  var parseEventReturn = function (eventReturn, eventKey) {
12934
12749
  return Array.isArray(eventReturn) ? eventReturn.reduce(function (memo, props) {
12935
- memo = lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, memo, parseEvent(props, eventKey));
12936
- return memo;
12750
+ return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, memo, parseEvent(props, eventKey));
12937
12751
  }, {}) : parseEvent(eventReturn, eventKey);
12938
12752
  };
12939
12753
 
@@ -13019,9 +12833,10 @@ function getEventState(eventKey, namespace, childType) {
13019
12833
  */
13020
12834
  // eslint-disable-next-line max-params
13021
12835
 
13022
- function getExternalMutationsWithChildren(mutations, baseProps, baseState, childNames) {
13023
- baseProps = baseProps || {};
13024
- baseState = baseState || {};
12836
+ function getExternalMutationsWithChildren(mutations) {
12837
+ var baseProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12838
+ var baseState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
12839
+ var childNames = arguments.length > 3 ? arguments[3] : undefined;
13025
12840
  return childNames.reduce(function (memo, childName) {
13026
12841
  var childState = baseState[childName];
13027
12842
  var mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
@@ -13043,9 +12858,10 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
13043
12858
  */
13044
12859
  // eslint-disable-next-line max-params
13045
12860
 
13046
- function getExternalMutations(mutations, baseProps, baseState, childName) {
13047
- baseProps = baseProps || {};
13048
- baseState = baseState || {};
12861
+ function getExternalMutations(mutations) {
12862
+ var baseProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
12863
+ var baseState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
12864
+ var childName = arguments.length > 3 ? arguments[3] : undefined;
13049
12865
 
13050
12866
  var eventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(baseProps);
13051
12867
 
@@ -13111,8 +12927,7 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
13111
12927
  return false;
13112
12928
  };
13113
12929
 
13114
- mutations = Array.isArray(mutations) ? mutations : [mutations];
13115
- var scopedMutations = mutations;
12930
+ var scopedMutations = Array.isArray(mutations) ? mutations : [mutations];
13116
12931
 
13117
12932
  if (identifier.childName) {
13118
12933
  scopedMutations = mutations.filter(function (m) {
@@ -13151,13 +12966,10 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
13151
12966
 
13152
12967
  function getComponentEvents(props, components) {
13153
12968
  var events = Array.isArray(components) && components.reduce(function (memo, componentName) {
13154
- var _memo;
13155
-
13156
12969
  var component = props[componentName];
13157
12970
  var defaultEvents = component && component.type && component.type.defaultEvents;
13158
12971
  var componentEvents = lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(defaultEvents) ? defaultEvents(component.props) : defaultEvents;
13159
- memo = Array.isArray(componentEvents) ? (_memo = memo).concat.apply(_memo, _toConsumableArray(componentEvents)) : memo;
13160
- return memo;
12972
+ return Array.isArray(componentEvents) ? memo.concat.apply(memo, _toConsumableArray(componentEvents)) : memo;
13161
12973
  }, []);
13162
12974
  return events && events.length ? events : undefined;
13163
12975
  }
@@ -13515,6 +13327,7 @@ function reduceChildren(children, iteratee) {
13515
13327
 
13516
13328
  var traverseChildren = function (childArray, names, parent) {
13517
13329
  return childArray.reduce(function (memo, child, index) {
13330
+ var newMemo = memo;
13518
13331
  var childRole = child.type && child.type.role;
13519
13332
  var childName = child.props.name || "".concat(childRole, "-").concat(names[index]);
13520
13333
 
@@ -13532,16 +13345,16 @@ function reduceChildren(children, iteratee) {
13532
13345
  });
13533
13346
 
13534
13347
  var nestedResults = traverseChildren(nestedChildren, _childNames, child);
13535
- memo = combine(memo, nestedResults);
13348
+ newMemo = combine(newMemo, nestedResults);
13536
13349
  } else {
13537
13350
  var result = iteratee(child, childName, parent);
13538
13351
 
13539
13352
  if (result) {
13540
- memo = combine(memo, result);
13353
+ newMemo = combine(newMemo, result);
13541
13354
  }
13542
13355
  }
13543
13356
 
13544
- return memo;
13357
+ return newMemo;
13545
13358
  }, initialMemo);
13546
13359
  };
13547
13360
 
@@ -13567,8 +13380,7 @@ function isHorizontal(props) {
13567
13380
  var childProps = child.props || {};
13568
13381
 
13569
13382
  if (memo || childProps.horizontal || !childProps.children) {
13570
- memo = memo || childProps.horizontal;
13571
- return memo;
13383
+ return memo || childProps.horizontal;
13572
13384
  }
13573
13385
 
13574
13386
  return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(childProps.children));
@@ -13621,11 +13433,13 @@ function isMap(x) {
13621
13433
  }
13622
13434
  function shallowToJS(x, whitelist) {
13623
13435
  return isIterable(x) ? x.reduce(function (result, curr, key) {
13436
+ var newCurr = curr;
13437
+
13624
13438
  if (whitelist && whitelist[key]) {
13625
- curr = shallowToJS(curr);
13439
+ newCurr = shallowToJS(curr);
13626
13440
  }
13627
13441
 
13628
- result[key] = curr;
13442
+ result[key] = newCurr;
13629
13443
  return result;
13630
13444
  }, isList(x) ? [] : {}) : x;
13631
13445
  }
@@ -13653,12 +13467,10 @@ __webpack_require__.r(__webpack_exports__);
13653
13467
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
13654
13468
 
13655
13469
 
13656
- /* eslint-disable no-use-before-define */
13657
-
13658
13470
 
13659
13471
  // Private Functions
13660
- function getVerticalAnchor(props, datum) {
13661
- datum = datum || {};
13472
+ function getVerticalAnchor(props) {
13473
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13662
13474
  var sign = datum._y >= 0 ? 1 : -1;
13663
13475
  var labelStyle = props.style && props.style.labels || {};
13664
13476
 
@@ -13671,8 +13483,8 @@ function getVerticalAnchor(props, datum) {
13671
13483
  return "middle";
13672
13484
  }
13673
13485
 
13674
- function getTextAnchor(props, datum) {
13675
- datum = datum || {};
13486
+ function getTextAnchor(props) {
13487
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13676
13488
  var style = props.style,
13677
13489
  horizontal = props.horizontal;
13678
13490
  var sign = datum._y >= 0 ? 1 : -1;
@@ -13687,14 +13499,14 @@ function getTextAnchor(props, datum) {
13687
13499
  return sign >= 0 ? "start" : "end";
13688
13500
  }
13689
13501
 
13690
- function getAngle(props, datum) {
13691
- datum = datum || {};
13502
+ function getAngle(props) {
13503
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13692
13504
  var labelStyle = props.style && props.style.labels || {};
13693
13505
  return datum.angle === undefined ? labelStyle.angle : datum.angle;
13694
13506
  }
13695
13507
 
13696
- function getPadding(props, datum) {
13697
- datum = datum || {};
13508
+ function getPadding(props) {
13509
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13698
13510
  var horizontal = props.horizontal,
13699
13511
  style = props.style;
13700
13512
  var labelStyle = style.labels || {};
@@ -13773,8 +13585,9 @@ function getPolarOrientation(degrees) {
13773
13585
  } // Exported Functions
13774
13586
 
13775
13587
 
13776
- function getText(props, datum, index) {
13777
- datum = datum || {};
13588
+ function getText(props) {
13589
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
13590
+ var index = arguments.length > 2 ? arguments[2] : undefined;
13778
13591
 
13779
13592
  if (datum.label !== undefined) {
13780
13593
  return datum.label;
@@ -14934,11 +14747,10 @@ var Timer = /*#__PURE__*/function () {
14934
14747
  }, {
14935
14748
  key: "subscribe",
14936
14749
  value: function subscribe(callback, duration) {
14937
- duration = this.shouldAnimate ? duration : 0;
14938
14750
  var subscriptionID = this.subscribers.push({
14939
14751
  startTime: (0,victory_vendor_d3_timer__WEBPACK_IMPORTED_MODULE_0__.now)(),
14940
14752
  callback: callback,
14941
- duration: duration
14753
+ duration: this.shouldAnimate ? duration : 0
14942
14754
  });
14943
14755
  this.activeSubscriptions++;
14944
14756
  this.start();
@@ -15125,36 +14937,38 @@ function getInitialChildProps(animate, data) {
15125
14937
 
15126
14938
 
15127
14939
  function getChildBeforeLoad(animate, child, data, cb) {
15128
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
14940
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
15129
14941
  onEnd: cb
15130
14942
  });
15131
14943
 
15132
- if (animate && animate.onLoad && !animate.onLoad.duration) {
14944
+ if (newAnimate && newAnimate.onLoad && !newAnimate.onLoad.duration) {
15133
14945
  return {
15134
- animate: animate,
14946
+ animate: newAnimate,
15135
14947
  data: data
15136
14948
  };
15137
14949
  }
15138
14950
 
15139
- var before = animate.onLoad && animate.onLoad.before ? animate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onLoad.before function.
14951
+ var before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onLoad.before function.
15140
14952
 
15141
- data = data.map(function (datum, idx) {
14953
+ var newData = data.map(function (datum, idx) {
15142
14954
  return lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data));
15143
14955
  });
15144
14956
  return {
15145
- animate: animate,
15146
- data: data,
14957
+ animate: newAnimate,
14958
+ data: newData,
15147
14959
  clipWidth: 0
15148
14960
  };
15149
14961
  } // eslint-disable-next-line max-params
15150
14962
 
15151
14963
 
15152
14964
  function getChildOnLoad(animate, data, cb) {
15153
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
14965
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
15154
14966
  onEnd: cb
15155
14967
  });
15156
14968
 
15157
- if (animate && animate.onLoad && !animate.onLoad.duration) {
14969
+ var newData = data;
14970
+
14971
+ if (newAnimate && newAnimate.onLoad && !newAnimate.onLoad.duration) {
15158
14972
  return {
15159
14973
  animate: animate,
15160
14974
  data: data
@@ -15163,12 +14977,12 @@ function getChildOnLoad(animate, data, cb) {
15163
14977
 
15164
14978
  var after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onLoad.after function.
15165
14979
 
15166
- data = data.map(function (datum, idx) {
14980
+ newData = data.map(function (datum, idx) {
15167
14981
  return lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, after(datum, idx, data));
15168
14982
  });
15169
14983
  return {
15170
- animate: animate,
15171
- data: data
14984
+ animate: newAnimate,
14985
+ data: newData
15172
14986
  };
15173
14987
  } // eslint-disable-next-line max-params, max-len
15174
14988
 
@@ -15177,7 +14991,10 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
15177
14991
  // Whether or not _this_ child has exiting nodes, we want the exit-
15178
14992
  // transition for all children to have the same duration, delay, etc.
15179
14993
  var onExit = animate && animate.onExit;
15180
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onExit);
14994
+
14995
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onExit);
14996
+
14997
+ var newData = data;
15181
14998
 
15182
14999
  if (exitingNodes) {
15183
15000
  // After the exit transition occurs, trigger the animations for
@@ -15185,39 +15002,42 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
15185
15002
  animate.onEnd = cb;
15186
15003
  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.
15187
15004
 
15188
- data = data.map(function (datum, idx) {
15005
+ newData = data.map(function (datum, idx) {
15189
15006
  var key = (datum.key || idx).toString();
15190
15007
  return exitingNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data)) : datum;
15191
15008
  });
15192
15009
  }
15193
15010
 
15194
15011
  return {
15195
- animate: animate,
15196
- data: data
15012
+ animate: newAnimate,
15013
+ data: newData
15197
15014
  };
15198
15015
  } // eslint-disable-next-line max-params,max-len
15199
15016
 
15200
15017
 
15201
15018
  function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
15019
+ var newAnimate = animate;
15020
+ var newData = data;
15021
+
15202
15022
  if (enteringNodes) {
15203
15023
  // Perform a normal animation here, except - when it finishes - trigger
15204
15024
  // the transition for entering nodes.
15205
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
15025
+ newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
15206
15026
  onEnd: cb
15207
15027
  });
15208
15028
  var before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // We want the entering nodes to be included in the transition target
15209
15029
  // domain. However, we may not want these nodes to be displayed initially,
15210
15030
  // so perform the `onEnter.before` transformation on each node.
15211
15031
 
15212
- data = data.map(function (datum, idx) {
15032
+ newData = data.map(function (datum, idx) {
15213
15033
  var key = (datum.key || idx).toString();
15214
15034
  return enteringNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data)) : datum;
15215
15035
  });
15216
15036
  }
15217
15037
 
15218
15038
  return {
15219
- animate: animate,
15220
- data: data
15039
+ animate: newAnimate,
15040
+ data: newData
15221
15041
  };
15222
15042
  } // eslint-disable-next-line max-params, max-len
15223
15043
 
@@ -15226,23 +15046,26 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
15226
15046
  // Whether or not _this_ child has entering nodes, we want the entering-
15227
15047
  // transition for all children to have the same duration, delay, etc.
15228
15048
  var onEnter = animate && animate.onEnter;
15229
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onEnter);
15049
+
15050
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onEnter);
15051
+
15052
+ var newData = data;
15230
15053
 
15231
15054
  if (enteringNodes) {
15232
15055
  // Old nodes have been transitioned to their new values, and the
15233
15056
  // domain should encompass the nodes that will now enter. So perform
15234
15057
  // the `onEnter.after` transformation on each node.
15235
- animate.onEnd = cb;
15236
- var after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default());
15237
- data = data.map(function (datum, idx) {
15058
+ newAnimate.onEnd = cb;
15059
+ var after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default());
15060
+ newData = data.map(function (datum, idx) {
15238
15061
  var key = getDatumKey(datum, idx);
15239
15062
  return enteringNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, after(datum, idx, data)) : datum;
15240
15063
  });
15241
15064
  }
15242
15065
 
15243
15066
  return {
15244
- animate: animate,
15245
- data: data
15067
+ animate: newAnimate,
15068
+ data: newData
15246
15069
  };
15247
15070
  }
15248
15071
  /**
@@ -15408,6 +15231,7 @@ function getTransitionPropsFactory(props, state, setState) {
15408
15231
  "use strict";
15409
15232
  __webpack_require__.r(__webpack_exports__);
15410
15233
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15234
+ /* harmony export */ "assert": () => (/* binding */ assert),
15411
15235
  /* harmony export */ "getSafeUserProps": () => (/* binding */ getSafeUserProps),
15412
15236
  /* harmony export */ "withSafeUserProps": () => (/* binding */ withSafeUserProps)
15413
15237
  /* harmony export */ });
@@ -15488,6 +15312,18 @@ var testIfSafeProp = function (key) {
15488
15312
  if (doesPropStartWith(key) || isExactMatch(key)) return true;
15489
15313
  return false;
15490
15314
  };
15315
+ /**
15316
+ * Asserts that value is not null or undefined, throwing an error if it is.
15317
+ * @param value The value to assert
15318
+ * @param message The error message to throw
15319
+ */
15320
+
15321
+
15322
+ function assert(value, message) {
15323
+ if (value === undefined || value === null) {
15324
+ throw new Error(message);
15325
+ }
15326
+ }
15491
15327
  /**
15492
15328
  * getSafeUserProps - function that takes in a props object and removes any
15493
15329
  * key-value entries that do not match filter strings in the USER_PROPS_SAFELIST
@@ -15497,7 +15333,6 @@ var testIfSafeProp = function (key) {
15497
15333
  * @returns {Object}: object containing remaining acceptable props
15498
15334
  */
15499
15335
 
15500
-
15501
15336
  var getSafeUserProps = function (props) {
15502
15337
  var propsToFilter = _objectSpread({}, props);
15503
15338
 
@@ -28132,13 +27967,13 @@ var __webpack_exports__ = {};
28132
27967
  (() => {
28133
27968
  "use strict";
28134
27969
  /*!******************!*\
28135
- !*** ./index.js ***!
27970
+ !*** ./index.ts ***!
28136
27971
  \******************/
28137
27972
  __webpack_require__.r(__webpack_exports__);
28138
27973
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
28139
- /* harmony export */ "VictoryHistogram": () => (/* reexport safe */ _victory_histogram__WEBPACK_IMPORTED_MODULE_0__["default"])
27974
+ /* harmony export */ "VictoryHistogram": () => (/* reexport safe */ _victory_histogram__WEBPACK_IMPORTED_MODULE_0__.VictoryHistogram)
28140
27975
  /* harmony export */ });
28141
- /* harmony import */ var _victory_histogram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-histogram */ "./victory-histogram.js");
27976
+ /* harmony import */ var _victory_histogram__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./victory-histogram */ "./victory-histogram.tsx");
28142
27977
 
28143
27978
  })();
28144
27979