@typeolymp/ui-components 1.19.30 → 1.19.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/atoms/Icon/index.d.ts +1 -1
- package/build/index.es.js +768 -627
- package/build/index.es.js.map +1 -1
- package/build/index.js +768 -627
- 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
|
@@ -3566,7 +3566,9 @@ var icons = {
|
|
|
3566
3566
|
user: (jsx$1("path", { d: "M12 12.4c3 0 5.5-2.5 5.5-5.5S15.1 1.3 12 1.3 6.5 3.8 6.5 6.8 9 12.4 12 12.4zm4.1.1c-.3-.1-.6 0-.9.2-.9.7-2 1.1-3.2 1.1s-2.3-.4-3.3-1.1c-.3-.2-.5-.3-.9-.2-3.8.9-6.5 4.3-6.5 8.3 0 1 .9 1.9 1.9 1.9h17.5c1.1 0 1.9-.9 1.9-1.9.1-4-2.5-7.4-6.5-8.3z" })),
|
|
3567
3567
|
search: (jsx$1("path", { d: "M.6 23.4c.6.6 1.7.6 2.3 0l7.1-7.1c1.4 1 3.2 1.6 5.1 1.6 4.9 0 8.9-4 8.9-8.9S20 .1 15.1.1C10.1.1 6 4.1 6 9c0 1.9.6 3.6 1.6 5.1L.5 21.2c-.6.6-.6 1.6.1 2.2zM9.3 9c0-3.1 2.5-5.7 5.7-5.7s5.7 2.5 5.7 5.7c0 3.1-2.5 5.7-5.7 5.7S9.3 12.2 9.3 9z" })),
|
|
3568
3568
|
infoCircle: (jsxs(Fragment$1, { children: [jsx$1("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M12 23C14.1756 23 16.3023 22.3549 18.1113 21.1462C19.9202 19.9375 21.3302 18.2195 22.1627 16.2095C22.9953 14.1995 23.2131 11.9878 22.7886 9.85401C22.3642 7.72022 21.3166 5.76021 19.7782 4.22184C18.2398 2.68346 16.2798 1.6358 14.146 1.21137C12.0122 0.78693 9.80051 1.00476 7.79053 1.83733C5.78054 2.66989 4.06258 4.07979 2.85388 5.88874C1.64519 7.69768 1 9.82441 1 12C1 14.9174 2.15896 17.7153 4.22186 19.7782C6.28476 21.8411 9.08262 23 12 23ZM12 20.5C13.6811 20.5 15.3245 20.0015 16.7224 19.0675C18.1202 18.1335 19.2096 16.806 19.853 15.2528C20.4963 13.6996 20.6646 11.9906 20.3367 10.3417C20.0087 8.6929 19.1992 7.17834 18.0104 5.9896C16.8217 4.80085 15.3071 3.99131 13.6583 3.66333C12.0094 3.33536 10.3004 3.50369 8.74719 4.14704C7.19402 4.79038 5.86655 5.87983 4.93256 7.27765C3.99856 8.67547 3.5 10.3189 3.5 12C3.49868 13.1166 3.71765 14.2225 4.14435 15.2544C4.57105 16.2862 5.19713 17.2238 5.98669 18.0133C6.77625 18.8029 7.71381 19.429 8.74567 19.8557C9.77753 20.2824 10.8834 20.5013 12 20.5Z" }), jsx$1("path", { d: "M13.6 17.4v-2-3.1-.7c0-.4-.2-.7-.4-1-.2-.2-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1v5.8c0 .4.2.7.4 1 .2.2.6.4 1 .4s.7-.1 1-.4c.2-.3.4-.6.4-1zM13.6 7.4v-.8c0-.4-.2-.7-.4-1-.2-.2-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1v.8c0 .4.2.7.4 1 .2.2.6.4 1 .4s.7-.1 1-.4c.2-.3.4-.7.4-1z" })] })),
|
|
3569
|
-
|
|
3569
|
+
swap: (jsx$1("path", { d: "M7.1 8.3h11l-1.5 1.4c-.6.5-.6 1.4-.1 2 .5.6 1.4.6 2 .1L22.6 8c.6-.6.6-1.5 0-2.1L18.5 2c-.6-.5-1.5-.5-2 .1-.5.5-.5 1.4.1 1.9l1.5 1.4h-11c-.8 0-1.4.6-1.4 1.4s.6 1.5 1.4 1.5zM5.5 22c.6.5 1.5.5 2-.1.5-.5.5-1.4-.1-1.9l-1.5-1.4h11c.8 0 1.4-.6 1.4-1.4 0-.8-.6-1.4-1.4-1.4h-11l1.5-1.4c.6-.5.6-1.4.1-2s-1.4-.6-2-.1l-4.1 3.8c-.6.6-.6 1.5 0 2.1L5.5 22z" })),
|
|
3570
|
+
login: (jsxs("g", __assign$2({ style: { transform: "rotate(270deg)", transformOrigin: "50%" } }, { children: [jsx$1("path", { d: "M22.6 14.6c-.7 0-1.3.6-1.3 1.3v4H2.7v-4c0-.7-.6-1.3-1.3-1.3s-1.3.6-1.3 1.3v5.2c0 .7.6 1.3 1.3 1.3h21.2c.7 0 1.3-.6 1.3-1.3v-5.2c0-.8-.6-1.3-1.3-1.3z" }), jsx$1("path", { d: "M11.2 16.7c.1.1.2.2.4.3h.4c.2 0 .3 0 .5-.1.1-.1.3-.1.4-.3l4.9-4.9c.5-.5.5-1.2 0-1.7s-1.2-.5-1.7 0l-2.8 2.8v-10c0-.7-.5-1.2-1.2-1.2s-1.2.5-1.2 1.2v10L8 10.1c-.5-.5-1.2-.5-1.7 0s-.5 1.2 0 1.7l4.9 4.9z" })] }))),
|
|
3571
|
+
logout: (jsxs("g", __assign$2({ style: { transform: "rotate(90deg)", transformOrigin: "50%" } }, { children: [jsx$1("path", { d: "M22.6 14.6c-.7 0-1.3.6-1.3 1.3v4H2.7v-4c0-.7-.6-1.3-1.3-1.3s-1.3.6-1.3 1.3v5.2c0 .7.6 1.3 1.3 1.3h21.2c.7 0 1.3-.6 1.3-1.3v-5.2c0-.8-.6-1.3-1.3-1.3z" }), jsx$1("path", { d: "M12.8 2.1c-.1-.1-.2-.2-.4-.3-.1-.1-.3-.1-.5-.1s-.3 0-.5.1c-.1.1-.3.1-.4.3L6.3 7c-.5.5-.5 1.2 0 1.7s1.2.5 1.7 0l2.8-2.8v10c0 .7.5 1.2 1.2 1.2s1.2-.5 1.2-1.2v-10L16 8.7c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-4.9-4.9z" })] }))),
|
|
3570
3572
|
};
|
|
3571
3573
|
var Icon = function (props) { return (jsx$1(Wrapper$a, __assign$2({}, props, { children: jsx$1("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
|
|
3572
3574
|
|
|
@@ -4549,7 +4551,7 @@ function requiredArgs(required, args) {
|
|
|
4549
4551
|
}
|
|
4550
4552
|
}
|
|
4551
4553
|
|
|
4552
|
-
function _typeof$
|
|
4554
|
+
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); }
|
|
4553
4555
|
/**
|
|
4554
4556
|
* @name toDate
|
|
4555
4557
|
* @category Common Helpers
|
|
@@ -4585,7 +4587,7 @@ function toDate(argument) {
|
|
|
4585
4587
|
requiredArgs(1, arguments);
|
|
4586
4588
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4587
4589
|
|
|
4588
|
-
if (argument instanceof Date || _typeof$
|
|
4590
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4589
4591
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4590
4592
|
return new Date(argument.getTime());
|
|
4591
4593
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4856,7 +4858,7 @@ var millisecondsInMinute = 60000;
|
|
|
4856
4858
|
|
|
4857
4859
|
var millisecondsInHour = 3600000;
|
|
4858
4860
|
|
|
4859
|
-
function _typeof$
|
|
4861
|
+
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); }
|
|
4860
4862
|
/**
|
|
4861
4863
|
* @name isDate
|
|
4862
4864
|
* @category Common Helpers
|
|
@@ -4892,7 +4894,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4892
4894
|
|
|
4893
4895
|
function isDate(value) {
|
|
4894
4896
|
requiredArgs(1, arguments);
|
|
4895
|
-
return value instanceof Date || _typeof$
|
|
4897
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4896
4898
|
}
|
|
4897
4899
|
|
|
4898
4900
|
/**
|
|
@@ -13668,15 +13670,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13668
13670
|
|
|
13669
13671
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13670
13672
|
|
|
13671
|
-
function _slicedToArray$
|
|
13672
|
-
return _arrayWithHoles$
|
|
13673
|
+
function _slicedToArray$c(arr, i) {
|
|
13674
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13673
13675
|
}
|
|
13674
13676
|
|
|
13675
|
-
function _arrayWithHoles$
|
|
13677
|
+
function _arrayWithHoles$d(arr) {
|
|
13676
13678
|
if (Array.isArray(arr)) return arr;
|
|
13677
13679
|
}
|
|
13678
13680
|
|
|
13679
|
-
function _iterableToArrayLimit$
|
|
13681
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13680
13682
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13681
13683
|
|
|
13682
13684
|
if (_i == null) return;
|
|
@@ -13706,16 +13708,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13706
13708
|
return _arr;
|
|
13707
13709
|
}
|
|
13708
13710
|
|
|
13709
|
-
function _unsupportedIterableToArray$
|
|
13711
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13710
13712
|
if (!o) return;
|
|
13711
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13713
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13712
13714
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13713
13715
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13714
13716
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13715
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13717
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13716
13718
|
}
|
|
13717
13719
|
|
|
13718
|
-
function _arrayLikeToArray$
|
|
13720
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13719
13721
|
if (len == null || len > arr.length) len = arr.length;
|
|
13720
13722
|
|
|
13721
13723
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13723,7 +13725,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13723
13725
|
return arr2;
|
|
13724
13726
|
}
|
|
13725
13727
|
|
|
13726
|
-
function _nonIterableRest$
|
|
13728
|
+
function _nonIterableRest$d() {
|
|
13727
13729
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13728
13730
|
}
|
|
13729
13731
|
|
|
@@ -13787,7 +13789,7 @@ reservedProps.forEach(function (name) {
|
|
|
13787
13789
|
// This is a mapping from React prop names to the attribute names.
|
|
13788
13790
|
|
|
13789
13791
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13790
|
-
var _ref2 = _slicedToArray$
|
|
13792
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13791
13793
|
name = _ref2[0],
|
|
13792
13794
|
attributeName = _ref2[1];
|
|
13793
13795
|
|
|
@@ -16206,31 +16208,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16206
16208
|
return true;
|
|
16207
16209
|
};
|
|
16208
16210
|
|
|
16209
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16211
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16210
16212
|
|
|
16211
16213
|
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."); }
|
|
16212
16214
|
|
|
16213
16215
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16214
16216
|
|
|
16215
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16217
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16216
16218
|
|
|
16217
|
-
function ownKeys$
|
|
16219
|
+
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; }
|
|
16218
16220
|
|
|
16219
|
-
function _objectSpread$
|
|
16221
|
+
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; }
|
|
16220
16222
|
|
|
16221
|
-
function _defineProperty$
|
|
16223
|
+
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; }
|
|
16222
16224
|
|
|
16223
|
-
function _slicedToArray$
|
|
16225
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16224
16226
|
|
|
16225
|
-
function _nonIterableRest$
|
|
16227
|
+
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."); }
|
|
16226
16228
|
|
|
16227
|
-
function _unsupportedIterableToArray$
|
|
16229
|
+
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); }
|
|
16228
16230
|
|
|
16229
|
-
function _arrayLikeToArray$
|
|
16231
|
+
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; }
|
|
16230
16232
|
|
|
16231
|
-
function _iterableToArrayLimit$
|
|
16233
|
+
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; }
|
|
16232
16234
|
|
|
16233
|
-
function _arrayWithHoles$
|
|
16235
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16234
16236
|
|
|
16235
16237
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16236
16238
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16310,11 +16312,11 @@ function allFilesAccepted(_ref) {
|
|
|
16310
16312
|
|
|
16311
16313
|
return files.every(function (file) {
|
|
16312
16314
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16313
|
-
_fileAccepted2 = _slicedToArray$
|
|
16315
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16314
16316
|
accepted = _fileAccepted2[0];
|
|
16315
16317
|
|
|
16316
16318
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16317
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16319
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16318
16320
|
sizeMatch = _fileMatchSize2[0];
|
|
16319
16321
|
|
|
16320
16322
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16411,7 +16413,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16411
16413
|
function pickerOptionsFromAccept(accept) {
|
|
16412
16414
|
if (isDefined(accept)) {
|
|
16413
16415
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16414
|
-
var _ref3 = _slicedToArray$
|
|
16416
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16415
16417
|
mimeType = _ref3[0],
|
|
16416
16418
|
ext = _ref3[1];
|
|
16417
16419
|
|
|
@@ -16429,11 +16431,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16429
16431
|
|
|
16430
16432
|
return ok;
|
|
16431
16433
|
}).reduce(function (agg, _ref4) {
|
|
16432
|
-
var _ref5 = _slicedToArray$
|
|
16434
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16433
16435
|
mimeType = _ref5[0],
|
|
16434
16436
|
ext = _ref5[1];
|
|
16435
16437
|
|
|
16436
|
-
return _objectSpread$
|
|
16438
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16437
16439
|
}, {});
|
|
16438
16440
|
return [{
|
|
16439
16441
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16453,7 +16455,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16453
16455
|
function acceptPropAsAcceptAttr(accept) {
|
|
16454
16456
|
if (isDefined(accept)) {
|
|
16455
16457
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16456
|
-
var _ref7 = _slicedToArray$
|
|
16458
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16457
16459
|
mimeType = _ref7[0],
|
|
16458
16460
|
ext = _ref7[1];
|
|
16459
16461
|
|
|
@@ -16521,40 +16523,40 @@ function isExt(v) {
|
|
|
16521
16523
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16522
16524
|
*/
|
|
16523
16525
|
|
|
16524
|
-
var _excluded$
|
|
16525
|
-
_excluded2$
|
|
16526
|
+
var _excluded$g = ["children"],
|
|
16527
|
+
_excluded2$5 = ["open"],
|
|
16526
16528
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16527
16529
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16528
16530
|
|
|
16529
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16531
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16530
16532
|
|
|
16531
16533
|
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."); }
|
|
16532
16534
|
|
|
16533
16535
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16534
16536
|
|
|
16535
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16537
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16536
16538
|
|
|
16537
|
-
function _slicedToArray$
|
|
16539
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16538
16540
|
|
|
16539
|
-
function _nonIterableRest$
|
|
16541
|
+
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."); }
|
|
16540
16542
|
|
|
16541
|
-
function _unsupportedIterableToArray$
|
|
16543
|
+
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); }
|
|
16542
16544
|
|
|
16543
|
-
function _arrayLikeToArray$
|
|
16545
|
+
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; }
|
|
16544
16546
|
|
|
16545
|
-
function _iterableToArrayLimit$
|
|
16547
|
+
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; }
|
|
16546
16548
|
|
|
16547
|
-
function _arrayWithHoles$
|
|
16549
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16548
16550
|
|
|
16549
|
-
function ownKeys$
|
|
16551
|
+
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; }
|
|
16550
16552
|
|
|
16551
|
-
function _objectSpread$
|
|
16553
|
+
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; }
|
|
16552
16554
|
|
|
16553
|
-
function _defineProperty$
|
|
16555
|
+
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; }
|
|
16554
16556
|
|
|
16555
|
-
function _objectWithoutProperties$
|
|
16557
|
+
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; }
|
|
16556
16558
|
|
|
16557
|
-
function _objectWithoutPropertiesLoose$
|
|
16559
|
+
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; }
|
|
16558
16560
|
/**
|
|
16559
16561
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16560
16562
|
*
|
|
@@ -16572,11 +16574,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16572
16574
|
|
|
16573
16575
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16574
16576
|
var children = _ref.children,
|
|
16575
|
-
params = _objectWithoutProperties$
|
|
16577
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16576
16578
|
|
|
16577
16579
|
var _useDropzone = useDropzone(params),
|
|
16578
16580
|
open = _useDropzone.open,
|
|
16579
|
-
props = _objectWithoutProperties$
|
|
16581
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16580
16582
|
|
|
16581
16583
|
useImperativeHandle(ref, function () {
|
|
16582
16584
|
return {
|
|
@@ -16584,13 +16586,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16584
16586
|
};
|
|
16585
16587
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16586
16588
|
|
|
16587
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16589
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16588
16590
|
open: open
|
|
16589
16591
|
})));
|
|
16590
16592
|
});
|
|
16591
16593
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16592
16594
|
|
|
16593
|
-
var defaultProps$
|
|
16595
|
+
var defaultProps$2 = {
|
|
16594
16596
|
disabled: false,
|
|
16595
16597
|
getFilesFromEvent: fromEvent,
|
|
16596
16598
|
maxSize: Infinity,
|
|
@@ -16606,7 +16608,7 @@ var defaultProps$1 = {
|
|
|
16606
16608
|
useFsAccessApi: true,
|
|
16607
16609
|
autoFocus: false
|
|
16608
16610
|
};
|
|
16609
|
-
Dropzone.defaultProps = defaultProps$
|
|
16611
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16610
16612
|
Dropzone.propTypes = {
|
|
16611
16613
|
/**
|
|
16612
16614
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16957,7 +16959,7 @@ var initialState = {
|
|
|
16957
16959
|
function useDropzone() {
|
|
16958
16960
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16959
16961
|
|
|
16960
|
-
var _defaultProps$props = _objectSpread$
|
|
16962
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16961
16963
|
accept = _defaultProps$props.accept,
|
|
16962
16964
|
disabled = _defaultProps$props.disabled,
|
|
16963
16965
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17004,7 +17006,7 @@ function useDropzone() {
|
|
|
17004
17006
|
var inputRef = useRef(null);
|
|
17005
17007
|
|
|
17006
17008
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
17007
|
-
_useReducer2 = _slicedToArray$
|
|
17009
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
17008
17010
|
state = _useReducer2[0],
|
|
17009
17011
|
dispatch = _useReducer2[1];
|
|
17010
17012
|
|
|
@@ -17174,12 +17176,12 @@ function useDropzone() {
|
|
|
17174
17176
|
var fileRejections = [];
|
|
17175
17177
|
files.forEach(function (file) {
|
|
17176
17178
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17177
|
-
_fileAccepted2 = _slicedToArray$
|
|
17179
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17178
17180
|
accepted = _fileAccepted2[0],
|
|
17179
17181
|
acceptError = _fileAccepted2[1];
|
|
17180
17182
|
|
|
17181
17183
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17182
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17184
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17183
17185
|
sizeMatch = _fileMatchSize2[0],
|
|
17184
17186
|
sizeError = _fileMatchSize2[1];
|
|
17185
17187
|
|
|
@@ -17380,9 +17382,9 @@ function useDropzone() {
|
|
|
17380
17382
|
onDragOver = _ref2.onDragOver,
|
|
17381
17383
|
onDragLeave = _ref2.onDragLeave,
|
|
17382
17384
|
onDrop = _ref2.onDrop,
|
|
17383
|
-
rest = _objectWithoutProperties$
|
|
17385
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17384
17386
|
|
|
17385
|
-
return _objectSpread$
|
|
17387
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17386
17388
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17387
17389
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17388
17390
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17407,9 +17409,9 @@ function useDropzone() {
|
|
|
17407
17409
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17408
17410
|
onChange = _ref3.onChange,
|
|
17409
17411
|
onClick = _ref3.onClick,
|
|
17410
|
-
rest = _objectWithoutProperties$
|
|
17412
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17411
17413
|
|
|
17412
|
-
var inputProps = _defineProperty$
|
|
17414
|
+
var inputProps = _defineProperty$v({
|
|
17413
17415
|
accept: acceptAttr,
|
|
17414
17416
|
multiple: multiple,
|
|
17415
17417
|
type: "file",
|
|
@@ -17421,10 +17423,10 @@ function useDropzone() {
|
|
|
17421
17423
|
tabIndex: -1
|
|
17422
17424
|
}, refKey, inputRef);
|
|
17423
17425
|
|
|
17424
|
-
return _objectSpread$
|
|
17426
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17425
17427
|
};
|
|
17426
17428
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17427
|
-
return _objectSpread$
|
|
17429
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17428
17430
|
isFocused: isFocused && !disabled,
|
|
17429
17431
|
getRootProps: getRootProps,
|
|
17430
17432
|
getInputProps: getInputProps,
|
|
@@ -17443,40 +17445,40 @@ function reducer$1(state, action) {
|
|
|
17443
17445
|
/* istanbul ignore next */
|
|
17444
17446
|
switch (action.type) {
|
|
17445
17447
|
case "focus":
|
|
17446
|
-
return _objectSpread$
|
|
17448
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17447
17449
|
isFocused: true
|
|
17448
17450
|
});
|
|
17449
17451
|
|
|
17450
17452
|
case "blur":
|
|
17451
|
-
return _objectSpread$
|
|
17453
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17452
17454
|
isFocused: false
|
|
17453
17455
|
});
|
|
17454
17456
|
|
|
17455
17457
|
case "openDialog":
|
|
17456
|
-
return _objectSpread$
|
|
17458
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17457
17459
|
isFileDialogActive: true
|
|
17458
17460
|
});
|
|
17459
17461
|
|
|
17460
17462
|
case "closeDialog":
|
|
17461
|
-
return _objectSpread$
|
|
17463
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17462
17464
|
isFileDialogActive: false
|
|
17463
17465
|
});
|
|
17464
17466
|
|
|
17465
17467
|
case "setDraggedFiles":
|
|
17466
|
-
return _objectSpread$
|
|
17468
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17467
17469
|
isDragActive: action.isDragActive,
|
|
17468
17470
|
isDragAccept: action.isDragAccept,
|
|
17469
17471
|
isDragReject: action.isDragReject
|
|
17470
17472
|
});
|
|
17471
17473
|
|
|
17472
17474
|
case "setFiles":
|
|
17473
|
-
return _objectSpread$
|
|
17475
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17474
17476
|
acceptedFiles: action.acceptedFiles,
|
|
17475
17477
|
fileRejections: action.fileRejections
|
|
17476
17478
|
});
|
|
17477
17479
|
|
|
17478
17480
|
case "reset":
|
|
17479
|
-
return _objectSpread$
|
|
17481
|
+
return _objectSpread$t({}, initialState);
|
|
17480
17482
|
|
|
17481
17483
|
default:
|
|
17482
17484
|
return state;
|
|
@@ -19704,7 +19706,7 @@ function shallowEqual(a, b) {
|
|
|
19704
19706
|
return true;
|
|
19705
19707
|
}
|
|
19706
19708
|
|
|
19707
|
-
function _typeof$
|
|
19709
|
+
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); }
|
|
19708
19710
|
|
|
19709
19711
|
//
|
|
19710
19712
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19731,7 +19733,9 @@ var FilteredElementKeyMap = {
|
|
|
19731
19733
|
};
|
|
19732
19734
|
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'];
|
|
19733
19735
|
|
|
19734
|
-
|
|
19736
|
+
/** The type of easing function to use for animations */
|
|
19737
|
+
|
|
19738
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19735
19739
|
|
|
19736
19740
|
/** the offset of a chart, which define the blank space all around */
|
|
19737
19741
|
|
|
@@ -19767,7 +19771,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19767
19771
|
};
|
|
19768
19772
|
};
|
|
19769
19773
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19770
|
-
if (!isObject_1(props) || _typeof$
|
|
19774
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19771
19775
|
return null;
|
|
19772
19776
|
}
|
|
19773
19777
|
var out = null;
|
|
@@ -19781,11 +19785,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19781
19785
|
return out;
|
|
19782
19786
|
};
|
|
19783
19787
|
|
|
19784
|
-
var _excluded$
|
|
19785
|
-
_excluded2$
|
|
19786
|
-
function _objectWithoutProperties$
|
|
19787
|
-
function _objectWithoutPropertiesLoose$
|
|
19788
|
-
function _typeof$
|
|
19788
|
+
var _excluded$f = ["children"],
|
|
19789
|
+
_excluded2$4 = ["children"];
|
|
19790
|
+
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; }
|
|
19791
|
+
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; }
|
|
19792
|
+
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); }
|
|
19789
19793
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19790
19794
|
click: 'onClick',
|
|
19791
19795
|
mousedown: 'onMouseDown',
|
|
@@ -19892,7 +19896,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19892
19896
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19893
19897
|
};
|
|
19894
19898
|
var isDotProps = function isDotProps(dot) {
|
|
19895
|
-
return dot && _typeof$
|
|
19899
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19896
19900
|
};
|
|
19897
19901
|
|
|
19898
19902
|
/**
|
|
@@ -19984,10 +19988,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19984
19988
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19985
19989
|
var _ref = nextChild.props || {},
|
|
19986
19990
|
nextChildren = _ref.children,
|
|
19987
|
-
nextProps = _objectWithoutProperties$
|
|
19991
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
19988
19992
|
var _ref2 = prevChild.props || {},
|
|
19989
19993
|
prevChildren = _ref2.children,
|
|
19990
|
-
prevProps = _objectWithoutProperties$
|
|
19994
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
19991
19995
|
if (nextChildren && prevChildren) {
|
|
19992
19996
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19993
19997
|
}
|
|
@@ -20029,10 +20033,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20029
20033
|
return toArray(children).indexOf(child);
|
|
20030
20034
|
};
|
|
20031
20035
|
|
|
20032
|
-
var _excluded$
|
|
20036
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20033
20037
|
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); }
|
|
20034
|
-
function _objectWithoutProperties$
|
|
20035
|
-
function _objectWithoutPropertiesLoose$
|
|
20038
|
+
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; }
|
|
20039
|
+
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; }
|
|
20036
20040
|
function Surface(props) {
|
|
20037
20041
|
var children = props.children,
|
|
20038
20042
|
width = props.width,
|
|
@@ -20040,7 +20044,7 @@ function Surface(props) {
|
|
|
20040
20044
|
viewBox = props.viewBox,
|
|
20041
20045
|
className = props.className,
|
|
20042
20046
|
style = props.style,
|
|
20043
|
-
others = _objectWithoutProperties$
|
|
20047
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
20044
20048
|
var svgView = viewBox || {
|
|
20045
20049
|
width: width,
|
|
20046
20050
|
height: height,
|
|
@@ -20057,14 +20061,14 @@ function Surface(props) {
|
|
|
20057
20061
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
20058
20062
|
}
|
|
20059
20063
|
|
|
20060
|
-
var _excluded$
|
|
20064
|
+
var _excluded$d = ["children", "className"];
|
|
20061
20065
|
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); }
|
|
20062
|
-
function _objectWithoutProperties$
|
|
20063
|
-
function _objectWithoutPropertiesLoose$
|
|
20066
|
+
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; }
|
|
20067
|
+
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; }
|
|
20064
20068
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
20065
20069
|
var children = props.children,
|
|
20066
20070
|
className = props.className,
|
|
20067
|
-
others = _objectWithoutProperties$
|
|
20071
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
20068
20072
|
var layerClass = classNames('recharts-layer', className);
|
|
20069
20073
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
20070
20074
|
className: layerClass
|
|
@@ -23479,7 +23483,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23479
23483
|
stackOffsetNone(series, order);
|
|
23480
23484
|
}
|
|
23481
23485
|
|
|
23486
|
+
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); }
|
|
23487
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23482
23488
|
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); }
|
|
23489
|
+
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; }
|
|
23490
|
+
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; }
|
|
23491
|
+
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; }
|
|
23492
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23493
|
+
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); }
|
|
23494
|
+
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; }
|
|
23495
|
+
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; }
|
|
23483
23496
|
var symbolFactories = {
|
|
23484
23497
|
symbolCircle: symbolCircle,
|
|
23485
23498
|
symbolCross: symbolCross,
|
|
@@ -23518,31 +23531,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23518
23531
|
return Math.PI * size * size / 4;
|
|
23519
23532
|
}
|
|
23520
23533
|
};
|
|
23521
|
-
var symbolsDefaultProps = {
|
|
23522
|
-
type: 'circle',
|
|
23523
|
-
size: 64,
|
|
23524
|
-
sizeType: 'area'
|
|
23525
|
-
};
|
|
23526
23534
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23527
23535
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23528
23536
|
};
|
|
23529
|
-
var Symbols = function Symbols(
|
|
23537
|
+
var Symbols = function Symbols(_ref) {
|
|
23538
|
+
var _ref$type = _ref.type,
|
|
23539
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23540
|
+
_ref$size = _ref.size,
|
|
23541
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23542
|
+
_ref$sizeType = _ref.sizeType,
|
|
23543
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23544
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23545
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23546
|
+
type: type,
|
|
23547
|
+
size: size,
|
|
23548
|
+
sizeType: sizeType
|
|
23549
|
+
});
|
|
23550
|
+
|
|
23530
23551
|
/**
|
|
23531
23552
|
* Calculate the path of curve
|
|
23532
23553
|
* @return {String} path
|
|
23533
23554
|
*/
|
|
23534
23555
|
var getPath = function getPath() {
|
|
23535
|
-
var size = props.size,
|
|
23536
|
-
sizeType = props.sizeType,
|
|
23537
|
-
type = props.type;
|
|
23538
23556
|
var symbolFactory = getSymbolFactory(type);
|
|
23539
23557
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23540
23558
|
return symbol();
|
|
23541
23559
|
};
|
|
23542
23560
|
var className = props.className,
|
|
23543
23561
|
cx = props.cx,
|
|
23544
|
-
cy = props.cy
|
|
23545
|
-
size = props.size;
|
|
23562
|
+
cy = props.cy;
|
|
23546
23563
|
var filteredProps = filterProps(props, true);
|
|
23547
23564
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23548
23565
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23553,35 +23570,34 @@ var Symbols = function Symbols(props) {
|
|
|
23553
23570
|
}
|
|
23554
23571
|
return null;
|
|
23555
23572
|
};
|
|
23556
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23557
23573
|
Symbols.registerSymbol = registerSymbol;
|
|
23558
23574
|
|
|
23559
|
-
function _typeof$
|
|
23575
|
+
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); }
|
|
23560
23576
|
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); }
|
|
23561
|
-
function ownKeys$
|
|
23562
|
-
function _objectSpread$
|
|
23563
|
-
function _classCallCheck$
|
|
23564
|
-
function _defineProperties$
|
|
23565
|
-
function _createClass$
|
|
23566
|
-
function _inherits$
|
|
23567
|
-
function _setPrototypeOf$
|
|
23568
|
-
function _createSuper$
|
|
23569
|
-
function _possibleConstructorReturn$
|
|
23570
|
-
function _assertThisInitialized$
|
|
23571
|
-
function _isNativeReflectConstruct$
|
|
23572
|
-
function _getPrototypeOf$
|
|
23573
|
-
function _defineProperty$
|
|
23574
|
-
function _toPropertyKey$
|
|
23575
|
-
function _toPrimitive$
|
|
23577
|
+
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; }
|
|
23578
|
+
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; }
|
|
23579
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23580
|
+
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); } }
|
|
23581
|
+
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; }
|
|
23582
|
+
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); }
|
|
23583
|
+
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); }
|
|
23584
|
+
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); }; }
|
|
23585
|
+
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); }
|
|
23586
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23587
|
+
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; } }
|
|
23588
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23589
|
+
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; }
|
|
23590
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23591
|
+
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); }
|
|
23576
23592
|
var SIZE = 32;
|
|
23577
23593
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23578
|
-
_inherits$
|
|
23579
|
-
var _super = _createSuper$
|
|
23594
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23595
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23580
23596
|
function DefaultLegendContent() {
|
|
23581
|
-
_classCallCheck$
|
|
23597
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23582
23598
|
return _super.apply(this, arguments);
|
|
23583
23599
|
}
|
|
23584
|
-
_createClass$
|
|
23600
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23585
23601
|
key: "renderIcon",
|
|
23586
23602
|
value:
|
|
23587
23603
|
/**
|
|
@@ -23626,7 +23642,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23626
23642
|
});
|
|
23627
23643
|
}
|
|
23628
23644
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23629
|
-
var iconProps = _objectSpread$
|
|
23645
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23630
23646
|
delete iconProps.legendIcon;
|
|
23631
23647
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23632
23648
|
}
|
|
@@ -23674,7 +23690,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23674
23690
|
var finalFormatter = entry.formatter || formatter;
|
|
23675
23691
|
var className = classNames((_classNames = {
|
|
23676
23692
|
'recharts-legend-item': true
|
|
23677
|
-
}, _defineProperty$
|
|
23693
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23678
23694
|
if (entry.type === 'none') {
|
|
23679
23695
|
return null;
|
|
23680
23696
|
}
|
|
@@ -23719,8 +23735,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23719
23735
|
}]);
|
|
23720
23736
|
return DefaultLegendContent;
|
|
23721
23737
|
}(PureComponent);
|
|
23722
|
-
_defineProperty$
|
|
23723
|
-
_defineProperty$
|
|
23738
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23739
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23724
23740
|
iconSize: 14,
|
|
23725
23741
|
layout: 'horizontal',
|
|
23726
23742
|
align: 'center',
|
|
@@ -23728,25 +23744,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23728
23744
|
inactiveColor: '#ccc'
|
|
23729
23745
|
});
|
|
23730
23746
|
|
|
23731
|
-
function _typeof$
|
|
23732
|
-
var _excluded$
|
|
23733
|
-
function ownKeys$
|
|
23734
|
-
function _objectSpread$
|
|
23735
|
-
function _classCallCheck$
|
|
23736
|
-
function _defineProperties$
|
|
23737
|
-
function _createClass$
|
|
23738
|
-
function _inherits$
|
|
23739
|
-
function _setPrototypeOf$
|
|
23740
|
-
function _createSuper$
|
|
23741
|
-
function _possibleConstructorReturn$
|
|
23742
|
-
function _assertThisInitialized$
|
|
23743
|
-
function _isNativeReflectConstruct$
|
|
23744
|
-
function _getPrototypeOf$
|
|
23745
|
-
function _defineProperty$
|
|
23746
|
-
function _toPropertyKey$
|
|
23747
|
-
function _toPrimitive$
|
|
23748
|
-
function _objectWithoutProperties$
|
|
23749
|
-
function _objectWithoutPropertiesLoose$
|
|
23747
|
+
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); }
|
|
23748
|
+
var _excluded$b = ["ref"];
|
|
23749
|
+
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; }
|
|
23750
|
+
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; }
|
|
23751
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23752
|
+
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); } }
|
|
23753
|
+
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; }
|
|
23754
|
+
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); }
|
|
23755
|
+
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); }
|
|
23756
|
+
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); }; }
|
|
23757
|
+
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); }
|
|
23758
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23759
|
+
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; } }
|
|
23760
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23761
|
+
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; }
|
|
23762
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23763
|
+
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); }
|
|
23764
|
+
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; }
|
|
23765
|
+
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; }
|
|
23750
23766
|
function defaultUniqBy$1(entry) {
|
|
23751
23767
|
return entry.value;
|
|
23752
23768
|
}
|
|
@@ -23767,27 +23783,27 @@ function renderContent$1(content, props) {
|
|
|
23767
23783
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23768
23784
|
}
|
|
23769
23785
|
props.ref;
|
|
23770
|
-
var otherProps = _objectWithoutProperties$
|
|
23786
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23771
23787
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23772
23788
|
}
|
|
23773
23789
|
var EPS$2 = 1;
|
|
23774
23790
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23775
|
-
_inherits$
|
|
23776
|
-
var _super = _createSuper$
|
|
23791
|
+
_inherits$8(Legend, _PureComponent);
|
|
23792
|
+
var _super = _createSuper$8(Legend);
|
|
23777
23793
|
function Legend() {
|
|
23778
23794
|
var _this;
|
|
23779
|
-
_classCallCheck$
|
|
23795
|
+
_classCallCheck$a(this, Legend);
|
|
23780
23796
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23781
23797
|
args[_key] = arguments[_key];
|
|
23782
23798
|
}
|
|
23783
23799
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23784
|
-
_defineProperty$
|
|
23800
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23785
23801
|
boxWidth: -1,
|
|
23786
23802
|
boxHeight: -1
|
|
23787
23803
|
});
|
|
23788
23804
|
return _this;
|
|
23789
23805
|
}
|
|
23790
|
-
_createClass$
|
|
23806
|
+
_createClass$a(Legend, [{
|
|
23791
23807
|
key: "componentDidMount",
|
|
23792
23808
|
value: function componentDidMount() {
|
|
23793
23809
|
this.updateBBox();
|
|
@@ -23862,7 +23878,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23862
23878
|
};
|
|
23863
23879
|
}
|
|
23864
23880
|
}
|
|
23865
|
-
return _objectSpread$
|
|
23881
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23866
23882
|
}
|
|
23867
23883
|
}, {
|
|
23868
23884
|
key: "updateBBox",
|
|
@@ -23905,7 +23921,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23905
23921
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23906
23922
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23907
23923
|
payload = _this$props2.payload;
|
|
23908
|
-
var outerStyle = _objectSpread$
|
|
23924
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23909
23925
|
position: 'absolute',
|
|
23910
23926
|
width: width || 'auto',
|
|
23911
23927
|
height: height || 'auto'
|
|
@@ -23916,7 +23932,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23916
23932
|
ref: function ref(node) {
|
|
23917
23933
|
_this2.wrapperNode = node;
|
|
23918
23934
|
}
|
|
23919
|
-
}, renderContent$1(content, _objectSpread$
|
|
23935
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23920
23936
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23921
23937
|
})));
|
|
23922
23938
|
}
|
|
@@ -23939,8 +23955,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23939
23955
|
}]);
|
|
23940
23956
|
return Legend;
|
|
23941
23957
|
}(PureComponent);
|
|
23942
|
-
_defineProperty$
|
|
23943
|
-
_defineProperty$
|
|
23958
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23959
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23944
23960
|
iconSize: 14,
|
|
23945
23961
|
layout: 'horizontal',
|
|
23946
23962
|
align: 'center',
|
|
@@ -24504,13 +24520,13 @@ function setRafTimeout(callback) {
|
|
|
24504
24520
|
requestAnimationFrame(shouldUpdate);
|
|
24505
24521
|
}
|
|
24506
24522
|
|
|
24507
|
-
function _typeof$
|
|
24508
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24509
|
-
function _nonIterableRest$
|
|
24510
|
-
function _unsupportedIterableToArray$
|
|
24511
|
-
function _arrayLikeToArray$
|
|
24523
|
+
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); }
|
|
24524
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24525
|
+
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."); }
|
|
24526
|
+
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); }
|
|
24527
|
+
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; }
|
|
24512
24528
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24513
|
-
function _arrayWithHoles$
|
|
24529
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24514
24530
|
function createAnimateManager() {
|
|
24515
24531
|
var currStyle = {};
|
|
24516
24532
|
var handleChange = function handleChange() {
|
|
@@ -24537,7 +24553,7 @@ function createAnimateManager() {
|
|
|
24537
24553
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24538
24554
|
return;
|
|
24539
24555
|
}
|
|
24540
|
-
if (_typeof$
|
|
24556
|
+
if (_typeof$r(_style) === 'object') {
|
|
24541
24557
|
currStyle = _style;
|
|
24542
24558
|
handleChange(currStyle);
|
|
24543
24559
|
}
|
|
@@ -24564,12 +24580,12 @@ function createAnimateManager() {
|
|
|
24564
24580
|
};
|
|
24565
24581
|
}
|
|
24566
24582
|
|
|
24567
|
-
function _typeof$
|
|
24568
|
-
function ownKeys$
|
|
24569
|
-
function _objectSpread$
|
|
24570
|
-
function _defineProperty$
|
|
24571
|
-
function _toPropertyKey$
|
|
24572
|
-
function _toPrimitive$
|
|
24583
|
+
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); }
|
|
24584
|
+
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; }
|
|
24585
|
+
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; }
|
|
24586
|
+
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; }
|
|
24587
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24588
|
+
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); }
|
|
24573
24589
|
/* eslint no-console: 0 */
|
|
24574
24590
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24575
24591
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24601,7 +24617,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24601
24617
|
*/
|
|
24602
24618
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24603
24619
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24604
|
-
return _defineProperty$
|
|
24620
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24605
24621
|
}
|
|
24606
24622
|
var isTransition = name === 'transition';
|
|
24607
24623
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24612,7 +24628,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24612
24628
|
if (isTransition) {
|
|
24613
24629
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24614
24630
|
}
|
|
24615
|
-
return _objectSpread$
|
|
24631
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24616
24632
|
}, {});
|
|
24617
24633
|
};
|
|
24618
24634
|
|
|
@@ -24622,7 +24638,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24622
24638
|
*/
|
|
24623
24639
|
var mapObject = function mapObject(fn, obj) {
|
|
24624
24640
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24625
|
-
return _objectSpread$
|
|
24641
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24626
24642
|
}, {});
|
|
24627
24643
|
};
|
|
24628
24644
|
|
|
@@ -24632,7 +24648,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24632
24648
|
*/
|
|
24633
24649
|
var translateStyle = function translateStyle(style) {
|
|
24634
24650
|
return Object.keys(style).reduce(function (res, key) {
|
|
24635
|
-
return _objectSpread$
|
|
24651
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24636
24652
|
}, style);
|
|
24637
24653
|
};
|
|
24638
24654
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24660,16 +24676,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24660
24676
|
}
|
|
24661
24677
|
};
|
|
24662
24678
|
|
|
24663
|
-
function _slicedToArray$
|
|
24664
|
-
function _nonIterableRest$
|
|
24665
|
-
function _iterableToArrayLimit$
|
|
24666
|
-
function _arrayWithHoles$
|
|
24667
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24679
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24680
|
+
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."); }
|
|
24681
|
+
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; } }
|
|
24682
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24683
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24668
24684
|
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."); }
|
|
24669
|
-
function _unsupportedIterableToArray$
|
|
24685
|
+
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); }
|
|
24670
24686
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24671
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24672
|
-
function _arrayLikeToArray$
|
|
24687
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24688
|
+
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; }
|
|
24673
24689
|
var ACCURACY = 1e-4;
|
|
24674
24690
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24675
24691
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24745,7 +24761,7 @@ var configBezier = function configBezier() {
|
|
|
24745
24761
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24746
24762
|
return parseFloat(x);
|
|
24747
24763
|
});
|
|
24748
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24764
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24749
24765
|
x1 = _easing$1$split$0$spl2[0];
|
|
24750
24766
|
y1 = _easing$1$split$0$spl2[1];
|
|
24751
24767
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24838,22 +24854,22 @@ var configEasing = function configEasing() {
|
|
|
24838
24854
|
return null;
|
|
24839
24855
|
};
|
|
24840
24856
|
|
|
24841
|
-
function _typeof$
|
|
24842
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24857
|
+
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); }
|
|
24858
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24843
24859
|
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."); }
|
|
24844
24860
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24845
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24846
|
-
function ownKeys$
|
|
24847
|
-
function _objectSpread$
|
|
24848
|
-
function _defineProperty$
|
|
24849
|
-
function _toPropertyKey$
|
|
24850
|
-
function _toPrimitive$
|
|
24851
|
-
function _slicedToArray$
|
|
24852
|
-
function _nonIterableRest$
|
|
24853
|
-
function _unsupportedIterableToArray$
|
|
24854
|
-
function _arrayLikeToArray$
|
|
24855
|
-
function _iterableToArrayLimit$
|
|
24856
|
-
function _arrayWithHoles$
|
|
24861
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24862
|
+
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; }
|
|
24863
|
+
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; }
|
|
24864
|
+
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; }
|
|
24865
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24866
|
+
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); }
|
|
24867
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24868
|
+
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."); }
|
|
24869
|
+
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); }
|
|
24870
|
+
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; }
|
|
24871
|
+
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; } }
|
|
24872
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24857
24873
|
var alpha = function alpha(begin, end, k) {
|
|
24858
24874
|
return begin + (end - begin) * k;
|
|
24859
24875
|
};
|
|
@@ -24871,10 +24887,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24871
24887
|
var nextStepVals = mapObject(function (key, val) {
|
|
24872
24888
|
if (needContinue(val)) {
|
|
24873
24889
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24874
|
-
_easing2 = _slicedToArray$
|
|
24890
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24875
24891
|
newX = _easing2[0],
|
|
24876
24892
|
newV = _easing2[1];
|
|
24877
|
-
return _objectSpread$
|
|
24893
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24878
24894
|
from: newX,
|
|
24879
24895
|
velocity: newV
|
|
24880
24896
|
});
|
|
@@ -24884,7 +24900,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24884
24900
|
if (steps < 1) {
|
|
24885
24901
|
return mapObject(function (key, val) {
|
|
24886
24902
|
if (needContinue(val)) {
|
|
24887
|
-
return _objectSpread$
|
|
24903
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24888
24904
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24889
24905
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24890
24906
|
});
|
|
@@ -24899,10 +24915,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24899
24915
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24900
24916
|
var interKeys = getIntersectionKeys(from, to);
|
|
24901
24917
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24902
|
-
return _objectSpread$
|
|
24918
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24903
24919
|
}, {});
|
|
24904
24920
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24905
|
-
return _objectSpread$
|
|
24921
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24906
24922
|
from: from[key],
|
|
24907
24923
|
velocity: 0,
|
|
24908
24924
|
to: to[key]
|
|
@@ -24932,7 +24948,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24932
24948
|
var steps = deltaTime / easing.dt;
|
|
24933
24949
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24934
24950
|
// get union set and add compatible prefix
|
|
24935
|
-
render(_objectSpread$
|
|
24951
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24936
24952
|
preTime = now;
|
|
24937
24953
|
if (!shouldStopAnimation()) {
|
|
24938
24954
|
cafId = requestAnimationFrame(update);
|
|
@@ -24950,14 +24966,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24950
24966
|
}, timingStyle);
|
|
24951
24967
|
|
|
24952
24968
|
// get union set and add compatible prefix
|
|
24953
|
-
render(_objectSpread$
|
|
24969
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24954
24970
|
if (t < 1) {
|
|
24955
24971
|
cafId = requestAnimationFrame(update);
|
|
24956
24972
|
} else {
|
|
24957
24973
|
var finalStyle = mapObject(function (key, val) {
|
|
24958
24974
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24959
24975
|
}, timingStyle);
|
|
24960
|
-
render(_objectSpread$
|
|
24976
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24961
24977
|
}
|
|
24962
24978
|
};
|
|
24963
24979
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24973,37 +24989,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24973
24989
|
};
|
|
24974
24990
|
});
|
|
24975
24991
|
|
|
24976
|
-
function _typeof$
|
|
24977
|
-
var _excluded$
|
|
24978
|
-
function _objectWithoutProperties$
|
|
24979
|
-
function _objectWithoutPropertiesLoose$
|
|
24980
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24992
|
+
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); }
|
|
24993
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24994
|
+
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; }
|
|
24995
|
+
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; }
|
|
24996
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
24981
24997
|
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."); }
|
|
24982
|
-
function _unsupportedIterableToArray$
|
|
24998
|
+
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); }
|
|
24983
24999
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24984
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24985
|
-
function _arrayLikeToArray$
|
|
24986
|
-
function ownKeys$
|
|
24987
|
-
function _objectSpread$
|
|
24988
|
-
function _defineProperty$
|
|
24989
|
-
function _classCallCheck$
|
|
24990
|
-
function _defineProperties$
|
|
24991
|
-
function _createClass$
|
|
24992
|
-
function _toPropertyKey$
|
|
24993
|
-
function _toPrimitive$
|
|
24994
|
-
function _inherits$
|
|
24995
|
-
function _setPrototypeOf$
|
|
24996
|
-
function _createSuper$
|
|
24997
|
-
function _possibleConstructorReturn$
|
|
24998
|
-
function _assertThisInitialized$
|
|
24999
|
-
function _isNativeReflectConstruct$
|
|
25000
|
-
function _getPrototypeOf$
|
|
25000
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
25001
|
+
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; }
|
|
25002
|
+
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; }
|
|
25003
|
+
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; }
|
|
25004
|
+
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; }
|
|
25005
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25006
|
+
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); } }
|
|
25007
|
+
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; }
|
|
25008
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
25009
|
+
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); }
|
|
25010
|
+
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); }
|
|
25011
|
+
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); }
|
|
25012
|
+
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); }; }
|
|
25013
|
+
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); }
|
|
25014
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25015
|
+
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; } }
|
|
25016
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
25001
25017
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25002
|
-
_inherits$
|
|
25003
|
-
var _super = _createSuper$
|
|
25018
|
+
_inherits$7(Animate, _PureComponent);
|
|
25019
|
+
var _super = _createSuper$7(Animate);
|
|
25004
25020
|
function Animate(props, context) {
|
|
25005
25021
|
var _this;
|
|
25006
|
-
_classCallCheck$
|
|
25022
|
+
_classCallCheck$9(this, Animate);
|
|
25007
25023
|
_this = _super.call(this, props, context);
|
|
25008
25024
|
var _this$props = _this.props,
|
|
25009
25025
|
isActive = _this$props.isActive,
|
|
@@ -25013,8 +25029,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25013
25029
|
steps = _this$props.steps,
|
|
25014
25030
|
children = _this$props.children,
|
|
25015
25031
|
duration = _this$props.duration;
|
|
25016
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25017
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25032
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
25033
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
25018
25034
|
if (!isActive || duration <= 0) {
|
|
25019
25035
|
_this.state = {
|
|
25020
25036
|
style: {}
|
|
@@ -25026,7 +25042,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25026
25042
|
style: to
|
|
25027
25043
|
};
|
|
25028
25044
|
}
|
|
25029
|
-
return _possibleConstructorReturn$
|
|
25045
|
+
return _possibleConstructorReturn$7(_this);
|
|
25030
25046
|
}
|
|
25031
25047
|
if (steps && steps.length) {
|
|
25032
25048
|
_this.state = {
|
|
@@ -25037,10 +25053,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25037
25053
|
_this.state = {
|
|
25038
25054
|
style: from
|
|
25039
25055
|
};
|
|
25040
|
-
return _possibleConstructorReturn$
|
|
25056
|
+
return _possibleConstructorReturn$7(_this);
|
|
25041
25057
|
}
|
|
25042
25058
|
_this.state = {
|
|
25043
|
-
style: attributeName ? _defineProperty$
|
|
25059
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25044
25060
|
};
|
|
25045
25061
|
} else {
|
|
25046
25062
|
_this.state = {
|
|
@@ -25049,7 +25065,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25049
25065
|
}
|
|
25050
25066
|
return _this;
|
|
25051
25067
|
}
|
|
25052
|
-
_createClass$
|
|
25068
|
+
_createClass$9(Animate, [{
|
|
25053
25069
|
key: "componentDidMount",
|
|
25054
25070
|
value: function componentDidMount() {
|
|
25055
25071
|
var _this$props2 = this.props,
|
|
@@ -25077,7 +25093,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25077
25093
|
}
|
|
25078
25094
|
if (!isActive) {
|
|
25079
25095
|
var newState = {
|
|
25080
|
-
style: attributeName ? _defineProperty$
|
|
25096
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
25081
25097
|
};
|
|
25082
25098
|
if (this.state && style) {
|
|
25083
25099
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25100,14 +25116,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25100
25116
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25101
25117
|
if (this.state && style) {
|
|
25102
25118
|
var _newState = {
|
|
25103
|
-
style: attributeName ? _defineProperty$
|
|
25119
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25104
25120
|
};
|
|
25105
25121
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25106
25122
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25107
25123
|
this.setState(_newState);
|
|
25108
25124
|
}
|
|
25109
25125
|
}
|
|
25110
|
-
this.runAnimation(_objectSpread$
|
|
25126
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
25111
25127
|
from: from,
|
|
25112
25128
|
begin: 0
|
|
25113
25129
|
}));
|
|
@@ -25190,7 +25206,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25190
25206
|
}), duration]);
|
|
25191
25207
|
}
|
|
25192
25208
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25193
|
-
var newStyle = _objectSpread$
|
|
25209
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25194
25210
|
transition: transition
|
|
25195
25211
|
});
|
|
25196
25212
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25222,9 +25238,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25222
25238
|
this.runStepAnimation(props);
|
|
25223
25239
|
return;
|
|
25224
25240
|
}
|
|
25225
|
-
var to = attributeName ? _defineProperty$
|
|
25241
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25226
25242
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25227
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25243
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25228
25244
|
transition: transition
|
|
25229
25245
|
}), duration, onAnimationEnd]);
|
|
25230
25246
|
}
|
|
@@ -25245,7 +25261,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25245
25261
|
_this$props4.onAnimationEnd;
|
|
25246
25262
|
_this$props4.shouldReAnimate;
|
|
25247
25263
|
_this$props4.onAnimationReStart;
|
|
25248
|
-
var others = _objectWithoutProperties$
|
|
25264
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25249
25265
|
var count = Children.count(children);
|
|
25250
25266
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25251
25267
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25260,8 +25276,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25260
25276
|
_container$props$styl = _container$props.style,
|
|
25261
25277
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25262
25278
|
className = _container$props.className;
|
|
25263
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25264
|
-
style: _objectSpread$
|
|
25279
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25280
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25265
25281
|
className: className
|
|
25266
25282
|
}));
|
|
25267
25283
|
return res;
|
|
@@ -25786,10 +25802,10 @@ var defineProperty$2 = (function() {
|
|
|
25786
25802
|
} catch (e) {}
|
|
25787
25803
|
}());
|
|
25788
25804
|
|
|
25789
|
-
var _defineProperty$
|
|
25805
|
+
var _defineProperty$o = defineProperty$2;
|
|
25790
25806
|
|
|
25791
25807
|
var constant$1 = constant_1,
|
|
25792
|
-
defineProperty$1 = _defineProperty$
|
|
25808
|
+
defineProperty$1 = _defineProperty$o,
|
|
25793
25809
|
identity$7 = identity_1;
|
|
25794
25810
|
|
|
25795
25811
|
/**
|
|
@@ -25966,18 +25982,18 @@ var sortBy_1 = sortBy;
|
|
|
25966
25982
|
/**
|
|
25967
25983
|
* @fileOverview Default Tooltip Content
|
|
25968
25984
|
*/
|
|
25969
|
-
function _typeof$
|
|
25970
|
-
function _slicedToArray$
|
|
25971
|
-
function _nonIterableRest$
|
|
25972
|
-
function _unsupportedIterableToArray$
|
|
25973
|
-
function _arrayLikeToArray$
|
|
25974
|
-
function _iterableToArrayLimit$
|
|
25975
|
-
function _arrayWithHoles$
|
|
25976
|
-
function ownKeys$
|
|
25977
|
-
function _objectSpread$
|
|
25978
|
-
function _defineProperty$
|
|
25979
|
-
function _toPropertyKey$
|
|
25980
|
-
function _toPrimitive$
|
|
25985
|
+
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); }
|
|
25986
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25987
|
+
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."); }
|
|
25988
|
+
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); }
|
|
25989
|
+
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; }
|
|
25990
|
+
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; } }
|
|
25991
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25992
|
+
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; }
|
|
25993
|
+
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; }
|
|
25994
|
+
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; }
|
|
25995
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
25996
|
+
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); }
|
|
25981
25997
|
function defaultFormatter(value) {
|
|
25982
25998
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25983
25999
|
}
|
|
@@ -26007,7 +26023,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26007
26023
|
if (entry.type === 'none') {
|
|
26008
26024
|
return null;
|
|
26009
26025
|
}
|
|
26010
|
-
var finalItemStyle = _objectSpread$
|
|
26026
|
+
var finalItemStyle = _objectSpread$m({
|
|
26011
26027
|
display: 'block',
|
|
26012
26028
|
paddingTop: 4,
|
|
26013
26029
|
paddingBottom: 4,
|
|
@@ -26021,7 +26037,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26021
26037
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26022
26038
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26023
26039
|
if (Array.isArray(formatted)) {
|
|
26024
|
-
var _formatted = _slicedToArray$
|
|
26040
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
26025
26041
|
finalValue = _formatted[0];
|
|
26026
26042
|
finalName = _formatted[1];
|
|
26027
26043
|
} else {
|
|
@@ -26053,14 +26069,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26053
26069
|
}
|
|
26054
26070
|
return null;
|
|
26055
26071
|
};
|
|
26056
|
-
var finalStyle = _objectSpread$
|
|
26072
|
+
var finalStyle = _objectSpread$m({
|
|
26057
26073
|
margin: 0,
|
|
26058
26074
|
padding: 10,
|
|
26059
26075
|
backgroundColor: '#fff',
|
|
26060
26076
|
border: '1px solid #ccc',
|
|
26061
26077
|
whiteSpace: 'nowrap'
|
|
26062
26078
|
}, contentStyle);
|
|
26063
|
-
var finalLabelStyle = _objectSpread$
|
|
26079
|
+
var finalLabelStyle = _objectSpread$m({
|
|
26064
26080
|
margin: 0
|
|
26065
26081
|
}, labelStyle);
|
|
26066
26082
|
var hasLabel = !isNil_1(label);
|
|
@@ -26101,18 +26117,22 @@ var Global = {
|
|
|
26101
26117
|
}
|
|
26102
26118
|
};
|
|
26103
26119
|
|
|
26104
|
-
function _typeof$
|
|
26105
|
-
function ownKeys$
|
|
26106
|
-
function _objectSpread$
|
|
26107
|
-
function
|
|
26108
|
-
function
|
|
26109
|
-
function
|
|
26110
|
-
function
|
|
26111
|
-
function
|
|
26112
|
-
function
|
|
26113
|
-
function
|
|
26114
|
-
function
|
|
26115
|
-
function
|
|
26120
|
+
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); }
|
|
26121
|
+
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; }
|
|
26122
|
+
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; }
|
|
26123
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26124
|
+
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); } }
|
|
26125
|
+
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; }
|
|
26126
|
+
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); }
|
|
26127
|
+
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); }
|
|
26128
|
+
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); }; }
|
|
26129
|
+
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); }
|
|
26130
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26131
|
+
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; } }
|
|
26132
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26133
|
+
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; }
|
|
26134
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26135
|
+
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); }
|
|
26116
26136
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26117
26137
|
var EPS$1 = 1;
|
|
26118
26138
|
function defaultUniqBy(entry) {
|
|
@@ -26136,7 +26156,204 @@ function renderContent(content, props) {
|
|
|
26136
26156
|
}
|
|
26137
26157
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26138
26158
|
}
|
|
26139
|
-
var
|
|
26159
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
26160
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
26161
|
+
var _super = _createSuper$6(Tooltip);
|
|
26162
|
+
function Tooltip() {
|
|
26163
|
+
var _this;
|
|
26164
|
+
_classCallCheck$8(this, Tooltip);
|
|
26165
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26166
|
+
args[_key] = arguments[_key];
|
|
26167
|
+
}
|
|
26168
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
26169
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26170
|
+
boxWidth: -1,
|
|
26171
|
+
boxHeight: -1,
|
|
26172
|
+
dismissed: false,
|
|
26173
|
+
dismissedAtCoordinate: {
|
|
26174
|
+
x: 0,
|
|
26175
|
+
y: 0
|
|
26176
|
+
}
|
|
26177
|
+
});
|
|
26178
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26179
|
+
if (event.key === 'Escape') {
|
|
26180
|
+
_this.setState({
|
|
26181
|
+
dismissed: true,
|
|
26182
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26183
|
+
x: _this.props.coordinate.x,
|
|
26184
|
+
y: _this.props.coordinate.y
|
|
26185
|
+
})
|
|
26186
|
+
});
|
|
26187
|
+
}
|
|
26188
|
+
});
|
|
26189
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26190
|
+
var key = _ref.key,
|
|
26191
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26192
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26193
|
+
var _this$props = _this.props,
|
|
26194
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26195
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26196
|
+
coordinate = _this$props.coordinate,
|
|
26197
|
+
offset = _this$props.offset,
|
|
26198
|
+
position = _this$props.position,
|
|
26199
|
+
viewBox = _this$props.viewBox;
|
|
26200
|
+
if (position && isNumber(position[key])) {
|
|
26201
|
+
return position[key];
|
|
26202
|
+
}
|
|
26203
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26204
|
+
var positive = coordinate[key] + offset;
|
|
26205
|
+
if (allowEscapeViewBox[key]) {
|
|
26206
|
+
return reverseDirection[key] ? negative : positive;
|
|
26207
|
+
}
|
|
26208
|
+
if (reverseDirection[key]) {
|
|
26209
|
+
var _tooltipBoundary = negative;
|
|
26210
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26211
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26212
|
+
return Math.max(positive, viewBox[key]);
|
|
26213
|
+
}
|
|
26214
|
+
return Math.max(negative, viewBox[key]);
|
|
26215
|
+
}
|
|
26216
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26217
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26218
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26219
|
+
return Math.max(negative, viewBox[key]);
|
|
26220
|
+
}
|
|
26221
|
+
return Math.max(positive, viewBox[key]);
|
|
26222
|
+
});
|
|
26223
|
+
return _this;
|
|
26224
|
+
}
|
|
26225
|
+
_createClass$8(Tooltip, [{
|
|
26226
|
+
key: "componentDidMount",
|
|
26227
|
+
value: function componentDidMount() {
|
|
26228
|
+
this.updateBBox();
|
|
26229
|
+
}
|
|
26230
|
+
}, {
|
|
26231
|
+
key: "componentWillUnmount",
|
|
26232
|
+
value: function componentWillUnmount() {
|
|
26233
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26234
|
+
}
|
|
26235
|
+
}, {
|
|
26236
|
+
key: "componentDidUpdate",
|
|
26237
|
+
value: function componentDidUpdate() {
|
|
26238
|
+
this.updateBBox();
|
|
26239
|
+
}
|
|
26240
|
+
}, {
|
|
26241
|
+
key: "updateBBox",
|
|
26242
|
+
value: function updateBBox() {
|
|
26243
|
+
var _this$state = this.state,
|
|
26244
|
+
boxWidth = _this$state.boxWidth,
|
|
26245
|
+
boxHeight = _this$state.boxHeight,
|
|
26246
|
+
dismissed = _this$state.dismissed;
|
|
26247
|
+
if (dismissed) {
|
|
26248
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26249
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26250
|
+
this.setState({
|
|
26251
|
+
dismissed: false
|
|
26252
|
+
});
|
|
26253
|
+
}
|
|
26254
|
+
} else {
|
|
26255
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26256
|
+
}
|
|
26257
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26258
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26259
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26260
|
+
this.setState({
|
|
26261
|
+
boxWidth: box.width,
|
|
26262
|
+
boxHeight: box.height
|
|
26263
|
+
});
|
|
26264
|
+
}
|
|
26265
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26266
|
+
this.setState({
|
|
26267
|
+
boxWidth: -1,
|
|
26268
|
+
boxHeight: -1
|
|
26269
|
+
});
|
|
26270
|
+
}
|
|
26271
|
+
}
|
|
26272
|
+
}, {
|
|
26273
|
+
key: "render",
|
|
26274
|
+
value: function render() {
|
|
26275
|
+
var _classNames,
|
|
26276
|
+
_this2 = this;
|
|
26277
|
+
var _this$props2 = this.props,
|
|
26278
|
+
payload = _this$props2.payload,
|
|
26279
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26280
|
+
animationDuration = _this$props2.animationDuration,
|
|
26281
|
+
animationEasing = _this$props2.animationEasing,
|
|
26282
|
+
filterNull = _this$props2.filterNull,
|
|
26283
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26284
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26285
|
+
return !isNil_1(entry.value);
|
|
26286
|
+
}) : payload);
|
|
26287
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26288
|
+
var _this$props3 = this.props,
|
|
26289
|
+
content = _this$props3.content,
|
|
26290
|
+
viewBox = _this$props3.viewBox,
|
|
26291
|
+
coordinate = _this$props3.coordinate,
|
|
26292
|
+
position = _this$props3.position,
|
|
26293
|
+
active = _this$props3.active,
|
|
26294
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26295
|
+
var outerStyle = _objectSpread$l({
|
|
26296
|
+
pointerEvents: 'none',
|
|
26297
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26298
|
+
position: 'absolute',
|
|
26299
|
+
top: 0,
|
|
26300
|
+
left: 0
|
|
26301
|
+
}, wrapperStyle);
|
|
26302
|
+
var translateX, translateY;
|
|
26303
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26304
|
+
translateX = position.x;
|
|
26305
|
+
translateY = position.y;
|
|
26306
|
+
} else {
|
|
26307
|
+
var _this$state2 = this.state,
|
|
26308
|
+
boxWidth = _this$state2.boxWidth,
|
|
26309
|
+
boxHeight = _this$state2.boxHeight;
|
|
26310
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26311
|
+
translateX = this.getTranslate({
|
|
26312
|
+
key: 'x',
|
|
26313
|
+
tooltipDimension: boxWidth,
|
|
26314
|
+
viewBoxDimension: viewBox.width
|
|
26315
|
+
});
|
|
26316
|
+
translateY = this.getTranslate({
|
|
26317
|
+
key: 'y',
|
|
26318
|
+
tooltipDimension: boxHeight,
|
|
26319
|
+
viewBoxDimension: viewBox.height
|
|
26320
|
+
});
|
|
26321
|
+
} else {
|
|
26322
|
+
outerStyle.visibility = 'hidden';
|
|
26323
|
+
}
|
|
26324
|
+
}
|
|
26325
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26326
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26327
|
+
})), outerStyle);
|
|
26328
|
+
if (isAnimationActive && active) {
|
|
26329
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26330
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26331
|
+
})), outerStyle);
|
|
26332
|
+
}
|
|
26333
|
+
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));
|
|
26334
|
+
return (
|
|
26335
|
+
/*#__PURE__*/
|
|
26336
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26337
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26338
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26339
|
+
React__default.createElement("div", {
|
|
26340
|
+
tabIndex: -1,
|
|
26341
|
+
role: "dialog",
|
|
26342
|
+
className: cls,
|
|
26343
|
+
style: outerStyle,
|
|
26344
|
+
ref: function ref(node) {
|
|
26345
|
+
_this2.wrapperNode = node;
|
|
26346
|
+
}
|
|
26347
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26348
|
+
payload: finalPayload
|
|
26349
|
+
})))
|
|
26350
|
+
);
|
|
26351
|
+
}
|
|
26352
|
+
}]);
|
|
26353
|
+
return Tooltip;
|
|
26354
|
+
}(PureComponent);
|
|
26355
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26356
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26140
26357
|
active: false,
|
|
26141
26358
|
allowEscapeViewBox: {
|
|
26142
26359
|
x: false,
|
|
@@ -26157,9 +26374,6 @@ var tooltipDefaultProps = {
|
|
|
26157
26374
|
x: 0,
|
|
26158
26375
|
y: 0
|
|
26159
26376
|
},
|
|
26160
|
-
// this doesn't exist on TooltipProps
|
|
26161
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26162
|
-
// @ts-ignore
|
|
26163
26377
|
cursorStyle: {},
|
|
26164
26378
|
separator: ' : ',
|
|
26165
26379
|
wrapperStyle: {},
|
|
@@ -26173,173 +26387,7 @@ var tooltipDefaultProps = {
|
|
|
26173
26387
|
animationDuration: 400,
|
|
26174
26388
|
filterNull: true,
|
|
26175
26389
|
useTranslate3d: false
|
|
26176
|
-
};
|
|
26177
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26178
|
-
var _classNames;
|
|
26179
|
-
var _useState = useState(-1),
|
|
26180
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26181
|
-
boxWidth = _useState2[0],
|
|
26182
|
-
setBoxWidth = _useState2[1];
|
|
26183
|
-
var _useState3 = useState(-1),
|
|
26184
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26185
|
-
boxHeight = _useState4[0],
|
|
26186
|
-
setBoxHeight = _useState4[1];
|
|
26187
|
-
var _useState5 = useState(false),
|
|
26188
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26189
|
-
dismissed = _useState6[0],
|
|
26190
|
-
setDismissed = _useState6[1];
|
|
26191
|
-
var _useState7 = useState({
|
|
26192
|
-
x: 0,
|
|
26193
|
-
y: 0
|
|
26194
|
-
}),
|
|
26195
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26196
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26197
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26198
|
-
var wrapperNode = useRef();
|
|
26199
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26200
|
-
reverseDirection = props.reverseDirection,
|
|
26201
|
-
coordinate = props.coordinate,
|
|
26202
|
-
offset = props.offset,
|
|
26203
|
-
position = props.position,
|
|
26204
|
-
viewBox = props.viewBox;
|
|
26205
|
-
var handleKeyDown = useCallback(function (event) {
|
|
26206
|
-
if (event.key === 'Escape') {
|
|
26207
|
-
setDismissed(true);
|
|
26208
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26209
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26210
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26211
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26212
|
-
});
|
|
26213
|
-
});
|
|
26214
|
-
}
|
|
26215
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26216
|
-
useEffect(function () {
|
|
26217
|
-
var updateBBox = function updateBBox() {
|
|
26218
|
-
if (dismissed) {
|
|
26219
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26220
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26221
|
-
setDismissed(false);
|
|
26222
|
-
}
|
|
26223
|
-
} else {
|
|
26224
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26225
|
-
}
|
|
26226
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26227
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26228
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26229
|
-
setBoxWidth(box.width);
|
|
26230
|
-
setBoxHeight(box.height);
|
|
26231
|
-
}
|
|
26232
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26233
|
-
setBoxWidth(-1);
|
|
26234
|
-
setBoxHeight(-1);
|
|
26235
|
-
}
|
|
26236
|
-
};
|
|
26237
|
-
updateBBox();
|
|
26238
|
-
return function () {
|
|
26239
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26240
|
-
};
|
|
26241
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26242
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26243
|
-
var key = _ref.key,
|
|
26244
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26245
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26246
|
-
if (position && isNumber(position[key])) {
|
|
26247
|
-
return position[key];
|
|
26248
|
-
}
|
|
26249
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26250
|
-
var positive = coordinate[key] + offset;
|
|
26251
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26252
|
-
return reverseDirection[key] ? negative : positive;
|
|
26253
|
-
}
|
|
26254
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26255
|
-
var _tooltipBoundary = negative;
|
|
26256
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26257
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26258
|
-
return Math.max(positive, viewBox[key]);
|
|
26259
|
-
}
|
|
26260
|
-
return Math.max(negative, viewBox[key]);
|
|
26261
|
-
}
|
|
26262
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26263
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26264
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26265
|
-
return Math.max(negative, viewBox[key]);
|
|
26266
|
-
}
|
|
26267
|
-
return Math.max(positive, viewBox[key]);
|
|
26268
|
-
};
|
|
26269
|
-
var payload = props.payload,
|
|
26270
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26271
|
-
filterNull = props.filterNull,
|
|
26272
|
-
active = props.active,
|
|
26273
|
-
wrapperStyle = props.wrapperStyle,
|
|
26274
|
-
useTranslate3d = props.useTranslate3d,
|
|
26275
|
-
isAnimationActive = props.isAnimationActive,
|
|
26276
|
-
animationDuration = props.animationDuration,
|
|
26277
|
-
animationEasing = props.animationEasing;
|
|
26278
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26279
|
-
return !isNil_1(entry.value);
|
|
26280
|
-
}) : payload);
|
|
26281
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26282
|
-
var content = props.content;
|
|
26283
|
-
var outerStyle = _objectSpread$i({
|
|
26284
|
-
pointerEvents: 'none',
|
|
26285
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26286
|
-
position: 'absolute',
|
|
26287
|
-
top: 0,
|
|
26288
|
-
left: 0
|
|
26289
|
-
}, wrapperStyle);
|
|
26290
|
-
var translateX, translateY;
|
|
26291
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26292
|
-
translateX = position.x;
|
|
26293
|
-
translateY = position.y;
|
|
26294
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26295
|
-
translateX = getTranslate({
|
|
26296
|
-
key: 'x',
|
|
26297
|
-
tooltipDimension: boxWidth,
|
|
26298
|
-
viewBoxDimension: viewBox.width
|
|
26299
|
-
});
|
|
26300
|
-
translateY = getTranslate({
|
|
26301
|
-
key: 'y',
|
|
26302
|
-
tooltipDimension: boxHeight,
|
|
26303
|
-
viewBoxDimension: viewBox.height
|
|
26304
|
-
});
|
|
26305
|
-
} else {
|
|
26306
|
-
outerStyle.visibility = 'hidden';
|
|
26307
|
-
}
|
|
26308
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26309
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26310
|
-
})), outerStyle);
|
|
26311
|
-
if (isAnimationActive && active) {
|
|
26312
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26313
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26314
|
-
})), outerStyle);
|
|
26315
|
-
}
|
|
26316
|
-
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));
|
|
26317
|
-
return (
|
|
26318
|
-
/*#__PURE__*/
|
|
26319
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26320
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26321
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26322
|
-
React__default.createElement("div", {
|
|
26323
|
-
tabIndex: -1,
|
|
26324
|
-
role: "dialog",
|
|
26325
|
-
className: cls,
|
|
26326
|
-
style: outerStyle,
|
|
26327
|
-
ref: wrapperNode
|
|
26328
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26329
|
-
payload: finalPayload
|
|
26330
|
-
})))
|
|
26331
|
-
);
|
|
26332
|
-
};
|
|
26333
|
-
|
|
26334
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26335
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26336
|
-
|
|
26337
|
-
/**
|
|
26338
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26339
|
-
* children.props when there are no props set by the consumer
|
|
26340
|
-
* doesn't work if using default parameters
|
|
26341
|
-
*/
|
|
26342
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26390
|
+
});
|
|
26343
26391
|
|
|
26344
26392
|
var root = _root;
|
|
26345
26393
|
|
|
@@ -31909,12 +31957,12 @@ module.exports = exports['default'];
|
|
|
31909
31957
|
|
|
31910
31958
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31911
31959
|
|
|
31912
|
-
function _typeof$
|
|
31913
|
-
function ownKeys$
|
|
31914
|
-
function _objectSpread$
|
|
31915
|
-
function _defineProperty$
|
|
31916
|
-
function _toPropertyKey$
|
|
31917
|
-
function _toPrimitive$
|
|
31960
|
+
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); }
|
|
31961
|
+
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; }
|
|
31962
|
+
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; }
|
|
31963
|
+
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; }
|
|
31964
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31965
|
+
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); }
|
|
31918
31966
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31919
31967
|
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."); }
|
|
31920
31968
|
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); }
|
|
@@ -31982,7 +32030,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31982
32030
|
}
|
|
31983
32031
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31984
32032
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31985
|
-
var measurementSpanStyle = _objectSpread$
|
|
32033
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
31986
32034
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31987
32035
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31988
32036
|
return styleKey;
|
|
@@ -32037,10 +32085,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32037
32085
|
};
|
|
32038
32086
|
};
|
|
32039
32087
|
|
|
32040
|
-
var _excluded$
|
|
32088
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
32089
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32041
32090
|
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); }
|
|
32042
|
-
function _objectWithoutProperties$
|
|
32043
|
-
function _objectWithoutPropertiesLoose$
|
|
32091
|
+
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; }
|
|
32092
|
+
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; }
|
|
32044
32093
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32045
32094
|
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."); }
|
|
32046
32095
|
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); }
|
|
@@ -32194,45 +32243,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32194
32243
|
}
|
|
32195
32244
|
return getWordsWithoutCalculate(children);
|
|
32196
32245
|
};
|
|
32197
|
-
var
|
|
32198
|
-
|
|
32199
|
-
|
|
32200
|
-
|
|
32201
|
-
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32205
|
-
|
|
32206
|
-
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32246
|
+
var DEFAULT_FILL = '#808080';
|
|
32247
|
+
var Text = function Text(_ref5) {
|
|
32248
|
+
var _ref5$x = _ref5.x,
|
|
32249
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32250
|
+
_ref5$y = _ref5.y,
|
|
32251
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32252
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32253
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32254
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32255
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32256
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32257
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32258
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32259
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32260
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32261
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32262
|
+
_ref5$fill = _ref5.fill,
|
|
32263
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32264
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32210
32265
|
var wordsByLines = useMemo(function () {
|
|
32211
32266
|
return getWordsByLines({
|
|
32212
32267
|
breakAll: props.breakAll,
|
|
32213
32268
|
children: props.children,
|
|
32214
32269
|
maxLines: props.maxLines,
|
|
32215
|
-
scaleToFit:
|
|
32270
|
+
scaleToFit: scaleToFit,
|
|
32216
32271
|
style: props.style,
|
|
32217
32272
|
width: props.width
|
|
32218
32273
|
});
|
|
32219
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32274
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32220
32275
|
var dx = props.dx,
|
|
32221
32276
|
dy = props.dy,
|
|
32222
|
-
textAnchor = props.textAnchor,
|
|
32223
|
-
verticalAnchor = props.verticalAnchor,
|
|
32224
|
-
scaleToFit = props.scaleToFit,
|
|
32225
32277
|
angle = props.angle,
|
|
32226
|
-
lineHeight = props.lineHeight,
|
|
32227
|
-
capHeight = props.capHeight,
|
|
32228
32278
|
className = props.className,
|
|
32229
32279
|
breakAll = props.breakAll,
|
|
32230
|
-
textProps = _objectWithoutProperties$
|
|
32231
|
-
if (!isNumOrStr(
|
|
32280
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32281
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32232
32282
|
return null;
|
|
32233
32283
|
}
|
|
32234
|
-
var x =
|
|
32235
|
-
var y =
|
|
32284
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32285
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32236
32286
|
var startDy;
|
|
32237
32287
|
switch (verticalAnchor) {
|
|
32238
32288
|
case 'start':
|
|
@@ -32262,7 +32312,7 @@ var Text = function Text(props) {
|
|
|
32262
32312
|
y: y,
|
|
32263
32313
|
className: classNames('recharts-text', className),
|
|
32264
32314
|
textAnchor: textAnchor,
|
|
32265
|
-
fill:
|
|
32315
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32266
32316
|
}), wordsByLines.map(function (line, index) {
|
|
32267
32317
|
return (
|
|
32268
32318
|
/*#__PURE__*/
|
|
@@ -32275,7 +32325,6 @@ var Text = function Text(props) {
|
|
|
32275
32325
|
);
|
|
32276
32326
|
}));
|
|
32277
32327
|
};
|
|
32278
|
-
Text.defaultProps = textDefaultProps;
|
|
32279
32328
|
|
|
32280
32329
|
var baseIsEqual = _baseIsEqual;
|
|
32281
32330
|
|
|
@@ -38543,7 +38592,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38543
38592
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38544
38593
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38545
38594
|
|
|
38546
|
-
var _excluded$
|
|
38595
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38547
38596
|
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); }
|
|
38548
38597
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38549
38598
|
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."); }
|
|
@@ -38551,8 +38600,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38551
38600
|
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; }
|
|
38552
38601
|
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; } }
|
|
38553
38602
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38554
|
-
function _objectWithoutProperties$
|
|
38555
|
-
function _objectWithoutPropertiesLoose$
|
|
38603
|
+
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; }
|
|
38604
|
+
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; }
|
|
38556
38605
|
function ErrorBar(props) {
|
|
38557
38606
|
var offset = props.offset,
|
|
38558
38607
|
layout = props.layout,
|
|
@@ -38562,7 +38611,7 @@ function ErrorBar(props) {
|
|
|
38562
38611
|
dataPointFormatter = props.dataPointFormatter,
|
|
38563
38612
|
xAxis = props.xAxis,
|
|
38564
38613
|
yAxis = props.yAxis,
|
|
38565
|
-
others = _objectWithoutProperties$
|
|
38614
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38566
38615
|
var svgProps = filterProps(others);
|
|
38567
38616
|
var errorBars = data.map(function (entry, i) {
|
|
38568
38617
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38673,18 +38722,18 @@ ErrorBar.defaultProps = {
|
|
|
38673
38722
|
};
|
|
38674
38723
|
ErrorBar.displayName = 'ErrorBar';
|
|
38675
38724
|
|
|
38676
|
-
function _typeof$
|
|
38725
|
+
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); }
|
|
38677
38726
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38678
38727
|
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."); }
|
|
38679
38728
|
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); }
|
|
38680
38729
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38681
38730
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38682
38731
|
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; }
|
|
38683
|
-
function ownKeys$
|
|
38684
|
-
function _objectSpread$
|
|
38685
|
-
function _defineProperty$
|
|
38686
|
-
function _toPropertyKey$
|
|
38687
|
-
function _toPrimitive$
|
|
38732
|
+
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; }
|
|
38733
|
+
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; }
|
|
38734
|
+
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; }
|
|
38735
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38736
|
+
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); }
|
|
38688
38737
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38689
38738
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38690
38739
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38855,7 +38904,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38855
38904
|
};
|
|
38856
38905
|
});
|
|
38857
38906
|
}
|
|
38858
|
-
return _objectSpread$
|
|
38907
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38859
38908
|
payload: legendData,
|
|
38860
38909
|
item: legendItem
|
|
38861
38910
|
});
|
|
@@ -39009,10 +39058,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39009
39058
|
verticalAlign = legendProps.verticalAlign,
|
|
39010
39059
|
layout = legendProps.layout;
|
|
39011
39060
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39012
|
-
newOffset = _objectSpread$
|
|
39061
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
39013
39062
|
}
|
|
39014
39063
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39015
|
-
newOffset = _objectSpread$
|
|
39064
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39016
39065
|
}
|
|
39017
39066
|
}
|
|
39018
39067
|
return newOffset;
|
|
@@ -39438,14 +39487,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39438
39487
|
items: [item]
|
|
39439
39488
|
};
|
|
39440
39489
|
}
|
|
39441
|
-
return _objectSpread$
|
|
39490
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39442
39491
|
}, {});
|
|
39443
39492
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39444
39493
|
var group = stackGroups[axisId];
|
|
39445
39494
|
if (group.hasStack) {
|
|
39446
39495
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39447
39496
|
var g = group.stackGroups[stackId];
|
|
39448
|
-
return _objectSpread$
|
|
39497
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39449
39498
|
numericAxisId: numericAxisId,
|
|
39450
39499
|
cateAxisId: cateAxisId,
|
|
39451
39500
|
items: g.items,
|
|
@@ -39453,7 +39502,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39453
39502
|
}));
|
|
39454
39503
|
}, {});
|
|
39455
39504
|
}
|
|
39456
|
-
return _objectSpread$
|
|
39505
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39457
39506
|
}, {});
|
|
39458
39507
|
};
|
|
39459
39508
|
|
|
@@ -39667,7 +39716,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39667
39716
|
formatter = _graphicalItem$props.formatter,
|
|
39668
39717
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39669
39718
|
chartType = _graphicalItem$props.chartType;
|
|
39670
|
-
return _objectSpread$
|
|
39719
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39671
39720
|
dataKey: dataKey,
|
|
39672
39721
|
unit: unit,
|
|
39673
39722
|
formatter: formatter,
|
|
@@ -39680,12 +39729,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39680
39729
|
});
|
|
39681
39730
|
};
|
|
39682
39731
|
|
|
39683
|
-
function _typeof$
|
|
39684
|
-
function ownKeys$
|
|
39685
|
-
function _objectSpread$
|
|
39686
|
-
function _defineProperty$
|
|
39687
|
-
function _toPropertyKey$
|
|
39688
|
-
function _toPrimitive$
|
|
39732
|
+
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); }
|
|
39733
|
+
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; }
|
|
39734
|
+
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; }
|
|
39735
|
+
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; }
|
|
39736
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39737
|
+
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); }
|
|
39689
39738
|
var RADIAN = Math.PI / 180;
|
|
39690
39739
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39691
39740
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39790,7 +39839,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39790
39839
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39791
39840
|
}
|
|
39792
39841
|
if (inRange) {
|
|
39793
|
-
return _objectSpread$
|
|
39842
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39794
39843
|
radius: radius,
|
|
39795
39844
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39796
39845
|
});
|
|
@@ -39798,18 +39847,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39798
39847
|
return null;
|
|
39799
39848
|
};
|
|
39800
39849
|
|
|
39801
|
-
function _typeof$
|
|
39850
|
+
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); }
|
|
39851
|
+
var _excluded$7 = ["offset"];
|
|
39802
39852
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39803
39853
|
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."); }
|
|
39804
39854
|
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); }
|
|
39805
39855
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39806
39856
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39807
39857
|
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; }
|
|
39808
|
-
function
|
|
39809
|
-
function
|
|
39810
|
-
function
|
|
39811
|
-
function
|
|
39812
|
-
function
|
|
39858
|
+
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; }
|
|
39859
|
+
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; }
|
|
39860
|
+
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; }
|
|
39861
|
+
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; }
|
|
39862
|
+
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; }
|
|
39863
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39864
|
+
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); }
|
|
39813
39865
|
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); }
|
|
39814
39866
|
var getLabel = function getLabel(props) {
|
|
39815
39867
|
var value = props.value,
|
|
@@ -39954,7 +40006,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39954
40006
|
textAnchor: 'middle',
|
|
39955
40007
|
verticalAnchor: verticalEnd
|
|
39956
40008
|
};
|
|
39957
|
-
return _objectSpread$
|
|
40009
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39958
40010
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39959
40011
|
width: width
|
|
39960
40012
|
} : {});
|
|
@@ -39966,7 +40018,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39966
40018
|
textAnchor: 'middle',
|
|
39967
40019
|
verticalAnchor: verticalStart
|
|
39968
40020
|
};
|
|
39969
|
-
return _objectSpread$
|
|
40021
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39970
40022
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39971
40023
|
width: width
|
|
39972
40024
|
} : {});
|
|
@@ -39978,7 +40030,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39978
40030
|
textAnchor: horizontalEnd,
|
|
39979
40031
|
verticalAnchor: 'middle'
|
|
39980
40032
|
};
|
|
39981
|
-
return _objectSpread$
|
|
40033
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
39982
40034
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39983
40035
|
height: height
|
|
39984
40036
|
} : {});
|
|
@@ -39990,7 +40042,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39990
40042
|
textAnchor: horizontalStart,
|
|
39991
40043
|
verticalAnchor: 'middle'
|
|
39992
40044
|
};
|
|
39993
|
-
return _objectSpread$
|
|
40045
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
39994
40046
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39995
40047
|
height: height
|
|
39996
40048
|
} : {});
|
|
@@ -40000,7 +40052,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40000
40052
|
height: height
|
|
40001
40053
|
} : {};
|
|
40002
40054
|
if (position === 'insideLeft') {
|
|
40003
|
-
return _objectSpread$
|
|
40055
|
+
return _objectSpread$h({
|
|
40004
40056
|
x: x + horizontalOffset,
|
|
40005
40057
|
y: y + height / 2,
|
|
40006
40058
|
textAnchor: horizontalStart,
|
|
@@ -40008,7 +40060,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40008
40060
|
}, sizeAttrs);
|
|
40009
40061
|
}
|
|
40010
40062
|
if (position === 'insideRight') {
|
|
40011
|
-
return _objectSpread$
|
|
40063
|
+
return _objectSpread$h({
|
|
40012
40064
|
x: x + width - horizontalOffset,
|
|
40013
40065
|
y: y + height / 2,
|
|
40014
40066
|
textAnchor: horizontalEnd,
|
|
@@ -40016,7 +40068,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40016
40068
|
}, sizeAttrs);
|
|
40017
40069
|
}
|
|
40018
40070
|
if (position === 'insideTop') {
|
|
40019
|
-
return _objectSpread$
|
|
40071
|
+
return _objectSpread$h({
|
|
40020
40072
|
x: x + width / 2,
|
|
40021
40073
|
y: y + verticalOffset,
|
|
40022
40074
|
textAnchor: 'middle',
|
|
@@ -40024,7 +40076,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40024
40076
|
}, sizeAttrs);
|
|
40025
40077
|
}
|
|
40026
40078
|
if (position === 'insideBottom') {
|
|
40027
|
-
return _objectSpread$
|
|
40079
|
+
return _objectSpread$h({
|
|
40028
40080
|
x: x + width / 2,
|
|
40029
40081
|
y: y + height - verticalOffset,
|
|
40030
40082
|
textAnchor: 'middle',
|
|
@@ -40032,7 +40084,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40032
40084
|
}, sizeAttrs);
|
|
40033
40085
|
}
|
|
40034
40086
|
if (position === 'insideTopLeft') {
|
|
40035
|
-
return _objectSpread$
|
|
40087
|
+
return _objectSpread$h({
|
|
40036
40088
|
x: x + horizontalOffset,
|
|
40037
40089
|
y: y + verticalOffset,
|
|
40038
40090
|
textAnchor: horizontalStart,
|
|
@@ -40040,7 +40092,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40040
40092
|
}, sizeAttrs);
|
|
40041
40093
|
}
|
|
40042
40094
|
if (position === 'insideTopRight') {
|
|
40043
|
-
return _objectSpread$
|
|
40095
|
+
return _objectSpread$h({
|
|
40044
40096
|
x: x + width - horizontalOffset,
|
|
40045
40097
|
y: y + verticalOffset,
|
|
40046
40098
|
textAnchor: horizontalEnd,
|
|
@@ -40048,7 +40100,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40048
40100
|
}, sizeAttrs);
|
|
40049
40101
|
}
|
|
40050
40102
|
if (position === 'insideBottomLeft') {
|
|
40051
|
-
return _objectSpread$
|
|
40103
|
+
return _objectSpread$h({
|
|
40052
40104
|
x: x + horizontalOffset,
|
|
40053
40105
|
y: y + height - verticalOffset,
|
|
40054
40106
|
textAnchor: horizontalStart,
|
|
@@ -40056,7 +40108,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40056
40108
|
}, sizeAttrs);
|
|
40057
40109
|
}
|
|
40058
40110
|
if (position === 'insideBottomRight') {
|
|
40059
|
-
return _objectSpread$
|
|
40111
|
+
return _objectSpread$h({
|
|
40060
40112
|
x: x + width - horizontalOffset,
|
|
40061
40113
|
y: y + height - verticalOffset,
|
|
40062
40114
|
textAnchor: horizontalEnd,
|
|
@@ -40064,14 +40116,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40064
40116
|
}, sizeAttrs);
|
|
40065
40117
|
}
|
|
40066
40118
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40067
|
-
return _objectSpread$
|
|
40119
|
+
return _objectSpread$h({
|
|
40068
40120
|
x: x + getPercentValue(position.x, width),
|
|
40069
40121
|
y: y + getPercentValue(position.y, height),
|
|
40070
40122
|
textAnchor: 'end',
|
|
40071
40123
|
verticalAnchor: 'end'
|
|
40072
40124
|
}, sizeAttrs);
|
|
40073
40125
|
}
|
|
40074
|
-
return _objectSpread$
|
|
40126
|
+
return _objectSpread$h({
|
|
40075
40127
|
x: x + width / 2,
|
|
40076
40128
|
y: y + height / 2,
|
|
40077
40129
|
textAnchor: 'middle',
|
|
@@ -40081,7 +40133,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40081
40133
|
var isPolar = function isPolar(viewBox) {
|
|
40082
40134
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40083
40135
|
};
|
|
40084
|
-
function Label$3(
|
|
40136
|
+
function Label$3(_ref4) {
|
|
40137
|
+
var _ref4$offset = _ref4.offset,
|
|
40138
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40139
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40140
|
+
var props = _objectSpread$h({
|
|
40141
|
+
offset: offset
|
|
40142
|
+
}, restProps);
|
|
40085
40143
|
var viewBox = props.viewBox,
|
|
40086
40144
|
position = props.position,
|
|
40087
40145
|
value = props.value,
|
|
@@ -40118,9 +40176,6 @@ function Label$3(props) {
|
|
|
40118
40176
|
}), label);
|
|
40119
40177
|
}
|
|
40120
40178
|
Label$3.displayName = 'Label';
|
|
40121
|
-
Label$3.defaultProps = {
|
|
40122
|
-
offset: 5
|
|
40123
|
-
};
|
|
40124
40179
|
var parseViewBox = function parseViewBox(props) {
|
|
40125
40180
|
var cx = props.cx,
|
|
40126
40181
|
cy = props.cy,
|
|
@@ -40275,8 +40330,9 @@ function last(array) {
|
|
|
40275
40330
|
|
|
40276
40331
|
var last_1 = last;
|
|
40277
40332
|
|
|
40278
|
-
function _typeof$
|
|
40279
|
-
var _excluded$
|
|
40333
|
+
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); }
|
|
40334
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40335
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40280
40336
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40281
40337
|
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."); }
|
|
40282
40338
|
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); }
|
|
@@ -40284,26 +40340,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40284
40340
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40285
40341
|
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; }
|
|
40286
40342
|
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); }
|
|
40287
|
-
function ownKeys$
|
|
40288
|
-
function _objectSpread$
|
|
40289
|
-
function _defineProperty$
|
|
40290
|
-
function _toPropertyKey$
|
|
40291
|
-
function _toPrimitive$
|
|
40292
|
-
function _objectWithoutProperties$
|
|
40293
|
-
function _objectWithoutPropertiesLoose$
|
|
40294
|
-
var
|
|
40295
|
-
|
|
40296
|
-
|
|
40297
|
-
|
|
40298
|
-
|
|
40299
|
-
|
|
40300
|
-
|
|
40301
|
-
|
|
40302
|
-
dataKey =
|
|
40303
|
-
clockWise =
|
|
40304
|
-
id =
|
|
40305
|
-
textBreakAll =
|
|
40306
|
-
others = _objectWithoutProperties$
|
|
40343
|
+
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; }
|
|
40344
|
+
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; }
|
|
40345
|
+
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; }
|
|
40346
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40347
|
+
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); }
|
|
40348
|
+
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; }
|
|
40349
|
+
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; }
|
|
40350
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40351
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40352
|
+
};
|
|
40353
|
+
function LabelList(_ref) {
|
|
40354
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40355
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40356
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40357
|
+
var data = restProps.data,
|
|
40358
|
+
dataKey = restProps.dataKey,
|
|
40359
|
+
clockWise = restProps.clockWise,
|
|
40360
|
+
id = restProps.id,
|
|
40361
|
+
textBreakAll = restProps.textBreakAll,
|
|
40362
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40307
40363
|
if (!data || !data.length) {
|
|
40308
40364
|
return null;
|
|
40309
40365
|
}
|
|
@@ -40319,7 +40375,7 @@ function LabelList(props) {
|
|
|
40319
40375
|
index: index,
|
|
40320
40376
|
value: value,
|
|
40321
40377
|
textBreakAll: textBreakAll,
|
|
40322
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40378
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40323
40379
|
clockWise: clockWise
|
|
40324
40380
|
})),
|
|
40325
40381
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40374,9 +40430,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40374
40430
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40375
40431
|
}
|
|
40376
40432
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40377
|
-
LabelList.defaultProps = defaultProps;
|
|
40378
40433
|
|
|
40434
|
+
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); }
|
|
40379
40435
|
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); }
|
|
40436
|
+
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; }
|
|
40437
|
+
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; }
|
|
40438
|
+
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; }
|
|
40439
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40440
|
+
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); }
|
|
40380
40441
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40381
40442
|
var sign = mathSign(endAngle - startAngle);
|
|
40382
40443
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40517,7 +40578,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40517
40578
|
}
|
|
40518
40579
|
return path;
|
|
40519
40580
|
};
|
|
40520
|
-
var
|
|
40581
|
+
var defaultProps$1 = {
|
|
40582
|
+
cx: 0,
|
|
40583
|
+
cy: 0,
|
|
40584
|
+
innerRadius: 0,
|
|
40585
|
+
outerRadius: 0,
|
|
40586
|
+
startAngle: 0,
|
|
40587
|
+
endAngle: 0,
|
|
40588
|
+
cornerRadius: 0,
|
|
40589
|
+
forceCornerRadius: false,
|
|
40590
|
+
cornerIsExternal: false
|
|
40591
|
+
};
|
|
40592
|
+
var Sector = function Sector(sectorProps) {
|
|
40593
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40521
40594
|
var cx = props.cx,
|
|
40522
40595
|
cy = props.cy,
|
|
40523
40596
|
innerRadius = props.innerRadius,
|
|
@@ -40563,25 +40636,14 @@ var Sector = function Sector(props) {
|
|
|
40563
40636
|
role: "img"
|
|
40564
40637
|
}));
|
|
40565
40638
|
};
|
|
40566
|
-
Sector.defaultProps = {
|
|
40567
|
-
cx: 0,
|
|
40568
|
-
cy: 0,
|
|
40569
|
-
innerRadius: 0,
|
|
40570
|
-
outerRadius: 0,
|
|
40571
|
-
startAngle: 0,
|
|
40572
|
-
endAngle: 0,
|
|
40573
|
-
cornerRadius: 0,
|
|
40574
|
-
forceCornerRadius: false,
|
|
40575
|
-
cornerIsExternal: false
|
|
40576
|
-
};
|
|
40577
40639
|
|
|
40578
|
-
function _typeof$
|
|
40640
|
+
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); }
|
|
40579
40641
|
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); }
|
|
40580
|
-
function ownKeys$
|
|
40581
|
-
function _objectSpread$
|
|
40582
|
-
function _defineProperty$
|
|
40583
|
-
function _toPropertyKey$
|
|
40584
|
-
function _toPrimitive$
|
|
40642
|
+
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; }
|
|
40643
|
+
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; }
|
|
40644
|
+
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; }
|
|
40645
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40646
|
+
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); }
|
|
40585
40647
|
var CURVE_FACTORIES = {
|
|
40586
40648
|
curveBasisClosed: curveBasisClosed,
|
|
40587
40649
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40621,11 +40683,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40621
40683
|
* @return {String} path
|
|
40622
40684
|
*/
|
|
40623
40685
|
var getPath$1 = function getPath(_ref) {
|
|
40624
|
-
var type = _ref.type,
|
|
40625
|
-
|
|
40686
|
+
var _ref$type = _ref.type,
|
|
40687
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40688
|
+
_ref$points = _ref.points,
|
|
40689
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40626
40690
|
baseLine = _ref.baseLine,
|
|
40627
40691
|
layout = _ref.layout,
|
|
40628
|
-
connectNulls = _ref.connectNulls
|
|
40692
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40693
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40629
40694
|
var curveFactory = getCurveFactory(type, layout);
|
|
40630
40695
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40631
40696
|
return defined(entry);
|
|
@@ -40636,7 +40701,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40636
40701
|
return defined(base);
|
|
40637
40702
|
}) : baseLine;
|
|
40638
40703
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40639
|
-
return _objectSpread$
|
|
40704
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40640
40705
|
base: formatBaseLine[index]
|
|
40641
40706
|
});
|
|
40642
40707
|
});
|
|
@@ -40677,12 +40742,8 @@ var Curve = function Curve(props) {
|
|
|
40677
40742
|
ref: pathRef
|
|
40678
40743
|
}));
|
|
40679
40744
|
};
|
|
40680
|
-
Curve.defaultProps = {
|
|
40681
|
-
type: 'linear',
|
|
40682
|
-
points: [],
|
|
40683
|
-
connectNulls: false
|
|
40684
|
-
};
|
|
40685
40745
|
|
|
40746
|
+
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); }
|
|
40686
40747
|
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); }
|
|
40687
40748
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40688
40749
|
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."); }
|
|
@@ -40690,6 +40751,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40690
40751
|
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; }
|
|
40691
40752
|
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; } }
|
|
40692
40753
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40754
|
+
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; }
|
|
40755
|
+
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; }
|
|
40756
|
+
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; }
|
|
40757
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40758
|
+
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); }
|
|
40693
40759
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40694
40760
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40695
40761
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40745,13 +40811,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40745
40811
|
}
|
|
40746
40812
|
return false;
|
|
40747
40813
|
};
|
|
40748
|
-
var
|
|
40814
|
+
var defaultProps = {
|
|
40815
|
+
x: 0,
|
|
40816
|
+
y: 0,
|
|
40817
|
+
width: 0,
|
|
40818
|
+
height: 0,
|
|
40819
|
+
// The radius of border
|
|
40820
|
+
// The radius of four corners when radius is a number
|
|
40821
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40822
|
+
radius: 0,
|
|
40823
|
+
isAnimationActive: false,
|
|
40824
|
+
isUpdateAnimationActive: false,
|
|
40825
|
+
animationBegin: 0,
|
|
40826
|
+
animationDuration: 1500,
|
|
40827
|
+
animationEasing: 'ease'
|
|
40828
|
+
};
|
|
40829
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40830
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40749
40831
|
var pathRef = useRef();
|
|
40750
40832
|
var _useState = useState(-1),
|
|
40751
40833
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40752
40834
|
totalLength = _useState2[0],
|
|
40753
40835
|
setTotalLength = _useState2[1];
|
|
40754
|
-
|
|
40836
|
+
useEffect(function () {
|
|
40755
40837
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40756
40838
|
try {
|
|
40757
40839
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40822,21 +40904,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40822
40904
|
})));
|
|
40823
40905
|
});
|
|
40824
40906
|
};
|
|
40825
|
-
Rectangle.defaultProps = {
|
|
40826
|
-
x: 0,
|
|
40827
|
-
y: 0,
|
|
40828
|
-
width: 0,
|
|
40829
|
-
height: 0,
|
|
40830
|
-
// The radius of border
|
|
40831
|
-
// The radius of four corners when radius is a number
|
|
40832
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40833
|
-
radius: 0,
|
|
40834
|
-
isAnimationActive: false,
|
|
40835
|
-
isUpdateAnimationActive: false,
|
|
40836
|
-
animationBegin: 0,
|
|
40837
|
-
animationDuration: 1500,
|
|
40838
|
-
animationEasing: 'ease'
|
|
40839
|
-
};
|
|
40840
40907
|
|
|
40841
40908
|
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); }
|
|
40842
40909
|
var Dot$1 = function Dot(props) {
|
|
@@ -40856,18 +40923,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40856
40923
|
return null;
|
|
40857
40924
|
};
|
|
40858
40925
|
|
|
40926
|
+
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); }
|
|
40927
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40859
40928
|
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); }
|
|
40929
|
+
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; }
|
|
40930
|
+
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; }
|
|
40931
|
+
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; }
|
|
40932
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40933
|
+
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); }
|
|
40934
|
+
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; }
|
|
40935
|
+
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; }
|
|
40860
40936
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40861
40937
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40862
40938
|
};
|
|
40863
|
-
var Cross = function Cross(
|
|
40864
|
-
var x =
|
|
40865
|
-
|
|
40866
|
-
|
|
40867
|
-
|
|
40868
|
-
top =
|
|
40869
|
-
|
|
40870
|
-
|
|
40939
|
+
var Cross = function Cross(_ref) {
|
|
40940
|
+
var _ref$x = _ref.x,
|
|
40941
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40942
|
+
_ref$y = _ref.y,
|
|
40943
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40944
|
+
_ref$top = _ref.top,
|
|
40945
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40946
|
+
_ref$left = _ref.left,
|
|
40947
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40948
|
+
_ref$width = _ref.width,
|
|
40949
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40950
|
+
_ref$height = _ref.height,
|
|
40951
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40952
|
+
className = _ref.className,
|
|
40953
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40954
|
+
var props = _objectSpread$c({
|
|
40955
|
+
x: x,
|
|
40956
|
+
y: y,
|
|
40957
|
+
top: top,
|
|
40958
|
+
left: left,
|
|
40959
|
+
width: width,
|
|
40960
|
+
height: height
|
|
40961
|
+
}, rest);
|
|
40871
40962
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40872
40963
|
return null;
|
|
40873
40964
|
}
|
|
@@ -40876,14 +40967,6 @@ var Cross = function Cross(props) {
|
|
|
40876
40967
|
d: getPath(x, y, width, height, top, left)
|
|
40877
40968
|
}));
|
|
40878
40969
|
};
|
|
40879
|
-
Cross.defaultProps = {
|
|
40880
|
-
x: 0,
|
|
40881
|
-
y: 0,
|
|
40882
|
-
top: 0,
|
|
40883
|
-
left: 0,
|
|
40884
|
-
width: 0,
|
|
40885
|
-
height: 0
|
|
40886
|
-
};
|
|
40887
40970
|
|
|
40888
40971
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40889
40972
|
|
|
@@ -41093,6 +41176,7 @@ var createScale = function createScale(_ref) {
|
|
|
41093
41176
|
isTextActive: false,
|
|
41094
41177
|
isSlideMoving: false,
|
|
41095
41178
|
isTravellerMoving: false,
|
|
41179
|
+
isTravellerFocused: false,
|
|
41096
41180
|
startX: scale(startIndex),
|
|
41097
41181
|
endX: scale(endIndex),
|
|
41098
41182
|
scale: scale,
|
|
@@ -41306,6 +41390,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41306
41390
|
}
|
|
41307
41391
|
});
|
|
41308
41392
|
}
|
|
41393
|
+
}, {
|
|
41394
|
+
key: "handleTravellerMoveKeyboard",
|
|
41395
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41396
|
+
var _this2 = this;
|
|
41397
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41398
|
+
var _this$state3 = this.state,
|
|
41399
|
+
scaleValues = _this$state3.scaleValues,
|
|
41400
|
+
startX = _this$state3.startX,
|
|
41401
|
+
endX = _this$state3.endX;
|
|
41402
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41403
|
+
var currentScaleValue = this.state[id];
|
|
41404
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41405
|
+
if (currentIndex === -1) {
|
|
41406
|
+
return;
|
|
41407
|
+
}
|
|
41408
|
+
var newIndex = currentIndex + direction;
|
|
41409
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41410
|
+
return;
|
|
41411
|
+
}
|
|
41412
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41413
|
+
|
|
41414
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41415
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41416
|
+
return;
|
|
41417
|
+
}
|
|
41418
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41419
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41420
|
+
startX: _this2.state.startX,
|
|
41421
|
+
endX: _this2.state.endX
|
|
41422
|
+
}));
|
|
41423
|
+
});
|
|
41424
|
+
}
|
|
41309
41425
|
}, {
|
|
41310
41426
|
key: "renderBackground",
|
|
41311
41427
|
value: function renderBackground() {
|
|
@@ -41353,6 +41469,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41353
41469
|
}, {
|
|
41354
41470
|
key: "renderTravellerLayer",
|
|
41355
41471
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41472
|
+
var _this3 = this;
|
|
41356
41473
|
var _this$props7 = this.props,
|
|
41357
41474
|
y = _this$props7.y,
|
|
41358
41475
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41366,11 +41483,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41366
41483
|
height: height
|
|
41367
41484
|
});
|
|
41368
41485
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41486
|
+
tabIndex: 0,
|
|
41487
|
+
role: "slider",
|
|
41369
41488
|
className: "recharts-brush-traveller",
|
|
41370
41489
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41371
41490
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41372
41491
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41373
41492
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41493
|
+
onKeyDown: function onKeyDown(e) {
|
|
41494
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41495
|
+
return;
|
|
41496
|
+
}
|
|
41497
|
+
e.preventDefault();
|
|
41498
|
+
e.stopPropagation();
|
|
41499
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41500
|
+
},
|
|
41501
|
+
onFocus: function onFocus() {
|
|
41502
|
+
_this3.setState({
|
|
41503
|
+
isTravellerFocused: true
|
|
41504
|
+
});
|
|
41505
|
+
},
|
|
41506
|
+
onBlur: function onBlur() {
|
|
41507
|
+
_this3.setState({
|
|
41508
|
+
isTravellerFocused: false
|
|
41509
|
+
});
|
|
41510
|
+
},
|
|
41374
41511
|
style: {
|
|
41375
41512
|
cursor: 'col-resize'
|
|
41376
41513
|
}
|
|
@@ -41414,9 +41551,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41414
41551
|
height = _this$props9.height,
|
|
41415
41552
|
travellerWidth = _this$props9.travellerWidth,
|
|
41416
41553
|
stroke = _this$props9.stroke;
|
|
41417
|
-
var _this$
|
|
41418
|
-
startX = _this$
|
|
41419
|
-
endX = _this$
|
|
41554
|
+
var _this$state4 = this.state,
|
|
41555
|
+
startX = _this$state4.startX,
|
|
41556
|
+
endX = _this$state4.endX;
|
|
41420
41557
|
var offset = 5;
|
|
41421
41558
|
var attrs = {
|
|
41422
41559
|
pointerEvents: 'none',
|
|
@@ -41448,12 +41585,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41448
41585
|
width = _this$props10.width,
|
|
41449
41586
|
height = _this$props10.height,
|
|
41450
41587
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41451
|
-
var _this$
|
|
41452
|
-
startX = _this$
|
|
41453
|
-
endX = _this$
|
|
41454
|
-
isTextActive = _this$
|
|
41455
|
-
isSlideMoving = _this$
|
|
41456
|
-
isTravellerMoving = _this$
|
|
41588
|
+
var _this$state5 = this.state,
|
|
41589
|
+
startX = _this$state5.startX,
|
|
41590
|
+
endX = _this$state5.endX,
|
|
41591
|
+
isTextActive = _this$state5.isTextActive,
|
|
41592
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41593
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41594
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41457
41595
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41458
41596
|
return null;
|
|
41459
41597
|
}
|
|
@@ -41465,7 +41603,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41465
41603
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41466
41604
|
onTouchMove: this.handleTouchMove,
|
|
41467
41605
|
style: style
|
|
41468
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41606
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41469
41607
|
}
|
|
41470
41608
|
}], [{
|
|
41471
41609
|
key: "renderDefaultTraveller",
|
|
@@ -41783,7 +41921,7 @@ function every(collection, predicate, guard) {
|
|
|
41783
41921
|
|
|
41784
41922
|
var every_1 = every;
|
|
41785
41923
|
|
|
41786
|
-
var defineProperty = _defineProperty$
|
|
41924
|
+
var defineProperty = _defineProperty$o;
|
|
41787
41925
|
|
|
41788
41926
|
/**
|
|
41789
41927
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42144,7 +42282,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42144
42282
|
legendType: 'rect',
|
|
42145
42283
|
minPointSize: 0,
|
|
42146
42284
|
hide: false,
|
|
42147
|
-
// data of bar
|
|
42148
42285
|
data: [],
|
|
42149
42286
|
layout: 'vertical',
|
|
42150
42287
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45057,10 +45194,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45057
45194
|
}
|
|
45058
45195
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45059
45196
|
x = _this$container$getBo.x,
|
|
45060
|
-
y = _this$container$getBo.y
|
|
45197
|
+
y = _this$container$getBo.y,
|
|
45198
|
+
height = _this$container$getBo.height;
|
|
45061
45199
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45062
45200
|
var pageX = x + coordinate;
|
|
45063
|
-
var pageY = y + this.offset.top;
|
|
45201
|
+
var pageY = y + this.offset.top + height / 2;
|
|
45064
45202
|
this.mouseHandlerCallback({
|
|
45065
45203
|
pageX: pageX,
|
|
45066
45204
|
pageY: pageY
|
|
@@ -48400,6 +48538,9 @@ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4
|
|
|
48400
48538
|
var Table = function (_a) {
|
|
48401
48539
|
var columns = _a.columns, data = _a.data, emptyText = _a.emptyText, rowSelection = _a.rowSelection;
|
|
48402
48540
|
var _b = useState([]), selectedRowKeys = _b[0], setSelectedRowKeys = _b[1];
|
|
48541
|
+
useEffect(function () {
|
|
48542
|
+
setSelectedRowKeys([]);
|
|
48543
|
+
}, [data]);
|
|
48403
48544
|
var onSelectRow = function (selectedKey) {
|
|
48404
48545
|
var index = selectedRowKeys.indexOf(selectedKey);
|
|
48405
48546
|
var newSelectedRowKeys = __spreadArray([], selectedRowKeys, true);
|
|
@@ -48440,7 +48581,7 @@ var Table = function (_a) {
|
|
|
48440
48581
|
display: "flex",
|
|
48441
48582
|
justifyContent: "center",
|
|
48442
48583
|
marginTop: 10,
|
|
48443
|
-
} }, { children: jsx$1(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48584
|
+
} }, { children: jsx$1(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length === data.length, onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48444
48585
|
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48445
48586
|
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)));
|
|
48446
48587
|
})] }) }), 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) { return (jsxs(TableRow, { children: [rowSelection && (jsx$1(TableCell, { children: jsx$1(Checkbox, { id: rowIndex.toString(), name: rowIndex.toString(), value: row.key, checked: selectedRowKeys.includes(row.key), onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|