victory-polar-axis 37.3.0 → 37.3.2

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # victory-polar-axis
2
2
 
3
+ ## 37.3.2
4
+
5
+ ## 37.3.1
6
+
7
+ ### Patch Changes
8
+
9
+ - Remove duplicate types from interfaces ([#2940](https://github.com/FormidableLabs/victory/pull/2940))
10
+
3
11
  ## 37.3.0
4
12
 
5
13
  ## 37.2.0
@@ -480,7 +480,7 @@ const fallbackProps = {
480
480
  padding: 50
481
481
  };
482
482
 
483
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
483
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
484
484
 
485
485
  class VictoryPolarAxisBase extends (react__WEBPACK_IMPORTED_MODULE_1___default().Component) {
486
486
  static animationWhitelist = ["style", "domain", "range", "tickCount", "tickValues", "padding", "width", "height"];
@@ -5227,7 +5227,7 @@ const interpolateFunction = function (a, b) {
5227
5227
  return b;
5228
5228
  }
5229
5229
  return function () {
5230
- /* eslint-disable no-invalid-this, prefer-rest-params */
5230
+ /* eslint-disable prefer-rest-params */
5231
5231
  const aval = typeof a === "function" ? a.apply(this, arguments) : a;
5232
5232
  const bval = typeof b === "function" ? b.apply(this, arguments) : b;
5233
5233
  return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(aval, bval)(t);
@@ -5619,9 +5619,9 @@ const VictoryContainer = initialProps => {
5619
5619
  ...style,
5620
5620
  width: responsive ? style?.width : dimensions.width,
5621
5621
  height: responsive ? style?.height : dimensions.height,
5622
- pointerEvents: "none",
5623
- touchAction: "none",
5624
- position: "relative"
5622
+ pointerEvents: style?.pointerEvents ?? "none",
5623
+ touchAction: style?.touchAction ?? "none",
5624
+ position: style?.position ?? "relative"
5625
5625
  },
5626
5626
  "data-ouia-component-id": ouiaId,
5627
5627
  "data-ouia-component-type": ouiaType,
@@ -7887,7 +7887,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
7887
7887
  componentDidMount() {
7888
7888
  this.setState({
7889
7889
  nodesShouldLoad: true
7890
- }); // eslint-disable-line react/no-did-mount-set-state
7890
+ });
7891
7891
  }
7892
7892
  shouldComponentUpdate(nextProps) {
7893
7893
  if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default()(this.props, nextProps)) {
@@ -8101,7 +8101,7 @@ const defaultComponents = [{
8101
8101
  function addEvents(WrappedComponent, options) {
8102
8102
  if (options === void 0) {
8103
8103
  options = {};
8104
- } // eslint-disable-next-line @typescript-eslint/no-empty-interface
8104
+ } // eslint-disable-next-line @typescript-eslint/no-empty-object-type
8105
8105
  // @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
8106
8106
  class AddEventsMixin extends WrappedComponent {
8107
8107
  constructor(props) {
@@ -8656,7 +8656,7 @@ function getTicks(props, scale, filterZero) {
8656
8656
  * @param {String} axis: either x or y
8657
8657
  * @returns {Array} returns a domain from tickValues
8658
8658
  */
8659
- // eslint-disable-next-line max-statements
8659
+
8660
8660
  function getDomainFromData(props, axis) {
8661
8661
  const {
8662
8662
  polar,
@@ -8853,7 +8853,6 @@ __webpack_require__.r(__webpack_exports__);
8853
8853
 
8854
8854
 
8855
8855
 
8856
- /* eslint-disable no-use-before-define */
8857
8856
 
8858
8857
 
8859
8858
 
@@ -8979,8 +8978,6 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
8979
8978
  const isUnderMinY = underMin(minDomainY);
8980
8979
  const isOverMaxX = overMax(maxDomainX);
8981
8980
  const isOverMaxY = overMax(maxDomainY);
8982
-
8983
- // eslint-disable-next-line complexity
8984
8981
  return dataset.map(datum => {
8985
8982
  let {
8986
8983
  _x,
@@ -9091,7 +9088,6 @@ function formatData(dataset, props, expectedKeys) {
9091
9088
  };
9092
9089
  }
9093
9090
  const data = preformattedData ? dataset : dataset.reduce((dataArr, datum, index) => {
9094
- // eslint-disable-line complexity
9095
9091
  const parsedDatum = parseDatum(datum);
9096
9092
  const fallbackValues = {
9097
9093
  x: index,
@@ -9284,7 +9280,6 @@ __webpack_require__.r(__webpack_exports__);
9284
9280
 
9285
9281
 
9286
9282
 
9287
- /* eslint-disable no-use-before-define */
9288
9283
 
9289
9284
 
9290
9285
 
@@ -9340,8 +9335,6 @@ function getExtremeFromData(dataset, axis, type) {
9340
9335
  }, initialValue);
9341
9336
  return containsDate ? new Date(result) : result;
9342
9337
  }
9343
-
9344
- // eslint-disable-next-line max-statements
9345
9338
  function padDomain(domain, props, axis) {
9346
9339
  if (!props.domainPadding) {
9347
9340
  return domain;
@@ -9677,7 +9670,6 @@ __webpack_require__.r(__webpack_exports__);
9677
9670
 
9678
9671
 
9679
9672
 
9680
- /* eslint-disable no-use-before-define */
9681
9673
 
9682
9674
  const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
9683
9675
 
@@ -9725,11 +9717,10 @@ getScopedEvents) {
9725
9717
  */
9726
9718
  const getAllEvents = () => {
9727
9719
  // Mandatory usage: `getEvents.bind(this)`
9728
- /* eslint-disable no-invalid-this */
9720
+
9729
9721
  if (Array.isArray(this.componentEvents)) {
9730
9722
  return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
9731
9723
  }
9732
- /* eslint-enable no-invalid-this */
9733
9724
  return props.events;
9734
9725
  };
9735
9726
  const allEvents = getAllEvents();
@@ -9754,7 +9745,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9754
9745
  }
9755
9746
 
9756
9747
  // Mandatory usage: `getScopedEvents.bind(this)`
9757
- // eslint-disable-next-line no-invalid-this
9748
+
9758
9749
  const newBaseProps = baseProps || this.baseProps;
9759
9750
  // returns the original base props or base state of a given target element
9760
9751
  const getTargetProps = (identifier, type) => {
@@ -9763,7 +9754,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9763
9754
  target,
9764
9755
  key
9765
9756
  } = identifier;
9766
- // eslint-disable-next-line no-invalid-this
9767
9757
  const baseType = type === "props" ? newBaseProps : this.state || {};
9768
9758
  const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
9769
9759
  return key === "parent" ? base.parent : base[key] && base[key][target];
@@ -9790,7 +9780,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9790
9780
 
9791
9781
  // returns the state object with mutated props applied for a single key
9792
9782
  const getMutationObject = (key, childName) => {
9793
- // eslint-disable-next-line no-invalid-this
9794
9783
  const baseState = this.state || {};
9795
9784
  if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
9796
9785
  return baseState;
@@ -9863,11 +9852,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9863
9852
  // into a state mutation, and calls setState
9864
9853
  // eslint-disable-next-line max-params
9865
9854
  const onEvent = (evt, childProps, eventKey, eventName) => {
9866
- // eslint-disable-next-line no-invalid-this
9867
9855
  const eventReturn = events[eventName](evt, childProps, eventKey, this);
9868
9856
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(eventReturn)) {
9869
9857
  const callbacks = compileCallbacks(eventReturn);
9870
- // eslint-disable-next-line no-invalid-this
9871
9858
  this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
9872
9859
  }
9873
9860
  };
@@ -9897,7 +9884,7 @@ function getPartialEvents(events, eventKey, childProps) {
9897
9884
  // eslint-disable-next-line max-params
9898
9885
  function getEventState(eventKey, namespace, childType) {
9899
9886
  // Mandatory usage: `getEventState.bind(this)`
9900
- // eslint-disable-next-line no-invalid-this
9887
+
9901
9888
  const state = this.state || {};
9902
9889
  if (!childType) {
9903
9890
  return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
@@ -10090,7 +10077,6 @@ __webpack_require__.r(__webpack_exports__);
10090
10077
 
10091
10078
 
10092
10079
 
10093
- /* eslint-disable no-use-before-define */
10094
10080
 
10095
10081
  // Private Functions
10096
10082
 
@@ -10559,7 +10545,6 @@ __webpack_require__.r(__webpack_exports__);
10559
10545
  /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
10560
10546
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
10561
10547
 
10562
- /* eslint-disable no-use-before-define */
10563
10548
 
10564
10549
  // Private Functions
10565
10550
 
@@ -10879,7 +10864,6 @@ __webpack_require__.r(__webpack_exports__);
10879
10864
  /* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
10880
10865
  /* harmony import */ var victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-vendor/d3-scale */ "../../victory-vendor/es/d3-scale.js");
10881
10866
 
10882
- /* eslint-disable no-use-before-define */
10883
10867
 
10884
10868
 
10885
10869
 
@@ -11670,8 +11654,6 @@ function getChildBeforeLoad(animate, child, data, cb) {
11670
11654
  clipWidth: 0
11671
11655
  };
11672
11656
  }
11673
-
11674
- // eslint-disable-next-line max-params
11675
11657
  function getChildOnLoad(animate, data, cb) {
11676
11658
  const newAnimate = Object.assign({}, animate, {
11677
11659
  onEnd: cb
@@ -11694,7 +11676,7 @@ function getChildOnLoad(animate, data, cb) {
11694
11676
  };
11695
11677
  }
11696
11678
 
11697
- // eslint-disable-next-line max-params, max-len
11679
+ // eslint-disable-next-line max-params
11698
11680
  function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
11699
11681
  // Whether or not _this_ child has exiting nodes, we want the exit-
11700
11682
  // transition for all children to have the same duration, delay, etc.
@@ -11718,7 +11700,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
11718
11700
  };
11719
11701
  }
11720
11702
 
11721
- // eslint-disable-next-line max-params,max-len
11703
+ // eslint-disable-next-line max-params
11722
11704
  function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
11723
11705
  let newAnimate = animate;
11724
11706
  let newData = data;
@@ -11743,7 +11725,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
11743
11725
  };
11744
11726
  }
11745
11727
 
11746
- // eslint-disable-next-line max-params, max-len
11728
+ // eslint-disable-next-line max-params
11747
11729
  function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
11748
11730
  // Whether or not _this_ child has entering nodes, we want the entering-
11749
11731
  // transition for all children to have the same duration, delay, etc.
@@ -11850,8 +11832,6 @@ function getTransitionPropsFactory(props, state, setState) {
11850
11832
  }
11851
11833
  return {};
11852
11834
  };
11853
-
11854
- // eslint-disable-next-line max-statements, complexity, max-len
11855
11835
  return function getTransitionProps(child, index) {
11856
11836
  const data = getChildData(child) || [];
11857
11837
  const animate = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.animate, child.props.animate);