victory-errorbar 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-errorbar
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
@@ -30,7 +30,6 @@ __webpack_require__.r(__webpack_exports__);
30
30
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-primitives/line.js");
31
31
  /* harmony import */ var victory_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! victory-core */ "../../victory-core/es/victory-util/user-props.js");
32
32
 
33
- /* eslint-disable max-statements */
34
33
 
35
34
 
36
35
  const renderBorder = (props, error, type) => {
@@ -127,7 +126,7 @@ const evaluateProps = props => {
127
126
 
128
127
  // ErrorProps for calculateError
129
128
 
130
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
129
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
131
130
 
132
131
  const defaultProps = {
133
132
  groupComponent: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("g", null),
@@ -459,7 +458,7 @@ const defaultData = [{
459
458
  errorY: 0.4
460
459
  }];
461
460
 
462
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
461
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
463
462
 
464
463
  class VictoryErrorBarBase extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) {
465
464
  static animationWhitelist = ["data", "domain", "height", "padding", "samples", "style", "width", "errorX", "errorY", "borderWidth"];
@@ -5233,7 +5232,7 @@ const interpolateFunction = function (a, b) {
5233
5232
  return b;
5234
5233
  }
5235
5234
  return function () {
5236
- /* eslint-disable no-invalid-this, prefer-rest-params */
5235
+ /* eslint-disable prefer-rest-params */
5237
5236
  const aval = typeof a === "function" ? a.apply(this, arguments) : a;
5238
5237
  const bval = typeof b === "function" ? b.apply(this, arguments) : b;
5239
5238
  return (0,victory_vendor_d3_interpolate__WEBPACK_IMPORTED_MODULE_2__.interpolate)(aval, bval)(t);
@@ -5625,9 +5624,9 @@ const VictoryContainer = initialProps => {
5625
5624
  ...style,
5626
5625
  width: responsive ? style?.width : dimensions.width,
5627
5626
  height: responsive ? style?.height : dimensions.height,
5628
- pointerEvents: "none",
5629
- touchAction: "none",
5630
- position: "relative"
5627
+ pointerEvents: style?.pointerEvents ?? "none",
5628
+ touchAction: style?.touchAction ?? "none",
5629
+ position: style?.position ?? "relative"
5631
5630
  },
5632
5631
  "data-ouia-component-id": ouiaId,
5633
5632
  "data-ouia-component-type": ouiaType,
@@ -7683,7 +7682,7 @@ class VictoryTransition extends (react__WEBPACK_IMPORTED_MODULE_2___default().Co
7683
7682
  componentDidMount() {
7684
7683
  this.setState({
7685
7684
  nodesShouldLoad: true
7686
- }); // eslint-disable-line react/no-did-mount-set-state
7685
+ });
7687
7686
  }
7688
7687
  shouldComponentUpdate(nextProps) {
7689
7688
  if (!react_fast_compare__WEBPACK_IMPORTED_MODULE_3___default()(this.props, nextProps)) {
@@ -7897,7 +7896,7 @@ const defaultComponents = [{
7897
7896
  function addEvents(WrappedComponent, options) {
7898
7897
  if (options === void 0) {
7899
7898
  options = {};
7900
- } // eslint-disable-next-line @typescript-eslint/no-empty-interface
7899
+ } // eslint-disable-next-line @typescript-eslint/no-empty-object-type
7901
7900
  // @ts-expect-error "TS2545: A mixin class must have a constructor with a single rest parameter of type 'any[]'."
7902
7901
  class AddEventsMixin extends WrappedComponent {
7903
7902
  constructor(props) {
@@ -8266,7 +8265,6 @@ __webpack_require__.r(__webpack_exports__);
8266
8265
 
8267
8266
 
8268
8267
 
8269
- /* eslint-disable no-use-before-define */
8270
8268
 
8271
8269
 
8272
8270
 
@@ -8392,8 +8390,6 @@ function formatDataFromDomain(dataset, domain, defaultBaseline) {
8392
8390
  const isUnderMinY = underMin(minDomainY);
8393
8391
  const isOverMaxX = overMax(maxDomainX);
8394
8392
  const isOverMaxY = overMax(maxDomainY);
8395
-
8396
- // eslint-disable-next-line complexity
8397
8393
  return dataset.map(datum => {
8398
8394
  let {
8399
8395
  _x,
@@ -8504,7 +8500,6 @@ function formatData(dataset, props, expectedKeys) {
8504
8500
  };
8505
8501
  }
8506
8502
  const data = preformattedData ? dataset : dataset.reduce((dataArr, datum, index) => {
8507
- // eslint-disable-line complexity
8508
8503
  const parsedDatum = parseDatum(datum);
8509
8504
  const fallbackValues = {
8510
8505
  x: index,
@@ -8801,7 +8796,6 @@ __webpack_require__.r(__webpack_exports__);
8801
8796
 
8802
8797
 
8803
8798
 
8804
- /* eslint-disable no-use-before-define */
8805
8799
 
8806
8800
 
8807
8801
 
@@ -8857,8 +8851,6 @@ function getExtremeFromData(dataset, axis, type) {
8857
8851
  }, initialValue);
8858
8852
  return containsDate ? new Date(result) : result;
8859
8853
  }
8860
-
8861
- // eslint-disable-next-line max-statements
8862
8854
  function padDomain(domain, props, axis) {
8863
8855
  if (!props.domainPadding) {
8864
8856
  return domain;
@@ -9194,7 +9186,6 @@ __webpack_require__.r(__webpack_exports__);
9194
9186
 
9195
9187
 
9196
9188
 
9197
- /* eslint-disable no-use-before-define */
9198
9189
 
9199
9190
  const GLOBAL_EVENT_REGEX = /^onGlobal(.*)$/;
9200
9191
 
@@ -9242,11 +9233,10 @@ getScopedEvents) {
9242
9233
  */
9243
9234
  const getAllEvents = () => {
9244
9235
  // Mandatory usage: `getEvents.bind(this)`
9245
- /* eslint-disable no-invalid-this */
9236
+
9246
9237
  if (Array.isArray(this.componentEvents)) {
9247
9238
  return Array.isArray(props.events) ? this.componentEvents.concat(...props.events) : this.componentEvents;
9248
9239
  }
9249
- /* eslint-enable no-invalid-this */
9250
9240
  return props.events;
9251
9241
  };
9252
9242
  const allEvents = getAllEvents();
@@ -9271,7 +9261,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9271
9261
  }
9272
9262
 
9273
9263
  // Mandatory usage: `getScopedEvents.bind(this)`
9274
- // eslint-disable-next-line no-invalid-this
9264
+
9275
9265
  const newBaseProps = baseProps || this.baseProps;
9276
9266
  // returns the original base props or base state of a given target element
9277
9267
  const getTargetProps = (identifier, type) => {
@@ -9280,7 +9270,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9280
9270
  target,
9281
9271
  key
9282
9272
  } = identifier;
9283
- // eslint-disable-next-line no-invalid-this
9284
9273
  const baseType = type === "props" ? newBaseProps : this.state || {};
9285
9274
  const base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
9286
9275
  return key === "parent" ? base.parent : base[key] && base[key][target];
@@ -9307,7 +9296,6 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9307
9296
 
9308
9297
  // returns the state object with mutated props applied for a single key
9309
9298
  const getMutationObject = (key, childName) => {
9310
- // eslint-disable-next-line no-invalid-this
9311
9299
  const baseState = this.state || {};
9312
9300
  if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(eventReturn.mutation)) {
9313
9301
  return baseState;
@@ -9380,11 +9368,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
9380
9368
  // into a state mutation, and calls setState
9381
9369
  // eslint-disable-next-line max-params
9382
9370
  const onEvent = (evt, childProps, eventKey, eventName) => {
9383
- // eslint-disable-next-line no-invalid-this
9384
9371
  const eventReturn = events[eventName](evt, childProps, eventKey, this);
9385
9372
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()(eventReturn)) {
9386
9373
  const callbacks = compileCallbacks(eventReturn);
9387
- // eslint-disable-next-line no-invalid-this
9388
9374
  this.setState(parseEventReturn(eventReturn, eventKey), callbacks);
9389
9375
  }
9390
9376
  };
@@ -9414,7 +9400,7 @@ function getPartialEvents(events, eventKey, childProps) {
9414
9400
  // eslint-disable-next-line max-params
9415
9401
  function getEventState(eventKey, namespace, childType) {
9416
9402
  // Mandatory usage: `getEventState.bind(this)`
9417
- // eslint-disable-next-line no-invalid-this
9403
+
9418
9404
  const state = this.state || {};
9419
9405
  if (!childType) {
9420
9406
  return eventKey === "parent" ? state[eventKey] && state[eventKey][namespace] || state[eventKey] : state[eventKey] && state[eventKey][namespace];
@@ -9607,7 +9593,6 @@ __webpack_require__.r(__webpack_exports__);
9607
9593
 
9608
9594
 
9609
9595
 
9610
- /* eslint-disable no-use-before-define */
9611
9596
 
9612
9597
  // Private Functions
9613
9598
 
@@ -10076,7 +10061,6 @@ __webpack_require__.r(__webpack_exports__);
10076
10061
  /* harmony import */ var lodash_defaults__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_defaults__WEBPACK_IMPORTED_MODULE_0__);
10077
10062
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
10078
10063
 
10079
- /* eslint-disable no-use-before-define */
10080
10064
 
10081
10065
  // Private Functions
10082
10066
 
@@ -10396,7 +10380,6 @@ __webpack_require__.r(__webpack_exports__);
10396
10380
  /* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
10397
10381
  /* harmony import */ var victory_vendor_d3_scale__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! victory-vendor/d3-scale */ "../../victory-vendor/es/d3-scale.js");
10398
10382
 
10399
- /* eslint-disable no-use-before-define */
10400
10383
 
10401
10384
 
10402
10385
 
@@ -11187,8 +11170,6 @@ function getChildBeforeLoad(animate, child, data, cb) {
11187
11170
  clipWidth: 0
11188
11171
  };
11189
11172
  }
11190
-
11191
- // eslint-disable-next-line max-params
11192
11173
  function getChildOnLoad(animate, data, cb) {
11193
11174
  const newAnimate = Object.assign({}, animate, {
11194
11175
  onEnd: cb
@@ -11211,7 +11192,7 @@ function getChildOnLoad(animate, data, cb) {
11211
11192
  };
11212
11193
  }
11213
11194
 
11214
- // eslint-disable-next-line max-params, max-len
11195
+ // eslint-disable-next-line max-params
11215
11196
  function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
11216
11197
  // Whether or not _this_ child has exiting nodes, we want the exit-
11217
11198
  // transition for all children to have the same duration, delay, etc.
@@ -11235,7 +11216,7 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
11235
11216
  };
11236
11217
  }
11237
11218
 
11238
- // eslint-disable-next-line max-params,max-len
11219
+ // eslint-disable-next-line max-params
11239
11220
  function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
11240
11221
  let newAnimate = animate;
11241
11222
  let newData = data;
@@ -11260,7 +11241,7 @@ function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
11260
11241
  };
11261
11242
  }
11262
11243
 
11263
- // eslint-disable-next-line max-params, max-len
11244
+ // eslint-disable-next-line max-params
11264
11245
  function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
11265
11246
  // Whether or not _this_ child has entering nodes, we want the entering-
11266
11247
  // transition for all children to have the same duration, delay, etc.
@@ -11367,8 +11348,6 @@ function getTransitionPropsFactory(props, state, setState) {
11367
11348
  }
11368
11349
  return {};
11369
11350
  };
11370
-
11371
- // eslint-disable-next-line max-statements, complexity, max-len
11372
11351
  return function getTransitionProps(child, index) {
11373
11352
  const data = getChildData(child) || [];
11374
11353
  const animate = lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, props.animate, child.props.animate);