victory-legend 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.
@@ -473,9 +473,7 @@ var defaultLegendData = [{
473
473
  name: "Series 2"
474
474
  }];
475
475
 
476
- var VictoryLegend =
477
- /*#__PURE__*/
478
- function (_React$Component) {
476
+ var VictoryLegend = /*#__PURE__*/function (_React$Component) {
479
477
  _inherits(VictoryLegend, _React$Component);
480
478
 
481
479
  function VictoryLegend() {
@@ -8684,9 +8682,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
8684
8682
 
8685
8683
 
8686
8684
 
8687
- var VictoryAnimation =
8688
- /*#__PURE__*/
8689
- function (_React$Component) {
8685
+ var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
8690
8686
  _inherits(VictoryAnimation, _React$Component);
8691
8687
 
8692
8688
  function VictoryAnimation(props, context) {
@@ -8970,9 +8966,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
8970
8966
 
8971
8967
 
8972
8968
 
8973
- var VictoryContainer =
8974
- /*#__PURE__*/
8975
- function (_React$Component) {
8969
+ var VictoryContainer = /*#__PURE__*/function (_React$Component) {
8976
8970
  _inherits(VictoryContainer, _React$Component);
8977
8971
 
8978
8972
  function VictoryContainer(props) {
@@ -9918,9 +9912,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
9918
9912
 
9919
9913
 
9920
9914
 
9921
- var Portal =
9922
- /*#__PURE__*/
9923
- function (_React$Component) {
9915
+ var Portal = /*#__PURE__*/function (_React$Component) {
9924
9916
  _inherits(Portal, _React$Component);
9925
9917
 
9926
9918
  function Portal(props) {
@@ -10039,9 +10031,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
10039
10031
 
10040
10032
 
10041
10033
 
10042
- var VictoryPortal =
10043
- /*#__PURE__*/
10044
- function (_React$Component) {
10034
+ var VictoryPortal = /*#__PURE__*/function (_React$Component) {
10045
10035
  _inherits(VictoryPortal, _React$Component);
10046
10036
 
10047
10037
  function VictoryPortal() {
@@ -10243,95 +10233,6 @@ Border.defaultProps = {
10243
10233
 
10244
10234
  /***/ }),
10245
10235
 
10246
- /***/ "../../victory-core/es/victory-primitives/path-helpers.js":
10247
- /*!****************************************************************!*\
10248
- !*** ../../victory-core/es/victory-primitives/path-helpers.js ***!
10249
- \****************************************************************/
10250
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
10251
-
10252
- "use strict";
10253
- __webpack_require__.r(__webpack_exports__);
10254
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10255
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10256
- /* harmony export */ });
10257
- /* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/range */ "../../../node_modules/lodash/range.js");
10258
- /* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_range__WEBPACK_IMPORTED_MODULE_0__);
10259
-
10260
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
10261
- circle: function (x, y, size) {
10262
- return "M ".concat(x, ", ").concat(y, "\n m ").concat(-size, ", 0\n a ").concat(size, ", ").concat(size, " 0 1,0 ").concat(size * 2, ",0\n a ").concat(size, ", ").concat(size, " 0 1,0 ").concat(-size * 2, ",0");
10263
- },
10264
- square: function (x, y, size) {
10265
- var baseSize = 0.87 * size; // eslint-disable-line no-magic-numbers
10266
-
10267
- var x0 = x - baseSize;
10268
- var y1 = y + baseSize;
10269
- var distance = x + baseSize - x0;
10270
- return "M ".concat(x0, ", ").concat(y1, "\n h").concat(distance, "\n v-").concat(distance, "\n h-").concat(distance, "\n z");
10271
- },
10272
- diamond: function (x, y, size) {
10273
- var baseSize = 0.87 * size; // eslint-disable-line no-magic-numbers
10274
-
10275
- var length = Math.sqrt(2 * (baseSize * baseSize));
10276
- return "M ".concat(x, ", ").concat(y + length, "\n l ").concat(length, ", -").concat(length, "\n l -").concat(length, ", -").concat(length, "\n l -").concat(length, ", ").concat(length, "\n l ").concat(length, ", ").concat(length, "\n z");
10277
- },
10278
- triangleDown: function (x, y, size) {
10279
- var height = size / 2 * Math.sqrt(3);
10280
- var x0 = x - size;
10281
- var x1 = x + size;
10282
- var y0 = y - size;
10283
- var y1 = y + height;
10284
- return "M ".concat(x0, ", ").concat(y0, "\n L ").concat(x1, ", ").concat(y0, "\n L ").concat(x, ", ").concat(y1, "\n z");
10285
- },
10286
- triangleUp: function (x, y, size) {
10287
- var height = size / 2 * Math.sqrt(3);
10288
- var x0 = x - size;
10289
- var x1 = x + size;
10290
- var y0 = y - height;
10291
- var y1 = y + size;
10292
- return "M ".concat(x0, ", ").concat(y1, "\n L ").concat(x1, ", ").concat(y1, "\n L ").concat(x, ", ").concat(y0, "\n z");
10293
- },
10294
- plus: function (x, y, size) {
10295
- var baseSize = 1.1 * size; // eslint-disable-line no-magic-numbers
10296
-
10297
- var distance = baseSize / 1.5; // eslint-disable-line no-magic-numbers
10298
-
10299
- return "\n M ".concat(x - distance / 2, ", ").concat(y + baseSize, "\n v-").concat(distance, "\n h-").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h-").concat(distance, "\n v").concat(distance, "\n z");
10300
- },
10301
- cross: function (x, y, size) {
10302
- var baseSize = 0.8 * size; // eslint-disable-line no-magic-numbers
10303
-
10304
- var distance = baseSize / 1.5; // eslint-disable-line no-magic-numbers
10305
-
10306
- return "\n M ".concat(x - distance / 2, ", ").concat(y + baseSize + distance, "\n v-").concat(distance * 2, "\n h-").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h-").concat(distance, "\n v").concat(distance * 2, "\n z");
10307
- },
10308
- minus: function (x, y, size) {
10309
- var baseSize = 1.1 * size; // eslint-disable-line no-magic-numbers
10310
-
10311
- var lineHeight = baseSize - baseSize * 0.3; // eslint-disable-line no-magic-numbers
10312
-
10313
- var x0 = x - baseSize;
10314
- var y1 = y + lineHeight / 2;
10315
- var distance = x + baseSize - x0;
10316
- return "M ".concat(x0, ", ").concat(y1, "\n h").concat(distance, "\n v-").concat(lineHeight, "\n h-").concat(distance, "\n z");
10317
- },
10318
- star: function (x, y, size) {
10319
- var baseSize = 1.35 * size; // eslint-disable-line no-magic-numbers
10320
-
10321
- var angle = Math.PI / 5; // eslint-disable-line no-magic-numbers
10322
- // eslint-disable-next-line no-magic-numbers
10323
-
10324
- var starCoords = lodash_range__WEBPACK_IMPORTED_MODULE_0___default()(10).map(function (index) {
10325
- var length = index % 2 === 0 ? baseSize : baseSize / 2;
10326
- return "".concat(length * Math.sin(angle * (index + 1)) + x, ",\n ").concat(length * Math.cos(angle * (index + 1)) + y);
10327
- });
10328
-
10329
- return "M ".concat(starCoords.join("L"), " z");
10330
- }
10331
- });
10332
-
10333
- /***/ }),
10334
-
10335
10236
  /***/ "../../victory-core/es/victory-primitives/path.js":
10336
10237
  /*!********************************************************!*\
10337
10238
  !*** ../../victory-core/es/victory-primitives/path.js ***!
@@ -10379,7 +10280,7 @@ __webpack_require__.r(__webpack_exports__);
10379
10280
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "../../../node_modules/prop-types/index.js");
10380
10281
  /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
10381
10282
  /* harmony import */ var _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../victory-util/helpers */ "../../victory-core/es/victory-util/helpers.js");
10382
- /* harmony import */ var _path_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path-helpers */ "../../victory-core/es/victory-primitives/path-helpers.js");
10283
+ /* harmony import */ var _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../victory-util/point-path-helpers */ "../../victory-core/es/victory-util/point-path-helpers.js");
10383
10284
  /* harmony import */ var _victory_util_common_props__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../victory-util/common-props */ "../../victory-core/es/victory-util/common-props.js");
10384
10285
  /* harmony import */ var _path__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./path */ "../../victory-core/es/victory-primitives/path.js");
10385
10286
 
@@ -10406,15 +10307,15 @@ var getPath = function (props) {
10406
10307
  }
10407
10308
 
10408
10309
  var pathFunctions = {
10409
- circle: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.circle,
10410
- square: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.square,
10411
- diamond: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.diamond,
10412
- triangleDown: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.triangleDown,
10413
- triangleUp: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.triangleUp,
10414
- plus: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.plus,
10415
- minus: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.minus,
10416
- star: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.star,
10417
- cross: _path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.cross
10310
+ circle: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.circle,
10311
+ square: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.square,
10312
+ diamond: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.diamond,
10313
+ triangleDown: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.triangleDown,
10314
+ triangleUp: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.triangleUp,
10315
+ plus: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.plus,
10316
+ minus: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.minus,
10317
+ star: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.star,
10318
+ cross: _victory_util_point_path_helpers__WEBPACK_IMPORTED_MODULE_3__.default.cross
10418
10319
  };
10419
10320
  var symbolFunction = typeof pathFunctions[symbol] === "function" ? pathFunctions[symbol] : pathFunctions.circle;
10420
10321
  return symbolFunction(x, y, size);
@@ -11236,9 +11137,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
11236
11137
 
11237
11138
 
11238
11139
 
11239
- var VictoryTransition =
11240
- /*#__PURE__*/
11241
- function (_React$Component) {
11140
+ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
11242
11141
  _inherits(VictoryTransition, _React$Component);
11243
11142
 
11244
11143
  function VictoryTransition(props, context) {
@@ -11539,365 +11438,362 @@ var defaultComponents = [{
11539
11438
  name: "labels"
11540
11439
  }];
11541
11440
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (WrappedComponent, options) {
11542
- return (
11543
- /*#__PURE__*/
11544
- function (_WrappedComponent) {
11545
- _inherits(addEvents, _WrappedComponent);
11441
+ return /*#__PURE__*/function (_WrappedComponent) {
11442
+ _inherits(addEvents, _WrappedComponent);
11546
11443
 
11547
- function addEvents(props) {
11548
- var _this;
11444
+ function addEvents(props) {
11445
+ var _this;
11549
11446
 
11550
- _classCallCheck(this, addEvents);
11447
+ _classCallCheck(this, addEvents);
11551
11448
 
11552
- _this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
11553
- var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
11554
- var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
11555
- _this.state = {};
11449
+ _this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
11450
+ var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
11451
+ var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
11452
+ _this.state = {};
11556
11453
 
11557
- _this.getEvents = function (p, target, eventKey) {
11558
- return boundGetEvents(p, target, eventKey, getScopedEvents);
11559
- };
11560
-
11561
- _this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
11454
+ _this.getEvents = function (p, target, eventKey) {
11455
+ return boundGetEvents(p, target, eventKey, getScopedEvents);
11456
+ };
11562
11457
 
11563
- var calculatedValues = _this.getCalculatedValues(props);
11458
+ _this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
11564
11459
 
11565
- _this.cacheValues(calculatedValues);
11460
+ var calculatedValues = _this.getCalculatedValues(props);
11566
11461
 
11567
- _this.externalMutations = _this.getExternalMutations(props);
11568
- _this.calculatedState = _this.getStateChanges(props);
11569
- _this.globalEvents = {};
11570
- _this.prevGlobalEventKeys = [];
11571
- _this.boundGlobalEvents = {};
11572
- return _this;
11573
- }
11462
+ _this.cacheValues(calculatedValues);
11574
11463
 
11575
- _createClass(addEvents, [{
11576
- key: "shouldComponentUpdate",
11577
- value: function shouldComponentUpdate(nextProps) {
11578
- var externalMutations = this.getExternalMutations(nextProps);
11579
- var animating = this.props.animating || this.props.animate;
11580
- var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
11581
-
11582
- if (animating || newMutation) {
11583
- this.cacheValues(this.getCalculatedValues(nextProps));
11584
- this.externalMutations = externalMutations;
11585
- this.applyExternalMutations(nextProps, externalMutations);
11586
- return true;
11587
- }
11464
+ _this.externalMutations = _this.getExternalMutations(props);
11465
+ _this.calculatedState = _this.getStateChanges(props);
11466
+ _this.globalEvents = {};
11467
+ _this.prevGlobalEventKeys = [];
11468
+ _this.boundGlobalEvents = {};
11469
+ return _this;
11470
+ }
11588
11471
 
11589
- var calculatedState = this.getStateChanges(nextProps);
11472
+ _createClass(addEvents, [{
11473
+ key: "shouldComponentUpdate",
11474
+ value: function shouldComponentUpdate(nextProps) {
11475
+ var externalMutations = this.getExternalMutations(nextProps);
11476
+ var animating = this.props.animating || this.props.animate;
11477
+ var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
11590
11478
 
11591
- if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
11592
- this.cacheValues(this.getCalculatedValues(nextProps));
11593
- return true;
11594
- }
11479
+ if (animating || newMutation) {
11480
+ this.cacheValues(this.getCalculatedValues(nextProps));
11481
+ this.externalMutations = externalMutations;
11482
+ this.applyExternalMutations(nextProps, externalMutations);
11483
+ return true;
11484
+ }
11595
11485
 
11596
- if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
11597
- this.cacheValues(this.getCalculatedValues(nextProps));
11598
- return true;
11599
- }
11486
+ var calculatedState = this.getStateChanges(nextProps);
11600
11487
 
11601
- return false;
11488
+ if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
11489
+ this.cacheValues(this.getCalculatedValues(nextProps));
11490
+ return true;
11602
11491
  }
11603
- }, {
11604
- key: "componentDidMount",
11605
- value: function componentDidMount() {
11606
- var _this2 = this;
11607
11492
 
11608
- var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
11609
-
11610
- globalEventKeys.forEach(function (key) {
11611
- return _this2.addGlobalListener(key);
11612
- });
11613
- this.prevGlobalEventKeys = globalEventKeys;
11493
+ if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
11494
+ this.cacheValues(this.getCalculatedValues(nextProps));
11495
+ return true;
11614
11496
  }
11615
- }, {
11616
- key: "componentDidUpdate",
11617
- value: function componentDidUpdate(prevProps) {
11618
- var _this3 = this;
11619
11497
 
11620
- var calculatedState = this.getStateChanges(prevProps);
11621
- this.calculatedState = calculatedState;
11498
+ return false;
11499
+ }
11500
+ }, {
11501
+ key: "componentDidMount",
11502
+ value: function componentDidMount() {
11503
+ var _this2 = this;
11622
11504
 
11623
- var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
11505
+ var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
11624
11506
 
11625
- var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
11507
+ globalEventKeys.forEach(function (key) {
11508
+ return _this2.addGlobalListener(key);
11509
+ });
11510
+ this.prevGlobalEventKeys = globalEventKeys;
11511
+ }
11512
+ }, {
11513
+ key: "componentDidUpdate",
11514
+ value: function componentDidUpdate(prevProps) {
11515
+ var _this3 = this;
11626
11516
 
11627
- removedGlobalEventKeys.forEach(function (key) {
11628
- return _this3.removeGlobalListener(key);
11629
- });
11517
+ var calculatedState = this.getStateChanges(prevProps);
11518
+ this.calculatedState = calculatedState;
11630
11519
 
11631
- var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
11520
+ var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
11632
11521
 
11633
- addedGlobalEventKeys.forEach(function (key) {
11634
- return _this3.addGlobalListener(key);
11635
- });
11636
- this.prevGlobalEventKeys = globalEventKeys;
11637
- }
11638
- }, {
11639
- key: "componentWillUnmount",
11640
- value: function componentWillUnmount() {
11641
- var _this4 = this;
11522
+ var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
11642
11523
 
11643
- this.prevGlobalEventKeys.forEach(function (key) {
11644
- return _this4.removeGlobalListener(key);
11645
- });
11646
- }
11647
- }, {
11648
- key: "addGlobalListener",
11649
- value: function addGlobalListener(key) {
11650
- var _this5 = this;
11651
-
11652
- var boundListener = function (event) {
11653
- var listener = _this5.globalEvents[key];
11654
- return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
11655
- };
11524
+ removedGlobalEventKeys.forEach(function (key) {
11525
+ return _this3.removeGlobalListener(key);
11526
+ });
11656
11527
 
11657
- this.boundGlobalEvents[key] = boundListener;
11658
- window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
11659
- }
11660
- }, {
11661
- key: "removeGlobalListener",
11662
- value: function removeGlobalListener(key) {
11663
- window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
11664
- } // compile all state changes from own and parent state. Order doesn't matter, as any state
11665
- // state change should trigger a re-render
11666
-
11667
- }, {
11668
- key: "getStateChanges",
11669
- value: function getStateChanges(props) {
11670
- var _this6 = this;
11671
-
11672
- if (!this.hasEvents) {
11673
- return {};
11674
- }
11528
+ var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
11675
11529
 
11676
- var getState = function (key, type) {
11677
- var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
11530
+ addedGlobalEventKeys.forEach(function (key) {
11531
+ return _this3.addGlobalListener(key);
11532
+ });
11533
+ this.prevGlobalEventKeys = globalEventKeys;
11534
+ }
11535
+ }, {
11536
+ key: "componentWillUnmount",
11537
+ value: function componentWillUnmount() {
11538
+ var _this4 = this;
11678
11539
 
11679
- return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
11680
- };
11540
+ this.prevGlobalEventKeys.forEach(function (key) {
11541
+ return _this4.removeGlobalListener(key);
11542
+ });
11543
+ }
11544
+ }, {
11545
+ key: "addGlobalListener",
11546
+ value: function addGlobalListener(key) {
11547
+ var _this5 = this;
11548
+
11549
+ var boundListener = function (event) {
11550
+ var listener = _this5.globalEvents[key];
11551
+ return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
11552
+ };
11681
11553
 
11682
- options = options || {};
11683
- var components = options.components || defaultComponents;
11684
- var stateChanges = components.map(function (component) {
11685
- if (!props.standalone && component.name === "parent") {
11686
- // don't check for changes on parent props for non-standalone components
11687
- return undefined;
11688
- } else {
11689
- return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
11690
- return getState(key, component.name);
11691
- }).filter(Boolean);
11692
- }
11693
- }).filter(Boolean);
11694
- return stateChanges;
11695
- }
11696
- }, {
11697
- key: "applyExternalMutations",
11698
- value: function applyExternalMutations(props, externalMutations) {
11699
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
11700
- var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
11701
- memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
11702
- return memo;
11703
- }, []);
11704
- var compiledCallbacks = callbacks.length ? function () {
11705
- callbacks.forEach(function (c) {
11706
- return c();
11707
- });
11708
- } : undefined;
11709
- this.setState(externalMutations, compiledCallbacks);
11710
- }
11554
+ this.boundGlobalEvents[key] = boundListener;
11555
+ window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
11556
+ }
11557
+ }, {
11558
+ key: "removeGlobalListener",
11559
+ value: function removeGlobalListener(key) {
11560
+ window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
11561
+ } // compile all state changes from own and parent state. Order doesn't matter, as any state
11562
+ // state change should trigger a re-render
11563
+
11564
+ }, {
11565
+ key: "getStateChanges",
11566
+ value: function getStateChanges(props) {
11567
+ var _this6 = this;
11568
+
11569
+ if (!this.hasEvents) {
11570
+ return {};
11711
11571
  }
11712
- }, {
11713
- key: "getCalculatedValues",
11714
- value: function getCalculatedValues(props) {
11715
- var sharedEvents = props.sharedEvents;
11716
- var components = WrappedComponent.expectedComponents;
11717
- var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
11718
- var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
11719
- return undefined;
11720
- };
11721
- var baseProps = this.getBaseProps(props, getSharedEventState);
11722
11572
 
11723
- var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
11724
- return key !== "parent";
11725
- });
11573
+ var getState = function (key, type) {
11574
+ var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
11726
11575
 
11727
- var hasEvents = props.events || props.sharedEvents || componentEvents;
11728
- var events = this.getAllEvents(props);
11729
- return {
11730
- componentEvents: componentEvents,
11731
- getSharedEventState: getSharedEventState,
11732
- baseProps: baseProps,
11733
- dataKeys: dataKeys,
11734
- hasEvents: hasEvents,
11735
- events: events
11736
- };
11737
- }
11738
- }, {
11739
- key: "getExternalMutations",
11740
- value: function getExternalMutations(props) {
11741
- var sharedEvents = props.sharedEvents,
11742
- externalEventMutations = props.externalEventMutations;
11743
- return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
11744
- }
11745
- }, {
11746
- key: "cacheValues",
11747
- value: function cacheValues(obj) {
11748
- var _this7 = this;
11576
+ return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
11577
+ };
11749
11578
 
11750
- lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
11751
- _this7[key] = obj[key];
11752
- });
11579
+ options = options || {};
11580
+ var components = options.components || defaultComponents;
11581
+ var stateChanges = components.map(function (component) {
11582
+ if (!props.standalone && component.name === "parent") {
11583
+ // don't check for changes on parent props for non-standalone components
11584
+ return undefined;
11585
+ } else {
11586
+ return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
11587
+ return getState(key, component.name);
11588
+ }).filter(Boolean);
11589
+ }
11590
+ }).filter(Boolean);
11591
+ return stateChanges;
11592
+ }
11593
+ }, {
11594
+ key: "applyExternalMutations",
11595
+ value: function applyExternalMutations(props, externalMutations) {
11596
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
11597
+ var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
11598
+ memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
11599
+ return memo;
11600
+ }, []);
11601
+ var compiledCallbacks = callbacks.length ? function () {
11602
+ callbacks.forEach(function (c) {
11603
+ return c();
11604
+ });
11605
+ } : undefined;
11606
+ this.setState(externalMutations, compiledCallbacks);
11753
11607
  }
11754
- }, {
11755
- key: "getBaseProps",
11756
- value: function getBaseProps(props, getSharedEventState) {
11757
- getSharedEventState = getSharedEventState || this.getSharedEventState;
11758
- var sharedParentState = getSharedEventState("parent", "parent");
11759
- var parentState = this.getEventState("parent", "parent");
11608
+ }
11609
+ }, {
11610
+ key: "getCalculatedValues",
11611
+ value: function getCalculatedValues(props) {
11612
+ var sharedEvents = props.sharedEvents;
11613
+ var components = WrappedComponent.expectedComponents;
11614
+ var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
11615
+ var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
11616
+ return undefined;
11617
+ };
11618
+ var baseProps = this.getBaseProps(props, getSharedEventState);
11760
11619
 
11761
- var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
11620
+ var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
11621
+ return key !== "parent";
11622
+ });
11762
11623
 
11763
- var parentPropsList = baseParentProps.parentControlledProps;
11764
- var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
11624
+ var hasEvents = props.events || props.sharedEvents || componentEvents;
11625
+ var events = this.getAllEvents(props);
11626
+ return {
11627
+ componentEvents: componentEvents,
11628
+ getSharedEventState: getSharedEventState,
11629
+ baseProps: baseProps,
11630
+ dataKeys: dataKeys,
11631
+ hasEvents: hasEvents,
11632
+ events: events
11633
+ };
11634
+ }
11635
+ }, {
11636
+ key: "getExternalMutations",
11637
+ value: function getExternalMutations(props) {
11638
+ var sharedEvents = props.sharedEvents,
11639
+ externalEventMutations = props.externalEventMutations;
11640
+ return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
11641
+ }
11642
+ }, {
11643
+ key: "cacheValues",
11644
+ value: function cacheValues(obj) {
11645
+ var _this7 = this;
11765
11646
 
11766
- var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
11647
+ lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
11648
+ _this7[key] = obj[key];
11649
+ });
11650
+ }
11651
+ }, {
11652
+ key: "getBaseProps",
11653
+ value: function getBaseProps(props, getSharedEventState) {
11654
+ getSharedEventState = getSharedEventState || this.getSharedEventState;
11655
+ var sharedParentState = getSharedEventState("parent", "parent");
11656
+ var parentState = this.getEventState("parent", "parent");
11767
11657
 
11768
- return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
11769
- }
11770
- }, {
11771
- key: "getAllEvents",
11772
- value: function getAllEvents(props) {
11773
- if (Array.isArray(this.componentEvents)) {
11774
- var _componentEvents;
11658
+ var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
11775
11659
 
11776
- return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
11777
- }
11660
+ var parentPropsList = baseParentProps.parentControlledProps;
11661
+ var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
11778
11662
 
11779
- return props.events;
11780
- }
11781
- }, {
11782
- key: "getComponentProps",
11783
- value: function getComponentProps(component, type, index) {
11784
- var name = this.props.name || WrappedComponent.role;
11785
- var key = this.dataKeys && this.dataKeys[index] || index;
11786
- var id = "".concat(name, "-").concat(type, "-").concat(key);
11787
- var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
11788
-
11789
- if (!baseProps && !this.hasEvents) {
11790
- return undefined;
11791
- }
11663
+ var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
11792
11664
 
11793
- if (this.hasEvents) {
11794
- var baseEvents = this.getEvents(this.props, type, key);
11665
+ return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
11666
+ }
11667
+ }, {
11668
+ key: "getAllEvents",
11669
+ value: function getAllEvents(props) {
11670
+ if (Array.isArray(this.componentEvents)) {
11671
+ var _componentEvents;
11795
11672
 
11796
- var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
11797
- index: index,
11798
- key: id
11799
- }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
11800
- id: id
11801
- });
11673
+ return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
11674
+ }
11802
11675
 
11803
- var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
11676
+ return props.events;
11677
+ }
11678
+ }, {
11679
+ key: "getComponentProps",
11680
+ value: function getComponentProps(component, type, index) {
11681
+ var name = this.props.name || WrappedComponent.role;
11682
+ var key = this.dataKeys && this.dataKeys[index] || index;
11683
+ var id = "".concat(name, "-").concat(type, "-").concat(key);
11684
+ var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
11685
+
11686
+ if (!baseProps && !this.hasEvents) {
11687
+ return undefined;
11688
+ }
11804
11689
 
11805
- return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
11806
- events: events
11807
- });
11808
- }
11690
+ if (this.hasEvents) {
11691
+ var baseEvents = this.getEvents(this.props, type, key);
11809
11692
 
11810
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
11693
+ var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
11811
11694
  index: index,
11812
11695
  key: id
11813
- }, component.props, baseProps, {
11696
+ }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
11814
11697
  id: id
11815
11698
  });
11816
- }
11817
- }, {
11818
- key: "renderContainer",
11819
- value: function renderContainer(component, children) {
11820
- var isContainer = component.type && component.type.role === "container";
11821
- var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
11822
-
11823
- if (parentProps.events) {
11824
- this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
11825
- parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
11826
- }
11827
11699
 
11828
- return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
11700
+ var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
11701
+
11702
+ return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
11703
+ events: events
11704
+ });
11829
11705
  }
11830
- }, {
11831
- key: "animateComponent",
11832
- value: function animateComponent(props, defaultAnimationWhitelist) {
11833
- var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
11834
- return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
11835
- animate: props.animate,
11836
- animationWhitelist: animationWhitelist
11837
- }, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
11838
- } // Used by `VictoryLine` and `VictoryArea`
11839
-
11840
- }, {
11841
- key: "renderContinuousData",
11842
- value: function renderContinuousData(props) {
11843
- var _this8 = this;
11844
-
11845
- var dataComponent = props.dataComponent,
11846
- labelComponent = props.labelComponent,
11847
- groupComponent = props.groupComponent;
11848
-
11849
- var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
11850
-
11851
- var labelComponents = dataKeys.reduce(function (memo, key) {
11852
- var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
11853
-
11854
- if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
11855
- memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
11856
- }
11857
11706
 
11858
- return memo;
11859
- }, []);
11860
- var dataProps = this.getComponentProps(dataComponent, "data", "all");
11861
- var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
11862
- return this.renderContainer(groupComponent, children);
11707
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
11708
+ index: index,
11709
+ key: id
11710
+ }, component.props, baseProps, {
11711
+ id: id
11712
+ });
11713
+ }
11714
+ }, {
11715
+ key: "renderContainer",
11716
+ value: function renderContainer(component, children) {
11717
+ var isContainer = component.type && component.type.role === "container";
11718
+ var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
11719
+
11720
+ if (parentProps.events) {
11721
+ this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
11722
+ parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
11863
11723
  }
11864
- }, {
11865
- key: "renderData",
11866
- value: function renderData(props) {
11867
- var _this9 = this;
11868
-
11869
- var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
11870
- var dataComponent = props.dataComponent,
11871
- labelComponent = props.labelComponent,
11872
- groupComponent = props.groupComponent;
11873
- var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
11874
- var dataProps = _this9.getComponentProps(dataComponent, "data", index);
11875
-
11876
- if (shouldRenderDatum(dataProps.datum)) {
11877
- validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
11878
- }
11879
11724
 
11880
- return validDataComponents;
11881
- }, []);
11882
- var labelComponents = this.dataKeys.map(function (_dataKey, index) {
11883
- var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
11725
+ return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
11726
+ }
11727
+ }, {
11728
+ key: "animateComponent",
11729
+ value: function animateComponent(props, defaultAnimationWhitelist) {
11730
+ var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
11731
+ return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
11732
+ animate: props.animate,
11733
+ animationWhitelist: animationWhitelist
11734
+ }, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
11735
+ } // Used by `VictoryLine` and `VictoryArea`
11736
+
11737
+ }, {
11738
+ key: "renderContinuousData",
11739
+ value: function renderContinuousData(props) {
11740
+ var _this8 = this;
11741
+
11742
+ var dataComponent = props.dataComponent,
11743
+ labelComponent = props.labelComponent,
11744
+ groupComponent = props.groupComponent;
11745
+
11746
+ var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
11747
+
11748
+ var labelComponents = dataKeys.reduce(function (memo, key) {
11749
+ var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
11750
+
11751
+ if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
11752
+ memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
11753
+ }
11884
11754
 
11885
- if (labelProps.text !== undefined && labelProps.text !== null) {
11886
- return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
11887
- }
11755
+ return memo;
11756
+ }, []);
11757
+ var dataProps = this.getComponentProps(dataComponent, "data", "all");
11758
+ var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
11759
+ return this.renderContainer(groupComponent, children);
11760
+ }
11761
+ }, {
11762
+ key: "renderData",
11763
+ value: function renderData(props) {
11764
+ var _this9 = this;
11765
+
11766
+ var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
11767
+ var dataComponent = props.dataComponent,
11768
+ labelComponent = props.labelComponent,
11769
+ groupComponent = props.groupComponent;
11770
+ var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
11771
+ var dataProps = _this9.getComponentProps(dataComponent, "data", index);
11772
+
11773
+ if (shouldRenderDatum(dataProps.datum)) {
11774
+ validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
11775
+ }
11888
11776
 
11889
- return undefined;
11890
- }).filter(Boolean);
11777
+ return validDataComponents;
11778
+ }, []);
11779
+ var labelComponents = this.dataKeys.map(function (_dataKey, index) {
11780
+ var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
11891
11781
 
11892
- var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
11782
+ if (labelProps.text !== undefined && labelProps.text !== null) {
11783
+ return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
11784
+ }
11893
11785
 
11894
- return this.renderContainer(groupComponent, children);
11895
- }
11896
- }]);
11786
+ return undefined;
11787
+ }).filter(Boolean);
11897
11788
 
11898
- return addEvents;
11899
- }(WrappedComponent)
11900
- );
11789
+ var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
11790
+
11791
+ return this.renderContainer(groupComponent, children);
11792
+ }
11793
+ }]);
11794
+
11795
+ return addEvents;
11796
+ }(WrappedComponent);
11901
11797
  });
11902
11798
 
11903
11799
  /***/ }),
@@ -13294,6 +13190,95 @@ function warn(message) {
13294
13190
 
13295
13191
  /***/ }),
13296
13192
 
13193
+ /***/ "../../victory-core/es/victory-util/point-path-helpers.js":
13194
+ /*!****************************************************************!*\
13195
+ !*** ../../victory-core/es/victory-util/point-path-helpers.js ***!
13196
+ \****************************************************************/
13197
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
13198
+
13199
+ "use strict";
13200
+ __webpack_require__.r(__webpack_exports__);
13201
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13202
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
13203
+ /* harmony export */ });
13204
+ /* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/range */ "../../../node_modules/lodash/range.js");
13205
+ /* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_range__WEBPACK_IMPORTED_MODULE_0__);
13206
+
13207
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
13208
+ circle: function (x, y, size) {
13209
+ return "M ".concat(x, ", ").concat(y, "\n m ").concat(-size, ", 0\n a ").concat(size, ", ").concat(size, " 0 1,0 ").concat(size * 2, ",0\n a ").concat(size, ", ").concat(size, " 0 1,0 ").concat(-size * 2, ",0");
13210
+ },
13211
+ square: function (x, y, size) {
13212
+ var baseSize = 0.87 * size; // eslint-disable-line no-magic-numbers
13213
+
13214
+ var x0 = x - baseSize;
13215
+ var y1 = y + baseSize;
13216
+ var distance = x + baseSize - x0;
13217
+ return "M ".concat(x0, ", ").concat(y1, "\n h").concat(distance, "\n v-").concat(distance, "\n h-").concat(distance, "\n z");
13218
+ },
13219
+ diamond: function (x, y, size) {
13220
+ var baseSize = 0.87 * size; // eslint-disable-line no-magic-numbers
13221
+
13222
+ var length = Math.sqrt(2 * (baseSize * baseSize));
13223
+ return "M ".concat(x, ", ").concat(y + length, "\n l ").concat(length, ", -").concat(length, "\n l -").concat(length, ", -").concat(length, "\n l -").concat(length, ", ").concat(length, "\n l ").concat(length, ", ").concat(length, "\n z");
13224
+ },
13225
+ triangleDown: function (x, y, size) {
13226
+ var height = size / 2 * Math.sqrt(3);
13227
+ var x0 = x - size;
13228
+ var x1 = x + size;
13229
+ var y0 = y - size;
13230
+ var y1 = y + height;
13231
+ return "M ".concat(x0, ", ").concat(y0, "\n L ").concat(x1, ", ").concat(y0, "\n L ").concat(x, ", ").concat(y1, "\n z");
13232
+ },
13233
+ triangleUp: function (x, y, size) {
13234
+ var height = size / 2 * Math.sqrt(3);
13235
+ var x0 = x - size;
13236
+ var x1 = x + size;
13237
+ var y0 = y - height;
13238
+ var y1 = y + size;
13239
+ return "M ".concat(x0, ", ").concat(y1, "\n L ").concat(x1, ", ").concat(y1, "\n L ").concat(x, ", ").concat(y0, "\n z");
13240
+ },
13241
+ plus: function (x, y, size) {
13242
+ var baseSize = 1.1 * size; // eslint-disable-line no-magic-numbers
13243
+
13244
+ var distance = baseSize / 1.5; // eslint-disable-line no-magic-numbers
13245
+
13246
+ return "\n M ".concat(x - distance / 2, ", ").concat(y + baseSize, "\n v-").concat(distance, "\n h-").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h-").concat(distance, "\n v").concat(distance, "\n z");
13247
+ },
13248
+ cross: function (x, y, size) {
13249
+ var baseSize = 0.8 * size; // eslint-disable-line no-magic-numbers
13250
+
13251
+ var distance = baseSize / 1.5; // eslint-disable-line no-magic-numbers
13252
+
13253
+ return "\n M ".concat(x - distance / 2, ", ").concat(y + baseSize + distance, "\n v-").concat(distance * 2, "\n h-").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v-").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h").concat(distance, "\n v").concat(distance, "\n h-").concat(distance, "\n v").concat(distance * 2, "\n z");
13254
+ },
13255
+ minus: function (x, y, size) {
13256
+ var baseSize = 1.1 * size; // eslint-disable-line no-magic-numbers
13257
+
13258
+ var lineHeight = baseSize - baseSize * 0.3; // eslint-disable-line no-magic-numbers
13259
+
13260
+ var x0 = x - baseSize;
13261
+ var y1 = y + lineHeight / 2;
13262
+ var distance = x + baseSize - x0;
13263
+ return "M ".concat(x0, ", ").concat(y1, "\n h").concat(distance, "\n v-").concat(lineHeight, "\n h-").concat(distance, "\n z");
13264
+ },
13265
+ star: function (x, y, size) {
13266
+ var baseSize = 1.35 * size; // eslint-disable-line no-magic-numbers
13267
+
13268
+ var angle = Math.PI / 5; // eslint-disable-line no-magic-numbers
13269
+ // eslint-disable-next-line no-magic-numbers
13270
+
13271
+ var starCoords = lodash_range__WEBPACK_IMPORTED_MODULE_0___default()(10).map(function (index) {
13272
+ var length = index % 2 === 0 ? baseSize : baseSize / 2;
13273
+ return "".concat(length * Math.sin(angle * (index + 1)) + x, ",\n ").concat(length * Math.cos(angle * (index + 1)) + y);
13274
+ });
13275
+
13276
+ return "M ".concat(starCoords.join("L"), " z");
13277
+ }
13278
+ });
13279
+
13280
+ /***/ }),
13281
+
13297
13282
  /***/ "../../victory-core/es/victory-util/prop-types.js":
13298
13283
  /*!********************************************************!*\
13299
13284
  !*** ../../victory-core/es/victory-util/prop-types.js ***!
@@ -14001,9 +13986,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
14001
13986
 
14002
13987
 
14003
13988
 
14004
- var Timer =
14005
- /*#__PURE__*/
14006
- function () {
13989
+ var Timer = /*#__PURE__*/function () {
14007
13990
  function Timer() {
14008
13991
  _classCallCheck(this, Timer);
14009
13992
 
@@ -36,9 +36,7 @@ var defaultLegendData = [{
36
36
  name: "Series 2"
37
37
  }];
38
38
 
39
- var VictoryLegend =
40
- /*#__PURE__*/
41
- function (_React$Component) {
39
+ var VictoryLegend = /*#__PURE__*/function (_React$Component) {
42
40
  _inherits(VictoryLegend, _React$Component);
43
41
 
44
42
  function VictoryLegend() {
@@ -49,9 +49,7 @@ var defaultLegendData = [{
49
49
  name: "Series 2"
50
50
  }];
51
51
 
52
- var VictoryLegend =
53
- /*#__PURE__*/
54
- function (_React$Component) {
52
+ var VictoryLegend = /*#__PURE__*/function (_React$Component) {
55
53
  _inherits(VictoryLegend, _React$Component);
56
54
 
57
55
  function VictoryLegend() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-legend",
3
- "version": "36.0.0",
3
+ "version": "36.1.0",
4
4
  "description": "Legend Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "lodash": "^4.17.19",
23
23
  "prop-types": "^15.5.8",
24
- "victory-core": "^36.0.0"
24
+ "victory-core": "^36.1.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "react": "^16.6.0 || ^17.0.0"
@@ -30,5 +30,5 @@
30
30
  "version": "yarn run nps build-libs && nps build-dists"
31
31
  },
32
32
  "sideEffects": false,
33
- "gitHead": "0f9e0825ddbae3287022cb4cd59c56f9993a4b77"
33
+ "gitHead": "038cd9b70d9ce54ac6b861014165583760734c99"
34
34
  }