@typeolymp/ui-components 1.19.11 → 1.19.13
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/molecules/Popup/index.d.ts +1 -1
- package/build/components/organisms/Form/index.d.ts +6 -0
- package/build/components/organisms/Form/stories.d.ts +1 -0
- package/build/components/organisms/Table/index.d.ts +2 -1
- package/build/index.es.js +782 -634
- package/build/index.es.js.map +1 -1
- package/build/index.js +782 -634
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/build/components/atoms/Input/translations.d.ts +0 -11
- package/build/components/molecules/Key/translations.d.ts +0 -5
- package/build/components/molecules/PasswordInputField/translations.d.ts +0 -11
- package/build/components/molecules/Tabs/styles.d.ts +0 -2
- package/build/components/organisms/Chart/data copy.d.ts +0 -30
- package/build/components/organisms/Chart/styles.d.ts +0 -1
- package/build/lib/enums.d.ts +0 -4
- package/build/lib/helpers.d.ts +0 -1
- package/build/lib/theme/index.d.ts +0 -3
- package/build/lib/theme/types.d.ts +0 -72
- package/build/lib/translations/index.d.ts +0 -6
- package/build/lib/types/TranslationType.d.ts +0 -7
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$y(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$y = function _typeof(obj) { return typeof obj; }; } else { _typeof$y = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$y(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$y(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$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$x = function _typeof(obj) { return typeof obj; }; } else { _typeof$x = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$x(obj); }
|
|
4811
4811
|
/**
|
|
4812
4812
|
* @name isDate
|
|
4813
4813
|
* @category Common Helpers
|
|
@@ -4843,7 +4843,7 @@ function _typeof$t(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$x(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$c(arr, i) {
|
|
13563
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13564
13564
|
}
|
|
13565
13565
|
|
|
13566
|
-
function _arrayWithHoles$
|
|
13566
|
+
function _arrayWithHoles$d(arr) {
|
|
13567
13567
|
if (Array.isArray(arr)) return arr;
|
|
13568
13568
|
}
|
|
13569
13569
|
|
|
13570
|
-
function _iterableToArrayLimit$
|
|
13570
|
+
function _iterableToArrayLimit$c(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$d(arr, i) {
|
|
|
13597
13597
|
return _arr;
|
|
13598
13598
|
}
|
|
13599
13599
|
|
|
13600
|
-
function _unsupportedIterableToArray$
|
|
13600
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13601
13601
|
if (!o) return;
|
|
13602
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13602
|
+
if (typeof o === "string") return _arrayLikeToArray$k(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$k(o, minLen);
|
|
13607
13607
|
}
|
|
13608
13608
|
|
|
13609
|
-
function _arrayLikeToArray$
|
|
13609
|
+
function _arrayLikeToArray$k(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$l(arr, len) {
|
|
|
13614
13614
|
return arr2;
|
|
13615
13615
|
}
|
|
13616
13616
|
|
|
13617
|
-
function _nonIterableRest$
|
|
13617
|
+
function _nonIterableRest$d() {
|
|
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$c(_ref, 2),
|
|
13682
13682
|
name = _ref2[0],
|
|
13683
13683
|
attributeName = _ref2[1];
|
|
13684
13684
|
|
|
@@ -14745,7 +14745,7 @@ var Countdown = function (_a) {
|
|
|
14745
14745
|
return (jsxs(Wrapper$3, { children: [jsx$1(Value, __assign$2({ contrast: contrast }, { children: jsx$1(Heading, __assign$2({ type: "h5" }, { children: HH })) })), jsx$1(Heading, __assign$2({ type: "h5", color: color }, { children: ":" })), jsx$1(Value, __assign$2({ contrast: contrast }, { children: jsx$1(Heading, __assign$2({ type: "h5" }, { children: MM })) })), jsx$1(Heading, __assign$2({ type: "h5", color: color }, { children: ":" })), jsx$1(Value, __assign$2({ contrast: contrast }, { children: jsx$1(Heading, __assign$2({ type: "h5" }, { children: SS })) }))] }));
|
|
14746
14746
|
};
|
|
14747
14747
|
|
|
14748
|
-
var Container$l = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject$1(["\n width: fill-available;\n padding: 15px;\n border: 1px solid;\n border-radius: 6px;\n border-color: ", ";\n background-color: ", ";\n position: relative;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 50px;\n margin-bottom: 15px;\n\n h6 {\n font-size: 14px;\n\n :hover {\n color: ", ";\n cursor: pointer;\n }\n }\n }\n"], ["\n width: fill-available;\n padding: 15px;\n border: 1px solid;\n border-radius: 6px;\n border-color: ", ";\n background-color: ", ";\n position: relative;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 50px;\n margin-bottom: 15px;\n\n h6 {\n font-size: 14px;\n\n :hover {\n color: ", ";\n cursor: pointer;\n }\n }\n }\n"])), theme.colors.lightGray.
|
|
14748
|
+
var Container$l = styled.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject$1(["\n width: fill-available;\n padding: 15px;\n border: 1px solid;\n border-radius: 6px;\n border-color: ", ";\n background-color: ", ";\n position: relative;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 50px;\n margin-bottom: 15px;\n\n h6 {\n font-size: 14px;\n\n :hover {\n color: ", ";\n cursor: pointer;\n }\n }\n }\n"], ["\n width: fill-available;\n padding: 15px;\n border: 1px solid;\n border-radius: 6px;\n border-color: ", ";\n background-color: ", ";\n position: relative;\n\n > div:first-child {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n gap: 50px;\n margin-bottom: 15px;\n\n h6 {\n font-size: 14px;\n\n :hover {\n color: ", ";\n cursor: pointer;\n }\n }\n }\n"])), theme.colors.lightGray.darker, theme.colors.lightGray.light, theme.colors.blue.base);
|
|
14749
14749
|
var Data = styled.div(templateObject_2$u || (templateObject_2$u = __makeTemplateObject$1(["\n > div {\n width: 100%;\n display: flex;\n align-items: end;\n gap: 10px;\n\n > p {\n width: 50%;\n }\n }\n"], ["\n > div {\n width: 100%;\n display: flex;\n align-items: end;\n gap: 10px;\n\n > p {\n width: 50%;\n }\n }\n"])));
|
|
14750
14750
|
var templateObject_1$y, templateObject_2$u;
|
|
14751
14751
|
|
|
@@ -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$j(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$j(arr); }
|
|
16099
16099
|
|
|
16100
|
-
function ownKeys$
|
|
16100
|
+
function ownKeys$u(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$u(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$u(Object(source), !0).forEach(function (key) { _defineProperty$w(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$u(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16103
16103
|
|
|
16104
|
-
function _defineProperty$
|
|
16104
|
+
function _defineProperty$w(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$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16107
16107
|
|
|
16108
|
-
function _nonIterableRest$
|
|
16108
|
+
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."); }
|
|
16109
16109
|
|
|
16110
|
-
function _unsupportedIterableToArray$
|
|
16110
|
+
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); }
|
|
16111
16111
|
|
|
16112
|
-
function _arrayLikeToArray$
|
|
16112
|
+
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; }
|
|
16113
16113
|
|
|
16114
|
-
function _iterableToArrayLimit$
|
|
16114
|
+
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; }
|
|
16115
16115
|
|
|
16116
|
-
function _arrayWithHoles$
|
|
16116
|
+
function _arrayWithHoles$c(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$b(_fileAccepted, 1),
|
|
16197
16197
|
accepted = _fileAccepted2[0];
|
|
16198
16198
|
|
|
16199
16199
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16200
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16200
|
+
_fileMatchSize2 = _slicedToArray$b(_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$b(_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$b(_ref4, 2),
|
|
16316
16316
|
mimeType = _ref5[0],
|
|
16317
16317
|
ext = _ref5[1];
|
|
16318
16318
|
|
|
16319
|
-
return _objectSpread$
|
|
16319
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, 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$b(_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$g = ["children"],
|
|
16408
|
+
_excluded2$5 = ["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$i(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$i(arr); }
|
|
16419
16419
|
|
|
16420
|
-
function _slicedToArray$
|
|
16420
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16421
16421
|
|
|
16422
|
-
function _nonIterableRest$
|
|
16422
|
+
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."); }
|
|
16423
16423
|
|
|
16424
|
-
function _unsupportedIterableToArray$
|
|
16424
|
+
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); }
|
|
16425
16425
|
|
|
16426
|
-
function _arrayLikeToArray$
|
|
16426
|
+
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; }
|
|
16427
16427
|
|
|
16428
|
-
function _iterableToArrayLimit$
|
|
16428
|
+
function _iterableToArrayLimit$a(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$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16431
16431
|
|
|
16432
|
-
function ownKeys$
|
|
16432
|
+
function ownKeys$t(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$t(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$t(Object(source), !0).forEach(function (key) { _defineProperty$v(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$t(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16435
16435
|
|
|
16436
|
-
function _defineProperty$
|
|
16436
|
+
function _defineProperty$v(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$g(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$g(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$g(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$d(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$g(_ref, _excluded$g);
|
|
16459
16459
|
|
|
16460
16460
|
var _useDropzone = useDropzone(params),
|
|
16461
16461
|
open = _useDropzone.open,
|
|
16462
|
-
props = _objectWithoutProperties$
|
|
16462
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
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$t(_objectSpread$t({}, 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$2 = {
|
|
16477
16477
|
disabled: false,
|
|
16478
16478
|
getFilesFromEvent: fromEvent,
|
|
16479
16479
|
maxSize: Infinity,
|
|
@@ -16489,7 +16489,7 @@ var defaultProps$1 = {
|
|
|
16489
16489
|
useFsAccessApi: true,
|
|
16490
16490
|
autoFocus: false
|
|
16491
16491
|
};
|
|
16492
|
-
Dropzone.defaultProps = defaultProps$
|
|
16492
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
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$t(_objectSpread$t({}, defaultProps$2), 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$a(_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$a(_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$a(_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$g(_ref2, _excluded3$1);
|
|
17267
17267
|
|
|
17268
|
-
return _objectSpread$
|
|
17268
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
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$g(_ref3, _excluded4);
|
|
17294
17294
|
|
|
17295
|
-
var inputProps = _defineProperty$
|
|
17295
|
+
var inputProps = _defineProperty$v({
|
|
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$t(_objectSpread$t({}, inputProps), rest);
|
|
17308
17308
|
};
|
|
17309
17309
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17310
|
-
return _objectSpread$
|
|
17310
|
+
return _objectSpread$t(_objectSpread$t({}, 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$t(_objectSpread$t({}, state), {}, {
|
|
17330
17330
|
isFocused: true
|
|
17331
17331
|
});
|
|
17332
17332
|
|
|
17333
17333
|
case "blur":
|
|
17334
|
-
return _objectSpread$
|
|
17334
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17335
17335
|
isFocused: false
|
|
17336
17336
|
});
|
|
17337
17337
|
|
|
17338
17338
|
case "openDialog":
|
|
17339
|
-
return _objectSpread$
|
|
17339
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17340
17340
|
isFileDialogActive: true
|
|
17341
17341
|
});
|
|
17342
17342
|
|
|
17343
17343
|
case "closeDialog":
|
|
17344
|
-
return _objectSpread$
|
|
17344
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17345
17345
|
isFileDialogActive: false
|
|
17346
17346
|
});
|
|
17347
17347
|
|
|
17348
17348
|
case "setDraggedFiles":
|
|
17349
|
-
return _objectSpread$
|
|
17349
|
+
return _objectSpread$t(_objectSpread$t({}, 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$t(_objectSpread$t({}, 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$t({}, initialState);
|
|
17363
17363
|
|
|
17364
17364
|
default:
|
|
17365
17365
|
return state;
|
|
@@ -17691,7 +17691,9 @@ var Popup = function (props) {
|
|
|
17691
17691
|
});
|
|
17692
17692
|
}
|
|
17693
17693
|
});
|
|
17694
|
-
return (jsxs(Fragment$1, { children: [children, jsxs(PopupContainer, __assign$2({}, position, { isVisible: isVisible, ref: popupRef, contrast: props.contrast }, { children: [props.title && (jsxs(Fragment$1, { children: [jsx$1(Heading, __assign$2({ type: "h6" }, { children: props.title })), jsx$1(Spacer, { vertical: 10 })] })), jsx$1(Paragraph, __assign$2({ size: "small", weight: "regular" }, { children: props.content }))
|
|
17694
|
+
return (jsxs(Fragment$1, { children: [children, jsxs(PopupContainer, __assign$2({}, position, { isVisible: isVisible, ref: popupRef, contrast: props.contrast }, { children: [props.title && (jsxs(Fragment$1, { children: [jsx$1(Heading, __assign$2({ type: "h6" }, { children: props.title })), jsx$1(Spacer, { vertical: 10 })] })), typeof props.content === "string" && (jsx$1(Paragraph, __assign$2({ size: "small", weight: "regular" }, { children: props.content }))), Array.isArray(props.content) &&
|
|
17695
|
+
props.content.length > 0 &&
|
|
17696
|
+
props.content.map(function (item, index) { return (jsx$1(Paragraph, __assign$2({ size: "small", weight: "regular" }, { children: item }), "".concat(item, "-").concat(index))); })] }))] }));
|
|
17695
17697
|
};
|
|
17696
17698
|
|
|
17697
17699
|
var Wrapper = styled.div(templateObject_1$j || (templateObject_1$j = __makeTemplateObject$1(["\n width: 100%;\n display: flex;\n align-items: center;\n"], ["\n width: 100%;\n display: flex;\n align-items: center;\n"])));
|
|
@@ -19585,7 +19587,7 @@ function shallowEqual(a, b) {
|
|
|
19585
19587
|
return true;
|
|
19586
19588
|
}
|
|
19587
19589
|
|
|
19588
|
-
function _typeof$
|
|
19590
|
+
function _typeof$w(obj) { "@babel/helpers - typeof"; return _typeof$w = "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$w(obj); }
|
|
19589
19591
|
|
|
19590
19592
|
//
|
|
19591
19593
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19612,7 +19614,9 @@ var FilteredElementKeyMap = {
|
|
|
19612
19614
|
};
|
|
19613
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'];
|
|
19614
19616
|
|
|
19615
|
-
|
|
19617
|
+
/** The type of easing function to use for animations */
|
|
19618
|
+
|
|
19619
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19616
19620
|
|
|
19617
19621
|
/** the offset of a chart, which define the blank space all around */
|
|
19618
19622
|
|
|
@@ -19648,7 +19652,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19648
19652
|
};
|
|
19649
19653
|
};
|
|
19650
19654
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19651
|
-
if (!isObject_1(props) || _typeof$
|
|
19655
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19652
19656
|
return null;
|
|
19653
19657
|
}
|
|
19654
19658
|
var out = null;
|
|
@@ -19662,11 +19666,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19662
19666
|
return out;
|
|
19663
19667
|
};
|
|
19664
19668
|
|
|
19665
|
-
var _excluded$
|
|
19666
|
-
_excluded2$
|
|
19667
|
-
function _objectWithoutProperties$
|
|
19668
|
-
function _objectWithoutPropertiesLoose$
|
|
19669
|
-
function _typeof$
|
|
19669
|
+
var _excluded$f = ["children"],
|
|
19670
|
+
_excluded2$4 = ["children"];
|
|
19671
|
+
function _objectWithoutProperties$f(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$f(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; }
|
|
19672
|
+
function _objectWithoutPropertiesLoose$f(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; }
|
|
19673
|
+
function _typeof$v(obj) { "@babel/helpers - typeof"; return _typeof$v = "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$v(obj); }
|
|
19670
19674
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19671
19675
|
click: 'onClick',
|
|
19672
19676
|
mousedown: 'onMouseDown',
|
|
@@ -19773,7 +19777,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19773
19777
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19774
19778
|
};
|
|
19775
19779
|
var isDotProps = function isDotProps(dot) {
|
|
19776
|
-
return dot && _typeof$
|
|
19780
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19777
19781
|
};
|
|
19778
19782
|
|
|
19779
19783
|
/**
|
|
@@ -19865,10 +19869,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19865
19869
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19866
19870
|
var _ref = nextChild.props || {},
|
|
19867
19871
|
nextChildren = _ref.children,
|
|
19868
|
-
nextProps = _objectWithoutProperties$
|
|
19872
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
19869
19873
|
var _ref2 = prevChild.props || {},
|
|
19870
19874
|
prevChildren = _ref2.children,
|
|
19871
|
-
prevProps = _objectWithoutProperties$
|
|
19875
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
19872
19876
|
if (nextChildren && prevChildren) {
|
|
19873
19877
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19874
19878
|
}
|
|
@@ -19910,10 +19914,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19910
19914
|
return toArray(children).indexOf(child);
|
|
19911
19915
|
};
|
|
19912
19916
|
|
|
19913
|
-
var _excluded$
|
|
19917
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19914
19918
|
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); }
|
|
19915
|
-
function _objectWithoutProperties$
|
|
19916
|
-
function _objectWithoutPropertiesLoose$
|
|
19919
|
+
function _objectWithoutProperties$e(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$e(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; }
|
|
19920
|
+
function _objectWithoutPropertiesLoose$e(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19917
19921
|
function Surface(props) {
|
|
19918
19922
|
var children = props.children,
|
|
19919
19923
|
width = props.width,
|
|
@@ -19921,7 +19925,7 @@ function Surface(props) {
|
|
|
19921
19925
|
viewBox = props.viewBox,
|
|
19922
19926
|
className = props.className,
|
|
19923
19927
|
style = props.style,
|
|
19924
|
-
others = _objectWithoutProperties$
|
|
19928
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
19925
19929
|
var svgView = viewBox || {
|
|
19926
19930
|
width: width,
|
|
19927
19931
|
height: height,
|
|
@@ -19938,14 +19942,14 @@ function Surface(props) {
|
|
|
19938
19942
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19939
19943
|
}
|
|
19940
19944
|
|
|
19941
|
-
var _excluded$
|
|
19945
|
+
var _excluded$d = ["children", "className"];
|
|
19942
19946
|
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); }
|
|
19943
|
-
function _objectWithoutProperties$
|
|
19944
|
-
function _objectWithoutPropertiesLoose$
|
|
19947
|
+
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; }
|
|
19948
|
+
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; }
|
|
19945
19949
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19946
19950
|
var children = props.children,
|
|
19947
19951
|
className = props.className,
|
|
19948
|
-
others = _objectWithoutProperties$
|
|
19952
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
19949
19953
|
var layerClass = classNames('recharts-layer', className);
|
|
19950
19954
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19951
19955
|
className: layerClass
|
|
@@ -23360,7 +23364,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23360
23364
|
stackOffsetNone(series, order);
|
|
23361
23365
|
}
|
|
23362
23366
|
|
|
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"];
|
|
23363
23369
|
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; }
|
|
23364
23377
|
var symbolFactories = {
|
|
23365
23378
|
symbolCircle: symbolCircle,
|
|
23366
23379
|
symbolCross: symbolCross,
|
|
@@ -23399,31 +23412,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23399
23412
|
return Math.PI * size * size / 4;
|
|
23400
23413
|
}
|
|
23401
23414
|
};
|
|
23402
|
-
var symbolsDefaultProps = {
|
|
23403
|
-
type: 'circle',
|
|
23404
|
-
size: 64,
|
|
23405
|
-
sizeType: 'area'
|
|
23406
|
-
};
|
|
23407
23415
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23408
23416
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23409
23417
|
};
|
|
23410
|
-
var Symbols = function Symbols(
|
|
23418
|
+
var Symbols = function Symbols(_ref) {
|
|
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
|
+
|
|
23411
23432
|
/**
|
|
23412
23433
|
* Calculate the path of curve
|
|
23413
23434
|
* @return {String} path
|
|
23414
23435
|
*/
|
|
23415
23436
|
var getPath = function getPath() {
|
|
23416
|
-
var size = props.size,
|
|
23417
|
-
sizeType = props.sizeType,
|
|
23418
|
-
type = props.type;
|
|
23419
23437
|
var symbolFactory = getSymbolFactory(type);
|
|
23420
23438
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23421
23439
|
return symbol();
|
|
23422
23440
|
};
|
|
23423
23441
|
var className = props.className,
|
|
23424
23442
|
cx = props.cx,
|
|
23425
|
-
cy = props.cy
|
|
23426
|
-
size = props.size;
|
|
23443
|
+
cy = props.cy;
|
|
23427
23444
|
var filteredProps = filterProps(props, true);
|
|
23428
23445
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23429
23446
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23434,35 +23451,34 @@ var Symbols = function Symbols(props) {
|
|
|
23434
23451
|
}
|
|
23435
23452
|
return null;
|
|
23436
23453
|
};
|
|
23437
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23438
23454
|
Symbols.registerSymbol = registerSymbol;
|
|
23439
23455
|
|
|
23440
|
-
function _typeof$
|
|
23456
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; return _typeof$t = "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$t(obj); }
|
|
23441
23457
|
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); }
|
|
23442
|
-
function ownKeys$
|
|
23443
|
-
function _objectSpread$
|
|
23444
|
-
function _classCallCheck$
|
|
23445
|
-
function _defineProperties$
|
|
23446
|
-
function _createClass$
|
|
23447
|
-
function _inherits$
|
|
23448
|
-
function _setPrototypeOf$
|
|
23449
|
-
function _createSuper$
|
|
23450
|
-
function _possibleConstructorReturn$
|
|
23451
|
-
function _assertThisInitialized$
|
|
23452
|
-
function _isNativeReflectConstruct$
|
|
23453
|
-
function _getPrototypeOf$
|
|
23454
|
-
function _defineProperty$
|
|
23455
|
-
function _toPropertyKey$
|
|
23456
|
-
function _toPrimitive$
|
|
23458
|
+
function ownKeys$r(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; }
|
|
23459
|
+
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$r(Object(source), !0).forEach(function (key) { _defineProperty$t(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23460
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23461
|
+
function _defineProperties$b(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$s(descriptor.key), descriptor); } }
|
|
23462
|
+
function _createClass$b(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$b(Constructor.prototype, protoProps); if (staticProps) _defineProperties$b(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23463
|
+
function _inherits$9(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$9(subClass, superClass); }
|
|
23464
|
+
function _setPrototypeOf$9(o, p) { _setPrototypeOf$9 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$9(o, p); }
|
|
23465
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf$9(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$9(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$9(this, result); }; }
|
|
23466
|
+
function _possibleConstructorReturn$9(self, call) { if (call && (_typeof$t(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$9(self); }
|
|
23467
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23468
|
+
function _isNativeReflectConstruct$9() { 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; } }
|
|
23469
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23470
|
+
function _defineProperty$t(obj, key, value) { key = _toPropertyKey$s(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23471
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23472
|
+
function _toPrimitive$s(input, hint) { if (_typeof$t(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$t(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23457
23473
|
var SIZE = 32;
|
|
23458
23474
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23459
|
-
_inherits$
|
|
23460
|
-
var _super = _createSuper$
|
|
23475
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23476
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23461
23477
|
function DefaultLegendContent() {
|
|
23462
|
-
_classCallCheck$
|
|
23478
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23463
23479
|
return _super.apply(this, arguments);
|
|
23464
23480
|
}
|
|
23465
|
-
_createClass$
|
|
23481
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23466
23482
|
key: "renderIcon",
|
|
23467
23483
|
value:
|
|
23468
23484
|
/**
|
|
@@ -23507,7 +23523,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23507
23523
|
});
|
|
23508
23524
|
}
|
|
23509
23525
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23510
|
-
var iconProps = _objectSpread$
|
|
23526
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23511
23527
|
delete iconProps.legendIcon;
|
|
23512
23528
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23513
23529
|
}
|
|
@@ -23555,7 +23571,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23555
23571
|
var finalFormatter = entry.formatter || formatter;
|
|
23556
23572
|
var className = classNames((_classNames = {
|
|
23557
23573
|
'recharts-legend-item': true
|
|
23558
|
-
}, _defineProperty$
|
|
23574
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23559
23575
|
if (entry.type === 'none') {
|
|
23560
23576
|
return null;
|
|
23561
23577
|
}
|
|
@@ -23600,8 +23616,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23600
23616
|
}]);
|
|
23601
23617
|
return DefaultLegendContent;
|
|
23602
23618
|
}(PureComponent);
|
|
23603
|
-
_defineProperty$
|
|
23604
|
-
_defineProperty$
|
|
23619
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23620
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23605
23621
|
iconSize: 14,
|
|
23606
23622
|
layout: 'horizontal',
|
|
23607
23623
|
align: 'center',
|
|
@@ -23609,25 +23625,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23609
23625
|
inactiveColor: '#ccc'
|
|
23610
23626
|
});
|
|
23611
23627
|
|
|
23612
|
-
function _typeof$
|
|
23613
|
-
var _excluded$
|
|
23614
|
-
function ownKeys$
|
|
23615
|
-
function _objectSpread$
|
|
23616
|
-
function _classCallCheck$
|
|
23617
|
-
function _defineProperties$
|
|
23618
|
-
function _createClass$
|
|
23619
|
-
function _inherits$
|
|
23620
|
-
function _setPrototypeOf$
|
|
23621
|
-
function _createSuper$
|
|
23622
|
-
function _possibleConstructorReturn$
|
|
23623
|
-
function _assertThisInitialized$
|
|
23624
|
-
function _isNativeReflectConstruct$
|
|
23625
|
-
function _getPrototypeOf$
|
|
23626
|
-
function _defineProperty$
|
|
23627
|
-
function _toPropertyKey$
|
|
23628
|
-
function _toPrimitive$
|
|
23629
|
-
function _objectWithoutProperties$
|
|
23630
|
-
function _objectWithoutPropertiesLoose$
|
|
23628
|
+
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); }
|
|
23629
|
+
var _excluded$b = ["ref"];
|
|
23630
|
+
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; }
|
|
23631
|
+
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; }
|
|
23632
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23633
|
+
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$r(descriptor.key), descriptor); } }
|
|
23634
|
+
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; }
|
|
23635
|
+
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); }
|
|
23636
|
+
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); }
|
|
23637
|
+
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); }; }
|
|
23638
|
+
function _possibleConstructorReturn$8(self, call) { if (call && (_typeof$s(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); }
|
|
23639
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23640
|
+
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; } }
|
|
23641
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23642
|
+
function _defineProperty$s(obj, key, value) { key = _toPropertyKey$r(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23643
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23644
|
+
function _toPrimitive$r(input, hint) { if (_typeof$s(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$s(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23645
|
+
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; }
|
|
23646
|
+
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; }
|
|
23631
23647
|
function defaultUniqBy$1(entry) {
|
|
23632
23648
|
return entry.value;
|
|
23633
23649
|
}
|
|
@@ -23648,27 +23664,27 @@ function renderContent$1(content, props) {
|
|
|
23648
23664
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23649
23665
|
}
|
|
23650
23666
|
props.ref;
|
|
23651
|
-
var otherProps = _objectWithoutProperties$
|
|
23667
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23652
23668
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23653
23669
|
}
|
|
23654
23670
|
var EPS$2 = 1;
|
|
23655
23671
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23656
|
-
_inherits$
|
|
23657
|
-
var _super = _createSuper$
|
|
23672
|
+
_inherits$8(Legend, _PureComponent);
|
|
23673
|
+
var _super = _createSuper$8(Legend);
|
|
23658
23674
|
function Legend() {
|
|
23659
23675
|
var _this;
|
|
23660
|
-
_classCallCheck$
|
|
23676
|
+
_classCallCheck$a(this, Legend);
|
|
23661
23677
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23662
23678
|
args[_key] = arguments[_key];
|
|
23663
23679
|
}
|
|
23664
23680
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23665
|
-
_defineProperty$
|
|
23681
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23666
23682
|
boxWidth: -1,
|
|
23667
23683
|
boxHeight: -1
|
|
23668
23684
|
});
|
|
23669
23685
|
return _this;
|
|
23670
23686
|
}
|
|
23671
|
-
_createClass$
|
|
23687
|
+
_createClass$a(Legend, [{
|
|
23672
23688
|
key: "componentDidMount",
|
|
23673
23689
|
value: function componentDidMount() {
|
|
23674
23690
|
this.updateBBox();
|
|
@@ -23743,7 +23759,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23743
23759
|
};
|
|
23744
23760
|
}
|
|
23745
23761
|
}
|
|
23746
|
-
return _objectSpread$
|
|
23762
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23747
23763
|
}
|
|
23748
23764
|
}, {
|
|
23749
23765
|
key: "updateBBox",
|
|
@@ -23786,7 +23802,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23786
23802
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23787
23803
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23788
23804
|
payload = _this$props2.payload;
|
|
23789
|
-
var outerStyle = _objectSpread$
|
|
23805
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23790
23806
|
position: 'absolute',
|
|
23791
23807
|
width: width || 'auto',
|
|
23792
23808
|
height: height || 'auto'
|
|
@@ -23797,7 +23813,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23797
23813
|
ref: function ref(node) {
|
|
23798
23814
|
_this2.wrapperNode = node;
|
|
23799
23815
|
}
|
|
23800
|
-
}, renderContent$1(content, _objectSpread$
|
|
23816
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23801
23817
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23802
23818
|
})));
|
|
23803
23819
|
}
|
|
@@ -23820,8 +23836,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23820
23836
|
}]);
|
|
23821
23837
|
return Legend;
|
|
23822
23838
|
}(PureComponent);
|
|
23823
|
-
_defineProperty$
|
|
23824
|
-
_defineProperty$
|
|
23839
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23840
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23825
23841
|
iconSize: 14,
|
|
23826
23842
|
layout: 'horizontal',
|
|
23827
23843
|
align: 'center',
|
|
@@ -24385,13 +24401,13 @@ function setRafTimeout(callback) {
|
|
|
24385
24401
|
requestAnimationFrame(shouldUpdate);
|
|
24386
24402
|
}
|
|
24387
24403
|
|
|
24388
|
-
function _typeof$
|
|
24389
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24390
|
-
function _nonIterableRest$
|
|
24391
|
-
function _unsupportedIterableToArray$
|
|
24392
|
-
function _arrayLikeToArray$
|
|
24404
|
+
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); }
|
|
24405
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24406
|
+
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."); }
|
|
24407
|
+
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); }
|
|
24408
|
+
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; }
|
|
24393
24409
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24394
|
-
function _arrayWithHoles$
|
|
24410
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24395
24411
|
function createAnimateManager() {
|
|
24396
24412
|
var currStyle = {};
|
|
24397
24413
|
var handleChange = function handleChange() {
|
|
@@ -24418,7 +24434,7 @@ function createAnimateManager() {
|
|
|
24418
24434
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24419
24435
|
return;
|
|
24420
24436
|
}
|
|
24421
|
-
if (_typeof$
|
|
24437
|
+
if (_typeof$r(_style) === 'object') {
|
|
24422
24438
|
currStyle = _style;
|
|
24423
24439
|
handleChange(currStyle);
|
|
24424
24440
|
}
|
|
@@ -24445,12 +24461,12 @@ function createAnimateManager() {
|
|
|
24445
24461
|
};
|
|
24446
24462
|
}
|
|
24447
24463
|
|
|
24448
|
-
function _typeof$
|
|
24449
|
-
function ownKeys$
|
|
24450
|
-
function _objectSpread$
|
|
24451
|
-
function _defineProperty$
|
|
24452
|
-
function _toPropertyKey$
|
|
24453
|
-
function _toPrimitive$
|
|
24464
|
+
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); }
|
|
24465
|
+
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; }
|
|
24466
|
+
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; }
|
|
24467
|
+
function _defineProperty$r(obj, key, value) { key = _toPropertyKey$q(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24468
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24469
|
+
function _toPrimitive$q(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); }
|
|
24454
24470
|
/* eslint no-console: 0 */
|
|
24455
24471
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24456
24472
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24482,7 +24498,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24482
24498
|
*/
|
|
24483
24499
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24484
24500
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24485
|
-
return _defineProperty$
|
|
24501
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24486
24502
|
}
|
|
24487
24503
|
var isTransition = name === 'transition';
|
|
24488
24504
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24493,7 +24509,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24493
24509
|
if (isTransition) {
|
|
24494
24510
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24495
24511
|
}
|
|
24496
|
-
return _objectSpread$
|
|
24512
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24497
24513
|
}, {});
|
|
24498
24514
|
};
|
|
24499
24515
|
|
|
@@ -24503,7 +24519,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24503
24519
|
*/
|
|
24504
24520
|
var mapObject = function mapObject(fn, obj) {
|
|
24505
24521
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24506
|
-
return _objectSpread$
|
|
24522
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24507
24523
|
}, {});
|
|
24508
24524
|
};
|
|
24509
24525
|
|
|
@@ -24513,7 +24529,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24513
24529
|
*/
|
|
24514
24530
|
var translateStyle = function translateStyle(style) {
|
|
24515
24531
|
return Object.keys(style).reduce(function (res, key) {
|
|
24516
|
-
return _objectSpread$
|
|
24532
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24517
24533
|
}, style);
|
|
24518
24534
|
};
|
|
24519
24535
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24541,16 +24557,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24541
24557
|
}
|
|
24542
24558
|
};
|
|
24543
24559
|
|
|
24544
|
-
function _slicedToArray$
|
|
24545
|
-
function _nonIterableRest$
|
|
24546
|
-
function _iterableToArrayLimit$
|
|
24547
|
-
function _arrayWithHoles$
|
|
24548
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24560
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24561
|
+
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."); }
|
|
24562
|
+
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; } }
|
|
24563
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24564
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24549
24565
|
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."); }
|
|
24550
|
-
function _unsupportedIterableToArray$
|
|
24566
|
+
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); }
|
|
24551
24567
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24552
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24553
|
-
function _arrayLikeToArray$
|
|
24568
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24569
|
+
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; }
|
|
24554
24570
|
var ACCURACY = 1e-4;
|
|
24555
24571
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24556
24572
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24626,7 +24642,7 @@ var configBezier = function configBezier() {
|
|
|
24626
24642
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24627
24643
|
return parseFloat(x);
|
|
24628
24644
|
});
|
|
24629
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24645
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24630
24646
|
x1 = _easing$1$split$0$spl2[0];
|
|
24631
24647
|
y1 = _easing$1$split$0$spl2[1];
|
|
24632
24648
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24719,22 +24735,22 @@ var configEasing = function configEasing() {
|
|
|
24719
24735
|
return null;
|
|
24720
24736
|
};
|
|
24721
24737
|
|
|
24722
|
-
function _typeof$
|
|
24723
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24738
|
+
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); }
|
|
24739
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24724
24740
|
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."); }
|
|
24725
24741
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24726
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24727
|
-
function ownKeys$
|
|
24728
|
-
function _objectSpread$
|
|
24729
|
-
function _defineProperty$
|
|
24730
|
-
function _toPropertyKey$
|
|
24731
|
-
function _toPrimitive$
|
|
24732
|
-
function _slicedToArray$
|
|
24733
|
-
function _nonIterableRest$
|
|
24734
|
-
function _unsupportedIterableToArray$
|
|
24735
|
-
function _arrayLikeToArray$
|
|
24736
|
-
function _iterableToArrayLimit$
|
|
24737
|
-
function _arrayWithHoles$
|
|
24742
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24743
|
+
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; }
|
|
24744
|
+
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; }
|
|
24745
|
+
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; }
|
|
24746
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24747
|
+
function _toPrimitive$p(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); }
|
|
24748
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24749
|
+
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."); }
|
|
24750
|
+
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); }
|
|
24751
|
+
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; }
|
|
24752
|
+
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; } }
|
|
24753
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24738
24754
|
var alpha = function alpha(begin, end, k) {
|
|
24739
24755
|
return begin + (end - begin) * k;
|
|
24740
24756
|
};
|
|
@@ -24752,10 +24768,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24752
24768
|
var nextStepVals = mapObject(function (key, val) {
|
|
24753
24769
|
if (needContinue(val)) {
|
|
24754
24770
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24755
|
-
_easing2 = _slicedToArray$
|
|
24771
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24756
24772
|
newX = _easing2[0],
|
|
24757
24773
|
newV = _easing2[1];
|
|
24758
|
-
return _objectSpread$
|
|
24774
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24759
24775
|
from: newX,
|
|
24760
24776
|
velocity: newV
|
|
24761
24777
|
});
|
|
@@ -24765,7 +24781,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24765
24781
|
if (steps < 1) {
|
|
24766
24782
|
return mapObject(function (key, val) {
|
|
24767
24783
|
if (needContinue(val)) {
|
|
24768
|
-
return _objectSpread$
|
|
24784
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24769
24785
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24770
24786
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24771
24787
|
});
|
|
@@ -24780,10 +24796,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24780
24796
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24781
24797
|
var interKeys = getIntersectionKeys(from, to);
|
|
24782
24798
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24783
|
-
return _objectSpread$
|
|
24799
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24784
24800
|
}, {});
|
|
24785
24801
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24786
|
-
return _objectSpread$
|
|
24802
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24787
24803
|
from: from[key],
|
|
24788
24804
|
velocity: 0,
|
|
24789
24805
|
to: to[key]
|
|
@@ -24813,7 +24829,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24813
24829
|
var steps = deltaTime / easing.dt;
|
|
24814
24830
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24815
24831
|
// get union set and add compatible prefix
|
|
24816
|
-
render(_objectSpread$
|
|
24832
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24817
24833
|
preTime = now;
|
|
24818
24834
|
if (!shouldStopAnimation()) {
|
|
24819
24835
|
cafId = requestAnimationFrame(update);
|
|
@@ -24831,14 +24847,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24831
24847
|
}, timingStyle);
|
|
24832
24848
|
|
|
24833
24849
|
// get union set and add compatible prefix
|
|
24834
|
-
render(_objectSpread$
|
|
24850
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24835
24851
|
if (t < 1) {
|
|
24836
24852
|
cafId = requestAnimationFrame(update);
|
|
24837
24853
|
} else {
|
|
24838
24854
|
var finalStyle = mapObject(function (key, val) {
|
|
24839
24855
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24840
24856
|
}, timingStyle);
|
|
24841
|
-
render(_objectSpread$
|
|
24857
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24842
24858
|
}
|
|
24843
24859
|
};
|
|
24844
24860
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24854,37 +24870,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24854
24870
|
};
|
|
24855
24871
|
});
|
|
24856
24872
|
|
|
24857
|
-
function _typeof$
|
|
24858
|
-
var _excluded$
|
|
24859
|
-
function _objectWithoutProperties$
|
|
24860
|
-
function _objectWithoutPropertiesLoose$
|
|
24861
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24873
|
+
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); }
|
|
24874
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24875
|
+
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; }
|
|
24876
|
+
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; }
|
|
24877
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
24862
24878
|
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."); }
|
|
24863
|
-
function _unsupportedIterableToArray$
|
|
24879
|
+
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); }
|
|
24864
24880
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24865
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24866
|
-
function _arrayLikeToArray$
|
|
24867
|
-
function ownKeys$
|
|
24868
|
-
function _objectSpread$
|
|
24869
|
-
function _defineProperty$
|
|
24870
|
-
function _classCallCheck$
|
|
24871
|
-
function _defineProperties$
|
|
24872
|
-
function _createClass$
|
|
24873
|
-
function _toPropertyKey$
|
|
24874
|
-
function _toPrimitive$
|
|
24875
|
-
function _inherits$
|
|
24876
|
-
function _setPrototypeOf$
|
|
24877
|
-
function _createSuper$
|
|
24878
|
-
function _possibleConstructorReturn$
|
|
24879
|
-
function _assertThisInitialized$
|
|
24880
|
-
function _isNativeReflectConstruct$
|
|
24881
|
-
function _getPrototypeOf$
|
|
24881
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
24882
|
+
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; }
|
|
24883
|
+
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; }
|
|
24884
|
+
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; }
|
|
24885
|
+
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; }
|
|
24886
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24887
|
+
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); } }
|
|
24888
|
+
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; }
|
|
24889
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
24890
|
+
function _toPrimitive$o(input, hint) { if (_typeof$o(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$o(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24891
|
+
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); }
|
|
24892
|
+
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); }
|
|
24893
|
+
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); }; }
|
|
24894
|
+
function _possibleConstructorReturn$7(self, call) { if (call && (_typeof$o(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); }
|
|
24895
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24896
|
+
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; } }
|
|
24897
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
24882
24898
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24883
|
-
_inherits$
|
|
24884
|
-
var _super = _createSuper$
|
|
24899
|
+
_inherits$7(Animate, _PureComponent);
|
|
24900
|
+
var _super = _createSuper$7(Animate);
|
|
24885
24901
|
function Animate(props, context) {
|
|
24886
24902
|
var _this;
|
|
24887
|
-
_classCallCheck$
|
|
24903
|
+
_classCallCheck$9(this, Animate);
|
|
24888
24904
|
_this = _super.call(this, props, context);
|
|
24889
24905
|
var _this$props = _this.props,
|
|
24890
24906
|
isActive = _this$props.isActive,
|
|
@@ -24894,8 +24910,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24894
24910
|
steps = _this$props.steps,
|
|
24895
24911
|
children = _this$props.children,
|
|
24896
24912
|
duration = _this$props.duration;
|
|
24897
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24898
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24913
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
24914
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
24899
24915
|
if (!isActive || duration <= 0) {
|
|
24900
24916
|
_this.state = {
|
|
24901
24917
|
style: {}
|
|
@@ -24907,7 +24923,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24907
24923
|
style: to
|
|
24908
24924
|
};
|
|
24909
24925
|
}
|
|
24910
|
-
return _possibleConstructorReturn$
|
|
24926
|
+
return _possibleConstructorReturn$7(_this);
|
|
24911
24927
|
}
|
|
24912
24928
|
if (steps && steps.length) {
|
|
24913
24929
|
_this.state = {
|
|
@@ -24918,10 +24934,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24918
24934
|
_this.state = {
|
|
24919
24935
|
style: from
|
|
24920
24936
|
};
|
|
24921
|
-
return _possibleConstructorReturn$
|
|
24937
|
+
return _possibleConstructorReturn$7(_this);
|
|
24922
24938
|
}
|
|
24923
24939
|
_this.state = {
|
|
24924
|
-
style: attributeName ? _defineProperty$
|
|
24940
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
24925
24941
|
};
|
|
24926
24942
|
} else {
|
|
24927
24943
|
_this.state = {
|
|
@@ -24930,7 +24946,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24930
24946
|
}
|
|
24931
24947
|
return _this;
|
|
24932
24948
|
}
|
|
24933
|
-
_createClass$
|
|
24949
|
+
_createClass$9(Animate, [{
|
|
24934
24950
|
key: "componentDidMount",
|
|
24935
24951
|
value: function componentDidMount() {
|
|
24936
24952
|
var _this$props2 = this.props,
|
|
@@ -24958,7 +24974,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24958
24974
|
}
|
|
24959
24975
|
if (!isActive) {
|
|
24960
24976
|
var newState = {
|
|
24961
|
-
style: attributeName ? _defineProperty$
|
|
24977
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
24962
24978
|
};
|
|
24963
24979
|
if (this.state && style) {
|
|
24964
24980
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24981,14 +24997,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24981
24997
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24982
24998
|
if (this.state && style) {
|
|
24983
24999
|
var _newState = {
|
|
24984
|
-
style: attributeName ? _defineProperty$
|
|
25000
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
24985
25001
|
};
|
|
24986
25002
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24987
25003
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24988
25004
|
this.setState(_newState);
|
|
24989
25005
|
}
|
|
24990
25006
|
}
|
|
24991
|
-
this.runAnimation(_objectSpread$
|
|
25007
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
24992
25008
|
from: from,
|
|
24993
25009
|
begin: 0
|
|
24994
25010
|
}));
|
|
@@ -25071,7 +25087,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25071
25087
|
}), duration]);
|
|
25072
25088
|
}
|
|
25073
25089
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25074
|
-
var newStyle = _objectSpread$
|
|
25090
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25075
25091
|
transition: transition
|
|
25076
25092
|
});
|
|
25077
25093
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25103,9 +25119,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25103
25119
|
this.runStepAnimation(props);
|
|
25104
25120
|
return;
|
|
25105
25121
|
}
|
|
25106
|
-
var to = attributeName ? _defineProperty$
|
|
25122
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25107
25123
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25108
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25124
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25109
25125
|
transition: transition
|
|
25110
25126
|
}), duration, onAnimationEnd]);
|
|
25111
25127
|
}
|
|
@@ -25126,7 +25142,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25126
25142
|
_this$props4.onAnimationEnd;
|
|
25127
25143
|
_this$props4.shouldReAnimate;
|
|
25128
25144
|
_this$props4.onAnimationReStart;
|
|
25129
|
-
var others = _objectWithoutProperties$
|
|
25145
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25130
25146
|
var count = Children.count(children);
|
|
25131
25147
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25132
25148
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25141,8 +25157,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25141
25157
|
_container$props$styl = _container$props.style,
|
|
25142
25158
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25143
25159
|
className = _container$props.className;
|
|
25144
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25145
|
-
style: _objectSpread$
|
|
25160
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25161
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25146
25162
|
className: className
|
|
25147
25163
|
}));
|
|
25148
25164
|
return res;
|
|
@@ -25667,10 +25683,10 @@ var defineProperty$2 = (function() {
|
|
|
25667
25683
|
} catch (e) {}
|
|
25668
25684
|
}());
|
|
25669
25685
|
|
|
25670
|
-
var _defineProperty$
|
|
25686
|
+
var _defineProperty$o = defineProperty$2;
|
|
25671
25687
|
|
|
25672
25688
|
var constant$1 = constant_1,
|
|
25673
|
-
defineProperty$1 = _defineProperty$
|
|
25689
|
+
defineProperty$1 = _defineProperty$o,
|
|
25674
25690
|
identity$7 = identity_1;
|
|
25675
25691
|
|
|
25676
25692
|
/**
|
|
@@ -25847,18 +25863,18 @@ var sortBy_1 = sortBy;
|
|
|
25847
25863
|
/**
|
|
25848
25864
|
* @fileOverview Default Tooltip Content
|
|
25849
25865
|
*/
|
|
25850
|
-
function _typeof$
|
|
25851
|
-
function _slicedToArray$
|
|
25852
|
-
function _nonIterableRest$
|
|
25853
|
-
function _unsupportedIterableToArray$
|
|
25854
|
-
function _arrayLikeToArray$
|
|
25855
|
-
function _iterableToArrayLimit$
|
|
25856
|
-
function _arrayWithHoles$
|
|
25857
|
-
function ownKeys$
|
|
25858
|
-
function _objectSpread$
|
|
25859
|
-
function _defineProperty$
|
|
25860
|
-
function _toPropertyKey$
|
|
25861
|
-
function _toPrimitive$
|
|
25866
|
+
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); }
|
|
25867
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25868
|
+
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."); }
|
|
25869
|
+
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); }
|
|
25870
|
+
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; }
|
|
25871
|
+
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; } }
|
|
25872
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25873
|
+
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; }
|
|
25874
|
+
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$n(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; }
|
|
25875
|
+
function _defineProperty$n(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; }
|
|
25876
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
25877
|
+
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); }
|
|
25862
25878
|
function defaultFormatter(value) {
|
|
25863
25879
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25864
25880
|
}
|
|
@@ -25888,7 +25904,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25888
25904
|
if (entry.type === 'none') {
|
|
25889
25905
|
return null;
|
|
25890
25906
|
}
|
|
25891
|
-
var finalItemStyle = _objectSpread$
|
|
25907
|
+
var finalItemStyle = _objectSpread$m({
|
|
25892
25908
|
display: 'block',
|
|
25893
25909
|
paddingTop: 4,
|
|
25894
25910
|
paddingBottom: 4,
|
|
@@ -25902,7 +25918,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25902
25918
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25903
25919
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25904
25920
|
if (Array.isArray(formatted)) {
|
|
25905
|
-
var _formatted = _slicedToArray$
|
|
25921
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
25906
25922
|
finalValue = _formatted[0];
|
|
25907
25923
|
finalName = _formatted[1];
|
|
25908
25924
|
} else {
|
|
@@ -25934,14 +25950,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25934
25950
|
}
|
|
25935
25951
|
return null;
|
|
25936
25952
|
};
|
|
25937
|
-
var finalStyle = _objectSpread$
|
|
25953
|
+
var finalStyle = _objectSpread$m({
|
|
25938
25954
|
margin: 0,
|
|
25939
25955
|
padding: 10,
|
|
25940
25956
|
backgroundColor: '#fff',
|
|
25941
25957
|
border: '1px solid #ccc',
|
|
25942
25958
|
whiteSpace: 'nowrap'
|
|
25943
25959
|
}, contentStyle);
|
|
25944
|
-
var finalLabelStyle = _objectSpread$
|
|
25960
|
+
var finalLabelStyle = _objectSpread$m({
|
|
25945
25961
|
margin: 0
|
|
25946
25962
|
}, labelStyle);
|
|
25947
25963
|
var hasLabel = !isNil_1(label);
|
|
@@ -25982,18 +25998,22 @@ var Global = {
|
|
|
25982
25998
|
}
|
|
25983
25999
|
};
|
|
25984
26000
|
|
|
25985
|
-
function _typeof$
|
|
25986
|
-
function ownKeys$
|
|
25987
|
-
function _objectSpread$
|
|
25988
|
-
function
|
|
25989
|
-
function
|
|
25990
|
-
function
|
|
25991
|
-
function
|
|
25992
|
-
function
|
|
25993
|
-
function
|
|
25994
|
-
function
|
|
25995
|
-
function
|
|
25996
|
-
function
|
|
26001
|
+
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); }
|
|
26002
|
+
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; }
|
|
26003
|
+
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$m(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; }
|
|
26004
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26005
|
+
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$m(descriptor.key), descriptor); } }
|
|
26006
|
+
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; }
|
|
26007
|
+
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); }
|
|
26008
|
+
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); }
|
|
26009
|
+
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); }; }
|
|
26010
|
+
function _possibleConstructorReturn$6(self, call) { if (call && (_typeof$m(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); }
|
|
26011
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26012
|
+
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; } }
|
|
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); }
|
|
25997
26017
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25998
26018
|
var EPS$1 = 1;
|
|
25999
26019
|
function defaultUniqBy(entry) {
|
|
@@ -26017,7 +26037,204 @@ function renderContent(content, props) {
|
|
|
26017
26037
|
}
|
|
26018
26038
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26019
26039
|
}
|
|
26020
|
-
var
|
|
26040
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
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", {
|
|
26021
26238
|
active: false,
|
|
26022
26239
|
allowEscapeViewBox: {
|
|
26023
26240
|
x: false,
|
|
@@ -26038,9 +26255,6 @@ var tooltipDefaultProps = {
|
|
|
26038
26255
|
x: 0,
|
|
26039
26256
|
y: 0
|
|
26040
26257
|
},
|
|
26041
|
-
// this doesn't exist on TooltipProps
|
|
26042
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26043
|
-
// @ts-ignore
|
|
26044
26258
|
cursorStyle: {},
|
|
26045
26259
|
separator: ' : ',
|
|
26046
26260
|
wrapperStyle: {},
|
|
@@ -26054,173 +26268,7 @@ var tooltipDefaultProps = {
|
|
|
26054
26268
|
animationDuration: 400,
|
|
26055
26269
|
filterNull: true,
|
|
26056
26270
|
useTranslate3d: false
|
|
26057
|
-
};
|
|
26058
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26059
|
-
var _classNames;
|
|
26060
|
-
var _useState = useState(-1),
|
|
26061
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26062
|
-
boxWidth = _useState2[0],
|
|
26063
|
-
setBoxWidth = _useState2[1];
|
|
26064
|
-
var _useState3 = useState(-1),
|
|
26065
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26066
|
-
boxHeight = _useState4[0],
|
|
26067
|
-
setBoxHeight = _useState4[1];
|
|
26068
|
-
var _useState5 = useState(false),
|
|
26069
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26070
|
-
dismissed = _useState6[0],
|
|
26071
|
-
setDismissed = _useState6[1];
|
|
26072
|
-
var _useState7 = useState({
|
|
26073
|
-
x: 0,
|
|
26074
|
-
y: 0
|
|
26075
|
-
}),
|
|
26076
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26077
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26078
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26079
|
-
var wrapperNode = useRef();
|
|
26080
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26081
|
-
reverseDirection = props.reverseDirection,
|
|
26082
|
-
coordinate = props.coordinate,
|
|
26083
|
-
offset = props.offset,
|
|
26084
|
-
position = props.position,
|
|
26085
|
-
viewBox = props.viewBox;
|
|
26086
|
-
var handleKeyDown = useCallback(function (event) {
|
|
26087
|
-
if (event.key === 'Escape') {
|
|
26088
|
-
setDismissed(true);
|
|
26089
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26090
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26091
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26092
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26093
|
-
});
|
|
26094
|
-
});
|
|
26095
|
-
}
|
|
26096
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26097
|
-
useEffect(function () {
|
|
26098
|
-
var updateBBox = function updateBBox() {
|
|
26099
|
-
if (dismissed) {
|
|
26100
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26101
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26102
|
-
setDismissed(false);
|
|
26103
|
-
}
|
|
26104
|
-
} else {
|
|
26105
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26106
|
-
}
|
|
26107
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26108
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26109
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26110
|
-
setBoxWidth(box.width);
|
|
26111
|
-
setBoxHeight(box.height);
|
|
26112
|
-
}
|
|
26113
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26114
|
-
setBoxWidth(-1);
|
|
26115
|
-
setBoxHeight(-1);
|
|
26116
|
-
}
|
|
26117
|
-
};
|
|
26118
|
-
updateBBox();
|
|
26119
|
-
return function () {
|
|
26120
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26121
|
-
};
|
|
26122
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26123
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26124
|
-
var key = _ref.key,
|
|
26125
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26126
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26127
|
-
if (position && isNumber(position[key])) {
|
|
26128
|
-
return position[key];
|
|
26129
|
-
}
|
|
26130
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26131
|
-
var positive = coordinate[key] + offset;
|
|
26132
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26133
|
-
return reverseDirection[key] ? negative : positive;
|
|
26134
|
-
}
|
|
26135
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26136
|
-
var _tooltipBoundary = negative;
|
|
26137
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26138
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26139
|
-
return Math.max(positive, viewBox[key]);
|
|
26140
|
-
}
|
|
26141
|
-
return Math.max(negative, viewBox[key]);
|
|
26142
|
-
}
|
|
26143
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26144
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26145
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26146
|
-
return Math.max(negative, viewBox[key]);
|
|
26147
|
-
}
|
|
26148
|
-
return Math.max(positive, viewBox[key]);
|
|
26149
|
-
};
|
|
26150
|
-
var payload = props.payload,
|
|
26151
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26152
|
-
filterNull = props.filterNull,
|
|
26153
|
-
active = props.active,
|
|
26154
|
-
wrapperStyle = props.wrapperStyle,
|
|
26155
|
-
useTranslate3d = props.useTranslate3d,
|
|
26156
|
-
isAnimationActive = props.isAnimationActive,
|
|
26157
|
-
animationDuration = props.animationDuration,
|
|
26158
|
-
animationEasing = props.animationEasing;
|
|
26159
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26160
|
-
return !isNil_1(entry.value);
|
|
26161
|
-
}) : payload);
|
|
26162
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26163
|
-
var content = props.content;
|
|
26164
|
-
var outerStyle = _objectSpread$i({
|
|
26165
|
-
pointerEvents: 'none',
|
|
26166
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26167
|
-
position: 'absolute',
|
|
26168
|
-
top: 0,
|
|
26169
|
-
left: 0
|
|
26170
|
-
}, wrapperStyle);
|
|
26171
|
-
var translateX, translateY;
|
|
26172
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26173
|
-
translateX = position.x;
|
|
26174
|
-
translateY = position.y;
|
|
26175
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26176
|
-
translateX = getTranslate({
|
|
26177
|
-
key: 'x',
|
|
26178
|
-
tooltipDimension: boxWidth,
|
|
26179
|
-
viewBoxDimension: viewBox.width
|
|
26180
|
-
});
|
|
26181
|
-
translateY = getTranslate({
|
|
26182
|
-
key: 'y',
|
|
26183
|
-
tooltipDimension: boxHeight,
|
|
26184
|
-
viewBoxDimension: viewBox.height
|
|
26185
|
-
});
|
|
26186
|
-
} else {
|
|
26187
|
-
outerStyle.visibility = 'hidden';
|
|
26188
|
-
}
|
|
26189
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26190
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26191
|
-
})), outerStyle);
|
|
26192
|
-
if (isAnimationActive && active) {
|
|
26193
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26194
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26195
|
-
})), outerStyle);
|
|
26196
|
-
}
|
|
26197
|
-
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));
|
|
26198
|
-
return (
|
|
26199
|
-
/*#__PURE__*/
|
|
26200
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26201
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26202
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26203
|
-
React__default.createElement("div", {
|
|
26204
|
-
tabIndex: -1,
|
|
26205
|
-
role: "dialog",
|
|
26206
|
-
className: cls,
|
|
26207
|
-
style: outerStyle,
|
|
26208
|
-
ref: wrapperNode
|
|
26209
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26210
|
-
payload: finalPayload
|
|
26211
|
-
})))
|
|
26212
|
-
);
|
|
26213
|
-
};
|
|
26214
|
-
|
|
26215
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26216
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26217
|
-
|
|
26218
|
-
/**
|
|
26219
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26220
|
-
* children.props when there are no props set by the consumer
|
|
26221
|
-
* doesn't work if using default parameters
|
|
26222
|
-
*/
|
|
26223
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26271
|
+
});
|
|
26224
26272
|
|
|
26225
26273
|
var root = _root;
|
|
26226
26274
|
|
|
@@ -31790,12 +31838,12 @@ module.exports = exports['default'];
|
|
|
31790
31838
|
|
|
31791
31839
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31792
31840
|
|
|
31793
|
-
function _typeof$
|
|
31794
|
-
function ownKeys$
|
|
31795
|
-
function _objectSpread$
|
|
31796
|
-
function _defineProperty$
|
|
31797
|
-
function _toPropertyKey$
|
|
31798
|
-
function _toPrimitive$
|
|
31841
|
+
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); }
|
|
31842
|
+
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; }
|
|
31843
|
+
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$l(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; }
|
|
31844
|
+
function _defineProperty$l(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; }
|
|
31845
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31846
|
+
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); }
|
|
31799
31847
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31800
31848
|
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."); }
|
|
31801
31849
|
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); }
|
|
@@ -31863,7 +31911,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31863
31911
|
}
|
|
31864
31912
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31865
31913
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31866
|
-
var measurementSpanStyle = _objectSpread$
|
|
31914
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
31867
31915
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31868
31916
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31869
31917
|
return styleKey;
|
|
@@ -31918,10 +31966,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31918
31966
|
};
|
|
31919
31967
|
};
|
|
31920
31968
|
|
|
31921
|
-
var _excluded$
|
|
31969
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
31970
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31922
31971
|
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); }
|
|
31923
|
-
function _objectWithoutProperties$
|
|
31924
|
-
function _objectWithoutPropertiesLoose$
|
|
31972
|
+
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; }
|
|
31973
|
+
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; }
|
|
31925
31974
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31926
31975
|
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."); }
|
|
31927
31976
|
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); }
|
|
@@ -32075,45 +32124,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32075
32124
|
}
|
|
32076
32125
|
return getWordsWithoutCalculate(children);
|
|
32077
32126
|
};
|
|
32078
|
-
var
|
|
32079
|
-
|
|
32080
|
-
|
|
32081
|
-
|
|
32082
|
-
|
|
32083
|
-
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32127
|
+
var DEFAULT_FILL = '#808080';
|
|
32128
|
+
var Text = function Text(_ref5) {
|
|
32129
|
+
var _ref5$x = _ref5.x,
|
|
32130
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32131
|
+
_ref5$y = _ref5.y,
|
|
32132
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32133
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32134
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32135
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32136
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32137
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32138
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32139
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
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);
|
|
32091
32146
|
var wordsByLines = useMemo(function () {
|
|
32092
32147
|
return getWordsByLines({
|
|
32093
32148
|
breakAll: props.breakAll,
|
|
32094
32149
|
children: props.children,
|
|
32095
32150
|
maxLines: props.maxLines,
|
|
32096
|
-
scaleToFit:
|
|
32151
|
+
scaleToFit: scaleToFit,
|
|
32097
32152
|
style: props.style,
|
|
32098
32153
|
width: props.width
|
|
32099
32154
|
});
|
|
32100
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32155
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32101
32156
|
var dx = props.dx,
|
|
32102
32157
|
dy = props.dy,
|
|
32103
|
-
textAnchor = props.textAnchor,
|
|
32104
|
-
verticalAnchor = props.verticalAnchor,
|
|
32105
|
-
scaleToFit = props.scaleToFit,
|
|
32106
32158
|
angle = props.angle,
|
|
32107
|
-
lineHeight = props.lineHeight,
|
|
32108
|
-
capHeight = props.capHeight,
|
|
32109
32159
|
className = props.className,
|
|
32110
32160
|
breakAll = props.breakAll,
|
|
32111
|
-
textProps = _objectWithoutProperties$
|
|
32112
|
-
if (!isNumOrStr(
|
|
32161
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32162
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32113
32163
|
return null;
|
|
32114
32164
|
}
|
|
32115
|
-
var x =
|
|
32116
|
-
var y =
|
|
32165
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32166
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32117
32167
|
var startDy;
|
|
32118
32168
|
switch (verticalAnchor) {
|
|
32119
32169
|
case 'start':
|
|
@@ -32143,7 +32193,7 @@ var Text = function Text(props) {
|
|
|
32143
32193
|
y: y,
|
|
32144
32194
|
className: classNames('recharts-text', className),
|
|
32145
32195
|
textAnchor: textAnchor,
|
|
32146
|
-
fill:
|
|
32196
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32147
32197
|
}), wordsByLines.map(function (line, index) {
|
|
32148
32198
|
return (
|
|
32149
32199
|
/*#__PURE__*/
|
|
@@ -32156,7 +32206,6 @@ var Text = function Text(props) {
|
|
|
32156
32206
|
);
|
|
32157
32207
|
}));
|
|
32158
32208
|
};
|
|
32159
|
-
Text.defaultProps = textDefaultProps;
|
|
32160
32209
|
|
|
32161
32210
|
var baseIsEqual = _baseIsEqual;
|
|
32162
32211
|
|
|
@@ -38424,7 +38473,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38424
38473
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38425
38474
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38426
38475
|
|
|
38427
|
-
var _excluded$
|
|
38476
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38428
38477
|
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); }
|
|
38429
38478
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38430
38479
|
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."); }
|
|
@@ -38432,8 +38481,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38432
38481
|
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; }
|
|
38433
38482
|
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; } }
|
|
38434
38483
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38435
|
-
function _objectWithoutProperties$
|
|
38436
|
-
function _objectWithoutPropertiesLoose$
|
|
38484
|
+
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; }
|
|
38485
|
+
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; }
|
|
38437
38486
|
function ErrorBar(props) {
|
|
38438
38487
|
var offset = props.offset,
|
|
38439
38488
|
layout = props.layout,
|
|
@@ -38443,7 +38492,7 @@ function ErrorBar(props) {
|
|
|
38443
38492
|
dataPointFormatter = props.dataPointFormatter,
|
|
38444
38493
|
xAxis = props.xAxis,
|
|
38445
38494
|
yAxis = props.yAxis,
|
|
38446
|
-
others = _objectWithoutProperties$
|
|
38495
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38447
38496
|
var svgProps = filterProps(others);
|
|
38448
38497
|
var errorBars = data.map(function (entry, i) {
|
|
38449
38498
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38554,18 +38603,18 @@ ErrorBar.defaultProps = {
|
|
|
38554
38603
|
};
|
|
38555
38604
|
ErrorBar.displayName = 'ErrorBar';
|
|
38556
38605
|
|
|
38557
|
-
function _typeof$
|
|
38606
|
+
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); }
|
|
38558
38607
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38559
38608
|
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."); }
|
|
38560
38609
|
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); }
|
|
38561
38610
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38562
38611
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38563
38612
|
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; }
|
|
38564
|
-
function ownKeys$
|
|
38565
|
-
function _objectSpread$
|
|
38566
|
-
function _defineProperty$
|
|
38567
|
-
function _toPropertyKey$
|
|
38568
|
-
function _toPrimitive$
|
|
38613
|
+
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; }
|
|
38614
|
+
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; }
|
|
38615
|
+
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; }
|
|
38616
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38617
|
+
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); }
|
|
38569
38618
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38570
38619
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38571
38620
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38736,7 +38785,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38736
38785
|
};
|
|
38737
38786
|
});
|
|
38738
38787
|
}
|
|
38739
|
-
return _objectSpread$
|
|
38788
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38740
38789
|
payload: legendData,
|
|
38741
38790
|
item: legendItem
|
|
38742
38791
|
});
|
|
@@ -38890,10 +38939,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38890
38939
|
verticalAlign = legendProps.verticalAlign,
|
|
38891
38940
|
layout = legendProps.layout;
|
|
38892
38941
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38893
|
-
newOffset = _objectSpread$
|
|
38942
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
38894
38943
|
}
|
|
38895
38944
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38896
|
-
newOffset = _objectSpread$
|
|
38945
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38897
38946
|
}
|
|
38898
38947
|
}
|
|
38899
38948
|
return newOffset;
|
|
@@ -39319,14 +39368,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39319
39368
|
items: [item]
|
|
39320
39369
|
};
|
|
39321
39370
|
}
|
|
39322
|
-
return _objectSpread$
|
|
39371
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39323
39372
|
}, {});
|
|
39324
39373
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39325
39374
|
var group = stackGroups[axisId];
|
|
39326
39375
|
if (group.hasStack) {
|
|
39327
39376
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39328
39377
|
var g = group.stackGroups[stackId];
|
|
39329
|
-
return _objectSpread$
|
|
39378
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39330
39379
|
numericAxisId: numericAxisId,
|
|
39331
39380
|
cateAxisId: cateAxisId,
|
|
39332
39381
|
items: g.items,
|
|
@@ -39334,7 +39383,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39334
39383
|
}));
|
|
39335
39384
|
}, {});
|
|
39336
39385
|
}
|
|
39337
|
-
return _objectSpread$
|
|
39386
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39338
39387
|
}, {});
|
|
39339
39388
|
};
|
|
39340
39389
|
|
|
@@ -39548,7 +39597,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39548
39597
|
formatter = _graphicalItem$props.formatter,
|
|
39549
39598
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39550
39599
|
chartType = _graphicalItem$props.chartType;
|
|
39551
|
-
return _objectSpread$
|
|
39600
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39552
39601
|
dataKey: dataKey,
|
|
39553
39602
|
unit: unit,
|
|
39554
39603
|
formatter: formatter,
|
|
@@ -39561,12 +39610,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39561
39610
|
});
|
|
39562
39611
|
};
|
|
39563
39612
|
|
|
39564
|
-
function _typeof$
|
|
39565
|
-
function ownKeys$
|
|
39566
|
-
function _objectSpread$
|
|
39567
|
-
function _defineProperty$
|
|
39568
|
-
function _toPropertyKey$
|
|
39569
|
-
function _toPrimitive$
|
|
39613
|
+
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); }
|
|
39614
|
+
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; }
|
|
39615
|
+
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; }
|
|
39616
|
+
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; }
|
|
39617
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39618
|
+
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); }
|
|
39570
39619
|
var RADIAN = Math.PI / 180;
|
|
39571
39620
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39572
39621
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39671,7 +39720,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39671
39720
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39672
39721
|
}
|
|
39673
39722
|
if (inRange) {
|
|
39674
|
-
return _objectSpread$
|
|
39723
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39675
39724
|
radius: radius,
|
|
39676
39725
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39677
39726
|
});
|
|
@@ -39679,18 +39728,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39679
39728
|
return null;
|
|
39680
39729
|
};
|
|
39681
39730
|
|
|
39682
|
-
function _typeof$
|
|
39731
|
+
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); }
|
|
39732
|
+
var _excluded$7 = ["offset"];
|
|
39683
39733
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39684
39734
|
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."); }
|
|
39685
39735
|
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); }
|
|
39686
39736
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39687
39737
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39688
39738
|
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; }
|
|
39689
|
-
function
|
|
39690
|
-
function
|
|
39691
|
-
function
|
|
39692
|
-
function
|
|
39693
|
-
function
|
|
39739
|
+
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; }
|
|
39740
|
+
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; }
|
|
39741
|
+
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; }
|
|
39742
|
+
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; }
|
|
39743
|
+
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; }
|
|
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); }
|
|
39694
39746
|
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); }
|
|
39695
39747
|
var getLabel = function getLabel(props) {
|
|
39696
39748
|
var value = props.value,
|
|
@@ -39835,7 +39887,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39835
39887
|
textAnchor: 'middle',
|
|
39836
39888
|
verticalAnchor: verticalEnd
|
|
39837
39889
|
};
|
|
39838
|
-
return _objectSpread$
|
|
39890
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39839
39891
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39840
39892
|
width: width
|
|
39841
39893
|
} : {});
|
|
@@ -39847,7 +39899,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39847
39899
|
textAnchor: 'middle',
|
|
39848
39900
|
verticalAnchor: verticalStart
|
|
39849
39901
|
};
|
|
39850
|
-
return _objectSpread$
|
|
39902
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39851
39903
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39852
39904
|
width: width
|
|
39853
39905
|
} : {});
|
|
@@ -39859,7 +39911,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39859
39911
|
textAnchor: horizontalEnd,
|
|
39860
39912
|
verticalAnchor: 'middle'
|
|
39861
39913
|
};
|
|
39862
|
-
return _objectSpread$
|
|
39914
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
39863
39915
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39864
39916
|
height: height
|
|
39865
39917
|
} : {});
|
|
@@ -39871,7 +39923,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39871
39923
|
textAnchor: horizontalStart,
|
|
39872
39924
|
verticalAnchor: 'middle'
|
|
39873
39925
|
};
|
|
39874
|
-
return _objectSpread$
|
|
39926
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
39875
39927
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39876
39928
|
height: height
|
|
39877
39929
|
} : {});
|
|
@@ -39881,7 +39933,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39881
39933
|
height: height
|
|
39882
39934
|
} : {};
|
|
39883
39935
|
if (position === 'insideLeft') {
|
|
39884
|
-
return _objectSpread$
|
|
39936
|
+
return _objectSpread$h({
|
|
39885
39937
|
x: x + horizontalOffset,
|
|
39886
39938
|
y: y + height / 2,
|
|
39887
39939
|
textAnchor: horizontalStart,
|
|
@@ -39889,7 +39941,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39889
39941
|
}, sizeAttrs);
|
|
39890
39942
|
}
|
|
39891
39943
|
if (position === 'insideRight') {
|
|
39892
|
-
return _objectSpread$
|
|
39944
|
+
return _objectSpread$h({
|
|
39893
39945
|
x: x + width - horizontalOffset,
|
|
39894
39946
|
y: y + height / 2,
|
|
39895
39947
|
textAnchor: horizontalEnd,
|
|
@@ -39897,7 +39949,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39897
39949
|
}, sizeAttrs);
|
|
39898
39950
|
}
|
|
39899
39951
|
if (position === 'insideTop') {
|
|
39900
|
-
return _objectSpread$
|
|
39952
|
+
return _objectSpread$h({
|
|
39901
39953
|
x: x + width / 2,
|
|
39902
39954
|
y: y + verticalOffset,
|
|
39903
39955
|
textAnchor: 'middle',
|
|
@@ -39905,7 +39957,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39905
39957
|
}, sizeAttrs);
|
|
39906
39958
|
}
|
|
39907
39959
|
if (position === 'insideBottom') {
|
|
39908
|
-
return _objectSpread$
|
|
39960
|
+
return _objectSpread$h({
|
|
39909
39961
|
x: x + width / 2,
|
|
39910
39962
|
y: y + height - verticalOffset,
|
|
39911
39963
|
textAnchor: 'middle',
|
|
@@ -39913,7 +39965,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39913
39965
|
}, sizeAttrs);
|
|
39914
39966
|
}
|
|
39915
39967
|
if (position === 'insideTopLeft') {
|
|
39916
|
-
return _objectSpread$
|
|
39968
|
+
return _objectSpread$h({
|
|
39917
39969
|
x: x + horizontalOffset,
|
|
39918
39970
|
y: y + verticalOffset,
|
|
39919
39971
|
textAnchor: horizontalStart,
|
|
@@ -39921,7 +39973,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39921
39973
|
}, sizeAttrs);
|
|
39922
39974
|
}
|
|
39923
39975
|
if (position === 'insideTopRight') {
|
|
39924
|
-
return _objectSpread$
|
|
39976
|
+
return _objectSpread$h({
|
|
39925
39977
|
x: x + width - horizontalOffset,
|
|
39926
39978
|
y: y + verticalOffset,
|
|
39927
39979
|
textAnchor: horizontalEnd,
|
|
@@ -39929,7 +39981,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39929
39981
|
}, sizeAttrs);
|
|
39930
39982
|
}
|
|
39931
39983
|
if (position === 'insideBottomLeft') {
|
|
39932
|
-
return _objectSpread$
|
|
39984
|
+
return _objectSpread$h({
|
|
39933
39985
|
x: x + horizontalOffset,
|
|
39934
39986
|
y: y + height - verticalOffset,
|
|
39935
39987
|
textAnchor: horizontalStart,
|
|
@@ -39937,7 +39989,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39937
39989
|
}, sizeAttrs);
|
|
39938
39990
|
}
|
|
39939
39991
|
if (position === 'insideBottomRight') {
|
|
39940
|
-
return _objectSpread$
|
|
39992
|
+
return _objectSpread$h({
|
|
39941
39993
|
x: x + width - horizontalOffset,
|
|
39942
39994
|
y: y + height - verticalOffset,
|
|
39943
39995
|
textAnchor: horizontalEnd,
|
|
@@ -39945,14 +39997,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39945
39997
|
}, sizeAttrs);
|
|
39946
39998
|
}
|
|
39947
39999
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39948
|
-
return _objectSpread$
|
|
40000
|
+
return _objectSpread$h({
|
|
39949
40001
|
x: x + getPercentValue(position.x, width),
|
|
39950
40002
|
y: y + getPercentValue(position.y, height),
|
|
39951
40003
|
textAnchor: 'end',
|
|
39952
40004
|
verticalAnchor: 'end'
|
|
39953
40005
|
}, sizeAttrs);
|
|
39954
40006
|
}
|
|
39955
|
-
return _objectSpread$
|
|
40007
|
+
return _objectSpread$h({
|
|
39956
40008
|
x: x + width / 2,
|
|
39957
40009
|
y: y + height / 2,
|
|
39958
40010
|
textAnchor: 'middle',
|
|
@@ -39962,7 +40014,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39962
40014
|
var isPolar = function isPolar(viewBox) {
|
|
39963
40015
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39964
40016
|
};
|
|
39965
|
-
function Label$3(
|
|
40017
|
+
function Label$3(_ref4) {
|
|
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);
|
|
39966
40024
|
var viewBox = props.viewBox,
|
|
39967
40025
|
position = props.position,
|
|
39968
40026
|
value = props.value,
|
|
@@ -39999,9 +40057,6 @@ function Label$3(props) {
|
|
|
39999
40057
|
}), label);
|
|
40000
40058
|
}
|
|
40001
40059
|
Label$3.displayName = 'Label';
|
|
40002
|
-
Label$3.defaultProps = {
|
|
40003
|
-
offset: 5
|
|
40004
|
-
};
|
|
40005
40060
|
var parseViewBox = function parseViewBox(props) {
|
|
40006
40061
|
var cx = props.cx,
|
|
40007
40062
|
cy = props.cy,
|
|
@@ -40156,8 +40211,9 @@ function last(array) {
|
|
|
40156
40211
|
|
|
40157
40212
|
var last_1 = last;
|
|
40158
40213
|
|
|
40159
|
-
function _typeof$
|
|
40160
|
-
var _excluded$
|
|
40214
|
+
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); }
|
|
40215
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40216
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40161
40217
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40162
40218
|
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."); }
|
|
40163
40219
|
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); }
|
|
@@ -40165,26 +40221,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40165
40221
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40166
40222
|
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; }
|
|
40167
40223
|
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); }
|
|
40168
|
-
function ownKeys$
|
|
40169
|
-
function _objectSpread$
|
|
40170
|
-
function _defineProperty$
|
|
40171
|
-
function _toPropertyKey$
|
|
40172
|
-
function _toPrimitive$
|
|
40173
|
-
function _objectWithoutProperties$
|
|
40174
|
-
function _objectWithoutPropertiesLoose$
|
|
40175
|
-
var
|
|
40176
|
-
|
|
40177
|
-
|
|
40178
|
-
|
|
40179
|
-
|
|
40180
|
-
|
|
40181
|
-
|
|
40182
|
-
|
|
40183
|
-
dataKey =
|
|
40184
|
-
clockWise =
|
|
40185
|
-
id =
|
|
40186
|
-
textBreakAll =
|
|
40187
|
-
others = _objectWithoutProperties$
|
|
40224
|
+
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; }
|
|
40225
|
+
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; }
|
|
40226
|
+
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; }
|
|
40227
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40228
|
+
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); }
|
|
40229
|
+
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; }
|
|
40230
|
+
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; }
|
|
40231
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40232
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40233
|
+
};
|
|
40234
|
+
function LabelList(_ref) {
|
|
40235
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40236
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40237
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40238
|
+
var data = restProps.data,
|
|
40239
|
+
dataKey = restProps.dataKey,
|
|
40240
|
+
clockWise = restProps.clockWise,
|
|
40241
|
+
id = restProps.id,
|
|
40242
|
+
textBreakAll = restProps.textBreakAll,
|
|
40243
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40188
40244
|
if (!data || !data.length) {
|
|
40189
40245
|
return null;
|
|
40190
40246
|
}
|
|
@@ -40200,7 +40256,7 @@ function LabelList(props) {
|
|
|
40200
40256
|
index: index,
|
|
40201
40257
|
value: value,
|
|
40202
40258
|
textBreakAll: textBreakAll,
|
|
40203
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40259
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40204
40260
|
clockWise: clockWise
|
|
40205
40261
|
})),
|
|
40206
40262
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40255,9 +40311,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40255
40311
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40256
40312
|
}
|
|
40257
40313
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40258
|
-
LabelList.defaultProps = defaultProps;
|
|
40259
40314
|
|
|
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); }
|
|
40260
40316
|
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); }
|
|
40261
40322
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40262
40323
|
var sign = mathSign(endAngle - startAngle);
|
|
40263
40324
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40398,7 +40459,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40398
40459
|
}
|
|
40399
40460
|
return path;
|
|
40400
40461
|
};
|
|
40401
|
-
var
|
|
40462
|
+
var defaultProps$1 = {
|
|
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);
|
|
40402
40475
|
var cx = props.cx,
|
|
40403
40476
|
cy = props.cy,
|
|
40404
40477
|
innerRadius = props.innerRadius,
|
|
@@ -40444,25 +40517,14 @@ var Sector = function Sector(props) {
|
|
|
40444
40517
|
role: "img"
|
|
40445
40518
|
}));
|
|
40446
40519
|
};
|
|
40447
|
-
Sector.defaultProps = {
|
|
40448
|
-
cx: 0,
|
|
40449
|
-
cy: 0,
|
|
40450
|
-
innerRadius: 0,
|
|
40451
|
-
outerRadius: 0,
|
|
40452
|
-
startAngle: 0,
|
|
40453
|
-
endAngle: 0,
|
|
40454
|
-
cornerRadius: 0,
|
|
40455
|
-
forceCornerRadius: false,
|
|
40456
|
-
cornerIsExternal: false
|
|
40457
|
-
};
|
|
40458
40520
|
|
|
40459
|
-
function _typeof$
|
|
40521
|
+
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); }
|
|
40460
40522
|
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); }
|
|
40461
|
-
function ownKeys$
|
|
40462
|
-
function _objectSpread$
|
|
40463
|
-
function _defineProperty$
|
|
40464
|
-
function _toPropertyKey$
|
|
40465
|
-
function _toPrimitive$
|
|
40523
|
+
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; }
|
|
40524
|
+
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; }
|
|
40525
|
+
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; }
|
|
40526
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40527
|
+
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); }
|
|
40466
40528
|
var CURVE_FACTORIES = {
|
|
40467
40529
|
curveBasisClosed: curveBasisClosed,
|
|
40468
40530
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40502,11 +40564,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40502
40564
|
* @return {String} path
|
|
40503
40565
|
*/
|
|
40504
40566
|
var getPath$1 = function getPath(_ref) {
|
|
40505
|
-
var type = _ref.type,
|
|
40506
|
-
|
|
40567
|
+
var _ref$type = _ref.type,
|
|
40568
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40569
|
+
_ref$points = _ref.points,
|
|
40570
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40507
40571
|
baseLine = _ref.baseLine,
|
|
40508
40572
|
layout = _ref.layout,
|
|
40509
|
-
connectNulls = _ref.connectNulls
|
|
40573
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40574
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40510
40575
|
var curveFactory = getCurveFactory(type, layout);
|
|
40511
40576
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40512
40577
|
return defined(entry);
|
|
@@ -40517,7 +40582,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40517
40582
|
return defined(base);
|
|
40518
40583
|
}) : baseLine;
|
|
40519
40584
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40520
|
-
return _objectSpread$
|
|
40585
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40521
40586
|
base: formatBaseLine[index]
|
|
40522
40587
|
});
|
|
40523
40588
|
});
|
|
@@ -40558,12 +40623,8 @@ var Curve = function Curve(props) {
|
|
|
40558
40623
|
ref: pathRef
|
|
40559
40624
|
}));
|
|
40560
40625
|
};
|
|
40561
|
-
Curve.defaultProps = {
|
|
40562
|
-
type: 'linear',
|
|
40563
|
-
points: [],
|
|
40564
|
-
connectNulls: false
|
|
40565
|
-
};
|
|
40566
40626
|
|
|
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); }
|
|
40567
40628
|
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); }
|
|
40568
40629
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40569
40630
|
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."); }
|
|
@@ -40571,6 +40632,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40571
40632
|
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; }
|
|
40572
40633
|
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; } }
|
|
40573
40634
|
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); }
|
|
40574
40640
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40575
40641
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40576
40642
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40626,13 +40692,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40626
40692
|
}
|
|
40627
40693
|
return false;
|
|
40628
40694
|
};
|
|
40629
|
-
var
|
|
40695
|
+
var defaultProps = {
|
|
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);
|
|
40630
40712
|
var pathRef = useRef();
|
|
40631
40713
|
var _useState = useState(-1),
|
|
40632
40714
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40633
40715
|
totalLength = _useState2[0],
|
|
40634
40716
|
setTotalLength = _useState2[1];
|
|
40635
|
-
|
|
40717
|
+
useEffect(function () {
|
|
40636
40718
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40637
40719
|
try {
|
|
40638
40720
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40703,21 +40785,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40703
40785
|
})));
|
|
40704
40786
|
});
|
|
40705
40787
|
};
|
|
40706
|
-
Rectangle.defaultProps = {
|
|
40707
|
-
x: 0,
|
|
40708
|
-
y: 0,
|
|
40709
|
-
width: 0,
|
|
40710
|
-
height: 0,
|
|
40711
|
-
// The radius of border
|
|
40712
|
-
// The radius of four corners when radius is a number
|
|
40713
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40714
|
-
radius: 0,
|
|
40715
|
-
isAnimationActive: false,
|
|
40716
|
-
isUpdateAnimationActive: false,
|
|
40717
|
-
animationBegin: 0,
|
|
40718
|
-
animationDuration: 1500,
|
|
40719
|
-
animationEasing: 'ease'
|
|
40720
|
-
};
|
|
40721
40788
|
|
|
40722
40789
|
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); }
|
|
40723
40790
|
var Dot$1 = function Dot(props) {
|
|
@@ -40737,18 +40804,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40737
40804
|
return null;
|
|
40738
40805
|
};
|
|
40739
40806
|
|
|
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"];
|
|
40740
40809
|
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; }
|
|
40741
40817
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40742
40818
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40743
40819
|
};
|
|
40744
|
-
var Cross = function Cross(
|
|
40745
|
-
var x =
|
|
40746
|
-
|
|
40747
|
-
|
|
40748
|
-
|
|
40749
|
-
top =
|
|
40750
|
-
|
|
40751
|
-
|
|
40820
|
+
var Cross = function Cross(_ref) {
|
|
40821
|
+
var _ref$x = _ref.x,
|
|
40822
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40823
|
+
_ref$y = _ref.y,
|
|
40824
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40825
|
+
_ref$top = _ref.top,
|
|
40826
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40827
|
+
_ref$left = _ref.left,
|
|
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);
|
|
40752
40843
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40753
40844
|
return null;
|
|
40754
40845
|
}
|
|
@@ -40757,14 +40848,6 @@ var Cross = function Cross(props) {
|
|
|
40757
40848
|
d: getPath(x, y, width, height, top, left)
|
|
40758
40849
|
}));
|
|
40759
40850
|
};
|
|
40760
|
-
Cross.defaultProps = {
|
|
40761
|
-
x: 0,
|
|
40762
|
-
y: 0,
|
|
40763
|
-
top: 0,
|
|
40764
|
-
left: 0,
|
|
40765
|
-
width: 0,
|
|
40766
|
-
height: 0
|
|
40767
|
-
};
|
|
40768
40851
|
|
|
40769
40852
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40770
40853
|
|
|
@@ -40974,6 +41057,7 @@ var createScale = function createScale(_ref) {
|
|
|
40974
41057
|
isTextActive: false,
|
|
40975
41058
|
isSlideMoving: false,
|
|
40976
41059
|
isTravellerMoving: false,
|
|
41060
|
+
isTravellerFocused: false,
|
|
40977
41061
|
startX: scale(startIndex),
|
|
40978
41062
|
endX: scale(endIndex),
|
|
40979
41063
|
scale: scale,
|
|
@@ -41187,6 +41271,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41187
41271
|
}
|
|
41188
41272
|
});
|
|
41189
41273
|
}
|
|
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
|
+
}
|
|
41190
41306
|
}, {
|
|
41191
41307
|
key: "renderBackground",
|
|
41192
41308
|
value: function renderBackground() {
|
|
@@ -41234,6 +41350,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41234
41350
|
}, {
|
|
41235
41351
|
key: "renderTravellerLayer",
|
|
41236
41352
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41353
|
+
var _this3 = this;
|
|
41237
41354
|
var _this$props7 = this.props,
|
|
41238
41355
|
y = _this$props7.y,
|
|
41239
41356
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41247,11 +41364,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41247
41364
|
height: height
|
|
41248
41365
|
});
|
|
41249
41366
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41367
|
+
tabIndex: 0,
|
|
41368
|
+
role: "slider",
|
|
41250
41369
|
className: "recharts-brush-traveller",
|
|
41251
41370
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41252
41371
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41253
41372
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41254
41373
|
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
|
+
},
|
|
41255
41392
|
style: {
|
|
41256
41393
|
cursor: 'col-resize'
|
|
41257
41394
|
}
|
|
@@ -41295,9 +41432,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41295
41432
|
height = _this$props9.height,
|
|
41296
41433
|
travellerWidth = _this$props9.travellerWidth,
|
|
41297
41434
|
stroke = _this$props9.stroke;
|
|
41298
|
-
var _this$
|
|
41299
|
-
startX = _this$
|
|
41300
|
-
endX = _this$
|
|
41435
|
+
var _this$state4 = this.state,
|
|
41436
|
+
startX = _this$state4.startX,
|
|
41437
|
+
endX = _this$state4.endX;
|
|
41301
41438
|
var offset = 5;
|
|
41302
41439
|
var attrs = {
|
|
41303
41440
|
pointerEvents: 'none',
|
|
@@ -41329,12 +41466,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41329
41466
|
width = _this$props10.width,
|
|
41330
41467
|
height = _this$props10.height,
|
|
41331
41468
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41332
|
-
var _this$
|
|
41333
|
-
startX = _this$
|
|
41334
|
-
endX = _this$
|
|
41335
|
-
isTextActive = _this$
|
|
41336
|
-
isSlideMoving = _this$
|
|
41337
|
-
isTravellerMoving = _this$
|
|
41469
|
+
var _this$state5 = this.state,
|
|
41470
|
+
startX = _this$state5.startX,
|
|
41471
|
+
endX = _this$state5.endX,
|
|
41472
|
+
isTextActive = _this$state5.isTextActive,
|
|
41473
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41474
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41475
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41338
41476
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41339
41477
|
return null;
|
|
41340
41478
|
}
|
|
@@ -41346,7 +41484,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41346
41484
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41347
41485
|
onTouchMove: this.handleTouchMove,
|
|
41348
41486
|
style: style
|
|
41349
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41487
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41350
41488
|
}
|
|
41351
41489
|
}], [{
|
|
41352
41490
|
key: "renderDefaultTraveller",
|
|
@@ -41664,7 +41802,7 @@ function every(collection, predicate, guard) {
|
|
|
41664
41802
|
|
|
41665
41803
|
var every_1 = every;
|
|
41666
41804
|
|
|
41667
|
-
var defineProperty = _defineProperty$
|
|
41805
|
+
var defineProperty = _defineProperty$o;
|
|
41668
41806
|
|
|
41669
41807
|
/**
|
|
41670
41808
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42025,7 +42163,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42025
42163
|
legendType: 'rect',
|
|
42026
42164
|
minPointSize: 0,
|
|
42027
42165
|
hide: false,
|
|
42028
|
-
// data of bar
|
|
42029
42166
|
data: [],
|
|
42030
42167
|
layout: 'vertical',
|
|
42031
42168
|
isAnimationActive: !Global.isSsr,
|
|
@@ -44938,10 +45075,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
44938
45075
|
}
|
|
44939
45076
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
44940
45077
|
x = _this$container$getBo.x,
|
|
44941
|
-
y = _this$container$getBo.y
|
|
45078
|
+
y = _this$container$getBo.y,
|
|
45079
|
+
height = _this$container$getBo.height;
|
|
44942
45080
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
44943
45081
|
var pageX = x + coordinate;
|
|
44944
|
-
var pageY = y + this.offset.top;
|
|
45082
|
+
var pageY = y + this.offset.top + height / 2;
|
|
44945
45083
|
this.mouseHandlerCallback({
|
|
44946
45084
|
pageX: pageX,
|
|
44947
45085
|
pageY: pageY
|
|
@@ -47864,6 +48002,7 @@ var Form = forwardRef(function (props, ref) {
|
|
|
47864
48002
|
var _a = useState({}), values = _a[0], setValues = _a[1];
|
|
47865
48003
|
var _b = useState({}), feedback = _b[0], setFeedback = _b[1];
|
|
47866
48004
|
useImperativeHandle(ref, function () { return ({
|
|
48005
|
+
validateForm: validateForm,
|
|
47867
48006
|
resetForm: resetForm,
|
|
47868
48007
|
}); });
|
|
47869
48008
|
useEffect(function () {
|
|
@@ -48005,7 +48144,7 @@ var Form = forwardRef(function (props, ref) {
|
|
|
48005
48144
|
}
|
|
48006
48145
|
});
|
|
48007
48146
|
}); };
|
|
48008
|
-
var
|
|
48147
|
+
var validateForm = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
48009
48148
|
var isValid, feedback, _i, _a, field, _b, _c;
|
|
48010
48149
|
return __generator(this, function (_d) {
|
|
48011
48150
|
switch (_d.label) {
|
|
@@ -48031,12 +48170,21 @@ var Form = forwardRef(function (props, ref) {
|
|
|
48031
48170
|
return [3 /*break*/, 1];
|
|
48032
48171
|
case 4:
|
|
48033
48172
|
setFeedback(feedback);
|
|
48034
|
-
|
|
48173
|
+
return [2 /*return*/, { isValid: isValid, feedback: feedback }];
|
|
48174
|
+
}
|
|
48175
|
+
});
|
|
48176
|
+
}); };
|
|
48177
|
+
var onSubmit = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
48178
|
+
var _a, isValid, feedback;
|
|
48179
|
+
return __generator(this, function (_b) {
|
|
48180
|
+
switch (_b.label) {
|
|
48181
|
+
case 0: return [4 /*yield*/, validateForm()];
|
|
48182
|
+
case 1:
|
|
48183
|
+
_a = _b.sent(), isValid = _a.isValid, feedback = _a.feedback;
|
|
48184
|
+
if (isValid && !!props.onSubmit)
|
|
48035
48185
|
props.onSubmit(values);
|
|
48036
|
-
|
|
48037
|
-
else if (!!props.onError) {
|
|
48186
|
+
else if (!!props.onError)
|
|
48038
48187
|
props.onError(feedback);
|
|
48039
|
-
}
|
|
48040
48188
|
return [2 /*return*/];
|
|
48041
48189
|
}
|
|
48042
48190
|
});
|
|
@@ -48291,8 +48439,8 @@ var Table = function (_a) {
|
|
|
48291
48439
|
rowSelection.onChange(newSelectedRowKeys, selectedKey, selectedRows, selectedRow);
|
|
48292
48440
|
};
|
|
48293
48441
|
return (jsxs(Container$1, { children: [jsx$1(TableHead, { children: jsxs(TableRow, { children: [rowSelection && jsx$1("th", { style: { width: 55 } }), columns.map(function (_a, index) {
|
|
48294
|
-
var title = _a.title, dataIndex = _a.dataIndex;
|
|
48295
|
-
return (jsx$1(ColumnTitle, { children: title && (jsx$1(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))) }, "".concat(dataIndex, "-").concat(index)));
|
|
48442
|
+
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48443
|
+
return (jsx$1(ColumnTitle, { children: jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title && (jsx$1(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))), titlePopup && (jsx$1(Popup, __assign$2({ content: titlePopup }, { children: jsx$1(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
|
|
48296
48444
|
})] }) }), jsx$1(TableBody, { children: data.length === 0 ? (jsx$1(TableRow, { children: jsx$1(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsx$1(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) {
|
|
48297
48445
|
return (jsxs(TableRow, { children: [rowSelection && (jsx$1(TableCell, { children: jsx$1(Checkbox, { id: "".concat(rowIndex), name: "".concat(rowIndex), value: row.key, onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|
|
48298
48446
|
var dataIndex = _a.dataIndex, render = _a.render, align = _a.align;
|