victory-pie 36.8.5-next.0 → 36.8.5

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,14 +1,12 @@
1
1
  # victory-pie
2
2
 
3
- ## 36.8.5-next.0
3
+ ## 36.8.5
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - c8c2eb2f5: Replace instances of lodash.assign with Object.assign
8
- - Updated dependencies [c8c2eb2f5]
9
- - Updated dependencies [0f3abe234]
10
- - victory-core@36.8.5-next.0
11
- - victory-vendor@36.8.5-next.0
7
+ - Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
8
+
9
+ * Replace instances of lodash.range with equivalent native code ([#2760](https://github.com/FormidableLabs/victory/pull/2760))
12
10
 
13
11
  ## 36.8.4
14
12
 
@@ -2080,44 +2080,6 @@ function basePropertyDeep(path) {
2080
2080
  module.exports = basePropertyDeep;
2081
2081
 
2082
2082
 
2083
- /***/ }),
2084
-
2085
- /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js":
2086
- /*!************************************************************************************!*\
2087
- !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js ***!
2088
- \************************************************************************************/
2089
- /***/ ((module) => {
2090
-
2091
- /* Built-in method references for those with the same name as other `lodash` methods. */
2092
- var nativeCeil = Math.ceil,
2093
- nativeMax = Math.max;
2094
-
2095
- /**
2096
- * The base implementation of `_.range` and `_.rangeRight` which doesn't
2097
- * coerce arguments.
2098
- *
2099
- * @private
2100
- * @param {number} start The start of the range.
2101
- * @param {number} end The end of the range.
2102
- * @param {number} step The value to increment or decrement by.
2103
- * @param {boolean} [fromRight] Specify iterating from right to left.
2104
- * @returns {Array} Returns the range of numbers.
2105
- */
2106
- function baseRange(start, end, step, fromRight) {
2107
- var index = -1,
2108
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
2109
- result = Array(length);
2110
-
2111
- while (length--) {
2112
- result[fromRight ? length : ++index] = start;
2113
- start += step;
2114
- }
2115
- return result;
2116
- }
2117
-
2118
- module.exports = baseRange;
2119
-
2120
-
2121
2083
  /***/ }),
2122
2084
 
2123
2085
  /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js":
@@ -2617,46 +2579,6 @@ function createFind(findIndexFunc) {
2617
2579
  module.exports = createFind;
2618
2580
 
2619
2581
 
2620
- /***/ }),
2621
-
2622
- /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js":
2623
- /*!**************************************************************************************!*\
2624
- !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js ***!
2625
- \**************************************************************************************/
2626
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2627
-
2628
- var baseRange = __webpack_require__(/*! ./_baseRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js"),
2629
- isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js"),
2630
- toFinite = __webpack_require__(/*! ./toFinite */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js");
2631
-
2632
- /**
2633
- * Creates a `_.range` or `_.rangeRight` function.
2634
- *
2635
- * @private
2636
- * @param {boolean} [fromRight] Specify iterating from right to left.
2637
- * @returns {Function} Returns the new range function.
2638
- */
2639
- function createRange(fromRight) {
2640
- return function(start, end, step) {
2641
- if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
2642
- end = step = undefined;
2643
- }
2644
- // Ensure the sign of `-0` is preserved.
2645
- start = toFinite(start);
2646
- if (end === undefined) {
2647
- end = start;
2648
- start = 0;
2649
- } else {
2650
- end = toFinite(end);
2651
- }
2652
- step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
2653
- return baseRange(start, end, step, fromRight);
2654
- };
2655
- }
2656
-
2657
- module.exports = createRange;
2658
-
2659
-
2660
2582
  /***/ }),
2661
2583
 
2662
2584
  /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js":
@@ -5484,62 +5406,6 @@ function property(path) {
5484
5406
  module.exports = property;
5485
5407
 
5486
5408
 
5487
- /***/ }),
5488
-
5489
- /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js":
5490
- /*!*******************************************************************************!*\
5491
- !*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js ***!
5492
- \*******************************************************************************/
5493
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5494
-
5495
- var createRange = __webpack_require__(/*! ./_createRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js");
5496
-
5497
- /**
5498
- * Creates an array of numbers (positive and/or negative) progressing from
5499
- * `start` up to, but not including, `end`. A step of `-1` is used if a negative
5500
- * `start` is specified without an `end` or `step`. If `end` is not specified,
5501
- * it's set to `start` with `start` then set to `0`.
5502
- *
5503
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
5504
- * floating-point values which can produce unexpected results.
5505
- *
5506
- * @static
5507
- * @since 0.1.0
5508
- * @memberOf _
5509
- * @category Util
5510
- * @param {number} [start=0] The start of the range.
5511
- * @param {number} end The end of the range.
5512
- * @param {number} [step=1] The value to increment or decrement by.
5513
- * @returns {Array} Returns the range of numbers.
5514
- * @see _.inRange, _.rangeRight
5515
- * @example
5516
- *
5517
- * _.range(4);
5518
- * // => [0, 1, 2, 3]
5519
- *
5520
- * _.range(-4);
5521
- * // => [0, -1, -2, -3]
5522
- *
5523
- * _.range(1, 5);
5524
- * // => [1, 2, 3, 4]
5525
- *
5526
- * _.range(0, 20, 5);
5527
- * // => [0, 5, 10, 15]
5528
- *
5529
- * _.range(0, -4, -1);
5530
- * // => [0, -1, -2, -3]
5531
- *
5532
- * _.range(1, 4, 0);
5533
- * // => [1, 1, 1]
5534
- *
5535
- * _.range(0);
5536
- * // => []
5537
- */
5538
- var range = createRange();
5539
-
5540
- module.exports = range;
5541
-
5542
-
5543
5409
  /***/ }),
5544
5410
 
5545
5411
  /***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js":
@@ -8749,9 +8615,9 @@ var VictoryPortal = /*#__PURE__*/function (_React$Component) {
8749
8615
 
8750
8616
  _this = _super.call.apply(_super, [this].concat(args));
8751
8617
  _this.checkedContext = void 0;
8752
- _this.portalKey = void 0;
8753
8618
  _this.renderInPlace = void 0;
8754
8619
  _this.element = void 0;
8620
+ _this.portalKey = void 0;
8755
8621
  return _this;
8756
8622
  }
8757
8623
 
@@ -10786,17 +10652,14 @@ __webpack_require__.r(__webpack_exports__);
10786
10652
  /* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_8__);
10787
10653
  /* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/last */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/last.js");
10788
10654
  /* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_last__WEBPACK_IMPORTED_MODULE_9__);
10789
- /* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/range */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js");
10790
- /* harmony import */ var lodash_range__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_range__WEBPACK_IMPORTED_MODULE_10__);
10791
- /* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
10792
- /* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_11__);
10793
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react */ "react");
10794
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
10795
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
10655
+ /* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! lodash/uniq */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniq.js");
10656
+ /* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_10__);
10657
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
10658
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
10659
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
10796
10660
  /* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
10797
- /* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
10798
- /* harmony import */ var _immutable__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./immutable */ "../../victory-core/es/victory-util/immutable.js");
10799
-
10661
+ /* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
10662
+ /* harmony import */ var _immutable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./immutable */ "../../victory-core/es/victory-util/immutable.js");
10800
10663
 
10801
10664
 
10802
10665
 
@@ -10833,24 +10696,22 @@ function parseDatum(datum) {
10833
10696
  errorX: true,
10834
10697
  errorY: true
10835
10698
  };
10836
- return _immutable__WEBPACK_IMPORTED_MODULE_13__.isImmutable(datum) ? _immutable__WEBPACK_IMPORTED_MODULE_13__.shallowToJS(datum, immutableDatumWhitelist) : datum;
10699
+ return _immutable__WEBPACK_IMPORTED_MODULE_12__.isImmutable(datum) ? _immutable__WEBPACK_IMPORTED_MODULE_12__.shallowToJS(datum, immutableDatumWhitelist) : datum;
10837
10700
  }
10838
10701
 
10839
10702
  function getLength(data) {
10840
- return _immutable__WEBPACK_IMPORTED_MODULE_13__.isIterable(data) ? data.size : data.length;
10703
+ return _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(data) ? data.size : data.length;
10841
10704
  } // Returns generated data for a given axis based on domain and sample from props
10842
10705
 
10843
10706
 
10844
10707
  function generateDataArray(props, axis) {
10845
10708
  var propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_7___default()(props.domain) ? props.domain[axis] : props.domain;
10846
- var domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_14__.getBaseScale(props, axis).domain();
10709
+ var domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_13__.getBaseScale(props, axis).domain();
10847
10710
  var samples = props.samples || 1;
10848
10711
  var domainMax = Math.max.apply(Math, _toConsumableArray(domain));
10849
10712
  var domainMin = Math.min.apply(Math, _toConsumableArray(domain));
10850
10713
  var step = (domainMax - domainMin) / samples;
10851
-
10852
- var values = lodash_range__WEBPACK_IMPORTED_MODULE_10___default()(domainMin, domainMax, step);
10853
-
10714
+ var values = _helpers__WEBPACK_IMPORTED_MODULE_14__.range(domainMin, domainMax, step);
10854
10715
  return lodash_last__WEBPACK_IMPORTED_MODULE_9___default()(values) === domainMax ? values : values.concat(domainMax);
10855
10716
  } // Returns sorted data. If no sort keys are provided, data is returned unaltered.
10856
10717
 
@@ -10877,8 +10738,8 @@ function sortData(dataset, sortKey) {
10877
10738
  function cleanData(dataset, props) {
10878
10739
  var smallNumber = 1 / Number.MAX_SAFE_INTEGER;
10879
10740
  var scaleType = {
10880
- x: _scale__WEBPACK_IMPORTED_MODULE_14__.getScaleType(props, "x"),
10881
- y: _scale__WEBPACK_IMPORTED_MODULE_14__.getScaleType(props, "y")
10741
+ x: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "x"),
10742
+ y: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "y")
10882
10743
  };
10883
10744
 
10884
10745
  if (scaleType.x !== "log" && scaleType.y !== "log") {
@@ -11013,7 +10874,7 @@ function createStringMap(props, axis) {
11013
10874
  var stringsFromCategories = getStringsFromCategories(props, axis);
11014
10875
  var stringsFromData = getStringsFromData(props, axis);
11015
10876
 
11016
- var allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_11___default()([].concat(_toConsumableArray(stringsFromAxes), _toConsumableArray(stringsFromCategories), _toConsumableArray(stringsFromData)));
10877
+ var allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default()([].concat(_toConsumableArray(stringsFromAxes), _toConsumableArray(stringsFromCategories), _toConsumableArray(stringsFromData)));
11017
10878
 
11018
10879
  return allStrings.length === 0 ? null : allStrings.reduce(function (memo, string, index) {
11019
10880
  memo[string] = index + 1;
@@ -11055,7 +10916,7 @@ function downsample(data, maxPoints) {
11055
10916
  */
11056
10917
 
11057
10918
  function formatData(dataset, props, expectedKeys) {
11058
- var isArrayOrIterable = Array.isArray(dataset) || _immutable__WEBPACK_IMPORTED_MODULE_13__.isIterable(dataset);
10919
+ var isArrayOrIterable = Array.isArray(dataset) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(dataset);
11059
10920
 
11060
10921
  if (!isArrayOrIterable || getLength(dataset) < 1) {
11061
10922
  return [];
@@ -11068,7 +10929,7 @@ function formatData(dataset, props, expectedKeys) {
11068
10929
  expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
11069
10930
 
11070
10931
  var createAccessor = function (name) {
11071
- return _helpers__WEBPACK_IMPORTED_MODULE_16__.createAccessor(props[name] !== undefined ? props[name] : name);
10932
+ return _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(props[name] !== undefined ? props[name] : name);
11072
10933
  };
11073
10934
 
11074
10935
  var accessor = expectedKeys.reduce(function (memo, type) {
@@ -11205,14 +11066,14 @@ function getStringsFromCategories(props, axis) {
11205
11066
  */
11206
11067
 
11207
11068
  function getStringsFromData(props, axis) {
11208
- var isArrayOrIterable = Array.isArray(props.data) || _immutable__WEBPACK_IMPORTED_MODULE_13__.isIterable(props.data);
11069
+ var isArrayOrIterable = Array.isArray(props.data) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(props.data);
11209
11070
 
11210
11071
  if (!isArrayOrIterable) {
11211
11072
  return [];
11212
11073
  }
11213
11074
 
11214
11075
  var key = props[axis] === undefined ? axis : props[axis];
11215
- var accessor = _helpers__WEBPACK_IMPORTED_MODULE_16__.createAccessor(key); // support immutable data
11076
+ var accessor = _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(key); // support immutable data
11216
11077
 
11217
11078
  var data = props.data.reduce(function (memo, d) {
11218
11079
  memo.push(parseDatum(d));
@@ -11249,7 +11110,7 @@ function isDataComponent(component) {
11249
11110
  var role = getRole(component);
11250
11111
 
11251
11112
  if (role === "portal") {
11252
- var children = react__WEBPACK_IMPORTED_MODULE_12___default().Children.toArray(component.props.children);
11113
+ var children = react__WEBPACK_IMPORTED_MODULE_11___default().Children.toArray(component.props.children);
11253
11114
  role = children.length ? getRole(children[0]) : "";
11254
11115
  }
11255
11116
 
@@ -11784,6 +11645,7 @@ __webpack_require__.r(__webpack_exports__);
11784
11645
  /* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
11785
11646
  /* harmony export */ "omit": () => (/* binding */ omit),
11786
11647
  /* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
11648
+ /* harmony export */ "range": () => (/* binding */ range),
11787
11649
  /* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
11788
11650
  /* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
11789
11651
  /* harmony export */ });
@@ -12063,6 +11925,38 @@ function getCurrentAxis(axis, horizontal) {
12063
11925
  var otherAxis = axis === "x" ? "y" : "x";
12064
11926
  return horizontal ? otherAxis : axis;
12065
11927
  }
11928
+ /**
11929
+ * Creates an array of numbers (positive and/or negative) progressing
11930
+ * from start up to, but not including, end.
11931
+ * A step of -1 is used if a negative start is specified without an end or step.
11932
+ * If end is not specified, it's set to start with start then set to 0.
11933
+ *
11934
+ * @param start The length of the array to create, or the start value
11935
+ * @param end [The end value] If this is defined, start is the start value
11936
+ * @returns An array of the given length
11937
+ */
11938
+
11939
+ function range(start, end, increment) {
11940
+ // when the end index is not given, start from 0
11941
+ var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
11942
+
11943
+ var endIndex = end ? end : start; // ensure endIndex is not a falsy value
11944
+
11945
+ if (!endIndex) endIndex = 0;
11946
+ var k = endIndex - startIndex; // the value range
11947
+
11948
+ var length = Math.abs(k); // the length of the range
11949
+
11950
+ var sign = k / length || 1; // the sign of the range (negative or positive)
11951
+
11952
+ var inc = increment || 1; // the step size of each increment
11953
+ // normalize the array length when dealing with floating point values
11954
+
11955
+ var arrayLength = Math.max(Math.ceil(length / inc), 0);
11956
+ return Array.from(Array(arrayLength), function (_, i) {
11957
+ return startIndex + i * sign * inc;
11958
+ });
11959
+ }
12066
11960
  /**
12067
11961
  * @param {Array} children: an array of child components
12068
11962
  * @param {Function} iteratee: a function with arguments "child", "childName", and "parent"