@typeolymp/ui-components 1.19.3 → 1.19.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +653 -787
- package/build/index.es.js.map +1 -1
- package/build/index.js +653 -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,39 @@ 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
|
+
if (!props.disabled && !!props.onChange)
|
|
8033
|
+
props.onChange(value);
|
|
8034
|
+
};
|
|
8035
|
+
var onBlur = function () {
|
|
8036
|
+
var value = parseInt(inputRef.current.value);
|
|
8037
|
+
var newValue = setValue(value);
|
|
8038
|
+
// If the value has changed, call the onChange callback
|
|
8039
|
+
if (value !== newValue && !!props.onChange)
|
|
8040
|
+
props.onChange(newValue);
|
|
8041
|
+
if (!!props.onBlur)
|
|
8042
|
+
props.onBlur();
|
|
8041
8043
|
};
|
|
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:
|
|
8044
|
+
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
8045
|
};
|
|
8044
8046
|
|
|
8045
8047
|
var Paragraph = function (props) { return (jsx$1(StyledParagraph, __assign$2({}, props, { children: props.children }))); };
|
|
@@ -13535,15 +13537,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13535
13537
|
|
|
13536
13538
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13537
13539
|
|
|
13538
|
-
function _slicedToArray$
|
|
13539
|
-
return _arrayWithHoles$
|
|
13540
|
+
function _slicedToArray$d(arr, i) {
|
|
13541
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13540
13542
|
}
|
|
13541
13543
|
|
|
13542
|
-
function _arrayWithHoles$
|
|
13544
|
+
function _arrayWithHoles$e(arr) {
|
|
13543
13545
|
if (Array.isArray(arr)) return arr;
|
|
13544
13546
|
}
|
|
13545
13547
|
|
|
13546
|
-
function _iterableToArrayLimit$
|
|
13548
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13547
13549
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13548
13550
|
|
|
13549
13551
|
if (_i == null) return;
|
|
@@ -13573,16 +13575,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13573
13575
|
return _arr;
|
|
13574
13576
|
}
|
|
13575
13577
|
|
|
13576
|
-
function _unsupportedIterableToArray$
|
|
13578
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13577
13579
|
if (!o) return;
|
|
13578
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13580
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13579
13581
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13580
13582
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13581
13583
|
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$
|
|
13584
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13583
13585
|
}
|
|
13584
13586
|
|
|
13585
|
-
function _arrayLikeToArray$
|
|
13587
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13586
13588
|
if (len == null || len > arr.length) len = arr.length;
|
|
13587
13589
|
|
|
13588
13590
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13590,7 +13592,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13590
13592
|
return arr2;
|
|
13591
13593
|
}
|
|
13592
13594
|
|
|
13593
|
-
function _nonIterableRest$
|
|
13595
|
+
function _nonIterableRest$e() {
|
|
13594
13596
|
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
13597
|
}
|
|
13596
13598
|
|
|
@@ -13654,7 +13656,7 @@ reservedProps.forEach(function (name) {
|
|
|
13654
13656
|
// This is a mapping from React prop names to the attribute names.
|
|
13655
13657
|
|
|
13656
13658
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13657
|
-
var _ref2 = _slicedToArray$
|
|
13659
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13658
13660
|
name = _ref2[0],
|
|
13659
13661
|
attributeName = _ref2[1];
|
|
13660
13662
|
|
|
@@ -16054,31 +16056,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16054
16056
|
return true;
|
|
16055
16057
|
};
|
|
16056
16058
|
|
|
16057
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16059
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16058
16060
|
|
|
16059
16061
|
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
16062
|
|
|
16061
16063
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16062
16064
|
|
|
16063
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16065
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16064
16066
|
|
|
16065
|
-
function ownKeys$
|
|
16067
|
+
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
16068
|
|
|
16067
|
-
function _objectSpread$
|
|
16069
|
+
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
16070
|
|
|
16069
|
-
function _defineProperty$
|
|
16071
|
+
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
16072
|
|
|
16071
|
-
function _slicedToArray$
|
|
16073
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16072
16074
|
|
|
16073
|
-
function _nonIterableRest$
|
|
16075
|
+
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
16076
|
|
|
16075
|
-
function _unsupportedIterableToArray$
|
|
16077
|
+
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
16078
|
|
|
16077
|
-
function _arrayLikeToArray$
|
|
16079
|
+
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
16080
|
|
|
16079
|
-
function _iterableToArrayLimit$
|
|
16081
|
+
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
16082
|
|
|
16081
|
-
function _arrayWithHoles$
|
|
16083
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16082
16084
|
|
|
16083
16085
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16084
16086
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16158,11 +16160,11 @@ function allFilesAccepted(_ref) {
|
|
|
16158
16160
|
|
|
16159
16161
|
return files.every(function (file) {
|
|
16160
16162
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16161
|
-
_fileAccepted2 = _slicedToArray$
|
|
16163
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16162
16164
|
accepted = _fileAccepted2[0];
|
|
16163
16165
|
|
|
16164
16166
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16165
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16167
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16166
16168
|
sizeMatch = _fileMatchSize2[0];
|
|
16167
16169
|
|
|
16168
16170
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16259,7 +16261,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16259
16261
|
function pickerOptionsFromAccept(accept) {
|
|
16260
16262
|
if (isDefined(accept)) {
|
|
16261
16263
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16262
|
-
var _ref3 = _slicedToArray$
|
|
16264
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16263
16265
|
mimeType = _ref3[0],
|
|
16264
16266
|
ext = _ref3[1];
|
|
16265
16267
|
|
|
@@ -16277,11 +16279,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16277
16279
|
|
|
16278
16280
|
return ok;
|
|
16279
16281
|
}).reduce(function (agg, _ref4) {
|
|
16280
|
-
var _ref5 = _slicedToArray$
|
|
16282
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16281
16283
|
mimeType = _ref5[0],
|
|
16282
16284
|
ext = _ref5[1];
|
|
16283
16285
|
|
|
16284
|
-
return _objectSpread$
|
|
16286
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16285
16287
|
}, {});
|
|
16286
16288
|
return [{
|
|
16287
16289
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16301,7 +16303,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16301
16303
|
function acceptPropAsAcceptAttr(accept) {
|
|
16302
16304
|
if (isDefined(accept)) {
|
|
16303
16305
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16304
|
-
var _ref7 = _slicedToArray$
|
|
16306
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16305
16307
|
mimeType = _ref7[0],
|
|
16306
16308
|
ext = _ref7[1];
|
|
16307
16309
|
|
|
@@ -16369,40 +16371,40 @@ function isExt(v) {
|
|
|
16369
16371
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16370
16372
|
*/
|
|
16371
16373
|
|
|
16372
|
-
var _excluded$
|
|
16373
|
-
_excluded2$
|
|
16374
|
+
var _excluded$d = ["children"],
|
|
16375
|
+
_excluded2$3 = ["open"],
|
|
16374
16376
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16375
16377
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16376
16378
|
|
|
16377
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16379
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16378
16380
|
|
|
16379
16381
|
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
16382
|
|
|
16381
16383
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16382
16384
|
|
|
16383
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16385
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16384
16386
|
|
|
16385
|
-
function _slicedToArray$
|
|
16387
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16386
16388
|
|
|
16387
|
-
function _nonIterableRest$
|
|
16389
|
+
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
16390
|
|
|
16389
|
-
function _unsupportedIterableToArray$
|
|
16391
|
+
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
16392
|
|
|
16391
|
-
function _arrayLikeToArray$
|
|
16393
|
+
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
16394
|
|
|
16393
|
-
function _iterableToArrayLimit$
|
|
16395
|
+
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
16396
|
|
|
16395
|
-
function _arrayWithHoles$
|
|
16397
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16396
16398
|
|
|
16397
|
-
function ownKeys$
|
|
16399
|
+
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
16400
|
|
|
16399
|
-
function _objectSpread$
|
|
16401
|
+
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
16402
|
|
|
16401
|
-
function _defineProperty$
|
|
16403
|
+
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
16404
|
|
|
16403
|
-
function _objectWithoutProperties$
|
|
16405
|
+
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
16406
|
|
|
16405
|
-
function _objectWithoutPropertiesLoose$
|
|
16407
|
+
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
16408
|
/**
|
|
16407
16409
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16408
16410
|
*
|
|
@@ -16420,11 +16422,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16420
16422
|
|
|
16421
16423
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16422
16424
|
var children = _ref.children,
|
|
16423
|
-
params = _objectWithoutProperties$
|
|
16425
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16424
16426
|
|
|
16425
16427
|
var _useDropzone = useDropzone(params),
|
|
16426
16428
|
open = _useDropzone.open,
|
|
16427
|
-
props = _objectWithoutProperties$
|
|
16429
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16428
16430
|
|
|
16429
16431
|
useImperativeHandle(ref, function () {
|
|
16430
16432
|
return {
|
|
@@ -16432,13 +16434,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16432
16434
|
};
|
|
16433
16435
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16434
16436
|
|
|
16435
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16437
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16436
16438
|
open: open
|
|
16437
16439
|
})));
|
|
16438
16440
|
});
|
|
16439
16441
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16440
16442
|
|
|
16441
|
-
var defaultProps$
|
|
16443
|
+
var defaultProps$1 = {
|
|
16442
16444
|
disabled: false,
|
|
16443
16445
|
getFilesFromEvent: fromEvent,
|
|
16444
16446
|
maxSize: Infinity,
|
|
@@ -16454,7 +16456,7 @@ var defaultProps$2 = {
|
|
|
16454
16456
|
useFsAccessApi: true,
|
|
16455
16457
|
autoFocus: false
|
|
16456
16458
|
};
|
|
16457
|
-
Dropzone.defaultProps = defaultProps$
|
|
16459
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16458
16460
|
Dropzone.propTypes = {
|
|
16459
16461
|
/**
|
|
16460
16462
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16805,7 +16807,7 @@ var initialState = {
|
|
|
16805
16807
|
function useDropzone() {
|
|
16806
16808
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16807
16809
|
|
|
16808
|
-
var _defaultProps$props = _objectSpread$
|
|
16810
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16809
16811
|
accept = _defaultProps$props.accept,
|
|
16810
16812
|
disabled = _defaultProps$props.disabled,
|
|
16811
16813
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16852,7 +16854,7 @@ function useDropzone() {
|
|
|
16852
16854
|
var inputRef = useRef(null);
|
|
16853
16855
|
|
|
16854
16856
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16855
|
-
_useReducer2 = _slicedToArray$
|
|
16857
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16856
16858
|
state = _useReducer2[0],
|
|
16857
16859
|
dispatch = _useReducer2[1];
|
|
16858
16860
|
|
|
@@ -17022,12 +17024,12 @@ function useDropzone() {
|
|
|
17022
17024
|
var fileRejections = [];
|
|
17023
17025
|
files.forEach(function (file) {
|
|
17024
17026
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17025
|
-
_fileAccepted2 = _slicedToArray$
|
|
17027
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17026
17028
|
accepted = _fileAccepted2[0],
|
|
17027
17029
|
acceptError = _fileAccepted2[1];
|
|
17028
17030
|
|
|
17029
17031
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17030
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17032
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17031
17033
|
sizeMatch = _fileMatchSize2[0],
|
|
17032
17034
|
sizeError = _fileMatchSize2[1];
|
|
17033
17035
|
|
|
@@ -17228,9 +17230,9 @@ function useDropzone() {
|
|
|
17228
17230
|
onDragOver = _ref2.onDragOver,
|
|
17229
17231
|
onDragLeave = _ref2.onDragLeave,
|
|
17230
17232
|
onDrop = _ref2.onDrop,
|
|
17231
|
-
rest = _objectWithoutProperties$
|
|
17233
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17232
17234
|
|
|
17233
|
-
return _objectSpread$
|
|
17235
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17234
17236
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17235
17237
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17236
17238
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17255,9 +17257,9 @@ function useDropzone() {
|
|
|
17255
17257
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17256
17258
|
onChange = _ref3.onChange,
|
|
17257
17259
|
onClick = _ref3.onClick,
|
|
17258
|
-
rest = _objectWithoutProperties$
|
|
17260
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17259
17261
|
|
|
17260
|
-
var inputProps = _defineProperty$
|
|
17262
|
+
var inputProps = _defineProperty$r({
|
|
17261
17263
|
accept: acceptAttr,
|
|
17262
17264
|
multiple: multiple,
|
|
17263
17265
|
type: "file",
|
|
@@ -17269,10 +17271,10 @@ function useDropzone() {
|
|
|
17269
17271
|
tabIndex: -1
|
|
17270
17272
|
}, refKey, inputRef);
|
|
17271
17273
|
|
|
17272
|
-
return _objectSpread$
|
|
17274
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17273
17275
|
};
|
|
17274
17276
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17275
|
-
return _objectSpread$
|
|
17277
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17276
17278
|
isFocused: isFocused && !disabled,
|
|
17277
17279
|
getRootProps: getRootProps,
|
|
17278
17280
|
getInputProps: getInputProps,
|
|
@@ -17291,40 +17293,40 @@ function reducer$1(state, action) {
|
|
|
17291
17293
|
/* istanbul ignore next */
|
|
17292
17294
|
switch (action.type) {
|
|
17293
17295
|
case "focus":
|
|
17294
|
-
return _objectSpread$
|
|
17296
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17295
17297
|
isFocused: true
|
|
17296
17298
|
});
|
|
17297
17299
|
|
|
17298
17300
|
case "blur":
|
|
17299
|
-
return _objectSpread$
|
|
17301
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17300
17302
|
isFocused: false
|
|
17301
17303
|
});
|
|
17302
17304
|
|
|
17303
17305
|
case "openDialog":
|
|
17304
|
-
return _objectSpread$
|
|
17306
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17305
17307
|
isFileDialogActive: true
|
|
17306
17308
|
});
|
|
17307
17309
|
|
|
17308
17310
|
case "closeDialog":
|
|
17309
|
-
return _objectSpread$
|
|
17311
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17310
17312
|
isFileDialogActive: false
|
|
17311
17313
|
});
|
|
17312
17314
|
|
|
17313
17315
|
case "setDraggedFiles":
|
|
17314
|
-
return _objectSpread$
|
|
17316
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17315
17317
|
isDragActive: action.isDragActive,
|
|
17316
17318
|
isDragAccept: action.isDragAccept,
|
|
17317
17319
|
isDragReject: action.isDragReject
|
|
17318
17320
|
});
|
|
17319
17321
|
|
|
17320
17322
|
case "setFiles":
|
|
17321
|
-
return _objectSpread$
|
|
17323
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17322
17324
|
acceptedFiles: action.acceptedFiles,
|
|
17323
17325
|
fileRejections: action.fileRejections
|
|
17324
17326
|
});
|
|
17325
17327
|
|
|
17326
17328
|
case "reset":
|
|
17327
|
-
return _objectSpread$
|
|
17329
|
+
return _objectSpread$p({}, initialState);
|
|
17328
17330
|
|
|
17329
17331
|
default:
|
|
17330
17332
|
return state;
|
|
@@ -19550,7 +19552,7 @@ function shallowEqual(a, b) {
|
|
|
19550
19552
|
return true;
|
|
19551
19553
|
}
|
|
19552
19554
|
|
|
19553
|
-
function _typeof$
|
|
19555
|
+
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
19556
|
|
|
19555
19557
|
//
|
|
19556
19558
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19577,9 +19579,7 @@ var FilteredElementKeyMap = {
|
|
|
19577
19579
|
};
|
|
19578
19580
|
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
19581
|
|
|
19580
|
-
|
|
19581
|
-
|
|
19582
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19582
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19583
19583
|
|
|
19584
19584
|
/** the offset of a chart, which define the blank space all around */
|
|
19585
19585
|
|
|
@@ -19615,7 +19615,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19615
19615
|
};
|
|
19616
19616
|
};
|
|
19617
19617
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19618
|
-
if (!isObject_1(props) || _typeof$
|
|
19618
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19619
19619
|
return null;
|
|
19620
19620
|
}
|
|
19621
19621
|
var out = null;
|
|
@@ -19629,11 +19629,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19629
19629
|
return out;
|
|
19630
19630
|
};
|
|
19631
19631
|
|
|
19632
|
-
var _excluded$
|
|
19633
|
-
_excluded2$
|
|
19634
|
-
function _objectWithoutProperties$
|
|
19635
|
-
function _objectWithoutPropertiesLoose$
|
|
19636
|
-
function _typeof$
|
|
19632
|
+
var _excluded$c = ["children"],
|
|
19633
|
+
_excluded2$2 = ["children"];
|
|
19634
|
+
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; }
|
|
19635
|
+
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; }
|
|
19636
|
+
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
19637
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19638
19638
|
click: 'onClick',
|
|
19639
19639
|
mousedown: 'onMouseDown',
|
|
@@ -19740,7 +19740,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19740
19740
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19741
19741
|
};
|
|
19742
19742
|
var isDotProps = function isDotProps(dot) {
|
|
19743
|
-
return dot && _typeof$
|
|
19743
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19744
19744
|
};
|
|
19745
19745
|
|
|
19746
19746
|
/**
|
|
@@ -19832,10 +19832,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19832
19832
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19833
19833
|
var _ref = nextChild.props || {},
|
|
19834
19834
|
nextChildren = _ref.children,
|
|
19835
|
-
nextProps = _objectWithoutProperties$
|
|
19835
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19836
19836
|
var _ref2 = prevChild.props || {},
|
|
19837
19837
|
prevChildren = _ref2.children,
|
|
19838
|
-
prevProps = _objectWithoutProperties$
|
|
19838
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19839
19839
|
if (nextChildren && prevChildren) {
|
|
19840
19840
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19841
19841
|
}
|
|
@@ -19877,10 +19877,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19877
19877
|
return toArray(children).indexOf(child);
|
|
19878
19878
|
};
|
|
19879
19879
|
|
|
19880
|
-
var _excluded$
|
|
19880
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19881
19881
|
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$
|
|
19882
|
+
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; }
|
|
19883
|
+
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
19884
|
function Surface(props) {
|
|
19885
19885
|
var children = props.children,
|
|
19886
19886
|
width = props.width,
|
|
@@ -19888,7 +19888,7 @@ function Surface(props) {
|
|
|
19888
19888
|
viewBox = props.viewBox,
|
|
19889
19889
|
className = props.className,
|
|
19890
19890
|
style = props.style,
|
|
19891
|
-
others = _objectWithoutProperties$
|
|
19891
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19892
19892
|
var svgView = viewBox || {
|
|
19893
19893
|
width: width,
|
|
19894
19894
|
height: height,
|
|
@@ -19905,14 +19905,14 @@ function Surface(props) {
|
|
|
19905
19905
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19906
19906
|
}
|
|
19907
19907
|
|
|
19908
|
-
var _excluded$
|
|
19908
|
+
var _excluded$a = ["children", "className"];
|
|
19909
19909
|
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$
|
|
19910
|
+
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; }
|
|
19911
|
+
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
19912
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19913
19913
|
var children = props.children,
|
|
19914
19914
|
className = props.className,
|
|
19915
|
-
others = _objectWithoutProperties$
|
|
19915
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19916
19916
|
var layerClass = classNames('recharts-layer', className);
|
|
19917
19917
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19918
19918
|
className: layerClass
|
|
@@ -23327,16 +23327,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23327
23327
|
stackOffsetNone(series, order);
|
|
23328
23328
|
}
|
|
23329
23329
|
|
|
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
23330
|
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
23331
|
var symbolFactories = {
|
|
23341
23332
|
symbolCircle: symbolCircle,
|
|
23342
23333
|
symbolCross: symbolCross,
|
|
@@ -23375,35 +23366,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23375
23366
|
return Math.PI * size * size / 4;
|
|
23376
23367
|
}
|
|
23377
23368
|
};
|
|
23369
|
+
var symbolsDefaultProps = {
|
|
23370
|
+
type: 'circle',
|
|
23371
|
+
size: 64,
|
|
23372
|
+
sizeType: 'area'
|
|
23373
|
+
};
|
|
23378
23374
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23379
23375
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23380
23376
|
};
|
|
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
|
-
|
|
23377
|
+
var Symbols = function Symbols(props) {
|
|
23395
23378
|
/**
|
|
23396
23379
|
* Calculate the path of curve
|
|
23397
23380
|
* @return {String} path
|
|
23398
23381
|
*/
|
|
23399
23382
|
var getPath = function getPath() {
|
|
23383
|
+
var size = props.size,
|
|
23384
|
+
sizeType = props.sizeType,
|
|
23385
|
+
type = props.type;
|
|
23400
23386
|
var symbolFactory = getSymbolFactory(type);
|
|
23401
23387
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23402
23388
|
return symbol();
|
|
23403
23389
|
};
|
|
23404
23390
|
var className = props.className,
|
|
23405
23391
|
cx = props.cx,
|
|
23406
|
-
cy = props.cy
|
|
23392
|
+
cy = props.cy,
|
|
23393
|
+
size = props.size;
|
|
23407
23394
|
var filteredProps = filterProps(props, true);
|
|
23408
23395
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23409
23396
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23414,34 +23401,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23414
23401
|
}
|
|
23415
23402
|
return null;
|
|
23416
23403
|
};
|
|
23404
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23417
23405
|
Symbols.registerSymbol = registerSymbol;
|
|
23418
23406
|
|
|
23419
|
-
function _typeof$
|
|
23407
|
+
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
23408
|
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$
|
|
23409
|
+
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; }
|
|
23410
|
+
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; }
|
|
23411
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23412
|
+
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); } }
|
|
23413
|
+
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; }
|
|
23414
|
+
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); }
|
|
23415
|
+
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); }
|
|
23416
|
+
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); }; }
|
|
23417
|
+
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); }
|
|
23418
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23419
|
+
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; } }
|
|
23420
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23421
|
+
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; }
|
|
23422
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23423
|
+
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
23424
|
var SIZE = 32;
|
|
23437
23425
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23438
|
-
_inherits$
|
|
23439
|
-
var _super = _createSuper$
|
|
23426
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23427
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23440
23428
|
function DefaultLegendContent() {
|
|
23441
|
-
_classCallCheck$
|
|
23429
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23442
23430
|
return _super.apply(this, arguments);
|
|
23443
23431
|
}
|
|
23444
|
-
_createClass$
|
|
23432
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23445
23433
|
key: "renderIcon",
|
|
23446
23434
|
value:
|
|
23447
23435
|
/**
|
|
@@ -23486,7 +23474,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23486
23474
|
});
|
|
23487
23475
|
}
|
|
23488
23476
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23489
|
-
var iconProps = _objectSpread$
|
|
23477
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23490
23478
|
delete iconProps.legendIcon;
|
|
23491
23479
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23492
23480
|
}
|
|
@@ -23534,7 +23522,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23534
23522
|
var finalFormatter = entry.formatter || formatter;
|
|
23535
23523
|
var className = classNames((_classNames = {
|
|
23536
23524
|
'recharts-legend-item': true
|
|
23537
|
-
}, _defineProperty$
|
|
23525
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23538
23526
|
if (entry.type === 'none') {
|
|
23539
23527
|
return null;
|
|
23540
23528
|
}
|
|
@@ -23579,8 +23567,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23579
23567
|
}]);
|
|
23580
23568
|
return DefaultLegendContent;
|
|
23581
23569
|
}(PureComponent);
|
|
23582
|
-
_defineProperty$
|
|
23583
|
-
_defineProperty$
|
|
23570
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23571
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23584
23572
|
iconSize: 14,
|
|
23585
23573
|
layout: 'horizontal',
|
|
23586
23574
|
align: 'center',
|
|
@@ -23588,25 +23576,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23588
23576
|
inactiveColor: '#ccc'
|
|
23589
23577
|
});
|
|
23590
23578
|
|
|
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$
|
|
23579
|
+
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); }
|
|
23580
|
+
var _excluded$9 = ["ref"];
|
|
23581
|
+
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; }
|
|
23582
|
+
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; }
|
|
23583
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23584
|
+
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); } }
|
|
23585
|
+
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; }
|
|
23586
|
+
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); }
|
|
23587
|
+
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); }
|
|
23588
|
+
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); }; }
|
|
23589
|
+
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); }
|
|
23590
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23591
|
+
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; } }
|
|
23592
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23593
|
+
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; }
|
|
23594
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23595
|
+
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); }
|
|
23596
|
+
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; }
|
|
23597
|
+
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
23598
|
function defaultUniqBy$1(entry) {
|
|
23611
23599
|
return entry.value;
|
|
23612
23600
|
}
|
|
@@ -23627,27 +23615,27 @@ function renderContent$1(content, props) {
|
|
|
23627
23615
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23628
23616
|
}
|
|
23629
23617
|
props.ref;
|
|
23630
|
-
var otherProps = _objectWithoutProperties$
|
|
23618
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23631
23619
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23632
23620
|
}
|
|
23633
23621
|
var EPS$2 = 1;
|
|
23634
23622
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23635
|
-
_inherits$
|
|
23636
|
-
var _super = _createSuper$
|
|
23623
|
+
_inherits$7(Legend, _PureComponent);
|
|
23624
|
+
var _super = _createSuper$7(Legend);
|
|
23637
23625
|
function Legend() {
|
|
23638
23626
|
var _this;
|
|
23639
|
-
_classCallCheck$
|
|
23627
|
+
_classCallCheck$9(this, Legend);
|
|
23640
23628
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23641
23629
|
args[_key] = arguments[_key];
|
|
23642
23630
|
}
|
|
23643
23631
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23644
|
-
_defineProperty$
|
|
23632
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23645
23633
|
boxWidth: -1,
|
|
23646
23634
|
boxHeight: -1
|
|
23647
23635
|
});
|
|
23648
23636
|
return _this;
|
|
23649
23637
|
}
|
|
23650
|
-
_createClass$
|
|
23638
|
+
_createClass$9(Legend, [{
|
|
23651
23639
|
key: "componentDidMount",
|
|
23652
23640
|
value: function componentDidMount() {
|
|
23653
23641
|
this.updateBBox();
|
|
@@ -23722,7 +23710,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23722
23710
|
};
|
|
23723
23711
|
}
|
|
23724
23712
|
}
|
|
23725
|
-
return _objectSpread$
|
|
23713
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23726
23714
|
}
|
|
23727
23715
|
}, {
|
|
23728
23716
|
key: "updateBBox",
|
|
@@ -23765,7 +23753,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23765
23753
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23766
23754
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23767
23755
|
payload = _this$props2.payload;
|
|
23768
|
-
var outerStyle = _objectSpread$
|
|
23756
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23769
23757
|
position: 'absolute',
|
|
23770
23758
|
width: width || 'auto',
|
|
23771
23759
|
height: height || 'auto'
|
|
@@ -23776,7 +23764,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23776
23764
|
ref: function ref(node) {
|
|
23777
23765
|
_this2.wrapperNode = node;
|
|
23778
23766
|
}
|
|
23779
|
-
}, renderContent$1(content, _objectSpread$
|
|
23767
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23780
23768
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23781
23769
|
})));
|
|
23782
23770
|
}
|
|
@@ -23799,8 +23787,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23799
23787
|
}]);
|
|
23800
23788
|
return Legend;
|
|
23801
23789
|
}(PureComponent);
|
|
23802
|
-
_defineProperty$
|
|
23803
|
-
_defineProperty$
|
|
23790
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23791
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23804
23792
|
iconSize: 14,
|
|
23805
23793
|
layout: 'horizontal',
|
|
23806
23794
|
align: 'center',
|
|
@@ -24364,13 +24352,13 @@ function setRafTimeout(callback) {
|
|
|
24364
24352
|
requestAnimationFrame(shouldUpdate);
|
|
24365
24353
|
}
|
|
24366
24354
|
|
|
24367
|
-
function _typeof$
|
|
24368
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24369
|
-
function _nonIterableRest$
|
|
24370
|
-
function _unsupportedIterableToArray$
|
|
24371
|
-
function _arrayLikeToArray$
|
|
24355
|
+
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); }
|
|
24356
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24357
|
+
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."); }
|
|
24358
|
+
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); }
|
|
24359
|
+
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
24360
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24373
|
-
function _arrayWithHoles$
|
|
24361
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24374
24362
|
function createAnimateManager() {
|
|
24375
24363
|
var currStyle = {};
|
|
24376
24364
|
var handleChange = function handleChange() {
|
|
@@ -24397,7 +24385,7 @@ function createAnimateManager() {
|
|
|
24397
24385
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24398
24386
|
return;
|
|
24399
24387
|
}
|
|
24400
|
-
if (_typeof$
|
|
24388
|
+
if (_typeof$o(_style) === 'object') {
|
|
24401
24389
|
currStyle = _style;
|
|
24402
24390
|
handleChange(currStyle);
|
|
24403
24391
|
}
|
|
@@ -24424,12 +24412,12 @@ function createAnimateManager() {
|
|
|
24424
24412
|
};
|
|
24425
24413
|
}
|
|
24426
24414
|
|
|
24427
|
-
function _typeof$
|
|
24428
|
-
function ownKeys$
|
|
24429
|
-
function _objectSpread$
|
|
24430
|
-
function _defineProperty$
|
|
24431
|
-
function _toPropertyKey$
|
|
24432
|
-
function _toPrimitive$
|
|
24415
|
+
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); }
|
|
24416
|
+
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; }
|
|
24417
|
+
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; }
|
|
24418
|
+
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; }
|
|
24419
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24420
|
+
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
24421
|
/* eslint no-console: 0 */
|
|
24434
24422
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24435
24423
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24461,7 +24449,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24461
24449
|
*/
|
|
24462
24450
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24463
24451
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24464
|
-
return _defineProperty$
|
|
24452
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24465
24453
|
}
|
|
24466
24454
|
var isTransition = name === 'transition';
|
|
24467
24455
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24472,7 +24460,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24472
24460
|
if (isTransition) {
|
|
24473
24461
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24474
24462
|
}
|
|
24475
|
-
return _objectSpread$
|
|
24463
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24476
24464
|
}, {});
|
|
24477
24465
|
};
|
|
24478
24466
|
|
|
@@ -24482,7 +24470,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24482
24470
|
*/
|
|
24483
24471
|
var mapObject = function mapObject(fn, obj) {
|
|
24484
24472
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24485
|
-
return _objectSpread$
|
|
24473
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24486
24474
|
}, {});
|
|
24487
24475
|
};
|
|
24488
24476
|
|
|
@@ -24492,7 +24480,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24492
24480
|
*/
|
|
24493
24481
|
var translateStyle = function translateStyle(style) {
|
|
24494
24482
|
return Object.keys(style).reduce(function (res, key) {
|
|
24495
|
-
return _objectSpread$
|
|
24483
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24496
24484
|
}, style);
|
|
24497
24485
|
};
|
|
24498
24486
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24520,16 +24508,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24520
24508
|
}
|
|
24521
24509
|
};
|
|
24522
24510
|
|
|
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$
|
|
24511
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24512
|
+
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."); }
|
|
24513
|
+
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; } }
|
|
24514
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24515
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24528
24516
|
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$
|
|
24517
|
+
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
24518
|
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$
|
|
24519
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24520
|
+
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
24521
|
var ACCURACY = 1e-4;
|
|
24534
24522
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24535
24523
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24605,7 +24593,7 @@ var configBezier = function configBezier() {
|
|
|
24605
24593
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24606
24594
|
return parseFloat(x);
|
|
24607
24595
|
});
|
|
24608
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24596
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24609
24597
|
x1 = _easing$1$split$0$spl2[0];
|
|
24610
24598
|
y1 = _easing$1$split$0$spl2[1];
|
|
24611
24599
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24698,22 +24686,22 @@ var configEasing = function configEasing() {
|
|
|
24698
24686
|
return null;
|
|
24699
24687
|
};
|
|
24700
24688
|
|
|
24701
|
-
function _typeof$
|
|
24702
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24689
|
+
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); }
|
|
24690
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24703
24691
|
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
24692
|
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$
|
|
24693
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24694
|
+
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; }
|
|
24695
|
+
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; }
|
|
24696
|
+
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; }
|
|
24697
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24698
|
+
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); }
|
|
24699
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24700
|
+
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."); }
|
|
24701
|
+
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); }
|
|
24702
|
+
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; }
|
|
24703
|
+
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; } }
|
|
24704
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24717
24705
|
var alpha = function alpha(begin, end, k) {
|
|
24718
24706
|
return begin + (end - begin) * k;
|
|
24719
24707
|
};
|
|
@@ -24731,10 +24719,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24731
24719
|
var nextStepVals = mapObject(function (key, val) {
|
|
24732
24720
|
if (needContinue(val)) {
|
|
24733
24721
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24734
|
-
_easing2 = _slicedToArray$
|
|
24722
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24735
24723
|
newX = _easing2[0],
|
|
24736
24724
|
newV = _easing2[1];
|
|
24737
|
-
return _objectSpread$
|
|
24725
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24738
24726
|
from: newX,
|
|
24739
24727
|
velocity: newV
|
|
24740
24728
|
});
|
|
@@ -24744,7 +24732,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24744
24732
|
if (steps < 1) {
|
|
24745
24733
|
return mapObject(function (key, val) {
|
|
24746
24734
|
if (needContinue(val)) {
|
|
24747
|
-
return _objectSpread$
|
|
24735
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24748
24736
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24749
24737
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24750
24738
|
});
|
|
@@ -24759,10 +24747,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24759
24747
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24760
24748
|
var interKeys = getIntersectionKeys(from, to);
|
|
24761
24749
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24762
|
-
return _objectSpread$
|
|
24750
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24763
24751
|
}, {});
|
|
24764
24752
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24765
|
-
return _objectSpread$
|
|
24753
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24766
24754
|
from: from[key],
|
|
24767
24755
|
velocity: 0,
|
|
24768
24756
|
to: to[key]
|
|
@@ -24792,7 +24780,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24792
24780
|
var steps = deltaTime / easing.dt;
|
|
24793
24781
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24794
24782
|
// get union set and add compatible prefix
|
|
24795
|
-
render(_objectSpread$
|
|
24783
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24796
24784
|
preTime = now;
|
|
24797
24785
|
if (!shouldStopAnimation()) {
|
|
24798
24786
|
cafId = requestAnimationFrame(update);
|
|
@@ -24810,14 +24798,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24810
24798
|
}, timingStyle);
|
|
24811
24799
|
|
|
24812
24800
|
// get union set and add compatible prefix
|
|
24813
|
-
render(_objectSpread$
|
|
24801
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24814
24802
|
if (t < 1) {
|
|
24815
24803
|
cafId = requestAnimationFrame(update);
|
|
24816
24804
|
} else {
|
|
24817
24805
|
var finalStyle = mapObject(function (key, val) {
|
|
24818
24806
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24819
24807
|
}, timingStyle);
|
|
24820
|
-
render(_objectSpread$
|
|
24808
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24821
24809
|
}
|
|
24822
24810
|
};
|
|
24823
24811
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24833,37 +24821,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24833
24821
|
};
|
|
24834
24822
|
});
|
|
24835
24823
|
|
|
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$
|
|
24824
|
+
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); }
|
|
24825
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24826
|
+
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; }
|
|
24827
|
+
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; }
|
|
24828
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24841
24829
|
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$
|
|
24830
|
+
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
24831
|
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$
|
|
24832
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24833
|
+
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; }
|
|
24834
|
+
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; }
|
|
24835
|
+
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; }
|
|
24836
|
+
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; }
|
|
24837
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24838
|
+
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); } }
|
|
24839
|
+
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; }
|
|
24840
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24841
|
+
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); }
|
|
24842
|
+
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); }
|
|
24843
|
+
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); }
|
|
24844
|
+
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); }; }
|
|
24845
|
+
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); }
|
|
24846
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24847
|
+
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; } }
|
|
24848
|
+
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
24849
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24862
|
-
_inherits$
|
|
24863
|
-
var _super = _createSuper$
|
|
24850
|
+
_inherits$6(Animate, _PureComponent);
|
|
24851
|
+
var _super = _createSuper$6(Animate);
|
|
24864
24852
|
function Animate(props, context) {
|
|
24865
24853
|
var _this;
|
|
24866
|
-
_classCallCheck$
|
|
24854
|
+
_classCallCheck$8(this, Animate);
|
|
24867
24855
|
_this = _super.call(this, props, context);
|
|
24868
24856
|
var _this$props = _this.props,
|
|
24869
24857
|
isActive = _this$props.isActive,
|
|
@@ -24873,8 +24861,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24873
24861
|
steps = _this$props.steps,
|
|
24874
24862
|
children = _this$props.children,
|
|
24875
24863
|
duration = _this$props.duration;
|
|
24876
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24877
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24864
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24865
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24878
24866
|
if (!isActive || duration <= 0) {
|
|
24879
24867
|
_this.state = {
|
|
24880
24868
|
style: {}
|
|
@@ -24886,7 +24874,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24886
24874
|
style: to
|
|
24887
24875
|
};
|
|
24888
24876
|
}
|
|
24889
|
-
return _possibleConstructorReturn$
|
|
24877
|
+
return _possibleConstructorReturn$6(_this);
|
|
24890
24878
|
}
|
|
24891
24879
|
if (steps && steps.length) {
|
|
24892
24880
|
_this.state = {
|
|
@@ -24897,10 +24885,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24897
24885
|
_this.state = {
|
|
24898
24886
|
style: from
|
|
24899
24887
|
};
|
|
24900
|
-
return _possibleConstructorReturn$
|
|
24888
|
+
return _possibleConstructorReturn$6(_this);
|
|
24901
24889
|
}
|
|
24902
24890
|
_this.state = {
|
|
24903
|
-
style: attributeName ? _defineProperty$
|
|
24891
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24904
24892
|
};
|
|
24905
24893
|
} else {
|
|
24906
24894
|
_this.state = {
|
|
@@ -24909,7 +24897,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24909
24897
|
}
|
|
24910
24898
|
return _this;
|
|
24911
24899
|
}
|
|
24912
|
-
_createClass$
|
|
24900
|
+
_createClass$8(Animate, [{
|
|
24913
24901
|
key: "componentDidMount",
|
|
24914
24902
|
value: function componentDidMount() {
|
|
24915
24903
|
var _this$props2 = this.props,
|
|
@@ -24937,7 +24925,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24937
24925
|
}
|
|
24938
24926
|
if (!isActive) {
|
|
24939
24927
|
var newState = {
|
|
24940
|
-
style: attributeName ? _defineProperty$
|
|
24928
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24941
24929
|
};
|
|
24942
24930
|
if (this.state && style) {
|
|
24943
24931
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24960,14 +24948,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24960
24948
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24961
24949
|
if (this.state && style) {
|
|
24962
24950
|
var _newState = {
|
|
24963
|
-
style: attributeName ? _defineProperty$
|
|
24951
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24964
24952
|
};
|
|
24965
24953
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24966
24954
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24967
24955
|
this.setState(_newState);
|
|
24968
24956
|
}
|
|
24969
24957
|
}
|
|
24970
|
-
this.runAnimation(_objectSpread$
|
|
24958
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24971
24959
|
from: from,
|
|
24972
24960
|
begin: 0
|
|
24973
24961
|
}));
|
|
@@ -25050,7 +25038,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25050
25038
|
}), duration]);
|
|
25051
25039
|
}
|
|
25052
25040
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25053
|
-
var newStyle = _objectSpread$
|
|
25041
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25054
25042
|
transition: transition
|
|
25055
25043
|
});
|
|
25056
25044
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25082,9 +25070,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25082
25070
|
this.runStepAnimation(props);
|
|
25083
25071
|
return;
|
|
25084
25072
|
}
|
|
25085
|
-
var to = attributeName ? _defineProperty$
|
|
25073
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25086
25074
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25087
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25075
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25088
25076
|
transition: transition
|
|
25089
25077
|
}), duration, onAnimationEnd]);
|
|
25090
25078
|
}
|
|
@@ -25105,7 +25093,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25105
25093
|
_this$props4.onAnimationEnd;
|
|
25106
25094
|
_this$props4.shouldReAnimate;
|
|
25107
25095
|
_this$props4.onAnimationReStart;
|
|
25108
|
-
var others = _objectWithoutProperties$
|
|
25096
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25109
25097
|
var count = Children.count(children);
|
|
25110
25098
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25111
25099
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25120,8 +25108,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25120
25108
|
_container$props$styl = _container$props.style,
|
|
25121
25109
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25122
25110
|
className = _container$props.className;
|
|
25123
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25124
|
-
style: _objectSpread$
|
|
25111
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25112
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25125
25113
|
className: className
|
|
25126
25114
|
}));
|
|
25127
25115
|
return res;
|
|
@@ -25646,10 +25634,10 @@ var defineProperty$2 = (function() {
|
|
|
25646
25634
|
} catch (e) {}
|
|
25647
25635
|
}());
|
|
25648
25636
|
|
|
25649
|
-
var _defineProperty$
|
|
25637
|
+
var _defineProperty$l = defineProperty$2;
|
|
25650
25638
|
|
|
25651
25639
|
var constant$1 = constant_1,
|
|
25652
|
-
defineProperty$1 = _defineProperty$
|
|
25640
|
+
defineProperty$1 = _defineProperty$l,
|
|
25653
25641
|
identity$7 = identity_1;
|
|
25654
25642
|
|
|
25655
25643
|
/**
|
|
@@ -25826,18 +25814,18 @@ var sortBy_1 = sortBy;
|
|
|
25826
25814
|
/**
|
|
25827
25815
|
* @fileOverview Default Tooltip Content
|
|
25828
25816
|
*/
|
|
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$
|
|
25817
|
+
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); }
|
|
25818
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25819
|
+
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."); }
|
|
25820
|
+
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); }
|
|
25821
|
+
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; }
|
|
25822
|
+
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; } }
|
|
25823
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25824
|
+
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; }
|
|
25825
|
+
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; }
|
|
25826
|
+
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; }
|
|
25827
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25828
|
+
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
25829
|
function defaultFormatter(value) {
|
|
25842
25830
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25843
25831
|
}
|
|
@@ -25867,7 +25855,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25867
25855
|
if (entry.type === 'none') {
|
|
25868
25856
|
return null;
|
|
25869
25857
|
}
|
|
25870
|
-
var finalItemStyle = _objectSpread$
|
|
25858
|
+
var finalItemStyle = _objectSpread$j({
|
|
25871
25859
|
display: 'block',
|
|
25872
25860
|
paddingTop: 4,
|
|
25873
25861
|
paddingBottom: 4,
|
|
@@ -25881,7 +25869,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25881
25869
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25882
25870
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25883
25871
|
if (Array.isArray(formatted)) {
|
|
25884
|
-
var _formatted = _slicedToArray$
|
|
25872
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25885
25873
|
finalValue = _formatted[0];
|
|
25886
25874
|
finalName = _formatted[1];
|
|
25887
25875
|
} else {
|
|
@@ -25913,14 +25901,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25913
25901
|
}
|
|
25914
25902
|
return null;
|
|
25915
25903
|
};
|
|
25916
|
-
var finalStyle = _objectSpread$
|
|
25904
|
+
var finalStyle = _objectSpread$j({
|
|
25917
25905
|
margin: 0,
|
|
25918
25906
|
padding: 10,
|
|
25919
25907
|
backgroundColor: '#fff',
|
|
25920
25908
|
border: '1px solid #ccc',
|
|
25921
25909
|
whiteSpace: 'nowrap'
|
|
25922
25910
|
}, contentStyle);
|
|
25923
|
-
var finalLabelStyle = _objectSpread$
|
|
25911
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25924
25912
|
margin: 0
|
|
25925
25913
|
}, labelStyle);
|
|
25926
25914
|
var hasLabel = !isNil_1(label);
|
|
@@ -25961,22 +25949,18 @@ var Global = {
|
|
|
25961
25949
|
}
|
|
25962
25950
|
};
|
|
25963
25951
|
|
|
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); }
|
|
25952
|
+
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); }
|
|
25953
|
+
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; }
|
|
25954
|
+
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; }
|
|
25955
|
+
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; }
|
|
25956
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25957
|
+
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); }
|
|
25958
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25959
|
+
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."); }
|
|
25960
|
+
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); }
|
|
25961
|
+
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; }
|
|
25962
|
+
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; } }
|
|
25963
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25980
25964
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25981
25965
|
var EPS$1 = 1;
|
|
25982
25966
|
function defaultUniqBy(entry) {
|
|
@@ -26000,204 +25984,7 @@ function renderContent(content, props) {
|
|
|
26000
25984
|
}
|
|
26001
25985
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26002
25986
|
}
|
|
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", {
|
|
25987
|
+
var tooltipDefaultProps = {
|
|
26201
25988
|
active: false,
|
|
26202
25989
|
allowEscapeViewBox: {
|
|
26203
25990
|
x: false,
|
|
@@ -26218,6 +26005,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26218
26005
|
x: 0,
|
|
26219
26006
|
y: 0
|
|
26220
26007
|
},
|
|
26008
|
+
// this doesn't exist on TooltipProps
|
|
26009
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26010
|
+
// @ts-ignore
|
|
26221
26011
|
cursorStyle: {},
|
|
26222
26012
|
separator: ' : ',
|
|
26223
26013
|
wrapperStyle: {},
|
|
@@ -26231,7 +26021,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26231
26021
|
animationDuration: 400,
|
|
26232
26022
|
filterNull: true,
|
|
26233
26023
|
useTranslate3d: false
|
|
26234
|
-
}
|
|
26024
|
+
};
|
|
26025
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26026
|
+
var _classNames;
|
|
26027
|
+
var _useState = useState(-1),
|
|
26028
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26029
|
+
boxWidth = _useState2[0],
|
|
26030
|
+
setBoxWidth = _useState2[1];
|
|
26031
|
+
var _useState3 = useState(-1),
|
|
26032
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26033
|
+
boxHeight = _useState4[0],
|
|
26034
|
+
setBoxHeight = _useState4[1];
|
|
26035
|
+
var _useState5 = useState(false),
|
|
26036
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26037
|
+
dismissed = _useState6[0],
|
|
26038
|
+
setDismissed = _useState6[1];
|
|
26039
|
+
var _useState7 = useState({
|
|
26040
|
+
x: 0,
|
|
26041
|
+
y: 0
|
|
26042
|
+
}),
|
|
26043
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26044
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26045
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26046
|
+
var wrapperNode = useRef();
|
|
26047
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26048
|
+
reverseDirection = props.reverseDirection,
|
|
26049
|
+
coordinate = props.coordinate,
|
|
26050
|
+
offset = props.offset,
|
|
26051
|
+
position = props.position,
|
|
26052
|
+
viewBox = props.viewBox;
|
|
26053
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26054
|
+
if (event.key === 'Escape') {
|
|
26055
|
+
setDismissed(true);
|
|
26056
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26057
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26058
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26059
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26060
|
+
});
|
|
26061
|
+
});
|
|
26062
|
+
}
|
|
26063
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26064
|
+
useEffect(function () {
|
|
26065
|
+
var updateBBox = function updateBBox() {
|
|
26066
|
+
if (dismissed) {
|
|
26067
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26068
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26069
|
+
setDismissed(false);
|
|
26070
|
+
}
|
|
26071
|
+
} else {
|
|
26072
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26073
|
+
}
|
|
26074
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26075
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26076
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26077
|
+
setBoxWidth(box.width);
|
|
26078
|
+
setBoxHeight(box.height);
|
|
26079
|
+
}
|
|
26080
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26081
|
+
setBoxWidth(-1);
|
|
26082
|
+
setBoxHeight(-1);
|
|
26083
|
+
}
|
|
26084
|
+
};
|
|
26085
|
+
updateBBox();
|
|
26086
|
+
return function () {
|
|
26087
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26088
|
+
};
|
|
26089
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26090
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26091
|
+
var key = _ref.key,
|
|
26092
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26093
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26094
|
+
if (position && isNumber(position[key])) {
|
|
26095
|
+
return position[key];
|
|
26096
|
+
}
|
|
26097
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26098
|
+
var positive = coordinate[key] + offset;
|
|
26099
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26100
|
+
return reverseDirection[key] ? negative : positive;
|
|
26101
|
+
}
|
|
26102
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26103
|
+
var _tooltipBoundary = negative;
|
|
26104
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26105
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26106
|
+
return Math.max(positive, viewBox[key]);
|
|
26107
|
+
}
|
|
26108
|
+
return Math.max(negative, viewBox[key]);
|
|
26109
|
+
}
|
|
26110
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26111
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26112
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26113
|
+
return Math.max(negative, viewBox[key]);
|
|
26114
|
+
}
|
|
26115
|
+
return Math.max(positive, viewBox[key]);
|
|
26116
|
+
};
|
|
26117
|
+
var payload = props.payload,
|
|
26118
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26119
|
+
filterNull = props.filterNull,
|
|
26120
|
+
active = props.active,
|
|
26121
|
+
wrapperStyle = props.wrapperStyle,
|
|
26122
|
+
useTranslate3d = props.useTranslate3d,
|
|
26123
|
+
isAnimationActive = props.isAnimationActive,
|
|
26124
|
+
animationDuration = props.animationDuration,
|
|
26125
|
+
animationEasing = props.animationEasing;
|
|
26126
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26127
|
+
return !isNil_1(entry.value);
|
|
26128
|
+
}) : payload);
|
|
26129
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26130
|
+
var content = props.content;
|
|
26131
|
+
var outerStyle = _objectSpread$i({
|
|
26132
|
+
pointerEvents: 'none',
|
|
26133
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26134
|
+
position: 'absolute',
|
|
26135
|
+
top: 0,
|
|
26136
|
+
left: 0
|
|
26137
|
+
}, wrapperStyle);
|
|
26138
|
+
var translateX, translateY;
|
|
26139
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26140
|
+
translateX = position.x;
|
|
26141
|
+
translateY = position.y;
|
|
26142
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26143
|
+
translateX = getTranslate({
|
|
26144
|
+
key: 'x',
|
|
26145
|
+
tooltipDimension: boxWidth,
|
|
26146
|
+
viewBoxDimension: viewBox.width
|
|
26147
|
+
});
|
|
26148
|
+
translateY = getTranslate({
|
|
26149
|
+
key: 'y',
|
|
26150
|
+
tooltipDimension: boxHeight,
|
|
26151
|
+
viewBoxDimension: viewBox.height
|
|
26152
|
+
});
|
|
26153
|
+
} else {
|
|
26154
|
+
outerStyle.visibility = 'hidden';
|
|
26155
|
+
}
|
|
26156
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26157
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26158
|
+
})), outerStyle);
|
|
26159
|
+
if (isAnimationActive && active) {
|
|
26160
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26161
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26162
|
+
})), outerStyle);
|
|
26163
|
+
}
|
|
26164
|
+
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));
|
|
26165
|
+
return (
|
|
26166
|
+
/*#__PURE__*/
|
|
26167
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26168
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26169
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26170
|
+
React__default.createElement("div", {
|
|
26171
|
+
tabIndex: -1,
|
|
26172
|
+
role: "dialog",
|
|
26173
|
+
className: cls,
|
|
26174
|
+
style: outerStyle,
|
|
26175
|
+
ref: wrapperNode
|
|
26176
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26177
|
+
payload: finalPayload
|
|
26178
|
+
})))
|
|
26179
|
+
);
|
|
26180
|
+
};
|
|
26181
|
+
|
|
26182
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26183
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26184
|
+
|
|
26185
|
+
/**
|
|
26186
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26187
|
+
* children.props when there are no props set by the consumer
|
|
26188
|
+
* doesn't work if using default parameters
|
|
26189
|
+
*/
|
|
26190
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26235
26191
|
|
|
26236
26192
|
var root = _root;
|
|
26237
26193
|
|
|
@@ -31801,12 +31757,12 @@ module.exports = exports['default'];
|
|
|
31801
31757
|
|
|
31802
31758
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31803
31759
|
|
|
31804
|
-
function _typeof$
|
|
31805
|
-
function ownKeys$
|
|
31806
|
-
function _objectSpread$
|
|
31807
|
-
function _defineProperty$
|
|
31808
|
-
function _toPropertyKey$
|
|
31809
|
-
function _toPrimitive$
|
|
31760
|
+
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); }
|
|
31761
|
+
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; }
|
|
31762
|
+
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; }
|
|
31763
|
+
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; }
|
|
31764
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31765
|
+
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
31766
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31811
31767
|
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
31768
|
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 +31830,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31874
31830
|
}
|
|
31875
31831
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31876
31832
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31877
|
-
var measurementSpanStyle = _objectSpread$
|
|
31833
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31878
31834
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31879
31835
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31880
31836
|
return styleKey;
|
|
@@ -31929,11 +31885,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31929
31885
|
};
|
|
31930
31886
|
};
|
|
31931
31887
|
|
|
31932
|
-
var _excluded$
|
|
31933
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31888
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31934
31889
|
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$
|
|
31890
|
+
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; }
|
|
31891
|
+
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
31892
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31938
31893
|
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
31894
|
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 +32042,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32087
32042
|
}
|
|
32088
32043
|
return getWordsWithoutCalculate(children);
|
|
32089
32044
|
};
|
|
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);
|
|
32045
|
+
var textDefaultProps = {
|
|
32046
|
+
x: 0,
|
|
32047
|
+
y: 0,
|
|
32048
|
+
lineHeight: '1em',
|
|
32049
|
+
capHeight: '0.71em',
|
|
32050
|
+
// Magic number from d3
|
|
32051
|
+
scaleToFit: false,
|
|
32052
|
+
textAnchor: 'start',
|
|
32053
|
+
verticalAnchor: 'end',
|
|
32054
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32055
|
+
fill: '#808080'
|
|
32056
|
+
};
|
|
32057
|
+
var Text = function Text(props) {
|
|
32109
32058
|
var wordsByLines = useMemo(function () {
|
|
32110
32059
|
return getWordsByLines({
|
|
32111
32060
|
breakAll: props.breakAll,
|
|
32112
32061
|
children: props.children,
|
|
32113
32062
|
maxLines: props.maxLines,
|
|
32114
|
-
scaleToFit: scaleToFit,
|
|
32063
|
+
scaleToFit: props.scaleToFit,
|
|
32115
32064
|
style: props.style,
|
|
32116
32065
|
width: props.width
|
|
32117
32066
|
});
|
|
32118
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32067
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32119
32068
|
var dx = props.dx,
|
|
32120
32069
|
dy = props.dy,
|
|
32070
|
+
textAnchor = props.textAnchor,
|
|
32071
|
+
verticalAnchor = props.verticalAnchor,
|
|
32072
|
+
scaleToFit = props.scaleToFit,
|
|
32121
32073
|
angle = props.angle,
|
|
32074
|
+
lineHeight = props.lineHeight,
|
|
32075
|
+
capHeight = props.capHeight,
|
|
32122
32076
|
className = props.className,
|
|
32123
32077
|
breakAll = props.breakAll,
|
|
32124
|
-
textProps = _objectWithoutProperties$
|
|
32125
|
-
if (!isNumOrStr(
|
|
32078
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32079
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32126
32080
|
return null;
|
|
32127
32081
|
}
|
|
32128
|
-
var x =
|
|
32129
|
-
var y =
|
|
32082
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32083
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32130
32084
|
var startDy;
|
|
32131
32085
|
switch (verticalAnchor) {
|
|
32132
32086
|
case 'start':
|
|
@@ -32156,7 +32110,7 @@ var Text = function Text(_ref5) {
|
|
|
32156
32110
|
y: y,
|
|
32157
32111
|
className: classNames('recharts-text', className),
|
|
32158
32112
|
textAnchor: textAnchor,
|
|
32159
|
-
fill: fill.includes('url') ?
|
|
32113
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32160
32114
|
}), wordsByLines.map(function (line, index) {
|
|
32161
32115
|
return (
|
|
32162
32116
|
/*#__PURE__*/
|
|
@@ -32169,6 +32123,7 @@ var Text = function Text(_ref5) {
|
|
|
32169
32123
|
);
|
|
32170
32124
|
}));
|
|
32171
32125
|
};
|
|
32126
|
+
Text.defaultProps = textDefaultProps;
|
|
32172
32127
|
|
|
32173
32128
|
var baseIsEqual = _baseIsEqual;
|
|
32174
32129
|
|
|
@@ -38436,7 +38391,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38436
38391
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38437
38392
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38438
38393
|
|
|
38439
|
-
var _excluded$
|
|
38394
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38440
38395
|
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
38396
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38442
38397
|
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 +38399,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38444
38399
|
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
38400
|
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
38401
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38447
|
-
function _objectWithoutProperties$
|
|
38448
|
-
function _objectWithoutPropertiesLoose$
|
|
38402
|
+
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; }
|
|
38403
|
+
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
38404
|
function ErrorBar(props) {
|
|
38450
38405
|
var offset = props.offset,
|
|
38451
38406
|
layout = props.layout,
|
|
@@ -38455,7 +38410,7 @@ function ErrorBar(props) {
|
|
|
38455
38410
|
dataPointFormatter = props.dataPointFormatter,
|
|
38456
38411
|
xAxis = props.xAxis,
|
|
38457
38412
|
yAxis = props.yAxis,
|
|
38458
|
-
others = _objectWithoutProperties$
|
|
38413
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38459
38414
|
var svgProps = filterProps(others);
|
|
38460
38415
|
var errorBars = data.map(function (entry, i) {
|
|
38461
38416
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38566,18 +38521,18 @@ ErrorBar.defaultProps = {
|
|
|
38566
38521
|
};
|
|
38567
38522
|
ErrorBar.displayName = 'ErrorBar';
|
|
38568
38523
|
|
|
38569
|
-
function _typeof$
|
|
38524
|
+
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
38525
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38571
38526
|
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
38527
|
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
38528
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38574
38529
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38575
38530
|
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$
|
|
38531
|
+
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; }
|
|
38532
|
+
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; }
|
|
38533
|
+
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; }
|
|
38534
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38535
|
+
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
38536
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38582
38537
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38583
38538
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38748,7 +38703,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38748
38703
|
};
|
|
38749
38704
|
});
|
|
38750
38705
|
}
|
|
38751
|
-
return _objectSpread$
|
|
38706
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38752
38707
|
payload: legendData,
|
|
38753
38708
|
item: legendItem
|
|
38754
38709
|
});
|
|
@@ -38902,10 +38857,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38902
38857
|
verticalAlign = legendProps.verticalAlign,
|
|
38903
38858
|
layout = legendProps.layout;
|
|
38904
38859
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38905
|
-
newOffset = _objectSpread$
|
|
38860
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38906
38861
|
}
|
|
38907
38862
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38908
|
-
newOffset = _objectSpread$
|
|
38863
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38909
38864
|
}
|
|
38910
38865
|
}
|
|
38911
38866
|
return newOffset;
|
|
@@ -39331,14 +39286,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39331
39286
|
items: [item]
|
|
39332
39287
|
};
|
|
39333
39288
|
}
|
|
39334
|
-
return _objectSpread$
|
|
39289
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39335
39290
|
}, {});
|
|
39336
39291
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39337
39292
|
var group = stackGroups[axisId];
|
|
39338
39293
|
if (group.hasStack) {
|
|
39339
39294
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39340
39295
|
var g = group.stackGroups[stackId];
|
|
39341
|
-
return _objectSpread$
|
|
39296
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39342
39297
|
numericAxisId: numericAxisId,
|
|
39343
39298
|
cateAxisId: cateAxisId,
|
|
39344
39299
|
items: g.items,
|
|
@@ -39346,7 +39301,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39346
39301
|
}));
|
|
39347
39302
|
}, {});
|
|
39348
39303
|
}
|
|
39349
|
-
return _objectSpread$
|
|
39304
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39350
39305
|
}, {});
|
|
39351
39306
|
};
|
|
39352
39307
|
|
|
@@ -39560,7 +39515,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39560
39515
|
formatter = _graphicalItem$props.formatter,
|
|
39561
39516
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39562
39517
|
chartType = _graphicalItem$props.chartType;
|
|
39563
|
-
return _objectSpread$
|
|
39518
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39564
39519
|
dataKey: dataKey,
|
|
39565
39520
|
unit: unit,
|
|
39566
39521
|
formatter: formatter,
|
|
@@ -39573,12 +39528,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39573
39528
|
});
|
|
39574
39529
|
};
|
|
39575
39530
|
|
|
39576
|
-
function _typeof$
|
|
39577
|
-
function ownKeys$
|
|
39578
|
-
function _objectSpread$
|
|
39579
|
-
function _defineProperty$
|
|
39580
|
-
function _toPropertyKey$
|
|
39581
|
-
function _toPrimitive$
|
|
39531
|
+
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); }
|
|
39532
|
+
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; }
|
|
39533
|
+
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; }
|
|
39534
|
+
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; }
|
|
39535
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39536
|
+
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
39537
|
var RADIAN = Math.PI / 180;
|
|
39583
39538
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39584
39539
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39683,7 +39638,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39683
39638
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39684
39639
|
}
|
|
39685
39640
|
if (inRange) {
|
|
39686
|
-
return _objectSpread$
|
|
39641
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39687
39642
|
radius: radius,
|
|
39688
39643
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39689
39644
|
});
|
|
@@ -39691,21 +39646,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39691
39646
|
return null;
|
|
39692
39647
|
};
|
|
39693
39648
|
|
|
39694
|
-
function _typeof$
|
|
39695
|
-
var _excluded$7 = ["offset"];
|
|
39649
|
+
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
39650
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39697
39651
|
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
39652
|
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
39653
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39700
39654
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39701
39655
|
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); }
|
|
39656
|
+
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; }
|
|
39657
|
+
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; }
|
|
39658
|
+
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; }
|
|
39659
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39660
|
+
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
39661
|
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
39662
|
var getLabel = function getLabel(props) {
|
|
39711
39663
|
var value = props.value,
|
|
@@ -39850,7 +39802,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39850
39802
|
textAnchor: 'middle',
|
|
39851
39803
|
verticalAnchor: verticalEnd
|
|
39852
39804
|
};
|
|
39853
|
-
return _objectSpread$
|
|
39805
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39854
39806
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39855
39807
|
width: width
|
|
39856
39808
|
} : {});
|
|
@@ -39862,7 +39814,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39862
39814
|
textAnchor: 'middle',
|
|
39863
39815
|
verticalAnchor: verticalStart
|
|
39864
39816
|
};
|
|
39865
|
-
return _objectSpread$
|
|
39817
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39866
39818
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39867
39819
|
width: width
|
|
39868
39820
|
} : {});
|
|
@@ -39874,7 +39826,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39874
39826
|
textAnchor: horizontalEnd,
|
|
39875
39827
|
verticalAnchor: 'middle'
|
|
39876
39828
|
};
|
|
39877
|
-
return _objectSpread$
|
|
39829
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39878
39830
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39879
39831
|
height: height
|
|
39880
39832
|
} : {});
|
|
@@ -39886,7 +39838,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39886
39838
|
textAnchor: horizontalStart,
|
|
39887
39839
|
verticalAnchor: 'middle'
|
|
39888
39840
|
};
|
|
39889
|
-
return _objectSpread$
|
|
39841
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39890
39842
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39891
39843
|
height: height
|
|
39892
39844
|
} : {});
|
|
@@ -39896,7 +39848,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39896
39848
|
height: height
|
|
39897
39849
|
} : {};
|
|
39898
39850
|
if (position === 'insideLeft') {
|
|
39899
|
-
return _objectSpread$
|
|
39851
|
+
return _objectSpread$e({
|
|
39900
39852
|
x: x + horizontalOffset,
|
|
39901
39853
|
y: y + height / 2,
|
|
39902
39854
|
textAnchor: horizontalStart,
|
|
@@ -39904,7 +39856,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39904
39856
|
}, sizeAttrs);
|
|
39905
39857
|
}
|
|
39906
39858
|
if (position === 'insideRight') {
|
|
39907
|
-
return _objectSpread$
|
|
39859
|
+
return _objectSpread$e({
|
|
39908
39860
|
x: x + width - horizontalOffset,
|
|
39909
39861
|
y: y + height / 2,
|
|
39910
39862
|
textAnchor: horizontalEnd,
|
|
@@ -39912,7 +39864,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39912
39864
|
}, sizeAttrs);
|
|
39913
39865
|
}
|
|
39914
39866
|
if (position === 'insideTop') {
|
|
39915
|
-
return _objectSpread$
|
|
39867
|
+
return _objectSpread$e({
|
|
39916
39868
|
x: x + width / 2,
|
|
39917
39869
|
y: y + verticalOffset,
|
|
39918
39870
|
textAnchor: 'middle',
|
|
@@ -39920,7 +39872,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39920
39872
|
}, sizeAttrs);
|
|
39921
39873
|
}
|
|
39922
39874
|
if (position === 'insideBottom') {
|
|
39923
|
-
return _objectSpread$
|
|
39875
|
+
return _objectSpread$e({
|
|
39924
39876
|
x: x + width / 2,
|
|
39925
39877
|
y: y + height - verticalOffset,
|
|
39926
39878
|
textAnchor: 'middle',
|
|
@@ -39928,7 +39880,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39928
39880
|
}, sizeAttrs);
|
|
39929
39881
|
}
|
|
39930
39882
|
if (position === 'insideTopLeft') {
|
|
39931
|
-
return _objectSpread$
|
|
39883
|
+
return _objectSpread$e({
|
|
39932
39884
|
x: x + horizontalOffset,
|
|
39933
39885
|
y: y + verticalOffset,
|
|
39934
39886
|
textAnchor: horizontalStart,
|
|
@@ -39936,7 +39888,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39936
39888
|
}, sizeAttrs);
|
|
39937
39889
|
}
|
|
39938
39890
|
if (position === 'insideTopRight') {
|
|
39939
|
-
return _objectSpread$
|
|
39891
|
+
return _objectSpread$e({
|
|
39940
39892
|
x: x + width - horizontalOffset,
|
|
39941
39893
|
y: y + verticalOffset,
|
|
39942
39894
|
textAnchor: horizontalEnd,
|
|
@@ -39944,7 +39896,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39944
39896
|
}, sizeAttrs);
|
|
39945
39897
|
}
|
|
39946
39898
|
if (position === 'insideBottomLeft') {
|
|
39947
|
-
return _objectSpread$
|
|
39899
|
+
return _objectSpread$e({
|
|
39948
39900
|
x: x + horizontalOffset,
|
|
39949
39901
|
y: y + height - verticalOffset,
|
|
39950
39902
|
textAnchor: horizontalStart,
|
|
@@ -39952,7 +39904,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39952
39904
|
}, sizeAttrs);
|
|
39953
39905
|
}
|
|
39954
39906
|
if (position === 'insideBottomRight') {
|
|
39955
|
-
return _objectSpread$
|
|
39907
|
+
return _objectSpread$e({
|
|
39956
39908
|
x: x + width - horizontalOffset,
|
|
39957
39909
|
y: y + height - verticalOffset,
|
|
39958
39910
|
textAnchor: horizontalEnd,
|
|
@@ -39960,14 +39912,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39960
39912
|
}, sizeAttrs);
|
|
39961
39913
|
}
|
|
39962
39914
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39963
|
-
return _objectSpread$
|
|
39915
|
+
return _objectSpread$e({
|
|
39964
39916
|
x: x + getPercentValue(position.x, width),
|
|
39965
39917
|
y: y + getPercentValue(position.y, height),
|
|
39966
39918
|
textAnchor: 'end',
|
|
39967
39919
|
verticalAnchor: 'end'
|
|
39968
39920
|
}, sizeAttrs);
|
|
39969
39921
|
}
|
|
39970
|
-
return _objectSpread$
|
|
39922
|
+
return _objectSpread$e({
|
|
39971
39923
|
x: x + width / 2,
|
|
39972
39924
|
y: y + height / 2,
|
|
39973
39925
|
textAnchor: 'middle',
|
|
@@ -39977,13 +39929,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39977
39929
|
var isPolar = function isPolar(viewBox) {
|
|
39978
39930
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39979
39931
|
};
|
|
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);
|
|
39932
|
+
function Label$3(props) {
|
|
39987
39933
|
var viewBox = props.viewBox,
|
|
39988
39934
|
position = props.position,
|
|
39989
39935
|
value = props.value,
|
|
@@ -40020,6 +39966,9 @@ function Label$3(_ref4) {
|
|
|
40020
39966
|
}), label);
|
|
40021
39967
|
}
|
|
40022
39968
|
Label$3.displayName = 'Label';
|
|
39969
|
+
Label$3.defaultProps = {
|
|
39970
|
+
offset: 5
|
|
39971
|
+
};
|
|
40023
39972
|
var parseViewBox = function parseViewBox(props) {
|
|
40024
39973
|
var cx = props.cx,
|
|
40025
39974
|
cy = props.cy,
|
|
@@ -40174,9 +40123,8 @@ function last(array) {
|
|
|
40174
40123
|
|
|
40175
40124
|
var last_1 = last;
|
|
40176
40125
|
|
|
40177
|
-
function _typeof$
|
|
40178
|
-
var _excluded$
|
|
40179
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40126
|
+
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); }
|
|
40127
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40180
40128
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40181
40129
|
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
40130
|
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 +40132,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40184
40132
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40185
40133
|
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
40134
|
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$
|
|
40135
|
+
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; }
|
|
40136
|
+
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; }
|
|
40137
|
+
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; }
|
|
40138
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40139
|
+
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); }
|
|
40140
|
+
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; }
|
|
40141
|
+
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; }
|
|
40142
|
+
var defaultProps = {
|
|
40143
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40144
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40145
|
+
}
|
|
40146
|
+
};
|
|
40147
|
+
function LabelList(props) {
|
|
40148
|
+
var data = props.data,
|
|
40149
|
+
valueAccessor = props.valueAccessor,
|
|
40150
|
+
dataKey = props.dataKey,
|
|
40151
|
+
clockWise = props.clockWise,
|
|
40152
|
+
id = props.id,
|
|
40153
|
+
textBreakAll = props.textBreakAll,
|
|
40154
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40207
40155
|
if (!data || !data.length) {
|
|
40208
40156
|
return null;
|
|
40209
40157
|
}
|
|
@@ -40219,7 +40167,7 @@ function LabelList(_ref) {
|
|
|
40219
40167
|
index: index,
|
|
40220
40168
|
value: value,
|
|
40221
40169
|
textBreakAll: textBreakAll,
|
|
40222
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40170
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40223
40171
|
clockWise: clockWise
|
|
40224
40172
|
})),
|
|
40225
40173
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40274,14 +40222,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40274
40222
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40275
40223
|
}
|
|
40276
40224
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40225
|
+
LabelList.defaultProps = defaultProps;
|
|
40277
40226
|
|
|
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
40227
|
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
40228
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40286
40229
|
var sign = mathSign(endAngle - startAngle);
|
|
40287
40230
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40422,19 +40365,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40422
40365
|
}
|
|
40423
40366
|
return path;
|
|
40424
40367
|
};
|
|
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);
|
|
40368
|
+
var Sector = function Sector(props) {
|
|
40438
40369
|
var cx = props.cx,
|
|
40439
40370
|
cy = props.cy,
|
|
40440
40371
|
innerRadius = props.innerRadius,
|
|
@@ -40480,14 +40411,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40480
40411
|
role: "img"
|
|
40481
40412
|
}));
|
|
40482
40413
|
};
|
|
40414
|
+
Sector.defaultProps = {
|
|
40415
|
+
cx: 0,
|
|
40416
|
+
cy: 0,
|
|
40417
|
+
innerRadius: 0,
|
|
40418
|
+
outerRadius: 0,
|
|
40419
|
+
startAngle: 0,
|
|
40420
|
+
endAngle: 0,
|
|
40421
|
+
cornerRadius: 0,
|
|
40422
|
+
forceCornerRadius: false,
|
|
40423
|
+
cornerIsExternal: false
|
|
40424
|
+
};
|
|
40483
40425
|
|
|
40484
|
-
function _typeof$
|
|
40426
|
+
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
40427
|
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$
|
|
40428
|
+
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; }
|
|
40429
|
+
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; }
|
|
40430
|
+
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; }
|
|
40431
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40432
|
+
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
40433
|
var CURVE_FACTORIES = {
|
|
40492
40434
|
curveBasisClosed: curveBasisClosed,
|
|
40493
40435
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40527,14 +40469,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40527
40469
|
* @return {String} path
|
|
40528
40470
|
*/
|
|
40529
40471
|
var getPath$1 = function getPath(_ref) {
|
|
40530
|
-
var
|
|
40531
|
-
|
|
40532
|
-
_ref$points = _ref.points,
|
|
40533
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40472
|
+
var type = _ref.type,
|
|
40473
|
+
points = _ref.points,
|
|
40534
40474
|
baseLine = _ref.baseLine,
|
|
40535
40475
|
layout = _ref.layout,
|
|
40536
|
-
|
|
40537
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40476
|
+
connectNulls = _ref.connectNulls;
|
|
40538
40477
|
var curveFactory = getCurveFactory(type, layout);
|
|
40539
40478
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40540
40479
|
return defined(entry);
|
|
@@ -40545,7 +40484,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40545
40484
|
return defined(base);
|
|
40546
40485
|
}) : baseLine;
|
|
40547
40486
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40548
|
-
return _objectSpread$
|
|
40487
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40549
40488
|
base: formatBaseLine[index]
|
|
40550
40489
|
});
|
|
40551
40490
|
});
|
|
@@ -40586,8 +40525,12 @@ var Curve = function Curve(props) {
|
|
|
40586
40525
|
ref: pathRef
|
|
40587
40526
|
}));
|
|
40588
40527
|
};
|
|
40528
|
+
Curve.defaultProps = {
|
|
40529
|
+
type: 'linear',
|
|
40530
|
+
points: [],
|
|
40531
|
+
connectNulls: false
|
|
40532
|
+
};
|
|
40589
40533
|
|
|
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
40534
|
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
40535
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40593
40536
|
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 +40538,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40595
40538
|
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
40539
|
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
40540
|
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
40541
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40604
40542
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40605
40543
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40655,29 +40593,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40655
40593
|
}
|
|
40656
40594
|
return false;
|
|
40657
40595
|
};
|
|
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);
|
|
40596
|
+
var Rectangle = function Rectangle(props) {
|
|
40675
40597
|
var pathRef = useRef();
|
|
40676
40598
|
var _useState = useState(-1),
|
|
40677
40599
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40678
40600
|
totalLength = _useState2[0],
|
|
40679
40601
|
setTotalLength = _useState2[1];
|
|
40680
|
-
|
|
40602
|
+
useLayoutEffect(function () {
|
|
40681
40603
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40682
40604
|
try {
|
|
40683
40605
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40748,6 +40670,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40748
40670
|
})));
|
|
40749
40671
|
});
|
|
40750
40672
|
};
|
|
40673
|
+
Rectangle.defaultProps = {
|
|
40674
|
+
x: 0,
|
|
40675
|
+
y: 0,
|
|
40676
|
+
width: 0,
|
|
40677
|
+
height: 0,
|
|
40678
|
+
// The radius of border
|
|
40679
|
+
// The radius of four corners when radius is a number
|
|
40680
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40681
|
+
radius: 0,
|
|
40682
|
+
isAnimationActive: false,
|
|
40683
|
+
isUpdateAnimationActive: false,
|
|
40684
|
+
animationBegin: 0,
|
|
40685
|
+
animationDuration: 1500,
|
|
40686
|
+
animationEasing: 'ease'
|
|
40687
|
+
};
|
|
40751
40688
|
|
|
40752
40689
|
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
40690
|
var Dot$1 = function Dot(props) {
|
|
@@ -40767,42 +40704,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40767
40704
|
return null;
|
|
40768
40705
|
};
|
|
40769
40706
|
|
|
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
40707
|
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
40708
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40781
40709
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40782
40710
|
};
|
|
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);
|
|
40711
|
+
var Cross = function Cross(props) {
|
|
40712
|
+
var x = props.x,
|
|
40713
|
+
y = props.y,
|
|
40714
|
+
width = props.width,
|
|
40715
|
+
height = props.height,
|
|
40716
|
+
top = props.top,
|
|
40717
|
+
left = props.left,
|
|
40718
|
+
className = props.className;
|
|
40806
40719
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40807
40720
|
return null;
|
|
40808
40721
|
}
|
|
@@ -40811,6 +40724,14 @@ var Cross = function Cross(_ref) {
|
|
|
40811
40724
|
d: getPath(x, y, width, height, top, left)
|
|
40812
40725
|
}));
|
|
40813
40726
|
};
|
|
40727
|
+
Cross.defaultProps = {
|
|
40728
|
+
x: 0,
|
|
40729
|
+
y: 0,
|
|
40730
|
+
top: 0,
|
|
40731
|
+
left: 0,
|
|
40732
|
+
width: 0,
|
|
40733
|
+
height: 0
|
|
40734
|
+
};
|
|
40814
40735
|
|
|
40815
40736
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40816
40737
|
|
|
@@ -41020,7 +40941,6 @@ var createScale = function createScale(_ref) {
|
|
|
41020
40941
|
isTextActive: false,
|
|
41021
40942
|
isSlideMoving: false,
|
|
41022
40943
|
isTravellerMoving: false,
|
|
41023
|
-
isTravellerFocused: false,
|
|
41024
40944
|
startX: scale(startIndex),
|
|
41025
40945
|
endX: scale(endIndex),
|
|
41026
40946
|
scale: scale,
|
|
@@ -41234,38 +41154,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41234
41154
|
}
|
|
41235
41155
|
});
|
|
41236
41156
|
}
|
|
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
41157
|
}, {
|
|
41270
41158
|
key: "renderBackground",
|
|
41271
41159
|
value: function renderBackground() {
|
|
@@ -41313,7 +41201,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41313
41201
|
}, {
|
|
41314
41202
|
key: "renderTravellerLayer",
|
|
41315
41203
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41316
|
-
var _this3 = this;
|
|
41317
41204
|
var _this$props7 = this.props,
|
|
41318
41205
|
y = _this$props7.y,
|
|
41319
41206
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41327,31 +41214,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41327
41214
|
height: height
|
|
41328
41215
|
});
|
|
41329
41216
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41330
|
-
tabIndex: 0,
|
|
41331
|
-
role: "slider",
|
|
41332
41217
|
className: "recharts-brush-traveller",
|
|
41333
41218
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41334
41219
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41335
41220
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41336
41221
|
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
41222
|
style: {
|
|
41356
41223
|
cursor: 'col-resize'
|
|
41357
41224
|
}
|
|
@@ -41395,9 +41262,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41395
41262
|
height = _this$props9.height,
|
|
41396
41263
|
travellerWidth = _this$props9.travellerWidth,
|
|
41397
41264
|
stroke = _this$props9.stroke;
|
|
41398
|
-
var _this$
|
|
41399
|
-
startX = _this$
|
|
41400
|
-
endX = _this$
|
|
41265
|
+
var _this$state3 = this.state,
|
|
41266
|
+
startX = _this$state3.startX,
|
|
41267
|
+
endX = _this$state3.endX;
|
|
41401
41268
|
var offset = 5;
|
|
41402
41269
|
var attrs = {
|
|
41403
41270
|
pointerEvents: 'none',
|
|
@@ -41429,13 +41296,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41429
41296
|
width = _this$props10.width,
|
|
41430
41297
|
height = _this$props10.height,
|
|
41431
41298
|
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;
|
|
41299
|
+
var _this$state4 = this.state,
|
|
41300
|
+
startX = _this$state4.startX,
|
|
41301
|
+
endX = _this$state4.endX,
|
|
41302
|
+
isTextActive = _this$state4.isTextActive,
|
|
41303
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41304
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41439
41305
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41440
41306
|
return null;
|
|
41441
41307
|
}
|
|
@@ -41447,7 +41313,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41447
41313
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41448
41314
|
onTouchMove: this.handleTouchMove,
|
|
41449
41315
|
style: style
|
|
41450
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41316
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41451
41317
|
}
|
|
41452
41318
|
}], [{
|
|
41453
41319
|
key: "renderDefaultTraveller",
|
|
@@ -41765,7 +41631,7 @@ function every(collection, predicate, guard) {
|
|
|
41765
41631
|
|
|
41766
41632
|
var every_1 = every;
|
|
41767
41633
|
|
|
41768
|
-
var defineProperty = _defineProperty$
|
|
41634
|
+
var defineProperty = _defineProperty$l;
|
|
41769
41635
|
|
|
41770
41636
|
/**
|
|
41771
41637
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42126,6 +41992,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42126
41992
|
legendType: 'rect',
|
|
42127
41993
|
minPointSize: 0,
|
|
42128
41994
|
hide: false,
|
|
41995
|
+
// data of bar
|
|
42129
41996
|
data: [],
|
|
42130
41997
|
layout: 'vertical',
|
|
42131
41998
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45038,11 +44905,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45038
44905
|
}
|
|
45039
44906
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45040
44907
|
x = _this$container$getBo.x,
|
|
45041
|
-
y = _this$container$getBo.y
|
|
45042
|
-
height = _this$container$getBo.height;
|
|
44908
|
+
y = _this$container$getBo.y;
|
|
45043
44909
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45044
44910
|
var pageX = x + coordinate;
|
|
45045
|
-
var pageY = y + this.offset.top
|
|
44911
|
+
var pageY = y + this.offset.top;
|
|
45046
44912
|
this.mouseHandlerCallback({
|
|
45047
44913
|
pageX: pageX,
|
|
45048
44914
|
pageY: pageY
|