@typeolymp/ui-components 1.19.8 → 1.19.9
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/Icon/index.d.ts +1 -1
- 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 +626 -761
- package/build/index.es.js.map +1 -1
- package/build/index.js +626 -761
- 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
|
@@ -3562,6 +3562,7 @@ var icons = {
|
|
|
3562
3562
|
dotsVertical: (jsxs("g", { children: [jsx$1("circle", { cx: 12, cy: 4.2, r: 1.9 }), jsx$1("circle", { cx: 12, cy: 12, r: 1.9 }), jsx$1("path", { d: "M12 17.8c-1.1 0-1.9.9-1.9 1.9 0 1.1.9 1.9 1.9 1.9s1.9-.9 1.9-1.9c0-1-.8-1.9-1.9-1.9z" })] })),
|
|
3563
3563
|
dotsHorizontal: (jsxs("g", { children: [jsx$1("circle", { cx: 4.2, cy: 12, r: 1.9 }), jsx$1("circle", { cx: 12, cy: 12, r: 1.9 }), jsx$1("path", { d: "M17.8 12c0 1.1.9 1.9 1.9 1.9 1.1 0 1.9-.9 1.9-1.9s-.9-1.9-1.9-1.9c-1 0-1.9.8-1.9 1.9z" })] })),
|
|
3564
3564
|
bell: (jsx$1("path", { d: "M13.6 1.8c0-.4-.2-.8-.5-1.1-.3-.3-.7-.5-1.1-.5-.9 0-1.6.7-1.6 1.6v.4c-3.7.8-6.3 4-6.3 7.8v2.9c0 1.6-.6 3.1-1.7 4.2l-.4.2c-.6.6-.9 1.4-.9 2.2v1c0 .8.6 1.4 1.4 1.4h6.3c.2 1.1 1.2 1.9 2.4 1.9h1.6c.7 0 1.3-.3 1.7-.7.3-.3.6-.8.7-1.2h6.3c.7 0 1.4-.6 1.4-1.4v-1c0-.8-.3-1.6-.9-2.2l-.3-.3c-1.1-1.1-1.7-2.6-1.7-4.2V9.9c0-3.8-2.7-7.1-6.4-7.9v-.2z" })),
|
|
3565
|
+
bin: (jsx$1("path", { d: "M4.3 7.2h15.5v.2c-.1 1.4-.2 2.7-.3 4.1-.1 1.3-.2 2.7-.3 4-.1 1.6-.2 3.1-.4 4.7 0 .6-.1 1.1-.1 1.7-.2 1.1-1.3 2.1-2.5 2.1H7.9c-1.2 0-2.4-1.1-2.5-2.3-.1-1.6-.3-3.2-.4-4.9-.1-1.7-.3-3.4-.4-5.2-.1-1.4-.2-2.9-.3-4.4zm7.1 8.4v4.5c0 .4.3.7.7.7.4 0 .6-.3.6-.7v-8.9-.2c-.1-.3-.3-.5-.6-.5-.4 0-.7.3-.7.7v4.4zm4.5 0v-1.1-3.4c0-.4-.3-.7-.7-.7-.4 0-.6.3-.6.7v9.1c0 .3.2.5.5.6.4.1.8-.2.8-.7v-4.5zm-7.8 0v4.6c0 .3.3.6.6.6.4 0 .7-.3.7-.7v-8.9-.2c0-.4-.3-.6-.7-.6-.4 0-.6.3-.6.7v4.5zM15.7 3.3h3.5c1.1 0 1.9.7 2.1 1.8v.4c0 .2-.2.4-.4.5H3.2h-.1c-.3 0-.5-.2-.5-.5 0-1.2.9-2 2.2-2.1h3.5v-.7c0-1.6 1-2.7 2.5-2.7h2.6c1.3.1 2.2 1.2 2.3 2.4v.9zm-5.5 0h3.6v-.8c0-.3-.2-.5-.6-.5h-2.5c-.3 0-.5.2-.6.5.1.2.1.5.1.8z" })),
|
|
3565
3566
|
};
|
|
3566
3567
|
var Icon = function (props) { return (jsx$1(Wrapper$a, __assign$2({}, props, { children: jsx$1("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
|
|
3567
3568
|
|
|
@@ -4493,7 +4494,7 @@ function requiredArgs(required, args) {
|
|
|
4493
4494
|
}
|
|
4494
4495
|
}
|
|
4495
4496
|
|
|
4496
|
-
function _typeof$
|
|
4497
|
+
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
4498
|
/**
|
|
4498
4499
|
* @name toDate
|
|
4499
4500
|
* @category Common Helpers
|
|
@@ -4529,7 +4530,7 @@ function toDate(argument) {
|
|
|
4529
4530
|
requiredArgs(1, arguments);
|
|
4530
4531
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4531
4532
|
|
|
4532
|
-
if (argument instanceof Date || _typeof$
|
|
4533
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4533
4534
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4534
4535
|
return new Date(argument.getTime());
|
|
4535
4536
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4800,7 +4801,7 @@ var millisecondsInMinute = 60000;
|
|
|
4800
4801
|
|
|
4801
4802
|
var millisecondsInHour = 3600000;
|
|
4802
4803
|
|
|
4803
|
-
function _typeof$
|
|
4804
|
+
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
4805
|
/**
|
|
4805
4806
|
* @name isDate
|
|
4806
4807
|
* @category Common Helpers
|
|
@@ -4836,7 +4837,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4836
4837
|
|
|
4837
4838
|
function isDate(value) {
|
|
4838
4839
|
requiredArgs(1, arguments);
|
|
4839
|
-
return value instanceof Date || _typeof$
|
|
4840
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4840
4841
|
}
|
|
4841
4842
|
|
|
4842
4843
|
/**
|
|
@@ -13540,15 +13541,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13540
13541
|
|
|
13541
13542
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13542
13543
|
|
|
13543
|
-
function _slicedToArray$
|
|
13544
|
-
return _arrayWithHoles$
|
|
13544
|
+
function _slicedToArray$d(arr, i) {
|
|
13545
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13545
13546
|
}
|
|
13546
13547
|
|
|
13547
|
-
function _arrayWithHoles$
|
|
13548
|
+
function _arrayWithHoles$e(arr) {
|
|
13548
13549
|
if (Array.isArray(arr)) return arr;
|
|
13549
13550
|
}
|
|
13550
13551
|
|
|
13551
|
-
function _iterableToArrayLimit$
|
|
13552
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13552
13553
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13553
13554
|
|
|
13554
13555
|
if (_i == null) return;
|
|
@@ -13578,16 +13579,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13578
13579
|
return _arr;
|
|
13579
13580
|
}
|
|
13580
13581
|
|
|
13581
|
-
function _unsupportedIterableToArray$
|
|
13582
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13582
13583
|
if (!o) return;
|
|
13583
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13584
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13584
13585
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13585
13586
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13586
13587
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13587
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13588
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13588
13589
|
}
|
|
13589
13590
|
|
|
13590
|
-
function _arrayLikeToArray$
|
|
13591
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13591
13592
|
if (len == null || len > arr.length) len = arr.length;
|
|
13592
13593
|
|
|
13593
13594
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13595,7 +13596,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13595
13596
|
return arr2;
|
|
13596
13597
|
}
|
|
13597
13598
|
|
|
13598
|
-
function _nonIterableRest$
|
|
13599
|
+
function _nonIterableRest$e() {
|
|
13599
13600
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13600
13601
|
}
|
|
13601
13602
|
|
|
@@ -13659,7 +13660,7 @@ reservedProps.forEach(function (name) {
|
|
|
13659
13660
|
// This is a mapping from React prop names to the attribute names.
|
|
13660
13661
|
|
|
13661
13662
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13662
|
-
var _ref2 = _slicedToArray$
|
|
13663
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13663
13664
|
name = _ref2[0],
|
|
13664
13665
|
attributeName = _ref2[1];
|
|
13665
13666
|
|
|
@@ -16059,31 +16060,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16059
16060
|
return true;
|
|
16060
16061
|
};
|
|
16061
16062
|
|
|
16062
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16063
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16063
16064
|
|
|
16064
16065
|
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."); }
|
|
16065
16066
|
|
|
16066
16067
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16067
16068
|
|
|
16068
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16069
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16069
16070
|
|
|
16070
|
-
function ownKeys$
|
|
16071
|
+
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; }
|
|
16071
16072
|
|
|
16072
|
-
function _objectSpread$
|
|
16073
|
+
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; }
|
|
16073
16074
|
|
|
16074
|
-
function _defineProperty$
|
|
16075
|
+
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; }
|
|
16075
16076
|
|
|
16076
|
-
function _slicedToArray$
|
|
16077
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16077
16078
|
|
|
16078
|
-
function _nonIterableRest$
|
|
16079
|
+
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."); }
|
|
16079
16080
|
|
|
16080
|
-
function _unsupportedIterableToArray$
|
|
16081
|
+
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); }
|
|
16081
16082
|
|
|
16082
|
-
function _arrayLikeToArray$
|
|
16083
|
+
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; }
|
|
16083
16084
|
|
|
16084
|
-
function _iterableToArrayLimit$
|
|
16085
|
+
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; }
|
|
16085
16086
|
|
|
16086
|
-
function _arrayWithHoles$
|
|
16087
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16087
16088
|
|
|
16088
16089
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16089
16090
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16163,11 +16164,11 @@ function allFilesAccepted(_ref) {
|
|
|
16163
16164
|
|
|
16164
16165
|
return files.every(function (file) {
|
|
16165
16166
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16166
|
-
_fileAccepted2 = _slicedToArray$
|
|
16167
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16167
16168
|
accepted = _fileAccepted2[0];
|
|
16168
16169
|
|
|
16169
16170
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16170
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16171
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16171
16172
|
sizeMatch = _fileMatchSize2[0];
|
|
16172
16173
|
|
|
16173
16174
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16264,7 +16265,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16264
16265
|
function pickerOptionsFromAccept(accept) {
|
|
16265
16266
|
if (isDefined(accept)) {
|
|
16266
16267
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16267
|
-
var _ref3 = _slicedToArray$
|
|
16268
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16268
16269
|
mimeType = _ref3[0],
|
|
16269
16270
|
ext = _ref3[1];
|
|
16270
16271
|
|
|
@@ -16282,11 +16283,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16282
16283
|
|
|
16283
16284
|
return ok;
|
|
16284
16285
|
}).reduce(function (agg, _ref4) {
|
|
16285
|
-
var _ref5 = _slicedToArray$
|
|
16286
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16286
16287
|
mimeType = _ref5[0],
|
|
16287
16288
|
ext = _ref5[1];
|
|
16288
16289
|
|
|
16289
|
-
return _objectSpread$
|
|
16290
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16290
16291
|
}, {});
|
|
16291
16292
|
return [{
|
|
16292
16293
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16306,7 +16307,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16306
16307
|
function acceptPropAsAcceptAttr(accept) {
|
|
16307
16308
|
if (isDefined(accept)) {
|
|
16308
16309
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16309
|
-
var _ref7 = _slicedToArray$
|
|
16310
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16310
16311
|
mimeType = _ref7[0],
|
|
16311
16312
|
ext = _ref7[1];
|
|
16312
16313
|
|
|
@@ -16374,40 +16375,40 @@ function isExt(v) {
|
|
|
16374
16375
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16375
16376
|
*/
|
|
16376
16377
|
|
|
16377
|
-
var _excluded$
|
|
16378
|
-
_excluded2$
|
|
16378
|
+
var _excluded$d = ["children"],
|
|
16379
|
+
_excluded2$3 = ["open"],
|
|
16379
16380
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16380
16381
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16381
16382
|
|
|
16382
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16383
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16383
16384
|
|
|
16384
16385
|
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."); }
|
|
16385
16386
|
|
|
16386
16387
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16387
16388
|
|
|
16388
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16389
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16389
16390
|
|
|
16390
|
-
function _slicedToArray$
|
|
16391
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16391
16392
|
|
|
16392
|
-
function _nonIterableRest$
|
|
16393
|
+
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."); }
|
|
16393
16394
|
|
|
16394
|
-
function _unsupportedIterableToArray$
|
|
16395
|
+
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); }
|
|
16395
16396
|
|
|
16396
|
-
function _arrayLikeToArray$
|
|
16397
|
+
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; }
|
|
16397
16398
|
|
|
16398
|
-
function _iterableToArrayLimit$
|
|
16399
|
+
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; }
|
|
16399
16400
|
|
|
16400
|
-
function _arrayWithHoles$
|
|
16401
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16401
16402
|
|
|
16402
|
-
function ownKeys$
|
|
16403
|
+
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; }
|
|
16403
16404
|
|
|
16404
|
-
function _objectSpread$
|
|
16405
|
+
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; }
|
|
16405
16406
|
|
|
16406
|
-
function _defineProperty$
|
|
16407
|
+
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; }
|
|
16407
16408
|
|
|
16408
|
-
function _objectWithoutProperties$
|
|
16409
|
+
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; }
|
|
16409
16410
|
|
|
16410
|
-
function _objectWithoutPropertiesLoose$
|
|
16411
|
+
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; }
|
|
16411
16412
|
/**
|
|
16412
16413
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16413
16414
|
*
|
|
@@ -16425,11 +16426,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16425
16426
|
|
|
16426
16427
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16427
16428
|
var children = _ref.children,
|
|
16428
|
-
params = _objectWithoutProperties$
|
|
16429
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16429
16430
|
|
|
16430
16431
|
var _useDropzone = useDropzone(params),
|
|
16431
16432
|
open = _useDropzone.open,
|
|
16432
|
-
props = _objectWithoutProperties$
|
|
16433
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16433
16434
|
|
|
16434
16435
|
useImperativeHandle(ref, function () {
|
|
16435
16436
|
return {
|
|
@@ -16437,13 +16438,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16437
16438
|
};
|
|
16438
16439
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16439
16440
|
|
|
16440
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16441
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16441
16442
|
open: open
|
|
16442
16443
|
})));
|
|
16443
16444
|
});
|
|
16444
16445
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16445
16446
|
|
|
16446
|
-
var defaultProps$
|
|
16447
|
+
var defaultProps$1 = {
|
|
16447
16448
|
disabled: false,
|
|
16448
16449
|
getFilesFromEvent: fromEvent,
|
|
16449
16450
|
maxSize: Infinity,
|
|
@@ -16459,7 +16460,7 @@ var defaultProps$2 = {
|
|
|
16459
16460
|
useFsAccessApi: true,
|
|
16460
16461
|
autoFocus: false
|
|
16461
16462
|
};
|
|
16462
|
-
Dropzone.defaultProps = defaultProps$
|
|
16463
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16463
16464
|
Dropzone.propTypes = {
|
|
16464
16465
|
/**
|
|
16465
16466
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16810,7 +16811,7 @@ var initialState = {
|
|
|
16810
16811
|
function useDropzone() {
|
|
16811
16812
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16812
16813
|
|
|
16813
|
-
var _defaultProps$props = _objectSpread$
|
|
16814
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16814
16815
|
accept = _defaultProps$props.accept,
|
|
16815
16816
|
disabled = _defaultProps$props.disabled,
|
|
16816
16817
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16857,7 +16858,7 @@ function useDropzone() {
|
|
|
16857
16858
|
var inputRef = useRef(null);
|
|
16858
16859
|
|
|
16859
16860
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16860
|
-
_useReducer2 = _slicedToArray$
|
|
16861
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16861
16862
|
state = _useReducer2[0],
|
|
16862
16863
|
dispatch = _useReducer2[1];
|
|
16863
16864
|
|
|
@@ -17027,12 +17028,12 @@ function useDropzone() {
|
|
|
17027
17028
|
var fileRejections = [];
|
|
17028
17029
|
files.forEach(function (file) {
|
|
17029
17030
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17030
|
-
_fileAccepted2 = _slicedToArray$
|
|
17031
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17031
17032
|
accepted = _fileAccepted2[0],
|
|
17032
17033
|
acceptError = _fileAccepted2[1];
|
|
17033
17034
|
|
|
17034
17035
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17035
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17036
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17036
17037
|
sizeMatch = _fileMatchSize2[0],
|
|
17037
17038
|
sizeError = _fileMatchSize2[1];
|
|
17038
17039
|
|
|
@@ -17233,9 +17234,9 @@ function useDropzone() {
|
|
|
17233
17234
|
onDragOver = _ref2.onDragOver,
|
|
17234
17235
|
onDragLeave = _ref2.onDragLeave,
|
|
17235
17236
|
onDrop = _ref2.onDrop,
|
|
17236
|
-
rest = _objectWithoutProperties$
|
|
17237
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17237
17238
|
|
|
17238
|
-
return _objectSpread$
|
|
17239
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17239
17240
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17240
17241
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17241
17242
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17260,9 +17261,9 @@ function useDropzone() {
|
|
|
17260
17261
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17261
17262
|
onChange = _ref3.onChange,
|
|
17262
17263
|
onClick = _ref3.onClick,
|
|
17263
|
-
rest = _objectWithoutProperties$
|
|
17264
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17264
17265
|
|
|
17265
|
-
var inputProps = _defineProperty$
|
|
17266
|
+
var inputProps = _defineProperty$r({
|
|
17266
17267
|
accept: acceptAttr,
|
|
17267
17268
|
multiple: multiple,
|
|
17268
17269
|
type: "file",
|
|
@@ -17274,10 +17275,10 @@ function useDropzone() {
|
|
|
17274
17275
|
tabIndex: -1
|
|
17275
17276
|
}, refKey, inputRef);
|
|
17276
17277
|
|
|
17277
|
-
return _objectSpread$
|
|
17278
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17278
17279
|
};
|
|
17279
17280
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17280
|
-
return _objectSpread$
|
|
17281
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17281
17282
|
isFocused: isFocused && !disabled,
|
|
17282
17283
|
getRootProps: getRootProps,
|
|
17283
17284
|
getInputProps: getInputProps,
|
|
@@ -17296,40 +17297,40 @@ function reducer$1(state, action) {
|
|
|
17296
17297
|
/* istanbul ignore next */
|
|
17297
17298
|
switch (action.type) {
|
|
17298
17299
|
case "focus":
|
|
17299
|
-
return _objectSpread$
|
|
17300
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17300
17301
|
isFocused: true
|
|
17301
17302
|
});
|
|
17302
17303
|
|
|
17303
17304
|
case "blur":
|
|
17304
|
-
return _objectSpread$
|
|
17305
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17305
17306
|
isFocused: false
|
|
17306
17307
|
});
|
|
17307
17308
|
|
|
17308
17309
|
case "openDialog":
|
|
17309
|
-
return _objectSpread$
|
|
17310
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17310
17311
|
isFileDialogActive: true
|
|
17311
17312
|
});
|
|
17312
17313
|
|
|
17313
17314
|
case "closeDialog":
|
|
17314
|
-
return _objectSpread$
|
|
17315
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17315
17316
|
isFileDialogActive: false
|
|
17316
17317
|
});
|
|
17317
17318
|
|
|
17318
17319
|
case "setDraggedFiles":
|
|
17319
|
-
return _objectSpread$
|
|
17320
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17320
17321
|
isDragActive: action.isDragActive,
|
|
17321
17322
|
isDragAccept: action.isDragAccept,
|
|
17322
17323
|
isDragReject: action.isDragReject
|
|
17323
17324
|
});
|
|
17324
17325
|
|
|
17325
17326
|
case "setFiles":
|
|
17326
|
-
return _objectSpread$
|
|
17327
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17327
17328
|
acceptedFiles: action.acceptedFiles,
|
|
17328
17329
|
fileRejections: action.fileRejections
|
|
17329
17330
|
});
|
|
17330
17331
|
|
|
17331
17332
|
case "reset":
|
|
17332
|
-
return _objectSpread$
|
|
17333
|
+
return _objectSpread$p({}, initialState);
|
|
17333
17334
|
|
|
17334
17335
|
default:
|
|
17335
17336
|
return state;
|
|
@@ -19555,7 +19556,7 @@ function shallowEqual(a, b) {
|
|
|
19555
19556
|
return true;
|
|
19556
19557
|
}
|
|
19557
19558
|
|
|
19558
|
-
function _typeof$
|
|
19559
|
+
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); }
|
|
19559
19560
|
|
|
19560
19561
|
//
|
|
19561
19562
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19582,9 +19583,7 @@ var FilteredElementKeyMap = {
|
|
|
19582
19583
|
};
|
|
19583
19584
|
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'];
|
|
19584
19585
|
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19586
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19588
19587
|
|
|
19589
19588
|
/** the offset of a chart, which define the blank space all around */
|
|
19590
19589
|
|
|
@@ -19620,7 +19619,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19620
19619
|
};
|
|
19621
19620
|
};
|
|
19622
19621
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19623
|
-
if (!isObject_1(props) || _typeof$
|
|
19622
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19624
19623
|
return null;
|
|
19625
19624
|
}
|
|
19626
19625
|
var out = null;
|
|
@@ -19634,11 +19633,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19634
19633
|
return out;
|
|
19635
19634
|
};
|
|
19636
19635
|
|
|
19637
|
-
var _excluded$
|
|
19638
|
-
_excluded2$
|
|
19639
|
-
function _objectWithoutProperties$
|
|
19640
|
-
function _objectWithoutPropertiesLoose$
|
|
19641
|
-
function _typeof$
|
|
19636
|
+
var _excluded$c = ["children"],
|
|
19637
|
+
_excluded2$2 = ["children"];
|
|
19638
|
+
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; }
|
|
19639
|
+
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; }
|
|
19640
|
+
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); }
|
|
19642
19641
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19643
19642
|
click: 'onClick',
|
|
19644
19643
|
mousedown: 'onMouseDown',
|
|
@@ -19745,7 +19744,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19745
19744
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19746
19745
|
};
|
|
19747
19746
|
var isDotProps = function isDotProps(dot) {
|
|
19748
|
-
return dot && _typeof$
|
|
19747
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19749
19748
|
};
|
|
19750
19749
|
|
|
19751
19750
|
/**
|
|
@@ -19837,10 +19836,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19837
19836
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19838
19837
|
var _ref = nextChild.props || {},
|
|
19839
19838
|
nextChildren = _ref.children,
|
|
19840
|
-
nextProps = _objectWithoutProperties$
|
|
19839
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19841
19840
|
var _ref2 = prevChild.props || {},
|
|
19842
19841
|
prevChildren = _ref2.children,
|
|
19843
|
-
prevProps = _objectWithoutProperties$
|
|
19842
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19844
19843
|
if (nextChildren && prevChildren) {
|
|
19845
19844
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19846
19845
|
}
|
|
@@ -19882,10 +19881,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19882
19881
|
return toArray(children).indexOf(child);
|
|
19883
19882
|
};
|
|
19884
19883
|
|
|
19885
|
-
var _excluded$
|
|
19884
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19886
19885
|
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); }
|
|
19887
|
-
function _objectWithoutProperties$
|
|
19888
|
-
function _objectWithoutPropertiesLoose$
|
|
19886
|
+
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; }
|
|
19887
|
+
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; }
|
|
19889
19888
|
function Surface(props) {
|
|
19890
19889
|
var children = props.children,
|
|
19891
19890
|
width = props.width,
|
|
@@ -19893,7 +19892,7 @@ function Surface(props) {
|
|
|
19893
19892
|
viewBox = props.viewBox,
|
|
19894
19893
|
className = props.className,
|
|
19895
19894
|
style = props.style,
|
|
19896
|
-
others = _objectWithoutProperties$
|
|
19895
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19897
19896
|
var svgView = viewBox || {
|
|
19898
19897
|
width: width,
|
|
19899
19898
|
height: height,
|
|
@@ -19910,14 +19909,14 @@ function Surface(props) {
|
|
|
19910
19909
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19911
19910
|
}
|
|
19912
19911
|
|
|
19913
|
-
var _excluded$
|
|
19912
|
+
var _excluded$a = ["children", "className"];
|
|
19914
19913
|
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); }
|
|
19915
|
-
function _objectWithoutProperties$
|
|
19916
|
-
function _objectWithoutPropertiesLoose$
|
|
19914
|
+
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; }
|
|
19915
|
+
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; }
|
|
19917
19916
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19918
19917
|
var children = props.children,
|
|
19919
19918
|
className = props.className,
|
|
19920
|
-
others = _objectWithoutProperties$
|
|
19919
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19921
19920
|
var layerClass = classNames('recharts-layer', className);
|
|
19922
19921
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19923
19922
|
className: layerClass
|
|
@@ -23332,16 +23331,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23332
23331
|
stackOffsetNone(series, order);
|
|
23333
23332
|
}
|
|
23334
23333
|
|
|
23335
|
-
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); }
|
|
23336
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23337
23334
|
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); }
|
|
23338
|
-
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; }
|
|
23339
|
-
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; }
|
|
23340
|
-
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; }
|
|
23341
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23342
|
-
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); }
|
|
23343
|
-
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; }
|
|
23344
|
-
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; }
|
|
23345
23335
|
var symbolFactories = {
|
|
23346
23336
|
symbolCircle: symbolCircle,
|
|
23347
23337
|
symbolCross: symbolCross,
|
|
@@ -23380,35 +23370,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23380
23370
|
return Math.PI * size * size / 4;
|
|
23381
23371
|
}
|
|
23382
23372
|
};
|
|
23373
|
+
var symbolsDefaultProps = {
|
|
23374
|
+
type: 'circle',
|
|
23375
|
+
size: 64,
|
|
23376
|
+
sizeType: 'area'
|
|
23377
|
+
};
|
|
23383
23378
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23384
23379
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23385
23380
|
};
|
|
23386
|
-
var Symbols = function Symbols(
|
|
23387
|
-
var _ref$type = _ref.type,
|
|
23388
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23389
|
-
_ref$size = _ref.size,
|
|
23390
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23391
|
-
_ref$sizeType = _ref.sizeType,
|
|
23392
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23393
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23394
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23395
|
-
type: type,
|
|
23396
|
-
size: size,
|
|
23397
|
-
sizeType: sizeType
|
|
23398
|
-
});
|
|
23399
|
-
|
|
23381
|
+
var Symbols = function Symbols(props) {
|
|
23400
23382
|
/**
|
|
23401
23383
|
* Calculate the path of curve
|
|
23402
23384
|
* @return {String} path
|
|
23403
23385
|
*/
|
|
23404
23386
|
var getPath = function getPath() {
|
|
23387
|
+
var size = props.size,
|
|
23388
|
+
sizeType = props.sizeType,
|
|
23389
|
+
type = props.type;
|
|
23405
23390
|
var symbolFactory = getSymbolFactory(type);
|
|
23406
23391
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23407
23392
|
return symbol();
|
|
23408
23393
|
};
|
|
23409
23394
|
var className = props.className,
|
|
23410
23395
|
cx = props.cx,
|
|
23411
|
-
cy = props.cy
|
|
23396
|
+
cy = props.cy,
|
|
23397
|
+
size = props.size;
|
|
23412
23398
|
var filteredProps = filterProps(props, true);
|
|
23413
23399
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23414
23400
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23419,34 +23405,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23419
23405
|
}
|
|
23420
23406
|
return null;
|
|
23421
23407
|
};
|
|
23408
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23422
23409
|
Symbols.registerSymbol = registerSymbol;
|
|
23423
23410
|
|
|
23424
|
-
function _typeof$
|
|
23411
|
+
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); }
|
|
23425
23412
|
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); }
|
|
23426
|
-
function ownKeys$
|
|
23427
|
-
function _objectSpread$
|
|
23428
|
-
function _classCallCheck$
|
|
23429
|
-
function _defineProperties$
|
|
23430
|
-
function _createClass$
|
|
23431
|
-
function _inherits$
|
|
23432
|
-
function _setPrototypeOf$
|
|
23433
|
-
function _createSuper$
|
|
23434
|
-
function _possibleConstructorReturn$
|
|
23435
|
-
function _assertThisInitialized$
|
|
23436
|
-
function _isNativeReflectConstruct$
|
|
23437
|
-
function _getPrototypeOf$
|
|
23438
|
-
function _defineProperty$
|
|
23439
|
-
function _toPropertyKey$
|
|
23440
|
-
function _toPrimitive$
|
|
23413
|
+
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; }
|
|
23414
|
+
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; }
|
|
23415
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23416
|
+
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); } }
|
|
23417
|
+
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; }
|
|
23418
|
+
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); }
|
|
23419
|
+
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); }
|
|
23420
|
+
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); }; }
|
|
23421
|
+
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); }
|
|
23422
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23423
|
+
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; } }
|
|
23424
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23425
|
+
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; }
|
|
23426
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23427
|
+
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); }
|
|
23441
23428
|
var SIZE = 32;
|
|
23442
23429
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23443
|
-
_inherits$
|
|
23444
|
-
var _super = _createSuper$
|
|
23430
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23431
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23445
23432
|
function DefaultLegendContent() {
|
|
23446
|
-
_classCallCheck$
|
|
23433
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23447
23434
|
return _super.apply(this, arguments);
|
|
23448
23435
|
}
|
|
23449
|
-
_createClass$
|
|
23436
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23450
23437
|
key: "renderIcon",
|
|
23451
23438
|
value:
|
|
23452
23439
|
/**
|
|
@@ -23491,7 +23478,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23491
23478
|
});
|
|
23492
23479
|
}
|
|
23493
23480
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23494
|
-
var iconProps = _objectSpread$
|
|
23481
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23495
23482
|
delete iconProps.legendIcon;
|
|
23496
23483
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23497
23484
|
}
|
|
@@ -23539,7 +23526,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23539
23526
|
var finalFormatter = entry.formatter || formatter;
|
|
23540
23527
|
var className = classNames((_classNames = {
|
|
23541
23528
|
'recharts-legend-item': true
|
|
23542
|
-
}, _defineProperty$
|
|
23529
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23543
23530
|
if (entry.type === 'none') {
|
|
23544
23531
|
return null;
|
|
23545
23532
|
}
|
|
@@ -23584,8 +23571,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23584
23571
|
}]);
|
|
23585
23572
|
return DefaultLegendContent;
|
|
23586
23573
|
}(PureComponent);
|
|
23587
|
-
_defineProperty$
|
|
23588
|
-
_defineProperty$
|
|
23574
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23575
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23589
23576
|
iconSize: 14,
|
|
23590
23577
|
layout: 'horizontal',
|
|
23591
23578
|
align: 'center',
|
|
@@ -23593,25 +23580,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23593
23580
|
inactiveColor: '#ccc'
|
|
23594
23581
|
});
|
|
23595
23582
|
|
|
23596
|
-
function _typeof$
|
|
23597
|
-
var _excluded$
|
|
23598
|
-
function ownKeys$
|
|
23599
|
-
function _objectSpread$
|
|
23600
|
-
function _classCallCheck$
|
|
23601
|
-
function _defineProperties$
|
|
23602
|
-
function _createClass$
|
|
23603
|
-
function _inherits$
|
|
23604
|
-
function _setPrototypeOf$
|
|
23605
|
-
function _createSuper$
|
|
23606
|
-
function _possibleConstructorReturn$
|
|
23607
|
-
function _assertThisInitialized$
|
|
23608
|
-
function _isNativeReflectConstruct$
|
|
23609
|
-
function _getPrototypeOf$
|
|
23610
|
-
function _defineProperty$
|
|
23611
|
-
function _toPropertyKey$
|
|
23612
|
-
function _toPrimitive$
|
|
23613
|
-
function _objectWithoutProperties$
|
|
23614
|
-
function _objectWithoutPropertiesLoose$
|
|
23583
|
+
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); }
|
|
23584
|
+
var _excluded$9 = ["ref"];
|
|
23585
|
+
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; }
|
|
23586
|
+
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; }
|
|
23587
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23588
|
+
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); } }
|
|
23589
|
+
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; }
|
|
23590
|
+
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); }
|
|
23591
|
+
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); }
|
|
23592
|
+
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); }; }
|
|
23593
|
+
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); }
|
|
23594
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23595
|
+
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; } }
|
|
23596
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23597
|
+
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; }
|
|
23598
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23599
|
+
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); }
|
|
23600
|
+
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; }
|
|
23601
|
+
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; }
|
|
23615
23602
|
function defaultUniqBy$1(entry) {
|
|
23616
23603
|
return entry.value;
|
|
23617
23604
|
}
|
|
@@ -23632,27 +23619,27 @@ function renderContent$1(content, props) {
|
|
|
23632
23619
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23633
23620
|
}
|
|
23634
23621
|
props.ref;
|
|
23635
|
-
var otherProps = _objectWithoutProperties$
|
|
23622
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23636
23623
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23637
23624
|
}
|
|
23638
23625
|
var EPS$2 = 1;
|
|
23639
23626
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23640
|
-
_inherits$
|
|
23641
|
-
var _super = _createSuper$
|
|
23627
|
+
_inherits$7(Legend, _PureComponent);
|
|
23628
|
+
var _super = _createSuper$7(Legend);
|
|
23642
23629
|
function Legend() {
|
|
23643
23630
|
var _this;
|
|
23644
|
-
_classCallCheck$
|
|
23631
|
+
_classCallCheck$9(this, Legend);
|
|
23645
23632
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23646
23633
|
args[_key] = arguments[_key];
|
|
23647
23634
|
}
|
|
23648
23635
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23649
|
-
_defineProperty$
|
|
23636
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23650
23637
|
boxWidth: -1,
|
|
23651
23638
|
boxHeight: -1
|
|
23652
23639
|
});
|
|
23653
23640
|
return _this;
|
|
23654
23641
|
}
|
|
23655
|
-
_createClass$
|
|
23642
|
+
_createClass$9(Legend, [{
|
|
23656
23643
|
key: "componentDidMount",
|
|
23657
23644
|
value: function componentDidMount() {
|
|
23658
23645
|
this.updateBBox();
|
|
@@ -23727,7 +23714,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23727
23714
|
};
|
|
23728
23715
|
}
|
|
23729
23716
|
}
|
|
23730
|
-
return _objectSpread$
|
|
23717
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23731
23718
|
}
|
|
23732
23719
|
}, {
|
|
23733
23720
|
key: "updateBBox",
|
|
@@ -23770,7 +23757,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23770
23757
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23771
23758
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23772
23759
|
payload = _this$props2.payload;
|
|
23773
|
-
var outerStyle = _objectSpread$
|
|
23760
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23774
23761
|
position: 'absolute',
|
|
23775
23762
|
width: width || 'auto',
|
|
23776
23763
|
height: height || 'auto'
|
|
@@ -23781,7 +23768,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23781
23768
|
ref: function ref(node) {
|
|
23782
23769
|
_this2.wrapperNode = node;
|
|
23783
23770
|
}
|
|
23784
|
-
}, renderContent$1(content, _objectSpread$
|
|
23771
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23785
23772
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23786
23773
|
})));
|
|
23787
23774
|
}
|
|
@@ -23804,8 +23791,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23804
23791
|
}]);
|
|
23805
23792
|
return Legend;
|
|
23806
23793
|
}(PureComponent);
|
|
23807
|
-
_defineProperty$
|
|
23808
|
-
_defineProperty$
|
|
23794
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23795
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23809
23796
|
iconSize: 14,
|
|
23810
23797
|
layout: 'horizontal',
|
|
23811
23798
|
align: 'center',
|
|
@@ -24369,13 +24356,13 @@ function setRafTimeout(callback) {
|
|
|
24369
24356
|
requestAnimationFrame(shouldUpdate);
|
|
24370
24357
|
}
|
|
24371
24358
|
|
|
24372
|
-
function _typeof$
|
|
24373
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24374
|
-
function _nonIterableRest$
|
|
24375
|
-
function _unsupportedIterableToArray$
|
|
24376
|
-
function _arrayLikeToArray$
|
|
24359
|
+
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); }
|
|
24360
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24361
|
+
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."); }
|
|
24362
|
+
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); }
|
|
24363
|
+
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; }
|
|
24377
24364
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24378
|
-
function _arrayWithHoles$
|
|
24365
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24379
24366
|
function createAnimateManager() {
|
|
24380
24367
|
var currStyle = {};
|
|
24381
24368
|
var handleChange = function handleChange() {
|
|
@@ -24402,7 +24389,7 @@ function createAnimateManager() {
|
|
|
24402
24389
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24403
24390
|
return;
|
|
24404
24391
|
}
|
|
24405
|
-
if (_typeof$
|
|
24392
|
+
if (_typeof$o(_style) === 'object') {
|
|
24406
24393
|
currStyle = _style;
|
|
24407
24394
|
handleChange(currStyle);
|
|
24408
24395
|
}
|
|
@@ -24429,12 +24416,12 @@ function createAnimateManager() {
|
|
|
24429
24416
|
};
|
|
24430
24417
|
}
|
|
24431
24418
|
|
|
24432
|
-
function _typeof$
|
|
24433
|
-
function ownKeys$
|
|
24434
|
-
function _objectSpread$
|
|
24435
|
-
function _defineProperty$
|
|
24436
|
-
function _toPropertyKey$
|
|
24437
|
-
function _toPrimitive$
|
|
24419
|
+
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); }
|
|
24420
|
+
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; }
|
|
24421
|
+
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; }
|
|
24422
|
+
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; }
|
|
24423
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24424
|
+
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); }
|
|
24438
24425
|
/* eslint no-console: 0 */
|
|
24439
24426
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24440
24427
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24466,7 +24453,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24466
24453
|
*/
|
|
24467
24454
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24468
24455
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24469
|
-
return _defineProperty$
|
|
24456
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24470
24457
|
}
|
|
24471
24458
|
var isTransition = name === 'transition';
|
|
24472
24459
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24477,7 +24464,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24477
24464
|
if (isTransition) {
|
|
24478
24465
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24479
24466
|
}
|
|
24480
|
-
return _objectSpread$
|
|
24467
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24481
24468
|
}, {});
|
|
24482
24469
|
};
|
|
24483
24470
|
|
|
@@ -24487,7 +24474,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24487
24474
|
*/
|
|
24488
24475
|
var mapObject = function mapObject(fn, obj) {
|
|
24489
24476
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24490
|
-
return _objectSpread$
|
|
24477
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24491
24478
|
}, {});
|
|
24492
24479
|
};
|
|
24493
24480
|
|
|
@@ -24497,7 +24484,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24497
24484
|
*/
|
|
24498
24485
|
var translateStyle = function translateStyle(style) {
|
|
24499
24486
|
return Object.keys(style).reduce(function (res, key) {
|
|
24500
|
-
return _objectSpread$
|
|
24487
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24501
24488
|
}, style);
|
|
24502
24489
|
};
|
|
24503
24490
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24525,16 +24512,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24525
24512
|
}
|
|
24526
24513
|
};
|
|
24527
24514
|
|
|
24528
|
-
function _slicedToArray$
|
|
24529
|
-
function _nonIterableRest$
|
|
24530
|
-
function _iterableToArrayLimit$
|
|
24531
|
-
function _arrayWithHoles$
|
|
24532
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24515
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24516
|
+
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."); }
|
|
24517
|
+
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; } }
|
|
24518
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24519
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24533
24520
|
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."); }
|
|
24534
|
-
function _unsupportedIterableToArray$
|
|
24521
|
+
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); }
|
|
24535
24522
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24536
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24537
|
-
function _arrayLikeToArray$
|
|
24523
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24524
|
+
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; }
|
|
24538
24525
|
var ACCURACY = 1e-4;
|
|
24539
24526
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24540
24527
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24610,7 +24597,7 @@ var configBezier = function configBezier() {
|
|
|
24610
24597
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24611
24598
|
return parseFloat(x);
|
|
24612
24599
|
});
|
|
24613
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24600
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24614
24601
|
x1 = _easing$1$split$0$spl2[0];
|
|
24615
24602
|
y1 = _easing$1$split$0$spl2[1];
|
|
24616
24603
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24703,22 +24690,22 @@ var configEasing = function configEasing() {
|
|
|
24703
24690
|
return null;
|
|
24704
24691
|
};
|
|
24705
24692
|
|
|
24706
|
-
function _typeof$
|
|
24707
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24693
|
+
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); }
|
|
24694
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24708
24695
|
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."); }
|
|
24709
24696
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24710
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24711
|
-
function ownKeys$
|
|
24712
|
-
function _objectSpread$
|
|
24713
|
-
function _defineProperty$
|
|
24714
|
-
function _toPropertyKey$
|
|
24715
|
-
function _toPrimitive$
|
|
24716
|
-
function _slicedToArray$
|
|
24717
|
-
function _nonIterableRest$
|
|
24718
|
-
function _unsupportedIterableToArray$
|
|
24719
|
-
function _arrayLikeToArray$
|
|
24720
|
-
function _iterableToArrayLimit$
|
|
24721
|
-
function _arrayWithHoles$
|
|
24697
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24698
|
+
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; }
|
|
24699
|
+
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; }
|
|
24700
|
+
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; }
|
|
24701
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24702
|
+
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); }
|
|
24703
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24704
|
+
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."); }
|
|
24705
|
+
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); }
|
|
24706
|
+
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; }
|
|
24707
|
+
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; } }
|
|
24708
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24722
24709
|
var alpha = function alpha(begin, end, k) {
|
|
24723
24710
|
return begin + (end - begin) * k;
|
|
24724
24711
|
};
|
|
@@ -24736,10 +24723,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24736
24723
|
var nextStepVals = mapObject(function (key, val) {
|
|
24737
24724
|
if (needContinue(val)) {
|
|
24738
24725
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24739
|
-
_easing2 = _slicedToArray$
|
|
24726
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24740
24727
|
newX = _easing2[0],
|
|
24741
24728
|
newV = _easing2[1];
|
|
24742
|
-
return _objectSpread$
|
|
24729
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24743
24730
|
from: newX,
|
|
24744
24731
|
velocity: newV
|
|
24745
24732
|
});
|
|
@@ -24749,7 +24736,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24749
24736
|
if (steps < 1) {
|
|
24750
24737
|
return mapObject(function (key, val) {
|
|
24751
24738
|
if (needContinue(val)) {
|
|
24752
|
-
return _objectSpread$
|
|
24739
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24753
24740
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24754
24741
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24755
24742
|
});
|
|
@@ -24764,10 +24751,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24764
24751
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24765
24752
|
var interKeys = getIntersectionKeys(from, to);
|
|
24766
24753
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24767
|
-
return _objectSpread$
|
|
24754
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24768
24755
|
}, {});
|
|
24769
24756
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24770
|
-
return _objectSpread$
|
|
24757
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24771
24758
|
from: from[key],
|
|
24772
24759
|
velocity: 0,
|
|
24773
24760
|
to: to[key]
|
|
@@ -24797,7 +24784,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24797
24784
|
var steps = deltaTime / easing.dt;
|
|
24798
24785
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24799
24786
|
// get union set and add compatible prefix
|
|
24800
|
-
render(_objectSpread$
|
|
24787
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24801
24788
|
preTime = now;
|
|
24802
24789
|
if (!shouldStopAnimation()) {
|
|
24803
24790
|
cafId = requestAnimationFrame(update);
|
|
@@ -24815,14 +24802,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24815
24802
|
}, timingStyle);
|
|
24816
24803
|
|
|
24817
24804
|
// get union set and add compatible prefix
|
|
24818
|
-
render(_objectSpread$
|
|
24805
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24819
24806
|
if (t < 1) {
|
|
24820
24807
|
cafId = requestAnimationFrame(update);
|
|
24821
24808
|
} else {
|
|
24822
24809
|
var finalStyle = mapObject(function (key, val) {
|
|
24823
24810
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24824
24811
|
}, timingStyle);
|
|
24825
|
-
render(_objectSpread$
|
|
24812
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24826
24813
|
}
|
|
24827
24814
|
};
|
|
24828
24815
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24838,37 +24825,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24838
24825
|
};
|
|
24839
24826
|
});
|
|
24840
24827
|
|
|
24841
|
-
function _typeof$
|
|
24842
|
-
var _excluded$
|
|
24843
|
-
function _objectWithoutProperties$
|
|
24844
|
-
function _objectWithoutPropertiesLoose$
|
|
24845
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24828
|
+
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); }
|
|
24829
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24830
|
+
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; }
|
|
24831
|
+
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; }
|
|
24832
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24846
24833
|
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."); }
|
|
24847
|
-
function _unsupportedIterableToArray$
|
|
24834
|
+
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); }
|
|
24848
24835
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24849
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24850
|
-
function _arrayLikeToArray$
|
|
24851
|
-
function ownKeys$
|
|
24852
|
-
function _objectSpread$
|
|
24853
|
-
function _defineProperty$
|
|
24854
|
-
function _classCallCheck$
|
|
24855
|
-
function _defineProperties$
|
|
24856
|
-
function _createClass$
|
|
24857
|
-
function _toPropertyKey$
|
|
24858
|
-
function _toPrimitive$
|
|
24859
|
-
function _inherits$
|
|
24860
|
-
function _setPrototypeOf$
|
|
24861
|
-
function _createSuper$
|
|
24862
|
-
function _possibleConstructorReturn$
|
|
24863
|
-
function _assertThisInitialized$
|
|
24864
|
-
function _isNativeReflectConstruct$
|
|
24865
|
-
function _getPrototypeOf$
|
|
24836
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24837
|
+
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; }
|
|
24838
|
+
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; }
|
|
24839
|
+
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; }
|
|
24840
|
+
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; }
|
|
24841
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24842
|
+
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); } }
|
|
24843
|
+
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; }
|
|
24844
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24845
|
+
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); }
|
|
24846
|
+
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); }
|
|
24847
|
+
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); }
|
|
24848
|
+
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); }; }
|
|
24849
|
+
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); }
|
|
24850
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24851
|
+
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; } }
|
|
24852
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24866
24853
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24867
|
-
_inherits$
|
|
24868
|
-
var _super = _createSuper$
|
|
24854
|
+
_inherits$6(Animate, _PureComponent);
|
|
24855
|
+
var _super = _createSuper$6(Animate);
|
|
24869
24856
|
function Animate(props, context) {
|
|
24870
24857
|
var _this;
|
|
24871
|
-
_classCallCheck$
|
|
24858
|
+
_classCallCheck$8(this, Animate);
|
|
24872
24859
|
_this = _super.call(this, props, context);
|
|
24873
24860
|
var _this$props = _this.props,
|
|
24874
24861
|
isActive = _this$props.isActive,
|
|
@@ -24878,8 +24865,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24878
24865
|
steps = _this$props.steps,
|
|
24879
24866
|
children = _this$props.children,
|
|
24880
24867
|
duration = _this$props.duration;
|
|
24881
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24882
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24868
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24869
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24883
24870
|
if (!isActive || duration <= 0) {
|
|
24884
24871
|
_this.state = {
|
|
24885
24872
|
style: {}
|
|
@@ -24891,7 +24878,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24891
24878
|
style: to
|
|
24892
24879
|
};
|
|
24893
24880
|
}
|
|
24894
|
-
return _possibleConstructorReturn$
|
|
24881
|
+
return _possibleConstructorReturn$6(_this);
|
|
24895
24882
|
}
|
|
24896
24883
|
if (steps && steps.length) {
|
|
24897
24884
|
_this.state = {
|
|
@@ -24902,10 +24889,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24902
24889
|
_this.state = {
|
|
24903
24890
|
style: from
|
|
24904
24891
|
};
|
|
24905
|
-
return _possibleConstructorReturn$
|
|
24892
|
+
return _possibleConstructorReturn$6(_this);
|
|
24906
24893
|
}
|
|
24907
24894
|
_this.state = {
|
|
24908
|
-
style: attributeName ? _defineProperty$
|
|
24895
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24909
24896
|
};
|
|
24910
24897
|
} else {
|
|
24911
24898
|
_this.state = {
|
|
@@ -24914,7 +24901,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24914
24901
|
}
|
|
24915
24902
|
return _this;
|
|
24916
24903
|
}
|
|
24917
|
-
_createClass$
|
|
24904
|
+
_createClass$8(Animate, [{
|
|
24918
24905
|
key: "componentDidMount",
|
|
24919
24906
|
value: function componentDidMount() {
|
|
24920
24907
|
var _this$props2 = this.props,
|
|
@@ -24942,7 +24929,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24942
24929
|
}
|
|
24943
24930
|
if (!isActive) {
|
|
24944
24931
|
var newState = {
|
|
24945
|
-
style: attributeName ? _defineProperty$
|
|
24932
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24946
24933
|
};
|
|
24947
24934
|
if (this.state && style) {
|
|
24948
24935
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24965,14 +24952,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24965
24952
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24966
24953
|
if (this.state && style) {
|
|
24967
24954
|
var _newState = {
|
|
24968
|
-
style: attributeName ? _defineProperty$
|
|
24955
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24969
24956
|
};
|
|
24970
24957
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24971
24958
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24972
24959
|
this.setState(_newState);
|
|
24973
24960
|
}
|
|
24974
24961
|
}
|
|
24975
|
-
this.runAnimation(_objectSpread$
|
|
24962
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24976
24963
|
from: from,
|
|
24977
24964
|
begin: 0
|
|
24978
24965
|
}));
|
|
@@ -25055,7 +25042,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25055
25042
|
}), duration]);
|
|
25056
25043
|
}
|
|
25057
25044
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25058
|
-
var newStyle = _objectSpread$
|
|
25045
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25059
25046
|
transition: transition
|
|
25060
25047
|
});
|
|
25061
25048
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25087,9 +25074,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25087
25074
|
this.runStepAnimation(props);
|
|
25088
25075
|
return;
|
|
25089
25076
|
}
|
|
25090
|
-
var to = attributeName ? _defineProperty$
|
|
25077
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25091
25078
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25092
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25079
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25093
25080
|
transition: transition
|
|
25094
25081
|
}), duration, onAnimationEnd]);
|
|
25095
25082
|
}
|
|
@@ -25110,7 +25097,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25110
25097
|
_this$props4.onAnimationEnd;
|
|
25111
25098
|
_this$props4.shouldReAnimate;
|
|
25112
25099
|
_this$props4.onAnimationReStart;
|
|
25113
|
-
var others = _objectWithoutProperties$
|
|
25100
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25114
25101
|
var count = Children.count(children);
|
|
25115
25102
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25116
25103
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25125,8 +25112,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25125
25112
|
_container$props$styl = _container$props.style,
|
|
25126
25113
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25127
25114
|
className = _container$props.className;
|
|
25128
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25129
|
-
style: _objectSpread$
|
|
25115
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25116
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25130
25117
|
className: className
|
|
25131
25118
|
}));
|
|
25132
25119
|
return res;
|
|
@@ -25651,10 +25638,10 @@ var defineProperty$2 = (function() {
|
|
|
25651
25638
|
} catch (e) {}
|
|
25652
25639
|
}());
|
|
25653
25640
|
|
|
25654
|
-
var _defineProperty$
|
|
25641
|
+
var _defineProperty$l = defineProperty$2;
|
|
25655
25642
|
|
|
25656
25643
|
var constant$1 = constant_1,
|
|
25657
|
-
defineProperty$1 = _defineProperty$
|
|
25644
|
+
defineProperty$1 = _defineProperty$l,
|
|
25658
25645
|
identity$7 = identity_1;
|
|
25659
25646
|
|
|
25660
25647
|
/**
|
|
@@ -25831,18 +25818,18 @@ var sortBy_1 = sortBy;
|
|
|
25831
25818
|
/**
|
|
25832
25819
|
* @fileOverview Default Tooltip Content
|
|
25833
25820
|
*/
|
|
25834
|
-
function _typeof$
|
|
25835
|
-
function _slicedToArray$
|
|
25836
|
-
function _nonIterableRest$
|
|
25837
|
-
function _unsupportedIterableToArray$
|
|
25838
|
-
function _arrayLikeToArray$
|
|
25839
|
-
function _iterableToArrayLimit$
|
|
25840
|
-
function _arrayWithHoles$
|
|
25841
|
-
function ownKeys$
|
|
25842
|
-
function _objectSpread$
|
|
25843
|
-
function _defineProperty$
|
|
25844
|
-
function _toPropertyKey$
|
|
25845
|
-
function _toPrimitive$
|
|
25821
|
+
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); }
|
|
25822
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25823
|
+
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."); }
|
|
25824
|
+
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); }
|
|
25825
|
+
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; }
|
|
25826
|
+
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; } }
|
|
25827
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25828
|
+
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; }
|
|
25829
|
+
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; }
|
|
25830
|
+
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; }
|
|
25831
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25832
|
+
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); }
|
|
25846
25833
|
function defaultFormatter(value) {
|
|
25847
25834
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25848
25835
|
}
|
|
@@ -25872,7 +25859,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25872
25859
|
if (entry.type === 'none') {
|
|
25873
25860
|
return null;
|
|
25874
25861
|
}
|
|
25875
|
-
var finalItemStyle = _objectSpread$
|
|
25862
|
+
var finalItemStyle = _objectSpread$j({
|
|
25876
25863
|
display: 'block',
|
|
25877
25864
|
paddingTop: 4,
|
|
25878
25865
|
paddingBottom: 4,
|
|
@@ -25886,7 +25873,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25886
25873
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25887
25874
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25888
25875
|
if (Array.isArray(formatted)) {
|
|
25889
|
-
var _formatted = _slicedToArray$
|
|
25876
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25890
25877
|
finalValue = _formatted[0];
|
|
25891
25878
|
finalName = _formatted[1];
|
|
25892
25879
|
} else {
|
|
@@ -25918,14 +25905,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25918
25905
|
}
|
|
25919
25906
|
return null;
|
|
25920
25907
|
};
|
|
25921
|
-
var finalStyle = _objectSpread$
|
|
25908
|
+
var finalStyle = _objectSpread$j({
|
|
25922
25909
|
margin: 0,
|
|
25923
25910
|
padding: 10,
|
|
25924
25911
|
backgroundColor: '#fff',
|
|
25925
25912
|
border: '1px solid #ccc',
|
|
25926
25913
|
whiteSpace: 'nowrap'
|
|
25927
25914
|
}, contentStyle);
|
|
25928
|
-
var finalLabelStyle = _objectSpread$
|
|
25915
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25929
25916
|
margin: 0
|
|
25930
25917
|
}, labelStyle);
|
|
25931
25918
|
var hasLabel = !isNil_1(label);
|
|
@@ -25966,22 +25953,18 @@ var Global = {
|
|
|
25966
25953
|
}
|
|
25967
25954
|
};
|
|
25968
25955
|
|
|
25969
|
-
function _typeof$
|
|
25970
|
-
function ownKeys$
|
|
25971
|
-
function _objectSpread$
|
|
25972
|
-
function
|
|
25973
|
-
function
|
|
25974
|
-
function
|
|
25975
|
-
function
|
|
25976
|
-
function
|
|
25977
|
-
function
|
|
25978
|
-
function
|
|
25979
|
-
function
|
|
25980
|
-
function
|
|
25981
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25982
|
-
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; }
|
|
25983
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25984
|
-
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); }
|
|
25956
|
+
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); }
|
|
25957
|
+
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; }
|
|
25958
|
+
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; }
|
|
25959
|
+
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; }
|
|
25960
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25961
|
+
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); }
|
|
25962
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25963
|
+
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."); }
|
|
25964
|
+
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); }
|
|
25965
|
+
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; }
|
|
25966
|
+
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; } }
|
|
25967
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25985
25968
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25986
25969
|
var EPS$1 = 1;
|
|
25987
25970
|
function defaultUniqBy(entry) {
|
|
@@ -26005,204 +25988,7 @@ function renderContent(content, props) {
|
|
|
26005
25988
|
}
|
|
26006
25989
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26007
25990
|
}
|
|
26008
|
-
var
|
|
26009
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26010
|
-
var _super = _createSuper$6(Tooltip);
|
|
26011
|
-
function Tooltip() {
|
|
26012
|
-
var _this;
|
|
26013
|
-
_classCallCheck$8(this, Tooltip);
|
|
26014
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26015
|
-
args[_key] = arguments[_key];
|
|
26016
|
-
}
|
|
26017
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26018
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26019
|
-
boxWidth: -1,
|
|
26020
|
-
boxHeight: -1,
|
|
26021
|
-
dismissed: false,
|
|
26022
|
-
dismissedAtCoordinate: {
|
|
26023
|
-
x: 0,
|
|
26024
|
-
y: 0
|
|
26025
|
-
}
|
|
26026
|
-
});
|
|
26027
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26028
|
-
if (event.key === 'Escape') {
|
|
26029
|
-
_this.setState({
|
|
26030
|
-
dismissed: true,
|
|
26031
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26032
|
-
x: _this.props.coordinate.x,
|
|
26033
|
-
y: _this.props.coordinate.y
|
|
26034
|
-
})
|
|
26035
|
-
});
|
|
26036
|
-
}
|
|
26037
|
-
});
|
|
26038
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26039
|
-
var key = _ref.key,
|
|
26040
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26041
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26042
|
-
var _this$props = _this.props,
|
|
26043
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26044
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26045
|
-
coordinate = _this$props.coordinate,
|
|
26046
|
-
offset = _this$props.offset,
|
|
26047
|
-
position = _this$props.position,
|
|
26048
|
-
viewBox = _this$props.viewBox;
|
|
26049
|
-
if (position && isNumber(position[key])) {
|
|
26050
|
-
return position[key];
|
|
26051
|
-
}
|
|
26052
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26053
|
-
var positive = coordinate[key] + offset;
|
|
26054
|
-
if (allowEscapeViewBox[key]) {
|
|
26055
|
-
return reverseDirection[key] ? negative : positive;
|
|
26056
|
-
}
|
|
26057
|
-
if (reverseDirection[key]) {
|
|
26058
|
-
var _tooltipBoundary = negative;
|
|
26059
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26060
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26061
|
-
return Math.max(positive, viewBox[key]);
|
|
26062
|
-
}
|
|
26063
|
-
return Math.max(negative, viewBox[key]);
|
|
26064
|
-
}
|
|
26065
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26066
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26067
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26068
|
-
return Math.max(negative, viewBox[key]);
|
|
26069
|
-
}
|
|
26070
|
-
return Math.max(positive, viewBox[key]);
|
|
26071
|
-
});
|
|
26072
|
-
return _this;
|
|
26073
|
-
}
|
|
26074
|
-
_createClass$8(Tooltip, [{
|
|
26075
|
-
key: "componentDidMount",
|
|
26076
|
-
value: function componentDidMount() {
|
|
26077
|
-
this.updateBBox();
|
|
26078
|
-
}
|
|
26079
|
-
}, {
|
|
26080
|
-
key: "componentWillUnmount",
|
|
26081
|
-
value: function componentWillUnmount() {
|
|
26082
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26083
|
-
}
|
|
26084
|
-
}, {
|
|
26085
|
-
key: "componentDidUpdate",
|
|
26086
|
-
value: function componentDidUpdate() {
|
|
26087
|
-
this.updateBBox();
|
|
26088
|
-
}
|
|
26089
|
-
}, {
|
|
26090
|
-
key: "updateBBox",
|
|
26091
|
-
value: function updateBBox() {
|
|
26092
|
-
var _this$state = this.state,
|
|
26093
|
-
boxWidth = _this$state.boxWidth,
|
|
26094
|
-
boxHeight = _this$state.boxHeight,
|
|
26095
|
-
dismissed = _this$state.dismissed;
|
|
26096
|
-
if (dismissed) {
|
|
26097
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26098
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26099
|
-
this.setState({
|
|
26100
|
-
dismissed: false
|
|
26101
|
-
});
|
|
26102
|
-
}
|
|
26103
|
-
} else {
|
|
26104
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26105
|
-
}
|
|
26106
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26107
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26108
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26109
|
-
this.setState({
|
|
26110
|
-
boxWidth: box.width,
|
|
26111
|
-
boxHeight: box.height
|
|
26112
|
-
});
|
|
26113
|
-
}
|
|
26114
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26115
|
-
this.setState({
|
|
26116
|
-
boxWidth: -1,
|
|
26117
|
-
boxHeight: -1
|
|
26118
|
-
});
|
|
26119
|
-
}
|
|
26120
|
-
}
|
|
26121
|
-
}, {
|
|
26122
|
-
key: "render",
|
|
26123
|
-
value: function render() {
|
|
26124
|
-
var _classNames,
|
|
26125
|
-
_this2 = this;
|
|
26126
|
-
var _this$props2 = this.props,
|
|
26127
|
-
payload = _this$props2.payload,
|
|
26128
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26129
|
-
animationDuration = _this$props2.animationDuration,
|
|
26130
|
-
animationEasing = _this$props2.animationEasing,
|
|
26131
|
-
filterNull = _this$props2.filterNull,
|
|
26132
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26133
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26134
|
-
return !isNil_1(entry.value);
|
|
26135
|
-
}) : payload);
|
|
26136
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26137
|
-
var _this$props3 = this.props,
|
|
26138
|
-
content = _this$props3.content,
|
|
26139
|
-
viewBox = _this$props3.viewBox,
|
|
26140
|
-
coordinate = _this$props3.coordinate,
|
|
26141
|
-
position = _this$props3.position,
|
|
26142
|
-
active = _this$props3.active,
|
|
26143
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26144
|
-
var outerStyle = _objectSpread$l({
|
|
26145
|
-
pointerEvents: 'none',
|
|
26146
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26147
|
-
position: 'absolute',
|
|
26148
|
-
top: 0,
|
|
26149
|
-
left: 0
|
|
26150
|
-
}, wrapperStyle);
|
|
26151
|
-
var translateX, translateY;
|
|
26152
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26153
|
-
translateX = position.x;
|
|
26154
|
-
translateY = position.y;
|
|
26155
|
-
} else {
|
|
26156
|
-
var _this$state2 = this.state,
|
|
26157
|
-
boxWidth = _this$state2.boxWidth,
|
|
26158
|
-
boxHeight = _this$state2.boxHeight;
|
|
26159
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26160
|
-
translateX = this.getTranslate({
|
|
26161
|
-
key: 'x',
|
|
26162
|
-
tooltipDimension: boxWidth,
|
|
26163
|
-
viewBoxDimension: viewBox.width
|
|
26164
|
-
});
|
|
26165
|
-
translateY = this.getTranslate({
|
|
26166
|
-
key: 'y',
|
|
26167
|
-
tooltipDimension: boxHeight,
|
|
26168
|
-
viewBoxDimension: viewBox.height
|
|
26169
|
-
});
|
|
26170
|
-
} else {
|
|
26171
|
-
outerStyle.visibility = 'hidden';
|
|
26172
|
-
}
|
|
26173
|
-
}
|
|
26174
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26175
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26176
|
-
})), outerStyle);
|
|
26177
|
-
if (isAnimationActive && active) {
|
|
26178
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26179
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26180
|
-
})), outerStyle);
|
|
26181
|
-
}
|
|
26182
|
-
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));
|
|
26183
|
-
return (
|
|
26184
|
-
/*#__PURE__*/
|
|
26185
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26186
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26187
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26188
|
-
React__default.createElement("div", {
|
|
26189
|
-
tabIndex: -1,
|
|
26190
|
-
role: "dialog",
|
|
26191
|
-
className: cls,
|
|
26192
|
-
style: outerStyle,
|
|
26193
|
-
ref: function ref(node) {
|
|
26194
|
-
_this2.wrapperNode = node;
|
|
26195
|
-
}
|
|
26196
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26197
|
-
payload: finalPayload
|
|
26198
|
-
})))
|
|
26199
|
-
);
|
|
26200
|
-
}
|
|
26201
|
-
}]);
|
|
26202
|
-
return Tooltip;
|
|
26203
|
-
}(PureComponent);
|
|
26204
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26205
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25991
|
+
var tooltipDefaultProps = {
|
|
26206
25992
|
active: false,
|
|
26207
25993
|
allowEscapeViewBox: {
|
|
26208
25994
|
x: false,
|
|
@@ -26223,6 +26009,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26223
26009
|
x: 0,
|
|
26224
26010
|
y: 0
|
|
26225
26011
|
},
|
|
26012
|
+
// this doesn't exist on TooltipProps
|
|
26013
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26014
|
+
// @ts-ignore
|
|
26226
26015
|
cursorStyle: {},
|
|
26227
26016
|
separator: ' : ',
|
|
26228
26017
|
wrapperStyle: {},
|
|
@@ -26236,7 +26025,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26236
26025
|
animationDuration: 400,
|
|
26237
26026
|
filterNull: true,
|
|
26238
26027
|
useTranslate3d: false
|
|
26239
|
-
}
|
|
26028
|
+
};
|
|
26029
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26030
|
+
var _classNames;
|
|
26031
|
+
var _useState = useState(-1),
|
|
26032
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26033
|
+
boxWidth = _useState2[0],
|
|
26034
|
+
setBoxWidth = _useState2[1];
|
|
26035
|
+
var _useState3 = useState(-1),
|
|
26036
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26037
|
+
boxHeight = _useState4[0],
|
|
26038
|
+
setBoxHeight = _useState4[1];
|
|
26039
|
+
var _useState5 = useState(false),
|
|
26040
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26041
|
+
dismissed = _useState6[0],
|
|
26042
|
+
setDismissed = _useState6[1];
|
|
26043
|
+
var _useState7 = useState({
|
|
26044
|
+
x: 0,
|
|
26045
|
+
y: 0
|
|
26046
|
+
}),
|
|
26047
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26048
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26049
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26050
|
+
var wrapperNode = useRef();
|
|
26051
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26052
|
+
reverseDirection = props.reverseDirection,
|
|
26053
|
+
coordinate = props.coordinate,
|
|
26054
|
+
offset = props.offset,
|
|
26055
|
+
position = props.position,
|
|
26056
|
+
viewBox = props.viewBox;
|
|
26057
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26058
|
+
if (event.key === 'Escape') {
|
|
26059
|
+
setDismissed(true);
|
|
26060
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26061
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26062
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26063
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26064
|
+
});
|
|
26065
|
+
});
|
|
26066
|
+
}
|
|
26067
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26068
|
+
useEffect(function () {
|
|
26069
|
+
var updateBBox = function updateBBox() {
|
|
26070
|
+
if (dismissed) {
|
|
26071
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26072
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26073
|
+
setDismissed(false);
|
|
26074
|
+
}
|
|
26075
|
+
} else {
|
|
26076
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26077
|
+
}
|
|
26078
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26079
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26080
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26081
|
+
setBoxWidth(box.width);
|
|
26082
|
+
setBoxHeight(box.height);
|
|
26083
|
+
}
|
|
26084
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26085
|
+
setBoxWidth(-1);
|
|
26086
|
+
setBoxHeight(-1);
|
|
26087
|
+
}
|
|
26088
|
+
};
|
|
26089
|
+
updateBBox();
|
|
26090
|
+
return function () {
|
|
26091
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26092
|
+
};
|
|
26093
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26094
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26095
|
+
var key = _ref.key,
|
|
26096
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26097
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26098
|
+
if (position && isNumber(position[key])) {
|
|
26099
|
+
return position[key];
|
|
26100
|
+
}
|
|
26101
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26102
|
+
var positive = coordinate[key] + offset;
|
|
26103
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26104
|
+
return reverseDirection[key] ? negative : positive;
|
|
26105
|
+
}
|
|
26106
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26107
|
+
var _tooltipBoundary = negative;
|
|
26108
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26109
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26110
|
+
return Math.max(positive, viewBox[key]);
|
|
26111
|
+
}
|
|
26112
|
+
return Math.max(negative, viewBox[key]);
|
|
26113
|
+
}
|
|
26114
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26115
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26116
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26117
|
+
return Math.max(negative, viewBox[key]);
|
|
26118
|
+
}
|
|
26119
|
+
return Math.max(positive, viewBox[key]);
|
|
26120
|
+
};
|
|
26121
|
+
var payload = props.payload,
|
|
26122
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26123
|
+
filterNull = props.filterNull,
|
|
26124
|
+
active = props.active,
|
|
26125
|
+
wrapperStyle = props.wrapperStyle,
|
|
26126
|
+
useTranslate3d = props.useTranslate3d,
|
|
26127
|
+
isAnimationActive = props.isAnimationActive,
|
|
26128
|
+
animationDuration = props.animationDuration,
|
|
26129
|
+
animationEasing = props.animationEasing;
|
|
26130
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26131
|
+
return !isNil_1(entry.value);
|
|
26132
|
+
}) : payload);
|
|
26133
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26134
|
+
var content = props.content;
|
|
26135
|
+
var outerStyle = _objectSpread$i({
|
|
26136
|
+
pointerEvents: 'none',
|
|
26137
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26138
|
+
position: 'absolute',
|
|
26139
|
+
top: 0,
|
|
26140
|
+
left: 0
|
|
26141
|
+
}, wrapperStyle);
|
|
26142
|
+
var translateX, translateY;
|
|
26143
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26144
|
+
translateX = position.x;
|
|
26145
|
+
translateY = position.y;
|
|
26146
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26147
|
+
translateX = getTranslate({
|
|
26148
|
+
key: 'x',
|
|
26149
|
+
tooltipDimension: boxWidth,
|
|
26150
|
+
viewBoxDimension: viewBox.width
|
|
26151
|
+
});
|
|
26152
|
+
translateY = getTranslate({
|
|
26153
|
+
key: 'y',
|
|
26154
|
+
tooltipDimension: boxHeight,
|
|
26155
|
+
viewBoxDimension: viewBox.height
|
|
26156
|
+
});
|
|
26157
|
+
} else {
|
|
26158
|
+
outerStyle.visibility = 'hidden';
|
|
26159
|
+
}
|
|
26160
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26161
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26162
|
+
})), outerStyle);
|
|
26163
|
+
if (isAnimationActive && active) {
|
|
26164
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26165
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26166
|
+
})), outerStyle);
|
|
26167
|
+
}
|
|
26168
|
+
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));
|
|
26169
|
+
return (
|
|
26170
|
+
/*#__PURE__*/
|
|
26171
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26172
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26173
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26174
|
+
React__default.createElement("div", {
|
|
26175
|
+
tabIndex: -1,
|
|
26176
|
+
role: "dialog",
|
|
26177
|
+
className: cls,
|
|
26178
|
+
style: outerStyle,
|
|
26179
|
+
ref: wrapperNode
|
|
26180
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26181
|
+
payload: finalPayload
|
|
26182
|
+
})))
|
|
26183
|
+
);
|
|
26184
|
+
};
|
|
26185
|
+
|
|
26186
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26187
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26188
|
+
|
|
26189
|
+
/**
|
|
26190
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26191
|
+
* children.props when there are no props set by the consumer
|
|
26192
|
+
* doesn't work if using default parameters
|
|
26193
|
+
*/
|
|
26194
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26240
26195
|
|
|
26241
26196
|
var root = _root;
|
|
26242
26197
|
|
|
@@ -31806,12 +31761,12 @@ module.exports = exports['default'];
|
|
|
31806
31761
|
|
|
31807
31762
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31808
31763
|
|
|
31809
|
-
function _typeof$
|
|
31810
|
-
function ownKeys$
|
|
31811
|
-
function _objectSpread$
|
|
31812
|
-
function _defineProperty$
|
|
31813
|
-
function _toPropertyKey$
|
|
31814
|
-
function _toPrimitive$
|
|
31764
|
+
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); }
|
|
31765
|
+
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; }
|
|
31766
|
+
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; }
|
|
31767
|
+
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; }
|
|
31768
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31769
|
+
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); }
|
|
31815
31770
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31816
31771
|
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."); }
|
|
31817
31772
|
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); }
|
|
@@ -31879,7 +31834,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31879
31834
|
}
|
|
31880
31835
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31881
31836
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31882
|
-
var measurementSpanStyle = _objectSpread$
|
|
31837
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31883
31838
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31884
31839
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31885
31840
|
return styleKey;
|
|
@@ -31934,11 +31889,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31934
31889
|
};
|
|
31935
31890
|
};
|
|
31936
31891
|
|
|
31937
|
-
var _excluded$
|
|
31938
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31892
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31939
31893
|
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); }
|
|
31940
|
-
function _objectWithoutProperties$
|
|
31941
|
-
function _objectWithoutPropertiesLoose$
|
|
31894
|
+
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; }
|
|
31895
|
+
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; }
|
|
31942
31896
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31943
31897
|
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."); }
|
|
31944
31898
|
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); }
|
|
@@ -32092,46 +32046,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32092
32046
|
}
|
|
32093
32047
|
return getWordsWithoutCalculate(children);
|
|
32094
32048
|
};
|
|
32095
|
-
var
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32106
|
-
|
|
32107
|
-
|
|
32108
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32109
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32110
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32111
|
-
_ref5$fill = _ref5.fill,
|
|
32112
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32113
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32049
|
+
var textDefaultProps = {
|
|
32050
|
+
x: 0,
|
|
32051
|
+
y: 0,
|
|
32052
|
+
lineHeight: '1em',
|
|
32053
|
+
capHeight: '0.71em',
|
|
32054
|
+
// Magic number from d3
|
|
32055
|
+
scaleToFit: false,
|
|
32056
|
+
textAnchor: 'start',
|
|
32057
|
+
verticalAnchor: 'end',
|
|
32058
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32059
|
+
fill: '#808080'
|
|
32060
|
+
};
|
|
32061
|
+
var Text = function Text(props) {
|
|
32114
32062
|
var wordsByLines = useMemo(function () {
|
|
32115
32063
|
return getWordsByLines({
|
|
32116
32064
|
breakAll: props.breakAll,
|
|
32117
32065
|
children: props.children,
|
|
32118
32066
|
maxLines: props.maxLines,
|
|
32119
|
-
scaleToFit: scaleToFit,
|
|
32067
|
+
scaleToFit: props.scaleToFit,
|
|
32120
32068
|
style: props.style,
|
|
32121
32069
|
width: props.width
|
|
32122
32070
|
});
|
|
32123
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32071
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32124
32072
|
var dx = props.dx,
|
|
32125
32073
|
dy = props.dy,
|
|
32074
|
+
textAnchor = props.textAnchor,
|
|
32075
|
+
verticalAnchor = props.verticalAnchor,
|
|
32076
|
+
scaleToFit = props.scaleToFit,
|
|
32126
32077
|
angle = props.angle,
|
|
32078
|
+
lineHeight = props.lineHeight,
|
|
32079
|
+
capHeight = props.capHeight,
|
|
32127
32080
|
className = props.className,
|
|
32128
32081
|
breakAll = props.breakAll,
|
|
32129
|
-
textProps = _objectWithoutProperties$
|
|
32130
|
-
if (!isNumOrStr(
|
|
32082
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32083
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32131
32084
|
return null;
|
|
32132
32085
|
}
|
|
32133
|
-
var x =
|
|
32134
|
-
var y =
|
|
32086
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32087
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32135
32088
|
var startDy;
|
|
32136
32089
|
switch (verticalAnchor) {
|
|
32137
32090
|
case 'start':
|
|
@@ -32161,7 +32114,7 @@ var Text = function Text(_ref5) {
|
|
|
32161
32114
|
y: y,
|
|
32162
32115
|
className: classNames('recharts-text', className),
|
|
32163
32116
|
textAnchor: textAnchor,
|
|
32164
|
-
fill: fill.includes('url') ?
|
|
32117
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32165
32118
|
}), wordsByLines.map(function (line, index) {
|
|
32166
32119
|
return (
|
|
32167
32120
|
/*#__PURE__*/
|
|
@@ -32174,6 +32127,7 @@ var Text = function Text(_ref5) {
|
|
|
32174
32127
|
);
|
|
32175
32128
|
}));
|
|
32176
32129
|
};
|
|
32130
|
+
Text.defaultProps = textDefaultProps;
|
|
32177
32131
|
|
|
32178
32132
|
var baseIsEqual = _baseIsEqual;
|
|
32179
32133
|
|
|
@@ -38441,7 +38395,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38441
38395
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38442
38396
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38443
38397
|
|
|
38444
|
-
var _excluded$
|
|
38398
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38445
38399
|
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); }
|
|
38446
38400
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38447
38401
|
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."); }
|
|
@@ -38449,8 +38403,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38449
38403
|
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; }
|
|
38450
38404
|
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; } }
|
|
38451
38405
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38452
|
-
function _objectWithoutProperties$
|
|
38453
|
-
function _objectWithoutPropertiesLoose$
|
|
38406
|
+
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; }
|
|
38407
|
+
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; }
|
|
38454
38408
|
function ErrorBar(props) {
|
|
38455
38409
|
var offset = props.offset,
|
|
38456
38410
|
layout = props.layout,
|
|
@@ -38460,7 +38414,7 @@ function ErrorBar(props) {
|
|
|
38460
38414
|
dataPointFormatter = props.dataPointFormatter,
|
|
38461
38415
|
xAxis = props.xAxis,
|
|
38462
38416
|
yAxis = props.yAxis,
|
|
38463
|
-
others = _objectWithoutProperties$
|
|
38417
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38464
38418
|
var svgProps = filterProps(others);
|
|
38465
38419
|
var errorBars = data.map(function (entry, i) {
|
|
38466
38420
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38571,18 +38525,18 @@ ErrorBar.defaultProps = {
|
|
|
38571
38525
|
};
|
|
38572
38526
|
ErrorBar.displayName = 'ErrorBar';
|
|
38573
38527
|
|
|
38574
|
-
function _typeof$
|
|
38528
|
+
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); }
|
|
38575
38529
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38576
38530
|
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."); }
|
|
38577
38531
|
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); }
|
|
38578
38532
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38579
38533
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38580
38534
|
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; }
|
|
38581
|
-
function ownKeys$
|
|
38582
|
-
function _objectSpread$
|
|
38583
|
-
function _defineProperty$
|
|
38584
|
-
function _toPropertyKey$
|
|
38585
|
-
function _toPrimitive$
|
|
38535
|
+
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; }
|
|
38536
|
+
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; }
|
|
38537
|
+
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; }
|
|
38538
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38539
|
+
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); }
|
|
38586
38540
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38587
38541
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38588
38542
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38753,7 +38707,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38753
38707
|
};
|
|
38754
38708
|
});
|
|
38755
38709
|
}
|
|
38756
|
-
return _objectSpread$
|
|
38710
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38757
38711
|
payload: legendData,
|
|
38758
38712
|
item: legendItem
|
|
38759
38713
|
});
|
|
@@ -38907,10 +38861,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38907
38861
|
verticalAlign = legendProps.verticalAlign,
|
|
38908
38862
|
layout = legendProps.layout;
|
|
38909
38863
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38910
|
-
newOffset = _objectSpread$
|
|
38864
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38911
38865
|
}
|
|
38912
38866
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38913
|
-
newOffset = _objectSpread$
|
|
38867
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38914
38868
|
}
|
|
38915
38869
|
}
|
|
38916
38870
|
return newOffset;
|
|
@@ -39336,14 +39290,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39336
39290
|
items: [item]
|
|
39337
39291
|
};
|
|
39338
39292
|
}
|
|
39339
|
-
return _objectSpread$
|
|
39293
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39340
39294
|
}, {});
|
|
39341
39295
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39342
39296
|
var group = stackGroups[axisId];
|
|
39343
39297
|
if (group.hasStack) {
|
|
39344
39298
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39345
39299
|
var g = group.stackGroups[stackId];
|
|
39346
|
-
return _objectSpread$
|
|
39300
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39347
39301
|
numericAxisId: numericAxisId,
|
|
39348
39302
|
cateAxisId: cateAxisId,
|
|
39349
39303
|
items: g.items,
|
|
@@ -39351,7 +39305,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39351
39305
|
}));
|
|
39352
39306
|
}, {});
|
|
39353
39307
|
}
|
|
39354
|
-
return _objectSpread$
|
|
39308
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39355
39309
|
}, {});
|
|
39356
39310
|
};
|
|
39357
39311
|
|
|
@@ -39565,7 +39519,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39565
39519
|
formatter = _graphicalItem$props.formatter,
|
|
39566
39520
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39567
39521
|
chartType = _graphicalItem$props.chartType;
|
|
39568
|
-
return _objectSpread$
|
|
39522
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39569
39523
|
dataKey: dataKey,
|
|
39570
39524
|
unit: unit,
|
|
39571
39525
|
formatter: formatter,
|
|
@@ -39578,12 +39532,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39578
39532
|
});
|
|
39579
39533
|
};
|
|
39580
39534
|
|
|
39581
|
-
function _typeof$
|
|
39582
|
-
function ownKeys$
|
|
39583
|
-
function _objectSpread$
|
|
39584
|
-
function _defineProperty$
|
|
39585
|
-
function _toPropertyKey$
|
|
39586
|
-
function _toPrimitive$
|
|
39535
|
+
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); }
|
|
39536
|
+
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; }
|
|
39537
|
+
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; }
|
|
39538
|
+
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; }
|
|
39539
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39540
|
+
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); }
|
|
39587
39541
|
var RADIAN = Math.PI / 180;
|
|
39588
39542
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39589
39543
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39688,7 +39642,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39688
39642
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39689
39643
|
}
|
|
39690
39644
|
if (inRange) {
|
|
39691
|
-
return _objectSpread$
|
|
39645
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39692
39646
|
radius: radius,
|
|
39693
39647
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39694
39648
|
});
|
|
@@ -39696,21 +39650,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39696
39650
|
return null;
|
|
39697
39651
|
};
|
|
39698
39652
|
|
|
39699
|
-
function _typeof$
|
|
39700
|
-
var _excluded$7 = ["offset"];
|
|
39653
|
+
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); }
|
|
39701
39654
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39702
39655
|
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."); }
|
|
39703
39656
|
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); }
|
|
39704
39657
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39705
39658
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39706
39659
|
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; }
|
|
39707
|
-
function
|
|
39708
|
-
function
|
|
39709
|
-
function
|
|
39710
|
-
function
|
|
39711
|
-
function
|
|
39712
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39713
|
-
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); }
|
|
39660
|
+
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; }
|
|
39661
|
+
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; }
|
|
39662
|
+
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; }
|
|
39663
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39664
|
+
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); }
|
|
39714
39665
|
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); }
|
|
39715
39666
|
var getLabel = function getLabel(props) {
|
|
39716
39667
|
var value = props.value,
|
|
@@ -39855,7 +39806,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39855
39806
|
textAnchor: 'middle',
|
|
39856
39807
|
verticalAnchor: verticalEnd
|
|
39857
39808
|
};
|
|
39858
|
-
return _objectSpread$
|
|
39809
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39859
39810
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39860
39811
|
width: width
|
|
39861
39812
|
} : {});
|
|
@@ -39867,7 +39818,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39867
39818
|
textAnchor: 'middle',
|
|
39868
39819
|
verticalAnchor: verticalStart
|
|
39869
39820
|
};
|
|
39870
|
-
return _objectSpread$
|
|
39821
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39871
39822
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39872
39823
|
width: width
|
|
39873
39824
|
} : {});
|
|
@@ -39879,7 +39830,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39879
39830
|
textAnchor: horizontalEnd,
|
|
39880
39831
|
verticalAnchor: 'middle'
|
|
39881
39832
|
};
|
|
39882
|
-
return _objectSpread$
|
|
39833
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39883
39834
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39884
39835
|
height: height
|
|
39885
39836
|
} : {});
|
|
@@ -39891,7 +39842,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39891
39842
|
textAnchor: horizontalStart,
|
|
39892
39843
|
verticalAnchor: 'middle'
|
|
39893
39844
|
};
|
|
39894
|
-
return _objectSpread$
|
|
39845
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39895
39846
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39896
39847
|
height: height
|
|
39897
39848
|
} : {});
|
|
@@ -39901,7 +39852,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39901
39852
|
height: height
|
|
39902
39853
|
} : {};
|
|
39903
39854
|
if (position === 'insideLeft') {
|
|
39904
|
-
return _objectSpread$
|
|
39855
|
+
return _objectSpread$e({
|
|
39905
39856
|
x: x + horizontalOffset,
|
|
39906
39857
|
y: y + height / 2,
|
|
39907
39858
|
textAnchor: horizontalStart,
|
|
@@ -39909,7 +39860,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39909
39860
|
}, sizeAttrs);
|
|
39910
39861
|
}
|
|
39911
39862
|
if (position === 'insideRight') {
|
|
39912
|
-
return _objectSpread$
|
|
39863
|
+
return _objectSpread$e({
|
|
39913
39864
|
x: x + width - horizontalOffset,
|
|
39914
39865
|
y: y + height / 2,
|
|
39915
39866
|
textAnchor: horizontalEnd,
|
|
@@ -39917,7 +39868,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39917
39868
|
}, sizeAttrs);
|
|
39918
39869
|
}
|
|
39919
39870
|
if (position === 'insideTop') {
|
|
39920
|
-
return _objectSpread$
|
|
39871
|
+
return _objectSpread$e({
|
|
39921
39872
|
x: x + width / 2,
|
|
39922
39873
|
y: y + verticalOffset,
|
|
39923
39874
|
textAnchor: 'middle',
|
|
@@ -39925,7 +39876,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39925
39876
|
}, sizeAttrs);
|
|
39926
39877
|
}
|
|
39927
39878
|
if (position === 'insideBottom') {
|
|
39928
|
-
return _objectSpread$
|
|
39879
|
+
return _objectSpread$e({
|
|
39929
39880
|
x: x + width / 2,
|
|
39930
39881
|
y: y + height - verticalOffset,
|
|
39931
39882
|
textAnchor: 'middle',
|
|
@@ -39933,7 +39884,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39933
39884
|
}, sizeAttrs);
|
|
39934
39885
|
}
|
|
39935
39886
|
if (position === 'insideTopLeft') {
|
|
39936
|
-
return _objectSpread$
|
|
39887
|
+
return _objectSpread$e({
|
|
39937
39888
|
x: x + horizontalOffset,
|
|
39938
39889
|
y: y + verticalOffset,
|
|
39939
39890
|
textAnchor: horizontalStart,
|
|
@@ -39941,7 +39892,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39941
39892
|
}, sizeAttrs);
|
|
39942
39893
|
}
|
|
39943
39894
|
if (position === 'insideTopRight') {
|
|
39944
|
-
return _objectSpread$
|
|
39895
|
+
return _objectSpread$e({
|
|
39945
39896
|
x: x + width - horizontalOffset,
|
|
39946
39897
|
y: y + verticalOffset,
|
|
39947
39898
|
textAnchor: horizontalEnd,
|
|
@@ -39949,7 +39900,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39949
39900
|
}, sizeAttrs);
|
|
39950
39901
|
}
|
|
39951
39902
|
if (position === 'insideBottomLeft') {
|
|
39952
|
-
return _objectSpread$
|
|
39903
|
+
return _objectSpread$e({
|
|
39953
39904
|
x: x + horizontalOffset,
|
|
39954
39905
|
y: y + height - verticalOffset,
|
|
39955
39906
|
textAnchor: horizontalStart,
|
|
@@ -39957,7 +39908,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39957
39908
|
}, sizeAttrs);
|
|
39958
39909
|
}
|
|
39959
39910
|
if (position === 'insideBottomRight') {
|
|
39960
|
-
return _objectSpread$
|
|
39911
|
+
return _objectSpread$e({
|
|
39961
39912
|
x: x + width - horizontalOffset,
|
|
39962
39913
|
y: y + height - verticalOffset,
|
|
39963
39914
|
textAnchor: horizontalEnd,
|
|
@@ -39965,14 +39916,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39965
39916
|
}, sizeAttrs);
|
|
39966
39917
|
}
|
|
39967
39918
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39968
|
-
return _objectSpread$
|
|
39919
|
+
return _objectSpread$e({
|
|
39969
39920
|
x: x + getPercentValue(position.x, width),
|
|
39970
39921
|
y: y + getPercentValue(position.y, height),
|
|
39971
39922
|
textAnchor: 'end',
|
|
39972
39923
|
verticalAnchor: 'end'
|
|
39973
39924
|
}, sizeAttrs);
|
|
39974
39925
|
}
|
|
39975
|
-
return _objectSpread$
|
|
39926
|
+
return _objectSpread$e({
|
|
39976
39927
|
x: x + width / 2,
|
|
39977
39928
|
y: y + height / 2,
|
|
39978
39929
|
textAnchor: 'middle',
|
|
@@ -39982,13 +39933,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39982
39933
|
var isPolar = function isPolar(viewBox) {
|
|
39983
39934
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39984
39935
|
};
|
|
39985
|
-
function Label$3(
|
|
39986
|
-
var _ref4$offset = _ref4.offset,
|
|
39987
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39988
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39989
|
-
var props = _objectSpread$h({
|
|
39990
|
-
offset: offset
|
|
39991
|
-
}, restProps);
|
|
39936
|
+
function Label$3(props) {
|
|
39992
39937
|
var viewBox = props.viewBox,
|
|
39993
39938
|
position = props.position,
|
|
39994
39939
|
value = props.value,
|
|
@@ -40025,6 +39970,9 @@ function Label$3(_ref4) {
|
|
|
40025
39970
|
}), label);
|
|
40026
39971
|
}
|
|
40027
39972
|
Label$3.displayName = 'Label';
|
|
39973
|
+
Label$3.defaultProps = {
|
|
39974
|
+
offset: 5
|
|
39975
|
+
};
|
|
40028
39976
|
var parseViewBox = function parseViewBox(props) {
|
|
40029
39977
|
var cx = props.cx,
|
|
40030
39978
|
cy = props.cy,
|
|
@@ -40179,9 +40127,8 @@ function last(array) {
|
|
|
40179
40127
|
|
|
40180
40128
|
var last_1 = last;
|
|
40181
40129
|
|
|
40182
|
-
function _typeof$
|
|
40183
|
-
var _excluded$
|
|
40184
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40130
|
+
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); }
|
|
40131
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40185
40132
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40186
40133
|
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."); }
|
|
40187
40134
|
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); }
|
|
@@ -40189,26 +40136,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40189
40136
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40190
40137
|
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; }
|
|
40191
40138
|
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); }
|
|
40192
|
-
function ownKeys$
|
|
40193
|
-
function _objectSpread$
|
|
40194
|
-
function _defineProperty$
|
|
40195
|
-
function _toPropertyKey$
|
|
40196
|
-
function _toPrimitive$
|
|
40197
|
-
function _objectWithoutProperties$
|
|
40198
|
-
function _objectWithoutPropertiesLoose$
|
|
40199
|
-
var
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
|
|
40203
|
-
|
|
40204
|
-
|
|
40205
|
-
|
|
40206
|
-
|
|
40207
|
-
dataKey =
|
|
40208
|
-
clockWise =
|
|
40209
|
-
id =
|
|
40210
|
-
textBreakAll =
|
|
40211
|
-
others = _objectWithoutProperties$
|
|
40139
|
+
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; }
|
|
40140
|
+
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; }
|
|
40141
|
+
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; }
|
|
40142
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40143
|
+
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); }
|
|
40144
|
+
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; }
|
|
40145
|
+
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; }
|
|
40146
|
+
var defaultProps = {
|
|
40147
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40148
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40149
|
+
}
|
|
40150
|
+
};
|
|
40151
|
+
function LabelList(props) {
|
|
40152
|
+
var data = props.data,
|
|
40153
|
+
valueAccessor = props.valueAccessor,
|
|
40154
|
+
dataKey = props.dataKey,
|
|
40155
|
+
clockWise = props.clockWise,
|
|
40156
|
+
id = props.id,
|
|
40157
|
+
textBreakAll = props.textBreakAll,
|
|
40158
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40212
40159
|
if (!data || !data.length) {
|
|
40213
40160
|
return null;
|
|
40214
40161
|
}
|
|
@@ -40224,7 +40171,7 @@ function LabelList(_ref) {
|
|
|
40224
40171
|
index: index,
|
|
40225
40172
|
value: value,
|
|
40226
40173
|
textBreakAll: textBreakAll,
|
|
40227
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40174
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40228
40175
|
clockWise: clockWise
|
|
40229
40176
|
})),
|
|
40230
40177
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40279,14 +40226,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40279
40226
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40280
40227
|
}
|
|
40281
40228
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40229
|
+
LabelList.defaultProps = defaultProps;
|
|
40282
40230
|
|
|
40283
|
-
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); }
|
|
40284
40231
|
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); }
|
|
40285
|
-
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; }
|
|
40286
|
-
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; }
|
|
40287
|
-
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; }
|
|
40288
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40289
|
-
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); }
|
|
40290
40232
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40291
40233
|
var sign = mathSign(endAngle - startAngle);
|
|
40292
40234
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40427,19 +40369,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40427
40369
|
}
|
|
40428
40370
|
return path;
|
|
40429
40371
|
};
|
|
40430
|
-
var
|
|
40431
|
-
cx: 0,
|
|
40432
|
-
cy: 0,
|
|
40433
|
-
innerRadius: 0,
|
|
40434
|
-
outerRadius: 0,
|
|
40435
|
-
startAngle: 0,
|
|
40436
|
-
endAngle: 0,
|
|
40437
|
-
cornerRadius: 0,
|
|
40438
|
-
forceCornerRadius: false,
|
|
40439
|
-
cornerIsExternal: false
|
|
40440
|
-
};
|
|
40441
|
-
var Sector = function Sector(sectorProps) {
|
|
40442
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40372
|
+
var Sector = function Sector(props) {
|
|
40443
40373
|
var cx = props.cx,
|
|
40444
40374
|
cy = props.cy,
|
|
40445
40375
|
innerRadius = props.innerRadius,
|
|
@@ -40485,14 +40415,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40485
40415
|
role: "img"
|
|
40486
40416
|
}));
|
|
40487
40417
|
};
|
|
40418
|
+
Sector.defaultProps = {
|
|
40419
|
+
cx: 0,
|
|
40420
|
+
cy: 0,
|
|
40421
|
+
innerRadius: 0,
|
|
40422
|
+
outerRadius: 0,
|
|
40423
|
+
startAngle: 0,
|
|
40424
|
+
endAngle: 0,
|
|
40425
|
+
cornerRadius: 0,
|
|
40426
|
+
forceCornerRadius: false,
|
|
40427
|
+
cornerIsExternal: false
|
|
40428
|
+
};
|
|
40488
40429
|
|
|
40489
|
-
function _typeof$
|
|
40430
|
+
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); }
|
|
40490
40431
|
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); }
|
|
40491
|
-
function ownKeys$
|
|
40492
|
-
function _objectSpread$
|
|
40493
|
-
function _defineProperty$
|
|
40494
|
-
function _toPropertyKey$
|
|
40495
|
-
function _toPrimitive$
|
|
40432
|
+
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; }
|
|
40433
|
+
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; }
|
|
40434
|
+
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; }
|
|
40435
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40436
|
+
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); }
|
|
40496
40437
|
var CURVE_FACTORIES = {
|
|
40497
40438
|
curveBasisClosed: curveBasisClosed,
|
|
40498
40439
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40532,14 +40473,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40532
40473
|
* @return {String} path
|
|
40533
40474
|
*/
|
|
40534
40475
|
var getPath$1 = function getPath(_ref) {
|
|
40535
|
-
var
|
|
40536
|
-
|
|
40537
|
-
_ref$points = _ref.points,
|
|
40538
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40476
|
+
var type = _ref.type,
|
|
40477
|
+
points = _ref.points,
|
|
40539
40478
|
baseLine = _ref.baseLine,
|
|
40540
40479
|
layout = _ref.layout,
|
|
40541
|
-
|
|
40542
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40480
|
+
connectNulls = _ref.connectNulls;
|
|
40543
40481
|
var curveFactory = getCurveFactory(type, layout);
|
|
40544
40482
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40545
40483
|
return defined(entry);
|
|
@@ -40550,7 +40488,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40550
40488
|
return defined(base);
|
|
40551
40489
|
}) : baseLine;
|
|
40552
40490
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40553
|
-
return _objectSpread$
|
|
40491
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40554
40492
|
base: formatBaseLine[index]
|
|
40555
40493
|
});
|
|
40556
40494
|
});
|
|
@@ -40591,8 +40529,12 @@ var Curve = function Curve(props) {
|
|
|
40591
40529
|
ref: pathRef
|
|
40592
40530
|
}));
|
|
40593
40531
|
};
|
|
40532
|
+
Curve.defaultProps = {
|
|
40533
|
+
type: 'linear',
|
|
40534
|
+
points: [],
|
|
40535
|
+
connectNulls: false
|
|
40536
|
+
};
|
|
40594
40537
|
|
|
40595
|
-
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); }
|
|
40596
40538
|
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); }
|
|
40597
40539
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40598
40540
|
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."); }
|
|
@@ -40600,11 +40542,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40600
40542
|
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; }
|
|
40601
40543
|
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; } }
|
|
40602
40544
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40603
|
-
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; }
|
|
40604
|
-
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; }
|
|
40605
|
-
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; }
|
|
40606
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40607
|
-
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); }
|
|
40608
40545
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40609
40546
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40610
40547
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40660,29 +40597,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40660
40597
|
}
|
|
40661
40598
|
return false;
|
|
40662
40599
|
};
|
|
40663
|
-
var
|
|
40664
|
-
x: 0,
|
|
40665
|
-
y: 0,
|
|
40666
|
-
width: 0,
|
|
40667
|
-
height: 0,
|
|
40668
|
-
// The radius of border
|
|
40669
|
-
// The radius of four corners when radius is a number
|
|
40670
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40671
|
-
radius: 0,
|
|
40672
|
-
isAnimationActive: false,
|
|
40673
|
-
isUpdateAnimationActive: false,
|
|
40674
|
-
animationBegin: 0,
|
|
40675
|
-
animationDuration: 1500,
|
|
40676
|
-
animationEasing: 'ease'
|
|
40677
|
-
};
|
|
40678
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40679
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40600
|
+
var Rectangle = function Rectangle(props) {
|
|
40680
40601
|
var pathRef = useRef();
|
|
40681
40602
|
var _useState = useState(-1),
|
|
40682
40603
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40683
40604
|
totalLength = _useState2[0],
|
|
40684
40605
|
setTotalLength = _useState2[1];
|
|
40685
|
-
|
|
40606
|
+
useLayoutEffect(function () {
|
|
40686
40607
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40687
40608
|
try {
|
|
40688
40609
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40753,6 +40674,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40753
40674
|
})));
|
|
40754
40675
|
});
|
|
40755
40676
|
};
|
|
40677
|
+
Rectangle.defaultProps = {
|
|
40678
|
+
x: 0,
|
|
40679
|
+
y: 0,
|
|
40680
|
+
width: 0,
|
|
40681
|
+
height: 0,
|
|
40682
|
+
// The radius of border
|
|
40683
|
+
// The radius of four corners when radius is a number
|
|
40684
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40685
|
+
radius: 0,
|
|
40686
|
+
isAnimationActive: false,
|
|
40687
|
+
isUpdateAnimationActive: false,
|
|
40688
|
+
animationBegin: 0,
|
|
40689
|
+
animationDuration: 1500,
|
|
40690
|
+
animationEasing: 'ease'
|
|
40691
|
+
};
|
|
40756
40692
|
|
|
40757
40693
|
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); }
|
|
40758
40694
|
var Dot$1 = function Dot(props) {
|
|
@@ -40772,42 +40708,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40772
40708
|
return null;
|
|
40773
40709
|
};
|
|
40774
40710
|
|
|
40775
|
-
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); }
|
|
40776
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40777
40711
|
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); }
|
|
40778
|
-
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; }
|
|
40779
|
-
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; }
|
|
40780
|
-
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; }
|
|
40781
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40782
|
-
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); }
|
|
40783
|
-
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; }
|
|
40784
|
-
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; }
|
|
40785
40712
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40786
40713
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40787
40714
|
};
|
|
40788
|
-
var Cross = function Cross(
|
|
40789
|
-
var
|
|
40790
|
-
|
|
40791
|
-
|
|
40792
|
-
|
|
40793
|
-
|
|
40794
|
-
|
|
40795
|
-
|
|
40796
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40797
|
-
_ref$width = _ref.width,
|
|
40798
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40799
|
-
_ref$height = _ref.height,
|
|
40800
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40801
|
-
className = _ref.className,
|
|
40802
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40803
|
-
var props = _objectSpread$c({
|
|
40804
|
-
x: x,
|
|
40805
|
-
y: y,
|
|
40806
|
-
top: top,
|
|
40807
|
-
left: left,
|
|
40808
|
-
width: width,
|
|
40809
|
-
height: height
|
|
40810
|
-
}, rest);
|
|
40715
|
+
var Cross = function Cross(props) {
|
|
40716
|
+
var x = props.x,
|
|
40717
|
+
y = props.y,
|
|
40718
|
+
width = props.width,
|
|
40719
|
+
height = props.height,
|
|
40720
|
+
top = props.top,
|
|
40721
|
+
left = props.left,
|
|
40722
|
+
className = props.className;
|
|
40811
40723
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40812
40724
|
return null;
|
|
40813
40725
|
}
|
|
@@ -40816,6 +40728,14 @@ var Cross = function Cross(_ref) {
|
|
|
40816
40728
|
d: getPath(x, y, width, height, top, left)
|
|
40817
40729
|
}));
|
|
40818
40730
|
};
|
|
40731
|
+
Cross.defaultProps = {
|
|
40732
|
+
x: 0,
|
|
40733
|
+
y: 0,
|
|
40734
|
+
top: 0,
|
|
40735
|
+
left: 0,
|
|
40736
|
+
width: 0,
|
|
40737
|
+
height: 0
|
|
40738
|
+
};
|
|
40819
40739
|
|
|
40820
40740
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40821
40741
|
|
|
@@ -41025,7 +40945,6 @@ var createScale = function createScale(_ref) {
|
|
|
41025
40945
|
isTextActive: false,
|
|
41026
40946
|
isSlideMoving: false,
|
|
41027
40947
|
isTravellerMoving: false,
|
|
41028
|
-
isTravellerFocused: false,
|
|
41029
40948
|
startX: scale(startIndex),
|
|
41030
40949
|
endX: scale(endIndex),
|
|
41031
40950
|
scale: scale,
|
|
@@ -41239,38 +41158,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41239
41158
|
}
|
|
41240
41159
|
});
|
|
41241
41160
|
}
|
|
41242
|
-
}, {
|
|
41243
|
-
key: "handleTravellerMoveKeyboard",
|
|
41244
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41245
|
-
var _this2 = this;
|
|
41246
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41247
|
-
var _this$state3 = this.state,
|
|
41248
|
-
scaleValues = _this$state3.scaleValues,
|
|
41249
|
-
startX = _this$state3.startX,
|
|
41250
|
-
endX = _this$state3.endX;
|
|
41251
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41252
|
-
var currentScaleValue = this.state[id];
|
|
41253
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41254
|
-
if (currentIndex === -1) {
|
|
41255
|
-
return;
|
|
41256
|
-
}
|
|
41257
|
-
var newIndex = currentIndex + direction;
|
|
41258
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41259
|
-
return;
|
|
41260
|
-
}
|
|
41261
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41262
|
-
|
|
41263
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41264
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41265
|
-
return;
|
|
41266
|
-
}
|
|
41267
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41268
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41269
|
-
startX: _this2.state.startX,
|
|
41270
|
-
endX: _this2.state.endX
|
|
41271
|
-
}));
|
|
41272
|
-
});
|
|
41273
|
-
}
|
|
41274
41161
|
}, {
|
|
41275
41162
|
key: "renderBackground",
|
|
41276
41163
|
value: function renderBackground() {
|
|
@@ -41318,7 +41205,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41318
41205
|
}, {
|
|
41319
41206
|
key: "renderTravellerLayer",
|
|
41320
41207
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41321
|
-
var _this3 = this;
|
|
41322
41208
|
var _this$props7 = this.props,
|
|
41323
41209
|
y = _this$props7.y,
|
|
41324
41210
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41332,31 +41218,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41332
41218
|
height: height
|
|
41333
41219
|
});
|
|
41334
41220
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41335
|
-
tabIndex: 0,
|
|
41336
|
-
role: "slider",
|
|
41337
41221
|
className: "recharts-brush-traveller",
|
|
41338
41222
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41339
41223
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41340
41224
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41341
41225
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41342
|
-
onKeyDown: function onKeyDown(e) {
|
|
41343
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41344
|
-
return;
|
|
41345
|
-
}
|
|
41346
|
-
e.preventDefault();
|
|
41347
|
-
e.stopPropagation();
|
|
41348
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41349
|
-
},
|
|
41350
|
-
onFocus: function onFocus() {
|
|
41351
|
-
_this3.setState({
|
|
41352
|
-
isTravellerFocused: true
|
|
41353
|
-
});
|
|
41354
|
-
},
|
|
41355
|
-
onBlur: function onBlur() {
|
|
41356
|
-
_this3.setState({
|
|
41357
|
-
isTravellerFocused: false
|
|
41358
|
-
});
|
|
41359
|
-
},
|
|
41360
41226
|
style: {
|
|
41361
41227
|
cursor: 'col-resize'
|
|
41362
41228
|
}
|
|
@@ -41400,9 +41266,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41400
41266
|
height = _this$props9.height,
|
|
41401
41267
|
travellerWidth = _this$props9.travellerWidth,
|
|
41402
41268
|
stroke = _this$props9.stroke;
|
|
41403
|
-
var _this$
|
|
41404
|
-
startX = _this$
|
|
41405
|
-
endX = _this$
|
|
41269
|
+
var _this$state3 = this.state,
|
|
41270
|
+
startX = _this$state3.startX,
|
|
41271
|
+
endX = _this$state3.endX;
|
|
41406
41272
|
var offset = 5;
|
|
41407
41273
|
var attrs = {
|
|
41408
41274
|
pointerEvents: 'none',
|
|
@@ -41434,13 +41300,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41434
41300
|
width = _this$props10.width,
|
|
41435
41301
|
height = _this$props10.height,
|
|
41436
41302
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41437
|
-
var _this$
|
|
41438
|
-
startX = _this$
|
|
41439
|
-
endX = _this$
|
|
41440
|
-
isTextActive = _this$
|
|
41441
|
-
isSlideMoving = _this$
|
|
41442
|
-
isTravellerMoving = _this$
|
|
41443
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41303
|
+
var _this$state4 = this.state,
|
|
41304
|
+
startX = _this$state4.startX,
|
|
41305
|
+
endX = _this$state4.endX,
|
|
41306
|
+
isTextActive = _this$state4.isTextActive,
|
|
41307
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41308
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41444
41309
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41445
41310
|
return null;
|
|
41446
41311
|
}
|
|
@@ -41452,7 +41317,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41452
41317
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41453
41318
|
onTouchMove: this.handleTouchMove,
|
|
41454
41319
|
style: style
|
|
41455
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41320
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41456
41321
|
}
|
|
41457
41322
|
}], [{
|
|
41458
41323
|
key: "renderDefaultTraveller",
|
|
@@ -41770,7 +41635,7 @@ function every(collection, predicate, guard) {
|
|
|
41770
41635
|
|
|
41771
41636
|
var every_1 = every;
|
|
41772
41637
|
|
|
41773
|
-
var defineProperty = _defineProperty$
|
|
41638
|
+
var defineProperty = _defineProperty$l;
|
|
41774
41639
|
|
|
41775
41640
|
/**
|
|
41776
41641
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42131,6 +41996,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42131
41996
|
legendType: 'rect',
|
|
42132
41997
|
minPointSize: 0,
|
|
42133
41998
|
hide: false,
|
|
41999
|
+
// data of bar
|
|
42134
42000
|
data: [],
|
|
42135
42001
|
layout: 'vertical',
|
|
42136
42002
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45043,11 +44909,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45043
44909
|
}
|
|
45044
44910
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45045
44911
|
x = _this$container$getBo.x,
|
|
45046
|
-
y = _this$container$getBo.y
|
|
45047
|
-
height = _this$container$getBo.height;
|
|
44912
|
+
y = _this$container$getBo.y;
|
|
45048
44913
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45049
44914
|
var pageX = x + coordinate;
|
|
45050
|
-
var pageY = y + this.offset.top
|
|
44915
|
+
var pageY = y + this.offset.top;
|
|
45051
44916
|
this.mouseHandlerCallback({
|
|
45052
44917
|
pageX: pageX,
|
|
45053
44918
|
pageY: pageY
|