@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.js
CHANGED
|
@@ -3589,6 +3589,7 @@ var icons = {
|
|
|
3589
3589
|
dotsVertical: (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("circle", { cx: 12, cy: 4.2, r: 1.9 }), jsxRuntime.jsx("circle", { cx: 12, cy: 12, r: 1.9 }), jsxRuntime.jsx("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" })] })),
|
|
3590
3590
|
dotsHorizontal: (jsxRuntime.jsxs("g", { children: [jsxRuntime.jsx("circle", { cx: 4.2, cy: 12, r: 1.9 }), jsxRuntime.jsx("circle", { cx: 12, cy: 12, r: 1.9 }), jsxRuntime.jsx("path", { d: "M17.8 12c0 1.1.9 1.9 1.9 1.9 1.1 0 1.9-.9 1.9-1.9s-.9-1.9-1.9-1.9c-1 0-1.9.8-1.9 1.9z" })] })),
|
|
3591
3591
|
bell: (jsxRuntime.jsx("path", { d: "M13.6 1.8c0-.4-.2-.8-.5-1.1-.3-.3-.7-.5-1.1-.5-.9 0-1.6.7-1.6 1.6v.4c-3.7.8-6.3 4-6.3 7.8v2.9c0 1.6-.6 3.1-1.7 4.2l-.4.2c-.6.6-.9 1.4-.9 2.2v1c0 .8.6 1.4 1.4 1.4h6.3c.2 1.1 1.2 1.9 2.4 1.9h1.6c.7 0 1.3-.3 1.7-.7.3-.3.6-.8.7-1.2h6.3c.7 0 1.4-.6 1.4-1.4v-1c0-.8-.3-1.6-.9-2.2l-.3-.3c-1.1-1.1-1.7-2.6-1.7-4.2V9.9c0-3.8-2.7-7.1-6.4-7.9v-.2z" })),
|
|
3592
|
+
bin: (jsxRuntime.jsx("path", { d: "M4.3 7.2h15.5v.2c-.1 1.4-.2 2.7-.3 4.1-.1 1.3-.2 2.7-.3 4-.1 1.6-.2 3.1-.4 4.7 0 .6-.1 1.1-.1 1.7-.2 1.1-1.3 2.1-2.5 2.1H7.9c-1.2 0-2.4-1.1-2.5-2.3-.1-1.6-.3-3.2-.4-4.9-.1-1.7-.3-3.4-.4-5.2-.1-1.4-.2-2.9-.3-4.4zm7.1 8.4v4.5c0 .4.3.7.7.7.4 0 .6-.3.6-.7v-8.9-.2c-.1-.3-.3-.5-.6-.5-.4 0-.7.3-.7.7v4.4zm4.5 0v-1.1-3.4c0-.4-.3-.7-.7-.7-.4 0-.6.3-.6.7v9.1c0 .3.2.5.5.6.4.1.8-.2.8-.7v-4.5zm-7.8 0v4.6c0 .3.3.6.6.6.4 0 .7-.3.7-.7v-8.9-.2c0-.4-.3-.6-.7-.6-.4 0-.6.3-.6.7v4.5zM15.7 3.3h3.5c1.1 0 1.9.7 2.1 1.8v.4c0 .2-.2.4-.4.5H3.2h-.1c-.3 0-.5-.2-.5-.5 0-1.2.9-2 2.2-2.1h3.5v-.7c0-1.6 1-2.7 2.5-2.7h2.6c1.3.1 2.2 1.2 2.3 2.4v.9zm-5.5 0h3.6v-.8c0-.3-.2-.5-.6-.5h-2.5c-.3 0-.5.2-.6.5.1.2.1.5.1.8z" })),
|
|
3592
3593
|
};
|
|
3593
3594
|
var Icon = function (props) { return (jsxRuntime.jsx(Wrapper$a, __assign$2({}, props, { children: jsxRuntime.jsx("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
|
|
3594
3595
|
|
|
@@ -4203,7 +4204,7 @@ var flags = {
|
|
|
4203
4204
|
};
|
|
4204
4205
|
var Flag = function (props) { return (jsxRuntime.jsx(Wrapper$9, __assign$2({}, props, { children: flags[parsers.getCountryCodeByLocale(props.locale)] }))); };
|
|
4205
4206
|
|
|
4206
|
-
var StyledHeading = styled__default["default"].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) {
|
|
4207
|
+
var StyledHeading = styled__default["default"].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) {
|
|
4207
4208
|
var type = _a.type;
|
|
4208
4209
|
return theme.heading[type].fontSize;
|
|
4209
4210
|
}, function (_a) {
|
|
@@ -4226,6 +4227,9 @@ var StyledHeading = styled__default["default"].span(templateObject_1$R || (templ
|
|
|
4226
4227
|
}, function (_a) {
|
|
4227
4228
|
var align = _a.align;
|
|
4228
4229
|
return align;
|
|
4230
|
+
}, function (_a) {
|
|
4231
|
+
var decoration = _a.decoration;
|
|
4232
|
+
return decoration;
|
|
4229
4233
|
});
|
|
4230
4234
|
var templateObject_1$R;
|
|
4231
4235
|
|
|
@@ -4270,7 +4274,7 @@ var illustrations = {
|
|
|
4270
4274
|
};
|
|
4271
4275
|
var Illustration = function (props) { return (jsxRuntime.jsx(Wrapper$8, __assign$2({}, props, { children: illustrations[props.type] }))); };
|
|
4272
4276
|
|
|
4273
|
-
var StyledParagraph = styled__default["default"].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) {
|
|
4277
|
+
var StyledParagraph = styled__default["default"].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) {
|
|
4274
4278
|
var size = _a.size;
|
|
4275
4279
|
return size ? theme.paragraph[size].fontSize : theme.paragraph.medium.fontSize;
|
|
4276
4280
|
}, function (_a) {
|
|
@@ -4304,6 +4308,9 @@ var StyledParagraph = styled__default["default"].p(templateObject_1$P || (templa
|
|
|
4304
4308
|
}, function (_a) {
|
|
4305
4309
|
var transform = _a.transform;
|
|
4306
4310
|
return transform;
|
|
4311
|
+
}, function (_a) {
|
|
4312
|
+
var decoration = _a.decoration;
|
|
4313
|
+
return decoration;
|
|
4307
4314
|
});
|
|
4308
4315
|
var templateObject_1$P;
|
|
4309
4316
|
|
|
@@ -4520,7 +4527,7 @@ function requiredArgs(required, args) {
|
|
|
4520
4527
|
}
|
|
4521
4528
|
}
|
|
4522
4529
|
|
|
4523
|
-
function _typeof$
|
|
4530
|
+
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); }
|
|
4524
4531
|
/**
|
|
4525
4532
|
* @name toDate
|
|
4526
4533
|
* @category Common Helpers
|
|
@@ -4556,7 +4563,7 @@ function toDate(argument) {
|
|
|
4556
4563
|
requiredArgs(1, arguments);
|
|
4557
4564
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4558
4565
|
|
|
4559
|
-
if (argument instanceof Date || _typeof$
|
|
4566
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4560
4567
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4561
4568
|
return new Date(argument.getTime());
|
|
4562
4569
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4827,7 +4834,7 @@ var millisecondsInMinute = 60000;
|
|
|
4827
4834
|
|
|
4828
4835
|
var millisecondsInHour = 3600000;
|
|
4829
4836
|
|
|
4830
|
-
function _typeof$
|
|
4837
|
+
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); }
|
|
4831
4838
|
/**
|
|
4832
4839
|
* @name isDate
|
|
4833
4840
|
* @category Common Helpers
|
|
@@ -4863,7 +4870,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4863
4870
|
|
|
4864
4871
|
function isDate(value) {
|
|
4865
4872
|
requiredArgs(1, arguments);
|
|
4866
|
-
return value instanceof Date || _typeof$
|
|
4873
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4867
4874
|
}
|
|
4868
4875
|
|
|
4869
4876
|
/**
|
|
@@ -13567,15 +13574,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13567
13574
|
|
|
13568
13575
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13569
13576
|
|
|
13570
|
-
function _slicedToArray$
|
|
13571
|
-
return _arrayWithHoles$
|
|
13577
|
+
function _slicedToArray$d(arr, i) {
|
|
13578
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13572
13579
|
}
|
|
13573
13580
|
|
|
13574
|
-
function _arrayWithHoles$
|
|
13581
|
+
function _arrayWithHoles$e(arr) {
|
|
13575
13582
|
if (Array.isArray(arr)) return arr;
|
|
13576
13583
|
}
|
|
13577
13584
|
|
|
13578
|
-
function _iterableToArrayLimit$
|
|
13585
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13579
13586
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13580
13587
|
|
|
13581
13588
|
if (_i == null) return;
|
|
@@ -13605,16 +13612,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13605
13612
|
return _arr;
|
|
13606
13613
|
}
|
|
13607
13614
|
|
|
13608
|
-
function _unsupportedIterableToArray$
|
|
13615
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13609
13616
|
if (!o) return;
|
|
13610
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13617
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13611
13618
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13612
13619
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13613
13620
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13614
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13621
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13615
13622
|
}
|
|
13616
13623
|
|
|
13617
|
-
function _arrayLikeToArray$
|
|
13624
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13618
13625
|
if (len == null || len > arr.length) len = arr.length;
|
|
13619
13626
|
|
|
13620
13627
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13622,7 +13629,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13622
13629
|
return arr2;
|
|
13623
13630
|
}
|
|
13624
13631
|
|
|
13625
|
-
function _nonIterableRest$
|
|
13632
|
+
function _nonIterableRest$e() {
|
|
13626
13633
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13627
13634
|
}
|
|
13628
13635
|
|
|
@@ -13686,7 +13693,7 @@ reservedProps.forEach(function (name) {
|
|
|
13686
13693
|
// This is a mapping from React prop names to the attribute names.
|
|
13687
13694
|
|
|
13688
13695
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13689
|
-
var _ref2 = _slicedToArray$
|
|
13696
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13690
13697
|
name = _ref2[0],
|
|
13691
13698
|
attributeName = _ref2[1];
|
|
13692
13699
|
|
|
@@ -16086,31 +16093,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16086
16093
|
return true;
|
|
16087
16094
|
};
|
|
16088
16095
|
|
|
16089
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16096
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16090
16097
|
|
|
16091
16098
|
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."); }
|
|
16092
16099
|
|
|
16093
16100
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16094
16101
|
|
|
16095
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16102
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16096
16103
|
|
|
16097
|
-
function ownKeys$
|
|
16104
|
+
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; }
|
|
16098
16105
|
|
|
16099
|
-
function _objectSpread$
|
|
16106
|
+
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; }
|
|
16100
16107
|
|
|
16101
|
-
function _defineProperty$
|
|
16108
|
+
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; }
|
|
16102
16109
|
|
|
16103
|
-
function _slicedToArray$
|
|
16110
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16104
16111
|
|
|
16105
|
-
function _nonIterableRest$
|
|
16112
|
+
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."); }
|
|
16106
16113
|
|
|
16107
|
-
function _unsupportedIterableToArray$
|
|
16114
|
+
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); }
|
|
16108
16115
|
|
|
16109
|
-
function _arrayLikeToArray$
|
|
16116
|
+
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; }
|
|
16110
16117
|
|
|
16111
|
-
function _iterableToArrayLimit$
|
|
16118
|
+
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; }
|
|
16112
16119
|
|
|
16113
|
-
function _arrayWithHoles$
|
|
16120
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16114
16121
|
|
|
16115
16122
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16116
16123
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16190,11 +16197,11 @@ function allFilesAccepted(_ref) {
|
|
|
16190
16197
|
|
|
16191
16198
|
return files.every(function (file) {
|
|
16192
16199
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16193
|
-
_fileAccepted2 = _slicedToArray$
|
|
16200
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16194
16201
|
accepted = _fileAccepted2[0];
|
|
16195
16202
|
|
|
16196
16203
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16197
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16204
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16198
16205
|
sizeMatch = _fileMatchSize2[0];
|
|
16199
16206
|
|
|
16200
16207
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16291,7 +16298,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16291
16298
|
function pickerOptionsFromAccept(accept) {
|
|
16292
16299
|
if (isDefined(accept)) {
|
|
16293
16300
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16294
|
-
var _ref3 = _slicedToArray$
|
|
16301
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16295
16302
|
mimeType = _ref3[0],
|
|
16296
16303
|
ext = _ref3[1];
|
|
16297
16304
|
|
|
@@ -16309,11 +16316,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16309
16316
|
|
|
16310
16317
|
return ok;
|
|
16311
16318
|
}).reduce(function (agg, _ref4) {
|
|
16312
|
-
var _ref5 = _slicedToArray$
|
|
16319
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16313
16320
|
mimeType = _ref5[0],
|
|
16314
16321
|
ext = _ref5[1];
|
|
16315
16322
|
|
|
16316
|
-
return _objectSpread$
|
|
16323
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16317
16324
|
}, {});
|
|
16318
16325
|
return [{
|
|
16319
16326
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16333,7 +16340,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16333
16340
|
function acceptPropAsAcceptAttr(accept) {
|
|
16334
16341
|
if (isDefined(accept)) {
|
|
16335
16342
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16336
|
-
var _ref7 = _slicedToArray$
|
|
16343
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16337
16344
|
mimeType = _ref7[0],
|
|
16338
16345
|
ext = _ref7[1];
|
|
16339
16346
|
|
|
@@ -16401,40 +16408,40 @@ function isExt(v) {
|
|
|
16401
16408
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16402
16409
|
*/
|
|
16403
16410
|
|
|
16404
|
-
var _excluded$
|
|
16405
|
-
_excluded2$
|
|
16411
|
+
var _excluded$d = ["children"],
|
|
16412
|
+
_excluded2$3 = ["open"],
|
|
16406
16413
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16407
16414
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16408
16415
|
|
|
16409
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16416
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16410
16417
|
|
|
16411
16418
|
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."); }
|
|
16412
16419
|
|
|
16413
16420
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16414
16421
|
|
|
16415
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16422
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16416
16423
|
|
|
16417
|
-
function _slicedToArray$
|
|
16424
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16418
16425
|
|
|
16419
|
-
function _nonIterableRest$
|
|
16426
|
+
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."); }
|
|
16420
16427
|
|
|
16421
|
-
function _unsupportedIterableToArray$
|
|
16428
|
+
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); }
|
|
16422
16429
|
|
|
16423
|
-
function _arrayLikeToArray$
|
|
16430
|
+
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; }
|
|
16424
16431
|
|
|
16425
|
-
function _iterableToArrayLimit$
|
|
16432
|
+
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; }
|
|
16426
16433
|
|
|
16427
|
-
function _arrayWithHoles$
|
|
16434
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16428
16435
|
|
|
16429
|
-
function ownKeys$
|
|
16436
|
+
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; }
|
|
16430
16437
|
|
|
16431
|
-
function _objectSpread$
|
|
16438
|
+
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; }
|
|
16432
16439
|
|
|
16433
|
-
function _defineProperty$
|
|
16440
|
+
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; }
|
|
16434
16441
|
|
|
16435
|
-
function _objectWithoutProperties$
|
|
16442
|
+
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; }
|
|
16436
16443
|
|
|
16437
|
-
function _objectWithoutPropertiesLoose$
|
|
16444
|
+
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; }
|
|
16438
16445
|
/**
|
|
16439
16446
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16440
16447
|
*
|
|
@@ -16452,11 +16459,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16452
16459
|
|
|
16453
16460
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16454
16461
|
var children = _ref.children,
|
|
16455
|
-
params = _objectWithoutProperties$
|
|
16462
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16456
16463
|
|
|
16457
16464
|
var _useDropzone = useDropzone(params),
|
|
16458
16465
|
open = _useDropzone.open,
|
|
16459
|
-
props = _objectWithoutProperties$
|
|
16466
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16460
16467
|
|
|
16461
16468
|
React$3.useImperativeHandle(ref, function () {
|
|
16462
16469
|
return {
|
|
@@ -16464,13 +16471,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16464
16471
|
};
|
|
16465
16472
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16466
16473
|
|
|
16467
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16474
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16468
16475
|
open: open
|
|
16469
16476
|
})));
|
|
16470
16477
|
});
|
|
16471
16478
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16472
16479
|
|
|
16473
|
-
var defaultProps$
|
|
16480
|
+
var defaultProps$1 = {
|
|
16474
16481
|
disabled: false,
|
|
16475
16482
|
getFilesFromEvent: fromEvent,
|
|
16476
16483
|
maxSize: Infinity,
|
|
@@ -16486,7 +16493,7 @@ var defaultProps$2 = {
|
|
|
16486
16493
|
useFsAccessApi: true,
|
|
16487
16494
|
autoFocus: false
|
|
16488
16495
|
};
|
|
16489
|
-
Dropzone.defaultProps = defaultProps$
|
|
16496
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16490
16497
|
Dropzone.propTypes = {
|
|
16491
16498
|
/**
|
|
16492
16499
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16837,7 +16844,7 @@ var initialState = {
|
|
|
16837
16844
|
function useDropzone() {
|
|
16838
16845
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16839
16846
|
|
|
16840
|
-
var _defaultProps$props = _objectSpread$
|
|
16847
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16841
16848
|
accept = _defaultProps$props.accept,
|
|
16842
16849
|
disabled = _defaultProps$props.disabled,
|
|
16843
16850
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16884,7 +16891,7 @@ function useDropzone() {
|
|
|
16884
16891
|
var inputRef = React$3.useRef(null);
|
|
16885
16892
|
|
|
16886
16893
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
16887
|
-
_useReducer2 = _slicedToArray$
|
|
16894
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16888
16895
|
state = _useReducer2[0],
|
|
16889
16896
|
dispatch = _useReducer2[1];
|
|
16890
16897
|
|
|
@@ -17054,12 +17061,12 @@ function useDropzone() {
|
|
|
17054
17061
|
var fileRejections = [];
|
|
17055
17062
|
files.forEach(function (file) {
|
|
17056
17063
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17057
|
-
_fileAccepted2 = _slicedToArray$
|
|
17064
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17058
17065
|
accepted = _fileAccepted2[0],
|
|
17059
17066
|
acceptError = _fileAccepted2[1];
|
|
17060
17067
|
|
|
17061
17068
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17062
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17069
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17063
17070
|
sizeMatch = _fileMatchSize2[0],
|
|
17064
17071
|
sizeError = _fileMatchSize2[1];
|
|
17065
17072
|
|
|
@@ -17260,9 +17267,9 @@ function useDropzone() {
|
|
|
17260
17267
|
onDragOver = _ref2.onDragOver,
|
|
17261
17268
|
onDragLeave = _ref2.onDragLeave,
|
|
17262
17269
|
onDrop = _ref2.onDrop,
|
|
17263
|
-
rest = _objectWithoutProperties$
|
|
17270
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17264
17271
|
|
|
17265
|
-
return _objectSpread$
|
|
17272
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17266
17273
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17267
17274
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17268
17275
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17287,9 +17294,9 @@ function useDropzone() {
|
|
|
17287
17294
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17288
17295
|
onChange = _ref3.onChange,
|
|
17289
17296
|
onClick = _ref3.onClick,
|
|
17290
|
-
rest = _objectWithoutProperties$
|
|
17297
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17291
17298
|
|
|
17292
|
-
var inputProps = _defineProperty$
|
|
17299
|
+
var inputProps = _defineProperty$r({
|
|
17293
17300
|
accept: acceptAttr,
|
|
17294
17301
|
multiple: multiple,
|
|
17295
17302
|
type: "file",
|
|
@@ -17301,10 +17308,10 @@ function useDropzone() {
|
|
|
17301
17308
|
tabIndex: -1
|
|
17302
17309
|
}, refKey, inputRef);
|
|
17303
17310
|
|
|
17304
|
-
return _objectSpread$
|
|
17311
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17305
17312
|
};
|
|
17306
17313
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17307
|
-
return _objectSpread$
|
|
17314
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17308
17315
|
isFocused: isFocused && !disabled,
|
|
17309
17316
|
getRootProps: getRootProps,
|
|
17310
17317
|
getInputProps: getInputProps,
|
|
@@ -17323,40 +17330,40 @@ function reducer$1(state, action) {
|
|
|
17323
17330
|
/* istanbul ignore next */
|
|
17324
17331
|
switch (action.type) {
|
|
17325
17332
|
case "focus":
|
|
17326
|
-
return _objectSpread$
|
|
17333
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17327
17334
|
isFocused: true
|
|
17328
17335
|
});
|
|
17329
17336
|
|
|
17330
17337
|
case "blur":
|
|
17331
|
-
return _objectSpread$
|
|
17338
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17332
17339
|
isFocused: false
|
|
17333
17340
|
});
|
|
17334
17341
|
|
|
17335
17342
|
case "openDialog":
|
|
17336
|
-
return _objectSpread$
|
|
17343
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17337
17344
|
isFileDialogActive: true
|
|
17338
17345
|
});
|
|
17339
17346
|
|
|
17340
17347
|
case "closeDialog":
|
|
17341
|
-
return _objectSpread$
|
|
17348
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17342
17349
|
isFileDialogActive: false
|
|
17343
17350
|
});
|
|
17344
17351
|
|
|
17345
17352
|
case "setDraggedFiles":
|
|
17346
|
-
return _objectSpread$
|
|
17353
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17347
17354
|
isDragActive: action.isDragActive,
|
|
17348
17355
|
isDragAccept: action.isDragAccept,
|
|
17349
17356
|
isDragReject: action.isDragReject
|
|
17350
17357
|
});
|
|
17351
17358
|
|
|
17352
17359
|
case "setFiles":
|
|
17353
|
-
return _objectSpread$
|
|
17360
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17354
17361
|
acceptedFiles: action.acceptedFiles,
|
|
17355
17362
|
fileRejections: action.fileRejections
|
|
17356
17363
|
});
|
|
17357
17364
|
|
|
17358
17365
|
case "reset":
|
|
17359
|
-
return _objectSpread$
|
|
17366
|
+
return _objectSpread$p({}, initialState);
|
|
17360
17367
|
|
|
17361
17368
|
default:
|
|
17362
17369
|
return state;
|
|
@@ -19582,7 +19589,7 @@ function shallowEqual(a, b) {
|
|
|
19582
19589
|
return true;
|
|
19583
19590
|
}
|
|
19584
19591
|
|
|
19585
|
-
function _typeof$
|
|
19592
|
+
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); }
|
|
19586
19593
|
|
|
19587
19594
|
//
|
|
19588
19595
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19609,9 +19616,7 @@ var FilteredElementKeyMap = {
|
|
|
19609
19616
|
};
|
|
19610
19617
|
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'];
|
|
19611
19618
|
|
|
19612
|
-
|
|
19613
|
-
|
|
19614
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19619
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19615
19620
|
|
|
19616
19621
|
/** the offset of a chart, which define the blank space all around */
|
|
19617
19622
|
|
|
@@ -19647,7 +19652,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19647
19652
|
};
|
|
19648
19653
|
};
|
|
19649
19654
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19650
|
-
if (!isObject_1(props) || _typeof$
|
|
19655
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19651
19656
|
return null;
|
|
19652
19657
|
}
|
|
19653
19658
|
var out = null;
|
|
@@ -19661,11 +19666,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19661
19666
|
return out;
|
|
19662
19667
|
};
|
|
19663
19668
|
|
|
19664
|
-
var _excluded$
|
|
19665
|
-
_excluded2$
|
|
19666
|
-
function _objectWithoutProperties$
|
|
19667
|
-
function _objectWithoutPropertiesLoose$
|
|
19668
|
-
function _typeof$
|
|
19669
|
+
var _excluded$c = ["children"],
|
|
19670
|
+
_excluded2$2 = ["children"];
|
|
19671
|
+
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; }
|
|
19672
|
+
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; }
|
|
19673
|
+
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); }
|
|
19669
19674
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19670
19675
|
click: 'onClick',
|
|
19671
19676
|
mousedown: 'onMouseDown',
|
|
@@ -19772,7 +19777,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19772
19777
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19773
19778
|
};
|
|
19774
19779
|
var isDotProps = function isDotProps(dot) {
|
|
19775
|
-
return dot && _typeof$
|
|
19780
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19776
19781
|
};
|
|
19777
19782
|
|
|
19778
19783
|
/**
|
|
@@ -19864,10 +19869,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19864
19869
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19865
19870
|
var _ref = nextChild.props || {},
|
|
19866
19871
|
nextChildren = _ref.children,
|
|
19867
|
-
nextProps = _objectWithoutProperties$
|
|
19872
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19868
19873
|
var _ref2 = prevChild.props || {},
|
|
19869
19874
|
prevChildren = _ref2.children,
|
|
19870
|
-
prevProps = _objectWithoutProperties$
|
|
19875
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19871
19876
|
if (nextChildren && prevChildren) {
|
|
19872
19877
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19873
19878
|
}
|
|
@@ -19909,10 +19914,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19909
19914
|
return toArray(children).indexOf(child);
|
|
19910
19915
|
};
|
|
19911
19916
|
|
|
19912
|
-
var _excluded$
|
|
19917
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19913
19918
|
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); }
|
|
19914
|
-
function _objectWithoutProperties$
|
|
19915
|
-
function _objectWithoutPropertiesLoose$
|
|
19919
|
+
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; }
|
|
19920
|
+
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; }
|
|
19916
19921
|
function Surface(props) {
|
|
19917
19922
|
var children = props.children,
|
|
19918
19923
|
width = props.width,
|
|
@@ -19920,7 +19925,7 @@ function Surface(props) {
|
|
|
19920
19925
|
viewBox = props.viewBox,
|
|
19921
19926
|
className = props.className,
|
|
19922
19927
|
style = props.style,
|
|
19923
|
-
others = _objectWithoutProperties$
|
|
19928
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19924
19929
|
var svgView = viewBox || {
|
|
19925
19930
|
width: width,
|
|
19926
19931
|
height: height,
|
|
@@ -19937,14 +19942,14 @@ function Surface(props) {
|
|
|
19937
19942
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
19938
19943
|
}
|
|
19939
19944
|
|
|
19940
|
-
var _excluded$
|
|
19945
|
+
var _excluded$a = ["children", "className"];
|
|
19941
19946
|
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); }
|
|
19942
|
-
function _objectWithoutProperties$
|
|
19943
|
-
function _objectWithoutPropertiesLoose$
|
|
19947
|
+
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; }
|
|
19948
|
+
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; }
|
|
19944
19949
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
19945
19950
|
var children = props.children,
|
|
19946
19951
|
className = props.className,
|
|
19947
|
-
others = _objectWithoutProperties$
|
|
19952
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19948
19953
|
var layerClass = classNames('recharts-layer', className);
|
|
19949
19954
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
19950
19955
|
className: layerClass
|
|
@@ -23359,16 +23364,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23359
23364
|
stackOffsetNone(series, order);
|
|
23360
23365
|
}
|
|
23361
23366
|
|
|
23362
|
-
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); }
|
|
23363
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23364
23367
|
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); }
|
|
23365
|
-
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; }
|
|
23366
|
-
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; }
|
|
23367
|
-
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; }
|
|
23368
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23369
|
-
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); }
|
|
23370
|
-
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; }
|
|
23371
|
-
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; }
|
|
23372
23368
|
var symbolFactories = {
|
|
23373
23369
|
symbolCircle: symbolCircle,
|
|
23374
23370
|
symbolCross: symbolCross,
|
|
@@ -23407,35 +23403,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23407
23403
|
return Math.PI * size * size / 4;
|
|
23408
23404
|
}
|
|
23409
23405
|
};
|
|
23406
|
+
var symbolsDefaultProps = {
|
|
23407
|
+
type: 'circle',
|
|
23408
|
+
size: 64,
|
|
23409
|
+
sizeType: 'area'
|
|
23410
|
+
};
|
|
23410
23411
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23411
23412
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23412
23413
|
};
|
|
23413
|
-
var Symbols = function Symbols(
|
|
23414
|
-
var _ref$type = _ref.type,
|
|
23415
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23416
|
-
_ref$size = _ref.size,
|
|
23417
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23418
|
-
_ref$sizeType = _ref.sizeType,
|
|
23419
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23420
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23421
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23422
|
-
type: type,
|
|
23423
|
-
size: size,
|
|
23424
|
-
sizeType: sizeType
|
|
23425
|
-
});
|
|
23426
|
-
|
|
23414
|
+
var Symbols = function Symbols(props) {
|
|
23427
23415
|
/**
|
|
23428
23416
|
* Calculate the path of curve
|
|
23429
23417
|
* @return {String} path
|
|
23430
23418
|
*/
|
|
23431
23419
|
var getPath = function getPath() {
|
|
23420
|
+
var size = props.size,
|
|
23421
|
+
sizeType = props.sizeType,
|
|
23422
|
+
type = props.type;
|
|
23432
23423
|
var symbolFactory = getSymbolFactory(type);
|
|
23433
23424
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23434
23425
|
return symbol();
|
|
23435
23426
|
};
|
|
23436
23427
|
var className = props.className,
|
|
23437
23428
|
cx = props.cx,
|
|
23438
|
-
cy = props.cy
|
|
23429
|
+
cy = props.cy,
|
|
23430
|
+
size = props.size;
|
|
23439
23431
|
var filteredProps = filterProps(props, true);
|
|
23440
23432
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23441
23433
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23446,34 +23438,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23446
23438
|
}
|
|
23447
23439
|
return null;
|
|
23448
23440
|
};
|
|
23441
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23449
23442
|
Symbols.registerSymbol = registerSymbol;
|
|
23450
23443
|
|
|
23451
|
-
function _typeof$
|
|
23444
|
+
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); }
|
|
23452
23445
|
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); }
|
|
23453
|
-
function ownKeys$
|
|
23454
|
-
function _objectSpread$
|
|
23455
|
-
function _classCallCheck$
|
|
23456
|
-
function _defineProperties$
|
|
23457
|
-
function _createClass$
|
|
23458
|
-
function _inherits$
|
|
23459
|
-
function _setPrototypeOf$
|
|
23460
|
-
function _createSuper$
|
|
23461
|
-
function _possibleConstructorReturn$
|
|
23462
|
-
function _assertThisInitialized$
|
|
23463
|
-
function _isNativeReflectConstruct$
|
|
23464
|
-
function _getPrototypeOf$
|
|
23465
|
-
function _defineProperty$
|
|
23466
|
-
function _toPropertyKey$
|
|
23467
|
-
function _toPrimitive$
|
|
23446
|
+
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; }
|
|
23447
|
+
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; }
|
|
23448
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23449
|
+
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); } }
|
|
23450
|
+
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; }
|
|
23451
|
+
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); }
|
|
23452
|
+
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); }
|
|
23453
|
+
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); }; }
|
|
23454
|
+
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); }
|
|
23455
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23456
|
+
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; } }
|
|
23457
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23458
|
+
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; }
|
|
23459
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23460
|
+
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); }
|
|
23468
23461
|
var SIZE = 32;
|
|
23469
23462
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23470
|
-
_inherits$
|
|
23471
|
-
var _super = _createSuper$
|
|
23463
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23464
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23472
23465
|
function DefaultLegendContent() {
|
|
23473
|
-
_classCallCheck$
|
|
23466
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23474
23467
|
return _super.apply(this, arguments);
|
|
23475
23468
|
}
|
|
23476
|
-
_createClass$
|
|
23469
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23477
23470
|
key: "renderIcon",
|
|
23478
23471
|
value:
|
|
23479
23472
|
/**
|
|
@@ -23518,7 +23511,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23518
23511
|
});
|
|
23519
23512
|
}
|
|
23520
23513
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23521
|
-
var iconProps = _objectSpread$
|
|
23514
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23522
23515
|
delete iconProps.legendIcon;
|
|
23523
23516
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23524
23517
|
}
|
|
@@ -23566,7 +23559,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23566
23559
|
var finalFormatter = entry.formatter || formatter;
|
|
23567
23560
|
var className = classNames((_classNames = {
|
|
23568
23561
|
'recharts-legend-item': true
|
|
23569
|
-
}, _defineProperty$
|
|
23562
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23570
23563
|
if (entry.type === 'none') {
|
|
23571
23564
|
return null;
|
|
23572
23565
|
}
|
|
@@ -23611,8 +23604,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23611
23604
|
}]);
|
|
23612
23605
|
return DefaultLegendContent;
|
|
23613
23606
|
}(React$3.PureComponent);
|
|
23614
|
-
_defineProperty$
|
|
23615
|
-
_defineProperty$
|
|
23607
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23608
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23616
23609
|
iconSize: 14,
|
|
23617
23610
|
layout: 'horizontal',
|
|
23618
23611
|
align: 'center',
|
|
@@ -23620,25 +23613,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23620
23613
|
inactiveColor: '#ccc'
|
|
23621
23614
|
});
|
|
23622
23615
|
|
|
23623
|
-
function _typeof$
|
|
23624
|
-
var _excluded$
|
|
23625
|
-
function ownKeys$
|
|
23626
|
-
function _objectSpread$
|
|
23627
|
-
function _classCallCheck$
|
|
23628
|
-
function _defineProperties$
|
|
23629
|
-
function _createClass$
|
|
23630
|
-
function _inherits$
|
|
23631
|
-
function _setPrototypeOf$
|
|
23632
|
-
function _createSuper$
|
|
23633
|
-
function _possibleConstructorReturn$
|
|
23634
|
-
function _assertThisInitialized$
|
|
23635
|
-
function _isNativeReflectConstruct$
|
|
23636
|
-
function _getPrototypeOf$
|
|
23637
|
-
function _defineProperty$
|
|
23638
|
-
function _toPropertyKey$
|
|
23639
|
-
function _toPrimitive$
|
|
23640
|
-
function _objectWithoutProperties$
|
|
23641
|
-
function _objectWithoutPropertiesLoose$
|
|
23616
|
+
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); }
|
|
23617
|
+
var _excluded$9 = ["ref"];
|
|
23618
|
+
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; }
|
|
23619
|
+
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; }
|
|
23620
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23621
|
+
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); } }
|
|
23622
|
+
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; }
|
|
23623
|
+
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); }
|
|
23624
|
+
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); }
|
|
23625
|
+
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); }; }
|
|
23626
|
+
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); }
|
|
23627
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23628
|
+
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; } }
|
|
23629
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23630
|
+
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; }
|
|
23631
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23632
|
+
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); }
|
|
23633
|
+
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; }
|
|
23634
|
+
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; }
|
|
23642
23635
|
function defaultUniqBy$1(entry) {
|
|
23643
23636
|
return entry.value;
|
|
23644
23637
|
}
|
|
@@ -23659,27 +23652,27 @@ function renderContent$1(content, props) {
|
|
|
23659
23652
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23660
23653
|
}
|
|
23661
23654
|
props.ref;
|
|
23662
|
-
var otherProps = _objectWithoutProperties$
|
|
23655
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23663
23656
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23664
23657
|
}
|
|
23665
23658
|
var EPS$2 = 1;
|
|
23666
23659
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23667
|
-
_inherits$
|
|
23668
|
-
var _super = _createSuper$
|
|
23660
|
+
_inherits$7(Legend, _PureComponent);
|
|
23661
|
+
var _super = _createSuper$7(Legend);
|
|
23669
23662
|
function Legend() {
|
|
23670
23663
|
var _this;
|
|
23671
|
-
_classCallCheck$
|
|
23664
|
+
_classCallCheck$9(this, Legend);
|
|
23672
23665
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23673
23666
|
args[_key] = arguments[_key];
|
|
23674
23667
|
}
|
|
23675
23668
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23676
|
-
_defineProperty$
|
|
23669
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23677
23670
|
boxWidth: -1,
|
|
23678
23671
|
boxHeight: -1
|
|
23679
23672
|
});
|
|
23680
23673
|
return _this;
|
|
23681
23674
|
}
|
|
23682
|
-
_createClass$
|
|
23675
|
+
_createClass$9(Legend, [{
|
|
23683
23676
|
key: "componentDidMount",
|
|
23684
23677
|
value: function componentDidMount() {
|
|
23685
23678
|
this.updateBBox();
|
|
@@ -23754,7 +23747,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23754
23747
|
};
|
|
23755
23748
|
}
|
|
23756
23749
|
}
|
|
23757
|
-
return _objectSpread$
|
|
23750
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23758
23751
|
}
|
|
23759
23752
|
}, {
|
|
23760
23753
|
key: "updateBBox",
|
|
@@ -23797,7 +23790,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23797
23790
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23798
23791
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23799
23792
|
payload = _this$props2.payload;
|
|
23800
|
-
var outerStyle = _objectSpread$
|
|
23793
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23801
23794
|
position: 'absolute',
|
|
23802
23795
|
width: width || 'auto',
|
|
23803
23796
|
height: height || 'auto'
|
|
@@ -23808,7 +23801,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23808
23801
|
ref: function ref(node) {
|
|
23809
23802
|
_this2.wrapperNode = node;
|
|
23810
23803
|
}
|
|
23811
|
-
}, renderContent$1(content, _objectSpread$
|
|
23804
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23812
23805
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23813
23806
|
})));
|
|
23814
23807
|
}
|
|
@@ -23831,8 +23824,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23831
23824
|
}]);
|
|
23832
23825
|
return Legend;
|
|
23833
23826
|
}(React$3.PureComponent);
|
|
23834
|
-
_defineProperty$
|
|
23835
|
-
_defineProperty$
|
|
23827
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23828
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23836
23829
|
iconSize: 14,
|
|
23837
23830
|
layout: 'horizontal',
|
|
23838
23831
|
align: 'center',
|
|
@@ -24396,13 +24389,13 @@ function setRafTimeout(callback) {
|
|
|
24396
24389
|
requestAnimationFrame(shouldUpdate);
|
|
24397
24390
|
}
|
|
24398
24391
|
|
|
24399
|
-
function _typeof$
|
|
24400
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24401
|
-
function _nonIterableRest$
|
|
24402
|
-
function _unsupportedIterableToArray$
|
|
24403
|
-
function _arrayLikeToArray$
|
|
24392
|
+
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); }
|
|
24393
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24394
|
+
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."); }
|
|
24395
|
+
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); }
|
|
24396
|
+
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; }
|
|
24404
24397
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24405
|
-
function _arrayWithHoles$
|
|
24398
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24406
24399
|
function createAnimateManager() {
|
|
24407
24400
|
var currStyle = {};
|
|
24408
24401
|
var handleChange = function handleChange() {
|
|
@@ -24429,7 +24422,7 @@ function createAnimateManager() {
|
|
|
24429
24422
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24430
24423
|
return;
|
|
24431
24424
|
}
|
|
24432
|
-
if (_typeof$
|
|
24425
|
+
if (_typeof$o(_style) === 'object') {
|
|
24433
24426
|
currStyle = _style;
|
|
24434
24427
|
handleChange(currStyle);
|
|
24435
24428
|
}
|
|
@@ -24456,12 +24449,12 @@ function createAnimateManager() {
|
|
|
24456
24449
|
};
|
|
24457
24450
|
}
|
|
24458
24451
|
|
|
24459
|
-
function _typeof$
|
|
24460
|
-
function ownKeys$
|
|
24461
|
-
function _objectSpread$
|
|
24462
|
-
function _defineProperty$
|
|
24463
|
-
function _toPropertyKey$
|
|
24464
|
-
function _toPrimitive$
|
|
24452
|
+
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); }
|
|
24453
|
+
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; }
|
|
24454
|
+
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; }
|
|
24455
|
+
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; }
|
|
24456
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24457
|
+
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); }
|
|
24465
24458
|
/* eslint no-console: 0 */
|
|
24466
24459
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24467
24460
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24493,7 +24486,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24493
24486
|
*/
|
|
24494
24487
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24495
24488
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24496
|
-
return _defineProperty$
|
|
24489
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24497
24490
|
}
|
|
24498
24491
|
var isTransition = name === 'transition';
|
|
24499
24492
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24504,7 +24497,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24504
24497
|
if (isTransition) {
|
|
24505
24498
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24506
24499
|
}
|
|
24507
|
-
return _objectSpread$
|
|
24500
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24508
24501
|
}, {});
|
|
24509
24502
|
};
|
|
24510
24503
|
|
|
@@ -24514,7 +24507,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24514
24507
|
*/
|
|
24515
24508
|
var mapObject = function mapObject(fn, obj) {
|
|
24516
24509
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24517
|
-
return _objectSpread$
|
|
24510
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24518
24511
|
}, {});
|
|
24519
24512
|
};
|
|
24520
24513
|
|
|
@@ -24524,7 +24517,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24524
24517
|
*/
|
|
24525
24518
|
var translateStyle = function translateStyle(style) {
|
|
24526
24519
|
return Object.keys(style).reduce(function (res, key) {
|
|
24527
|
-
return _objectSpread$
|
|
24520
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24528
24521
|
}, style);
|
|
24529
24522
|
};
|
|
24530
24523
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24552,16 +24545,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24552
24545
|
}
|
|
24553
24546
|
};
|
|
24554
24547
|
|
|
24555
|
-
function _slicedToArray$
|
|
24556
|
-
function _nonIterableRest$
|
|
24557
|
-
function _iterableToArrayLimit$
|
|
24558
|
-
function _arrayWithHoles$
|
|
24559
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24548
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24549
|
+
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."); }
|
|
24550
|
+
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; } }
|
|
24551
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24552
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24560
24553
|
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."); }
|
|
24561
|
-
function _unsupportedIterableToArray$
|
|
24554
|
+
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); }
|
|
24562
24555
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24563
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24564
|
-
function _arrayLikeToArray$
|
|
24556
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24557
|
+
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; }
|
|
24565
24558
|
var ACCURACY = 1e-4;
|
|
24566
24559
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24567
24560
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24637,7 +24630,7 @@ var configBezier = function configBezier() {
|
|
|
24637
24630
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24638
24631
|
return parseFloat(x);
|
|
24639
24632
|
});
|
|
24640
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24633
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24641
24634
|
x1 = _easing$1$split$0$spl2[0];
|
|
24642
24635
|
y1 = _easing$1$split$0$spl2[1];
|
|
24643
24636
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24730,22 +24723,22 @@ var configEasing = function configEasing() {
|
|
|
24730
24723
|
return null;
|
|
24731
24724
|
};
|
|
24732
24725
|
|
|
24733
|
-
function _typeof$
|
|
24734
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24726
|
+
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); }
|
|
24727
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24735
24728
|
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."); }
|
|
24736
24729
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24737
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24738
|
-
function ownKeys$
|
|
24739
|
-
function _objectSpread$
|
|
24740
|
-
function _defineProperty$
|
|
24741
|
-
function _toPropertyKey$
|
|
24742
|
-
function _toPrimitive$
|
|
24743
|
-
function _slicedToArray$
|
|
24744
|
-
function _nonIterableRest$
|
|
24745
|
-
function _unsupportedIterableToArray$
|
|
24746
|
-
function _arrayLikeToArray$
|
|
24747
|
-
function _iterableToArrayLimit$
|
|
24748
|
-
function _arrayWithHoles$
|
|
24730
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24731
|
+
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; }
|
|
24732
|
+
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; }
|
|
24733
|
+
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; }
|
|
24734
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24735
|
+
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); }
|
|
24736
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24737
|
+
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."); }
|
|
24738
|
+
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); }
|
|
24739
|
+
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; }
|
|
24740
|
+
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; } }
|
|
24741
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24749
24742
|
var alpha = function alpha(begin, end, k) {
|
|
24750
24743
|
return begin + (end - begin) * k;
|
|
24751
24744
|
};
|
|
@@ -24763,10 +24756,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24763
24756
|
var nextStepVals = mapObject(function (key, val) {
|
|
24764
24757
|
if (needContinue(val)) {
|
|
24765
24758
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24766
|
-
_easing2 = _slicedToArray$
|
|
24759
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24767
24760
|
newX = _easing2[0],
|
|
24768
24761
|
newV = _easing2[1];
|
|
24769
|
-
return _objectSpread$
|
|
24762
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24770
24763
|
from: newX,
|
|
24771
24764
|
velocity: newV
|
|
24772
24765
|
});
|
|
@@ -24776,7 +24769,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24776
24769
|
if (steps < 1) {
|
|
24777
24770
|
return mapObject(function (key, val) {
|
|
24778
24771
|
if (needContinue(val)) {
|
|
24779
|
-
return _objectSpread$
|
|
24772
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24780
24773
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24781
24774
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24782
24775
|
});
|
|
@@ -24791,10 +24784,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24791
24784
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24792
24785
|
var interKeys = getIntersectionKeys(from, to);
|
|
24793
24786
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24794
|
-
return _objectSpread$
|
|
24787
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24795
24788
|
}, {});
|
|
24796
24789
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24797
|
-
return _objectSpread$
|
|
24790
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24798
24791
|
from: from[key],
|
|
24799
24792
|
velocity: 0,
|
|
24800
24793
|
to: to[key]
|
|
@@ -24824,7 +24817,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24824
24817
|
var steps = deltaTime / easing.dt;
|
|
24825
24818
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24826
24819
|
// get union set and add compatible prefix
|
|
24827
|
-
render(_objectSpread$
|
|
24820
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24828
24821
|
preTime = now;
|
|
24829
24822
|
if (!shouldStopAnimation()) {
|
|
24830
24823
|
cafId = requestAnimationFrame(update);
|
|
@@ -24842,14 +24835,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24842
24835
|
}, timingStyle);
|
|
24843
24836
|
|
|
24844
24837
|
// get union set and add compatible prefix
|
|
24845
|
-
render(_objectSpread$
|
|
24838
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24846
24839
|
if (t < 1) {
|
|
24847
24840
|
cafId = requestAnimationFrame(update);
|
|
24848
24841
|
} else {
|
|
24849
24842
|
var finalStyle = mapObject(function (key, val) {
|
|
24850
24843
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24851
24844
|
}, timingStyle);
|
|
24852
|
-
render(_objectSpread$
|
|
24845
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24853
24846
|
}
|
|
24854
24847
|
};
|
|
24855
24848
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24865,37 +24858,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24865
24858
|
};
|
|
24866
24859
|
});
|
|
24867
24860
|
|
|
24868
|
-
function _typeof$
|
|
24869
|
-
var _excluded$
|
|
24870
|
-
function _objectWithoutProperties$
|
|
24871
|
-
function _objectWithoutPropertiesLoose$
|
|
24872
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24861
|
+
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); }
|
|
24862
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24863
|
+
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; }
|
|
24864
|
+
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; }
|
|
24865
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24873
24866
|
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."); }
|
|
24874
|
-
function _unsupportedIterableToArray$
|
|
24867
|
+
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); }
|
|
24875
24868
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24876
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24877
|
-
function _arrayLikeToArray$
|
|
24878
|
-
function ownKeys$
|
|
24879
|
-
function _objectSpread$
|
|
24880
|
-
function _defineProperty$
|
|
24881
|
-
function _classCallCheck$
|
|
24882
|
-
function _defineProperties$
|
|
24883
|
-
function _createClass$
|
|
24884
|
-
function _toPropertyKey$
|
|
24885
|
-
function _toPrimitive$
|
|
24886
|
-
function _inherits$
|
|
24887
|
-
function _setPrototypeOf$
|
|
24888
|
-
function _createSuper$
|
|
24889
|
-
function _possibleConstructorReturn$
|
|
24890
|
-
function _assertThisInitialized$
|
|
24891
|
-
function _isNativeReflectConstruct$
|
|
24892
|
-
function _getPrototypeOf$
|
|
24869
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24870
|
+
function _arrayLikeToArray$f(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24871
|
+
function 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; }
|
|
24872
|
+
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; }
|
|
24873
|
+
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; }
|
|
24874
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24875
|
+
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); } }
|
|
24876
|
+
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; }
|
|
24877
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24878
|
+
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); }
|
|
24879
|
+
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); }
|
|
24880
|
+
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); }
|
|
24881
|
+
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); }; }
|
|
24882
|
+
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); }
|
|
24883
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24884
|
+
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; } }
|
|
24885
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24893
24886
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24894
|
-
_inherits$
|
|
24895
|
-
var _super = _createSuper$
|
|
24887
|
+
_inherits$6(Animate, _PureComponent);
|
|
24888
|
+
var _super = _createSuper$6(Animate);
|
|
24896
24889
|
function Animate(props, context) {
|
|
24897
24890
|
var _this;
|
|
24898
|
-
_classCallCheck$
|
|
24891
|
+
_classCallCheck$8(this, Animate);
|
|
24899
24892
|
_this = _super.call(this, props, context);
|
|
24900
24893
|
var _this$props = _this.props,
|
|
24901
24894
|
isActive = _this$props.isActive,
|
|
@@ -24905,8 +24898,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24905
24898
|
steps = _this$props.steps,
|
|
24906
24899
|
children = _this$props.children,
|
|
24907
24900
|
duration = _this$props.duration;
|
|
24908
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24909
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24901
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24902
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24910
24903
|
if (!isActive || duration <= 0) {
|
|
24911
24904
|
_this.state = {
|
|
24912
24905
|
style: {}
|
|
@@ -24918,7 +24911,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24918
24911
|
style: to
|
|
24919
24912
|
};
|
|
24920
24913
|
}
|
|
24921
|
-
return _possibleConstructorReturn$
|
|
24914
|
+
return _possibleConstructorReturn$6(_this);
|
|
24922
24915
|
}
|
|
24923
24916
|
if (steps && steps.length) {
|
|
24924
24917
|
_this.state = {
|
|
@@ -24929,10 +24922,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24929
24922
|
_this.state = {
|
|
24930
24923
|
style: from
|
|
24931
24924
|
};
|
|
24932
|
-
return _possibleConstructorReturn$
|
|
24925
|
+
return _possibleConstructorReturn$6(_this);
|
|
24933
24926
|
}
|
|
24934
24927
|
_this.state = {
|
|
24935
|
-
style: attributeName ? _defineProperty$
|
|
24928
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24936
24929
|
};
|
|
24937
24930
|
} else {
|
|
24938
24931
|
_this.state = {
|
|
@@ -24941,7 +24934,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24941
24934
|
}
|
|
24942
24935
|
return _this;
|
|
24943
24936
|
}
|
|
24944
|
-
_createClass$
|
|
24937
|
+
_createClass$8(Animate, [{
|
|
24945
24938
|
key: "componentDidMount",
|
|
24946
24939
|
value: function componentDidMount() {
|
|
24947
24940
|
var _this$props2 = this.props,
|
|
@@ -24969,7 +24962,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24969
24962
|
}
|
|
24970
24963
|
if (!isActive) {
|
|
24971
24964
|
var newState = {
|
|
24972
|
-
style: attributeName ? _defineProperty$
|
|
24965
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24973
24966
|
};
|
|
24974
24967
|
if (this.state && style) {
|
|
24975
24968
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24992,14 +24985,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24992
24985
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24993
24986
|
if (this.state && style) {
|
|
24994
24987
|
var _newState = {
|
|
24995
|
-
style: attributeName ? _defineProperty$
|
|
24988
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24996
24989
|
};
|
|
24997
24990
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24998
24991
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24999
24992
|
this.setState(_newState);
|
|
25000
24993
|
}
|
|
25001
24994
|
}
|
|
25002
|
-
this.runAnimation(_objectSpread$
|
|
24995
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
25003
24996
|
from: from,
|
|
25004
24997
|
begin: 0
|
|
25005
24998
|
}));
|
|
@@ -25082,7 +25075,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25082
25075
|
}), duration]);
|
|
25083
25076
|
}
|
|
25084
25077
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25085
|
-
var newStyle = _objectSpread$
|
|
25078
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25086
25079
|
transition: transition
|
|
25087
25080
|
});
|
|
25088
25081
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25114,9 +25107,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25114
25107
|
this.runStepAnimation(props);
|
|
25115
25108
|
return;
|
|
25116
25109
|
}
|
|
25117
|
-
var to = attributeName ? _defineProperty$
|
|
25110
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25118
25111
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25119
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25112
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25120
25113
|
transition: transition
|
|
25121
25114
|
}), duration, onAnimationEnd]);
|
|
25122
25115
|
}
|
|
@@ -25137,7 +25130,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25137
25130
|
_this$props4.onAnimationEnd;
|
|
25138
25131
|
_this$props4.shouldReAnimate;
|
|
25139
25132
|
_this$props4.onAnimationReStart;
|
|
25140
|
-
var others = _objectWithoutProperties$
|
|
25133
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25141
25134
|
var count = React$3.Children.count(children);
|
|
25142
25135
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25143
25136
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25152,8 +25145,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25152
25145
|
_container$props$styl = _container$props.style,
|
|
25153
25146
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25154
25147
|
className = _container$props.className;
|
|
25155
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25156
|
-
style: _objectSpread$
|
|
25148
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25149
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25157
25150
|
className: className
|
|
25158
25151
|
}));
|
|
25159
25152
|
return res;
|
|
@@ -25678,10 +25671,10 @@ var defineProperty$2 = (function() {
|
|
|
25678
25671
|
} catch (e) {}
|
|
25679
25672
|
}());
|
|
25680
25673
|
|
|
25681
|
-
var _defineProperty$
|
|
25674
|
+
var _defineProperty$l = defineProperty$2;
|
|
25682
25675
|
|
|
25683
25676
|
var constant$1 = constant_1,
|
|
25684
|
-
defineProperty$1 = _defineProperty$
|
|
25677
|
+
defineProperty$1 = _defineProperty$l,
|
|
25685
25678
|
identity$7 = identity_1;
|
|
25686
25679
|
|
|
25687
25680
|
/**
|
|
@@ -25858,18 +25851,18 @@ var sortBy_1 = sortBy;
|
|
|
25858
25851
|
/**
|
|
25859
25852
|
* @fileOverview Default Tooltip Content
|
|
25860
25853
|
*/
|
|
25861
|
-
function _typeof$
|
|
25862
|
-
function _slicedToArray$
|
|
25863
|
-
function _nonIterableRest$
|
|
25864
|
-
function _unsupportedIterableToArray$
|
|
25865
|
-
function _arrayLikeToArray$
|
|
25866
|
-
function _iterableToArrayLimit$
|
|
25867
|
-
function _arrayWithHoles$
|
|
25868
|
-
function ownKeys$
|
|
25869
|
-
function _objectSpread$
|
|
25870
|
-
function _defineProperty$
|
|
25871
|
-
function _toPropertyKey$
|
|
25872
|
-
function _toPrimitive$
|
|
25854
|
+
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); }
|
|
25855
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25856
|
+
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."); }
|
|
25857
|
+
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); }
|
|
25858
|
+
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; }
|
|
25859
|
+
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; } }
|
|
25860
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25861
|
+
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; }
|
|
25862
|
+
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; }
|
|
25863
|
+
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; }
|
|
25864
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25865
|
+
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); }
|
|
25873
25866
|
function defaultFormatter(value) {
|
|
25874
25867
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25875
25868
|
}
|
|
@@ -25899,7 +25892,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25899
25892
|
if (entry.type === 'none') {
|
|
25900
25893
|
return null;
|
|
25901
25894
|
}
|
|
25902
|
-
var finalItemStyle = _objectSpread$
|
|
25895
|
+
var finalItemStyle = _objectSpread$j({
|
|
25903
25896
|
display: 'block',
|
|
25904
25897
|
paddingTop: 4,
|
|
25905
25898
|
paddingBottom: 4,
|
|
@@ -25913,7 +25906,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25913
25906
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25914
25907
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25915
25908
|
if (Array.isArray(formatted)) {
|
|
25916
|
-
var _formatted = _slicedToArray$
|
|
25909
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25917
25910
|
finalValue = _formatted[0];
|
|
25918
25911
|
finalName = _formatted[1];
|
|
25919
25912
|
} else {
|
|
@@ -25945,14 +25938,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25945
25938
|
}
|
|
25946
25939
|
return null;
|
|
25947
25940
|
};
|
|
25948
|
-
var finalStyle = _objectSpread$
|
|
25941
|
+
var finalStyle = _objectSpread$j({
|
|
25949
25942
|
margin: 0,
|
|
25950
25943
|
padding: 10,
|
|
25951
25944
|
backgroundColor: '#fff',
|
|
25952
25945
|
border: '1px solid #ccc',
|
|
25953
25946
|
whiteSpace: 'nowrap'
|
|
25954
25947
|
}, contentStyle);
|
|
25955
|
-
var finalLabelStyle = _objectSpread$
|
|
25948
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25956
25949
|
margin: 0
|
|
25957
25950
|
}, labelStyle);
|
|
25958
25951
|
var hasLabel = !isNil_1(label);
|
|
@@ -25993,22 +25986,18 @@ var Global = {
|
|
|
25993
25986
|
}
|
|
25994
25987
|
};
|
|
25995
25988
|
|
|
25996
|
-
function _typeof$
|
|
25997
|
-
function ownKeys$
|
|
25998
|
-
function _objectSpread$
|
|
25999
|
-
function
|
|
26000
|
-
function
|
|
26001
|
-
function
|
|
26002
|
-
function
|
|
26003
|
-
function
|
|
26004
|
-
function
|
|
26005
|
-
function
|
|
26006
|
-
function
|
|
26007
|
-
function
|
|
26008
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26009
|
-
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; }
|
|
26010
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26011
|
-
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); }
|
|
25989
|
+
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); }
|
|
25990
|
+
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; }
|
|
25991
|
+
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; }
|
|
25992
|
+
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; }
|
|
25993
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25994
|
+
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); }
|
|
25995
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25996
|
+
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."); }
|
|
25997
|
+
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); }
|
|
25998
|
+
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; }
|
|
25999
|
+
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; } }
|
|
26000
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26012
26001
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26013
26002
|
var EPS$1 = 1;
|
|
26014
26003
|
function defaultUniqBy(entry) {
|
|
@@ -26032,204 +26021,7 @@ function renderContent(content, props) {
|
|
|
26032
26021
|
}
|
|
26033
26022
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26034
26023
|
}
|
|
26035
|
-
var
|
|
26036
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26037
|
-
var _super = _createSuper$6(Tooltip);
|
|
26038
|
-
function Tooltip() {
|
|
26039
|
-
var _this;
|
|
26040
|
-
_classCallCheck$8(this, Tooltip);
|
|
26041
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26042
|
-
args[_key] = arguments[_key];
|
|
26043
|
-
}
|
|
26044
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26045
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26046
|
-
boxWidth: -1,
|
|
26047
|
-
boxHeight: -1,
|
|
26048
|
-
dismissed: false,
|
|
26049
|
-
dismissedAtCoordinate: {
|
|
26050
|
-
x: 0,
|
|
26051
|
-
y: 0
|
|
26052
|
-
}
|
|
26053
|
-
});
|
|
26054
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26055
|
-
if (event.key === 'Escape') {
|
|
26056
|
-
_this.setState({
|
|
26057
|
-
dismissed: true,
|
|
26058
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26059
|
-
x: _this.props.coordinate.x,
|
|
26060
|
-
y: _this.props.coordinate.y
|
|
26061
|
-
})
|
|
26062
|
-
});
|
|
26063
|
-
}
|
|
26064
|
-
});
|
|
26065
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26066
|
-
var key = _ref.key,
|
|
26067
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26068
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26069
|
-
var _this$props = _this.props,
|
|
26070
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26071
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26072
|
-
coordinate = _this$props.coordinate,
|
|
26073
|
-
offset = _this$props.offset,
|
|
26074
|
-
position = _this$props.position,
|
|
26075
|
-
viewBox = _this$props.viewBox;
|
|
26076
|
-
if (position && isNumber(position[key])) {
|
|
26077
|
-
return position[key];
|
|
26078
|
-
}
|
|
26079
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26080
|
-
var positive = coordinate[key] + offset;
|
|
26081
|
-
if (allowEscapeViewBox[key]) {
|
|
26082
|
-
return reverseDirection[key] ? negative : positive;
|
|
26083
|
-
}
|
|
26084
|
-
if (reverseDirection[key]) {
|
|
26085
|
-
var _tooltipBoundary = negative;
|
|
26086
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26087
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26088
|
-
return Math.max(positive, viewBox[key]);
|
|
26089
|
-
}
|
|
26090
|
-
return Math.max(negative, viewBox[key]);
|
|
26091
|
-
}
|
|
26092
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26093
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26094
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26095
|
-
return Math.max(negative, viewBox[key]);
|
|
26096
|
-
}
|
|
26097
|
-
return Math.max(positive, viewBox[key]);
|
|
26098
|
-
});
|
|
26099
|
-
return _this;
|
|
26100
|
-
}
|
|
26101
|
-
_createClass$8(Tooltip, [{
|
|
26102
|
-
key: "componentDidMount",
|
|
26103
|
-
value: function componentDidMount() {
|
|
26104
|
-
this.updateBBox();
|
|
26105
|
-
}
|
|
26106
|
-
}, {
|
|
26107
|
-
key: "componentWillUnmount",
|
|
26108
|
-
value: function componentWillUnmount() {
|
|
26109
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26110
|
-
}
|
|
26111
|
-
}, {
|
|
26112
|
-
key: "componentDidUpdate",
|
|
26113
|
-
value: function componentDidUpdate() {
|
|
26114
|
-
this.updateBBox();
|
|
26115
|
-
}
|
|
26116
|
-
}, {
|
|
26117
|
-
key: "updateBBox",
|
|
26118
|
-
value: function updateBBox() {
|
|
26119
|
-
var _this$state = this.state,
|
|
26120
|
-
boxWidth = _this$state.boxWidth,
|
|
26121
|
-
boxHeight = _this$state.boxHeight,
|
|
26122
|
-
dismissed = _this$state.dismissed;
|
|
26123
|
-
if (dismissed) {
|
|
26124
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26125
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26126
|
-
this.setState({
|
|
26127
|
-
dismissed: false
|
|
26128
|
-
});
|
|
26129
|
-
}
|
|
26130
|
-
} else {
|
|
26131
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26132
|
-
}
|
|
26133
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26134
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26135
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26136
|
-
this.setState({
|
|
26137
|
-
boxWidth: box.width,
|
|
26138
|
-
boxHeight: box.height
|
|
26139
|
-
});
|
|
26140
|
-
}
|
|
26141
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26142
|
-
this.setState({
|
|
26143
|
-
boxWidth: -1,
|
|
26144
|
-
boxHeight: -1
|
|
26145
|
-
});
|
|
26146
|
-
}
|
|
26147
|
-
}
|
|
26148
|
-
}, {
|
|
26149
|
-
key: "render",
|
|
26150
|
-
value: function render() {
|
|
26151
|
-
var _classNames,
|
|
26152
|
-
_this2 = this;
|
|
26153
|
-
var _this$props2 = this.props,
|
|
26154
|
-
payload = _this$props2.payload,
|
|
26155
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26156
|
-
animationDuration = _this$props2.animationDuration,
|
|
26157
|
-
animationEasing = _this$props2.animationEasing,
|
|
26158
|
-
filterNull = _this$props2.filterNull,
|
|
26159
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26160
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26161
|
-
return !isNil_1(entry.value);
|
|
26162
|
-
}) : payload);
|
|
26163
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26164
|
-
var _this$props3 = this.props,
|
|
26165
|
-
content = _this$props3.content,
|
|
26166
|
-
viewBox = _this$props3.viewBox,
|
|
26167
|
-
coordinate = _this$props3.coordinate,
|
|
26168
|
-
position = _this$props3.position,
|
|
26169
|
-
active = _this$props3.active,
|
|
26170
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26171
|
-
var outerStyle = _objectSpread$l({
|
|
26172
|
-
pointerEvents: 'none',
|
|
26173
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26174
|
-
position: 'absolute',
|
|
26175
|
-
top: 0,
|
|
26176
|
-
left: 0
|
|
26177
|
-
}, wrapperStyle);
|
|
26178
|
-
var translateX, translateY;
|
|
26179
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26180
|
-
translateX = position.x;
|
|
26181
|
-
translateY = position.y;
|
|
26182
|
-
} else {
|
|
26183
|
-
var _this$state2 = this.state,
|
|
26184
|
-
boxWidth = _this$state2.boxWidth,
|
|
26185
|
-
boxHeight = _this$state2.boxHeight;
|
|
26186
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26187
|
-
translateX = this.getTranslate({
|
|
26188
|
-
key: 'x',
|
|
26189
|
-
tooltipDimension: boxWidth,
|
|
26190
|
-
viewBoxDimension: viewBox.width
|
|
26191
|
-
});
|
|
26192
|
-
translateY = this.getTranslate({
|
|
26193
|
-
key: 'y',
|
|
26194
|
-
tooltipDimension: boxHeight,
|
|
26195
|
-
viewBoxDimension: viewBox.height
|
|
26196
|
-
});
|
|
26197
|
-
} else {
|
|
26198
|
-
outerStyle.visibility = 'hidden';
|
|
26199
|
-
}
|
|
26200
|
-
}
|
|
26201
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26202
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26203
|
-
})), outerStyle);
|
|
26204
|
-
if (isAnimationActive && active) {
|
|
26205
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26206
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26207
|
-
})), outerStyle);
|
|
26208
|
-
}
|
|
26209
|
-
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));
|
|
26210
|
-
return (
|
|
26211
|
-
/*#__PURE__*/
|
|
26212
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26213
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26214
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26215
|
-
React__default["default"].createElement("div", {
|
|
26216
|
-
tabIndex: -1,
|
|
26217
|
-
role: "dialog",
|
|
26218
|
-
className: cls,
|
|
26219
|
-
style: outerStyle,
|
|
26220
|
-
ref: function ref(node) {
|
|
26221
|
-
_this2.wrapperNode = node;
|
|
26222
|
-
}
|
|
26223
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26224
|
-
payload: finalPayload
|
|
26225
|
-
})))
|
|
26226
|
-
);
|
|
26227
|
-
}
|
|
26228
|
-
}]);
|
|
26229
|
-
return Tooltip;
|
|
26230
|
-
}(React$3.PureComponent);
|
|
26231
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26232
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26024
|
+
var tooltipDefaultProps = {
|
|
26233
26025
|
active: false,
|
|
26234
26026
|
allowEscapeViewBox: {
|
|
26235
26027
|
x: false,
|
|
@@ -26250,6 +26042,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26250
26042
|
x: 0,
|
|
26251
26043
|
y: 0
|
|
26252
26044
|
},
|
|
26045
|
+
// this doesn't exist on TooltipProps
|
|
26046
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26047
|
+
// @ts-ignore
|
|
26253
26048
|
cursorStyle: {},
|
|
26254
26049
|
separator: ' : ',
|
|
26255
26050
|
wrapperStyle: {},
|
|
@@ -26263,7 +26058,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26263
26058
|
animationDuration: 400,
|
|
26264
26059
|
filterNull: true,
|
|
26265
26060
|
useTranslate3d: false
|
|
26266
|
-
}
|
|
26061
|
+
};
|
|
26062
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26063
|
+
var _classNames;
|
|
26064
|
+
var _useState = React$3.useState(-1),
|
|
26065
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26066
|
+
boxWidth = _useState2[0],
|
|
26067
|
+
setBoxWidth = _useState2[1];
|
|
26068
|
+
var _useState3 = React$3.useState(-1),
|
|
26069
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26070
|
+
boxHeight = _useState4[0],
|
|
26071
|
+
setBoxHeight = _useState4[1];
|
|
26072
|
+
var _useState5 = React$3.useState(false),
|
|
26073
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26074
|
+
dismissed = _useState6[0],
|
|
26075
|
+
setDismissed = _useState6[1];
|
|
26076
|
+
var _useState7 = React$3.useState({
|
|
26077
|
+
x: 0,
|
|
26078
|
+
y: 0
|
|
26079
|
+
}),
|
|
26080
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26081
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26082
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26083
|
+
var wrapperNode = React$3.useRef();
|
|
26084
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26085
|
+
reverseDirection = props.reverseDirection,
|
|
26086
|
+
coordinate = props.coordinate,
|
|
26087
|
+
offset = props.offset,
|
|
26088
|
+
position = props.position,
|
|
26089
|
+
viewBox = props.viewBox;
|
|
26090
|
+
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26091
|
+
if (event.key === 'Escape') {
|
|
26092
|
+
setDismissed(true);
|
|
26093
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26094
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26095
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26096
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26097
|
+
});
|
|
26098
|
+
});
|
|
26099
|
+
}
|
|
26100
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26101
|
+
React$3.useEffect(function () {
|
|
26102
|
+
var updateBBox = function updateBBox() {
|
|
26103
|
+
if (dismissed) {
|
|
26104
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26105
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26106
|
+
setDismissed(false);
|
|
26107
|
+
}
|
|
26108
|
+
} else {
|
|
26109
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26110
|
+
}
|
|
26111
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26112
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26113
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26114
|
+
setBoxWidth(box.width);
|
|
26115
|
+
setBoxHeight(box.height);
|
|
26116
|
+
}
|
|
26117
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26118
|
+
setBoxWidth(-1);
|
|
26119
|
+
setBoxHeight(-1);
|
|
26120
|
+
}
|
|
26121
|
+
};
|
|
26122
|
+
updateBBox();
|
|
26123
|
+
return function () {
|
|
26124
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26125
|
+
};
|
|
26126
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26127
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26128
|
+
var key = _ref.key,
|
|
26129
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26130
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26131
|
+
if (position && isNumber(position[key])) {
|
|
26132
|
+
return position[key];
|
|
26133
|
+
}
|
|
26134
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26135
|
+
var positive = coordinate[key] + offset;
|
|
26136
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26137
|
+
return reverseDirection[key] ? negative : positive;
|
|
26138
|
+
}
|
|
26139
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26140
|
+
var _tooltipBoundary = negative;
|
|
26141
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26142
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26143
|
+
return Math.max(positive, viewBox[key]);
|
|
26144
|
+
}
|
|
26145
|
+
return Math.max(negative, viewBox[key]);
|
|
26146
|
+
}
|
|
26147
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26148
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26149
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26150
|
+
return Math.max(negative, viewBox[key]);
|
|
26151
|
+
}
|
|
26152
|
+
return Math.max(positive, viewBox[key]);
|
|
26153
|
+
};
|
|
26154
|
+
var payload = props.payload,
|
|
26155
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26156
|
+
filterNull = props.filterNull,
|
|
26157
|
+
active = props.active,
|
|
26158
|
+
wrapperStyle = props.wrapperStyle,
|
|
26159
|
+
useTranslate3d = props.useTranslate3d,
|
|
26160
|
+
isAnimationActive = props.isAnimationActive,
|
|
26161
|
+
animationDuration = props.animationDuration,
|
|
26162
|
+
animationEasing = props.animationEasing;
|
|
26163
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26164
|
+
return !isNil_1(entry.value);
|
|
26165
|
+
}) : payload);
|
|
26166
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26167
|
+
var content = props.content;
|
|
26168
|
+
var outerStyle = _objectSpread$i({
|
|
26169
|
+
pointerEvents: 'none',
|
|
26170
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26171
|
+
position: 'absolute',
|
|
26172
|
+
top: 0,
|
|
26173
|
+
left: 0
|
|
26174
|
+
}, wrapperStyle);
|
|
26175
|
+
var translateX, translateY;
|
|
26176
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26177
|
+
translateX = position.x;
|
|
26178
|
+
translateY = position.y;
|
|
26179
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26180
|
+
translateX = getTranslate({
|
|
26181
|
+
key: 'x',
|
|
26182
|
+
tooltipDimension: boxWidth,
|
|
26183
|
+
viewBoxDimension: viewBox.width
|
|
26184
|
+
});
|
|
26185
|
+
translateY = getTranslate({
|
|
26186
|
+
key: 'y',
|
|
26187
|
+
tooltipDimension: boxHeight,
|
|
26188
|
+
viewBoxDimension: viewBox.height
|
|
26189
|
+
});
|
|
26190
|
+
} else {
|
|
26191
|
+
outerStyle.visibility = 'hidden';
|
|
26192
|
+
}
|
|
26193
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26194
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26195
|
+
})), outerStyle);
|
|
26196
|
+
if (isAnimationActive && active) {
|
|
26197
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26198
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26199
|
+
})), outerStyle);
|
|
26200
|
+
}
|
|
26201
|
+
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));
|
|
26202
|
+
return (
|
|
26203
|
+
/*#__PURE__*/
|
|
26204
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26205
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26206
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26207
|
+
React__default["default"].createElement("div", {
|
|
26208
|
+
tabIndex: -1,
|
|
26209
|
+
role: "dialog",
|
|
26210
|
+
className: cls,
|
|
26211
|
+
style: outerStyle,
|
|
26212
|
+
ref: wrapperNode
|
|
26213
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26214
|
+
payload: finalPayload
|
|
26215
|
+
})))
|
|
26216
|
+
);
|
|
26217
|
+
};
|
|
26218
|
+
|
|
26219
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26220
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26221
|
+
|
|
26222
|
+
/**
|
|
26223
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26224
|
+
* children.props when there are no props set by the consumer
|
|
26225
|
+
* doesn't work if using default parameters
|
|
26226
|
+
*/
|
|
26227
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26267
26228
|
|
|
26268
26229
|
var root = _root;
|
|
26269
26230
|
|
|
@@ -31833,12 +31794,12 @@ module.exports = exports['default'];
|
|
|
31833
31794
|
|
|
31834
31795
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31835
31796
|
|
|
31836
|
-
function _typeof$
|
|
31837
|
-
function ownKeys$
|
|
31838
|
-
function _objectSpread$
|
|
31839
|
-
function _defineProperty$
|
|
31840
|
-
function _toPropertyKey$
|
|
31841
|
-
function _toPrimitive$
|
|
31797
|
+
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); }
|
|
31798
|
+
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; }
|
|
31799
|
+
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; }
|
|
31800
|
+
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; }
|
|
31801
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31802
|
+
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); }
|
|
31842
31803
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31843
31804
|
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."); }
|
|
31844
31805
|
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); }
|
|
@@ -31906,7 +31867,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31906
31867
|
}
|
|
31907
31868
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31908
31869
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31909
|
-
var measurementSpanStyle = _objectSpread$
|
|
31870
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31910
31871
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31911
31872
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31912
31873
|
return styleKey;
|
|
@@ -31961,11 +31922,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31961
31922
|
};
|
|
31962
31923
|
};
|
|
31963
31924
|
|
|
31964
|
-
var _excluded$
|
|
31965
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31925
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31966
31926
|
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); }
|
|
31967
|
-
function _objectWithoutProperties$
|
|
31968
|
-
function _objectWithoutPropertiesLoose$
|
|
31927
|
+
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; }
|
|
31928
|
+
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; }
|
|
31969
31929
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31970
31930
|
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."); }
|
|
31971
31931
|
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); }
|
|
@@ -32119,46 +32079,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32119
32079
|
}
|
|
32120
32080
|
return getWordsWithoutCalculate(children);
|
|
32121
32081
|
};
|
|
32122
|
-
var
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32127
|
-
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
|
|
32131
|
-
|
|
32132
|
-
|
|
32133
|
-
|
|
32134
|
-
|
|
32135
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32136
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32137
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32138
|
-
_ref5$fill = _ref5.fill,
|
|
32139
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32140
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32082
|
+
var textDefaultProps = {
|
|
32083
|
+
x: 0,
|
|
32084
|
+
y: 0,
|
|
32085
|
+
lineHeight: '1em',
|
|
32086
|
+
capHeight: '0.71em',
|
|
32087
|
+
// Magic number from d3
|
|
32088
|
+
scaleToFit: false,
|
|
32089
|
+
textAnchor: 'start',
|
|
32090
|
+
verticalAnchor: 'end',
|
|
32091
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32092
|
+
fill: '#808080'
|
|
32093
|
+
};
|
|
32094
|
+
var Text = function Text(props) {
|
|
32141
32095
|
var wordsByLines = React$3.useMemo(function () {
|
|
32142
32096
|
return getWordsByLines({
|
|
32143
32097
|
breakAll: props.breakAll,
|
|
32144
32098
|
children: props.children,
|
|
32145
32099
|
maxLines: props.maxLines,
|
|
32146
|
-
scaleToFit: scaleToFit,
|
|
32100
|
+
scaleToFit: props.scaleToFit,
|
|
32147
32101
|
style: props.style,
|
|
32148
32102
|
width: props.width
|
|
32149
32103
|
});
|
|
32150
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32104
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32151
32105
|
var dx = props.dx,
|
|
32152
32106
|
dy = props.dy,
|
|
32107
|
+
textAnchor = props.textAnchor,
|
|
32108
|
+
verticalAnchor = props.verticalAnchor,
|
|
32109
|
+
scaleToFit = props.scaleToFit,
|
|
32153
32110
|
angle = props.angle,
|
|
32111
|
+
lineHeight = props.lineHeight,
|
|
32112
|
+
capHeight = props.capHeight,
|
|
32154
32113
|
className = props.className,
|
|
32155
32114
|
breakAll = props.breakAll,
|
|
32156
|
-
textProps = _objectWithoutProperties$
|
|
32157
|
-
if (!isNumOrStr(
|
|
32115
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32116
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32158
32117
|
return null;
|
|
32159
32118
|
}
|
|
32160
|
-
var x =
|
|
32161
|
-
var y =
|
|
32119
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32120
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32162
32121
|
var startDy;
|
|
32163
32122
|
switch (verticalAnchor) {
|
|
32164
32123
|
case 'start':
|
|
@@ -32188,7 +32147,7 @@ var Text = function Text(_ref5) {
|
|
|
32188
32147
|
y: y,
|
|
32189
32148
|
className: classNames('recharts-text', className),
|
|
32190
32149
|
textAnchor: textAnchor,
|
|
32191
|
-
fill: fill.includes('url') ?
|
|
32150
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32192
32151
|
}), wordsByLines.map(function (line, index) {
|
|
32193
32152
|
return (
|
|
32194
32153
|
/*#__PURE__*/
|
|
@@ -32201,6 +32160,7 @@ var Text = function Text(_ref5) {
|
|
|
32201
32160
|
);
|
|
32202
32161
|
}));
|
|
32203
32162
|
};
|
|
32163
|
+
Text.defaultProps = textDefaultProps;
|
|
32204
32164
|
|
|
32205
32165
|
var baseIsEqual = _baseIsEqual;
|
|
32206
32166
|
|
|
@@ -38468,7 +38428,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38468
38428
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38469
38429
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38470
38430
|
|
|
38471
|
-
var _excluded$
|
|
38431
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38472
38432
|
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); }
|
|
38473
38433
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38474
38434
|
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."); }
|
|
@@ -38476,8 +38436,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38476
38436
|
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; }
|
|
38477
38437
|
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; } }
|
|
38478
38438
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38479
|
-
function _objectWithoutProperties$
|
|
38480
|
-
function _objectWithoutPropertiesLoose$
|
|
38439
|
+
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; }
|
|
38440
|
+
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; }
|
|
38481
38441
|
function ErrorBar(props) {
|
|
38482
38442
|
var offset = props.offset,
|
|
38483
38443
|
layout = props.layout,
|
|
@@ -38487,7 +38447,7 @@ function ErrorBar(props) {
|
|
|
38487
38447
|
dataPointFormatter = props.dataPointFormatter,
|
|
38488
38448
|
xAxis = props.xAxis,
|
|
38489
38449
|
yAxis = props.yAxis,
|
|
38490
|
-
others = _objectWithoutProperties$
|
|
38450
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38491
38451
|
var svgProps = filterProps(others);
|
|
38492
38452
|
var errorBars = data.map(function (entry, i) {
|
|
38493
38453
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38598,18 +38558,18 @@ ErrorBar.defaultProps = {
|
|
|
38598
38558
|
};
|
|
38599
38559
|
ErrorBar.displayName = 'ErrorBar';
|
|
38600
38560
|
|
|
38601
|
-
function _typeof$
|
|
38561
|
+
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); }
|
|
38602
38562
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38603
38563
|
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."); }
|
|
38604
38564
|
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); }
|
|
38605
38565
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38606
38566
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38607
38567
|
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; }
|
|
38608
|
-
function ownKeys$
|
|
38609
|
-
function _objectSpread$
|
|
38610
|
-
function _defineProperty$
|
|
38611
|
-
function _toPropertyKey$
|
|
38612
|
-
function _toPrimitive$
|
|
38568
|
+
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; }
|
|
38569
|
+
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; }
|
|
38570
|
+
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; }
|
|
38571
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38572
|
+
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); }
|
|
38613
38573
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38614
38574
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38615
38575
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38780,7 +38740,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38780
38740
|
};
|
|
38781
38741
|
});
|
|
38782
38742
|
}
|
|
38783
|
-
return _objectSpread$
|
|
38743
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38784
38744
|
payload: legendData,
|
|
38785
38745
|
item: legendItem
|
|
38786
38746
|
});
|
|
@@ -38934,10 +38894,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38934
38894
|
verticalAlign = legendProps.verticalAlign,
|
|
38935
38895
|
layout = legendProps.layout;
|
|
38936
38896
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38937
|
-
newOffset = _objectSpread$
|
|
38897
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38938
38898
|
}
|
|
38939
38899
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38940
|
-
newOffset = _objectSpread$
|
|
38900
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38941
38901
|
}
|
|
38942
38902
|
}
|
|
38943
38903
|
return newOffset;
|
|
@@ -39363,14 +39323,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39363
39323
|
items: [item]
|
|
39364
39324
|
};
|
|
39365
39325
|
}
|
|
39366
|
-
return _objectSpread$
|
|
39326
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39367
39327
|
}, {});
|
|
39368
39328
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39369
39329
|
var group = stackGroups[axisId];
|
|
39370
39330
|
if (group.hasStack) {
|
|
39371
39331
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39372
39332
|
var g = group.stackGroups[stackId];
|
|
39373
|
-
return _objectSpread$
|
|
39333
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39374
39334
|
numericAxisId: numericAxisId,
|
|
39375
39335
|
cateAxisId: cateAxisId,
|
|
39376
39336
|
items: g.items,
|
|
@@ -39378,7 +39338,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39378
39338
|
}));
|
|
39379
39339
|
}, {});
|
|
39380
39340
|
}
|
|
39381
|
-
return _objectSpread$
|
|
39341
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39382
39342
|
}, {});
|
|
39383
39343
|
};
|
|
39384
39344
|
|
|
@@ -39592,7 +39552,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39592
39552
|
formatter = _graphicalItem$props.formatter,
|
|
39593
39553
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39594
39554
|
chartType = _graphicalItem$props.chartType;
|
|
39595
|
-
return _objectSpread$
|
|
39555
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39596
39556
|
dataKey: dataKey,
|
|
39597
39557
|
unit: unit,
|
|
39598
39558
|
formatter: formatter,
|
|
@@ -39605,12 +39565,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39605
39565
|
});
|
|
39606
39566
|
};
|
|
39607
39567
|
|
|
39608
|
-
function _typeof$
|
|
39609
|
-
function ownKeys$
|
|
39610
|
-
function _objectSpread$
|
|
39611
|
-
function _defineProperty$
|
|
39612
|
-
function _toPropertyKey$
|
|
39613
|
-
function _toPrimitive$
|
|
39568
|
+
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); }
|
|
39569
|
+
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; }
|
|
39570
|
+
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; }
|
|
39571
|
+
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; }
|
|
39572
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39573
|
+
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); }
|
|
39614
39574
|
var RADIAN = Math.PI / 180;
|
|
39615
39575
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39616
39576
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39715,7 +39675,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39715
39675
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39716
39676
|
}
|
|
39717
39677
|
if (inRange) {
|
|
39718
|
-
return _objectSpread$
|
|
39678
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39719
39679
|
radius: radius,
|
|
39720
39680
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39721
39681
|
});
|
|
@@ -39723,21 +39683,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39723
39683
|
return null;
|
|
39724
39684
|
};
|
|
39725
39685
|
|
|
39726
|
-
function _typeof$
|
|
39727
|
-
var _excluded$7 = ["offset"];
|
|
39686
|
+
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); }
|
|
39728
39687
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39729
39688
|
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."); }
|
|
39730
39689
|
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); }
|
|
39731
39690
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39732
39691
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39733
39692
|
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; }
|
|
39734
|
-
function
|
|
39735
|
-
function
|
|
39736
|
-
function
|
|
39737
|
-
function
|
|
39738
|
-
function
|
|
39739
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39740
|
-
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); }
|
|
39693
|
+
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; }
|
|
39694
|
+
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; }
|
|
39695
|
+
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; }
|
|
39696
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39697
|
+
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); }
|
|
39741
39698
|
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); }
|
|
39742
39699
|
var getLabel = function getLabel(props) {
|
|
39743
39700
|
var value = props.value,
|
|
@@ -39882,7 +39839,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39882
39839
|
textAnchor: 'middle',
|
|
39883
39840
|
verticalAnchor: verticalEnd
|
|
39884
39841
|
};
|
|
39885
|
-
return _objectSpread$
|
|
39842
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39886
39843
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39887
39844
|
width: width
|
|
39888
39845
|
} : {});
|
|
@@ -39894,7 +39851,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39894
39851
|
textAnchor: 'middle',
|
|
39895
39852
|
verticalAnchor: verticalStart
|
|
39896
39853
|
};
|
|
39897
|
-
return _objectSpread$
|
|
39854
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39898
39855
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39899
39856
|
width: width
|
|
39900
39857
|
} : {});
|
|
@@ -39906,7 +39863,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39906
39863
|
textAnchor: horizontalEnd,
|
|
39907
39864
|
verticalAnchor: 'middle'
|
|
39908
39865
|
};
|
|
39909
|
-
return _objectSpread$
|
|
39866
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39910
39867
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39911
39868
|
height: height
|
|
39912
39869
|
} : {});
|
|
@@ -39918,7 +39875,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39918
39875
|
textAnchor: horizontalStart,
|
|
39919
39876
|
verticalAnchor: 'middle'
|
|
39920
39877
|
};
|
|
39921
|
-
return _objectSpread$
|
|
39878
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39922
39879
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39923
39880
|
height: height
|
|
39924
39881
|
} : {});
|
|
@@ -39928,7 +39885,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39928
39885
|
height: height
|
|
39929
39886
|
} : {};
|
|
39930
39887
|
if (position === 'insideLeft') {
|
|
39931
|
-
return _objectSpread$
|
|
39888
|
+
return _objectSpread$e({
|
|
39932
39889
|
x: x + horizontalOffset,
|
|
39933
39890
|
y: y + height / 2,
|
|
39934
39891
|
textAnchor: horizontalStart,
|
|
@@ -39936,7 +39893,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39936
39893
|
}, sizeAttrs);
|
|
39937
39894
|
}
|
|
39938
39895
|
if (position === 'insideRight') {
|
|
39939
|
-
return _objectSpread$
|
|
39896
|
+
return _objectSpread$e({
|
|
39940
39897
|
x: x + width - horizontalOffset,
|
|
39941
39898
|
y: y + height / 2,
|
|
39942
39899
|
textAnchor: horizontalEnd,
|
|
@@ -39944,7 +39901,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39944
39901
|
}, sizeAttrs);
|
|
39945
39902
|
}
|
|
39946
39903
|
if (position === 'insideTop') {
|
|
39947
|
-
return _objectSpread$
|
|
39904
|
+
return _objectSpread$e({
|
|
39948
39905
|
x: x + width / 2,
|
|
39949
39906
|
y: y + verticalOffset,
|
|
39950
39907
|
textAnchor: 'middle',
|
|
@@ -39952,7 +39909,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39952
39909
|
}, sizeAttrs);
|
|
39953
39910
|
}
|
|
39954
39911
|
if (position === 'insideBottom') {
|
|
39955
|
-
return _objectSpread$
|
|
39912
|
+
return _objectSpread$e({
|
|
39956
39913
|
x: x + width / 2,
|
|
39957
39914
|
y: y + height - verticalOffset,
|
|
39958
39915
|
textAnchor: 'middle',
|
|
@@ -39960,7 +39917,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39960
39917
|
}, sizeAttrs);
|
|
39961
39918
|
}
|
|
39962
39919
|
if (position === 'insideTopLeft') {
|
|
39963
|
-
return _objectSpread$
|
|
39920
|
+
return _objectSpread$e({
|
|
39964
39921
|
x: x + horizontalOffset,
|
|
39965
39922
|
y: y + verticalOffset,
|
|
39966
39923
|
textAnchor: horizontalStart,
|
|
@@ -39968,7 +39925,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39968
39925
|
}, sizeAttrs);
|
|
39969
39926
|
}
|
|
39970
39927
|
if (position === 'insideTopRight') {
|
|
39971
|
-
return _objectSpread$
|
|
39928
|
+
return _objectSpread$e({
|
|
39972
39929
|
x: x + width - horizontalOffset,
|
|
39973
39930
|
y: y + verticalOffset,
|
|
39974
39931
|
textAnchor: horizontalEnd,
|
|
@@ -39976,7 +39933,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39976
39933
|
}, sizeAttrs);
|
|
39977
39934
|
}
|
|
39978
39935
|
if (position === 'insideBottomLeft') {
|
|
39979
|
-
return _objectSpread$
|
|
39936
|
+
return _objectSpread$e({
|
|
39980
39937
|
x: x + horizontalOffset,
|
|
39981
39938
|
y: y + height - verticalOffset,
|
|
39982
39939
|
textAnchor: horizontalStart,
|
|
@@ -39984,7 +39941,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39984
39941
|
}, sizeAttrs);
|
|
39985
39942
|
}
|
|
39986
39943
|
if (position === 'insideBottomRight') {
|
|
39987
|
-
return _objectSpread$
|
|
39944
|
+
return _objectSpread$e({
|
|
39988
39945
|
x: x + width - horizontalOffset,
|
|
39989
39946
|
y: y + height - verticalOffset,
|
|
39990
39947
|
textAnchor: horizontalEnd,
|
|
@@ -39992,14 +39949,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39992
39949
|
}, sizeAttrs);
|
|
39993
39950
|
}
|
|
39994
39951
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39995
|
-
return _objectSpread$
|
|
39952
|
+
return _objectSpread$e({
|
|
39996
39953
|
x: x + getPercentValue(position.x, width),
|
|
39997
39954
|
y: y + getPercentValue(position.y, height),
|
|
39998
39955
|
textAnchor: 'end',
|
|
39999
39956
|
verticalAnchor: 'end'
|
|
40000
39957
|
}, sizeAttrs);
|
|
40001
39958
|
}
|
|
40002
|
-
return _objectSpread$
|
|
39959
|
+
return _objectSpread$e({
|
|
40003
39960
|
x: x + width / 2,
|
|
40004
39961
|
y: y + height / 2,
|
|
40005
39962
|
textAnchor: 'middle',
|
|
@@ -40009,13 +39966,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40009
39966
|
var isPolar = function isPolar(viewBox) {
|
|
40010
39967
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40011
39968
|
};
|
|
40012
|
-
function Label$3(
|
|
40013
|
-
var _ref4$offset = _ref4.offset,
|
|
40014
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40015
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40016
|
-
var props = _objectSpread$h({
|
|
40017
|
-
offset: offset
|
|
40018
|
-
}, restProps);
|
|
39969
|
+
function Label$3(props) {
|
|
40019
39970
|
var viewBox = props.viewBox,
|
|
40020
39971
|
position = props.position,
|
|
40021
39972
|
value = props.value,
|
|
@@ -40052,6 +40003,9 @@ function Label$3(_ref4) {
|
|
|
40052
40003
|
}), label);
|
|
40053
40004
|
}
|
|
40054
40005
|
Label$3.displayName = 'Label';
|
|
40006
|
+
Label$3.defaultProps = {
|
|
40007
|
+
offset: 5
|
|
40008
|
+
};
|
|
40055
40009
|
var parseViewBox = function parseViewBox(props) {
|
|
40056
40010
|
var cx = props.cx,
|
|
40057
40011
|
cy = props.cy,
|
|
@@ -40206,9 +40160,8 @@ function last(array) {
|
|
|
40206
40160
|
|
|
40207
40161
|
var last_1 = last;
|
|
40208
40162
|
|
|
40209
|
-
function _typeof$
|
|
40210
|
-
var _excluded$
|
|
40211
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40163
|
+
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); }
|
|
40164
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40212
40165
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40213
40166
|
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."); }
|
|
40214
40167
|
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); }
|
|
@@ -40216,26 +40169,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40216
40169
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40217
40170
|
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; }
|
|
40218
40171
|
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); }
|
|
40219
|
-
function ownKeys$
|
|
40220
|
-
function _objectSpread$
|
|
40221
|
-
function _defineProperty$
|
|
40222
|
-
function _toPropertyKey$
|
|
40223
|
-
function _toPrimitive$
|
|
40224
|
-
function _objectWithoutProperties$
|
|
40225
|
-
function _objectWithoutPropertiesLoose$
|
|
40226
|
-
var
|
|
40227
|
-
|
|
40228
|
-
|
|
40229
|
-
|
|
40230
|
-
|
|
40231
|
-
|
|
40232
|
-
|
|
40233
|
-
|
|
40234
|
-
dataKey =
|
|
40235
|
-
clockWise =
|
|
40236
|
-
id =
|
|
40237
|
-
textBreakAll =
|
|
40238
|
-
others = _objectWithoutProperties$
|
|
40172
|
+
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; }
|
|
40173
|
+
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; }
|
|
40174
|
+
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; }
|
|
40175
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40176
|
+
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); }
|
|
40177
|
+
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; }
|
|
40178
|
+
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; }
|
|
40179
|
+
var defaultProps = {
|
|
40180
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40181
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40182
|
+
}
|
|
40183
|
+
};
|
|
40184
|
+
function LabelList(props) {
|
|
40185
|
+
var data = props.data,
|
|
40186
|
+
valueAccessor = props.valueAccessor,
|
|
40187
|
+
dataKey = props.dataKey,
|
|
40188
|
+
clockWise = props.clockWise,
|
|
40189
|
+
id = props.id,
|
|
40190
|
+
textBreakAll = props.textBreakAll,
|
|
40191
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40239
40192
|
if (!data || !data.length) {
|
|
40240
40193
|
return null;
|
|
40241
40194
|
}
|
|
@@ -40251,7 +40204,7 @@ function LabelList(_ref) {
|
|
|
40251
40204
|
index: index,
|
|
40252
40205
|
value: value,
|
|
40253
40206
|
textBreakAll: textBreakAll,
|
|
40254
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40207
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40255
40208
|
clockWise: clockWise
|
|
40256
40209
|
})),
|
|
40257
40210
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40306,14 +40259,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40306
40259
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40307
40260
|
}
|
|
40308
40261
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40262
|
+
LabelList.defaultProps = defaultProps;
|
|
40309
40263
|
|
|
40310
|
-
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); }
|
|
40311
40264
|
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); }
|
|
40312
|
-
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; }
|
|
40313
|
-
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; }
|
|
40314
|
-
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; }
|
|
40315
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40316
|
-
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); }
|
|
40317
40265
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40318
40266
|
var sign = mathSign(endAngle - startAngle);
|
|
40319
40267
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40454,19 +40402,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40454
40402
|
}
|
|
40455
40403
|
return path;
|
|
40456
40404
|
};
|
|
40457
|
-
var
|
|
40458
|
-
cx: 0,
|
|
40459
|
-
cy: 0,
|
|
40460
|
-
innerRadius: 0,
|
|
40461
|
-
outerRadius: 0,
|
|
40462
|
-
startAngle: 0,
|
|
40463
|
-
endAngle: 0,
|
|
40464
|
-
cornerRadius: 0,
|
|
40465
|
-
forceCornerRadius: false,
|
|
40466
|
-
cornerIsExternal: false
|
|
40467
|
-
};
|
|
40468
|
-
var Sector = function Sector(sectorProps) {
|
|
40469
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40405
|
+
var Sector = function Sector(props) {
|
|
40470
40406
|
var cx = props.cx,
|
|
40471
40407
|
cy = props.cy,
|
|
40472
40408
|
innerRadius = props.innerRadius,
|
|
@@ -40512,14 +40448,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40512
40448
|
role: "img"
|
|
40513
40449
|
}));
|
|
40514
40450
|
};
|
|
40451
|
+
Sector.defaultProps = {
|
|
40452
|
+
cx: 0,
|
|
40453
|
+
cy: 0,
|
|
40454
|
+
innerRadius: 0,
|
|
40455
|
+
outerRadius: 0,
|
|
40456
|
+
startAngle: 0,
|
|
40457
|
+
endAngle: 0,
|
|
40458
|
+
cornerRadius: 0,
|
|
40459
|
+
forceCornerRadius: false,
|
|
40460
|
+
cornerIsExternal: false
|
|
40461
|
+
};
|
|
40515
40462
|
|
|
40516
|
-
function _typeof$
|
|
40463
|
+
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); }
|
|
40517
40464
|
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); }
|
|
40518
|
-
function ownKeys$
|
|
40519
|
-
function _objectSpread$
|
|
40520
|
-
function _defineProperty$
|
|
40521
|
-
function _toPropertyKey$
|
|
40522
|
-
function _toPrimitive$
|
|
40465
|
+
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; }
|
|
40466
|
+
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; }
|
|
40467
|
+
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; }
|
|
40468
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40469
|
+
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); }
|
|
40523
40470
|
var CURVE_FACTORIES = {
|
|
40524
40471
|
curveBasisClosed: curveBasisClosed,
|
|
40525
40472
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40559,14 +40506,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40559
40506
|
* @return {String} path
|
|
40560
40507
|
*/
|
|
40561
40508
|
var getPath$1 = function getPath(_ref) {
|
|
40562
|
-
var
|
|
40563
|
-
|
|
40564
|
-
_ref$points = _ref.points,
|
|
40565
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40509
|
+
var type = _ref.type,
|
|
40510
|
+
points = _ref.points,
|
|
40566
40511
|
baseLine = _ref.baseLine,
|
|
40567
40512
|
layout = _ref.layout,
|
|
40568
|
-
|
|
40569
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40513
|
+
connectNulls = _ref.connectNulls;
|
|
40570
40514
|
var curveFactory = getCurveFactory(type, layout);
|
|
40571
40515
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40572
40516
|
return defined(entry);
|
|
@@ -40577,7 +40521,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40577
40521
|
return defined(base);
|
|
40578
40522
|
}) : baseLine;
|
|
40579
40523
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40580
|
-
return _objectSpread$
|
|
40524
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40581
40525
|
base: formatBaseLine[index]
|
|
40582
40526
|
});
|
|
40583
40527
|
});
|
|
@@ -40618,8 +40562,12 @@ var Curve = function Curve(props) {
|
|
|
40618
40562
|
ref: pathRef
|
|
40619
40563
|
}));
|
|
40620
40564
|
};
|
|
40565
|
+
Curve.defaultProps = {
|
|
40566
|
+
type: 'linear',
|
|
40567
|
+
points: [],
|
|
40568
|
+
connectNulls: false
|
|
40569
|
+
};
|
|
40621
40570
|
|
|
40622
|
-
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); }
|
|
40623
40571
|
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); }
|
|
40624
40572
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40625
40573
|
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."); }
|
|
@@ -40627,11 +40575,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40627
40575
|
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; }
|
|
40628
40576
|
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; } }
|
|
40629
40577
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40630
|
-
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; }
|
|
40631
|
-
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; }
|
|
40632
|
-
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; }
|
|
40633
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40634
|
-
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); }
|
|
40635
40578
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40636
40579
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40637
40580
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40687,29 +40630,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40687
40630
|
}
|
|
40688
40631
|
return false;
|
|
40689
40632
|
};
|
|
40690
|
-
var
|
|
40691
|
-
x: 0,
|
|
40692
|
-
y: 0,
|
|
40693
|
-
width: 0,
|
|
40694
|
-
height: 0,
|
|
40695
|
-
// The radius of border
|
|
40696
|
-
// The radius of four corners when radius is a number
|
|
40697
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40698
|
-
radius: 0,
|
|
40699
|
-
isAnimationActive: false,
|
|
40700
|
-
isUpdateAnimationActive: false,
|
|
40701
|
-
animationBegin: 0,
|
|
40702
|
-
animationDuration: 1500,
|
|
40703
|
-
animationEasing: 'ease'
|
|
40704
|
-
};
|
|
40705
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40706
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40633
|
+
var Rectangle = function Rectangle(props) {
|
|
40707
40634
|
var pathRef = React$3.useRef();
|
|
40708
40635
|
var _useState = React$3.useState(-1),
|
|
40709
40636
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40710
40637
|
totalLength = _useState2[0],
|
|
40711
40638
|
setTotalLength = _useState2[1];
|
|
40712
|
-
React$3.
|
|
40639
|
+
React$3.useLayoutEffect(function () {
|
|
40713
40640
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40714
40641
|
try {
|
|
40715
40642
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40780,6 +40707,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40780
40707
|
})));
|
|
40781
40708
|
});
|
|
40782
40709
|
};
|
|
40710
|
+
Rectangle.defaultProps = {
|
|
40711
|
+
x: 0,
|
|
40712
|
+
y: 0,
|
|
40713
|
+
width: 0,
|
|
40714
|
+
height: 0,
|
|
40715
|
+
// The radius of border
|
|
40716
|
+
// The radius of four corners when radius is a number
|
|
40717
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40718
|
+
radius: 0,
|
|
40719
|
+
isAnimationActive: false,
|
|
40720
|
+
isUpdateAnimationActive: false,
|
|
40721
|
+
animationBegin: 0,
|
|
40722
|
+
animationDuration: 1500,
|
|
40723
|
+
animationEasing: 'ease'
|
|
40724
|
+
};
|
|
40783
40725
|
|
|
40784
40726
|
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); }
|
|
40785
40727
|
var Dot$1 = function Dot(props) {
|
|
@@ -40799,42 +40741,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40799
40741
|
return null;
|
|
40800
40742
|
};
|
|
40801
40743
|
|
|
40802
|
-
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); }
|
|
40803
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40804
40744
|
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); }
|
|
40805
|
-
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; }
|
|
40806
|
-
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; }
|
|
40807
|
-
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; }
|
|
40808
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40809
|
-
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); }
|
|
40810
|
-
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; }
|
|
40811
|
-
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; }
|
|
40812
40745
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40813
40746
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40814
40747
|
};
|
|
40815
|
-
var Cross = function Cross(
|
|
40816
|
-
var
|
|
40817
|
-
|
|
40818
|
-
|
|
40819
|
-
|
|
40820
|
-
|
|
40821
|
-
|
|
40822
|
-
|
|
40823
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40824
|
-
_ref$width = _ref.width,
|
|
40825
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40826
|
-
_ref$height = _ref.height,
|
|
40827
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40828
|
-
className = _ref.className,
|
|
40829
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40830
|
-
var props = _objectSpread$c({
|
|
40831
|
-
x: x,
|
|
40832
|
-
y: y,
|
|
40833
|
-
top: top,
|
|
40834
|
-
left: left,
|
|
40835
|
-
width: width,
|
|
40836
|
-
height: height
|
|
40837
|
-
}, rest);
|
|
40748
|
+
var Cross = function Cross(props) {
|
|
40749
|
+
var x = props.x,
|
|
40750
|
+
y = props.y,
|
|
40751
|
+
width = props.width,
|
|
40752
|
+
height = props.height,
|
|
40753
|
+
top = props.top,
|
|
40754
|
+
left = props.left,
|
|
40755
|
+
className = props.className;
|
|
40838
40756
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40839
40757
|
return null;
|
|
40840
40758
|
}
|
|
@@ -40843,6 +40761,14 @@ var Cross = function Cross(_ref) {
|
|
|
40843
40761
|
d: getPath(x, y, width, height, top, left)
|
|
40844
40762
|
}));
|
|
40845
40763
|
};
|
|
40764
|
+
Cross.defaultProps = {
|
|
40765
|
+
x: 0,
|
|
40766
|
+
y: 0,
|
|
40767
|
+
top: 0,
|
|
40768
|
+
left: 0,
|
|
40769
|
+
width: 0,
|
|
40770
|
+
height: 0
|
|
40771
|
+
};
|
|
40846
40772
|
|
|
40847
40773
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40848
40774
|
|
|
@@ -41052,7 +40978,6 @@ var createScale = function createScale(_ref) {
|
|
|
41052
40978
|
isTextActive: false,
|
|
41053
40979
|
isSlideMoving: false,
|
|
41054
40980
|
isTravellerMoving: false,
|
|
41055
|
-
isTravellerFocused: false,
|
|
41056
40981
|
startX: scale(startIndex),
|
|
41057
40982
|
endX: scale(endIndex),
|
|
41058
40983
|
scale: scale,
|
|
@@ -41266,38 +41191,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41266
41191
|
}
|
|
41267
41192
|
});
|
|
41268
41193
|
}
|
|
41269
|
-
}, {
|
|
41270
|
-
key: "handleTravellerMoveKeyboard",
|
|
41271
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41272
|
-
var _this2 = this;
|
|
41273
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41274
|
-
var _this$state3 = this.state,
|
|
41275
|
-
scaleValues = _this$state3.scaleValues,
|
|
41276
|
-
startX = _this$state3.startX,
|
|
41277
|
-
endX = _this$state3.endX;
|
|
41278
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41279
|
-
var currentScaleValue = this.state[id];
|
|
41280
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41281
|
-
if (currentIndex === -1) {
|
|
41282
|
-
return;
|
|
41283
|
-
}
|
|
41284
|
-
var newIndex = currentIndex + direction;
|
|
41285
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41286
|
-
return;
|
|
41287
|
-
}
|
|
41288
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41289
|
-
|
|
41290
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41291
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41292
|
-
return;
|
|
41293
|
-
}
|
|
41294
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41295
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41296
|
-
startX: _this2.state.startX,
|
|
41297
|
-
endX: _this2.state.endX
|
|
41298
|
-
}));
|
|
41299
|
-
});
|
|
41300
|
-
}
|
|
41301
41194
|
}, {
|
|
41302
41195
|
key: "renderBackground",
|
|
41303
41196
|
value: function renderBackground() {
|
|
@@ -41345,7 +41238,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41345
41238
|
}, {
|
|
41346
41239
|
key: "renderTravellerLayer",
|
|
41347
41240
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41348
|
-
var _this3 = this;
|
|
41349
41241
|
var _this$props7 = this.props,
|
|
41350
41242
|
y = _this$props7.y,
|
|
41351
41243
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41359,31 +41251,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41359
41251
|
height: height
|
|
41360
41252
|
});
|
|
41361
41253
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41362
|
-
tabIndex: 0,
|
|
41363
|
-
role: "slider",
|
|
41364
41254
|
className: "recharts-brush-traveller",
|
|
41365
41255
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41366
41256
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41367
41257
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41368
41258
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41369
|
-
onKeyDown: function onKeyDown(e) {
|
|
41370
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41371
|
-
return;
|
|
41372
|
-
}
|
|
41373
|
-
e.preventDefault();
|
|
41374
|
-
e.stopPropagation();
|
|
41375
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41376
|
-
},
|
|
41377
|
-
onFocus: function onFocus() {
|
|
41378
|
-
_this3.setState({
|
|
41379
|
-
isTravellerFocused: true
|
|
41380
|
-
});
|
|
41381
|
-
},
|
|
41382
|
-
onBlur: function onBlur() {
|
|
41383
|
-
_this3.setState({
|
|
41384
|
-
isTravellerFocused: false
|
|
41385
|
-
});
|
|
41386
|
-
},
|
|
41387
41259
|
style: {
|
|
41388
41260
|
cursor: 'col-resize'
|
|
41389
41261
|
}
|
|
@@ -41427,9 +41299,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41427
41299
|
height = _this$props9.height,
|
|
41428
41300
|
travellerWidth = _this$props9.travellerWidth,
|
|
41429
41301
|
stroke = _this$props9.stroke;
|
|
41430
|
-
var _this$
|
|
41431
|
-
startX = _this$
|
|
41432
|
-
endX = _this$
|
|
41302
|
+
var _this$state3 = this.state,
|
|
41303
|
+
startX = _this$state3.startX,
|
|
41304
|
+
endX = _this$state3.endX;
|
|
41433
41305
|
var offset = 5;
|
|
41434
41306
|
var attrs = {
|
|
41435
41307
|
pointerEvents: 'none',
|
|
@@ -41461,13 +41333,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41461
41333
|
width = _this$props10.width,
|
|
41462
41334
|
height = _this$props10.height,
|
|
41463
41335
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41464
|
-
var _this$
|
|
41465
|
-
startX = _this$
|
|
41466
|
-
endX = _this$
|
|
41467
|
-
isTextActive = _this$
|
|
41468
|
-
isSlideMoving = _this$
|
|
41469
|
-
isTravellerMoving = _this$
|
|
41470
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41336
|
+
var _this$state4 = this.state,
|
|
41337
|
+
startX = _this$state4.startX,
|
|
41338
|
+
endX = _this$state4.endX,
|
|
41339
|
+
isTextActive = _this$state4.isTextActive,
|
|
41340
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41341
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41471
41342
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41472
41343
|
return null;
|
|
41473
41344
|
}
|
|
@@ -41479,7 +41350,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41479
41350
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41480
41351
|
onTouchMove: this.handleTouchMove,
|
|
41481
41352
|
style: style
|
|
41482
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41353
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41483
41354
|
}
|
|
41484
41355
|
}], [{
|
|
41485
41356
|
key: "renderDefaultTraveller",
|
|
@@ -41797,7 +41668,7 @@ function every(collection, predicate, guard) {
|
|
|
41797
41668
|
|
|
41798
41669
|
var every_1 = every;
|
|
41799
41670
|
|
|
41800
|
-
var defineProperty = _defineProperty$
|
|
41671
|
+
var defineProperty = _defineProperty$l;
|
|
41801
41672
|
|
|
41802
41673
|
/**
|
|
41803
41674
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42158,6 +42029,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42158
42029
|
legendType: 'rect',
|
|
42159
42030
|
minPointSize: 0,
|
|
42160
42031
|
hide: false,
|
|
42032
|
+
// data of bar
|
|
42161
42033
|
data: [],
|
|
42162
42034
|
layout: 'vertical',
|
|
42163
42035
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45070,11 +44942,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45070
44942
|
}
|
|
45071
44943
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45072
44944
|
x = _this$container$getBo.x,
|
|
45073
|
-
y = _this$container$getBo.y
|
|
45074
|
-
height = _this$container$getBo.height;
|
|
44945
|
+
y = _this$container$getBo.y;
|
|
45075
44946
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45076
44947
|
var pageX = x + coordinate;
|
|
45077
|
-
var pageY = y + this.offset.top
|
|
44948
|
+
var pageY = y + this.offset.top;
|
|
45078
44949
|
this.mouseHandlerCallback({
|
|
45079
44950
|
pageX: pageX,
|
|
45080
44951
|
pageY: pageY
|