@typeolymp/ui-components 1.19.8 → 1.19.10
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/Heading/index.d.ts +1 -0
- package/build/components/atoms/Icon/index.d.ts +1 -1
- package/build/components/atoms/Input/translations.d.ts +11 -0
- package/build/components/atoms/Paragraph/index.d.ts +1 -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 +634 -763
- package/build/index.es.js.map +1 -1
- package/build/index.js +634 -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
|
@@ -3562,6 +3562,7 @@ var icons = {
|
|
|
3562
3562
|
dotsVertical: (jsxs("g", { children: [jsx$1("circle", { cx: 12, cy: 4.2, r: 1.9 }), jsx$1("circle", { cx: 12, cy: 12, r: 1.9 }), jsx$1("path", { d: "M12 17.8c-1.1 0-1.9.9-1.9 1.9 0 1.1.9 1.9 1.9 1.9s1.9-.9 1.9-1.9c0-1-.8-1.9-1.9-1.9z" })] })),
|
|
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
|
+
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" })),
|
|
3565
3566
|
};
|
|
3566
3567
|
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] })) }))); };
|
|
3567
3568
|
|
|
@@ -4176,7 +4177,7 @@ var flags = {
|
|
|
4176
4177
|
};
|
|
4177
4178
|
var Flag = function (props) { return (jsx$1(Wrapper$9, __assign$2({}, props, { children: flags[parsers.getCountryCodeByLocale(props.locale)] }))); };
|
|
4178
4179
|
|
|
4179
|
-
var StyledHeading = styled.span(templateObject_1$R || (templateObject_1$R = __makeTemplateObject$1(["\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n font-style: normal;\n line-height: ", ";\n letter-spacing: ", ";\n margin: 0;\n color: ", ";\n text-align: ", ";\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n font-style: normal;\n line-height: ", ";\n letter-spacing: ", ";\n margin: 0;\n color: ", ";\n text-align: ", ";\n"])), theme.fonts.heading, function (_a) {
|
|
4180
|
+
var StyledHeading = styled.span(templateObject_1$R || (templateObject_1$R = __makeTemplateObject$1(["\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n font-style: normal;\n line-height: ", ";\n letter-spacing: ", ";\n margin: 0;\n color: ", ";\n text-align: ", ";\n text-decoration: ", ";\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n font-style: normal;\n line-height: ", ";\n letter-spacing: ", ";\n margin: 0;\n color: ", ";\n text-align: ", ";\n text-decoration: ", ";\n"])), theme.fonts.heading, function (_a) {
|
|
4180
4181
|
var type = _a.type;
|
|
4181
4182
|
return theme.heading[type].fontSize;
|
|
4182
4183
|
}, function (_a) {
|
|
@@ -4199,6 +4200,9 @@ var StyledHeading = styled.span(templateObject_1$R || (templateObject_1$R = __ma
|
|
|
4199
4200
|
}, function (_a) {
|
|
4200
4201
|
var align = _a.align;
|
|
4201
4202
|
return align;
|
|
4203
|
+
}, function (_a) {
|
|
4204
|
+
var decoration = _a.decoration;
|
|
4205
|
+
return decoration;
|
|
4202
4206
|
});
|
|
4203
4207
|
var templateObject_1$R;
|
|
4204
4208
|
|
|
@@ -4243,7 +4247,7 @@ var illustrations = {
|
|
|
4243
4247
|
};
|
|
4244
4248
|
var Illustration = function (props) { return (jsx$1(Wrapper$8, __assign$2({}, props, { children: illustrations[props.type] }))); };
|
|
4245
4249
|
|
|
4246
|
-
var StyledParagraph = styled.p(templateObject_1$P || (templateObject_1$P = __makeTemplateObject$1(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: normal;\n line-height: ", ";\n color: ", ";\n margin: 0;\n text-align: ", ";\n text-transform: ", ";\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: normal;\n line-height: ", ";\n color: ", ";\n margin: 0;\n text-align: ", ";\n text-transform: ", ";\n"])), theme.fonts.paragraph, function (_a) {
|
|
4250
|
+
var StyledParagraph = styled.p(templateObject_1$P || (templateObject_1$P = __makeTemplateObject$1(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: normal;\n line-height: ", ";\n color: ", ";\n margin: 0;\n text-align: ", ";\n text-transform: ", ";\n text-decoration: ", ";\n"], ["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n font-style: normal;\n line-height: ", ";\n color: ", ";\n margin: 0;\n text-align: ", ";\n text-transform: ", ";\n text-decoration: ", ";\n"])), theme.fonts.paragraph, function (_a) {
|
|
4247
4251
|
var size = _a.size;
|
|
4248
4252
|
return size ? theme.paragraph[size].fontSize : theme.paragraph.medium.fontSize;
|
|
4249
4253
|
}, function (_a) {
|
|
@@ -4277,6 +4281,9 @@ var StyledParagraph = styled.p(templateObject_1$P || (templateObject_1$P = __mak
|
|
|
4277
4281
|
}, function (_a) {
|
|
4278
4282
|
var transform = _a.transform;
|
|
4279
4283
|
return transform;
|
|
4284
|
+
}, function (_a) {
|
|
4285
|
+
var decoration = _a.decoration;
|
|
4286
|
+
return decoration;
|
|
4280
4287
|
});
|
|
4281
4288
|
var templateObject_1$P;
|
|
4282
4289
|
|
|
@@ -4493,7 +4500,7 @@ function requiredArgs(required, args) {
|
|
|
4493
4500
|
}
|
|
4494
4501
|
}
|
|
4495
4502
|
|
|
4496
|
-
function _typeof$
|
|
4503
|
+
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); }
|
|
4497
4504
|
/**
|
|
4498
4505
|
* @name toDate
|
|
4499
4506
|
* @category Common Helpers
|
|
@@ -4529,7 +4536,7 @@ function toDate(argument) {
|
|
|
4529
4536
|
requiredArgs(1, arguments);
|
|
4530
4537
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4531
4538
|
|
|
4532
|
-
if (argument instanceof Date || _typeof$
|
|
4539
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4533
4540
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4534
4541
|
return new Date(argument.getTime());
|
|
4535
4542
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4800,7 +4807,7 @@ var millisecondsInMinute = 60000;
|
|
|
4800
4807
|
|
|
4801
4808
|
var millisecondsInHour = 3600000;
|
|
4802
4809
|
|
|
4803
|
-
function _typeof$
|
|
4810
|
+
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); }
|
|
4804
4811
|
/**
|
|
4805
4812
|
* @name isDate
|
|
4806
4813
|
* @category Common Helpers
|
|
@@ -4836,7 +4843,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4836
4843
|
|
|
4837
4844
|
function isDate(value) {
|
|
4838
4845
|
requiredArgs(1, arguments);
|
|
4839
|
-
return value instanceof Date || _typeof$
|
|
4846
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4840
4847
|
}
|
|
4841
4848
|
|
|
4842
4849
|
/**
|
|
@@ -13540,15 +13547,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13540
13547
|
|
|
13541
13548
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13542
13549
|
|
|
13543
|
-
function _slicedToArray$
|
|
13544
|
-
return _arrayWithHoles$
|
|
13550
|
+
function _slicedToArray$d(arr, i) {
|
|
13551
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13545
13552
|
}
|
|
13546
13553
|
|
|
13547
|
-
function _arrayWithHoles$
|
|
13554
|
+
function _arrayWithHoles$e(arr) {
|
|
13548
13555
|
if (Array.isArray(arr)) return arr;
|
|
13549
13556
|
}
|
|
13550
13557
|
|
|
13551
|
-
function _iterableToArrayLimit$
|
|
13558
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13552
13559
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13553
13560
|
|
|
13554
13561
|
if (_i == null) return;
|
|
@@ -13578,16 +13585,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13578
13585
|
return _arr;
|
|
13579
13586
|
}
|
|
13580
13587
|
|
|
13581
|
-
function _unsupportedIterableToArray$
|
|
13588
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13582
13589
|
if (!o) return;
|
|
13583
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13590
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13584
13591
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13585
13592
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13586
13593
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13587
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13594
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13588
13595
|
}
|
|
13589
13596
|
|
|
13590
|
-
function _arrayLikeToArray$
|
|
13597
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13591
13598
|
if (len == null || len > arr.length) len = arr.length;
|
|
13592
13599
|
|
|
13593
13600
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13595,7 +13602,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13595
13602
|
return arr2;
|
|
13596
13603
|
}
|
|
13597
13604
|
|
|
13598
|
-
function _nonIterableRest$
|
|
13605
|
+
function _nonIterableRest$e() {
|
|
13599
13606
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13600
13607
|
}
|
|
13601
13608
|
|
|
@@ -13659,7 +13666,7 @@ reservedProps.forEach(function (name) {
|
|
|
13659
13666
|
// This is a mapping from React prop names to the attribute names.
|
|
13660
13667
|
|
|
13661
13668
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13662
|
-
var _ref2 = _slicedToArray$
|
|
13669
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13663
13670
|
name = _ref2[0],
|
|
13664
13671
|
attributeName = _ref2[1];
|
|
13665
13672
|
|
|
@@ -16059,31 +16066,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16059
16066
|
return true;
|
|
16060
16067
|
};
|
|
16061
16068
|
|
|
16062
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16069
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16063
16070
|
|
|
16064
16071
|
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."); }
|
|
16065
16072
|
|
|
16066
16073
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16067
16074
|
|
|
16068
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16075
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16069
16076
|
|
|
16070
|
-
function ownKeys$
|
|
16077
|
+
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; }
|
|
16071
16078
|
|
|
16072
|
-
function _objectSpread$
|
|
16079
|
+
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; }
|
|
16073
16080
|
|
|
16074
|
-
function _defineProperty$
|
|
16081
|
+
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; }
|
|
16075
16082
|
|
|
16076
|
-
function _slicedToArray$
|
|
16083
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16077
16084
|
|
|
16078
|
-
function _nonIterableRest$
|
|
16085
|
+
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."); }
|
|
16079
16086
|
|
|
16080
|
-
function _unsupportedIterableToArray$
|
|
16087
|
+
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); }
|
|
16081
16088
|
|
|
16082
|
-
function _arrayLikeToArray$
|
|
16089
|
+
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; }
|
|
16083
16090
|
|
|
16084
|
-
function _iterableToArrayLimit$
|
|
16091
|
+
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; }
|
|
16085
16092
|
|
|
16086
|
-
function _arrayWithHoles$
|
|
16093
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16087
16094
|
|
|
16088
16095
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16089
16096
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16163,11 +16170,11 @@ function allFilesAccepted(_ref) {
|
|
|
16163
16170
|
|
|
16164
16171
|
return files.every(function (file) {
|
|
16165
16172
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16166
|
-
_fileAccepted2 = _slicedToArray$
|
|
16173
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16167
16174
|
accepted = _fileAccepted2[0];
|
|
16168
16175
|
|
|
16169
16176
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16170
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16177
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16171
16178
|
sizeMatch = _fileMatchSize2[0];
|
|
16172
16179
|
|
|
16173
16180
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16264,7 +16271,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16264
16271
|
function pickerOptionsFromAccept(accept) {
|
|
16265
16272
|
if (isDefined(accept)) {
|
|
16266
16273
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16267
|
-
var _ref3 = _slicedToArray$
|
|
16274
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16268
16275
|
mimeType = _ref3[0],
|
|
16269
16276
|
ext = _ref3[1];
|
|
16270
16277
|
|
|
@@ -16282,11 +16289,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16282
16289
|
|
|
16283
16290
|
return ok;
|
|
16284
16291
|
}).reduce(function (agg, _ref4) {
|
|
16285
|
-
var _ref5 = _slicedToArray$
|
|
16292
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16286
16293
|
mimeType = _ref5[0],
|
|
16287
16294
|
ext = _ref5[1];
|
|
16288
16295
|
|
|
16289
|
-
return _objectSpread$
|
|
16296
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16290
16297
|
}, {});
|
|
16291
16298
|
return [{
|
|
16292
16299
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16306,7 +16313,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16306
16313
|
function acceptPropAsAcceptAttr(accept) {
|
|
16307
16314
|
if (isDefined(accept)) {
|
|
16308
16315
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16309
|
-
var _ref7 = _slicedToArray$
|
|
16316
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16310
16317
|
mimeType = _ref7[0],
|
|
16311
16318
|
ext = _ref7[1];
|
|
16312
16319
|
|
|
@@ -16374,40 +16381,40 @@ function isExt(v) {
|
|
|
16374
16381
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16375
16382
|
*/
|
|
16376
16383
|
|
|
16377
|
-
var _excluded$
|
|
16378
|
-
_excluded2$
|
|
16384
|
+
var _excluded$d = ["children"],
|
|
16385
|
+
_excluded2$3 = ["open"],
|
|
16379
16386
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16380
16387
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16381
16388
|
|
|
16382
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16389
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16383
16390
|
|
|
16384
16391
|
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."); }
|
|
16385
16392
|
|
|
16386
16393
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16387
16394
|
|
|
16388
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16395
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16389
16396
|
|
|
16390
|
-
function _slicedToArray$
|
|
16397
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16391
16398
|
|
|
16392
|
-
function _nonIterableRest$
|
|
16399
|
+
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."); }
|
|
16393
16400
|
|
|
16394
|
-
function _unsupportedIterableToArray$
|
|
16401
|
+
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); }
|
|
16395
16402
|
|
|
16396
|
-
function _arrayLikeToArray$
|
|
16403
|
+
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; }
|
|
16397
16404
|
|
|
16398
|
-
function _iterableToArrayLimit$
|
|
16405
|
+
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; }
|
|
16399
16406
|
|
|
16400
|
-
function _arrayWithHoles$
|
|
16407
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16401
16408
|
|
|
16402
|
-
function ownKeys$
|
|
16409
|
+
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; }
|
|
16403
16410
|
|
|
16404
|
-
function _objectSpread$
|
|
16411
|
+
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; }
|
|
16405
16412
|
|
|
16406
|
-
function _defineProperty$
|
|
16413
|
+
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; }
|
|
16407
16414
|
|
|
16408
|
-
function _objectWithoutProperties$
|
|
16415
|
+
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; }
|
|
16409
16416
|
|
|
16410
|
-
function _objectWithoutPropertiesLoose$
|
|
16417
|
+
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; }
|
|
16411
16418
|
/**
|
|
16412
16419
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16413
16420
|
*
|
|
@@ -16425,11 +16432,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16425
16432
|
|
|
16426
16433
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16427
16434
|
var children = _ref.children,
|
|
16428
|
-
params = _objectWithoutProperties$
|
|
16435
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16429
16436
|
|
|
16430
16437
|
var _useDropzone = useDropzone(params),
|
|
16431
16438
|
open = _useDropzone.open,
|
|
16432
|
-
props = _objectWithoutProperties$
|
|
16439
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16433
16440
|
|
|
16434
16441
|
useImperativeHandle(ref, function () {
|
|
16435
16442
|
return {
|
|
@@ -16437,13 +16444,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16437
16444
|
};
|
|
16438
16445
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16439
16446
|
|
|
16440
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16447
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16441
16448
|
open: open
|
|
16442
16449
|
})));
|
|
16443
16450
|
});
|
|
16444
16451
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16445
16452
|
|
|
16446
|
-
var defaultProps$
|
|
16453
|
+
var defaultProps$1 = {
|
|
16447
16454
|
disabled: false,
|
|
16448
16455
|
getFilesFromEvent: fromEvent,
|
|
16449
16456
|
maxSize: Infinity,
|
|
@@ -16459,7 +16466,7 @@ var defaultProps$2 = {
|
|
|
16459
16466
|
useFsAccessApi: true,
|
|
16460
16467
|
autoFocus: false
|
|
16461
16468
|
};
|
|
16462
|
-
Dropzone.defaultProps = defaultProps$
|
|
16469
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16463
16470
|
Dropzone.propTypes = {
|
|
16464
16471
|
/**
|
|
16465
16472
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16810,7 +16817,7 @@ var initialState = {
|
|
|
16810
16817
|
function useDropzone() {
|
|
16811
16818
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16812
16819
|
|
|
16813
|
-
var _defaultProps$props = _objectSpread$
|
|
16820
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16814
16821
|
accept = _defaultProps$props.accept,
|
|
16815
16822
|
disabled = _defaultProps$props.disabled,
|
|
16816
16823
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16857,7 +16864,7 @@ function useDropzone() {
|
|
|
16857
16864
|
var inputRef = useRef(null);
|
|
16858
16865
|
|
|
16859
16866
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16860
|
-
_useReducer2 = _slicedToArray$
|
|
16867
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16861
16868
|
state = _useReducer2[0],
|
|
16862
16869
|
dispatch = _useReducer2[1];
|
|
16863
16870
|
|
|
@@ -17027,12 +17034,12 @@ function useDropzone() {
|
|
|
17027
17034
|
var fileRejections = [];
|
|
17028
17035
|
files.forEach(function (file) {
|
|
17029
17036
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17030
|
-
_fileAccepted2 = _slicedToArray$
|
|
17037
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17031
17038
|
accepted = _fileAccepted2[0],
|
|
17032
17039
|
acceptError = _fileAccepted2[1];
|
|
17033
17040
|
|
|
17034
17041
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17035
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17042
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17036
17043
|
sizeMatch = _fileMatchSize2[0],
|
|
17037
17044
|
sizeError = _fileMatchSize2[1];
|
|
17038
17045
|
|
|
@@ -17233,9 +17240,9 @@ function useDropzone() {
|
|
|
17233
17240
|
onDragOver = _ref2.onDragOver,
|
|
17234
17241
|
onDragLeave = _ref2.onDragLeave,
|
|
17235
17242
|
onDrop = _ref2.onDrop,
|
|
17236
|
-
rest = _objectWithoutProperties$
|
|
17243
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17237
17244
|
|
|
17238
|
-
return _objectSpread$
|
|
17245
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17239
17246
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17240
17247
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17241
17248
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17260,9 +17267,9 @@ function useDropzone() {
|
|
|
17260
17267
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17261
17268
|
onChange = _ref3.onChange,
|
|
17262
17269
|
onClick = _ref3.onClick,
|
|
17263
|
-
rest = _objectWithoutProperties$
|
|
17270
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17264
17271
|
|
|
17265
|
-
var inputProps = _defineProperty$
|
|
17272
|
+
var inputProps = _defineProperty$r({
|
|
17266
17273
|
accept: acceptAttr,
|
|
17267
17274
|
multiple: multiple,
|
|
17268
17275
|
type: "file",
|
|
@@ -17274,10 +17281,10 @@ function useDropzone() {
|
|
|
17274
17281
|
tabIndex: -1
|
|
17275
17282
|
}, refKey, inputRef);
|
|
17276
17283
|
|
|
17277
|
-
return _objectSpread$
|
|
17284
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17278
17285
|
};
|
|
17279
17286
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17280
|
-
return _objectSpread$
|
|
17287
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17281
17288
|
isFocused: isFocused && !disabled,
|
|
17282
17289
|
getRootProps: getRootProps,
|
|
17283
17290
|
getInputProps: getInputProps,
|
|
@@ -17296,40 +17303,40 @@ function reducer$1(state, action) {
|
|
|
17296
17303
|
/* istanbul ignore next */
|
|
17297
17304
|
switch (action.type) {
|
|
17298
17305
|
case "focus":
|
|
17299
|
-
return _objectSpread$
|
|
17306
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17300
17307
|
isFocused: true
|
|
17301
17308
|
});
|
|
17302
17309
|
|
|
17303
17310
|
case "blur":
|
|
17304
|
-
return _objectSpread$
|
|
17311
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17305
17312
|
isFocused: false
|
|
17306
17313
|
});
|
|
17307
17314
|
|
|
17308
17315
|
case "openDialog":
|
|
17309
|
-
return _objectSpread$
|
|
17316
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17310
17317
|
isFileDialogActive: true
|
|
17311
17318
|
});
|
|
17312
17319
|
|
|
17313
17320
|
case "closeDialog":
|
|
17314
|
-
return _objectSpread$
|
|
17321
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17315
17322
|
isFileDialogActive: false
|
|
17316
17323
|
});
|
|
17317
17324
|
|
|
17318
17325
|
case "setDraggedFiles":
|
|
17319
|
-
return _objectSpread$
|
|
17326
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17320
17327
|
isDragActive: action.isDragActive,
|
|
17321
17328
|
isDragAccept: action.isDragAccept,
|
|
17322
17329
|
isDragReject: action.isDragReject
|
|
17323
17330
|
});
|
|
17324
17331
|
|
|
17325
17332
|
case "setFiles":
|
|
17326
|
-
return _objectSpread$
|
|
17333
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17327
17334
|
acceptedFiles: action.acceptedFiles,
|
|
17328
17335
|
fileRejections: action.fileRejections
|
|
17329
17336
|
});
|
|
17330
17337
|
|
|
17331
17338
|
case "reset":
|
|
17332
|
-
return _objectSpread$
|
|
17339
|
+
return _objectSpread$p({}, initialState);
|
|
17333
17340
|
|
|
17334
17341
|
default:
|
|
17335
17342
|
return state;
|
|
@@ -19555,7 +19562,7 @@ function shallowEqual(a, b) {
|
|
|
19555
19562
|
return true;
|
|
19556
19563
|
}
|
|
19557
19564
|
|
|
19558
|
-
function _typeof$
|
|
19565
|
+
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); }
|
|
19559
19566
|
|
|
19560
19567
|
//
|
|
19561
19568
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19582,9 +19589,7 @@ var FilteredElementKeyMap = {
|
|
|
19582
19589
|
};
|
|
19583
19590
|
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'];
|
|
19584
19591
|
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19592
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19588
19593
|
|
|
19589
19594
|
/** the offset of a chart, which define the blank space all around */
|
|
19590
19595
|
|
|
@@ -19620,7 +19625,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19620
19625
|
};
|
|
19621
19626
|
};
|
|
19622
19627
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19623
|
-
if (!isObject_1(props) || _typeof$
|
|
19628
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19624
19629
|
return null;
|
|
19625
19630
|
}
|
|
19626
19631
|
var out = null;
|
|
@@ -19634,11 +19639,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19634
19639
|
return out;
|
|
19635
19640
|
};
|
|
19636
19641
|
|
|
19637
|
-
var _excluded$
|
|
19638
|
-
_excluded2$
|
|
19639
|
-
function _objectWithoutProperties$
|
|
19640
|
-
function _objectWithoutPropertiesLoose$
|
|
19641
|
-
function _typeof$
|
|
19642
|
+
var _excluded$c = ["children"],
|
|
19643
|
+
_excluded2$2 = ["children"];
|
|
19644
|
+
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; }
|
|
19645
|
+
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; }
|
|
19646
|
+
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); }
|
|
19642
19647
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19643
19648
|
click: 'onClick',
|
|
19644
19649
|
mousedown: 'onMouseDown',
|
|
@@ -19745,7 +19750,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19745
19750
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19746
19751
|
};
|
|
19747
19752
|
var isDotProps = function isDotProps(dot) {
|
|
19748
|
-
return dot && _typeof$
|
|
19753
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19749
19754
|
};
|
|
19750
19755
|
|
|
19751
19756
|
/**
|
|
@@ -19837,10 +19842,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19837
19842
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19838
19843
|
var _ref = nextChild.props || {},
|
|
19839
19844
|
nextChildren = _ref.children,
|
|
19840
|
-
nextProps = _objectWithoutProperties$
|
|
19845
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19841
19846
|
var _ref2 = prevChild.props || {},
|
|
19842
19847
|
prevChildren = _ref2.children,
|
|
19843
|
-
prevProps = _objectWithoutProperties$
|
|
19848
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19844
19849
|
if (nextChildren && prevChildren) {
|
|
19845
19850
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19846
19851
|
}
|
|
@@ -19882,10 +19887,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19882
19887
|
return toArray(children).indexOf(child);
|
|
19883
19888
|
};
|
|
19884
19889
|
|
|
19885
|
-
var _excluded$
|
|
19890
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19886
19891
|
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); }
|
|
19887
|
-
function _objectWithoutProperties$
|
|
19888
|
-
function _objectWithoutPropertiesLoose$
|
|
19892
|
+
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; }
|
|
19893
|
+
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; }
|
|
19889
19894
|
function Surface(props) {
|
|
19890
19895
|
var children = props.children,
|
|
19891
19896
|
width = props.width,
|
|
@@ -19893,7 +19898,7 @@ function Surface(props) {
|
|
|
19893
19898
|
viewBox = props.viewBox,
|
|
19894
19899
|
className = props.className,
|
|
19895
19900
|
style = props.style,
|
|
19896
|
-
others = _objectWithoutProperties$
|
|
19901
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19897
19902
|
var svgView = viewBox || {
|
|
19898
19903
|
width: width,
|
|
19899
19904
|
height: height,
|
|
@@ -19910,14 +19915,14 @@ function Surface(props) {
|
|
|
19910
19915
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19911
19916
|
}
|
|
19912
19917
|
|
|
19913
|
-
var _excluded$
|
|
19918
|
+
var _excluded$a = ["children", "className"];
|
|
19914
19919
|
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); }
|
|
19915
|
-
function _objectWithoutProperties$
|
|
19916
|
-
function _objectWithoutPropertiesLoose$
|
|
19920
|
+
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; }
|
|
19921
|
+
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; }
|
|
19917
19922
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19918
19923
|
var children = props.children,
|
|
19919
19924
|
className = props.className,
|
|
19920
|
-
others = _objectWithoutProperties$
|
|
19925
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19921
19926
|
var layerClass = classNames('recharts-layer', className);
|
|
19922
19927
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19923
19928
|
className: layerClass
|
|
@@ -23332,16 +23337,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23332
23337
|
stackOffsetNone(series, order);
|
|
23333
23338
|
}
|
|
23334
23339
|
|
|
23335
|
-
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); }
|
|
23336
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23337
23340
|
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); }
|
|
23338
|
-
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; }
|
|
23339
|
-
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; }
|
|
23340
|
-
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; }
|
|
23341
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23342
|
-
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); }
|
|
23343
|
-
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; }
|
|
23344
|
-
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; }
|
|
23345
23341
|
var symbolFactories = {
|
|
23346
23342
|
symbolCircle: symbolCircle,
|
|
23347
23343
|
symbolCross: symbolCross,
|
|
@@ -23380,35 +23376,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23380
23376
|
return Math.PI * size * size / 4;
|
|
23381
23377
|
}
|
|
23382
23378
|
};
|
|
23379
|
+
var symbolsDefaultProps = {
|
|
23380
|
+
type: 'circle',
|
|
23381
|
+
size: 64,
|
|
23382
|
+
sizeType: 'area'
|
|
23383
|
+
};
|
|
23383
23384
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23384
23385
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23385
23386
|
};
|
|
23386
|
-
var Symbols = function Symbols(
|
|
23387
|
-
var _ref$type = _ref.type,
|
|
23388
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23389
|
-
_ref$size = _ref.size,
|
|
23390
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23391
|
-
_ref$sizeType = _ref.sizeType,
|
|
23392
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23393
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23394
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23395
|
-
type: type,
|
|
23396
|
-
size: size,
|
|
23397
|
-
sizeType: sizeType
|
|
23398
|
-
});
|
|
23399
|
-
|
|
23387
|
+
var Symbols = function Symbols(props) {
|
|
23400
23388
|
/**
|
|
23401
23389
|
* Calculate the path of curve
|
|
23402
23390
|
* @return {String} path
|
|
23403
23391
|
*/
|
|
23404
23392
|
var getPath = function getPath() {
|
|
23393
|
+
var size = props.size,
|
|
23394
|
+
sizeType = props.sizeType,
|
|
23395
|
+
type = props.type;
|
|
23405
23396
|
var symbolFactory = getSymbolFactory(type);
|
|
23406
23397
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23407
23398
|
return symbol();
|
|
23408
23399
|
};
|
|
23409
23400
|
var className = props.className,
|
|
23410
23401
|
cx = props.cx,
|
|
23411
|
-
cy = props.cy
|
|
23402
|
+
cy = props.cy,
|
|
23403
|
+
size = props.size;
|
|
23412
23404
|
var filteredProps = filterProps(props, true);
|
|
23413
23405
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23414
23406
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23419,34 +23411,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23419
23411
|
}
|
|
23420
23412
|
return null;
|
|
23421
23413
|
};
|
|
23414
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23422
23415
|
Symbols.registerSymbol = registerSymbol;
|
|
23423
23416
|
|
|
23424
|
-
function _typeof$
|
|
23417
|
+
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); }
|
|
23425
23418
|
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); }
|
|
23426
|
-
function ownKeys$
|
|
23427
|
-
function _objectSpread$
|
|
23428
|
-
function _classCallCheck$
|
|
23429
|
-
function _defineProperties$
|
|
23430
|
-
function _createClass$
|
|
23431
|
-
function _inherits$
|
|
23432
|
-
function _setPrototypeOf$
|
|
23433
|
-
function _createSuper$
|
|
23434
|
-
function _possibleConstructorReturn$
|
|
23435
|
-
function _assertThisInitialized$
|
|
23436
|
-
function _isNativeReflectConstruct$
|
|
23437
|
-
function _getPrototypeOf$
|
|
23438
|
-
function _defineProperty$
|
|
23439
|
-
function _toPropertyKey$
|
|
23440
|
-
function _toPrimitive$
|
|
23419
|
+
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; }
|
|
23420
|
+
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; }
|
|
23421
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23422
|
+
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); } }
|
|
23423
|
+
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; }
|
|
23424
|
+
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); }
|
|
23425
|
+
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); }
|
|
23426
|
+
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); }; }
|
|
23427
|
+
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); }
|
|
23428
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23429
|
+
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; } }
|
|
23430
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23431
|
+
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; }
|
|
23432
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23433
|
+
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); }
|
|
23441
23434
|
var SIZE = 32;
|
|
23442
23435
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23443
|
-
_inherits$
|
|
23444
|
-
var _super = _createSuper$
|
|
23436
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23437
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23445
23438
|
function DefaultLegendContent() {
|
|
23446
|
-
_classCallCheck$
|
|
23439
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23447
23440
|
return _super.apply(this, arguments);
|
|
23448
23441
|
}
|
|
23449
|
-
_createClass$
|
|
23442
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23450
23443
|
key: "renderIcon",
|
|
23451
23444
|
value:
|
|
23452
23445
|
/**
|
|
@@ -23491,7 +23484,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23491
23484
|
});
|
|
23492
23485
|
}
|
|
23493
23486
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23494
|
-
var iconProps = _objectSpread$
|
|
23487
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23495
23488
|
delete iconProps.legendIcon;
|
|
23496
23489
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23497
23490
|
}
|
|
@@ -23539,7 +23532,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23539
23532
|
var finalFormatter = entry.formatter || formatter;
|
|
23540
23533
|
var className = classNames((_classNames = {
|
|
23541
23534
|
'recharts-legend-item': true
|
|
23542
|
-
}, _defineProperty$
|
|
23535
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23543
23536
|
if (entry.type === 'none') {
|
|
23544
23537
|
return null;
|
|
23545
23538
|
}
|
|
@@ -23584,8 +23577,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23584
23577
|
}]);
|
|
23585
23578
|
return DefaultLegendContent;
|
|
23586
23579
|
}(PureComponent);
|
|
23587
|
-
_defineProperty$
|
|
23588
|
-
_defineProperty$
|
|
23580
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23581
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23589
23582
|
iconSize: 14,
|
|
23590
23583
|
layout: 'horizontal',
|
|
23591
23584
|
align: 'center',
|
|
@@ -23593,25 +23586,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23593
23586
|
inactiveColor: '#ccc'
|
|
23594
23587
|
});
|
|
23595
23588
|
|
|
23596
|
-
function _typeof$
|
|
23597
|
-
var _excluded$
|
|
23598
|
-
function ownKeys$
|
|
23599
|
-
function _objectSpread$
|
|
23600
|
-
function _classCallCheck$
|
|
23601
|
-
function _defineProperties$
|
|
23602
|
-
function _createClass$
|
|
23603
|
-
function _inherits$
|
|
23604
|
-
function _setPrototypeOf$
|
|
23605
|
-
function _createSuper$
|
|
23606
|
-
function _possibleConstructorReturn$
|
|
23607
|
-
function _assertThisInitialized$
|
|
23608
|
-
function _isNativeReflectConstruct$
|
|
23609
|
-
function _getPrototypeOf$
|
|
23610
|
-
function _defineProperty$
|
|
23611
|
-
function _toPropertyKey$
|
|
23612
|
-
function _toPrimitive$
|
|
23613
|
-
function _objectWithoutProperties$
|
|
23614
|
-
function _objectWithoutPropertiesLoose$
|
|
23589
|
+
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); }
|
|
23590
|
+
var _excluded$9 = ["ref"];
|
|
23591
|
+
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; }
|
|
23592
|
+
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; }
|
|
23593
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23594
|
+
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); } }
|
|
23595
|
+
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; }
|
|
23596
|
+
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); }
|
|
23597
|
+
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); }
|
|
23598
|
+
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); }; }
|
|
23599
|
+
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); }
|
|
23600
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23601
|
+
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; } }
|
|
23602
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23603
|
+
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; }
|
|
23604
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23605
|
+
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); }
|
|
23606
|
+
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; }
|
|
23607
|
+
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; }
|
|
23615
23608
|
function defaultUniqBy$1(entry) {
|
|
23616
23609
|
return entry.value;
|
|
23617
23610
|
}
|
|
@@ -23632,27 +23625,27 @@ function renderContent$1(content, props) {
|
|
|
23632
23625
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23633
23626
|
}
|
|
23634
23627
|
props.ref;
|
|
23635
|
-
var otherProps = _objectWithoutProperties$
|
|
23628
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23636
23629
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23637
23630
|
}
|
|
23638
23631
|
var EPS$2 = 1;
|
|
23639
23632
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23640
|
-
_inherits$
|
|
23641
|
-
var _super = _createSuper$
|
|
23633
|
+
_inherits$7(Legend, _PureComponent);
|
|
23634
|
+
var _super = _createSuper$7(Legend);
|
|
23642
23635
|
function Legend() {
|
|
23643
23636
|
var _this;
|
|
23644
|
-
_classCallCheck$
|
|
23637
|
+
_classCallCheck$9(this, Legend);
|
|
23645
23638
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23646
23639
|
args[_key] = arguments[_key];
|
|
23647
23640
|
}
|
|
23648
23641
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23649
|
-
_defineProperty$
|
|
23642
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23650
23643
|
boxWidth: -1,
|
|
23651
23644
|
boxHeight: -1
|
|
23652
23645
|
});
|
|
23653
23646
|
return _this;
|
|
23654
23647
|
}
|
|
23655
|
-
_createClass$
|
|
23648
|
+
_createClass$9(Legend, [{
|
|
23656
23649
|
key: "componentDidMount",
|
|
23657
23650
|
value: function componentDidMount() {
|
|
23658
23651
|
this.updateBBox();
|
|
@@ -23727,7 +23720,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23727
23720
|
};
|
|
23728
23721
|
}
|
|
23729
23722
|
}
|
|
23730
|
-
return _objectSpread$
|
|
23723
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23731
23724
|
}
|
|
23732
23725
|
}, {
|
|
23733
23726
|
key: "updateBBox",
|
|
@@ -23770,7 +23763,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23770
23763
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23771
23764
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23772
23765
|
payload = _this$props2.payload;
|
|
23773
|
-
var outerStyle = _objectSpread$
|
|
23766
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23774
23767
|
position: 'absolute',
|
|
23775
23768
|
width: width || 'auto',
|
|
23776
23769
|
height: height || 'auto'
|
|
@@ -23781,7 +23774,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23781
23774
|
ref: function ref(node) {
|
|
23782
23775
|
_this2.wrapperNode = node;
|
|
23783
23776
|
}
|
|
23784
|
-
}, renderContent$1(content, _objectSpread$
|
|
23777
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23785
23778
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23786
23779
|
})));
|
|
23787
23780
|
}
|
|
@@ -23804,8 +23797,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23804
23797
|
}]);
|
|
23805
23798
|
return Legend;
|
|
23806
23799
|
}(PureComponent);
|
|
23807
|
-
_defineProperty$
|
|
23808
|
-
_defineProperty$
|
|
23800
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23801
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23809
23802
|
iconSize: 14,
|
|
23810
23803
|
layout: 'horizontal',
|
|
23811
23804
|
align: 'center',
|
|
@@ -24369,13 +24362,13 @@ function setRafTimeout(callback) {
|
|
|
24369
24362
|
requestAnimationFrame(shouldUpdate);
|
|
24370
24363
|
}
|
|
24371
24364
|
|
|
24372
|
-
function _typeof$
|
|
24373
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24374
|
-
function _nonIterableRest$
|
|
24375
|
-
function _unsupportedIterableToArray$
|
|
24376
|
-
function _arrayLikeToArray$
|
|
24365
|
+
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); }
|
|
24366
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24367
|
+
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."); }
|
|
24368
|
+
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); }
|
|
24369
|
+
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; }
|
|
24377
24370
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24378
|
-
function _arrayWithHoles$
|
|
24371
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24379
24372
|
function createAnimateManager() {
|
|
24380
24373
|
var currStyle = {};
|
|
24381
24374
|
var handleChange = function handleChange() {
|
|
@@ -24402,7 +24395,7 @@ function createAnimateManager() {
|
|
|
24402
24395
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24403
24396
|
return;
|
|
24404
24397
|
}
|
|
24405
|
-
if (_typeof$
|
|
24398
|
+
if (_typeof$o(_style) === 'object') {
|
|
24406
24399
|
currStyle = _style;
|
|
24407
24400
|
handleChange(currStyle);
|
|
24408
24401
|
}
|
|
@@ -24429,12 +24422,12 @@ function createAnimateManager() {
|
|
|
24429
24422
|
};
|
|
24430
24423
|
}
|
|
24431
24424
|
|
|
24432
|
-
function _typeof$
|
|
24433
|
-
function ownKeys$
|
|
24434
|
-
function _objectSpread$
|
|
24435
|
-
function _defineProperty$
|
|
24436
|
-
function _toPropertyKey$
|
|
24437
|
-
function _toPrimitive$
|
|
24425
|
+
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); }
|
|
24426
|
+
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; }
|
|
24427
|
+
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; }
|
|
24428
|
+
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; }
|
|
24429
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24430
|
+
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); }
|
|
24438
24431
|
/* eslint no-console: 0 */
|
|
24439
24432
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24440
24433
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24466,7 +24459,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24466
24459
|
*/
|
|
24467
24460
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24468
24461
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24469
|
-
return _defineProperty$
|
|
24462
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24470
24463
|
}
|
|
24471
24464
|
var isTransition = name === 'transition';
|
|
24472
24465
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24477,7 +24470,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24477
24470
|
if (isTransition) {
|
|
24478
24471
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24479
24472
|
}
|
|
24480
|
-
return _objectSpread$
|
|
24473
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24481
24474
|
}, {});
|
|
24482
24475
|
};
|
|
24483
24476
|
|
|
@@ -24487,7 +24480,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24487
24480
|
*/
|
|
24488
24481
|
var mapObject = function mapObject(fn, obj) {
|
|
24489
24482
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24490
|
-
return _objectSpread$
|
|
24483
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24491
24484
|
}, {});
|
|
24492
24485
|
};
|
|
24493
24486
|
|
|
@@ -24497,7 +24490,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24497
24490
|
*/
|
|
24498
24491
|
var translateStyle = function translateStyle(style) {
|
|
24499
24492
|
return Object.keys(style).reduce(function (res, key) {
|
|
24500
|
-
return _objectSpread$
|
|
24493
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24501
24494
|
}, style);
|
|
24502
24495
|
};
|
|
24503
24496
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24525,16 +24518,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24525
24518
|
}
|
|
24526
24519
|
};
|
|
24527
24520
|
|
|
24528
|
-
function _slicedToArray$
|
|
24529
|
-
function _nonIterableRest$
|
|
24530
|
-
function _iterableToArrayLimit$
|
|
24531
|
-
function _arrayWithHoles$
|
|
24532
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24521
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24522
|
+
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."); }
|
|
24523
|
+
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; } }
|
|
24524
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24525
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24533
24526
|
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."); }
|
|
24534
|
-
function _unsupportedIterableToArray$
|
|
24527
|
+
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); }
|
|
24535
24528
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24536
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24537
|
-
function _arrayLikeToArray$
|
|
24529
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24530
|
+
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; }
|
|
24538
24531
|
var ACCURACY = 1e-4;
|
|
24539
24532
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24540
24533
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24610,7 +24603,7 @@ var configBezier = function configBezier() {
|
|
|
24610
24603
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24611
24604
|
return parseFloat(x);
|
|
24612
24605
|
});
|
|
24613
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24606
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24614
24607
|
x1 = _easing$1$split$0$spl2[0];
|
|
24615
24608
|
y1 = _easing$1$split$0$spl2[1];
|
|
24616
24609
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24703,22 +24696,22 @@ var configEasing = function configEasing() {
|
|
|
24703
24696
|
return null;
|
|
24704
24697
|
};
|
|
24705
24698
|
|
|
24706
|
-
function _typeof$
|
|
24707
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24699
|
+
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); }
|
|
24700
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24708
24701
|
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."); }
|
|
24709
24702
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24710
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24711
|
-
function ownKeys$
|
|
24712
|
-
function _objectSpread$
|
|
24713
|
-
function _defineProperty$
|
|
24714
|
-
function _toPropertyKey$
|
|
24715
|
-
function _toPrimitive$
|
|
24716
|
-
function _slicedToArray$
|
|
24717
|
-
function _nonIterableRest$
|
|
24718
|
-
function _unsupportedIterableToArray$
|
|
24719
|
-
function _arrayLikeToArray$
|
|
24720
|
-
function _iterableToArrayLimit$
|
|
24721
|
-
function _arrayWithHoles$
|
|
24703
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24704
|
+
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; }
|
|
24705
|
+
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; }
|
|
24706
|
+
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; }
|
|
24707
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24708
|
+
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); }
|
|
24709
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24710
|
+
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."); }
|
|
24711
|
+
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); }
|
|
24712
|
+
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; }
|
|
24713
|
+
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; } }
|
|
24714
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24722
24715
|
var alpha = function alpha(begin, end, k) {
|
|
24723
24716
|
return begin + (end - begin) * k;
|
|
24724
24717
|
};
|
|
@@ -24736,10 +24729,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24736
24729
|
var nextStepVals = mapObject(function (key, val) {
|
|
24737
24730
|
if (needContinue(val)) {
|
|
24738
24731
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24739
|
-
_easing2 = _slicedToArray$
|
|
24732
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24740
24733
|
newX = _easing2[0],
|
|
24741
24734
|
newV = _easing2[1];
|
|
24742
|
-
return _objectSpread$
|
|
24735
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24743
24736
|
from: newX,
|
|
24744
24737
|
velocity: newV
|
|
24745
24738
|
});
|
|
@@ -24749,7 +24742,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24749
24742
|
if (steps < 1) {
|
|
24750
24743
|
return mapObject(function (key, val) {
|
|
24751
24744
|
if (needContinue(val)) {
|
|
24752
|
-
return _objectSpread$
|
|
24745
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24753
24746
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24754
24747
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24755
24748
|
});
|
|
@@ -24764,10 +24757,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24764
24757
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24765
24758
|
var interKeys = getIntersectionKeys(from, to);
|
|
24766
24759
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24767
|
-
return _objectSpread$
|
|
24760
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24768
24761
|
}, {});
|
|
24769
24762
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24770
|
-
return _objectSpread$
|
|
24763
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24771
24764
|
from: from[key],
|
|
24772
24765
|
velocity: 0,
|
|
24773
24766
|
to: to[key]
|
|
@@ -24797,7 +24790,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24797
24790
|
var steps = deltaTime / easing.dt;
|
|
24798
24791
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24799
24792
|
// get union set and add compatible prefix
|
|
24800
|
-
render(_objectSpread$
|
|
24793
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24801
24794
|
preTime = now;
|
|
24802
24795
|
if (!shouldStopAnimation()) {
|
|
24803
24796
|
cafId = requestAnimationFrame(update);
|
|
@@ -24815,14 +24808,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24815
24808
|
}, timingStyle);
|
|
24816
24809
|
|
|
24817
24810
|
// get union set and add compatible prefix
|
|
24818
|
-
render(_objectSpread$
|
|
24811
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24819
24812
|
if (t < 1) {
|
|
24820
24813
|
cafId = requestAnimationFrame(update);
|
|
24821
24814
|
} else {
|
|
24822
24815
|
var finalStyle = mapObject(function (key, val) {
|
|
24823
24816
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24824
24817
|
}, timingStyle);
|
|
24825
|
-
render(_objectSpread$
|
|
24818
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24826
24819
|
}
|
|
24827
24820
|
};
|
|
24828
24821
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24838,37 +24831,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24838
24831
|
};
|
|
24839
24832
|
});
|
|
24840
24833
|
|
|
24841
|
-
function _typeof$
|
|
24842
|
-
var _excluded$
|
|
24843
|
-
function _objectWithoutProperties$
|
|
24844
|
-
function _objectWithoutPropertiesLoose$
|
|
24845
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24834
|
+
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); }
|
|
24835
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24836
|
+
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; }
|
|
24837
|
+
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; }
|
|
24838
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24846
24839
|
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."); }
|
|
24847
|
-
function _unsupportedIterableToArray$
|
|
24840
|
+
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); }
|
|
24848
24841
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24849
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24850
|
-
function _arrayLikeToArray$
|
|
24851
|
-
function ownKeys$
|
|
24852
|
-
function _objectSpread$
|
|
24853
|
-
function _defineProperty$
|
|
24854
|
-
function _classCallCheck$
|
|
24855
|
-
function _defineProperties$
|
|
24856
|
-
function _createClass$
|
|
24857
|
-
function _toPropertyKey$
|
|
24858
|
-
function _toPrimitive$
|
|
24859
|
-
function _inherits$
|
|
24860
|
-
function _setPrototypeOf$
|
|
24861
|
-
function _createSuper$
|
|
24862
|
-
function _possibleConstructorReturn$
|
|
24863
|
-
function _assertThisInitialized$
|
|
24864
|
-
function _isNativeReflectConstruct$
|
|
24865
|
-
function _getPrototypeOf$
|
|
24842
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24843
|
+
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; }
|
|
24844
|
+
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; }
|
|
24845
|
+
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; }
|
|
24846
|
+
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; }
|
|
24847
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24848
|
+
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); } }
|
|
24849
|
+
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; }
|
|
24850
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24851
|
+
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); }
|
|
24852
|
+
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); }
|
|
24853
|
+
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); }
|
|
24854
|
+
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); }; }
|
|
24855
|
+
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); }
|
|
24856
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24857
|
+
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; } }
|
|
24858
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24866
24859
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24867
|
-
_inherits$
|
|
24868
|
-
var _super = _createSuper$
|
|
24860
|
+
_inherits$6(Animate, _PureComponent);
|
|
24861
|
+
var _super = _createSuper$6(Animate);
|
|
24869
24862
|
function Animate(props, context) {
|
|
24870
24863
|
var _this;
|
|
24871
|
-
_classCallCheck$
|
|
24864
|
+
_classCallCheck$8(this, Animate);
|
|
24872
24865
|
_this = _super.call(this, props, context);
|
|
24873
24866
|
var _this$props = _this.props,
|
|
24874
24867
|
isActive = _this$props.isActive,
|
|
@@ -24878,8 +24871,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24878
24871
|
steps = _this$props.steps,
|
|
24879
24872
|
children = _this$props.children,
|
|
24880
24873
|
duration = _this$props.duration;
|
|
24881
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24882
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24874
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24875
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24883
24876
|
if (!isActive || duration <= 0) {
|
|
24884
24877
|
_this.state = {
|
|
24885
24878
|
style: {}
|
|
@@ -24891,7 +24884,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24891
24884
|
style: to
|
|
24892
24885
|
};
|
|
24893
24886
|
}
|
|
24894
|
-
return _possibleConstructorReturn$
|
|
24887
|
+
return _possibleConstructorReturn$6(_this);
|
|
24895
24888
|
}
|
|
24896
24889
|
if (steps && steps.length) {
|
|
24897
24890
|
_this.state = {
|
|
@@ -24902,10 +24895,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24902
24895
|
_this.state = {
|
|
24903
24896
|
style: from
|
|
24904
24897
|
};
|
|
24905
|
-
return _possibleConstructorReturn$
|
|
24898
|
+
return _possibleConstructorReturn$6(_this);
|
|
24906
24899
|
}
|
|
24907
24900
|
_this.state = {
|
|
24908
|
-
style: attributeName ? _defineProperty$
|
|
24901
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24909
24902
|
};
|
|
24910
24903
|
} else {
|
|
24911
24904
|
_this.state = {
|
|
@@ -24914,7 +24907,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24914
24907
|
}
|
|
24915
24908
|
return _this;
|
|
24916
24909
|
}
|
|
24917
|
-
_createClass$
|
|
24910
|
+
_createClass$8(Animate, [{
|
|
24918
24911
|
key: "componentDidMount",
|
|
24919
24912
|
value: function componentDidMount() {
|
|
24920
24913
|
var _this$props2 = this.props,
|
|
@@ -24942,7 +24935,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24942
24935
|
}
|
|
24943
24936
|
if (!isActive) {
|
|
24944
24937
|
var newState = {
|
|
24945
|
-
style: attributeName ? _defineProperty$
|
|
24938
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24946
24939
|
};
|
|
24947
24940
|
if (this.state && style) {
|
|
24948
24941
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24965,14 +24958,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24965
24958
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24966
24959
|
if (this.state && style) {
|
|
24967
24960
|
var _newState = {
|
|
24968
|
-
style: attributeName ? _defineProperty$
|
|
24961
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24969
24962
|
};
|
|
24970
24963
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24971
24964
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24972
24965
|
this.setState(_newState);
|
|
24973
24966
|
}
|
|
24974
24967
|
}
|
|
24975
|
-
this.runAnimation(_objectSpread$
|
|
24968
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24976
24969
|
from: from,
|
|
24977
24970
|
begin: 0
|
|
24978
24971
|
}));
|
|
@@ -25055,7 +25048,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25055
25048
|
}), duration]);
|
|
25056
25049
|
}
|
|
25057
25050
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25058
|
-
var newStyle = _objectSpread$
|
|
25051
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25059
25052
|
transition: transition
|
|
25060
25053
|
});
|
|
25061
25054
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25087,9 +25080,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25087
25080
|
this.runStepAnimation(props);
|
|
25088
25081
|
return;
|
|
25089
25082
|
}
|
|
25090
|
-
var to = attributeName ? _defineProperty$
|
|
25083
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25091
25084
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25092
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25085
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25093
25086
|
transition: transition
|
|
25094
25087
|
}), duration, onAnimationEnd]);
|
|
25095
25088
|
}
|
|
@@ -25110,7 +25103,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25110
25103
|
_this$props4.onAnimationEnd;
|
|
25111
25104
|
_this$props4.shouldReAnimate;
|
|
25112
25105
|
_this$props4.onAnimationReStart;
|
|
25113
|
-
var others = _objectWithoutProperties$
|
|
25106
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25114
25107
|
var count = Children.count(children);
|
|
25115
25108
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25116
25109
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25125,8 +25118,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25125
25118
|
_container$props$styl = _container$props.style,
|
|
25126
25119
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25127
25120
|
className = _container$props.className;
|
|
25128
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25129
|
-
style: _objectSpread$
|
|
25121
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25122
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25130
25123
|
className: className
|
|
25131
25124
|
}));
|
|
25132
25125
|
return res;
|
|
@@ -25651,10 +25644,10 @@ var defineProperty$2 = (function() {
|
|
|
25651
25644
|
} catch (e) {}
|
|
25652
25645
|
}());
|
|
25653
25646
|
|
|
25654
|
-
var _defineProperty$
|
|
25647
|
+
var _defineProperty$l = defineProperty$2;
|
|
25655
25648
|
|
|
25656
25649
|
var constant$1 = constant_1,
|
|
25657
|
-
defineProperty$1 = _defineProperty$
|
|
25650
|
+
defineProperty$1 = _defineProperty$l,
|
|
25658
25651
|
identity$7 = identity_1;
|
|
25659
25652
|
|
|
25660
25653
|
/**
|
|
@@ -25831,18 +25824,18 @@ var sortBy_1 = sortBy;
|
|
|
25831
25824
|
/**
|
|
25832
25825
|
* @fileOverview Default Tooltip Content
|
|
25833
25826
|
*/
|
|
25834
|
-
function _typeof$
|
|
25835
|
-
function _slicedToArray$
|
|
25836
|
-
function _nonIterableRest$
|
|
25837
|
-
function _unsupportedIterableToArray$
|
|
25838
|
-
function _arrayLikeToArray$
|
|
25839
|
-
function _iterableToArrayLimit$
|
|
25840
|
-
function _arrayWithHoles$
|
|
25841
|
-
function ownKeys$
|
|
25842
|
-
function _objectSpread$
|
|
25843
|
-
function _defineProperty$
|
|
25844
|
-
function _toPropertyKey$
|
|
25845
|
-
function _toPrimitive$
|
|
25827
|
+
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); }
|
|
25828
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25829
|
+
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."); }
|
|
25830
|
+
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); }
|
|
25831
|
+
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; }
|
|
25832
|
+
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; } }
|
|
25833
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25834
|
+
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; }
|
|
25835
|
+
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; }
|
|
25836
|
+
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; }
|
|
25837
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25838
|
+
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); }
|
|
25846
25839
|
function defaultFormatter(value) {
|
|
25847
25840
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25848
25841
|
}
|
|
@@ -25872,7 +25865,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25872
25865
|
if (entry.type === 'none') {
|
|
25873
25866
|
return null;
|
|
25874
25867
|
}
|
|
25875
|
-
var finalItemStyle = _objectSpread$
|
|
25868
|
+
var finalItemStyle = _objectSpread$j({
|
|
25876
25869
|
display: 'block',
|
|
25877
25870
|
paddingTop: 4,
|
|
25878
25871
|
paddingBottom: 4,
|
|
@@ -25886,7 +25879,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25886
25879
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25887
25880
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25888
25881
|
if (Array.isArray(formatted)) {
|
|
25889
|
-
var _formatted = _slicedToArray$
|
|
25882
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25890
25883
|
finalValue = _formatted[0];
|
|
25891
25884
|
finalName = _formatted[1];
|
|
25892
25885
|
} else {
|
|
@@ -25918,14 +25911,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25918
25911
|
}
|
|
25919
25912
|
return null;
|
|
25920
25913
|
};
|
|
25921
|
-
var finalStyle = _objectSpread$
|
|
25914
|
+
var finalStyle = _objectSpread$j({
|
|
25922
25915
|
margin: 0,
|
|
25923
25916
|
padding: 10,
|
|
25924
25917
|
backgroundColor: '#fff',
|
|
25925
25918
|
border: '1px solid #ccc',
|
|
25926
25919
|
whiteSpace: 'nowrap'
|
|
25927
25920
|
}, contentStyle);
|
|
25928
|
-
var finalLabelStyle = _objectSpread$
|
|
25921
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25929
25922
|
margin: 0
|
|
25930
25923
|
}, labelStyle);
|
|
25931
25924
|
var hasLabel = !isNil_1(label);
|
|
@@ -25966,22 +25959,18 @@ var Global = {
|
|
|
25966
25959
|
}
|
|
25967
25960
|
};
|
|
25968
25961
|
|
|
25969
|
-
function _typeof$
|
|
25970
|
-
function ownKeys$
|
|
25971
|
-
function _objectSpread$
|
|
25972
|
-
function
|
|
25973
|
-
function
|
|
25974
|
-
function
|
|
25975
|
-
function
|
|
25976
|
-
function
|
|
25977
|
-
function
|
|
25978
|
-
function
|
|
25979
|
-
function
|
|
25980
|
-
function
|
|
25981
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25982
|
-
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; }
|
|
25983
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25984
|
-
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); }
|
|
25962
|
+
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); }
|
|
25963
|
+
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; }
|
|
25964
|
+
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; }
|
|
25965
|
+
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; }
|
|
25966
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25967
|
+
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); }
|
|
25968
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25969
|
+
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."); }
|
|
25970
|
+
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); }
|
|
25971
|
+
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; }
|
|
25972
|
+
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; } }
|
|
25973
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25985
25974
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25986
25975
|
var EPS$1 = 1;
|
|
25987
25976
|
function defaultUniqBy(entry) {
|
|
@@ -26005,204 +25994,7 @@ function renderContent(content, props) {
|
|
|
26005
25994
|
}
|
|
26006
25995
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26007
25996
|
}
|
|
26008
|
-
var
|
|
26009
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26010
|
-
var _super = _createSuper$6(Tooltip);
|
|
26011
|
-
function Tooltip() {
|
|
26012
|
-
var _this;
|
|
26013
|
-
_classCallCheck$8(this, Tooltip);
|
|
26014
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26015
|
-
args[_key] = arguments[_key];
|
|
26016
|
-
}
|
|
26017
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26018
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26019
|
-
boxWidth: -1,
|
|
26020
|
-
boxHeight: -1,
|
|
26021
|
-
dismissed: false,
|
|
26022
|
-
dismissedAtCoordinate: {
|
|
26023
|
-
x: 0,
|
|
26024
|
-
y: 0
|
|
26025
|
-
}
|
|
26026
|
-
});
|
|
26027
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26028
|
-
if (event.key === 'Escape') {
|
|
26029
|
-
_this.setState({
|
|
26030
|
-
dismissed: true,
|
|
26031
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26032
|
-
x: _this.props.coordinate.x,
|
|
26033
|
-
y: _this.props.coordinate.y
|
|
26034
|
-
})
|
|
26035
|
-
});
|
|
26036
|
-
}
|
|
26037
|
-
});
|
|
26038
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26039
|
-
var key = _ref.key,
|
|
26040
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26041
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26042
|
-
var _this$props = _this.props,
|
|
26043
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26044
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26045
|
-
coordinate = _this$props.coordinate,
|
|
26046
|
-
offset = _this$props.offset,
|
|
26047
|
-
position = _this$props.position,
|
|
26048
|
-
viewBox = _this$props.viewBox;
|
|
26049
|
-
if (position && isNumber(position[key])) {
|
|
26050
|
-
return position[key];
|
|
26051
|
-
}
|
|
26052
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26053
|
-
var positive = coordinate[key] + offset;
|
|
26054
|
-
if (allowEscapeViewBox[key]) {
|
|
26055
|
-
return reverseDirection[key] ? negative : positive;
|
|
26056
|
-
}
|
|
26057
|
-
if (reverseDirection[key]) {
|
|
26058
|
-
var _tooltipBoundary = negative;
|
|
26059
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26060
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26061
|
-
return Math.max(positive, viewBox[key]);
|
|
26062
|
-
}
|
|
26063
|
-
return Math.max(negative, viewBox[key]);
|
|
26064
|
-
}
|
|
26065
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26066
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26067
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26068
|
-
return Math.max(negative, viewBox[key]);
|
|
26069
|
-
}
|
|
26070
|
-
return Math.max(positive, viewBox[key]);
|
|
26071
|
-
});
|
|
26072
|
-
return _this;
|
|
26073
|
-
}
|
|
26074
|
-
_createClass$8(Tooltip, [{
|
|
26075
|
-
key: "componentDidMount",
|
|
26076
|
-
value: function componentDidMount() {
|
|
26077
|
-
this.updateBBox();
|
|
26078
|
-
}
|
|
26079
|
-
}, {
|
|
26080
|
-
key: "componentWillUnmount",
|
|
26081
|
-
value: function componentWillUnmount() {
|
|
26082
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26083
|
-
}
|
|
26084
|
-
}, {
|
|
26085
|
-
key: "componentDidUpdate",
|
|
26086
|
-
value: function componentDidUpdate() {
|
|
26087
|
-
this.updateBBox();
|
|
26088
|
-
}
|
|
26089
|
-
}, {
|
|
26090
|
-
key: "updateBBox",
|
|
26091
|
-
value: function updateBBox() {
|
|
26092
|
-
var _this$state = this.state,
|
|
26093
|
-
boxWidth = _this$state.boxWidth,
|
|
26094
|
-
boxHeight = _this$state.boxHeight,
|
|
26095
|
-
dismissed = _this$state.dismissed;
|
|
26096
|
-
if (dismissed) {
|
|
26097
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26098
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26099
|
-
this.setState({
|
|
26100
|
-
dismissed: false
|
|
26101
|
-
});
|
|
26102
|
-
}
|
|
26103
|
-
} else {
|
|
26104
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26105
|
-
}
|
|
26106
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26107
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26108
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26109
|
-
this.setState({
|
|
26110
|
-
boxWidth: box.width,
|
|
26111
|
-
boxHeight: box.height
|
|
26112
|
-
});
|
|
26113
|
-
}
|
|
26114
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26115
|
-
this.setState({
|
|
26116
|
-
boxWidth: -1,
|
|
26117
|
-
boxHeight: -1
|
|
26118
|
-
});
|
|
26119
|
-
}
|
|
26120
|
-
}
|
|
26121
|
-
}, {
|
|
26122
|
-
key: "render",
|
|
26123
|
-
value: function render() {
|
|
26124
|
-
var _classNames,
|
|
26125
|
-
_this2 = this;
|
|
26126
|
-
var _this$props2 = this.props,
|
|
26127
|
-
payload = _this$props2.payload,
|
|
26128
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26129
|
-
animationDuration = _this$props2.animationDuration,
|
|
26130
|
-
animationEasing = _this$props2.animationEasing,
|
|
26131
|
-
filterNull = _this$props2.filterNull,
|
|
26132
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26133
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26134
|
-
return !isNil_1(entry.value);
|
|
26135
|
-
}) : payload);
|
|
26136
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26137
|
-
var _this$props3 = this.props,
|
|
26138
|
-
content = _this$props3.content,
|
|
26139
|
-
viewBox = _this$props3.viewBox,
|
|
26140
|
-
coordinate = _this$props3.coordinate,
|
|
26141
|
-
position = _this$props3.position,
|
|
26142
|
-
active = _this$props3.active,
|
|
26143
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26144
|
-
var outerStyle = _objectSpread$l({
|
|
26145
|
-
pointerEvents: 'none',
|
|
26146
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26147
|
-
position: 'absolute',
|
|
26148
|
-
top: 0,
|
|
26149
|
-
left: 0
|
|
26150
|
-
}, wrapperStyle);
|
|
26151
|
-
var translateX, translateY;
|
|
26152
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26153
|
-
translateX = position.x;
|
|
26154
|
-
translateY = position.y;
|
|
26155
|
-
} else {
|
|
26156
|
-
var _this$state2 = this.state,
|
|
26157
|
-
boxWidth = _this$state2.boxWidth,
|
|
26158
|
-
boxHeight = _this$state2.boxHeight;
|
|
26159
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26160
|
-
translateX = this.getTranslate({
|
|
26161
|
-
key: 'x',
|
|
26162
|
-
tooltipDimension: boxWidth,
|
|
26163
|
-
viewBoxDimension: viewBox.width
|
|
26164
|
-
});
|
|
26165
|
-
translateY = this.getTranslate({
|
|
26166
|
-
key: 'y',
|
|
26167
|
-
tooltipDimension: boxHeight,
|
|
26168
|
-
viewBoxDimension: viewBox.height
|
|
26169
|
-
});
|
|
26170
|
-
} else {
|
|
26171
|
-
outerStyle.visibility = 'hidden';
|
|
26172
|
-
}
|
|
26173
|
-
}
|
|
26174
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26175
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26176
|
-
})), outerStyle);
|
|
26177
|
-
if (isAnimationActive && active) {
|
|
26178
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26179
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26180
|
-
})), outerStyle);
|
|
26181
|
-
}
|
|
26182
|
-
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));
|
|
26183
|
-
return (
|
|
26184
|
-
/*#__PURE__*/
|
|
26185
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26186
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26187
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26188
|
-
React__default.createElement("div", {
|
|
26189
|
-
tabIndex: -1,
|
|
26190
|
-
role: "dialog",
|
|
26191
|
-
className: cls,
|
|
26192
|
-
style: outerStyle,
|
|
26193
|
-
ref: function ref(node) {
|
|
26194
|
-
_this2.wrapperNode = node;
|
|
26195
|
-
}
|
|
26196
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26197
|
-
payload: finalPayload
|
|
26198
|
-
})))
|
|
26199
|
-
);
|
|
26200
|
-
}
|
|
26201
|
-
}]);
|
|
26202
|
-
return Tooltip;
|
|
26203
|
-
}(PureComponent);
|
|
26204
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26205
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25997
|
+
var tooltipDefaultProps = {
|
|
26206
25998
|
active: false,
|
|
26207
25999
|
allowEscapeViewBox: {
|
|
26208
26000
|
x: false,
|
|
@@ -26223,6 +26015,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26223
26015
|
x: 0,
|
|
26224
26016
|
y: 0
|
|
26225
26017
|
},
|
|
26018
|
+
// this doesn't exist on TooltipProps
|
|
26019
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26020
|
+
// @ts-ignore
|
|
26226
26021
|
cursorStyle: {},
|
|
26227
26022
|
separator: ' : ',
|
|
26228
26023
|
wrapperStyle: {},
|
|
@@ -26236,7 +26031,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26236
26031
|
animationDuration: 400,
|
|
26237
26032
|
filterNull: true,
|
|
26238
26033
|
useTranslate3d: false
|
|
26239
|
-
}
|
|
26034
|
+
};
|
|
26035
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26036
|
+
var _classNames;
|
|
26037
|
+
var _useState = useState(-1),
|
|
26038
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26039
|
+
boxWidth = _useState2[0],
|
|
26040
|
+
setBoxWidth = _useState2[1];
|
|
26041
|
+
var _useState3 = useState(-1),
|
|
26042
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26043
|
+
boxHeight = _useState4[0],
|
|
26044
|
+
setBoxHeight = _useState4[1];
|
|
26045
|
+
var _useState5 = useState(false),
|
|
26046
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26047
|
+
dismissed = _useState6[0],
|
|
26048
|
+
setDismissed = _useState6[1];
|
|
26049
|
+
var _useState7 = useState({
|
|
26050
|
+
x: 0,
|
|
26051
|
+
y: 0
|
|
26052
|
+
}),
|
|
26053
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26054
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26055
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26056
|
+
var wrapperNode = useRef();
|
|
26057
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26058
|
+
reverseDirection = props.reverseDirection,
|
|
26059
|
+
coordinate = props.coordinate,
|
|
26060
|
+
offset = props.offset,
|
|
26061
|
+
position = props.position,
|
|
26062
|
+
viewBox = props.viewBox;
|
|
26063
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26064
|
+
if (event.key === 'Escape') {
|
|
26065
|
+
setDismissed(true);
|
|
26066
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26067
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26068
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26069
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26070
|
+
});
|
|
26071
|
+
});
|
|
26072
|
+
}
|
|
26073
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26074
|
+
useEffect(function () {
|
|
26075
|
+
var updateBBox = function updateBBox() {
|
|
26076
|
+
if (dismissed) {
|
|
26077
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26078
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26079
|
+
setDismissed(false);
|
|
26080
|
+
}
|
|
26081
|
+
} else {
|
|
26082
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26083
|
+
}
|
|
26084
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26085
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26086
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26087
|
+
setBoxWidth(box.width);
|
|
26088
|
+
setBoxHeight(box.height);
|
|
26089
|
+
}
|
|
26090
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26091
|
+
setBoxWidth(-1);
|
|
26092
|
+
setBoxHeight(-1);
|
|
26093
|
+
}
|
|
26094
|
+
};
|
|
26095
|
+
updateBBox();
|
|
26096
|
+
return function () {
|
|
26097
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26098
|
+
};
|
|
26099
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26100
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26101
|
+
var key = _ref.key,
|
|
26102
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26103
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26104
|
+
if (position && isNumber(position[key])) {
|
|
26105
|
+
return position[key];
|
|
26106
|
+
}
|
|
26107
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26108
|
+
var positive = coordinate[key] + offset;
|
|
26109
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26110
|
+
return reverseDirection[key] ? negative : positive;
|
|
26111
|
+
}
|
|
26112
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26113
|
+
var _tooltipBoundary = negative;
|
|
26114
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26115
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26116
|
+
return Math.max(positive, viewBox[key]);
|
|
26117
|
+
}
|
|
26118
|
+
return Math.max(negative, viewBox[key]);
|
|
26119
|
+
}
|
|
26120
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26121
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26122
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26123
|
+
return Math.max(negative, viewBox[key]);
|
|
26124
|
+
}
|
|
26125
|
+
return Math.max(positive, viewBox[key]);
|
|
26126
|
+
};
|
|
26127
|
+
var payload = props.payload,
|
|
26128
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26129
|
+
filterNull = props.filterNull,
|
|
26130
|
+
active = props.active,
|
|
26131
|
+
wrapperStyle = props.wrapperStyle,
|
|
26132
|
+
useTranslate3d = props.useTranslate3d,
|
|
26133
|
+
isAnimationActive = props.isAnimationActive,
|
|
26134
|
+
animationDuration = props.animationDuration,
|
|
26135
|
+
animationEasing = props.animationEasing;
|
|
26136
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26137
|
+
return !isNil_1(entry.value);
|
|
26138
|
+
}) : payload);
|
|
26139
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26140
|
+
var content = props.content;
|
|
26141
|
+
var outerStyle = _objectSpread$i({
|
|
26142
|
+
pointerEvents: 'none',
|
|
26143
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26144
|
+
position: 'absolute',
|
|
26145
|
+
top: 0,
|
|
26146
|
+
left: 0
|
|
26147
|
+
}, wrapperStyle);
|
|
26148
|
+
var translateX, translateY;
|
|
26149
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26150
|
+
translateX = position.x;
|
|
26151
|
+
translateY = position.y;
|
|
26152
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26153
|
+
translateX = getTranslate({
|
|
26154
|
+
key: 'x',
|
|
26155
|
+
tooltipDimension: boxWidth,
|
|
26156
|
+
viewBoxDimension: viewBox.width
|
|
26157
|
+
});
|
|
26158
|
+
translateY = getTranslate({
|
|
26159
|
+
key: 'y',
|
|
26160
|
+
tooltipDimension: boxHeight,
|
|
26161
|
+
viewBoxDimension: viewBox.height
|
|
26162
|
+
});
|
|
26163
|
+
} else {
|
|
26164
|
+
outerStyle.visibility = 'hidden';
|
|
26165
|
+
}
|
|
26166
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26167
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26168
|
+
})), outerStyle);
|
|
26169
|
+
if (isAnimationActive && active) {
|
|
26170
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26171
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26172
|
+
})), outerStyle);
|
|
26173
|
+
}
|
|
26174
|
+
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));
|
|
26175
|
+
return (
|
|
26176
|
+
/*#__PURE__*/
|
|
26177
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26178
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26179
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26180
|
+
React__default.createElement("div", {
|
|
26181
|
+
tabIndex: -1,
|
|
26182
|
+
role: "dialog",
|
|
26183
|
+
className: cls,
|
|
26184
|
+
style: outerStyle,
|
|
26185
|
+
ref: wrapperNode
|
|
26186
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26187
|
+
payload: finalPayload
|
|
26188
|
+
})))
|
|
26189
|
+
);
|
|
26190
|
+
};
|
|
26191
|
+
|
|
26192
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26193
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26194
|
+
|
|
26195
|
+
/**
|
|
26196
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26197
|
+
* children.props when there are no props set by the consumer
|
|
26198
|
+
* doesn't work if using default parameters
|
|
26199
|
+
*/
|
|
26200
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26240
26201
|
|
|
26241
26202
|
var root = _root;
|
|
26242
26203
|
|
|
@@ -31806,12 +31767,12 @@ module.exports = exports['default'];
|
|
|
31806
31767
|
|
|
31807
31768
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31808
31769
|
|
|
31809
|
-
function _typeof$
|
|
31810
|
-
function ownKeys$
|
|
31811
|
-
function _objectSpread$
|
|
31812
|
-
function _defineProperty$
|
|
31813
|
-
function _toPropertyKey$
|
|
31814
|
-
function _toPrimitive$
|
|
31770
|
+
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); }
|
|
31771
|
+
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; }
|
|
31772
|
+
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; }
|
|
31773
|
+
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; }
|
|
31774
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31775
|
+
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); }
|
|
31815
31776
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31816
31777
|
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."); }
|
|
31817
31778
|
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); }
|
|
@@ -31879,7 +31840,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31879
31840
|
}
|
|
31880
31841
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31881
31842
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31882
|
-
var measurementSpanStyle = _objectSpread$
|
|
31843
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31883
31844
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31884
31845
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31885
31846
|
return styleKey;
|
|
@@ -31934,11 +31895,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31934
31895
|
};
|
|
31935
31896
|
};
|
|
31936
31897
|
|
|
31937
|
-
var _excluded$
|
|
31938
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31898
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31939
31899
|
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); }
|
|
31940
|
-
function _objectWithoutProperties$
|
|
31941
|
-
function _objectWithoutPropertiesLoose$
|
|
31900
|
+
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; }
|
|
31901
|
+
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; }
|
|
31942
31902
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31943
31903
|
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."); }
|
|
31944
31904
|
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); }
|
|
@@ -32092,46 +32052,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32092
32052
|
}
|
|
32093
32053
|
return getWordsWithoutCalculate(children);
|
|
32094
32054
|
};
|
|
32095
|
-
var
|
|
32096
|
-
|
|
32097
|
-
|
|
32098
|
-
|
|
32099
|
-
|
|
32100
|
-
|
|
32101
|
-
|
|
32102
|
-
|
|
32103
|
-
|
|
32104
|
-
|
|
32105
|
-
|
|
32106
|
-
|
|
32107
|
-
|
|
32108
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32109
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32110
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32111
|
-
_ref5$fill = _ref5.fill,
|
|
32112
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32113
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32055
|
+
var textDefaultProps = {
|
|
32056
|
+
x: 0,
|
|
32057
|
+
y: 0,
|
|
32058
|
+
lineHeight: '1em',
|
|
32059
|
+
capHeight: '0.71em',
|
|
32060
|
+
// Magic number from d3
|
|
32061
|
+
scaleToFit: false,
|
|
32062
|
+
textAnchor: 'start',
|
|
32063
|
+
verticalAnchor: 'end',
|
|
32064
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32065
|
+
fill: '#808080'
|
|
32066
|
+
};
|
|
32067
|
+
var Text = function Text(props) {
|
|
32114
32068
|
var wordsByLines = useMemo(function () {
|
|
32115
32069
|
return getWordsByLines({
|
|
32116
32070
|
breakAll: props.breakAll,
|
|
32117
32071
|
children: props.children,
|
|
32118
32072
|
maxLines: props.maxLines,
|
|
32119
|
-
scaleToFit: scaleToFit,
|
|
32073
|
+
scaleToFit: props.scaleToFit,
|
|
32120
32074
|
style: props.style,
|
|
32121
32075
|
width: props.width
|
|
32122
32076
|
});
|
|
32123
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32077
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32124
32078
|
var dx = props.dx,
|
|
32125
32079
|
dy = props.dy,
|
|
32080
|
+
textAnchor = props.textAnchor,
|
|
32081
|
+
verticalAnchor = props.verticalAnchor,
|
|
32082
|
+
scaleToFit = props.scaleToFit,
|
|
32126
32083
|
angle = props.angle,
|
|
32084
|
+
lineHeight = props.lineHeight,
|
|
32085
|
+
capHeight = props.capHeight,
|
|
32127
32086
|
className = props.className,
|
|
32128
32087
|
breakAll = props.breakAll,
|
|
32129
|
-
textProps = _objectWithoutProperties$
|
|
32130
|
-
if (!isNumOrStr(
|
|
32088
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32089
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32131
32090
|
return null;
|
|
32132
32091
|
}
|
|
32133
|
-
var x =
|
|
32134
|
-
var y =
|
|
32092
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32093
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32135
32094
|
var startDy;
|
|
32136
32095
|
switch (verticalAnchor) {
|
|
32137
32096
|
case 'start':
|
|
@@ -32161,7 +32120,7 @@ var Text = function Text(_ref5) {
|
|
|
32161
32120
|
y: y,
|
|
32162
32121
|
className: classNames('recharts-text', className),
|
|
32163
32122
|
textAnchor: textAnchor,
|
|
32164
|
-
fill: fill.includes('url') ?
|
|
32123
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32165
32124
|
}), wordsByLines.map(function (line, index) {
|
|
32166
32125
|
return (
|
|
32167
32126
|
/*#__PURE__*/
|
|
@@ -32174,6 +32133,7 @@ var Text = function Text(_ref5) {
|
|
|
32174
32133
|
);
|
|
32175
32134
|
}));
|
|
32176
32135
|
};
|
|
32136
|
+
Text.defaultProps = textDefaultProps;
|
|
32177
32137
|
|
|
32178
32138
|
var baseIsEqual = _baseIsEqual;
|
|
32179
32139
|
|
|
@@ -38441,7 +38401,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38441
38401
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38442
38402
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38443
38403
|
|
|
38444
|
-
var _excluded$
|
|
38404
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38445
38405
|
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); }
|
|
38446
38406
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38447
38407
|
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."); }
|
|
@@ -38449,8 +38409,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38449
38409
|
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; }
|
|
38450
38410
|
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; } }
|
|
38451
38411
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38452
|
-
function _objectWithoutProperties$
|
|
38453
|
-
function _objectWithoutPropertiesLoose$
|
|
38412
|
+
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; }
|
|
38413
|
+
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; }
|
|
38454
38414
|
function ErrorBar(props) {
|
|
38455
38415
|
var offset = props.offset,
|
|
38456
38416
|
layout = props.layout,
|
|
@@ -38460,7 +38420,7 @@ function ErrorBar(props) {
|
|
|
38460
38420
|
dataPointFormatter = props.dataPointFormatter,
|
|
38461
38421
|
xAxis = props.xAxis,
|
|
38462
38422
|
yAxis = props.yAxis,
|
|
38463
|
-
others = _objectWithoutProperties$
|
|
38423
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38464
38424
|
var svgProps = filterProps(others);
|
|
38465
38425
|
var errorBars = data.map(function (entry, i) {
|
|
38466
38426
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38571,18 +38531,18 @@ ErrorBar.defaultProps = {
|
|
|
38571
38531
|
};
|
|
38572
38532
|
ErrorBar.displayName = 'ErrorBar';
|
|
38573
38533
|
|
|
38574
|
-
function _typeof$
|
|
38534
|
+
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); }
|
|
38575
38535
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38576
38536
|
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."); }
|
|
38577
38537
|
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); }
|
|
38578
38538
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38579
38539
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38580
38540
|
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; }
|
|
38581
|
-
function ownKeys$
|
|
38582
|
-
function _objectSpread$
|
|
38583
|
-
function _defineProperty$
|
|
38584
|
-
function _toPropertyKey$
|
|
38585
|
-
function _toPrimitive$
|
|
38541
|
+
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; }
|
|
38542
|
+
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; }
|
|
38543
|
+
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; }
|
|
38544
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38545
|
+
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); }
|
|
38586
38546
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38587
38547
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38588
38548
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38753,7 +38713,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38753
38713
|
};
|
|
38754
38714
|
});
|
|
38755
38715
|
}
|
|
38756
|
-
return _objectSpread$
|
|
38716
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38757
38717
|
payload: legendData,
|
|
38758
38718
|
item: legendItem
|
|
38759
38719
|
});
|
|
@@ -38907,10 +38867,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38907
38867
|
verticalAlign = legendProps.verticalAlign,
|
|
38908
38868
|
layout = legendProps.layout;
|
|
38909
38869
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38910
|
-
newOffset = _objectSpread$
|
|
38870
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38911
38871
|
}
|
|
38912
38872
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38913
|
-
newOffset = _objectSpread$
|
|
38873
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38914
38874
|
}
|
|
38915
38875
|
}
|
|
38916
38876
|
return newOffset;
|
|
@@ -39336,14 +39296,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39336
39296
|
items: [item]
|
|
39337
39297
|
};
|
|
39338
39298
|
}
|
|
39339
|
-
return _objectSpread$
|
|
39299
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39340
39300
|
}, {});
|
|
39341
39301
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39342
39302
|
var group = stackGroups[axisId];
|
|
39343
39303
|
if (group.hasStack) {
|
|
39344
39304
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39345
39305
|
var g = group.stackGroups[stackId];
|
|
39346
|
-
return _objectSpread$
|
|
39306
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39347
39307
|
numericAxisId: numericAxisId,
|
|
39348
39308
|
cateAxisId: cateAxisId,
|
|
39349
39309
|
items: g.items,
|
|
@@ -39351,7 +39311,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39351
39311
|
}));
|
|
39352
39312
|
}, {});
|
|
39353
39313
|
}
|
|
39354
|
-
return _objectSpread$
|
|
39314
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39355
39315
|
}, {});
|
|
39356
39316
|
};
|
|
39357
39317
|
|
|
@@ -39565,7 +39525,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39565
39525
|
formatter = _graphicalItem$props.formatter,
|
|
39566
39526
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39567
39527
|
chartType = _graphicalItem$props.chartType;
|
|
39568
|
-
return _objectSpread$
|
|
39528
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39569
39529
|
dataKey: dataKey,
|
|
39570
39530
|
unit: unit,
|
|
39571
39531
|
formatter: formatter,
|
|
@@ -39578,12 +39538,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39578
39538
|
});
|
|
39579
39539
|
};
|
|
39580
39540
|
|
|
39581
|
-
function _typeof$
|
|
39582
|
-
function ownKeys$
|
|
39583
|
-
function _objectSpread$
|
|
39584
|
-
function _defineProperty$
|
|
39585
|
-
function _toPropertyKey$
|
|
39586
|
-
function _toPrimitive$
|
|
39541
|
+
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); }
|
|
39542
|
+
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; }
|
|
39543
|
+
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; }
|
|
39544
|
+
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; }
|
|
39545
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39546
|
+
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); }
|
|
39587
39547
|
var RADIAN = Math.PI / 180;
|
|
39588
39548
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39589
39549
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39688,7 +39648,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39688
39648
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39689
39649
|
}
|
|
39690
39650
|
if (inRange) {
|
|
39691
|
-
return _objectSpread$
|
|
39651
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39692
39652
|
radius: radius,
|
|
39693
39653
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39694
39654
|
});
|
|
@@ -39696,21 +39656,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39696
39656
|
return null;
|
|
39697
39657
|
};
|
|
39698
39658
|
|
|
39699
|
-
function _typeof$
|
|
39700
|
-
var _excluded$7 = ["offset"];
|
|
39659
|
+
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); }
|
|
39701
39660
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39702
39661
|
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."); }
|
|
39703
39662
|
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); }
|
|
39704
39663
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39705
39664
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39706
39665
|
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; }
|
|
39707
|
-
function
|
|
39708
|
-
function
|
|
39709
|
-
function
|
|
39710
|
-
function
|
|
39711
|
-
function
|
|
39712
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39713
|
-
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); }
|
|
39666
|
+
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; }
|
|
39667
|
+
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; }
|
|
39668
|
+
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; }
|
|
39669
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39670
|
+
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); }
|
|
39714
39671
|
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); }
|
|
39715
39672
|
var getLabel = function getLabel(props) {
|
|
39716
39673
|
var value = props.value,
|
|
@@ -39855,7 +39812,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39855
39812
|
textAnchor: 'middle',
|
|
39856
39813
|
verticalAnchor: verticalEnd
|
|
39857
39814
|
};
|
|
39858
|
-
return _objectSpread$
|
|
39815
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39859
39816
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39860
39817
|
width: width
|
|
39861
39818
|
} : {});
|
|
@@ -39867,7 +39824,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39867
39824
|
textAnchor: 'middle',
|
|
39868
39825
|
verticalAnchor: verticalStart
|
|
39869
39826
|
};
|
|
39870
|
-
return _objectSpread$
|
|
39827
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39871
39828
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39872
39829
|
width: width
|
|
39873
39830
|
} : {});
|
|
@@ -39879,7 +39836,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39879
39836
|
textAnchor: horizontalEnd,
|
|
39880
39837
|
verticalAnchor: 'middle'
|
|
39881
39838
|
};
|
|
39882
|
-
return _objectSpread$
|
|
39839
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39883
39840
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39884
39841
|
height: height
|
|
39885
39842
|
} : {});
|
|
@@ -39891,7 +39848,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39891
39848
|
textAnchor: horizontalStart,
|
|
39892
39849
|
verticalAnchor: 'middle'
|
|
39893
39850
|
};
|
|
39894
|
-
return _objectSpread$
|
|
39851
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39895
39852
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39896
39853
|
height: height
|
|
39897
39854
|
} : {});
|
|
@@ -39901,7 +39858,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39901
39858
|
height: height
|
|
39902
39859
|
} : {};
|
|
39903
39860
|
if (position === 'insideLeft') {
|
|
39904
|
-
return _objectSpread$
|
|
39861
|
+
return _objectSpread$e({
|
|
39905
39862
|
x: x + horizontalOffset,
|
|
39906
39863
|
y: y + height / 2,
|
|
39907
39864
|
textAnchor: horizontalStart,
|
|
@@ -39909,7 +39866,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39909
39866
|
}, sizeAttrs);
|
|
39910
39867
|
}
|
|
39911
39868
|
if (position === 'insideRight') {
|
|
39912
|
-
return _objectSpread$
|
|
39869
|
+
return _objectSpread$e({
|
|
39913
39870
|
x: x + width - horizontalOffset,
|
|
39914
39871
|
y: y + height / 2,
|
|
39915
39872
|
textAnchor: horizontalEnd,
|
|
@@ -39917,7 +39874,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39917
39874
|
}, sizeAttrs);
|
|
39918
39875
|
}
|
|
39919
39876
|
if (position === 'insideTop') {
|
|
39920
|
-
return _objectSpread$
|
|
39877
|
+
return _objectSpread$e({
|
|
39921
39878
|
x: x + width / 2,
|
|
39922
39879
|
y: y + verticalOffset,
|
|
39923
39880
|
textAnchor: 'middle',
|
|
@@ -39925,7 +39882,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39925
39882
|
}, sizeAttrs);
|
|
39926
39883
|
}
|
|
39927
39884
|
if (position === 'insideBottom') {
|
|
39928
|
-
return _objectSpread$
|
|
39885
|
+
return _objectSpread$e({
|
|
39929
39886
|
x: x + width / 2,
|
|
39930
39887
|
y: y + height - verticalOffset,
|
|
39931
39888
|
textAnchor: 'middle',
|
|
@@ -39933,7 +39890,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39933
39890
|
}, sizeAttrs);
|
|
39934
39891
|
}
|
|
39935
39892
|
if (position === 'insideTopLeft') {
|
|
39936
|
-
return _objectSpread$
|
|
39893
|
+
return _objectSpread$e({
|
|
39937
39894
|
x: x + horizontalOffset,
|
|
39938
39895
|
y: y + verticalOffset,
|
|
39939
39896
|
textAnchor: horizontalStart,
|
|
@@ -39941,7 +39898,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39941
39898
|
}, sizeAttrs);
|
|
39942
39899
|
}
|
|
39943
39900
|
if (position === 'insideTopRight') {
|
|
39944
|
-
return _objectSpread$
|
|
39901
|
+
return _objectSpread$e({
|
|
39945
39902
|
x: x + width - horizontalOffset,
|
|
39946
39903
|
y: y + verticalOffset,
|
|
39947
39904
|
textAnchor: horizontalEnd,
|
|
@@ -39949,7 +39906,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39949
39906
|
}, sizeAttrs);
|
|
39950
39907
|
}
|
|
39951
39908
|
if (position === 'insideBottomLeft') {
|
|
39952
|
-
return _objectSpread$
|
|
39909
|
+
return _objectSpread$e({
|
|
39953
39910
|
x: x + horizontalOffset,
|
|
39954
39911
|
y: y + height - verticalOffset,
|
|
39955
39912
|
textAnchor: horizontalStart,
|
|
@@ -39957,7 +39914,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39957
39914
|
}, sizeAttrs);
|
|
39958
39915
|
}
|
|
39959
39916
|
if (position === 'insideBottomRight') {
|
|
39960
|
-
return _objectSpread$
|
|
39917
|
+
return _objectSpread$e({
|
|
39961
39918
|
x: x + width - horizontalOffset,
|
|
39962
39919
|
y: y + height - verticalOffset,
|
|
39963
39920
|
textAnchor: horizontalEnd,
|
|
@@ -39965,14 +39922,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39965
39922
|
}, sizeAttrs);
|
|
39966
39923
|
}
|
|
39967
39924
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39968
|
-
return _objectSpread$
|
|
39925
|
+
return _objectSpread$e({
|
|
39969
39926
|
x: x + getPercentValue(position.x, width),
|
|
39970
39927
|
y: y + getPercentValue(position.y, height),
|
|
39971
39928
|
textAnchor: 'end',
|
|
39972
39929
|
verticalAnchor: 'end'
|
|
39973
39930
|
}, sizeAttrs);
|
|
39974
39931
|
}
|
|
39975
|
-
return _objectSpread$
|
|
39932
|
+
return _objectSpread$e({
|
|
39976
39933
|
x: x + width / 2,
|
|
39977
39934
|
y: y + height / 2,
|
|
39978
39935
|
textAnchor: 'middle',
|
|
@@ -39982,13 +39939,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39982
39939
|
var isPolar = function isPolar(viewBox) {
|
|
39983
39940
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39984
39941
|
};
|
|
39985
|
-
function Label$3(
|
|
39986
|
-
var _ref4$offset = _ref4.offset,
|
|
39987
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39988
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39989
|
-
var props = _objectSpread$h({
|
|
39990
|
-
offset: offset
|
|
39991
|
-
}, restProps);
|
|
39942
|
+
function Label$3(props) {
|
|
39992
39943
|
var viewBox = props.viewBox,
|
|
39993
39944
|
position = props.position,
|
|
39994
39945
|
value = props.value,
|
|
@@ -40025,6 +39976,9 @@ function Label$3(_ref4) {
|
|
|
40025
39976
|
}), label);
|
|
40026
39977
|
}
|
|
40027
39978
|
Label$3.displayName = 'Label';
|
|
39979
|
+
Label$3.defaultProps = {
|
|
39980
|
+
offset: 5
|
|
39981
|
+
};
|
|
40028
39982
|
var parseViewBox = function parseViewBox(props) {
|
|
40029
39983
|
var cx = props.cx,
|
|
40030
39984
|
cy = props.cy,
|
|
@@ -40179,9 +40133,8 @@ function last(array) {
|
|
|
40179
40133
|
|
|
40180
40134
|
var last_1 = last;
|
|
40181
40135
|
|
|
40182
|
-
function _typeof$
|
|
40183
|
-
var _excluded$
|
|
40184
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40136
|
+
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); }
|
|
40137
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40185
40138
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40186
40139
|
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."); }
|
|
40187
40140
|
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); }
|
|
@@ -40189,26 +40142,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40189
40142
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40190
40143
|
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; }
|
|
40191
40144
|
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); }
|
|
40192
|
-
function ownKeys$
|
|
40193
|
-
function _objectSpread$
|
|
40194
|
-
function _defineProperty$
|
|
40195
|
-
function _toPropertyKey$
|
|
40196
|
-
function _toPrimitive$
|
|
40197
|
-
function _objectWithoutProperties$
|
|
40198
|
-
function _objectWithoutPropertiesLoose$
|
|
40199
|
-
var
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
|
|
40203
|
-
|
|
40204
|
-
|
|
40205
|
-
|
|
40206
|
-
|
|
40207
|
-
dataKey =
|
|
40208
|
-
clockWise =
|
|
40209
|
-
id =
|
|
40210
|
-
textBreakAll =
|
|
40211
|
-
others = _objectWithoutProperties$
|
|
40145
|
+
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; }
|
|
40146
|
+
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; }
|
|
40147
|
+
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; }
|
|
40148
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40149
|
+
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); }
|
|
40150
|
+
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; }
|
|
40151
|
+
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; }
|
|
40152
|
+
var defaultProps = {
|
|
40153
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40154
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40155
|
+
}
|
|
40156
|
+
};
|
|
40157
|
+
function LabelList(props) {
|
|
40158
|
+
var data = props.data,
|
|
40159
|
+
valueAccessor = props.valueAccessor,
|
|
40160
|
+
dataKey = props.dataKey,
|
|
40161
|
+
clockWise = props.clockWise,
|
|
40162
|
+
id = props.id,
|
|
40163
|
+
textBreakAll = props.textBreakAll,
|
|
40164
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40212
40165
|
if (!data || !data.length) {
|
|
40213
40166
|
return null;
|
|
40214
40167
|
}
|
|
@@ -40224,7 +40177,7 @@ function LabelList(_ref) {
|
|
|
40224
40177
|
index: index,
|
|
40225
40178
|
value: value,
|
|
40226
40179
|
textBreakAll: textBreakAll,
|
|
40227
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40180
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40228
40181
|
clockWise: clockWise
|
|
40229
40182
|
})),
|
|
40230
40183
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40279,14 +40232,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40279
40232
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40280
40233
|
}
|
|
40281
40234
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40235
|
+
LabelList.defaultProps = defaultProps;
|
|
40282
40236
|
|
|
40283
|
-
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); }
|
|
40284
40237
|
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); }
|
|
40285
|
-
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; }
|
|
40286
|
-
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; }
|
|
40287
|
-
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; }
|
|
40288
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40289
|
-
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); }
|
|
40290
40238
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40291
40239
|
var sign = mathSign(endAngle - startAngle);
|
|
40292
40240
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40427,19 +40375,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40427
40375
|
}
|
|
40428
40376
|
return path;
|
|
40429
40377
|
};
|
|
40430
|
-
var
|
|
40431
|
-
cx: 0,
|
|
40432
|
-
cy: 0,
|
|
40433
|
-
innerRadius: 0,
|
|
40434
|
-
outerRadius: 0,
|
|
40435
|
-
startAngle: 0,
|
|
40436
|
-
endAngle: 0,
|
|
40437
|
-
cornerRadius: 0,
|
|
40438
|
-
forceCornerRadius: false,
|
|
40439
|
-
cornerIsExternal: false
|
|
40440
|
-
};
|
|
40441
|
-
var Sector = function Sector(sectorProps) {
|
|
40442
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40378
|
+
var Sector = function Sector(props) {
|
|
40443
40379
|
var cx = props.cx,
|
|
40444
40380
|
cy = props.cy,
|
|
40445
40381
|
innerRadius = props.innerRadius,
|
|
@@ -40485,14 +40421,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40485
40421
|
role: "img"
|
|
40486
40422
|
}));
|
|
40487
40423
|
};
|
|
40424
|
+
Sector.defaultProps = {
|
|
40425
|
+
cx: 0,
|
|
40426
|
+
cy: 0,
|
|
40427
|
+
innerRadius: 0,
|
|
40428
|
+
outerRadius: 0,
|
|
40429
|
+
startAngle: 0,
|
|
40430
|
+
endAngle: 0,
|
|
40431
|
+
cornerRadius: 0,
|
|
40432
|
+
forceCornerRadius: false,
|
|
40433
|
+
cornerIsExternal: false
|
|
40434
|
+
};
|
|
40488
40435
|
|
|
40489
|
-
function _typeof$
|
|
40436
|
+
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); }
|
|
40490
40437
|
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); }
|
|
40491
|
-
function ownKeys$
|
|
40492
|
-
function _objectSpread$
|
|
40493
|
-
function _defineProperty$
|
|
40494
|
-
function _toPropertyKey$
|
|
40495
|
-
function _toPrimitive$
|
|
40438
|
+
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; }
|
|
40439
|
+
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; }
|
|
40440
|
+
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; }
|
|
40441
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40442
|
+
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); }
|
|
40496
40443
|
var CURVE_FACTORIES = {
|
|
40497
40444
|
curveBasisClosed: curveBasisClosed,
|
|
40498
40445
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40532,14 +40479,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40532
40479
|
* @return {String} path
|
|
40533
40480
|
*/
|
|
40534
40481
|
var getPath$1 = function getPath(_ref) {
|
|
40535
|
-
var
|
|
40536
|
-
|
|
40537
|
-
_ref$points = _ref.points,
|
|
40538
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40482
|
+
var type = _ref.type,
|
|
40483
|
+
points = _ref.points,
|
|
40539
40484
|
baseLine = _ref.baseLine,
|
|
40540
40485
|
layout = _ref.layout,
|
|
40541
|
-
|
|
40542
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40486
|
+
connectNulls = _ref.connectNulls;
|
|
40543
40487
|
var curveFactory = getCurveFactory(type, layout);
|
|
40544
40488
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40545
40489
|
return defined(entry);
|
|
@@ -40550,7 +40494,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40550
40494
|
return defined(base);
|
|
40551
40495
|
}) : baseLine;
|
|
40552
40496
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40553
|
-
return _objectSpread$
|
|
40497
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40554
40498
|
base: formatBaseLine[index]
|
|
40555
40499
|
});
|
|
40556
40500
|
});
|
|
@@ -40591,8 +40535,12 @@ var Curve = function Curve(props) {
|
|
|
40591
40535
|
ref: pathRef
|
|
40592
40536
|
}));
|
|
40593
40537
|
};
|
|
40538
|
+
Curve.defaultProps = {
|
|
40539
|
+
type: 'linear',
|
|
40540
|
+
points: [],
|
|
40541
|
+
connectNulls: false
|
|
40542
|
+
};
|
|
40594
40543
|
|
|
40595
|
-
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); }
|
|
40596
40544
|
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); }
|
|
40597
40545
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40598
40546
|
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."); }
|
|
@@ -40600,11 +40548,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40600
40548
|
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; }
|
|
40601
40549
|
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; } }
|
|
40602
40550
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40603
|
-
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; }
|
|
40604
|
-
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; }
|
|
40605
|
-
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; }
|
|
40606
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40607
|
-
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); }
|
|
40608
40551
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40609
40552
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40610
40553
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40660,29 +40603,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40660
40603
|
}
|
|
40661
40604
|
return false;
|
|
40662
40605
|
};
|
|
40663
|
-
var
|
|
40664
|
-
x: 0,
|
|
40665
|
-
y: 0,
|
|
40666
|
-
width: 0,
|
|
40667
|
-
height: 0,
|
|
40668
|
-
// The radius of border
|
|
40669
|
-
// The radius of four corners when radius is a number
|
|
40670
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40671
|
-
radius: 0,
|
|
40672
|
-
isAnimationActive: false,
|
|
40673
|
-
isUpdateAnimationActive: false,
|
|
40674
|
-
animationBegin: 0,
|
|
40675
|
-
animationDuration: 1500,
|
|
40676
|
-
animationEasing: 'ease'
|
|
40677
|
-
};
|
|
40678
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40679
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40606
|
+
var Rectangle = function Rectangle(props) {
|
|
40680
40607
|
var pathRef = useRef();
|
|
40681
40608
|
var _useState = useState(-1),
|
|
40682
40609
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40683
40610
|
totalLength = _useState2[0],
|
|
40684
40611
|
setTotalLength = _useState2[1];
|
|
40685
|
-
|
|
40612
|
+
useLayoutEffect(function () {
|
|
40686
40613
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40687
40614
|
try {
|
|
40688
40615
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40753,6 +40680,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40753
40680
|
})));
|
|
40754
40681
|
});
|
|
40755
40682
|
};
|
|
40683
|
+
Rectangle.defaultProps = {
|
|
40684
|
+
x: 0,
|
|
40685
|
+
y: 0,
|
|
40686
|
+
width: 0,
|
|
40687
|
+
height: 0,
|
|
40688
|
+
// The radius of border
|
|
40689
|
+
// The radius of four corners when radius is a number
|
|
40690
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40691
|
+
radius: 0,
|
|
40692
|
+
isAnimationActive: false,
|
|
40693
|
+
isUpdateAnimationActive: false,
|
|
40694
|
+
animationBegin: 0,
|
|
40695
|
+
animationDuration: 1500,
|
|
40696
|
+
animationEasing: 'ease'
|
|
40697
|
+
};
|
|
40756
40698
|
|
|
40757
40699
|
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); }
|
|
40758
40700
|
var Dot$1 = function Dot(props) {
|
|
@@ -40772,42 +40714,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40772
40714
|
return null;
|
|
40773
40715
|
};
|
|
40774
40716
|
|
|
40775
|
-
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); }
|
|
40776
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40777
40717
|
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); }
|
|
40778
|
-
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; }
|
|
40779
|
-
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; }
|
|
40780
|
-
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; }
|
|
40781
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40782
|
-
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); }
|
|
40783
|
-
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; }
|
|
40784
|
-
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; }
|
|
40785
40718
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40786
40719
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40787
40720
|
};
|
|
40788
|
-
var Cross = function Cross(
|
|
40789
|
-
var
|
|
40790
|
-
|
|
40791
|
-
|
|
40792
|
-
|
|
40793
|
-
|
|
40794
|
-
|
|
40795
|
-
|
|
40796
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40797
|
-
_ref$width = _ref.width,
|
|
40798
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40799
|
-
_ref$height = _ref.height,
|
|
40800
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40801
|
-
className = _ref.className,
|
|
40802
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40803
|
-
var props = _objectSpread$c({
|
|
40804
|
-
x: x,
|
|
40805
|
-
y: y,
|
|
40806
|
-
top: top,
|
|
40807
|
-
left: left,
|
|
40808
|
-
width: width,
|
|
40809
|
-
height: height
|
|
40810
|
-
}, rest);
|
|
40721
|
+
var Cross = function Cross(props) {
|
|
40722
|
+
var x = props.x,
|
|
40723
|
+
y = props.y,
|
|
40724
|
+
width = props.width,
|
|
40725
|
+
height = props.height,
|
|
40726
|
+
top = props.top,
|
|
40727
|
+
left = props.left,
|
|
40728
|
+
className = props.className;
|
|
40811
40729
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40812
40730
|
return null;
|
|
40813
40731
|
}
|
|
@@ -40816,6 +40734,14 @@ var Cross = function Cross(_ref) {
|
|
|
40816
40734
|
d: getPath(x, y, width, height, top, left)
|
|
40817
40735
|
}));
|
|
40818
40736
|
};
|
|
40737
|
+
Cross.defaultProps = {
|
|
40738
|
+
x: 0,
|
|
40739
|
+
y: 0,
|
|
40740
|
+
top: 0,
|
|
40741
|
+
left: 0,
|
|
40742
|
+
width: 0,
|
|
40743
|
+
height: 0
|
|
40744
|
+
};
|
|
40819
40745
|
|
|
40820
40746
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40821
40747
|
|
|
@@ -41025,7 +40951,6 @@ var createScale = function createScale(_ref) {
|
|
|
41025
40951
|
isTextActive: false,
|
|
41026
40952
|
isSlideMoving: false,
|
|
41027
40953
|
isTravellerMoving: false,
|
|
41028
|
-
isTravellerFocused: false,
|
|
41029
40954
|
startX: scale(startIndex),
|
|
41030
40955
|
endX: scale(endIndex),
|
|
41031
40956
|
scale: scale,
|
|
@@ -41239,38 +41164,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41239
41164
|
}
|
|
41240
41165
|
});
|
|
41241
41166
|
}
|
|
41242
|
-
}, {
|
|
41243
|
-
key: "handleTravellerMoveKeyboard",
|
|
41244
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41245
|
-
var _this2 = this;
|
|
41246
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41247
|
-
var _this$state3 = this.state,
|
|
41248
|
-
scaleValues = _this$state3.scaleValues,
|
|
41249
|
-
startX = _this$state3.startX,
|
|
41250
|
-
endX = _this$state3.endX;
|
|
41251
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41252
|
-
var currentScaleValue = this.state[id];
|
|
41253
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41254
|
-
if (currentIndex === -1) {
|
|
41255
|
-
return;
|
|
41256
|
-
}
|
|
41257
|
-
var newIndex = currentIndex + direction;
|
|
41258
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41259
|
-
return;
|
|
41260
|
-
}
|
|
41261
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41262
|
-
|
|
41263
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41264
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41265
|
-
return;
|
|
41266
|
-
}
|
|
41267
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41268
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41269
|
-
startX: _this2.state.startX,
|
|
41270
|
-
endX: _this2.state.endX
|
|
41271
|
-
}));
|
|
41272
|
-
});
|
|
41273
|
-
}
|
|
41274
41167
|
}, {
|
|
41275
41168
|
key: "renderBackground",
|
|
41276
41169
|
value: function renderBackground() {
|
|
@@ -41318,7 +41211,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41318
41211
|
}, {
|
|
41319
41212
|
key: "renderTravellerLayer",
|
|
41320
41213
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41321
|
-
var _this3 = this;
|
|
41322
41214
|
var _this$props7 = this.props,
|
|
41323
41215
|
y = _this$props7.y,
|
|
41324
41216
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41332,31 +41224,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41332
41224
|
height: height
|
|
41333
41225
|
});
|
|
41334
41226
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41335
|
-
tabIndex: 0,
|
|
41336
|
-
role: "slider",
|
|
41337
41227
|
className: "recharts-brush-traveller",
|
|
41338
41228
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41339
41229
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41340
41230
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41341
41231
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41342
|
-
onKeyDown: function onKeyDown(e) {
|
|
41343
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41344
|
-
return;
|
|
41345
|
-
}
|
|
41346
|
-
e.preventDefault();
|
|
41347
|
-
e.stopPropagation();
|
|
41348
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41349
|
-
},
|
|
41350
|
-
onFocus: function onFocus() {
|
|
41351
|
-
_this3.setState({
|
|
41352
|
-
isTravellerFocused: true
|
|
41353
|
-
});
|
|
41354
|
-
},
|
|
41355
|
-
onBlur: function onBlur() {
|
|
41356
|
-
_this3.setState({
|
|
41357
|
-
isTravellerFocused: false
|
|
41358
|
-
});
|
|
41359
|
-
},
|
|
41360
41232
|
style: {
|
|
41361
41233
|
cursor: 'col-resize'
|
|
41362
41234
|
}
|
|
@@ -41400,9 +41272,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41400
41272
|
height = _this$props9.height,
|
|
41401
41273
|
travellerWidth = _this$props9.travellerWidth,
|
|
41402
41274
|
stroke = _this$props9.stroke;
|
|
41403
|
-
var _this$
|
|
41404
|
-
startX = _this$
|
|
41405
|
-
endX = _this$
|
|
41275
|
+
var _this$state3 = this.state,
|
|
41276
|
+
startX = _this$state3.startX,
|
|
41277
|
+
endX = _this$state3.endX;
|
|
41406
41278
|
var offset = 5;
|
|
41407
41279
|
var attrs = {
|
|
41408
41280
|
pointerEvents: 'none',
|
|
@@ -41434,13 +41306,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41434
41306
|
width = _this$props10.width,
|
|
41435
41307
|
height = _this$props10.height,
|
|
41436
41308
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41437
|
-
var _this$
|
|
41438
|
-
startX = _this$
|
|
41439
|
-
endX = _this$
|
|
41440
|
-
isTextActive = _this$
|
|
41441
|
-
isSlideMoving = _this$
|
|
41442
|
-
isTravellerMoving = _this$
|
|
41443
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41309
|
+
var _this$state4 = this.state,
|
|
41310
|
+
startX = _this$state4.startX,
|
|
41311
|
+
endX = _this$state4.endX,
|
|
41312
|
+
isTextActive = _this$state4.isTextActive,
|
|
41313
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41314
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41444
41315
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41445
41316
|
return null;
|
|
41446
41317
|
}
|
|
@@ -41452,7 +41323,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41452
41323
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41453
41324
|
onTouchMove: this.handleTouchMove,
|
|
41454
41325
|
style: style
|
|
41455
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41326
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41456
41327
|
}
|
|
41457
41328
|
}], [{
|
|
41458
41329
|
key: "renderDefaultTraveller",
|
|
@@ -41770,7 +41641,7 @@ function every(collection, predicate, guard) {
|
|
|
41770
41641
|
|
|
41771
41642
|
var every_1 = every;
|
|
41772
41643
|
|
|
41773
|
-
var defineProperty = _defineProperty$
|
|
41644
|
+
var defineProperty = _defineProperty$l;
|
|
41774
41645
|
|
|
41775
41646
|
/**
|
|
41776
41647
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42131,6 +42002,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42131
42002
|
legendType: 'rect',
|
|
42132
42003
|
minPointSize: 0,
|
|
42133
42004
|
hide: false,
|
|
42005
|
+
// data of bar
|
|
42134
42006
|
data: [],
|
|
42135
42007
|
layout: 'vertical',
|
|
42136
42008
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45043,11 +44915,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45043
44915
|
}
|
|
45044
44916
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45045
44917
|
x = _this$container$getBo.x,
|
|
45046
|
-
y = _this$container$getBo.y
|
|
45047
|
-
height = _this$container$getBo.height;
|
|
44918
|
+
y = _this$container$getBo.y;
|
|
45048
44919
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45049
44920
|
var pageX = x + coordinate;
|
|
45050
|
-
var pageY = y + this.offset.top
|
|
44921
|
+
var pageY = y + this.offset.top;
|
|
45051
44922
|
this.mouseHandlerCallback({
|
|
45052
44923
|
pageX: pageX,
|
|
45053
44924
|
pageY: pageY
|