victory-errorbar 36.8.5-next.0 → 36.8.6
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 +10 -6
- package/dist/victory-errorbar.js +52 -158
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.d.ts +31 -31
- package/es/helper-methods.d.ts +3 -3
- package/es/index.d.ts +2 -2
- package/es/victory-errorbar.d.ts +138 -138
- package/lib/error-bar.d.ts +31 -31
- package/lib/helper-methods.d.ts +3 -3
- package/lib/index.d.ts +2 -2
- package/lib/victory-errorbar.d.ts +138 -138
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# victory-errorbar
|
|
2
2
|
|
|
3
|
-
## 36.8.
|
|
3
|
+
## 36.8.6
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
- Migrate victory-native to TypeScript ([#2739](https://github.com/FormidableLabs/victory/pull/2739))
|
|
8
|
+
|
|
9
|
+
## 36.8.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Replace instances of lodash.assign with Object.assign ([#2757](https://github.com/FormidableLabs/victory/pull/2757))
|
|
14
|
+
|
|
15
|
+
* Replace instances of lodash.range with equivalent native code ([#2760](https://github.com/FormidableLabs/victory/pull/2760))
|
|
12
16
|
|
|
13
17
|
## 36.8.4
|
|
14
18
|
|
package/dist/victory-errorbar.js
CHANGED
|
@@ -1906,44 +1906,6 @@ function basePropertyDeep(path) {
|
|
|
1906
1906
|
module.exports = basePropertyDeep;
|
|
1907
1907
|
|
|
1908
1908
|
|
|
1909
|
-
/***/ }),
|
|
1910
|
-
|
|
1911
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js":
|
|
1912
|
-
/*!************************************************************************************!*\
|
|
1913
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js ***!
|
|
1914
|
-
\************************************************************************************/
|
|
1915
|
-
/***/ ((module) => {
|
|
1916
|
-
|
|
1917
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1918
|
-
var nativeCeil = Math.ceil,
|
|
1919
|
-
nativeMax = Math.max;
|
|
1920
|
-
|
|
1921
|
-
/**
|
|
1922
|
-
* The base implementation of `_.range` and `_.rangeRight` which doesn't
|
|
1923
|
-
* coerce arguments.
|
|
1924
|
-
*
|
|
1925
|
-
* @private
|
|
1926
|
-
* @param {number} start The start of the range.
|
|
1927
|
-
* @param {number} end The end of the range.
|
|
1928
|
-
* @param {number} step The value to increment or decrement by.
|
|
1929
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
1930
|
-
* @returns {Array} Returns the range of numbers.
|
|
1931
|
-
*/
|
|
1932
|
-
function baseRange(start, end, step, fromRight) {
|
|
1933
|
-
var index = -1,
|
|
1934
|
-
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
|
1935
|
-
result = Array(length);
|
|
1936
|
-
|
|
1937
|
-
while (length--) {
|
|
1938
|
-
result[fromRight ? length : ++index] = start;
|
|
1939
|
-
start += step;
|
|
1940
|
-
}
|
|
1941
|
-
return result;
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
module.exports = baseRange;
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
1909
|
/***/ }),
|
|
1948
1910
|
|
|
1949
1911
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js":
|
|
@@ -2580,46 +2542,6 @@ function createFind(findIndexFunc) {
|
|
|
2580
2542
|
module.exports = createFind;
|
|
2581
2543
|
|
|
2582
2544
|
|
|
2583
|
-
/***/ }),
|
|
2584
|
-
|
|
2585
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js":
|
|
2586
|
-
/*!**************************************************************************************!*\
|
|
2587
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js ***!
|
|
2588
|
-
\**************************************************************************************/
|
|
2589
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2590
|
-
|
|
2591
|
-
var baseRange = __webpack_require__(/*! ./_baseRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js"),
|
|
2592
|
-
isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js"),
|
|
2593
|
-
toFinite = __webpack_require__(/*! ./toFinite */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js");
|
|
2594
|
-
|
|
2595
|
-
/**
|
|
2596
|
-
* Creates a `_.range` or `_.rangeRight` function.
|
|
2597
|
-
*
|
|
2598
|
-
* @private
|
|
2599
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2600
|
-
* @returns {Function} Returns the new range function.
|
|
2601
|
-
*/
|
|
2602
|
-
function createRange(fromRight) {
|
|
2603
|
-
return function(start, end, step) {
|
|
2604
|
-
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
|
|
2605
|
-
end = step = undefined;
|
|
2606
|
-
}
|
|
2607
|
-
// Ensure the sign of `-0` is preserved.
|
|
2608
|
-
start = toFinite(start);
|
|
2609
|
-
if (end === undefined) {
|
|
2610
|
-
end = start;
|
|
2611
|
-
start = 0;
|
|
2612
|
-
} else {
|
|
2613
|
-
end = toFinite(end);
|
|
2614
|
-
}
|
|
2615
|
-
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
|
|
2616
|
-
return baseRange(start, end, step, fromRight);
|
|
2617
|
-
};
|
|
2618
|
-
}
|
|
2619
|
-
|
|
2620
|
-
module.exports = createRange;
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
2545
|
/***/ }),
|
|
2624
2546
|
|
|
2625
2547
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js":
|
|
@@ -5552,62 +5474,6 @@ function property(path) {
|
|
|
5552
5474
|
module.exports = property;
|
|
5553
5475
|
|
|
5554
5476
|
|
|
5555
|
-
/***/ }),
|
|
5556
|
-
|
|
5557
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js":
|
|
5558
|
-
/*!*******************************************************************************!*\
|
|
5559
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js ***!
|
|
5560
|
-
\*******************************************************************************/
|
|
5561
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
5562
|
-
|
|
5563
|
-
var createRange = __webpack_require__(/*! ./_createRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js");
|
|
5564
|
-
|
|
5565
|
-
/**
|
|
5566
|
-
* Creates an array of numbers (positive and/or negative) progressing from
|
|
5567
|
-
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
|
|
5568
|
-
* `start` is specified without an `end` or `step`. If `end` is not specified,
|
|
5569
|
-
* it's set to `start` with `start` then set to `0`.
|
|
5570
|
-
*
|
|
5571
|
-
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
5572
|
-
* floating-point values which can produce unexpected results.
|
|
5573
|
-
*
|
|
5574
|
-
* @static
|
|
5575
|
-
* @since 0.1.0
|
|
5576
|
-
* @memberOf _
|
|
5577
|
-
* @category Util
|
|
5578
|
-
* @param {number} [start=0] The start of the range.
|
|
5579
|
-
* @param {number} end The end of the range.
|
|
5580
|
-
* @param {number} [step=1] The value to increment or decrement by.
|
|
5581
|
-
* @returns {Array} Returns the range of numbers.
|
|
5582
|
-
* @see _.inRange, _.rangeRight
|
|
5583
|
-
* @example
|
|
5584
|
-
*
|
|
5585
|
-
* _.range(4);
|
|
5586
|
-
* // => [0, 1, 2, 3]
|
|
5587
|
-
*
|
|
5588
|
-
* _.range(-4);
|
|
5589
|
-
* // => [0, -1, -2, -3]
|
|
5590
|
-
*
|
|
5591
|
-
* _.range(1, 5);
|
|
5592
|
-
* // => [1, 2, 3, 4]
|
|
5593
|
-
*
|
|
5594
|
-
* _.range(0, 20, 5);
|
|
5595
|
-
* // => [0, 5, 10, 15]
|
|
5596
|
-
*
|
|
5597
|
-
* _.range(0, -4, -1);
|
|
5598
|
-
* // => [0, -1, -2, -3]
|
|
5599
|
-
*
|
|
5600
|
-
* _.range(1, 4, 0);
|
|
5601
|
-
* // => [1, 1, 1]
|
|
5602
|
-
*
|
|
5603
|
-
* _.range(0);
|
|
5604
|
-
* // => []
|
|
5605
|
-
*/
|
|
5606
|
-
var range = createRange();
|
|
5607
|
-
|
|
5608
|
-
module.exports = range;
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
5477
|
/***/ }),
|
|
5612
5478
|
|
|
5613
5479
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/sortedUniq.js":
|
|
@@ -10743,17 +10609,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10743
10609
|
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_8__);
|
|
10744
10610
|
/* 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");
|
|
10745
10611
|
/* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_last__WEBPACK_IMPORTED_MODULE_9__);
|
|
10746
|
-
/* harmony import */ var
|
|
10747
|
-
/* harmony import */ var
|
|
10748
|
-
/* harmony import */ var
|
|
10749
|
-
/* harmony import */ var
|
|
10750
|
-
/* harmony import */ var
|
|
10751
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
|
10752
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10612
|
+
/* 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");
|
|
10613
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_10__);
|
|
10614
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
|
|
10615
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
|
|
10616
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10753
10617
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
10754
|
-
/* harmony import */ var
|
|
10755
|
-
/* harmony import */ var
|
|
10756
|
-
|
|
10618
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
10619
|
+
/* harmony import */ var _immutable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./immutable */ "../../victory-core/es/victory-util/immutable.js");
|
|
10757
10620
|
|
|
10758
10621
|
|
|
10759
10622
|
|
|
@@ -10790,24 +10653,22 @@ function parseDatum(datum) {
|
|
|
10790
10653
|
errorX: true,
|
|
10791
10654
|
errorY: true
|
|
10792
10655
|
};
|
|
10793
|
-
return
|
|
10656
|
+
return _immutable__WEBPACK_IMPORTED_MODULE_12__.isImmutable(datum) ? _immutable__WEBPACK_IMPORTED_MODULE_12__.shallowToJS(datum, immutableDatumWhitelist) : datum;
|
|
10794
10657
|
}
|
|
10795
10658
|
|
|
10796
10659
|
function getLength(data) {
|
|
10797
|
-
return
|
|
10660
|
+
return _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(data) ? data.size : data.length;
|
|
10798
10661
|
} // Returns generated data for a given axis based on domain and sample from props
|
|
10799
10662
|
|
|
10800
10663
|
|
|
10801
10664
|
function generateDataArray(props, axis) {
|
|
10802
10665
|
var propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_7___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
10803
|
-
var domain = propsDomain ||
|
|
10666
|
+
var domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_13__.getBaseScale(props, axis).domain();
|
|
10804
10667
|
var samples = props.samples || 1;
|
|
10805
10668
|
var domainMax = Math.max.apply(Math, _toConsumableArray(domain));
|
|
10806
10669
|
var domainMin = Math.min.apply(Math, _toConsumableArray(domain));
|
|
10807
10670
|
var step = (domainMax - domainMin) / samples;
|
|
10808
|
-
|
|
10809
|
-
var values = lodash_range__WEBPACK_IMPORTED_MODULE_10___default()(domainMin, domainMax, step);
|
|
10810
|
-
|
|
10671
|
+
var values = _helpers__WEBPACK_IMPORTED_MODULE_14__.range(domainMin, domainMax, step);
|
|
10811
10672
|
return lodash_last__WEBPACK_IMPORTED_MODULE_9___default()(values) === domainMax ? values : values.concat(domainMax);
|
|
10812
10673
|
} // Returns sorted data. If no sort keys are provided, data is returned unaltered.
|
|
10813
10674
|
|
|
@@ -10834,8 +10695,8 @@ function sortData(dataset, sortKey) {
|
|
|
10834
10695
|
function cleanData(dataset, props) {
|
|
10835
10696
|
var smallNumber = 1 / Number.MAX_SAFE_INTEGER;
|
|
10836
10697
|
var scaleType = {
|
|
10837
|
-
x:
|
|
10838
|
-
y:
|
|
10698
|
+
x: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "x"),
|
|
10699
|
+
y: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "y")
|
|
10839
10700
|
};
|
|
10840
10701
|
|
|
10841
10702
|
if (scaleType.x !== "log" && scaleType.y !== "log") {
|
|
@@ -10970,7 +10831,7 @@ function createStringMap(props, axis) {
|
|
|
10970
10831
|
var stringsFromCategories = getStringsFromCategories(props, axis);
|
|
10971
10832
|
var stringsFromData = getStringsFromData(props, axis);
|
|
10972
10833
|
|
|
10973
|
-
var allStrings =
|
|
10834
|
+
var allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default()([].concat(_toConsumableArray(stringsFromAxes), _toConsumableArray(stringsFromCategories), _toConsumableArray(stringsFromData)));
|
|
10974
10835
|
|
|
10975
10836
|
return allStrings.length === 0 ? null : allStrings.reduce(function (memo, string, index) {
|
|
10976
10837
|
memo[string] = index + 1;
|
|
@@ -11012,7 +10873,7 @@ function downsample(data, maxPoints) {
|
|
|
11012
10873
|
*/
|
|
11013
10874
|
|
|
11014
10875
|
function formatData(dataset, props, expectedKeys) {
|
|
11015
|
-
var isArrayOrIterable = Array.isArray(dataset) ||
|
|
10876
|
+
var isArrayOrIterable = Array.isArray(dataset) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(dataset);
|
|
11016
10877
|
|
|
11017
10878
|
if (!isArrayOrIterable || getLength(dataset) < 1) {
|
|
11018
10879
|
return [];
|
|
@@ -11025,7 +10886,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
11025
10886
|
expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
|
|
11026
10887
|
|
|
11027
10888
|
var createAccessor = function (name) {
|
|
11028
|
-
return
|
|
10889
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(props[name] !== undefined ? props[name] : name);
|
|
11029
10890
|
};
|
|
11030
10891
|
|
|
11031
10892
|
var accessor = expectedKeys.reduce(function (memo, type) {
|
|
@@ -11162,14 +11023,14 @@ function getStringsFromCategories(props, axis) {
|
|
|
11162
11023
|
*/
|
|
11163
11024
|
|
|
11164
11025
|
function getStringsFromData(props, axis) {
|
|
11165
|
-
var isArrayOrIterable = Array.isArray(props.data) ||
|
|
11026
|
+
var isArrayOrIterable = Array.isArray(props.data) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(props.data);
|
|
11166
11027
|
|
|
11167
11028
|
if (!isArrayOrIterable) {
|
|
11168
11029
|
return [];
|
|
11169
11030
|
}
|
|
11170
11031
|
|
|
11171
11032
|
var key = props[axis] === undefined ? axis : props[axis];
|
|
11172
|
-
var accessor =
|
|
11033
|
+
var accessor = _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(key); // support immutable data
|
|
11173
11034
|
|
|
11174
11035
|
var data = props.data.reduce(function (memo, d) {
|
|
11175
11036
|
memo.push(parseDatum(d));
|
|
@@ -11206,7 +11067,7 @@ function isDataComponent(component) {
|
|
|
11206
11067
|
var role = getRole(component);
|
|
11207
11068
|
|
|
11208
11069
|
if (role === "portal") {
|
|
11209
|
-
var children =
|
|
11070
|
+
var children = react__WEBPACK_IMPORTED_MODULE_11___default().Children.toArray(component.props.children);
|
|
11210
11071
|
role = children.length ? getRole(children[0]) : "";
|
|
11211
11072
|
}
|
|
11212
11073
|
|
|
@@ -12318,6 +12179,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12318
12179
|
/* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
|
|
12319
12180
|
/* harmony export */ "omit": () => (/* binding */ omit),
|
|
12320
12181
|
/* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
|
|
12182
|
+
/* harmony export */ "range": () => (/* binding */ range),
|
|
12321
12183
|
/* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
|
|
12322
12184
|
/* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
|
|
12323
12185
|
/* harmony export */ });
|
|
@@ -12597,6 +12459,38 @@ function getCurrentAxis(axis, horizontal) {
|
|
|
12597
12459
|
var otherAxis = axis === "x" ? "y" : "x";
|
|
12598
12460
|
return horizontal ? otherAxis : axis;
|
|
12599
12461
|
}
|
|
12462
|
+
/**
|
|
12463
|
+
* Creates an array of numbers (positive and/or negative) progressing
|
|
12464
|
+
* from start up to, but not including, end.
|
|
12465
|
+
* A step of -1 is used if a negative start is specified without an end or step.
|
|
12466
|
+
* If end is not specified, it's set to start with start then set to 0.
|
|
12467
|
+
*
|
|
12468
|
+
* @param start The length of the array to create, or the start value
|
|
12469
|
+
* @param end [The end value] If this is defined, start is the start value
|
|
12470
|
+
* @returns An array of the given length
|
|
12471
|
+
*/
|
|
12472
|
+
|
|
12473
|
+
function range(start, end, increment) {
|
|
12474
|
+
// when the end index is not given, start from 0
|
|
12475
|
+
var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
|
|
12476
|
+
|
|
12477
|
+
var endIndex = end ? end : start; // ensure endIndex is not a falsy value
|
|
12478
|
+
|
|
12479
|
+
if (!endIndex) endIndex = 0;
|
|
12480
|
+
var k = endIndex - startIndex; // the value range
|
|
12481
|
+
|
|
12482
|
+
var length = Math.abs(k); // the length of the range
|
|
12483
|
+
|
|
12484
|
+
var sign = k / length || 1; // the sign of the range (negative or positive)
|
|
12485
|
+
|
|
12486
|
+
var inc = increment || 1; // the step size of each increment
|
|
12487
|
+
// normalize the array length when dealing with floating point values
|
|
12488
|
+
|
|
12489
|
+
var arrayLength = Math.max(Math.ceil(length / inc), 0);
|
|
12490
|
+
return Array.from(Array(arrayLength), function (_, i) {
|
|
12491
|
+
return startIndex + i * sign * inc;
|
|
12492
|
+
});
|
|
12493
|
+
}
|
|
12600
12494
|
/**
|
|
12601
12495
|
* @param {Array} children: an array of child components
|
|
12602
12496
|
* @param {Function} iteratee: a function with arguments "child", "childName", and "parent"
|