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