@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.js
CHANGED
|
@@ -3593,7 +3593,9 @@ var icons = {
|
|
|
3593
3593
|
user: (jsxRuntime.jsx("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" })),
|
|
3594
3594
|
search: (jsxRuntime.jsx("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" })),
|
|
3595
3595
|
infoCircle: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("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" }), jsxRuntime.jsx("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" })] })),
|
|
3596
|
-
|
|
3596
|
+
swap: (jsxRuntime.jsx("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" })),
|
|
3597
|
+
login: (jsxRuntime.jsxs("g", __assign$2({ style: { transform: "rotate(270deg)", transformOrigin: "50%" } }, { children: [jsxRuntime.jsx("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" }), jsxRuntime.jsx("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" })] }))),
|
|
3598
|
+
logout: (jsxRuntime.jsxs("g", __assign$2({ style: { transform: "rotate(90deg)", transformOrigin: "50%" } }, { children: [jsxRuntime.jsx("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" }), jsxRuntime.jsx("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" })] }))),
|
|
3597
3599
|
};
|
|
3598
3600
|
var Icon = function (props) { return (jsxRuntime.jsx(Wrapper$a, __assign$2({}, props, { children: jsxRuntime.jsx("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
|
|
3599
3601
|
|
|
@@ -4576,7 +4578,7 @@ function requiredArgs(required, args) {
|
|
|
4576
4578
|
}
|
|
4577
4579
|
}
|
|
4578
4580
|
|
|
4579
|
-
function _typeof$
|
|
4581
|
+
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); }
|
|
4580
4582
|
/**
|
|
4581
4583
|
* @name toDate
|
|
4582
4584
|
* @category Common Helpers
|
|
@@ -4612,7 +4614,7 @@ function toDate(argument) {
|
|
|
4612
4614
|
requiredArgs(1, arguments);
|
|
4613
4615
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4614
4616
|
|
|
4615
|
-
if (argument instanceof Date || _typeof$
|
|
4617
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4616
4618
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4617
4619
|
return new Date(argument.getTime());
|
|
4618
4620
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4883,7 +4885,7 @@ var millisecondsInMinute = 60000;
|
|
|
4883
4885
|
|
|
4884
4886
|
var millisecondsInHour = 3600000;
|
|
4885
4887
|
|
|
4886
|
-
function _typeof$
|
|
4888
|
+
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); }
|
|
4887
4889
|
/**
|
|
4888
4890
|
* @name isDate
|
|
4889
4891
|
* @category Common Helpers
|
|
@@ -4919,7 +4921,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4919
4921
|
|
|
4920
4922
|
function isDate(value) {
|
|
4921
4923
|
requiredArgs(1, arguments);
|
|
4922
|
-
return value instanceof Date || _typeof$
|
|
4924
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4923
4925
|
}
|
|
4924
4926
|
|
|
4925
4927
|
/**
|
|
@@ -13695,15 +13697,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13695
13697
|
|
|
13696
13698
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13697
13699
|
|
|
13698
|
-
function _slicedToArray$
|
|
13699
|
-
return _arrayWithHoles$
|
|
13700
|
+
function _slicedToArray$c(arr, i) {
|
|
13701
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13700
13702
|
}
|
|
13701
13703
|
|
|
13702
|
-
function _arrayWithHoles$
|
|
13704
|
+
function _arrayWithHoles$d(arr) {
|
|
13703
13705
|
if (Array.isArray(arr)) return arr;
|
|
13704
13706
|
}
|
|
13705
13707
|
|
|
13706
|
-
function _iterableToArrayLimit$
|
|
13708
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13707
13709
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13708
13710
|
|
|
13709
13711
|
if (_i == null) return;
|
|
@@ -13733,16 +13735,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13733
13735
|
return _arr;
|
|
13734
13736
|
}
|
|
13735
13737
|
|
|
13736
|
-
function _unsupportedIterableToArray$
|
|
13738
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13737
13739
|
if (!o) return;
|
|
13738
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13740
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13739
13741
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13740
13742
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13741
13743
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13742
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13744
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13743
13745
|
}
|
|
13744
13746
|
|
|
13745
|
-
function _arrayLikeToArray$
|
|
13747
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13746
13748
|
if (len == null || len > arr.length) len = arr.length;
|
|
13747
13749
|
|
|
13748
13750
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13750,7 +13752,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13750
13752
|
return arr2;
|
|
13751
13753
|
}
|
|
13752
13754
|
|
|
13753
|
-
function _nonIterableRest$
|
|
13755
|
+
function _nonIterableRest$d() {
|
|
13754
13756
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13755
13757
|
}
|
|
13756
13758
|
|
|
@@ -13814,7 +13816,7 @@ reservedProps.forEach(function (name) {
|
|
|
13814
13816
|
// This is a mapping from React prop names to the attribute names.
|
|
13815
13817
|
|
|
13816
13818
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13817
|
-
var _ref2 = _slicedToArray$
|
|
13819
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13818
13820
|
name = _ref2[0],
|
|
13819
13821
|
attributeName = _ref2[1];
|
|
13820
13822
|
|
|
@@ -16233,31 +16235,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16233
16235
|
return true;
|
|
16234
16236
|
};
|
|
16235
16237
|
|
|
16236
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16238
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16237
16239
|
|
|
16238
16240
|
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."); }
|
|
16239
16241
|
|
|
16240
16242
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16241
16243
|
|
|
16242
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16244
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16243
16245
|
|
|
16244
|
-
function ownKeys$
|
|
16246
|
+
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; }
|
|
16245
16247
|
|
|
16246
|
-
function _objectSpread$
|
|
16248
|
+
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; }
|
|
16247
16249
|
|
|
16248
|
-
function _defineProperty$
|
|
16250
|
+
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; }
|
|
16249
16251
|
|
|
16250
|
-
function _slicedToArray$
|
|
16252
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16251
16253
|
|
|
16252
|
-
function _nonIterableRest$
|
|
16254
|
+
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."); }
|
|
16253
16255
|
|
|
16254
|
-
function _unsupportedIterableToArray$
|
|
16256
|
+
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); }
|
|
16255
16257
|
|
|
16256
|
-
function _arrayLikeToArray$
|
|
16258
|
+
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; }
|
|
16257
16259
|
|
|
16258
|
-
function _iterableToArrayLimit$
|
|
16260
|
+
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; }
|
|
16259
16261
|
|
|
16260
|
-
function _arrayWithHoles$
|
|
16262
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16261
16263
|
|
|
16262
16264
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16263
16265
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16337,11 +16339,11 @@ function allFilesAccepted(_ref) {
|
|
|
16337
16339
|
|
|
16338
16340
|
return files.every(function (file) {
|
|
16339
16341
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16340
|
-
_fileAccepted2 = _slicedToArray$
|
|
16342
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16341
16343
|
accepted = _fileAccepted2[0];
|
|
16342
16344
|
|
|
16343
16345
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16344
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16346
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16345
16347
|
sizeMatch = _fileMatchSize2[0];
|
|
16346
16348
|
|
|
16347
16349
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16438,7 +16440,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16438
16440
|
function pickerOptionsFromAccept(accept) {
|
|
16439
16441
|
if (isDefined(accept)) {
|
|
16440
16442
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16441
|
-
var _ref3 = _slicedToArray$
|
|
16443
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16442
16444
|
mimeType = _ref3[0],
|
|
16443
16445
|
ext = _ref3[1];
|
|
16444
16446
|
|
|
@@ -16456,11 +16458,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16456
16458
|
|
|
16457
16459
|
return ok;
|
|
16458
16460
|
}).reduce(function (agg, _ref4) {
|
|
16459
|
-
var _ref5 = _slicedToArray$
|
|
16461
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16460
16462
|
mimeType = _ref5[0],
|
|
16461
16463
|
ext = _ref5[1];
|
|
16462
16464
|
|
|
16463
|
-
return _objectSpread$
|
|
16465
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16464
16466
|
}, {});
|
|
16465
16467
|
return [{
|
|
16466
16468
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16480,7 +16482,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16480
16482
|
function acceptPropAsAcceptAttr(accept) {
|
|
16481
16483
|
if (isDefined(accept)) {
|
|
16482
16484
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16483
|
-
var _ref7 = _slicedToArray$
|
|
16485
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16484
16486
|
mimeType = _ref7[0],
|
|
16485
16487
|
ext = _ref7[1];
|
|
16486
16488
|
|
|
@@ -16548,40 +16550,40 @@ function isExt(v) {
|
|
|
16548
16550
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16549
16551
|
*/
|
|
16550
16552
|
|
|
16551
|
-
var _excluded$
|
|
16552
|
-
_excluded2$
|
|
16553
|
+
var _excluded$g = ["children"],
|
|
16554
|
+
_excluded2$5 = ["open"],
|
|
16553
16555
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16554
16556
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16555
16557
|
|
|
16556
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16558
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16557
16559
|
|
|
16558
16560
|
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."); }
|
|
16559
16561
|
|
|
16560
16562
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16561
16563
|
|
|
16562
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16564
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16563
16565
|
|
|
16564
|
-
function _slicedToArray$
|
|
16566
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16565
16567
|
|
|
16566
|
-
function _nonIterableRest$
|
|
16568
|
+
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."); }
|
|
16567
16569
|
|
|
16568
|
-
function _unsupportedIterableToArray$
|
|
16570
|
+
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); }
|
|
16569
16571
|
|
|
16570
|
-
function _arrayLikeToArray$
|
|
16572
|
+
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; }
|
|
16571
16573
|
|
|
16572
|
-
function _iterableToArrayLimit$
|
|
16574
|
+
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; }
|
|
16573
16575
|
|
|
16574
|
-
function _arrayWithHoles$
|
|
16576
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16575
16577
|
|
|
16576
|
-
function ownKeys$
|
|
16578
|
+
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; }
|
|
16577
16579
|
|
|
16578
|
-
function _objectSpread$
|
|
16580
|
+
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; }
|
|
16579
16581
|
|
|
16580
|
-
function _defineProperty$
|
|
16582
|
+
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; }
|
|
16581
16583
|
|
|
16582
|
-
function _objectWithoutProperties$
|
|
16584
|
+
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; }
|
|
16583
16585
|
|
|
16584
|
-
function _objectWithoutPropertiesLoose$
|
|
16586
|
+
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; }
|
|
16585
16587
|
/**
|
|
16586
16588
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16587
16589
|
*
|
|
@@ -16599,11 +16601,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16599
16601
|
|
|
16600
16602
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16601
16603
|
var children = _ref.children,
|
|
16602
|
-
params = _objectWithoutProperties$
|
|
16604
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16603
16605
|
|
|
16604
16606
|
var _useDropzone = useDropzone(params),
|
|
16605
16607
|
open = _useDropzone.open,
|
|
16606
|
-
props = _objectWithoutProperties$
|
|
16608
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16607
16609
|
|
|
16608
16610
|
React$3.useImperativeHandle(ref, function () {
|
|
16609
16611
|
return {
|
|
@@ -16611,13 +16613,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16611
16613
|
};
|
|
16612
16614
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16613
16615
|
|
|
16614
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16616
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16615
16617
|
open: open
|
|
16616
16618
|
})));
|
|
16617
16619
|
});
|
|
16618
16620
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16619
16621
|
|
|
16620
|
-
var defaultProps$
|
|
16622
|
+
var defaultProps$2 = {
|
|
16621
16623
|
disabled: false,
|
|
16622
16624
|
getFilesFromEvent: fromEvent,
|
|
16623
16625
|
maxSize: Infinity,
|
|
@@ -16633,7 +16635,7 @@ var defaultProps$1 = {
|
|
|
16633
16635
|
useFsAccessApi: true,
|
|
16634
16636
|
autoFocus: false
|
|
16635
16637
|
};
|
|
16636
|
-
Dropzone.defaultProps = defaultProps$
|
|
16638
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16637
16639
|
Dropzone.propTypes = {
|
|
16638
16640
|
/**
|
|
16639
16641
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16984,7 +16986,7 @@ var initialState = {
|
|
|
16984
16986
|
function useDropzone() {
|
|
16985
16987
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16986
16988
|
|
|
16987
|
-
var _defaultProps$props = _objectSpread$
|
|
16989
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16988
16990
|
accept = _defaultProps$props.accept,
|
|
16989
16991
|
disabled = _defaultProps$props.disabled,
|
|
16990
16992
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17031,7 +17033,7 @@ function useDropzone() {
|
|
|
17031
17033
|
var inputRef = React$3.useRef(null);
|
|
17032
17034
|
|
|
17033
17035
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
17034
|
-
_useReducer2 = _slicedToArray$
|
|
17036
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
17035
17037
|
state = _useReducer2[0],
|
|
17036
17038
|
dispatch = _useReducer2[1];
|
|
17037
17039
|
|
|
@@ -17201,12 +17203,12 @@ function useDropzone() {
|
|
|
17201
17203
|
var fileRejections = [];
|
|
17202
17204
|
files.forEach(function (file) {
|
|
17203
17205
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17204
|
-
_fileAccepted2 = _slicedToArray$
|
|
17206
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17205
17207
|
accepted = _fileAccepted2[0],
|
|
17206
17208
|
acceptError = _fileAccepted2[1];
|
|
17207
17209
|
|
|
17208
17210
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17209
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17211
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17210
17212
|
sizeMatch = _fileMatchSize2[0],
|
|
17211
17213
|
sizeError = _fileMatchSize2[1];
|
|
17212
17214
|
|
|
@@ -17407,9 +17409,9 @@ function useDropzone() {
|
|
|
17407
17409
|
onDragOver = _ref2.onDragOver,
|
|
17408
17410
|
onDragLeave = _ref2.onDragLeave,
|
|
17409
17411
|
onDrop = _ref2.onDrop,
|
|
17410
|
-
rest = _objectWithoutProperties$
|
|
17412
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17411
17413
|
|
|
17412
|
-
return _objectSpread$
|
|
17414
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17413
17415
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17414
17416
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17415
17417
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17434,9 +17436,9 @@ function useDropzone() {
|
|
|
17434
17436
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17435
17437
|
onChange = _ref3.onChange,
|
|
17436
17438
|
onClick = _ref3.onClick,
|
|
17437
|
-
rest = _objectWithoutProperties$
|
|
17439
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17438
17440
|
|
|
17439
|
-
var inputProps = _defineProperty$
|
|
17441
|
+
var inputProps = _defineProperty$v({
|
|
17440
17442
|
accept: acceptAttr,
|
|
17441
17443
|
multiple: multiple,
|
|
17442
17444
|
type: "file",
|
|
@@ -17448,10 +17450,10 @@ function useDropzone() {
|
|
|
17448
17450
|
tabIndex: -1
|
|
17449
17451
|
}, refKey, inputRef);
|
|
17450
17452
|
|
|
17451
|
-
return _objectSpread$
|
|
17453
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17452
17454
|
};
|
|
17453
17455
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17454
|
-
return _objectSpread$
|
|
17456
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17455
17457
|
isFocused: isFocused && !disabled,
|
|
17456
17458
|
getRootProps: getRootProps,
|
|
17457
17459
|
getInputProps: getInputProps,
|
|
@@ -17470,40 +17472,40 @@ function reducer$1(state, action) {
|
|
|
17470
17472
|
/* istanbul ignore next */
|
|
17471
17473
|
switch (action.type) {
|
|
17472
17474
|
case "focus":
|
|
17473
|
-
return _objectSpread$
|
|
17475
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17474
17476
|
isFocused: true
|
|
17475
17477
|
});
|
|
17476
17478
|
|
|
17477
17479
|
case "blur":
|
|
17478
|
-
return _objectSpread$
|
|
17480
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17479
17481
|
isFocused: false
|
|
17480
17482
|
});
|
|
17481
17483
|
|
|
17482
17484
|
case "openDialog":
|
|
17483
|
-
return _objectSpread$
|
|
17485
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17484
17486
|
isFileDialogActive: true
|
|
17485
17487
|
});
|
|
17486
17488
|
|
|
17487
17489
|
case "closeDialog":
|
|
17488
|
-
return _objectSpread$
|
|
17490
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17489
17491
|
isFileDialogActive: false
|
|
17490
17492
|
});
|
|
17491
17493
|
|
|
17492
17494
|
case "setDraggedFiles":
|
|
17493
|
-
return _objectSpread$
|
|
17495
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17494
17496
|
isDragActive: action.isDragActive,
|
|
17495
17497
|
isDragAccept: action.isDragAccept,
|
|
17496
17498
|
isDragReject: action.isDragReject
|
|
17497
17499
|
});
|
|
17498
17500
|
|
|
17499
17501
|
case "setFiles":
|
|
17500
|
-
return _objectSpread$
|
|
17502
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17501
17503
|
acceptedFiles: action.acceptedFiles,
|
|
17502
17504
|
fileRejections: action.fileRejections
|
|
17503
17505
|
});
|
|
17504
17506
|
|
|
17505
17507
|
case "reset":
|
|
17506
|
-
return _objectSpread$
|
|
17508
|
+
return _objectSpread$t({}, initialState);
|
|
17507
17509
|
|
|
17508
17510
|
default:
|
|
17509
17511
|
return state;
|
|
@@ -19731,7 +19733,7 @@ function shallowEqual(a, b) {
|
|
|
19731
19733
|
return true;
|
|
19732
19734
|
}
|
|
19733
19735
|
|
|
19734
|
-
function _typeof$
|
|
19736
|
+
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); }
|
|
19735
19737
|
|
|
19736
19738
|
//
|
|
19737
19739
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19758,7 +19760,9 @@ var FilteredElementKeyMap = {
|
|
|
19758
19760
|
};
|
|
19759
19761
|
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'];
|
|
19760
19762
|
|
|
19761
|
-
|
|
19763
|
+
/** The type of easing function to use for animations */
|
|
19764
|
+
|
|
19765
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19762
19766
|
|
|
19763
19767
|
/** the offset of a chart, which define the blank space all around */
|
|
19764
19768
|
|
|
@@ -19794,7 +19798,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19794
19798
|
};
|
|
19795
19799
|
};
|
|
19796
19800
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19797
|
-
if (!isObject_1(props) || _typeof$
|
|
19801
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19798
19802
|
return null;
|
|
19799
19803
|
}
|
|
19800
19804
|
var out = null;
|
|
@@ -19808,11 +19812,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19808
19812
|
return out;
|
|
19809
19813
|
};
|
|
19810
19814
|
|
|
19811
|
-
var _excluded$
|
|
19812
|
-
_excluded2$
|
|
19813
|
-
function _objectWithoutProperties$
|
|
19814
|
-
function _objectWithoutPropertiesLoose$
|
|
19815
|
-
function _typeof$
|
|
19815
|
+
var _excluded$f = ["children"],
|
|
19816
|
+
_excluded2$4 = ["children"];
|
|
19817
|
+
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; }
|
|
19818
|
+
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; }
|
|
19819
|
+
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); }
|
|
19816
19820
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19817
19821
|
click: 'onClick',
|
|
19818
19822
|
mousedown: 'onMouseDown',
|
|
@@ -19919,7 +19923,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19919
19923
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19920
19924
|
};
|
|
19921
19925
|
var isDotProps = function isDotProps(dot) {
|
|
19922
|
-
return dot && _typeof$
|
|
19926
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19923
19927
|
};
|
|
19924
19928
|
|
|
19925
19929
|
/**
|
|
@@ -20011,10 +20015,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
20011
20015
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
20012
20016
|
var _ref = nextChild.props || {},
|
|
20013
20017
|
nextChildren = _ref.children,
|
|
20014
|
-
nextProps = _objectWithoutProperties$
|
|
20018
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
20015
20019
|
var _ref2 = prevChild.props || {},
|
|
20016
20020
|
prevChildren = _ref2.children,
|
|
20017
|
-
prevProps = _objectWithoutProperties$
|
|
20021
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
20018
20022
|
if (nextChildren && prevChildren) {
|
|
20019
20023
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
20020
20024
|
}
|
|
@@ -20056,10 +20060,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20056
20060
|
return toArray(children).indexOf(child);
|
|
20057
20061
|
};
|
|
20058
20062
|
|
|
20059
|
-
var _excluded$
|
|
20063
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20060
20064
|
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); }
|
|
20061
|
-
function _objectWithoutProperties$
|
|
20062
|
-
function _objectWithoutPropertiesLoose$
|
|
20065
|
+
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; }
|
|
20066
|
+
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; }
|
|
20063
20067
|
function Surface(props) {
|
|
20064
20068
|
var children = props.children,
|
|
20065
20069
|
width = props.width,
|
|
@@ -20067,7 +20071,7 @@ function Surface(props) {
|
|
|
20067
20071
|
viewBox = props.viewBox,
|
|
20068
20072
|
className = props.className,
|
|
20069
20073
|
style = props.style,
|
|
20070
|
-
others = _objectWithoutProperties$
|
|
20074
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
20071
20075
|
var svgView = viewBox || {
|
|
20072
20076
|
width: width,
|
|
20073
20077
|
height: height,
|
|
@@ -20084,14 +20088,14 @@ function Surface(props) {
|
|
|
20084
20088
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
20085
20089
|
}
|
|
20086
20090
|
|
|
20087
|
-
var _excluded$
|
|
20091
|
+
var _excluded$d = ["children", "className"];
|
|
20088
20092
|
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); }
|
|
20089
|
-
function _objectWithoutProperties$
|
|
20090
|
-
function _objectWithoutPropertiesLoose$
|
|
20093
|
+
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; }
|
|
20094
|
+
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; }
|
|
20091
20095
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
20092
20096
|
var children = props.children,
|
|
20093
20097
|
className = props.className,
|
|
20094
|
-
others = _objectWithoutProperties$
|
|
20098
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
20095
20099
|
var layerClass = classNames('recharts-layer', className);
|
|
20096
20100
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
20097
20101
|
className: layerClass
|
|
@@ -23506,7 +23510,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23506
23510
|
stackOffsetNone(series, order);
|
|
23507
23511
|
}
|
|
23508
23512
|
|
|
23513
|
+
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); }
|
|
23514
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23509
23515
|
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); }
|
|
23516
|
+
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; }
|
|
23517
|
+
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; }
|
|
23518
|
+
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; }
|
|
23519
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23520
|
+
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); }
|
|
23521
|
+
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; }
|
|
23522
|
+
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; }
|
|
23510
23523
|
var symbolFactories = {
|
|
23511
23524
|
symbolCircle: symbolCircle,
|
|
23512
23525
|
symbolCross: symbolCross,
|
|
@@ -23545,31 +23558,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23545
23558
|
return Math.PI * size * size / 4;
|
|
23546
23559
|
}
|
|
23547
23560
|
};
|
|
23548
|
-
var symbolsDefaultProps = {
|
|
23549
|
-
type: 'circle',
|
|
23550
|
-
size: 64,
|
|
23551
|
-
sizeType: 'area'
|
|
23552
|
-
};
|
|
23553
23561
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23554
23562
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23555
23563
|
};
|
|
23556
|
-
var Symbols = function Symbols(
|
|
23564
|
+
var Symbols = function Symbols(_ref) {
|
|
23565
|
+
var _ref$type = _ref.type,
|
|
23566
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23567
|
+
_ref$size = _ref.size,
|
|
23568
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23569
|
+
_ref$sizeType = _ref.sizeType,
|
|
23570
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23571
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23572
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23573
|
+
type: type,
|
|
23574
|
+
size: size,
|
|
23575
|
+
sizeType: sizeType
|
|
23576
|
+
});
|
|
23577
|
+
|
|
23557
23578
|
/**
|
|
23558
23579
|
* Calculate the path of curve
|
|
23559
23580
|
* @return {String} path
|
|
23560
23581
|
*/
|
|
23561
23582
|
var getPath = function getPath() {
|
|
23562
|
-
var size = props.size,
|
|
23563
|
-
sizeType = props.sizeType,
|
|
23564
|
-
type = props.type;
|
|
23565
23583
|
var symbolFactory = getSymbolFactory(type);
|
|
23566
23584
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23567
23585
|
return symbol();
|
|
23568
23586
|
};
|
|
23569
23587
|
var className = props.className,
|
|
23570
23588
|
cx = props.cx,
|
|
23571
|
-
cy = props.cy
|
|
23572
|
-
size = props.size;
|
|
23589
|
+
cy = props.cy;
|
|
23573
23590
|
var filteredProps = filterProps(props, true);
|
|
23574
23591
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23575
23592
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23580,35 +23597,34 @@ var Symbols = function Symbols(props) {
|
|
|
23580
23597
|
}
|
|
23581
23598
|
return null;
|
|
23582
23599
|
};
|
|
23583
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23584
23600
|
Symbols.registerSymbol = registerSymbol;
|
|
23585
23601
|
|
|
23586
|
-
function _typeof$
|
|
23602
|
+
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); }
|
|
23587
23603
|
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); }
|
|
23588
|
-
function ownKeys$
|
|
23589
|
-
function _objectSpread$
|
|
23590
|
-
function _classCallCheck$
|
|
23591
|
-
function _defineProperties$
|
|
23592
|
-
function _createClass$
|
|
23593
|
-
function _inherits$
|
|
23594
|
-
function _setPrototypeOf$
|
|
23595
|
-
function _createSuper$
|
|
23596
|
-
function _possibleConstructorReturn$
|
|
23597
|
-
function _assertThisInitialized$
|
|
23598
|
-
function _isNativeReflectConstruct$
|
|
23599
|
-
function _getPrototypeOf$
|
|
23600
|
-
function _defineProperty$
|
|
23601
|
-
function _toPropertyKey$
|
|
23602
|
-
function _toPrimitive$
|
|
23604
|
+
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; }
|
|
23605
|
+
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; }
|
|
23606
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23607
|
+
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); } }
|
|
23608
|
+
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; }
|
|
23609
|
+
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); }
|
|
23610
|
+
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); }
|
|
23611
|
+
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); }; }
|
|
23612
|
+
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); }
|
|
23613
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23614
|
+
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; } }
|
|
23615
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23616
|
+
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; }
|
|
23617
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23618
|
+
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); }
|
|
23603
23619
|
var SIZE = 32;
|
|
23604
23620
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23605
|
-
_inherits$
|
|
23606
|
-
var _super = _createSuper$
|
|
23621
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23622
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23607
23623
|
function DefaultLegendContent() {
|
|
23608
|
-
_classCallCheck$
|
|
23624
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23609
23625
|
return _super.apply(this, arguments);
|
|
23610
23626
|
}
|
|
23611
|
-
_createClass$
|
|
23627
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23612
23628
|
key: "renderIcon",
|
|
23613
23629
|
value:
|
|
23614
23630
|
/**
|
|
@@ -23653,7 +23669,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23653
23669
|
});
|
|
23654
23670
|
}
|
|
23655
23671
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23656
|
-
var iconProps = _objectSpread$
|
|
23672
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23657
23673
|
delete iconProps.legendIcon;
|
|
23658
23674
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23659
23675
|
}
|
|
@@ -23701,7 +23717,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23701
23717
|
var finalFormatter = entry.formatter || formatter;
|
|
23702
23718
|
var className = classNames((_classNames = {
|
|
23703
23719
|
'recharts-legend-item': true
|
|
23704
|
-
}, _defineProperty$
|
|
23720
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23705
23721
|
if (entry.type === 'none') {
|
|
23706
23722
|
return null;
|
|
23707
23723
|
}
|
|
@@ -23746,8 +23762,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23746
23762
|
}]);
|
|
23747
23763
|
return DefaultLegendContent;
|
|
23748
23764
|
}(React$3.PureComponent);
|
|
23749
|
-
_defineProperty$
|
|
23750
|
-
_defineProperty$
|
|
23765
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23766
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23751
23767
|
iconSize: 14,
|
|
23752
23768
|
layout: 'horizontal',
|
|
23753
23769
|
align: 'center',
|
|
@@ -23755,25 +23771,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23755
23771
|
inactiveColor: '#ccc'
|
|
23756
23772
|
});
|
|
23757
23773
|
|
|
23758
|
-
function _typeof$
|
|
23759
|
-
var _excluded$
|
|
23760
|
-
function ownKeys$
|
|
23761
|
-
function _objectSpread$
|
|
23762
|
-
function _classCallCheck$
|
|
23763
|
-
function _defineProperties$
|
|
23764
|
-
function _createClass$
|
|
23765
|
-
function _inherits$
|
|
23766
|
-
function _setPrototypeOf$
|
|
23767
|
-
function _createSuper$
|
|
23768
|
-
function _possibleConstructorReturn$
|
|
23769
|
-
function _assertThisInitialized$
|
|
23770
|
-
function _isNativeReflectConstruct$
|
|
23771
|
-
function _getPrototypeOf$
|
|
23772
|
-
function _defineProperty$
|
|
23773
|
-
function _toPropertyKey$
|
|
23774
|
-
function _toPrimitive$
|
|
23775
|
-
function _objectWithoutProperties$
|
|
23776
|
-
function _objectWithoutPropertiesLoose$
|
|
23774
|
+
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); }
|
|
23775
|
+
var _excluded$b = ["ref"];
|
|
23776
|
+
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; }
|
|
23777
|
+
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; }
|
|
23778
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23779
|
+
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); } }
|
|
23780
|
+
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; }
|
|
23781
|
+
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); }
|
|
23782
|
+
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); }
|
|
23783
|
+
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); }; }
|
|
23784
|
+
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); }
|
|
23785
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23786
|
+
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; } }
|
|
23787
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23788
|
+
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; }
|
|
23789
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23790
|
+
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); }
|
|
23791
|
+
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; }
|
|
23792
|
+
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; }
|
|
23777
23793
|
function defaultUniqBy$1(entry) {
|
|
23778
23794
|
return entry.value;
|
|
23779
23795
|
}
|
|
@@ -23794,27 +23810,27 @@ function renderContent$1(content, props) {
|
|
|
23794
23810
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23795
23811
|
}
|
|
23796
23812
|
props.ref;
|
|
23797
|
-
var otherProps = _objectWithoutProperties$
|
|
23813
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23798
23814
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23799
23815
|
}
|
|
23800
23816
|
var EPS$2 = 1;
|
|
23801
23817
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23802
|
-
_inherits$
|
|
23803
|
-
var _super = _createSuper$
|
|
23818
|
+
_inherits$8(Legend, _PureComponent);
|
|
23819
|
+
var _super = _createSuper$8(Legend);
|
|
23804
23820
|
function Legend() {
|
|
23805
23821
|
var _this;
|
|
23806
|
-
_classCallCheck$
|
|
23822
|
+
_classCallCheck$a(this, Legend);
|
|
23807
23823
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23808
23824
|
args[_key] = arguments[_key];
|
|
23809
23825
|
}
|
|
23810
23826
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23811
|
-
_defineProperty$
|
|
23827
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23812
23828
|
boxWidth: -1,
|
|
23813
23829
|
boxHeight: -1
|
|
23814
23830
|
});
|
|
23815
23831
|
return _this;
|
|
23816
23832
|
}
|
|
23817
|
-
_createClass$
|
|
23833
|
+
_createClass$a(Legend, [{
|
|
23818
23834
|
key: "componentDidMount",
|
|
23819
23835
|
value: function componentDidMount() {
|
|
23820
23836
|
this.updateBBox();
|
|
@@ -23889,7 +23905,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23889
23905
|
};
|
|
23890
23906
|
}
|
|
23891
23907
|
}
|
|
23892
|
-
return _objectSpread$
|
|
23908
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23893
23909
|
}
|
|
23894
23910
|
}, {
|
|
23895
23911
|
key: "updateBBox",
|
|
@@ -23932,7 +23948,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23932
23948
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23933
23949
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23934
23950
|
payload = _this$props2.payload;
|
|
23935
|
-
var outerStyle = _objectSpread$
|
|
23951
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23936
23952
|
position: 'absolute',
|
|
23937
23953
|
width: width || 'auto',
|
|
23938
23954
|
height: height || 'auto'
|
|
@@ -23943,7 +23959,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23943
23959
|
ref: function ref(node) {
|
|
23944
23960
|
_this2.wrapperNode = node;
|
|
23945
23961
|
}
|
|
23946
|
-
}, renderContent$1(content, _objectSpread$
|
|
23962
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23947
23963
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23948
23964
|
})));
|
|
23949
23965
|
}
|
|
@@ -23966,8 +23982,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23966
23982
|
}]);
|
|
23967
23983
|
return Legend;
|
|
23968
23984
|
}(React$3.PureComponent);
|
|
23969
|
-
_defineProperty$
|
|
23970
|
-
_defineProperty$
|
|
23985
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23986
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23971
23987
|
iconSize: 14,
|
|
23972
23988
|
layout: 'horizontal',
|
|
23973
23989
|
align: 'center',
|
|
@@ -24531,13 +24547,13 @@ function setRafTimeout(callback) {
|
|
|
24531
24547
|
requestAnimationFrame(shouldUpdate);
|
|
24532
24548
|
}
|
|
24533
24549
|
|
|
24534
|
-
function _typeof$
|
|
24535
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24536
|
-
function _nonIterableRest$
|
|
24537
|
-
function _unsupportedIterableToArray$
|
|
24538
|
-
function _arrayLikeToArray$
|
|
24550
|
+
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); }
|
|
24551
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24552
|
+
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."); }
|
|
24553
|
+
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); }
|
|
24554
|
+
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; }
|
|
24539
24555
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24540
|
-
function _arrayWithHoles$
|
|
24556
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24541
24557
|
function createAnimateManager() {
|
|
24542
24558
|
var currStyle = {};
|
|
24543
24559
|
var handleChange = function handleChange() {
|
|
@@ -24564,7 +24580,7 @@ function createAnimateManager() {
|
|
|
24564
24580
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24565
24581
|
return;
|
|
24566
24582
|
}
|
|
24567
|
-
if (_typeof$
|
|
24583
|
+
if (_typeof$r(_style) === 'object') {
|
|
24568
24584
|
currStyle = _style;
|
|
24569
24585
|
handleChange(currStyle);
|
|
24570
24586
|
}
|
|
@@ -24591,12 +24607,12 @@ function createAnimateManager() {
|
|
|
24591
24607
|
};
|
|
24592
24608
|
}
|
|
24593
24609
|
|
|
24594
|
-
function _typeof$
|
|
24595
|
-
function ownKeys$
|
|
24596
|
-
function _objectSpread$
|
|
24597
|
-
function _defineProperty$
|
|
24598
|
-
function _toPropertyKey$
|
|
24599
|
-
function _toPrimitive$
|
|
24610
|
+
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); }
|
|
24611
|
+
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; }
|
|
24612
|
+
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; }
|
|
24613
|
+
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; }
|
|
24614
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24615
|
+
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); }
|
|
24600
24616
|
/* eslint no-console: 0 */
|
|
24601
24617
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24602
24618
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24628,7 +24644,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24628
24644
|
*/
|
|
24629
24645
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24630
24646
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24631
|
-
return _defineProperty$
|
|
24647
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24632
24648
|
}
|
|
24633
24649
|
var isTransition = name === 'transition';
|
|
24634
24650
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24639,7 +24655,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24639
24655
|
if (isTransition) {
|
|
24640
24656
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24641
24657
|
}
|
|
24642
|
-
return _objectSpread$
|
|
24658
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24643
24659
|
}, {});
|
|
24644
24660
|
};
|
|
24645
24661
|
|
|
@@ -24649,7 +24665,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24649
24665
|
*/
|
|
24650
24666
|
var mapObject = function mapObject(fn, obj) {
|
|
24651
24667
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24652
|
-
return _objectSpread$
|
|
24668
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24653
24669
|
}, {});
|
|
24654
24670
|
};
|
|
24655
24671
|
|
|
@@ -24659,7 +24675,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24659
24675
|
*/
|
|
24660
24676
|
var translateStyle = function translateStyle(style) {
|
|
24661
24677
|
return Object.keys(style).reduce(function (res, key) {
|
|
24662
|
-
return _objectSpread$
|
|
24678
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24663
24679
|
}, style);
|
|
24664
24680
|
};
|
|
24665
24681
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24687,16 +24703,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24687
24703
|
}
|
|
24688
24704
|
};
|
|
24689
24705
|
|
|
24690
|
-
function _slicedToArray$
|
|
24691
|
-
function _nonIterableRest$
|
|
24692
|
-
function _iterableToArrayLimit$
|
|
24693
|
-
function _arrayWithHoles$
|
|
24694
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24706
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24707
|
+
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."); }
|
|
24708
|
+
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; } }
|
|
24709
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24710
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24695
24711
|
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."); }
|
|
24696
|
-
function _unsupportedIterableToArray$
|
|
24712
|
+
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); }
|
|
24697
24713
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24698
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24699
|
-
function _arrayLikeToArray$
|
|
24714
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24715
|
+
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; }
|
|
24700
24716
|
var ACCURACY = 1e-4;
|
|
24701
24717
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24702
24718
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24772,7 +24788,7 @@ var configBezier = function configBezier() {
|
|
|
24772
24788
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24773
24789
|
return parseFloat(x);
|
|
24774
24790
|
});
|
|
24775
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24791
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24776
24792
|
x1 = _easing$1$split$0$spl2[0];
|
|
24777
24793
|
y1 = _easing$1$split$0$spl2[1];
|
|
24778
24794
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24865,22 +24881,22 @@ var configEasing = function configEasing() {
|
|
|
24865
24881
|
return null;
|
|
24866
24882
|
};
|
|
24867
24883
|
|
|
24868
|
-
function _typeof$
|
|
24869
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24884
|
+
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); }
|
|
24885
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24870
24886
|
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."); }
|
|
24871
24887
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24872
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24873
|
-
function ownKeys$
|
|
24874
|
-
function _objectSpread$
|
|
24875
|
-
function _defineProperty$
|
|
24876
|
-
function _toPropertyKey$
|
|
24877
|
-
function _toPrimitive$
|
|
24878
|
-
function _slicedToArray$
|
|
24879
|
-
function _nonIterableRest$
|
|
24880
|
-
function _unsupportedIterableToArray$
|
|
24881
|
-
function _arrayLikeToArray$
|
|
24882
|
-
function _iterableToArrayLimit$
|
|
24883
|
-
function _arrayWithHoles$
|
|
24888
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24889
|
+
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; }
|
|
24890
|
+
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; }
|
|
24891
|
+
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; }
|
|
24892
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24893
|
+
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); }
|
|
24894
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24895
|
+
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."); }
|
|
24896
|
+
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); }
|
|
24897
|
+
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; }
|
|
24898
|
+
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; } }
|
|
24899
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24884
24900
|
var alpha = function alpha(begin, end, k) {
|
|
24885
24901
|
return begin + (end - begin) * k;
|
|
24886
24902
|
};
|
|
@@ -24898,10 +24914,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24898
24914
|
var nextStepVals = mapObject(function (key, val) {
|
|
24899
24915
|
if (needContinue(val)) {
|
|
24900
24916
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24901
|
-
_easing2 = _slicedToArray$
|
|
24917
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24902
24918
|
newX = _easing2[0],
|
|
24903
24919
|
newV = _easing2[1];
|
|
24904
|
-
return _objectSpread$
|
|
24920
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24905
24921
|
from: newX,
|
|
24906
24922
|
velocity: newV
|
|
24907
24923
|
});
|
|
@@ -24911,7 +24927,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24911
24927
|
if (steps < 1) {
|
|
24912
24928
|
return mapObject(function (key, val) {
|
|
24913
24929
|
if (needContinue(val)) {
|
|
24914
|
-
return _objectSpread$
|
|
24930
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24915
24931
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24916
24932
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24917
24933
|
});
|
|
@@ -24926,10 +24942,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24926
24942
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24927
24943
|
var interKeys = getIntersectionKeys(from, to);
|
|
24928
24944
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24929
|
-
return _objectSpread$
|
|
24945
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24930
24946
|
}, {});
|
|
24931
24947
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24932
|
-
return _objectSpread$
|
|
24948
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24933
24949
|
from: from[key],
|
|
24934
24950
|
velocity: 0,
|
|
24935
24951
|
to: to[key]
|
|
@@ -24959,7 +24975,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24959
24975
|
var steps = deltaTime / easing.dt;
|
|
24960
24976
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24961
24977
|
// get union set and add compatible prefix
|
|
24962
|
-
render(_objectSpread$
|
|
24978
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24963
24979
|
preTime = now;
|
|
24964
24980
|
if (!shouldStopAnimation()) {
|
|
24965
24981
|
cafId = requestAnimationFrame(update);
|
|
@@ -24977,14 +24993,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24977
24993
|
}, timingStyle);
|
|
24978
24994
|
|
|
24979
24995
|
// get union set and add compatible prefix
|
|
24980
|
-
render(_objectSpread$
|
|
24996
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24981
24997
|
if (t < 1) {
|
|
24982
24998
|
cafId = requestAnimationFrame(update);
|
|
24983
24999
|
} else {
|
|
24984
25000
|
var finalStyle = mapObject(function (key, val) {
|
|
24985
25001
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24986
25002
|
}, timingStyle);
|
|
24987
|
-
render(_objectSpread$
|
|
25003
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24988
25004
|
}
|
|
24989
25005
|
};
|
|
24990
25006
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -25000,37 +25016,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
25000
25016
|
};
|
|
25001
25017
|
});
|
|
25002
25018
|
|
|
25003
|
-
function _typeof$
|
|
25004
|
-
var _excluded$
|
|
25005
|
-
function _objectWithoutProperties$
|
|
25006
|
-
function _objectWithoutPropertiesLoose$
|
|
25007
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
25019
|
+
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); }
|
|
25020
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
25021
|
+
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; }
|
|
25022
|
+
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; }
|
|
25023
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
25008
25024
|
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."); }
|
|
25009
|
-
function _unsupportedIterableToArray$
|
|
25025
|
+
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); }
|
|
25010
25026
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25011
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
25012
|
-
function _arrayLikeToArray$
|
|
25013
|
-
function ownKeys$
|
|
25014
|
-
function _objectSpread$
|
|
25015
|
-
function _defineProperty$
|
|
25016
|
-
function _classCallCheck$
|
|
25017
|
-
function _defineProperties$
|
|
25018
|
-
function _createClass$
|
|
25019
|
-
function _toPropertyKey$
|
|
25020
|
-
function _toPrimitive$
|
|
25021
|
-
function _inherits$
|
|
25022
|
-
function _setPrototypeOf$
|
|
25023
|
-
function _createSuper$
|
|
25024
|
-
function _possibleConstructorReturn$
|
|
25025
|
-
function _assertThisInitialized$
|
|
25026
|
-
function _isNativeReflectConstruct$
|
|
25027
|
-
function _getPrototypeOf$
|
|
25027
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
25028
|
+
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; }
|
|
25029
|
+
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; }
|
|
25030
|
+
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; }
|
|
25031
|
+
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; }
|
|
25032
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25033
|
+
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); } }
|
|
25034
|
+
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; }
|
|
25035
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
25036
|
+
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); }
|
|
25037
|
+
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); }
|
|
25038
|
+
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); }
|
|
25039
|
+
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); }; }
|
|
25040
|
+
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); }
|
|
25041
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25042
|
+
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; } }
|
|
25043
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
25028
25044
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25029
|
-
_inherits$
|
|
25030
|
-
var _super = _createSuper$
|
|
25045
|
+
_inherits$7(Animate, _PureComponent);
|
|
25046
|
+
var _super = _createSuper$7(Animate);
|
|
25031
25047
|
function Animate(props, context) {
|
|
25032
25048
|
var _this;
|
|
25033
|
-
_classCallCheck$
|
|
25049
|
+
_classCallCheck$9(this, Animate);
|
|
25034
25050
|
_this = _super.call(this, props, context);
|
|
25035
25051
|
var _this$props = _this.props,
|
|
25036
25052
|
isActive = _this$props.isActive,
|
|
@@ -25040,8 +25056,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25040
25056
|
steps = _this$props.steps,
|
|
25041
25057
|
children = _this$props.children,
|
|
25042
25058
|
duration = _this$props.duration;
|
|
25043
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25044
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25059
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
25060
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
25045
25061
|
if (!isActive || duration <= 0) {
|
|
25046
25062
|
_this.state = {
|
|
25047
25063
|
style: {}
|
|
@@ -25053,7 +25069,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25053
25069
|
style: to
|
|
25054
25070
|
};
|
|
25055
25071
|
}
|
|
25056
|
-
return _possibleConstructorReturn$
|
|
25072
|
+
return _possibleConstructorReturn$7(_this);
|
|
25057
25073
|
}
|
|
25058
25074
|
if (steps && steps.length) {
|
|
25059
25075
|
_this.state = {
|
|
@@ -25064,10 +25080,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25064
25080
|
_this.state = {
|
|
25065
25081
|
style: from
|
|
25066
25082
|
};
|
|
25067
|
-
return _possibleConstructorReturn$
|
|
25083
|
+
return _possibleConstructorReturn$7(_this);
|
|
25068
25084
|
}
|
|
25069
25085
|
_this.state = {
|
|
25070
|
-
style: attributeName ? _defineProperty$
|
|
25086
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25071
25087
|
};
|
|
25072
25088
|
} else {
|
|
25073
25089
|
_this.state = {
|
|
@@ -25076,7 +25092,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25076
25092
|
}
|
|
25077
25093
|
return _this;
|
|
25078
25094
|
}
|
|
25079
|
-
_createClass$
|
|
25095
|
+
_createClass$9(Animate, [{
|
|
25080
25096
|
key: "componentDidMount",
|
|
25081
25097
|
value: function componentDidMount() {
|
|
25082
25098
|
var _this$props2 = this.props,
|
|
@@ -25104,7 +25120,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25104
25120
|
}
|
|
25105
25121
|
if (!isActive) {
|
|
25106
25122
|
var newState = {
|
|
25107
|
-
style: attributeName ? _defineProperty$
|
|
25123
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
25108
25124
|
};
|
|
25109
25125
|
if (this.state && style) {
|
|
25110
25126
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25127,14 +25143,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25127
25143
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25128
25144
|
if (this.state && style) {
|
|
25129
25145
|
var _newState = {
|
|
25130
|
-
style: attributeName ? _defineProperty$
|
|
25146
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25131
25147
|
};
|
|
25132
25148
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25133
25149
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25134
25150
|
this.setState(_newState);
|
|
25135
25151
|
}
|
|
25136
25152
|
}
|
|
25137
|
-
this.runAnimation(_objectSpread$
|
|
25153
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
25138
25154
|
from: from,
|
|
25139
25155
|
begin: 0
|
|
25140
25156
|
}));
|
|
@@ -25217,7 +25233,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25217
25233
|
}), duration]);
|
|
25218
25234
|
}
|
|
25219
25235
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25220
|
-
var newStyle = _objectSpread$
|
|
25236
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25221
25237
|
transition: transition
|
|
25222
25238
|
});
|
|
25223
25239
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25249,9 +25265,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25249
25265
|
this.runStepAnimation(props);
|
|
25250
25266
|
return;
|
|
25251
25267
|
}
|
|
25252
|
-
var to = attributeName ? _defineProperty$
|
|
25268
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25253
25269
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25254
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25270
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25255
25271
|
transition: transition
|
|
25256
25272
|
}), duration, onAnimationEnd]);
|
|
25257
25273
|
}
|
|
@@ -25272,7 +25288,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25272
25288
|
_this$props4.onAnimationEnd;
|
|
25273
25289
|
_this$props4.shouldReAnimate;
|
|
25274
25290
|
_this$props4.onAnimationReStart;
|
|
25275
|
-
var others = _objectWithoutProperties$
|
|
25291
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25276
25292
|
var count = React$3.Children.count(children);
|
|
25277
25293
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25278
25294
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25287,8 +25303,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25287
25303
|
_container$props$styl = _container$props.style,
|
|
25288
25304
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25289
25305
|
className = _container$props.className;
|
|
25290
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25291
|
-
style: _objectSpread$
|
|
25306
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25307
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25292
25308
|
className: className
|
|
25293
25309
|
}));
|
|
25294
25310
|
return res;
|
|
@@ -25813,10 +25829,10 @@ var defineProperty$2 = (function() {
|
|
|
25813
25829
|
} catch (e) {}
|
|
25814
25830
|
}());
|
|
25815
25831
|
|
|
25816
|
-
var _defineProperty$
|
|
25832
|
+
var _defineProperty$o = defineProperty$2;
|
|
25817
25833
|
|
|
25818
25834
|
var constant$1 = constant_1,
|
|
25819
|
-
defineProperty$1 = _defineProperty$
|
|
25835
|
+
defineProperty$1 = _defineProperty$o,
|
|
25820
25836
|
identity$7 = identity_1;
|
|
25821
25837
|
|
|
25822
25838
|
/**
|
|
@@ -25993,18 +26009,18 @@ var sortBy_1 = sortBy;
|
|
|
25993
26009
|
/**
|
|
25994
26010
|
* @fileOverview Default Tooltip Content
|
|
25995
26011
|
*/
|
|
25996
|
-
function _typeof$
|
|
25997
|
-
function _slicedToArray$
|
|
25998
|
-
function _nonIterableRest$
|
|
25999
|
-
function _unsupportedIterableToArray$
|
|
26000
|
-
function _arrayLikeToArray$
|
|
26001
|
-
function _iterableToArrayLimit$
|
|
26002
|
-
function _arrayWithHoles$
|
|
26003
|
-
function ownKeys$
|
|
26004
|
-
function _objectSpread$
|
|
26005
|
-
function _defineProperty$
|
|
26006
|
-
function _toPropertyKey$
|
|
26007
|
-
function _toPrimitive$
|
|
26012
|
+
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); }
|
|
26013
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26014
|
+
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."); }
|
|
26015
|
+
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); }
|
|
26016
|
+
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; }
|
|
26017
|
+
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; } }
|
|
26018
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26019
|
+
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; }
|
|
26020
|
+
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; }
|
|
26021
|
+
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; }
|
|
26022
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
26023
|
+
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); }
|
|
26008
26024
|
function defaultFormatter(value) {
|
|
26009
26025
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
26010
26026
|
}
|
|
@@ -26034,7 +26050,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26034
26050
|
if (entry.type === 'none') {
|
|
26035
26051
|
return null;
|
|
26036
26052
|
}
|
|
26037
|
-
var finalItemStyle = _objectSpread$
|
|
26053
|
+
var finalItemStyle = _objectSpread$m({
|
|
26038
26054
|
display: 'block',
|
|
26039
26055
|
paddingTop: 4,
|
|
26040
26056
|
paddingBottom: 4,
|
|
@@ -26048,7 +26064,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26048
26064
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26049
26065
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26050
26066
|
if (Array.isArray(formatted)) {
|
|
26051
|
-
var _formatted = _slicedToArray$
|
|
26067
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
26052
26068
|
finalValue = _formatted[0];
|
|
26053
26069
|
finalName = _formatted[1];
|
|
26054
26070
|
} else {
|
|
@@ -26080,14 +26096,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26080
26096
|
}
|
|
26081
26097
|
return null;
|
|
26082
26098
|
};
|
|
26083
|
-
var finalStyle = _objectSpread$
|
|
26099
|
+
var finalStyle = _objectSpread$m({
|
|
26084
26100
|
margin: 0,
|
|
26085
26101
|
padding: 10,
|
|
26086
26102
|
backgroundColor: '#fff',
|
|
26087
26103
|
border: '1px solid #ccc',
|
|
26088
26104
|
whiteSpace: 'nowrap'
|
|
26089
26105
|
}, contentStyle);
|
|
26090
|
-
var finalLabelStyle = _objectSpread$
|
|
26106
|
+
var finalLabelStyle = _objectSpread$m({
|
|
26091
26107
|
margin: 0
|
|
26092
26108
|
}, labelStyle);
|
|
26093
26109
|
var hasLabel = !isNil_1(label);
|
|
@@ -26128,18 +26144,22 @@ var Global = {
|
|
|
26128
26144
|
}
|
|
26129
26145
|
};
|
|
26130
26146
|
|
|
26131
|
-
function _typeof$
|
|
26132
|
-
function ownKeys$
|
|
26133
|
-
function _objectSpread$
|
|
26134
|
-
function
|
|
26135
|
-
function
|
|
26136
|
-
function
|
|
26137
|
-
function
|
|
26138
|
-
function
|
|
26139
|
-
function
|
|
26140
|
-
function
|
|
26141
|
-
function
|
|
26142
|
-
function
|
|
26147
|
+
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); }
|
|
26148
|
+
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; }
|
|
26149
|
+
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; }
|
|
26150
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26151
|
+
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); } }
|
|
26152
|
+
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; }
|
|
26153
|
+
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); }
|
|
26154
|
+
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); }
|
|
26155
|
+
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); }; }
|
|
26156
|
+
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); }
|
|
26157
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26158
|
+
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; } }
|
|
26159
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26160
|
+
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; }
|
|
26161
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26162
|
+
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); }
|
|
26143
26163
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26144
26164
|
var EPS$1 = 1;
|
|
26145
26165
|
function defaultUniqBy(entry) {
|
|
@@ -26163,7 +26183,204 @@ function renderContent(content, props) {
|
|
|
26163
26183
|
}
|
|
26164
26184
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26165
26185
|
}
|
|
26166
|
-
var
|
|
26186
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
26187
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
26188
|
+
var _super = _createSuper$6(Tooltip);
|
|
26189
|
+
function Tooltip() {
|
|
26190
|
+
var _this;
|
|
26191
|
+
_classCallCheck$8(this, Tooltip);
|
|
26192
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26193
|
+
args[_key] = arguments[_key];
|
|
26194
|
+
}
|
|
26195
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
26196
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26197
|
+
boxWidth: -1,
|
|
26198
|
+
boxHeight: -1,
|
|
26199
|
+
dismissed: false,
|
|
26200
|
+
dismissedAtCoordinate: {
|
|
26201
|
+
x: 0,
|
|
26202
|
+
y: 0
|
|
26203
|
+
}
|
|
26204
|
+
});
|
|
26205
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26206
|
+
if (event.key === 'Escape') {
|
|
26207
|
+
_this.setState({
|
|
26208
|
+
dismissed: true,
|
|
26209
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26210
|
+
x: _this.props.coordinate.x,
|
|
26211
|
+
y: _this.props.coordinate.y
|
|
26212
|
+
})
|
|
26213
|
+
});
|
|
26214
|
+
}
|
|
26215
|
+
});
|
|
26216
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26217
|
+
var key = _ref.key,
|
|
26218
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26219
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26220
|
+
var _this$props = _this.props,
|
|
26221
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26222
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26223
|
+
coordinate = _this$props.coordinate,
|
|
26224
|
+
offset = _this$props.offset,
|
|
26225
|
+
position = _this$props.position,
|
|
26226
|
+
viewBox = _this$props.viewBox;
|
|
26227
|
+
if (position && isNumber(position[key])) {
|
|
26228
|
+
return position[key];
|
|
26229
|
+
}
|
|
26230
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26231
|
+
var positive = coordinate[key] + offset;
|
|
26232
|
+
if (allowEscapeViewBox[key]) {
|
|
26233
|
+
return reverseDirection[key] ? negative : positive;
|
|
26234
|
+
}
|
|
26235
|
+
if (reverseDirection[key]) {
|
|
26236
|
+
var _tooltipBoundary = negative;
|
|
26237
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26238
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26239
|
+
return Math.max(positive, viewBox[key]);
|
|
26240
|
+
}
|
|
26241
|
+
return Math.max(negative, viewBox[key]);
|
|
26242
|
+
}
|
|
26243
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26244
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26245
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26246
|
+
return Math.max(negative, viewBox[key]);
|
|
26247
|
+
}
|
|
26248
|
+
return Math.max(positive, viewBox[key]);
|
|
26249
|
+
});
|
|
26250
|
+
return _this;
|
|
26251
|
+
}
|
|
26252
|
+
_createClass$8(Tooltip, [{
|
|
26253
|
+
key: "componentDidMount",
|
|
26254
|
+
value: function componentDidMount() {
|
|
26255
|
+
this.updateBBox();
|
|
26256
|
+
}
|
|
26257
|
+
}, {
|
|
26258
|
+
key: "componentWillUnmount",
|
|
26259
|
+
value: function componentWillUnmount() {
|
|
26260
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26261
|
+
}
|
|
26262
|
+
}, {
|
|
26263
|
+
key: "componentDidUpdate",
|
|
26264
|
+
value: function componentDidUpdate() {
|
|
26265
|
+
this.updateBBox();
|
|
26266
|
+
}
|
|
26267
|
+
}, {
|
|
26268
|
+
key: "updateBBox",
|
|
26269
|
+
value: function updateBBox() {
|
|
26270
|
+
var _this$state = this.state,
|
|
26271
|
+
boxWidth = _this$state.boxWidth,
|
|
26272
|
+
boxHeight = _this$state.boxHeight,
|
|
26273
|
+
dismissed = _this$state.dismissed;
|
|
26274
|
+
if (dismissed) {
|
|
26275
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26276
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26277
|
+
this.setState({
|
|
26278
|
+
dismissed: false
|
|
26279
|
+
});
|
|
26280
|
+
}
|
|
26281
|
+
} else {
|
|
26282
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26283
|
+
}
|
|
26284
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26285
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26286
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26287
|
+
this.setState({
|
|
26288
|
+
boxWidth: box.width,
|
|
26289
|
+
boxHeight: box.height
|
|
26290
|
+
});
|
|
26291
|
+
}
|
|
26292
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26293
|
+
this.setState({
|
|
26294
|
+
boxWidth: -1,
|
|
26295
|
+
boxHeight: -1
|
|
26296
|
+
});
|
|
26297
|
+
}
|
|
26298
|
+
}
|
|
26299
|
+
}, {
|
|
26300
|
+
key: "render",
|
|
26301
|
+
value: function render() {
|
|
26302
|
+
var _classNames,
|
|
26303
|
+
_this2 = this;
|
|
26304
|
+
var _this$props2 = this.props,
|
|
26305
|
+
payload = _this$props2.payload,
|
|
26306
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26307
|
+
animationDuration = _this$props2.animationDuration,
|
|
26308
|
+
animationEasing = _this$props2.animationEasing,
|
|
26309
|
+
filterNull = _this$props2.filterNull,
|
|
26310
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26311
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26312
|
+
return !isNil_1(entry.value);
|
|
26313
|
+
}) : payload);
|
|
26314
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26315
|
+
var _this$props3 = this.props,
|
|
26316
|
+
content = _this$props3.content,
|
|
26317
|
+
viewBox = _this$props3.viewBox,
|
|
26318
|
+
coordinate = _this$props3.coordinate,
|
|
26319
|
+
position = _this$props3.position,
|
|
26320
|
+
active = _this$props3.active,
|
|
26321
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26322
|
+
var outerStyle = _objectSpread$l({
|
|
26323
|
+
pointerEvents: 'none',
|
|
26324
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26325
|
+
position: 'absolute',
|
|
26326
|
+
top: 0,
|
|
26327
|
+
left: 0
|
|
26328
|
+
}, wrapperStyle);
|
|
26329
|
+
var translateX, translateY;
|
|
26330
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26331
|
+
translateX = position.x;
|
|
26332
|
+
translateY = position.y;
|
|
26333
|
+
} else {
|
|
26334
|
+
var _this$state2 = this.state,
|
|
26335
|
+
boxWidth = _this$state2.boxWidth,
|
|
26336
|
+
boxHeight = _this$state2.boxHeight;
|
|
26337
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26338
|
+
translateX = this.getTranslate({
|
|
26339
|
+
key: 'x',
|
|
26340
|
+
tooltipDimension: boxWidth,
|
|
26341
|
+
viewBoxDimension: viewBox.width
|
|
26342
|
+
});
|
|
26343
|
+
translateY = this.getTranslate({
|
|
26344
|
+
key: 'y',
|
|
26345
|
+
tooltipDimension: boxHeight,
|
|
26346
|
+
viewBoxDimension: viewBox.height
|
|
26347
|
+
});
|
|
26348
|
+
} else {
|
|
26349
|
+
outerStyle.visibility = 'hidden';
|
|
26350
|
+
}
|
|
26351
|
+
}
|
|
26352
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26353
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26354
|
+
})), outerStyle);
|
|
26355
|
+
if (isAnimationActive && active) {
|
|
26356
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26357
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26358
|
+
})), outerStyle);
|
|
26359
|
+
}
|
|
26360
|
+
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));
|
|
26361
|
+
return (
|
|
26362
|
+
/*#__PURE__*/
|
|
26363
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26364
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26365
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26366
|
+
React__default["default"].createElement("div", {
|
|
26367
|
+
tabIndex: -1,
|
|
26368
|
+
role: "dialog",
|
|
26369
|
+
className: cls,
|
|
26370
|
+
style: outerStyle,
|
|
26371
|
+
ref: function ref(node) {
|
|
26372
|
+
_this2.wrapperNode = node;
|
|
26373
|
+
}
|
|
26374
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26375
|
+
payload: finalPayload
|
|
26376
|
+
})))
|
|
26377
|
+
);
|
|
26378
|
+
}
|
|
26379
|
+
}]);
|
|
26380
|
+
return Tooltip;
|
|
26381
|
+
}(React$3.PureComponent);
|
|
26382
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26383
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26167
26384
|
active: false,
|
|
26168
26385
|
allowEscapeViewBox: {
|
|
26169
26386
|
x: false,
|
|
@@ -26184,9 +26401,6 @@ var tooltipDefaultProps = {
|
|
|
26184
26401
|
x: 0,
|
|
26185
26402
|
y: 0
|
|
26186
26403
|
},
|
|
26187
|
-
// this doesn't exist on TooltipProps
|
|
26188
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26189
|
-
// @ts-ignore
|
|
26190
26404
|
cursorStyle: {},
|
|
26191
26405
|
separator: ' : ',
|
|
26192
26406
|
wrapperStyle: {},
|
|
@@ -26200,173 +26414,7 @@ var tooltipDefaultProps = {
|
|
|
26200
26414
|
animationDuration: 400,
|
|
26201
26415
|
filterNull: true,
|
|
26202
26416
|
useTranslate3d: false
|
|
26203
|
-
};
|
|
26204
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26205
|
-
var _classNames;
|
|
26206
|
-
var _useState = React$3.useState(-1),
|
|
26207
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26208
|
-
boxWidth = _useState2[0],
|
|
26209
|
-
setBoxWidth = _useState2[1];
|
|
26210
|
-
var _useState3 = React$3.useState(-1),
|
|
26211
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26212
|
-
boxHeight = _useState4[0],
|
|
26213
|
-
setBoxHeight = _useState4[1];
|
|
26214
|
-
var _useState5 = React$3.useState(false),
|
|
26215
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26216
|
-
dismissed = _useState6[0],
|
|
26217
|
-
setDismissed = _useState6[1];
|
|
26218
|
-
var _useState7 = React$3.useState({
|
|
26219
|
-
x: 0,
|
|
26220
|
-
y: 0
|
|
26221
|
-
}),
|
|
26222
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26223
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26224
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26225
|
-
var wrapperNode = React$3.useRef();
|
|
26226
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26227
|
-
reverseDirection = props.reverseDirection,
|
|
26228
|
-
coordinate = props.coordinate,
|
|
26229
|
-
offset = props.offset,
|
|
26230
|
-
position = props.position,
|
|
26231
|
-
viewBox = props.viewBox;
|
|
26232
|
-
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26233
|
-
if (event.key === 'Escape') {
|
|
26234
|
-
setDismissed(true);
|
|
26235
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26236
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26237
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26238
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26239
|
-
});
|
|
26240
|
-
});
|
|
26241
|
-
}
|
|
26242
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26243
|
-
React$3.useEffect(function () {
|
|
26244
|
-
var updateBBox = function updateBBox() {
|
|
26245
|
-
if (dismissed) {
|
|
26246
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26247
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26248
|
-
setDismissed(false);
|
|
26249
|
-
}
|
|
26250
|
-
} else {
|
|
26251
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26252
|
-
}
|
|
26253
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26254
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26255
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26256
|
-
setBoxWidth(box.width);
|
|
26257
|
-
setBoxHeight(box.height);
|
|
26258
|
-
}
|
|
26259
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26260
|
-
setBoxWidth(-1);
|
|
26261
|
-
setBoxHeight(-1);
|
|
26262
|
-
}
|
|
26263
|
-
};
|
|
26264
|
-
updateBBox();
|
|
26265
|
-
return function () {
|
|
26266
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26267
|
-
};
|
|
26268
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26269
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26270
|
-
var key = _ref.key,
|
|
26271
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26272
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26273
|
-
if (position && isNumber(position[key])) {
|
|
26274
|
-
return position[key];
|
|
26275
|
-
}
|
|
26276
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26277
|
-
var positive = coordinate[key] + offset;
|
|
26278
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26279
|
-
return reverseDirection[key] ? negative : positive;
|
|
26280
|
-
}
|
|
26281
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26282
|
-
var _tooltipBoundary = negative;
|
|
26283
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26284
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26285
|
-
return Math.max(positive, viewBox[key]);
|
|
26286
|
-
}
|
|
26287
|
-
return Math.max(negative, viewBox[key]);
|
|
26288
|
-
}
|
|
26289
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26290
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26291
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26292
|
-
return Math.max(negative, viewBox[key]);
|
|
26293
|
-
}
|
|
26294
|
-
return Math.max(positive, viewBox[key]);
|
|
26295
|
-
};
|
|
26296
|
-
var payload = props.payload,
|
|
26297
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26298
|
-
filterNull = props.filterNull,
|
|
26299
|
-
active = props.active,
|
|
26300
|
-
wrapperStyle = props.wrapperStyle,
|
|
26301
|
-
useTranslate3d = props.useTranslate3d,
|
|
26302
|
-
isAnimationActive = props.isAnimationActive,
|
|
26303
|
-
animationDuration = props.animationDuration,
|
|
26304
|
-
animationEasing = props.animationEasing;
|
|
26305
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26306
|
-
return !isNil_1(entry.value);
|
|
26307
|
-
}) : payload);
|
|
26308
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26309
|
-
var content = props.content;
|
|
26310
|
-
var outerStyle = _objectSpread$i({
|
|
26311
|
-
pointerEvents: 'none',
|
|
26312
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26313
|
-
position: 'absolute',
|
|
26314
|
-
top: 0,
|
|
26315
|
-
left: 0
|
|
26316
|
-
}, wrapperStyle);
|
|
26317
|
-
var translateX, translateY;
|
|
26318
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26319
|
-
translateX = position.x;
|
|
26320
|
-
translateY = position.y;
|
|
26321
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26322
|
-
translateX = getTranslate({
|
|
26323
|
-
key: 'x',
|
|
26324
|
-
tooltipDimension: boxWidth,
|
|
26325
|
-
viewBoxDimension: viewBox.width
|
|
26326
|
-
});
|
|
26327
|
-
translateY = getTranslate({
|
|
26328
|
-
key: 'y',
|
|
26329
|
-
tooltipDimension: boxHeight,
|
|
26330
|
-
viewBoxDimension: viewBox.height
|
|
26331
|
-
});
|
|
26332
|
-
} else {
|
|
26333
|
-
outerStyle.visibility = 'hidden';
|
|
26334
|
-
}
|
|
26335
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26336
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26337
|
-
})), outerStyle);
|
|
26338
|
-
if (isAnimationActive && active) {
|
|
26339
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26340
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26341
|
-
})), outerStyle);
|
|
26342
|
-
}
|
|
26343
|
-
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));
|
|
26344
|
-
return (
|
|
26345
|
-
/*#__PURE__*/
|
|
26346
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26347
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26348
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26349
|
-
React__default["default"].createElement("div", {
|
|
26350
|
-
tabIndex: -1,
|
|
26351
|
-
role: "dialog",
|
|
26352
|
-
className: cls,
|
|
26353
|
-
style: outerStyle,
|
|
26354
|
-
ref: wrapperNode
|
|
26355
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26356
|
-
payload: finalPayload
|
|
26357
|
-
})))
|
|
26358
|
-
);
|
|
26359
|
-
};
|
|
26360
|
-
|
|
26361
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26362
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26363
|
-
|
|
26364
|
-
/**
|
|
26365
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26366
|
-
* children.props when there are no props set by the consumer
|
|
26367
|
-
* doesn't work if using default parameters
|
|
26368
|
-
*/
|
|
26369
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26417
|
+
});
|
|
26370
26418
|
|
|
26371
26419
|
var root = _root;
|
|
26372
26420
|
|
|
@@ -31936,12 +31984,12 @@ module.exports = exports['default'];
|
|
|
31936
31984
|
|
|
31937
31985
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31938
31986
|
|
|
31939
|
-
function _typeof$
|
|
31940
|
-
function ownKeys$
|
|
31941
|
-
function _objectSpread$
|
|
31942
|
-
function _defineProperty$
|
|
31943
|
-
function _toPropertyKey$
|
|
31944
|
-
function _toPrimitive$
|
|
31987
|
+
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); }
|
|
31988
|
+
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; }
|
|
31989
|
+
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; }
|
|
31990
|
+
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; }
|
|
31991
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31992
|
+
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); }
|
|
31945
31993
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31946
31994
|
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."); }
|
|
31947
31995
|
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); }
|
|
@@ -32009,7 +32057,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
32009
32057
|
}
|
|
32010
32058
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
32011
32059
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
32012
|
-
var measurementSpanStyle = _objectSpread$
|
|
32060
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
32013
32061
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
32014
32062
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
32015
32063
|
return styleKey;
|
|
@@ -32064,10 +32112,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32064
32112
|
};
|
|
32065
32113
|
};
|
|
32066
32114
|
|
|
32067
|
-
var _excluded$
|
|
32115
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
32116
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32068
32117
|
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); }
|
|
32069
|
-
function _objectWithoutProperties$
|
|
32070
|
-
function _objectWithoutPropertiesLoose$
|
|
32118
|
+
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; }
|
|
32119
|
+
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; }
|
|
32071
32120
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32072
32121
|
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."); }
|
|
32073
32122
|
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); }
|
|
@@ -32221,45 +32270,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32221
32270
|
}
|
|
32222
32271
|
return getWordsWithoutCalculate(children);
|
|
32223
32272
|
};
|
|
32224
|
-
var
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32236
|
-
|
|
32273
|
+
var DEFAULT_FILL = '#808080';
|
|
32274
|
+
var Text = function Text(_ref5) {
|
|
32275
|
+
var _ref5$x = _ref5.x,
|
|
32276
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32277
|
+
_ref5$y = _ref5.y,
|
|
32278
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32279
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32280
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32281
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32282
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32283
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32284
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32285
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32286
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32287
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32288
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32289
|
+
_ref5$fill = _ref5.fill,
|
|
32290
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32291
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32237
32292
|
var wordsByLines = React$3.useMemo(function () {
|
|
32238
32293
|
return getWordsByLines({
|
|
32239
32294
|
breakAll: props.breakAll,
|
|
32240
32295
|
children: props.children,
|
|
32241
32296
|
maxLines: props.maxLines,
|
|
32242
|
-
scaleToFit:
|
|
32297
|
+
scaleToFit: scaleToFit,
|
|
32243
32298
|
style: props.style,
|
|
32244
32299
|
width: props.width
|
|
32245
32300
|
});
|
|
32246
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32301
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32247
32302
|
var dx = props.dx,
|
|
32248
32303
|
dy = props.dy,
|
|
32249
|
-
textAnchor = props.textAnchor,
|
|
32250
|
-
verticalAnchor = props.verticalAnchor,
|
|
32251
|
-
scaleToFit = props.scaleToFit,
|
|
32252
32304
|
angle = props.angle,
|
|
32253
|
-
lineHeight = props.lineHeight,
|
|
32254
|
-
capHeight = props.capHeight,
|
|
32255
32305
|
className = props.className,
|
|
32256
32306
|
breakAll = props.breakAll,
|
|
32257
|
-
textProps = _objectWithoutProperties$
|
|
32258
|
-
if (!isNumOrStr(
|
|
32307
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32308
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32259
32309
|
return null;
|
|
32260
32310
|
}
|
|
32261
|
-
var x =
|
|
32262
|
-
var y =
|
|
32311
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32312
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32263
32313
|
var startDy;
|
|
32264
32314
|
switch (verticalAnchor) {
|
|
32265
32315
|
case 'start':
|
|
@@ -32289,7 +32339,7 @@ var Text = function Text(props) {
|
|
|
32289
32339
|
y: y,
|
|
32290
32340
|
className: classNames('recharts-text', className),
|
|
32291
32341
|
textAnchor: textAnchor,
|
|
32292
|
-
fill:
|
|
32342
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32293
32343
|
}), wordsByLines.map(function (line, index) {
|
|
32294
32344
|
return (
|
|
32295
32345
|
/*#__PURE__*/
|
|
@@ -32302,7 +32352,6 @@ var Text = function Text(props) {
|
|
|
32302
32352
|
);
|
|
32303
32353
|
}));
|
|
32304
32354
|
};
|
|
32305
|
-
Text.defaultProps = textDefaultProps;
|
|
32306
32355
|
|
|
32307
32356
|
var baseIsEqual = _baseIsEqual;
|
|
32308
32357
|
|
|
@@ -38570,7 +38619,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38570
38619
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38571
38620
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38572
38621
|
|
|
38573
|
-
var _excluded$
|
|
38622
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38574
38623
|
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); }
|
|
38575
38624
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38576
38625
|
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."); }
|
|
@@ -38578,8 +38627,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38578
38627
|
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; }
|
|
38579
38628
|
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; } }
|
|
38580
38629
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38581
|
-
function _objectWithoutProperties$
|
|
38582
|
-
function _objectWithoutPropertiesLoose$
|
|
38630
|
+
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; }
|
|
38631
|
+
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; }
|
|
38583
38632
|
function ErrorBar(props) {
|
|
38584
38633
|
var offset = props.offset,
|
|
38585
38634
|
layout = props.layout,
|
|
@@ -38589,7 +38638,7 @@ function ErrorBar(props) {
|
|
|
38589
38638
|
dataPointFormatter = props.dataPointFormatter,
|
|
38590
38639
|
xAxis = props.xAxis,
|
|
38591
38640
|
yAxis = props.yAxis,
|
|
38592
|
-
others = _objectWithoutProperties$
|
|
38641
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38593
38642
|
var svgProps = filterProps(others);
|
|
38594
38643
|
var errorBars = data.map(function (entry, i) {
|
|
38595
38644
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38700,18 +38749,18 @@ ErrorBar.defaultProps = {
|
|
|
38700
38749
|
};
|
|
38701
38750
|
ErrorBar.displayName = 'ErrorBar';
|
|
38702
38751
|
|
|
38703
|
-
function _typeof$
|
|
38752
|
+
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); }
|
|
38704
38753
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38705
38754
|
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."); }
|
|
38706
38755
|
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); }
|
|
38707
38756
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38708
38757
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38709
38758
|
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; }
|
|
38710
|
-
function ownKeys$
|
|
38711
|
-
function _objectSpread$
|
|
38712
|
-
function _defineProperty$
|
|
38713
|
-
function _toPropertyKey$
|
|
38714
|
-
function _toPrimitive$
|
|
38759
|
+
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; }
|
|
38760
|
+
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; }
|
|
38761
|
+
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; }
|
|
38762
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38763
|
+
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); }
|
|
38715
38764
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38716
38765
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38717
38766
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38882,7 +38931,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38882
38931
|
};
|
|
38883
38932
|
});
|
|
38884
38933
|
}
|
|
38885
|
-
return _objectSpread$
|
|
38934
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38886
38935
|
payload: legendData,
|
|
38887
38936
|
item: legendItem
|
|
38888
38937
|
});
|
|
@@ -39036,10 +39085,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39036
39085
|
verticalAlign = legendProps.verticalAlign,
|
|
39037
39086
|
layout = legendProps.layout;
|
|
39038
39087
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39039
|
-
newOffset = _objectSpread$
|
|
39088
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
39040
39089
|
}
|
|
39041
39090
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39042
|
-
newOffset = _objectSpread$
|
|
39091
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39043
39092
|
}
|
|
39044
39093
|
}
|
|
39045
39094
|
return newOffset;
|
|
@@ -39465,14 +39514,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39465
39514
|
items: [item]
|
|
39466
39515
|
};
|
|
39467
39516
|
}
|
|
39468
|
-
return _objectSpread$
|
|
39517
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39469
39518
|
}, {});
|
|
39470
39519
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39471
39520
|
var group = stackGroups[axisId];
|
|
39472
39521
|
if (group.hasStack) {
|
|
39473
39522
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39474
39523
|
var g = group.stackGroups[stackId];
|
|
39475
|
-
return _objectSpread$
|
|
39524
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39476
39525
|
numericAxisId: numericAxisId,
|
|
39477
39526
|
cateAxisId: cateAxisId,
|
|
39478
39527
|
items: g.items,
|
|
@@ -39480,7 +39529,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39480
39529
|
}));
|
|
39481
39530
|
}, {});
|
|
39482
39531
|
}
|
|
39483
|
-
return _objectSpread$
|
|
39532
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39484
39533
|
}, {});
|
|
39485
39534
|
};
|
|
39486
39535
|
|
|
@@ -39694,7 +39743,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39694
39743
|
formatter = _graphicalItem$props.formatter,
|
|
39695
39744
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39696
39745
|
chartType = _graphicalItem$props.chartType;
|
|
39697
|
-
return _objectSpread$
|
|
39746
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39698
39747
|
dataKey: dataKey,
|
|
39699
39748
|
unit: unit,
|
|
39700
39749
|
formatter: formatter,
|
|
@@ -39707,12 +39756,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39707
39756
|
});
|
|
39708
39757
|
};
|
|
39709
39758
|
|
|
39710
|
-
function _typeof$
|
|
39711
|
-
function ownKeys$
|
|
39712
|
-
function _objectSpread$
|
|
39713
|
-
function _defineProperty$
|
|
39714
|
-
function _toPropertyKey$
|
|
39715
|
-
function _toPrimitive$
|
|
39759
|
+
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); }
|
|
39760
|
+
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; }
|
|
39761
|
+
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; }
|
|
39762
|
+
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; }
|
|
39763
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39764
|
+
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); }
|
|
39716
39765
|
var RADIAN = Math.PI / 180;
|
|
39717
39766
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39718
39767
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39817,7 +39866,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39817
39866
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39818
39867
|
}
|
|
39819
39868
|
if (inRange) {
|
|
39820
|
-
return _objectSpread$
|
|
39869
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39821
39870
|
radius: radius,
|
|
39822
39871
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39823
39872
|
});
|
|
@@ -39825,18 +39874,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39825
39874
|
return null;
|
|
39826
39875
|
};
|
|
39827
39876
|
|
|
39828
|
-
function _typeof$
|
|
39877
|
+
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); }
|
|
39878
|
+
var _excluded$7 = ["offset"];
|
|
39829
39879
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39830
39880
|
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."); }
|
|
39831
39881
|
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); }
|
|
39832
39882
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39833
39883
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39834
39884
|
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; }
|
|
39835
|
-
function
|
|
39836
|
-
function
|
|
39837
|
-
function
|
|
39838
|
-
function
|
|
39839
|
-
function
|
|
39885
|
+
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; }
|
|
39886
|
+
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; }
|
|
39887
|
+
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; }
|
|
39888
|
+
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; }
|
|
39889
|
+
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; }
|
|
39890
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39891
|
+
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); }
|
|
39840
39892
|
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); }
|
|
39841
39893
|
var getLabel = function getLabel(props) {
|
|
39842
39894
|
var value = props.value,
|
|
@@ -39981,7 +40033,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39981
40033
|
textAnchor: 'middle',
|
|
39982
40034
|
verticalAnchor: verticalEnd
|
|
39983
40035
|
};
|
|
39984
|
-
return _objectSpread$
|
|
40036
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39985
40037
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39986
40038
|
width: width
|
|
39987
40039
|
} : {});
|
|
@@ -39993,7 +40045,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39993
40045
|
textAnchor: 'middle',
|
|
39994
40046
|
verticalAnchor: verticalStart
|
|
39995
40047
|
};
|
|
39996
|
-
return _objectSpread$
|
|
40048
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39997
40049
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39998
40050
|
width: width
|
|
39999
40051
|
} : {});
|
|
@@ -40005,7 +40057,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40005
40057
|
textAnchor: horizontalEnd,
|
|
40006
40058
|
verticalAnchor: 'middle'
|
|
40007
40059
|
};
|
|
40008
|
-
return _objectSpread$
|
|
40060
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
40009
40061
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
40010
40062
|
height: height
|
|
40011
40063
|
} : {});
|
|
@@ -40017,7 +40069,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40017
40069
|
textAnchor: horizontalStart,
|
|
40018
40070
|
verticalAnchor: 'middle'
|
|
40019
40071
|
};
|
|
40020
|
-
return _objectSpread$
|
|
40072
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
40021
40073
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
40022
40074
|
height: height
|
|
40023
40075
|
} : {});
|
|
@@ -40027,7 +40079,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40027
40079
|
height: height
|
|
40028
40080
|
} : {};
|
|
40029
40081
|
if (position === 'insideLeft') {
|
|
40030
|
-
return _objectSpread$
|
|
40082
|
+
return _objectSpread$h({
|
|
40031
40083
|
x: x + horizontalOffset,
|
|
40032
40084
|
y: y + height / 2,
|
|
40033
40085
|
textAnchor: horizontalStart,
|
|
@@ -40035,7 +40087,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40035
40087
|
}, sizeAttrs);
|
|
40036
40088
|
}
|
|
40037
40089
|
if (position === 'insideRight') {
|
|
40038
|
-
return _objectSpread$
|
|
40090
|
+
return _objectSpread$h({
|
|
40039
40091
|
x: x + width - horizontalOffset,
|
|
40040
40092
|
y: y + height / 2,
|
|
40041
40093
|
textAnchor: horizontalEnd,
|
|
@@ -40043,7 +40095,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40043
40095
|
}, sizeAttrs);
|
|
40044
40096
|
}
|
|
40045
40097
|
if (position === 'insideTop') {
|
|
40046
|
-
return _objectSpread$
|
|
40098
|
+
return _objectSpread$h({
|
|
40047
40099
|
x: x + width / 2,
|
|
40048
40100
|
y: y + verticalOffset,
|
|
40049
40101
|
textAnchor: 'middle',
|
|
@@ -40051,7 +40103,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40051
40103
|
}, sizeAttrs);
|
|
40052
40104
|
}
|
|
40053
40105
|
if (position === 'insideBottom') {
|
|
40054
|
-
return _objectSpread$
|
|
40106
|
+
return _objectSpread$h({
|
|
40055
40107
|
x: x + width / 2,
|
|
40056
40108
|
y: y + height - verticalOffset,
|
|
40057
40109
|
textAnchor: 'middle',
|
|
@@ -40059,7 +40111,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40059
40111
|
}, sizeAttrs);
|
|
40060
40112
|
}
|
|
40061
40113
|
if (position === 'insideTopLeft') {
|
|
40062
|
-
return _objectSpread$
|
|
40114
|
+
return _objectSpread$h({
|
|
40063
40115
|
x: x + horizontalOffset,
|
|
40064
40116
|
y: y + verticalOffset,
|
|
40065
40117
|
textAnchor: horizontalStart,
|
|
@@ -40067,7 +40119,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40067
40119
|
}, sizeAttrs);
|
|
40068
40120
|
}
|
|
40069
40121
|
if (position === 'insideTopRight') {
|
|
40070
|
-
return _objectSpread$
|
|
40122
|
+
return _objectSpread$h({
|
|
40071
40123
|
x: x + width - horizontalOffset,
|
|
40072
40124
|
y: y + verticalOffset,
|
|
40073
40125
|
textAnchor: horizontalEnd,
|
|
@@ -40075,7 +40127,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40075
40127
|
}, sizeAttrs);
|
|
40076
40128
|
}
|
|
40077
40129
|
if (position === 'insideBottomLeft') {
|
|
40078
|
-
return _objectSpread$
|
|
40130
|
+
return _objectSpread$h({
|
|
40079
40131
|
x: x + horizontalOffset,
|
|
40080
40132
|
y: y + height - verticalOffset,
|
|
40081
40133
|
textAnchor: horizontalStart,
|
|
@@ -40083,7 +40135,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40083
40135
|
}, sizeAttrs);
|
|
40084
40136
|
}
|
|
40085
40137
|
if (position === 'insideBottomRight') {
|
|
40086
|
-
return _objectSpread$
|
|
40138
|
+
return _objectSpread$h({
|
|
40087
40139
|
x: x + width - horizontalOffset,
|
|
40088
40140
|
y: y + height - verticalOffset,
|
|
40089
40141
|
textAnchor: horizontalEnd,
|
|
@@ -40091,14 +40143,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40091
40143
|
}, sizeAttrs);
|
|
40092
40144
|
}
|
|
40093
40145
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40094
|
-
return _objectSpread$
|
|
40146
|
+
return _objectSpread$h({
|
|
40095
40147
|
x: x + getPercentValue(position.x, width),
|
|
40096
40148
|
y: y + getPercentValue(position.y, height),
|
|
40097
40149
|
textAnchor: 'end',
|
|
40098
40150
|
verticalAnchor: 'end'
|
|
40099
40151
|
}, sizeAttrs);
|
|
40100
40152
|
}
|
|
40101
|
-
return _objectSpread$
|
|
40153
|
+
return _objectSpread$h({
|
|
40102
40154
|
x: x + width / 2,
|
|
40103
40155
|
y: y + height / 2,
|
|
40104
40156
|
textAnchor: 'middle',
|
|
@@ -40108,7 +40160,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40108
40160
|
var isPolar = function isPolar(viewBox) {
|
|
40109
40161
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40110
40162
|
};
|
|
40111
|
-
function Label$3(
|
|
40163
|
+
function Label$3(_ref4) {
|
|
40164
|
+
var _ref4$offset = _ref4.offset,
|
|
40165
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40166
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40167
|
+
var props = _objectSpread$h({
|
|
40168
|
+
offset: offset
|
|
40169
|
+
}, restProps);
|
|
40112
40170
|
var viewBox = props.viewBox,
|
|
40113
40171
|
position = props.position,
|
|
40114
40172
|
value = props.value,
|
|
@@ -40145,9 +40203,6 @@ function Label$3(props) {
|
|
|
40145
40203
|
}), label);
|
|
40146
40204
|
}
|
|
40147
40205
|
Label$3.displayName = 'Label';
|
|
40148
|
-
Label$3.defaultProps = {
|
|
40149
|
-
offset: 5
|
|
40150
|
-
};
|
|
40151
40206
|
var parseViewBox = function parseViewBox(props) {
|
|
40152
40207
|
var cx = props.cx,
|
|
40153
40208
|
cy = props.cy,
|
|
@@ -40302,8 +40357,9 @@ function last(array) {
|
|
|
40302
40357
|
|
|
40303
40358
|
var last_1 = last;
|
|
40304
40359
|
|
|
40305
|
-
function _typeof$
|
|
40306
|
-
var _excluded$
|
|
40360
|
+
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); }
|
|
40361
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40362
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40307
40363
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40308
40364
|
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."); }
|
|
40309
40365
|
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); }
|
|
@@ -40311,26 +40367,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40311
40367
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40312
40368
|
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; }
|
|
40313
40369
|
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); }
|
|
40314
|
-
function ownKeys$
|
|
40315
|
-
function _objectSpread$
|
|
40316
|
-
function _defineProperty$
|
|
40317
|
-
function _toPropertyKey$
|
|
40318
|
-
function _toPrimitive$
|
|
40319
|
-
function _objectWithoutProperties$
|
|
40320
|
-
function _objectWithoutPropertiesLoose$
|
|
40321
|
-
var
|
|
40322
|
-
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40328
|
-
|
|
40329
|
-
dataKey =
|
|
40330
|
-
clockWise =
|
|
40331
|
-
id =
|
|
40332
|
-
textBreakAll =
|
|
40333
|
-
others = _objectWithoutProperties$
|
|
40370
|
+
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; }
|
|
40371
|
+
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; }
|
|
40372
|
+
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; }
|
|
40373
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40374
|
+
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); }
|
|
40375
|
+
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; }
|
|
40376
|
+
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; }
|
|
40377
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40378
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40379
|
+
};
|
|
40380
|
+
function LabelList(_ref) {
|
|
40381
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40382
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40383
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40384
|
+
var data = restProps.data,
|
|
40385
|
+
dataKey = restProps.dataKey,
|
|
40386
|
+
clockWise = restProps.clockWise,
|
|
40387
|
+
id = restProps.id,
|
|
40388
|
+
textBreakAll = restProps.textBreakAll,
|
|
40389
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40334
40390
|
if (!data || !data.length) {
|
|
40335
40391
|
return null;
|
|
40336
40392
|
}
|
|
@@ -40346,7 +40402,7 @@ function LabelList(props) {
|
|
|
40346
40402
|
index: index,
|
|
40347
40403
|
value: value,
|
|
40348
40404
|
textBreakAll: textBreakAll,
|
|
40349
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40405
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40350
40406
|
clockWise: clockWise
|
|
40351
40407
|
})),
|
|
40352
40408
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40401,9 +40457,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40401
40457
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40402
40458
|
}
|
|
40403
40459
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40404
|
-
LabelList.defaultProps = defaultProps;
|
|
40405
40460
|
|
|
40461
|
+
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); }
|
|
40406
40462
|
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); }
|
|
40463
|
+
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; }
|
|
40464
|
+
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; }
|
|
40465
|
+
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; }
|
|
40466
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40467
|
+
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); }
|
|
40407
40468
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40408
40469
|
var sign = mathSign(endAngle - startAngle);
|
|
40409
40470
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40544,7 +40605,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40544
40605
|
}
|
|
40545
40606
|
return path;
|
|
40546
40607
|
};
|
|
40547
|
-
var
|
|
40608
|
+
var defaultProps$1 = {
|
|
40609
|
+
cx: 0,
|
|
40610
|
+
cy: 0,
|
|
40611
|
+
innerRadius: 0,
|
|
40612
|
+
outerRadius: 0,
|
|
40613
|
+
startAngle: 0,
|
|
40614
|
+
endAngle: 0,
|
|
40615
|
+
cornerRadius: 0,
|
|
40616
|
+
forceCornerRadius: false,
|
|
40617
|
+
cornerIsExternal: false
|
|
40618
|
+
};
|
|
40619
|
+
var Sector = function Sector(sectorProps) {
|
|
40620
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40548
40621
|
var cx = props.cx,
|
|
40549
40622
|
cy = props.cy,
|
|
40550
40623
|
innerRadius = props.innerRadius,
|
|
@@ -40590,25 +40663,14 @@ var Sector = function Sector(props) {
|
|
|
40590
40663
|
role: "img"
|
|
40591
40664
|
}));
|
|
40592
40665
|
};
|
|
40593
|
-
Sector.defaultProps = {
|
|
40594
|
-
cx: 0,
|
|
40595
|
-
cy: 0,
|
|
40596
|
-
innerRadius: 0,
|
|
40597
|
-
outerRadius: 0,
|
|
40598
|
-
startAngle: 0,
|
|
40599
|
-
endAngle: 0,
|
|
40600
|
-
cornerRadius: 0,
|
|
40601
|
-
forceCornerRadius: false,
|
|
40602
|
-
cornerIsExternal: false
|
|
40603
|
-
};
|
|
40604
40666
|
|
|
40605
|
-
function _typeof$
|
|
40667
|
+
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); }
|
|
40606
40668
|
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); }
|
|
40607
|
-
function ownKeys$
|
|
40608
|
-
function _objectSpread$
|
|
40609
|
-
function _defineProperty$
|
|
40610
|
-
function _toPropertyKey$
|
|
40611
|
-
function _toPrimitive$
|
|
40669
|
+
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; }
|
|
40670
|
+
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; }
|
|
40671
|
+
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; }
|
|
40672
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40673
|
+
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); }
|
|
40612
40674
|
var CURVE_FACTORIES = {
|
|
40613
40675
|
curveBasisClosed: curveBasisClosed,
|
|
40614
40676
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40648,11 +40710,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40648
40710
|
* @return {String} path
|
|
40649
40711
|
*/
|
|
40650
40712
|
var getPath$1 = function getPath(_ref) {
|
|
40651
|
-
var type = _ref.type,
|
|
40652
|
-
|
|
40713
|
+
var _ref$type = _ref.type,
|
|
40714
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40715
|
+
_ref$points = _ref.points,
|
|
40716
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40653
40717
|
baseLine = _ref.baseLine,
|
|
40654
40718
|
layout = _ref.layout,
|
|
40655
|
-
connectNulls = _ref.connectNulls
|
|
40719
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40720
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40656
40721
|
var curveFactory = getCurveFactory(type, layout);
|
|
40657
40722
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40658
40723
|
return defined(entry);
|
|
@@ -40663,7 +40728,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40663
40728
|
return defined(base);
|
|
40664
40729
|
}) : baseLine;
|
|
40665
40730
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40666
|
-
return _objectSpread$
|
|
40731
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40667
40732
|
base: formatBaseLine[index]
|
|
40668
40733
|
});
|
|
40669
40734
|
});
|
|
@@ -40704,12 +40769,8 @@ var Curve = function Curve(props) {
|
|
|
40704
40769
|
ref: pathRef
|
|
40705
40770
|
}));
|
|
40706
40771
|
};
|
|
40707
|
-
Curve.defaultProps = {
|
|
40708
|
-
type: 'linear',
|
|
40709
|
-
points: [],
|
|
40710
|
-
connectNulls: false
|
|
40711
|
-
};
|
|
40712
40772
|
|
|
40773
|
+
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); }
|
|
40713
40774
|
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); }
|
|
40714
40775
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40715
40776
|
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."); }
|
|
@@ -40717,6 +40778,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40717
40778
|
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; }
|
|
40718
40779
|
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; } }
|
|
40719
40780
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40781
|
+
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; }
|
|
40782
|
+
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; }
|
|
40783
|
+
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; }
|
|
40784
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40785
|
+
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); }
|
|
40720
40786
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40721
40787
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40722
40788
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40772,13 +40838,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40772
40838
|
}
|
|
40773
40839
|
return false;
|
|
40774
40840
|
};
|
|
40775
|
-
var
|
|
40841
|
+
var defaultProps = {
|
|
40842
|
+
x: 0,
|
|
40843
|
+
y: 0,
|
|
40844
|
+
width: 0,
|
|
40845
|
+
height: 0,
|
|
40846
|
+
// The radius of border
|
|
40847
|
+
// The radius of four corners when radius is a number
|
|
40848
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40849
|
+
radius: 0,
|
|
40850
|
+
isAnimationActive: false,
|
|
40851
|
+
isUpdateAnimationActive: false,
|
|
40852
|
+
animationBegin: 0,
|
|
40853
|
+
animationDuration: 1500,
|
|
40854
|
+
animationEasing: 'ease'
|
|
40855
|
+
};
|
|
40856
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40857
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40776
40858
|
var pathRef = React$3.useRef();
|
|
40777
40859
|
var _useState = React$3.useState(-1),
|
|
40778
40860
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40779
40861
|
totalLength = _useState2[0],
|
|
40780
40862
|
setTotalLength = _useState2[1];
|
|
40781
|
-
React$3.
|
|
40863
|
+
React$3.useEffect(function () {
|
|
40782
40864
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40783
40865
|
try {
|
|
40784
40866
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40849,21 +40931,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40849
40931
|
})));
|
|
40850
40932
|
});
|
|
40851
40933
|
};
|
|
40852
|
-
Rectangle.defaultProps = {
|
|
40853
|
-
x: 0,
|
|
40854
|
-
y: 0,
|
|
40855
|
-
width: 0,
|
|
40856
|
-
height: 0,
|
|
40857
|
-
// The radius of border
|
|
40858
|
-
// The radius of four corners when radius is a number
|
|
40859
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40860
|
-
radius: 0,
|
|
40861
|
-
isAnimationActive: false,
|
|
40862
|
-
isUpdateAnimationActive: false,
|
|
40863
|
-
animationBegin: 0,
|
|
40864
|
-
animationDuration: 1500,
|
|
40865
|
-
animationEasing: 'ease'
|
|
40866
|
-
};
|
|
40867
40934
|
|
|
40868
40935
|
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); }
|
|
40869
40936
|
var Dot$1 = function Dot(props) {
|
|
@@ -40883,18 +40950,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40883
40950
|
return null;
|
|
40884
40951
|
};
|
|
40885
40952
|
|
|
40953
|
+
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); }
|
|
40954
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40886
40955
|
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); }
|
|
40956
|
+
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; }
|
|
40957
|
+
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; }
|
|
40958
|
+
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; }
|
|
40959
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40960
|
+
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); }
|
|
40961
|
+
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; }
|
|
40962
|
+
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; }
|
|
40887
40963
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40888
40964
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40889
40965
|
};
|
|
40890
|
-
var Cross = function Cross(
|
|
40891
|
-
var x =
|
|
40892
|
-
|
|
40893
|
-
|
|
40894
|
-
|
|
40895
|
-
top =
|
|
40896
|
-
|
|
40897
|
-
|
|
40966
|
+
var Cross = function Cross(_ref) {
|
|
40967
|
+
var _ref$x = _ref.x,
|
|
40968
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40969
|
+
_ref$y = _ref.y,
|
|
40970
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40971
|
+
_ref$top = _ref.top,
|
|
40972
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40973
|
+
_ref$left = _ref.left,
|
|
40974
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40975
|
+
_ref$width = _ref.width,
|
|
40976
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40977
|
+
_ref$height = _ref.height,
|
|
40978
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40979
|
+
className = _ref.className,
|
|
40980
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40981
|
+
var props = _objectSpread$c({
|
|
40982
|
+
x: x,
|
|
40983
|
+
y: y,
|
|
40984
|
+
top: top,
|
|
40985
|
+
left: left,
|
|
40986
|
+
width: width,
|
|
40987
|
+
height: height
|
|
40988
|
+
}, rest);
|
|
40898
40989
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40899
40990
|
return null;
|
|
40900
40991
|
}
|
|
@@ -40903,14 +40994,6 @@ var Cross = function Cross(props) {
|
|
|
40903
40994
|
d: getPath(x, y, width, height, top, left)
|
|
40904
40995
|
}));
|
|
40905
40996
|
};
|
|
40906
|
-
Cross.defaultProps = {
|
|
40907
|
-
x: 0,
|
|
40908
|
-
y: 0,
|
|
40909
|
-
top: 0,
|
|
40910
|
-
left: 0,
|
|
40911
|
-
width: 0,
|
|
40912
|
-
height: 0
|
|
40913
|
-
};
|
|
40914
40997
|
|
|
40915
40998
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40916
40999
|
|
|
@@ -41120,6 +41203,7 @@ var createScale = function createScale(_ref) {
|
|
|
41120
41203
|
isTextActive: false,
|
|
41121
41204
|
isSlideMoving: false,
|
|
41122
41205
|
isTravellerMoving: false,
|
|
41206
|
+
isTravellerFocused: false,
|
|
41123
41207
|
startX: scale(startIndex),
|
|
41124
41208
|
endX: scale(endIndex),
|
|
41125
41209
|
scale: scale,
|
|
@@ -41333,6 +41417,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41333
41417
|
}
|
|
41334
41418
|
});
|
|
41335
41419
|
}
|
|
41420
|
+
}, {
|
|
41421
|
+
key: "handleTravellerMoveKeyboard",
|
|
41422
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41423
|
+
var _this2 = this;
|
|
41424
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41425
|
+
var _this$state3 = this.state,
|
|
41426
|
+
scaleValues = _this$state3.scaleValues,
|
|
41427
|
+
startX = _this$state3.startX,
|
|
41428
|
+
endX = _this$state3.endX;
|
|
41429
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41430
|
+
var currentScaleValue = this.state[id];
|
|
41431
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41432
|
+
if (currentIndex === -1) {
|
|
41433
|
+
return;
|
|
41434
|
+
}
|
|
41435
|
+
var newIndex = currentIndex + direction;
|
|
41436
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41437
|
+
return;
|
|
41438
|
+
}
|
|
41439
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41440
|
+
|
|
41441
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41442
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41443
|
+
return;
|
|
41444
|
+
}
|
|
41445
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41446
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41447
|
+
startX: _this2.state.startX,
|
|
41448
|
+
endX: _this2.state.endX
|
|
41449
|
+
}));
|
|
41450
|
+
});
|
|
41451
|
+
}
|
|
41336
41452
|
}, {
|
|
41337
41453
|
key: "renderBackground",
|
|
41338
41454
|
value: function renderBackground() {
|
|
@@ -41380,6 +41496,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41380
41496
|
}, {
|
|
41381
41497
|
key: "renderTravellerLayer",
|
|
41382
41498
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41499
|
+
var _this3 = this;
|
|
41383
41500
|
var _this$props7 = this.props,
|
|
41384
41501
|
y = _this$props7.y,
|
|
41385
41502
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41393,11 +41510,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41393
41510
|
height: height
|
|
41394
41511
|
});
|
|
41395
41512
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41513
|
+
tabIndex: 0,
|
|
41514
|
+
role: "slider",
|
|
41396
41515
|
className: "recharts-brush-traveller",
|
|
41397
41516
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41398
41517
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41399
41518
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41400
41519
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41520
|
+
onKeyDown: function onKeyDown(e) {
|
|
41521
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41522
|
+
return;
|
|
41523
|
+
}
|
|
41524
|
+
e.preventDefault();
|
|
41525
|
+
e.stopPropagation();
|
|
41526
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41527
|
+
},
|
|
41528
|
+
onFocus: function onFocus() {
|
|
41529
|
+
_this3.setState({
|
|
41530
|
+
isTravellerFocused: true
|
|
41531
|
+
});
|
|
41532
|
+
},
|
|
41533
|
+
onBlur: function onBlur() {
|
|
41534
|
+
_this3.setState({
|
|
41535
|
+
isTravellerFocused: false
|
|
41536
|
+
});
|
|
41537
|
+
},
|
|
41401
41538
|
style: {
|
|
41402
41539
|
cursor: 'col-resize'
|
|
41403
41540
|
}
|
|
@@ -41441,9 +41578,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41441
41578
|
height = _this$props9.height,
|
|
41442
41579
|
travellerWidth = _this$props9.travellerWidth,
|
|
41443
41580
|
stroke = _this$props9.stroke;
|
|
41444
|
-
var _this$
|
|
41445
|
-
startX = _this$
|
|
41446
|
-
endX = _this$
|
|
41581
|
+
var _this$state4 = this.state,
|
|
41582
|
+
startX = _this$state4.startX,
|
|
41583
|
+
endX = _this$state4.endX;
|
|
41447
41584
|
var offset = 5;
|
|
41448
41585
|
var attrs = {
|
|
41449
41586
|
pointerEvents: 'none',
|
|
@@ -41475,12 +41612,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41475
41612
|
width = _this$props10.width,
|
|
41476
41613
|
height = _this$props10.height,
|
|
41477
41614
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41478
|
-
var _this$
|
|
41479
|
-
startX = _this$
|
|
41480
|
-
endX = _this$
|
|
41481
|
-
isTextActive = _this$
|
|
41482
|
-
isSlideMoving = _this$
|
|
41483
|
-
isTravellerMoving = _this$
|
|
41615
|
+
var _this$state5 = this.state,
|
|
41616
|
+
startX = _this$state5.startX,
|
|
41617
|
+
endX = _this$state5.endX,
|
|
41618
|
+
isTextActive = _this$state5.isTextActive,
|
|
41619
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41620
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41621
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41484
41622
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41485
41623
|
return null;
|
|
41486
41624
|
}
|
|
@@ -41492,7 +41630,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41492
41630
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41493
41631
|
onTouchMove: this.handleTouchMove,
|
|
41494
41632
|
style: style
|
|
41495
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41633
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41496
41634
|
}
|
|
41497
41635
|
}], [{
|
|
41498
41636
|
key: "renderDefaultTraveller",
|
|
@@ -41810,7 +41948,7 @@ function every(collection, predicate, guard) {
|
|
|
41810
41948
|
|
|
41811
41949
|
var every_1 = every;
|
|
41812
41950
|
|
|
41813
|
-
var defineProperty = _defineProperty$
|
|
41951
|
+
var defineProperty = _defineProperty$o;
|
|
41814
41952
|
|
|
41815
41953
|
/**
|
|
41816
41954
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42171,7 +42309,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42171
42309
|
legendType: 'rect',
|
|
42172
42310
|
minPointSize: 0,
|
|
42173
42311
|
hide: false,
|
|
42174
|
-
// data of bar
|
|
42175
42312
|
data: [],
|
|
42176
42313
|
layout: 'vertical',
|
|
42177
42314
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45084,10 +45221,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45084
45221
|
}
|
|
45085
45222
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45086
45223
|
x = _this$container$getBo.x,
|
|
45087
|
-
y = _this$container$getBo.y
|
|
45224
|
+
y = _this$container$getBo.y,
|
|
45225
|
+
height = _this$container$getBo.height;
|
|
45088
45226
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45089
45227
|
var pageX = x + coordinate;
|
|
45090
|
-
var pageY = y + this.offset.top;
|
|
45228
|
+
var pageY = y + this.offset.top + height / 2;
|
|
45091
45229
|
this.mouseHandlerCallback({
|
|
45092
45230
|
pageX: pageX,
|
|
45093
45231
|
pageY: pageY
|
|
@@ -48427,6 +48565,9 @@ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4
|
|
|
48427
48565
|
var Table = function (_a) {
|
|
48428
48566
|
var columns = _a.columns, data = _a.data, emptyText = _a.emptyText, rowSelection = _a.rowSelection;
|
|
48429
48567
|
var _b = React$3.useState([]), selectedRowKeys = _b[0], setSelectedRowKeys = _b[1];
|
|
48568
|
+
React$3.useEffect(function () {
|
|
48569
|
+
setSelectedRowKeys([]);
|
|
48570
|
+
}, [data]);
|
|
48430
48571
|
var onSelectRow = function (selectedKey) {
|
|
48431
48572
|
var index = selectedRowKeys.indexOf(selectedKey);
|
|
48432
48573
|
var newSelectedRowKeys = __spreadArray([], selectedRowKeys, true);
|
|
@@ -48467,7 +48608,7 @@ var Table = function (_a) {
|
|
|
48467
48608
|
display: "flex",
|
|
48468
48609
|
justifyContent: "center",
|
|
48469
48610
|
marginTop: 10,
|
|
48470
|
-
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48611
|
+
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length === data.length, onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48471
48612
|
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48472
48613
|
return (jsxRuntime.jsx(ColumnTitle, { children: jsxRuntime.jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title && (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))), titlePopup && (jsxRuntime.jsx(Popup, __assign$2({ content: titlePopup }, { children: jsxRuntime.jsx(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
|
|
48473
48614
|
})] }) }), jsxRuntime.jsx(TableBody, { children: data.length === 0 ? (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsxRuntime.jsx(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) { return (jsxRuntime.jsxs(TableRow, { children: [rowSelection && (jsxRuntime.jsx(TableCell, { children: jsxRuntime.jsx(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) {
|