@typeolymp/ui-components 1.19.34 → 1.19.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/atoms/Icon/index.d.ts +1 -1
- package/build/components/atoms/Input/translations.d.ts +11 -0
- package/build/components/molecules/IconButton/index.d.ts +3 -2
- 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 +632 -766
- package/build/index.es.js.map +1 -1
- package/build/index.js +632 -766
- package/build/index.js.map +1 -1
- package/build/lib/enums.d.ts +4 -0
- package/build/lib/helpers.d.ts +1 -0
- package/build/lib/theme/index.d.ts +3 -0
- package/build/lib/theme/types.d.ts +72 -0
- package/build/lib/translations/index.d.ts +6 -0
- package/build/lib/types/TranslationType.d.ts +7 -0
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -3569,6 +3569,7 @@ var icons = {
|
|
|
3569
3569
|
swap: (jsx$1("path", { d: "M7.1 8.3h11l-1.5 1.4c-.6.5-.6 1.4-.1 2 .5.6 1.4.6 2 .1L22.6 8c.6-.6.6-1.5 0-2.1L18.5 2c-.6-.5-1.5-.5-2 .1-.5.5-.5 1.4.1 1.9l1.5 1.4h-11c-.8 0-1.4.6-1.4 1.4s.6 1.5 1.4 1.5zM5.5 22c.6.5 1.5.5 2-.1.5-.5.5-1.4-.1-1.9l-1.5-1.4h11c.8 0 1.4-.6 1.4-1.4 0-.8-.6-1.4-1.4-1.4h-11l1.5-1.4c.6-.5.6-1.4.1-2s-1.4-.6-2-.1l-4.1 3.8c-.6.6-.6 1.5 0 2.1L5.5 22z" })),
|
|
3570
3570
|
login: (jsxs("g", __assign$2({ style: { transform: "rotate(270deg)", transformOrigin: "50%" } }, { children: [jsx$1("path", { d: "M22.6 14.6c-.7 0-1.3.6-1.3 1.3v4H2.7v-4c0-.7-.6-1.3-1.3-1.3s-1.3.6-1.3 1.3v5.2c0 .7.6 1.3 1.3 1.3h21.2c.7 0 1.3-.6 1.3-1.3v-5.2c0-.8-.6-1.3-1.3-1.3z" }), jsx$1("path", { d: "M11.2 16.7c.1.1.2.2.4.3h.4c.2 0 .3 0 .5-.1.1-.1.3-.1.4-.3l4.9-4.9c.5-.5.5-1.2 0-1.7s-1.2-.5-1.7 0l-2.8 2.8v-10c0-.7-.5-1.2-1.2-1.2s-1.2.5-1.2 1.2v10L8 10.1c-.5-.5-1.2-.5-1.7 0s-.5 1.2 0 1.7l4.9 4.9z" })] }))),
|
|
3571
3571
|
logout: (jsxs("g", __assign$2({ style: { transform: "rotate(90deg)", transformOrigin: "50%" } }, { children: [jsx$1("path", { d: "M22.6 14.6c-.7 0-1.3.6-1.3 1.3v4H2.7v-4c0-.7-.6-1.3-1.3-1.3s-1.3.6-1.3 1.3v5.2c0 .7.6 1.3 1.3 1.3h21.2c.7 0 1.3-.6 1.3-1.3v-5.2c0-.8-.6-1.3-1.3-1.3z" }), jsx$1("path", { d: "M12.8 2.1c-.1-.1-.2-.2-.4-.3-.1-.1-.3-.1-.5-.1s-.3 0-.5.1c-.1.1-.3.1-.4.3L6.3 7c-.5.5-.5 1.2 0 1.7s1.2.5 1.7 0l2.8-2.8v10c0 .7.5 1.2 1.2 1.2s1.2-.5 1.2-1.2v-10L16 8.7c.5.5 1.2.5 1.7 0s.5-1.2 0-1.7l-4.9-4.9z" })] }))),
|
|
3572
|
+
edit: (jsx$1("path", { d: "M14.3 5.6c-.3-.3-.8-.3-1.2 0L2.4 16.3c-.1.1-.1.2-.2.2v.2L1 22c-.1.3 0 .6.2.8.2.1.4.2.6.2H2l5.3-1.2c.1 0 .1 0 .2-.1h.1l.1-.1 10.7-10.7c.2-.2.2-.4.2-.6s-.1-.4-.2-.6l-4.1-4.1zM22.8 5.3l-4.1-4.1c-.3-.3-.8-.3-1.2 0l-2.4 2.4c-.2.2-.2.4-.2.6s.1.4.2.6l4.1 4.1c.2.2.4.2.6.2s.4-.1.6-.2l2.4-2.4c.1-.1.2-.4.2-.6s-.1-.4-.2-.6z" }))
|
|
3572
3573
|
};
|
|
3573
3574
|
var Icon = function (props) { return (jsx$1(Wrapper$a, __assign$2({}, props, { children: jsx$1("svg", __assign$2({ viewBox: "0 0 24 24", fill: "none" }, { children: icons[props.type] })) }))); };
|
|
3574
3575
|
|
|
@@ -4551,7 +4552,7 @@ function requiredArgs(required, args) {
|
|
|
4551
4552
|
}
|
|
4552
4553
|
}
|
|
4553
4554
|
|
|
4554
|
-
function _typeof$
|
|
4555
|
+
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); }
|
|
4555
4556
|
/**
|
|
4556
4557
|
* @name toDate
|
|
4557
4558
|
* @category Common Helpers
|
|
@@ -4587,7 +4588,7 @@ function toDate(argument) {
|
|
|
4587
4588
|
requiredArgs(1, arguments);
|
|
4588
4589
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4589
4590
|
|
|
4590
|
-
if (argument instanceof Date || _typeof$
|
|
4591
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4591
4592
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4592
4593
|
return new Date(argument.getTime());
|
|
4593
4594
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4858,7 +4859,7 @@ var millisecondsInMinute = 60000;
|
|
|
4858
4859
|
|
|
4859
4860
|
var millisecondsInHour = 3600000;
|
|
4860
4861
|
|
|
4861
|
-
function _typeof$
|
|
4862
|
+
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); }
|
|
4862
4863
|
/**
|
|
4863
4864
|
* @name isDate
|
|
4864
4865
|
* @category Common Helpers
|
|
@@ -4894,7 +4895,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4894
4895
|
|
|
4895
4896
|
function isDate(value) {
|
|
4896
4897
|
requiredArgs(1, arguments);
|
|
4897
|
-
return value instanceof Date || _typeof$
|
|
4898
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4898
4899
|
}
|
|
4899
4900
|
|
|
4900
4901
|
/**
|
|
@@ -8009,6 +8010,7 @@ var DateInput = function (props) {
|
|
|
8009
8010
|
};
|
|
8010
8011
|
|
|
8011
8012
|
var SearchInput = function (props) {
|
|
8013
|
+
props.onSearch; var rest = __rest$1(props, ["onSearch"]);
|
|
8012
8014
|
var _a = useState(props.defaultValue || ""), value = _a[0], setValue = _a[1];
|
|
8013
8015
|
var onChange = function (e) {
|
|
8014
8016
|
setValue(e.target.value);
|
|
@@ -8029,7 +8031,7 @@ var SearchInput = function (props) {
|
|
|
8029
8031
|
if (value.length <= 0)
|
|
8030
8032
|
onSearch();
|
|
8031
8033
|
};
|
|
8032
|
-
return (jsx$1(Container$q, { children: jsxs(InputIconWrapper, __assign$2({ disabled: props.disabled, size: props.size }, { children: [jsx$1(Icon, { type: "search", color: "gray", size: "small", onClick: onSearch }), jsx$1(StyledInput, __assign$2({ type: "text" },
|
|
8034
|
+
return (jsx$1(Container$q, { children: jsxs(InputIconWrapper, __assign$2({ disabled: props.disabled, size: props.size }, { children: [jsx$1(Icon, { type: "search", color: "gray", size: "small", onClick: onSearch }), jsx$1(StyledInput, __assign$2({ type: "text" }, rest, { onChange: onChange, onKeyPress: onKeyPress, onBlur: onBlur }))] })) }));
|
|
8033
8035
|
};
|
|
8034
8036
|
|
|
8035
8037
|
var Input = function (props) {
|
|
@@ -13670,15 +13672,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13670
13672
|
|
|
13671
13673
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13672
13674
|
|
|
13673
|
-
function _slicedToArray$
|
|
13674
|
-
return _arrayWithHoles$
|
|
13675
|
+
function _slicedToArray$d(arr, i) {
|
|
13676
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13675
13677
|
}
|
|
13676
13678
|
|
|
13677
|
-
function _arrayWithHoles$
|
|
13679
|
+
function _arrayWithHoles$e(arr) {
|
|
13678
13680
|
if (Array.isArray(arr)) return arr;
|
|
13679
13681
|
}
|
|
13680
13682
|
|
|
13681
|
-
function _iterableToArrayLimit$
|
|
13683
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13682
13684
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13683
13685
|
|
|
13684
13686
|
if (_i == null) return;
|
|
@@ -13708,16 +13710,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13708
13710
|
return _arr;
|
|
13709
13711
|
}
|
|
13710
13712
|
|
|
13711
|
-
function _unsupportedIterableToArray$
|
|
13713
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13712
13714
|
if (!o) return;
|
|
13713
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13715
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13714
13716
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13715
13717
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13716
13718
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13717
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13719
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13718
13720
|
}
|
|
13719
13721
|
|
|
13720
|
-
function _arrayLikeToArray$
|
|
13722
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13721
13723
|
if (len == null || len > arr.length) len = arr.length;
|
|
13722
13724
|
|
|
13723
13725
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13725,7 +13727,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13725
13727
|
return arr2;
|
|
13726
13728
|
}
|
|
13727
13729
|
|
|
13728
|
-
function _nonIterableRest$
|
|
13730
|
+
function _nonIterableRest$e() {
|
|
13729
13731
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13730
13732
|
}
|
|
13731
13733
|
|
|
@@ -13789,7 +13791,7 @@ reservedProps.forEach(function (name) {
|
|
|
13789
13791
|
// This is a mapping from React prop names to the attribute names.
|
|
13790
13792
|
|
|
13791
13793
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13792
|
-
var _ref2 = _slicedToArray$
|
|
13794
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13793
13795
|
name = _ref2[0],
|
|
13794
13796
|
attributeName = _ref2[1];
|
|
13795
13797
|
|
|
@@ -16208,31 +16210,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16208
16210
|
return true;
|
|
16209
16211
|
};
|
|
16210
16212
|
|
|
16211
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16213
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16212
16214
|
|
|
16213
16215
|
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."); }
|
|
16214
16216
|
|
|
16215
16217
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16216
16218
|
|
|
16217
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16219
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16218
16220
|
|
|
16219
|
-
function ownKeys$
|
|
16221
|
+
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; }
|
|
16220
16222
|
|
|
16221
|
-
function _objectSpread$
|
|
16223
|
+
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; }
|
|
16222
16224
|
|
|
16223
|
-
function _defineProperty$
|
|
16225
|
+
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; }
|
|
16224
16226
|
|
|
16225
|
-
function _slicedToArray$
|
|
16227
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16226
16228
|
|
|
16227
|
-
function _nonIterableRest$
|
|
16229
|
+
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."); }
|
|
16228
16230
|
|
|
16229
|
-
function _unsupportedIterableToArray$
|
|
16231
|
+
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); }
|
|
16230
16232
|
|
|
16231
|
-
function _arrayLikeToArray$
|
|
16233
|
+
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; }
|
|
16232
16234
|
|
|
16233
|
-
function _iterableToArrayLimit$
|
|
16235
|
+
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; }
|
|
16234
16236
|
|
|
16235
|
-
function _arrayWithHoles$
|
|
16237
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16236
16238
|
|
|
16237
16239
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16238
16240
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16312,11 +16314,11 @@ function allFilesAccepted(_ref) {
|
|
|
16312
16314
|
|
|
16313
16315
|
return files.every(function (file) {
|
|
16314
16316
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16315
|
-
_fileAccepted2 = _slicedToArray$
|
|
16317
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16316
16318
|
accepted = _fileAccepted2[0];
|
|
16317
16319
|
|
|
16318
16320
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16319
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16321
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16320
16322
|
sizeMatch = _fileMatchSize2[0];
|
|
16321
16323
|
|
|
16322
16324
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16413,7 +16415,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16413
16415
|
function pickerOptionsFromAccept(accept) {
|
|
16414
16416
|
if (isDefined(accept)) {
|
|
16415
16417
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16416
|
-
var _ref3 = _slicedToArray$
|
|
16418
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16417
16419
|
mimeType = _ref3[0],
|
|
16418
16420
|
ext = _ref3[1];
|
|
16419
16421
|
|
|
@@ -16431,11 +16433,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16431
16433
|
|
|
16432
16434
|
return ok;
|
|
16433
16435
|
}).reduce(function (agg, _ref4) {
|
|
16434
|
-
var _ref5 = _slicedToArray$
|
|
16436
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16435
16437
|
mimeType = _ref5[0],
|
|
16436
16438
|
ext = _ref5[1];
|
|
16437
16439
|
|
|
16438
|
-
return _objectSpread$
|
|
16440
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16439
16441
|
}, {});
|
|
16440
16442
|
return [{
|
|
16441
16443
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16455,7 +16457,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16455
16457
|
function acceptPropAsAcceptAttr(accept) {
|
|
16456
16458
|
if (isDefined(accept)) {
|
|
16457
16459
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16458
|
-
var _ref7 = _slicedToArray$
|
|
16460
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16459
16461
|
mimeType = _ref7[0],
|
|
16460
16462
|
ext = _ref7[1];
|
|
16461
16463
|
|
|
@@ -16523,40 +16525,40 @@ function isExt(v) {
|
|
|
16523
16525
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16524
16526
|
*/
|
|
16525
16527
|
|
|
16526
|
-
var _excluded$
|
|
16527
|
-
_excluded2$
|
|
16528
|
+
var _excluded$d = ["children"],
|
|
16529
|
+
_excluded2$3 = ["open"],
|
|
16528
16530
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16529
16531
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16530
16532
|
|
|
16531
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16533
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16532
16534
|
|
|
16533
16535
|
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."); }
|
|
16534
16536
|
|
|
16535
16537
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16536
16538
|
|
|
16537
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16539
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16538
16540
|
|
|
16539
|
-
function _slicedToArray$
|
|
16541
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16540
16542
|
|
|
16541
|
-
function _nonIterableRest$
|
|
16543
|
+
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."); }
|
|
16542
16544
|
|
|
16543
|
-
function _unsupportedIterableToArray$
|
|
16545
|
+
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); }
|
|
16544
16546
|
|
|
16545
|
-
function _arrayLikeToArray$
|
|
16547
|
+
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; }
|
|
16546
16548
|
|
|
16547
|
-
function _iterableToArrayLimit$
|
|
16549
|
+
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; }
|
|
16548
16550
|
|
|
16549
|
-
function _arrayWithHoles$
|
|
16551
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16550
16552
|
|
|
16551
|
-
function ownKeys$
|
|
16553
|
+
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; }
|
|
16552
16554
|
|
|
16553
|
-
function _objectSpread$
|
|
16555
|
+
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; }
|
|
16554
16556
|
|
|
16555
|
-
function _defineProperty$
|
|
16557
|
+
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; }
|
|
16556
16558
|
|
|
16557
|
-
function _objectWithoutProperties$
|
|
16559
|
+
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; }
|
|
16558
16560
|
|
|
16559
|
-
function _objectWithoutPropertiesLoose$
|
|
16561
|
+
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; }
|
|
16560
16562
|
/**
|
|
16561
16563
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16562
16564
|
*
|
|
@@ -16574,11 +16576,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16574
16576
|
|
|
16575
16577
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16576
16578
|
var children = _ref.children,
|
|
16577
|
-
params = _objectWithoutProperties$
|
|
16579
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16578
16580
|
|
|
16579
16581
|
var _useDropzone = useDropzone(params),
|
|
16580
16582
|
open = _useDropzone.open,
|
|
16581
|
-
props = _objectWithoutProperties$
|
|
16583
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16582
16584
|
|
|
16583
16585
|
useImperativeHandle(ref, function () {
|
|
16584
16586
|
return {
|
|
@@ -16586,13 +16588,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16586
16588
|
};
|
|
16587
16589
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16588
16590
|
|
|
16589
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16591
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16590
16592
|
open: open
|
|
16591
16593
|
})));
|
|
16592
16594
|
});
|
|
16593
16595
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16594
16596
|
|
|
16595
|
-
var defaultProps$
|
|
16597
|
+
var defaultProps$1 = {
|
|
16596
16598
|
disabled: false,
|
|
16597
16599
|
getFilesFromEvent: fromEvent,
|
|
16598
16600
|
maxSize: Infinity,
|
|
@@ -16608,7 +16610,7 @@ var defaultProps$2 = {
|
|
|
16608
16610
|
useFsAccessApi: true,
|
|
16609
16611
|
autoFocus: false
|
|
16610
16612
|
};
|
|
16611
|
-
Dropzone.defaultProps = defaultProps$
|
|
16613
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16612
16614
|
Dropzone.propTypes = {
|
|
16613
16615
|
/**
|
|
16614
16616
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16959,7 +16961,7 @@ var initialState = {
|
|
|
16959
16961
|
function useDropzone() {
|
|
16960
16962
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16961
16963
|
|
|
16962
|
-
var _defaultProps$props = _objectSpread$
|
|
16964
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16963
16965
|
accept = _defaultProps$props.accept,
|
|
16964
16966
|
disabled = _defaultProps$props.disabled,
|
|
16965
16967
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17006,7 +17008,7 @@ function useDropzone() {
|
|
|
17006
17008
|
var inputRef = useRef(null);
|
|
17007
17009
|
|
|
17008
17010
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
17009
|
-
_useReducer2 = _slicedToArray$
|
|
17011
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
17010
17012
|
state = _useReducer2[0],
|
|
17011
17013
|
dispatch = _useReducer2[1];
|
|
17012
17014
|
|
|
@@ -17176,12 +17178,12 @@ function useDropzone() {
|
|
|
17176
17178
|
var fileRejections = [];
|
|
17177
17179
|
files.forEach(function (file) {
|
|
17178
17180
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17179
|
-
_fileAccepted2 = _slicedToArray$
|
|
17181
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17180
17182
|
accepted = _fileAccepted2[0],
|
|
17181
17183
|
acceptError = _fileAccepted2[1];
|
|
17182
17184
|
|
|
17183
17185
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17184
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17186
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17185
17187
|
sizeMatch = _fileMatchSize2[0],
|
|
17186
17188
|
sizeError = _fileMatchSize2[1];
|
|
17187
17189
|
|
|
@@ -17382,9 +17384,9 @@ function useDropzone() {
|
|
|
17382
17384
|
onDragOver = _ref2.onDragOver,
|
|
17383
17385
|
onDragLeave = _ref2.onDragLeave,
|
|
17384
17386
|
onDrop = _ref2.onDrop,
|
|
17385
|
-
rest = _objectWithoutProperties$
|
|
17387
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17386
17388
|
|
|
17387
|
-
return _objectSpread$
|
|
17389
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17388
17390
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17389
17391
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17390
17392
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17409,9 +17411,9 @@ function useDropzone() {
|
|
|
17409
17411
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17410
17412
|
onChange = _ref3.onChange,
|
|
17411
17413
|
onClick = _ref3.onClick,
|
|
17412
|
-
rest = _objectWithoutProperties$
|
|
17414
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17413
17415
|
|
|
17414
|
-
var inputProps = _defineProperty$
|
|
17416
|
+
var inputProps = _defineProperty$r({
|
|
17415
17417
|
accept: acceptAttr,
|
|
17416
17418
|
multiple: multiple,
|
|
17417
17419
|
type: "file",
|
|
@@ -17423,10 +17425,10 @@ function useDropzone() {
|
|
|
17423
17425
|
tabIndex: -1
|
|
17424
17426
|
}, refKey, inputRef);
|
|
17425
17427
|
|
|
17426
|
-
return _objectSpread$
|
|
17428
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17427
17429
|
};
|
|
17428
17430
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17429
|
-
return _objectSpread$
|
|
17431
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17430
17432
|
isFocused: isFocused && !disabled,
|
|
17431
17433
|
getRootProps: getRootProps,
|
|
17432
17434
|
getInputProps: getInputProps,
|
|
@@ -17445,40 +17447,40 @@ function reducer$1(state, action) {
|
|
|
17445
17447
|
/* istanbul ignore next */
|
|
17446
17448
|
switch (action.type) {
|
|
17447
17449
|
case "focus":
|
|
17448
|
-
return _objectSpread$
|
|
17450
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17449
17451
|
isFocused: true
|
|
17450
17452
|
});
|
|
17451
17453
|
|
|
17452
17454
|
case "blur":
|
|
17453
|
-
return _objectSpread$
|
|
17455
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17454
17456
|
isFocused: false
|
|
17455
17457
|
});
|
|
17456
17458
|
|
|
17457
17459
|
case "openDialog":
|
|
17458
|
-
return _objectSpread$
|
|
17460
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17459
17461
|
isFileDialogActive: true
|
|
17460
17462
|
});
|
|
17461
17463
|
|
|
17462
17464
|
case "closeDialog":
|
|
17463
|
-
return _objectSpread$
|
|
17465
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17464
17466
|
isFileDialogActive: false
|
|
17465
17467
|
});
|
|
17466
17468
|
|
|
17467
17469
|
case "setDraggedFiles":
|
|
17468
|
-
return _objectSpread$
|
|
17470
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17469
17471
|
isDragActive: action.isDragActive,
|
|
17470
17472
|
isDragAccept: action.isDragAccept,
|
|
17471
17473
|
isDragReject: action.isDragReject
|
|
17472
17474
|
});
|
|
17473
17475
|
|
|
17474
17476
|
case "setFiles":
|
|
17475
|
-
return _objectSpread$
|
|
17477
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17476
17478
|
acceptedFiles: action.acceptedFiles,
|
|
17477
17479
|
fileRejections: action.fileRejections
|
|
17478
17480
|
});
|
|
17479
17481
|
|
|
17480
17482
|
case "reset":
|
|
17481
|
-
return _objectSpread$
|
|
17483
|
+
return _objectSpread$p({}, initialState);
|
|
17482
17484
|
|
|
17483
17485
|
default:
|
|
17484
17486
|
return state;
|
|
@@ -17549,16 +17551,16 @@ var StyledIconButton = styled(StyledButton)(templateObject_1$u || (templateObjec
|
|
|
17549
17551
|
});
|
|
17550
17552
|
var GhostIconButton = styled(GhostButton)(templateObject_2$q || (templateObject_2$q = __makeTemplateObject$1(["\n min-width: ", ";\n max-width: ", ";\n min-height: ", ";\n max-height: ", ";\n padding: 2px 0 0 0;\n\n :active {\n min-height: ", ";\n max-height: ", ";\n margin-top: 2px;\n }\n"], ["\n min-width: ", ";\n max-width: ", ";\n min-height: ", ";\n max-height: ", ";\n padding: 2px 0 0 0;\n\n :active {\n min-height: ", ";\n max-height: ", ";\n margin-top: 2px;\n }\n"])), function (_a) {
|
|
17551
17553
|
var size = _a.size;
|
|
17552
|
-
return (size === "small" ? "
|
|
17554
|
+
return (size === "small" ? "30px" : "40px");
|
|
17553
17555
|
}, function (_a) {
|
|
17554
17556
|
var size = _a.size;
|
|
17555
|
-
return (size === "small" ? "
|
|
17557
|
+
return (size === "small" ? "30px" : "40px");
|
|
17556
17558
|
}, function (_a) {
|
|
17557
17559
|
var size = _a.size;
|
|
17558
|
-
return (size === "small" ? "
|
|
17560
|
+
return (size === "small" ? "28px" : "38px");
|
|
17559
17561
|
}, function (_a) {
|
|
17560
17562
|
var size = _a.size;
|
|
17561
|
-
return (size === "small" ? "
|
|
17563
|
+
return (size === "small" ? "28px" : "38px");
|
|
17562
17564
|
}, function (_a) {
|
|
17563
17565
|
var size = _a.size;
|
|
17564
17566
|
return (size === "small" ? "30px" : "40px");
|
|
@@ -19706,7 +19708,7 @@ function shallowEqual(a, b) {
|
|
|
19706
19708
|
return true;
|
|
19707
19709
|
}
|
|
19708
19710
|
|
|
19709
|
-
function _typeof$
|
|
19711
|
+
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); }
|
|
19710
19712
|
|
|
19711
19713
|
//
|
|
19712
19714
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19733,9 +19735,7 @@ var FilteredElementKeyMap = {
|
|
|
19733
19735
|
};
|
|
19734
19736
|
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'];
|
|
19735
19737
|
|
|
19736
|
-
|
|
19737
|
-
|
|
19738
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19738
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19739
19739
|
|
|
19740
19740
|
/** the offset of a chart, which define the blank space all around */
|
|
19741
19741
|
|
|
@@ -19771,7 +19771,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19771
19771
|
};
|
|
19772
19772
|
};
|
|
19773
19773
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19774
|
-
if (!isObject_1(props) || _typeof$
|
|
19774
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19775
19775
|
return null;
|
|
19776
19776
|
}
|
|
19777
19777
|
var out = null;
|
|
@@ -19785,11 +19785,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19785
19785
|
return out;
|
|
19786
19786
|
};
|
|
19787
19787
|
|
|
19788
|
-
var _excluded$
|
|
19789
|
-
_excluded2$
|
|
19790
|
-
function _objectWithoutProperties$
|
|
19791
|
-
function _objectWithoutPropertiesLoose$
|
|
19792
|
-
function _typeof$
|
|
19788
|
+
var _excluded$c = ["children"],
|
|
19789
|
+
_excluded2$2 = ["children"];
|
|
19790
|
+
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; }
|
|
19791
|
+
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; }
|
|
19792
|
+
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); }
|
|
19793
19793
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19794
19794
|
click: 'onClick',
|
|
19795
19795
|
mousedown: 'onMouseDown',
|
|
@@ -19896,7 +19896,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19896
19896
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19897
19897
|
};
|
|
19898
19898
|
var isDotProps = function isDotProps(dot) {
|
|
19899
|
-
return dot && _typeof$
|
|
19899
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19900
19900
|
};
|
|
19901
19901
|
|
|
19902
19902
|
/**
|
|
@@ -19988,10 +19988,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19988
19988
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19989
19989
|
var _ref = nextChild.props || {},
|
|
19990
19990
|
nextChildren = _ref.children,
|
|
19991
|
-
nextProps = _objectWithoutProperties$
|
|
19991
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19992
19992
|
var _ref2 = prevChild.props || {},
|
|
19993
19993
|
prevChildren = _ref2.children,
|
|
19994
|
-
prevProps = _objectWithoutProperties$
|
|
19994
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19995
19995
|
if (nextChildren && prevChildren) {
|
|
19996
19996
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19997
19997
|
}
|
|
@@ -20033,10 +20033,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20033
20033
|
return toArray(children).indexOf(child);
|
|
20034
20034
|
};
|
|
20035
20035
|
|
|
20036
|
-
var _excluded$
|
|
20036
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20037
20037
|
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); }
|
|
20038
|
-
function _objectWithoutProperties$
|
|
20039
|
-
function _objectWithoutPropertiesLoose$
|
|
20038
|
+
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; }
|
|
20039
|
+
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; }
|
|
20040
20040
|
function Surface(props) {
|
|
20041
20041
|
var children = props.children,
|
|
20042
20042
|
width = props.width,
|
|
@@ -20044,7 +20044,7 @@ function Surface(props) {
|
|
|
20044
20044
|
viewBox = props.viewBox,
|
|
20045
20045
|
className = props.className,
|
|
20046
20046
|
style = props.style,
|
|
20047
|
-
others = _objectWithoutProperties$
|
|
20047
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
20048
20048
|
var svgView = viewBox || {
|
|
20049
20049
|
width: width,
|
|
20050
20050
|
height: height,
|
|
@@ -20061,14 +20061,14 @@ function Surface(props) {
|
|
|
20061
20061
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
20062
20062
|
}
|
|
20063
20063
|
|
|
20064
|
-
var _excluded$
|
|
20064
|
+
var _excluded$a = ["children", "className"];
|
|
20065
20065
|
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); }
|
|
20066
|
-
function _objectWithoutProperties$
|
|
20067
|
-
function _objectWithoutPropertiesLoose$
|
|
20066
|
+
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; }
|
|
20067
|
+
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; }
|
|
20068
20068
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
20069
20069
|
var children = props.children,
|
|
20070
20070
|
className = props.className,
|
|
20071
|
-
others = _objectWithoutProperties$
|
|
20071
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
20072
20072
|
var layerClass = classNames('recharts-layer', className);
|
|
20073
20073
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
20074
20074
|
className: layerClass
|
|
@@ -23483,16 +23483,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23483
23483
|
stackOffsetNone(series, order);
|
|
23484
23484
|
}
|
|
23485
23485
|
|
|
23486
|
-
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); }
|
|
23487
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23488
23486
|
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); }
|
|
23489
|
-
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; }
|
|
23490
|
-
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; }
|
|
23491
|
-
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; }
|
|
23492
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23493
|
-
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); }
|
|
23494
|
-
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; }
|
|
23495
|
-
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; }
|
|
23496
23487
|
var symbolFactories = {
|
|
23497
23488
|
symbolCircle: symbolCircle,
|
|
23498
23489
|
symbolCross: symbolCross,
|
|
@@ -23531,35 +23522,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23531
23522
|
return Math.PI * size * size / 4;
|
|
23532
23523
|
}
|
|
23533
23524
|
};
|
|
23525
|
+
var symbolsDefaultProps = {
|
|
23526
|
+
type: 'circle',
|
|
23527
|
+
size: 64,
|
|
23528
|
+
sizeType: 'area'
|
|
23529
|
+
};
|
|
23534
23530
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23535
23531
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23536
23532
|
};
|
|
23537
|
-
var Symbols = function Symbols(
|
|
23538
|
-
var _ref$type = _ref.type,
|
|
23539
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23540
|
-
_ref$size = _ref.size,
|
|
23541
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23542
|
-
_ref$sizeType = _ref.sizeType,
|
|
23543
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23544
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23545
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23546
|
-
type: type,
|
|
23547
|
-
size: size,
|
|
23548
|
-
sizeType: sizeType
|
|
23549
|
-
});
|
|
23550
|
-
|
|
23533
|
+
var Symbols = function Symbols(props) {
|
|
23551
23534
|
/**
|
|
23552
23535
|
* Calculate the path of curve
|
|
23553
23536
|
* @return {String} path
|
|
23554
23537
|
*/
|
|
23555
23538
|
var getPath = function getPath() {
|
|
23539
|
+
var size = props.size,
|
|
23540
|
+
sizeType = props.sizeType,
|
|
23541
|
+
type = props.type;
|
|
23556
23542
|
var symbolFactory = getSymbolFactory(type);
|
|
23557
23543
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23558
23544
|
return symbol();
|
|
23559
23545
|
};
|
|
23560
23546
|
var className = props.className,
|
|
23561
23547
|
cx = props.cx,
|
|
23562
|
-
cy = props.cy
|
|
23548
|
+
cy = props.cy,
|
|
23549
|
+
size = props.size;
|
|
23563
23550
|
var filteredProps = filterProps(props, true);
|
|
23564
23551
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23565
23552
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23570,34 +23557,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23570
23557
|
}
|
|
23571
23558
|
return null;
|
|
23572
23559
|
};
|
|
23560
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23573
23561
|
Symbols.registerSymbol = registerSymbol;
|
|
23574
23562
|
|
|
23575
|
-
function _typeof$
|
|
23563
|
+
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); }
|
|
23576
23564
|
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); }
|
|
23577
|
-
function ownKeys$
|
|
23578
|
-
function _objectSpread$
|
|
23579
|
-
function _classCallCheck$
|
|
23580
|
-
function _defineProperties$
|
|
23581
|
-
function _createClass$
|
|
23582
|
-
function _inherits$
|
|
23583
|
-
function _setPrototypeOf$
|
|
23584
|
-
function _createSuper$
|
|
23585
|
-
function _possibleConstructorReturn$
|
|
23586
|
-
function _assertThisInitialized$
|
|
23587
|
-
function _isNativeReflectConstruct$
|
|
23588
|
-
function _getPrototypeOf$
|
|
23589
|
-
function _defineProperty$
|
|
23590
|
-
function _toPropertyKey$
|
|
23591
|
-
function _toPrimitive$
|
|
23565
|
+
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; }
|
|
23566
|
+
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; }
|
|
23567
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23568
|
+
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); } }
|
|
23569
|
+
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; }
|
|
23570
|
+
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); }
|
|
23571
|
+
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); }
|
|
23572
|
+
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); }; }
|
|
23573
|
+
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); }
|
|
23574
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23575
|
+
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; } }
|
|
23576
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23577
|
+
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; }
|
|
23578
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23579
|
+
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); }
|
|
23592
23580
|
var SIZE = 32;
|
|
23593
23581
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23594
|
-
_inherits$
|
|
23595
|
-
var _super = _createSuper$
|
|
23582
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23583
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23596
23584
|
function DefaultLegendContent() {
|
|
23597
|
-
_classCallCheck$
|
|
23585
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23598
23586
|
return _super.apply(this, arguments);
|
|
23599
23587
|
}
|
|
23600
|
-
_createClass$
|
|
23588
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23601
23589
|
key: "renderIcon",
|
|
23602
23590
|
value:
|
|
23603
23591
|
/**
|
|
@@ -23642,7 +23630,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23642
23630
|
});
|
|
23643
23631
|
}
|
|
23644
23632
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23645
|
-
var iconProps = _objectSpread$
|
|
23633
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23646
23634
|
delete iconProps.legendIcon;
|
|
23647
23635
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23648
23636
|
}
|
|
@@ -23690,7 +23678,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23690
23678
|
var finalFormatter = entry.formatter || formatter;
|
|
23691
23679
|
var className = classNames((_classNames = {
|
|
23692
23680
|
'recharts-legend-item': true
|
|
23693
|
-
}, _defineProperty$
|
|
23681
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23694
23682
|
if (entry.type === 'none') {
|
|
23695
23683
|
return null;
|
|
23696
23684
|
}
|
|
@@ -23735,8 +23723,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23735
23723
|
}]);
|
|
23736
23724
|
return DefaultLegendContent;
|
|
23737
23725
|
}(PureComponent);
|
|
23738
|
-
_defineProperty$
|
|
23739
|
-
_defineProperty$
|
|
23726
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23727
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23740
23728
|
iconSize: 14,
|
|
23741
23729
|
layout: 'horizontal',
|
|
23742
23730
|
align: 'center',
|
|
@@ -23744,25 +23732,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23744
23732
|
inactiveColor: '#ccc'
|
|
23745
23733
|
});
|
|
23746
23734
|
|
|
23747
|
-
function _typeof$
|
|
23748
|
-
var _excluded$
|
|
23749
|
-
function ownKeys$
|
|
23750
|
-
function _objectSpread$
|
|
23751
|
-
function _classCallCheck$
|
|
23752
|
-
function _defineProperties$
|
|
23753
|
-
function _createClass$
|
|
23754
|
-
function _inherits$
|
|
23755
|
-
function _setPrototypeOf$
|
|
23756
|
-
function _createSuper$
|
|
23757
|
-
function _possibleConstructorReturn$
|
|
23758
|
-
function _assertThisInitialized$
|
|
23759
|
-
function _isNativeReflectConstruct$
|
|
23760
|
-
function _getPrototypeOf$
|
|
23761
|
-
function _defineProperty$
|
|
23762
|
-
function _toPropertyKey$
|
|
23763
|
-
function _toPrimitive$
|
|
23764
|
-
function _objectWithoutProperties$
|
|
23765
|
-
function _objectWithoutPropertiesLoose$
|
|
23735
|
+
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); }
|
|
23736
|
+
var _excluded$9 = ["ref"];
|
|
23737
|
+
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; }
|
|
23738
|
+
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; }
|
|
23739
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23740
|
+
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); } }
|
|
23741
|
+
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; }
|
|
23742
|
+
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); }
|
|
23743
|
+
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); }
|
|
23744
|
+
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); }; }
|
|
23745
|
+
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); }
|
|
23746
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23747
|
+
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; } }
|
|
23748
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23749
|
+
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; }
|
|
23750
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23751
|
+
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); }
|
|
23752
|
+
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; }
|
|
23753
|
+
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; }
|
|
23766
23754
|
function defaultUniqBy$1(entry) {
|
|
23767
23755
|
return entry.value;
|
|
23768
23756
|
}
|
|
@@ -23783,27 +23771,27 @@ function renderContent$1(content, props) {
|
|
|
23783
23771
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23784
23772
|
}
|
|
23785
23773
|
props.ref;
|
|
23786
|
-
var otherProps = _objectWithoutProperties$
|
|
23774
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23787
23775
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23788
23776
|
}
|
|
23789
23777
|
var EPS$2 = 1;
|
|
23790
23778
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23791
|
-
_inherits$
|
|
23792
|
-
var _super = _createSuper$
|
|
23779
|
+
_inherits$7(Legend, _PureComponent);
|
|
23780
|
+
var _super = _createSuper$7(Legend);
|
|
23793
23781
|
function Legend() {
|
|
23794
23782
|
var _this;
|
|
23795
|
-
_classCallCheck$
|
|
23783
|
+
_classCallCheck$9(this, Legend);
|
|
23796
23784
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23797
23785
|
args[_key] = arguments[_key];
|
|
23798
23786
|
}
|
|
23799
23787
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23800
|
-
_defineProperty$
|
|
23788
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23801
23789
|
boxWidth: -1,
|
|
23802
23790
|
boxHeight: -1
|
|
23803
23791
|
});
|
|
23804
23792
|
return _this;
|
|
23805
23793
|
}
|
|
23806
|
-
_createClass$
|
|
23794
|
+
_createClass$9(Legend, [{
|
|
23807
23795
|
key: "componentDidMount",
|
|
23808
23796
|
value: function componentDidMount() {
|
|
23809
23797
|
this.updateBBox();
|
|
@@ -23878,7 +23866,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23878
23866
|
};
|
|
23879
23867
|
}
|
|
23880
23868
|
}
|
|
23881
|
-
return _objectSpread$
|
|
23869
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23882
23870
|
}
|
|
23883
23871
|
}, {
|
|
23884
23872
|
key: "updateBBox",
|
|
@@ -23921,7 +23909,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23921
23909
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23922
23910
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23923
23911
|
payload = _this$props2.payload;
|
|
23924
|
-
var outerStyle = _objectSpread$
|
|
23912
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23925
23913
|
position: 'absolute',
|
|
23926
23914
|
width: width || 'auto',
|
|
23927
23915
|
height: height || 'auto'
|
|
@@ -23932,7 +23920,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23932
23920
|
ref: function ref(node) {
|
|
23933
23921
|
_this2.wrapperNode = node;
|
|
23934
23922
|
}
|
|
23935
|
-
}, renderContent$1(content, _objectSpread$
|
|
23923
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23936
23924
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23937
23925
|
})));
|
|
23938
23926
|
}
|
|
@@ -23955,8 +23943,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23955
23943
|
}]);
|
|
23956
23944
|
return Legend;
|
|
23957
23945
|
}(PureComponent);
|
|
23958
|
-
_defineProperty$
|
|
23959
|
-
_defineProperty$
|
|
23946
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23947
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23960
23948
|
iconSize: 14,
|
|
23961
23949
|
layout: 'horizontal',
|
|
23962
23950
|
align: 'center',
|
|
@@ -24520,13 +24508,13 @@ function setRafTimeout(callback) {
|
|
|
24520
24508
|
requestAnimationFrame(shouldUpdate);
|
|
24521
24509
|
}
|
|
24522
24510
|
|
|
24523
|
-
function _typeof$
|
|
24524
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24525
|
-
function _nonIterableRest$
|
|
24526
|
-
function _unsupportedIterableToArray$
|
|
24527
|
-
function _arrayLikeToArray$
|
|
24511
|
+
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); }
|
|
24512
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24513
|
+
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."); }
|
|
24514
|
+
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); }
|
|
24515
|
+
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; }
|
|
24528
24516
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24529
|
-
function _arrayWithHoles$
|
|
24517
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24530
24518
|
function createAnimateManager() {
|
|
24531
24519
|
var currStyle = {};
|
|
24532
24520
|
var handleChange = function handleChange() {
|
|
@@ -24553,7 +24541,7 @@ function createAnimateManager() {
|
|
|
24553
24541
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24554
24542
|
return;
|
|
24555
24543
|
}
|
|
24556
|
-
if (_typeof$
|
|
24544
|
+
if (_typeof$o(_style) === 'object') {
|
|
24557
24545
|
currStyle = _style;
|
|
24558
24546
|
handleChange(currStyle);
|
|
24559
24547
|
}
|
|
@@ -24580,12 +24568,12 @@ function createAnimateManager() {
|
|
|
24580
24568
|
};
|
|
24581
24569
|
}
|
|
24582
24570
|
|
|
24583
|
-
function _typeof$
|
|
24584
|
-
function ownKeys$
|
|
24585
|
-
function _objectSpread$
|
|
24586
|
-
function _defineProperty$
|
|
24587
|
-
function _toPropertyKey$
|
|
24588
|
-
function _toPrimitive$
|
|
24571
|
+
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); }
|
|
24572
|
+
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; }
|
|
24573
|
+
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; }
|
|
24574
|
+
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; }
|
|
24575
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24576
|
+
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); }
|
|
24589
24577
|
/* eslint no-console: 0 */
|
|
24590
24578
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24591
24579
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24617,7 +24605,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24617
24605
|
*/
|
|
24618
24606
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24619
24607
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24620
|
-
return _defineProperty$
|
|
24608
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24621
24609
|
}
|
|
24622
24610
|
var isTransition = name === 'transition';
|
|
24623
24611
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24628,7 +24616,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24628
24616
|
if (isTransition) {
|
|
24629
24617
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24630
24618
|
}
|
|
24631
|
-
return _objectSpread$
|
|
24619
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24632
24620
|
}, {});
|
|
24633
24621
|
};
|
|
24634
24622
|
|
|
@@ -24638,7 +24626,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24638
24626
|
*/
|
|
24639
24627
|
var mapObject = function mapObject(fn, obj) {
|
|
24640
24628
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24641
|
-
return _objectSpread$
|
|
24629
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24642
24630
|
}, {});
|
|
24643
24631
|
};
|
|
24644
24632
|
|
|
@@ -24648,7 +24636,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24648
24636
|
*/
|
|
24649
24637
|
var translateStyle = function translateStyle(style) {
|
|
24650
24638
|
return Object.keys(style).reduce(function (res, key) {
|
|
24651
|
-
return _objectSpread$
|
|
24639
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24652
24640
|
}, style);
|
|
24653
24641
|
};
|
|
24654
24642
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24676,16 +24664,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24676
24664
|
}
|
|
24677
24665
|
};
|
|
24678
24666
|
|
|
24679
|
-
function _slicedToArray$
|
|
24680
|
-
function _nonIterableRest$
|
|
24681
|
-
function _iterableToArrayLimit$
|
|
24682
|
-
function _arrayWithHoles$
|
|
24683
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24667
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24668
|
+
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."); }
|
|
24669
|
+
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; } }
|
|
24670
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24671
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24684
24672
|
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."); }
|
|
24685
|
-
function _unsupportedIterableToArray$
|
|
24673
|
+
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); }
|
|
24686
24674
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24687
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24688
|
-
function _arrayLikeToArray$
|
|
24675
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24676
|
+
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; }
|
|
24689
24677
|
var ACCURACY = 1e-4;
|
|
24690
24678
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24691
24679
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24761,7 +24749,7 @@ var configBezier = function configBezier() {
|
|
|
24761
24749
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24762
24750
|
return parseFloat(x);
|
|
24763
24751
|
});
|
|
24764
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24752
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24765
24753
|
x1 = _easing$1$split$0$spl2[0];
|
|
24766
24754
|
y1 = _easing$1$split$0$spl2[1];
|
|
24767
24755
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24854,22 +24842,22 @@ var configEasing = function configEasing() {
|
|
|
24854
24842
|
return null;
|
|
24855
24843
|
};
|
|
24856
24844
|
|
|
24857
|
-
function _typeof$
|
|
24858
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24845
|
+
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); }
|
|
24846
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24859
24847
|
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."); }
|
|
24860
24848
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24861
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24862
|
-
function ownKeys$
|
|
24863
|
-
function _objectSpread$
|
|
24864
|
-
function _defineProperty$
|
|
24865
|
-
function _toPropertyKey$
|
|
24866
|
-
function _toPrimitive$
|
|
24867
|
-
function _slicedToArray$
|
|
24868
|
-
function _nonIterableRest$
|
|
24869
|
-
function _unsupportedIterableToArray$
|
|
24870
|
-
function _arrayLikeToArray$
|
|
24871
|
-
function _iterableToArrayLimit$
|
|
24872
|
-
function _arrayWithHoles$
|
|
24849
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24850
|
+
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; }
|
|
24851
|
+
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; }
|
|
24852
|
+
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; }
|
|
24853
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24854
|
+
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); }
|
|
24855
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24856
|
+
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."); }
|
|
24857
|
+
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); }
|
|
24858
|
+
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; }
|
|
24859
|
+
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; } }
|
|
24860
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24873
24861
|
var alpha = function alpha(begin, end, k) {
|
|
24874
24862
|
return begin + (end - begin) * k;
|
|
24875
24863
|
};
|
|
@@ -24887,10 +24875,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24887
24875
|
var nextStepVals = mapObject(function (key, val) {
|
|
24888
24876
|
if (needContinue(val)) {
|
|
24889
24877
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24890
|
-
_easing2 = _slicedToArray$
|
|
24878
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24891
24879
|
newX = _easing2[0],
|
|
24892
24880
|
newV = _easing2[1];
|
|
24893
|
-
return _objectSpread$
|
|
24881
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24894
24882
|
from: newX,
|
|
24895
24883
|
velocity: newV
|
|
24896
24884
|
});
|
|
@@ -24900,7 +24888,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24900
24888
|
if (steps < 1) {
|
|
24901
24889
|
return mapObject(function (key, val) {
|
|
24902
24890
|
if (needContinue(val)) {
|
|
24903
|
-
return _objectSpread$
|
|
24891
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24904
24892
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24905
24893
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24906
24894
|
});
|
|
@@ -24915,10 +24903,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24915
24903
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24916
24904
|
var interKeys = getIntersectionKeys(from, to);
|
|
24917
24905
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24918
|
-
return _objectSpread$
|
|
24906
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24919
24907
|
}, {});
|
|
24920
24908
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24921
|
-
return _objectSpread$
|
|
24909
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24922
24910
|
from: from[key],
|
|
24923
24911
|
velocity: 0,
|
|
24924
24912
|
to: to[key]
|
|
@@ -24948,7 +24936,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24948
24936
|
var steps = deltaTime / easing.dt;
|
|
24949
24937
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24950
24938
|
// get union set and add compatible prefix
|
|
24951
|
-
render(_objectSpread$
|
|
24939
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24952
24940
|
preTime = now;
|
|
24953
24941
|
if (!shouldStopAnimation()) {
|
|
24954
24942
|
cafId = requestAnimationFrame(update);
|
|
@@ -24966,14 +24954,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24966
24954
|
}, timingStyle);
|
|
24967
24955
|
|
|
24968
24956
|
// get union set and add compatible prefix
|
|
24969
|
-
render(_objectSpread$
|
|
24957
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24970
24958
|
if (t < 1) {
|
|
24971
24959
|
cafId = requestAnimationFrame(update);
|
|
24972
24960
|
} else {
|
|
24973
24961
|
var finalStyle = mapObject(function (key, val) {
|
|
24974
24962
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24975
24963
|
}, timingStyle);
|
|
24976
|
-
render(_objectSpread$
|
|
24964
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24977
24965
|
}
|
|
24978
24966
|
};
|
|
24979
24967
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24989,37 +24977,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24989
24977
|
};
|
|
24990
24978
|
});
|
|
24991
24979
|
|
|
24992
|
-
function _typeof$
|
|
24993
|
-
var _excluded$
|
|
24994
|
-
function _objectWithoutProperties$
|
|
24995
|
-
function _objectWithoutPropertiesLoose$
|
|
24996
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24980
|
+
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); }
|
|
24981
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24982
|
+
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; }
|
|
24983
|
+
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; }
|
|
24984
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24997
24985
|
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."); }
|
|
24998
|
-
function _unsupportedIterableToArray$
|
|
24986
|
+
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); }
|
|
24999
24987
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25000
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
25001
|
-
function _arrayLikeToArray$
|
|
25002
|
-
function ownKeys$
|
|
25003
|
-
function _objectSpread$
|
|
25004
|
-
function _defineProperty$
|
|
25005
|
-
function _classCallCheck$
|
|
25006
|
-
function _defineProperties$
|
|
25007
|
-
function _createClass$
|
|
25008
|
-
function _toPropertyKey$
|
|
25009
|
-
function _toPrimitive$
|
|
25010
|
-
function _inherits$
|
|
25011
|
-
function _setPrototypeOf$
|
|
25012
|
-
function _createSuper$
|
|
25013
|
-
function _possibleConstructorReturn$
|
|
25014
|
-
function _assertThisInitialized$
|
|
25015
|
-
function _isNativeReflectConstruct$
|
|
25016
|
-
function _getPrototypeOf$
|
|
24988
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24989
|
+
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; }
|
|
24990
|
+
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; }
|
|
24991
|
+
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; }
|
|
24992
|
+
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; }
|
|
24993
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24994
|
+
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); } }
|
|
24995
|
+
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; }
|
|
24996
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24997
|
+
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); }
|
|
24998
|
+
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); }
|
|
24999
|
+
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); }
|
|
25000
|
+
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); }; }
|
|
25001
|
+
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); }
|
|
25002
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25003
|
+
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; } }
|
|
25004
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25017
25005
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25018
|
-
_inherits$
|
|
25019
|
-
var _super = _createSuper$
|
|
25006
|
+
_inherits$6(Animate, _PureComponent);
|
|
25007
|
+
var _super = _createSuper$6(Animate);
|
|
25020
25008
|
function Animate(props, context) {
|
|
25021
25009
|
var _this;
|
|
25022
|
-
_classCallCheck$
|
|
25010
|
+
_classCallCheck$8(this, Animate);
|
|
25023
25011
|
_this = _super.call(this, props, context);
|
|
25024
25012
|
var _this$props = _this.props,
|
|
25025
25013
|
isActive = _this$props.isActive,
|
|
@@ -25029,8 +25017,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25029
25017
|
steps = _this$props.steps,
|
|
25030
25018
|
children = _this$props.children,
|
|
25031
25019
|
duration = _this$props.duration;
|
|
25032
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25033
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25020
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
25021
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
25034
25022
|
if (!isActive || duration <= 0) {
|
|
25035
25023
|
_this.state = {
|
|
25036
25024
|
style: {}
|
|
@@ -25042,7 +25030,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25042
25030
|
style: to
|
|
25043
25031
|
};
|
|
25044
25032
|
}
|
|
25045
|
-
return _possibleConstructorReturn$
|
|
25033
|
+
return _possibleConstructorReturn$6(_this);
|
|
25046
25034
|
}
|
|
25047
25035
|
if (steps && steps.length) {
|
|
25048
25036
|
_this.state = {
|
|
@@ -25053,10 +25041,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25053
25041
|
_this.state = {
|
|
25054
25042
|
style: from
|
|
25055
25043
|
};
|
|
25056
|
-
return _possibleConstructorReturn$
|
|
25044
|
+
return _possibleConstructorReturn$6(_this);
|
|
25057
25045
|
}
|
|
25058
25046
|
_this.state = {
|
|
25059
|
-
style: attributeName ? _defineProperty$
|
|
25047
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25060
25048
|
};
|
|
25061
25049
|
} else {
|
|
25062
25050
|
_this.state = {
|
|
@@ -25065,7 +25053,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25065
25053
|
}
|
|
25066
25054
|
return _this;
|
|
25067
25055
|
}
|
|
25068
|
-
_createClass$
|
|
25056
|
+
_createClass$8(Animate, [{
|
|
25069
25057
|
key: "componentDidMount",
|
|
25070
25058
|
value: function componentDidMount() {
|
|
25071
25059
|
var _this$props2 = this.props,
|
|
@@ -25093,7 +25081,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25093
25081
|
}
|
|
25094
25082
|
if (!isActive) {
|
|
25095
25083
|
var newState = {
|
|
25096
|
-
style: attributeName ? _defineProperty$
|
|
25084
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
25097
25085
|
};
|
|
25098
25086
|
if (this.state && style) {
|
|
25099
25087
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25116,14 +25104,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25116
25104
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25117
25105
|
if (this.state && style) {
|
|
25118
25106
|
var _newState = {
|
|
25119
|
-
style: attributeName ? _defineProperty$
|
|
25107
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25120
25108
|
};
|
|
25121
25109
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25122
25110
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25123
25111
|
this.setState(_newState);
|
|
25124
25112
|
}
|
|
25125
25113
|
}
|
|
25126
|
-
this.runAnimation(_objectSpread$
|
|
25114
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
25127
25115
|
from: from,
|
|
25128
25116
|
begin: 0
|
|
25129
25117
|
}));
|
|
@@ -25206,7 +25194,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25206
25194
|
}), duration]);
|
|
25207
25195
|
}
|
|
25208
25196
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25209
|
-
var newStyle = _objectSpread$
|
|
25197
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25210
25198
|
transition: transition
|
|
25211
25199
|
});
|
|
25212
25200
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25238,9 +25226,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25238
25226
|
this.runStepAnimation(props);
|
|
25239
25227
|
return;
|
|
25240
25228
|
}
|
|
25241
|
-
var to = attributeName ? _defineProperty$
|
|
25229
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25242
25230
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25243
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25231
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25244
25232
|
transition: transition
|
|
25245
25233
|
}), duration, onAnimationEnd]);
|
|
25246
25234
|
}
|
|
@@ -25261,7 +25249,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25261
25249
|
_this$props4.onAnimationEnd;
|
|
25262
25250
|
_this$props4.shouldReAnimate;
|
|
25263
25251
|
_this$props4.onAnimationReStart;
|
|
25264
|
-
var others = _objectWithoutProperties$
|
|
25252
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25265
25253
|
var count = Children.count(children);
|
|
25266
25254
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25267
25255
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25276,8 +25264,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25276
25264
|
_container$props$styl = _container$props.style,
|
|
25277
25265
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25278
25266
|
className = _container$props.className;
|
|
25279
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25280
|
-
style: _objectSpread$
|
|
25267
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25268
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25281
25269
|
className: className
|
|
25282
25270
|
}));
|
|
25283
25271
|
return res;
|
|
@@ -25802,10 +25790,10 @@ var defineProperty$2 = (function() {
|
|
|
25802
25790
|
} catch (e) {}
|
|
25803
25791
|
}());
|
|
25804
25792
|
|
|
25805
|
-
var _defineProperty$
|
|
25793
|
+
var _defineProperty$l = defineProperty$2;
|
|
25806
25794
|
|
|
25807
25795
|
var constant$1 = constant_1,
|
|
25808
|
-
defineProperty$1 = _defineProperty$
|
|
25796
|
+
defineProperty$1 = _defineProperty$l,
|
|
25809
25797
|
identity$7 = identity_1;
|
|
25810
25798
|
|
|
25811
25799
|
/**
|
|
@@ -25982,18 +25970,18 @@ var sortBy_1 = sortBy;
|
|
|
25982
25970
|
/**
|
|
25983
25971
|
* @fileOverview Default Tooltip Content
|
|
25984
25972
|
*/
|
|
25985
|
-
function _typeof$
|
|
25986
|
-
function _slicedToArray$
|
|
25987
|
-
function _nonIterableRest$
|
|
25988
|
-
function _unsupportedIterableToArray$
|
|
25989
|
-
function _arrayLikeToArray$
|
|
25990
|
-
function _iterableToArrayLimit$
|
|
25991
|
-
function _arrayWithHoles$
|
|
25992
|
-
function ownKeys$
|
|
25993
|
-
function _objectSpread$
|
|
25994
|
-
function _defineProperty$
|
|
25995
|
-
function _toPropertyKey$
|
|
25996
|
-
function _toPrimitive$
|
|
25973
|
+
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); }
|
|
25974
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25975
|
+
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."); }
|
|
25976
|
+
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); }
|
|
25977
|
+
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; }
|
|
25978
|
+
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; } }
|
|
25979
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25980
|
+
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; }
|
|
25981
|
+
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; }
|
|
25982
|
+
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; }
|
|
25983
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25984
|
+
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); }
|
|
25997
25985
|
function defaultFormatter(value) {
|
|
25998
25986
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25999
25987
|
}
|
|
@@ -26023,7 +26011,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26023
26011
|
if (entry.type === 'none') {
|
|
26024
26012
|
return null;
|
|
26025
26013
|
}
|
|
26026
|
-
var finalItemStyle = _objectSpread$
|
|
26014
|
+
var finalItemStyle = _objectSpread$j({
|
|
26027
26015
|
display: 'block',
|
|
26028
26016
|
paddingTop: 4,
|
|
26029
26017
|
paddingBottom: 4,
|
|
@@ -26037,7 +26025,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26037
26025
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26038
26026
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26039
26027
|
if (Array.isArray(formatted)) {
|
|
26040
|
-
var _formatted = _slicedToArray$
|
|
26028
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
26041
26029
|
finalValue = _formatted[0];
|
|
26042
26030
|
finalName = _formatted[1];
|
|
26043
26031
|
} else {
|
|
@@ -26069,14 +26057,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26069
26057
|
}
|
|
26070
26058
|
return null;
|
|
26071
26059
|
};
|
|
26072
|
-
var finalStyle = _objectSpread$
|
|
26060
|
+
var finalStyle = _objectSpread$j({
|
|
26073
26061
|
margin: 0,
|
|
26074
26062
|
padding: 10,
|
|
26075
26063
|
backgroundColor: '#fff',
|
|
26076
26064
|
border: '1px solid #ccc',
|
|
26077
26065
|
whiteSpace: 'nowrap'
|
|
26078
26066
|
}, contentStyle);
|
|
26079
|
-
var finalLabelStyle = _objectSpread$
|
|
26067
|
+
var finalLabelStyle = _objectSpread$j({
|
|
26080
26068
|
margin: 0
|
|
26081
26069
|
}, labelStyle);
|
|
26082
26070
|
var hasLabel = !isNil_1(label);
|
|
@@ -26117,22 +26105,18 @@ var Global = {
|
|
|
26117
26105
|
}
|
|
26118
26106
|
};
|
|
26119
26107
|
|
|
26120
|
-
function _typeof$
|
|
26121
|
-
function ownKeys$
|
|
26122
|
-
function _objectSpread$
|
|
26123
|
-
function
|
|
26124
|
-
function
|
|
26125
|
-
function
|
|
26126
|
-
function
|
|
26127
|
-
function
|
|
26128
|
-
function
|
|
26129
|
-
function
|
|
26130
|
-
function
|
|
26131
|
-
function
|
|
26132
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26133
|
-
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; }
|
|
26134
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26135
|
-
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); }
|
|
26108
|
+
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); }
|
|
26109
|
+
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; }
|
|
26110
|
+
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; }
|
|
26111
|
+
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; }
|
|
26112
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
26113
|
+
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); }
|
|
26114
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26115
|
+
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."); }
|
|
26116
|
+
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); }
|
|
26117
|
+
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; }
|
|
26118
|
+
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; } }
|
|
26119
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26136
26120
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26137
26121
|
var EPS$1 = 1;
|
|
26138
26122
|
function defaultUniqBy(entry) {
|
|
@@ -26156,204 +26140,7 @@ function renderContent(content, props) {
|
|
|
26156
26140
|
}
|
|
26157
26141
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26158
26142
|
}
|
|
26159
|
-
var
|
|
26160
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26161
|
-
var _super = _createSuper$6(Tooltip);
|
|
26162
|
-
function Tooltip() {
|
|
26163
|
-
var _this;
|
|
26164
|
-
_classCallCheck$8(this, Tooltip);
|
|
26165
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26166
|
-
args[_key] = arguments[_key];
|
|
26167
|
-
}
|
|
26168
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26169
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26170
|
-
boxWidth: -1,
|
|
26171
|
-
boxHeight: -1,
|
|
26172
|
-
dismissed: false,
|
|
26173
|
-
dismissedAtCoordinate: {
|
|
26174
|
-
x: 0,
|
|
26175
|
-
y: 0
|
|
26176
|
-
}
|
|
26177
|
-
});
|
|
26178
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26179
|
-
if (event.key === 'Escape') {
|
|
26180
|
-
_this.setState({
|
|
26181
|
-
dismissed: true,
|
|
26182
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26183
|
-
x: _this.props.coordinate.x,
|
|
26184
|
-
y: _this.props.coordinate.y
|
|
26185
|
-
})
|
|
26186
|
-
});
|
|
26187
|
-
}
|
|
26188
|
-
});
|
|
26189
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26190
|
-
var key = _ref.key,
|
|
26191
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26192
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26193
|
-
var _this$props = _this.props,
|
|
26194
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26195
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26196
|
-
coordinate = _this$props.coordinate,
|
|
26197
|
-
offset = _this$props.offset,
|
|
26198
|
-
position = _this$props.position,
|
|
26199
|
-
viewBox = _this$props.viewBox;
|
|
26200
|
-
if (position && isNumber(position[key])) {
|
|
26201
|
-
return position[key];
|
|
26202
|
-
}
|
|
26203
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26204
|
-
var positive = coordinate[key] + offset;
|
|
26205
|
-
if (allowEscapeViewBox[key]) {
|
|
26206
|
-
return reverseDirection[key] ? negative : positive;
|
|
26207
|
-
}
|
|
26208
|
-
if (reverseDirection[key]) {
|
|
26209
|
-
var _tooltipBoundary = negative;
|
|
26210
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26211
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26212
|
-
return Math.max(positive, viewBox[key]);
|
|
26213
|
-
}
|
|
26214
|
-
return Math.max(negative, viewBox[key]);
|
|
26215
|
-
}
|
|
26216
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26217
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26218
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26219
|
-
return Math.max(negative, viewBox[key]);
|
|
26220
|
-
}
|
|
26221
|
-
return Math.max(positive, viewBox[key]);
|
|
26222
|
-
});
|
|
26223
|
-
return _this;
|
|
26224
|
-
}
|
|
26225
|
-
_createClass$8(Tooltip, [{
|
|
26226
|
-
key: "componentDidMount",
|
|
26227
|
-
value: function componentDidMount() {
|
|
26228
|
-
this.updateBBox();
|
|
26229
|
-
}
|
|
26230
|
-
}, {
|
|
26231
|
-
key: "componentWillUnmount",
|
|
26232
|
-
value: function componentWillUnmount() {
|
|
26233
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26234
|
-
}
|
|
26235
|
-
}, {
|
|
26236
|
-
key: "componentDidUpdate",
|
|
26237
|
-
value: function componentDidUpdate() {
|
|
26238
|
-
this.updateBBox();
|
|
26239
|
-
}
|
|
26240
|
-
}, {
|
|
26241
|
-
key: "updateBBox",
|
|
26242
|
-
value: function updateBBox() {
|
|
26243
|
-
var _this$state = this.state,
|
|
26244
|
-
boxWidth = _this$state.boxWidth,
|
|
26245
|
-
boxHeight = _this$state.boxHeight,
|
|
26246
|
-
dismissed = _this$state.dismissed;
|
|
26247
|
-
if (dismissed) {
|
|
26248
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26249
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26250
|
-
this.setState({
|
|
26251
|
-
dismissed: false
|
|
26252
|
-
});
|
|
26253
|
-
}
|
|
26254
|
-
} else {
|
|
26255
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26256
|
-
}
|
|
26257
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26258
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26259
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26260
|
-
this.setState({
|
|
26261
|
-
boxWidth: box.width,
|
|
26262
|
-
boxHeight: box.height
|
|
26263
|
-
});
|
|
26264
|
-
}
|
|
26265
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26266
|
-
this.setState({
|
|
26267
|
-
boxWidth: -1,
|
|
26268
|
-
boxHeight: -1
|
|
26269
|
-
});
|
|
26270
|
-
}
|
|
26271
|
-
}
|
|
26272
|
-
}, {
|
|
26273
|
-
key: "render",
|
|
26274
|
-
value: function render() {
|
|
26275
|
-
var _classNames,
|
|
26276
|
-
_this2 = this;
|
|
26277
|
-
var _this$props2 = this.props,
|
|
26278
|
-
payload = _this$props2.payload,
|
|
26279
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26280
|
-
animationDuration = _this$props2.animationDuration,
|
|
26281
|
-
animationEasing = _this$props2.animationEasing,
|
|
26282
|
-
filterNull = _this$props2.filterNull,
|
|
26283
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26284
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26285
|
-
return !isNil_1(entry.value);
|
|
26286
|
-
}) : payload);
|
|
26287
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26288
|
-
var _this$props3 = this.props,
|
|
26289
|
-
content = _this$props3.content,
|
|
26290
|
-
viewBox = _this$props3.viewBox,
|
|
26291
|
-
coordinate = _this$props3.coordinate,
|
|
26292
|
-
position = _this$props3.position,
|
|
26293
|
-
active = _this$props3.active,
|
|
26294
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26295
|
-
var outerStyle = _objectSpread$l({
|
|
26296
|
-
pointerEvents: 'none',
|
|
26297
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26298
|
-
position: 'absolute',
|
|
26299
|
-
top: 0,
|
|
26300
|
-
left: 0
|
|
26301
|
-
}, wrapperStyle);
|
|
26302
|
-
var translateX, translateY;
|
|
26303
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26304
|
-
translateX = position.x;
|
|
26305
|
-
translateY = position.y;
|
|
26306
|
-
} else {
|
|
26307
|
-
var _this$state2 = this.state,
|
|
26308
|
-
boxWidth = _this$state2.boxWidth,
|
|
26309
|
-
boxHeight = _this$state2.boxHeight;
|
|
26310
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26311
|
-
translateX = this.getTranslate({
|
|
26312
|
-
key: 'x',
|
|
26313
|
-
tooltipDimension: boxWidth,
|
|
26314
|
-
viewBoxDimension: viewBox.width
|
|
26315
|
-
});
|
|
26316
|
-
translateY = this.getTranslate({
|
|
26317
|
-
key: 'y',
|
|
26318
|
-
tooltipDimension: boxHeight,
|
|
26319
|
-
viewBoxDimension: viewBox.height
|
|
26320
|
-
});
|
|
26321
|
-
} else {
|
|
26322
|
-
outerStyle.visibility = 'hidden';
|
|
26323
|
-
}
|
|
26324
|
-
}
|
|
26325
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26326
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26327
|
-
})), outerStyle);
|
|
26328
|
-
if (isAnimationActive && active) {
|
|
26329
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26330
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26331
|
-
})), outerStyle);
|
|
26332
|
-
}
|
|
26333
|
-
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));
|
|
26334
|
-
return (
|
|
26335
|
-
/*#__PURE__*/
|
|
26336
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26337
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26338
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26339
|
-
React__default.createElement("div", {
|
|
26340
|
-
tabIndex: -1,
|
|
26341
|
-
role: "dialog",
|
|
26342
|
-
className: cls,
|
|
26343
|
-
style: outerStyle,
|
|
26344
|
-
ref: function ref(node) {
|
|
26345
|
-
_this2.wrapperNode = node;
|
|
26346
|
-
}
|
|
26347
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26348
|
-
payload: finalPayload
|
|
26349
|
-
})))
|
|
26350
|
-
);
|
|
26351
|
-
}
|
|
26352
|
-
}]);
|
|
26353
|
-
return Tooltip;
|
|
26354
|
-
}(PureComponent);
|
|
26355
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26356
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26143
|
+
var tooltipDefaultProps = {
|
|
26357
26144
|
active: false,
|
|
26358
26145
|
allowEscapeViewBox: {
|
|
26359
26146
|
x: false,
|
|
@@ -26374,6 +26161,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26374
26161
|
x: 0,
|
|
26375
26162
|
y: 0
|
|
26376
26163
|
},
|
|
26164
|
+
// this doesn't exist on TooltipProps
|
|
26165
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26166
|
+
// @ts-ignore
|
|
26377
26167
|
cursorStyle: {},
|
|
26378
26168
|
separator: ' : ',
|
|
26379
26169
|
wrapperStyle: {},
|
|
@@ -26387,7 +26177,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26387
26177
|
animationDuration: 400,
|
|
26388
26178
|
filterNull: true,
|
|
26389
26179
|
useTranslate3d: false
|
|
26390
|
-
}
|
|
26180
|
+
};
|
|
26181
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26182
|
+
var _classNames;
|
|
26183
|
+
var _useState = useState(-1),
|
|
26184
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26185
|
+
boxWidth = _useState2[0],
|
|
26186
|
+
setBoxWidth = _useState2[1];
|
|
26187
|
+
var _useState3 = useState(-1),
|
|
26188
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26189
|
+
boxHeight = _useState4[0],
|
|
26190
|
+
setBoxHeight = _useState4[1];
|
|
26191
|
+
var _useState5 = useState(false),
|
|
26192
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26193
|
+
dismissed = _useState6[0],
|
|
26194
|
+
setDismissed = _useState6[1];
|
|
26195
|
+
var _useState7 = useState({
|
|
26196
|
+
x: 0,
|
|
26197
|
+
y: 0
|
|
26198
|
+
}),
|
|
26199
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26200
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26201
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26202
|
+
var wrapperNode = useRef();
|
|
26203
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26204
|
+
reverseDirection = props.reverseDirection,
|
|
26205
|
+
coordinate = props.coordinate,
|
|
26206
|
+
offset = props.offset,
|
|
26207
|
+
position = props.position,
|
|
26208
|
+
viewBox = props.viewBox;
|
|
26209
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26210
|
+
if (event.key === 'Escape') {
|
|
26211
|
+
setDismissed(true);
|
|
26212
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26213
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26214
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26215
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26216
|
+
});
|
|
26217
|
+
});
|
|
26218
|
+
}
|
|
26219
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26220
|
+
useEffect(function () {
|
|
26221
|
+
var updateBBox = function updateBBox() {
|
|
26222
|
+
if (dismissed) {
|
|
26223
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26224
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26225
|
+
setDismissed(false);
|
|
26226
|
+
}
|
|
26227
|
+
} else {
|
|
26228
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26229
|
+
}
|
|
26230
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26231
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26232
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26233
|
+
setBoxWidth(box.width);
|
|
26234
|
+
setBoxHeight(box.height);
|
|
26235
|
+
}
|
|
26236
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26237
|
+
setBoxWidth(-1);
|
|
26238
|
+
setBoxHeight(-1);
|
|
26239
|
+
}
|
|
26240
|
+
};
|
|
26241
|
+
updateBBox();
|
|
26242
|
+
return function () {
|
|
26243
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26244
|
+
};
|
|
26245
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26246
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26247
|
+
var key = _ref.key,
|
|
26248
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26249
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26250
|
+
if (position && isNumber(position[key])) {
|
|
26251
|
+
return position[key];
|
|
26252
|
+
}
|
|
26253
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26254
|
+
var positive = coordinate[key] + offset;
|
|
26255
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26256
|
+
return reverseDirection[key] ? negative : positive;
|
|
26257
|
+
}
|
|
26258
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26259
|
+
var _tooltipBoundary = negative;
|
|
26260
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26261
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26262
|
+
return Math.max(positive, viewBox[key]);
|
|
26263
|
+
}
|
|
26264
|
+
return Math.max(negative, viewBox[key]);
|
|
26265
|
+
}
|
|
26266
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26267
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26268
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26269
|
+
return Math.max(negative, viewBox[key]);
|
|
26270
|
+
}
|
|
26271
|
+
return Math.max(positive, viewBox[key]);
|
|
26272
|
+
};
|
|
26273
|
+
var payload = props.payload,
|
|
26274
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26275
|
+
filterNull = props.filterNull,
|
|
26276
|
+
active = props.active,
|
|
26277
|
+
wrapperStyle = props.wrapperStyle,
|
|
26278
|
+
useTranslate3d = props.useTranslate3d,
|
|
26279
|
+
isAnimationActive = props.isAnimationActive,
|
|
26280
|
+
animationDuration = props.animationDuration,
|
|
26281
|
+
animationEasing = props.animationEasing;
|
|
26282
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26283
|
+
return !isNil_1(entry.value);
|
|
26284
|
+
}) : payload);
|
|
26285
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26286
|
+
var content = props.content;
|
|
26287
|
+
var outerStyle = _objectSpread$i({
|
|
26288
|
+
pointerEvents: 'none',
|
|
26289
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26290
|
+
position: 'absolute',
|
|
26291
|
+
top: 0,
|
|
26292
|
+
left: 0
|
|
26293
|
+
}, wrapperStyle);
|
|
26294
|
+
var translateX, translateY;
|
|
26295
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26296
|
+
translateX = position.x;
|
|
26297
|
+
translateY = position.y;
|
|
26298
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26299
|
+
translateX = getTranslate({
|
|
26300
|
+
key: 'x',
|
|
26301
|
+
tooltipDimension: boxWidth,
|
|
26302
|
+
viewBoxDimension: viewBox.width
|
|
26303
|
+
});
|
|
26304
|
+
translateY = getTranslate({
|
|
26305
|
+
key: 'y',
|
|
26306
|
+
tooltipDimension: boxHeight,
|
|
26307
|
+
viewBoxDimension: viewBox.height
|
|
26308
|
+
});
|
|
26309
|
+
} else {
|
|
26310
|
+
outerStyle.visibility = 'hidden';
|
|
26311
|
+
}
|
|
26312
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26313
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26314
|
+
})), outerStyle);
|
|
26315
|
+
if (isAnimationActive && active) {
|
|
26316
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26317
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26318
|
+
})), outerStyle);
|
|
26319
|
+
}
|
|
26320
|
+
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));
|
|
26321
|
+
return (
|
|
26322
|
+
/*#__PURE__*/
|
|
26323
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26324
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26325
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26326
|
+
React__default.createElement("div", {
|
|
26327
|
+
tabIndex: -1,
|
|
26328
|
+
role: "dialog",
|
|
26329
|
+
className: cls,
|
|
26330
|
+
style: outerStyle,
|
|
26331
|
+
ref: wrapperNode
|
|
26332
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26333
|
+
payload: finalPayload
|
|
26334
|
+
})))
|
|
26335
|
+
);
|
|
26336
|
+
};
|
|
26337
|
+
|
|
26338
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26339
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26340
|
+
|
|
26341
|
+
/**
|
|
26342
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26343
|
+
* children.props when there are no props set by the consumer
|
|
26344
|
+
* doesn't work if using default parameters
|
|
26345
|
+
*/
|
|
26346
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26391
26347
|
|
|
26392
26348
|
var root = _root;
|
|
26393
26349
|
|
|
@@ -31957,12 +31913,12 @@ module.exports = exports['default'];
|
|
|
31957
31913
|
|
|
31958
31914
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31959
31915
|
|
|
31960
|
-
function _typeof$
|
|
31961
|
-
function ownKeys$
|
|
31962
|
-
function _objectSpread$
|
|
31963
|
-
function _defineProperty$
|
|
31964
|
-
function _toPropertyKey$
|
|
31965
|
-
function _toPrimitive$
|
|
31916
|
+
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); }
|
|
31917
|
+
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; }
|
|
31918
|
+
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; }
|
|
31919
|
+
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; }
|
|
31920
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31921
|
+
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); }
|
|
31966
31922
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31967
31923
|
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."); }
|
|
31968
31924
|
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); }
|
|
@@ -32030,7 +31986,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
32030
31986
|
}
|
|
32031
31987
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
32032
31988
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
32033
|
-
var measurementSpanStyle = _objectSpread$
|
|
31989
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
32034
31990
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
32035
31991
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
32036
31992
|
return styleKey;
|
|
@@ -32085,11 +32041,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32085
32041
|
};
|
|
32086
32042
|
};
|
|
32087
32043
|
|
|
32088
|
-
var _excluded$
|
|
32089
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32044
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
32090
32045
|
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); }
|
|
32091
|
-
function _objectWithoutProperties$
|
|
32092
|
-
function _objectWithoutPropertiesLoose$
|
|
32046
|
+
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; }
|
|
32047
|
+
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; }
|
|
32093
32048
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32094
32049
|
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."); }
|
|
32095
32050
|
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); }
|
|
@@ -32243,46 +32198,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32243
32198
|
}
|
|
32244
32199
|
return getWordsWithoutCalculate(children);
|
|
32245
32200
|
};
|
|
32246
|
-
var
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32256
|
-
|
|
32257
|
-
|
|
32258
|
-
|
|
32259
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32260
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32261
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32262
|
-
_ref5$fill = _ref5.fill,
|
|
32263
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32264
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32201
|
+
var textDefaultProps = {
|
|
32202
|
+
x: 0,
|
|
32203
|
+
y: 0,
|
|
32204
|
+
lineHeight: '1em',
|
|
32205
|
+
capHeight: '0.71em',
|
|
32206
|
+
// Magic number from d3
|
|
32207
|
+
scaleToFit: false,
|
|
32208
|
+
textAnchor: 'start',
|
|
32209
|
+
verticalAnchor: 'end',
|
|
32210
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32211
|
+
fill: '#808080'
|
|
32212
|
+
};
|
|
32213
|
+
var Text = function Text(props) {
|
|
32265
32214
|
var wordsByLines = useMemo(function () {
|
|
32266
32215
|
return getWordsByLines({
|
|
32267
32216
|
breakAll: props.breakAll,
|
|
32268
32217
|
children: props.children,
|
|
32269
32218
|
maxLines: props.maxLines,
|
|
32270
|
-
scaleToFit: scaleToFit,
|
|
32219
|
+
scaleToFit: props.scaleToFit,
|
|
32271
32220
|
style: props.style,
|
|
32272
32221
|
width: props.width
|
|
32273
32222
|
});
|
|
32274
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32223
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32275
32224
|
var dx = props.dx,
|
|
32276
32225
|
dy = props.dy,
|
|
32226
|
+
textAnchor = props.textAnchor,
|
|
32227
|
+
verticalAnchor = props.verticalAnchor,
|
|
32228
|
+
scaleToFit = props.scaleToFit,
|
|
32277
32229
|
angle = props.angle,
|
|
32230
|
+
lineHeight = props.lineHeight,
|
|
32231
|
+
capHeight = props.capHeight,
|
|
32278
32232
|
className = props.className,
|
|
32279
32233
|
breakAll = props.breakAll,
|
|
32280
|
-
textProps = _objectWithoutProperties$
|
|
32281
|
-
if (!isNumOrStr(
|
|
32234
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32235
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32282
32236
|
return null;
|
|
32283
32237
|
}
|
|
32284
|
-
var x =
|
|
32285
|
-
var y =
|
|
32238
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32239
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32286
32240
|
var startDy;
|
|
32287
32241
|
switch (verticalAnchor) {
|
|
32288
32242
|
case 'start':
|
|
@@ -32312,7 +32266,7 @@ var Text = function Text(_ref5) {
|
|
|
32312
32266
|
y: y,
|
|
32313
32267
|
className: classNames('recharts-text', className),
|
|
32314
32268
|
textAnchor: textAnchor,
|
|
32315
|
-
fill: fill.includes('url') ?
|
|
32269
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32316
32270
|
}), wordsByLines.map(function (line, index) {
|
|
32317
32271
|
return (
|
|
32318
32272
|
/*#__PURE__*/
|
|
@@ -32325,6 +32279,7 @@ var Text = function Text(_ref5) {
|
|
|
32325
32279
|
);
|
|
32326
32280
|
}));
|
|
32327
32281
|
};
|
|
32282
|
+
Text.defaultProps = textDefaultProps;
|
|
32328
32283
|
|
|
32329
32284
|
var baseIsEqual = _baseIsEqual;
|
|
32330
32285
|
|
|
@@ -38592,7 +38547,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38592
38547
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38593
38548
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38594
38549
|
|
|
38595
|
-
var _excluded$
|
|
38550
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38596
38551
|
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); }
|
|
38597
38552
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38598
38553
|
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."); }
|
|
@@ -38600,8 +38555,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38600
38555
|
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; }
|
|
38601
38556
|
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; } }
|
|
38602
38557
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38603
|
-
function _objectWithoutProperties$
|
|
38604
|
-
function _objectWithoutPropertiesLoose$
|
|
38558
|
+
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; }
|
|
38559
|
+
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; }
|
|
38605
38560
|
function ErrorBar(props) {
|
|
38606
38561
|
var offset = props.offset,
|
|
38607
38562
|
layout = props.layout,
|
|
@@ -38611,7 +38566,7 @@ function ErrorBar(props) {
|
|
|
38611
38566
|
dataPointFormatter = props.dataPointFormatter,
|
|
38612
38567
|
xAxis = props.xAxis,
|
|
38613
38568
|
yAxis = props.yAxis,
|
|
38614
|
-
others = _objectWithoutProperties$
|
|
38569
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38615
38570
|
var svgProps = filterProps(others);
|
|
38616
38571
|
var errorBars = data.map(function (entry, i) {
|
|
38617
38572
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38722,18 +38677,18 @@ ErrorBar.defaultProps = {
|
|
|
38722
38677
|
};
|
|
38723
38678
|
ErrorBar.displayName = 'ErrorBar';
|
|
38724
38679
|
|
|
38725
|
-
function _typeof$
|
|
38680
|
+
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); }
|
|
38726
38681
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38727
38682
|
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."); }
|
|
38728
38683
|
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); }
|
|
38729
38684
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38730
38685
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38731
38686
|
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; }
|
|
38732
|
-
function ownKeys$
|
|
38733
|
-
function _objectSpread$
|
|
38734
|
-
function _defineProperty$
|
|
38735
|
-
function _toPropertyKey$
|
|
38736
|
-
function _toPrimitive$
|
|
38687
|
+
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; }
|
|
38688
|
+
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; }
|
|
38689
|
+
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; }
|
|
38690
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38691
|
+
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); }
|
|
38737
38692
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38738
38693
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38739
38694
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38904,7 +38859,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38904
38859
|
};
|
|
38905
38860
|
});
|
|
38906
38861
|
}
|
|
38907
|
-
return _objectSpread$
|
|
38862
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38908
38863
|
payload: legendData,
|
|
38909
38864
|
item: legendItem
|
|
38910
38865
|
});
|
|
@@ -39058,10 +39013,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39058
39013
|
verticalAlign = legendProps.verticalAlign,
|
|
39059
39014
|
layout = legendProps.layout;
|
|
39060
39015
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39061
|
-
newOffset = _objectSpread$
|
|
39016
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
39062
39017
|
}
|
|
39063
39018
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39064
|
-
newOffset = _objectSpread$
|
|
39019
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39065
39020
|
}
|
|
39066
39021
|
}
|
|
39067
39022
|
return newOffset;
|
|
@@ -39487,14 +39442,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39487
39442
|
items: [item]
|
|
39488
39443
|
};
|
|
39489
39444
|
}
|
|
39490
|
-
return _objectSpread$
|
|
39445
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39491
39446
|
}, {});
|
|
39492
39447
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39493
39448
|
var group = stackGroups[axisId];
|
|
39494
39449
|
if (group.hasStack) {
|
|
39495
39450
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39496
39451
|
var g = group.stackGroups[stackId];
|
|
39497
|
-
return _objectSpread$
|
|
39452
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39498
39453
|
numericAxisId: numericAxisId,
|
|
39499
39454
|
cateAxisId: cateAxisId,
|
|
39500
39455
|
items: g.items,
|
|
@@ -39502,7 +39457,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39502
39457
|
}));
|
|
39503
39458
|
}, {});
|
|
39504
39459
|
}
|
|
39505
|
-
return _objectSpread$
|
|
39460
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39506
39461
|
}, {});
|
|
39507
39462
|
};
|
|
39508
39463
|
|
|
@@ -39716,7 +39671,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39716
39671
|
formatter = _graphicalItem$props.formatter,
|
|
39717
39672
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39718
39673
|
chartType = _graphicalItem$props.chartType;
|
|
39719
|
-
return _objectSpread$
|
|
39674
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39720
39675
|
dataKey: dataKey,
|
|
39721
39676
|
unit: unit,
|
|
39722
39677
|
formatter: formatter,
|
|
@@ -39729,12 +39684,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39729
39684
|
});
|
|
39730
39685
|
};
|
|
39731
39686
|
|
|
39732
|
-
function _typeof$
|
|
39733
|
-
function ownKeys$
|
|
39734
|
-
function _objectSpread$
|
|
39735
|
-
function _defineProperty$
|
|
39736
|
-
function _toPropertyKey$
|
|
39737
|
-
function _toPrimitive$
|
|
39687
|
+
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); }
|
|
39688
|
+
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; }
|
|
39689
|
+
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; }
|
|
39690
|
+
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; }
|
|
39691
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39692
|
+
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); }
|
|
39738
39693
|
var RADIAN = Math.PI / 180;
|
|
39739
39694
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39740
39695
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39839,7 +39794,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39839
39794
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39840
39795
|
}
|
|
39841
39796
|
if (inRange) {
|
|
39842
|
-
return _objectSpread$
|
|
39797
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39843
39798
|
radius: radius,
|
|
39844
39799
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39845
39800
|
});
|
|
@@ -39847,21 +39802,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39847
39802
|
return null;
|
|
39848
39803
|
};
|
|
39849
39804
|
|
|
39850
|
-
function _typeof$
|
|
39851
|
-
var _excluded$7 = ["offset"];
|
|
39805
|
+
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); }
|
|
39852
39806
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39853
39807
|
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."); }
|
|
39854
39808
|
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); }
|
|
39855
39809
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39856
39810
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39857
39811
|
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; }
|
|
39858
|
-
function
|
|
39859
|
-
function
|
|
39860
|
-
function
|
|
39861
|
-
function
|
|
39862
|
-
function
|
|
39863
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39864
|
-
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); }
|
|
39812
|
+
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; }
|
|
39813
|
+
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; }
|
|
39814
|
+
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; }
|
|
39815
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39816
|
+
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); }
|
|
39865
39817
|
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); }
|
|
39866
39818
|
var getLabel = function getLabel(props) {
|
|
39867
39819
|
var value = props.value,
|
|
@@ -40006,7 +39958,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40006
39958
|
textAnchor: 'middle',
|
|
40007
39959
|
verticalAnchor: verticalEnd
|
|
40008
39960
|
};
|
|
40009
|
-
return _objectSpread$
|
|
39961
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
40010
39962
|
height: Math.max(y - parentViewBox.y, 0),
|
|
40011
39963
|
width: width
|
|
40012
39964
|
} : {});
|
|
@@ -40018,7 +39970,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40018
39970
|
textAnchor: 'middle',
|
|
40019
39971
|
verticalAnchor: verticalStart
|
|
40020
39972
|
};
|
|
40021
|
-
return _objectSpread$
|
|
39973
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
40022
39974
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
40023
39975
|
width: width
|
|
40024
39976
|
} : {});
|
|
@@ -40030,7 +39982,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40030
39982
|
textAnchor: horizontalEnd,
|
|
40031
39983
|
verticalAnchor: 'middle'
|
|
40032
39984
|
};
|
|
40033
|
-
return _objectSpread$
|
|
39985
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
40034
39986
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
40035
39987
|
height: height
|
|
40036
39988
|
} : {});
|
|
@@ -40042,7 +39994,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40042
39994
|
textAnchor: horizontalStart,
|
|
40043
39995
|
verticalAnchor: 'middle'
|
|
40044
39996
|
};
|
|
40045
|
-
return _objectSpread$
|
|
39997
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
40046
39998
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
40047
39999
|
height: height
|
|
40048
40000
|
} : {});
|
|
@@ -40052,7 +40004,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40052
40004
|
height: height
|
|
40053
40005
|
} : {};
|
|
40054
40006
|
if (position === 'insideLeft') {
|
|
40055
|
-
return _objectSpread$
|
|
40007
|
+
return _objectSpread$e({
|
|
40056
40008
|
x: x + horizontalOffset,
|
|
40057
40009
|
y: y + height / 2,
|
|
40058
40010
|
textAnchor: horizontalStart,
|
|
@@ -40060,7 +40012,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40060
40012
|
}, sizeAttrs);
|
|
40061
40013
|
}
|
|
40062
40014
|
if (position === 'insideRight') {
|
|
40063
|
-
return _objectSpread$
|
|
40015
|
+
return _objectSpread$e({
|
|
40064
40016
|
x: x + width - horizontalOffset,
|
|
40065
40017
|
y: y + height / 2,
|
|
40066
40018
|
textAnchor: horizontalEnd,
|
|
@@ -40068,7 +40020,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40068
40020
|
}, sizeAttrs);
|
|
40069
40021
|
}
|
|
40070
40022
|
if (position === 'insideTop') {
|
|
40071
|
-
return _objectSpread$
|
|
40023
|
+
return _objectSpread$e({
|
|
40072
40024
|
x: x + width / 2,
|
|
40073
40025
|
y: y + verticalOffset,
|
|
40074
40026
|
textAnchor: 'middle',
|
|
@@ -40076,7 +40028,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40076
40028
|
}, sizeAttrs);
|
|
40077
40029
|
}
|
|
40078
40030
|
if (position === 'insideBottom') {
|
|
40079
|
-
return _objectSpread$
|
|
40031
|
+
return _objectSpread$e({
|
|
40080
40032
|
x: x + width / 2,
|
|
40081
40033
|
y: y + height - verticalOffset,
|
|
40082
40034
|
textAnchor: 'middle',
|
|
@@ -40084,7 +40036,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40084
40036
|
}, sizeAttrs);
|
|
40085
40037
|
}
|
|
40086
40038
|
if (position === 'insideTopLeft') {
|
|
40087
|
-
return _objectSpread$
|
|
40039
|
+
return _objectSpread$e({
|
|
40088
40040
|
x: x + horizontalOffset,
|
|
40089
40041
|
y: y + verticalOffset,
|
|
40090
40042
|
textAnchor: horizontalStart,
|
|
@@ -40092,7 +40044,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40092
40044
|
}, sizeAttrs);
|
|
40093
40045
|
}
|
|
40094
40046
|
if (position === 'insideTopRight') {
|
|
40095
|
-
return _objectSpread$
|
|
40047
|
+
return _objectSpread$e({
|
|
40096
40048
|
x: x + width - horizontalOffset,
|
|
40097
40049
|
y: y + verticalOffset,
|
|
40098
40050
|
textAnchor: horizontalEnd,
|
|
@@ -40100,7 +40052,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40100
40052
|
}, sizeAttrs);
|
|
40101
40053
|
}
|
|
40102
40054
|
if (position === 'insideBottomLeft') {
|
|
40103
|
-
return _objectSpread$
|
|
40055
|
+
return _objectSpread$e({
|
|
40104
40056
|
x: x + horizontalOffset,
|
|
40105
40057
|
y: y + height - verticalOffset,
|
|
40106
40058
|
textAnchor: horizontalStart,
|
|
@@ -40108,7 +40060,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40108
40060
|
}, sizeAttrs);
|
|
40109
40061
|
}
|
|
40110
40062
|
if (position === 'insideBottomRight') {
|
|
40111
|
-
return _objectSpread$
|
|
40063
|
+
return _objectSpread$e({
|
|
40112
40064
|
x: x + width - horizontalOffset,
|
|
40113
40065
|
y: y + height - verticalOffset,
|
|
40114
40066
|
textAnchor: horizontalEnd,
|
|
@@ -40116,14 +40068,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40116
40068
|
}, sizeAttrs);
|
|
40117
40069
|
}
|
|
40118
40070
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40119
|
-
return _objectSpread$
|
|
40071
|
+
return _objectSpread$e({
|
|
40120
40072
|
x: x + getPercentValue(position.x, width),
|
|
40121
40073
|
y: y + getPercentValue(position.y, height),
|
|
40122
40074
|
textAnchor: 'end',
|
|
40123
40075
|
verticalAnchor: 'end'
|
|
40124
40076
|
}, sizeAttrs);
|
|
40125
40077
|
}
|
|
40126
|
-
return _objectSpread$
|
|
40078
|
+
return _objectSpread$e({
|
|
40127
40079
|
x: x + width / 2,
|
|
40128
40080
|
y: y + height / 2,
|
|
40129
40081
|
textAnchor: 'middle',
|
|
@@ -40133,13 +40085,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40133
40085
|
var isPolar = function isPolar(viewBox) {
|
|
40134
40086
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40135
40087
|
};
|
|
40136
|
-
function Label$3(
|
|
40137
|
-
var _ref4$offset = _ref4.offset,
|
|
40138
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40139
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40140
|
-
var props = _objectSpread$h({
|
|
40141
|
-
offset: offset
|
|
40142
|
-
}, restProps);
|
|
40088
|
+
function Label$3(props) {
|
|
40143
40089
|
var viewBox = props.viewBox,
|
|
40144
40090
|
position = props.position,
|
|
40145
40091
|
value = props.value,
|
|
@@ -40176,6 +40122,9 @@ function Label$3(_ref4) {
|
|
|
40176
40122
|
}), label);
|
|
40177
40123
|
}
|
|
40178
40124
|
Label$3.displayName = 'Label';
|
|
40125
|
+
Label$3.defaultProps = {
|
|
40126
|
+
offset: 5
|
|
40127
|
+
};
|
|
40179
40128
|
var parseViewBox = function parseViewBox(props) {
|
|
40180
40129
|
var cx = props.cx,
|
|
40181
40130
|
cy = props.cy,
|
|
@@ -40330,9 +40279,8 @@ function last(array) {
|
|
|
40330
40279
|
|
|
40331
40280
|
var last_1 = last;
|
|
40332
40281
|
|
|
40333
|
-
function _typeof$
|
|
40334
|
-
var _excluded$
|
|
40335
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40282
|
+
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); }
|
|
40283
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40336
40284
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40337
40285
|
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."); }
|
|
40338
40286
|
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); }
|
|
@@ -40340,26 +40288,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40340
40288
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40341
40289
|
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; }
|
|
40342
40290
|
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); }
|
|
40343
|
-
function ownKeys$
|
|
40344
|
-
function _objectSpread$
|
|
40345
|
-
function _defineProperty$
|
|
40346
|
-
function _toPropertyKey$
|
|
40347
|
-
function _toPrimitive$
|
|
40348
|
-
function _objectWithoutProperties$
|
|
40349
|
-
function _objectWithoutPropertiesLoose$
|
|
40350
|
-
var
|
|
40351
|
-
|
|
40352
|
-
|
|
40353
|
-
|
|
40354
|
-
|
|
40355
|
-
|
|
40356
|
-
|
|
40357
|
-
|
|
40358
|
-
dataKey =
|
|
40359
|
-
clockWise =
|
|
40360
|
-
id =
|
|
40361
|
-
textBreakAll =
|
|
40362
|
-
others = _objectWithoutProperties$
|
|
40291
|
+
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; }
|
|
40292
|
+
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; }
|
|
40293
|
+
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; }
|
|
40294
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40295
|
+
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); }
|
|
40296
|
+
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; }
|
|
40297
|
+
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; }
|
|
40298
|
+
var defaultProps = {
|
|
40299
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40300
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40301
|
+
}
|
|
40302
|
+
};
|
|
40303
|
+
function LabelList(props) {
|
|
40304
|
+
var data = props.data,
|
|
40305
|
+
valueAccessor = props.valueAccessor,
|
|
40306
|
+
dataKey = props.dataKey,
|
|
40307
|
+
clockWise = props.clockWise,
|
|
40308
|
+
id = props.id,
|
|
40309
|
+
textBreakAll = props.textBreakAll,
|
|
40310
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40363
40311
|
if (!data || !data.length) {
|
|
40364
40312
|
return null;
|
|
40365
40313
|
}
|
|
@@ -40375,7 +40323,7 @@ function LabelList(_ref) {
|
|
|
40375
40323
|
index: index,
|
|
40376
40324
|
value: value,
|
|
40377
40325
|
textBreakAll: textBreakAll,
|
|
40378
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40326
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40379
40327
|
clockWise: clockWise
|
|
40380
40328
|
})),
|
|
40381
40329
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40430,14 +40378,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40430
40378
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40431
40379
|
}
|
|
40432
40380
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40381
|
+
LabelList.defaultProps = defaultProps;
|
|
40433
40382
|
|
|
40434
|
-
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); }
|
|
40435
40383
|
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); }
|
|
40436
|
-
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; }
|
|
40437
|
-
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; }
|
|
40438
|
-
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; }
|
|
40439
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40440
|
-
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); }
|
|
40441
40384
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40442
40385
|
var sign = mathSign(endAngle - startAngle);
|
|
40443
40386
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40578,19 +40521,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40578
40521
|
}
|
|
40579
40522
|
return path;
|
|
40580
40523
|
};
|
|
40581
|
-
var
|
|
40582
|
-
cx: 0,
|
|
40583
|
-
cy: 0,
|
|
40584
|
-
innerRadius: 0,
|
|
40585
|
-
outerRadius: 0,
|
|
40586
|
-
startAngle: 0,
|
|
40587
|
-
endAngle: 0,
|
|
40588
|
-
cornerRadius: 0,
|
|
40589
|
-
forceCornerRadius: false,
|
|
40590
|
-
cornerIsExternal: false
|
|
40591
|
-
};
|
|
40592
|
-
var Sector = function Sector(sectorProps) {
|
|
40593
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40524
|
+
var Sector = function Sector(props) {
|
|
40594
40525
|
var cx = props.cx,
|
|
40595
40526
|
cy = props.cy,
|
|
40596
40527
|
innerRadius = props.innerRadius,
|
|
@@ -40636,14 +40567,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40636
40567
|
role: "img"
|
|
40637
40568
|
}));
|
|
40638
40569
|
};
|
|
40570
|
+
Sector.defaultProps = {
|
|
40571
|
+
cx: 0,
|
|
40572
|
+
cy: 0,
|
|
40573
|
+
innerRadius: 0,
|
|
40574
|
+
outerRadius: 0,
|
|
40575
|
+
startAngle: 0,
|
|
40576
|
+
endAngle: 0,
|
|
40577
|
+
cornerRadius: 0,
|
|
40578
|
+
forceCornerRadius: false,
|
|
40579
|
+
cornerIsExternal: false
|
|
40580
|
+
};
|
|
40639
40581
|
|
|
40640
|
-
function _typeof$
|
|
40582
|
+
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); }
|
|
40641
40583
|
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); }
|
|
40642
|
-
function ownKeys$
|
|
40643
|
-
function _objectSpread$
|
|
40644
|
-
function _defineProperty$
|
|
40645
|
-
function _toPropertyKey$
|
|
40646
|
-
function _toPrimitive$
|
|
40584
|
+
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; }
|
|
40585
|
+
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; }
|
|
40586
|
+
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; }
|
|
40587
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40588
|
+
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); }
|
|
40647
40589
|
var CURVE_FACTORIES = {
|
|
40648
40590
|
curveBasisClosed: curveBasisClosed,
|
|
40649
40591
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40683,14 +40625,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40683
40625
|
* @return {String} path
|
|
40684
40626
|
*/
|
|
40685
40627
|
var getPath$1 = function getPath(_ref) {
|
|
40686
|
-
var
|
|
40687
|
-
|
|
40688
|
-
_ref$points = _ref.points,
|
|
40689
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40628
|
+
var type = _ref.type,
|
|
40629
|
+
points = _ref.points,
|
|
40690
40630
|
baseLine = _ref.baseLine,
|
|
40691
40631
|
layout = _ref.layout,
|
|
40692
|
-
|
|
40693
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40632
|
+
connectNulls = _ref.connectNulls;
|
|
40694
40633
|
var curveFactory = getCurveFactory(type, layout);
|
|
40695
40634
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40696
40635
|
return defined(entry);
|
|
@@ -40701,7 +40640,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40701
40640
|
return defined(base);
|
|
40702
40641
|
}) : baseLine;
|
|
40703
40642
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40704
|
-
return _objectSpread$
|
|
40643
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40705
40644
|
base: formatBaseLine[index]
|
|
40706
40645
|
});
|
|
40707
40646
|
});
|
|
@@ -40742,8 +40681,12 @@ var Curve = function Curve(props) {
|
|
|
40742
40681
|
ref: pathRef
|
|
40743
40682
|
}));
|
|
40744
40683
|
};
|
|
40684
|
+
Curve.defaultProps = {
|
|
40685
|
+
type: 'linear',
|
|
40686
|
+
points: [],
|
|
40687
|
+
connectNulls: false
|
|
40688
|
+
};
|
|
40745
40689
|
|
|
40746
|
-
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); }
|
|
40747
40690
|
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); }
|
|
40748
40691
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40749
40692
|
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."); }
|
|
@@ -40751,11 +40694,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40751
40694
|
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; }
|
|
40752
40695
|
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; } }
|
|
40753
40696
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40754
|
-
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; }
|
|
40755
|
-
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; }
|
|
40756
|
-
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; }
|
|
40757
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40758
|
-
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); }
|
|
40759
40697
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40760
40698
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40761
40699
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40811,29 +40749,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40811
40749
|
}
|
|
40812
40750
|
return false;
|
|
40813
40751
|
};
|
|
40814
|
-
var
|
|
40815
|
-
x: 0,
|
|
40816
|
-
y: 0,
|
|
40817
|
-
width: 0,
|
|
40818
|
-
height: 0,
|
|
40819
|
-
// The radius of border
|
|
40820
|
-
// The radius of four corners when radius is a number
|
|
40821
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40822
|
-
radius: 0,
|
|
40823
|
-
isAnimationActive: false,
|
|
40824
|
-
isUpdateAnimationActive: false,
|
|
40825
|
-
animationBegin: 0,
|
|
40826
|
-
animationDuration: 1500,
|
|
40827
|
-
animationEasing: 'ease'
|
|
40828
|
-
};
|
|
40829
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40830
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40752
|
+
var Rectangle = function Rectangle(props) {
|
|
40831
40753
|
var pathRef = useRef();
|
|
40832
40754
|
var _useState = useState(-1),
|
|
40833
40755
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40834
40756
|
totalLength = _useState2[0],
|
|
40835
40757
|
setTotalLength = _useState2[1];
|
|
40836
|
-
|
|
40758
|
+
useLayoutEffect(function () {
|
|
40837
40759
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40838
40760
|
try {
|
|
40839
40761
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40904,6 +40826,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40904
40826
|
})));
|
|
40905
40827
|
});
|
|
40906
40828
|
};
|
|
40829
|
+
Rectangle.defaultProps = {
|
|
40830
|
+
x: 0,
|
|
40831
|
+
y: 0,
|
|
40832
|
+
width: 0,
|
|
40833
|
+
height: 0,
|
|
40834
|
+
// The radius of border
|
|
40835
|
+
// The radius of four corners when radius is a number
|
|
40836
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40837
|
+
radius: 0,
|
|
40838
|
+
isAnimationActive: false,
|
|
40839
|
+
isUpdateAnimationActive: false,
|
|
40840
|
+
animationBegin: 0,
|
|
40841
|
+
animationDuration: 1500,
|
|
40842
|
+
animationEasing: 'ease'
|
|
40843
|
+
};
|
|
40907
40844
|
|
|
40908
40845
|
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); }
|
|
40909
40846
|
var Dot$1 = function Dot(props) {
|
|
@@ -40923,42 +40860,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40923
40860
|
return null;
|
|
40924
40861
|
};
|
|
40925
40862
|
|
|
40926
|
-
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); }
|
|
40927
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40928
40863
|
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); }
|
|
40929
|
-
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; }
|
|
40930
|
-
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; }
|
|
40931
|
-
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; }
|
|
40932
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40933
|
-
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); }
|
|
40934
|
-
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; }
|
|
40935
|
-
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; }
|
|
40936
40864
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40937
40865
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40938
40866
|
};
|
|
40939
|
-
var Cross = function Cross(
|
|
40940
|
-
var
|
|
40941
|
-
|
|
40942
|
-
|
|
40943
|
-
|
|
40944
|
-
|
|
40945
|
-
|
|
40946
|
-
|
|
40947
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40948
|
-
_ref$width = _ref.width,
|
|
40949
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40950
|
-
_ref$height = _ref.height,
|
|
40951
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40952
|
-
className = _ref.className,
|
|
40953
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40954
|
-
var props = _objectSpread$c({
|
|
40955
|
-
x: x,
|
|
40956
|
-
y: y,
|
|
40957
|
-
top: top,
|
|
40958
|
-
left: left,
|
|
40959
|
-
width: width,
|
|
40960
|
-
height: height
|
|
40961
|
-
}, rest);
|
|
40867
|
+
var Cross = function Cross(props) {
|
|
40868
|
+
var x = props.x,
|
|
40869
|
+
y = props.y,
|
|
40870
|
+
width = props.width,
|
|
40871
|
+
height = props.height,
|
|
40872
|
+
top = props.top,
|
|
40873
|
+
left = props.left,
|
|
40874
|
+
className = props.className;
|
|
40962
40875
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40963
40876
|
return null;
|
|
40964
40877
|
}
|
|
@@ -40967,6 +40880,14 @@ var Cross = function Cross(_ref) {
|
|
|
40967
40880
|
d: getPath(x, y, width, height, top, left)
|
|
40968
40881
|
}));
|
|
40969
40882
|
};
|
|
40883
|
+
Cross.defaultProps = {
|
|
40884
|
+
x: 0,
|
|
40885
|
+
y: 0,
|
|
40886
|
+
top: 0,
|
|
40887
|
+
left: 0,
|
|
40888
|
+
width: 0,
|
|
40889
|
+
height: 0
|
|
40890
|
+
};
|
|
40970
40891
|
|
|
40971
40892
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40972
40893
|
|
|
@@ -41176,7 +41097,6 @@ var createScale = function createScale(_ref) {
|
|
|
41176
41097
|
isTextActive: false,
|
|
41177
41098
|
isSlideMoving: false,
|
|
41178
41099
|
isTravellerMoving: false,
|
|
41179
|
-
isTravellerFocused: false,
|
|
41180
41100
|
startX: scale(startIndex),
|
|
41181
41101
|
endX: scale(endIndex),
|
|
41182
41102
|
scale: scale,
|
|
@@ -41390,38 +41310,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41390
41310
|
}
|
|
41391
41311
|
});
|
|
41392
41312
|
}
|
|
41393
|
-
}, {
|
|
41394
|
-
key: "handleTravellerMoveKeyboard",
|
|
41395
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41396
|
-
var _this2 = this;
|
|
41397
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41398
|
-
var _this$state3 = this.state,
|
|
41399
|
-
scaleValues = _this$state3.scaleValues,
|
|
41400
|
-
startX = _this$state3.startX,
|
|
41401
|
-
endX = _this$state3.endX;
|
|
41402
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41403
|
-
var currentScaleValue = this.state[id];
|
|
41404
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41405
|
-
if (currentIndex === -1) {
|
|
41406
|
-
return;
|
|
41407
|
-
}
|
|
41408
|
-
var newIndex = currentIndex + direction;
|
|
41409
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41410
|
-
return;
|
|
41411
|
-
}
|
|
41412
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41413
|
-
|
|
41414
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41415
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41416
|
-
return;
|
|
41417
|
-
}
|
|
41418
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41419
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41420
|
-
startX: _this2.state.startX,
|
|
41421
|
-
endX: _this2.state.endX
|
|
41422
|
-
}));
|
|
41423
|
-
});
|
|
41424
|
-
}
|
|
41425
41313
|
}, {
|
|
41426
41314
|
key: "renderBackground",
|
|
41427
41315
|
value: function renderBackground() {
|
|
@@ -41469,7 +41357,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41469
41357
|
}, {
|
|
41470
41358
|
key: "renderTravellerLayer",
|
|
41471
41359
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41472
|
-
var _this3 = this;
|
|
41473
41360
|
var _this$props7 = this.props,
|
|
41474
41361
|
y = _this$props7.y,
|
|
41475
41362
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41483,31 +41370,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41483
41370
|
height: height
|
|
41484
41371
|
});
|
|
41485
41372
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41486
|
-
tabIndex: 0,
|
|
41487
|
-
role: "slider",
|
|
41488
41373
|
className: "recharts-brush-traveller",
|
|
41489
41374
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41490
41375
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41491
41376
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41492
41377
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41493
|
-
onKeyDown: function onKeyDown(e) {
|
|
41494
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41495
|
-
return;
|
|
41496
|
-
}
|
|
41497
|
-
e.preventDefault();
|
|
41498
|
-
e.stopPropagation();
|
|
41499
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41500
|
-
},
|
|
41501
|
-
onFocus: function onFocus() {
|
|
41502
|
-
_this3.setState({
|
|
41503
|
-
isTravellerFocused: true
|
|
41504
|
-
});
|
|
41505
|
-
},
|
|
41506
|
-
onBlur: function onBlur() {
|
|
41507
|
-
_this3.setState({
|
|
41508
|
-
isTravellerFocused: false
|
|
41509
|
-
});
|
|
41510
|
-
},
|
|
41511
41378
|
style: {
|
|
41512
41379
|
cursor: 'col-resize'
|
|
41513
41380
|
}
|
|
@@ -41551,9 +41418,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41551
41418
|
height = _this$props9.height,
|
|
41552
41419
|
travellerWidth = _this$props9.travellerWidth,
|
|
41553
41420
|
stroke = _this$props9.stroke;
|
|
41554
|
-
var _this$
|
|
41555
|
-
startX = _this$
|
|
41556
|
-
endX = _this$
|
|
41421
|
+
var _this$state3 = this.state,
|
|
41422
|
+
startX = _this$state3.startX,
|
|
41423
|
+
endX = _this$state3.endX;
|
|
41557
41424
|
var offset = 5;
|
|
41558
41425
|
var attrs = {
|
|
41559
41426
|
pointerEvents: 'none',
|
|
@@ -41585,13 +41452,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41585
41452
|
width = _this$props10.width,
|
|
41586
41453
|
height = _this$props10.height,
|
|
41587
41454
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41588
|
-
var _this$
|
|
41589
|
-
startX = _this$
|
|
41590
|
-
endX = _this$
|
|
41591
|
-
isTextActive = _this$
|
|
41592
|
-
isSlideMoving = _this$
|
|
41593
|
-
isTravellerMoving = _this$
|
|
41594
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41455
|
+
var _this$state4 = this.state,
|
|
41456
|
+
startX = _this$state4.startX,
|
|
41457
|
+
endX = _this$state4.endX,
|
|
41458
|
+
isTextActive = _this$state4.isTextActive,
|
|
41459
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41460
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41595
41461
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41596
41462
|
return null;
|
|
41597
41463
|
}
|
|
@@ -41603,7 +41469,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41603
41469
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41604
41470
|
onTouchMove: this.handleTouchMove,
|
|
41605
41471
|
style: style
|
|
41606
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41472
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41607
41473
|
}
|
|
41608
41474
|
}], [{
|
|
41609
41475
|
key: "renderDefaultTraveller",
|
|
@@ -41921,7 +41787,7 @@ function every(collection, predicate, guard) {
|
|
|
41921
41787
|
|
|
41922
41788
|
var every_1 = every;
|
|
41923
41789
|
|
|
41924
|
-
var defineProperty = _defineProperty$
|
|
41790
|
+
var defineProperty = _defineProperty$l;
|
|
41925
41791
|
|
|
41926
41792
|
/**
|
|
41927
41793
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42282,6 +42148,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42282
42148
|
legendType: 'rect',
|
|
42283
42149
|
minPointSize: 0,
|
|
42284
42150
|
hide: false,
|
|
42151
|
+
// data of bar
|
|
42285
42152
|
data: [],
|
|
42286
42153
|
layout: 'vertical',
|
|
42287
42154
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45194,11 +45061,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45194
45061
|
}
|
|
45195
45062
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45196
45063
|
x = _this$container$getBo.x,
|
|
45197
|
-
y = _this$container$getBo.y
|
|
45198
|
-
height = _this$container$getBo.height;
|
|
45064
|
+
y = _this$container$getBo.y;
|
|
45199
45065
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45200
45066
|
var pageX = x + coordinate;
|
|
45201
|
-
var pageY = y + this.offset.top
|
|
45067
|
+
var pageY = y + this.offset.top;
|
|
45202
45068
|
this.mouseHandlerCallback({
|
|
45203
45069
|
pageX: pageX,
|
|
45204
45070
|
pageY: pageY
|