victory-histogram 36.0.0 → 36.1.0

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.
@@ -388,9 +388,7 @@ var fallbackProps = {
388
388
  padding: 50
389
389
  };
390
390
  var defaultData = [];
391
- var VictoryHistogram =
392
- /*#__PURE__*/
393
- function (_React$Component) {
391
+ var VictoryHistogram = /*#__PURE__*/function (_React$Component) {
394
392
  _inherits(VictoryHistogram, _React$Component);
395
393
 
396
394
  function VictoryHistogram() {
@@ -14077,57 +14075,30 @@ if (false) {} else {
14077
14075
 
14078
14076
  /***/ }),
14079
14077
 
14080
- /***/ "../../victory-bar/es/bar.js":
14081
- /*!***********************************!*\
14082
- !*** ../../victory-bar/es/bar.js ***!
14083
- \***********************************/
14078
+ /***/ "../../victory-bar/es/bar-helper-methods.js":
14079
+ /*!**************************************************!*\
14080
+ !*** ../../victory-bar/es/bar-helper-methods.js ***!
14081
+ \**************************************************/
14084
14082
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14085
14083
 
14086
14084
  "use strict";
14087
14085
  __webpack_require__.r(__webpack_exports__);
14088
14086
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14089
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14087
+ /* harmony export */ "getBarWidth": () => (/* binding */ getBarWidth),
14088
+ /* harmony export */ "getCornerRadius": () => (/* binding */ getCornerRadius),
14089
+ /* harmony export */ "getStyle": () => (/* binding */ getStyle)
14090
14090
  /* harmony export */ });
14091
- /* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isNil */ "../../../node_modules/lodash/isNil.js");
14092
- /* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_0__);
14093
- /* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
14094
- /* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1__);
14091
+ /* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isPlainObject */ "../../../node_modules/lodash/isPlainObject.js");
14092
+ /* harmony import */ var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
14093
+ /* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isNil */ "../../../node_modules/lodash/isNil.js");
14094
+ /* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_1__);
14095
14095
  /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/lodash/assign.js");
14096
14096
  /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_2__);
14097
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react");
14098
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
14099
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
14100
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);
14101
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
14102
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
14103
- /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
14104
- /* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-helper-methods */ "../../victory-bar/es/path-helper-methods.js");
14097
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
14105
14098
 
14106
14099
 
14107
14100
 
14108
14101
 
14109
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
14110
-
14111
- 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; }
14112
-
14113
-
14114
-
14115
-
14116
-
14117
-
14118
- var getBarPath = function (props, width, cornerRadius) {
14119
- if (props.getPath) {
14120
- return (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getCustomBarPath)(props, width);
14121
- }
14122
-
14123
- return props.horizontal ? (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getHorizontalBarPath)(props, width, cornerRadius) : (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getVerticalBarPath)(props, width, cornerRadius);
14124
- };
14125
-
14126
- var getPolarBarPath = function (props, cornerRadius) {
14127
- // TODO Radial bars
14128
- return (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getVerticalPolarBarPath)(props, cornerRadius);
14129
- };
14130
-
14131
14102
  var getBarWidth = function (barWidth, props) {
14132
14103
  var scale = props.scale,
14133
14104
  data = props.data,
@@ -14135,7 +14106,7 @@ var getBarWidth = function (barWidth, props) {
14135
14106
  style = props.style;
14136
14107
 
14137
14108
  if (barWidth) {
14138
- return victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(barWidth, props);
14109
+ return victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(barWidth, props);
14139
14110
  } else if (style.width) {
14140
14111
  return style.width;
14141
14112
  }
@@ -14157,10 +14128,10 @@ var getCornerRadiusFromObject = function (cornerRadius, props) {
14157
14128
  };
14158
14129
 
14159
14130
  var updateCornerRadius = function (corner, fallback) {
14160
- if (!lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(cornerRadius[corner])) {
14161
- realCornerRadius[corner] = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(cornerRadius[corner], props);
14162
- } else if (!lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(cornerRadius[fallback])) {
14163
- realCornerRadius[corner] = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(cornerRadius[fallback], props);
14131
+ if (!lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(cornerRadius[corner])) {
14132
+ realCornerRadius[corner] = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(cornerRadius[corner], props);
14133
+ } else if (!lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(cornerRadius[fallback])) {
14134
+ realCornerRadius[corner] = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(cornerRadius[fallback], props);
14164
14135
  }
14165
14136
  };
14166
14137
 
@@ -14183,15 +14154,14 @@ var getCornerRadius = function (cornerRadius, props) {
14183
14154
  return realCornerRadius;
14184
14155
  }
14185
14156
 
14186
- if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_1___default()(cornerRadius)) {
14157
+ if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(cornerRadius)) {
14187
14158
  return getCornerRadiusFromObject(cornerRadius, props);
14188
14159
  } else {
14189
- realCornerRadius.topLeft = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(cornerRadius, props);
14190
- realCornerRadius.topRight = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(cornerRadius, props);
14160
+ realCornerRadius.topLeft = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(cornerRadius, props);
14161
+ realCornerRadius.topRight = victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateProp(cornerRadius, props);
14191
14162
  return realCornerRadius;
14192
14163
  }
14193
14164
  };
14194
-
14195
14165
  var getStyle = function () {
14196
14166
  var style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14197
14167
  var props = arguments.length > 1 ? arguments[1] : undefined;
@@ -14205,9 +14175,45 @@ var getStyle = function () {
14205
14175
  fill: "black",
14206
14176
  stroke: stroke
14207
14177
  };
14208
- return victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateStyle(lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()(baseStyle, style), props);
14178
+ return victory_core__WEBPACK_IMPORTED_MODULE_3__.evaluateStyle(lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()(baseStyle, style), props);
14209
14179
  };
14210
14180
 
14181
+ /***/ }),
14182
+
14183
+ /***/ "../../victory-bar/es/bar.js":
14184
+ /*!***********************************!*\
14185
+ !*** ../../victory-bar/es/bar.js ***!
14186
+ \***********************************/
14187
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
14188
+
14189
+ "use strict";
14190
+ __webpack_require__.r(__webpack_exports__);
14191
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14192
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14193
+ /* harmony export */ });
14194
+ /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/assign */ "../../../node_modules/lodash/assign.js");
14195
+ /* harmony import */ var lodash_assign__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_assign__WEBPACK_IMPORTED_MODULE_0__);
14196
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
14197
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
14198
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react");
14199
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
14200
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/helpers.js");
14201
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/common-props.js");
14202
+ /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/path.js");
14203
+ /* harmony import */ var _bar_helper_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./bar-helper-methods */ "../../victory-bar/es/bar-helper-methods.js");
14204
+ /* harmony import */ var _path_helper_methods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./path-helper-methods */ "../../victory-bar/es/path-helper-methods.js");
14205
+
14206
+
14207
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
14208
+
14209
+ 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; }
14210
+
14211
+
14212
+
14213
+
14214
+
14215
+
14216
+
14211
14217
  var evaluateProps = function (props) {
14212
14218
  /**
14213
14219
  * Potential evaluated props of following must be evaluated in this order:
@@ -14221,19 +14227,19 @@ var evaluateProps = function (props) {
14221
14227
  * `id`
14222
14228
  * `tabIndex`
14223
14229
  */
14224
- var style = getStyle(props.style, props);
14225
- var barWidth = getBarWidth(props.barWidth, lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, props, {
14230
+ var style = (0,_bar_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getStyle)(props.style, props);
14231
+ var barWidth = (0,_bar_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getBarWidth)(props.barWidth, lodash_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {
14226
14232
  style: style
14227
14233
  }));
14228
- var cornerRadius = getCornerRadius(props.cornerRadius, lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, props, {
14234
+ var cornerRadius = (0,_bar_helper_methods__WEBPACK_IMPORTED_MODULE_3__.getCornerRadius)(props.cornerRadius, lodash_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {
14229
14235
  style: style,
14230
14236
  barWidth: barWidth
14231
14237
  }));
14232
- var ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(props.ariaLabel, props);
14233
- var desc = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(props.desc, props);
14234
- var id = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(props.id, props);
14235
- var tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_6__.evaluateProp(props.tabIndex, props);
14236
- return lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, props, {
14238
+ var ariaLabel = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.ariaLabel, props);
14239
+ var desc = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.desc, props);
14240
+ var id = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.id, props);
14241
+ var tabIndex = victory_core__WEBPACK_IMPORTED_MODULE_4__.evaluateProp(props.tabIndex, props);
14242
+ return lodash_assign__WEBPACK_IMPORTED_MODULE_0___default()({}, props, {
14237
14243
  ariaLabel: ariaLabel,
14238
14244
  style: style,
14239
14245
  barWidth: barWidth,
@@ -14252,9 +14258,9 @@ var Bar = function (props) {
14252
14258
  style = _props.style,
14253
14259
  barWidth = _props.barWidth,
14254
14260
  cornerRadius = _props.cornerRadius;
14255
- var path = polar ? getPolarBarPath(props, cornerRadius) : getBarPath(props, barWidth, cornerRadius);
14261
+ var path = polar ? (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getPolarBarPath)(props, cornerRadius) : (0,_path_helper_methods__WEBPACK_IMPORTED_MODULE_5__.getBarPath)(props, barWidth, cornerRadius);
14256
14262
  var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;
14257
- return react__WEBPACK_IMPORTED_MODULE_3___default().cloneElement(props.pathComponent, _objectSpread({}, props.events, {
14263
+ return react__WEBPACK_IMPORTED_MODULE_2___default().cloneElement(props.pathComponent, _objectSpread({}, props.events, {
14258
14264
  "aria-label": props.ariaLabel,
14259
14265
  style: style,
14260
14266
  d: path,
@@ -14269,30 +14275,30 @@ var Bar = function (props) {
14269
14275
  }));
14270
14276
  };
14271
14277
 
14272
- Bar.propTypes = _objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_7__.primitiveProps, {
14273
- alignment: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOf(["start", "middle", "end"]),
14274
- barRatio: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
14275
- barWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
14276
- cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func), prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({
14277
- top: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
14278
- topLeft: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
14279
- topRight: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
14280
- bottom: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
14281
- bottomLeft: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)]),
14282
- bottomRight: prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func)])
14278
+ Bar.propTypes = _objectSpread({}, victory_core__WEBPACK_IMPORTED_MODULE_6__.primitiveProps, {
14279
+ alignment: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOf(["start", "middle", "end"]),
14280
+ barRatio: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
14281
+ barWidth: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
14282
+ cornerRadius: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({
14283
+ top: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
14284
+ topLeft: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
14285
+ topRight: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
14286
+ bottom: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
14287
+ bottomLeft: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)]),
14288
+ bottomRight: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func)])
14283
14289
  })]),
14284
- datum: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object),
14285
- getPath: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func),
14286
- horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool),
14287
- pathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().element),
14288
- width: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
14289
- x: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
14290
- y: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number),
14291
- y0: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)
14290
+ datum: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
14291
+ getPath: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func),
14292
+ horizontal: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool),
14293
+ pathComponent: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().element),
14294
+ width: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
14295
+ x: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
14296
+ y: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number),
14297
+ y0: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number)
14292
14298
  });
14293
14299
  Bar.defaultProps = {
14294
14300
  defaultBarWidth: 8,
14295
- pathComponent: react__WEBPACK_IMPORTED_MODULE_3___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_8__.default, null),
14301
+ pathComponent: react__WEBPACK_IMPORTED_MODULE_2___default().createElement(victory_core__WEBPACK_IMPORTED_MODULE_7__.default, null),
14296
14302
  role: "presentation",
14297
14303
  shapeRendering: "auto"
14298
14304
  };
@@ -14612,7 +14618,9 @@ __webpack_require__.r(__webpack_exports__);
14612
14618
  /* harmony export */ "getCustomBarPath": () => (/* binding */ getCustomBarPath),
14613
14619
  /* harmony export */ "getVerticalBarPath": () => (/* binding */ getVerticalBarPath),
14614
14620
  /* harmony export */ "getHorizontalBarPath": () => (/* binding */ getHorizontalBarPath),
14615
- /* harmony export */ "getVerticalPolarBarPath": () => (/* binding */ getVerticalPolarBarPath)
14621
+ /* harmony export */ "getVerticalPolarBarPath": () => (/* binding */ getVerticalPolarBarPath),
14622
+ /* harmony export */ "getBarPath": () => (/* binding */ getBarPath),
14623
+ /* harmony export */ "getPolarBarPath": () => (/* binding */ getPolarBarPath)
14616
14624
  /* harmony export */ });
14617
14625
  /* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-shape */ "../../../node_modules/d3-shape/src/arc.js");
14618
14626
  /* harmony import */ var _geometry_helper_methods__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./geometry-helper-methods */ "../../victory-bar/es/geometry-helper-methods.js");
@@ -15087,6 +15095,17 @@ var getVerticalPolarBarPath = function (props, cornerRadius) {
15087
15095
  }, "");
15088
15096
  return "".concat(path, " z");
15089
15097
  };
15098
+ var getBarPath = function (props, width, cornerRadius) {
15099
+ if (props.getPath) {
15100
+ return getCustomBarPath(props, width);
15101
+ }
15102
+
15103
+ return props.horizontal ? getHorizontalBarPath(props, width, cornerRadius) : getVerticalBarPath(props, width, cornerRadius);
15104
+ };
15105
+ var getPolarBarPath = function (props, cornerRadius) {
15106
+ // TODO Radial bars
15107
+ return getVerticalPolarBarPath(props, cornerRadius);
15108
+ };
15090
15109
 
15091
15110
  /***/ }),
15092
15111
 
@@ -15373,9 +15392,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
15373
15392
 
15374
15393
 
15375
15394
 
15376
- var VictoryAnimation =
15377
- /*#__PURE__*/
15378
- function (_React$Component) {
15395
+ var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
15379
15396
  _inherits(VictoryAnimation, _React$Component);
15380
15397
 
15381
15398
  function VictoryAnimation(props, context) {
@@ -15659,9 +15676,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
15659
15676
 
15660
15677
 
15661
15678
 
15662
- var VictoryContainer =
15663
- /*#__PURE__*/
15664
- function (_React$Component) {
15679
+ var VictoryContainer = /*#__PURE__*/function (_React$Component) {
15665
15680
  _inherits(VictoryContainer, _React$Component);
15666
15681
 
15667
15682
  function VictoryContainer(props) {
@@ -16607,9 +16622,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
16607
16622
 
16608
16623
 
16609
16624
 
16610
- var Portal =
16611
- /*#__PURE__*/
16612
- function (_React$Component) {
16625
+ var Portal = /*#__PURE__*/function (_React$Component) {
16613
16626
  _inherits(Portal, _React$Component);
16614
16627
 
16615
16628
  function Portal(props) {
@@ -16728,9 +16741,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
16728
16741
 
16729
16742
 
16730
16743
 
16731
- var VictoryPortal =
16732
- /*#__PURE__*/
16733
- function (_React$Component) {
16744
+ var VictoryPortal = /*#__PURE__*/function (_React$Component) {
16734
16745
  _inherits(VictoryPortal, _React$Component);
16735
16746
 
16736
16747
  function VictoryPortal() {
@@ -17622,9 +17633,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
17622
17633
 
17623
17634
 
17624
17635
 
17625
- var VictoryTransition =
17626
- /*#__PURE__*/
17627
- function (_React$Component) {
17636
+ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
17628
17637
  _inherits(VictoryTransition, _React$Component);
17629
17638
 
17630
17639
  function VictoryTransition(props, context) {
@@ -17925,365 +17934,362 @@ var defaultComponents = [{
17925
17934
  name: "labels"
17926
17935
  }];
17927
17936
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (WrappedComponent, options) {
17928
- return (
17929
- /*#__PURE__*/
17930
- function (_WrappedComponent) {
17931
- _inherits(addEvents, _WrappedComponent);
17937
+ return /*#__PURE__*/function (_WrappedComponent) {
17938
+ _inherits(addEvents, _WrappedComponent);
17932
17939
 
17933
- function addEvents(props) {
17934
- var _this;
17940
+ function addEvents(props) {
17941
+ var _this;
17935
17942
 
17936
- _classCallCheck(this, addEvents);
17943
+ _classCallCheck(this, addEvents);
17937
17944
 
17938
- _this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
17939
- var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
17940
- var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
17941
- _this.state = {};
17945
+ _this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
17946
+ var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
17947
+ var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
17948
+ _this.state = {};
17942
17949
 
17943
- _this.getEvents = function (p, target, eventKey) {
17944
- return boundGetEvents(p, target, eventKey, getScopedEvents);
17945
- };
17950
+ _this.getEvents = function (p, target, eventKey) {
17951
+ return boundGetEvents(p, target, eventKey, getScopedEvents);
17952
+ };
17946
17953
 
17947
- _this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
17954
+ _this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
17948
17955
 
17949
- var calculatedValues = _this.getCalculatedValues(props);
17956
+ var calculatedValues = _this.getCalculatedValues(props);
17950
17957
 
17951
- _this.cacheValues(calculatedValues);
17958
+ _this.cacheValues(calculatedValues);
17952
17959
 
17953
- _this.externalMutations = _this.getExternalMutations(props);
17954
- _this.calculatedState = _this.getStateChanges(props);
17955
- _this.globalEvents = {};
17956
- _this.prevGlobalEventKeys = [];
17957
- _this.boundGlobalEvents = {};
17958
- return _this;
17959
- }
17960
+ _this.externalMutations = _this.getExternalMutations(props);
17961
+ _this.calculatedState = _this.getStateChanges(props);
17962
+ _this.globalEvents = {};
17963
+ _this.prevGlobalEventKeys = [];
17964
+ _this.boundGlobalEvents = {};
17965
+ return _this;
17966
+ }
17960
17967
 
17961
- _createClass(addEvents, [{
17962
- key: "shouldComponentUpdate",
17963
- value: function shouldComponentUpdate(nextProps) {
17964
- var externalMutations = this.getExternalMutations(nextProps);
17965
- var animating = this.props.animating || this.props.animate;
17966
- var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
17967
-
17968
- if (animating || newMutation) {
17969
- this.cacheValues(this.getCalculatedValues(nextProps));
17970
- this.externalMutations = externalMutations;
17971
- this.applyExternalMutations(nextProps, externalMutations);
17972
- return true;
17973
- }
17968
+ _createClass(addEvents, [{
17969
+ key: "shouldComponentUpdate",
17970
+ value: function shouldComponentUpdate(nextProps) {
17971
+ var externalMutations = this.getExternalMutations(nextProps);
17972
+ var animating = this.props.animating || this.props.animate;
17973
+ var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
17974
17974
 
17975
- var calculatedState = this.getStateChanges(nextProps);
17975
+ if (animating || newMutation) {
17976
+ this.cacheValues(this.getCalculatedValues(nextProps));
17977
+ this.externalMutations = externalMutations;
17978
+ this.applyExternalMutations(nextProps, externalMutations);
17979
+ return true;
17980
+ }
17976
17981
 
17977
- if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
17978
- this.cacheValues(this.getCalculatedValues(nextProps));
17979
- return true;
17980
- }
17982
+ var calculatedState = this.getStateChanges(nextProps);
17981
17983
 
17982
- if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
17983
- this.cacheValues(this.getCalculatedValues(nextProps));
17984
- return true;
17985
- }
17986
-
17987
- return false;
17984
+ if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
17985
+ this.cacheValues(this.getCalculatedValues(nextProps));
17986
+ return true;
17988
17987
  }
17989
- }, {
17990
- key: "componentDidMount",
17991
- value: function componentDidMount() {
17992
- var _this2 = this;
17993
-
17994
- var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
17995
17988
 
17996
- globalEventKeys.forEach(function (key) {
17997
- return _this2.addGlobalListener(key);
17998
- });
17999
- this.prevGlobalEventKeys = globalEventKeys;
17989
+ if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
17990
+ this.cacheValues(this.getCalculatedValues(nextProps));
17991
+ return true;
18000
17992
  }
18001
- }, {
18002
- key: "componentDidUpdate",
18003
- value: function componentDidUpdate(prevProps) {
18004
- var _this3 = this;
18005
17993
 
18006
- var calculatedState = this.getStateChanges(prevProps);
18007
- this.calculatedState = calculatedState;
17994
+ return false;
17995
+ }
17996
+ }, {
17997
+ key: "componentDidMount",
17998
+ value: function componentDidMount() {
17999
+ var _this2 = this;
18008
18000
 
18009
- var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
18001
+ var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
18010
18002
 
18011
- var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
18003
+ globalEventKeys.forEach(function (key) {
18004
+ return _this2.addGlobalListener(key);
18005
+ });
18006
+ this.prevGlobalEventKeys = globalEventKeys;
18007
+ }
18008
+ }, {
18009
+ key: "componentDidUpdate",
18010
+ value: function componentDidUpdate(prevProps) {
18011
+ var _this3 = this;
18012
18012
 
18013
- removedGlobalEventKeys.forEach(function (key) {
18014
- return _this3.removeGlobalListener(key);
18015
- });
18013
+ var calculatedState = this.getStateChanges(prevProps);
18014
+ this.calculatedState = calculatedState;
18016
18015
 
18017
- var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
18016
+ var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
18018
18017
 
18019
- addedGlobalEventKeys.forEach(function (key) {
18020
- return _this3.addGlobalListener(key);
18021
- });
18022
- this.prevGlobalEventKeys = globalEventKeys;
18023
- }
18024
- }, {
18025
- key: "componentWillUnmount",
18026
- value: function componentWillUnmount() {
18027
- var _this4 = this;
18018
+ var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
18028
18019
 
18029
- this.prevGlobalEventKeys.forEach(function (key) {
18030
- return _this4.removeGlobalListener(key);
18031
- });
18032
- }
18033
- }, {
18034
- key: "addGlobalListener",
18035
- value: function addGlobalListener(key) {
18036
- var _this5 = this;
18020
+ removedGlobalEventKeys.forEach(function (key) {
18021
+ return _this3.removeGlobalListener(key);
18022
+ });
18037
18023
 
18038
- var boundListener = function (event) {
18039
- var listener = _this5.globalEvents[key];
18040
- return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
18041
- };
18024
+ var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
18042
18025
 
18043
- this.boundGlobalEvents[key] = boundListener;
18044
- window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
18045
- }
18046
- }, {
18047
- key: "removeGlobalListener",
18048
- value: function removeGlobalListener(key) {
18049
- window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
18050
- } // compile all state changes from own and parent state. Order doesn't matter, as any state
18051
- // state change should trigger a re-render
18026
+ addedGlobalEventKeys.forEach(function (key) {
18027
+ return _this3.addGlobalListener(key);
18028
+ });
18029
+ this.prevGlobalEventKeys = globalEventKeys;
18030
+ }
18031
+ }, {
18032
+ key: "componentWillUnmount",
18033
+ value: function componentWillUnmount() {
18034
+ var _this4 = this;
18052
18035
 
18053
- }, {
18054
- key: "getStateChanges",
18055
- value: function getStateChanges(props) {
18056
- var _this6 = this;
18036
+ this.prevGlobalEventKeys.forEach(function (key) {
18037
+ return _this4.removeGlobalListener(key);
18038
+ });
18039
+ }
18040
+ }, {
18041
+ key: "addGlobalListener",
18042
+ value: function addGlobalListener(key) {
18043
+ var _this5 = this;
18044
+
18045
+ var boundListener = function (event) {
18046
+ var listener = _this5.globalEvents[key];
18047
+ return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
18048
+ };
18057
18049
 
18058
- if (!this.hasEvents) {
18059
- return {};
18060
- }
18050
+ this.boundGlobalEvents[key] = boundListener;
18051
+ window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
18052
+ }
18053
+ }, {
18054
+ key: "removeGlobalListener",
18055
+ value: function removeGlobalListener(key) {
18056
+ window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
18057
+ } // compile all state changes from own and parent state. Order doesn't matter, as any state
18058
+ // state change should trigger a re-render
18059
+
18060
+ }, {
18061
+ key: "getStateChanges",
18062
+ value: function getStateChanges(props) {
18063
+ var _this6 = this;
18064
+
18065
+ if (!this.hasEvents) {
18066
+ return {};
18067
+ }
18061
18068
 
18062
- var getState = function (key, type) {
18063
- var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
18069
+ var getState = function (key, type) {
18070
+ var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
18064
18071
 
18065
- return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
18066
- };
18072
+ return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
18073
+ };
18067
18074
 
18068
- options = options || {};
18069
- var components = options.components || defaultComponents;
18070
- var stateChanges = components.map(function (component) {
18071
- if (!props.standalone && component.name === "parent") {
18072
- // don't check for changes on parent props for non-standalone components
18073
- return undefined;
18074
- } else {
18075
- return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
18076
- return getState(key, component.name);
18077
- }).filter(Boolean);
18078
- }
18079
- }).filter(Boolean);
18080
- return stateChanges;
18081
- }
18082
- }, {
18083
- key: "applyExternalMutations",
18084
- value: function applyExternalMutations(props, externalMutations) {
18085
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
18086
- var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
18087
- memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
18088
- return memo;
18089
- }, []);
18090
- var compiledCallbacks = callbacks.length ? function () {
18091
- callbacks.forEach(function (c) {
18092
- return c();
18093
- });
18094
- } : undefined;
18095
- this.setState(externalMutations, compiledCallbacks);
18075
+ options = options || {};
18076
+ var components = options.components || defaultComponents;
18077
+ var stateChanges = components.map(function (component) {
18078
+ if (!props.standalone && component.name === "parent") {
18079
+ // don't check for changes on parent props for non-standalone components
18080
+ return undefined;
18081
+ } else {
18082
+ return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
18083
+ return getState(key, component.name);
18084
+ }).filter(Boolean);
18096
18085
  }
18086
+ }).filter(Boolean);
18087
+ return stateChanges;
18088
+ }
18089
+ }, {
18090
+ key: "applyExternalMutations",
18091
+ value: function applyExternalMutations(props, externalMutations) {
18092
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
18093
+ var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
18094
+ memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
18095
+ return memo;
18096
+ }, []);
18097
+ var compiledCallbacks = callbacks.length ? function () {
18098
+ callbacks.forEach(function (c) {
18099
+ return c();
18100
+ });
18101
+ } : undefined;
18102
+ this.setState(externalMutations, compiledCallbacks);
18097
18103
  }
18098
- }, {
18099
- key: "getCalculatedValues",
18100
- value: function getCalculatedValues(props) {
18101
- var sharedEvents = props.sharedEvents;
18102
- var components = WrappedComponent.expectedComponents;
18103
- var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
18104
- var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
18105
- return undefined;
18106
- };
18107
- var baseProps = this.getBaseProps(props, getSharedEventState);
18108
-
18109
- var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
18110
- return key !== "parent";
18111
- });
18104
+ }
18105
+ }, {
18106
+ key: "getCalculatedValues",
18107
+ value: function getCalculatedValues(props) {
18108
+ var sharedEvents = props.sharedEvents;
18109
+ var components = WrappedComponent.expectedComponents;
18110
+ var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
18111
+ var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
18112
+ return undefined;
18113
+ };
18114
+ var baseProps = this.getBaseProps(props, getSharedEventState);
18112
18115
 
18113
- var hasEvents = props.events || props.sharedEvents || componentEvents;
18114
- var events = this.getAllEvents(props);
18115
- return {
18116
- componentEvents: componentEvents,
18117
- getSharedEventState: getSharedEventState,
18118
- baseProps: baseProps,
18119
- dataKeys: dataKeys,
18120
- hasEvents: hasEvents,
18121
- events: events
18122
- };
18123
- }
18124
- }, {
18125
- key: "getExternalMutations",
18126
- value: function getExternalMutations(props) {
18127
- var sharedEvents = props.sharedEvents,
18128
- externalEventMutations = props.externalEventMutations;
18129
- return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
18130
- }
18131
- }, {
18132
- key: "cacheValues",
18133
- value: function cacheValues(obj) {
18134
- var _this7 = this;
18116
+ var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
18117
+ return key !== "parent";
18118
+ });
18135
18119
 
18136
- lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
18137
- _this7[key] = obj[key];
18138
- });
18139
- }
18140
- }, {
18141
- key: "getBaseProps",
18142
- value: function getBaseProps(props, getSharedEventState) {
18143
- getSharedEventState = getSharedEventState || this.getSharedEventState;
18144
- var sharedParentState = getSharedEventState("parent", "parent");
18145
- var parentState = this.getEventState("parent", "parent");
18120
+ var hasEvents = props.events || props.sharedEvents || componentEvents;
18121
+ var events = this.getAllEvents(props);
18122
+ return {
18123
+ componentEvents: componentEvents,
18124
+ getSharedEventState: getSharedEventState,
18125
+ baseProps: baseProps,
18126
+ dataKeys: dataKeys,
18127
+ hasEvents: hasEvents,
18128
+ events: events
18129
+ };
18130
+ }
18131
+ }, {
18132
+ key: "getExternalMutations",
18133
+ value: function getExternalMutations(props) {
18134
+ var sharedEvents = props.sharedEvents,
18135
+ externalEventMutations = props.externalEventMutations;
18136
+ return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
18137
+ }
18138
+ }, {
18139
+ key: "cacheValues",
18140
+ value: function cacheValues(obj) {
18141
+ var _this7 = this;
18146
18142
 
18147
- var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
18143
+ lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
18144
+ _this7[key] = obj[key];
18145
+ });
18146
+ }
18147
+ }, {
18148
+ key: "getBaseProps",
18149
+ value: function getBaseProps(props, getSharedEventState) {
18150
+ getSharedEventState = getSharedEventState || this.getSharedEventState;
18151
+ var sharedParentState = getSharedEventState("parent", "parent");
18152
+ var parentState = this.getEventState("parent", "parent");
18148
18153
 
18149
- var parentPropsList = baseParentProps.parentControlledProps;
18150
- var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
18154
+ var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
18151
18155
 
18152
- var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
18156
+ var parentPropsList = baseParentProps.parentControlledProps;
18157
+ var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
18153
18158
 
18154
- return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
18155
- }
18156
- }, {
18157
- key: "getAllEvents",
18158
- value: function getAllEvents(props) {
18159
- if (Array.isArray(this.componentEvents)) {
18160
- var _componentEvents;
18159
+ var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
18161
18160
 
18162
- return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
18163
- }
18161
+ return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
18162
+ }
18163
+ }, {
18164
+ key: "getAllEvents",
18165
+ value: function getAllEvents(props) {
18166
+ if (Array.isArray(this.componentEvents)) {
18167
+ var _componentEvents;
18164
18168
 
18165
- return props.events;
18169
+ return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
18166
18170
  }
18167
- }, {
18168
- key: "getComponentProps",
18169
- value: function getComponentProps(component, type, index) {
18170
- var name = this.props.name || WrappedComponent.role;
18171
- var key = this.dataKeys && this.dataKeys[index] || index;
18172
- var id = "".concat(name, "-").concat(type, "-").concat(key);
18173
- var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
18174
-
18175
- if (!baseProps && !this.hasEvents) {
18176
- return undefined;
18177
- }
18178
-
18179
- if (this.hasEvents) {
18180
- var baseEvents = this.getEvents(this.props, type, key);
18181
-
18182
- var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
18183
- index: index,
18184
- key: id
18185
- }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
18186
- id: id
18187
- });
18188
18171
 
18189
- var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
18172
+ return props.events;
18173
+ }
18174
+ }, {
18175
+ key: "getComponentProps",
18176
+ value: function getComponentProps(component, type, index) {
18177
+ var name = this.props.name || WrappedComponent.role;
18178
+ var key = this.dataKeys && this.dataKeys[index] || index;
18179
+ var id = "".concat(name, "-").concat(type, "-").concat(key);
18180
+ var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
18181
+
18182
+ if (!baseProps && !this.hasEvents) {
18183
+ return undefined;
18184
+ }
18190
18185
 
18191
- return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
18192
- events: events
18193
- });
18194
- }
18186
+ if (this.hasEvents) {
18187
+ var baseEvents = this.getEvents(this.props, type, key);
18195
18188
 
18196
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
18189
+ var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
18197
18190
  index: index,
18198
18191
  key: id
18199
- }, component.props, baseProps, {
18192
+ }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
18200
18193
  id: id
18201
18194
  });
18202
- }
18203
- }, {
18204
- key: "renderContainer",
18205
- value: function renderContainer(component, children) {
18206
- var isContainer = component.type && component.type.role === "container";
18207
- var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
18208
-
18209
- if (parentProps.events) {
18210
- this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
18211
- parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
18212
- }
18213
-
18214
- return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
18215
- }
18216
- }, {
18217
- key: "animateComponent",
18218
- value: function animateComponent(props, defaultAnimationWhitelist) {
18219
- var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
18220
- return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
18221
- animate: props.animate,
18222
- animationWhitelist: animationWhitelist
18223
- }, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
18224
- } // Used by `VictoryLine` and `VictoryArea`
18225
-
18226
- }, {
18227
- key: "renderContinuousData",
18228
- value: function renderContinuousData(props) {
18229
- var _this8 = this;
18230
18195
 
18231
- var dataComponent = props.dataComponent,
18232
- labelComponent = props.labelComponent,
18233
- groupComponent = props.groupComponent;
18196
+ var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
18234
18197
 
18235
- var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
18198
+ return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
18199
+ events: events
18200
+ });
18201
+ }
18236
18202
 
18237
- var labelComponents = dataKeys.reduce(function (memo, key) {
18238
- var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
18203
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
18204
+ index: index,
18205
+ key: id
18206
+ }, component.props, baseProps, {
18207
+ id: id
18208
+ });
18209
+ }
18210
+ }, {
18211
+ key: "renderContainer",
18212
+ value: function renderContainer(component, children) {
18213
+ var isContainer = component.type && component.type.role === "container";
18214
+ var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
18215
+
18216
+ if (parentProps.events) {
18217
+ this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
18218
+ parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
18219
+ }
18239
18220
 
18240
- if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
18241
- memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
18242
- }
18221
+ return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
18222
+ }
18223
+ }, {
18224
+ key: "animateComponent",
18225
+ value: function animateComponent(props, defaultAnimationWhitelist) {
18226
+ var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
18227
+ return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
18228
+ animate: props.animate,
18229
+ animationWhitelist: animationWhitelist
18230
+ }, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
18231
+ } // Used by `VictoryLine` and `VictoryArea`
18232
+
18233
+ }, {
18234
+ key: "renderContinuousData",
18235
+ value: function renderContinuousData(props) {
18236
+ var _this8 = this;
18237
+
18238
+ var dataComponent = props.dataComponent,
18239
+ labelComponent = props.labelComponent,
18240
+ groupComponent = props.groupComponent;
18241
+
18242
+ var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
18243
+
18244
+ var labelComponents = dataKeys.reduce(function (memo, key) {
18245
+ var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
18246
+
18247
+ if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
18248
+ memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
18249
+ }
18243
18250
 
18244
- return memo;
18245
- }, []);
18246
- var dataProps = this.getComponentProps(dataComponent, "data", "all");
18247
- var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
18248
- return this.renderContainer(groupComponent, children);
18249
- }
18250
- }, {
18251
- key: "renderData",
18252
- value: function renderData(props) {
18253
- var _this9 = this;
18254
-
18255
- var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
18256
- var dataComponent = props.dataComponent,
18257
- labelComponent = props.labelComponent,
18258
- groupComponent = props.groupComponent;
18259
- var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
18260
- var dataProps = _this9.getComponentProps(dataComponent, "data", index);
18261
-
18262
- if (shouldRenderDatum(dataProps.datum)) {
18263
- validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
18264
- }
18251
+ return memo;
18252
+ }, []);
18253
+ var dataProps = this.getComponentProps(dataComponent, "data", "all");
18254
+ var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
18255
+ return this.renderContainer(groupComponent, children);
18256
+ }
18257
+ }, {
18258
+ key: "renderData",
18259
+ value: function renderData(props) {
18260
+ var _this9 = this;
18261
+
18262
+ var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
18263
+ var dataComponent = props.dataComponent,
18264
+ labelComponent = props.labelComponent,
18265
+ groupComponent = props.groupComponent;
18266
+ var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
18267
+ var dataProps = _this9.getComponentProps(dataComponent, "data", index);
18268
+
18269
+ if (shouldRenderDatum(dataProps.datum)) {
18270
+ validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
18271
+ }
18265
18272
 
18266
- return validDataComponents;
18267
- }, []);
18268
- var labelComponents = this.dataKeys.map(function (_dataKey, index) {
18269
- var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
18273
+ return validDataComponents;
18274
+ }, []);
18275
+ var labelComponents = this.dataKeys.map(function (_dataKey, index) {
18276
+ var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
18270
18277
 
18271
- if (labelProps.text !== undefined && labelProps.text !== null) {
18272
- return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
18273
- }
18278
+ if (labelProps.text !== undefined && labelProps.text !== null) {
18279
+ return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
18280
+ }
18274
18281
 
18275
- return undefined;
18276
- }).filter(Boolean);
18282
+ return undefined;
18283
+ }).filter(Boolean);
18277
18284
 
18278
- var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
18285
+ var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
18279
18286
 
18280
- return this.renderContainer(groupComponent, children);
18281
- }
18282
- }]);
18287
+ return this.renderContainer(groupComponent, children);
18288
+ }
18289
+ }]);
18283
18290
 
18284
- return addEvents;
18285
- }(WrappedComponent)
18286
- );
18291
+ return addEvents;
18292
+ }(WrappedComponent);
18287
18293
  });
18288
18294
 
18289
18295
  /***/ }),
@@ -21564,9 +21570,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
21564
21570
 
21565
21571
 
21566
21572
 
21567
- var Timer =
21568
- /*#__PURE__*/
21569
- function () {
21573
+ var Timer = /*#__PURE__*/function () {
21570
21574
  function Timer() {
21571
21575
  _classCallCheck(this, Timer);
21572
21576