@typeolymp/ui-components 1.19.13 → 1.19.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/atoms/Input/translations.d.ts +11 -0
- package/build/components/molecules/Key/translations.d.ts +5 -0
- package/build/components/molecules/PasswordInputField/translations.d.ts +11 -0
- package/build/components/molecules/Tabs/styles.d.ts +2 -0
- package/build/components/organisms/Chart/data copy.d.ts +30 -0
- package/build/components/organisms/Chart/styles.d.ts +1 -0
- package/build/index.es.js +627 -763
- package/build/index.es.js.map +1 -1
- package/build/index.js +627 -763
- 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.js
CHANGED
|
@@ -4527,7 +4527,7 @@ function requiredArgs(required, args) {
|
|
|
4527
4527
|
}
|
|
4528
4528
|
}
|
|
4529
4529
|
|
|
4530
|
-
function _typeof$
|
|
4530
|
+
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); }
|
|
4531
4531
|
/**
|
|
4532
4532
|
* @name toDate
|
|
4533
4533
|
* @category Common Helpers
|
|
@@ -4563,7 +4563,7 @@ function toDate(argument) {
|
|
|
4563
4563
|
requiredArgs(1, arguments);
|
|
4564
4564
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4565
4565
|
|
|
4566
|
-
if (argument instanceof Date || _typeof$
|
|
4566
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4567
4567
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4568
4568
|
return new Date(argument.getTime());
|
|
4569
4569
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4834,7 +4834,7 @@ var millisecondsInMinute = 60000;
|
|
|
4834
4834
|
|
|
4835
4835
|
var millisecondsInHour = 3600000;
|
|
4836
4836
|
|
|
4837
|
-
function _typeof$
|
|
4837
|
+
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); }
|
|
4838
4838
|
/**
|
|
4839
4839
|
* @name isDate
|
|
4840
4840
|
* @category Common Helpers
|
|
@@ -4870,7 +4870,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4870
4870
|
|
|
4871
4871
|
function isDate(value) {
|
|
4872
4872
|
requiredArgs(1, arguments);
|
|
4873
|
-
return value instanceof Date || _typeof$
|
|
4873
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4874
4874
|
}
|
|
4875
4875
|
|
|
4876
4876
|
/**
|
|
@@ -13586,15 +13586,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13586
13586
|
|
|
13587
13587
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13588
13588
|
|
|
13589
|
-
function _slicedToArray$
|
|
13590
|
-
return _arrayWithHoles$
|
|
13589
|
+
function _slicedToArray$d(arr, i) {
|
|
13590
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13591
13591
|
}
|
|
13592
13592
|
|
|
13593
|
-
function _arrayWithHoles$
|
|
13593
|
+
function _arrayWithHoles$e(arr) {
|
|
13594
13594
|
if (Array.isArray(arr)) return arr;
|
|
13595
13595
|
}
|
|
13596
13596
|
|
|
13597
|
-
function _iterableToArrayLimit$
|
|
13597
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13598
13598
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13599
13599
|
|
|
13600
13600
|
if (_i == null) return;
|
|
@@ -13624,16 +13624,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13624
13624
|
return _arr;
|
|
13625
13625
|
}
|
|
13626
13626
|
|
|
13627
|
-
function _unsupportedIterableToArray$
|
|
13627
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13628
13628
|
if (!o) return;
|
|
13629
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13629
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13630
13630
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13631
13631
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13632
13632
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13633
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13633
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13634
13634
|
}
|
|
13635
13635
|
|
|
13636
|
-
function _arrayLikeToArray$
|
|
13636
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13637
13637
|
if (len == null || len > arr.length) len = arr.length;
|
|
13638
13638
|
|
|
13639
13639
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13641,7 +13641,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13641
13641
|
return arr2;
|
|
13642
13642
|
}
|
|
13643
13643
|
|
|
13644
|
-
function _nonIterableRest$
|
|
13644
|
+
function _nonIterableRest$e() {
|
|
13645
13645
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13646
13646
|
}
|
|
13647
13647
|
|
|
@@ -13705,7 +13705,7 @@ reservedProps.forEach(function (name) {
|
|
|
13705
13705
|
// This is a mapping from React prop names to the attribute names.
|
|
13706
13706
|
|
|
13707
13707
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13708
|
-
var _ref2 = _slicedToArray$
|
|
13708
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13709
13709
|
name = _ref2[0],
|
|
13710
13710
|
attributeName = _ref2[1];
|
|
13711
13711
|
|
|
@@ -14778,8 +14778,8 @@ var templateObject_1$y, templateObject_2$u;
|
|
|
14778
14778
|
|
|
14779
14779
|
var DataSummary = function (_a) {
|
|
14780
14780
|
var title = _a.title, data = _a.data, onEdit = _a.onEdit, locale = _a.locale;
|
|
14781
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Container$l, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h5" }, { children: title })), onEdit && (jsxRuntime.jsx("div", __assign$2({ onClick: onEdit }, { children: jsxRuntime.jsx(Heading, __assign$2({ type: "h6", color: "gray" }, { children: translations[locale]["Edit"] })) })))] }), jsxRuntime.jsx(Data, { children: data === null || data === void 0 ? void 0 : data.map(function (item) {
|
|
14782
|
-
return item instanceof Object ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(Paragraph, __assign$2({ weight: "regular" }, { children: [item.label, ":"] })), jsxRuntime.jsx(Paragraph, __assign$2({ weight: "regular" }, { children: item.value }))] }, "".concat(item.label, "-").concat(item.value))) : (jsxRuntime.jsx(Paragraph, __assign$2({ weight: "regular" }, { children: item })));
|
|
14781
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(Container$l, { children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Heading, __assign$2({ type: "h5" }, { children: title })), onEdit && (jsxRuntime.jsx("div", __assign$2({ onClick: onEdit }, { children: jsxRuntime.jsx(Heading, __assign$2({ type: "h6", color: "gray" }, { children: translations[locale]["Edit"] })) })))] }), jsxRuntime.jsx(Data, { children: data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
14782
|
+
return item instanceof Object ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(Paragraph, __assign$2({ weight: "regular" }, { children: [item.label, ":"] })), jsxRuntime.jsx(Paragraph, __assign$2({ weight: "regular" }, { children: item.value }))] }, "".concat(item.label, "-").concat(item.value, "-").concat(index))) : (jsxRuntime.jsx(Paragraph, __assign$2({ weight: "regular" }, { children: item }), "".concat(item, "-").concat(index)));
|
|
14783
14783
|
}) })] }) }));
|
|
14784
14784
|
};
|
|
14785
14785
|
|
|
@@ -16116,31 +16116,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16116
16116
|
return true;
|
|
16117
16117
|
};
|
|
16118
16118
|
|
|
16119
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16119
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16120
16120
|
|
|
16121
16121
|
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."); }
|
|
16122
16122
|
|
|
16123
16123
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16124
16124
|
|
|
16125
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16125
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16126
16126
|
|
|
16127
|
-
function ownKeys$
|
|
16127
|
+
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; }
|
|
16128
16128
|
|
|
16129
|
-
function _objectSpread$
|
|
16129
|
+
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; }
|
|
16130
16130
|
|
|
16131
|
-
function _defineProperty$
|
|
16131
|
+
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; }
|
|
16132
16132
|
|
|
16133
|
-
function _slicedToArray$
|
|
16133
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16134
16134
|
|
|
16135
|
-
function _nonIterableRest$
|
|
16135
|
+
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."); }
|
|
16136
16136
|
|
|
16137
|
-
function _unsupportedIterableToArray$
|
|
16137
|
+
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); }
|
|
16138
16138
|
|
|
16139
|
-
function _arrayLikeToArray$
|
|
16139
|
+
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; }
|
|
16140
16140
|
|
|
16141
|
-
function _iterableToArrayLimit$
|
|
16141
|
+
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; }
|
|
16142
16142
|
|
|
16143
|
-
function _arrayWithHoles$
|
|
16143
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16144
16144
|
|
|
16145
16145
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16146
16146
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16220,11 +16220,11 @@ function allFilesAccepted(_ref) {
|
|
|
16220
16220
|
|
|
16221
16221
|
return files.every(function (file) {
|
|
16222
16222
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16223
|
-
_fileAccepted2 = _slicedToArray$
|
|
16223
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16224
16224
|
accepted = _fileAccepted2[0];
|
|
16225
16225
|
|
|
16226
16226
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16227
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16227
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16228
16228
|
sizeMatch = _fileMatchSize2[0];
|
|
16229
16229
|
|
|
16230
16230
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16321,7 +16321,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16321
16321
|
function pickerOptionsFromAccept(accept) {
|
|
16322
16322
|
if (isDefined(accept)) {
|
|
16323
16323
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16324
|
-
var _ref3 = _slicedToArray$
|
|
16324
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16325
16325
|
mimeType = _ref3[0],
|
|
16326
16326
|
ext = _ref3[1];
|
|
16327
16327
|
|
|
@@ -16339,11 +16339,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16339
16339
|
|
|
16340
16340
|
return ok;
|
|
16341
16341
|
}).reduce(function (agg, _ref4) {
|
|
16342
|
-
var _ref5 = _slicedToArray$
|
|
16342
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16343
16343
|
mimeType = _ref5[0],
|
|
16344
16344
|
ext = _ref5[1];
|
|
16345
16345
|
|
|
16346
|
-
return _objectSpread$
|
|
16346
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16347
16347
|
}, {});
|
|
16348
16348
|
return [{
|
|
16349
16349
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16363,7 +16363,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16363
16363
|
function acceptPropAsAcceptAttr(accept) {
|
|
16364
16364
|
if (isDefined(accept)) {
|
|
16365
16365
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16366
|
-
var _ref7 = _slicedToArray$
|
|
16366
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16367
16367
|
mimeType = _ref7[0],
|
|
16368
16368
|
ext = _ref7[1];
|
|
16369
16369
|
|
|
@@ -16431,40 +16431,40 @@ function isExt(v) {
|
|
|
16431
16431
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16432
16432
|
*/
|
|
16433
16433
|
|
|
16434
|
-
var _excluded$
|
|
16435
|
-
_excluded2$
|
|
16434
|
+
var _excluded$d = ["children"],
|
|
16435
|
+
_excluded2$3 = ["open"],
|
|
16436
16436
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16437
16437
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16438
16438
|
|
|
16439
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16439
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16440
16440
|
|
|
16441
16441
|
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."); }
|
|
16442
16442
|
|
|
16443
16443
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16444
16444
|
|
|
16445
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16445
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16446
16446
|
|
|
16447
|
-
function _slicedToArray$
|
|
16447
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16448
16448
|
|
|
16449
|
-
function _nonIterableRest$
|
|
16449
|
+
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."); }
|
|
16450
16450
|
|
|
16451
|
-
function _unsupportedIterableToArray$
|
|
16451
|
+
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); }
|
|
16452
16452
|
|
|
16453
|
-
function _arrayLikeToArray$
|
|
16453
|
+
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; }
|
|
16454
16454
|
|
|
16455
|
-
function _iterableToArrayLimit$
|
|
16455
|
+
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; }
|
|
16456
16456
|
|
|
16457
|
-
function _arrayWithHoles$
|
|
16457
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16458
16458
|
|
|
16459
|
-
function ownKeys$
|
|
16459
|
+
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; }
|
|
16460
16460
|
|
|
16461
|
-
function _objectSpread$
|
|
16461
|
+
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; }
|
|
16462
16462
|
|
|
16463
|
-
function _defineProperty$
|
|
16463
|
+
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; }
|
|
16464
16464
|
|
|
16465
|
-
function _objectWithoutProperties$
|
|
16465
|
+
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; }
|
|
16466
16466
|
|
|
16467
|
-
function _objectWithoutPropertiesLoose$
|
|
16467
|
+
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; }
|
|
16468
16468
|
/**
|
|
16469
16469
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16470
16470
|
*
|
|
@@ -16482,11 +16482,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16482
16482
|
|
|
16483
16483
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16484
16484
|
var children = _ref.children,
|
|
16485
|
-
params = _objectWithoutProperties$
|
|
16485
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16486
16486
|
|
|
16487
16487
|
var _useDropzone = useDropzone(params),
|
|
16488
16488
|
open = _useDropzone.open,
|
|
16489
|
-
props = _objectWithoutProperties$
|
|
16489
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16490
16490
|
|
|
16491
16491
|
React$3.useImperativeHandle(ref, function () {
|
|
16492
16492
|
return {
|
|
@@ -16494,13 +16494,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16494
16494
|
};
|
|
16495
16495
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16496
16496
|
|
|
16497
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16497
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16498
16498
|
open: open
|
|
16499
16499
|
})));
|
|
16500
16500
|
});
|
|
16501
16501
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16502
16502
|
|
|
16503
|
-
var defaultProps$
|
|
16503
|
+
var defaultProps$1 = {
|
|
16504
16504
|
disabled: false,
|
|
16505
16505
|
getFilesFromEvent: fromEvent,
|
|
16506
16506
|
maxSize: Infinity,
|
|
@@ -16516,7 +16516,7 @@ var defaultProps$2 = {
|
|
|
16516
16516
|
useFsAccessApi: true,
|
|
16517
16517
|
autoFocus: false
|
|
16518
16518
|
};
|
|
16519
|
-
Dropzone.defaultProps = defaultProps$
|
|
16519
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16520
16520
|
Dropzone.propTypes = {
|
|
16521
16521
|
/**
|
|
16522
16522
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16867,7 +16867,7 @@ var initialState = {
|
|
|
16867
16867
|
function useDropzone() {
|
|
16868
16868
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16869
16869
|
|
|
16870
|
-
var _defaultProps$props = _objectSpread$
|
|
16870
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16871
16871
|
accept = _defaultProps$props.accept,
|
|
16872
16872
|
disabled = _defaultProps$props.disabled,
|
|
16873
16873
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16914,7 +16914,7 @@ function useDropzone() {
|
|
|
16914
16914
|
var inputRef = React$3.useRef(null);
|
|
16915
16915
|
|
|
16916
16916
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
16917
|
-
_useReducer2 = _slicedToArray$
|
|
16917
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16918
16918
|
state = _useReducer2[0],
|
|
16919
16919
|
dispatch = _useReducer2[1];
|
|
16920
16920
|
|
|
@@ -17084,12 +17084,12 @@ function useDropzone() {
|
|
|
17084
17084
|
var fileRejections = [];
|
|
17085
17085
|
files.forEach(function (file) {
|
|
17086
17086
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17087
|
-
_fileAccepted2 = _slicedToArray$
|
|
17087
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17088
17088
|
accepted = _fileAccepted2[0],
|
|
17089
17089
|
acceptError = _fileAccepted2[1];
|
|
17090
17090
|
|
|
17091
17091
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17092
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17092
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17093
17093
|
sizeMatch = _fileMatchSize2[0],
|
|
17094
17094
|
sizeError = _fileMatchSize2[1];
|
|
17095
17095
|
|
|
@@ -17290,9 +17290,9 @@ function useDropzone() {
|
|
|
17290
17290
|
onDragOver = _ref2.onDragOver,
|
|
17291
17291
|
onDragLeave = _ref2.onDragLeave,
|
|
17292
17292
|
onDrop = _ref2.onDrop,
|
|
17293
|
-
rest = _objectWithoutProperties$
|
|
17293
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17294
17294
|
|
|
17295
|
-
return _objectSpread$
|
|
17295
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17296
17296
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17297
17297
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17298
17298
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17317,9 +17317,9 @@ function useDropzone() {
|
|
|
17317
17317
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17318
17318
|
onChange = _ref3.onChange,
|
|
17319
17319
|
onClick = _ref3.onClick,
|
|
17320
|
-
rest = _objectWithoutProperties$
|
|
17320
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17321
17321
|
|
|
17322
|
-
var inputProps = _defineProperty$
|
|
17322
|
+
var inputProps = _defineProperty$r({
|
|
17323
17323
|
accept: acceptAttr,
|
|
17324
17324
|
multiple: multiple,
|
|
17325
17325
|
type: "file",
|
|
@@ -17331,10 +17331,10 @@ function useDropzone() {
|
|
|
17331
17331
|
tabIndex: -1
|
|
17332
17332
|
}, refKey, inputRef);
|
|
17333
17333
|
|
|
17334
|
-
return _objectSpread$
|
|
17334
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17335
17335
|
};
|
|
17336
17336
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17337
|
-
return _objectSpread$
|
|
17337
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17338
17338
|
isFocused: isFocused && !disabled,
|
|
17339
17339
|
getRootProps: getRootProps,
|
|
17340
17340
|
getInputProps: getInputProps,
|
|
@@ -17353,40 +17353,40 @@ function reducer$1(state, action) {
|
|
|
17353
17353
|
/* istanbul ignore next */
|
|
17354
17354
|
switch (action.type) {
|
|
17355
17355
|
case "focus":
|
|
17356
|
-
return _objectSpread$
|
|
17356
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17357
17357
|
isFocused: true
|
|
17358
17358
|
});
|
|
17359
17359
|
|
|
17360
17360
|
case "blur":
|
|
17361
|
-
return _objectSpread$
|
|
17361
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17362
17362
|
isFocused: false
|
|
17363
17363
|
});
|
|
17364
17364
|
|
|
17365
17365
|
case "openDialog":
|
|
17366
|
-
return _objectSpread$
|
|
17366
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17367
17367
|
isFileDialogActive: true
|
|
17368
17368
|
});
|
|
17369
17369
|
|
|
17370
17370
|
case "closeDialog":
|
|
17371
|
-
return _objectSpread$
|
|
17371
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17372
17372
|
isFileDialogActive: false
|
|
17373
17373
|
});
|
|
17374
17374
|
|
|
17375
17375
|
case "setDraggedFiles":
|
|
17376
|
-
return _objectSpread$
|
|
17376
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17377
17377
|
isDragActive: action.isDragActive,
|
|
17378
17378
|
isDragAccept: action.isDragAccept,
|
|
17379
17379
|
isDragReject: action.isDragReject
|
|
17380
17380
|
});
|
|
17381
17381
|
|
|
17382
17382
|
case "setFiles":
|
|
17383
|
-
return _objectSpread$
|
|
17383
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17384
17384
|
acceptedFiles: action.acceptedFiles,
|
|
17385
17385
|
fileRejections: action.fileRejections
|
|
17386
17386
|
});
|
|
17387
17387
|
|
|
17388
17388
|
case "reset":
|
|
17389
|
-
return _objectSpread$
|
|
17389
|
+
return _objectSpread$p({}, initialState);
|
|
17390
17390
|
|
|
17391
17391
|
default:
|
|
17392
17392
|
return state;
|
|
@@ -19614,7 +19614,7 @@ function shallowEqual(a, b) {
|
|
|
19614
19614
|
return true;
|
|
19615
19615
|
}
|
|
19616
19616
|
|
|
19617
|
-
function _typeof$
|
|
19617
|
+
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); }
|
|
19618
19618
|
|
|
19619
19619
|
//
|
|
19620
19620
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19641,9 +19641,7 @@ var FilteredElementKeyMap = {
|
|
|
19641
19641
|
};
|
|
19642
19642
|
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'];
|
|
19643
19643
|
|
|
19644
|
-
|
|
19645
|
-
|
|
19646
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19644
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19647
19645
|
|
|
19648
19646
|
/** the offset of a chart, which define the blank space all around */
|
|
19649
19647
|
|
|
@@ -19679,7 +19677,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19679
19677
|
};
|
|
19680
19678
|
};
|
|
19681
19679
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19682
|
-
if (!isObject_1(props) || _typeof$
|
|
19680
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19683
19681
|
return null;
|
|
19684
19682
|
}
|
|
19685
19683
|
var out = null;
|
|
@@ -19693,11 +19691,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19693
19691
|
return out;
|
|
19694
19692
|
};
|
|
19695
19693
|
|
|
19696
|
-
var _excluded$
|
|
19697
|
-
_excluded2$
|
|
19698
|
-
function _objectWithoutProperties$
|
|
19699
|
-
function _objectWithoutPropertiesLoose$
|
|
19700
|
-
function _typeof$
|
|
19694
|
+
var _excluded$c = ["children"],
|
|
19695
|
+
_excluded2$2 = ["children"];
|
|
19696
|
+
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; }
|
|
19697
|
+
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; }
|
|
19698
|
+
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); }
|
|
19701
19699
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19702
19700
|
click: 'onClick',
|
|
19703
19701
|
mousedown: 'onMouseDown',
|
|
@@ -19804,7 +19802,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19804
19802
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19805
19803
|
};
|
|
19806
19804
|
var isDotProps = function isDotProps(dot) {
|
|
19807
|
-
return dot && _typeof$
|
|
19805
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19808
19806
|
};
|
|
19809
19807
|
|
|
19810
19808
|
/**
|
|
@@ -19896,10 +19894,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19896
19894
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19897
19895
|
var _ref = nextChild.props || {},
|
|
19898
19896
|
nextChildren = _ref.children,
|
|
19899
|
-
nextProps = _objectWithoutProperties$
|
|
19897
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19900
19898
|
var _ref2 = prevChild.props || {},
|
|
19901
19899
|
prevChildren = _ref2.children,
|
|
19902
|
-
prevProps = _objectWithoutProperties$
|
|
19900
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19903
19901
|
if (nextChildren && prevChildren) {
|
|
19904
19902
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19905
19903
|
}
|
|
@@ -19941,10 +19939,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19941
19939
|
return toArray(children).indexOf(child);
|
|
19942
19940
|
};
|
|
19943
19941
|
|
|
19944
|
-
var _excluded$
|
|
19942
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19945
19943
|
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); }
|
|
19946
|
-
function _objectWithoutProperties$
|
|
19947
|
-
function _objectWithoutPropertiesLoose$
|
|
19944
|
+
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; }
|
|
19945
|
+
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; }
|
|
19948
19946
|
function Surface(props) {
|
|
19949
19947
|
var children = props.children,
|
|
19950
19948
|
width = props.width,
|
|
@@ -19952,7 +19950,7 @@ function Surface(props) {
|
|
|
19952
19950
|
viewBox = props.viewBox,
|
|
19953
19951
|
className = props.className,
|
|
19954
19952
|
style = props.style,
|
|
19955
|
-
others = _objectWithoutProperties$
|
|
19953
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19956
19954
|
var svgView = viewBox || {
|
|
19957
19955
|
width: width,
|
|
19958
19956
|
height: height,
|
|
@@ -19969,14 +19967,14 @@ function Surface(props) {
|
|
|
19969
19967
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
19970
19968
|
}
|
|
19971
19969
|
|
|
19972
|
-
var _excluded$
|
|
19970
|
+
var _excluded$a = ["children", "className"];
|
|
19973
19971
|
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); }
|
|
19974
|
-
function _objectWithoutProperties$
|
|
19975
|
-
function _objectWithoutPropertiesLoose$
|
|
19972
|
+
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; }
|
|
19973
|
+
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; }
|
|
19976
19974
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
19977
19975
|
var children = props.children,
|
|
19978
19976
|
className = props.className,
|
|
19979
|
-
others = _objectWithoutProperties$
|
|
19977
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19980
19978
|
var layerClass = classNames('recharts-layer', className);
|
|
19981
19979
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
19982
19980
|
className: layerClass
|
|
@@ -23391,16 +23389,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23391
23389
|
stackOffsetNone(series, order);
|
|
23392
23390
|
}
|
|
23393
23391
|
|
|
23394
|
-
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); }
|
|
23395
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23396
23392
|
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); }
|
|
23397
|
-
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; }
|
|
23398
|
-
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; }
|
|
23399
|
-
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; }
|
|
23400
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23401
|
-
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); }
|
|
23402
|
-
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; }
|
|
23403
|
-
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; }
|
|
23404
23393
|
var symbolFactories = {
|
|
23405
23394
|
symbolCircle: symbolCircle,
|
|
23406
23395
|
symbolCross: symbolCross,
|
|
@@ -23439,35 +23428,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23439
23428
|
return Math.PI * size * size / 4;
|
|
23440
23429
|
}
|
|
23441
23430
|
};
|
|
23431
|
+
var symbolsDefaultProps = {
|
|
23432
|
+
type: 'circle',
|
|
23433
|
+
size: 64,
|
|
23434
|
+
sizeType: 'area'
|
|
23435
|
+
};
|
|
23442
23436
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23443
23437
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23444
23438
|
};
|
|
23445
|
-
var Symbols = function Symbols(
|
|
23446
|
-
var _ref$type = _ref.type,
|
|
23447
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23448
|
-
_ref$size = _ref.size,
|
|
23449
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23450
|
-
_ref$sizeType = _ref.sizeType,
|
|
23451
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23452
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23453
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23454
|
-
type: type,
|
|
23455
|
-
size: size,
|
|
23456
|
-
sizeType: sizeType
|
|
23457
|
-
});
|
|
23458
|
-
|
|
23439
|
+
var Symbols = function Symbols(props) {
|
|
23459
23440
|
/**
|
|
23460
23441
|
* Calculate the path of curve
|
|
23461
23442
|
* @return {String} path
|
|
23462
23443
|
*/
|
|
23463
23444
|
var getPath = function getPath() {
|
|
23445
|
+
var size = props.size,
|
|
23446
|
+
sizeType = props.sizeType,
|
|
23447
|
+
type = props.type;
|
|
23464
23448
|
var symbolFactory = getSymbolFactory(type);
|
|
23465
23449
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23466
23450
|
return symbol();
|
|
23467
23451
|
};
|
|
23468
23452
|
var className = props.className,
|
|
23469
23453
|
cx = props.cx,
|
|
23470
|
-
cy = props.cy
|
|
23454
|
+
cy = props.cy,
|
|
23455
|
+
size = props.size;
|
|
23471
23456
|
var filteredProps = filterProps(props, true);
|
|
23472
23457
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23473
23458
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23478,34 +23463,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23478
23463
|
}
|
|
23479
23464
|
return null;
|
|
23480
23465
|
};
|
|
23466
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23481
23467
|
Symbols.registerSymbol = registerSymbol;
|
|
23482
23468
|
|
|
23483
|
-
function _typeof$
|
|
23469
|
+
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); }
|
|
23484
23470
|
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); }
|
|
23485
|
-
function ownKeys$
|
|
23486
|
-
function _objectSpread$
|
|
23487
|
-
function _classCallCheck$
|
|
23488
|
-
function _defineProperties$
|
|
23489
|
-
function _createClass$
|
|
23490
|
-
function _inherits$
|
|
23491
|
-
function _setPrototypeOf$
|
|
23492
|
-
function _createSuper$
|
|
23493
|
-
function _possibleConstructorReturn$
|
|
23494
|
-
function _assertThisInitialized$
|
|
23495
|
-
function _isNativeReflectConstruct$
|
|
23496
|
-
function _getPrototypeOf$
|
|
23497
|
-
function _defineProperty$
|
|
23498
|
-
function _toPropertyKey$
|
|
23499
|
-
function _toPrimitive$
|
|
23471
|
+
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; }
|
|
23472
|
+
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; }
|
|
23473
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23474
|
+
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); } }
|
|
23475
|
+
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; }
|
|
23476
|
+
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); }
|
|
23477
|
+
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); }
|
|
23478
|
+
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); }; }
|
|
23479
|
+
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); }
|
|
23480
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23481
|
+
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; } }
|
|
23482
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23483
|
+
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; }
|
|
23484
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23485
|
+
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); }
|
|
23500
23486
|
var SIZE = 32;
|
|
23501
23487
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23502
|
-
_inherits$
|
|
23503
|
-
var _super = _createSuper$
|
|
23488
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23489
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23504
23490
|
function DefaultLegendContent() {
|
|
23505
|
-
_classCallCheck$
|
|
23491
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23506
23492
|
return _super.apply(this, arguments);
|
|
23507
23493
|
}
|
|
23508
|
-
_createClass$
|
|
23494
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23509
23495
|
key: "renderIcon",
|
|
23510
23496
|
value:
|
|
23511
23497
|
/**
|
|
@@ -23550,7 +23536,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23550
23536
|
});
|
|
23551
23537
|
}
|
|
23552
23538
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23553
|
-
var iconProps = _objectSpread$
|
|
23539
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23554
23540
|
delete iconProps.legendIcon;
|
|
23555
23541
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23556
23542
|
}
|
|
@@ -23598,7 +23584,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23598
23584
|
var finalFormatter = entry.formatter || formatter;
|
|
23599
23585
|
var className = classNames((_classNames = {
|
|
23600
23586
|
'recharts-legend-item': true
|
|
23601
|
-
}, _defineProperty$
|
|
23587
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23602
23588
|
if (entry.type === 'none') {
|
|
23603
23589
|
return null;
|
|
23604
23590
|
}
|
|
@@ -23643,8 +23629,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23643
23629
|
}]);
|
|
23644
23630
|
return DefaultLegendContent;
|
|
23645
23631
|
}(React$3.PureComponent);
|
|
23646
|
-
_defineProperty$
|
|
23647
|
-
_defineProperty$
|
|
23632
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23633
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23648
23634
|
iconSize: 14,
|
|
23649
23635
|
layout: 'horizontal',
|
|
23650
23636
|
align: 'center',
|
|
@@ -23652,25 +23638,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23652
23638
|
inactiveColor: '#ccc'
|
|
23653
23639
|
});
|
|
23654
23640
|
|
|
23655
|
-
function _typeof$
|
|
23656
|
-
var _excluded$
|
|
23657
|
-
function ownKeys$
|
|
23658
|
-
function _objectSpread$
|
|
23659
|
-
function _classCallCheck$
|
|
23660
|
-
function _defineProperties$
|
|
23661
|
-
function _createClass$
|
|
23662
|
-
function _inherits$
|
|
23663
|
-
function _setPrototypeOf$
|
|
23664
|
-
function _createSuper$
|
|
23665
|
-
function _possibleConstructorReturn$
|
|
23666
|
-
function _assertThisInitialized$
|
|
23667
|
-
function _isNativeReflectConstruct$
|
|
23668
|
-
function _getPrototypeOf$
|
|
23669
|
-
function _defineProperty$
|
|
23670
|
-
function _toPropertyKey$
|
|
23671
|
-
function _toPrimitive$
|
|
23672
|
-
function _objectWithoutProperties$
|
|
23673
|
-
function _objectWithoutPropertiesLoose$
|
|
23641
|
+
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); }
|
|
23642
|
+
var _excluded$9 = ["ref"];
|
|
23643
|
+
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; }
|
|
23644
|
+
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; }
|
|
23645
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23646
|
+
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); } }
|
|
23647
|
+
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; }
|
|
23648
|
+
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); }
|
|
23649
|
+
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); }
|
|
23650
|
+
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); }; }
|
|
23651
|
+
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); }
|
|
23652
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23653
|
+
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; } }
|
|
23654
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23655
|
+
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; }
|
|
23656
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23657
|
+
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); }
|
|
23658
|
+
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; }
|
|
23659
|
+
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; }
|
|
23674
23660
|
function defaultUniqBy$1(entry) {
|
|
23675
23661
|
return entry.value;
|
|
23676
23662
|
}
|
|
@@ -23691,27 +23677,27 @@ function renderContent$1(content, props) {
|
|
|
23691
23677
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23692
23678
|
}
|
|
23693
23679
|
props.ref;
|
|
23694
|
-
var otherProps = _objectWithoutProperties$
|
|
23680
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23695
23681
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23696
23682
|
}
|
|
23697
23683
|
var EPS$2 = 1;
|
|
23698
23684
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23699
|
-
_inherits$
|
|
23700
|
-
var _super = _createSuper$
|
|
23685
|
+
_inherits$7(Legend, _PureComponent);
|
|
23686
|
+
var _super = _createSuper$7(Legend);
|
|
23701
23687
|
function Legend() {
|
|
23702
23688
|
var _this;
|
|
23703
|
-
_classCallCheck$
|
|
23689
|
+
_classCallCheck$9(this, Legend);
|
|
23704
23690
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23705
23691
|
args[_key] = arguments[_key];
|
|
23706
23692
|
}
|
|
23707
23693
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23708
|
-
_defineProperty$
|
|
23694
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23709
23695
|
boxWidth: -1,
|
|
23710
23696
|
boxHeight: -1
|
|
23711
23697
|
});
|
|
23712
23698
|
return _this;
|
|
23713
23699
|
}
|
|
23714
|
-
_createClass$
|
|
23700
|
+
_createClass$9(Legend, [{
|
|
23715
23701
|
key: "componentDidMount",
|
|
23716
23702
|
value: function componentDidMount() {
|
|
23717
23703
|
this.updateBBox();
|
|
@@ -23786,7 +23772,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23786
23772
|
};
|
|
23787
23773
|
}
|
|
23788
23774
|
}
|
|
23789
|
-
return _objectSpread$
|
|
23775
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23790
23776
|
}
|
|
23791
23777
|
}, {
|
|
23792
23778
|
key: "updateBBox",
|
|
@@ -23829,7 +23815,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23829
23815
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23830
23816
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23831
23817
|
payload = _this$props2.payload;
|
|
23832
|
-
var outerStyle = _objectSpread$
|
|
23818
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23833
23819
|
position: 'absolute',
|
|
23834
23820
|
width: width || 'auto',
|
|
23835
23821
|
height: height || 'auto'
|
|
@@ -23840,7 +23826,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23840
23826
|
ref: function ref(node) {
|
|
23841
23827
|
_this2.wrapperNode = node;
|
|
23842
23828
|
}
|
|
23843
|
-
}, renderContent$1(content, _objectSpread$
|
|
23829
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23844
23830
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23845
23831
|
})));
|
|
23846
23832
|
}
|
|
@@ -23863,8 +23849,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23863
23849
|
}]);
|
|
23864
23850
|
return Legend;
|
|
23865
23851
|
}(React$3.PureComponent);
|
|
23866
|
-
_defineProperty$
|
|
23867
|
-
_defineProperty$
|
|
23852
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23853
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23868
23854
|
iconSize: 14,
|
|
23869
23855
|
layout: 'horizontal',
|
|
23870
23856
|
align: 'center',
|
|
@@ -24428,13 +24414,13 @@ function setRafTimeout(callback) {
|
|
|
24428
24414
|
requestAnimationFrame(shouldUpdate);
|
|
24429
24415
|
}
|
|
24430
24416
|
|
|
24431
|
-
function _typeof$
|
|
24432
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24433
|
-
function _nonIterableRest$
|
|
24434
|
-
function _unsupportedIterableToArray$
|
|
24435
|
-
function _arrayLikeToArray$
|
|
24417
|
+
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); }
|
|
24418
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24419
|
+
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."); }
|
|
24420
|
+
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); }
|
|
24421
|
+
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; }
|
|
24436
24422
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24437
|
-
function _arrayWithHoles$
|
|
24423
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24438
24424
|
function createAnimateManager() {
|
|
24439
24425
|
var currStyle = {};
|
|
24440
24426
|
var handleChange = function handleChange() {
|
|
@@ -24461,7 +24447,7 @@ function createAnimateManager() {
|
|
|
24461
24447
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24462
24448
|
return;
|
|
24463
24449
|
}
|
|
24464
|
-
if (_typeof$
|
|
24450
|
+
if (_typeof$o(_style) === 'object') {
|
|
24465
24451
|
currStyle = _style;
|
|
24466
24452
|
handleChange(currStyle);
|
|
24467
24453
|
}
|
|
@@ -24488,12 +24474,12 @@ function createAnimateManager() {
|
|
|
24488
24474
|
};
|
|
24489
24475
|
}
|
|
24490
24476
|
|
|
24491
|
-
function _typeof$
|
|
24492
|
-
function ownKeys$
|
|
24493
|
-
function _objectSpread$
|
|
24494
|
-
function _defineProperty$
|
|
24495
|
-
function _toPropertyKey$
|
|
24496
|
-
function _toPrimitive$
|
|
24477
|
+
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); }
|
|
24478
|
+
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; }
|
|
24479
|
+
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; }
|
|
24480
|
+
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; }
|
|
24481
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24482
|
+
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); }
|
|
24497
24483
|
/* eslint no-console: 0 */
|
|
24498
24484
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24499
24485
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24525,7 +24511,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24525
24511
|
*/
|
|
24526
24512
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24527
24513
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24528
|
-
return _defineProperty$
|
|
24514
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24529
24515
|
}
|
|
24530
24516
|
var isTransition = name === 'transition';
|
|
24531
24517
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24536,7 +24522,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24536
24522
|
if (isTransition) {
|
|
24537
24523
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24538
24524
|
}
|
|
24539
|
-
return _objectSpread$
|
|
24525
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24540
24526
|
}, {});
|
|
24541
24527
|
};
|
|
24542
24528
|
|
|
@@ -24546,7 +24532,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24546
24532
|
*/
|
|
24547
24533
|
var mapObject = function mapObject(fn, obj) {
|
|
24548
24534
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24549
|
-
return _objectSpread$
|
|
24535
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24550
24536
|
}, {});
|
|
24551
24537
|
};
|
|
24552
24538
|
|
|
@@ -24556,7 +24542,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24556
24542
|
*/
|
|
24557
24543
|
var translateStyle = function translateStyle(style) {
|
|
24558
24544
|
return Object.keys(style).reduce(function (res, key) {
|
|
24559
|
-
return _objectSpread$
|
|
24545
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24560
24546
|
}, style);
|
|
24561
24547
|
};
|
|
24562
24548
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24584,16 +24570,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24584
24570
|
}
|
|
24585
24571
|
};
|
|
24586
24572
|
|
|
24587
|
-
function _slicedToArray$
|
|
24588
|
-
function _nonIterableRest$
|
|
24589
|
-
function _iterableToArrayLimit$
|
|
24590
|
-
function _arrayWithHoles$
|
|
24591
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24573
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24574
|
+
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."); }
|
|
24575
|
+
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; } }
|
|
24576
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24577
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24592
24578
|
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."); }
|
|
24593
|
-
function _unsupportedIterableToArray$
|
|
24579
|
+
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); }
|
|
24594
24580
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24595
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24596
|
-
function _arrayLikeToArray$
|
|
24581
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24582
|
+
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; }
|
|
24597
24583
|
var ACCURACY = 1e-4;
|
|
24598
24584
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24599
24585
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24669,7 +24655,7 @@ var configBezier = function configBezier() {
|
|
|
24669
24655
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24670
24656
|
return parseFloat(x);
|
|
24671
24657
|
});
|
|
24672
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24658
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24673
24659
|
x1 = _easing$1$split$0$spl2[0];
|
|
24674
24660
|
y1 = _easing$1$split$0$spl2[1];
|
|
24675
24661
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24762,22 +24748,22 @@ var configEasing = function configEasing() {
|
|
|
24762
24748
|
return null;
|
|
24763
24749
|
};
|
|
24764
24750
|
|
|
24765
|
-
function _typeof$
|
|
24766
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24751
|
+
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); }
|
|
24752
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24767
24753
|
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."); }
|
|
24768
24754
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24769
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24770
|
-
function ownKeys$
|
|
24771
|
-
function _objectSpread$
|
|
24772
|
-
function _defineProperty$
|
|
24773
|
-
function _toPropertyKey$
|
|
24774
|
-
function _toPrimitive$
|
|
24775
|
-
function _slicedToArray$
|
|
24776
|
-
function _nonIterableRest$
|
|
24777
|
-
function _unsupportedIterableToArray$
|
|
24778
|
-
function _arrayLikeToArray$
|
|
24779
|
-
function _iterableToArrayLimit$
|
|
24780
|
-
function _arrayWithHoles$
|
|
24755
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24756
|
+
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; }
|
|
24757
|
+
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; }
|
|
24758
|
+
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; }
|
|
24759
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24760
|
+
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); }
|
|
24761
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24762
|
+
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."); }
|
|
24763
|
+
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); }
|
|
24764
|
+
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; }
|
|
24765
|
+
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; } }
|
|
24766
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24781
24767
|
var alpha = function alpha(begin, end, k) {
|
|
24782
24768
|
return begin + (end - begin) * k;
|
|
24783
24769
|
};
|
|
@@ -24795,10 +24781,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24795
24781
|
var nextStepVals = mapObject(function (key, val) {
|
|
24796
24782
|
if (needContinue(val)) {
|
|
24797
24783
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24798
|
-
_easing2 = _slicedToArray$
|
|
24784
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24799
24785
|
newX = _easing2[0],
|
|
24800
24786
|
newV = _easing2[1];
|
|
24801
|
-
return _objectSpread$
|
|
24787
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24802
24788
|
from: newX,
|
|
24803
24789
|
velocity: newV
|
|
24804
24790
|
});
|
|
@@ -24808,7 +24794,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24808
24794
|
if (steps < 1) {
|
|
24809
24795
|
return mapObject(function (key, val) {
|
|
24810
24796
|
if (needContinue(val)) {
|
|
24811
|
-
return _objectSpread$
|
|
24797
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24812
24798
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24813
24799
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24814
24800
|
});
|
|
@@ -24823,10 +24809,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24823
24809
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24824
24810
|
var interKeys = getIntersectionKeys(from, to);
|
|
24825
24811
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24826
|
-
return _objectSpread$
|
|
24812
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24827
24813
|
}, {});
|
|
24828
24814
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24829
|
-
return _objectSpread$
|
|
24815
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24830
24816
|
from: from[key],
|
|
24831
24817
|
velocity: 0,
|
|
24832
24818
|
to: to[key]
|
|
@@ -24856,7 +24842,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24856
24842
|
var steps = deltaTime / easing.dt;
|
|
24857
24843
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24858
24844
|
// get union set and add compatible prefix
|
|
24859
|
-
render(_objectSpread$
|
|
24845
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24860
24846
|
preTime = now;
|
|
24861
24847
|
if (!shouldStopAnimation()) {
|
|
24862
24848
|
cafId = requestAnimationFrame(update);
|
|
@@ -24874,14 +24860,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24874
24860
|
}, timingStyle);
|
|
24875
24861
|
|
|
24876
24862
|
// get union set and add compatible prefix
|
|
24877
|
-
render(_objectSpread$
|
|
24863
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24878
24864
|
if (t < 1) {
|
|
24879
24865
|
cafId = requestAnimationFrame(update);
|
|
24880
24866
|
} else {
|
|
24881
24867
|
var finalStyle = mapObject(function (key, val) {
|
|
24882
24868
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24883
24869
|
}, timingStyle);
|
|
24884
|
-
render(_objectSpread$
|
|
24870
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24885
24871
|
}
|
|
24886
24872
|
};
|
|
24887
24873
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24897,37 +24883,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24897
24883
|
};
|
|
24898
24884
|
});
|
|
24899
24885
|
|
|
24900
|
-
function _typeof$
|
|
24901
|
-
var _excluded$
|
|
24902
|
-
function _objectWithoutProperties$
|
|
24903
|
-
function _objectWithoutPropertiesLoose$
|
|
24904
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24886
|
+
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); }
|
|
24887
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24888
|
+
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; }
|
|
24889
|
+
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; }
|
|
24890
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24905
24891
|
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."); }
|
|
24906
|
-
function _unsupportedIterableToArray$
|
|
24892
|
+
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); }
|
|
24907
24893
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24908
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24909
|
-
function _arrayLikeToArray$
|
|
24910
|
-
function ownKeys$
|
|
24911
|
-
function _objectSpread$
|
|
24912
|
-
function _defineProperty$
|
|
24913
|
-
function _classCallCheck$
|
|
24914
|
-
function _defineProperties$
|
|
24915
|
-
function _createClass$
|
|
24916
|
-
function _toPropertyKey$
|
|
24917
|
-
function _toPrimitive$
|
|
24918
|
-
function _inherits$
|
|
24919
|
-
function _setPrototypeOf$
|
|
24920
|
-
function _createSuper$
|
|
24921
|
-
function _possibleConstructorReturn$
|
|
24922
|
-
function _assertThisInitialized$
|
|
24923
|
-
function _isNativeReflectConstruct$
|
|
24924
|
-
function _getPrototypeOf$
|
|
24894
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24895
|
+
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; }
|
|
24896
|
+
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; }
|
|
24897
|
+
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; }
|
|
24898
|
+
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; }
|
|
24899
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24900
|
+
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); } }
|
|
24901
|
+
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; }
|
|
24902
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24903
|
+
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); }
|
|
24904
|
+
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); }
|
|
24905
|
+
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); }
|
|
24906
|
+
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); }; }
|
|
24907
|
+
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); }
|
|
24908
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24909
|
+
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; } }
|
|
24910
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24925
24911
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24926
|
-
_inherits$
|
|
24927
|
-
var _super = _createSuper$
|
|
24912
|
+
_inherits$6(Animate, _PureComponent);
|
|
24913
|
+
var _super = _createSuper$6(Animate);
|
|
24928
24914
|
function Animate(props, context) {
|
|
24929
24915
|
var _this;
|
|
24930
|
-
_classCallCheck$
|
|
24916
|
+
_classCallCheck$8(this, Animate);
|
|
24931
24917
|
_this = _super.call(this, props, context);
|
|
24932
24918
|
var _this$props = _this.props,
|
|
24933
24919
|
isActive = _this$props.isActive,
|
|
@@ -24937,8 +24923,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24937
24923
|
steps = _this$props.steps,
|
|
24938
24924
|
children = _this$props.children,
|
|
24939
24925
|
duration = _this$props.duration;
|
|
24940
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24941
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24926
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24927
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24942
24928
|
if (!isActive || duration <= 0) {
|
|
24943
24929
|
_this.state = {
|
|
24944
24930
|
style: {}
|
|
@@ -24950,7 +24936,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24950
24936
|
style: to
|
|
24951
24937
|
};
|
|
24952
24938
|
}
|
|
24953
|
-
return _possibleConstructorReturn$
|
|
24939
|
+
return _possibleConstructorReturn$6(_this);
|
|
24954
24940
|
}
|
|
24955
24941
|
if (steps && steps.length) {
|
|
24956
24942
|
_this.state = {
|
|
@@ -24961,10 +24947,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24961
24947
|
_this.state = {
|
|
24962
24948
|
style: from
|
|
24963
24949
|
};
|
|
24964
|
-
return _possibleConstructorReturn$
|
|
24950
|
+
return _possibleConstructorReturn$6(_this);
|
|
24965
24951
|
}
|
|
24966
24952
|
_this.state = {
|
|
24967
|
-
style: attributeName ? _defineProperty$
|
|
24953
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24968
24954
|
};
|
|
24969
24955
|
} else {
|
|
24970
24956
|
_this.state = {
|
|
@@ -24973,7 +24959,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24973
24959
|
}
|
|
24974
24960
|
return _this;
|
|
24975
24961
|
}
|
|
24976
|
-
_createClass$
|
|
24962
|
+
_createClass$8(Animate, [{
|
|
24977
24963
|
key: "componentDidMount",
|
|
24978
24964
|
value: function componentDidMount() {
|
|
24979
24965
|
var _this$props2 = this.props,
|
|
@@ -25001,7 +24987,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25001
24987
|
}
|
|
25002
24988
|
if (!isActive) {
|
|
25003
24989
|
var newState = {
|
|
25004
|
-
style: attributeName ? _defineProperty$
|
|
24990
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
25005
24991
|
};
|
|
25006
24992
|
if (this.state && style) {
|
|
25007
24993
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25024,14 +25010,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25024
25010
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25025
25011
|
if (this.state && style) {
|
|
25026
25012
|
var _newState = {
|
|
25027
|
-
style: attributeName ? _defineProperty$
|
|
25013
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25028
25014
|
};
|
|
25029
25015
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25030
25016
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25031
25017
|
this.setState(_newState);
|
|
25032
25018
|
}
|
|
25033
25019
|
}
|
|
25034
|
-
this.runAnimation(_objectSpread$
|
|
25020
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
25035
25021
|
from: from,
|
|
25036
25022
|
begin: 0
|
|
25037
25023
|
}));
|
|
@@ -25114,7 +25100,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25114
25100
|
}), duration]);
|
|
25115
25101
|
}
|
|
25116
25102
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25117
|
-
var newStyle = _objectSpread$
|
|
25103
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25118
25104
|
transition: transition
|
|
25119
25105
|
});
|
|
25120
25106
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25146,9 +25132,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25146
25132
|
this.runStepAnimation(props);
|
|
25147
25133
|
return;
|
|
25148
25134
|
}
|
|
25149
|
-
var to = attributeName ? _defineProperty$
|
|
25135
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25150
25136
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25151
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25137
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25152
25138
|
transition: transition
|
|
25153
25139
|
}), duration, onAnimationEnd]);
|
|
25154
25140
|
}
|
|
@@ -25169,7 +25155,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25169
25155
|
_this$props4.onAnimationEnd;
|
|
25170
25156
|
_this$props4.shouldReAnimate;
|
|
25171
25157
|
_this$props4.onAnimationReStart;
|
|
25172
|
-
var others = _objectWithoutProperties$
|
|
25158
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25173
25159
|
var count = React$3.Children.count(children);
|
|
25174
25160
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25175
25161
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25184,8 +25170,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25184
25170
|
_container$props$styl = _container$props.style,
|
|
25185
25171
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25186
25172
|
className = _container$props.className;
|
|
25187
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25188
|
-
style: _objectSpread$
|
|
25173
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25174
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25189
25175
|
className: className
|
|
25190
25176
|
}));
|
|
25191
25177
|
return res;
|
|
@@ -25710,10 +25696,10 @@ var defineProperty$2 = (function() {
|
|
|
25710
25696
|
} catch (e) {}
|
|
25711
25697
|
}());
|
|
25712
25698
|
|
|
25713
|
-
var _defineProperty$
|
|
25699
|
+
var _defineProperty$l = defineProperty$2;
|
|
25714
25700
|
|
|
25715
25701
|
var constant$1 = constant_1,
|
|
25716
|
-
defineProperty$1 = _defineProperty$
|
|
25702
|
+
defineProperty$1 = _defineProperty$l,
|
|
25717
25703
|
identity$7 = identity_1;
|
|
25718
25704
|
|
|
25719
25705
|
/**
|
|
@@ -25890,18 +25876,18 @@ var sortBy_1 = sortBy;
|
|
|
25890
25876
|
/**
|
|
25891
25877
|
* @fileOverview Default Tooltip Content
|
|
25892
25878
|
*/
|
|
25893
|
-
function _typeof$
|
|
25894
|
-
function _slicedToArray$
|
|
25895
|
-
function _nonIterableRest$
|
|
25896
|
-
function _unsupportedIterableToArray$
|
|
25897
|
-
function _arrayLikeToArray$
|
|
25898
|
-
function _iterableToArrayLimit$
|
|
25899
|
-
function _arrayWithHoles$
|
|
25900
|
-
function ownKeys$
|
|
25901
|
-
function _objectSpread$
|
|
25902
|
-
function _defineProperty$
|
|
25903
|
-
function _toPropertyKey$
|
|
25904
|
-
function _toPrimitive$
|
|
25879
|
+
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); }
|
|
25880
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25881
|
+
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."); }
|
|
25882
|
+
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); }
|
|
25883
|
+
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; }
|
|
25884
|
+
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; } }
|
|
25885
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25886
|
+
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; }
|
|
25887
|
+
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; }
|
|
25888
|
+
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; }
|
|
25889
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25890
|
+
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); }
|
|
25905
25891
|
function defaultFormatter(value) {
|
|
25906
25892
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25907
25893
|
}
|
|
@@ -25931,7 +25917,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25931
25917
|
if (entry.type === 'none') {
|
|
25932
25918
|
return null;
|
|
25933
25919
|
}
|
|
25934
|
-
var finalItemStyle = _objectSpread$
|
|
25920
|
+
var finalItemStyle = _objectSpread$j({
|
|
25935
25921
|
display: 'block',
|
|
25936
25922
|
paddingTop: 4,
|
|
25937
25923
|
paddingBottom: 4,
|
|
@@ -25945,7 +25931,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25945
25931
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25946
25932
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25947
25933
|
if (Array.isArray(formatted)) {
|
|
25948
|
-
var _formatted = _slicedToArray$
|
|
25934
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25949
25935
|
finalValue = _formatted[0];
|
|
25950
25936
|
finalName = _formatted[1];
|
|
25951
25937
|
} else {
|
|
@@ -25977,14 +25963,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25977
25963
|
}
|
|
25978
25964
|
return null;
|
|
25979
25965
|
};
|
|
25980
|
-
var finalStyle = _objectSpread$
|
|
25966
|
+
var finalStyle = _objectSpread$j({
|
|
25981
25967
|
margin: 0,
|
|
25982
25968
|
padding: 10,
|
|
25983
25969
|
backgroundColor: '#fff',
|
|
25984
25970
|
border: '1px solid #ccc',
|
|
25985
25971
|
whiteSpace: 'nowrap'
|
|
25986
25972
|
}, contentStyle);
|
|
25987
|
-
var finalLabelStyle = _objectSpread$
|
|
25973
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25988
25974
|
margin: 0
|
|
25989
25975
|
}, labelStyle);
|
|
25990
25976
|
var hasLabel = !isNil_1(label);
|
|
@@ -26025,22 +26011,18 @@ var Global = {
|
|
|
26025
26011
|
}
|
|
26026
26012
|
};
|
|
26027
26013
|
|
|
26028
|
-
function _typeof$
|
|
26029
|
-
function ownKeys$
|
|
26030
|
-
function _objectSpread$
|
|
26031
|
-
function
|
|
26032
|
-
function
|
|
26033
|
-
function
|
|
26034
|
-
function
|
|
26035
|
-
function
|
|
26036
|
-
function
|
|
26037
|
-
function
|
|
26038
|
-
function
|
|
26039
|
-
function
|
|
26040
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26041
|
-
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; }
|
|
26042
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26043
|
-
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); }
|
|
26014
|
+
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); }
|
|
26015
|
+
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; }
|
|
26016
|
+
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; }
|
|
26017
|
+
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; }
|
|
26018
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
26019
|
+
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); }
|
|
26020
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26021
|
+
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."); }
|
|
26022
|
+
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); }
|
|
26023
|
+
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; }
|
|
26024
|
+
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; } }
|
|
26025
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26044
26026
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26045
26027
|
var EPS$1 = 1;
|
|
26046
26028
|
function defaultUniqBy(entry) {
|
|
@@ -26064,204 +26046,7 @@ function renderContent(content, props) {
|
|
|
26064
26046
|
}
|
|
26065
26047
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26066
26048
|
}
|
|
26067
|
-
var
|
|
26068
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26069
|
-
var _super = _createSuper$6(Tooltip);
|
|
26070
|
-
function Tooltip() {
|
|
26071
|
-
var _this;
|
|
26072
|
-
_classCallCheck$8(this, Tooltip);
|
|
26073
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26074
|
-
args[_key] = arguments[_key];
|
|
26075
|
-
}
|
|
26076
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26077
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26078
|
-
boxWidth: -1,
|
|
26079
|
-
boxHeight: -1,
|
|
26080
|
-
dismissed: false,
|
|
26081
|
-
dismissedAtCoordinate: {
|
|
26082
|
-
x: 0,
|
|
26083
|
-
y: 0
|
|
26084
|
-
}
|
|
26085
|
-
});
|
|
26086
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26087
|
-
if (event.key === 'Escape') {
|
|
26088
|
-
_this.setState({
|
|
26089
|
-
dismissed: true,
|
|
26090
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26091
|
-
x: _this.props.coordinate.x,
|
|
26092
|
-
y: _this.props.coordinate.y
|
|
26093
|
-
})
|
|
26094
|
-
});
|
|
26095
|
-
}
|
|
26096
|
-
});
|
|
26097
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26098
|
-
var key = _ref.key,
|
|
26099
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26100
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26101
|
-
var _this$props = _this.props,
|
|
26102
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26103
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26104
|
-
coordinate = _this$props.coordinate,
|
|
26105
|
-
offset = _this$props.offset,
|
|
26106
|
-
position = _this$props.position,
|
|
26107
|
-
viewBox = _this$props.viewBox;
|
|
26108
|
-
if (position && isNumber(position[key])) {
|
|
26109
|
-
return position[key];
|
|
26110
|
-
}
|
|
26111
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26112
|
-
var positive = coordinate[key] + offset;
|
|
26113
|
-
if (allowEscapeViewBox[key]) {
|
|
26114
|
-
return reverseDirection[key] ? negative : positive;
|
|
26115
|
-
}
|
|
26116
|
-
if (reverseDirection[key]) {
|
|
26117
|
-
var _tooltipBoundary = negative;
|
|
26118
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26119
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26120
|
-
return Math.max(positive, viewBox[key]);
|
|
26121
|
-
}
|
|
26122
|
-
return Math.max(negative, viewBox[key]);
|
|
26123
|
-
}
|
|
26124
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26125
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26126
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26127
|
-
return Math.max(negative, viewBox[key]);
|
|
26128
|
-
}
|
|
26129
|
-
return Math.max(positive, viewBox[key]);
|
|
26130
|
-
});
|
|
26131
|
-
return _this;
|
|
26132
|
-
}
|
|
26133
|
-
_createClass$8(Tooltip, [{
|
|
26134
|
-
key: "componentDidMount",
|
|
26135
|
-
value: function componentDidMount() {
|
|
26136
|
-
this.updateBBox();
|
|
26137
|
-
}
|
|
26138
|
-
}, {
|
|
26139
|
-
key: "componentWillUnmount",
|
|
26140
|
-
value: function componentWillUnmount() {
|
|
26141
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26142
|
-
}
|
|
26143
|
-
}, {
|
|
26144
|
-
key: "componentDidUpdate",
|
|
26145
|
-
value: function componentDidUpdate() {
|
|
26146
|
-
this.updateBBox();
|
|
26147
|
-
}
|
|
26148
|
-
}, {
|
|
26149
|
-
key: "updateBBox",
|
|
26150
|
-
value: function updateBBox() {
|
|
26151
|
-
var _this$state = this.state,
|
|
26152
|
-
boxWidth = _this$state.boxWidth,
|
|
26153
|
-
boxHeight = _this$state.boxHeight,
|
|
26154
|
-
dismissed = _this$state.dismissed;
|
|
26155
|
-
if (dismissed) {
|
|
26156
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26157
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26158
|
-
this.setState({
|
|
26159
|
-
dismissed: false
|
|
26160
|
-
});
|
|
26161
|
-
}
|
|
26162
|
-
} else {
|
|
26163
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26164
|
-
}
|
|
26165
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26166
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26167
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26168
|
-
this.setState({
|
|
26169
|
-
boxWidth: box.width,
|
|
26170
|
-
boxHeight: box.height
|
|
26171
|
-
});
|
|
26172
|
-
}
|
|
26173
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26174
|
-
this.setState({
|
|
26175
|
-
boxWidth: -1,
|
|
26176
|
-
boxHeight: -1
|
|
26177
|
-
});
|
|
26178
|
-
}
|
|
26179
|
-
}
|
|
26180
|
-
}, {
|
|
26181
|
-
key: "render",
|
|
26182
|
-
value: function render() {
|
|
26183
|
-
var _classNames,
|
|
26184
|
-
_this2 = this;
|
|
26185
|
-
var _this$props2 = this.props,
|
|
26186
|
-
payload = _this$props2.payload,
|
|
26187
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26188
|
-
animationDuration = _this$props2.animationDuration,
|
|
26189
|
-
animationEasing = _this$props2.animationEasing,
|
|
26190
|
-
filterNull = _this$props2.filterNull,
|
|
26191
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26192
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26193
|
-
return !isNil_1(entry.value);
|
|
26194
|
-
}) : payload);
|
|
26195
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26196
|
-
var _this$props3 = this.props,
|
|
26197
|
-
content = _this$props3.content,
|
|
26198
|
-
viewBox = _this$props3.viewBox,
|
|
26199
|
-
coordinate = _this$props3.coordinate,
|
|
26200
|
-
position = _this$props3.position,
|
|
26201
|
-
active = _this$props3.active,
|
|
26202
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26203
|
-
var outerStyle = _objectSpread$l({
|
|
26204
|
-
pointerEvents: 'none',
|
|
26205
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26206
|
-
position: 'absolute',
|
|
26207
|
-
top: 0,
|
|
26208
|
-
left: 0
|
|
26209
|
-
}, wrapperStyle);
|
|
26210
|
-
var translateX, translateY;
|
|
26211
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26212
|
-
translateX = position.x;
|
|
26213
|
-
translateY = position.y;
|
|
26214
|
-
} else {
|
|
26215
|
-
var _this$state2 = this.state,
|
|
26216
|
-
boxWidth = _this$state2.boxWidth,
|
|
26217
|
-
boxHeight = _this$state2.boxHeight;
|
|
26218
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26219
|
-
translateX = this.getTranslate({
|
|
26220
|
-
key: 'x',
|
|
26221
|
-
tooltipDimension: boxWidth,
|
|
26222
|
-
viewBoxDimension: viewBox.width
|
|
26223
|
-
});
|
|
26224
|
-
translateY = this.getTranslate({
|
|
26225
|
-
key: 'y',
|
|
26226
|
-
tooltipDimension: boxHeight,
|
|
26227
|
-
viewBoxDimension: viewBox.height
|
|
26228
|
-
});
|
|
26229
|
-
} else {
|
|
26230
|
-
outerStyle.visibility = 'hidden';
|
|
26231
|
-
}
|
|
26232
|
-
}
|
|
26233
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26234
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26235
|
-
})), outerStyle);
|
|
26236
|
-
if (isAnimationActive && active) {
|
|
26237
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26238
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26239
|
-
})), outerStyle);
|
|
26240
|
-
}
|
|
26241
|
-
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));
|
|
26242
|
-
return (
|
|
26243
|
-
/*#__PURE__*/
|
|
26244
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26245
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26246
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26247
|
-
React__default["default"].createElement("div", {
|
|
26248
|
-
tabIndex: -1,
|
|
26249
|
-
role: "dialog",
|
|
26250
|
-
className: cls,
|
|
26251
|
-
style: outerStyle,
|
|
26252
|
-
ref: function ref(node) {
|
|
26253
|
-
_this2.wrapperNode = node;
|
|
26254
|
-
}
|
|
26255
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26256
|
-
payload: finalPayload
|
|
26257
|
-
})))
|
|
26258
|
-
);
|
|
26259
|
-
}
|
|
26260
|
-
}]);
|
|
26261
|
-
return Tooltip;
|
|
26262
|
-
}(React$3.PureComponent);
|
|
26263
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26264
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26049
|
+
var tooltipDefaultProps = {
|
|
26265
26050
|
active: false,
|
|
26266
26051
|
allowEscapeViewBox: {
|
|
26267
26052
|
x: false,
|
|
@@ -26282,6 +26067,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26282
26067
|
x: 0,
|
|
26283
26068
|
y: 0
|
|
26284
26069
|
},
|
|
26070
|
+
// this doesn't exist on TooltipProps
|
|
26071
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26072
|
+
// @ts-ignore
|
|
26285
26073
|
cursorStyle: {},
|
|
26286
26074
|
separator: ' : ',
|
|
26287
26075
|
wrapperStyle: {},
|
|
@@ -26295,7 +26083,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26295
26083
|
animationDuration: 400,
|
|
26296
26084
|
filterNull: true,
|
|
26297
26085
|
useTranslate3d: false
|
|
26298
|
-
}
|
|
26086
|
+
};
|
|
26087
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26088
|
+
var _classNames;
|
|
26089
|
+
var _useState = React$3.useState(-1),
|
|
26090
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26091
|
+
boxWidth = _useState2[0],
|
|
26092
|
+
setBoxWidth = _useState2[1];
|
|
26093
|
+
var _useState3 = React$3.useState(-1),
|
|
26094
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26095
|
+
boxHeight = _useState4[0],
|
|
26096
|
+
setBoxHeight = _useState4[1];
|
|
26097
|
+
var _useState5 = React$3.useState(false),
|
|
26098
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26099
|
+
dismissed = _useState6[0],
|
|
26100
|
+
setDismissed = _useState6[1];
|
|
26101
|
+
var _useState7 = React$3.useState({
|
|
26102
|
+
x: 0,
|
|
26103
|
+
y: 0
|
|
26104
|
+
}),
|
|
26105
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26106
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26107
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26108
|
+
var wrapperNode = React$3.useRef();
|
|
26109
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26110
|
+
reverseDirection = props.reverseDirection,
|
|
26111
|
+
coordinate = props.coordinate,
|
|
26112
|
+
offset = props.offset,
|
|
26113
|
+
position = props.position,
|
|
26114
|
+
viewBox = props.viewBox;
|
|
26115
|
+
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26116
|
+
if (event.key === 'Escape') {
|
|
26117
|
+
setDismissed(true);
|
|
26118
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26119
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26120
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26121
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26122
|
+
});
|
|
26123
|
+
});
|
|
26124
|
+
}
|
|
26125
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26126
|
+
React$3.useEffect(function () {
|
|
26127
|
+
var updateBBox = function updateBBox() {
|
|
26128
|
+
if (dismissed) {
|
|
26129
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26130
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26131
|
+
setDismissed(false);
|
|
26132
|
+
}
|
|
26133
|
+
} else {
|
|
26134
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26135
|
+
}
|
|
26136
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26137
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26138
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26139
|
+
setBoxWidth(box.width);
|
|
26140
|
+
setBoxHeight(box.height);
|
|
26141
|
+
}
|
|
26142
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26143
|
+
setBoxWidth(-1);
|
|
26144
|
+
setBoxHeight(-1);
|
|
26145
|
+
}
|
|
26146
|
+
};
|
|
26147
|
+
updateBBox();
|
|
26148
|
+
return function () {
|
|
26149
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26150
|
+
};
|
|
26151
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26152
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26153
|
+
var key = _ref.key,
|
|
26154
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26155
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26156
|
+
if (position && isNumber(position[key])) {
|
|
26157
|
+
return position[key];
|
|
26158
|
+
}
|
|
26159
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26160
|
+
var positive = coordinate[key] + offset;
|
|
26161
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26162
|
+
return reverseDirection[key] ? negative : positive;
|
|
26163
|
+
}
|
|
26164
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26165
|
+
var _tooltipBoundary = negative;
|
|
26166
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26167
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26168
|
+
return Math.max(positive, viewBox[key]);
|
|
26169
|
+
}
|
|
26170
|
+
return Math.max(negative, viewBox[key]);
|
|
26171
|
+
}
|
|
26172
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26173
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26174
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26175
|
+
return Math.max(negative, viewBox[key]);
|
|
26176
|
+
}
|
|
26177
|
+
return Math.max(positive, viewBox[key]);
|
|
26178
|
+
};
|
|
26179
|
+
var payload = props.payload,
|
|
26180
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26181
|
+
filterNull = props.filterNull,
|
|
26182
|
+
active = props.active,
|
|
26183
|
+
wrapperStyle = props.wrapperStyle,
|
|
26184
|
+
useTranslate3d = props.useTranslate3d,
|
|
26185
|
+
isAnimationActive = props.isAnimationActive,
|
|
26186
|
+
animationDuration = props.animationDuration,
|
|
26187
|
+
animationEasing = props.animationEasing;
|
|
26188
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26189
|
+
return !isNil_1(entry.value);
|
|
26190
|
+
}) : payload);
|
|
26191
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26192
|
+
var content = props.content;
|
|
26193
|
+
var outerStyle = _objectSpread$i({
|
|
26194
|
+
pointerEvents: 'none',
|
|
26195
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26196
|
+
position: 'absolute',
|
|
26197
|
+
top: 0,
|
|
26198
|
+
left: 0
|
|
26199
|
+
}, wrapperStyle);
|
|
26200
|
+
var translateX, translateY;
|
|
26201
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26202
|
+
translateX = position.x;
|
|
26203
|
+
translateY = position.y;
|
|
26204
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26205
|
+
translateX = getTranslate({
|
|
26206
|
+
key: 'x',
|
|
26207
|
+
tooltipDimension: boxWidth,
|
|
26208
|
+
viewBoxDimension: viewBox.width
|
|
26209
|
+
});
|
|
26210
|
+
translateY = getTranslate({
|
|
26211
|
+
key: 'y',
|
|
26212
|
+
tooltipDimension: boxHeight,
|
|
26213
|
+
viewBoxDimension: viewBox.height
|
|
26214
|
+
});
|
|
26215
|
+
} else {
|
|
26216
|
+
outerStyle.visibility = 'hidden';
|
|
26217
|
+
}
|
|
26218
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26219
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26220
|
+
})), outerStyle);
|
|
26221
|
+
if (isAnimationActive && active) {
|
|
26222
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26223
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26224
|
+
})), outerStyle);
|
|
26225
|
+
}
|
|
26226
|
+
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));
|
|
26227
|
+
return (
|
|
26228
|
+
/*#__PURE__*/
|
|
26229
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26230
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26231
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26232
|
+
React__default["default"].createElement("div", {
|
|
26233
|
+
tabIndex: -1,
|
|
26234
|
+
role: "dialog",
|
|
26235
|
+
className: cls,
|
|
26236
|
+
style: outerStyle,
|
|
26237
|
+
ref: wrapperNode
|
|
26238
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26239
|
+
payload: finalPayload
|
|
26240
|
+
})))
|
|
26241
|
+
);
|
|
26242
|
+
};
|
|
26243
|
+
|
|
26244
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26245
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26246
|
+
|
|
26247
|
+
/**
|
|
26248
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26249
|
+
* children.props when there are no props set by the consumer
|
|
26250
|
+
* doesn't work if using default parameters
|
|
26251
|
+
*/
|
|
26252
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26299
26253
|
|
|
26300
26254
|
var root = _root;
|
|
26301
26255
|
|
|
@@ -31865,12 +31819,12 @@ module.exports = exports['default'];
|
|
|
31865
31819
|
|
|
31866
31820
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31867
31821
|
|
|
31868
|
-
function _typeof$
|
|
31869
|
-
function ownKeys$
|
|
31870
|
-
function _objectSpread$
|
|
31871
|
-
function _defineProperty$
|
|
31872
|
-
function _toPropertyKey$
|
|
31873
|
-
function _toPrimitive$
|
|
31822
|
+
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); }
|
|
31823
|
+
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; }
|
|
31824
|
+
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; }
|
|
31825
|
+
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; }
|
|
31826
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31827
|
+
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); }
|
|
31874
31828
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31875
31829
|
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."); }
|
|
31876
31830
|
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); }
|
|
@@ -31938,7 +31892,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31938
31892
|
}
|
|
31939
31893
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31940
31894
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31941
|
-
var measurementSpanStyle = _objectSpread$
|
|
31895
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31942
31896
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31943
31897
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31944
31898
|
return styleKey;
|
|
@@ -31993,11 +31947,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31993
31947
|
};
|
|
31994
31948
|
};
|
|
31995
31949
|
|
|
31996
|
-
var _excluded$
|
|
31997
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31950
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31998
31951
|
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); }
|
|
31999
|
-
function _objectWithoutProperties$
|
|
32000
|
-
function _objectWithoutPropertiesLoose$
|
|
31952
|
+
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; }
|
|
31953
|
+
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; }
|
|
32001
31954
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32002
31955
|
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."); }
|
|
32003
31956
|
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); }
|
|
@@ -32151,46 +32104,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32151
32104
|
}
|
|
32152
32105
|
return getWordsWithoutCalculate(children);
|
|
32153
32106
|
};
|
|
32154
|
-
var
|
|
32155
|
-
|
|
32156
|
-
|
|
32157
|
-
|
|
32158
|
-
|
|
32159
|
-
|
|
32160
|
-
|
|
32161
|
-
|
|
32162
|
-
|
|
32163
|
-
|
|
32164
|
-
|
|
32165
|
-
|
|
32166
|
-
|
|
32167
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32168
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32169
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32170
|
-
_ref5$fill = _ref5.fill,
|
|
32171
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32172
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32107
|
+
var textDefaultProps = {
|
|
32108
|
+
x: 0,
|
|
32109
|
+
y: 0,
|
|
32110
|
+
lineHeight: '1em',
|
|
32111
|
+
capHeight: '0.71em',
|
|
32112
|
+
// Magic number from d3
|
|
32113
|
+
scaleToFit: false,
|
|
32114
|
+
textAnchor: 'start',
|
|
32115
|
+
verticalAnchor: 'end',
|
|
32116
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32117
|
+
fill: '#808080'
|
|
32118
|
+
};
|
|
32119
|
+
var Text = function Text(props) {
|
|
32173
32120
|
var wordsByLines = React$3.useMemo(function () {
|
|
32174
32121
|
return getWordsByLines({
|
|
32175
32122
|
breakAll: props.breakAll,
|
|
32176
32123
|
children: props.children,
|
|
32177
32124
|
maxLines: props.maxLines,
|
|
32178
|
-
scaleToFit: scaleToFit,
|
|
32125
|
+
scaleToFit: props.scaleToFit,
|
|
32179
32126
|
style: props.style,
|
|
32180
32127
|
width: props.width
|
|
32181
32128
|
});
|
|
32182
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32129
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32183
32130
|
var dx = props.dx,
|
|
32184
32131
|
dy = props.dy,
|
|
32132
|
+
textAnchor = props.textAnchor,
|
|
32133
|
+
verticalAnchor = props.verticalAnchor,
|
|
32134
|
+
scaleToFit = props.scaleToFit,
|
|
32185
32135
|
angle = props.angle,
|
|
32136
|
+
lineHeight = props.lineHeight,
|
|
32137
|
+
capHeight = props.capHeight,
|
|
32186
32138
|
className = props.className,
|
|
32187
32139
|
breakAll = props.breakAll,
|
|
32188
|
-
textProps = _objectWithoutProperties$
|
|
32189
|
-
if (!isNumOrStr(
|
|
32140
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32141
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32190
32142
|
return null;
|
|
32191
32143
|
}
|
|
32192
|
-
var x =
|
|
32193
|
-
var y =
|
|
32144
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32145
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32194
32146
|
var startDy;
|
|
32195
32147
|
switch (verticalAnchor) {
|
|
32196
32148
|
case 'start':
|
|
@@ -32220,7 +32172,7 @@ var Text = function Text(_ref5) {
|
|
|
32220
32172
|
y: y,
|
|
32221
32173
|
className: classNames('recharts-text', className),
|
|
32222
32174
|
textAnchor: textAnchor,
|
|
32223
|
-
fill: fill.includes('url') ?
|
|
32175
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32224
32176
|
}), wordsByLines.map(function (line, index) {
|
|
32225
32177
|
return (
|
|
32226
32178
|
/*#__PURE__*/
|
|
@@ -32233,6 +32185,7 @@ var Text = function Text(_ref5) {
|
|
|
32233
32185
|
);
|
|
32234
32186
|
}));
|
|
32235
32187
|
};
|
|
32188
|
+
Text.defaultProps = textDefaultProps;
|
|
32236
32189
|
|
|
32237
32190
|
var baseIsEqual = _baseIsEqual;
|
|
32238
32191
|
|
|
@@ -38500,7 +38453,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38500
38453
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38501
38454
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38502
38455
|
|
|
38503
|
-
var _excluded$
|
|
38456
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38504
38457
|
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); }
|
|
38505
38458
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38506
38459
|
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."); }
|
|
@@ -38508,8 +38461,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38508
38461
|
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; }
|
|
38509
38462
|
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; } }
|
|
38510
38463
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38511
|
-
function _objectWithoutProperties$
|
|
38512
|
-
function _objectWithoutPropertiesLoose$
|
|
38464
|
+
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; }
|
|
38465
|
+
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; }
|
|
38513
38466
|
function ErrorBar(props) {
|
|
38514
38467
|
var offset = props.offset,
|
|
38515
38468
|
layout = props.layout,
|
|
@@ -38519,7 +38472,7 @@ function ErrorBar(props) {
|
|
|
38519
38472
|
dataPointFormatter = props.dataPointFormatter,
|
|
38520
38473
|
xAxis = props.xAxis,
|
|
38521
38474
|
yAxis = props.yAxis,
|
|
38522
|
-
others = _objectWithoutProperties$
|
|
38475
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38523
38476
|
var svgProps = filterProps(others);
|
|
38524
38477
|
var errorBars = data.map(function (entry, i) {
|
|
38525
38478
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38630,18 +38583,18 @@ ErrorBar.defaultProps = {
|
|
|
38630
38583
|
};
|
|
38631
38584
|
ErrorBar.displayName = 'ErrorBar';
|
|
38632
38585
|
|
|
38633
|
-
function _typeof$
|
|
38586
|
+
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); }
|
|
38634
38587
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38635
38588
|
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."); }
|
|
38636
38589
|
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); }
|
|
38637
38590
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38638
38591
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38639
38592
|
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; }
|
|
38640
|
-
function ownKeys$
|
|
38641
|
-
function _objectSpread$
|
|
38642
|
-
function _defineProperty$
|
|
38643
|
-
function _toPropertyKey$
|
|
38644
|
-
function _toPrimitive$
|
|
38593
|
+
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; }
|
|
38594
|
+
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; }
|
|
38595
|
+
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; }
|
|
38596
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38597
|
+
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); }
|
|
38645
38598
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38646
38599
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38647
38600
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38812,7 +38765,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38812
38765
|
};
|
|
38813
38766
|
});
|
|
38814
38767
|
}
|
|
38815
|
-
return _objectSpread$
|
|
38768
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38816
38769
|
payload: legendData,
|
|
38817
38770
|
item: legendItem
|
|
38818
38771
|
});
|
|
@@ -38966,10 +38919,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38966
38919
|
verticalAlign = legendProps.verticalAlign,
|
|
38967
38920
|
layout = legendProps.layout;
|
|
38968
38921
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38969
|
-
newOffset = _objectSpread$
|
|
38922
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38970
38923
|
}
|
|
38971
38924
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38972
|
-
newOffset = _objectSpread$
|
|
38925
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38973
38926
|
}
|
|
38974
38927
|
}
|
|
38975
38928
|
return newOffset;
|
|
@@ -39395,14 +39348,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39395
39348
|
items: [item]
|
|
39396
39349
|
};
|
|
39397
39350
|
}
|
|
39398
|
-
return _objectSpread$
|
|
39351
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39399
39352
|
}, {});
|
|
39400
39353
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39401
39354
|
var group = stackGroups[axisId];
|
|
39402
39355
|
if (group.hasStack) {
|
|
39403
39356
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39404
39357
|
var g = group.stackGroups[stackId];
|
|
39405
|
-
return _objectSpread$
|
|
39358
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39406
39359
|
numericAxisId: numericAxisId,
|
|
39407
39360
|
cateAxisId: cateAxisId,
|
|
39408
39361
|
items: g.items,
|
|
@@ -39410,7 +39363,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39410
39363
|
}));
|
|
39411
39364
|
}, {});
|
|
39412
39365
|
}
|
|
39413
|
-
return _objectSpread$
|
|
39366
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39414
39367
|
}, {});
|
|
39415
39368
|
};
|
|
39416
39369
|
|
|
@@ -39624,7 +39577,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39624
39577
|
formatter = _graphicalItem$props.formatter,
|
|
39625
39578
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39626
39579
|
chartType = _graphicalItem$props.chartType;
|
|
39627
|
-
return _objectSpread$
|
|
39580
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39628
39581
|
dataKey: dataKey,
|
|
39629
39582
|
unit: unit,
|
|
39630
39583
|
formatter: formatter,
|
|
@@ -39637,12 +39590,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39637
39590
|
});
|
|
39638
39591
|
};
|
|
39639
39592
|
|
|
39640
|
-
function _typeof$
|
|
39641
|
-
function ownKeys$
|
|
39642
|
-
function _objectSpread$
|
|
39643
|
-
function _defineProperty$
|
|
39644
|
-
function _toPropertyKey$
|
|
39645
|
-
function _toPrimitive$
|
|
39593
|
+
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); }
|
|
39594
|
+
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; }
|
|
39595
|
+
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; }
|
|
39596
|
+
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; }
|
|
39597
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39598
|
+
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); }
|
|
39646
39599
|
var RADIAN = Math.PI / 180;
|
|
39647
39600
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39648
39601
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39747,7 +39700,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39747
39700
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39748
39701
|
}
|
|
39749
39702
|
if (inRange) {
|
|
39750
|
-
return _objectSpread$
|
|
39703
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39751
39704
|
radius: radius,
|
|
39752
39705
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39753
39706
|
});
|
|
@@ -39755,21 +39708,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39755
39708
|
return null;
|
|
39756
39709
|
};
|
|
39757
39710
|
|
|
39758
|
-
function _typeof$
|
|
39759
|
-
var _excluded$7 = ["offset"];
|
|
39711
|
+
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); }
|
|
39760
39712
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39761
39713
|
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."); }
|
|
39762
39714
|
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); }
|
|
39763
39715
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39764
39716
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39765
39717
|
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; }
|
|
39766
|
-
function
|
|
39767
|
-
function
|
|
39768
|
-
function
|
|
39769
|
-
function
|
|
39770
|
-
function
|
|
39771
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39772
|
-
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); }
|
|
39718
|
+
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; }
|
|
39719
|
+
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; }
|
|
39720
|
+
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; }
|
|
39721
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39722
|
+
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); }
|
|
39773
39723
|
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); }
|
|
39774
39724
|
var getLabel = function getLabel(props) {
|
|
39775
39725
|
var value = props.value,
|
|
@@ -39914,7 +39864,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39914
39864
|
textAnchor: 'middle',
|
|
39915
39865
|
verticalAnchor: verticalEnd
|
|
39916
39866
|
};
|
|
39917
|
-
return _objectSpread$
|
|
39867
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39918
39868
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39919
39869
|
width: width
|
|
39920
39870
|
} : {});
|
|
@@ -39926,7 +39876,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39926
39876
|
textAnchor: 'middle',
|
|
39927
39877
|
verticalAnchor: verticalStart
|
|
39928
39878
|
};
|
|
39929
|
-
return _objectSpread$
|
|
39879
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39930
39880
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39931
39881
|
width: width
|
|
39932
39882
|
} : {});
|
|
@@ -39938,7 +39888,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39938
39888
|
textAnchor: horizontalEnd,
|
|
39939
39889
|
verticalAnchor: 'middle'
|
|
39940
39890
|
};
|
|
39941
|
-
return _objectSpread$
|
|
39891
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39942
39892
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39943
39893
|
height: height
|
|
39944
39894
|
} : {});
|
|
@@ -39950,7 +39900,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39950
39900
|
textAnchor: horizontalStart,
|
|
39951
39901
|
verticalAnchor: 'middle'
|
|
39952
39902
|
};
|
|
39953
|
-
return _objectSpread$
|
|
39903
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39954
39904
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39955
39905
|
height: height
|
|
39956
39906
|
} : {});
|
|
@@ -39960,7 +39910,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39960
39910
|
height: height
|
|
39961
39911
|
} : {};
|
|
39962
39912
|
if (position === 'insideLeft') {
|
|
39963
|
-
return _objectSpread$
|
|
39913
|
+
return _objectSpread$e({
|
|
39964
39914
|
x: x + horizontalOffset,
|
|
39965
39915
|
y: y + height / 2,
|
|
39966
39916
|
textAnchor: horizontalStart,
|
|
@@ -39968,7 +39918,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39968
39918
|
}, sizeAttrs);
|
|
39969
39919
|
}
|
|
39970
39920
|
if (position === 'insideRight') {
|
|
39971
|
-
return _objectSpread$
|
|
39921
|
+
return _objectSpread$e({
|
|
39972
39922
|
x: x + width - horizontalOffset,
|
|
39973
39923
|
y: y + height / 2,
|
|
39974
39924
|
textAnchor: horizontalEnd,
|
|
@@ -39976,7 +39926,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39976
39926
|
}, sizeAttrs);
|
|
39977
39927
|
}
|
|
39978
39928
|
if (position === 'insideTop') {
|
|
39979
|
-
return _objectSpread$
|
|
39929
|
+
return _objectSpread$e({
|
|
39980
39930
|
x: x + width / 2,
|
|
39981
39931
|
y: y + verticalOffset,
|
|
39982
39932
|
textAnchor: 'middle',
|
|
@@ -39984,7 +39934,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39984
39934
|
}, sizeAttrs);
|
|
39985
39935
|
}
|
|
39986
39936
|
if (position === 'insideBottom') {
|
|
39987
|
-
return _objectSpread$
|
|
39937
|
+
return _objectSpread$e({
|
|
39988
39938
|
x: x + width / 2,
|
|
39989
39939
|
y: y + height - verticalOffset,
|
|
39990
39940
|
textAnchor: 'middle',
|
|
@@ -39992,7 +39942,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39992
39942
|
}, sizeAttrs);
|
|
39993
39943
|
}
|
|
39994
39944
|
if (position === 'insideTopLeft') {
|
|
39995
|
-
return _objectSpread$
|
|
39945
|
+
return _objectSpread$e({
|
|
39996
39946
|
x: x + horizontalOffset,
|
|
39997
39947
|
y: y + verticalOffset,
|
|
39998
39948
|
textAnchor: horizontalStart,
|
|
@@ -40000,7 +39950,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40000
39950
|
}, sizeAttrs);
|
|
40001
39951
|
}
|
|
40002
39952
|
if (position === 'insideTopRight') {
|
|
40003
|
-
return _objectSpread$
|
|
39953
|
+
return _objectSpread$e({
|
|
40004
39954
|
x: x + width - horizontalOffset,
|
|
40005
39955
|
y: y + verticalOffset,
|
|
40006
39956
|
textAnchor: horizontalEnd,
|
|
@@ -40008,7 +39958,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40008
39958
|
}, sizeAttrs);
|
|
40009
39959
|
}
|
|
40010
39960
|
if (position === 'insideBottomLeft') {
|
|
40011
|
-
return _objectSpread$
|
|
39961
|
+
return _objectSpread$e({
|
|
40012
39962
|
x: x + horizontalOffset,
|
|
40013
39963
|
y: y + height - verticalOffset,
|
|
40014
39964
|
textAnchor: horizontalStart,
|
|
@@ -40016,7 +39966,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40016
39966
|
}, sizeAttrs);
|
|
40017
39967
|
}
|
|
40018
39968
|
if (position === 'insideBottomRight') {
|
|
40019
|
-
return _objectSpread$
|
|
39969
|
+
return _objectSpread$e({
|
|
40020
39970
|
x: x + width - horizontalOffset,
|
|
40021
39971
|
y: y + height - verticalOffset,
|
|
40022
39972
|
textAnchor: horizontalEnd,
|
|
@@ -40024,14 +39974,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40024
39974
|
}, sizeAttrs);
|
|
40025
39975
|
}
|
|
40026
39976
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40027
|
-
return _objectSpread$
|
|
39977
|
+
return _objectSpread$e({
|
|
40028
39978
|
x: x + getPercentValue(position.x, width),
|
|
40029
39979
|
y: y + getPercentValue(position.y, height),
|
|
40030
39980
|
textAnchor: 'end',
|
|
40031
39981
|
verticalAnchor: 'end'
|
|
40032
39982
|
}, sizeAttrs);
|
|
40033
39983
|
}
|
|
40034
|
-
return _objectSpread$
|
|
39984
|
+
return _objectSpread$e({
|
|
40035
39985
|
x: x + width / 2,
|
|
40036
39986
|
y: y + height / 2,
|
|
40037
39987
|
textAnchor: 'middle',
|
|
@@ -40041,13 +39991,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40041
39991
|
var isPolar = function isPolar(viewBox) {
|
|
40042
39992
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40043
39993
|
};
|
|
40044
|
-
function Label$3(
|
|
40045
|
-
var _ref4$offset = _ref4.offset,
|
|
40046
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40047
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40048
|
-
var props = _objectSpread$h({
|
|
40049
|
-
offset: offset
|
|
40050
|
-
}, restProps);
|
|
39994
|
+
function Label$3(props) {
|
|
40051
39995
|
var viewBox = props.viewBox,
|
|
40052
39996
|
position = props.position,
|
|
40053
39997
|
value = props.value,
|
|
@@ -40084,6 +40028,9 @@ function Label$3(_ref4) {
|
|
|
40084
40028
|
}), label);
|
|
40085
40029
|
}
|
|
40086
40030
|
Label$3.displayName = 'Label';
|
|
40031
|
+
Label$3.defaultProps = {
|
|
40032
|
+
offset: 5
|
|
40033
|
+
};
|
|
40087
40034
|
var parseViewBox = function parseViewBox(props) {
|
|
40088
40035
|
var cx = props.cx,
|
|
40089
40036
|
cy = props.cy,
|
|
@@ -40238,9 +40185,8 @@ function last(array) {
|
|
|
40238
40185
|
|
|
40239
40186
|
var last_1 = last;
|
|
40240
40187
|
|
|
40241
|
-
function _typeof$
|
|
40242
|
-
var _excluded$
|
|
40243
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40188
|
+
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); }
|
|
40189
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40244
40190
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40245
40191
|
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."); }
|
|
40246
40192
|
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); }
|
|
@@ -40248,26 +40194,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40248
40194
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40249
40195
|
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; }
|
|
40250
40196
|
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); }
|
|
40251
|
-
function ownKeys$
|
|
40252
|
-
function _objectSpread$
|
|
40253
|
-
function _defineProperty$
|
|
40254
|
-
function _toPropertyKey$
|
|
40255
|
-
function _toPrimitive$
|
|
40256
|
-
function _objectWithoutProperties$
|
|
40257
|
-
function _objectWithoutPropertiesLoose$
|
|
40258
|
-
var
|
|
40259
|
-
|
|
40260
|
-
|
|
40261
|
-
|
|
40262
|
-
|
|
40263
|
-
|
|
40264
|
-
|
|
40265
|
-
|
|
40266
|
-
dataKey =
|
|
40267
|
-
clockWise =
|
|
40268
|
-
id =
|
|
40269
|
-
textBreakAll =
|
|
40270
|
-
others = _objectWithoutProperties$
|
|
40197
|
+
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; }
|
|
40198
|
+
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; }
|
|
40199
|
+
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; }
|
|
40200
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40201
|
+
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); }
|
|
40202
|
+
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; }
|
|
40203
|
+
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; }
|
|
40204
|
+
var defaultProps = {
|
|
40205
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40206
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40207
|
+
}
|
|
40208
|
+
};
|
|
40209
|
+
function LabelList(props) {
|
|
40210
|
+
var data = props.data,
|
|
40211
|
+
valueAccessor = props.valueAccessor,
|
|
40212
|
+
dataKey = props.dataKey,
|
|
40213
|
+
clockWise = props.clockWise,
|
|
40214
|
+
id = props.id,
|
|
40215
|
+
textBreakAll = props.textBreakAll,
|
|
40216
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40271
40217
|
if (!data || !data.length) {
|
|
40272
40218
|
return null;
|
|
40273
40219
|
}
|
|
@@ -40283,7 +40229,7 @@ function LabelList(_ref) {
|
|
|
40283
40229
|
index: index,
|
|
40284
40230
|
value: value,
|
|
40285
40231
|
textBreakAll: textBreakAll,
|
|
40286
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40232
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40287
40233
|
clockWise: clockWise
|
|
40288
40234
|
})),
|
|
40289
40235
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40338,14 +40284,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40338
40284
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40339
40285
|
}
|
|
40340
40286
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40287
|
+
LabelList.defaultProps = defaultProps;
|
|
40341
40288
|
|
|
40342
|
-
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); }
|
|
40343
40289
|
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); }
|
|
40344
|
-
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; }
|
|
40345
|
-
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; }
|
|
40346
|
-
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; }
|
|
40347
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40348
|
-
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); }
|
|
40349
40290
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40350
40291
|
var sign = mathSign(endAngle - startAngle);
|
|
40351
40292
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40486,19 +40427,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40486
40427
|
}
|
|
40487
40428
|
return path;
|
|
40488
40429
|
};
|
|
40489
|
-
var
|
|
40490
|
-
cx: 0,
|
|
40491
|
-
cy: 0,
|
|
40492
|
-
innerRadius: 0,
|
|
40493
|
-
outerRadius: 0,
|
|
40494
|
-
startAngle: 0,
|
|
40495
|
-
endAngle: 0,
|
|
40496
|
-
cornerRadius: 0,
|
|
40497
|
-
forceCornerRadius: false,
|
|
40498
|
-
cornerIsExternal: false
|
|
40499
|
-
};
|
|
40500
|
-
var Sector = function Sector(sectorProps) {
|
|
40501
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40430
|
+
var Sector = function Sector(props) {
|
|
40502
40431
|
var cx = props.cx,
|
|
40503
40432
|
cy = props.cy,
|
|
40504
40433
|
innerRadius = props.innerRadius,
|
|
@@ -40544,14 +40473,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40544
40473
|
role: "img"
|
|
40545
40474
|
}));
|
|
40546
40475
|
};
|
|
40476
|
+
Sector.defaultProps = {
|
|
40477
|
+
cx: 0,
|
|
40478
|
+
cy: 0,
|
|
40479
|
+
innerRadius: 0,
|
|
40480
|
+
outerRadius: 0,
|
|
40481
|
+
startAngle: 0,
|
|
40482
|
+
endAngle: 0,
|
|
40483
|
+
cornerRadius: 0,
|
|
40484
|
+
forceCornerRadius: false,
|
|
40485
|
+
cornerIsExternal: false
|
|
40486
|
+
};
|
|
40547
40487
|
|
|
40548
|
-
function _typeof$
|
|
40488
|
+
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); }
|
|
40549
40489
|
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); }
|
|
40550
|
-
function ownKeys$
|
|
40551
|
-
function _objectSpread$
|
|
40552
|
-
function _defineProperty$
|
|
40553
|
-
function _toPropertyKey$
|
|
40554
|
-
function _toPrimitive$
|
|
40490
|
+
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; }
|
|
40491
|
+
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; }
|
|
40492
|
+
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; }
|
|
40493
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40494
|
+
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); }
|
|
40555
40495
|
var CURVE_FACTORIES = {
|
|
40556
40496
|
curveBasisClosed: curveBasisClosed,
|
|
40557
40497
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40591,14 +40531,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40591
40531
|
* @return {String} path
|
|
40592
40532
|
*/
|
|
40593
40533
|
var getPath$1 = function getPath(_ref) {
|
|
40594
|
-
var
|
|
40595
|
-
|
|
40596
|
-
_ref$points = _ref.points,
|
|
40597
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40534
|
+
var type = _ref.type,
|
|
40535
|
+
points = _ref.points,
|
|
40598
40536
|
baseLine = _ref.baseLine,
|
|
40599
40537
|
layout = _ref.layout,
|
|
40600
|
-
|
|
40601
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40538
|
+
connectNulls = _ref.connectNulls;
|
|
40602
40539
|
var curveFactory = getCurveFactory(type, layout);
|
|
40603
40540
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40604
40541
|
return defined(entry);
|
|
@@ -40609,7 +40546,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40609
40546
|
return defined(base);
|
|
40610
40547
|
}) : baseLine;
|
|
40611
40548
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40612
|
-
return _objectSpread$
|
|
40549
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40613
40550
|
base: formatBaseLine[index]
|
|
40614
40551
|
});
|
|
40615
40552
|
});
|
|
@@ -40650,8 +40587,12 @@ var Curve = function Curve(props) {
|
|
|
40650
40587
|
ref: pathRef
|
|
40651
40588
|
}));
|
|
40652
40589
|
};
|
|
40590
|
+
Curve.defaultProps = {
|
|
40591
|
+
type: 'linear',
|
|
40592
|
+
points: [],
|
|
40593
|
+
connectNulls: false
|
|
40594
|
+
};
|
|
40653
40595
|
|
|
40654
|
-
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); }
|
|
40655
40596
|
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); }
|
|
40656
40597
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40657
40598
|
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."); }
|
|
@@ -40659,11 +40600,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40659
40600
|
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; }
|
|
40660
40601
|
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; } }
|
|
40661
40602
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40662
|
-
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; }
|
|
40663
|
-
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; }
|
|
40664
|
-
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; }
|
|
40665
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40666
|
-
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); }
|
|
40667
40603
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40668
40604
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40669
40605
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40719,29 +40655,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40719
40655
|
}
|
|
40720
40656
|
return false;
|
|
40721
40657
|
};
|
|
40722
|
-
var
|
|
40723
|
-
x: 0,
|
|
40724
|
-
y: 0,
|
|
40725
|
-
width: 0,
|
|
40726
|
-
height: 0,
|
|
40727
|
-
// The radius of border
|
|
40728
|
-
// The radius of four corners when radius is a number
|
|
40729
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40730
|
-
radius: 0,
|
|
40731
|
-
isAnimationActive: false,
|
|
40732
|
-
isUpdateAnimationActive: false,
|
|
40733
|
-
animationBegin: 0,
|
|
40734
|
-
animationDuration: 1500,
|
|
40735
|
-
animationEasing: 'ease'
|
|
40736
|
-
};
|
|
40737
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40738
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40658
|
+
var Rectangle = function Rectangle(props) {
|
|
40739
40659
|
var pathRef = React$3.useRef();
|
|
40740
40660
|
var _useState = React$3.useState(-1),
|
|
40741
40661
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40742
40662
|
totalLength = _useState2[0],
|
|
40743
40663
|
setTotalLength = _useState2[1];
|
|
40744
|
-
React$3.
|
|
40664
|
+
React$3.useLayoutEffect(function () {
|
|
40745
40665
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40746
40666
|
try {
|
|
40747
40667
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40812,6 +40732,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40812
40732
|
})));
|
|
40813
40733
|
});
|
|
40814
40734
|
};
|
|
40735
|
+
Rectangle.defaultProps = {
|
|
40736
|
+
x: 0,
|
|
40737
|
+
y: 0,
|
|
40738
|
+
width: 0,
|
|
40739
|
+
height: 0,
|
|
40740
|
+
// The radius of border
|
|
40741
|
+
// The radius of four corners when radius is a number
|
|
40742
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40743
|
+
radius: 0,
|
|
40744
|
+
isAnimationActive: false,
|
|
40745
|
+
isUpdateAnimationActive: false,
|
|
40746
|
+
animationBegin: 0,
|
|
40747
|
+
animationDuration: 1500,
|
|
40748
|
+
animationEasing: 'ease'
|
|
40749
|
+
};
|
|
40815
40750
|
|
|
40816
40751
|
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); }
|
|
40817
40752
|
var Dot$1 = function Dot(props) {
|
|
@@ -40831,42 +40766,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40831
40766
|
return null;
|
|
40832
40767
|
};
|
|
40833
40768
|
|
|
40834
|
-
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); }
|
|
40835
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40836
40769
|
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); }
|
|
40837
|
-
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; }
|
|
40838
|
-
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; }
|
|
40839
|
-
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; }
|
|
40840
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40841
|
-
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); }
|
|
40842
|
-
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; }
|
|
40843
|
-
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; }
|
|
40844
40770
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40845
40771
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40846
40772
|
};
|
|
40847
|
-
var Cross = function Cross(
|
|
40848
|
-
var
|
|
40849
|
-
|
|
40850
|
-
|
|
40851
|
-
|
|
40852
|
-
|
|
40853
|
-
|
|
40854
|
-
|
|
40855
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40856
|
-
_ref$width = _ref.width,
|
|
40857
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40858
|
-
_ref$height = _ref.height,
|
|
40859
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40860
|
-
className = _ref.className,
|
|
40861
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40862
|
-
var props = _objectSpread$c({
|
|
40863
|
-
x: x,
|
|
40864
|
-
y: y,
|
|
40865
|
-
top: top,
|
|
40866
|
-
left: left,
|
|
40867
|
-
width: width,
|
|
40868
|
-
height: height
|
|
40869
|
-
}, rest);
|
|
40773
|
+
var Cross = function Cross(props) {
|
|
40774
|
+
var x = props.x,
|
|
40775
|
+
y = props.y,
|
|
40776
|
+
width = props.width,
|
|
40777
|
+
height = props.height,
|
|
40778
|
+
top = props.top,
|
|
40779
|
+
left = props.left,
|
|
40780
|
+
className = props.className;
|
|
40870
40781
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40871
40782
|
return null;
|
|
40872
40783
|
}
|
|
@@ -40875,6 +40786,14 @@ var Cross = function Cross(_ref) {
|
|
|
40875
40786
|
d: getPath(x, y, width, height, top, left)
|
|
40876
40787
|
}));
|
|
40877
40788
|
};
|
|
40789
|
+
Cross.defaultProps = {
|
|
40790
|
+
x: 0,
|
|
40791
|
+
y: 0,
|
|
40792
|
+
top: 0,
|
|
40793
|
+
left: 0,
|
|
40794
|
+
width: 0,
|
|
40795
|
+
height: 0
|
|
40796
|
+
};
|
|
40878
40797
|
|
|
40879
40798
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40880
40799
|
|
|
@@ -41084,7 +41003,6 @@ var createScale = function createScale(_ref) {
|
|
|
41084
41003
|
isTextActive: false,
|
|
41085
41004
|
isSlideMoving: false,
|
|
41086
41005
|
isTravellerMoving: false,
|
|
41087
|
-
isTravellerFocused: false,
|
|
41088
41006
|
startX: scale(startIndex),
|
|
41089
41007
|
endX: scale(endIndex),
|
|
41090
41008
|
scale: scale,
|
|
@@ -41298,38 +41216,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41298
41216
|
}
|
|
41299
41217
|
});
|
|
41300
41218
|
}
|
|
41301
|
-
}, {
|
|
41302
|
-
key: "handleTravellerMoveKeyboard",
|
|
41303
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41304
|
-
var _this2 = this;
|
|
41305
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41306
|
-
var _this$state3 = this.state,
|
|
41307
|
-
scaleValues = _this$state3.scaleValues,
|
|
41308
|
-
startX = _this$state3.startX,
|
|
41309
|
-
endX = _this$state3.endX;
|
|
41310
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41311
|
-
var currentScaleValue = this.state[id];
|
|
41312
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41313
|
-
if (currentIndex === -1) {
|
|
41314
|
-
return;
|
|
41315
|
-
}
|
|
41316
|
-
var newIndex = currentIndex + direction;
|
|
41317
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41318
|
-
return;
|
|
41319
|
-
}
|
|
41320
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41321
|
-
|
|
41322
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41323
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41324
|
-
return;
|
|
41325
|
-
}
|
|
41326
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41327
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41328
|
-
startX: _this2.state.startX,
|
|
41329
|
-
endX: _this2.state.endX
|
|
41330
|
-
}));
|
|
41331
|
-
});
|
|
41332
|
-
}
|
|
41333
41219
|
}, {
|
|
41334
41220
|
key: "renderBackground",
|
|
41335
41221
|
value: function renderBackground() {
|
|
@@ -41377,7 +41263,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41377
41263
|
}, {
|
|
41378
41264
|
key: "renderTravellerLayer",
|
|
41379
41265
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41380
|
-
var _this3 = this;
|
|
41381
41266
|
var _this$props7 = this.props,
|
|
41382
41267
|
y = _this$props7.y,
|
|
41383
41268
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41391,31 +41276,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41391
41276
|
height: height
|
|
41392
41277
|
});
|
|
41393
41278
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41394
|
-
tabIndex: 0,
|
|
41395
|
-
role: "slider",
|
|
41396
41279
|
className: "recharts-brush-traveller",
|
|
41397
41280
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41398
41281
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41399
41282
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41400
41283
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41401
|
-
onKeyDown: function onKeyDown(e) {
|
|
41402
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41403
|
-
return;
|
|
41404
|
-
}
|
|
41405
|
-
e.preventDefault();
|
|
41406
|
-
e.stopPropagation();
|
|
41407
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41408
|
-
},
|
|
41409
|
-
onFocus: function onFocus() {
|
|
41410
|
-
_this3.setState({
|
|
41411
|
-
isTravellerFocused: true
|
|
41412
|
-
});
|
|
41413
|
-
},
|
|
41414
|
-
onBlur: function onBlur() {
|
|
41415
|
-
_this3.setState({
|
|
41416
|
-
isTravellerFocused: false
|
|
41417
|
-
});
|
|
41418
|
-
},
|
|
41419
41284
|
style: {
|
|
41420
41285
|
cursor: 'col-resize'
|
|
41421
41286
|
}
|
|
@@ -41459,9 +41324,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41459
41324
|
height = _this$props9.height,
|
|
41460
41325
|
travellerWidth = _this$props9.travellerWidth,
|
|
41461
41326
|
stroke = _this$props9.stroke;
|
|
41462
|
-
var _this$
|
|
41463
|
-
startX = _this$
|
|
41464
|
-
endX = _this$
|
|
41327
|
+
var _this$state3 = this.state,
|
|
41328
|
+
startX = _this$state3.startX,
|
|
41329
|
+
endX = _this$state3.endX;
|
|
41465
41330
|
var offset = 5;
|
|
41466
41331
|
var attrs = {
|
|
41467
41332
|
pointerEvents: 'none',
|
|
@@ -41493,13 +41358,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41493
41358
|
width = _this$props10.width,
|
|
41494
41359
|
height = _this$props10.height,
|
|
41495
41360
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41496
|
-
var _this$
|
|
41497
|
-
startX = _this$
|
|
41498
|
-
endX = _this$
|
|
41499
|
-
isTextActive = _this$
|
|
41500
|
-
isSlideMoving = _this$
|
|
41501
|
-
isTravellerMoving = _this$
|
|
41502
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41361
|
+
var _this$state4 = this.state,
|
|
41362
|
+
startX = _this$state4.startX,
|
|
41363
|
+
endX = _this$state4.endX,
|
|
41364
|
+
isTextActive = _this$state4.isTextActive,
|
|
41365
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41366
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41503
41367
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41504
41368
|
return null;
|
|
41505
41369
|
}
|
|
@@ -41511,7 +41375,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41511
41375
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41512
41376
|
onTouchMove: this.handleTouchMove,
|
|
41513
41377
|
style: style
|
|
41514
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41378
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41515
41379
|
}
|
|
41516
41380
|
}], [{
|
|
41517
41381
|
key: "renderDefaultTraveller",
|
|
@@ -41829,7 +41693,7 @@ function every(collection, predicate, guard) {
|
|
|
41829
41693
|
|
|
41830
41694
|
var every_1 = every;
|
|
41831
41695
|
|
|
41832
|
-
var defineProperty = _defineProperty$
|
|
41696
|
+
var defineProperty = _defineProperty$l;
|
|
41833
41697
|
|
|
41834
41698
|
/**
|
|
41835
41699
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42190,6 +42054,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42190
42054
|
legendType: 'rect',
|
|
42191
42055
|
minPointSize: 0,
|
|
42192
42056
|
hide: false,
|
|
42057
|
+
// data of bar
|
|
42193
42058
|
data: [],
|
|
42194
42059
|
layout: 'vertical',
|
|
42195
42060
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45102,11 +44967,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45102
44967
|
}
|
|
45103
44968
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45104
44969
|
x = _this$container$getBo.x,
|
|
45105
|
-
y = _this$container$getBo.y
|
|
45106
|
-
height = _this$container$getBo.height;
|
|
44970
|
+
y = _this$container$getBo.y;
|
|
45107
44971
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45108
44972
|
var pageX = x + coordinate;
|
|
45109
|
-
var pageY = y + this.offset.top
|
|
44973
|
+
var pageY = y + this.offset.top;
|
|
45110
44974
|
this.mouseHandlerCallback({
|
|
45111
44975
|
pageX: pageX,
|
|
45112
44976
|
pageY: pageY
|