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