victory-voronoi 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.
@@ -226,9 +226,7 @@ var fallbackProps = {
226
226
  padding: 50
227
227
  };
228
228
 
229
- var VictoryVoronoi =
230
- /*#__PURE__*/
231
- function (_React$Component) {
229
+ var VictoryVoronoi = /*#__PURE__*/function (_React$Component) {
232
230
  _inherits(VictoryVoronoi, _React$Component);
233
231
 
234
232
  function VictoryVoronoi() {
@@ -14970,9 +14968,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
14970
14968
 
14971
14969
 
14972
14970
 
14973
- var VictoryAnimation =
14974
- /*#__PURE__*/
14975
- function (_React$Component) {
14971
+ var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
14976
14972
  _inherits(VictoryAnimation, _React$Component);
14977
14973
 
14978
14974
  function VictoryAnimation(props, context) {
@@ -15256,9 +15252,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
15256
15252
 
15257
15253
 
15258
15254
 
15259
- var VictoryContainer =
15260
- /*#__PURE__*/
15261
- function (_React$Component) {
15255
+ var VictoryContainer = /*#__PURE__*/function (_React$Component) {
15262
15256
  _inherits(VictoryContainer, _React$Component);
15263
15257
 
15264
15258
  function VictoryContainer(props) {
@@ -16204,9 +16198,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
16204
16198
 
16205
16199
 
16206
16200
 
16207
- var Portal =
16208
- /*#__PURE__*/
16209
- function (_React$Component) {
16201
+ var Portal = /*#__PURE__*/function (_React$Component) {
16210
16202
  _inherits(Portal, _React$Component);
16211
16203
 
16212
16204
  function Portal(props) {
@@ -16325,9 +16317,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
16325
16317
 
16326
16318
 
16327
16319
 
16328
- var VictoryPortal =
16329
- /*#__PURE__*/
16330
- function (_React$Component) {
16320
+ var VictoryPortal = /*#__PURE__*/function (_React$Component) {
16331
16321
  _inherits(VictoryPortal, _React$Component);
16332
16322
 
16333
16323
  function VictoryPortal() {
@@ -17286,9 +17276,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
17286
17276
 
17287
17277
 
17288
17278
 
17289
- var VictoryTransition =
17290
- /*#__PURE__*/
17291
- function (_React$Component) {
17279
+ var VictoryTransition = /*#__PURE__*/function (_React$Component) {
17292
17280
  _inherits(VictoryTransition, _React$Component);
17293
17281
 
17294
17282
  function VictoryTransition(props, context) {
@@ -17589,365 +17577,362 @@ var defaultComponents = [{
17589
17577
  name: "labels"
17590
17578
  }];
17591
17579
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function (WrappedComponent, options) {
17592
- return (
17593
- /*#__PURE__*/
17594
- function (_WrappedComponent) {
17595
- _inherits(addEvents, _WrappedComponent);
17580
+ return /*#__PURE__*/function (_WrappedComponent) {
17581
+ _inherits(addEvents, _WrappedComponent);
17596
17582
 
17597
- function addEvents(props) {
17598
- var _this;
17583
+ function addEvents(props) {
17584
+ var _this;
17599
17585
 
17600
- _classCallCheck(this, addEvents);
17586
+ _classCallCheck(this, addEvents);
17601
17587
 
17602
- _this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
17603
- var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
17604
- var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
17605
- _this.state = {};
17588
+ _this = _possibleConstructorReturn(this, (addEvents.__proto__ || Object.getPrototypeOf(addEvents)).call(this, props));
17589
+ var getScopedEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getScopedEvents.bind(_assertThisInitialized(_this));
17590
+ var boundGetEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getEvents.bind(_assertThisInitialized(_this));
17591
+ _this.state = {};
17606
17592
 
17607
- _this.getEvents = function (p, target, eventKey) {
17608
- return boundGetEvents(p, target, eventKey, getScopedEvents);
17609
- };
17610
-
17611
- _this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
17593
+ _this.getEvents = function (p, target, eventKey) {
17594
+ return boundGetEvents(p, target, eventKey, getScopedEvents);
17595
+ };
17612
17596
 
17613
- var calculatedValues = _this.getCalculatedValues(props);
17597
+ _this.getEventState = _events__WEBPACK_IMPORTED_MODULE_11__.getEventState.bind(_assertThisInitialized(_this));
17614
17598
 
17615
- _this.cacheValues(calculatedValues);
17599
+ var calculatedValues = _this.getCalculatedValues(props);
17616
17600
 
17617
- _this.externalMutations = _this.getExternalMutations(props);
17618
- _this.calculatedState = _this.getStateChanges(props);
17619
- _this.globalEvents = {};
17620
- _this.prevGlobalEventKeys = [];
17621
- _this.boundGlobalEvents = {};
17622
- return _this;
17623
- }
17601
+ _this.cacheValues(calculatedValues);
17624
17602
 
17625
- _createClass(addEvents, [{
17626
- key: "shouldComponentUpdate",
17627
- value: function shouldComponentUpdate(nextProps) {
17628
- var externalMutations = this.getExternalMutations(nextProps);
17629
- var animating = this.props.animating || this.props.animate;
17630
- var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
17631
-
17632
- if (animating || newMutation) {
17633
- this.cacheValues(this.getCalculatedValues(nextProps));
17634
- this.externalMutations = externalMutations;
17635
- this.applyExternalMutations(nextProps, externalMutations);
17636
- return true;
17637
- }
17638
-
17639
- var calculatedState = this.getStateChanges(nextProps);
17603
+ _this.externalMutations = _this.getExternalMutations(props);
17604
+ _this.calculatedState = _this.getStateChanges(props);
17605
+ _this.globalEvents = {};
17606
+ _this.prevGlobalEventKeys = [];
17607
+ _this.boundGlobalEvents = {};
17608
+ return _this;
17609
+ }
17640
17610
 
17641
- if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
17642
- this.cacheValues(this.getCalculatedValues(nextProps));
17643
- return true;
17644
- }
17611
+ _createClass(addEvents, [{
17612
+ key: "shouldComponentUpdate",
17613
+ value: function shouldComponentUpdate(nextProps) {
17614
+ var externalMutations = this.getExternalMutations(nextProps);
17615
+ var animating = this.props.animating || this.props.animate;
17616
+ var newMutation = !react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(externalMutations, this.externalMutations);
17617
+
17618
+ if (animating || newMutation) {
17619
+ this.cacheValues(this.getCalculatedValues(nextProps));
17620
+ this.externalMutations = externalMutations;
17621
+ this.applyExternalMutations(nextProps, externalMutations);
17622
+ return true;
17623
+ }
17645
17624
 
17646
- if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
17647
- this.cacheValues(this.getCalculatedValues(nextProps));
17648
- return true;
17649
- }
17625
+ var calculatedState = this.getStateChanges(nextProps);
17650
17626
 
17651
- return false;
17627
+ if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.calculatedState, calculatedState)) {
17628
+ this.cacheValues(this.getCalculatedValues(nextProps));
17629
+ return true;
17652
17630
  }
17653
- }, {
17654
- key: "componentDidMount",
17655
- value: function componentDidMount() {
17656
- var _this2 = this;
17657
17631
 
17658
- var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
17659
-
17660
- globalEventKeys.forEach(function (key) {
17661
- return _this2.addGlobalListener(key);
17662
- });
17663
- this.prevGlobalEventKeys = globalEventKeys;
17632
+ if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_10___default()(this.props, nextProps)) {
17633
+ this.cacheValues(this.getCalculatedValues(nextProps));
17634
+ return true;
17664
17635
  }
17665
- }, {
17666
- key: "componentDidUpdate",
17667
- value: function componentDidUpdate(prevProps) {
17668
- var _this3 = this;
17669
17636
 
17670
- var calculatedState = this.getStateChanges(prevProps);
17671
- this.calculatedState = calculatedState;
17637
+ return false;
17638
+ }
17639
+ }, {
17640
+ key: "componentDidMount",
17641
+ value: function componentDidMount() {
17642
+ var _this2 = this;
17672
17643
 
17673
- var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
17644
+ var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
17674
17645
 
17675
- var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
17646
+ globalEventKeys.forEach(function (key) {
17647
+ return _this2.addGlobalListener(key);
17648
+ });
17649
+ this.prevGlobalEventKeys = globalEventKeys;
17650
+ }
17651
+ }, {
17652
+ key: "componentDidUpdate",
17653
+ value: function componentDidUpdate(prevProps) {
17654
+ var _this3 = this;
17676
17655
 
17677
- removedGlobalEventKeys.forEach(function (key) {
17678
- return _this3.removeGlobalListener(key);
17679
- });
17656
+ var calculatedState = this.getStateChanges(prevProps);
17657
+ this.calculatedState = calculatedState;
17680
17658
 
17681
- var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
17659
+ var globalEventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(this.globalEvents);
17682
17660
 
17683
- addedGlobalEventKeys.forEach(function (key) {
17684
- return _this3.addGlobalListener(key);
17685
- });
17686
- this.prevGlobalEventKeys = globalEventKeys;
17687
- }
17688
- }, {
17689
- key: "componentWillUnmount",
17690
- value: function componentWillUnmount() {
17691
- var _this4 = this;
17661
+ var removedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(this.prevGlobalEventKeys, globalEventKeys);
17692
17662
 
17693
- this.prevGlobalEventKeys.forEach(function (key) {
17694
- return _this4.removeGlobalListener(key);
17695
- });
17696
- }
17697
- }, {
17698
- key: "addGlobalListener",
17699
- value: function addGlobalListener(key) {
17700
- var _this5 = this;
17701
-
17702
- var boundListener = function (event) {
17703
- var listener = _this5.globalEvents[key];
17704
- return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
17705
- };
17663
+ removedGlobalEventKeys.forEach(function (key) {
17664
+ return _this3.removeGlobalListener(key);
17665
+ });
17706
17666
 
17707
- this.boundGlobalEvents[key] = boundListener;
17708
- window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
17709
- }
17710
- }, {
17711
- key: "removeGlobalListener",
17712
- value: function removeGlobalListener(key) {
17713
- window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
17714
- } // compile all state changes from own and parent state. Order doesn't matter, as any state
17715
- // state change should trigger a re-render
17716
-
17717
- }, {
17718
- key: "getStateChanges",
17719
- value: function getStateChanges(props) {
17720
- var _this6 = this;
17721
-
17722
- if (!this.hasEvents) {
17723
- return {};
17724
- }
17667
+ var addedGlobalEventKeys = lodash_difference__WEBPACK_IMPORTED_MODULE_0___default()(globalEventKeys, this.prevGlobalEventKeys);
17725
17668
 
17726
- var getState = function (key, type) {
17727
- var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
17669
+ addedGlobalEventKeys.forEach(function (key) {
17670
+ return _this3.addGlobalListener(key);
17671
+ });
17672
+ this.prevGlobalEventKeys = globalEventKeys;
17673
+ }
17674
+ }, {
17675
+ key: "componentWillUnmount",
17676
+ value: function componentWillUnmount() {
17677
+ var _this4 = this;
17728
17678
 
17729
- return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
17730
- };
17679
+ this.prevGlobalEventKeys.forEach(function (key) {
17680
+ return _this4.removeGlobalListener(key);
17681
+ });
17682
+ }
17683
+ }, {
17684
+ key: "addGlobalListener",
17685
+ value: function addGlobalListener(key) {
17686
+ var _this5 = this;
17687
+
17688
+ var boundListener = function (event) {
17689
+ var listener = _this5.globalEvents[key];
17690
+ return listener && listener(_events__WEBPACK_IMPORTED_MODULE_11__.emulateReactEvent(event));
17691
+ };
17731
17692
 
17732
- options = options || {};
17733
- var components = options.components || defaultComponents;
17734
- var stateChanges = components.map(function (component) {
17735
- if (!props.standalone && component.name === "parent") {
17736
- // don't check for changes on parent props for non-standalone components
17737
- return undefined;
17738
- } else {
17739
- return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
17740
- return getState(key, component.name);
17741
- }).filter(Boolean);
17742
- }
17743
- }).filter(Boolean);
17744
- return stateChanges;
17745
- }
17746
- }, {
17747
- key: "applyExternalMutations",
17748
- value: function applyExternalMutations(props, externalMutations) {
17749
- if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
17750
- var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
17751
- memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
17752
- return memo;
17753
- }, []);
17754
- var compiledCallbacks = callbacks.length ? function () {
17755
- callbacks.forEach(function (c) {
17756
- return c();
17757
- });
17758
- } : undefined;
17759
- this.setState(externalMutations, compiledCallbacks);
17760
- }
17693
+ this.boundGlobalEvents[key] = boundListener;
17694
+ window.addEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), boundListener);
17695
+ }
17696
+ }, {
17697
+ key: "removeGlobalListener",
17698
+ value: function removeGlobalListener(key) {
17699
+ window.removeEventListener(_events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEventNameFromKey(key), this.boundGlobalEvents[key]);
17700
+ } // compile all state changes from own and parent state. Order doesn't matter, as any state
17701
+ // state change should trigger a re-render
17702
+
17703
+ }, {
17704
+ key: "getStateChanges",
17705
+ value: function getStateChanges(props) {
17706
+ var _this6 = this;
17707
+
17708
+ if (!this.hasEvents) {
17709
+ return {};
17761
17710
  }
17762
- }, {
17763
- key: "getCalculatedValues",
17764
- value: function getCalculatedValues(props) {
17765
- var sharedEvents = props.sharedEvents;
17766
- var components = WrappedComponent.expectedComponents;
17767
- var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
17768
- var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
17769
- return undefined;
17770
- };
17771
- var baseProps = this.getBaseProps(props, getSharedEventState);
17772
17711
 
17773
- var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
17774
- return key !== "parent";
17775
- });
17712
+ var getState = function (key, type) {
17713
+ var result = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _this6.getEventState(key, type), _this6.getSharedEventState(key, type));
17776
17714
 
17777
- var hasEvents = props.events || props.sharedEvents || componentEvents;
17778
- var events = this.getAllEvents(props);
17779
- return {
17780
- componentEvents: componentEvents,
17781
- getSharedEventState: getSharedEventState,
17782
- baseProps: baseProps,
17783
- dataKeys: dataKeys,
17784
- hasEvents: hasEvents,
17785
- events: events
17786
- };
17787
- }
17788
- }, {
17789
- key: "getExternalMutations",
17790
- value: function getExternalMutations(props) {
17791
- var sharedEvents = props.sharedEvents,
17792
- externalEventMutations = props.externalEventMutations;
17793
- return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
17794
- }
17795
- }, {
17796
- key: "cacheValues",
17797
- value: function cacheValues(obj) {
17798
- var _this7 = this;
17715
+ return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(result) ? undefined : result;
17716
+ };
17799
17717
 
17800
- lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
17801
- _this7[key] = obj[key];
17802
- });
17718
+ options = options || {};
17719
+ var components = options.components || defaultComponents;
17720
+ var stateChanges = components.map(function (component) {
17721
+ if (!props.standalone && component.name === "parent") {
17722
+ // don't check for changes on parent props for non-standalone components
17723
+ return undefined;
17724
+ } else {
17725
+ return component.index !== undefined ? getState(component.index, component.name) : _this6.dataKeys.map(function (key) {
17726
+ return getState(key, component.name);
17727
+ }).filter(Boolean);
17728
+ }
17729
+ }).filter(Boolean);
17730
+ return stateChanges;
17731
+ }
17732
+ }, {
17733
+ key: "applyExternalMutations",
17734
+ value: function applyExternalMutations(props, externalMutations) {
17735
+ if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalMutations)) {
17736
+ var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
17737
+ memo = lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
17738
+ return memo;
17739
+ }, []);
17740
+ var compiledCallbacks = callbacks.length ? function () {
17741
+ callbacks.forEach(function (c) {
17742
+ return c();
17743
+ });
17744
+ } : undefined;
17745
+ this.setState(externalMutations, compiledCallbacks);
17803
17746
  }
17804
- }, {
17805
- key: "getBaseProps",
17806
- value: function getBaseProps(props, getSharedEventState) {
17807
- getSharedEventState = getSharedEventState || this.getSharedEventState;
17808
- var sharedParentState = getSharedEventState("parent", "parent");
17809
- var parentState = this.getEventState("parent", "parent");
17747
+ }
17748
+ }, {
17749
+ key: "getCalculatedValues",
17750
+ value: function getCalculatedValues(props) {
17751
+ var sharedEvents = props.sharedEvents;
17752
+ var components = WrappedComponent.expectedComponents;
17753
+ var componentEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getComponentEvents(props, components);
17754
+ var getSharedEventState = sharedEvents && lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(sharedEvents.getEventState) ? sharedEvents.getEventState : function () {
17755
+ return undefined;
17756
+ };
17757
+ var baseProps = this.getBaseProps(props, getSharedEventState);
17810
17758
 
17811
- var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
17759
+ var dataKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(baseProps).filter(function (key) {
17760
+ return key !== "parent";
17761
+ });
17812
17762
 
17813
- var parentPropsList = baseParentProps.parentControlledProps;
17814
- var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
17763
+ var hasEvents = props.events || props.sharedEvents || componentEvents;
17764
+ var events = this.getAllEvents(props);
17765
+ return {
17766
+ componentEvents: componentEvents,
17767
+ getSharedEventState: getSharedEventState,
17768
+ baseProps: baseProps,
17769
+ dataKeys: dataKeys,
17770
+ hasEvents: hasEvents,
17771
+ events: events
17772
+ };
17773
+ }
17774
+ }, {
17775
+ key: "getExternalMutations",
17776
+ value: function getExternalMutations(props) {
17777
+ var sharedEvents = props.sharedEvents,
17778
+ externalEventMutations = props.externalEventMutations;
17779
+ return lodash_isEmpty__WEBPACK_IMPORTED_MODULE_2___default()(externalEventMutations) || sharedEvents ? undefined : _events__WEBPACK_IMPORTED_MODULE_11__.getExternalMutations(externalEventMutations, this.baseProps, this.state);
17780
+ }
17781
+ }, {
17782
+ key: "cacheValues",
17783
+ value: function cacheValues(obj) {
17784
+ var _this7 = this;
17815
17785
 
17816
- var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
17786
+ lodash_keys__WEBPACK_IMPORTED_MODULE_6___default()(obj).forEach(function (key) {
17787
+ _this7[key] = obj[key];
17788
+ });
17789
+ }
17790
+ }, {
17791
+ key: "getBaseProps",
17792
+ value: function getBaseProps(props, getSharedEventState) {
17793
+ getSharedEventState = getSharedEventState || this.getSharedEventState;
17794
+ var sharedParentState = getSharedEventState("parent", "parent");
17795
+ var parentState = this.getEventState("parent", "parent");
17817
17796
 
17818
- return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
17819
- }
17820
- }, {
17821
- key: "getAllEvents",
17822
- value: function getAllEvents(props) {
17823
- if (Array.isArray(this.componentEvents)) {
17824
- var _componentEvents;
17797
+ var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentState, sharedParentState);
17825
17798
 
17826
- return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
17827
- }
17799
+ var parentPropsList = baseParentProps.parentControlledProps;
17800
+ var parentProps = parentPropsList ? lodash_pick__WEBPACK_IMPORTED_MODULE_4___default()(baseParentProps, parentPropsList) : {};
17828
17801
 
17829
- return props.events;
17830
- }
17831
- }, {
17832
- key: "getComponentProps",
17833
- value: function getComponentProps(component, type, index) {
17834
- var name = this.props.name || WrappedComponent.role;
17835
- var key = this.dataKeys && this.dataKeys[index] || index;
17836
- var id = "".concat(name, "-").concat(type, "-").concat(key);
17837
- var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
17838
-
17839
- if (!baseProps && !this.hasEvents) {
17840
- return undefined;
17841
- }
17802
+ var modifiedProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, parentProps, props);
17842
17803
 
17843
- if (this.hasEvents) {
17844
- var baseEvents = this.getEvents(this.props, type, key);
17804
+ return lodash_isFunction__WEBPACK_IMPORTED_MODULE_5___default()(WrappedComponent.getBaseProps) ? WrappedComponent.getBaseProps(modifiedProps) : {};
17805
+ }
17806
+ }, {
17807
+ key: "getAllEvents",
17808
+ value: function getAllEvents(props) {
17809
+ if (Array.isArray(this.componentEvents)) {
17810
+ var _componentEvents;
17845
17811
 
17846
- var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
17847
- index: index,
17848
- key: id
17849
- }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
17850
- id: id
17851
- });
17812
+ return Array.isArray(props.events) ? (_componentEvents = this.componentEvents).concat.apply(_componentEvents, _toConsumableArray(props.events)) : this.componentEvents;
17813
+ }
17852
17814
 
17853
- var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
17815
+ return props.events;
17816
+ }
17817
+ }, {
17818
+ key: "getComponentProps",
17819
+ value: function getComponentProps(component, type, index) {
17820
+ var name = this.props.name || WrappedComponent.role;
17821
+ var key = this.dataKeys && this.dataKeys[index] || index;
17822
+ var id = "".concat(name, "-").concat(type, "-").concat(key);
17823
+ var baseProps = this.baseProps[key] && this.baseProps[key][type] || this.baseProps[key];
17824
+
17825
+ if (!baseProps && !this.hasEvents) {
17826
+ return undefined;
17827
+ }
17854
17828
 
17855
- return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
17856
- events: events
17857
- });
17858
- }
17829
+ if (this.hasEvents) {
17830
+ var baseEvents = this.getEvents(this.props, type, key);
17859
17831
 
17860
- return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
17832
+ var componentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
17861
17833
  index: index,
17862
17834
  key: id
17863
- }, component.props, baseProps, {
17835
+ }, this.getEventState(key, type), this.getSharedEventState(key, type), component.props, baseProps, {
17864
17836
  id: id
17865
17837
  });
17866
- }
17867
- }, {
17868
- key: "renderContainer",
17869
- value: function renderContainer(component, children) {
17870
- var isContainer = component.type && component.type.role === "container";
17871
- var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
17872
-
17873
- if (parentProps.events) {
17874
- this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
17875
- parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
17876
- }
17877
17838
 
17878
- return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
17839
+ var events = lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({}, _events__WEBPACK_IMPORTED_MODULE_11__.getPartialEvents(baseEvents, key, componentProps), componentProps.events);
17840
+
17841
+ return lodash_assign__WEBPACK_IMPORTED_MODULE_7___default()({}, componentProps, {
17842
+ events: events
17843
+ });
17879
17844
  }
17880
- }, {
17881
- key: "animateComponent",
17882
- value: function animateComponent(props, defaultAnimationWhitelist) {
17883
- var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
17884
- return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
17885
- animate: props.animate,
17886
- animationWhitelist: animationWhitelist
17887
- }, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
17888
- } // Used by `VictoryLine` and `VictoryArea`
17889
-
17890
- }, {
17891
- key: "renderContinuousData",
17892
- value: function renderContinuousData(props) {
17893
- var _this8 = this;
17894
-
17895
- var dataComponent = props.dataComponent,
17896
- labelComponent = props.labelComponent,
17897
- groupComponent = props.groupComponent;
17898
-
17899
- var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
17900
-
17901
- var labelComponents = dataKeys.reduce(function (memo, key) {
17902
- var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
17903
-
17904
- if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
17905
- memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
17906
- }
17907
17845
 
17908
- return memo;
17909
- }, []);
17910
- var dataProps = this.getComponentProps(dataComponent, "data", "all");
17911
- var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
17912
- return this.renderContainer(groupComponent, children);
17846
+ return lodash_defaults__WEBPACK_IMPORTED_MODULE_8___default()({
17847
+ index: index,
17848
+ key: id
17849
+ }, component.props, baseProps, {
17850
+ id: id
17851
+ });
17852
+ }
17853
+ }, {
17854
+ key: "renderContainer",
17855
+ value: function renderContainer(component, children) {
17856
+ var isContainer = component.type && component.type.role === "container";
17857
+ var parentProps = isContainer ? this.getComponentProps(component, "parent", "parent") : {};
17858
+
17859
+ if (parentProps.events) {
17860
+ this.globalEvents = _events__WEBPACK_IMPORTED_MODULE_11__.getGlobalEvents(parentProps.events);
17861
+ parentProps.events = _events__WEBPACK_IMPORTED_MODULE_11__.omitGlobalEvents(parentProps.events);
17913
17862
  }
17914
- }, {
17915
- key: "renderData",
17916
- value: function renderData(props) {
17917
- var _this9 = this;
17918
-
17919
- var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
17920
- var dataComponent = props.dataComponent,
17921
- labelComponent = props.labelComponent,
17922
- groupComponent = props.groupComponent;
17923
- var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
17924
- var dataProps = _this9.getComponentProps(dataComponent, "data", index);
17925
-
17926
- if (shouldRenderDatum(dataProps.datum)) {
17927
- validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
17928
- }
17929
17863
 
17930
- return validDataComponents;
17931
- }, []);
17932
- var labelComponents = this.dataKeys.map(function (_dataKey, index) {
17933
- var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
17864
+ return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(component, parentProps, children);
17865
+ }
17866
+ }, {
17867
+ key: "animateComponent",
17868
+ value: function animateComponent(props, defaultAnimationWhitelist) {
17869
+ var animationWhitelist = props.animate && props.animate.animationWhitelist ? props.animate.animationWhitelist : defaultAnimationWhitelist;
17870
+ return react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_victory_transition_victory_transition__WEBPACK_IMPORTED_MODULE_12__.default, {
17871
+ animate: props.animate,
17872
+ animationWhitelist: animationWhitelist
17873
+ }, react__WEBPACK_IMPORTED_MODULE_9___default().createElement(this.constructor, props));
17874
+ } // Used by `VictoryLine` and `VictoryArea`
17875
+
17876
+ }, {
17877
+ key: "renderContinuousData",
17878
+ value: function renderContinuousData(props) {
17879
+ var _this8 = this;
17880
+
17881
+ var dataComponent = props.dataComponent,
17882
+ labelComponent = props.labelComponent,
17883
+ groupComponent = props.groupComponent;
17884
+
17885
+ var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_3___default()(this.dataKeys, "all");
17886
+
17887
+ var labelComponents = dataKeys.reduce(function (memo, key) {
17888
+ var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
17889
+
17890
+ if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
17891
+ memo = memo.concat(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
17892
+ }
17934
17893
 
17935
- if (labelProps.text !== undefined && labelProps.text !== null) {
17936
- return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
17937
- }
17894
+ return memo;
17895
+ }, []);
17896
+ var dataProps = this.getComponentProps(dataComponent, "data", "all");
17897
+ var children = [react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
17898
+ return this.renderContainer(groupComponent, children);
17899
+ }
17900
+ }, {
17901
+ key: "renderData",
17902
+ value: function renderData(props) {
17903
+ var _this9 = this;
17904
+
17905
+ var shouldRenderDatum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : datumHasXandY;
17906
+ var dataComponent = props.dataComponent,
17907
+ labelComponent = props.labelComponent,
17908
+ groupComponent = props.groupComponent;
17909
+ var dataComponents = this.dataKeys.reduce(function (validDataComponents, _dataKey, index) {
17910
+ var dataProps = _this9.getComponentProps(dataComponent, "data", index);
17911
+
17912
+ if (shouldRenderDatum(dataProps.datum)) {
17913
+ validDataComponents.push(react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps));
17914
+ }
17938
17915
 
17939
- return undefined;
17940
- }).filter(Boolean);
17916
+ return validDataComponents;
17917
+ }, []);
17918
+ var labelComponents = this.dataKeys.map(function (_dataKey, index) {
17919
+ var labelProps = _this9.getComponentProps(labelComponent, "labels", index);
17941
17920
 
17942
- var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
17921
+ if (labelProps.text !== undefined && labelProps.text !== null) {
17922
+ return react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps);
17923
+ }
17943
17924
 
17944
- return this.renderContainer(groupComponent, children);
17945
- }
17946
- }]);
17925
+ return undefined;
17926
+ }).filter(Boolean);
17927
+
17928
+ var children = _toConsumableArray(dataComponents).concat(_toConsumableArray(labelComponents));
17929
+
17930
+ return this.renderContainer(groupComponent, children);
17931
+ }
17932
+ }]);
17947
17933
 
17948
- return addEvents;
17949
- }(WrappedComponent)
17950
- );
17934
+ return addEvents;
17935
+ }(WrappedComponent);
17951
17936
  });
17952
17937
 
17953
17938
  /***/ }),
@@ -21351,9 +21336,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
21351
21336
 
21352
21337
 
21353
21338
 
21354
- var Timer =
21355
- /*#__PURE__*/
21356
- function () {
21339
+ var Timer = /*#__PURE__*/function () {
21357
21340
  function Timer() {
21358
21341
  _classCallCheck(this, Timer);
21359
21342
 
@@ -24,9 +24,7 @@ var fallbackProps = {
24
24
  padding: 50
25
25
  };
26
26
 
27
- var VictoryVoronoi =
28
- /*#__PURE__*/
29
- function (_React$Component) {
27
+ var VictoryVoronoi = /*#__PURE__*/function (_React$Component) {
30
28
  _inherits(VictoryVoronoi, _React$Component);
31
29
 
32
30
  function VictoryVoronoi() {
@@ -37,9 +37,7 @@ var fallbackProps = {
37
37
  padding: 50
38
38
  };
39
39
 
40
- var VictoryVoronoi =
41
- /*#__PURE__*/
42
- function (_React$Component) {
40
+ var VictoryVoronoi = /*#__PURE__*/function (_React$Component) {
43
41
  _inherits(VictoryVoronoi, _React$Component);
44
42
 
45
43
  function VictoryVoronoi() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "victory-voronoi",
3
- "version": "36.0.0",
3
+ "version": "36.1.0",
4
4
  "description": "Voronoi Component for Victory",
5
5
  "keywords": [
6
6
  "data visualization",
@@ -22,7 +22,7 @@
22
22
  "d3-voronoi": "^1.1.2",
23
23
  "lodash": "^4.17.19",
24
24
  "prop-types": "^15.5.8",
25
- "victory-core": "^36.0.0"
25
+ "victory-core": "^36.1.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^16.6.0 || ^17.0.0"
@@ -31,5 +31,5 @@
31
31
  "version": "yarn run nps build-libs && nps build-dists"
32
32
  },
33
33
  "sideEffects": false,
34
- "gitHead": "0f9e0825ddbae3287022cb4cd59c56f9993a4b77"
34
+ "gitHead": "038cd9b70d9ce54ac6b861014165583760734c99"
35
35
  }