victory-area 36.8.2 → 36.8.4
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 +4 -0
- package/dist/victory-area.js +179 -155
- package/dist/victory-area.min.js +1 -1
- package/es/area.js +17 -18
- package/es/helper-methods.d.ts +1 -1
- package/es/helper-methods.js +24 -23
- package/es/victory-area.d.ts +4 -3
- package/lib/area.js +17 -18
- package/lib/helper-methods.d.ts +1 -1
- package/lib/helper-methods.js +23 -24
- package/lib/victory-area.d.ts +4 -3
- package/package.json +3 -3
- package/src/area.tsx +2 -2
- package/src/helper-methods.tsx +7 -3
package/dist/victory-area.js
CHANGED
|
@@ -127,24 +127,23 @@ var defaultProps = {
|
|
|
127
127
|
* The area primitive used by VictoryArea
|
|
128
128
|
*/
|
|
129
129
|
|
|
130
|
-
var Area = function (
|
|
131
|
-
props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps),
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
tabIndex = _props.tabIndex;
|
|
130
|
+
var Area = function (initialProps) {
|
|
131
|
+
var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
|
|
132
|
+
var ariaLabel = props.ariaLabel,
|
|
133
|
+
role = props.role,
|
|
134
|
+
shapeRendering = props.shapeRendering,
|
|
135
|
+
className = props.className,
|
|
136
|
+
polar = props.polar,
|
|
137
|
+
origin = props.origin,
|
|
138
|
+
data = props.data,
|
|
139
|
+
pathComponent = props.pathComponent,
|
|
140
|
+
events = props.events,
|
|
141
|
+
groupComponent = props.groupComponent,
|
|
142
|
+
clipPath = props.clipPath,
|
|
143
|
+
id = props.id,
|
|
144
|
+
style = props.style,
|
|
145
|
+
desc = props.desc,
|
|
146
|
+
tabIndex = props.tabIndex;
|
|
148
147
|
var userProps = victory_core__WEBPACK_IMPORTED_MODULE_6__.getSafeUserProps(props);
|
|
149
148
|
var defaultTransform = polar && origin ? "translate(".concat(origin.x, ", ").concat(origin.y, ")") : undefined;
|
|
150
149
|
var transform = props.transform || defaultTransform;
|
|
@@ -283,29 +282,30 @@ var getCalculatedValues = function (props) {
|
|
|
283
282
|
};
|
|
284
283
|
};
|
|
285
284
|
|
|
286
|
-
var getBaseProps = function (
|
|
287
|
-
var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_5__.modifyProps(
|
|
288
|
-
|
|
289
|
-
var
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
285
|
+
var getBaseProps = function (initialProps, fallbackProps) {
|
|
286
|
+
var modifiedProps = victory_core__WEBPACK_IMPORTED_MODULE_5__.modifyProps(initialProps, fallbackProps, "area");
|
|
287
|
+
|
|
288
|
+
var props = lodash_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
289
|
+
|
|
290
|
+
var data = props.data,
|
|
291
|
+
domain = props.domain,
|
|
292
|
+
events = props.events,
|
|
293
|
+
groupComponent = props.groupComponent,
|
|
294
|
+
height = props.height,
|
|
295
|
+
horizontal = props.horizontal,
|
|
296
|
+
interpolation = props.interpolation,
|
|
297
|
+
origin = props.origin,
|
|
298
|
+
padding = props.padding,
|
|
299
|
+
polar = props.polar,
|
|
300
|
+
scale = props.scale,
|
|
301
|
+
sharedEvents = props.sharedEvents,
|
|
302
|
+
standalone = props.standalone,
|
|
303
|
+
style = props.style,
|
|
304
|
+
theme = props.theme,
|
|
305
|
+
width = props.width,
|
|
306
|
+
labels = props.labels,
|
|
307
|
+
name = props.name,
|
|
308
|
+
disableInlineStyles = props.disableInlineStyles;
|
|
309
309
|
var initialChildProps = {
|
|
310
310
|
parent: {
|
|
311
311
|
style: style.parent,
|
|
@@ -7259,12 +7259,12 @@ var interpolateFunction = function (a, b) {
|
|
|
7259
7259
|
* differs in that it uses our custom interpolators when interpolating the value of each property in
|
|
7260
7260
|
* an object. This allows the correct interpolation of nested objects, including styles
|
|
7261
7261
|
*
|
|
7262
|
-
* @param {any}
|
|
7263
|
-
* @param {any}
|
|
7262
|
+
* @param {any} startValue - Start value.
|
|
7263
|
+
* @param {any} endValue - End value.
|
|
7264
7264
|
* @returns {Function} An interpolation function.
|
|
7265
7265
|
*/
|
|
7266
7266
|
|
|
7267
|
-
var interpolateObject = function (
|
|
7267
|
+
var interpolateObject = function (startValue, endValue) {
|
|
7268
7268
|
var interpolateTypes = function (x, y) {
|
|
7269
7269
|
if (x === y || !isInterpolatable(x) || !isInterpolatable(y)) {
|
|
7270
7270
|
return interpolateImmediate(x, y);
|
|
@@ -7289,6 +7289,8 @@ var interpolateObject = function (a, b) {
|
|
|
7289
7289
|
|
|
7290
7290
|
var i = {};
|
|
7291
7291
|
var c = {};
|
|
7292
|
+
var a = startValue;
|
|
7293
|
+
var b = endValue;
|
|
7292
7294
|
var k;
|
|
7293
7295
|
|
|
7294
7296
|
if (a === null || typeof a !== "object") {
|
|
@@ -7456,8 +7458,8 @@ var VictoryAnimation = /*#__PURE__*/function (_React$Component) {
|
|
|
7456
7458
|
step can generate imprecise values, sometimes greater than 1
|
|
7457
7459
|
if this happens set the state to 1 and return, cancelling the timer
|
|
7458
7460
|
*/
|
|
7459
|
-
|
|
7460
|
-
var step =
|
|
7461
|
+
var animationDuration = duration !== undefined ? duration : _this.props.duration;
|
|
7462
|
+
var step = animationDuration ? elapsed / animationDuration : 1;
|
|
7461
7463
|
|
|
7462
7464
|
if (step >= 1) {
|
|
7463
7465
|
_this.setState({
|
|
@@ -8383,8 +8385,7 @@ var getStyles = function (style, props) {
|
|
|
8383
8385
|
}
|
|
8384
8386
|
|
|
8385
8387
|
var getSingleStyle = function (s) {
|
|
8386
|
-
|
|
8387
|
-
var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s, props);
|
|
8388
|
+
var baseStyles = _victory_util_helpers__WEBPACK_IMPORTED_MODULE_4__.evaluateStyle(s ? lodash_defaults__WEBPACK_IMPORTED_MODULE_1___default()({}, s, defaultStyles) : defaultStyles, props);
|
|
8388
8389
|
return lodash_assign__WEBPACK_IMPORTED_MODULE_2___default()({}, baseStyles, {
|
|
8389
8390
|
fontSize: getFontSize(baseStyles)
|
|
8390
8391
|
});
|
|
@@ -8588,22 +8589,19 @@ var getInlineXOffset = function (calculatedProps, textElements, index) {
|
|
|
8588
8589
|
switch (textAnchor) {
|
|
8589
8590
|
case "start":
|
|
8590
8591
|
return widths.reduce(function (memo, width, i) {
|
|
8591
|
-
|
|
8592
|
-
return memo;
|
|
8592
|
+
return i < index ? memo + width : memo;
|
|
8593
8593
|
}, 0);
|
|
8594
8594
|
|
|
8595
8595
|
case "end":
|
|
8596
8596
|
return widths.reduce(function (memo, width, i) {
|
|
8597
|
-
|
|
8598
|
-
return memo;
|
|
8597
|
+
return i > index ? memo - width : memo;
|
|
8599
8598
|
}, 0);
|
|
8600
8599
|
|
|
8601
8600
|
default:
|
|
8602
8601
|
// middle
|
|
8603
8602
|
return widths.reduce(function (memo, width, i) {
|
|
8604
8603
|
var offsetWidth = i < index ? width : 0;
|
|
8605
|
-
|
|
8606
|
-
return memo;
|
|
8604
|
+
return i === index ? memo + width / 2 : memo + offsetWidth;
|
|
8607
8605
|
}, centerOffset);
|
|
8608
8606
|
}
|
|
8609
8607
|
};
|
|
@@ -8805,8 +8803,8 @@ var defaultProps = {
|
|
|
8805
8803
|
// Magic number from d3.
|
|
8806
8804
|
lineHeight: 1
|
|
8807
8805
|
};
|
|
8808
|
-
var VictoryLabel = function (
|
|
8809
|
-
props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps),
|
|
8806
|
+
var VictoryLabel = function (initialProps) {
|
|
8807
|
+
var props = evaluateProps(_objectSpread(_objectSpread({}, defaultProps), initialProps));
|
|
8810
8808
|
|
|
8811
8809
|
if (props.text === null || props.text === undefined) {
|
|
8812
8810
|
return null;
|
|
@@ -8827,7 +8825,7 @@ var VictoryLabel = function (props) {
|
|
|
8827
8825
|
fontSize: currentStyle.fontSize || defaultStyles.fontSize,
|
|
8828
8826
|
capHeight: capHeightPx,
|
|
8829
8827
|
text: line,
|
|
8830
|
-
//
|
|
8828
|
+
// TODO: This looks like a bug:
|
|
8831
8829
|
textSize: _victory_util_textsize__WEBPACK_IMPORTED_MODULE_12__.approximateTextSize(line, currentStyle),
|
|
8832
8830
|
lineHeight: currentLineHeight,
|
|
8833
8831
|
backgroundPadding: getSingleValue(backgroundPadding, i)
|
|
@@ -10600,8 +10598,7 @@ function addEvents(WrappedComponent) {
|
|
|
10600
10598
|
value: function applyExternalMutations(props, externalMutations) {
|
|
10601
10599
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_5___default()(externalMutations)) {
|
|
10602
10600
|
var callbacks = props.externalEventMutations.reduce(function (memo, mutation) {
|
|
10603
|
-
|
|
10604
|
-
return memo;
|
|
10601
|
+
return lodash_isFunction__WEBPACK_IMPORTED_MODULE_4___default()(mutation.callback) ? memo.concat(mutation.callback) : memo;
|
|
10605
10602
|
}, []);
|
|
10606
10603
|
var compiledCallbacks = callbacks.length ? function () {
|
|
10607
10604
|
callbacks.forEach(function (c) {
|
|
@@ -10656,8 +10653,8 @@ function addEvents(WrappedComponent) {
|
|
|
10656
10653
|
}, {
|
|
10657
10654
|
key: "getBaseProps",
|
|
10658
10655
|
value: function getBaseProps(props, getSharedEventState) {
|
|
10659
|
-
|
|
10660
|
-
var sharedParentState =
|
|
10656
|
+
var getSharedEventStateFunction = getSharedEventState || this.getSharedEventState.bind(this);
|
|
10657
|
+
var sharedParentState = getSharedEventStateFunction("parent", "parent");
|
|
10661
10658
|
var parentState = this.getEventState("parent", "parent");
|
|
10662
10659
|
|
|
10663
10660
|
var baseParentProps = lodash_defaults__WEBPACK_IMPORTED_MODULE_7___default()({}, parentState, sharedParentState);
|
|
@@ -10756,13 +10753,15 @@ function addEvents(WrappedComponent) {
|
|
|
10756
10753
|
var dataKeys = lodash_without__WEBPACK_IMPORTED_MODULE_0___default()(this.dataKeys, "all");
|
|
10757
10754
|
|
|
10758
10755
|
var labelComponents = dataKeys.reduce(function (memo, key) {
|
|
10756
|
+
var newMemo = memo;
|
|
10757
|
+
|
|
10759
10758
|
var labelProps = _this8.getComponentProps(labelComponent, "labels", key);
|
|
10760
10759
|
|
|
10761
10760
|
if (labelProps && labelProps.text !== undefined && labelProps.text !== null) {
|
|
10762
|
-
|
|
10761
|
+
newMemo = newMemo.concat( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(labelComponent, labelProps));
|
|
10763
10762
|
}
|
|
10764
10763
|
|
|
10765
|
-
return
|
|
10764
|
+
return newMemo;
|
|
10766
10765
|
}, []);
|
|
10767
10766
|
var dataProps = this.getComponentProps(dataComponent, "data", "all");
|
|
10768
10767
|
var children = [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().cloneElement(dataComponent, dataProps)].concat(_toConsumableArray(labelComponents));
|
|
@@ -11161,12 +11160,14 @@ function sortData(dataset, sortKey) {
|
|
|
11161
11160
|
} // Ensures previous VictoryLine api for sortKey prop stays consistent
|
|
11162
11161
|
|
|
11163
11162
|
|
|
11163
|
+
var formattedSortKey = sortKey;
|
|
11164
|
+
|
|
11164
11165
|
if (sortKey === "x" || sortKey === "y") {
|
|
11165
|
-
|
|
11166
|
+
formattedSortKey = "_".concat(sortKey);
|
|
11166
11167
|
}
|
|
11167
11168
|
|
|
11168
11169
|
var order = sortOrder === "ascending" ? "asc" : "desc";
|
|
11169
|
-
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_5___default()(dataset,
|
|
11170
|
+
return lodash_orderBy__WEBPACK_IMPORTED_MODULE_5___default()(dataset, formattedSortKey, order);
|
|
11170
11171
|
} // This method will remove data points that break certain scales. (log scale only)
|
|
11171
11172
|
|
|
11172
11173
|
|
|
@@ -11357,7 +11358,10 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
11357
11358
|
return [];
|
|
11358
11359
|
}
|
|
11359
11360
|
|
|
11360
|
-
var defaultKeys = ["x", "y", "y0"];
|
|
11361
|
+
var defaultKeys = ["x", "y", "y0"]; // TODO: We shouldn’t mutate the expectedKeys param here,
|
|
11362
|
+
// but we need to figure out why changing it causes regressions in tests.
|
|
11363
|
+
// eslint-disable-next-line no-param-reassign
|
|
11364
|
+
|
|
11361
11365
|
expectedKeys = Array.isArray(expectedKeys) ? expectedKeys : defaultKeys;
|
|
11362
11366
|
|
|
11363
11367
|
var createAccessor = function (name) {
|
|
@@ -11382,13 +11386,13 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
11382
11386
|
|
|
11383
11387
|
var data = preformattedData ? dataset : dataset.reduce(function (dataArr, datum, index) {
|
|
11384
11388
|
// eslint-disable-line complexity
|
|
11385
|
-
|
|
11389
|
+
var parsedDatum = parseDatum(datum);
|
|
11386
11390
|
var fallbackValues = {
|
|
11387
11391
|
x: index,
|
|
11388
|
-
y:
|
|
11392
|
+
y: parsedDatum
|
|
11389
11393
|
};
|
|
11390
11394
|
var processedValues = expectedKeys.reduce(function (memo, type) {
|
|
11391
|
-
var processedValue = accessor[type](
|
|
11395
|
+
var processedValue = accessor[type](parsedDatum);
|
|
11392
11396
|
var value = processedValue !== undefined ? processedValue : fallbackValues[type];
|
|
11393
11397
|
|
|
11394
11398
|
if (value !== undefined) {
|
|
@@ -11403,7 +11407,7 @@ function formatData(dataset, props, expectedKeys) {
|
|
|
11403
11407
|
return memo;
|
|
11404
11408
|
}, {});
|
|
11405
11409
|
|
|
11406
|
-
var formattedDatum = lodash_assign__WEBPACK_IMPORTED_MODULE_12___default()({}, processedValues,
|
|
11410
|
+
var formattedDatum = lodash_assign__WEBPACK_IMPORTED_MODULE_12___default()({}, processedValues, parsedDatum);
|
|
11407
11411
|
|
|
11408
11412
|
if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(formattedDatum)) {
|
|
11409
11413
|
dataArr.push(formattedDatum);
|
|
@@ -11514,8 +11518,8 @@ function getStringsFromData(props, axis) {
|
|
|
11514
11518
|
}, []);
|
|
11515
11519
|
var sortedData = sortData(data, props.sortKey, props.sortOrder);
|
|
11516
11520
|
var dataStrings = sortedData.reduce(function (dataArr, datum) {
|
|
11517
|
-
|
|
11518
|
-
dataArr.push(accessor(
|
|
11521
|
+
var parsedDatum = parseDatum(datum);
|
|
11522
|
+
dataArr.push(accessor(parsedDatum));
|
|
11519
11523
|
return dataArr;
|
|
11520
11524
|
}, []).filter(function (datum) {
|
|
11521
11525
|
return typeof datum === "string";
|
|
@@ -11881,18 +11885,18 @@ function padDomain(domain, props, axis) {
|
|
|
11881
11885
|
|
|
11882
11886
|
|
|
11883
11887
|
function createDomainFunction(getDomainFromDataFunction, formatDomainFunction) {
|
|
11884
|
-
|
|
11885
|
-
|
|
11888
|
+
var getDomainFromDataFn = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(getDomainFromDataFunction) ? getDomainFromDataFunction : getDomainFromData;
|
|
11889
|
+
var formatDomainFn = lodash_isFunction__WEBPACK_IMPORTED_MODULE_2___default()(formatDomainFunction) ? formatDomainFunction : formatDomain;
|
|
11886
11890
|
return function (props, axis) {
|
|
11887
11891
|
var propsDomain = getDomainFromProps(props, axis);
|
|
11888
11892
|
|
|
11889
11893
|
if (propsDomain) {
|
|
11890
|
-
return
|
|
11894
|
+
return formatDomainFn(propsDomain, props, axis);
|
|
11891
11895
|
}
|
|
11892
11896
|
|
|
11893
11897
|
var categories = _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
|
|
11894
|
-
var domain = categories ? getDomainFromCategories(props, axis, categories) :
|
|
11895
|
-
return domain ?
|
|
11898
|
+
var domain = categories ? getDomainFromCategories(props, axis, categories) : getDomainFromDataFn(props, axis);
|
|
11899
|
+
return domain ? formatDomainFn(domain, props, axis) : undefined;
|
|
11896
11900
|
};
|
|
11897
11901
|
}
|
|
11898
11902
|
/**
|
|
@@ -11925,27 +11929,27 @@ function getDomain(props, axis) {
|
|
|
11925
11929
|
*/
|
|
11926
11930
|
|
|
11927
11931
|
function getDomainFromCategories(props, axis, categories) {
|
|
11928
|
-
|
|
11932
|
+
var categoriesArray = categories || _data__WEBPACK_IMPORTED_MODULE_10__.getCategories(props, axis);
|
|
11929
11933
|
var polar = props.polar,
|
|
11930
11934
|
_props$startAngle = props.startAngle,
|
|
11931
11935
|
startAngle = _props$startAngle === void 0 ? 0 : _props$startAngle,
|
|
11932
11936
|
_props$endAngle = props.endAngle,
|
|
11933
11937
|
endAngle = _props$endAngle === void 0 ? 360 : _props$endAngle;
|
|
11934
11938
|
|
|
11935
|
-
if (!
|
|
11939
|
+
if (!categoriesArray) {
|
|
11936
11940
|
return undefined;
|
|
11937
11941
|
}
|
|
11938
11942
|
|
|
11939
11943
|
var minDomain = getMinFromProps(props, axis);
|
|
11940
11944
|
var maxDomain = getMaxFromProps(props, axis);
|
|
11941
|
-
var stringArray = _collection__WEBPACK_IMPORTED_MODULE_8__.containsStrings(
|
|
11945
|
+
var stringArray = _collection__WEBPACK_IMPORTED_MODULE_8__.containsStrings(categoriesArray) ? _data__WEBPACK_IMPORTED_MODULE_10__.getStringsFromCategories(props, axis) : [];
|
|
11942
11946
|
var stringMap = stringArray.length === 0 ? null : stringArray.reduce(function (memo, string, index) {
|
|
11943
11947
|
memo[string] = index + 1;
|
|
11944
11948
|
return memo;
|
|
11945
11949
|
}, {});
|
|
11946
|
-
var categoryValues = stringMap ?
|
|
11950
|
+
var categoryValues = stringMap ? categoriesArray.map(function (value) {
|
|
11947
11951
|
return stringMap[value];
|
|
11948
|
-
}) :
|
|
11952
|
+
}) : categoriesArray;
|
|
11949
11953
|
var min = minDomain !== undefined ? minDomain : _collection__WEBPACK_IMPORTED_MODULE_8__.getMinValue(categoryValues);
|
|
11950
11954
|
var max = maxDomain !== undefined ? maxDomain : _collection__WEBPACK_IMPORTED_MODULE_8__.getMaxValue(categoryValues);
|
|
11951
11955
|
var categoryDomain = getDomainFromMinMax(min, max);
|
|
@@ -11960,7 +11964,7 @@ function getDomainFromCategories(props, axis, categories) {
|
|
|
11960
11964
|
*/
|
|
11961
11965
|
|
|
11962
11966
|
function getDomainFromData(props, axis, dataset) {
|
|
11963
|
-
|
|
11967
|
+
var datasetArray = dataset || _data__WEBPACK_IMPORTED_MODULE_10__.getData(props);
|
|
11964
11968
|
var polar = props.polar,
|
|
11965
11969
|
_props$startAngle2 = props.startAngle,
|
|
11966
11970
|
startAngle = _props$startAngle2 === void 0 ? 0 : _props$startAngle2,
|
|
@@ -11969,14 +11973,14 @@ function getDomainFromData(props, axis, dataset) {
|
|
|
11969
11973
|
var minDomain = getMinFromProps(props, axis);
|
|
11970
11974
|
var maxDomain = getMaxFromProps(props, axis);
|
|
11971
11975
|
|
|
11972
|
-
if (
|
|
11976
|
+
if (datasetArray.length < 1) {
|
|
11973
11977
|
return minDomain !== undefined && maxDomain !== undefined ? getDomainFromMinMax(minDomain, maxDomain) : undefined;
|
|
11974
11978
|
}
|
|
11975
11979
|
|
|
11976
|
-
var min = minDomain !== undefined ? minDomain : getExtremeFromData(
|
|
11977
|
-
var max = maxDomain !== undefined ? maxDomain : getExtremeFromData(
|
|
11980
|
+
var min = minDomain !== undefined ? minDomain : getExtremeFromData(datasetArray, axis, "min");
|
|
11981
|
+
var max = maxDomain !== undefined ? maxDomain : getExtremeFromData(datasetArray, axis, "max");
|
|
11978
11982
|
var domain = getDomainFromMinMax(min, max);
|
|
11979
|
-
return polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? getSymmetricDomain(domain, getFlatData(
|
|
11983
|
+
return polar && axis === "x" && Math.abs(startAngle - endAngle) === 360 ? getSymmetricDomain(domain, getFlatData(datasetArray, axis)) : domain;
|
|
11980
11984
|
}
|
|
11981
11985
|
/**
|
|
11982
11986
|
* Returns a domain in the form of a two element array given a min and max value.
|
|
@@ -12289,14 +12293,14 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
12289
12293
|
// eslint-disable-next-line no-invalid-this
|
|
12290
12294
|
|
|
12291
12295
|
|
|
12292
|
-
|
|
12296
|
+
var newBaseProps = baseProps || this.baseProps; // returns the original base props or base state of a given target element
|
|
12293
12297
|
|
|
12294
12298
|
var getTargetProps = function (identifier, type) {
|
|
12295
12299
|
var childName = identifier.childName,
|
|
12296
12300
|
target = identifier.target,
|
|
12297
12301
|
key = identifier.key; // eslint-disable-next-line no-invalid-this
|
|
12298
12302
|
|
|
12299
|
-
var baseType = type === "props" ?
|
|
12303
|
+
var baseType = type === "props" ? newBaseProps : _this2.state || {};
|
|
12300
12304
|
var base = childName === undefined || childName === null || !baseType[childName] ? baseType : baseType[childName];
|
|
12301
12305
|
return key === "parent" ? base.parent : base[key] && base[key][target];
|
|
12302
12306
|
}; // Returns the state object with the mutation caused by a given eventReturn
|
|
@@ -12313,9 +12317,9 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
12313
12317
|
}
|
|
12314
12318
|
|
|
12315
12319
|
if (eventReturn.eventKey === "all") {
|
|
12316
|
-
return
|
|
12320
|
+
return newBaseProps[childName] ? lodash_without__WEBPACK_IMPORTED_MODULE_5___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(newBaseProps[childName]), "parent") : lodash_without__WEBPACK_IMPORTED_MODULE_5___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(newBaseProps), "parent");
|
|
12317
12321
|
} else if (eventReturn.eventKey === undefined && eventKey === "parent") {
|
|
12318
|
-
return
|
|
12322
|
+
return newBaseProps[childName] ? lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(newBaseProps[childName]) : lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(newBaseProps);
|
|
12319
12323
|
}
|
|
12320
12324
|
|
|
12321
12325
|
return eventReturn.eventKey !== undefined ? eventReturn.eventKey : eventKey;
|
|
@@ -12340,7 +12344,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
12340
12344
|
key: key,
|
|
12341
12345
|
target: target
|
|
12342
12346
|
}, "state");
|
|
12343
|
-
var mutatedProps = eventReturn.mutation(lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, mutationTargetProps, mutationTargetState),
|
|
12347
|
+
var mutatedProps = eventReturn.mutation(lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, mutationTargetProps, mutationTargetState), newBaseProps);
|
|
12344
12348
|
var childState = baseState[childName] || {};
|
|
12345
12349
|
|
|
12346
12350
|
var filterState = function (state) {
|
|
@@ -12375,7 +12379,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
12375
12379
|
}; // returns an entire mutated state for all children
|
|
12376
12380
|
|
|
12377
12381
|
|
|
12378
|
-
var allChildNames = childNames === "all" ? lodash_without__WEBPACK_IMPORTED_MODULE_5___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(
|
|
12382
|
+
var allChildNames = childNames === "all" ? lodash_without__WEBPACK_IMPORTED_MODULE_5___default()(lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(newBaseProps), "parent") : childNames;
|
|
12379
12383
|
return Array.isArray(allChildNames) ? allChildNames.reduce(function (memo, childName) {
|
|
12380
12384
|
return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()(memo, getReturnByChild(childName));
|
|
12381
12385
|
}, {}) : getReturnByChild(allChildNames);
|
|
@@ -12384,8 +12388,7 @@ function getScopedEvents(events, namespace, childType, baseProps) {
|
|
|
12384
12388
|
|
|
12385
12389
|
var parseEventReturn = function (eventReturn, eventKey) {
|
|
12386
12390
|
return Array.isArray(eventReturn) ? eventReturn.reduce(function (memo, props) {
|
|
12387
|
-
|
|
12388
|
-
return memo;
|
|
12391
|
+
return lodash_assign__WEBPACK_IMPORTED_MODULE_8___default()({}, memo, parseEvent(props, eventKey));
|
|
12389
12392
|
}, {}) : parseEvent(eventReturn, eventKey);
|
|
12390
12393
|
};
|
|
12391
12394
|
|
|
@@ -12471,9 +12474,10 @@ function getEventState(eventKey, namespace, childType) {
|
|
|
12471
12474
|
*/
|
|
12472
12475
|
// eslint-disable-next-line max-params
|
|
12473
12476
|
|
|
12474
|
-
function getExternalMutationsWithChildren(mutations
|
|
12475
|
-
baseProps =
|
|
12476
|
-
baseState =
|
|
12477
|
+
function getExternalMutationsWithChildren(mutations) {
|
|
12478
|
+
var baseProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12479
|
+
var baseState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12480
|
+
var childNames = arguments.length > 3 ? arguments[3] : undefined;
|
|
12477
12481
|
return childNames.reduce(function (memo, childName) {
|
|
12478
12482
|
var childState = baseState[childName];
|
|
12479
12483
|
var mutation = getExternalMutations(mutations, baseProps[childName], baseState[childName], childName);
|
|
@@ -12495,9 +12499,10 @@ function getExternalMutationsWithChildren(mutations, baseProps, baseState, child
|
|
|
12495
12499
|
*/
|
|
12496
12500
|
// eslint-disable-next-line max-params
|
|
12497
12501
|
|
|
12498
|
-
function getExternalMutations(mutations
|
|
12499
|
-
baseProps =
|
|
12500
|
-
baseState =
|
|
12502
|
+
function getExternalMutations(mutations) {
|
|
12503
|
+
var baseProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12504
|
+
var baseState = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
12505
|
+
var childName = arguments.length > 3 ? arguments[3] : undefined;
|
|
12501
12506
|
|
|
12502
12507
|
var eventKeys = lodash_keys__WEBPACK_IMPORTED_MODULE_0___default()(baseProps);
|
|
12503
12508
|
|
|
@@ -12563,8 +12568,7 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
12563
12568
|
return false;
|
|
12564
12569
|
};
|
|
12565
12570
|
|
|
12566
|
-
|
|
12567
|
-
var scopedMutations = mutations;
|
|
12571
|
+
var scopedMutations = Array.isArray(mutations) ? mutations : [mutations];
|
|
12568
12572
|
|
|
12569
12573
|
if (identifier.childName) {
|
|
12570
12574
|
scopedMutations = mutations.filter(function (m) {
|
|
@@ -12603,13 +12607,10 @@ function getExternalMutation(mutations, baseProps, baseState, identifier) {
|
|
|
12603
12607
|
|
|
12604
12608
|
function getComponentEvents(props, components) {
|
|
12605
12609
|
var events = Array.isArray(components) && components.reduce(function (memo, componentName) {
|
|
12606
|
-
var _memo;
|
|
12607
|
-
|
|
12608
12610
|
var component = props[componentName];
|
|
12609
12611
|
var defaultEvents = component && component.type && component.type.defaultEvents;
|
|
12610
12612
|
var componentEvents = lodash_isFunction__WEBPACK_IMPORTED_MODULE_6___default()(defaultEvents) ? defaultEvents(component.props) : defaultEvents;
|
|
12611
|
-
|
|
12612
|
-
return memo;
|
|
12613
|
+
return Array.isArray(componentEvents) ? memo.concat.apply(memo, _toConsumableArray(componentEvents)) : memo;
|
|
12613
12614
|
}, []);
|
|
12614
12615
|
return events && events.length ? events : undefined;
|
|
12615
12616
|
}
|
|
@@ -12967,6 +12968,7 @@ function reduceChildren(children, iteratee) {
|
|
|
12967
12968
|
|
|
12968
12969
|
var traverseChildren = function (childArray, names, parent) {
|
|
12969
12970
|
return childArray.reduce(function (memo, child, index) {
|
|
12971
|
+
var newMemo = memo;
|
|
12970
12972
|
var childRole = child.type && child.type.role;
|
|
12971
12973
|
var childName = child.props.name || "".concat(childRole, "-").concat(names[index]);
|
|
12972
12974
|
|
|
@@ -12984,16 +12986,16 @@ function reduceChildren(children, iteratee) {
|
|
|
12984
12986
|
});
|
|
12985
12987
|
|
|
12986
12988
|
var nestedResults = traverseChildren(nestedChildren, _childNames, child);
|
|
12987
|
-
|
|
12989
|
+
newMemo = combine(newMemo, nestedResults);
|
|
12988
12990
|
} else {
|
|
12989
12991
|
var result = iteratee(child, childName, parent);
|
|
12990
12992
|
|
|
12991
12993
|
if (result) {
|
|
12992
|
-
|
|
12994
|
+
newMemo = combine(newMemo, result);
|
|
12993
12995
|
}
|
|
12994
12996
|
}
|
|
12995
12997
|
|
|
12996
|
-
return
|
|
12998
|
+
return newMemo;
|
|
12997
12999
|
}, initialMemo);
|
|
12998
13000
|
};
|
|
12999
13001
|
|
|
@@ -13019,8 +13021,7 @@ function isHorizontal(props) {
|
|
|
13019
13021
|
var childProps = child.props || {};
|
|
13020
13022
|
|
|
13021
13023
|
if (memo || childProps.horizontal || !childProps.children) {
|
|
13022
|
-
|
|
13023
|
-
return memo;
|
|
13024
|
+
return memo || childProps.horizontal;
|
|
13024
13025
|
}
|
|
13025
13026
|
|
|
13026
13027
|
return traverseChildren(react__WEBPACK_IMPORTED_MODULE_6___default().Children.toArray(childProps.children));
|
|
@@ -13073,11 +13074,13 @@ function isMap(x) {
|
|
|
13073
13074
|
}
|
|
13074
13075
|
function shallowToJS(x, whitelist) {
|
|
13075
13076
|
return isIterable(x) ? x.reduce(function (result, curr, key) {
|
|
13077
|
+
var newCurr = curr;
|
|
13078
|
+
|
|
13076
13079
|
if (whitelist && whitelist[key]) {
|
|
13077
|
-
|
|
13080
|
+
newCurr = shallowToJS(curr);
|
|
13078
13081
|
}
|
|
13079
13082
|
|
|
13080
|
-
result[key] =
|
|
13083
|
+
result[key] = newCurr;
|
|
13081
13084
|
return result;
|
|
13082
13085
|
}, isList(x) ? [] : {}) : x;
|
|
13083
13086
|
}
|
|
@@ -13105,12 +13108,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13105
13108
|
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers */ "../../victory-core/es/victory-util/helpers.js");
|
|
13106
13109
|
|
|
13107
13110
|
|
|
13108
|
-
/* eslint-disable no-use-before-define */
|
|
13109
|
-
|
|
13110
13111
|
|
|
13111
13112
|
// Private Functions
|
|
13112
|
-
function getVerticalAnchor(props
|
|
13113
|
-
datum =
|
|
13113
|
+
function getVerticalAnchor(props) {
|
|
13114
|
+
var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13114
13115
|
var sign = datum._y >= 0 ? 1 : -1;
|
|
13115
13116
|
var labelStyle = props.style && props.style.labels || {};
|
|
13116
13117
|
|
|
@@ -13123,8 +13124,8 @@ function getVerticalAnchor(props, datum) {
|
|
|
13123
13124
|
return "middle";
|
|
13124
13125
|
}
|
|
13125
13126
|
|
|
13126
|
-
function getTextAnchor(props
|
|
13127
|
-
datum =
|
|
13127
|
+
function getTextAnchor(props) {
|
|
13128
|
+
var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13128
13129
|
var style = props.style,
|
|
13129
13130
|
horizontal = props.horizontal;
|
|
13130
13131
|
var sign = datum._y >= 0 ? 1 : -1;
|
|
@@ -13139,14 +13140,14 @@ function getTextAnchor(props, datum) {
|
|
|
13139
13140
|
return sign >= 0 ? "start" : "end";
|
|
13140
13141
|
}
|
|
13141
13142
|
|
|
13142
|
-
function getAngle(props
|
|
13143
|
-
datum =
|
|
13143
|
+
function getAngle(props) {
|
|
13144
|
+
var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13144
13145
|
var labelStyle = props.style && props.style.labels || {};
|
|
13145
13146
|
return datum.angle === undefined ? labelStyle.angle : datum.angle;
|
|
13146
13147
|
}
|
|
13147
13148
|
|
|
13148
|
-
function getPadding(props
|
|
13149
|
-
datum =
|
|
13149
|
+
function getPadding(props) {
|
|
13150
|
+
var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13150
13151
|
var horizontal = props.horizontal,
|
|
13151
13152
|
style = props.style;
|
|
13152
13153
|
var labelStyle = style.labels || {};
|
|
@@ -13225,8 +13226,9 @@ function getPolarOrientation(degrees) {
|
|
|
13225
13226
|
} // Exported Functions
|
|
13226
13227
|
|
|
13227
13228
|
|
|
13228
|
-
function getText(props
|
|
13229
|
-
datum =
|
|
13229
|
+
function getText(props) {
|
|
13230
|
+
var datum = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
13231
|
+
var index = arguments.length > 2 ? arguments[2] : undefined;
|
|
13230
13232
|
|
|
13231
13233
|
if (datum.label !== undefined) {
|
|
13232
13234
|
return datum.label;
|
|
@@ -14464,11 +14466,10 @@ var Timer = /*#__PURE__*/function () {
|
|
|
14464
14466
|
}, {
|
|
14465
14467
|
key: "subscribe",
|
|
14466
14468
|
value: function subscribe(callback, duration) {
|
|
14467
|
-
duration = this.shouldAnimate ? duration : 0;
|
|
14468
14469
|
var subscriptionID = this.subscribers.push({
|
|
14469
14470
|
startTime: (0,victory_vendor_d3_timer__WEBPACK_IMPORTED_MODULE_0__.now)(),
|
|
14470
14471
|
callback: callback,
|
|
14471
|
-
duration: duration
|
|
14472
|
+
duration: this.shouldAnimate ? duration : 0
|
|
14472
14473
|
});
|
|
14473
14474
|
this.activeSubscriptions++;
|
|
14474
14475
|
this.start();
|
|
@@ -14655,36 +14656,38 @@ function getInitialChildProps(animate, data) {
|
|
|
14655
14656
|
|
|
14656
14657
|
|
|
14657
14658
|
function getChildBeforeLoad(animate, child, data, cb) {
|
|
14658
|
-
|
|
14659
|
+
var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
|
|
14659
14660
|
onEnd: cb
|
|
14660
14661
|
});
|
|
14661
14662
|
|
|
14662
|
-
if (
|
|
14663
|
+
if (newAnimate && newAnimate.onLoad && !newAnimate.onLoad.duration) {
|
|
14663
14664
|
return {
|
|
14664
|
-
animate:
|
|
14665
|
+
animate: newAnimate,
|
|
14665
14666
|
data: data
|
|
14666
14667
|
};
|
|
14667
14668
|
}
|
|
14668
14669
|
|
|
14669
|
-
var before =
|
|
14670
|
+
var before = newAnimate.onLoad && newAnimate.onLoad.before ? newAnimate.onLoad.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onLoad.before function.
|
|
14670
14671
|
|
|
14671
|
-
|
|
14672
|
+
var newData = data.map(function (datum, idx) {
|
|
14672
14673
|
return lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data));
|
|
14673
14674
|
});
|
|
14674
14675
|
return {
|
|
14675
|
-
animate:
|
|
14676
|
-
data:
|
|
14676
|
+
animate: newAnimate,
|
|
14677
|
+
data: newData,
|
|
14677
14678
|
clipWidth: 0
|
|
14678
14679
|
};
|
|
14679
14680
|
} // eslint-disable-next-line max-params
|
|
14680
14681
|
|
|
14681
14682
|
|
|
14682
14683
|
function getChildOnLoad(animate, data, cb) {
|
|
14683
|
-
|
|
14684
|
+
var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
|
|
14684
14685
|
onEnd: cb
|
|
14685
14686
|
});
|
|
14686
14687
|
|
|
14687
|
-
|
|
14688
|
+
var newData = data;
|
|
14689
|
+
|
|
14690
|
+
if (newAnimate && newAnimate.onLoad && !newAnimate.onLoad.duration) {
|
|
14688
14691
|
return {
|
|
14689
14692
|
animate: animate,
|
|
14690
14693
|
data: data
|
|
@@ -14693,12 +14696,12 @@ function getChildOnLoad(animate, data, cb) {
|
|
|
14693
14696
|
|
|
14694
14697
|
var after = animate.onLoad && animate.onLoad.after ? animate.onLoad.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onLoad.after function.
|
|
14695
14698
|
|
|
14696
|
-
|
|
14699
|
+
newData = data.map(function (datum, idx) {
|
|
14697
14700
|
return lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, after(datum, idx, data));
|
|
14698
14701
|
});
|
|
14699
14702
|
return {
|
|
14700
|
-
animate:
|
|
14701
|
-
data:
|
|
14703
|
+
animate: newAnimate,
|
|
14704
|
+
data: newData
|
|
14702
14705
|
};
|
|
14703
14706
|
} // eslint-disable-next-line max-params, max-len
|
|
14704
14707
|
|
|
@@ -14707,7 +14710,10 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
14707
14710
|
// Whether or not _this_ child has exiting nodes, we want the exit-
|
|
14708
14711
|
// transition for all children to have the same duration, delay, etc.
|
|
14709
14712
|
var onExit = animate && animate.onExit;
|
|
14710
|
-
|
|
14713
|
+
|
|
14714
|
+
var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onExit);
|
|
14715
|
+
|
|
14716
|
+
var newData = data;
|
|
14711
14717
|
|
|
14712
14718
|
if (exitingNodes) {
|
|
14713
14719
|
// After the exit transition occurs, trigger the animations for
|
|
@@ -14715,39 +14721,42 @@ function getChildPropsOnExit(animate, child, data, exitingNodes, cb) {
|
|
|
14715
14721
|
animate.onEnd = cb;
|
|
14716
14722
|
var before = animate.onExit && animate.onExit.before ? animate.onExit.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // If nodes need to exit, transform them with the provided onExit.before function.
|
|
14717
14723
|
|
|
14718
|
-
|
|
14724
|
+
newData = data.map(function (datum, idx) {
|
|
14719
14725
|
var key = (datum.key || idx).toString();
|
|
14720
14726
|
return exitingNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data)) : datum;
|
|
14721
14727
|
});
|
|
14722
14728
|
}
|
|
14723
14729
|
|
|
14724
14730
|
return {
|
|
14725
|
-
animate:
|
|
14726
|
-
data:
|
|
14731
|
+
animate: newAnimate,
|
|
14732
|
+
data: newData
|
|
14727
14733
|
};
|
|
14728
14734
|
} // eslint-disable-next-line max-params,max-len
|
|
14729
14735
|
|
|
14730
14736
|
|
|
14731
14737
|
function getChildPropsBeforeEnter(animate, child, data, enteringNodes, cb) {
|
|
14738
|
+
var newAnimate = animate;
|
|
14739
|
+
var newData = data;
|
|
14740
|
+
|
|
14732
14741
|
if (enteringNodes) {
|
|
14733
14742
|
// Perform a normal animation here, except - when it finishes - trigger
|
|
14734
14743
|
// the transition for entering nodes.
|
|
14735
|
-
|
|
14744
|
+
newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, {
|
|
14736
14745
|
onEnd: cb
|
|
14737
14746
|
});
|
|
14738
14747
|
var before = animate.onEnter && animate.onEnter.before ? animate.onEnter.before : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default()); // We want the entering nodes to be included in the transition target
|
|
14739
14748
|
// domain. However, we may not want these nodes to be displayed initially,
|
|
14740
14749
|
// so perform the `onEnter.before` transformation on each node.
|
|
14741
14750
|
|
|
14742
|
-
|
|
14751
|
+
newData = data.map(function (datum, idx) {
|
|
14743
14752
|
var key = (datum.key || idx).toString();
|
|
14744
14753
|
return enteringNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, before(datum, idx, data)) : datum;
|
|
14745
14754
|
});
|
|
14746
14755
|
}
|
|
14747
14756
|
|
|
14748
14757
|
return {
|
|
14749
|
-
animate:
|
|
14750
|
-
data:
|
|
14758
|
+
animate: newAnimate,
|
|
14759
|
+
data: newData
|
|
14751
14760
|
};
|
|
14752
14761
|
} // eslint-disable-next-line max-params, max-len
|
|
14753
14762
|
|
|
@@ -14756,23 +14765,26 @@ function getChildPropsOnEnter(animate, data, enteringNodes, cb) {
|
|
|
14756
14765
|
// Whether or not _this_ child has entering nodes, we want the entering-
|
|
14757
14766
|
// transition for all children to have the same duration, delay, etc.
|
|
14758
14767
|
var onEnter = animate && animate.onEnter;
|
|
14759
|
-
|
|
14768
|
+
|
|
14769
|
+
var newAnimate = lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, animate, onEnter);
|
|
14770
|
+
|
|
14771
|
+
var newData = data;
|
|
14760
14772
|
|
|
14761
14773
|
if (enteringNodes) {
|
|
14762
14774
|
// Old nodes have been transitioned to their new values, and the
|
|
14763
14775
|
// domain should encompass the nodes that will now enter. So perform
|
|
14764
14776
|
// the `onEnter.after` transformation on each node.
|
|
14765
|
-
|
|
14766
|
-
var after =
|
|
14767
|
-
|
|
14777
|
+
newAnimate.onEnd = cb;
|
|
14778
|
+
var after = newAnimate.onEnter && newAnimate.onEnter.after ? newAnimate.onEnter.after : (lodash_identity__WEBPACK_IMPORTED_MODULE_1___default());
|
|
14779
|
+
newData = data.map(function (datum, idx) {
|
|
14768
14780
|
var key = getDatumKey(datum, idx);
|
|
14769
14781
|
return enteringNodes[key] ? lodash_assign__WEBPACK_IMPORTED_MODULE_3___default()({}, datum, after(datum, idx, data)) : datum;
|
|
14770
14782
|
});
|
|
14771
14783
|
}
|
|
14772
14784
|
|
|
14773
14785
|
return {
|
|
14774
|
-
animate:
|
|
14775
|
-
data:
|
|
14786
|
+
animate: newAnimate,
|
|
14787
|
+
data: newData
|
|
14776
14788
|
};
|
|
14777
14789
|
}
|
|
14778
14790
|
/**
|
|
@@ -14938,6 +14950,7 @@ function getTransitionPropsFactory(props, state, setState) {
|
|
|
14938
14950
|
"use strict";
|
|
14939
14951
|
__webpack_require__.r(__webpack_exports__);
|
|
14940
14952
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14953
|
+
/* harmony export */ "assert": () => (/* binding */ assert),
|
|
14941
14954
|
/* harmony export */ "getSafeUserProps": () => (/* binding */ getSafeUserProps),
|
|
14942
14955
|
/* harmony export */ "withSafeUserProps": () => (/* binding */ withSafeUserProps)
|
|
14943
14956
|
/* harmony export */ });
|
|
@@ -15018,6 +15031,18 @@ var testIfSafeProp = function (key) {
|
|
|
15018
15031
|
if (doesPropStartWith(key) || isExactMatch(key)) return true;
|
|
15019
15032
|
return false;
|
|
15020
15033
|
};
|
|
15034
|
+
/**
|
|
15035
|
+
* Asserts that value is not null or undefined, throwing an error if it is.
|
|
15036
|
+
* @param value The value to assert
|
|
15037
|
+
* @param message The error message to throw
|
|
15038
|
+
*/
|
|
15039
|
+
|
|
15040
|
+
|
|
15041
|
+
function assert(value, message) {
|
|
15042
|
+
if (value === undefined || value === null) {
|
|
15043
|
+
throw new Error(message);
|
|
15044
|
+
}
|
|
15045
|
+
}
|
|
15021
15046
|
/**
|
|
15022
15047
|
* getSafeUserProps - function that takes in a props object and removes any
|
|
15023
15048
|
* key-value entries that do not match filter strings in the USER_PROPS_SAFELIST
|
|
@@ -15027,7 +15052,6 @@ var testIfSafeProp = function (key) {
|
|
|
15027
15052
|
* @returns {Object}: object containing remaining acceptable props
|
|
15028
15053
|
*/
|
|
15029
15054
|
|
|
15030
|
-
|
|
15031
15055
|
var getSafeUserProps = function (props) {
|
|
15032
15056
|
var propsToFilter = _objectSpread({}, props);
|
|
15033
15057
|
|