@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.es.js
CHANGED
|
@@ -4500,7 +4500,7 @@ function requiredArgs(required, args) {
|
|
|
4500
4500
|
}
|
|
4501
4501
|
}
|
|
4502
4502
|
|
|
4503
|
-
function _typeof$
|
|
4503
|
+
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); }
|
|
4504
4504
|
/**
|
|
4505
4505
|
* @name toDate
|
|
4506
4506
|
* @category Common Helpers
|
|
@@ -4536,7 +4536,7 @@ function toDate(argument) {
|
|
|
4536
4536
|
requiredArgs(1, arguments);
|
|
4537
4537
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4538
4538
|
|
|
4539
|
-
if (argument instanceof Date || _typeof$
|
|
4539
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4540
4540
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4541
4541
|
return new Date(argument.getTime());
|
|
4542
4542
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4807,7 +4807,7 @@ var millisecondsInMinute = 60000;
|
|
|
4807
4807
|
|
|
4808
4808
|
var millisecondsInHour = 3600000;
|
|
4809
4809
|
|
|
4810
|
-
function _typeof$
|
|
4810
|
+
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); }
|
|
4811
4811
|
/**
|
|
4812
4812
|
* @name isDate
|
|
4813
4813
|
* @category Common Helpers
|
|
@@ -4843,7 +4843,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4843
4843
|
|
|
4844
4844
|
function isDate(value) {
|
|
4845
4845
|
requiredArgs(1, arguments);
|
|
4846
|
-
return value instanceof Date || _typeof$
|
|
4846
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4847
4847
|
}
|
|
4848
4848
|
|
|
4849
4849
|
/**
|
|
@@ -13559,15 +13559,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13559
13559
|
|
|
13560
13560
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13561
13561
|
|
|
13562
|
-
function _slicedToArray$
|
|
13563
|
-
return _arrayWithHoles$
|
|
13562
|
+
function _slicedToArray$d(arr, i) {
|
|
13563
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13564
13564
|
}
|
|
13565
13565
|
|
|
13566
|
-
function _arrayWithHoles$
|
|
13566
|
+
function _arrayWithHoles$e(arr) {
|
|
13567
13567
|
if (Array.isArray(arr)) return arr;
|
|
13568
13568
|
}
|
|
13569
13569
|
|
|
13570
|
-
function _iterableToArrayLimit$
|
|
13570
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13571
13571
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13572
13572
|
|
|
13573
13573
|
if (_i == null) return;
|
|
@@ -13597,16 +13597,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13597
13597
|
return _arr;
|
|
13598
13598
|
}
|
|
13599
13599
|
|
|
13600
|
-
function _unsupportedIterableToArray$
|
|
13600
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13601
13601
|
if (!o) return;
|
|
13602
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13602
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13603
13603
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13604
13604
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13605
13605
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13606
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13606
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13607
13607
|
}
|
|
13608
13608
|
|
|
13609
|
-
function _arrayLikeToArray$
|
|
13609
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13610
13610
|
if (len == null || len > arr.length) len = arr.length;
|
|
13611
13611
|
|
|
13612
13612
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13614,7 +13614,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13614
13614
|
return arr2;
|
|
13615
13615
|
}
|
|
13616
13616
|
|
|
13617
|
-
function _nonIterableRest$
|
|
13617
|
+
function _nonIterableRest$e() {
|
|
13618
13618
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13619
13619
|
}
|
|
13620
13620
|
|
|
@@ -13678,7 +13678,7 @@ reservedProps.forEach(function (name) {
|
|
|
13678
13678
|
// This is a mapping from React prop names to the attribute names.
|
|
13679
13679
|
|
|
13680
13680
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13681
|
-
var _ref2 = _slicedToArray$
|
|
13681
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13682
13682
|
name = _ref2[0],
|
|
13683
13683
|
attributeName = _ref2[1];
|
|
13684
13684
|
|
|
@@ -14751,8 +14751,8 @@ var templateObject_1$y, templateObject_2$u;
|
|
|
14751
14751
|
|
|
14752
14752
|
var DataSummary = function (_a) {
|
|
14753
14753
|
var title = _a.title, data = _a.data, onEdit = _a.onEdit, locale = _a.locale;
|
|
14754
|
-
return (jsx$1(Fragment$1, { children: jsxs(Container$l, { children: [jsxs("div", { children: [jsx$1(Heading, __assign$2({ type: "h5" }, { children: title })), onEdit && (jsx$1("div", __assign$2({ onClick: onEdit }, { children: jsx$1(Heading, __assign$2({ type: "h6", color: "gray" }, { children: translations[locale]["Edit"] })) })))] }), jsx$1(Data, { children: data === null || data === void 0 ? void 0 : data.map(function (item) {
|
|
14755
|
-
return item instanceof Object ? (jsxs("div", { children: [jsxs(Paragraph, __assign$2({ weight: "regular" }, { children: [item.label, ":"] })), jsx$1(Paragraph, __assign$2({ weight: "regular" }, { children: item.value }))] }, "".concat(item.label, "-").concat(item.value))) : (jsx$1(Paragraph, __assign$2({ weight: "regular" }, { children: item })));
|
|
14754
|
+
return (jsx$1(Fragment$1, { children: jsxs(Container$l, { children: [jsxs("div", { children: [jsx$1(Heading, __assign$2({ type: "h5" }, { children: title })), onEdit && (jsx$1("div", __assign$2({ onClick: onEdit }, { children: jsx$1(Heading, __assign$2({ type: "h6", color: "gray" }, { children: translations[locale]["Edit"] })) })))] }), jsx$1(Data, { children: data === null || data === void 0 ? void 0 : data.map(function (item, index) {
|
|
14755
|
+
return item instanceof Object ? (jsxs("div", { children: [jsxs(Paragraph, __assign$2({ weight: "regular" }, { children: [item.label, ":"] })), jsx$1(Paragraph, __assign$2({ weight: "regular" }, { children: item.value }))] }, "".concat(item.label, "-").concat(item.value, "-").concat(index))) : (jsx$1(Paragraph, __assign$2({ weight: "regular" }, { children: item }), "".concat(item, "-").concat(index)));
|
|
14756
14756
|
}) })] }) }));
|
|
14757
14757
|
};
|
|
14758
14758
|
|
|
@@ -16089,31 +16089,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16089
16089
|
return true;
|
|
16090
16090
|
};
|
|
16091
16091
|
|
|
16092
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16092
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16093
16093
|
|
|
16094
16094
|
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."); }
|
|
16095
16095
|
|
|
16096
16096
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16097
16097
|
|
|
16098
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16098
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16099
16099
|
|
|
16100
|
-
function ownKeys$
|
|
16100
|
+
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; }
|
|
16101
16101
|
|
|
16102
|
-
function _objectSpread$
|
|
16102
|
+
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; }
|
|
16103
16103
|
|
|
16104
|
-
function _defineProperty$
|
|
16104
|
+
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; }
|
|
16105
16105
|
|
|
16106
|
-
function _slicedToArray$
|
|
16106
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16107
16107
|
|
|
16108
|
-
function _nonIterableRest$
|
|
16108
|
+
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."); }
|
|
16109
16109
|
|
|
16110
|
-
function _unsupportedIterableToArray$
|
|
16110
|
+
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); }
|
|
16111
16111
|
|
|
16112
|
-
function _arrayLikeToArray$
|
|
16112
|
+
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; }
|
|
16113
16113
|
|
|
16114
|
-
function _iterableToArrayLimit$
|
|
16114
|
+
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; }
|
|
16115
16115
|
|
|
16116
|
-
function _arrayWithHoles$
|
|
16116
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16117
16117
|
|
|
16118
16118
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16119
16119
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16193,11 +16193,11 @@ function allFilesAccepted(_ref) {
|
|
|
16193
16193
|
|
|
16194
16194
|
return files.every(function (file) {
|
|
16195
16195
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16196
|
-
_fileAccepted2 = _slicedToArray$
|
|
16196
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16197
16197
|
accepted = _fileAccepted2[0];
|
|
16198
16198
|
|
|
16199
16199
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16200
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16200
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16201
16201
|
sizeMatch = _fileMatchSize2[0];
|
|
16202
16202
|
|
|
16203
16203
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16294,7 +16294,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16294
16294
|
function pickerOptionsFromAccept(accept) {
|
|
16295
16295
|
if (isDefined(accept)) {
|
|
16296
16296
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16297
|
-
var _ref3 = _slicedToArray$
|
|
16297
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16298
16298
|
mimeType = _ref3[0],
|
|
16299
16299
|
ext = _ref3[1];
|
|
16300
16300
|
|
|
@@ -16312,11 +16312,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16312
16312
|
|
|
16313
16313
|
return ok;
|
|
16314
16314
|
}).reduce(function (agg, _ref4) {
|
|
16315
|
-
var _ref5 = _slicedToArray$
|
|
16315
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16316
16316
|
mimeType = _ref5[0],
|
|
16317
16317
|
ext = _ref5[1];
|
|
16318
16318
|
|
|
16319
|
-
return _objectSpread$
|
|
16319
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16320
16320
|
}, {});
|
|
16321
16321
|
return [{
|
|
16322
16322
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16336,7 +16336,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16336
16336
|
function acceptPropAsAcceptAttr(accept) {
|
|
16337
16337
|
if (isDefined(accept)) {
|
|
16338
16338
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16339
|
-
var _ref7 = _slicedToArray$
|
|
16339
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16340
16340
|
mimeType = _ref7[0],
|
|
16341
16341
|
ext = _ref7[1];
|
|
16342
16342
|
|
|
@@ -16404,40 +16404,40 @@ function isExt(v) {
|
|
|
16404
16404
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16405
16405
|
*/
|
|
16406
16406
|
|
|
16407
|
-
var _excluded$
|
|
16408
|
-
_excluded2$
|
|
16407
|
+
var _excluded$d = ["children"],
|
|
16408
|
+
_excluded2$3 = ["open"],
|
|
16409
16409
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16410
16410
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16411
16411
|
|
|
16412
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16412
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16413
16413
|
|
|
16414
16414
|
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."); }
|
|
16415
16415
|
|
|
16416
16416
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16417
16417
|
|
|
16418
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16418
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16419
16419
|
|
|
16420
|
-
function _slicedToArray$
|
|
16420
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16421
16421
|
|
|
16422
|
-
function _nonIterableRest$
|
|
16422
|
+
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."); }
|
|
16423
16423
|
|
|
16424
|
-
function _unsupportedIterableToArray$
|
|
16424
|
+
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); }
|
|
16425
16425
|
|
|
16426
|
-
function _arrayLikeToArray$
|
|
16426
|
+
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; }
|
|
16427
16427
|
|
|
16428
|
-
function _iterableToArrayLimit$
|
|
16428
|
+
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; }
|
|
16429
16429
|
|
|
16430
|
-
function _arrayWithHoles$
|
|
16430
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16431
16431
|
|
|
16432
|
-
function ownKeys$
|
|
16432
|
+
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; }
|
|
16433
16433
|
|
|
16434
|
-
function _objectSpread$
|
|
16434
|
+
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; }
|
|
16435
16435
|
|
|
16436
|
-
function _defineProperty$
|
|
16436
|
+
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; }
|
|
16437
16437
|
|
|
16438
|
-
function _objectWithoutProperties$
|
|
16438
|
+
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; }
|
|
16439
16439
|
|
|
16440
|
-
function _objectWithoutPropertiesLoose$
|
|
16440
|
+
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; }
|
|
16441
16441
|
/**
|
|
16442
16442
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16443
16443
|
*
|
|
@@ -16455,11 +16455,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16455
16455
|
|
|
16456
16456
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16457
16457
|
var children = _ref.children,
|
|
16458
|
-
params = _objectWithoutProperties$
|
|
16458
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16459
16459
|
|
|
16460
16460
|
var _useDropzone = useDropzone(params),
|
|
16461
16461
|
open = _useDropzone.open,
|
|
16462
|
-
props = _objectWithoutProperties$
|
|
16462
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16463
16463
|
|
|
16464
16464
|
useImperativeHandle(ref, function () {
|
|
16465
16465
|
return {
|
|
@@ -16467,13 +16467,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16467
16467
|
};
|
|
16468
16468
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16469
16469
|
|
|
16470
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16470
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16471
16471
|
open: open
|
|
16472
16472
|
})));
|
|
16473
16473
|
});
|
|
16474
16474
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16475
16475
|
|
|
16476
|
-
var defaultProps$
|
|
16476
|
+
var defaultProps$1 = {
|
|
16477
16477
|
disabled: false,
|
|
16478
16478
|
getFilesFromEvent: fromEvent,
|
|
16479
16479
|
maxSize: Infinity,
|
|
@@ -16489,7 +16489,7 @@ var defaultProps$2 = {
|
|
|
16489
16489
|
useFsAccessApi: true,
|
|
16490
16490
|
autoFocus: false
|
|
16491
16491
|
};
|
|
16492
|
-
Dropzone.defaultProps = defaultProps$
|
|
16492
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16493
16493
|
Dropzone.propTypes = {
|
|
16494
16494
|
/**
|
|
16495
16495
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16840,7 +16840,7 @@ var initialState = {
|
|
|
16840
16840
|
function useDropzone() {
|
|
16841
16841
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16842
16842
|
|
|
16843
|
-
var _defaultProps$props = _objectSpread$
|
|
16843
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16844
16844
|
accept = _defaultProps$props.accept,
|
|
16845
16845
|
disabled = _defaultProps$props.disabled,
|
|
16846
16846
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16887,7 +16887,7 @@ function useDropzone() {
|
|
|
16887
16887
|
var inputRef = useRef(null);
|
|
16888
16888
|
|
|
16889
16889
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16890
|
-
_useReducer2 = _slicedToArray$
|
|
16890
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16891
16891
|
state = _useReducer2[0],
|
|
16892
16892
|
dispatch = _useReducer2[1];
|
|
16893
16893
|
|
|
@@ -17057,12 +17057,12 @@ function useDropzone() {
|
|
|
17057
17057
|
var fileRejections = [];
|
|
17058
17058
|
files.forEach(function (file) {
|
|
17059
17059
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17060
|
-
_fileAccepted2 = _slicedToArray$
|
|
17060
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17061
17061
|
accepted = _fileAccepted2[0],
|
|
17062
17062
|
acceptError = _fileAccepted2[1];
|
|
17063
17063
|
|
|
17064
17064
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17065
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17065
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17066
17066
|
sizeMatch = _fileMatchSize2[0],
|
|
17067
17067
|
sizeError = _fileMatchSize2[1];
|
|
17068
17068
|
|
|
@@ -17263,9 +17263,9 @@ function useDropzone() {
|
|
|
17263
17263
|
onDragOver = _ref2.onDragOver,
|
|
17264
17264
|
onDragLeave = _ref2.onDragLeave,
|
|
17265
17265
|
onDrop = _ref2.onDrop,
|
|
17266
|
-
rest = _objectWithoutProperties$
|
|
17266
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17267
17267
|
|
|
17268
|
-
return _objectSpread$
|
|
17268
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17269
17269
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17270
17270
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17271
17271
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17290,9 +17290,9 @@ function useDropzone() {
|
|
|
17290
17290
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17291
17291
|
onChange = _ref3.onChange,
|
|
17292
17292
|
onClick = _ref3.onClick,
|
|
17293
|
-
rest = _objectWithoutProperties$
|
|
17293
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17294
17294
|
|
|
17295
|
-
var inputProps = _defineProperty$
|
|
17295
|
+
var inputProps = _defineProperty$r({
|
|
17296
17296
|
accept: acceptAttr,
|
|
17297
17297
|
multiple: multiple,
|
|
17298
17298
|
type: "file",
|
|
@@ -17304,10 +17304,10 @@ function useDropzone() {
|
|
|
17304
17304
|
tabIndex: -1
|
|
17305
17305
|
}, refKey, inputRef);
|
|
17306
17306
|
|
|
17307
|
-
return _objectSpread$
|
|
17307
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17308
17308
|
};
|
|
17309
17309
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17310
|
-
return _objectSpread$
|
|
17310
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17311
17311
|
isFocused: isFocused && !disabled,
|
|
17312
17312
|
getRootProps: getRootProps,
|
|
17313
17313
|
getInputProps: getInputProps,
|
|
@@ -17326,40 +17326,40 @@ function reducer$1(state, action) {
|
|
|
17326
17326
|
/* istanbul ignore next */
|
|
17327
17327
|
switch (action.type) {
|
|
17328
17328
|
case "focus":
|
|
17329
|
-
return _objectSpread$
|
|
17329
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17330
17330
|
isFocused: true
|
|
17331
17331
|
});
|
|
17332
17332
|
|
|
17333
17333
|
case "blur":
|
|
17334
|
-
return _objectSpread$
|
|
17334
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17335
17335
|
isFocused: false
|
|
17336
17336
|
});
|
|
17337
17337
|
|
|
17338
17338
|
case "openDialog":
|
|
17339
|
-
return _objectSpread$
|
|
17339
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17340
17340
|
isFileDialogActive: true
|
|
17341
17341
|
});
|
|
17342
17342
|
|
|
17343
17343
|
case "closeDialog":
|
|
17344
|
-
return _objectSpread$
|
|
17344
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17345
17345
|
isFileDialogActive: false
|
|
17346
17346
|
});
|
|
17347
17347
|
|
|
17348
17348
|
case "setDraggedFiles":
|
|
17349
|
-
return _objectSpread$
|
|
17349
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17350
17350
|
isDragActive: action.isDragActive,
|
|
17351
17351
|
isDragAccept: action.isDragAccept,
|
|
17352
17352
|
isDragReject: action.isDragReject
|
|
17353
17353
|
});
|
|
17354
17354
|
|
|
17355
17355
|
case "setFiles":
|
|
17356
|
-
return _objectSpread$
|
|
17356
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17357
17357
|
acceptedFiles: action.acceptedFiles,
|
|
17358
17358
|
fileRejections: action.fileRejections
|
|
17359
17359
|
});
|
|
17360
17360
|
|
|
17361
17361
|
case "reset":
|
|
17362
|
-
return _objectSpread$
|
|
17362
|
+
return _objectSpread$p({}, initialState);
|
|
17363
17363
|
|
|
17364
17364
|
default:
|
|
17365
17365
|
return state;
|
|
@@ -19587,7 +19587,7 @@ function shallowEqual(a, b) {
|
|
|
19587
19587
|
return true;
|
|
19588
19588
|
}
|
|
19589
19589
|
|
|
19590
|
-
function _typeof$
|
|
19590
|
+
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); }
|
|
19591
19591
|
|
|
19592
19592
|
//
|
|
19593
19593
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19614,9 +19614,7 @@ var FilteredElementKeyMap = {
|
|
|
19614
19614
|
};
|
|
19615
19615
|
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'];
|
|
19616
19616
|
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19617
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19620
19618
|
|
|
19621
19619
|
/** the offset of a chart, which define the blank space all around */
|
|
19622
19620
|
|
|
@@ -19652,7 +19650,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19652
19650
|
};
|
|
19653
19651
|
};
|
|
19654
19652
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19655
|
-
if (!isObject_1(props) || _typeof$
|
|
19653
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19656
19654
|
return null;
|
|
19657
19655
|
}
|
|
19658
19656
|
var out = null;
|
|
@@ -19666,11 +19664,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19666
19664
|
return out;
|
|
19667
19665
|
};
|
|
19668
19666
|
|
|
19669
|
-
var _excluded$
|
|
19670
|
-
_excluded2$
|
|
19671
|
-
function _objectWithoutProperties$
|
|
19672
|
-
function _objectWithoutPropertiesLoose$
|
|
19673
|
-
function _typeof$
|
|
19667
|
+
var _excluded$c = ["children"],
|
|
19668
|
+
_excluded2$2 = ["children"];
|
|
19669
|
+
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; }
|
|
19670
|
+
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; }
|
|
19671
|
+
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); }
|
|
19674
19672
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19675
19673
|
click: 'onClick',
|
|
19676
19674
|
mousedown: 'onMouseDown',
|
|
@@ -19777,7 +19775,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19777
19775
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19778
19776
|
};
|
|
19779
19777
|
var isDotProps = function isDotProps(dot) {
|
|
19780
|
-
return dot && _typeof$
|
|
19778
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19781
19779
|
};
|
|
19782
19780
|
|
|
19783
19781
|
/**
|
|
@@ -19869,10 +19867,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19869
19867
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19870
19868
|
var _ref = nextChild.props || {},
|
|
19871
19869
|
nextChildren = _ref.children,
|
|
19872
|
-
nextProps = _objectWithoutProperties$
|
|
19870
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19873
19871
|
var _ref2 = prevChild.props || {},
|
|
19874
19872
|
prevChildren = _ref2.children,
|
|
19875
|
-
prevProps = _objectWithoutProperties$
|
|
19873
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19876
19874
|
if (nextChildren && prevChildren) {
|
|
19877
19875
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19878
19876
|
}
|
|
@@ -19914,10 +19912,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19914
19912
|
return toArray(children).indexOf(child);
|
|
19915
19913
|
};
|
|
19916
19914
|
|
|
19917
|
-
var _excluded$
|
|
19915
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19918
19916
|
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); }
|
|
19919
|
-
function _objectWithoutProperties$
|
|
19920
|
-
function _objectWithoutPropertiesLoose$
|
|
19917
|
+
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; }
|
|
19918
|
+
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; }
|
|
19921
19919
|
function Surface(props) {
|
|
19922
19920
|
var children = props.children,
|
|
19923
19921
|
width = props.width,
|
|
@@ -19925,7 +19923,7 @@ function Surface(props) {
|
|
|
19925
19923
|
viewBox = props.viewBox,
|
|
19926
19924
|
className = props.className,
|
|
19927
19925
|
style = props.style,
|
|
19928
|
-
others = _objectWithoutProperties$
|
|
19926
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19929
19927
|
var svgView = viewBox || {
|
|
19930
19928
|
width: width,
|
|
19931
19929
|
height: height,
|
|
@@ -19942,14 +19940,14 @@ function Surface(props) {
|
|
|
19942
19940
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19943
19941
|
}
|
|
19944
19942
|
|
|
19945
|
-
var _excluded$
|
|
19943
|
+
var _excluded$a = ["children", "className"];
|
|
19946
19944
|
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); }
|
|
19947
|
-
function _objectWithoutProperties$
|
|
19948
|
-
function _objectWithoutPropertiesLoose$
|
|
19945
|
+
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; }
|
|
19946
|
+
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; }
|
|
19949
19947
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19950
19948
|
var children = props.children,
|
|
19951
19949
|
className = props.className,
|
|
19952
|
-
others = _objectWithoutProperties$
|
|
19950
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19953
19951
|
var layerClass = classNames('recharts-layer', className);
|
|
19954
19952
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19955
19953
|
className: layerClass
|
|
@@ -23364,16 +23362,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23364
23362
|
stackOffsetNone(series, order);
|
|
23365
23363
|
}
|
|
23366
23364
|
|
|
23367
|
-
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); }
|
|
23368
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23369
23365
|
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); }
|
|
23370
|
-
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; }
|
|
23371
|
-
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; }
|
|
23372
|
-
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; }
|
|
23373
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23374
|
-
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); }
|
|
23375
|
-
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; }
|
|
23376
|
-
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; }
|
|
23377
23366
|
var symbolFactories = {
|
|
23378
23367
|
symbolCircle: symbolCircle,
|
|
23379
23368
|
symbolCross: symbolCross,
|
|
@@ -23412,35 +23401,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23412
23401
|
return Math.PI * size * size / 4;
|
|
23413
23402
|
}
|
|
23414
23403
|
};
|
|
23404
|
+
var symbolsDefaultProps = {
|
|
23405
|
+
type: 'circle',
|
|
23406
|
+
size: 64,
|
|
23407
|
+
sizeType: 'area'
|
|
23408
|
+
};
|
|
23415
23409
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23416
23410
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23417
23411
|
};
|
|
23418
|
-
var Symbols = function Symbols(
|
|
23419
|
-
var _ref$type = _ref.type,
|
|
23420
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23421
|
-
_ref$size = _ref.size,
|
|
23422
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23423
|
-
_ref$sizeType = _ref.sizeType,
|
|
23424
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23425
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23426
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23427
|
-
type: type,
|
|
23428
|
-
size: size,
|
|
23429
|
-
sizeType: sizeType
|
|
23430
|
-
});
|
|
23431
|
-
|
|
23412
|
+
var Symbols = function Symbols(props) {
|
|
23432
23413
|
/**
|
|
23433
23414
|
* Calculate the path of curve
|
|
23434
23415
|
* @return {String} path
|
|
23435
23416
|
*/
|
|
23436
23417
|
var getPath = function getPath() {
|
|
23418
|
+
var size = props.size,
|
|
23419
|
+
sizeType = props.sizeType,
|
|
23420
|
+
type = props.type;
|
|
23437
23421
|
var symbolFactory = getSymbolFactory(type);
|
|
23438
23422
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23439
23423
|
return symbol();
|
|
23440
23424
|
};
|
|
23441
23425
|
var className = props.className,
|
|
23442
23426
|
cx = props.cx,
|
|
23443
|
-
cy = props.cy
|
|
23427
|
+
cy = props.cy,
|
|
23428
|
+
size = props.size;
|
|
23444
23429
|
var filteredProps = filterProps(props, true);
|
|
23445
23430
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23446
23431
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23451,34 +23436,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23451
23436
|
}
|
|
23452
23437
|
return null;
|
|
23453
23438
|
};
|
|
23439
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23454
23440
|
Symbols.registerSymbol = registerSymbol;
|
|
23455
23441
|
|
|
23456
|
-
function _typeof$
|
|
23442
|
+
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); }
|
|
23457
23443
|
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); }
|
|
23458
|
-
function ownKeys$
|
|
23459
|
-
function _objectSpread$
|
|
23460
|
-
function _classCallCheck$
|
|
23461
|
-
function _defineProperties$
|
|
23462
|
-
function _createClass$
|
|
23463
|
-
function _inherits$
|
|
23464
|
-
function _setPrototypeOf$
|
|
23465
|
-
function _createSuper$
|
|
23466
|
-
function _possibleConstructorReturn$
|
|
23467
|
-
function _assertThisInitialized$
|
|
23468
|
-
function _isNativeReflectConstruct$
|
|
23469
|
-
function _getPrototypeOf$
|
|
23470
|
-
function _defineProperty$
|
|
23471
|
-
function _toPropertyKey$
|
|
23472
|
-
function _toPrimitive$
|
|
23444
|
+
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; }
|
|
23445
|
+
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; }
|
|
23446
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23447
|
+
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); } }
|
|
23448
|
+
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; }
|
|
23449
|
+
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); }
|
|
23450
|
+
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); }
|
|
23451
|
+
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); }; }
|
|
23452
|
+
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); }
|
|
23453
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23454
|
+
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; } }
|
|
23455
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23456
|
+
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; }
|
|
23457
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23458
|
+
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); }
|
|
23473
23459
|
var SIZE = 32;
|
|
23474
23460
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23475
|
-
_inherits$
|
|
23476
|
-
var _super = _createSuper$
|
|
23461
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23462
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23477
23463
|
function DefaultLegendContent() {
|
|
23478
|
-
_classCallCheck$
|
|
23464
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23479
23465
|
return _super.apply(this, arguments);
|
|
23480
23466
|
}
|
|
23481
|
-
_createClass$
|
|
23467
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23482
23468
|
key: "renderIcon",
|
|
23483
23469
|
value:
|
|
23484
23470
|
/**
|
|
@@ -23523,7 +23509,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23523
23509
|
});
|
|
23524
23510
|
}
|
|
23525
23511
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23526
|
-
var iconProps = _objectSpread$
|
|
23512
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23527
23513
|
delete iconProps.legendIcon;
|
|
23528
23514
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23529
23515
|
}
|
|
@@ -23571,7 +23557,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23571
23557
|
var finalFormatter = entry.formatter || formatter;
|
|
23572
23558
|
var className = classNames((_classNames = {
|
|
23573
23559
|
'recharts-legend-item': true
|
|
23574
|
-
}, _defineProperty$
|
|
23560
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23575
23561
|
if (entry.type === 'none') {
|
|
23576
23562
|
return null;
|
|
23577
23563
|
}
|
|
@@ -23616,8 +23602,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23616
23602
|
}]);
|
|
23617
23603
|
return DefaultLegendContent;
|
|
23618
23604
|
}(PureComponent);
|
|
23619
|
-
_defineProperty$
|
|
23620
|
-
_defineProperty$
|
|
23605
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23606
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23621
23607
|
iconSize: 14,
|
|
23622
23608
|
layout: 'horizontal',
|
|
23623
23609
|
align: 'center',
|
|
@@ -23625,25 +23611,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23625
23611
|
inactiveColor: '#ccc'
|
|
23626
23612
|
});
|
|
23627
23613
|
|
|
23628
|
-
function _typeof$
|
|
23629
|
-
var _excluded$
|
|
23630
|
-
function ownKeys$
|
|
23631
|
-
function _objectSpread$
|
|
23632
|
-
function _classCallCheck$
|
|
23633
|
-
function _defineProperties$
|
|
23634
|
-
function _createClass$
|
|
23635
|
-
function _inherits$
|
|
23636
|
-
function _setPrototypeOf$
|
|
23637
|
-
function _createSuper$
|
|
23638
|
-
function _possibleConstructorReturn$
|
|
23639
|
-
function _assertThisInitialized$
|
|
23640
|
-
function _isNativeReflectConstruct$
|
|
23641
|
-
function _getPrototypeOf$
|
|
23642
|
-
function _defineProperty$
|
|
23643
|
-
function _toPropertyKey$
|
|
23644
|
-
function _toPrimitive$
|
|
23645
|
-
function _objectWithoutProperties$
|
|
23646
|
-
function _objectWithoutPropertiesLoose$
|
|
23614
|
+
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); }
|
|
23615
|
+
var _excluded$9 = ["ref"];
|
|
23616
|
+
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; }
|
|
23617
|
+
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; }
|
|
23618
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23619
|
+
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); } }
|
|
23620
|
+
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; }
|
|
23621
|
+
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); }
|
|
23622
|
+
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); }
|
|
23623
|
+
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); }; }
|
|
23624
|
+
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); }
|
|
23625
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23626
|
+
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; } }
|
|
23627
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23628
|
+
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; }
|
|
23629
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23630
|
+
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); }
|
|
23631
|
+
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; }
|
|
23632
|
+
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; }
|
|
23647
23633
|
function defaultUniqBy$1(entry) {
|
|
23648
23634
|
return entry.value;
|
|
23649
23635
|
}
|
|
@@ -23664,27 +23650,27 @@ function renderContent$1(content, props) {
|
|
|
23664
23650
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23665
23651
|
}
|
|
23666
23652
|
props.ref;
|
|
23667
|
-
var otherProps = _objectWithoutProperties$
|
|
23653
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23668
23654
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23669
23655
|
}
|
|
23670
23656
|
var EPS$2 = 1;
|
|
23671
23657
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23672
|
-
_inherits$
|
|
23673
|
-
var _super = _createSuper$
|
|
23658
|
+
_inherits$7(Legend, _PureComponent);
|
|
23659
|
+
var _super = _createSuper$7(Legend);
|
|
23674
23660
|
function Legend() {
|
|
23675
23661
|
var _this;
|
|
23676
|
-
_classCallCheck$
|
|
23662
|
+
_classCallCheck$9(this, Legend);
|
|
23677
23663
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23678
23664
|
args[_key] = arguments[_key];
|
|
23679
23665
|
}
|
|
23680
23666
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23681
|
-
_defineProperty$
|
|
23667
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23682
23668
|
boxWidth: -1,
|
|
23683
23669
|
boxHeight: -1
|
|
23684
23670
|
});
|
|
23685
23671
|
return _this;
|
|
23686
23672
|
}
|
|
23687
|
-
_createClass$
|
|
23673
|
+
_createClass$9(Legend, [{
|
|
23688
23674
|
key: "componentDidMount",
|
|
23689
23675
|
value: function componentDidMount() {
|
|
23690
23676
|
this.updateBBox();
|
|
@@ -23759,7 +23745,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23759
23745
|
};
|
|
23760
23746
|
}
|
|
23761
23747
|
}
|
|
23762
|
-
return _objectSpread$
|
|
23748
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23763
23749
|
}
|
|
23764
23750
|
}, {
|
|
23765
23751
|
key: "updateBBox",
|
|
@@ -23802,7 +23788,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23802
23788
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23803
23789
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23804
23790
|
payload = _this$props2.payload;
|
|
23805
|
-
var outerStyle = _objectSpread$
|
|
23791
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23806
23792
|
position: 'absolute',
|
|
23807
23793
|
width: width || 'auto',
|
|
23808
23794
|
height: height || 'auto'
|
|
@@ -23813,7 +23799,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23813
23799
|
ref: function ref(node) {
|
|
23814
23800
|
_this2.wrapperNode = node;
|
|
23815
23801
|
}
|
|
23816
|
-
}, renderContent$1(content, _objectSpread$
|
|
23802
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23817
23803
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23818
23804
|
})));
|
|
23819
23805
|
}
|
|
@@ -23836,8 +23822,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23836
23822
|
}]);
|
|
23837
23823
|
return Legend;
|
|
23838
23824
|
}(PureComponent);
|
|
23839
|
-
_defineProperty$
|
|
23840
|
-
_defineProperty$
|
|
23825
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23826
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23841
23827
|
iconSize: 14,
|
|
23842
23828
|
layout: 'horizontal',
|
|
23843
23829
|
align: 'center',
|
|
@@ -24401,13 +24387,13 @@ function setRafTimeout(callback) {
|
|
|
24401
24387
|
requestAnimationFrame(shouldUpdate);
|
|
24402
24388
|
}
|
|
24403
24389
|
|
|
24404
|
-
function _typeof$
|
|
24405
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24406
|
-
function _nonIterableRest$
|
|
24407
|
-
function _unsupportedIterableToArray$
|
|
24408
|
-
function _arrayLikeToArray$
|
|
24390
|
+
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); }
|
|
24391
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24392
|
+
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."); }
|
|
24393
|
+
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); }
|
|
24394
|
+
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; }
|
|
24409
24395
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24410
|
-
function _arrayWithHoles$
|
|
24396
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24411
24397
|
function createAnimateManager() {
|
|
24412
24398
|
var currStyle = {};
|
|
24413
24399
|
var handleChange = function handleChange() {
|
|
@@ -24434,7 +24420,7 @@ function createAnimateManager() {
|
|
|
24434
24420
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24435
24421
|
return;
|
|
24436
24422
|
}
|
|
24437
|
-
if (_typeof$
|
|
24423
|
+
if (_typeof$o(_style) === 'object') {
|
|
24438
24424
|
currStyle = _style;
|
|
24439
24425
|
handleChange(currStyle);
|
|
24440
24426
|
}
|
|
@@ -24461,12 +24447,12 @@ function createAnimateManager() {
|
|
|
24461
24447
|
};
|
|
24462
24448
|
}
|
|
24463
24449
|
|
|
24464
|
-
function _typeof$
|
|
24465
|
-
function ownKeys$
|
|
24466
|
-
function _objectSpread$
|
|
24467
|
-
function _defineProperty$
|
|
24468
|
-
function _toPropertyKey$
|
|
24469
|
-
function _toPrimitive$
|
|
24450
|
+
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); }
|
|
24451
|
+
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; }
|
|
24452
|
+
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; }
|
|
24453
|
+
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; }
|
|
24454
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24455
|
+
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); }
|
|
24470
24456
|
/* eslint no-console: 0 */
|
|
24471
24457
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24472
24458
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24498,7 +24484,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24498
24484
|
*/
|
|
24499
24485
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24500
24486
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24501
|
-
return _defineProperty$
|
|
24487
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24502
24488
|
}
|
|
24503
24489
|
var isTransition = name === 'transition';
|
|
24504
24490
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24509,7 +24495,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24509
24495
|
if (isTransition) {
|
|
24510
24496
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24511
24497
|
}
|
|
24512
|
-
return _objectSpread$
|
|
24498
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24513
24499
|
}, {});
|
|
24514
24500
|
};
|
|
24515
24501
|
|
|
@@ -24519,7 +24505,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24519
24505
|
*/
|
|
24520
24506
|
var mapObject = function mapObject(fn, obj) {
|
|
24521
24507
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24522
|
-
return _objectSpread$
|
|
24508
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24523
24509
|
}, {});
|
|
24524
24510
|
};
|
|
24525
24511
|
|
|
@@ -24529,7 +24515,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24529
24515
|
*/
|
|
24530
24516
|
var translateStyle = function translateStyle(style) {
|
|
24531
24517
|
return Object.keys(style).reduce(function (res, key) {
|
|
24532
|
-
return _objectSpread$
|
|
24518
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24533
24519
|
}, style);
|
|
24534
24520
|
};
|
|
24535
24521
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24557,16 +24543,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24557
24543
|
}
|
|
24558
24544
|
};
|
|
24559
24545
|
|
|
24560
|
-
function _slicedToArray$
|
|
24561
|
-
function _nonIterableRest$
|
|
24562
|
-
function _iterableToArrayLimit$
|
|
24563
|
-
function _arrayWithHoles$
|
|
24564
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24546
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24547
|
+
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."); }
|
|
24548
|
+
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; } }
|
|
24549
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24550
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24565
24551
|
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."); }
|
|
24566
|
-
function _unsupportedIterableToArray$
|
|
24552
|
+
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); }
|
|
24567
24553
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24568
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24569
|
-
function _arrayLikeToArray$
|
|
24554
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24555
|
+
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; }
|
|
24570
24556
|
var ACCURACY = 1e-4;
|
|
24571
24557
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24572
24558
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24642,7 +24628,7 @@ var configBezier = function configBezier() {
|
|
|
24642
24628
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24643
24629
|
return parseFloat(x);
|
|
24644
24630
|
});
|
|
24645
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24631
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24646
24632
|
x1 = _easing$1$split$0$spl2[0];
|
|
24647
24633
|
y1 = _easing$1$split$0$spl2[1];
|
|
24648
24634
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24735,22 +24721,22 @@ var configEasing = function configEasing() {
|
|
|
24735
24721
|
return null;
|
|
24736
24722
|
};
|
|
24737
24723
|
|
|
24738
|
-
function _typeof$
|
|
24739
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24724
|
+
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); }
|
|
24725
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24740
24726
|
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."); }
|
|
24741
24727
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24742
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24743
|
-
function ownKeys$
|
|
24744
|
-
function _objectSpread$
|
|
24745
|
-
function _defineProperty$
|
|
24746
|
-
function _toPropertyKey$
|
|
24747
|
-
function _toPrimitive$
|
|
24748
|
-
function _slicedToArray$
|
|
24749
|
-
function _nonIterableRest$
|
|
24750
|
-
function _unsupportedIterableToArray$
|
|
24751
|
-
function _arrayLikeToArray$
|
|
24752
|
-
function _iterableToArrayLimit$
|
|
24753
|
-
function _arrayWithHoles$
|
|
24728
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24729
|
+
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; }
|
|
24730
|
+
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; }
|
|
24731
|
+
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; }
|
|
24732
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24733
|
+
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); }
|
|
24734
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24735
|
+
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."); }
|
|
24736
|
+
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); }
|
|
24737
|
+
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; }
|
|
24738
|
+
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; } }
|
|
24739
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24754
24740
|
var alpha = function alpha(begin, end, k) {
|
|
24755
24741
|
return begin + (end - begin) * k;
|
|
24756
24742
|
};
|
|
@@ -24768,10 +24754,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24768
24754
|
var nextStepVals = mapObject(function (key, val) {
|
|
24769
24755
|
if (needContinue(val)) {
|
|
24770
24756
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24771
|
-
_easing2 = _slicedToArray$
|
|
24757
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24772
24758
|
newX = _easing2[0],
|
|
24773
24759
|
newV = _easing2[1];
|
|
24774
|
-
return _objectSpread$
|
|
24760
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24775
24761
|
from: newX,
|
|
24776
24762
|
velocity: newV
|
|
24777
24763
|
});
|
|
@@ -24781,7 +24767,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24781
24767
|
if (steps < 1) {
|
|
24782
24768
|
return mapObject(function (key, val) {
|
|
24783
24769
|
if (needContinue(val)) {
|
|
24784
|
-
return _objectSpread$
|
|
24770
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24785
24771
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24786
24772
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24787
24773
|
});
|
|
@@ -24796,10 +24782,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24796
24782
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24797
24783
|
var interKeys = getIntersectionKeys(from, to);
|
|
24798
24784
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24799
|
-
return _objectSpread$
|
|
24785
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24800
24786
|
}, {});
|
|
24801
24787
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24802
|
-
return _objectSpread$
|
|
24788
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24803
24789
|
from: from[key],
|
|
24804
24790
|
velocity: 0,
|
|
24805
24791
|
to: to[key]
|
|
@@ -24829,7 +24815,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24829
24815
|
var steps = deltaTime / easing.dt;
|
|
24830
24816
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24831
24817
|
// get union set and add compatible prefix
|
|
24832
|
-
render(_objectSpread$
|
|
24818
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24833
24819
|
preTime = now;
|
|
24834
24820
|
if (!shouldStopAnimation()) {
|
|
24835
24821
|
cafId = requestAnimationFrame(update);
|
|
@@ -24847,14 +24833,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24847
24833
|
}, timingStyle);
|
|
24848
24834
|
|
|
24849
24835
|
// get union set and add compatible prefix
|
|
24850
|
-
render(_objectSpread$
|
|
24836
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24851
24837
|
if (t < 1) {
|
|
24852
24838
|
cafId = requestAnimationFrame(update);
|
|
24853
24839
|
} else {
|
|
24854
24840
|
var finalStyle = mapObject(function (key, val) {
|
|
24855
24841
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24856
24842
|
}, timingStyle);
|
|
24857
|
-
render(_objectSpread$
|
|
24843
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24858
24844
|
}
|
|
24859
24845
|
};
|
|
24860
24846
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24870,37 +24856,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24870
24856
|
};
|
|
24871
24857
|
});
|
|
24872
24858
|
|
|
24873
|
-
function _typeof$
|
|
24874
|
-
var _excluded$
|
|
24875
|
-
function _objectWithoutProperties$
|
|
24876
|
-
function _objectWithoutPropertiesLoose$
|
|
24877
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24859
|
+
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); }
|
|
24860
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24861
|
+
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; }
|
|
24862
|
+
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; }
|
|
24863
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24878
24864
|
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."); }
|
|
24879
|
-
function _unsupportedIterableToArray$
|
|
24865
|
+
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); }
|
|
24880
24866
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24881
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24882
|
-
function _arrayLikeToArray$
|
|
24883
|
-
function ownKeys$
|
|
24884
|
-
function _objectSpread$
|
|
24885
|
-
function _defineProperty$
|
|
24886
|
-
function _classCallCheck$
|
|
24887
|
-
function _defineProperties$
|
|
24888
|
-
function _createClass$
|
|
24889
|
-
function _toPropertyKey$
|
|
24890
|
-
function _toPrimitive$
|
|
24891
|
-
function _inherits$
|
|
24892
|
-
function _setPrototypeOf$
|
|
24893
|
-
function _createSuper$
|
|
24894
|
-
function _possibleConstructorReturn$
|
|
24895
|
-
function _assertThisInitialized$
|
|
24896
|
-
function _isNativeReflectConstruct$
|
|
24897
|
-
function _getPrototypeOf$
|
|
24867
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24868
|
+
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; }
|
|
24869
|
+
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; }
|
|
24870
|
+
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; }
|
|
24871
|
+
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; }
|
|
24872
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24873
|
+
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); } }
|
|
24874
|
+
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; }
|
|
24875
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24876
|
+
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); }
|
|
24877
|
+
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); }
|
|
24878
|
+
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); }
|
|
24879
|
+
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); }; }
|
|
24880
|
+
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); }
|
|
24881
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24882
|
+
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; } }
|
|
24883
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24898
24884
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24899
|
-
_inherits$
|
|
24900
|
-
var _super = _createSuper$
|
|
24885
|
+
_inherits$6(Animate, _PureComponent);
|
|
24886
|
+
var _super = _createSuper$6(Animate);
|
|
24901
24887
|
function Animate(props, context) {
|
|
24902
24888
|
var _this;
|
|
24903
|
-
_classCallCheck$
|
|
24889
|
+
_classCallCheck$8(this, Animate);
|
|
24904
24890
|
_this = _super.call(this, props, context);
|
|
24905
24891
|
var _this$props = _this.props,
|
|
24906
24892
|
isActive = _this$props.isActive,
|
|
@@ -24910,8 +24896,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24910
24896
|
steps = _this$props.steps,
|
|
24911
24897
|
children = _this$props.children,
|
|
24912
24898
|
duration = _this$props.duration;
|
|
24913
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24914
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24899
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24900
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24915
24901
|
if (!isActive || duration <= 0) {
|
|
24916
24902
|
_this.state = {
|
|
24917
24903
|
style: {}
|
|
@@ -24923,7 +24909,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24923
24909
|
style: to
|
|
24924
24910
|
};
|
|
24925
24911
|
}
|
|
24926
|
-
return _possibleConstructorReturn$
|
|
24912
|
+
return _possibleConstructorReturn$6(_this);
|
|
24927
24913
|
}
|
|
24928
24914
|
if (steps && steps.length) {
|
|
24929
24915
|
_this.state = {
|
|
@@ -24934,10 +24920,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24934
24920
|
_this.state = {
|
|
24935
24921
|
style: from
|
|
24936
24922
|
};
|
|
24937
|
-
return _possibleConstructorReturn$
|
|
24923
|
+
return _possibleConstructorReturn$6(_this);
|
|
24938
24924
|
}
|
|
24939
24925
|
_this.state = {
|
|
24940
|
-
style: attributeName ? _defineProperty$
|
|
24926
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24941
24927
|
};
|
|
24942
24928
|
} else {
|
|
24943
24929
|
_this.state = {
|
|
@@ -24946,7 +24932,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24946
24932
|
}
|
|
24947
24933
|
return _this;
|
|
24948
24934
|
}
|
|
24949
|
-
_createClass$
|
|
24935
|
+
_createClass$8(Animate, [{
|
|
24950
24936
|
key: "componentDidMount",
|
|
24951
24937
|
value: function componentDidMount() {
|
|
24952
24938
|
var _this$props2 = this.props,
|
|
@@ -24974,7 +24960,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24974
24960
|
}
|
|
24975
24961
|
if (!isActive) {
|
|
24976
24962
|
var newState = {
|
|
24977
|
-
style: attributeName ? _defineProperty$
|
|
24963
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24978
24964
|
};
|
|
24979
24965
|
if (this.state && style) {
|
|
24980
24966
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24997,14 +24983,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24997
24983
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24998
24984
|
if (this.state && style) {
|
|
24999
24985
|
var _newState = {
|
|
25000
|
-
style: attributeName ? _defineProperty$
|
|
24986
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25001
24987
|
};
|
|
25002
24988
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25003
24989
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25004
24990
|
this.setState(_newState);
|
|
25005
24991
|
}
|
|
25006
24992
|
}
|
|
25007
|
-
this.runAnimation(_objectSpread$
|
|
24993
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
25008
24994
|
from: from,
|
|
25009
24995
|
begin: 0
|
|
25010
24996
|
}));
|
|
@@ -25087,7 +25073,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25087
25073
|
}), duration]);
|
|
25088
25074
|
}
|
|
25089
25075
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25090
|
-
var newStyle = _objectSpread$
|
|
25076
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25091
25077
|
transition: transition
|
|
25092
25078
|
});
|
|
25093
25079
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25119,9 +25105,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25119
25105
|
this.runStepAnimation(props);
|
|
25120
25106
|
return;
|
|
25121
25107
|
}
|
|
25122
|
-
var to = attributeName ? _defineProperty$
|
|
25108
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25123
25109
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25124
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25110
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25125
25111
|
transition: transition
|
|
25126
25112
|
}), duration, onAnimationEnd]);
|
|
25127
25113
|
}
|
|
@@ -25142,7 +25128,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25142
25128
|
_this$props4.onAnimationEnd;
|
|
25143
25129
|
_this$props4.shouldReAnimate;
|
|
25144
25130
|
_this$props4.onAnimationReStart;
|
|
25145
|
-
var others = _objectWithoutProperties$
|
|
25131
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25146
25132
|
var count = Children.count(children);
|
|
25147
25133
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25148
25134
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25157,8 +25143,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25157
25143
|
_container$props$styl = _container$props.style,
|
|
25158
25144
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25159
25145
|
className = _container$props.className;
|
|
25160
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25161
|
-
style: _objectSpread$
|
|
25146
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25147
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25162
25148
|
className: className
|
|
25163
25149
|
}));
|
|
25164
25150
|
return res;
|
|
@@ -25683,10 +25669,10 @@ var defineProperty$2 = (function() {
|
|
|
25683
25669
|
} catch (e) {}
|
|
25684
25670
|
}());
|
|
25685
25671
|
|
|
25686
|
-
var _defineProperty$
|
|
25672
|
+
var _defineProperty$l = defineProperty$2;
|
|
25687
25673
|
|
|
25688
25674
|
var constant$1 = constant_1,
|
|
25689
|
-
defineProperty$1 = _defineProperty$
|
|
25675
|
+
defineProperty$1 = _defineProperty$l,
|
|
25690
25676
|
identity$7 = identity_1;
|
|
25691
25677
|
|
|
25692
25678
|
/**
|
|
@@ -25863,18 +25849,18 @@ var sortBy_1 = sortBy;
|
|
|
25863
25849
|
/**
|
|
25864
25850
|
* @fileOverview Default Tooltip Content
|
|
25865
25851
|
*/
|
|
25866
|
-
function _typeof$
|
|
25867
|
-
function _slicedToArray$
|
|
25868
|
-
function _nonIterableRest$
|
|
25869
|
-
function _unsupportedIterableToArray$
|
|
25870
|
-
function _arrayLikeToArray$
|
|
25871
|
-
function _iterableToArrayLimit$
|
|
25872
|
-
function _arrayWithHoles$
|
|
25873
|
-
function ownKeys$
|
|
25874
|
-
function _objectSpread$
|
|
25875
|
-
function _defineProperty$
|
|
25876
|
-
function _toPropertyKey$
|
|
25877
|
-
function _toPrimitive$
|
|
25852
|
+
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); }
|
|
25853
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25854
|
+
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."); }
|
|
25855
|
+
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); }
|
|
25856
|
+
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; }
|
|
25857
|
+
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; } }
|
|
25858
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25859
|
+
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; }
|
|
25860
|
+
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; }
|
|
25861
|
+
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; }
|
|
25862
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25863
|
+
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); }
|
|
25878
25864
|
function defaultFormatter(value) {
|
|
25879
25865
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25880
25866
|
}
|
|
@@ -25904,7 +25890,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25904
25890
|
if (entry.type === 'none') {
|
|
25905
25891
|
return null;
|
|
25906
25892
|
}
|
|
25907
|
-
var finalItemStyle = _objectSpread$
|
|
25893
|
+
var finalItemStyle = _objectSpread$j({
|
|
25908
25894
|
display: 'block',
|
|
25909
25895
|
paddingTop: 4,
|
|
25910
25896
|
paddingBottom: 4,
|
|
@@ -25918,7 +25904,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25918
25904
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25919
25905
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25920
25906
|
if (Array.isArray(formatted)) {
|
|
25921
|
-
var _formatted = _slicedToArray$
|
|
25907
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25922
25908
|
finalValue = _formatted[0];
|
|
25923
25909
|
finalName = _formatted[1];
|
|
25924
25910
|
} else {
|
|
@@ -25950,14 +25936,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25950
25936
|
}
|
|
25951
25937
|
return null;
|
|
25952
25938
|
};
|
|
25953
|
-
var finalStyle = _objectSpread$
|
|
25939
|
+
var finalStyle = _objectSpread$j({
|
|
25954
25940
|
margin: 0,
|
|
25955
25941
|
padding: 10,
|
|
25956
25942
|
backgroundColor: '#fff',
|
|
25957
25943
|
border: '1px solid #ccc',
|
|
25958
25944
|
whiteSpace: 'nowrap'
|
|
25959
25945
|
}, contentStyle);
|
|
25960
|
-
var finalLabelStyle = _objectSpread$
|
|
25946
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25961
25947
|
margin: 0
|
|
25962
25948
|
}, labelStyle);
|
|
25963
25949
|
var hasLabel = !isNil_1(label);
|
|
@@ -25998,22 +25984,18 @@ var Global = {
|
|
|
25998
25984
|
}
|
|
25999
25985
|
};
|
|
26000
25986
|
|
|
26001
|
-
function _typeof$
|
|
26002
|
-
function ownKeys$
|
|
26003
|
-
function _objectSpread$
|
|
26004
|
-
function
|
|
26005
|
-
function
|
|
26006
|
-
function
|
|
26007
|
-
function
|
|
26008
|
-
function
|
|
26009
|
-
function
|
|
26010
|
-
function
|
|
26011
|
-
function
|
|
26012
|
-
function
|
|
26013
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26014
|
-
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; }
|
|
26015
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26016
|
-
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); }
|
|
25987
|
+
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); }
|
|
25988
|
+
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; }
|
|
25989
|
+
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; }
|
|
25990
|
+
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; }
|
|
25991
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25992
|
+
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); }
|
|
25993
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25994
|
+
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."); }
|
|
25995
|
+
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); }
|
|
25996
|
+
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; }
|
|
25997
|
+
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; } }
|
|
25998
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26017
25999
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26018
26000
|
var EPS$1 = 1;
|
|
26019
26001
|
function defaultUniqBy(entry) {
|
|
@@ -26037,204 +26019,7 @@ function renderContent(content, props) {
|
|
|
26037
26019
|
}
|
|
26038
26020
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26039
26021
|
}
|
|
26040
|
-
var
|
|
26041
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26042
|
-
var _super = _createSuper$6(Tooltip);
|
|
26043
|
-
function Tooltip() {
|
|
26044
|
-
var _this;
|
|
26045
|
-
_classCallCheck$8(this, Tooltip);
|
|
26046
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26047
|
-
args[_key] = arguments[_key];
|
|
26048
|
-
}
|
|
26049
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26050
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26051
|
-
boxWidth: -1,
|
|
26052
|
-
boxHeight: -1,
|
|
26053
|
-
dismissed: false,
|
|
26054
|
-
dismissedAtCoordinate: {
|
|
26055
|
-
x: 0,
|
|
26056
|
-
y: 0
|
|
26057
|
-
}
|
|
26058
|
-
});
|
|
26059
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26060
|
-
if (event.key === 'Escape') {
|
|
26061
|
-
_this.setState({
|
|
26062
|
-
dismissed: true,
|
|
26063
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26064
|
-
x: _this.props.coordinate.x,
|
|
26065
|
-
y: _this.props.coordinate.y
|
|
26066
|
-
})
|
|
26067
|
-
});
|
|
26068
|
-
}
|
|
26069
|
-
});
|
|
26070
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26071
|
-
var key = _ref.key,
|
|
26072
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26073
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26074
|
-
var _this$props = _this.props,
|
|
26075
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26076
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26077
|
-
coordinate = _this$props.coordinate,
|
|
26078
|
-
offset = _this$props.offset,
|
|
26079
|
-
position = _this$props.position,
|
|
26080
|
-
viewBox = _this$props.viewBox;
|
|
26081
|
-
if (position && isNumber(position[key])) {
|
|
26082
|
-
return position[key];
|
|
26083
|
-
}
|
|
26084
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26085
|
-
var positive = coordinate[key] + offset;
|
|
26086
|
-
if (allowEscapeViewBox[key]) {
|
|
26087
|
-
return reverseDirection[key] ? negative : positive;
|
|
26088
|
-
}
|
|
26089
|
-
if (reverseDirection[key]) {
|
|
26090
|
-
var _tooltipBoundary = negative;
|
|
26091
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26092
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26093
|
-
return Math.max(positive, viewBox[key]);
|
|
26094
|
-
}
|
|
26095
|
-
return Math.max(negative, viewBox[key]);
|
|
26096
|
-
}
|
|
26097
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26098
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26099
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26100
|
-
return Math.max(negative, viewBox[key]);
|
|
26101
|
-
}
|
|
26102
|
-
return Math.max(positive, viewBox[key]);
|
|
26103
|
-
});
|
|
26104
|
-
return _this;
|
|
26105
|
-
}
|
|
26106
|
-
_createClass$8(Tooltip, [{
|
|
26107
|
-
key: "componentDidMount",
|
|
26108
|
-
value: function componentDidMount() {
|
|
26109
|
-
this.updateBBox();
|
|
26110
|
-
}
|
|
26111
|
-
}, {
|
|
26112
|
-
key: "componentWillUnmount",
|
|
26113
|
-
value: function componentWillUnmount() {
|
|
26114
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26115
|
-
}
|
|
26116
|
-
}, {
|
|
26117
|
-
key: "componentDidUpdate",
|
|
26118
|
-
value: function componentDidUpdate() {
|
|
26119
|
-
this.updateBBox();
|
|
26120
|
-
}
|
|
26121
|
-
}, {
|
|
26122
|
-
key: "updateBBox",
|
|
26123
|
-
value: function updateBBox() {
|
|
26124
|
-
var _this$state = this.state,
|
|
26125
|
-
boxWidth = _this$state.boxWidth,
|
|
26126
|
-
boxHeight = _this$state.boxHeight,
|
|
26127
|
-
dismissed = _this$state.dismissed;
|
|
26128
|
-
if (dismissed) {
|
|
26129
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26130
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26131
|
-
this.setState({
|
|
26132
|
-
dismissed: false
|
|
26133
|
-
});
|
|
26134
|
-
}
|
|
26135
|
-
} else {
|
|
26136
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26137
|
-
}
|
|
26138
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26139
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26140
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26141
|
-
this.setState({
|
|
26142
|
-
boxWidth: box.width,
|
|
26143
|
-
boxHeight: box.height
|
|
26144
|
-
});
|
|
26145
|
-
}
|
|
26146
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26147
|
-
this.setState({
|
|
26148
|
-
boxWidth: -1,
|
|
26149
|
-
boxHeight: -1
|
|
26150
|
-
});
|
|
26151
|
-
}
|
|
26152
|
-
}
|
|
26153
|
-
}, {
|
|
26154
|
-
key: "render",
|
|
26155
|
-
value: function render() {
|
|
26156
|
-
var _classNames,
|
|
26157
|
-
_this2 = this;
|
|
26158
|
-
var _this$props2 = this.props,
|
|
26159
|
-
payload = _this$props2.payload,
|
|
26160
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26161
|
-
animationDuration = _this$props2.animationDuration,
|
|
26162
|
-
animationEasing = _this$props2.animationEasing,
|
|
26163
|
-
filterNull = _this$props2.filterNull,
|
|
26164
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26165
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26166
|
-
return !isNil_1(entry.value);
|
|
26167
|
-
}) : payload);
|
|
26168
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26169
|
-
var _this$props3 = this.props,
|
|
26170
|
-
content = _this$props3.content,
|
|
26171
|
-
viewBox = _this$props3.viewBox,
|
|
26172
|
-
coordinate = _this$props3.coordinate,
|
|
26173
|
-
position = _this$props3.position,
|
|
26174
|
-
active = _this$props3.active,
|
|
26175
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26176
|
-
var outerStyle = _objectSpread$l({
|
|
26177
|
-
pointerEvents: 'none',
|
|
26178
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26179
|
-
position: 'absolute',
|
|
26180
|
-
top: 0,
|
|
26181
|
-
left: 0
|
|
26182
|
-
}, wrapperStyle);
|
|
26183
|
-
var translateX, translateY;
|
|
26184
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26185
|
-
translateX = position.x;
|
|
26186
|
-
translateY = position.y;
|
|
26187
|
-
} else {
|
|
26188
|
-
var _this$state2 = this.state,
|
|
26189
|
-
boxWidth = _this$state2.boxWidth,
|
|
26190
|
-
boxHeight = _this$state2.boxHeight;
|
|
26191
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26192
|
-
translateX = this.getTranslate({
|
|
26193
|
-
key: 'x',
|
|
26194
|
-
tooltipDimension: boxWidth,
|
|
26195
|
-
viewBoxDimension: viewBox.width
|
|
26196
|
-
});
|
|
26197
|
-
translateY = this.getTranslate({
|
|
26198
|
-
key: 'y',
|
|
26199
|
-
tooltipDimension: boxHeight,
|
|
26200
|
-
viewBoxDimension: viewBox.height
|
|
26201
|
-
});
|
|
26202
|
-
} else {
|
|
26203
|
-
outerStyle.visibility = 'hidden';
|
|
26204
|
-
}
|
|
26205
|
-
}
|
|
26206
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26207
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26208
|
-
})), outerStyle);
|
|
26209
|
-
if (isAnimationActive && active) {
|
|
26210
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26211
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26212
|
-
})), outerStyle);
|
|
26213
|
-
}
|
|
26214
|
-
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));
|
|
26215
|
-
return (
|
|
26216
|
-
/*#__PURE__*/
|
|
26217
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26218
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26219
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26220
|
-
React__default.createElement("div", {
|
|
26221
|
-
tabIndex: -1,
|
|
26222
|
-
role: "dialog",
|
|
26223
|
-
className: cls,
|
|
26224
|
-
style: outerStyle,
|
|
26225
|
-
ref: function ref(node) {
|
|
26226
|
-
_this2.wrapperNode = node;
|
|
26227
|
-
}
|
|
26228
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26229
|
-
payload: finalPayload
|
|
26230
|
-
})))
|
|
26231
|
-
);
|
|
26232
|
-
}
|
|
26233
|
-
}]);
|
|
26234
|
-
return Tooltip;
|
|
26235
|
-
}(PureComponent);
|
|
26236
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26237
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26022
|
+
var tooltipDefaultProps = {
|
|
26238
26023
|
active: false,
|
|
26239
26024
|
allowEscapeViewBox: {
|
|
26240
26025
|
x: false,
|
|
@@ -26255,6 +26040,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26255
26040
|
x: 0,
|
|
26256
26041
|
y: 0
|
|
26257
26042
|
},
|
|
26043
|
+
// this doesn't exist on TooltipProps
|
|
26044
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26045
|
+
// @ts-ignore
|
|
26258
26046
|
cursorStyle: {},
|
|
26259
26047
|
separator: ' : ',
|
|
26260
26048
|
wrapperStyle: {},
|
|
@@ -26268,7 +26056,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26268
26056
|
animationDuration: 400,
|
|
26269
26057
|
filterNull: true,
|
|
26270
26058
|
useTranslate3d: false
|
|
26271
|
-
}
|
|
26059
|
+
};
|
|
26060
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26061
|
+
var _classNames;
|
|
26062
|
+
var _useState = useState(-1),
|
|
26063
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26064
|
+
boxWidth = _useState2[0],
|
|
26065
|
+
setBoxWidth = _useState2[1];
|
|
26066
|
+
var _useState3 = useState(-1),
|
|
26067
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26068
|
+
boxHeight = _useState4[0],
|
|
26069
|
+
setBoxHeight = _useState4[1];
|
|
26070
|
+
var _useState5 = useState(false),
|
|
26071
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26072
|
+
dismissed = _useState6[0],
|
|
26073
|
+
setDismissed = _useState6[1];
|
|
26074
|
+
var _useState7 = useState({
|
|
26075
|
+
x: 0,
|
|
26076
|
+
y: 0
|
|
26077
|
+
}),
|
|
26078
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26079
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26080
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26081
|
+
var wrapperNode = useRef();
|
|
26082
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26083
|
+
reverseDirection = props.reverseDirection,
|
|
26084
|
+
coordinate = props.coordinate,
|
|
26085
|
+
offset = props.offset,
|
|
26086
|
+
position = props.position,
|
|
26087
|
+
viewBox = props.viewBox;
|
|
26088
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26089
|
+
if (event.key === 'Escape') {
|
|
26090
|
+
setDismissed(true);
|
|
26091
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26092
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26093
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26094
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26095
|
+
});
|
|
26096
|
+
});
|
|
26097
|
+
}
|
|
26098
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26099
|
+
useEffect(function () {
|
|
26100
|
+
var updateBBox = function updateBBox() {
|
|
26101
|
+
if (dismissed) {
|
|
26102
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26103
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26104
|
+
setDismissed(false);
|
|
26105
|
+
}
|
|
26106
|
+
} else {
|
|
26107
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26108
|
+
}
|
|
26109
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26110
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26111
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26112
|
+
setBoxWidth(box.width);
|
|
26113
|
+
setBoxHeight(box.height);
|
|
26114
|
+
}
|
|
26115
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26116
|
+
setBoxWidth(-1);
|
|
26117
|
+
setBoxHeight(-1);
|
|
26118
|
+
}
|
|
26119
|
+
};
|
|
26120
|
+
updateBBox();
|
|
26121
|
+
return function () {
|
|
26122
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26123
|
+
};
|
|
26124
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26125
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26126
|
+
var key = _ref.key,
|
|
26127
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26128
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26129
|
+
if (position && isNumber(position[key])) {
|
|
26130
|
+
return position[key];
|
|
26131
|
+
}
|
|
26132
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26133
|
+
var positive = coordinate[key] + offset;
|
|
26134
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26135
|
+
return reverseDirection[key] ? negative : positive;
|
|
26136
|
+
}
|
|
26137
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26138
|
+
var _tooltipBoundary = negative;
|
|
26139
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26140
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26141
|
+
return Math.max(positive, viewBox[key]);
|
|
26142
|
+
}
|
|
26143
|
+
return Math.max(negative, viewBox[key]);
|
|
26144
|
+
}
|
|
26145
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26146
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26147
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26148
|
+
return Math.max(negative, viewBox[key]);
|
|
26149
|
+
}
|
|
26150
|
+
return Math.max(positive, viewBox[key]);
|
|
26151
|
+
};
|
|
26152
|
+
var payload = props.payload,
|
|
26153
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26154
|
+
filterNull = props.filterNull,
|
|
26155
|
+
active = props.active,
|
|
26156
|
+
wrapperStyle = props.wrapperStyle,
|
|
26157
|
+
useTranslate3d = props.useTranslate3d,
|
|
26158
|
+
isAnimationActive = props.isAnimationActive,
|
|
26159
|
+
animationDuration = props.animationDuration,
|
|
26160
|
+
animationEasing = props.animationEasing;
|
|
26161
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26162
|
+
return !isNil_1(entry.value);
|
|
26163
|
+
}) : payload);
|
|
26164
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26165
|
+
var content = props.content;
|
|
26166
|
+
var outerStyle = _objectSpread$i({
|
|
26167
|
+
pointerEvents: 'none',
|
|
26168
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26169
|
+
position: 'absolute',
|
|
26170
|
+
top: 0,
|
|
26171
|
+
left: 0
|
|
26172
|
+
}, wrapperStyle);
|
|
26173
|
+
var translateX, translateY;
|
|
26174
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26175
|
+
translateX = position.x;
|
|
26176
|
+
translateY = position.y;
|
|
26177
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26178
|
+
translateX = getTranslate({
|
|
26179
|
+
key: 'x',
|
|
26180
|
+
tooltipDimension: boxWidth,
|
|
26181
|
+
viewBoxDimension: viewBox.width
|
|
26182
|
+
});
|
|
26183
|
+
translateY = getTranslate({
|
|
26184
|
+
key: 'y',
|
|
26185
|
+
tooltipDimension: boxHeight,
|
|
26186
|
+
viewBoxDimension: viewBox.height
|
|
26187
|
+
});
|
|
26188
|
+
} else {
|
|
26189
|
+
outerStyle.visibility = 'hidden';
|
|
26190
|
+
}
|
|
26191
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26192
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26193
|
+
})), outerStyle);
|
|
26194
|
+
if (isAnimationActive && active) {
|
|
26195
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26196
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26197
|
+
})), outerStyle);
|
|
26198
|
+
}
|
|
26199
|
+
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));
|
|
26200
|
+
return (
|
|
26201
|
+
/*#__PURE__*/
|
|
26202
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26203
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26204
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26205
|
+
React__default.createElement("div", {
|
|
26206
|
+
tabIndex: -1,
|
|
26207
|
+
role: "dialog",
|
|
26208
|
+
className: cls,
|
|
26209
|
+
style: outerStyle,
|
|
26210
|
+
ref: wrapperNode
|
|
26211
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26212
|
+
payload: finalPayload
|
|
26213
|
+
})))
|
|
26214
|
+
);
|
|
26215
|
+
};
|
|
26216
|
+
|
|
26217
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26218
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26219
|
+
|
|
26220
|
+
/**
|
|
26221
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26222
|
+
* children.props when there are no props set by the consumer
|
|
26223
|
+
* doesn't work if using default parameters
|
|
26224
|
+
*/
|
|
26225
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26272
26226
|
|
|
26273
26227
|
var root = _root;
|
|
26274
26228
|
|
|
@@ -31838,12 +31792,12 @@ module.exports = exports['default'];
|
|
|
31838
31792
|
|
|
31839
31793
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31840
31794
|
|
|
31841
|
-
function _typeof$
|
|
31842
|
-
function ownKeys$
|
|
31843
|
-
function _objectSpread$
|
|
31844
|
-
function _defineProperty$
|
|
31845
|
-
function _toPropertyKey$
|
|
31846
|
-
function _toPrimitive$
|
|
31795
|
+
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); }
|
|
31796
|
+
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; }
|
|
31797
|
+
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; }
|
|
31798
|
+
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; }
|
|
31799
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31800
|
+
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); }
|
|
31847
31801
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31848
31802
|
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."); }
|
|
31849
31803
|
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); }
|
|
@@ -31911,7 +31865,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31911
31865
|
}
|
|
31912
31866
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31913
31867
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31914
|
-
var measurementSpanStyle = _objectSpread$
|
|
31868
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31915
31869
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31916
31870
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31917
31871
|
return styleKey;
|
|
@@ -31966,11 +31920,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31966
31920
|
};
|
|
31967
31921
|
};
|
|
31968
31922
|
|
|
31969
|
-
var _excluded$
|
|
31970
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31923
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31971
31924
|
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); }
|
|
31972
|
-
function _objectWithoutProperties$
|
|
31973
|
-
function _objectWithoutPropertiesLoose$
|
|
31925
|
+
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; }
|
|
31926
|
+
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; }
|
|
31974
31927
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31975
31928
|
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."); }
|
|
31976
31929
|
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); }
|
|
@@ -32124,46 +32077,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32124
32077
|
}
|
|
32125
32078
|
return getWordsWithoutCalculate(children);
|
|
32126
32079
|
};
|
|
32127
|
-
var
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32134
|
-
|
|
32135
|
-
|
|
32136
|
-
|
|
32137
|
-
|
|
32138
|
-
|
|
32139
|
-
|
|
32140
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32141
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32142
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32143
|
-
_ref5$fill = _ref5.fill,
|
|
32144
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32145
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32080
|
+
var textDefaultProps = {
|
|
32081
|
+
x: 0,
|
|
32082
|
+
y: 0,
|
|
32083
|
+
lineHeight: '1em',
|
|
32084
|
+
capHeight: '0.71em',
|
|
32085
|
+
// Magic number from d3
|
|
32086
|
+
scaleToFit: false,
|
|
32087
|
+
textAnchor: 'start',
|
|
32088
|
+
verticalAnchor: 'end',
|
|
32089
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32090
|
+
fill: '#808080'
|
|
32091
|
+
};
|
|
32092
|
+
var Text = function Text(props) {
|
|
32146
32093
|
var wordsByLines = useMemo(function () {
|
|
32147
32094
|
return getWordsByLines({
|
|
32148
32095
|
breakAll: props.breakAll,
|
|
32149
32096
|
children: props.children,
|
|
32150
32097
|
maxLines: props.maxLines,
|
|
32151
|
-
scaleToFit: scaleToFit,
|
|
32098
|
+
scaleToFit: props.scaleToFit,
|
|
32152
32099
|
style: props.style,
|
|
32153
32100
|
width: props.width
|
|
32154
32101
|
});
|
|
32155
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32102
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32156
32103
|
var dx = props.dx,
|
|
32157
32104
|
dy = props.dy,
|
|
32105
|
+
textAnchor = props.textAnchor,
|
|
32106
|
+
verticalAnchor = props.verticalAnchor,
|
|
32107
|
+
scaleToFit = props.scaleToFit,
|
|
32158
32108
|
angle = props.angle,
|
|
32109
|
+
lineHeight = props.lineHeight,
|
|
32110
|
+
capHeight = props.capHeight,
|
|
32159
32111
|
className = props.className,
|
|
32160
32112
|
breakAll = props.breakAll,
|
|
32161
|
-
textProps = _objectWithoutProperties$
|
|
32162
|
-
if (!isNumOrStr(
|
|
32113
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32114
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32163
32115
|
return null;
|
|
32164
32116
|
}
|
|
32165
|
-
var x =
|
|
32166
|
-
var y =
|
|
32117
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32118
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32167
32119
|
var startDy;
|
|
32168
32120
|
switch (verticalAnchor) {
|
|
32169
32121
|
case 'start':
|
|
@@ -32193,7 +32145,7 @@ var Text = function Text(_ref5) {
|
|
|
32193
32145
|
y: y,
|
|
32194
32146
|
className: classNames('recharts-text', className),
|
|
32195
32147
|
textAnchor: textAnchor,
|
|
32196
|
-
fill: fill.includes('url') ?
|
|
32148
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32197
32149
|
}), wordsByLines.map(function (line, index) {
|
|
32198
32150
|
return (
|
|
32199
32151
|
/*#__PURE__*/
|
|
@@ -32206,6 +32158,7 @@ var Text = function Text(_ref5) {
|
|
|
32206
32158
|
);
|
|
32207
32159
|
}));
|
|
32208
32160
|
};
|
|
32161
|
+
Text.defaultProps = textDefaultProps;
|
|
32209
32162
|
|
|
32210
32163
|
var baseIsEqual = _baseIsEqual;
|
|
32211
32164
|
|
|
@@ -38473,7 +38426,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38473
38426
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38474
38427
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38475
38428
|
|
|
38476
|
-
var _excluded$
|
|
38429
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38477
38430
|
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); }
|
|
38478
38431
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38479
38432
|
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."); }
|
|
@@ -38481,8 +38434,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38481
38434
|
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; }
|
|
38482
38435
|
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; } }
|
|
38483
38436
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38484
|
-
function _objectWithoutProperties$
|
|
38485
|
-
function _objectWithoutPropertiesLoose$
|
|
38437
|
+
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; }
|
|
38438
|
+
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; }
|
|
38486
38439
|
function ErrorBar(props) {
|
|
38487
38440
|
var offset = props.offset,
|
|
38488
38441
|
layout = props.layout,
|
|
@@ -38492,7 +38445,7 @@ function ErrorBar(props) {
|
|
|
38492
38445
|
dataPointFormatter = props.dataPointFormatter,
|
|
38493
38446
|
xAxis = props.xAxis,
|
|
38494
38447
|
yAxis = props.yAxis,
|
|
38495
|
-
others = _objectWithoutProperties$
|
|
38448
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38496
38449
|
var svgProps = filterProps(others);
|
|
38497
38450
|
var errorBars = data.map(function (entry, i) {
|
|
38498
38451
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38603,18 +38556,18 @@ ErrorBar.defaultProps = {
|
|
|
38603
38556
|
};
|
|
38604
38557
|
ErrorBar.displayName = 'ErrorBar';
|
|
38605
38558
|
|
|
38606
|
-
function _typeof$
|
|
38559
|
+
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); }
|
|
38607
38560
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38608
38561
|
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."); }
|
|
38609
38562
|
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); }
|
|
38610
38563
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38611
38564
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38612
38565
|
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; }
|
|
38613
|
-
function ownKeys$
|
|
38614
|
-
function _objectSpread$
|
|
38615
|
-
function _defineProperty$
|
|
38616
|
-
function _toPropertyKey$
|
|
38617
|
-
function _toPrimitive$
|
|
38566
|
+
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; }
|
|
38567
|
+
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; }
|
|
38568
|
+
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; }
|
|
38569
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38570
|
+
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); }
|
|
38618
38571
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38619
38572
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38620
38573
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38785,7 +38738,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38785
38738
|
};
|
|
38786
38739
|
});
|
|
38787
38740
|
}
|
|
38788
|
-
return _objectSpread$
|
|
38741
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38789
38742
|
payload: legendData,
|
|
38790
38743
|
item: legendItem
|
|
38791
38744
|
});
|
|
@@ -38939,10 +38892,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38939
38892
|
verticalAlign = legendProps.verticalAlign,
|
|
38940
38893
|
layout = legendProps.layout;
|
|
38941
38894
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38942
|
-
newOffset = _objectSpread$
|
|
38895
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38943
38896
|
}
|
|
38944
38897
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38945
|
-
newOffset = _objectSpread$
|
|
38898
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38946
38899
|
}
|
|
38947
38900
|
}
|
|
38948
38901
|
return newOffset;
|
|
@@ -39368,14 +39321,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39368
39321
|
items: [item]
|
|
39369
39322
|
};
|
|
39370
39323
|
}
|
|
39371
|
-
return _objectSpread$
|
|
39324
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39372
39325
|
}, {});
|
|
39373
39326
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39374
39327
|
var group = stackGroups[axisId];
|
|
39375
39328
|
if (group.hasStack) {
|
|
39376
39329
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39377
39330
|
var g = group.stackGroups[stackId];
|
|
39378
|
-
return _objectSpread$
|
|
39331
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39379
39332
|
numericAxisId: numericAxisId,
|
|
39380
39333
|
cateAxisId: cateAxisId,
|
|
39381
39334
|
items: g.items,
|
|
@@ -39383,7 +39336,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39383
39336
|
}));
|
|
39384
39337
|
}, {});
|
|
39385
39338
|
}
|
|
39386
|
-
return _objectSpread$
|
|
39339
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39387
39340
|
}, {});
|
|
39388
39341
|
};
|
|
39389
39342
|
|
|
@@ -39597,7 +39550,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39597
39550
|
formatter = _graphicalItem$props.formatter,
|
|
39598
39551
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39599
39552
|
chartType = _graphicalItem$props.chartType;
|
|
39600
|
-
return _objectSpread$
|
|
39553
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39601
39554
|
dataKey: dataKey,
|
|
39602
39555
|
unit: unit,
|
|
39603
39556
|
formatter: formatter,
|
|
@@ -39610,12 +39563,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39610
39563
|
});
|
|
39611
39564
|
};
|
|
39612
39565
|
|
|
39613
|
-
function _typeof$
|
|
39614
|
-
function ownKeys$
|
|
39615
|
-
function _objectSpread$
|
|
39616
|
-
function _defineProperty$
|
|
39617
|
-
function _toPropertyKey$
|
|
39618
|
-
function _toPrimitive$
|
|
39566
|
+
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); }
|
|
39567
|
+
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; }
|
|
39568
|
+
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; }
|
|
39569
|
+
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; }
|
|
39570
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39571
|
+
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); }
|
|
39619
39572
|
var RADIAN = Math.PI / 180;
|
|
39620
39573
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39621
39574
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39720,7 +39673,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39720
39673
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39721
39674
|
}
|
|
39722
39675
|
if (inRange) {
|
|
39723
|
-
return _objectSpread$
|
|
39676
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39724
39677
|
radius: radius,
|
|
39725
39678
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39726
39679
|
});
|
|
@@ -39728,21 +39681,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39728
39681
|
return null;
|
|
39729
39682
|
};
|
|
39730
39683
|
|
|
39731
|
-
function _typeof$
|
|
39732
|
-
var _excluded$7 = ["offset"];
|
|
39684
|
+
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); }
|
|
39733
39685
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39734
39686
|
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."); }
|
|
39735
39687
|
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); }
|
|
39736
39688
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39737
39689
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39738
39690
|
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; }
|
|
39739
|
-
function
|
|
39740
|
-
function
|
|
39741
|
-
function
|
|
39742
|
-
function
|
|
39743
|
-
function
|
|
39744
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39745
|
-
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); }
|
|
39691
|
+
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; }
|
|
39692
|
+
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; }
|
|
39693
|
+
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; }
|
|
39694
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39695
|
+
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); }
|
|
39746
39696
|
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); }
|
|
39747
39697
|
var getLabel = function getLabel(props) {
|
|
39748
39698
|
var value = props.value,
|
|
@@ -39887,7 +39837,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39887
39837
|
textAnchor: 'middle',
|
|
39888
39838
|
verticalAnchor: verticalEnd
|
|
39889
39839
|
};
|
|
39890
|
-
return _objectSpread$
|
|
39840
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39891
39841
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39892
39842
|
width: width
|
|
39893
39843
|
} : {});
|
|
@@ -39899,7 +39849,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39899
39849
|
textAnchor: 'middle',
|
|
39900
39850
|
verticalAnchor: verticalStart
|
|
39901
39851
|
};
|
|
39902
|
-
return _objectSpread$
|
|
39852
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39903
39853
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39904
39854
|
width: width
|
|
39905
39855
|
} : {});
|
|
@@ -39911,7 +39861,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39911
39861
|
textAnchor: horizontalEnd,
|
|
39912
39862
|
verticalAnchor: 'middle'
|
|
39913
39863
|
};
|
|
39914
|
-
return _objectSpread$
|
|
39864
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39915
39865
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39916
39866
|
height: height
|
|
39917
39867
|
} : {});
|
|
@@ -39923,7 +39873,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39923
39873
|
textAnchor: horizontalStart,
|
|
39924
39874
|
verticalAnchor: 'middle'
|
|
39925
39875
|
};
|
|
39926
|
-
return _objectSpread$
|
|
39876
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39927
39877
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39928
39878
|
height: height
|
|
39929
39879
|
} : {});
|
|
@@ -39933,7 +39883,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39933
39883
|
height: height
|
|
39934
39884
|
} : {};
|
|
39935
39885
|
if (position === 'insideLeft') {
|
|
39936
|
-
return _objectSpread$
|
|
39886
|
+
return _objectSpread$e({
|
|
39937
39887
|
x: x + horizontalOffset,
|
|
39938
39888
|
y: y + height / 2,
|
|
39939
39889
|
textAnchor: horizontalStart,
|
|
@@ -39941,7 +39891,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39941
39891
|
}, sizeAttrs);
|
|
39942
39892
|
}
|
|
39943
39893
|
if (position === 'insideRight') {
|
|
39944
|
-
return _objectSpread$
|
|
39894
|
+
return _objectSpread$e({
|
|
39945
39895
|
x: x + width - horizontalOffset,
|
|
39946
39896
|
y: y + height / 2,
|
|
39947
39897
|
textAnchor: horizontalEnd,
|
|
@@ -39949,7 +39899,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39949
39899
|
}, sizeAttrs);
|
|
39950
39900
|
}
|
|
39951
39901
|
if (position === 'insideTop') {
|
|
39952
|
-
return _objectSpread$
|
|
39902
|
+
return _objectSpread$e({
|
|
39953
39903
|
x: x + width / 2,
|
|
39954
39904
|
y: y + verticalOffset,
|
|
39955
39905
|
textAnchor: 'middle',
|
|
@@ -39957,7 +39907,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39957
39907
|
}, sizeAttrs);
|
|
39958
39908
|
}
|
|
39959
39909
|
if (position === 'insideBottom') {
|
|
39960
|
-
return _objectSpread$
|
|
39910
|
+
return _objectSpread$e({
|
|
39961
39911
|
x: x + width / 2,
|
|
39962
39912
|
y: y + height - verticalOffset,
|
|
39963
39913
|
textAnchor: 'middle',
|
|
@@ -39965,7 +39915,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39965
39915
|
}, sizeAttrs);
|
|
39966
39916
|
}
|
|
39967
39917
|
if (position === 'insideTopLeft') {
|
|
39968
|
-
return _objectSpread$
|
|
39918
|
+
return _objectSpread$e({
|
|
39969
39919
|
x: x + horizontalOffset,
|
|
39970
39920
|
y: y + verticalOffset,
|
|
39971
39921
|
textAnchor: horizontalStart,
|
|
@@ -39973,7 +39923,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39973
39923
|
}, sizeAttrs);
|
|
39974
39924
|
}
|
|
39975
39925
|
if (position === 'insideTopRight') {
|
|
39976
|
-
return _objectSpread$
|
|
39926
|
+
return _objectSpread$e({
|
|
39977
39927
|
x: x + width - horizontalOffset,
|
|
39978
39928
|
y: y + verticalOffset,
|
|
39979
39929
|
textAnchor: horizontalEnd,
|
|
@@ -39981,7 +39931,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39981
39931
|
}, sizeAttrs);
|
|
39982
39932
|
}
|
|
39983
39933
|
if (position === 'insideBottomLeft') {
|
|
39984
|
-
return _objectSpread$
|
|
39934
|
+
return _objectSpread$e({
|
|
39985
39935
|
x: x + horizontalOffset,
|
|
39986
39936
|
y: y + height - verticalOffset,
|
|
39987
39937
|
textAnchor: horizontalStart,
|
|
@@ -39989,7 +39939,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39989
39939
|
}, sizeAttrs);
|
|
39990
39940
|
}
|
|
39991
39941
|
if (position === 'insideBottomRight') {
|
|
39992
|
-
return _objectSpread$
|
|
39942
|
+
return _objectSpread$e({
|
|
39993
39943
|
x: x + width - horizontalOffset,
|
|
39994
39944
|
y: y + height - verticalOffset,
|
|
39995
39945
|
textAnchor: horizontalEnd,
|
|
@@ -39997,14 +39947,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39997
39947
|
}, sizeAttrs);
|
|
39998
39948
|
}
|
|
39999
39949
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40000
|
-
return _objectSpread$
|
|
39950
|
+
return _objectSpread$e({
|
|
40001
39951
|
x: x + getPercentValue(position.x, width),
|
|
40002
39952
|
y: y + getPercentValue(position.y, height),
|
|
40003
39953
|
textAnchor: 'end',
|
|
40004
39954
|
verticalAnchor: 'end'
|
|
40005
39955
|
}, sizeAttrs);
|
|
40006
39956
|
}
|
|
40007
|
-
return _objectSpread$
|
|
39957
|
+
return _objectSpread$e({
|
|
40008
39958
|
x: x + width / 2,
|
|
40009
39959
|
y: y + height / 2,
|
|
40010
39960
|
textAnchor: 'middle',
|
|
@@ -40014,13 +39964,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40014
39964
|
var isPolar = function isPolar(viewBox) {
|
|
40015
39965
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40016
39966
|
};
|
|
40017
|
-
function Label$3(
|
|
40018
|
-
var _ref4$offset = _ref4.offset,
|
|
40019
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40020
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40021
|
-
var props = _objectSpread$h({
|
|
40022
|
-
offset: offset
|
|
40023
|
-
}, restProps);
|
|
39967
|
+
function Label$3(props) {
|
|
40024
39968
|
var viewBox = props.viewBox,
|
|
40025
39969
|
position = props.position,
|
|
40026
39970
|
value = props.value,
|
|
@@ -40057,6 +40001,9 @@ function Label$3(_ref4) {
|
|
|
40057
40001
|
}), label);
|
|
40058
40002
|
}
|
|
40059
40003
|
Label$3.displayName = 'Label';
|
|
40004
|
+
Label$3.defaultProps = {
|
|
40005
|
+
offset: 5
|
|
40006
|
+
};
|
|
40060
40007
|
var parseViewBox = function parseViewBox(props) {
|
|
40061
40008
|
var cx = props.cx,
|
|
40062
40009
|
cy = props.cy,
|
|
@@ -40211,9 +40158,8 @@ function last(array) {
|
|
|
40211
40158
|
|
|
40212
40159
|
var last_1 = last;
|
|
40213
40160
|
|
|
40214
|
-
function _typeof$
|
|
40215
|
-
var _excluded$
|
|
40216
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40161
|
+
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); }
|
|
40162
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40217
40163
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40218
40164
|
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."); }
|
|
40219
40165
|
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); }
|
|
@@ -40221,26 +40167,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40221
40167
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40222
40168
|
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; }
|
|
40223
40169
|
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); }
|
|
40224
|
-
function ownKeys$
|
|
40225
|
-
function _objectSpread$
|
|
40226
|
-
function _defineProperty$
|
|
40227
|
-
function _toPropertyKey$
|
|
40228
|
-
function _toPrimitive$
|
|
40229
|
-
function _objectWithoutProperties$
|
|
40230
|
-
function _objectWithoutPropertiesLoose$
|
|
40231
|
-
var
|
|
40232
|
-
|
|
40233
|
-
|
|
40234
|
-
|
|
40235
|
-
|
|
40236
|
-
|
|
40237
|
-
|
|
40238
|
-
|
|
40239
|
-
dataKey =
|
|
40240
|
-
clockWise =
|
|
40241
|
-
id =
|
|
40242
|
-
textBreakAll =
|
|
40243
|
-
others = _objectWithoutProperties$
|
|
40170
|
+
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; }
|
|
40171
|
+
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; }
|
|
40172
|
+
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; }
|
|
40173
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40174
|
+
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); }
|
|
40175
|
+
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; }
|
|
40176
|
+
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; }
|
|
40177
|
+
var defaultProps = {
|
|
40178
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40179
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40180
|
+
}
|
|
40181
|
+
};
|
|
40182
|
+
function LabelList(props) {
|
|
40183
|
+
var data = props.data,
|
|
40184
|
+
valueAccessor = props.valueAccessor,
|
|
40185
|
+
dataKey = props.dataKey,
|
|
40186
|
+
clockWise = props.clockWise,
|
|
40187
|
+
id = props.id,
|
|
40188
|
+
textBreakAll = props.textBreakAll,
|
|
40189
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40244
40190
|
if (!data || !data.length) {
|
|
40245
40191
|
return null;
|
|
40246
40192
|
}
|
|
@@ -40256,7 +40202,7 @@ function LabelList(_ref) {
|
|
|
40256
40202
|
index: index,
|
|
40257
40203
|
value: value,
|
|
40258
40204
|
textBreakAll: textBreakAll,
|
|
40259
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40205
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40260
40206
|
clockWise: clockWise
|
|
40261
40207
|
})),
|
|
40262
40208
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40311,14 +40257,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40311
40257
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40312
40258
|
}
|
|
40313
40259
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40260
|
+
LabelList.defaultProps = defaultProps;
|
|
40314
40261
|
|
|
40315
|
-
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); }
|
|
40316
40262
|
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); }
|
|
40317
|
-
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; }
|
|
40318
|
-
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; }
|
|
40319
|
-
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; }
|
|
40320
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40321
|
-
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); }
|
|
40322
40263
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40323
40264
|
var sign = mathSign(endAngle - startAngle);
|
|
40324
40265
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40459,19 +40400,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40459
40400
|
}
|
|
40460
40401
|
return path;
|
|
40461
40402
|
};
|
|
40462
|
-
var
|
|
40463
|
-
cx: 0,
|
|
40464
|
-
cy: 0,
|
|
40465
|
-
innerRadius: 0,
|
|
40466
|
-
outerRadius: 0,
|
|
40467
|
-
startAngle: 0,
|
|
40468
|
-
endAngle: 0,
|
|
40469
|
-
cornerRadius: 0,
|
|
40470
|
-
forceCornerRadius: false,
|
|
40471
|
-
cornerIsExternal: false
|
|
40472
|
-
};
|
|
40473
|
-
var Sector = function Sector(sectorProps) {
|
|
40474
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40403
|
+
var Sector = function Sector(props) {
|
|
40475
40404
|
var cx = props.cx,
|
|
40476
40405
|
cy = props.cy,
|
|
40477
40406
|
innerRadius = props.innerRadius,
|
|
@@ -40517,14 +40446,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40517
40446
|
role: "img"
|
|
40518
40447
|
}));
|
|
40519
40448
|
};
|
|
40449
|
+
Sector.defaultProps = {
|
|
40450
|
+
cx: 0,
|
|
40451
|
+
cy: 0,
|
|
40452
|
+
innerRadius: 0,
|
|
40453
|
+
outerRadius: 0,
|
|
40454
|
+
startAngle: 0,
|
|
40455
|
+
endAngle: 0,
|
|
40456
|
+
cornerRadius: 0,
|
|
40457
|
+
forceCornerRadius: false,
|
|
40458
|
+
cornerIsExternal: false
|
|
40459
|
+
};
|
|
40520
40460
|
|
|
40521
|
-
function _typeof$
|
|
40461
|
+
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); }
|
|
40522
40462
|
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); }
|
|
40523
|
-
function ownKeys$
|
|
40524
|
-
function _objectSpread$
|
|
40525
|
-
function _defineProperty$
|
|
40526
|
-
function _toPropertyKey$
|
|
40527
|
-
function _toPrimitive$
|
|
40463
|
+
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; }
|
|
40464
|
+
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; }
|
|
40465
|
+
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; }
|
|
40466
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40467
|
+
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); }
|
|
40528
40468
|
var CURVE_FACTORIES = {
|
|
40529
40469
|
curveBasisClosed: curveBasisClosed,
|
|
40530
40470
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40564,14 +40504,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40564
40504
|
* @return {String} path
|
|
40565
40505
|
*/
|
|
40566
40506
|
var getPath$1 = function getPath(_ref) {
|
|
40567
|
-
var
|
|
40568
|
-
|
|
40569
|
-
_ref$points = _ref.points,
|
|
40570
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40507
|
+
var type = _ref.type,
|
|
40508
|
+
points = _ref.points,
|
|
40571
40509
|
baseLine = _ref.baseLine,
|
|
40572
40510
|
layout = _ref.layout,
|
|
40573
|
-
|
|
40574
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40511
|
+
connectNulls = _ref.connectNulls;
|
|
40575
40512
|
var curveFactory = getCurveFactory(type, layout);
|
|
40576
40513
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40577
40514
|
return defined(entry);
|
|
@@ -40582,7 +40519,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40582
40519
|
return defined(base);
|
|
40583
40520
|
}) : baseLine;
|
|
40584
40521
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40585
|
-
return _objectSpread$
|
|
40522
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40586
40523
|
base: formatBaseLine[index]
|
|
40587
40524
|
});
|
|
40588
40525
|
});
|
|
@@ -40623,8 +40560,12 @@ var Curve = function Curve(props) {
|
|
|
40623
40560
|
ref: pathRef
|
|
40624
40561
|
}));
|
|
40625
40562
|
};
|
|
40563
|
+
Curve.defaultProps = {
|
|
40564
|
+
type: 'linear',
|
|
40565
|
+
points: [],
|
|
40566
|
+
connectNulls: false
|
|
40567
|
+
};
|
|
40626
40568
|
|
|
40627
|
-
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); }
|
|
40628
40569
|
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); }
|
|
40629
40570
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40630
40571
|
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."); }
|
|
@@ -40632,11 +40573,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40632
40573
|
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; }
|
|
40633
40574
|
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; } }
|
|
40634
40575
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40635
|
-
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; }
|
|
40636
|
-
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; }
|
|
40637
|
-
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; }
|
|
40638
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40639
|
-
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); }
|
|
40640
40576
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40641
40577
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40642
40578
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40692,29 +40628,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40692
40628
|
}
|
|
40693
40629
|
return false;
|
|
40694
40630
|
};
|
|
40695
|
-
var
|
|
40696
|
-
x: 0,
|
|
40697
|
-
y: 0,
|
|
40698
|
-
width: 0,
|
|
40699
|
-
height: 0,
|
|
40700
|
-
// The radius of border
|
|
40701
|
-
// The radius of four corners when radius is a number
|
|
40702
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40703
|
-
radius: 0,
|
|
40704
|
-
isAnimationActive: false,
|
|
40705
|
-
isUpdateAnimationActive: false,
|
|
40706
|
-
animationBegin: 0,
|
|
40707
|
-
animationDuration: 1500,
|
|
40708
|
-
animationEasing: 'ease'
|
|
40709
|
-
};
|
|
40710
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40711
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40631
|
+
var Rectangle = function Rectangle(props) {
|
|
40712
40632
|
var pathRef = useRef();
|
|
40713
40633
|
var _useState = useState(-1),
|
|
40714
40634
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40715
40635
|
totalLength = _useState2[0],
|
|
40716
40636
|
setTotalLength = _useState2[1];
|
|
40717
|
-
|
|
40637
|
+
useLayoutEffect(function () {
|
|
40718
40638
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40719
40639
|
try {
|
|
40720
40640
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40785,6 +40705,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40785
40705
|
})));
|
|
40786
40706
|
});
|
|
40787
40707
|
};
|
|
40708
|
+
Rectangle.defaultProps = {
|
|
40709
|
+
x: 0,
|
|
40710
|
+
y: 0,
|
|
40711
|
+
width: 0,
|
|
40712
|
+
height: 0,
|
|
40713
|
+
// The radius of border
|
|
40714
|
+
// The radius of four corners when radius is a number
|
|
40715
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40716
|
+
radius: 0,
|
|
40717
|
+
isAnimationActive: false,
|
|
40718
|
+
isUpdateAnimationActive: false,
|
|
40719
|
+
animationBegin: 0,
|
|
40720
|
+
animationDuration: 1500,
|
|
40721
|
+
animationEasing: 'ease'
|
|
40722
|
+
};
|
|
40788
40723
|
|
|
40789
40724
|
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); }
|
|
40790
40725
|
var Dot$1 = function Dot(props) {
|
|
@@ -40804,42 +40739,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40804
40739
|
return null;
|
|
40805
40740
|
};
|
|
40806
40741
|
|
|
40807
|
-
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); }
|
|
40808
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40809
40742
|
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); }
|
|
40810
|
-
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; }
|
|
40811
|
-
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; }
|
|
40812
|
-
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; }
|
|
40813
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40814
|
-
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); }
|
|
40815
|
-
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; }
|
|
40816
|
-
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; }
|
|
40817
40743
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40818
40744
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40819
40745
|
};
|
|
40820
|
-
var Cross = function Cross(
|
|
40821
|
-
var
|
|
40822
|
-
|
|
40823
|
-
|
|
40824
|
-
|
|
40825
|
-
|
|
40826
|
-
|
|
40827
|
-
|
|
40828
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40829
|
-
_ref$width = _ref.width,
|
|
40830
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40831
|
-
_ref$height = _ref.height,
|
|
40832
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40833
|
-
className = _ref.className,
|
|
40834
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40835
|
-
var props = _objectSpread$c({
|
|
40836
|
-
x: x,
|
|
40837
|
-
y: y,
|
|
40838
|
-
top: top,
|
|
40839
|
-
left: left,
|
|
40840
|
-
width: width,
|
|
40841
|
-
height: height
|
|
40842
|
-
}, rest);
|
|
40746
|
+
var Cross = function Cross(props) {
|
|
40747
|
+
var x = props.x,
|
|
40748
|
+
y = props.y,
|
|
40749
|
+
width = props.width,
|
|
40750
|
+
height = props.height,
|
|
40751
|
+
top = props.top,
|
|
40752
|
+
left = props.left,
|
|
40753
|
+
className = props.className;
|
|
40843
40754
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40844
40755
|
return null;
|
|
40845
40756
|
}
|
|
@@ -40848,6 +40759,14 @@ var Cross = function Cross(_ref) {
|
|
|
40848
40759
|
d: getPath(x, y, width, height, top, left)
|
|
40849
40760
|
}));
|
|
40850
40761
|
};
|
|
40762
|
+
Cross.defaultProps = {
|
|
40763
|
+
x: 0,
|
|
40764
|
+
y: 0,
|
|
40765
|
+
top: 0,
|
|
40766
|
+
left: 0,
|
|
40767
|
+
width: 0,
|
|
40768
|
+
height: 0
|
|
40769
|
+
};
|
|
40851
40770
|
|
|
40852
40771
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40853
40772
|
|
|
@@ -41057,7 +40976,6 @@ var createScale = function createScale(_ref) {
|
|
|
41057
40976
|
isTextActive: false,
|
|
41058
40977
|
isSlideMoving: false,
|
|
41059
40978
|
isTravellerMoving: false,
|
|
41060
|
-
isTravellerFocused: false,
|
|
41061
40979
|
startX: scale(startIndex),
|
|
41062
40980
|
endX: scale(endIndex),
|
|
41063
40981
|
scale: scale,
|
|
@@ -41271,38 +41189,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41271
41189
|
}
|
|
41272
41190
|
});
|
|
41273
41191
|
}
|
|
41274
|
-
}, {
|
|
41275
|
-
key: "handleTravellerMoveKeyboard",
|
|
41276
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41277
|
-
var _this2 = this;
|
|
41278
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41279
|
-
var _this$state3 = this.state,
|
|
41280
|
-
scaleValues = _this$state3.scaleValues,
|
|
41281
|
-
startX = _this$state3.startX,
|
|
41282
|
-
endX = _this$state3.endX;
|
|
41283
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41284
|
-
var currentScaleValue = this.state[id];
|
|
41285
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41286
|
-
if (currentIndex === -1) {
|
|
41287
|
-
return;
|
|
41288
|
-
}
|
|
41289
|
-
var newIndex = currentIndex + direction;
|
|
41290
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41291
|
-
return;
|
|
41292
|
-
}
|
|
41293
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41294
|
-
|
|
41295
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41296
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41297
|
-
return;
|
|
41298
|
-
}
|
|
41299
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41300
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41301
|
-
startX: _this2.state.startX,
|
|
41302
|
-
endX: _this2.state.endX
|
|
41303
|
-
}));
|
|
41304
|
-
});
|
|
41305
|
-
}
|
|
41306
41192
|
}, {
|
|
41307
41193
|
key: "renderBackground",
|
|
41308
41194
|
value: function renderBackground() {
|
|
@@ -41350,7 +41236,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41350
41236
|
}, {
|
|
41351
41237
|
key: "renderTravellerLayer",
|
|
41352
41238
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41353
|
-
var _this3 = this;
|
|
41354
41239
|
var _this$props7 = this.props,
|
|
41355
41240
|
y = _this$props7.y,
|
|
41356
41241
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41364,31 +41249,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41364
41249
|
height: height
|
|
41365
41250
|
});
|
|
41366
41251
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41367
|
-
tabIndex: 0,
|
|
41368
|
-
role: "slider",
|
|
41369
41252
|
className: "recharts-brush-traveller",
|
|
41370
41253
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41371
41254
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41372
41255
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41373
41256
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41374
|
-
onKeyDown: function onKeyDown(e) {
|
|
41375
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41376
|
-
return;
|
|
41377
|
-
}
|
|
41378
|
-
e.preventDefault();
|
|
41379
|
-
e.stopPropagation();
|
|
41380
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41381
|
-
},
|
|
41382
|
-
onFocus: function onFocus() {
|
|
41383
|
-
_this3.setState({
|
|
41384
|
-
isTravellerFocused: true
|
|
41385
|
-
});
|
|
41386
|
-
},
|
|
41387
|
-
onBlur: function onBlur() {
|
|
41388
|
-
_this3.setState({
|
|
41389
|
-
isTravellerFocused: false
|
|
41390
|
-
});
|
|
41391
|
-
},
|
|
41392
41257
|
style: {
|
|
41393
41258
|
cursor: 'col-resize'
|
|
41394
41259
|
}
|
|
@@ -41432,9 +41297,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41432
41297
|
height = _this$props9.height,
|
|
41433
41298
|
travellerWidth = _this$props9.travellerWidth,
|
|
41434
41299
|
stroke = _this$props9.stroke;
|
|
41435
|
-
var _this$
|
|
41436
|
-
startX = _this$
|
|
41437
|
-
endX = _this$
|
|
41300
|
+
var _this$state3 = this.state,
|
|
41301
|
+
startX = _this$state3.startX,
|
|
41302
|
+
endX = _this$state3.endX;
|
|
41438
41303
|
var offset = 5;
|
|
41439
41304
|
var attrs = {
|
|
41440
41305
|
pointerEvents: 'none',
|
|
@@ -41466,13 +41331,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41466
41331
|
width = _this$props10.width,
|
|
41467
41332
|
height = _this$props10.height,
|
|
41468
41333
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41469
|
-
var _this$
|
|
41470
|
-
startX = _this$
|
|
41471
|
-
endX = _this$
|
|
41472
|
-
isTextActive = _this$
|
|
41473
|
-
isSlideMoving = _this$
|
|
41474
|
-
isTravellerMoving = _this$
|
|
41475
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41334
|
+
var _this$state4 = this.state,
|
|
41335
|
+
startX = _this$state4.startX,
|
|
41336
|
+
endX = _this$state4.endX,
|
|
41337
|
+
isTextActive = _this$state4.isTextActive,
|
|
41338
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41339
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41476
41340
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41477
41341
|
return null;
|
|
41478
41342
|
}
|
|
@@ -41484,7 +41348,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41484
41348
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41485
41349
|
onTouchMove: this.handleTouchMove,
|
|
41486
41350
|
style: style
|
|
41487
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41351
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41488
41352
|
}
|
|
41489
41353
|
}], [{
|
|
41490
41354
|
key: "renderDefaultTraveller",
|
|
@@ -41802,7 +41666,7 @@ function every(collection, predicate, guard) {
|
|
|
41802
41666
|
|
|
41803
41667
|
var every_1 = every;
|
|
41804
41668
|
|
|
41805
|
-
var defineProperty = _defineProperty$
|
|
41669
|
+
var defineProperty = _defineProperty$l;
|
|
41806
41670
|
|
|
41807
41671
|
/**
|
|
41808
41672
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42163,6 +42027,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42163
42027
|
legendType: 'rect',
|
|
42164
42028
|
minPointSize: 0,
|
|
42165
42029
|
hide: false,
|
|
42030
|
+
// data of bar
|
|
42166
42031
|
data: [],
|
|
42167
42032
|
layout: 'vertical',
|
|
42168
42033
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45075,11 +44940,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45075
44940
|
}
|
|
45076
44941
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45077
44942
|
x = _this$container$getBo.x,
|
|
45078
|
-
y = _this$container$getBo.y
|
|
45079
|
-
height = _this$container$getBo.height;
|
|
44943
|
+
y = _this$container$getBo.y;
|
|
45080
44944
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45081
44945
|
var pageX = x + coordinate;
|
|
45082
|
-
var pageY = y + this.offset.top
|
|
44946
|
+
var pageY = y + this.offset.top;
|
|
45083
44947
|
this.mouseHandlerCallback({
|
|
45084
44948
|
pageX: pageX,
|
|
45085
44949
|
pageY: pageY
|