victory-area 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 -7
- package/dist/victory-area.js +52 -158
- package/dist/victory-area.min.js +1 -1
- package/es/area.d.ts +12 -12
- package/es/helper-methods.d.ts +2 -2
- package/es/index.d.ts +2 -2
- package/es/victory-area.d.ts +142 -142
- package/lib/area.d.ts +12 -12
- package/lib/helper-methods.d.ts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/victory-area.d.ts +142 -142
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
# victory-area
|
|
2
2
|
|
|
3
|
-
## 36.8.
|
|
3
|
+
## 36.8.6
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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))
|
|
13
16
|
|
|
14
17
|
## 36.8.4
|
|
15
18
|
|
package/dist/victory-area.js
CHANGED
|
@@ -1818,44 +1818,6 @@ function basePropertyDeep(path) {
|
|
|
1818
1818
|
module.exports = basePropertyDeep;
|
|
1819
1819
|
|
|
1820
1820
|
|
|
1821
|
-
/***/ }),
|
|
1822
|
-
|
|
1823
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js":
|
|
1824
|
-
/*!************************************************************************************!*\
|
|
1825
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js ***!
|
|
1826
|
-
\************************************************************************************/
|
|
1827
|
-
/***/ ((module) => {
|
|
1828
|
-
|
|
1829
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1830
|
-
var nativeCeil = Math.ceil,
|
|
1831
|
-
nativeMax = Math.max;
|
|
1832
|
-
|
|
1833
|
-
/**
|
|
1834
|
-
* The base implementation of `_.range` and `_.rangeRight` which doesn't
|
|
1835
|
-
* coerce arguments.
|
|
1836
|
-
*
|
|
1837
|
-
* @private
|
|
1838
|
-
* @param {number} start The start of the range.
|
|
1839
|
-
* @param {number} end The end of the range.
|
|
1840
|
-
* @param {number} step The value to increment or decrement by.
|
|
1841
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
1842
|
-
* @returns {Array} Returns the range of numbers.
|
|
1843
|
-
*/
|
|
1844
|
-
function baseRange(start, end, step, fromRight) {
|
|
1845
|
-
var index = -1,
|
|
1846
|
-
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
|
|
1847
|
-
result = Array(length);
|
|
1848
|
-
|
|
1849
|
-
while (length--) {
|
|
1850
|
-
result[fromRight ? length : ++index] = start;
|
|
1851
|
-
start += step;
|
|
1852
|
-
}
|
|
1853
|
-
return result;
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
module.exports = baseRange;
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
1821
|
/***/ }),
|
|
1860
1822
|
|
|
1861
1823
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js":
|
|
@@ -2395,46 +2357,6 @@ function createFind(findIndexFunc) {
|
|
|
2395
2357
|
module.exports = createFind;
|
|
2396
2358
|
|
|
2397
2359
|
|
|
2398
|
-
/***/ }),
|
|
2399
|
-
|
|
2400
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js":
|
|
2401
|
-
/*!**************************************************************************************!*\
|
|
2402
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js ***!
|
|
2403
|
-
\**************************************************************************************/
|
|
2404
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
2405
|
-
|
|
2406
|
-
var baseRange = __webpack_require__(/*! ./_baseRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js"),
|
|
2407
|
-
isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js"),
|
|
2408
|
-
toFinite = __webpack_require__(/*! ./toFinite */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js");
|
|
2409
|
-
|
|
2410
|
-
/**
|
|
2411
|
-
* Creates a `_.range` or `_.rangeRight` function.
|
|
2412
|
-
*
|
|
2413
|
-
* @private
|
|
2414
|
-
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
2415
|
-
* @returns {Function} Returns the new range function.
|
|
2416
|
-
*/
|
|
2417
|
-
function createRange(fromRight) {
|
|
2418
|
-
return function(start, end, step) {
|
|
2419
|
-
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
|
|
2420
|
-
end = step = undefined;
|
|
2421
|
-
}
|
|
2422
|
-
// Ensure the sign of `-0` is preserved.
|
|
2423
|
-
start = toFinite(start);
|
|
2424
|
-
if (end === undefined) {
|
|
2425
|
-
end = start;
|
|
2426
|
-
start = 0;
|
|
2427
|
-
} else {
|
|
2428
|
-
end = toFinite(end);
|
|
2429
|
-
}
|
|
2430
|
-
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
|
|
2431
|
-
return baseRange(start, end, step, fromRight);
|
|
2432
|
-
};
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
module.exports = createRange;
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
2360
|
/***/ }),
|
|
2439
2361
|
|
|
2440
2362
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createSet.js":
|
|
@@ -5299,62 +5221,6 @@ function property(path) {
|
|
|
5299
5221
|
module.exports = property;
|
|
5300
5222
|
|
|
5301
5223
|
|
|
5302
|
-
/***/ }),
|
|
5303
|
-
|
|
5304
|
-
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js":
|
|
5305
|
-
/*!*******************************************************************************!*\
|
|
5306
|
-
!*** ../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js ***!
|
|
5307
|
-
\*******************************************************************************/
|
|
5308
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
5309
|
-
|
|
5310
|
-
var createRange = __webpack_require__(/*! ./_createRange */ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js");
|
|
5311
|
-
|
|
5312
|
-
/**
|
|
5313
|
-
* Creates an array of numbers (positive and/or negative) progressing from
|
|
5314
|
-
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
|
|
5315
|
-
* `start` is specified without an `end` or `step`. If `end` is not specified,
|
|
5316
|
-
* it's set to `start` with `start` then set to `0`.
|
|
5317
|
-
*
|
|
5318
|
-
* **Note:** JavaScript follows the IEEE-754 standard for resolving
|
|
5319
|
-
* floating-point values which can produce unexpected results.
|
|
5320
|
-
*
|
|
5321
|
-
* @static
|
|
5322
|
-
* @since 0.1.0
|
|
5323
|
-
* @memberOf _
|
|
5324
|
-
* @category Util
|
|
5325
|
-
* @param {number} [start=0] The start of the range.
|
|
5326
|
-
* @param {number} end The end of the range.
|
|
5327
|
-
* @param {number} [step=1] The value to increment or decrement by.
|
|
5328
|
-
* @returns {Array} Returns the range of numbers.
|
|
5329
|
-
* @see _.inRange, _.rangeRight
|
|
5330
|
-
* @example
|
|
5331
|
-
*
|
|
5332
|
-
* _.range(4);
|
|
5333
|
-
* // => [0, 1, 2, 3]
|
|
5334
|
-
*
|
|
5335
|
-
* _.range(-4);
|
|
5336
|
-
* // => [0, -1, -2, -3]
|
|
5337
|
-
*
|
|
5338
|
-
* _.range(1, 5);
|
|
5339
|
-
* // => [1, 2, 3, 4]
|
|
5340
|
-
*
|
|
5341
|
-
* _.range(0, 20, 5);
|
|
5342
|
-
* // => [0, 5, 10, 15]
|
|
5343
|
-
*
|
|
5344
|
-
* _.range(0, -4, -1);
|
|
5345
|
-
* // => [0, -1, -2, -3]
|
|
5346
|
-
*
|
|
5347
|
-
* _.range(1, 4, 0);
|
|
5348
|
-
* // => [1, 1, 1]
|
|
5349
|
-
*
|
|
5350
|
-
* _.range(0);
|
|
5351
|
-
* // => []
|
|
5352
|
-
*/
|
|
5353
|
-
var range = createRange();
|
|
5354
|
-
|
|
5355
|
-
module.exports = range;
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
5224
|
/***/ }),
|
|
5359
5225
|
|
|
5360
5226
|
/***/ "../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/sortedUniq.js":
|
|
@@ -10875,17 +10741,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10875
10741
|
/* harmony import */ var lodash_isFunction__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(lodash_isFunction__WEBPACK_IMPORTED_MODULE_8__);
|
|
10876
10742
|
/* 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");
|
|
10877
10743
|
/* harmony import */ var lodash_last__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_last__WEBPACK_IMPORTED_MODULE_9__);
|
|
10878
|
-
/* harmony import */ var
|
|
10879
|
-
/* harmony import */ var
|
|
10880
|
-
/* harmony import */ var
|
|
10881
|
-
/* harmony import */ var
|
|
10882
|
-
/* harmony import */ var
|
|
10883
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_12__);
|
|
10884
|
-
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10744
|
+
/* 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");
|
|
10745
|
+
/* harmony import */ var lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(lodash_uniq__WEBPACK_IMPORTED_MODULE_10__);
|
|
10746
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react */ "react");
|
|
10747
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_11__);
|
|
10748
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
10885
10749
|
/* harmony import */ var _collection__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./collection */ "../../victory-core/es/victory-util/collection.js");
|
|
10886
|
-
/* harmony import */ var
|
|
10887
|
-
/* harmony import */ var
|
|
10888
|
-
|
|
10750
|
+
/* harmony import */ var _scale__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./scale */ "../../victory-core/es/victory-util/scale.js");
|
|
10751
|
+
/* harmony import */ var _immutable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./immutable */ "../../victory-core/es/victory-util/immutable.js");
|
|
10889
10752
|
|
|
10890
10753
|
|
|
10891
10754
|
|
|
@@ -10922,24 +10785,22 @@ function parseDatum(datum) {
|
|
|
10922
10785
|
errorX: true,
|
|
10923
10786
|
errorY: true
|
|
10924
10787
|
};
|
|
10925
|
-
return
|
|
10788
|
+
return _immutable__WEBPACK_IMPORTED_MODULE_12__.isImmutable(datum) ? _immutable__WEBPACK_IMPORTED_MODULE_12__.shallowToJS(datum, immutableDatumWhitelist) : datum;
|
|
10926
10789
|
}
|
|
10927
10790
|
|
|
10928
10791
|
function getLength(data) {
|
|
10929
|
-
return
|
|
10792
|
+
return _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(data) ? data.size : data.length;
|
|
10930
10793
|
} // Returns generated data for a given axis based on domain and sample from props
|
|
10931
10794
|
|
|
10932
10795
|
|
|
10933
10796
|
function generateDataArray(props, axis) {
|
|
10934
10797
|
var propsDomain = lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_7___default()(props.domain) ? props.domain[axis] : props.domain;
|
|
10935
|
-
var domain = propsDomain ||
|
|
10798
|
+
var domain = propsDomain || _scale__WEBPACK_IMPORTED_MODULE_13__.getBaseScale(props, axis).domain();
|
|
10936
10799
|
var samples = props.samples || 1;
|
|
10937
10800
|
var domainMax = Math.max.apply(Math, _toConsumableArray(domain));
|
|
10938
10801
|
var domainMin = Math.min.apply(Math, _toConsumableArray(domain));
|
|
10939
10802
|
var step = (domainMax - domainMin) / samples;
|
|
10940
|
-
|
|
10941
|
-
var values = lodash_range__WEBPACK_IMPORTED_MODULE_10___default()(domainMin, domainMax, step);
|
|
10942
|
-
|
|
10803
|
+
var values = _helpers__WEBPACK_IMPORTED_MODULE_14__.range(domainMin, domainMax, step);
|
|
10943
10804
|
return lodash_last__WEBPACK_IMPORTED_MODULE_9___default()(values) === domainMax ? values : values.concat(domainMax);
|
|
10944
10805
|
} // Returns sorted data. If no sort keys are provided, data is returned unaltered.
|
|
10945
10806
|
|
|
@@ -10966,8 +10827,8 @@ function sortData(dataset, sortKey) {
|
|
|
10966
10827
|
function cleanData(dataset, props) {
|
|
10967
10828
|
var smallNumber = 1 / Number.MAX_SAFE_INTEGER;
|
|
10968
10829
|
var scaleType = {
|
|
10969
|
-
x:
|
|
10970
|
-
y:
|
|
10830
|
+
x: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "x"),
|
|
10831
|
+
y: _scale__WEBPACK_IMPORTED_MODULE_13__.getScaleType(props, "y")
|
|
10971
10832
|
};
|
|
10972
10833
|
|
|
10973
10834
|
if (scaleType.x !== "log" && scaleType.y !== "log") {
|
|
@@ -11102,7 +10963,7 @@ function createStringMap(props, axis) {
|
|
|
11102
10963
|
var stringsFromCategories = getStringsFromCategories(props, axis);
|
|
11103
10964
|
var stringsFromData = getStringsFromData(props, axis);
|
|
11104
10965
|
|
|
11105
|
-
var allStrings =
|
|
10966
|
+
var allStrings = lodash_uniq__WEBPACK_IMPORTED_MODULE_10___default()([].concat(_toConsumableArray(stringsFromAxes), _toConsumableArray(stringsFromCategories), _toConsumableArray(stringsFromData)));
|
|
11106
10967
|
|
|
11107
10968
|
return allStrings.length === 0 ? null : allStrings.reduce(function (memo, string, index) {
|
|
11108
10969
|
memo[string] = index + 1;
|
|
@@ -11144,7 +11005,7 @@ function downsample(data, maxPoints) {
|
|
|
11144
11005
|
*/
|
|
11145
11006
|
|
|
11146
11007
|
function formatData(dataset, props, expectedKeys) {
|
|
11147
|
-
var isArrayOrIterable = Array.isArray(dataset) ||
|
|
11008
|
+
var isArrayOrIterable = Array.isArray(dataset) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(dataset);
|
|
11148
11009
|
|
|
11149
11010
|
if (!isArrayOrIterable || getLength(dataset) < 1) {
|
|
11150
11011
|
return [];
|
|
@@ -11157,7 +11018,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
11157
11018
|
expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
|
|
11158
11019
|
|
|
11159
11020
|
var createAccessor = function (name) {
|
|
11160
|
-
return
|
|
11021
|
+
return _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(props[name] !== undefined ? props[name] : name);
|
|
11161
11022
|
};
|
|
11162
11023
|
|
|
11163
11024
|
var accessor = expectedKeys.reduce(function (memo, type) {
|
|
@@ -11294,14 +11155,14 @@ function getStringsFromCategories(props, axis) {
|
|
|
11294
11155
|
*/
|
|
11295
11156
|
|
|
11296
11157
|
function getStringsFromData(props, axis) {
|
|
11297
|
-
var isArrayOrIterable = Array.isArray(props.data) ||
|
|
11158
|
+
var isArrayOrIterable = Array.isArray(props.data) || _immutable__WEBPACK_IMPORTED_MODULE_12__.isIterable(props.data);
|
|
11298
11159
|
|
|
11299
11160
|
if (!isArrayOrIterable) {
|
|
11300
11161
|
return [];
|
|
11301
11162
|
}
|
|
11302
11163
|
|
|
11303
11164
|
var key = props[axis] === undefined ? axis : props[axis];
|
|
11304
|
-
var accessor =
|
|
11165
|
+
var accessor = _helpers__WEBPACK_IMPORTED_MODULE_14__.createAccessor(key); // support immutable data
|
|
11305
11166
|
|
|
11306
11167
|
var data = props.data.reduce(function (memo, d) {
|
|
11307
11168
|
memo.push(parseDatum(d));
|
|
@@ -11338,7 +11199,7 @@ function isDataComponent(component) {
|
|
|
11338
11199
|
var role = getRole(component);
|
|
11339
11200
|
|
|
11340
11201
|
if (role === "portal") {
|
|
11341
|
-
var children =
|
|
11202
|
+
var children = react__WEBPACK_IMPORTED_MODULE_11___default().Children.toArray(component.props.children);
|
|
11342
11203
|
role = children.length ? getRole(children[0]) : "";
|
|
11343
11204
|
}
|
|
11344
11205
|
|
|
@@ -12450,6 +12311,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12450
12311
|
/* harmony export */ "modifyProps": () => (/* binding */ modifyProps),
|
|
12451
12312
|
/* harmony export */ "omit": () => (/* binding */ omit),
|
|
12452
12313
|
/* harmony export */ "radiansToDegrees": () => (/* binding */ radiansToDegrees),
|
|
12314
|
+
/* harmony export */ "range": () => (/* binding */ range),
|
|
12453
12315
|
/* harmony export */ "reduceChildren": () => (/* binding */ reduceChildren),
|
|
12454
12316
|
/* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
|
|
12455
12317
|
/* harmony export */ });
|
|
@@ -12729,6 +12591,38 @@ function getCurrentAxis(axis, horizontal) {
|
|
|
12729
12591
|
var otherAxis = axis === "x" ? "y" : "x";
|
|
12730
12592
|
return horizontal ? otherAxis : axis;
|
|
12731
12593
|
}
|
|
12594
|
+
/**
|
|
12595
|
+
* Creates an array of numbers (positive and/or negative) progressing
|
|
12596
|
+
* from start up to, but not including, end.
|
|
12597
|
+
* A step of -1 is used if a negative start is specified without an end or step.
|
|
12598
|
+
* If end is not specified, it's set to start with start then set to 0.
|
|
12599
|
+
*
|
|
12600
|
+
* @param start The length of the array to create, or the start value
|
|
12601
|
+
* @param end [The end value] If this is defined, start is the start value
|
|
12602
|
+
* @returns An array of the given length
|
|
12603
|
+
*/
|
|
12604
|
+
|
|
12605
|
+
function range(start, end, increment) {
|
|
12606
|
+
// when the end index is not given, start from 0
|
|
12607
|
+
var startIndex = end ? start : 0; // when the end index is not given, the end of the range is the start index
|
|
12608
|
+
|
|
12609
|
+
var endIndex = end ? end : start; // ensure endIndex is not a falsy value
|
|
12610
|
+
|
|
12611
|
+
if (!endIndex) endIndex = 0;
|
|
12612
|
+
var k = endIndex - startIndex; // the value range
|
|
12613
|
+
|
|
12614
|
+
var length = Math.abs(k); // the length of the range
|
|
12615
|
+
|
|
12616
|
+
var sign = k / length || 1; // the sign of the range (negative or positive)
|
|
12617
|
+
|
|
12618
|
+
var inc = increment || 1; // the step size of each increment
|
|
12619
|
+
// normalize the array length when dealing with floating point values
|
|
12620
|
+
|
|
12621
|
+
var arrayLength = Math.max(Math.ceil(length / inc), 0);
|
|
12622
|
+
return Array.from(Array(arrayLength), function (_, i) {
|
|
12623
|
+
return startIndex + i * sign * inc;
|
|
12624
|
+
});
|
|
12625
|
+
}
|
|
12732
12626
|
/**
|
|
12733
12627
|
* @param {Array} children: an array of child components
|
|
12734
12628
|
* @param {Function} iteratee: a function with arguments "child", "childName", and "parent"
|