@typeolymp/ui-components 1.19.3 → 1.19.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/build/components/atoms/Input/translations.d.ts +11 -0
- package/build/components/molecules/Key/translations.d.ts +5 -0
- package/build/components/molecules/PasswordInputField/translations.d.ts +11 -0
- package/build/components/molecules/Tabs/styles.d.ts +2 -0
- package/build/components/organisms/Chart/data copy.d.ts +30 -0
- package/build/components/organisms/Chart/styles.d.ts +1 -0
- package/build/index.es.js +649 -787
- package/build/index.es.js.map +1 -1
- package/build/index.js +649 -787
- package/build/index.js.map +1 -1
- package/build/lib/enums.d.ts +4 -0
- package/build/lib/helpers.d.ts +1 -0
- package/build/lib/theme/index.d.ts +3 -0
- package/build/lib/theme/types.d.ts +72 -0
- package/build/lib/translations/index.d.ts +6 -0
- package/build/lib/types/TranslationType.d.ts +7 -0
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -4493,7 +4493,7 @@ function requiredArgs(required, args) {
|
|
|
4493
4493
|
}
|
|
4494
4494
|
}
|
|
4495
4495
|
|
|
4496
|
-
function _typeof$
|
|
4496
|
+
function _typeof$u(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$u = function _typeof(obj) { return typeof obj; }; } else { _typeof$u = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$u(obj); }
|
|
4497
4497
|
/**
|
|
4498
4498
|
* @name toDate
|
|
4499
4499
|
* @category Common Helpers
|
|
@@ -4529,7 +4529,7 @@ function toDate(argument) {
|
|
|
4529
4529
|
requiredArgs(1, arguments);
|
|
4530
4530
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4531
4531
|
|
|
4532
|
-
if (argument instanceof Date || _typeof$
|
|
4532
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4533
4533
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4534
4534
|
return new Date(argument.getTime());
|
|
4535
4535
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4800,7 +4800,7 @@ var millisecondsInMinute = 60000;
|
|
|
4800
4800
|
|
|
4801
4801
|
var millisecondsInHour = 3600000;
|
|
4802
4802
|
|
|
4803
|
-
function _typeof$
|
|
4803
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$t = function _typeof(obj) { return typeof obj; }; } else { _typeof$t = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$t(obj); }
|
|
4804
4804
|
/**
|
|
4805
4805
|
* @name isDate
|
|
4806
4806
|
* @category Common Helpers
|
|
@@ -4836,7 +4836,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4836
4836
|
|
|
4837
4837
|
function isDate(value) {
|
|
4838
4838
|
requiredArgs(1, arguments);
|
|
4839
|
-
return value instanceof Date || _typeof$
|
|
4839
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4840
4840
|
}
|
|
4841
4841
|
|
|
4842
4842
|
/**
|
|
@@ -8009,37 +8009,35 @@ var templateObject_1$M, templateObject_2$A;
|
|
|
8009
8009
|
|
|
8010
8010
|
var Number$1 = function (props) {
|
|
8011
8011
|
var inputRef = useRef(null);
|
|
8012
|
-
var
|
|
8013
|
-
if (
|
|
8014
|
-
props.
|
|
8012
|
+
var setValue = function (value) {
|
|
8013
|
+
if (props.min && value < props.min)
|
|
8014
|
+
value = props.min;
|
|
8015
|
+
if (props.max && value > props.max)
|
|
8016
|
+
value = props.max;
|
|
8017
|
+
inputRef.current.value = "".concat(value);
|
|
8018
|
+
return value;
|
|
8015
8019
|
};
|
|
8016
8020
|
var decrease = function () {
|
|
8017
|
-
var
|
|
8018
|
-
(
|
|
8019
|
-
|
|
8020
|
-
if (props.min && newValue < props.min) {
|
|
8021
|
-
inputRef.current.value = "".concat(props.min);
|
|
8022
|
-
}
|
|
8023
|
-
else {
|
|
8024
|
-
inputRef.current.value = "".concat(newValue);
|
|
8025
|
-
if (!!props.onChange)
|
|
8026
|
-
props.onChange(newValue);
|
|
8027
|
-
}
|
|
8021
|
+
var value = parseInt(inputRef.current.value) - 1;
|
|
8022
|
+
setValue(value);
|
|
8023
|
+
inputRef.current.focus();
|
|
8028
8024
|
};
|
|
8029
8025
|
var increase = function () {
|
|
8030
|
-
var
|
|
8031
|
-
(
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8026
|
+
var value = parseInt(inputRef.current.value) + 1;
|
|
8027
|
+
setValue(value);
|
|
8028
|
+
inputRef.current.focus();
|
|
8029
|
+
};
|
|
8030
|
+
var onChange = function () {
|
|
8031
|
+
var value = parseInt(inputRef.current.value);
|
|
8032
|
+
var newValue = setValue(value);
|
|
8033
|
+
if (!props.disabled && !!props.onChange)
|
|
8034
|
+
props.onChange(newValue);
|
|
8035
|
+
};
|
|
8036
|
+
var onBlur = function () {
|
|
8037
|
+
if (!!props.onBlur)
|
|
8038
|
+
props.onBlur();
|
|
8041
8039
|
};
|
|
8042
|
-
return (jsxs(Wrapper$6, __assign$2({ disabled: props.disabled }, { children: [jsx$1(Button, { label: "-", disabled: props.disabled, onClick: decrease, tabIndex: -1, type: "button" }), jsx$1(StyledInputNumber, __assign$2({ type: "number" }, props, { defaultValue: props.defaultValue || props.min || 0, onChange: onChange, onBlur:
|
|
8040
|
+
return (jsxs(Wrapper$6, __assign$2({ disabled: props.disabled }, { children: [jsx$1(Button, { label: "-", disabled: props.disabled, onClick: decrease, tabIndex: -1, type: "button" }), jsx$1(StyledInputNumber, __assign$2({ type: "number" }, props, { defaultValue: props.defaultValue || props.min || 0, onChange: onChange, onBlur: onBlur, ref: inputRef })), jsx$1(Button, { label: "+", disabled: props.disabled, onClick: increase, tabIndex: -1, type: "button" })] })));
|
|
8043
8041
|
};
|
|
8044
8042
|
|
|
8045
8043
|
var Paragraph = function (props) { return (jsx$1(StyledParagraph, __assign$2({}, props, { children: props.children }))); };
|
|
@@ -13535,15 +13533,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13535
13533
|
|
|
13536
13534
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13537
13535
|
|
|
13538
|
-
function _slicedToArray$
|
|
13539
|
-
return _arrayWithHoles$
|
|
13536
|
+
function _slicedToArray$d(arr, i) {
|
|
13537
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13540
13538
|
}
|
|
13541
13539
|
|
|
13542
|
-
function _arrayWithHoles$
|
|
13540
|
+
function _arrayWithHoles$e(arr) {
|
|
13543
13541
|
if (Array.isArray(arr)) return arr;
|
|
13544
13542
|
}
|
|
13545
13543
|
|
|
13546
|
-
function _iterableToArrayLimit$
|
|
13544
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13547
13545
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13548
13546
|
|
|
13549
13547
|
if (_i == null) return;
|
|
@@ -13573,16 +13571,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13573
13571
|
return _arr;
|
|
13574
13572
|
}
|
|
13575
13573
|
|
|
13576
|
-
function _unsupportedIterableToArray$
|
|
13574
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13577
13575
|
if (!o) return;
|
|
13578
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13576
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13579
13577
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13580
13578
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13581
13579
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13582
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13580
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13583
13581
|
}
|
|
13584
13582
|
|
|
13585
|
-
function _arrayLikeToArray$
|
|
13583
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13586
13584
|
if (len == null || len > arr.length) len = arr.length;
|
|
13587
13585
|
|
|
13588
13586
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13590,7 +13588,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13590
13588
|
return arr2;
|
|
13591
13589
|
}
|
|
13592
13590
|
|
|
13593
|
-
function _nonIterableRest$
|
|
13591
|
+
function _nonIterableRest$e() {
|
|
13594
13592
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13595
13593
|
}
|
|
13596
13594
|
|
|
@@ -13654,7 +13652,7 @@ reservedProps.forEach(function (name) {
|
|
|
13654
13652
|
// This is a mapping from React prop names to the attribute names.
|
|
13655
13653
|
|
|
13656
13654
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13657
|
-
var _ref2 = _slicedToArray$
|
|
13655
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13658
13656
|
name = _ref2[0],
|
|
13659
13657
|
attributeName = _ref2[1];
|
|
13660
13658
|
|
|
@@ -16054,31 +16052,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16054
16052
|
return true;
|
|
16055
16053
|
};
|
|
16056
16054
|
|
|
16057
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16055
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16058
16056
|
|
|
16059
16057
|
function _nonIterableSpread$c() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16060
16058
|
|
|
16061
16059
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16062
16060
|
|
|
16063
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16061
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16064
16062
|
|
|
16065
|
-
function ownKeys$
|
|
16063
|
+
function ownKeys$q(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16066
16064
|
|
|
16067
|
-
function _objectSpread$
|
|
16065
|
+
function _objectSpread$q(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$q(Object(source), !0).forEach(function (key) { _defineProperty$s(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$q(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16068
16066
|
|
|
16069
|
-
function _defineProperty$
|
|
16067
|
+
function _defineProperty$s(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16070
16068
|
|
|
16071
|
-
function _slicedToArray$
|
|
16069
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16072
16070
|
|
|
16073
|
-
function _nonIterableRest$
|
|
16071
|
+
function _nonIterableRest$d() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16074
16072
|
|
|
16075
|
-
function _unsupportedIterableToArray$
|
|
16073
|
+
function _unsupportedIterableToArray$k(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$k(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen); }
|
|
16076
16074
|
|
|
16077
|
-
function _arrayLikeToArray$
|
|
16075
|
+
function _arrayLikeToArray$k(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16078
16076
|
|
|
16079
|
-
function _iterableToArrayLimit$
|
|
16077
|
+
function _iterableToArrayLimit$c(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16080
16078
|
|
|
16081
|
-
function _arrayWithHoles$
|
|
16079
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16082
16080
|
|
|
16083
16081
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16084
16082
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16158,11 +16156,11 @@ function allFilesAccepted(_ref) {
|
|
|
16158
16156
|
|
|
16159
16157
|
return files.every(function (file) {
|
|
16160
16158
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16161
|
-
_fileAccepted2 = _slicedToArray$
|
|
16159
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16162
16160
|
accepted = _fileAccepted2[0];
|
|
16163
16161
|
|
|
16164
16162
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16165
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16163
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16166
16164
|
sizeMatch = _fileMatchSize2[0];
|
|
16167
16165
|
|
|
16168
16166
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16259,7 +16257,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16259
16257
|
function pickerOptionsFromAccept(accept) {
|
|
16260
16258
|
if (isDefined(accept)) {
|
|
16261
16259
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16262
|
-
var _ref3 = _slicedToArray$
|
|
16260
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16263
16261
|
mimeType = _ref3[0],
|
|
16264
16262
|
ext = _ref3[1];
|
|
16265
16263
|
|
|
@@ -16277,11 +16275,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16277
16275
|
|
|
16278
16276
|
return ok;
|
|
16279
16277
|
}).reduce(function (agg, _ref4) {
|
|
16280
|
-
var _ref5 = _slicedToArray$
|
|
16278
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16281
16279
|
mimeType = _ref5[0],
|
|
16282
16280
|
ext = _ref5[1];
|
|
16283
16281
|
|
|
16284
|
-
return _objectSpread$
|
|
16282
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16285
16283
|
}, {});
|
|
16286
16284
|
return [{
|
|
16287
16285
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16301,7 +16299,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16301
16299
|
function acceptPropAsAcceptAttr(accept) {
|
|
16302
16300
|
if (isDefined(accept)) {
|
|
16303
16301
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16304
|
-
var _ref7 = _slicedToArray$
|
|
16302
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16305
16303
|
mimeType = _ref7[0],
|
|
16306
16304
|
ext = _ref7[1];
|
|
16307
16305
|
|
|
@@ -16369,40 +16367,40 @@ function isExt(v) {
|
|
|
16369
16367
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16370
16368
|
*/
|
|
16371
16369
|
|
|
16372
|
-
var _excluded$
|
|
16373
|
-
_excluded2$
|
|
16370
|
+
var _excluded$d = ["children"],
|
|
16371
|
+
_excluded2$3 = ["open"],
|
|
16374
16372
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16375
16373
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16376
16374
|
|
|
16377
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16375
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16378
16376
|
|
|
16379
16377
|
function _nonIterableSpread$b() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16380
16378
|
|
|
16381
16379
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16382
16380
|
|
|
16383
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16381
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16384
16382
|
|
|
16385
|
-
function _slicedToArray$
|
|
16383
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16386
16384
|
|
|
16387
|
-
function _nonIterableRest$
|
|
16385
|
+
function _nonIterableRest$c() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16388
16386
|
|
|
16389
|
-
function _unsupportedIterableToArray$
|
|
16387
|
+
function _unsupportedIterableToArray$j(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$j(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$j(o, minLen); }
|
|
16390
16388
|
|
|
16391
|
-
function _arrayLikeToArray$
|
|
16389
|
+
function _arrayLikeToArray$j(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16392
16390
|
|
|
16393
|
-
function _iterableToArrayLimit$
|
|
16391
|
+
function _iterableToArrayLimit$b(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16394
16392
|
|
|
16395
|
-
function _arrayWithHoles$
|
|
16393
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16396
16394
|
|
|
16397
|
-
function ownKeys$
|
|
16395
|
+
function ownKeys$p(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16398
16396
|
|
|
16399
|
-
function _objectSpread$
|
|
16397
|
+
function _objectSpread$p(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$p(Object(source), !0).forEach(function (key) { _defineProperty$r(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$p(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16400
16398
|
|
|
16401
|
-
function _defineProperty$
|
|
16399
|
+
function _defineProperty$r(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16402
16400
|
|
|
16403
|
-
function _objectWithoutProperties$
|
|
16401
|
+
function _objectWithoutProperties$d(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$d(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16404
16402
|
|
|
16405
|
-
function _objectWithoutPropertiesLoose$
|
|
16403
|
+
function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16406
16404
|
/**
|
|
16407
16405
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16408
16406
|
*
|
|
@@ -16420,11 +16418,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16420
16418
|
|
|
16421
16419
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16422
16420
|
var children = _ref.children,
|
|
16423
|
-
params = _objectWithoutProperties$
|
|
16421
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16424
16422
|
|
|
16425
16423
|
var _useDropzone = useDropzone(params),
|
|
16426
16424
|
open = _useDropzone.open,
|
|
16427
|
-
props = _objectWithoutProperties$
|
|
16425
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16428
16426
|
|
|
16429
16427
|
useImperativeHandle(ref, function () {
|
|
16430
16428
|
return {
|
|
@@ -16432,13 +16430,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16432
16430
|
};
|
|
16433
16431
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16434
16432
|
|
|
16435
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16433
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16436
16434
|
open: open
|
|
16437
16435
|
})));
|
|
16438
16436
|
});
|
|
16439
16437
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16440
16438
|
|
|
16441
|
-
var defaultProps$
|
|
16439
|
+
var defaultProps$1 = {
|
|
16442
16440
|
disabled: false,
|
|
16443
16441
|
getFilesFromEvent: fromEvent,
|
|
16444
16442
|
maxSize: Infinity,
|
|
@@ -16454,7 +16452,7 @@ var defaultProps$2 = {
|
|
|
16454
16452
|
useFsAccessApi: true,
|
|
16455
16453
|
autoFocus: false
|
|
16456
16454
|
};
|
|
16457
|
-
Dropzone.defaultProps = defaultProps$
|
|
16455
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16458
16456
|
Dropzone.propTypes = {
|
|
16459
16457
|
/**
|
|
16460
16458
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16805,7 +16803,7 @@ var initialState = {
|
|
|
16805
16803
|
function useDropzone() {
|
|
16806
16804
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16807
16805
|
|
|
16808
|
-
var _defaultProps$props = _objectSpread$
|
|
16806
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16809
16807
|
accept = _defaultProps$props.accept,
|
|
16810
16808
|
disabled = _defaultProps$props.disabled,
|
|
16811
16809
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16852,7 +16850,7 @@ function useDropzone() {
|
|
|
16852
16850
|
var inputRef = useRef(null);
|
|
16853
16851
|
|
|
16854
16852
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16855
|
-
_useReducer2 = _slicedToArray$
|
|
16853
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16856
16854
|
state = _useReducer2[0],
|
|
16857
16855
|
dispatch = _useReducer2[1];
|
|
16858
16856
|
|
|
@@ -17022,12 +17020,12 @@ function useDropzone() {
|
|
|
17022
17020
|
var fileRejections = [];
|
|
17023
17021
|
files.forEach(function (file) {
|
|
17024
17022
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17025
|
-
_fileAccepted2 = _slicedToArray$
|
|
17023
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17026
17024
|
accepted = _fileAccepted2[0],
|
|
17027
17025
|
acceptError = _fileAccepted2[1];
|
|
17028
17026
|
|
|
17029
17027
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17030
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17028
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17031
17029
|
sizeMatch = _fileMatchSize2[0],
|
|
17032
17030
|
sizeError = _fileMatchSize2[1];
|
|
17033
17031
|
|
|
@@ -17228,9 +17226,9 @@ function useDropzone() {
|
|
|
17228
17226
|
onDragOver = _ref2.onDragOver,
|
|
17229
17227
|
onDragLeave = _ref2.onDragLeave,
|
|
17230
17228
|
onDrop = _ref2.onDrop,
|
|
17231
|
-
rest = _objectWithoutProperties$
|
|
17229
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17232
17230
|
|
|
17233
|
-
return _objectSpread$
|
|
17231
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17234
17232
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17235
17233
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17236
17234
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17255,9 +17253,9 @@ function useDropzone() {
|
|
|
17255
17253
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17256
17254
|
onChange = _ref3.onChange,
|
|
17257
17255
|
onClick = _ref3.onClick,
|
|
17258
|
-
rest = _objectWithoutProperties$
|
|
17256
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17259
17257
|
|
|
17260
|
-
var inputProps = _defineProperty$
|
|
17258
|
+
var inputProps = _defineProperty$r({
|
|
17261
17259
|
accept: acceptAttr,
|
|
17262
17260
|
multiple: multiple,
|
|
17263
17261
|
type: "file",
|
|
@@ -17269,10 +17267,10 @@ function useDropzone() {
|
|
|
17269
17267
|
tabIndex: -1
|
|
17270
17268
|
}, refKey, inputRef);
|
|
17271
17269
|
|
|
17272
|
-
return _objectSpread$
|
|
17270
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17273
17271
|
};
|
|
17274
17272
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17275
|
-
return _objectSpread$
|
|
17273
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17276
17274
|
isFocused: isFocused && !disabled,
|
|
17277
17275
|
getRootProps: getRootProps,
|
|
17278
17276
|
getInputProps: getInputProps,
|
|
@@ -17291,40 +17289,40 @@ function reducer$1(state, action) {
|
|
|
17291
17289
|
/* istanbul ignore next */
|
|
17292
17290
|
switch (action.type) {
|
|
17293
17291
|
case "focus":
|
|
17294
|
-
return _objectSpread$
|
|
17292
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17295
17293
|
isFocused: true
|
|
17296
17294
|
});
|
|
17297
17295
|
|
|
17298
17296
|
case "blur":
|
|
17299
|
-
return _objectSpread$
|
|
17297
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17300
17298
|
isFocused: false
|
|
17301
17299
|
});
|
|
17302
17300
|
|
|
17303
17301
|
case "openDialog":
|
|
17304
|
-
return _objectSpread$
|
|
17302
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17305
17303
|
isFileDialogActive: true
|
|
17306
17304
|
});
|
|
17307
17305
|
|
|
17308
17306
|
case "closeDialog":
|
|
17309
|
-
return _objectSpread$
|
|
17307
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17310
17308
|
isFileDialogActive: false
|
|
17311
17309
|
});
|
|
17312
17310
|
|
|
17313
17311
|
case "setDraggedFiles":
|
|
17314
|
-
return _objectSpread$
|
|
17312
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17315
17313
|
isDragActive: action.isDragActive,
|
|
17316
17314
|
isDragAccept: action.isDragAccept,
|
|
17317
17315
|
isDragReject: action.isDragReject
|
|
17318
17316
|
});
|
|
17319
17317
|
|
|
17320
17318
|
case "setFiles":
|
|
17321
|
-
return _objectSpread$
|
|
17319
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17322
17320
|
acceptedFiles: action.acceptedFiles,
|
|
17323
17321
|
fileRejections: action.fileRejections
|
|
17324
17322
|
});
|
|
17325
17323
|
|
|
17326
17324
|
case "reset":
|
|
17327
|
-
return _objectSpread$
|
|
17325
|
+
return _objectSpread$p({}, initialState);
|
|
17328
17326
|
|
|
17329
17327
|
default:
|
|
17330
17328
|
return state;
|
|
@@ -19550,7 +19548,7 @@ function shallowEqual(a, b) {
|
|
|
19550
19548
|
return true;
|
|
19551
19549
|
}
|
|
19552
19550
|
|
|
19553
|
-
function _typeof$
|
|
19551
|
+
function _typeof$s(obj) { "@babel/helpers - typeof"; return _typeof$s = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$s(obj); }
|
|
19554
19552
|
|
|
19555
19553
|
//
|
|
19556
19554
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19577,9 +19575,7 @@ var FilteredElementKeyMap = {
|
|
|
19577
19575
|
};
|
|
19578
19576
|
var EventKeys = ['dangerouslySetInnerHTML', 'onCopy', 'onCopyCapture', 'onCut', 'onCutCapture', 'onPaste', 'onPasteCapture', 'onCompositionEnd', 'onCompositionEndCapture', 'onCompositionStart', 'onCompositionStartCapture', 'onCompositionUpdate', 'onCompositionUpdateCapture', 'onFocus', 'onFocusCapture', 'onBlur', 'onBlurCapture', 'onChange', 'onChangeCapture', 'onBeforeInput', 'onBeforeInputCapture', 'onInput', 'onInputCapture', 'onReset', 'onResetCapture', 'onSubmit', 'onSubmitCapture', 'onInvalid', 'onInvalidCapture', 'onLoad', 'onLoadCapture', 'onError', 'onErrorCapture', 'onKeyDown', 'onKeyDownCapture', 'onKeyPress', 'onKeyPressCapture', 'onKeyUp', 'onKeyUpCapture', 'onAbort', 'onAbortCapture', 'onCanPlay', 'onCanPlayCapture', 'onCanPlayThrough', 'onCanPlayThroughCapture', 'onDurationChange', 'onDurationChangeCapture', 'onEmptied', 'onEmptiedCapture', 'onEncrypted', 'onEncryptedCapture', 'onEnded', 'onEndedCapture', 'onLoadedData', 'onLoadedDataCapture', 'onLoadedMetadata', 'onLoadedMetadataCapture', 'onLoadStart', 'onLoadStartCapture', 'onPause', 'onPauseCapture', 'onPlay', 'onPlayCapture', 'onPlaying', 'onPlayingCapture', 'onProgress', 'onProgressCapture', 'onRateChange', 'onRateChangeCapture', 'onSeeked', 'onSeekedCapture', 'onSeeking', 'onSeekingCapture', 'onStalled', 'onStalledCapture', 'onSuspend', 'onSuspendCapture', 'onTimeUpdate', 'onTimeUpdateCapture', 'onVolumeChange', 'onVolumeChangeCapture', 'onWaiting', 'onWaitingCapture', 'onAuxClick', 'onAuxClickCapture', 'onClick', 'onClickCapture', 'onContextMenu', 'onContextMenuCapture', 'onDoubleClick', 'onDoubleClickCapture', 'onDrag', 'onDragCapture', 'onDragEnd', 'onDragEndCapture', 'onDragEnter', 'onDragEnterCapture', 'onDragExit', 'onDragExitCapture', 'onDragLeave', 'onDragLeaveCapture', 'onDragOver', 'onDragOverCapture', 'onDragStart', 'onDragStartCapture', 'onDrop', 'onDropCapture', 'onMouseDown', 'onMouseDownCapture', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseMoveCapture', 'onMouseOut', 'onMouseOutCapture', 'onMouseOver', 'onMouseOverCapture', 'onMouseUp', 'onMouseUpCapture', 'onSelect', 'onSelectCapture', 'onTouchCancel', 'onTouchCancelCapture', 'onTouchEnd', 'onTouchEndCapture', 'onTouchMove', 'onTouchMoveCapture', 'onTouchStart', 'onTouchStartCapture', 'onPointerDown', 'onPointerDownCapture', 'onPointerMove', 'onPointerMoveCapture', 'onPointerUp', 'onPointerUpCapture', 'onPointerCancel', 'onPointerCancelCapture', 'onPointerEnter', 'onPointerEnterCapture', 'onPointerLeave', 'onPointerLeaveCapture', 'onPointerOver', 'onPointerOverCapture', 'onPointerOut', 'onPointerOutCapture', 'onGotPointerCapture', 'onGotPointerCaptureCapture', 'onLostPointerCapture', 'onLostPointerCaptureCapture', 'onScroll', 'onScrollCapture', 'onWheel', 'onWheelCapture', 'onAnimationStart', 'onAnimationStartCapture', 'onAnimationEnd', 'onAnimationEndCapture', 'onAnimationIteration', 'onAnimationIterationCapture', 'onTransitionEnd', 'onTransitionEndCapture'];
|
|
19579
19577
|
|
|
19580
|
-
|
|
19581
|
-
|
|
19582
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19578
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19583
19579
|
|
|
19584
19580
|
/** the offset of a chart, which define the blank space all around */
|
|
19585
19581
|
|
|
@@ -19615,7 +19611,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19615
19611
|
};
|
|
19616
19612
|
};
|
|
19617
19613
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19618
|
-
if (!isObject_1(props) || _typeof$
|
|
19614
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19619
19615
|
return null;
|
|
19620
19616
|
}
|
|
19621
19617
|
var out = null;
|
|
@@ -19629,11 +19625,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19629
19625
|
return out;
|
|
19630
19626
|
};
|
|
19631
19627
|
|
|
19632
|
-
var _excluded$
|
|
19633
|
-
_excluded2$
|
|
19634
|
-
function _objectWithoutProperties$
|
|
19635
|
-
function _objectWithoutPropertiesLoose$
|
|
19636
|
-
function _typeof$
|
|
19628
|
+
var _excluded$c = ["children"],
|
|
19629
|
+
_excluded2$2 = ["children"];
|
|
19630
|
+
function _objectWithoutProperties$c(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$c(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19631
|
+
function _objectWithoutPropertiesLoose$c(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19632
|
+
function _typeof$r(obj) { "@babel/helpers - typeof"; return _typeof$r = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$r(obj); }
|
|
19637
19633
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19638
19634
|
click: 'onClick',
|
|
19639
19635
|
mousedown: 'onMouseDown',
|
|
@@ -19740,7 +19736,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19740
19736
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19741
19737
|
};
|
|
19742
19738
|
var isDotProps = function isDotProps(dot) {
|
|
19743
|
-
return dot && _typeof$
|
|
19739
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19744
19740
|
};
|
|
19745
19741
|
|
|
19746
19742
|
/**
|
|
@@ -19832,10 +19828,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19832
19828
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19833
19829
|
var _ref = nextChild.props || {},
|
|
19834
19830
|
nextChildren = _ref.children,
|
|
19835
|
-
nextProps = _objectWithoutProperties$
|
|
19831
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19836
19832
|
var _ref2 = prevChild.props || {},
|
|
19837
19833
|
prevChildren = _ref2.children,
|
|
19838
|
-
prevProps = _objectWithoutProperties$
|
|
19834
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19839
19835
|
if (nextChildren && prevChildren) {
|
|
19840
19836
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19841
19837
|
}
|
|
@@ -19877,10 +19873,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19877
19873
|
return toArray(children).indexOf(child);
|
|
19878
19874
|
};
|
|
19879
19875
|
|
|
19880
|
-
var _excluded$
|
|
19876
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19881
19877
|
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
19882
|
-
function _objectWithoutProperties$
|
|
19883
|
-
function _objectWithoutPropertiesLoose$
|
|
19878
|
+
function _objectWithoutProperties$b(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$b(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19879
|
+
function _objectWithoutPropertiesLoose$b(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19884
19880
|
function Surface(props) {
|
|
19885
19881
|
var children = props.children,
|
|
19886
19882
|
width = props.width,
|
|
@@ -19888,7 +19884,7 @@ function Surface(props) {
|
|
|
19888
19884
|
viewBox = props.viewBox,
|
|
19889
19885
|
className = props.className,
|
|
19890
19886
|
style = props.style,
|
|
19891
|
-
others = _objectWithoutProperties$
|
|
19887
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19892
19888
|
var svgView = viewBox || {
|
|
19893
19889
|
width: width,
|
|
19894
19890
|
height: height,
|
|
@@ -19905,14 +19901,14 @@ function Surface(props) {
|
|
|
19905
19901
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19906
19902
|
}
|
|
19907
19903
|
|
|
19908
|
-
var _excluded$
|
|
19904
|
+
var _excluded$a = ["children", "className"];
|
|
19909
19905
|
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
19910
|
-
function _objectWithoutProperties$
|
|
19911
|
-
function _objectWithoutPropertiesLoose$
|
|
19906
|
+
function _objectWithoutProperties$a(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$a(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19907
|
+
function _objectWithoutPropertiesLoose$a(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19912
19908
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19913
19909
|
var children = props.children,
|
|
19914
19910
|
className = props.className,
|
|
19915
|
-
others = _objectWithoutProperties$
|
|
19911
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19916
19912
|
var layerClass = classNames('recharts-layer', className);
|
|
19917
19913
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19918
19914
|
className: layerClass
|
|
@@ -23327,16 +23323,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23327
23323
|
stackOffsetNone(series, order);
|
|
23328
23324
|
}
|
|
23329
23325
|
|
|
23330
|
-
function _typeof$u(obj) { "@babel/helpers - typeof"; return _typeof$u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$u(obj); }
|
|
23331
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23332
23326
|
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
23333
|
-
function ownKeys$s(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23334
|
-
function _objectSpread$s(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$s(Object(source), !0).forEach(function (key) { _defineProperty$u(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$s(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23335
|
-
function _defineProperty$u(obj, key, value) { key = _toPropertyKey$t(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23336
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23337
|
-
function _toPrimitive$t(input, hint) { if (_typeof$u(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$u(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23338
|
-
function _objectWithoutProperties$c(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$c(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23339
|
-
function _objectWithoutPropertiesLoose$c(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23340
23327
|
var symbolFactories = {
|
|
23341
23328
|
symbolCircle: symbolCircle,
|
|
23342
23329
|
symbolCross: symbolCross,
|
|
@@ -23375,35 +23362,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23375
23362
|
return Math.PI * size * size / 4;
|
|
23376
23363
|
}
|
|
23377
23364
|
};
|
|
23365
|
+
var symbolsDefaultProps = {
|
|
23366
|
+
type: 'circle',
|
|
23367
|
+
size: 64,
|
|
23368
|
+
sizeType: 'area'
|
|
23369
|
+
};
|
|
23378
23370
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23379
23371
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23380
23372
|
};
|
|
23381
|
-
var Symbols = function Symbols(
|
|
23382
|
-
var _ref$type = _ref.type,
|
|
23383
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23384
|
-
_ref$size = _ref.size,
|
|
23385
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23386
|
-
_ref$sizeType = _ref.sizeType,
|
|
23387
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23388
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23389
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23390
|
-
type: type,
|
|
23391
|
-
size: size,
|
|
23392
|
-
sizeType: sizeType
|
|
23393
|
-
});
|
|
23394
|
-
|
|
23373
|
+
var Symbols = function Symbols(props) {
|
|
23395
23374
|
/**
|
|
23396
23375
|
* Calculate the path of curve
|
|
23397
23376
|
* @return {String} path
|
|
23398
23377
|
*/
|
|
23399
23378
|
var getPath = function getPath() {
|
|
23379
|
+
var size = props.size,
|
|
23380
|
+
sizeType = props.sizeType,
|
|
23381
|
+
type = props.type;
|
|
23400
23382
|
var symbolFactory = getSymbolFactory(type);
|
|
23401
23383
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23402
23384
|
return symbol();
|
|
23403
23385
|
};
|
|
23404
23386
|
var className = props.className,
|
|
23405
23387
|
cx = props.cx,
|
|
23406
|
-
cy = props.cy
|
|
23388
|
+
cy = props.cy,
|
|
23389
|
+
size = props.size;
|
|
23407
23390
|
var filteredProps = filterProps(props, true);
|
|
23408
23391
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23409
23392
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23414,34 +23397,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23414
23397
|
}
|
|
23415
23398
|
return null;
|
|
23416
23399
|
};
|
|
23400
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23417
23401
|
Symbols.registerSymbol = registerSymbol;
|
|
23418
23402
|
|
|
23419
|
-
function _typeof$
|
|
23403
|
+
function _typeof$q(obj) { "@babel/helpers - typeof"; return _typeof$q = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$q(obj); }
|
|
23420
23404
|
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
23421
|
-
function ownKeys$
|
|
23422
|
-
function _objectSpread$
|
|
23423
|
-
function _classCallCheck$
|
|
23424
|
-
function _defineProperties$
|
|
23425
|
-
function _createClass$
|
|
23426
|
-
function _inherits$
|
|
23427
|
-
function _setPrototypeOf$
|
|
23428
|
-
function _createSuper$
|
|
23429
|
-
function _possibleConstructorReturn$
|
|
23430
|
-
function _assertThisInitialized$
|
|
23431
|
-
function _isNativeReflectConstruct$
|
|
23432
|
-
function _getPrototypeOf$
|
|
23433
|
-
function _defineProperty$
|
|
23434
|
-
function _toPropertyKey$
|
|
23435
|
-
function _toPrimitive$
|
|
23405
|
+
function ownKeys$o(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23406
|
+
function _objectSpread$o(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$o(Object(source), !0).forEach(function (key) { _defineProperty$q(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$o(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23407
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23408
|
+
function _defineProperties$a(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$p(descriptor.key), descriptor); } }
|
|
23409
|
+
function _createClass$a(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$a(Constructor.prototype, protoProps); if (staticProps) _defineProperties$a(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23410
|
+
function _inherits$8(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf$8(subClass, superClass); }
|
|
23411
|
+
function _setPrototypeOf$8(o, p) { _setPrototypeOf$8 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$8(o, p); }
|
|
23412
|
+
function _createSuper$8(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$8(); return function _createSuperInternal() { var Super = _getPrototypeOf$8(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$8(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$8(this, result); }; }
|
|
23413
|
+
function _possibleConstructorReturn$8(self, call) { if (call && (_typeof$q(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$8(self); }
|
|
23414
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23415
|
+
function _isNativeReflectConstruct$8() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23416
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23417
|
+
function _defineProperty$q(obj, key, value) { key = _toPropertyKey$p(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23418
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23419
|
+
function _toPrimitive$p(input, hint) { if (_typeof$q(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$q(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23436
23420
|
var SIZE = 32;
|
|
23437
23421
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23438
|
-
_inherits$
|
|
23439
|
-
var _super = _createSuper$
|
|
23422
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23423
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23440
23424
|
function DefaultLegendContent() {
|
|
23441
|
-
_classCallCheck$
|
|
23425
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23442
23426
|
return _super.apply(this, arguments);
|
|
23443
23427
|
}
|
|
23444
|
-
_createClass$
|
|
23428
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23445
23429
|
key: "renderIcon",
|
|
23446
23430
|
value:
|
|
23447
23431
|
/**
|
|
@@ -23486,7 +23470,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23486
23470
|
});
|
|
23487
23471
|
}
|
|
23488
23472
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23489
|
-
var iconProps = _objectSpread$
|
|
23473
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23490
23474
|
delete iconProps.legendIcon;
|
|
23491
23475
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23492
23476
|
}
|
|
@@ -23534,7 +23518,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23534
23518
|
var finalFormatter = entry.formatter || formatter;
|
|
23535
23519
|
var className = classNames((_classNames = {
|
|
23536
23520
|
'recharts-legend-item': true
|
|
23537
|
-
}, _defineProperty$
|
|
23521
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23538
23522
|
if (entry.type === 'none') {
|
|
23539
23523
|
return null;
|
|
23540
23524
|
}
|
|
@@ -23579,8 +23563,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23579
23563
|
}]);
|
|
23580
23564
|
return DefaultLegendContent;
|
|
23581
23565
|
}(PureComponent);
|
|
23582
|
-
_defineProperty$
|
|
23583
|
-
_defineProperty$
|
|
23566
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23567
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23584
23568
|
iconSize: 14,
|
|
23585
23569
|
layout: 'horizontal',
|
|
23586
23570
|
align: 'center',
|
|
@@ -23588,25 +23572,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23588
23572
|
inactiveColor: '#ccc'
|
|
23589
23573
|
});
|
|
23590
23574
|
|
|
23591
|
-
function _typeof$
|
|
23592
|
-
var _excluded$
|
|
23593
|
-
function ownKeys$
|
|
23594
|
-
function _objectSpread$
|
|
23595
|
-
function _classCallCheck$
|
|
23596
|
-
function _defineProperties$
|
|
23597
|
-
function _createClass$
|
|
23598
|
-
function _inherits$
|
|
23599
|
-
function _setPrototypeOf$
|
|
23600
|
-
function _createSuper$
|
|
23601
|
-
function _possibleConstructorReturn$
|
|
23602
|
-
function _assertThisInitialized$
|
|
23603
|
-
function _isNativeReflectConstruct$
|
|
23604
|
-
function _getPrototypeOf$
|
|
23605
|
-
function _defineProperty$
|
|
23606
|
-
function _toPropertyKey$
|
|
23607
|
-
function _toPrimitive$
|
|
23608
|
-
function _objectWithoutProperties$
|
|
23609
|
-
function _objectWithoutPropertiesLoose$
|
|
23575
|
+
function _typeof$p(obj) { "@babel/helpers - typeof"; return _typeof$p = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$p(obj); }
|
|
23576
|
+
var _excluded$9 = ["ref"];
|
|
23577
|
+
function ownKeys$n(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23578
|
+
function _objectSpread$n(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$n(Object(source), !0).forEach(function (key) { _defineProperty$p(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$n(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23579
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23580
|
+
function _defineProperties$9(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$o(descriptor.key), descriptor); } }
|
|
23581
|
+
function _createClass$9(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$9(Constructor.prototype, protoProps); if (staticProps) _defineProperties$9(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23582
|
+
function _inherits$7(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf$7(subClass, superClass); }
|
|
23583
|
+
function _setPrototypeOf$7(o, p) { _setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$7(o, p); }
|
|
23584
|
+
function _createSuper$7(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$7(); return function _createSuperInternal() { var Super = _getPrototypeOf$7(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$7(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$7(this, result); }; }
|
|
23585
|
+
function _possibleConstructorReturn$7(self, call) { if (call && (_typeof$p(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$7(self); }
|
|
23586
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23587
|
+
function _isNativeReflectConstruct$7() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23588
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23589
|
+
function _defineProperty$p(obj, key, value) { key = _toPropertyKey$o(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23590
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23591
|
+
function _toPrimitive$o(input, hint) { if (_typeof$p(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$p(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23592
|
+
function _objectWithoutProperties$9(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$9(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
23593
|
+
function _objectWithoutPropertiesLoose$9(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23610
23594
|
function defaultUniqBy$1(entry) {
|
|
23611
23595
|
return entry.value;
|
|
23612
23596
|
}
|
|
@@ -23627,27 +23611,27 @@ function renderContent$1(content, props) {
|
|
|
23627
23611
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23628
23612
|
}
|
|
23629
23613
|
props.ref;
|
|
23630
|
-
var otherProps = _objectWithoutProperties$
|
|
23614
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23631
23615
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23632
23616
|
}
|
|
23633
23617
|
var EPS$2 = 1;
|
|
23634
23618
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23635
|
-
_inherits$
|
|
23636
|
-
var _super = _createSuper$
|
|
23619
|
+
_inherits$7(Legend, _PureComponent);
|
|
23620
|
+
var _super = _createSuper$7(Legend);
|
|
23637
23621
|
function Legend() {
|
|
23638
23622
|
var _this;
|
|
23639
|
-
_classCallCheck$
|
|
23623
|
+
_classCallCheck$9(this, Legend);
|
|
23640
23624
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23641
23625
|
args[_key] = arguments[_key];
|
|
23642
23626
|
}
|
|
23643
23627
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23644
|
-
_defineProperty$
|
|
23628
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23645
23629
|
boxWidth: -1,
|
|
23646
23630
|
boxHeight: -1
|
|
23647
23631
|
});
|
|
23648
23632
|
return _this;
|
|
23649
23633
|
}
|
|
23650
|
-
_createClass$
|
|
23634
|
+
_createClass$9(Legend, [{
|
|
23651
23635
|
key: "componentDidMount",
|
|
23652
23636
|
value: function componentDidMount() {
|
|
23653
23637
|
this.updateBBox();
|
|
@@ -23722,7 +23706,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23722
23706
|
};
|
|
23723
23707
|
}
|
|
23724
23708
|
}
|
|
23725
|
-
return _objectSpread$
|
|
23709
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23726
23710
|
}
|
|
23727
23711
|
}, {
|
|
23728
23712
|
key: "updateBBox",
|
|
@@ -23765,7 +23749,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23765
23749
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23766
23750
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23767
23751
|
payload = _this$props2.payload;
|
|
23768
|
-
var outerStyle = _objectSpread$
|
|
23752
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23769
23753
|
position: 'absolute',
|
|
23770
23754
|
width: width || 'auto',
|
|
23771
23755
|
height: height || 'auto'
|
|
@@ -23776,7 +23760,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23776
23760
|
ref: function ref(node) {
|
|
23777
23761
|
_this2.wrapperNode = node;
|
|
23778
23762
|
}
|
|
23779
|
-
}, renderContent$1(content, _objectSpread$
|
|
23763
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23780
23764
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23781
23765
|
})));
|
|
23782
23766
|
}
|
|
@@ -23799,8 +23783,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23799
23783
|
}]);
|
|
23800
23784
|
return Legend;
|
|
23801
23785
|
}(PureComponent);
|
|
23802
|
-
_defineProperty$
|
|
23803
|
-
_defineProperty$
|
|
23786
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23787
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23804
23788
|
iconSize: 14,
|
|
23805
23789
|
layout: 'horizontal',
|
|
23806
23790
|
align: 'center',
|
|
@@ -24364,13 +24348,13 @@ function setRafTimeout(callback) {
|
|
|
24364
24348
|
requestAnimationFrame(shouldUpdate);
|
|
24365
24349
|
}
|
|
24366
24350
|
|
|
24367
|
-
function _typeof$
|
|
24368
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24369
|
-
function _nonIterableRest$
|
|
24370
|
-
function _unsupportedIterableToArray$
|
|
24371
|
-
function _arrayLikeToArray$
|
|
24351
|
+
function _typeof$o(obj) { "@babel/helpers - typeof"; return _typeof$o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$o(obj); }
|
|
24352
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24353
|
+
function _nonIterableRest$b() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24354
|
+
function _unsupportedIterableToArray$i(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$i(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$i(o, minLen); }
|
|
24355
|
+
function _arrayLikeToArray$i(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24372
24356
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24373
|
-
function _arrayWithHoles$
|
|
24357
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24374
24358
|
function createAnimateManager() {
|
|
24375
24359
|
var currStyle = {};
|
|
24376
24360
|
var handleChange = function handleChange() {
|
|
@@ -24397,7 +24381,7 @@ function createAnimateManager() {
|
|
|
24397
24381
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24398
24382
|
return;
|
|
24399
24383
|
}
|
|
24400
|
-
if (_typeof$
|
|
24384
|
+
if (_typeof$o(_style) === 'object') {
|
|
24401
24385
|
currStyle = _style;
|
|
24402
24386
|
handleChange(currStyle);
|
|
24403
24387
|
}
|
|
@@ -24424,12 +24408,12 @@ function createAnimateManager() {
|
|
|
24424
24408
|
};
|
|
24425
24409
|
}
|
|
24426
24410
|
|
|
24427
|
-
function _typeof$
|
|
24428
|
-
function ownKeys$
|
|
24429
|
-
function _objectSpread$
|
|
24430
|
-
function _defineProperty$
|
|
24431
|
-
function _toPropertyKey$
|
|
24432
|
-
function _toPrimitive$
|
|
24411
|
+
function _typeof$n(obj) { "@babel/helpers - typeof"; return _typeof$n = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$n(obj); }
|
|
24412
|
+
function ownKeys$m(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24413
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty$o(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24414
|
+
function _defineProperty$o(obj, key, value) { key = _toPropertyKey$n(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24415
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24416
|
+
function _toPrimitive$n(input, hint) { if (_typeof$n(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$n(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24433
24417
|
/* eslint no-console: 0 */
|
|
24434
24418
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24435
24419
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24461,7 +24445,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24461
24445
|
*/
|
|
24462
24446
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24463
24447
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24464
|
-
return _defineProperty$
|
|
24448
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24465
24449
|
}
|
|
24466
24450
|
var isTransition = name === 'transition';
|
|
24467
24451
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24472,7 +24456,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24472
24456
|
if (isTransition) {
|
|
24473
24457
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24474
24458
|
}
|
|
24475
|
-
return _objectSpread$
|
|
24459
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24476
24460
|
}, {});
|
|
24477
24461
|
};
|
|
24478
24462
|
|
|
@@ -24482,7 +24466,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24482
24466
|
*/
|
|
24483
24467
|
var mapObject = function mapObject(fn, obj) {
|
|
24484
24468
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24485
|
-
return _objectSpread$
|
|
24469
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24486
24470
|
}, {});
|
|
24487
24471
|
};
|
|
24488
24472
|
|
|
@@ -24492,7 +24476,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24492
24476
|
*/
|
|
24493
24477
|
var translateStyle = function translateStyle(style) {
|
|
24494
24478
|
return Object.keys(style).reduce(function (res, key) {
|
|
24495
|
-
return _objectSpread$
|
|
24479
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24496
24480
|
}, style);
|
|
24497
24481
|
};
|
|
24498
24482
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24520,16 +24504,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24520
24504
|
}
|
|
24521
24505
|
};
|
|
24522
24506
|
|
|
24523
|
-
function _slicedToArray$
|
|
24524
|
-
function _nonIterableRest$
|
|
24525
|
-
function _iterableToArrayLimit$
|
|
24526
|
-
function _arrayWithHoles$
|
|
24527
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24507
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24508
|
+
function _nonIterableRest$a() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24509
|
+
function _iterableToArrayLimit$a(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24510
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24511
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24528
24512
|
function _nonIterableSpread$a() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24529
|
-
function _unsupportedIterableToArray$
|
|
24513
|
+
function _unsupportedIterableToArray$h(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$h(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$h(o, minLen); }
|
|
24530
24514
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24531
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24532
|
-
function _arrayLikeToArray$
|
|
24515
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24516
|
+
function _arrayLikeToArray$h(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24533
24517
|
var ACCURACY = 1e-4;
|
|
24534
24518
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24535
24519
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24605,7 +24589,7 @@ var configBezier = function configBezier() {
|
|
|
24605
24589
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24606
24590
|
return parseFloat(x);
|
|
24607
24591
|
});
|
|
24608
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24592
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24609
24593
|
x1 = _easing$1$split$0$spl2[0];
|
|
24610
24594
|
y1 = _easing$1$split$0$spl2[1];
|
|
24611
24595
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24698,22 +24682,22 @@ var configEasing = function configEasing() {
|
|
|
24698
24682
|
return null;
|
|
24699
24683
|
};
|
|
24700
24684
|
|
|
24701
|
-
function _typeof$
|
|
24702
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24685
|
+
function _typeof$m(obj) { "@babel/helpers - typeof"; return _typeof$m = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$m(obj); }
|
|
24686
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24703
24687
|
function _nonIterableSpread$9() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24704
24688
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24705
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24706
|
-
function ownKeys$
|
|
24707
|
-
function _objectSpread$
|
|
24708
|
-
function _defineProperty$
|
|
24709
|
-
function _toPropertyKey$
|
|
24710
|
-
function _toPrimitive$
|
|
24711
|
-
function _slicedToArray$
|
|
24712
|
-
function _nonIterableRest$
|
|
24713
|
-
function _unsupportedIterableToArray$
|
|
24714
|
-
function _arrayLikeToArray$
|
|
24715
|
-
function _iterableToArrayLimit$
|
|
24716
|
-
function _arrayWithHoles$
|
|
24689
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24690
|
+
function ownKeys$l(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24691
|
+
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty$n(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24692
|
+
function _defineProperty$n(obj, key, value) { key = _toPropertyKey$m(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24693
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24694
|
+
function _toPrimitive$m(input, hint) { if (_typeof$m(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$m(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24695
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24696
|
+
function _nonIterableRest$9() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24697
|
+
function _unsupportedIterableToArray$g(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$g(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$g(o, minLen); }
|
|
24698
|
+
function _arrayLikeToArray$g(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24699
|
+
function _iterableToArrayLimit$9(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24700
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24717
24701
|
var alpha = function alpha(begin, end, k) {
|
|
24718
24702
|
return begin + (end - begin) * k;
|
|
24719
24703
|
};
|
|
@@ -24731,10 +24715,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24731
24715
|
var nextStepVals = mapObject(function (key, val) {
|
|
24732
24716
|
if (needContinue(val)) {
|
|
24733
24717
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24734
|
-
_easing2 = _slicedToArray$
|
|
24718
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24735
24719
|
newX = _easing2[0],
|
|
24736
24720
|
newV = _easing2[1];
|
|
24737
|
-
return _objectSpread$
|
|
24721
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24738
24722
|
from: newX,
|
|
24739
24723
|
velocity: newV
|
|
24740
24724
|
});
|
|
@@ -24744,7 +24728,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24744
24728
|
if (steps < 1) {
|
|
24745
24729
|
return mapObject(function (key, val) {
|
|
24746
24730
|
if (needContinue(val)) {
|
|
24747
|
-
return _objectSpread$
|
|
24731
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24748
24732
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24749
24733
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24750
24734
|
});
|
|
@@ -24759,10 +24743,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24759
24743
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24760
24744
|
var interKeys = getIntersectionKeys(from, to);
|
|
24761
24745
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24762
|
-
return _objectSpread$
|
|
24746
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24763
24747
|
}, {});
|
|
24764
24748
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24765
|
-
return _objectSpread$
|
|
24749
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24766
24750
|
from: from[key],
|
|
24767
24751
|
velocity: 0,
|
|
24768
24752
|
to: to[key]
|
|
@@ -24792,7 +24776,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24792
24776
|
var steps = deltaTime / easing.dt;
|
|
24793
24777
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24794
24778
|
// get union set and add compatible prefix
|
|
24795
|
-
render(_objectSpread$
|
|
24779
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24796
24780
|
preTime = now;
|
|
24797
24781
|
if (!shouldStopAnimation()) {
|
|
24798
24782
|
cafId = requestAnimationFrame(update);
|
|
@@ -24810,14 +24794,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24810
24794
|
}, timingStyle);
|
|
24811
24795
|
|
|
24812
24796
|
// get union set and add compatible prefix
|
|
24813
|
-
render(_objectSpread$
|
|
24797
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24814
24798
|
if (t < 1) {
|
|
24815
24799
|
cafId = requestAnimationFrame(update);
|
|
24816
24800
|
} else {
|
|
24817
24801
|
var finalStyle = mapObject(function (key, val) {
|
|
24818
24802
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24819
24803
|
}, timingStyle);
|
|
24820
|
-
render(_objectSpread$
|
|
24804
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24821
24805
|
}
|
|
24822
24806
|
};
|
|
24823
24807
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24833,37 +24817,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24833
24817
|
};
|
|
24834
24818
|
});
|
|
24835
24819
|
|
|
24836
|
-
function _typeof$
|
|
24837
|
-
var _excluded$
|
|
24838
|
-
function _objectWithoutProperties$
|
|
24839
|
-
function _objectWithoutPropertiesLoose$
|
|
24840
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24820
|
+
function _typeof$l(obj) { "@babel/helpers - typeof"; return _typeof$l = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$l(obj); }
|
|
24821
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24822
|
+
function _objectWithoutProperties$8(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$8(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
24823
|
+
function _objectWithoutPropertiesLoose$8(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
24824
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24841
24825
|
function _nonIterableSpread$8() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24842
|
-
function _unsupportedIterableToArray$
|
|
24826
|
+
function _unsupportedIterableToArray$f(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$f(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$f(o, minLen); }
|
|
24843
24827
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24844
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24845
|
-
function _arrayLikeToArray$
|
|
24846
|
-
function ownKeys$
|
|
24847
|
-
function _objectSpread$
|
|
24848
|
-
function _defineProperty$
|
|
24849
|
-
function _classCallCheck$
|
|
24850
|
-
function _defineProperties$
|
|
24851
|
-
function _createClass$
|
|
24852
|
-
function _toPropertyKey$
|
|
24853
|
-
function _toPrimitive$
|
|
24854
|
-
function _inherits$
|
|
24855
|
-
function _setPrototypeOf$
|
|
24856
|
-
function _createSuper$
|
|
24857
|
-
function _possibleConstructorReturn$
|
|
24858
|
-
function _assertThisInitialized$
|
|
24859
|
-
function _isNativeReflectConstruct$
|
|
24860
|
-
function _getPrototypeOf$
|
|
24828
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24829
|
+
function _arrayLikeToArray$f(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24830
|
+
function ownKeys$k(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
24831
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty$m(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24832
|
+
function _defineProperty$m(obj, key, value) { key = _toPropertyKey$l(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24833
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24834
|
+
function _defineProperties$8(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$l(descriptor.key), descriptor); } }
|
|
24835
|
+
function _createClass$8(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$8(Constructor.prototype, protoProps); if (staticProps) _defineProperties$8(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
24836
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24837
|
+
function _toPrimitive$l(input, hint) { if (_typeof$l(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$l(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24838
|
+
function _inherits$6(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf$6(subClass, superClass); }
|
|
24839
|
+
function _setPrototypeOf$6(o, p) { _setPrototypeOf$6 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$6(o, p); }
|
|
24840
|
+
function _createSuper$6(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$6(); return function _createSuperInternal() { var Super = _getPrototypeOf$6(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$6(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$6(this, result); }; }
|
|
24841
|
+
function _possibleConstructorReturn$6(self, call) { if (call && (_typeof$l(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$6(self); }
|
|
24842
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24843
|
+
function _isNativeReflectConstruct$6() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
24844
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24861
24845
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24862
|
-
_inherits$
|
|
24863
|
-
var _super = _createSuper$
|
|
24846
|
+
_inherits$6(Animate, _PureComponent);
|
|
24847
|
+
var _super = _createSuper$6(Animate);
|
|
24864
24848
|
function Animate(props, context) {
|
|
24865
24849
|
var _this;
|
|
24866
|
-
_classCallCheck$
|
|
24850
|
+
_classCallCheck$8(this, Animate);
|
|
24867
24851
|
_this = _super.call(this, props, context);
|
|
24868
24852
|
var _this$props = _this.props,
|
|
24869
24853
|
isActive = _this$props.isActive,
|
|
@@ -24873,8 +24857,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24873
24857
|
steps = _this$props.steps,
|
|
24874
24858
|
children = _this$props.children,
|
|
24875
24859
|
duration = _this$props.duration;
|
|
24876
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24877
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24860
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24861
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24878
24862
|
if (!isActive || duration <= 0) {
|
|
24879
24863
|
_this.state = {
|
|
24880
24864
|
style: {}
|
|
@@ -24886,7 +24870,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24886
24870
|
style: to
|
|
24887
24871
|
};
|
|
24888
24872
|
}
|
|
24889
|
-
return _possibleConstructorReturn$
|
|
24873
|
+
return _possibleConstructorReturn$6(_this);
|
|
24890
24874
|
}
|
|
24891
24875
|
if (steps && steps.length) {
|
|
24892
24876
|
_this.state = {
|
|
@@ -24897,10 +24881,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24897
24881
|
_this.state = {
|
|
24898
24882
|
style: from
|
|
24899
24883
|
};
|
|
24900
|
-
return _possibleConstructorReturn$
|
|
24884
|
+
return _possibleConstructorReturn$6(_this);
|
|
24901
24885
|
}
|
|
24902
24886
|
_this.state = {
|
|
24903
|
-
style: attributeName ? _defineProperty$
|
|
24887
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24904
24888
|
};
|
|
24905
24889
|
} else {
|
|
24906
24890
|
_this.state = {
|
|
@@ -24909,7 +24893,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24909
24893
|
}
|
|
24910
24894
|
return _this;
|
|
24911
24895
|
}
|
|
24912
|
-
_createClass$
|
|
24896
|
+
_createClass$8(Animate, [{
|
|
24913
24897
|
key: "componentDidMount",
|
|
24914
24898
|
value: function componentDidMount() {
|
|
24915
24899
|
var _this$props2 = this.props,
|
|
@@ -24937,7 +24921,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24937
24921
|
}
|
|
24938
24922
|
if (!isActive) {
|
|
24939
24923
|
var newState = {
|
|
24940
|
-
style: attributeName ? _defineProperty$
|
|
24924
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24941
24925
|
};
|
|
24942
24926
|
if (this.state && style) {
|
|
24943
24927
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24960,14 +24944,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24960
24944
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24961
24945
|
if (this.state && style) {
|
|
24962
24946
|
var _newState = {
|
|
24963
|
-
style: attributeName ? _defineProperty$
|
|
24947
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24964
24948
|
};
|
|
24965
24949
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24966
24950
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24967
24951
|
this.setState(_newState);
|
|
24968
24952
|
}
|
|
24969
24953
|
}
|
|
24970
|
-
this.runAnimation(_objectSpread$
|
|
24954
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24971
24955
|
from: from,
|
|
24972
24956
|
begin: 0
|
|
24973
24957
|
}));
|
|
@@ -25050,7 +25034,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25050
25034
|
}), duration]);
|
|
25051
25035
|
}
|
|
25052
25036
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25053
|
-
var newStyle = _objectSpread$
|
|
25037
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25054
25038
|
transition: transition
|
|
25055
25039
|
});
|
|
25056
25040
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25082,9 +25066,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25082
25066
|
this.runStepAnimation(props);
|
|
25083
25067
|
return;
|
|
25084
25068
|
}
|
|
25085
|
-
var to = attributeName ? _defineProperty$
|
|
25069
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25086
25070
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25087
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25071
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25088
25072
|
transition: transition
|
|
25089
25073
|
}), duration, onAnimationEnd]);
|
|
25090
25074
|
}
|
|
@@ -25105,7 +25089,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25105
25089
|
_this$props4.onAnimationEnd;
|
|
25106
25090
|
_this$props4.shouldReAnimate;
|
|
25107
25091
|
_this$props4.onAnimationReStart;
|
|
25108
|
-
var others = _objectWithoutProperties$
|
|
25092
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25109
25093
|
var count = Children.count(children);
|
|
25110
25094
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25111
25095
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25120,8 +25104,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25120
25104
|
_container$props$styl = _container$props.style,
|
|
25121
25105
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25122
25106
|
className = _container$props.className;
|
|
25123
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25124
|
-
style: _objectSpread$
|
|
25107
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25108
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25125
25109
|
className: className
|
|
25126
25110
|
}));
|
|
25127
25111
|
return res;
|
|
@@ -25646,10 +25630,10 @@ var defineProperty$2 = (function() {
|
|
|
25646
25630
|
} catch (e) {}
|
|
25647
25631
|
}());
|
|
25648
25632
|
|
|
25649
|
-
var _defineProperty$
|
|
25633
|
+
var _defineProperty$l = defineProperty$2;
|
|
25650
25634
|
|
|
25651
25635
|
var constant$1 = constant_1,
|
|
25652
|
-
defineProperty$1 = _defineProperty$
|
|
25636
|
+
defineProperty$1 = _defineProperty$l,
|
|
25653
25637
|
identity$7 = identity_1;
|
|
25654
25638
|
|
|
25655
25639
|
/**
|
|
@@ -25826,18 +25810,18 @@ var sortBy_1 = sortBy;
|
|
|
25826
25810
|
/**
|
|
25827
25811
|
* @fileOverview Default Tooltip Content
|
|
25828
25812
|
*/
|
|
25829
|
-
function _typeof$
|
|
25830
|
-
function _slicedToArray$
|
|
25831
|
-
function _nonIterableRest$
|
|
25832
|
-
function _unsupportedIterableToArray$
|
|
25833
|
-
function _arrayLikeToArray$
|
|
25834
|
-
function _iterableToArrayLimit$
|
|
25835
|
-
function _arrayWithHoles$
|
|
25836
|
-
function ownKeys$
|
|
25837
|
-
function _objectSpread$
|
|
25838
|
-
function _defineProperty$
|
|
25839
|
-
function _toPropertyKey$
|
|
25840
|
-
function _toPrimitive$
|
|
25813
|
+
function _typeof$k(obj) { "@babel/helpers - typeof"; return _typeof$k = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$k(obj); }
|
|
25814
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25815
|
+
function _nonIterableRest$8() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25816
|
+
function _unsupportedIterableToArray$e(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$e(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$e(o, minLen); }
|
|
25817
|
+
function _arrayLikeToArray$e(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25818
|
+
function _iterableToArrayLimit$8(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
25819
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25820
|
+
function ownKeys$j(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25821
|
+
function _objectSpread$j(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$j(Object(source), !0).forEach(function (key) { _defineProperty$k(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$j(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25822
|
+
function _defineProperty$k(obj, key, value) { key = _toPropertyKey$k(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25823
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25824
|
+
function _toPrimitive$k(input, hint) { if (_typeof$k(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$k(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25841
25825
|
function defaultFormatter(value) {
|
|
25842
25826
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25843
25827
|
}
|
|
@@ -25867,7 +25851,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25867
25851
|
if (entry.type === 'none') {
|
|
25868
25852
|
return null;
|
|
25869
25853
|
}
|
|
25870
|
-
var finalItemStyle = _objectSpread$
|
|
25854
|
+
var finalItemStyle = _objectSpread$j({
|
|
25871
25855
|
display: 'block',
|
|
25872
25856
|
paddingTop: 4,
|
|
25873
25857
|
paddingBottom: 4,
|
|
@@ -25881,7 +25865,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25881
25865
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25882
25866
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25883
25867
|
if (Array.isArray(formatted)) {
|
|
25884
|
-
var _formatted = _slicedToArray$
|
|
25868
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25885
25869
|
finalValue = _formatted[0];
|
|
25886
25870
|
finalName = _formatted[1];
|
|
25887
25871
|
} else {
|
|
@@ -25913,14 +25897,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25913
25897
|
}
|
|
25914
25898
|
return null;
|
|
25915
25899
|
};
|
|
25916
|
-
var finalStyle = _objectSpread$
|
|
25900
|
+
var finalStyle = _objectSpread$j({
|
|
25917
25901
|
margin: 0,
|
|
25918
25902
|
padding: 10,
|
|
25919
25903
|
backgroundColor: '#fff',
|
|
25920
25904
|
border: '1px solid #ccc',
|
|
25921
25905
|
whiteSpace: 'nowrap'
|
|
25922
25906
|
}, contentStyle);
|
|
25923
|
-
var finalLabelStyle = _objectSpread$
|
|
25907
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25924
25908
|
margin: 0
|
|
25925
25909
|
}, labelStyle);
|
|
25926
25910
|
var hasLabel = !isNil_1(label);
|
|
@@ -25961,22 +25945,18 @@ var Global = {
|
|
|
25961
25945
|
}
|
|
25962
25946
|
};
|
|
25963
25947
|
|
|
25964
|
-
function _typeof$
|
|
25965
|
-
function ownKeys$
|
|
25966
|
-
function _objectSpread$
|
|
25967
|
-
function
|
|
25968
|
-
function
|
|
25969
|
-
function
|
|
25970
|
-
function
|
|
25971
|
-
function
|
|
25972
|
-
function
|
|
25973
|
-
function
|
|
25974
|
-
function
|
|
25975
|
-
function
|
|
25976
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25977
|
-
function _defineProperty$m(obj, key, value) { key = _toPropertyKey$m(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25978
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25979
|
-
function _toPrimitive$m(input, hint) { if (_typeof$m(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$m(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25948
|
+
function _typeof$j(obj) { "@babel/helpers - typeof"; return _typeof$j = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$j(obj); }
|
|
25949
|
+
function ownKeys$i(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25950
|
+
function _objectSpread$i(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$i(Object(source), !0).forEach(function (key) { _defineProperty$j(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$i(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25951
|
+
function _defineProperty$j(obj, key, value) { key = _toPropertyKey$j(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25952
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25953
|
+
function _toPrimitive$j(input, hint) { if (_typeof$j(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$j(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25954
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25955
|
+
function _nonIterableRest$7() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25956
|
+
function _unsupportedIterableToArray$d(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$d(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$d(o, minLen); }
|
|
25957
|
+
function _arrayLikeToArray$d(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
25958
|
+
function _iterableToArrayLimit$7(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
25959
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25980
25960
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25981
25961
|
var EPS$1 = 1;
|
|
25982
25962
|
function defaultUniqBy(entry) {
|
|
@@ -26000,204 +25980,7 @@ function renderContent(content, props) {
|
|
|
26000
25980
|
}
|
|
26001
25981
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26002
25982
|
}
|
|
26003
|
-
var
|
|
26004
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26005
|
-
var _super = _createSuper$6(Tooltip);
|
|
26006
|
-
function Tooltip() {
|
|
26007
|
-
var _this;
|
|
26008
|
-
_classCallCheck$8(this, Tooltip);
|
|
26009
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26010
|
-
args[_key] = arguments[_key];
|
|
26011
|
-
}
|
|
26012
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26013
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26014
|
-
boxWidth: -1,
|
|
26015
|
-
boxHeight: -1,
|
|
26016
|
-
dismissed: false,
|
|
26017
|
-
dismissedAtCoordinate: {
|
|
26018
|
-
x: 0,
|
|
26019
|
-
y: 0
|
|
26020
|
-
}
|
|
26021
|
-
});
|
|
26022
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26023
|
-
if (event.key === 'Escape') {
|
|
26024
|
-
_this.setState({
|
|
26025
|
-
dismissed: true,
|
|
26026
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26027
|
-
x: _this.props.coordinate.x,
|
|
26028
|
-
y: _this.props.coordinate.y
|
|
26029
|
-
})
|
|
26030
|
-
});
|
|
26031
|
-
}
|
|
26032
|
-
});
|
|
26033
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26034
|
-
var key = _ref.key,
|
|
26035
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26036
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26037
|
-
var _this$props = _this.props,
|
|
26038
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26039
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26040
|
-
coordinate = _this$props.coordinate,
|
|
26041
|
-
offset = _this$props.offset,
|
|
26042
|
-
position = _this$props.position,
|
|
26043
|
-
viewBox = _this$props.viewBox;
|
|
26044
|
-
if (position && isNumber(position[key])) {
|
|
26045
|
-
return position[key];
|
|
26046
|
-
}
|
|
26047
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26048
|
-
var positive = coordinate[key] + offset;
|
|
26049
|
-
if (allowEscapeViewBox[key]) {
|
|
26050
|
-
return reverseDirection[key] ? negative : positive;
|
|
26051
|
-
}
|
|
26052
|
-
if (reverseDirection[key]) {
|
|
26053
|
-
var _tooltipBoundary = negative;
|
|
26054
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26055
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26056
|
-
return Math.max(positive, viewBox[key]);
|
|
26057
|
-
}
|
|
26058
|
-
return Math.max(negative, viewBox[key]);
|
|
26059
|
-
}
|
|
26060
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26061
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26062
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26063
|
-
return Math.max(negative, viewBox[key]);
|
|
26064
|
-
}
|
|
26065
|
-
return Math.max(positive, viewBox[key]);
|
|
26066
|
-
});
|
|
26067
|
-
return _this;
|
|
26068
|
-
}
|
|
26069
|
-
_createClass$8(Tooltip, [{
|
|
26070
|
-
key: "componentDidMount",
|
|
26071
|
-
value: function componentDidMount() {
|
|
26072
|
-
this.updateBBox();
|
|
26073
|
-
}
|
|
26074
|
-
}, {
|
|
26075
|
-
key: "componentWillUnmount",
|
|
26076
|
-
value: function componentWillUnmount() {
|
|
26077
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26078
|
-
}
|
|
26079
|
-
}, {
|
|
26080
|
-
key: "componentDidUpdate",
|
|
26081
|
-
value: function componentDidUpdate() {
|
|
26082
|
-
this.updateBBox();
|
|
26083
|
-
}
|
|
26084
|
-
}, {
|
|
26085
|
-
key: "updateBBox",
|
|
26086
|
-
value: function updateBBox() {
|
|
26087
|
-
var _this$state = this.state,
|
|
26088
|
-
boxWidth = _this$state.boxWidth,
|
|
26089
|
-
boxHeight = _this$state.boxHeight,
|
|
26090
|
-
dismissed = _this$state.dismissed;
|
|
26091
|
-
if (dismissed) {
|
|
26092
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26093
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26094
|
-
this.setState({
|
|
26095
|
-
dismissed: false
|
|
26096
|
-
});
|
|
26097
|
-
}
|
|
26098
|
-
} else {
|
|
26099
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26100
|
-
}
|
|
26101
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26102
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26103
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26104
|
-
this.setState({
|
|
26105
|
-
boxWidth: box.width,
|
|
26106
|
-
boxHeight: box.height
|
|
26107
|
-
});
|
|
26108
|
-
}
|
|
26109
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26110
|
-
this.setState({
|
|
26111
|
-
boxWidth: -1,
|
|
26112
|
-
boxHeight: -1
|
|
26113
|
-
});
|
|
26114
|
-
}
|
|
26115
|
-
}
|
|
26116
|
-
}, {
|
|
26117
|
-
key: "render",
|
|
26118
|
-
value: function render() {
|
|
26119
|
-
var _classNames,
|
|
26120
|
-
_this2 = this;
|
|
26121
|
-
var _this$props2 = this.props,
|
|
26122
|
-
payload = _this$props2.payload,
|
|
26123
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26124
|
-
animationDuration = _this$props2.animationDuration,
|
|
26125
|
-
animationEasing = _this$props2.animationEasing,
|
|
26126
|
-
filterNull = _this$props2.filterNull,
|
|
26127
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26128
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26129
|
-
return !isNil_1(entry.value);
|
|
26130
|
-
}) : payload);
|
|
26131
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26132
|
-
var _this$props3 = this.props,
|
|
26133
|
-
content = _this$props3.content,
|
|
26134
|
-
viewBox = _this$props3.viewBox,
|
|
26135
|
-
coordinate = _this$props3.coordinate,
|
|
26136
|
-
position = _this$props3.position,
|
|
26137
|
-
active = _this$props3.active,
|
|
26138
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26139
|
-
var outerStyle = _objectSpread$l({
|
|
26140
|
-
pointerEvents: 'none',
|
|
26141
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26142
|
-
position: 'absolute',
|
|
26143
|
-
top: 0,
|
|
26144
|
-
left: 0
|
|
26145
|
-
}, wrapperStyle);
|
|
26146
|
-
var translateX, translateY;
|
|
26147
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26148
|
-
translateX = position.x;
|
|
26149
|
-
translateY = position.y;
|
|
26150
|
-
} else {
|
|
26151
|
-
var _this$state2 = this.state,
|
|
26152
|
-
boxWidth = _this$state2.boxWidth,
|
|
26153
|
-
boxHeight = _this$state2.boxHeight;
|
|
26154
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26155
|
-
translateX = this.getTranslate({
|
|
26156
|
-
key: 'x',
|
|
26157
|
-
tooltipDimension: boxWidth,
|
|
26158
|
-
viewBoxDimension: viewBox.width
|
|
26159
|
-
});
|
|
26160
|
-
translateY = this.getTranslate({
|
|
26161
|
-
key: 'y',
|
|
26162
|
-
tooltipDimension: boxHeight,
|
|
26163
|
-
viewBoxDimension: viewBox.height
|
|
26164
|
-
});
|
|
26165
|
-
} else {
|
|
26166
|
-
outerStyle.visibility = 'hidden';
|
|
26167
|
-
}
|
|
26168
|
-
}
|
|
26169
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26170
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26171
|
-
})), outerStyle);
|
|
26172
|
-
if (isAnimationActive && active) {
|
|
26173
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26174
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26175
|
-
})), outerStyle);
|
|
26176
|
-
}
|
|
26177
|
-
var cls = classNames(CLS_PREFIX, (_classNames = {}, _defineProperty$m(_classNames, "".concat(CLS_PREFIX, "-right"), isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX >= coordinate.x), _defineProperty$m(_classNames, "".concat(CLS_PREFIX, "-left"), isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX < coordinate.x), _defineProperty$m(_classNames, "".concat(CLS_PREFIX, "-bottom"), isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY >= coordinate.y), _defineProperty$m(_classNames, "".concat(CLS_PREFIX, "-top"), isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY < coordinate.y), _classNames));
|
|
26178
|
-
return (
|
|
26179
|
-
/*#__PURE__*/
|
|
26180
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26181
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26182
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26183
|
-
React__default.createElement("div", {
|
|
26184
|
-
tabIndex: -1,
|
|
26185
|
-
role: "dialog",
|
|
26186
|
-
className: cls,
|
|
26187
|
-
style: outerStyle,
|
|
26188
|
-
ref: function ref(node) {
|
|
26189
|
-
_this2.wrapperNode = node;
|
|
26190
|
-
}
|
|
26191
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26192
|
-
payload: finalPayload
|
|
26193
|
-
})))
|
|
26194
|
-
);
|
|
26195
|
-
}
|
|
26196
|
-
}]);
|
|
26197
|
-
return Tooltip;
|
|
26198
|
-
}(PureComponent);
|
|
26199
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26200
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25983
|
+
var tooltipDefaultProps = {
|
|
26201
25984
|
active: false,
|
|
26202
25985
|
allowEscapeViewBox: {
|
|
26203
25986
|
x: false,
|
|
@@ -26218,6 +26001,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26218
26001
|
x: 0,
|
|
26219
26002
|
y: 0
|
|
26220
26003
|
},
|
|
26004
|
+
// this doesn't exist on TooltipProps
|
|
26005
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26006
|
+
// @ts-ignore
|
|
26221
26007
|
cursorStyle: {},
|
|
26222
26008
|
separator: ' : ',
|
|
26223
26009
|
wrapperStyle: {},
|
|
@@ -26231,7 +26017,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26231
26017
|
animationDuration: 400,
|
|
26232
26018
|
filterNull: true,
|
|
26233
26019
|
useTranslate3d: false
|
|
26234
|
-
}
|
|
26020
|
+
};
|
|
26021
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26022
|
+
var _classNames;
|
|
26023
|
+
var _useState = useState(-1),
|
|
26024
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26025
|
+
boxWidth = _useState2[0],
|
|
26026
|
+
setBoxWidth = _useState2[1];
|
|
26027
|
+
var _useState3 = useState(-1),
|
|
26028
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26029
|
+
boxHeight = _useState4[0],
|
|
26030
|
+
setBoxHeight = _useState4[1];
|
|
26031
|
+
var _useState5 = useState(false),
|
|
26032
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26033
|
+
dismissed = _useState6[0],
|
|
26034
|
+
setDismissed = _useState6[1];
|
|
26035
|
+
var _useState7 = useState({
|
|
26036
|
+
x: 0,
|
|
26037
|
+
y: 0
|
|
26038
|
+
}),
|
|
26039
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26040
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26041
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26042
|
+
var wrapperNode = useRef();
|
|
26043
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26044
|
+
reverseDirection = props.reverseDirection,
|
|
26045
|
+
coordinate = props.coordinate,
|
|
26046
|
+
offset = props.offset,
|
|
26047
|
+
position = props.position,
|
|
26048
|
+
viewBox = props.viewBox;
|
|
26049
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26050
|
+
if (event.key === 'Escape') {
|
|
26051
|
+
setDismissed(true);
|
|
26052
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26053
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26054
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26055
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26056
|
+
});
|
|
26057
|
+
});
|
|
26058
|
+
}
|
|
26059
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26060
|
+
useEffect(function () {
|
|
26061
|
+
var updateBBox = function updateBBox() {
|
|
26062
|
+
if (dismissed) {
|
|
26063
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26064
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26065
|
+
setDismissed(false);
|
|
26066
|
+
}
|
|
26067
|
+
} else {
|
|
26068
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26069
|
+
}
|
|
26070
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26071
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26072
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26073
|
+
setBoxWidth(box.width);
|
|
26074
|
+
setBoxHeight(box.height);
|
|
26075
|
+
}
|
|
26076
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26077
|
+
setBoxWidth(-1);
|
|
26078
|
+
setBoxHeight(-1);
|
|
26079
|
+
}
|
|
26080
|
+
};
|
|
26081
|
+
updateBBox();
|
|
26082
|
+
return function () {
|
|
26083
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26084
|
+
};
|
|
26085
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26086
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26087
|
+
var key = _ref.key,
|
|
26088
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26089
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26090
|
+
if (position && isNumber(position[key])) {
|
|
26091
|
+
return position[key];
|
|
26092
|
+
}
|
|
26093
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26094
|
+
var positive = coordinate[key] + offset;
|
|
26095
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26096
|
+
return reverseDirection[key] ? negative : positive;
|
|
26097
|
+
}
|
|
26098
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26099
|
+
var _tooltipBoundary = negative;
|
|
26100
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26101
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26102
|
+
return Math.max(positive, viewBox[key]);
|
|
26103
|
+
}
|
|
26104
|
+
return Math.max(negative, viewBox[key]);
|
|
26105
|
+
}
|
|
26106
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26107
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26108
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26109
|
+
return Math.max(negative, viewBox[key]);
|
|
26110
|
+
}
|
|
26111
|
+
return Math.max(positive, viewBox[key]);
|
|
26112
|
+
};
|
|
26113
|
+
var payload = props.payload,
|
|
26114
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26115
|
+
filterNull = props.filterNull,
|
|
26116
|
+
active = props.active,
|
|
26117
|
+
wrapperStyle = props.wrapperStyle,
|
|
26118
|
+
useTranslate3d = props.useTranslate3d,
|
|
26119
|
+
isAnimationActive = props.isAnimationActive,
|
|
26120
|
+
animationDuration = props.animationDuration,
|
|
26121
|
+
animationEasing = props.animationEasing;
|
|
26122
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26123
|
+
return !isNil_1(entry.value);
|
|
26124
|
+
}) : payload);
|
|
26125
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26126
|
+
var content = props.content;
|
|
26127
|
+
var outerStyle = _objectSpread$i({
|
|
26128
|
+
pointerEvents: 'none',
|
|
26129
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26130
|
+
position: 'absolute',
|
|
26131
|
+
top: 0,
|
|
26132
|
+
left: 0
|
|
26133
|
+
}, wrapperStyle);
|
|
26134
|
+
var translateX, translateY;
|
|
26135
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26136
|
+
translateX = position.x;
|
|
26137
|
+
translateY = position.y;
|
|
26138
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26139
|
+
translateX = getTranslate({
|
|
26140
|
+
key: 'x',
|
|
26141
|
+
tooltipDimension: boxWidth,
|
|
26142
|
+
viewBoxDimension: viewBox.width
|
|
26143
|
+
});
|
|
26144
|
+
translateY = getTranslate({
|
|
26145
|
+
key: 'y',
|
|
26146
|
+
tooltipDimension: boxHeight,
|
|
26147
|
+
viewBoxDimension: viewBox.height
|
|
26148
|
+
});
|
|
26149
|
+
} else {
|
|
26150
|
+
outerStyle.visibility = 'hidden';
|
|
26151
|
+
}
|
|
26152
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26153
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26154
|
+
})), outerStyle);
|
|
26155
|
+
if (isAnimationActive && active) {
|
|
26156
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26157
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26158
|
+
})), outerStyle);
|
|
26159
|
+
}
|
|
26160
|
+
var cls = classNames(CLS_PREFIX, (_classNames = {}, _defineProperty$j(_classNames, "".concat(CLS_PREFIX, "-right"), isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX >= coordinate.x), _defineProperty$j(_classNames, "".concat(CLS_PREFIX, "-left"), isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX < coordinate.x), _defineProperty$j(_classNames, "".concat(CLS_PREFIX, "-bottom"), isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY >= coordinate.y), _defineProperty$j(_classNames, "".concat(CLS_PREFIX, "-top"), isNumber(translateY) && coordinate && isNumber(coordinate.y) && translateY < coordinate.y), _classNames));
|
|
26161
|
+
return (
|
|
26162
|
+
/*#__PURE__*/
|
|
26163
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26164
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26165
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26166
|
+
React__default.createElement("div", {
|
|
26167
|
+
tabIndex: -1,
|
|
26168
|
+
role: "dialog",
|
|
26169
|
+
className: cls,
|
|
26170
|
+
style: outerStyle,
|
|
26171
|
+
ref: wrapperNode
|
|
26172
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26173
|
+
payload: finalPayload
|
|
26174
|
+
})))
|
|
26175
|
+
);
|
|
26176
|
+
};
|
|
26177
|
+
|
|
26178
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26179
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26180
|
+
|
|
26181
|
+
/**
|
|
26182
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26183
|
+
* children.props when there are no props set by the consumer
|
|
26184
|
+
* doesn't work if using default parameters
|
|
26185
|
+
*/
|
|
26186
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26235
26187
|
|
|
26236
26188
|
var root = _root;
|
|
26237
26189
|
|
|
@@ -31801,12 +31753,12 @@ module.exports = exports['default'];
|
|
|
31801
31753
|
|
|
31802
31754
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31803
31755
|
|
|
31804
|
-
function _typeof$
|
|
31805
|
-
function ownKeys$
|
|
31806
|
-
function _objectSpread$
|
|
31807
|
-
function _defineProperty$
|
|
31808
|
-
function _toPropertyKey$
|
|
31809
|
-
function _toPrimitive$
|
|
31756
|
+
function _typeof$i(obj) { "@babel/helpers - typeof"; return _typeof$i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$i(obj); }
|
|
31757
|
+
function ownKeys$h(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31758
|
+
function _objectSpread$h(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$h(Object(source), !0).forEach(function (key) { _defineProperty$i(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$h(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31759
|
+
function _defineProperty$i(obj, key, value) { key = _toPropertyKey$i(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31760
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31761
|
+
function _toPrimitive$i(input, hint) { if (_typeof$i(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$i(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
31810
31762
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31811
31763
|
function _nonIterableSpread$7() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31812
31764
|
function _unsupportedIterableToArray$b(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$b(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$b(o, minLen); }
|
|
@@ -31874,7 +31826,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31874
31826
|
}
|
|
31875
31827
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31876
31828
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31877
|
-
var measurementSpanStyle = _objectSpread$
|
|
31829
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31878
31830
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31879
31831
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31880
31832
|
return styleKey;
|
|
@@ -31929,11 +31881,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31929
31881
|
};
|
|
31930
31882
|
};
|
|
31931
31883
|
|
|
31932
|
-
var _excluded$
|
|
31933
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31884
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31934
31885
|
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
31935
|
-
function _objectWithoutProperties$
|
|
31936
|
-
function _objectWithoutPropertiesLoose$
|
|
31886
|
+
function _objectWithoutProperties$7(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$7(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31887
|
+
function _objectWithoutPropertiesLoose$7(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31937
31888
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31938
31889
|
function _nonIterableRest$5() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31939
31890
|
function _unsupportedIterableToArray$a(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$a(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$a(o, minLen); }
|
|
@@ -32087,46 +32038,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32087
32038
|
}
|
|
32088
32039
|
return getWordsWithoutCalculate(children);
|
|
32089
32040
|
};
|
|
32090
|
-
var
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
|
|
32095
|
-
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32104
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32105
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32106
|
-
_ref5$fill = _ref5.fill,
|
|
32107
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32108
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32041
|
+
var textDefaultProps = {
|
|
32042
|
+
x: 0,
|
|
32043
|
+
y: 0,
|
|
32044
|
+
lineHeight: '1em',
|
|
32045
|
+
capHeight: '0.71em',
|
|
32046
|
+
// Magic number from d3
|
|
32047
|
+
scaleToFit: false,
|
|
32048
|
+
textAnchor: 'start',
|
|
32049
|
+
verticalAnchor: 'end',
|
|
32050
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32051
|
+
fill: '#808080'
|
|
32052
|
+
};
|
|
32053
|
+
var Text = function Text(props) {
|
|
32109
32054
|
var wordsByLines = useMemo(function () {
|
|
32110
32055
|
return getWordsByLines({
|
|
32111
32056
|
breakAll: props.breakAll,
|
|
32112
32057
|
children: props.children,
|
|
32113
32058
|
maxLines: props.maxLines,
|
|
32114
|
-
scaleToFit: scaleToFit,
|
|
32059
|
+
scaleToFit: props.scaleToFit,
|
|
32115
32060
|
style: props.style,
|
|
32116
32061
|
width: props.width
|
|
32117
32062
|
});
|
|
32118
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32063
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32119
32064
|
var dx = props.dx,
|
|
32120
32065
|
dy = props.dy,
|
|
32066
|
+
textAnchor = props.textAnchor,
|
|
32067
|
+
verticalAnchor = props.verticalAnchor,
|
|
32068
|
+
scaleToFit = props.scaleToFit,
|
|
32121
32069
|
angle = props.angle,
|
|
32070
|
+
lineHeight = props.lineHeight,
|
|
32071
|
+
capHeight = props.capHeight,
|
|
32122
32072
|
className = props.className,
|
|
32123
32073
|
breakAll = props.breakAll,
|
|
32124
|
-
textProps = _objectWithoutProperties$
|
|
32125
|
-
if (!isNumOrStr(
|
|
32074
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32075
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32126
32076
|
return null;
|
|
32127
32077
|
}
|
|
32128
|
-
var x =
|
|
32129
|
-
var y =
|
|
32078
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32079
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32130
32080
|
var startDy;
|
|
32131
32081
|
switch (verticalAnchor) {
|
|
32132
32082
|
case 'start':
|
|
@@ -32156,7 +32106,7 @@ var Text = function Text(_ref5) {
|
|
|
32156
32106
|
y: y,
|
|
32157
32107
|
className: classNames('recharts-text', className),
|
|
32158
32108
|
textAnchor: textAnchor,
|
|
32159
|
-
fill: fill.includes('url') ?
|
|
32109
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32160
32110
|
}), wordsByLines.map(function (line, index) {
|
|
32161
32111
|
return (
|
|
32162
32112
|
/*#__PURE__*/
|
|
@@ -32169,6 +32119,7 @@ var Text = function Text(_ref5) {
|
|
|
32169
32119
|
);
|
|
32170
32120
|
}));
|
|
32171
32121
|
};
|
|
32122
|
+
Text.defaultProps = textDefaultProps;
|
|
32172
32123
|
|
|
32173
32124
|
var baseIsEqual = _baseIsEqual;
|
|
32174
32125
|
|
|
@@ -38436,7 +38387,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38436
38387
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38437
38388
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38438
38389
|
|
|
38439
|
-
var _excluded$
|
|
38390
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38440
38391
|
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
38441
38392
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38442
38393
|
function _nonIterableRest$3() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -38444,8 +38395,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38444
38395
|
function _arrayLikeToArray$7(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
38445
38396
|
function _iterableToArrayLimit$3(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
38446
38397
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38447
|
-
function _objectWithoutProperties$
|
|
38448
|
-
function _objectWithoutPropertiesLoose$
|
|
38398
|
+
function _objectWithoutProperties$6(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$6(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
38399
|
+
function _objectWithoutPropertiesLoose$6(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
38449
38400
|
function ErrorBar(props) {
|
|
38450
38401
|
var offset = props.offset,
|
|
38451
38402
|
layout = props.layout,
|
|
@@ -38455,7 +38406,7 @@ function ErrorBar(props) {
|
|
|
38455
38406
|
dataPointFormatter = props.dataPointFormatter,
|
|
38456
38407
|
xAxis = props.xAxis,
|
|
38457
38408
|
yAxis = props.yAxis,
|
|
38458
|
-
others = _objectWithoutProperties$
|
|
38409
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38459
38410
|
var svgProps = filterProps(others);
|
|
38460
38411
|
var errorBars = data.map(function (entry, i) {
|
|
38461
38412
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38566,18 +38517,18 @@ ErrorBar.defaultProps = {
|
|
|
38566
38517
|
};
|
|
38567
38518
|
ErrorBar.displayName = 'ErrorBar';
|
|
38568
38519
|
|
|
38569
|
-
function _typeof$
|
|
38520
|
+
function _typeof$h(obj) { "@babel/helpers - typeof"; return _typeof$h = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$h(obj); }
|
|
38570
38521
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38571
38522
|
function _nonIterableSpread$4() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
38572
38523
|
function _unsupportedIterableToArray$6(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$6(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$6(o, minLen); }
|
|
38573
38524
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38574
38525
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38575
38526
|
function _arrayLikeToArray$6(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
38576
|
-
function ownKeys$
|
|
38577
|
-
function _objectSpread$
|
|
38578
|
-
function _defineProperty$
|
|
38579
|
-
function _toPropertyKey$
|
|
38580
|
-
function _toPrimitive$
|
|
38527
|
+
function ownKeys$g(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
38528
|
+
function _objectSpread$g(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$g(Object(source), !0).forEach(function (key) { _defineProperty$h(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$g(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
38529
|
+
function _defineProperty$h(obj, key, value) { key = _toPropertyKey$h(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
38530
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38531
|
+
function _toPrimitive$h(input, hint) { if (_typeof$h(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$h(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
38581
38532
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38582
38533
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38583
38534
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38748,7 +38699,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38748
38699
|
};
|
|
38749
38700
|
});
|
|
38750
38701
|
}
|
|
38751
|
-
return _objectSpread$
|
|
38702
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38752
38703
|
payload: legendData,
|
|
38753
38704
|
item: legendItem
|
|
38754
38705
|
});
|
|
@@ -38902,10 +38853,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38902
38853
|
verticalAlign = legendProps.verticalAlign,
|
|
38903
38854
|
layout = legendProps.layout;
|
|
38904
38855
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38905
|
-
newOffset = _objectSpread$
|
|
38856
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38906
38857
|
}
|
|
38907
38858
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38908
|
-
newOffset = _objectSpread$
|
|
38859
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38909
38860
|
}
|
|
38910
38861
|
}
|
|
38911
38862
|
return newOffset;
|
|
@@ -39331,14 +39282,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39331
39282
|
items: [item]
|
|
39332
39283
|
};
|
|
39333
39284
|
}
|
|
39334
|
-
return _objectSpread$
|
|
39285
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39335
39286
|
}, {});
|
|
39336
39287
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39337
39288
|
var group = stackGroups[axisId];
|
|
39338
39289
|
if (group.hasStack) {
|
|
39339
39290
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39340
39291
|
var g = group.stackGroups[stackId];
|
|
39341
|
-
return _objectSpread$
|
|
39292
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39342
39293
|
numericAxisId: numericAxisId,
|
|
39343
39294
|
cateAxisId: cateAxisId,
|
|
39344
39295
|
items: g.items,
|
|
@@ -39346,7 +39297,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39346
39297
|
}));
|
|
39347
39298
|
}, {});
|
|
39348
39299
|
}
|
|
39349
|
-
return _objectSpread$
|
|
39300
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39350
39301
|
}, {});
|
|
39351
39302
|
};
|
|
39352
39303
|
|
|
@@ -39560,7 +39511,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39560
39511
|
formatter = _graphicalItem$props.formatter,
|
|
39561
39512
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39562
39513
|
chartType = _graphicalItem$props.chartType;
|
|
39563
|
-
return _objectSpread$
|
|
39514
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39564
39515
|
dataKey: dataKey,
|
|
39565
39516
|
unit: unit,
|
|
39566
39517
|
formatter: formatter,
|
|
@@ -39573,12 +39524,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39573
39524
|
});
|
|
39574
39525
|
};
|
|
39575
39526
|
|
|
39576
|
-
function _typeof$
|
|
39577
|
-
function ownKeys$
|
|
39578
|
-
function _objectSpread$
|
|
39579
|
-
function _defineProperty$
|
|
39580
|
-
function _toPropertyKey$
|
|
39581
|
-
function _toPrimitive$
|
|
39527
|
+
function _typeof$g(obj) { "@babel/helpers - typeof"; return _typeof$g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$g(obj); }
|
|
39528
|
+
function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39529
|
+
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty$g(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39530
|
+
function _defineProperty$g(obj, key, value) { key = _toPropertyKey$g(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39531
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39532
|
+
function _toPrimitive$g(input, hint) { if (_typeof$g(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$g(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
39582
39533
|
var RADIAN = Math.PI / 180;
|
|
39583
39534
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39584
39535
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39683,7 +39634,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39683
39634
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39684
39635
|
}
|
|
39685
39636
|
if (inRange) {
|
|
39686
|
-
return _objectSpread$
|
|
39637
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39687
39638
|
radius: radius,
|
|
39688
39639
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39689
39640
|
});
|
|
@@ -39691,21 +39642,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39691
39642
|
return null;
|
|
39692
39643
|
};
|
|
39693
39644
|
|
|
39694
|
-
function _typeof$
|
|
39695
|
-
var _excluded$7 = ["offset"];
|
|
39645
|
+
function _typeof$f(obj) { "@babel/helpers - typeof"; return _typeof$f = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$f(obj); }
|
|
39696
39646
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39697
39647
|
function _nonIterableSpread$3() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39698
39648
|
function _unsupportedIterableToArray$5(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$5(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$5(o, minLen); }
|
|
39699
39649
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39700
39650
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39701
39651
|
function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
39702
|
-
function
|
|
39703
|
-
function
|
|
39704
|
-
function
|
|
39705
|
-
function
|
|
39706
|
-
function
|
|
39707
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39708
|
-
function _toPrimitive$i(input, hint) { if (_typeof$i(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$i(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
39652
|
+
function ownKeys$e(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39653
|
+
function _objectSpread$e(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$e(Object(source), !0).forEach(function (key) { _defineProperty$f(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$e(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39654
|
+
function _defineProperty$f(obj, key, value) { key = _toPropertyKey$f(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39655
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39656
|
+
function _toPrimitive$f(input, hint) { if (_typeof$f(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$f(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
39709
39657
|
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
39710
39658
|
var getLabel = function getLabel(props) {
|
|
39711
39659
|
var value = props.value,
|
|
@@ -39850,7 +39798,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39850
39798
|
textAnchor: 'middle',
|
|
39851
39799
|
verticalAnchor: verticalEnd
|
|
39852
39800
|
};
|
|
39853
|
-
return _objectSpread$
|
|
39801
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39854
39802
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39855
39803
|
width: width
|
|
39856
39804
|
} : {});
|
|
@@ -39862,7 +39810,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39862
39810
|
textAnchor: 'middle',
|
|
39863
39811
|
verticalAnchor: verticalStart
|
|
39864
39812
|
};
|
|
39865
|
-
return _objectSpread$
|
|
39813
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39866
39814
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39867
39815
|
width: width
|
|
39868
39816
|
} : {});
|
|
@@ -39874,7 +39822,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39874
39822
|
textAnchor: horizontalEnd,
|
|
39875
39823
|
verticalAnchor: 'middle'
|
|
39876
39824
|
};
|
|
39877
|
-
return _objectSpread$
|
|
39825
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39878
39826
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39879
39827
|
height: height
|
|
39880
39828
|
} : {});
|
|
@@ -39886,7 +39834,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39886
39834
|
textAnchor: horizontalStart,
|
|
39887
39835
|
verticalAnchor: 'middle'
|
|
39888
39836
|
};
|
|
39889
|
-
return _objectSpread$
|
|
39837
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39890
39838
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39891
39839
|
height: height
|
|
39892
39840
|
} : {});
|
|
@@ -39896,7 +39844,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39896
39844
|
height: height
|
|
39897
39845
|
} : {};
|
|
39898
39846
|
if (position === 'insideLeft') {
|
|
39899
|
-
return _objectSpread$
|
|
39847
|
+
return _objectSpread$e({
|
|
39900
39848
|
x: x + horizontalOffset,
|
|
39901
39849
|
y: y + height / 2,
|
|
39902
39850
|
textAnchor: horizontalStart,
|
|
@@ -39904,7 +39852,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39904
39852
|
}, sizeAttrs);
|
|
39905
39853
|
}
|
|
39906
39854
|
if (position === 'insideRight') {
|
|
39907
|
-
return _objectSpread$
|
|
39855
|
+
return _objectSpread$e({
|
|
39908
39856
|
x: x + width - horizontalOffset,
|
|
39909
39857
|
y: y + height / 2,
|
|
39910
39858
|
textAnchor: horizontalEnd,
|
|
@@ -39912,7 +39860,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39912
39860
|
}, sizeAttrs);
|
|
39913
39861
|
}
|
|
39914
39862
|
if (position === 'insideTop') {
|
|
39915
|
-
return _objectSpread$
|
|
39863
|
+
return _objectSpread$e({
|
|
39916
39864
|
x: x + width / 2,
|
|
39917
39865
|
y: y + verticalOffset,
|
|
39918
39866
|
textAnchor: 'middle',
|
|
@@ -39920,7 +39868,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39920
39868
|
}, sizeAttrs);
|
|
39921
39869
|
}
|
|
39922
39870
|
if (position === 'insideBottom') {
|
|
39923
|
-
return _objectSpread$
|
|
39871
|
+
return _objectSpread$e({
|
|
39924
39872
|
x: x + width / 2,
|
|
39925
39873
|
y: y + height - verticalOffset,
|
|
39926
39874
|
textAnchor: 'middle',
|
|
@@ -39928,7 +39876,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39928
39876
|
}, sizeAttrs);
|
|
39929
39877
|
}
|
|
39930
39878
|
if (position === 'insideTopLeft') {
|
|
39931
|
-
return _objectSpread$
|
|
39879
|
+
return _objectSpread$e({
|
|
39932
39880
|
x: x + horizontalOffset,
|
|
39933
39881
|
y: y + verticalOffset,
|
|
39934
39882
|
textAnchor: horizontalStart,
|
|
@@ -39936,7 +39884,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39936
39884
|
}, sizeAttrs);
|
|
39937
39885
|
}
|
|
39938
39886
|
if (position === 'insideTopRight') {
|
|
39939
|
-
return _objectSpread$
|
|
39887
|
+
return _objectSpread$e({
|
|
39940
39888
|
x: x + width - horizontalOffset,
|
|
39941
39889
|
y: y + verticalOffset,
|
|
39942
39890
|
textAnchor: horizontalEnd,
|
|
@@ -39944,7 +39892,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39944
39892
|
}, sizeAttrs);
|
|
39945
39893
|
}
|
|
39946
39894
|
if (position === 'insideBottomLeft') {
|
|
39947
|
-
return _objectSpread$
|
|
39895
|
+
return _objectSpread$e({
|
|
39948
39896
|
x: x + horizontalOffset,
|
|
39949
39897
|
y: y + height - verticalOffset,
|
|
39950
39898
|
textAnchor: horizontalStart,
|
|
@@ -39952,7 +39900,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39952
39900
|
}, sizeAttrs);
|
|
39953
39901
|
}
|
|
39954
39902
|
if (position === 'insideBottomRight') {
|
|
39955
|
-
return _objectSpread$
|
|
39903
|
+
return _objectSpread$e({
|
|
39956
39904
|
x: x + width - horizontalOffset,
|
|
39957
39905
|
y: y + height - verticalOffset,
|
|
39958
39906
|
textAnchor: horizontalEnd,
|
|
@@ -39960,14 +39908,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39960
39908
|
}, sizeAttrs);
|
|
39961
39909
|
}
|
|
39962
39910
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39963
|
-
return _objectSpread$
|
|
39911
|
+
return _objectSpread$e({
|
|
39964
39912
|
x: x + getPercentValue(position.x, width),
|
|
39965
39913
|
y: y + getPercentValue(position.y, height),
|
|
39966
39914
|
textAnchor: 'end',
|
|
39967
39915
|
verticalAnchor: 'end'
|
|
39968
39916
|
}, sizeAttrs);
|
|
39969
39917
|
}
|
|
39970
|
-
return _objectSpread$
|
|
39918
|
+
return _objectSpread$e({
|
|
39971
39919
|
x: x + width / 2,
|
|
39972
39920
|
y: y + height / 2,
|
|
39973
39921
|
textAnchor: 'middle',
|
|
@@ -39977,13 +39925,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39977
39925
|
var isPolar = function isPolar(viewBox) {
|
|
39978
39926
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39979
39927
|
};
|
|
39980
|
-
function Label$3(
|
|
39981
|
-
var _ref4$offset = _ref4.offset,
|
|
39982
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39983
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39984
|
-
var props = _objectSpread$h({
|
|
39985
|
-
offset: offset
|
|
39986
|
-
}, restProps);
|
|
39928
|
+
function Label$3(props) {
|
|
39987
39929
|
var viewBox = props.viewBox,
|
|
39988
39930
|
position = props.position,
|
|
39989
39931
|
value = props.value,
|
|
@@ -40020,6 +39962,9 @@ function Label$3(_ref4) {
|
|
|
40020
39962
|
}), label);
|
|
40021
39963
|
}
|
|
40022
39964
|
Label$3.displayName = 'Label';
|
|
39965
|
+
Label$3.defaultProps = {
|
|
39966
|
+
offset: 5
|
|
39967
|
+
};
|
|
40023
39968
|
var parseViewBox = function parseViewBox(props) {
|
|
40024
39969
|
var cx = props.cx,
|
|
40025
39970
|
cy = props.cy,
|
|
@@ -40174,9 +40119,8 @@ function last(array) {
|
|
|
40174
40119
|
|
|
40175
40120
|
var last_1 = last;
|
|
40176
40121
|
|
|
40177
|
-
function _typeof$
|
|
40178
|
-
var _excluded$
|
|
40179
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40122
|
+
function _typeof$e(obj) { "@babel/helpers - typeof"; return _typeof$e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$e(obj); }
|
|
40123
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40180
40124
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40181
40125
|
function _nonIterableSpread$2() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40182
40126
|
function _unsupportedIterableToArray$4(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$4(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$4(o, minLen); }
|
|
@@ -40184,26 +40128,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40184
40128
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40185
40129
|
function _arrayLikeToArray$4(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
40186
40130
|
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
40187
|
-
function ownKeys$
|
|
40188
|
-
function _objectSpread$
|
|
40189
|
-
function _defineProperty$
|
|
40190
|
-
function _toPropertyKey$
|
|
40191
|
-
function _toPrimitive$
|
|
40192
|
-
function _objectWithoutProperties$
|
|
40193
|
-
function _objectWithoutPropertiesLoose$
|
|
40194
|
-
var
|
|
40195
|
-
|
|
40196
|
-
|
|
40197
|
-
|
|
40198
|
-
|
|
40199
|
-
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
dataKey =
|
|
40203
|
-
clockWise =
|
|
40204
|
-
id =
|
|
40205
|
-
textBreakAll =
|
|
40206
|
-
others = _objectWithoutProperties$
|
|
40131
|
+
function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40132
|
+
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty$e(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
40133
|
+
function _defineProperty$e(obj, key, value) { key = _toPropertyKey$e(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40134
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40135
|
+
function _toPrimitive$e(input, hint) { if (_typeof$e(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$e(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
40136
|
+
function _objectWithoutProperties$5(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$5(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
40137
|
+
function _objectWithoutPropertiesLoose$5(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
40138
|
+
var defaultProps = {
|
|
40139
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40140
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40141
|
+
}
|
|
40142
|
+
};
|
|
40143
|
+
function LabelList(props) {
|
|
40144
|
+
var data = props.data,
|
|
40145
|
+
valueAccessor = props.valueAccessor,
|
|
40146
|
+
dataKey = props.dataKey,
|
|
40147
|
+
clockWise = props.clockWise,
|
|
40148
|
+
id = props.id,
|
|
40149
|
+
textBreakAll = props.textBreakAll,
|
|
40150
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40207
40151
|
if (!data || !data.length) {
|
|
40208
40152
|
return null;
|
|
40209
40153
|
}
|
|
@@ -40219,7 +40163,7 @@ function LabelList(_ref) {
|
|
|
40219
40163
|
index: index,
|
|
40220
40164
|
value: value,
|
|
40221
40165
|
textBreakAll: textBreakAll,
|
|
40222
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40166
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40223
40167
|
clockWise: clockWise
|
|
40224
40168
|
})),
|
|
40225
40169
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40274,14 +40218,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40274
40218
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40275
40219
|
}
|
|
40276
40220
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40221
|
+
LabelList.defaultProps = defaultProps;
|
|
40277
40222
|
|
|
40278
|
-
function _typeof$g(obj) { "@babel/helpers - typeof"; return _typeof$g = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$g(obj); }
|
|
40279
40223
|
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
40280
|
-
function ownKeys$f(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40281
|
-
function _objectSpread$f(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$f(Object(source), !0).forEach(function (key) { _defineProperty$g(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$f(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
40282
|
-
function _defineProperty$g(obj, key, value) { key = _toPropertyKey$g(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40283
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40284
|
-
function _toPrimitive$g(input, hint) { if (_typeof$g(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$g(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
40285
40224
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40286
40225
|
var sign = mathSign(endAngle - startAngle);
|
|
40287
40226
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40422,19 +40361,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40422
40361
|
}
|
|
40423
40362
|
return path;
|
|
40424
40363
|
};
|
|
40425
|
-
var
|
|
40426
|
-
cx: 0,
|
|
40427
|
-
cy: 0,
|
|
40428
|
-
innerRadius: 0,
|
|
40429
|
-
outerRadius: 0,
|
|
40430
|
-
startAngle: 0,
|
|
40431
|
-
endAngle: 0,
|
|
40432
|
-
cornerRadius: 0,
|
|
40433
|
-
forceCornerRadius: false,
|
|
40434
|
-
cornerIsExternal: false
|
|
40435
|
-
};
|
|
40436
|
-
var Sector = function Sector(sectorProps) {
|
|
40437
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40364
|
+
var Sector = function Sector(props) {
|
|
40438
40365
|
var cx = props.cx,
|
|
40439
40366
|
cy = props.cy,
|
|
40440
40367
|
innerRadius = props.innerRadius,
|
|
@@ -40480,14 +40407,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40480
40407
|
role: "img"
|
|
40481
40408
|
}));
|
|
40482
40409
|
};
|
|
40410
|
+
Sector.defaultProps = {
|
|
40411
|
+
cx: 0,
|
|
40412
|
+
cy: 0,
|
|
40413
|
+
innerRadius: 0,
|
|
40414
|
+
outerRadius: 0,
|
|
40415
|
+
startAngle: 0,
|
|
40416
|
+
endAngle: 0,
|
|
40417
|
+
cornerRadius: 0,
|
|
40418
|
+
forceCornerRadius: false,
|
|
40419
|
+
cornerIsExternal: false
|
|
40420
|
+
};
|
|
40483
40421
|
|
|
40484
|
-
function _typeof$
|
|
40422
|
+
function _typeof$d(obj) { "@babel/helpers - typeof"; return _typeof$d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$d(obj); }
|
|
40485
40423
|
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
40486
|
-
function ownKeys$
|
|
40487
|
-
function _objectSpread$
|
|
40488
|
-
function _defineProperty$
|
|
40489
|
-
function _toPropertyKey$
|
|
40490
|
-
function _toPrimitive$
|
|
40424
|
+
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40425
|
+
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty$d(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
40426
|
+
function _defineProperty$d(obj, key, value) { key = _toPropertyKey$d(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40427
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40428
|
+
function _toPrimitive$d(input, hint) { if (_typeof$d(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$d(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
40491
40429
|
var CURVE_FACTORIES = {
|
|
40492
40430
|
curveBasisClosed: curveBasisClosed,
|
|
40493
40431
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40527,14 +40465,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40527
40465
|
* @return {String} path
|
|
40528
40466
|
*/
|
|
40529
40467
|
var getPath$1 = function getPath(_ref) {
|
|
40530
|
-
var
|
|
40531
|
-
|
|
40532
|
-
_ref$points = _ref.points,
|
|
40533
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40468
|
+
var type = _ref.type,
|
|
40469
|
+
points = _ref.points,
|
|
40534
40470
|
baseLine = _ref.baseLine,
|
|
40535
40471
|
layout = _ref.layout,
|
|
40536
|
-
|
|
40537
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40472
|
+
connectNulls = _ref.connectNulls;
|
|
40538
40473
|
var curveFactory = getCurveFactory(type, layout);
|
|
40539
40474
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40540
40475
|
return defined(entry);
|
|
@@ -40545,7 +40480,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40545
40480
|
return defined(base);
|
|
40546
40481
|
}) : baseLine;
|
|
40547
40482
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40548
|
-
return _objectSpread$
|
|
40483
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40549
40484
|
base: formatBaseLine[index]
|
|
40550
40485
|
});
|
|
40551
40486
|
});
|
|
@@ -40586,8 +40521,12 @@ var Curve = function Curve(props) {
|
|
|
40586
40521
|
ref: pathRef
|
|
40587
40522
|
}));
|
|
40588
40523
|
};
|
|
40524
|
+
Curve.defaultProps = {
|
|
40525
|
+
type: 'linear',
|
|
40526
|
+
points: [],
|
|
40527
|
+
connectNulls: false
|
|
40528
|
+
};
|
|
40589
40529
|
|
|
40590
|
-
function _typeof$e(obj) { "@babel/helpers - typeof"; return _typeof$e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$e(obj); }
|
|
40591
40530
|
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
40592
40531
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40593
40532
|
function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -40595,11 +40534,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40595
40534
|
function _arrayLikeToArray$3(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
40596
40535
|
function _iterableToArrayLimit$2(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
40597
40536
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40598
|
-
function ownKeys$d(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40599
|
-
function _objectSpread$d(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$d(Object(source), !0).forEach(function (key) { _defineProperty$e(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$d(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
40600
|
-
function _defineProperty$e(obj, key, value) { key = _toPropertyKey$e(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40601
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40602
|
-
function _toPrimitive$e(input, hint) { if (_typeof$e(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$e(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
40603
40537
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40604
40538
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40605
40539
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40655,29 +40589,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40655
40589
|
}
|
|
40656
40590
|
return false;
|
|
40657
40591
|
};
|
|
40658
|
-
var
|
|
40659
|
-
x: 0,
|
|
40660
|
-
y: 0,
|
|
40661
|
-
width: 0,
|
|
40662
|
-
height: 0,
|
|
40663
|
-
// The radius of border
|
|
40664
|
-
// The radius of four corners when radius is a number
|
|
40665
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40666
|
-
radius: 0,
|
|
40667
|
-
isAnimationActive: false,
|
|
40668
|
-
isUpdateAnimationActive: false,
|
|
40669
|
-
animationBegin: 0,
|
|
40670
|
-
animationDuration: 1500,
|
|
40671
|
-
animationEasing: 'ease'
|
|
40672
|
-
};
|
|
40673
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40674
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40592
|
+
var Rectangle = function Rectangle(props) {
|
|
40675
40593
|
var pathRef = useRef();
|
|
40676
40594
|
var _useState = useState(-1),
|
|
40677
40595
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40678
40596
|
totalLength = _useState2[0],
|
|
40679
40597
|
setTotalLength = _useState2[1];
|
|
40680
|
-
|
|
40598
|
+
useLayoutEffect(function () {
|
|
40681
40599
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40682
40600
|
try {
|
|
40683
40601
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40748,6 +40666,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40748
40666
|
})));
|
|
40749
40667
|
});
|
|
40750
40668
|
};
|
|
40669
|
+
Rectangle.defaultProps = {
|
|
40670
|
+
x: 0,
|
|
40671
|
+
y: 0,
|
|
40672
|
+
width: 0,
|
|
40673
|
+
height: 0,
|
|
40674
|
+
// The radius of border
|
|
40675
|
+
// The radius of four corners when radius is a number
|
|
40676
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40677
|
+
radius: 0,
|
|
40678
|
+
isAnimationActive: false,
|
|
40679
|
+
isUpdateAnimationActive: false,
|
|
40680
|
+
animationBegin: 0,
|
|
40681
|
+
animationDuration: 1500,
|
|
40682
|
+
animationEasing: 'ease'
|
|
40683
|
+
};
|
|
40751
40684
|
|
|
40752
40685
|
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
40753
40686
|
var Dot$1 = function Dot(props) {
|
|
@@ -40767,42 +40700,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40767
40700
|
return null;
|
|
40768
40701
|
};
|
|
40769
40702
|
|
|
40770
|
-
function _typeof$d(obj) { "@babel/helpers - typeof"; return _typeof$d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$d(obj); }
|
|
40771
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40772
40703
|
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
40773
|
-
function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40774
|
-
function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$c(Object(source), !0).forEach(function (key) { _defineProperty$d(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
40775
|
-
function _defineProperty$d(obj, key, value) { key = _toPropertyKey$d(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40776
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40777
|
-
function _toPrimitive$d(input, hint) { if (_typeof$d(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$d(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
40778
|
-
function _objectWithoutProperties$5(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$5(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
40779
|
-
function _objectWithoutPropertiesLoose$5(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
40780
40704
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40781
40705
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40782
40706
|
};
|
|
40783
|
-
var Cross = function Cross(
|
|
40784
|
-
var
|
|
40785
|
-
|
|
40786
|
-
|
|
40787
|
-
|
|
40788
|
-
|
|
40789
|
-
|
|
40790
|
-
|
|
40791
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40792
|
-
_ref$width = _ref.width,
|
|
40793
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40794
|
-
_ref$height = _ref.height,
|
|
40795
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40796
|
-
className = _ref.className,
|
|
40797
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40798
|
-
var props = _objectSpread$c({
|
|
40799
|
-
x: x,
|
|
40800
|
-
y: y,
|
|
40801
|
-
top: top,
|
|
40802
|
-
left: left,
|
|
40803
|
-
width: width,
|
|
40804
|
-
height: height
|
|
40805
|
-
}, rest);
|
|
40707
|
+
var Cross = function Cross(props) {
|
|
40708
|
+
var x = props.x,
|
|
40709
|
+
y = props.y,
|
|
40710
|
+
width = props.width,
|
|
40711
|
+
height = props.height,
|
|
40712
|
+
top = props.top,
|
|
40713
|
+
left = props.left,
|
|
40714
|
+
className = props.className;
|
|
40806
40715
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40807
40716
|
return null;
|
|
40808
40717
|
}
|
|
@@ -40811,6 +40720,14 @@ var Cross = function Cross(_ref) {
|
|
|
40811
40720
|
d: getPath(x, y, width, height, top, left)
|
|
40812
40721
|
}));
|
|
40813
40722
|
};
|
|
40723
|
+
Cross.defaultProps = {
|
|
40724
|
+
x: 0,
|
|
40725
|
+
y: 0,
|
|
40726
|
+
top: 0,
|
|
40727
|
+
left: 0,
|
|
40728
|
+
width: 0,
|
|
40729
|
+
height: 0
|
|
40730
|
+
};
|
|
40814
40731
|
|
|
40815
40732
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40816
40733
|
|
|
@@ -41020,7 +40937,6 @@ var createScale = function createScale(_ref) {
|
|
|
41020
40937
|
isTextActive: false,
|
|
41021
40938
|
isSlideMoving: false,
|
|
41022
40939
|
isTravellerMoving: false,
|
|
41023
|
-
isTravellerFocused: false,
|
|
41024
40940
|
startX: scale(startIndex),
|
|
41025
40941
|
endX: scale(endIndex),
|
|
41026
40942
|
scale: scale,
|
|
@@ -41234,38 +41150,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41234
41150
|
}
|
|
41235
41151
|
});
|
|
41236
41152
|
}
|
|
41237
|
-
}, {
|
|
41238
|
-
key: "handleTravellerMoveKeyboard",
|
|
41239
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41240
|
-
var _this2 = this;
|
|
41241
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41242
|
-
var _this$state3 = this.state,
|
|
41243
|
-
scaleValues = _this$state3.scaleValues,
|
|
41244
|
-
startX = _this$state3.startX,
|
|
41245
|
-
endX = _this$state3.endX;
|
|
41246
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41247
|
-
var currentScaleValue = this.state[id];
|
|
41248
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41249
|
-
if (currentIndex === -1) {
|
|
41250
|
-
return;
|
|
41251
|
-
}
|
|
41252
|
-
var newIndex = currentIndex + direction;
|
|
41253
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41254
|
-
return;
|
|
41255
|
-
}
|
|
41256
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41257
|
-
|
|
41258
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41259
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41260
|
-
return;
|
|
41261
|
-
}
|
|
41262
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41263
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41264
|
-
startX: _this2.state.startX,
|
|
41265
|
-
endX: _this2.state.endX
|
|
41266
|
-
}));
|
|
41267
|
-
});
|
|
41268
|
-
}
|
|
41269
41153
|
}, {
|
|
41270
41154
|
key: "renderBackground",
|
|
41271
41155
|
value: function renderBackground() {
|
|
@@ -41313,7 +41197,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41313
41197
|
}, {
|
|
41314
41198
|
key: "renderTravellerLayer",
|
|
41315
41199
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41316
|
-
var _this3 = this;
|
|
41317
41200
|
var _this$props7 = this.props,
|
|
41318
41201
|
y = _this$props7.y,
|
|
41319
41202
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41327,31 +41210,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41327
41210
|
height: height
|
|
41328
41211
|
});
|
|
41329
41212
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41330
|
-
tabIndex: 0,
|
|
41331
|
-
role: "slider",
|
|
41332
41213
|
className: "recharts-brush-traveller",
|
|
41333
41214
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41334
41215
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41335
41216
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41336
41217
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41337
|
-
onKeyDown: function onKeyDown(e) {
|
|
41338
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41339
|
-
return;
|
|
41340
|
-
}
|
|
41341
|
-
e.preventDefault();
|
|
41342
|
-
e.stopPropagation();
|
|
41343
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41344
|
-
},
|
|
41345
|
-
onFocus: function onFocus() {
|
|
41346
|
-
_this3.setState({
|
|
41347
|
-
isTravellerFocused: true
|
|
41348
|
-
});
|
|
41349
|
-
},
|
|
41350
|
-
onBlur: function onBlur() {
|
|
41351
|
-
_this3.setState({
|
|
41352
|
-
isTravellerFocused: false
|
|
41353
|
-
});
|
|
41354
|
-
},
|
|
41355
41218
|
style: {
|
|
41356
41219
|
cursor: 'col-resize'
|
|
41357
41220
|
}
|
|
@@ -41395,9 +41258,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41395
41258
|
height = _this$props9.height,
|
|
41396
41259
|
travellerWidth = _this$props9.travellerWidth,
|
|
41397
41260
|
stroke = _this$props9.stroke;
|
|
41398
|
-
var _this$
|
|
41399
|
-
startX = _this$
|
|
41400
|
-
endX = _this$
|
|
41261
|
+
var _this$state3 = this.state,
|
|
41262
|
+
startX = _this$state3.startX,
|
|
41263
|
+
endX = _this$state3.endX;
|
|
41401
41264
|
var offset = 5;
|
|
41402
41265
|
var attrs = {
|
|
41403
41266
|
pointerEvents: 'none',
|
|
@@ -41429,13 +41292,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41429
41292
|
width = _this$props10.width,
|
|
41430
41293
|
height = _this$props10.height,
|
|
41431
41294
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41432
|
-
var _this$
|
|
41433
|
-
startX = _this$
|
|
41434
|
-
endX = _this$
|
|
41435
|
-
isTextActive = _this$
|
|
41436
|
-
isSlideMoving = _this$
|
|
41437
|
-
isTravellerMoving = _this$
|
|
41438
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41295
|
+
var _this$state4 = this.state,
|
|
41296
|
+
startX = _this$state4.startX,
|
|
41297
|
+
endX = _this$state4.endX,
|
|
41298
|
+
isTextActive = _this$state4.isTextActive,
|
|
41299
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41300
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41439
41301
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41440
41302
|
return null;
|
|
41441
41303
|
}
|
|
@@ -41447,7 +41309,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41447
41309
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41448
41310
|
onTouchMove: this.handleTouchMove,
|
|
41449
41311
|
style: style
|
|
41450
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41312
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41451
41313
|
}
|
|
41452
41314
|
}], [{
|
|
41453
41315
|
key: "renderDefaultTraveller",
|
|
@@ -41765,7 +41627,7 @@ function every(collection, predicate, guard) {
|
|
|
41765
41627
|
|
|
41766
41628
|
var every_1 = every;
|
|
41767
41629
|
|
|
41768
|
-
var defineProperty = _defineProperty$
|
|
41630
|
+
var defineProperty = _defineProperty$l;
|
|
41769
41631
|
|
|
41770
41632
|
/**
|
|
41771
41633
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42126,6 +41988,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42126
41988
|
legendType: 'rect',
|
|
42127
41989
|
minPointSize: 0,
|
|
42128
41990
|
hide: false,
|
|
41991
|
+
// data of bar
|
|
42129
41992
|
data: [],
|
|
42130
41993
|
layout: 'vertical',
|
|
42131
41994
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45038,11 +44901,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45038
44901
|
}
|
|
45039
44902
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45040
44903
|
x = _this$container$getBo.x,
|
|
45041
|
-
y = _this$container$getBo.y
|
|
45042
|
-
height = _this$container$getBo.height;
|
|
44904
|
+
y = _this$container$getBo.y;
|
|
45043
44905
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45044
44906
|
var pageX = x + coordinate;
|
|
45045
|
-
var pageY = y + this.offset.top
|
|
44907
|
+
var pageY = y + this.offset.top;
|
|
45046
44908
|
this.mouseHandlerCallback({
|
|
45047
44909
|
pageX: pageX,
|
|
45048
44910
|
pageY: pageY
|