victory-chart 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.
@@ -121,12 +121,11 @@ function getStyles(props) {
121
121
  };
122
122
  }
123
123
 
124
- function getCalculatedProps(props, childComponents) {
125
- var style = getStyles(props);
126
- props = victory_core__WEBPACK_IMPORTED_MODULE_4__.modifyProps(props, fallbackProps, "chart");
127
- var _props = props,
128
- horizontal = _props.horizontal,
129
- polar = _props.polar;
124
+ function getCalculatedProps(initialProps, childComponents) {
125
+ var style = getStyles(initialProps);
126
+ var props = victory_core__WEBPACK_IMPORTED_MODULE_4__.modifyProps(initialProps, fallbackProps, "chart");
127
+ var horizontal = props.horizontal,
128
+ polar = props.polar;
130
129
  var allStrings = victory_core__WEBPACK_IMPORTED_MODULE_5__.getStringsFromChildren(props, childComponents);
131
130
  var categories = victory_core__WEBPACK_IMPORTED_MODULE_5__.getCategories(props, childComponents, allStrings);
132
131
  var stringMap = createStringMap(props, childComponents, allStrings);
@@ -165,23 +164,22 @@ function getCalculatedProps(props, childComponents) {
165
164
  };
166
165
  }
167
166
  function getChildren(props, childComponents, calculatedProps) {
168
- childComponents = childComponents || getChildComponents(props);
169
- calculatedProps = calculatedProps || getCalculatedProps(props, childComponents);
170
- var baseStyle = calculatedProps.style.parent;
167
+ var children = childComponents || getChildComponents(props);
168
+ var newCalculatedProps = calculatedProps || getCalculatedProps(props, children);
169
+ var baseStyle = newCalculatedProps.style.parent;
171
170
  var height = props.height,
172
171
  polar = props.polar,
173
172
  theme = props.theme,
174
173
  width = props.width;
175
- var _calculatedProps = calculatedProps,
176
- origin = _calculatedProps.origin,
177
- horizontal = _calculatedProps.horizontal;
174
+ var origin = newCalculatedProps.origin,
175
+ horizontal = newCalculatedProps.horizontal;
178
176
  var parentName = props.name || "chart";
179
- return childComponents.filter((react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement)).map(function (child, index) {
177
+ return children.filter((react__WEBPACK_IMPORTED_MODULE_2___default().isValidElement)).map(function (child, index) {
180
178
  var role = child.type && child.type.role;
181
179
  var style = Array.isArray(child.props.style) ? child.props.style : lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, child.props.style, {
182
180
  parent: baseStyle
183
181
  });
184
- var childProps = getChildProps(child, props, calculatedProps);
182
+ var childProps = getChildProps(child, props, newCalculatedProps);
185
183
  var name = child.props.name || "".concat(parentName, "-").concat(role, "-").concat(index);
186
184
 
187
185
  var newProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({
@@ -193,7 +191,7 @@ function getChildren(props, childComponents, calculatedProps) {
193
191
  style: style,
194
192
  name: name,
195
193
  origin: polar ? origin : undefined,
196
- padding: calculatedProps.padding,
194
+ padding: newCalculatedProps.padding,
197
195
  key: "".concat(name, "-key-").concat(index),
198
196
  standalone: false
199
197
  }, childProps);
@@ -221,9 +219,9 @@ var getChildComponents = function (props, defaultAxes) {
221
219
  };
222
220
 
223
221
  var getDomain = function (props, axis, childComponents) {
224
- childComponents = childComponents || react__WEBPACK_IMPORTED_MODULE_2___default().Children.toArray(props.children);
225
- var domain = victory_core__WEBPACK_IMPORTED_MODULE_5__.getDomain(props, axis, childComponents);
226
- var axisComponent = victory_core__WEBPACK_IMPORTED_MODULE_3__.getAxisComponent(childComponents, axis);
222
+ var children = childComponents || react__WEBPACK_IMPORTED_MODULE_2___default().Children.toArray(props.children);
223
+ var domain = victory_core__WEBPACK_IMPORTED_MODULE_5__.getDomain(props, axis, children);
224
+ var axisComponent = victory_core__WEBPACK_IMPORTED_MODULE_3__.getAxisComponent(children, axis);
227
225
  var invertDomain = axisComponent && axisComponent.props && axisComponent.props.invertAxis;
228
226
  return invertDomain ? domain.concat().reverse() : domain;
229
227
  };
@@ -315,8 +313,8 @@ var defaultProps = {
315
313
  })
316
314
  },
317
315
  defaultPolarAxes: {
318
- independent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_polar_axis__WEBPACK_IMPORTED_MODULE_8__["default"], null),
319
- dependent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_polar_axis__WEBPACK_IMPORTED_MODULE_8__["default"], {
316
+ independent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_polar_axis__WEBPACK_IMPORTED_MODULE_8__.VictoryPolarAxis, null),
317
+ dependent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_polar_axis__WEBPACK_IMPORTED_MODULE_8__.VictoryPolarAxis, {
320
318
  dependentAxis: true
321
319
  })
322
320
  },
@@ -326,7 +324,9 @@ var defaultProps = {
326
324
  };
327
325
 
328
326
  var VictoryChartImpl = function (initialProps) {
329
- initialProps = _objectSpread(_objectSpread({}, defaultProps), initialProps);
327
+ var propsWithDefaults = react__WEBPACK_IMPORTED_MODULE_3___default().useMemo(function () {
328
+ return _objectSpread(_objectSpread({}, defaultProps), initialProps);
329
+ }, [initialProps]);
330
330
  var role = "chart";
331
331
 
332
332
  var _Hooks$useAnimationSt = victory_core__WEBPACK_IMPORTED_MODULE_10__.useAnimationState(),
@@ -334,7 +334,7 @@ var VictoryChartImpl = function (initialProps) {
334
334
  setAnimationState = _Hooks$useAnimationSt.setAnimationState,
335
335
  getProps = _Hooks$useAnimationSt.getProps;
336
336
 
337
- var props = getProps(initialProps);
337
+ var props = getProps(propsWithDefaults);
338
338
  var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_11__.modifyProps(props, fallbackProps, role);
339
339
  var desc = modifiedProps.desc,
340
340
  eventKey = modifiedProps.eventKey,
@@ -400,28 +400,28 @@ var VictoryChartImpl = function (initialProps) {
400
400
  }, [desc, domain, height, horizontal, name, origin, polar, scale, standalone, style, title, theme, width]);
401
401
  var container = react__WEBPACK_IMPORTED_MODULE_3___default().useMemo(function () {
402
402
  if (standalone) {
403
- var defaultContainerProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, containerComponent.props, containerProps, victory_core__WEBPACK_IMPORTED_MODULE_13__.getSafeUserProps(initialProps));
403
+ var defaultContainerProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_2___default()({}, containerComponent.props, containerProps, victory_core__WEBPACK_IMPORTED_MODULE_13__.getSafeUserProps(propsWithDefaults));
404
404
 
405
405
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(containerComponent, defaultContainerProps);
406
406
  }
407
407
 
408
408
  return groupComponent;
409
- }, [groupComponent, standalone, containerComponent, containerProps, initialProps]);
409
+ }, [groupComponent, standalone, containerComponent, containerProps, propsWithDefaults]);
410
410
  var events = react__WEBPACK_IMPORTED_MODULE_3___default().useMemo(function () {
411
411
  return victory_core__WEBPACK_IMPORTED_MODULE_14__.getAllEvents(props);
412
412
  }, [props]);
413
- var previousProps = victory_core__WEBPACK_IMPORTED_MODULE_15__.usePreviousProps(initialProps);
413
+ var previousProps = victory_core__WEBPACK_IMPORTED_MODULE_15__.usePreviousProps(propsWithDefaults);
414
414
  react__WEBPACK_IMPORTED_MODULE_3___default().useEffect(function () {
415
415
  // This is called before dismount to keep state in sync
416
416
  return function () {
417
- if (initialProps.animate) {
418
- setAnimationState(previousProps, initialProps);
417
+ if (propsWithDefaults.animate) {
418
+ setAnimationState(previousProps, propsWithDefaults);
419
419
  }
420
420
  };
421
- }, [setAnimationState, previousProps, initialProps]);
421
+ }, [setAnimationState, previousProps, propsWithDefaults]);
422
422
 
423
423
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default()(events)) {
424
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_shared_events__WEBPACK_IMPORTED_MODULE_16__["default"], {
424
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_shared_events__WEBPACK_IMPORTED_MODULE_16__.VictorySharedEvents, {
425
425
  container: container,
426
426
  eventKey: eventKey,
427
427
  events: events,
@@ -7783,9 +7783,9 @@ var getStyleObject = function (props) {
7783
7783
  return generalAxisStyle && specificAxisStyle ? mergeStyles() : specificAxisStyle || generalAxisStyle;
7784
7784
  };
7785
7785
 
7786
- var getStyles = function (props, styleObject) {
7786
+ var getStyles = function (props) {
7787
+ var styleObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
7787
7788
  var style = props.style || {};
7788
- styleObject = styleObject || {};
7789
7789
  var parentStyleProps = {
7790
7790
  height: "100%",
7791
7791
  width: "100%"
@@ -8242,8 +8242,8 @@ var getCalculatedValues = function (props) {
8242
8242
  };
8243
8243
  };
8244
8244
 
8245
- var getBaseProps = function (props, fallbackProps) {
8246
- props = victory_core__WEBPACK_IMPORTED_MODULE_2__.modifyProps(props, fallbackProps);
8245
+ var getBaseProps = function (initialProps, fallbackProps) {
8246
+ var props = victory_core__WEBPACK_IMPORTED_MODULE_2__.modifyProps(initialProps, fallbackProps);
8247
8247
  var calculatedValues = getCalculatedValues(props);
8248
8248
  var axis = calculatedValues.axis,
8249
8249
  style = calculatedValues.style,
@@ -8256,14 +8256,13 @@ var getBaseProps = function (props, fallbackProps) {
8256
8256
  domain = calculatedValues.domain,
8257
8257
  stringTicks = calculatedValues.stringTicks;
8258
8258
  var otherAxis = axis === "x" ? "y" : "x";
8259
- var _props = props,
8260
- width = _props.width,
8261
- height = _props.height,
8262
- standalone = _props.standalone,
8263
- theme = _props.theme,
8264
- polar = _props.polar,
8265
- padding = _props.padding,
8266
- horizontal = _props.horizontal;
8259
+ var width = props.width,
8260
+ height = props.height,
8261
+ standalone = props.standalone,
8262
+ theme = props.theme,
8263
+ polar = props.polar,
8264
+ padding = props.padding,
8265
+ horizontal = props.horizontal;
8267
8266
 
8268
8267
  var _getLayoutProps = getLayoutProps(props, calculatedValues),
8269
8268
  globalTransform = _getLayoutProps.globalTransform,
@@ -8797,12 +8796,12 @@ var interpolateFunction = function (a, b) {
8797
8796
  * differs in that it uses our custom interpolators when interpolating the value of each property in
8798
8797
  * an object. This allows the correct interpolation of nested objects, including styles
8799
8798
  *
8800
- * @param {any} a - Start value.
8801
- * @param {any} b - End value.
8799
+ * @param {any} startValue - Start value.
8800
+ * @param {any} endValue - End value.
8802
8801
  * @returns {Function} An interpolation function.
8803
8802
  */
8804
8803
 
8805
- var interpolateObject = function (a, b) {
8804
+ var interpolateObject = function (startValue, endValue) {
8806
8805
  var interpolateTypes = function (x, y) {
8807
8806
  if (x === y || !isInterpolatable(x) || !isInterpolatable(y)) {
8808
8807
  return interpolateImmediate(x, y);
@@ -8827,6 +8826,8 @@ var interpolateObject = function (a, b) {
8827
8826
 
8828
8827
  var i = {};
8829
8828
  var c = {};
8829
+ var a = startValue;
8830
+ var b = endValue;
8830
8831
  var k;
8831
8832
 
8832
8833
  if (a === null || typeof a !== "object") {
@@ -8994,8 +8995,8 @@ var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
8994
8995
  step can generate imprecise values, sometimes greater than 1
8995
8996
  if this happens set the state to 1 and return, cancelling the timer
8996
8997
  */
8997
- duration = duration !== undefined ? duration : _this.props.duration;
8998
- var step = duration ? elapsed / duration : 1;
8998
+ var animationDuration = duration !== undefined ? duration : _this.props.duration;
8999
+ var step = animationDuration ? elapsed / animationDuration : 1;
8999
9000
 
9000
9001
  if (step >= 1) {
9001
9002
  _this.setState({
@@ -9611,8 +9612,7 @@ var getStyles = function (style, props) {
9611
9612
  }
9612
9613
 
9613
9614
  var getSingleStyle = function (s) {
9614
- s = s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles;
9615
- var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s, props);
9615
+ var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles, props);
9616
9616
  return lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, baseStyles, {
9617
9617
  fontSize: getFontSize(baseStyles)
9618
9618
  });
@@ -9816,22 +9816,19 @@ var getInlineXOffset = function (calculatedProps, textElements, index) {
9816
9816
  switch (textAnchor) {
9817
9817
  case "start":
9818
9818
  return widths.reduce(function (memo, width, i) {
9819
- memo = i < index ? memo + width : memo;
9820
- return memo;
9819
+ return i < index ? memo + width : memo;
9821
9820
  }, 0);
9822
9821
 
9823
9822
  case "end":
9824
9823
  return widths.reduce(function (memo, width, i) {
9825
- memo = i > index ? memo - width : memo;
9826
- return memo;
9824
+ return i > index ? memo - width : memo;
9827
9825
  }, 0);
9828
9826
 
9829
9827
  default:
9830
9828
  // middle
9831
9829
  return widths.reduce(function (memo, width, i) {
9832
9830
  var offsetWidth = i < index ? width : 0;
9833
- memo = i === index ? memo + width / 2 : memo + offsetWidth;
9834
- return memo;
9831
+ return i === index ? memo + width / 2 : memo + offsetWidth;
9835
9832
  }, centerOffset);
9836
9833
  }
9837
9834
  };
@@ -9963,7 +9960,7 @@ var getCalculatedProps = function (props) {
9963
9960
  verticalAnchor: verticalAnchor,
9964
9961
  dx: dx,
9965
9962
  dy: dy,
9966
- originalDy: props.dy,
9963
+ originalDy: _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.dy, props),
9967
9964
  transform: transform,
9968
9965
  x: x,
9969
9966
  y: y
@@ -10033,8 +10030,8 @@ var defaultProps = {
10033
10030
  // Magic number from d3.
10034
10031
  lineHeight: 1
10035
10032
  };
10036
- var VictoryLabel = function (props) {
10037
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
10033
+ var VictoryLabel = function (initialProps) {
10034
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
10038
10035
 
10039
10036
  if (props.text === null || props.text === undefined) {
10040
10037
  return null;
@@ -10055,7 +10052,7 @@ var VictoryLabel = function (props) {
10055
10052
  fontSize: currentStyle.fontSize || defaultStyles.fontSize,
10056
10053
  capHeight: capHeightPx,
10057
10054
  text: line,
10058
- // @ts-expect-error TODO: This looks like a bug:
10055
+ // TODO: This looks like a bug:
10059
10056
  textSize: _victory_util_textsize__WEBPACK_IMPORTED_MODULE_12__.approximateTextSize(line, currentStyle),
10060
10057
  lineHeight: currentLineHeight,
10061
10058
  backgroundPadding: getSingleValue(backgroundPadding, i)
@@ -10495,8 +10492,8 @@ var defaultProps = {
10495
10492
  role: "presentation",
10496
10493
  shapeRendering: "auto"
10497
10494
  };
10498
- var Arc = function (props) {
10499
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
10495
+ var Arc = function (initialProps) {
10496
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
10500
10497
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.pathComponent, _objectSpread(_objectSpread({}, props.events), {}, {
10501
10498
  "aria-label": props.ariaLabel,
10502
10499
  d: getArcPath(props),
@@ -10576,8 +10573,8 @@ var defaultProps = {
10576
10573
  role: "presentation",
10577
10574
  shapeRendering: "auto"
10578
10575
  };
10579
- var Background = function (props) {
10580
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
10576
+ var Background = function (initialProps) {
10577
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
10581
10578
  return props.polar ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.circleComponent, _objectSpread(_objectSpread({}, props.events), {}, {
10582
10579
  style: props.style,
10583
10580
  role: props.role,
@@ -10733,8 +10730,8 @@ var defaultProps = {
10733
10730
  role: "presentation",
10734
10731
  shapeRendering: "auto"
10735
10732
  };
10736
- var LineSegment = function (props) {
10737
- props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), props));
10733
+ var LineSegment = function (initialProps) {
10734
+ var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
10738
10735
  return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().cloneElement(props.lineComponent, _objectSpread(_objectSpread({}, props.events), {}, {
10739
10736
  "aria-label": props.ariaLabel,
10740
10737
  style: props.style,
@@ -12161,8 +12158,7 @@ function addEvents(WrappedComponent) {
12161
12158
  value: function applyExternalMutations(props, externalMutations) {
12162
12159
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
12163
12160
  var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
12164
- memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
12165
- return memo;
12161
+ return lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
12166
12162
  }, []);
12167
12163
  var compiledCallbacks = callbacks.length ? function () {
12168
12164
  callbacks.forEach(function (c) {
@@ -12217,8 +12213,8 @@ function addEvents(WrappedComponent) {
12217
12213
  }, {
12218
12214
  key: "getBaseProps",
12219
12215
  value: function getBaseProps(props, getSharedEventState) {
12220
- getSharedEventState = getSharedEventState || this.getSharedEventState.bind(this);
12221
- var sharedParentState = getSharedEventState("parent", "parent");
12216
+ var getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
12217
+ var sharedParentState = getSharedEventStateFunction("parent", "parent");
12222
12218
  var parentState = this.getEventState("parent", "parent");
12223
12219
 
12224
12220
  var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
@@ -12253,13 +12249,15 @@ function addEvents(WrappedComponent) {
12253
12249
  return undefined;
12254
12250
  }
12255
12251
 
12252
+ var currentProps = component && typeof component === "object" && "props" in component ? component.props : undefined;
12253
+
12256
12254
  if (this.hasEvents) {
12257
12255
  var baseEvents = this.getEvents(this.props, type, key);
12258
12256
 
12259
12257
  var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
12260
12258
  index: index,
12261
12259
  key: id
12262
- }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
12260
+ }, this.getEventState(key, type), this.getSharedEventState(key, type), currentProps, baseProps, {
12263
12261
  id: id
12264
12262
  });
12265
12263
 
@@ -12273,7 +12271,7 @@ function addEvents(WrappedComponent) {
12273
12271
  return lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({
12274
12272
  index: index,
12275
12273
  key: id
12276
- }, component.props, baseProps, {
12274
+ }, currentProps, baseProps, {
12277
12275
  id: id
12278
12276
  });
12279
12277
  }
@@ -12315,13 +12313,15 @@ function addEvents(WrappedComponent) {
12315
12313
  var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
12316
12314
 
12317
12315
  var labelComponents = dataKeys.reduce(function (memo, key) {
12316
+ var newMemo = memo;
12317
+
12318
12318
  var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
12319
12319
 
12320
12320
  if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
12321
- memo = memo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
12321
+ newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
12322
12322
  }
12323
12323
 
12324
- return memo;
12324
+ return newMemo;
12325
12325
  }, []);
12326
12326
  var dataProps = this.getComponentProps(dataComponent, "data", "all");
12327
12327
  var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
@@ -12467,11 +12467,11 @@ function getAxis(props) {
12467
12467
  */
12468
12468
 
12469
12469
  function findAxisComponents(childComponents, predicate) {
12470
- predicate = predicate || (lodash_identity__WEBPACK_IMPORTED_MODULE_9___default());
12470
+ var predicateFunction = predicate || (lodash_identity__WEBPACK_IMPORTED_MODULE_9___default());
12471
12471
 
12472
12472
  var findAxes = function (children) {
12473
12473
  return children.reduce(function (memo, child) {
12474
- if (child.type && child.type.role === "axis" && predicate(child)) {
12474
+ if (child.type && child.type.role === "axis" && predicateFunction(child)) {
12475
12475
  return memo.concat(child);
12476
12476
  } else if (child.props && child.props.children) {
12477
12477
  return memo.concat(findAxes(react__WEBPACK_IMPORTED_MODULE_12___default().Children.toArray(child.props.children)));
@@ -13215,12 +13215,14 @@ function sortData(dataset, sortKey) {
13215
13215
  } // Ensures previous VictoryLine api for sortKey prop stays consistent
13216
13216
 
13217
13217
 
13218
+ var formattedSortKey = sortKey;
13219
+
13218
13220
  if (sortKey === "x" || sortKey === "y") {
13219
- sortKey = "_".concat(sortKey);
13221
+ formattedSortKey = "_".concat(sortKey);
13220
13222
  }
13221
13223
 
13222
13224
  var order = sortOrder === "ascending" ? "asc" : "desc";
13223
- return lodash_orderBy__WEBPACK_IMPORTED_MODULE_5___default()(dataset, sortKey, order);
13225
+ return lodash_orderBy__WEBPACK_IMPORTED_MODULE_5___default()(dataset, formattedSortKey, order);
13224
13226
  } // This method will remove data points that break certain scales. (log scale only)
13225
13227
 
13226
13228
 
@@ -13411,7 +13413,10 @@ function formatData(dataset, props, expectedKeys) {
13411
13413
  return [];
13412
13414
  }
13413
13415
 
13414
- var defaultKeys = ["x", "y", "y0"];
13416
+ var defaultKeys = ["x", "y", "y0"]; // TODO: We shouldn’t mutate the expectedKeys param here,
13417
+ // but we need to figure out why changing it causes regressions in tests.
13418
+ // eslint-disable-next-line no-param-reassign
13419
+
13415
13420
  expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
13416
13421
 
13417
13422
  var createAccessor = function (name) {
@@ -13436,13 +13441,13 @@ function formatData(dataset, props, expectedKeys) {
13436
13441
 
13437
13442
  var data = preformattedData ? dataset : dataset.reduce(function (dataArr, datum, index) {
13438
13443
  // eslint-disable-line complexity
13439
- datum = parseDatum(datum);
13444
+ var parsedDatum = parseDatum(datum);
13440
13445
  var fallbackValues = {
13441
13446
  x: index,
13442
- y: datum
13447
+ y: parsedDatum
13443
13448
  };
13444
13449
  var processedValues = expectedKeys.reduce(function (memo, type) {
13445
- var processedValue = accessor[type](datum);
13450
+ var processedValue = accessor[type](parsedDatum);
13446
13451
  var value = processedValue !== undefined ? processedValue : fallbackValues[type];
13447
13452
 
13448
13453
  if (value !== undefined) {
@@ -13457,7 +13462,7 @@ function formatData(dataset, props, expectedKeys) {
13457
13462
  return memo;
13458
13463
  }, {});
13459
13464
 
13460
- var formattedDatum = lodash_assign__WEBPACK_IMPORTED_MODULE_12___default()({}, processedValues, datum);
13465
+ var formattedDatum = lodash_assign__WEBPACK_IMPORTED_MODULE_12___default()({}, processedValues, parsedDatum);
13461
13466
 
13462
13467
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(formattedDatum)) {
13463
13468
  dataArr.push(formattedDatum);
@@ -13568,8 +13573,8 @@ function getStringsFromData(props, axis) {
13568
13573
  }, []);
13569
13574
  var sortedData = sortData(data, props.sortKey, props.sortOrder);
13570
13575
  var dataStrings = sortedData.reduce(function (dataArr, datum) {
13571
- datum = parseDatum(datum);
13572
- dataArr.push(accessor(datum));
13576
+ var parsedDatum = parseDatum(datum);
13577
+ dataArr.push(accessor(parsedDatum));
13573
13578
  return dataArr;
13574
13579
  }, []).filter(function (datum) {
13575
13580
  return typeof datum === "string";
@@ -13813,18 +13818,18 @@ function padDomain(domain, props, axis) {
13813
13818
 
13814
13819
 
13815
13820
  function createDomainFunction(getDomainFromDataFunction, formatDomainFunction) {
13816
- getDomainFromDataFunction = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(getDomainFromDataFunction) ? getDomainFromDataFunction : getDomainFromData;
13817
- formatDomainFunction = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(formatDomainFunction) ? formatDomainFunction : formatDomain;
13821
+ var getDomainFromDataFn = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(getDomainFromDataFunction) ? getDomainFromDataFunction : getDomainFromData;
13822
+ var formatDomainFn = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(formatDomainFunction) ? formatDomainFunction : formatDomain;
13818
13823
  return function (props, axis) {
13819
13824
  var propsDomain = getDomainFromProps(props, axis);
13820
13825
 
13821
13826
  if (propsDomain) {
13822
- return formatDomainFunction(propsDomain, props, axis);
13827
+ return formatDomainFn(propsDomain, props, axis);
13823
13828
  }
13824
13829
 
13825
13830
  var categories = _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
13826
- var domain = categories ? getDomainFromCategories(props, axis, categories) : getDomainFromDataFunction(props, axis);
13827
- return domain ? formatDomainFunction(domain, props, axis) : undefined;
13831
+ var domain = categories ? getDomainFromCategories(props, axis, categories) : getDomainFromDataFn(props, axis);
13832
+ return domain ? formatDomainFn(domain, props, axis) : undefined;
13828
13833
  };
13829
13834
  }
13830
13835
  /**
@@ -13857,27 +13862,27 @@ function getDomain(props, axis) {
13857
13862
  */
13858
13863
 
13859
13864
  function getDomainFromCategories(props, axis, categories) {
13860
- categories = categories || _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
13865
+ var categoriesArray = categories || _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
13861
13866
  var polar = props.polar,
13862
13867
  _props$startAngle = props.startAngle,
13863
13868
  startAngle = _props$startAngle === void 0 ? 0 : _props$startAngle,
13864
13869
  _props$endAngle = props.endAngle,
13865
13870
  endAngle = _props$endAngle === void 0 ? 360 : _props$endAngle;
13866
13871
 
13867
- if (!categories) {
13872
+ if (!categoriesArray) {
13868
13873
  return undefined;
13869
13874
  }
13870
13875
 
13871
13876
  var minDomain = getMinFromProps(props, axis);
13872
13877
  var maxDomain = getMaxFromProps(props, axis);
13873
- var stringArray = _collection__WEBPACK_IMPORTED_MODULE_8__.containsStrings(categories) ? _data__WEBPACK_IMPORTED_MODULE_10__.getStringsFromCategories(props, axis) : [];
13878
+ var stringArray = _collection__WEBPACK_IMPORTED_MODULE_8__.containsStrings(categoriesArray) ? _data__WEBPACK_IMPORTED_MODULE_10__.getStringsFromCategories(props, axis) : [];
13874
13879
  var stringMap = stringArray.length === 0 ? null : stringArray.reduce(function (memo, string, index) {
13875
13880
  memo[string] = index + 1;
13876
13881
  return memo;
13877
13882
  }, {});
13878
- var categoryValues = stringMap ? categories.map(function (value) {
13883
+ var categoryValues = stringMap ? categoriesArray.map(function (value) {
13879
13884
  return stringMap[value];
13880
- }) : categories;
13885
+ }) : categoriesArray;
13881
13886
  var min = minDomain !== undefined ? minDomain : _collection__WEBPACK_IMPORTED_MODULE_8__.getMinValue(categoryValues);
13882
13887
  var max = maxDomain !== undefined ? maxDomain : _collection__WEBPACK_IMPORTED_MODULE_8__.getMaxValue(categoryValues);
13883
13888
  var categoryDomain = getDomainFromMinMax(min, max);
@@ -13892,7 +13897,7 @@ function getDomainFromCategories(props, axis, categories) {
13892
13897
  */
13893
13898
 
13894
13899
  function getDomainFromData(props, axis, dataset) {
13895
- dataset = dataset || _data__WEBPACK_IMPORTED_MODULE_10__.getData(props);
13900
+ var datasetArray = dataset || _data__WEBPACK_IMPORTED_MODULE_10__.getData(props);
13896
13901
  var polar = props.polar,
13897
13902
  _props$startAngle2 = props.startAngle,
13898
13903
  startAngle = _props$startAngle2 === void 0 ? 0 : _props$startAngle2,
@@ -13901,14 +13906,14 @@ function getDomainFromData(props, axis, dataset) {
13901
13906
  var minDomain = getMinFromProps(props, axis);
13902
13907
  var maxDomain = getMaxFromProps(props, axis);
13903
13908
 
13904
- if (dataset.length < 1) {
13909
+ if (datasetArray.length < 1) {
13905
13910
  return minDomain !== undefined && maxDomain !== undefined ? getDomainFromMinMax(minDomain, maxDomain) : undefined;
13906
13911
  }
13907
13912
 
13908
- var min = minDomain !== undefined ? minDomain : getExtremeFromData(dataset, axis, "min");
13909
- var max = maxDomain !== undefined ? maxDomain : getExtremeFromData(dataset, axis, "max");
13913
+ var min = minDomain !== undefined ? minDomain : getExtremeFromData(datasetArray, axis, "min");
13914
+ var max = maxDomain !== undefined ? maxDomain : getExtremeFromData(datasetArray, axis, "max");
13910
13915
  var domain = getDomainFromMinMax(min, max);
13911
- return polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? getSymmetricDomain(domain, getFlatData(dataset, axis)) : domain;
13916
+ return polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? getSymmetricDomain(domain, getFlatData(datasetArray, axis)) : domain;
13912
13917
  }
13913
13918
  /**
13914
13919
  * Returns a domain in the form of a two element array given a min and max value.
@@ -14221,14 +14226,14 @@ function getScopedEvents(events, namespace, childType, baseProps) {
14221
14226
  // eslint-disable-next-line no-invalid-this
14222
14227
 
14223
14228
 
14224
- baseProps = baseProps || this.baseProps; // returns the original base props or base state of a given target element
14229
+ var newBaseProps = baseProps || this.baseProps; // returns the original base props or base state of a given target element
14225
14230
 
14226
14231
  var getTargetProps = function (identifier, type) {
14227
14232
  var childName = identifier.childName,
14228
14233
  target = identifier.target,
14229
14234
  key = identifier.key; // eslint-disable-next-line no-invalid-this
14230
14235
 
14231
- var baseType = type === "props" ? baseProps : _this2.state || {};
14236
+ var baseType = type === "props" ? newBaseProps : _this2.state || {};
14232
14237
  var base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
14233
14238
  return key === "parent" ? base.parent : base[key] && base[key][target];
14234
14239
  }; // Returns the state object with the mutation caused by a given eventReturn
@@ -14316,8 +14321,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
14316
14321
 
14317
14322
  var parseEventReturn = function (eventReturn, eventKey) {
14318
14323
  return Array.isArray(eventReturn) ? eventReturn.reduce(function (memo, props) {
14319
- memo = lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, memo, parseEvent(props, eventKey));
14320
- return memo;
14324
+ return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, memo, parseEvent(props, eventKey));
14321
14325
  }, {}) : parseEvent(eventReturn, eventKey);
14322
14326
  };
14323
14327
 
@@ -14403,9 +14407,10 @@ function getEventState(eventKey, namespace, childType) {
14403
14407
  */
14404
14408
  // eslint-disable-next-line max-params
14405
14409
 
14406
- function getExternalMutationsWithChildren(mutations, baseProps, baseState, childNames) {
14407
- baseProps = baseProps || {};
14408
- baseState = baseState || {};
14410
+ function getExternalMutationsWithChildren(mutations) {
14411
+ var baseProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14412
+ var baseState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
14413
+ var childNames = arguments.length > 3 ? arguments[3] : undefined;
14409
14414
  return childNames.reduce(function (memo, childName) {
14410
14415
  var childState = baseState[childName];
14411
14416
  var mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
@@ -14427,9 +14432,10 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
14427
14432
  */
14428
14433
  // eslint-disable-next-line max-params
14429
14434
 
14430
- function getExternalMutations(mutations, baseProps, baseState, childName) {
14431
- baseProps = baseProps || {};
14432
- baseState = baseState || {};
14435
+ function getExternalMutations(mutations) {
14436
+ var baseProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
14437
+ var baseState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
14438
+ var childName = arguments.length > 3 ? arguments[3] : undefined;
14433
14439
 
14434
14440
  var eventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(baseProps);
14435
14441
 
@@ -14495,8 +14501,7 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
14495
14501
  return false;
14496
14502
  };
14497
14503
 
14498
- mutations = Array.isArray(mutations) ? mutations : [mutations];
14499
- var scopedMutations = mutations;
14504
+ var scopedMutations = Array.isArray(mutations) ? mutations : [mutations];
14500
14505
 
14501
14506
  if (identifier.childName) {
14502
14507
  scopedMutations = mutations.filter(function (m) {
@@ -14535,13 +14540,10 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
14535
14540
 
14536
14541
  function getComponentEvents(props, components) {
14537
14542
  var events = Array.isArray(components) && components.reduce(function (memo, componentName) {
14538
- var _memo;
14539
-
14540
14543
  var component = props[componentName];
14541
14544
  var defaultEvents = component && component.type && component.type.defaultEvents;
14542
14545
  var componentEvents = lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(defaultEvents) ? defaultEvents(component.props) : defaultEvents;
14543
- memo = Array.isArray(componentEvents) ? (_memo = memo).concat.apply(_memo, _toConsumableArray(componentEvents)) : memo;
14544
- return memo;
14546
+ return Array.isArray(componentEvents) ? memo.concat.apply(memo, _toConsumableArray(componentEvents)) : memo;
14545
14547
  }, []);
14546
14548
  return events && events.length ? events : undefined;
14547
14549
  }
@@ -14899,6 +14901,7 @@ function reduceChildren(children, iteratee) {
14899
14901
 
14900
14902
  var traverseChildren = function (childArray, names, parent) {
14901
14903
  return childArray.reduce(function (memo, child, index) {
14904
+ var newMemo = memo;
14902
14905
  var childRole = child.type && child.type.role;
14903
14906
  var childName = child.props.name || "".concat(childRole, "-").concat(names[index]);
14904
14907
 
@@ -14916,16 +14919,16 @@ function reduceChildren(children, iteratee) {
14916
14919
  });
14917
14920
 
14918
14921
  var nestedResults = traverseChildren(nestedChildren, _childNames, child);
14919
- memo = combine(memo, nestedResults);
14922
+ newMemo = combine(newMemo, nestedResults);
14920
14923
  } else {
14921
14924
  var result = iteratee(child, childName, parent);
14922
14925
 
14923
14926
  if (result) {
14924
- memo = combine(memo, result);
14927
+ newMemo = combine(newMemo, result);
14925
14928
  }
14926
14929
  }
14927
14930
 
14928
- return memo;
14931
+ return newMemo;
14929
14932
  }, initialMemo);
14930
14933
  };
14931
14934
 
@@ -14951,8 +14954,7 @@ function isHorizontal(props) {
14951
14954
  var childProps = child.props || {};
14952
14955
 
14953
14956
  if (memo || childProps.horizontal || !childProps.children) {
14954
- memo = memo || childProps.horizontal;
14955
- return memo;
14957
+ return memo || childProps.horizontal;
14956
14958
  }
14957
14959
 
14958
14960
  return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(childProps.children));
@@ -15187,11 +15189,13 @@ function isMap(x) {
15187
15189
  }
15188
15190
  function shallowToJS(x, whitelist) {
15189
15191
  return isIterable(x) ? x.reduce(function (result, curr, key) {
15192
+ var newCurr = curr;
15193
+
15190
15194
  if (whitelist && whitelist[key]) {
15191
- curr = shallowToJS(curr);
15195
+ newCurr = shallowToJS(curr);
15192
15196
  }
15193
15197
 
15194
- result[key] = curr;
15198
+ result[key] = newCurr;
15195
15199
  return result;
15196
15200
  }, isList(x) ? [] : {}) : x;
15197
15201
  }
@@ -15219,12 +15223,10 @@ __webpack_require__.r(__webpack_exports__);
15219
15223
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
15220
15224
 
15221
15225
 
15222
- /* eslint-disable no-use-before-define */
15223
-
15224
15226
 
15225
15227
  // Private Functions
15226
- function getVerticalAnchor(props, datum) {
15227
- datum = datum || {};
15228
+ function getVerticalAnchor(props) {
15229
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15228
15230
  var sign = datum._y >= 0 ? 1 : -1;
15229
15231
  var labelStyle = props.style && props.style.labels || {};
15230
15232
 
@@ -15237,8 +15239,8 @@ function getVerticalAnchor(props, datum) {
15237
15239
  return "middle";
15238
15240
  }
15239
15241
 
15240
- function getTextAnchor(props, datum) {
15241
- datum = datum || {};
15242
+ function getTextAnchor(props) {
15243
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15242
15244
  var style = props.style,
15243
15245
  horizontal = props.horizontal;
15244
15246
  var sign = datum._y >= 0 ? 1 : -1;
@@ -15253,14 +15255,14 @@ function getTextAnchor(props, datum) {
15253
15255
  return sign >= 0 ? "start" : "end";
15254
15256
  }
15255
15257
 
15256
- function getAngle(props, datum) {
15257
- datum = datum || {};
15258
+ function getAngle(props) {
15259
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15258
15260
  var labelStyle = props.style && props.style.labels || {};
15259
15261
  return datum.angle === undefined ? labelStyle.angle : datum.angle;
15260
15262
  }
15261
15263
 
15262
- function getPadding(props, datum) {
15263
- datum = datum || {};
15264
+ function getPadding(props) {
15265
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15264
15266
  var horizontal = props.horizontal,
15265
15267
  style = props.style;
15266
15268
  var labelStyle = style.labels || {};
@@ -15339,8 +15341,9 @@ function getPolarOrientation(degrees) {
15339
15341
  } // Exported Functions
15340
15342
 
15341
15343
 
15342
- function getText(props, datum, index) {
15343
- datum = datum || {};
15344
+ function getText(props) {
15345
+ var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
15346
+ var index = arguments.length > 2 ? arguments[2] : undefined;
15344
15347
 
15345
15348
  if (datum.label !== undefined) {
15346
15349
  return datum.label;
@@ -16500,11 +16503,10 @@ var Timer = /*#__PURE__*/function () {
16500
16503
  }, {
16501
16504
  key: "subscribe",
16502
16505
  value: function subscribe(callback, duration) {
16503
- duration = this.shouldAnimate ? duration : 0;
16504
16506
  var subscriptionID = this.subscribers.push({
16505
16507
  startTime: (0,victory_vendor_d3_timer__WEBPACK_IMPORTED_MODULE_0__.now)(),
16506
16508
  callback: callback,
16507
- duration: duration
16509
+ duration: this.shouldAnimate ? duration : 0
16508
16510
  });
16509
16511
  this.activeSubscriptions++;
16510
16512
  this.start();
@@ -16691,36 +16693,38 @@ function getInitialChildProps(animate, data) {
16691
16693
 
16692
16694
 
16693
16695
  function getChildBeforeLoad(animate, child, data, cb) {
16694
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
16696
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
16695
16697
  onEnd: cb
16696
16698
  });
16697
16699
 
16698
- if (animate && animate.onLoad && !animate.onLoad.duration) {
16700
+ if (newAnimate && newAnimate.onLoad && !newAnimate.onLoad.duration) {
16699
16701
  return {
16700
- animate: animate,
16702
+ animate: newAnimate,
16701
16703
  data: data
16702
16704
  };
16703
16705
  }
16704
16706
 
16705
- 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.
16707
+ 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.
16706
16708
 
16707
- data = data.map(function (datum, idx) {
16709
+ var newData = data.map(function (datum, idx) {
16708
16710
  return lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data));
16709
16711
  });
16710
16712
  return {
16711
- animate: animate,
16712
- data: data,
16713
+ animate: newAnimate,
16714
+ data: newData,
16713
16715
  clipWidth: 0
16714
16716
  };
16715
16717
  } // eslint-disable-next-line max-params
16716
16718
 
16717
16719
 
16718
16720
  function getChildOnLoad(animate, data, cb) {
16719
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
16721
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
16720
16722
  onEnd: cb
16721
16723
  });
16722
16724
 
16723
- if (animate && animate.onLoad && !animate.onLoad.duration) {
16725
+ var newData = data;
16726
+
16727
+ if (newAnimate && newAnimate.onLoad && !newAnimate.onLoad.duration) {
16724
16728
  return {
16725
16729
  animate: animate,
16726
16730
  data: data
@@ -16729,12 +16733,12 @@ function getChildOnLoad(animate, data, cb) {
16729
16733
 
16730
16734
  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.
16731
16735
 
16732
- data = data.map(function (datum, idx) {
16736
+ newData = data.map(function (datum, idx) {
16733
16737
  return lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, after(datum, idx, data));
16734
16738
  });
16735
16739
  return {
16736
- animate: animate,
16737
- data: data
16740
+ animate: newAnimate,
16741
+ data: newData
16738
16742
  };
16739
16743
  } // eslint-disable-next-line max-params, max-len
16740
16744
 
@@ -16743,7 +16747,10 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
16743
16747
  // Whether or not _this_ child has exiting nodes, we want the exit-
16744
16748
  // transition for all children to have the same duration, delay, etc.
16745
16749
  var onExit = animate && animate.onExit;
16746
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onExit);
16750
+
16751
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onExit);
16752
+
16753
+ var newData = data;
16747
16754
 
16748
16755
  if (exitingNodes) {
16749
16756
  // After the exit transition occurs, trigger the animations for
@@ -16751,39 +16758,42 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
16751
16758
  animate.onEnd = cb;
16752
16759
  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.
16753
16760
 
16754
- data = data.map(function (datum, idx) {
16761
+ newData = data.map(function (datum, idx) {
16755
16762
  var key = (datum.key || idx).toString();
16756
16763
  return exitingNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data)) : datum;
16757
16764
  });
16758
16765
  }
16759
16766
 
16760
16767
  return {
16761
- animate: animate,
16762
- data: data
16768
+ animate: newAnimate,
16769
+ data: newData
16763
16770
  };
16764
16771
  } // eslint-disable-next-line max-params,max-len
16765
16772
 
16766
16773
 
16767
16774
  function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
16775
+ var newAnimate = animate;
16776
+ var newData = data;
16777
+
16768
16778
  if (enteringNodes) {
16769
16779
  // Perform a normal animation here, except - when it finishes - trigger
16770
16780
  // the transition for entering nodes.
16771
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
16781
+ newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
16772
16782
  onEnd: cb
16773
16783
  });
16774
16784
  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
16775
16785
  // domain. However, we may not want these nodes to be displayed initially,
16776
16786
  // so perform the `onEnter.before` transformation on each node.
16777
16787
 
16778
- data = data.map(function (datum, idx) {
16788
+ newData = data.map(function (datum, idx) {
16779
16789
  var key = (datum.key || idx).toString();
16780
16790
  return enteringNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data)) : datum;
16781
16791
  });
16782
16792
  }
16783
16793
 
16784
16794
  return {
16785
- animate: animate,
16786
- data: data
16795
+ animate: newAnimate,
16796
+ data: newData
16787
16797
  };
16788
16798
  } // eslint-disable-next-line max-params, max-len
16789
16799
 
@@ -16792,23 +16802,26 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
16792
16802
  // Whether or not _this_ child has entering nodes, we want the entering-
16793
16803
  // transition for all children to have the same duration, delay, etc.
16794
16804
  var onEnter = animate && animate.onEnter;
16795
- animate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onEnter);
16805
+
16806
+ var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onEnter);
16807
+
16808
+ var newData = data;
16796
16809
 
16797
16810
  if (enteringNodes) {
16798
16811
  // Old nodes have been transitioned to their new values, and the
16799
16812
  // domain should encompass the nodes that will now enter. So perform
16800
16813
  // the `onEnter.after` transformation on each node.
16801
- animate.onEnd = cb;
16802
- var after = animate.onEnter && animate.onEnter.after ? animate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default());
16803
- data = data.map(function (datum, idx) {
16814
+ newAnimate.onEnd = cb;
16815
+ var after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default());
16816
+ newData = data.map(function (datum, idx) {
16804
16817
  var key = getDatumKey(datum, idx);
16805
16818
  return enteringNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, after(datum, idx, data)) : datum;
16806
16819
  });
16807
16820
  }
16808
16821
 
16809
16822
  return {
16810
- animate: animate,
16811
- data: data
16823
+ animate: newAnimate,
16824
+ data: newData
16812
16825
  };
16813
16826
  }
16814
16827
  /**
@@ -16974,6 +16987,7 @@ function getTransitionPropsFactory(props, state, setState) {
16974
16987
  "use strict";
16975
16988
  __webpack_require__.r(__webpack_exports__);
16976
16989
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16990
+ /* harmony export */ "assert": () => (/* binding */ assert),
16977
16991
  /* harmony export */ "getSafeUserProps": () => (/* binding */ getSafeUserProps),
16978
16992
  /* harmony export */ "withSafeUserProps": () => (/* binding */ withSafeUserProps)
16979
16993
  /* harmony export */ });
@@ -17054,6 +17068,18 @@ var testIfSafeProp = function (key) {
17054
17068
  if (doesPropStartWith(key) || isExactMatch(key)) return true;
17055
17069
  return false;
17056
17070
  };
17071
+ /**
17072
+ * Asserts that value is not null or undefined, throwing an error if it is.
17073
+ * @param value The value to assert
17074
+ * @param message The error message to throw
17075
+ */
17076
+
17077
+
17078
+ function assert(value, message) {
17079
+ if (value === undefined || value === null) {
17080
+ throw new Error(message);
17081
+ }
17082
+ }
17057
17083
  /**
17058
17084
  * getSafeUserProps - function that takes in a props object and removes any
17059
17085
  * key-value entries that do not match filter strings in the USER_PROPS_SAFELIST
@@ -17063,7 +17089,6 @@ var testIfSafeProp = function (key) {
17063
17089
  * @returns {Object}: object containing remaining acceptable props
17064
17090
  */
17065
17091
 
17066
-
17067
17092
  var getSafeUserProps = function (props) {
17068
17093
  var propsToFilter = _objectSpread({}, props);
17069
17094
 
@@ -17266,12 +17291,13 @@ function getDataFromChildren(props, childComponents) {
17266
17291
  var childProps = lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, child.props, parentProps);
17267
17292
 
17268
17293
  var childData;
17294
+ var childElement = child;
17269
17295
 
17270
17296
  if (!_data__WEBPACK_IMPORTED_MODULE_12__.isDataComponent(child)) {
17271
17297
  return null;
17272
17298
  } else if (child.type && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(child.type.getData)) {
17273
- child = parent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(child, parent.props) : child;
17274
- childData = child.type.getData(childProps);
17299
+ childElement = parent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(child, parent.props) : child;
17300
+ childData = childElement.type.getData(childProps);
17275
17301
  } else {
17276
17302
  childData = _data__WEBPACK_IMPORTED_MODULE_12__.getData(childProps);
17277
17303
  }
@@ -17302,17 +17328,16 @@ function getData(props, childComponents) {
17302
17328
  return _data__WEBPACK_IMPORTED_MODULE_12__.getData(props);
17303
17329
  }
17304
17330
 
17305
- childComponents = childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
17306
- return getDataFromChildren(props, childComponents);
17331
+ return getDataFromChildren(props, childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children));
17307
17332
  }
17308
17333
  function getWidth(props, groupLength, seriesLength) {
17309
17334
  var datasets = props.datasets,
17310
17335
  horizontal = props.horizontal;
17311
17336
  var range = horizontal ? _helpers__WEBPACK_IMPORTED_MODULE_11__.getRange(props, "y") : _helpers__WEBPACK_IMPORTED_MODULE_11__.getRange(props, "x");
17312
17337
  var extent = Math.abs(range[1] - range[0]);
17313
- seriesLength = seriesLength !== undefined ? seriesLength : Array.isArray(datasets[0]) && datasets[0].length || 1;
17314
- groupLength = groupLength || datasets.length;
17315
- var bars = groupLength * seriesLength;
17338
+ var seriesLengthValue = seriesLength !== undefined ? seriesLength : Array.isArray(datasets[0]) && datasets[0].length || 1;
17339
+ var groupLengthValue = groupLength || datasets.length;
17340
+ var bars = groupLengthValue * seriesLengthValue;
17316
17341
  var barRatio = 0.5;
17317
17342
  return Math.round(barRatio * extent / bars);
17318
17343
  }
@@ -17404,9 +17429,9 @@ function getDomainFromChildren(props, axis, childComponents) {
17404
17429
  return [min, max];
17405
17430
  }
17406
17431
  function getDomain(props, axis, childComponents) {
17407
- childComponents = childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
17432
+ var children = childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
17408
17433
  var propsDomain = _domain__WEBPACK_IMPORTED_MODULE_13__.getDomainFromProps(props, axis);
17409
- var domainPadding = getDefaultDomainPadding(props, axis, childComponents);
17434
+ var domainPadding = getDefaultDomainPadding(props, axis, children);
17410
17435
  var domain;
17411
17436
 
17412
17437
  if (propsDomain) {
@@ -17416,7 +17441,7 @@ function getDomain(props, axis, childComponents) {
17416
17441
  var maxDomain = _domain__WEBPACK_IMPORTED_MODULE_13__.getMaxFromProps(props, axis);
17417
17442
  var dataset = (props.data || props.y) && _data__WEBPACK_IMPORTED_MODULE_12__.getData(props);
17418
17443
  var dataDomain = dataset ? _domain__WEBPACK_IMPORTED_MODULE_13__.getDomainFromData(props, axis, dataset) : [];
17419
- var childDomain = getDomainFromChildren(props, axis, childComponents);
17444
+ var childDomain = getDomainFromChildren(props, axis, children);
17420
17445
  var min = minDomain || _collection__WEBPACK_IMPORTED_MODULE_14__.getMinValue([].concat(_toConsumableArray(dataDomain), _toConsumableArray(childDomain)));
17421
17446
  var max = maxDomain || _collection__WEBPACK_IMPORTED_MODULE_14__.getMaxValue([].concat(_toConsumableArray(dataDomain), _toConsumableArray(childDomain)));
17422
17447
  domain = _domain__WEBPACK_IMPORTED_MODULE_13__.getDomainFromMinMax(min, max);
@@ -17578,10 +17603,10 @@ function getCategoryAndAxisStringsFromChildren(props, axis, childComponents) {
17578
17603
  return lodash_uniq__WEBPACK_IMPORTED_MODULE_4___default()(lodash_flatten__WEBPACK_IMPORTED_MODULE_6___default()([].concat(_toConsumableArray(categoryStrings), _toConsumableArray(axisStrings))));
17579
17604
  }
17580
17605
  function getStringsFromChildren(props, childComponents) {
17581
- childComponents = childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
17582
- var xStrings = getCategoryAndAxisStringsFromChildren(props, "x", childComponents);
17583
- var yStrings = getCategoryAndAxisStringsFromChildren(props, "y", childComponents);
17584
- var dataStrings = getStringsFromData(childComponents);
17606
+ var children = childComponents || react__WEBPACK_IMPORTED_MODULE_9___default().Children.toArray(props.children);
17607
+ var xStrings = getCategoryAndAxisStringsFromChildren(props, "x", children);
17608
+ var yStrings = getCategoryAndAxisStringsFromChildren(props, "y", children);
17609
+ var dataStrings = getStringsFromData(children);
17585
17610
  return {
17586
17611
  x: lodash_uniq__WEBPACK_IMPORTED_MODULE_4___default()(lodash_flatten__WEBPACK_IMPORTED_MODULE_6___default()([].concat(_toConsumableArray(xStrings), _toConsumableArray(dataStrings.x)))),
17587
17612
  y: lodash_uniq__WEBPACK_IMPORTED_MODULE_4___default()(lodash_flatten__WEBPACK_IMPORTED_MODULE_6___default()([].concat(_toConsumableArray(yStrings), _toConsumableArray(dataStrings.y))))
@@ -17657,18 +17682,20 @@ var getEvaluatedStyles = function (style, props) {
17657
17682
  };
17658
17683
 
17659
17684
  var getStyleObject = function (props) {
17685
+ var _theme$polarAxisType, _theme$standardAxisTy;
17686
+
17660
17687
  var _props$theme = props.theme,
17661
17688
  theme = _props$theme === void 0 ? {} : _props$theme,
17662
17689
  dependentAxis = props.dependentAxis;
17663
17690
  var generalAxisStyle = theme.polarAxis && theme.polarAxis.style || theme.axis && theme.axis.style;
17664
17691
  var polarAxisType = dependentAxis ? "polarDependentAxis" : "polarIndependentAxis";
17665
17692
  var standardAxisType = dependentAxis ? "dependentAxis" : "independentAxis";
17666
- var specificAxisStyle = theme[polarAxisType] && theme[polarAxisType].style || theme[standardAxisType] && theme[standardAxisType].style;
17693
+ var specificAxisStyle = (theme === null || theme === void 0 ? void 0 : (_theme$polarAxisType = theme[polarAxisType]) === null || _theme$polarAxisType === void 0 ? void 0 : _theme$polarAxisType.style) || (theme === null || theme === void 0 ? void 0 : (_theme$standardAxisTy = theme[standardAxisType]) === null || _theme$standardAxisTy === void 0 ? void 0 : _theme$standardAxisTy.style);
17667
17694
 
17668
17695
  var mergeStyles = function () {
17669
17696
  var styleNamespaces = ["axis", "axisLabel", "grid", "parent", "tickLabels", "ticks"];
17670
17697
  return styleNamespaces.reduce(function (memo, curr) {
17671
- memo[curr] = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, specificAxisStyle[curr], generalAxisStyle[curr]);
17698
+ memo[curr] = lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default()({}, specificAxisStyle === null || specificAxisStyle === void 0 ? void 0 : specificAxisStyle[curr], generalAxisStyle === null || generalAxisStyle === void 0 ? void 0 : generalAxisStyle[curr]);
17672
17699
  return memo;
17673
17700
  }, {});
17674
17701
  };
@@ -17685,6 +17712,11 @@ var getRadius = function (props) {
17685
17712
 
17686
17713
  var width = props.width,
17687
17714
  height = props.height;
17715
+
17716
+ if (width === undefined || height === undefined) {
17717
+ throw new Error("VictoryPolarAxis: width and height properties are required for standalone axes.");
17718
+ }
17719
+
17688
17720
  return Math.min(width - left - right, height - top - bottom) / 2;
17689
17721
  };
17690
17722
 
@@ -17706,8 +17738,7 @@ var getRange = function (props, axis) {
17706
17738
 
17707
17739
  var radius = getRadius(props);
17708
17740
  return [props.innerRadius || 0, radius];
17709
- }; // exposed for use by VictoryChart (necessary?)
17710
-
17741
+ };
17711
17742
 
17712
17743
  var getScale = function (props) {
17713
17744
  var axis = victory_core__WEBPACK_IMPORTED_MODULE_4__.getAxis(props);
@@ -17718,13 +17749,14 @@ var getScale = function (props) {
17718
17749
  scale.domain(domain);
17719
17750
  return scale;
17720
17751
  };
17721
- var getStyles = function (props, styleObject) {
17752
+ var getStyles = function (props) {
17753
+ var styleObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17754
+
17722
17755
  if (props.disableInlineStyles) {
17723
17756
  return {};
17724
17757
  }
17725
17758
 
17726
17759
  var style = props.style || {};
17727
- styleObject = styleObject || {};
17728
17760
  var parentStyleProps = {
17729
17761
  height: "auto",
17730
17762
  width: "100%"
@@ -17751,10 +17783,10 @@ var getAxisAngle = function (props) {
17751
17783
  }
17752
17784
 
17753
17785
  return victory_core__WEBPACK_IMPORTED_MODULE_3__.radiansToDegrees(axisValue);
17754
- }; // eslint-disable-next-line max-params
17755
-
17786
+ };
17756
17787
 
17757
- var getTickProps = function (props, calculatedValues, tickValue, index) {
17788
+ var getTickProps = function (props, calculatedValues, tickValue, index // eslint-disable-next-line max-params
17789
+ ) {
17758
17790
  var axisType = calculatedValues.axisType,
17759
17791
  radius = calculatedValues.radius,
17760
17792
  scale = calculatedValues.scale,
@@ -17779,7 +17811,7 @@ var getTickProps = function (props, calculatedValues, tickValue, index) {
17779
17811
  }),
17780
17812
  tickStyle = _getEvaluatedStyles.tickStyle;
17781
17813
 
17782
- var axisAngle = axisType === "radial" ? getAxisAngle(props, scale) : undefined;
17814
+ var axisAngle = axisType === "radial" ? getAxisAngle(props) : undefined;
17783
17815
  var tickPadding = tickStyle.padding || tickStyle.size || 0;
17784
17816
  var padAngle = victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(90 - axisAngle);
17785
17817
  var tickAngle = axisType === "angular" ? scale(tickValue) : victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(-1 * axisAngle);
@@ -17801,10 +17833,10 @@ var getTickProps = function (props, calculatedValues, tickValue, index) {
17801
17833
  y1: tickRadius * Math.sin(tickAngle) + Math.sin(padAngle) * tickPadding + origin.y,
17802
17834
  y2: tickRadius * Math.sin(tickAngle) - Math.sin(padAngle) * tickPadding + origin.y
17803
17835
  };
17804
- }; // eslint-disable-next-line max-params
17805
-
17836
+ };
17806
17837
 
17807
- var getTickLabelProps = function (props, calculatedValues, tickValue, index) {
17838
+ var getTickLabelProps = function (props, calculatedValues, tickValue, index // eslint-disable-next-line max-params
17839
+ ) {
17808
17840
  var axisType = calculatedValues.axisType,
17809
17841
  radius = calculatedValues.radius,
17810
17842
  tickFormat = calculatedValues.tickFormat,
@@ -17830,11 +17862,11 @@ var getTickLabelProps = function (props, calculatedValues, tickValue, index) {
17830
17862
  labelStyle = _getEvaluatedStyles2.labelStyle;
17831
17863
 
17832
17864
  var tickLabelComponent = props.tickLabelComponent;
17833
- var labelPlacement = tickLabelComponent.props && tickLabelComponent.props.labelPlacement ? tickLabelComponent.props.labelPlacement : props.labelPlacement;
17865
+ var labelPlacement = tickLabelComponent !== null && tickLabelComponent !== void 0 && tickLabelComponent.props.labelPlacement ? tickLabelComponent.props.labelPlacement : props.labelPlacement;
17834
17866
  var tickPadding = labelStyle.padding || 0;
17835
17867
  var angularPadding = 0; // TODO: do some geometry
17836
17868
 
17837
- var axisAngle = axisType === "radial" ? getAxisAngle(props, scale) : undefined;
17869
+ var axisAngle = axisType === "radial" ? getAxisAngle(props) : undefined;
17838
17870
  var labelAngle = axisType === "angular" ? victory_core__WEBPACK_IMPORTED_MODULE_3__.radiansToDegrees(scale(tickValue)) : axisAngle + angularPadding;
17839
17871
  var textAngle = labelStyle.angle === undefined ? victory_core__WEBPACK_IMPORTED_MODULE_6__.getPolarAngle(lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, props, {
17840
17872
  labelPlacement: labelPlacement
@@ -17853,10 +17885,10 @@ var getTickLabelProps = function (props, calculatedValues, tickValue, index) {
17853
17885
  x: labelRadius * Math.cos(victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(labelAngle)) + origin.x,
17854
17886
  y: -labelRadius * Math.sin(victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(labelAngle)) + origin.y
17855
17887
  };
17856
- }; // eslint-disable-next-line max-params
17857
-
17888
+ };
17858
17889
 
17859
- var getGridProps = function (props, calculatedValues, tickValue, index) {
17890
+ var getGridProps = function (props, calculatedValues, tickValue, index // eslint-disable-next-line max-params
17891
+ ) {
17860
17892
  var axisType = calculatedValues.axisType,
17861
17893
  radius = calculatedValues.radius,
17862
17894
  style = calculatedValues.style,
@@ -17910,7 +17942,6 @@ var getAxisLabelProps = function (props, calculatedValues) {
17910
17942
  var axisType = calculatedValues.axisType,
17911
17943
  radius = calculatedValues.radius,
17912
17944
  style = calculatedValues.style,
17913
- scale = calculatedValues.scale,
17914
17945
  origin = calculatedValues.origin;
17915
17946
  var axisLabelComponent = props.axisLabelComponent;
17916
17947
 
@@ -17918,9 +17949,9 @@ var getAxisLabelProps = function (props, calculatedValues) {
17918
17949
  return {};
17919
17950
  }
17920
17951
 
17921
- var labelPlacement = axisLabelComponent.props && axisLabelComponent.props.labelPlacement ? axisLabelComponent.props.labelPlacement : props.labelPlacement;
17952
+ var labelPlacement = axisLabelComponent !== null && axisLabelComponent !== void 0 && axisLabelComponent.props.labelPlacement ? axisLabelComponent.props.labelPlacement : props.labelPlacement;
17922
17953
  var labelStyle = style && style.axisLabel || {};
17923
- var axisAngle = axisType === "radial" ? getAxisAngle(props, scale) : undefined;
17954
+ var axisAngle = axisType === "radial" ? getAxisAngle(props) : undefined;
17924
17955
  var textAngle = labelStyle.angle === undefined ? victory_core__WEBPACK_IMPORTED_MODULE_6__.getPolarAngle(lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, props, {
17925
17956
  labelPlacement: labelPlacement
17926
17957
  }), axisAngle) : labelStyle.angle;
@@ -17946,13 +17977,12 @@ var getAxisProps = function (modifiedProps, calculatedValues) {
17946
17977
  var style = calculatedValues.style,
17947
17978
  axisType = calculatedValues.axisType,
17948
17979
  radius = calculatedValues.radius,
17949
- scale = calculatedValues.scale,
17950
17980
  origin = calculatedValues.origin;
17951
17981
  var startAngle = modifiedProps.startAngle,
17952
17982
  endAngle = modifiedProps.endAngle,
17953
17983
  _modifiedProps$innerR = modifiedProps.innerRadius,
17954
17984
  innerRadius = _modifiedProps$innerR === void 0 ? 0 : _modifiedProps$innerR;
17955
- var axisAngle = axisType === "radial" ? victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(getAxisAngle(modifiedProps, scale)) : undefined;
17985
+ var axisAngle = axisType === "radial" ? victory_core__WEBPACK_IMPORTED_MODULE_3__.degreesToRadians(getAxisAngle(modifiedProps)) : undefined;
17956
17986
  return axisType === "radial" ? {
17957
17987
  style: style.axis,
17958
17988
  x1: getPosition(innerRadius, axisAngle, "x") + origin.x,
@@ -17969,10 +17999,11 @@ var getAxisProps = function (modifiedProps, calculatedValues) {
17969
17999
  };
17970
18000
  };
17971
18001
 
17972
- var getCalculatedValues = function (props) {
17973
- props = lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({
18002
+ var getCalculatedValues = function (initialProps) {
18003
+ var props = lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({
17974
18004
  polar: true
17975
- }, props);
18005
+ }, initialProps);
18006
+
17976
18007
  var defaultStyles = getStyleObject(props);
17977
18008
  var style = getStyles(props, defaultStyles);
17978
18009
  var padding = victory_core__WEBPACK_IMPORTED_MODULE_3__.getPadding(props);
@@ -18003,19 +18034,18 @@ var getCalculatedValues = function (props) {
18003
18034
  };
18004
18035
  };
18005
18036
 
18006
- var getBaseProps = function (props, fallbackProps) {
18007
- props = victory_core__WEBPACK_IMPORTED_MODULE_4__.modifyProps(props, fallbackProps);
18037
+ var getBaseProps = function (initialProps, fallbackProps) {
18038
+ var props = victory_core__WEBPACK_IMPORTED_MODULE_4__.modifyProps(initialProps, fallbackProps);
18008
18039
  var calculatedValues = getCalculatedValues(props);
18009
18040
  var style = calculatedValues.style,
18010
18041
  scale = calculatedValues.scale,
18011
18042
  ticks = calculatedValues.ticks,
18012
18043
  domain = calculatedValues.domain;
18013
- var _props = props,
18014
- width = _props.width,
18015
- height = _props.height,
18016
- standalone = _props.standalone,
18017
- theme = _props.theme,
18018
- name = _props.name;
18044
+ var width = props.width,
18045
+ height = props.height,
18046
+ standalone = props.standalone,
18047
+ theme = props.theme,
18048
+ name = props.name;
18019
18049
  var axisProps = getAxisProps(props, calculatedValues);
18020
18050
  var axisLabelProps = getAxisLabelProps(props, calculatedValues);
18021
18051
  var initialChildProps = {
@@ -18054,7 +18084,7 @@ var getBaseProps = function (props, fallbackProps) {
18054
18084
  "use strict";
18055
18085
  __webpack_require__.r(__webpack_exports__);
18056
18086
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18057
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
18087
+ /* harmony export */ "VictoryPolarAxis": () => (/* binding */ VictoryPolarAxis)
18058
18088
  /* harmony export */ });
18059
18089
  /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isEmpty */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js");
18060
18090
  /* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_0__);
@@ -18062,27 +18092,17 @@ __webpack_require__.r(__webpack_exports__);
18062
18092
  /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_1__);
18063
18093
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
18064
18094
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
18065
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
18066
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);
18067
18095
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/axis.js");
18068
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
18069
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/prop-types.js");
18070
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line-segment.js");
18071
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
18072
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/arc.js");
18073
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
18074
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
18075
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
18076
- /* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helper-methods */ "../../victory-polar-axis/es/helper-methods.js");
18096
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line-segment.js");
18097
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-label/victory-label.js");
18098
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/arc.js");
18099
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-container/victory-container.js");
18100
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-theme/victory-theme.js");
18101
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/add-events.js");
18102
+ /* harmony import */ var _helper_methods__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./helper-methods */ "../../victory-polar-axis/es/helper-methods.js");
18077
18103
 
18078
18104
 
18079
18105
 
18080
- 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; }
18081
-
18082
- 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; }
18083
-
18084
- 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; }
18085
-
18086
18106
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
18087
18107
 
18088
18108
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -18118,43 +18138,24 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
18118
18138
 
18119
18139
 
18120
18140
 
18121
-
18122
18141
  var fallbackProps = {
18123
18142
  width: 450,
18124
18143
  height: 300,
18125
18144
  padding: 50
18126
- };
18127
- var options = {
18128
- components: [{
18129
- name: "axis",
18130
- index: 0
18131
- }, {
18132
- name: "axisLabel",
18133
- index: 0
18134
- }, {
18135
- name: "grid"
18136
- }, {
18137
- name: "parent",
18138
- index: "parent"
18139
- }, {
18140
- name: "ticks"
18141
- }, {
18142
- name: "tickLabels"
18143
- }]
18144
- };
18145
+ }; // eslint-disable-next-line @typescript-eslint/no-empty-interface
18145
18146
 
18146
- var VictoryPolarAxis = /*#__PURE__*/function (_React$Component) {
18147
- _inherits(VictoryPolarAxis, _React$Component);
18147
+ var VictoryPolarAxisBase = /*#__PURE__*/function (_React$Component) {
18148
+ _inherits(VictoryPolarAxisBase, _React$Component);
18148
18149
 
18149
- var _super = _createSuper(VictoryPolarAxis);
18150
+ var _super = _createSuper(VictoryPolarAxisBase);
18150
18151
 
18151
- function VictoryPolarAxis() {
18152
- _classCallCheck(this, VictoryPolarAxis);
18152
+ function VictoryPolarAxisBase() {
18153
+ _classCallCheck(this, VictoryPolarAxisBase);
18153
18154
 
18154
18155
  return _super.apply(this, arguments);
18155
18156
  }
18156
18157
 
18157
- _createClass(VictoryPolarAxis, [{
18158
+ _createClass(VictoryPolarAxisBase, [{
18158
18159
  key: "renderAxisLine",
18159
18160
  value: function renderAxisLine(props) {
18160
18161
  var dependentAxis = props.dependentAxis;
@@ -18251,13 +18252,13 @@ var VictoryPolarAxis = /*#__PURE__*/function (_React$Component) {
18251
18252
  }
18252
18253
  }]);
18253
18254
 
18254
- return VictoryPolarAxis;
18255
+ return VictoryPolarAxisBase;
18255
18256
  }((react__WEBPACK_IMPORTED_MODULE_2___default().Component));
18256
18257
 
18257
- VictoryPolarAxis.animationWhitelist = ["style", "domain", "range", "tickCount", "tickValues", "padding", "width", "height"];
18258
- VictoryPolarAxis.displayName = "VictoryAxis";
18259
- VictoryPolarAxis.role = "axis";
18260
- VictoryPolarAxis.defaultTransitions = {
18258
+ VictoryPolarAxisBase.animationWhitelist = ["style", "domain", "range", "tickCount", "tickValues", "padding", "width", "height"];
18259
+ VictoryPolarAxisBase.displayName = "VictoryAxis";
18260
+ VictoryPolarAxisBase.role = "axis";
18261
+ VictoryPolarAxisBase.defaultTransitions = {
18261
18262
  onExit: {
18262
18263
  duration: 500
18263
18264
  },
@@ -18265,77 +18266,56 @@ VictoryPolarAxis.defaultTransitions = {
18265
18266
  duration: 500
18266
18267
  }
18267
18268
  };
18268
- VictoryPolarAxis.propTypes = _objectSpread(_objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_4__.CommonProps.baseProps), {}, {
18269
- axisAngle: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),
18270
- axisComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18271
- axisLabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18272
- axisValue: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)]),
18273
- categories: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)), prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({
18274
- x: prop_types__WEBPACK_IMPORTED_MODULE_5___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)),
18275
- y: prop_types__WEBPACK_IMPORTED_MODULE_5___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_5___default().string))
18276
- })]),
18277
- circularAxisComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18278
- circularGridComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18279
- containerComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18280
- dependentAxis: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
18281
- disableInlineStyles: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().bool),
18282
- endAngle: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),
18283
- events: prop_types__WEBPACK_IMPORTED_MODULE_5___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({
18284
- target: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOf(["axis", "axisLabel", "grid", "ticks", "tickLabels"]),
18285
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().array), victory_core__WEBPACK_IMPORTED_MODULE_6__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_6__.integer, victory_core__WEBPACK_IMPORTED_MODULE_6__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_5___default().string)]),
18286
- eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)
18287
- })),
18288
- gridComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18289
- innerRadius: victory_core__WEBPACK_IMPORTED_MODULE_6__.nonNegative,
18290
- labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOf(["parallel", "perpendicular", "vertical"]),
18291
- startAngle: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().number),
18292
- stringMap: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
18293
- style: prop_types__WEBPACK_IMPORTED_MODULE_5___default().shape({
18294
- parent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
18295
- axis: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
18296
- axisLabel: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
18297
- grid: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
18298
- ticks: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object),
18299
- tickLabels: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().object)
18300
- }),
18301
- tickComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18302
- tickCount: victory_core__WEBPACK_IMPORTED_MODULE_6__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_6__.integer, victory_core__WEBPACK_IMPORTED_MODULE_6__.greaterThanZero]),
18303
- tickFormat: prop_types__WEBPACK_IMPORTED_MODULE_5___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_5___default().func), victory_core__WEBPACK_IMPORTED_MODULE_6__.homogeneousArray]),
18304
- tickLabelComponent: (prop_types__WEBPACK_IMPORTED_MODULE_5___default().element),
18305
- tickValues: victory_core__WEBPACK_IMPORTED_MODULE_6__.homogeneousArray
18306
- });
18307
- VictoryPolarAxis.defaultProps = {
18308
- axisComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.LineSegment, null),
18309
- axisLabelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_8__.VictoryLabel, null),
18310
- circularAxisComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_9__.Arc, null),
18311
- circularGridComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_9__.Arc, null),
18312
- containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_10__.VictoryContainer, null),
18269
+ VictoryPolarAxisBase.defaultProps = {
18270
+ axisComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.LineSegment, null),
18271
+ axisLabelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryLabel, null),
18272
+ circularAxisComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_6__.Arc, null),
18273
+ circularGridComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_6__.Arc, null),
18274
+ containerComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.VictoryContainer, null),
18313
18275
  endAngle: 360,
18314
- gridComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.LineSegment, null),
18276
+ gridComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.LineSegment, null),
18315
18277
  groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("g", {
18316
18278
  role: "presentation"
18317
18279
  }),
18318
18280
  labelPlacement: "parallel",
18319
18281
  startAngle: 0,
18320
18282
  standalone: true,
18321
- theme: victory_core__WEBPACK_IMPORTED_MODULE_11__.VictoryTheme.grayscale,
18322
- tickComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.LineSegment, null),
18323
- tickLabelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_8__.VictoryLabel, null)
18283
+ theme: victory_core__WEBPACK_IMPORTED_MODULE_8__.VictoryTheme.grayscale,
18284
+ tickComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_4__.LineSegment, null),
18285
+ tickLabelComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_5__.VictoryLabel, null)
18324
18286
  };
18325
- VictoryPolarAxis.getDomain = victory_core__WEBPACK_IMPORTED_MODULE_3__.getDomain;
18326
- VictoryPolarAxis.getAxis = victory_core__WEBPACK_IMPORTED_MODULE_3__.getAxis;
18327
- VictoryPolarAxis.getScale = _helper_methods__WEBPACK_IMPORTED_MODULE_12__.getScale;
18287
+ VictoryPolarAxisBase.getDomain = victory_core__WEBPACK_IMPORTED_MODULE_3__.getDomain;
18288
+ VictoryPolarAxisBase.getAxis = victory_core__WEBPACK_IMPORTED_MODULE_3__.getAxis;
18289
+ VictoryPolarAxisBase.getScale = _helper_methods__WEBPACK_IMPORTED_MODULE_9__.getScale;
18328
18290
 
18329
- VictoryPolarAxis.getStyles = function (props) {
18330
- return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_12__.getStyles)(props, fallbackProps.style);
18291
+ VictoryPolarAxisBase.getStyles = function (props) {
18292
+ return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_9__.getStyles)(props, fallbackProps.style);
18331
18293
  };
18332
18294
 
18333
- VictoryPolarAxis.getBaseProps = function (props) {
18334
- return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_12__.getBaseProps)(props, fallbackProps);
18295
+ VictoryPolarAxisBase.getBaseProps = function (props) {
18296
+ return (0,_helper_methods__WEBPACK_IMPORTED_MODULE_9__.getBaseProps)(props, fallbackProps);
18335
18297
  };
18336
18298
 
18337
- VictoryPolarAxis.expectedComponents = ["axisComponent", "circularAxisComponent", "groupComponent", "containerComponent", "tickComponent", "tickLabelComponent", "gridComponent", "circularGridComponent"];
18338
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,victory_core__WEBPACK_IMPORTED_MODULE_13__.addEvents)(VictoryPolarAxis, options));
18299
+ VictoryPolarAxisBase.expectedComponents = ["axisComponent", "circularAxisComponent", "groupComponent", "containerComponent", "tickComponent", "tickLabelComponent", "gridComponent", "circularGridComponent"];
18300
+ var options = {
18301
+ components: [{
18302
+ name: "axis",
18303
+ index: 0
18304
+ }, {
18305
+ name: "axisLabel",
18306
+ index: 0
18307
+ }, {
18308
+ name: "grid"
18309
+ }, {
18310
+ name: "parent",
18311
+ index: "parent"
18312
+ }, {
18313
+ name: "ticks"
18314
+ }, {
18315
+ name: "tickLabels"
18316
+ }]
18317
+ };
18318
+ var VictoryPolarAxis = (0,victory_core__WEBPACK_IMPORTED_MODULE_10__.addEvents)(VictoryPolarAxisBase, options);
18339
18319
 
18340
18320
  /***/ }),
18341
18321
 
@@ -18348,7 +18328,7 @@ VictoryPolarAxis.expectedComponents = ["axisComponent", "circularAxisComponent",
18348
18328
  "use strict";
18349
18329
  __webpack_require__.r(__webpack_exports__);
18350
18330
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18351
- /* harmony export */ "default": () => (/* binding */ VictorySharedEvents)
18331
+ /* harmony export */ "VictorySharedEvents": () => (/* binding */ VictorySharedEvents)
18352
18332
  /* harmony export */ });
18353
18333
  /* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/difference */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/difference.js");
18354
18334
  /* harmony import */ var lodash_difference__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_difference__WEBPACK_IMPORTED_MODULE_0__);
@@ -18366,12 +18346,9 @@ __webpack_require__.r(__webpack_exports__);
18366
18346
  /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_6__);
18367
18347
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ "react");
18368
18348
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);
18369
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! prop-types */ "../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
18370
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_12__);
18371
18349
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/events.js");
18372
18350
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
18373
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/prop-types.js");
18374
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/timer-context.js");
18351
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/timer-context.js");
18375
18352
  /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react-fast-compare */ "../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js");
18376
18353
  /* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_8__);
18377
18354
  /* harmony import */ var json_stringify_safe__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! json-stringify-safe */ "../../../node_modules/.pnpm/json-stringify-safe@5.0.1/node_modules/json-stringify-safe/stringify.js");
@@ -18428,11 +18405,6 @@ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.g
18428
18405
 
18429
18406
 
18430
18407
 
18431
- // DISCLAIMER:
18432
- // This file is not currently tested, and it is first on the list of files
18433
- // to refactor in our current refactoring effort. Please do not make changes
18434
- // to this file without manual testing and/or refactoring and adding tests.
18435
-
18436
18408
  var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
18437
18409
  _inherits(VictorySharedEvents, _React$Component);
18438
18410
 
@@ -18444,14 +18416,21 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
18444
18416
  _classCallCheck(this, VictorySharedEvents);
18445
18417
 
18446
18418
  _this = _super.call(this, props);
18447
- _this.state = _this.state || {};
18419
+ _this.getScopedEvents = void 0;
18420
+ _this.getEventState = void 0;
18421
+ _this.baseProps = void 0;
18422
+ _this.sharedEventsCache = void 0;
18423
+ _this.globalEvents = void 0;
18424
+ _this.prevGlobalEventKeys = void 0;
18425
+ _this.boundGlobalEvents = void 0;
18448
18426
  _this.getScopedEvents = victory_core__WEBPACK_IMPORTED_MODULE_10__.getScopedEvents.bind(_assertThisInitialized(_this));
18449
18427
  _this.getEventState = victory_core__WEBPACK_IMPORTED_MODULE_10__.getEventState.bind(_assertThisInitialized(_this));
18450
- _this.baseProps = _this.getBaseProps(props);
18428
+ _this.state = _this.state || {};
18451
18429
  _this.sharedEventsCache = {};
18452
18430
  _this.globalEvents = {};
18453
18431
  _this.prevGlobalEventKeys = [];
18454
18432
  _this.boundGlobalEvents = {};
18433
+ _this.baseProps = _this.getBaseProps(props);
18455
18434
  return _this;
18456
18435
  }
18457
18436
 
@@ -18542,8 +18521,7 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
18542
18521
  value: function applyExternalMutations(props, externalMutations) {
18543
18522
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(externalMutations)) {
18544
18523
  var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
18545
- memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
18546
- return memo;
18524
+ return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
18547
18525
  }, []);
18548
18526
  var compiledCallbacks = callbacks.length ? function () {
18549
18527
  callbacks.forEach(function (c) {
@@ -18666,9 +18644,9 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
18666
18644
  var _this7 = this;
18667
18645
 
18668
18646
  var children = this.getNewChildren(props, baseProps);
18669
- var parents = Array.isArray(events) && events.filter(function (event) {
18647
+ var parents = Array.isArray(events) ? events.filter(function (event) {
18670
18648
  return event.target === "parent";
18671
- });
18649
+ }) : [];
18672
18650
  var sharedEvents = parents.length > 0 ? {
18673
18651
  events: parents,
18674
18652
  // partially apply childName (null) and baseProps,
@@ -18714,33 +18692,9 @@ var VictorySharedEvents = /*#__PURE__*/function (_React$Component) {
18714
18692
 
18715
18693
  return VictorySharedEvents;
18716
18694
  }((react__WEBPACK_IMPORTED_MODULE_7___default().Component));
18717
-
18718
18695
  VictorySharedEvents.displayName = "VictorySharedEvents";
18719
18696
  VictorySharedEvents.role = "shared-event-wrapper";
18720
- VictorySharedEvents.propTypes = {
18721
- children: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_12___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_12___default().node)), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().node)]),
18722
- container: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().node),
18723
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_12___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func), victory_core__WEBPACK_IMPORTED_MODULE_13__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_13__.integer, victory_core__WEBPACK_IMPORTED_MODULE_13__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().string)]),
18724
- events: prop_types__WEBPACK_IMPORTED_MODULE_12___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_12___default().shape({
18725
- childName: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_12___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().array)]),
18726
- eventHandlers: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().object),
18727
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_12___default().array), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func), victory_core__WEBPACK_IMPORTED_MODULE_13__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_13__.integer, victory_core__WEBPACK_IMPORTED_MODULE_13__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().string)]),
18728
- target: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().string)
18729
- })),
18730
- externalEventMutations: prop_types__WEBPACK_IMPORTED_MODULE_12___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_12___default().shape({
18731
- callback: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func),
18732
- childName: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_12___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().array)]),
18733
- eventKey: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_12___default().array), victory_core__WEBPACK_IMPORTED_MODULE_13__.allOfType([victory_core__WEBPACK_IMPORTED_MODULE_13__.integer, victory_core__WEBPACK_IMPORTED_MODULE_13__.nonNegative]), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().string)]),
18734
- mutation: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().func),
18735
- target: prop_types__WEBPACK_IMPORTED_MODULE_12___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_12___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_12___default().array)])
18736
- })),
18737
- groupComponent: (prop_types__WEBPACK_IMPORTED_MODULE_12___default().node)
18738
- };
18739
- VictorySharedEvents.defaultProps = {
18740
- groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_7___default().createElement("g", null)
18741
- };
18742
- VictorySharedEvents.contextType = victory_core__WEBPACK_IMPORTED_MODULE_14__["default"];
18743
-
18697
+ VictorySharedEvents.contextType = victory_core__WEBPACK_IMPORTED_MODULE_12__["default"];
18744
18698
 
18745
18699
  /***/ }),
18746
18700