@typeolymp/ui-components 1.19.3 → 1.19.4
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/Input/translations.d.ts +11 -0
- package/build/components/molecules/Key/translations.d.ts +5 -0
- package/build/components/molecules/PasswordInputField/translations.d.ts +11 -0
- package/build/components/molecules/Tabs/styles.d.ts +2 -0
- package/build/components/organisms/Chart/data copy.d.ts +30 -0
- package/build/components/organisms/Chart/styles.d.ts +1 -0
- package/build/index.es.js +649 -787
- package/build/index.es.js.map +1 -1
- package/build/index.js +649 -787
- package/build/index.js.map +1 -1
- package/build/lib/enums.d.ts +4 -0
- package/build/lib/helpers.d.ts +1 -0
- package/build/lib/theme/index.d.ts +3 -0
- package/build/lib/theme/types.d.ts +72 -0
- package/build/lib/translations/index.d.ts +6 -0
- package/build/lib/types/TranslationType.d.ts +7 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -4520,7 +4520,7 @@ function requiredArgs(required, args) {
|
|
|
4520
4520
|
}
|
|
4521
4521
|
}
|
|
4522
4522
|
|
|
4523
|
-
function _typeof$
|
|
4523
|
+
function _typeof$u(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$u = function _typeof(obj) { return typeof obj; }; } else { _typeof$u = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$u(obj); }
|
|
4524
4524
|
/**
|
|
4525
4525
|
* @name toDate
|
|
4526
4526
|
* @category Common Helpers
|
|
@@ -4556,7 +4556,7 @@ function toDate(argument) {
|
|
|
4556
4556
|
requiredArgs(1, arguments);
|
|
4557
4557
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4558
4558
|
|
|
4559
|
-
if (argument instanceof Date || _typeof$
|
|
4559
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4560
4560
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4561
4561
|
return new Date(argument.getTime());
|
|
4562
4562
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4827,7 +4827,7 @@ var millisecondsInMinute = 60000;
|
|
|
4827
4827
|
|
|
4828
4828
|
var millisecondsInHour = 3600000;
|
|
4829
4829
|
|
|
4830
|
-
function _typeof$
|
|
4830
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$t = function _typeof(obj) { return typeof obj; }; } else { _typeof$t = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$t(obj); }
|
|
4831
4831
|
/**
|
|
4832
4832
|
* @name isDate
|
|
4833
4833
|
* @category Common Helpers
|
|
@@ -4863,7 +4863,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4863
4863
|
|
|
4864
4864
|
function isDate(value) {
|
|
4865
4865
|
requiredArgs(1, arguments);
|
|
4866
|
-
return value instanceof Date || _typeof$
|
|
4866
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4867
4867
|
}
|
|
4868
4868
|
|
|
4869
4869
|
/**
|
|
@@ -8036,37 +8036,35 @@ var templateObject_1$M, templateObject_2$A;
|
|
|
8036
8036
|
|
|
8037
8037
|
var Number$1 = function (props) {
|
|
8038
8038
|
var inputRef = React$3.useRef(null);
|
|
8039
|
-
var
|
|
8040
|
-
if (
|
|
8041
|
-
props.
|
|
8039
|
+
var setValue = function (value) {
|
|
8040
|
+
if (props.min && value < props.min)
|
|
8041
|
+
value = props.min;
|
|
8042
|
+
if (props.max && value > props.max)
|
|
8043
|
+
value = props.max;
|
|
8044
|
+
inputRef.current.value = "".concat(value);
|
|
8045
|
+
return value;
|
|
8042
8046
|
};
|
|
8043
8047
|
var decrease = function () {
|
|
8044
|
-
var
|
|
8045
|
-
(
|
|
8046
|
-
|
|
8047
|
-
if (props.min && newValue < props.min) {
|
|
8048
|
-
inputRef.current.value = "".concat(props.min);
|
|
8049
|
-
}
|
|
8050
|
-
else {
|
|
8051
|
-
inputRef.current.value = "".concat(newValue);
|
|
8052
|
-
if (!!props.onChange)
|
|
8053
|
-
props.onChange(newValue);
|
|
8054
|
-
}
|
|
8048
|
+
var value = parseInt(inputRef.current.value) - 1;
|
|
8049
|
+
setValue(value);
|
|
8050
|
+
inputRef.current.focus();
|
|
8055
8051
|
};
|
|
8056
8052
|
var increase = function () {
|
|
8057
|
-
var
|
|
8058
|
-
(
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8053
|
+
var value = parseInt(inputRef.current.value) + 1;
|
|
8054
|
+
setValue(value);
|
|
8055
|
+
inputRef.current.focus();
|
|
8056
|
+
};
|
|
8057
|
+
var onChange = function () {
|
|
8058
|
+
var value = parseInt(inputRef.current.value);
|
|
8059
|
+
var newValue = setValue(value);
|
|
8060
|
+
if (!props.disabled && !!props.onChange)
|
|
8061
|
+
props.onChange(newValue);
|
|
8062
|
+
};
|
|
8063
|
+
var onBlur = function () {
|
|
8064
|
+
if (!!props.onBlur)
|
|
8065
|
+
props.onBlur();
|
|
8068
8066
|
};
|
|
8069
|
-
return (jsxRuntime.jsxs(Wrapper$6, __assign$2({ disabled: props.disabled }, { children: [jsxRuntime.jsx(Button, { label: "-", disabled: props.disabled, onClick: decrease, tabIndex: -1, type: "button" }), jsxRuntime.jsx(StyledInputNumber, __assign$2({ type: "number" }, props, { defaultValue: props.defaultValue || props.min || 0, onChange: onChange, onBlur:
|
|
8067
|
+
return (jsxRuntime.jsxs(Wrapper$6, __assign$2({ disabled: props.disabled }, { children: [jsxRuntime.jsx(Button, { label: "-", disabled: props.disabled, onClick: decrease, tabIndex: -1, type: "button" }), jsxRuntime.jsx(StyledInputNumber, __assign$2({ type: "number" }, props, { defaultValue: props.defaultValue || props.min || 0, onChange: onChange, onBlur: onBlur, ref: inputRef })), jsxRuntime.jsx(Button, { label: "+", disabled: props.disabled, onClick: increase, tabIndex: -1, type: "button" })] })));
|
|
8070
8068
|
};
|
|
8071
8069
|
|
|
8072
8070
|
var Paragraph = function (props) { return (jsxRuntime.jsx(StyledParagraph, __assign$2({}, props, { children: props.children }))); };
|
|
@@ -13562,15 +13560,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13562
13560
|
|
|
13563
13561
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13564
13562
|
|
|
13565
|
-
function _slicedToArray$
|
|
13566
|
-
return _arrayWithHoles$
|
|
13563
|
+
function _slicedToArray$d(arr, i) {
|
|
13564
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13567
13565
|
}
|
|
13568
13566
|
|
|
13569
|
-
function _arrayWithHoles$
|
|
13567
|
+
function _arrayWithHoles$e(arr) {
|
|
13570
13568
|
if (Array.isArray(arr)) return arr;
|
|
13571
13569
|
}
|
|
13572
13570
|
|
|
13573
|
-
function _iterableToArrayLimit$
|
|
13571
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13574
13572
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13575
13573
|
|
|
13576
13574
|
if (_i == null) return;
|
|
@@ -13600,16 +13598,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13600
13598
|
return _arr;
|
|
13601
13599
|
}
|
|
13602
13600
|
|
|
13603
|
-
function _unsupportedIterableToArray$
|
|
13601
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13604
13602
|
if (!o) return;
|
|
13605
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13603
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13606
13604
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13607
13605
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13608
13606
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13609
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13607
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13610
13608
|
}
|
|
13611
13609
|
|
|
13612
|
-
function _arrayLikeToArray$
|
|
13610
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13613
13611
|
if (len == null || len > arr.length) len = arr.length;
|
|
13614
13612
|
|
|
13615
13613
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13617,7 +13615,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13617
13615
|
return arr2;
|
|
13618
13616
|
}
|
|
13619
13617
|
|
|
13620
|
-
function _nonIterableRest$
|
|
13618
|
+
function _nonIterableRest$e() {
|
|
13621
13619
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13622
13620
|
}
|
|
13623
13621
|
|
|
@@ -13681,7 +13679,7 @@ reservedProps.forEach(function (name) {
|
|
|
13681
13679
|
// This is a mapping from React prop names to the attribute names.
|
|
13682
13680
|
|
|
13683
13681
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13684
|
-
var _ref2 = _slicedToArray$
|
|
13682
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13685
13683
|
name = _ref2[0],
|
|
13686
13684
|
attributeName = _ref2[1];
|
|
13687
13685
|
|
|
@@ -16081,31 +16079,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16081
16079
|
return true;
|
|
16082
16080
|
};
|
|
16083
16081
|
|
|
16084
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16082
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16085
16083
|
|
|
16086
16084
|
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."); }
|
|
16087
16085
|
|
|
16088
16086
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16089
16087
|
|
|
16090
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16088
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16091
16089
|
|
|
16092
|
-
function ownKeys$
|
|
16090
|
+
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; }
|
|
16093
16091
|
|
|
16094
|
-
function _objectSpread$
|
|
16092
|
+
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; }
|
|
16095
16093
|
|
|
16096
|
-
function _defineProperty$
|
|
16094
|
+
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; }
|
|
16097
16095
|
|
|
16098
|
-
function _slicedToArray$
|
|
16096
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16099
16097
|
|
|
16100
|
-
function _nonIterableRest$
|
|
16098
|
+
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."); }
|
|
16101
16099
|
|
|
16102
|
-
function _unsupportedIterableToArray$
|
|
16100
|
+
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); }
|
|
16103
16101
|
|
|
16104
|
-
function _arrayLikeToArray$
|
|
16102
|
+
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; }
|
|
16105
16103
|
|
|
16106
|
-
function _iterableToArrayLimit$
|
|
16104
|
+
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; }
|
|
16107
16105
|
|
|
16108
|
-
function _arrayWithHoles$
|
|
16106
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16109
16107
|
|
|
16110
16108
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16111
16109
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16185,11 +16183,11 @@ function allFilesAccepted(_ref) {
|
|
|
16185
16183
|
|
|
16186
16184
|
return files.every(function (file) {
|
|
16187
16185
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16188
|
-
_fileAccepted2 = _slicedToArray$
|
|
16186
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16189
16187
|
accepted = _fileAccepted2[0];
|
|
16190
16188
|
|
|
16191
16189
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16192
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16190
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16193
16191
|
sizeMatch = _fileMatchSize2[0];
|
|
16194
16192
|
|
|
16195
16193
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16286,7 +16284,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16286
16284
|
function pickerOptionsFromAccept(accept) {
|
|
16287
16285
|
if (isDefined(accept)) {
|
|
16288
16286
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16289
|
-
var _ref3 = _slicedToArray$
|
|
16287
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16290
16288
|
mimeType = _ref3[0],
|
|
16291
16289
|
ext = _ref3[1];
|
|
16292
16290
|
|
|
@@ -16304,11 +16302,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16304
16302
|
|
|
16305
16303
|
return ok;
|
|
16306
16304
|
}).reduce(function (agg, _ref4) {
|
|
16307
|
-
var _ref5 = _slicedToArray$
|
|
16305
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16308
16306
|
mimeType = _ref5[0],
|
|
16309
16307
|
ext = _ref5[1];
|
|
16310
16308
|
|
|
16311
|
-
return _objectSpread$
|
|
16309
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16312
16310
|
}, {});
|
|
16313
16311
|
return [{
|
|
16314
16312
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16328,7 +16326,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16328
16326
|
function acceptPropAsAcceptAttr(accept) {
|
|
16329
16327
|
if (isDefined(accept)) {
|
|
16330
16328
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16331
|
-
var _ref7 = _slicedToArray$
|
|
16329
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16332
16330
|
mimeType = _ref7[0],
|
|
16333
16331
|
ext = _ref7[1];
|
|
16334
16332
|
|
|
@@ -16396,40 +16394,40 @@ function isExt(v) {
|
|
|
16396
16394
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16397
16395
|
*/
|
|
16398
16396
|
|
|
16399
|
-
var _excluded$
|
|
16400
|
-
_excluded2$
|
|
16397
|
+
var _excluded$d = ["children"],
|
|
16398
|
+
_excluded2$3 = ["open"],
|
|
16401
16399
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16402
16400
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16403
16401
|
|
|
16404
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16402
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16405
16403
|
|
|
16406
16404
|
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."); }
|
|
16407
16405
|
|
|
16408
16406
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16409
16407
|
|
|
16410
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16408
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16411
16409
|
|
|
16412
|
-
function _slicedToArray$
|
|
16410
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16413
16411
|
|
|
16414
|
-
function _nonIterableRest$
|
|
16412
|
+
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."); }
|
|
16415
16413
|
|
|
16416
|
-
function _unsupportedIterableToArray$
|
|
16414
|
+
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); }
|
|
16417
16415
|
|
|
16418
|
-
function _arrayLikeToArray$
|
|
16416
|
+
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; }
|
|
16419
16417
|
|
|
16420
|
-
function _iterableToArrayLimit$
|
|
16418
|
+
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; }
|
|
16421
16419
|
|
|
16422
|
-
function _arrayWithHoles$
|
|
16420
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16423
16421
|
|
|
16424
|
-
function ownKeys$
|
|
16422
|
+
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; }
|
|
16425
16423
|
|
|
16426
|
-
function _objectSpread$
|
|
16424
|
+
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; }
|
|
16427
16425
|
|
|
16428
|
-
function _defineProperty$
|
|
16426
|
+
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; }
|
|
16429
16427
|
|
|
16430
|
-
function _objectWithoutProperties$
|
|
16428
|
+
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; }
|
|
16431
16429
|
|
|
16432
|
-
function _objectWithoutPropertiesLoose$
|
|
16430
|
+
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; }
|
|
16433
16431
|
/**
|
|
16434
16432
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16435
16433
|
*
|
|
@@ -16447,11 +16445,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16447
16445
|
|
|
16448
16446
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16449
16447
|
var children = _ref.children,
|
|
16450
|
-
params = _objectWithoutProperties$
|
|
16448
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16451
16449
|
|
|
16452
16450
|
var _useDropzone = useDropzone(params),
|
|
16453
16451
|
open = _useDropzone.open,
|
|
16454
|
-
props = _objectWithoutProperties$
|
|
16452
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16455
16453
|
|
|
16456
16454
|
React$3.useImperativeHandle(ref, function () {
|
|
16457
16455
|
return {
|
|
@@ -16459,13 +16457,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16459
16457
|
};
|
|
16460
16458
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16461
16459
|
|
|
16462
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16460
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16463
16461
|
open: open
|
|
16464
16462
|
})));
|
|
16465
16463
|
});
|
|
16466
16464
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16467
16465
|
|
|
16468
|
-
var defaultProps$
|
|
16466
|
+
var defaultProps$1 = {
|
|
16469
16467
|
disabled: false,
|
|
16470
16468
|
getFilesFromEvent: fromEvent,
|
|
16471
16469
|
maxSize: Infinity,
|
|
@@ -16481,7 +16479,7 @@ var defaultProps$2 = {
|
|
|
16481
16479
|
useFsAccessApi: true,
|
|
16482
16480
|
autoFocus: false
|
|
16483
16481
|
};
|
|
16484
|
-
Dropzone.defaultProps = defaultProps$
|
|
16482
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16485
16483
|
Dropzone.propTypes = {
|
|
16486
16484
|
/**
|
|
16487
16485
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16832,7 +16830,7 @@ var initialState = {
|
|
|
16832
16830
|
function useDropzone() {
|
|
16833
16831
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16834
16832
|
|
|
16835
|
-
var _defaultProps$props = _objectSpread$
|
|
16833
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16836
16834
|
accept = _defaultProps$props.accept,
|
|
16837
16835
|
disabled = _defaultProps$props.disabled,
|
|
16838
16836
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16879,7 +16877,7 @@ function useDropzone() {
|
|
|
16879
16877
|
var inputRef = React$3.useRef(null);
|
|
16880
16878
|
|
|
16881
16879
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
16882
|
-
_useReducer2 = _slicedToArray$
|
|
16880
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16883
16881
|
state = _useReducer2[0],
|
|
16884
16882
|
dispatch = _useReducer2[1];
|
|
16885
16883
|
|
|
@@ -17049,12 +17047,12 @@ function useDropzone() {
|
|
|
17049
17047
|
var fileRejections = [];
|
|
17050
17048
|
files.forEach(function (file) {
|
|
17051
17049
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17052
|
-
_fileAccepted2 = _slicedToArray$
|
|
17050
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17053
17051
|
accepted = _fileAccepted2[0],
|
|
17054
17052
|
acceptError = _fileAccepted2[1];
|
|
17055
17053
|
|
|
17056
17054
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17057
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17055
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17058
17056
|
sizeMatch = _fileMatchSize2[0],
|
|
17059
17057
|
sizeError = _fileMatchSize2[1];
|
|
17060
17058
|
|
|
@@ -17255,9 +17253,9 @@ function useDropzone() {
|
|
|
17255
17253
|
onDragOver = _ref2.onDragOver,
|
|
17256
17254
|
onDragLeave = _ref2.onDragLeave,
|
|
17257
17255
|
onDrop = _ref2.onDrop,
|
|
17258
|
-
rest = _objectWithoutProperties$
|
|
17256
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17259
17257
|
|
|
17260
|
-
return _objectSpread$
|
|
17258
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17261
17259
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17262
17260
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17263
17261
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17282,9 +17280,9 @@ function useDropzone() {
|
|
|
17282
17280
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17283
17281
|
onChange = _ref3.onChange,
|
|
17284
17282
|
onClick = _ref3.onClick,
|
|
17285
|
-
rest = _objectWithoutProperties$
|
|
17283
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17286
17284
|
|
|
17287
|
-
var inputProps = _defineProperty$
|
|
17285
|
+
var inputProps = _defineProperty$r({
|
|
17288
17286
|
accept: acceptAttr,
|
|
17289
17287
|
multiple: multiple,
|
|
17290
17288
|
type: "file",
|
|
@@ -17296,10 +17294,10 @@ function useDropzone() {
|
|
|
17296
17294
|
tabIndex: -1
|
|
17297
17295
|
}, refKey, inputRef);
|
|
17298
17296
|
|
|
17299
|
-
return _objectSpread$
|
|
17297
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17300
17298
|
};
|
|
17301
17299
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17302
|
-
return _objectSpread$
|
|
17300
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17303
17301
|
isFocused: isFocused && !disabled,
|
|
17304
17302
|
getRootProps: getRootProps,
|
|
17305
17303
|
getInputProps: getInputProps,
|
|
@@ -17318,40 +17316,40 @@ function reducer$1(state, action) {
|
|
|
17318
17316
|
/* istanbul ignore next */
|
|
17319
17317
|
switch (action.type) {
|
|
17320
17318
|
case "focus":
|
|
17321
|
-
return _objectSpread$
|
|
17319
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17322
17320
|
isFocused: true
|
|
17323
17321
|
});
|
|
17324
17322
|
|
|
17325
17323
|
case "blur":
|
|
17326
|
-
return _objectSpread$
|
|
17324
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17327
17325
|
isFocused: false
|
|
17328
17326
|
});
|
|
17329
17327
|
|
|
17330
17328
|
case "openDialog":
|
|
17331
|
-
return _objectSpread$
|
|
17329
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17332
17330
|
isFileDialogActive: true
|
|
17333
17331
|
});
|
|
17334
17332
|
|
|
17335
17333
|
case "closeDialog":
|
|
17336
|
-
return _objectSpread$
|
|
17334
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17337
17335
|
isFileDialogActive: false
|
|
17338
17336
|
});
|
|
17339
17337
|
|
|
17340
17338
|
case "setDraggedFiles":
|
|
17341
|
-
return _objectSpread$
|
|
17339
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17342
17340
|
isDragActive: action.isDragActive,
|
|
17343
17341
|
isDragAccept: action.isDragAccept,
|
|
17344
17342
|
isDragReject: action.isDragReject
|
|
17345
17343
|
});
|
|
17346
17344
|
|
|
17347
17345
|
case "setFiles":
|
|
17348
|
-
return _objectSpread$
|
|
17346
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17349
17347
|
acceptedFiles: action.acceptedFiles,
|
|
17350
17348
|
fileRejections: action.fileRejections
|
|
17351
17349
|
});
|
|
17352
17350
|
|
|
17353
17351
|
case "reset":
|
|
17354
|
-
return _objectSpread$
|
|
17352
|
+
return _objectSpread$p({}, initialState);
|
|
17355
17353
|
|
|
17356
17354
|
default:
|
|
17357
17355
|
return state;
|
|
@@ -19577,7 +19575,7 @@ function shallowEqual(a, b) {
|
|
|
19577
19575
|
return true;
|
|
19578
19576
|
}
|
|
19579
19577
|
|
|
19580
|
-
function _typeof$
|
|
19578
|
+
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); }
|
|
19581
19579
|
|
|
19582
19580
|
//
|
|
19583
19581
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19604,9 +19602,7 @@ var FilteredElementKeyMap = {
|
|
|
19604
19602
|
};
|
|
19605
19603
|
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'];
|
|
19606
19604
|
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19605
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19610
19606
|
|
|
19611
19607
|
/** the offset of a chart, which define the blank space all around */
|
|
19612
19608
|
|
|
@@ -19642,7 +19638,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19642
19638
|
};
|
|
19643
19639
|
};
|
|
19644
19640
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19645
|
-
if (!isObject_1(props) || _typeof$
|
|
19641
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19646
19642
|
return null;
|
|
19647
19643
|
}
|
|
19648
19644
|
var out = null;
|
|
@@ -19656,11 +19652,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19656
19652
|
return out;
|
|
19657
19653
|
};
|
|
19658
19654
|
|
|
19659
|
-
var _excluded$
|
|
19660
|
-
_excluded2$
|
|
19661
|
-
function _objectWithoutProperties$
|
|
19662
|
-
function _objectWithoutPropertiesLoose$
|
|
19663
|
-
function _typeof$
|
|
19655
|
+
var _excluded$c = ["children"],
|
|
19656
|
+
_excluded2$2 = ["children"];
|
|
19657
|
+
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; }
|
|
19658
|
+
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; }
|
|
19659
|
+
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); }
|
|
19664
19660
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19665
19661
|
click: 'onClick',
|
|
19666
19662
|
mousedown: 'onMouseDown',
|
|
@@ -19767,7 +19763,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19767
19763
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19768
19764
|
};
|
|
19769
19765
|
var isDotProps = function isDotProps(dot) {
|
|
19770
|
-
return dot && _typeof$
|
|
19766
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19771
19767
|
};
|
|
19772
19768
|
|
|
19773
19769
|
/**
|
|
@@ -19859,10 +19855,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19859
19855
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19860
19856
|
var _ref = nextChild.props || {},
|
|
19861
19857
|
nextChildren = _ref.children,
|
|
19862
|
-
nextProps = _objectWithoutProperties$
|
|
19858
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19863
19859
|
var _ref2 = prevChild.props || {},
|
|
19864
19860
|
prevChildren = _ref2.children,
|
|
19865
|
-
prevProps = _objectWithoutProperties$
|
|
19861
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19866
19862
|
if (nextChildren && prevChildren) {
|
|
19867
19863
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19868
19864
|
}
|
|
@@ -19904,10 +19900,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19904
19900
|
return toArray(children).indexOf(child);
|
|
19905
19901
|
};
|
|
19906
19902
|
|
|
19907
|
-
var _excluded$
|
|
19903
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19908
19904
|
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); }
|
|
19909
|
-
function _objectWithoutProperties$
|
|
19910
|
-
function _objectWithoutPropertiesLoose$
|
|
19905
|
+
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; }
|
|
19906
|
+
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; }
|
|
19911
19907
|
function Surface(props) {
|
|
19912
19908
|
var children = props.children,
|
|
19913
19909
|
width = props.width,
|
|
@@ -19915,7 +19911,7 @@ function Surface(props) {
|
|
|
19915
19911
|
viewBox = props.viewBox,
|
|
19916
19912
|
className = props.className,
|
|
19917
19913
|
style = props.style,
|
|
19918
|
-
others = _objectWithoutProperties$
|
|
19914
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19919
19915
|
var svgView = viewBox || {
|
|
19920
19916
|
width: width,
|
|
19921
19917
|
height: height,
|
|
@@ -19932,14 +19928,14 @@ function Surface(props) {
|
|
|
19932
19928
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
19933
19929
|
}
|
|
19934
19930
|
|
|
19935
|
-
var _excluded$
|
|
19931
|
+
var _excluded$a = ["children", "className"];
|
|
19936
19932
|
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); }
|
|
19937
|
-
function _objectWithoutProperties$
|
|
19938
|
-
function _objectWithoutPropertiesLoose$
|
|
19933
|
+
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; }
|
|
19934
|
+
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; }
|
|
19939
19935
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
19940
19936
|
var children = props.children,
|
|
19941
19937
|
className = props.className,
|
|
19942
|
-
others = _objectWithoutProperties$
|
|
19938
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19943
19939
|
var layerClass = classNames('recharts-layer', className);
|
|
19944
19940
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
19945
19941
|
className: layerClass
|
|
@@ -23354,16 +23350,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23354
23350
|
stackOffsetNone(series, order);
|
|
23355
23351
|
}
|
|
23356
23352
|
|
|
23357
|
-
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); }
|
|
23358
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23359
23353
|
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); }
|
|
23360
|
-
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; }
|
|
23361
|
-
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; }
|
|
23362
|
-
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; }
|
|
23363
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23364
|
-
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); }
|
|
23365
|
-
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; }
|
|
23366
|
-
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; }
|
|
23367
23354
|
var symbolFactories = {
|
|
23368
23355
|
symbolCircle: symbolCircle,
|
|
23369
23356
|
symbolCross: symbolCross,
|
|
@@ -23402,35 +23389,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23402
23389
|
return Math.PI * size * size / 4;
|
|
23403
23390
|
}
|
|
23404
23391
|
};
|
|
23392
|
+
var symbolsDefaultProps = {
|
|
23393
|
+
type: 'circle',
|
|
23394
|
+
size: 64,
|
|
23395
|
+
sizeType: 'area'
|
|
23396
|
+
};
|
|
23405
23397
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23406
23398
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23407
23399
|
};
|
|
23408
|
-
var Symbols = function Symbols(
|
|
23409
|
-
var _ref$type = _ref.type,
|
|
23410
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23411
|
-
_ref$size = _ref.size,
|
|
23412
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23413
|
-
_ref$sizeType = _ref.sizeType,
|
|
23414
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23415
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23416
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23417
|
-
type: type,
|
|
23418
|
-
size: size,
|
|
23419
|
-
sizeType: sizeType
|
|
23420
|
-
});
|
|
23421
|
-
|
|
23400
|
+
var Symbols = function Symbols(props) {
|
|
23422
23401
|
/**
|
|
23423
23402
|
* Calculate the path of curve
|
|
23424
23403
|
* @return {String} path
|
|
23425
23404
|
*/
|
|
23426
23405
|
var getPath = function getPath() {
|
|
23406
|
+
var size = props.size,
|
|
23407
|
+
sizeType = props.sizeType,
|
|
23408
|
+
type = props.type;
|
|
23427
23409
|
var symbolFactory = getSymbolFactory(type);
|
|
23428
23410
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23429
23411
|
return symbol();
|
|
23430
23412
|
};
|
|
23431
23413
|
var className = props.className,
|
|
23432
23414
|
cx = props.cx,
|
|
23433
|
-
cy = props.cy
|
|
23415
|
+
cy = props.cy,
|
|
23416
|
+
size = props.size;
|
|
23434
23417
|
var filteredProps = filterProps(props, true);
|
|
23435
23418
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23436
23419
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23441,34 +23424,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23441
23424
|
}
|
|
23442
23425
|
return null;
|
|
23443
23426
|
};
|
|
23427
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23444
23428
|
Symbols.registerSymbol = registerSymbol;
|
|
23445
23429
|
|
|
23446
|
-
function _typeof$
|
|
23430
|
+
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); }
|
|
23447
23431
|
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); }
|
|
23448
|
-
function ownKeys$
|
|
23449
|
-
function _objectSpread$
|
|
23450
|
-
function _classCallCheck$
|
|
23451
|
-
function _defineProperties$
|
|
23452
|
-
function _createClass$
|
|
23453
|
-
function _inherits$
|
|
23454
|
-
function _setPrototypeOf$
|
|
23455
|
-
function _createSuper$
|
|
23456
|
-
function _possibleConstructorReturn$
|
|
23457
|
-
function _assertThisInitialized$
|
|
23458
|
-
function _isNativeReflectConstruct$
|
|
23459
|
-
function _getPrototypeOf$
|
|
23460
|
-
function _defineProperty$
|
|
23461
|
-
function _toPropertyKey$
|
|
23462
|
-
function _toPrimitive$
|
|
23432
|
+
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; }
|
|
23433
|
+
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; }
|
|
23434
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23435
|
+
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); } }
|
|
23436
|
+
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; }
|
|
23437
|
+
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); }
|
|
23438
|
+
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); }
|
|
23439
|
+
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); }; }
|
|
23440
|
+
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); }
|
|
23441
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23442
|
+
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; } }
|
|
23443
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23444
|
+
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; }
|
|
23445
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23446
|
+
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); }
|
|
23463
23447
|
var SIZE = 32;
|
|
23464
23448
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23465
|
-
_inherits$
|
|
23466
|
-
var _super = _createSuper$
|
|
23449
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23450
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23467
23451
|
function DefaultLegendContent() {
|
|
23468
|
-
_classCallCheck$
|
|
23452
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23469
23453
|
return _super.apply(this, arguments);
|
|
23470
23454
|
}
|
|
23471
|
-
_createClass$
|
|
23455
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23472
23456
|
key: "renderIcon",
|
|
23473
23457
|
value:
|
|
23474
23458
|
/**
|
|
@@ -23513,7 +23497,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23513
23497
|
});
|
|
23514
23498
|
}
|
|
23515
23499
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23516
|
-
var iconProps = _objectSpread$
|
|
23500
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23517
23501
|
delete iconProps.legendIcon;
|
|
23518
23502
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23519
23503
|
}
|
|
@@ -23561,7 +23545,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23561
23545
|
var finalFormatter = entry.formatter || formatter;
|
|
23562
23546
|
var className = classNames((_classNames = {
|
|
23563
23547
|
'recharts-legend-item': true
|
|
23564
|
-
}, _defineProperty$
|
|
23548
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23565
23549
|
if (entry.type === 'none') {
|
|
23566
23550
|
return null;
|
|
23567
23551
|
}
|
|
@@ -23606,8 +23590,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23606
23590
|
}]);
|
|
23607
23591
|
return DefaultLegendContent;
|
|
23608
23592
|
}(React$3.PureComponent);
|
|
23609
|
-
_defineProperty$
|
|
23610
|
-
_defineProperty$
|
|
23593
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23594
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23611
23595
|
iconSize: 14,
|
|
23612
23596
|
layout: 'horizontal',
|
|
23613
23597
|
align: 'center',
|
|
@@ -23615,25 +23599,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23615
23599
|
inactiveColor: '#ccc'
|
|
23616
23600
|
});
|
|
23617
23601
|
|
|
23618
|
-
function _typeof$
|
|
23619
|
-
var _excluded$
|
|
23620
|
-
function ownKeys$
|
|
23621
|
-
function _objectSpread$
|
|
23622
|
-
function _classCallCheck$
|
|
23623
|
-
function _defineProperties$
|
|
23624
|
-
function _createClass$
|
|
23625
|
-
function _inherits$
|
|
23626
|
-
function _setPrototypeOf$
|
|
23627
|
-
function _createSuper$
|
|
23628
|
-
function _possibleConstructorReturn$
|
|
23629
|
-
function _assertThisInitialized$
|
|
23630
|
-
function _isNativeReflectConstruct$
|
|
23631
|
-
function _getPrototypeOf$
|
|
23632
|
-
function _defineProperty$
|
|
23633
|
-
function _toPropertyKey$
|
|
23634
|
-
function _toPrimitive$
|
|
23635
|
-
function _objectWithoutProperties$
|
|
23636
|
-
function _objectWithoutPropertiesLoose$
|
|
23602
|
+
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); }
|
|
23603
|
+
var _excluded$9 = ["ref"];
|
|
23604
|
+
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; }
|
|
23605
|
+
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; }
|
|
23606
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23607
|
+
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); } }
|
|
23608
|
+
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; }
|
|
23609
|
+
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); }
|
|
23610
|
+
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); }
|
|
23611
|
+
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); }; }
|
|
23612
|
+
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); }
|
|
23613
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23614
|
+
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; } }
|
|
23615
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23616
|
+
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; }
|
|
23617
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23618
|
+
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); }
|
|
23619
|
+
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; }
|
|
23620
|
+
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; }
|
|
23637
23621
|
function defaultUniqBy$1(entry) {
|
|
23638
23622
|
return entry.value;
|
|
23639
23623
|
}
|
|
@@ -23654,27 +23638,27 @@ function renderContent$1(content, props) {
|
|
|
23654
23638
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23655
23639
|
}
|
|
23656
23640
|
props.ref;
|
|
23657
|
-
var otherProps = _objectWithoutProperties$
|
|
23641
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23658
23642
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23659
23643
|
}
|
|
23660
23644
|
var EPS$2 = 1;
|
|
23661
23645
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23662
|
-
_inherits$
|
|
23663
|
-
var _super = _createSuper$
|
|
23646
|
+
_inherits$7(Legend, _PureComponent);
|
|
23647
|
+
var _super = _createSuper$7(Legend);
|
|
23664
23648
|
function Legend() {
|
|
23665
23649
|
var _this;
|
|
23666
|
-
_classCallCheck$
|
|
23650
|
+
_classCallCheck$9(this, Legend);
|
|
23667
23651
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23668
23652
|
args[_key] = arguments[_key];
|
|
23669
23653
|
}
|
|
23670
23654
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23671
|
-
_defineProperty$
|
|
23655
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23672
23656
|
boxWidth: -1,
|
|
23673
23657
|
boxHeight: -1
|
|
23674
23658
|
});
|
|
23675
23659
|
return _this;
|
|
23676
23660
|
}
|
|
23677
|
-
_createClass$
|
|
23661
|
+
_createClass$9(Legend, [{
|
|
23678
23662
|
key: "componentDidMount",
|
|
23679
23663
|
value: function componentDidMount() {
|
|
23680
23664
|
this.updateBBox();
|
|
@@ -23749,7 +23733,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23749
23733
|
};
|
|
23750
23734
|
}
|
|
23751
23735
|
}
|
|
23752
|
-
return _objectSpread$
|
|
23736
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23753
23737
|
}
|
|
23754
23738
|
}, {
|
|
23755
23739
|
key: "updateBBox",
|
|
@@ -23792,7 +23776,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23792
23776
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23793
23777
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23794
23778
|
payload = _this$props2.payload;
|
|
23795
|
-
var outerStyle = _objectSpread$
|
|
23779
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23796
23780
|
position: 'absolute',
|
|
23797
23781
|
width: width || 'auto',
|
|
23798
23782
|
height: height || 'auto'
|
|
@@ -23803,7 +23787,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23803
23787
|
ref: function ref(node) {
|
|
23804
23788
|
_this2.wrapperNode = node;
|
|
23805
23789
|
}
|
|
23806
|
-
}, renderContent$1(content, _objectSpread$
|
|
23790
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23807
23791
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23808
23792
|
})));
|
|
23809
23793
|
}
|
|
@@ -23826,8 +23810,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23826
23810
|
}]);
|
|
23827
23811
|
return Legend;
|
|
23828
23812
|
}(React$3.PureComponent);
|
|
23829
|
-
_defineProperty$
|
|
23830
|
-
_defineProperty$
|
|
23813
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23814
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23831
23815
|
iconSize: 14,
|
|
23832
23816
|
layout: 'horizontal',
|
|
23833
23817
|
align: 'center',
|
|
@@ -24391,13 +24375,13 @@ function setRafTimeout(callback) {
|
|
|
24391
24375
|
requestAnimationFrame(shouldUpdate);
|
|
24392
24376
|
}
|
|
24393
24377
|
|
|
24394
|
-
function _typeof$
|
|
24395
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24396
|
-
function _nonIterableRest$
|
|
24397
|
-
function _unsupportedIterableToArray$
|
|
24398
|
-
function _arrayLikeToArray$
|
|
24378
|
+
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); }
|
|
24379
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24380
|
+
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."); }
|
|
24381
|
+
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); }
|
|
24382
|
+
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; }
|
|
24399
24383
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24400
|
-
function _arrayWithHoles$
|
|
24384
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24401
24385
|
function createAnimateManager() {
|
|
24402
24386
|
var currStyle = {};
|
|
24403
24387
|
var handleChange = function handleChange() {
|
|
@@ -24424,7 +24408,7 @@ function createAnimateManager() {
|
|
|
24424
24408
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24425
24409
|
return;
|
|
24426
24410
|
}
|
|
24427
|
-
if (_typeof$
|
|
24411
|
+
if (_typeof$o(_style) === 'object') {
|
|
24428
24412
|
currStyle = _style;
|
|
24429
24413
|
handleChange(currStyle);
|
|
24430
24414
|
}
|
|
@@ -24451,12 +24435,12 @@ function createAnimateManager() {
|
|
|
24451
24435
|
};
|
|
24452
24436
|
}
|
|
24453
24437
|
|
|
24454
|
-
function _typeof$
|
|
24455
|
-
function ownKeys$
|
|
24456
|
-
function _objectSpread$
|
|
24457
|
-
function _defineProperty$
|
|
24458
|
-
function _toPropertyKey$
|
|
24459
|
-
function _toPrimitive$
|
|
24438
|
+
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); }
|
|
24439
|
+
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; }
|
|
24440
|
+
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; }
|
|
24441
|
+
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; }
|
|
24442
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24443
|
+
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); }
|
|
24460
24444
|
/* eslint no-console: 0 */
|
|
24461
24445
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24462
24446
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24488,7 +24472,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24488
24472
|
*/
|
|
24489
24473
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24490
24474
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24491
|
-
return _defineProperty$
|
|
24475
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24492
24476
|
}
|
|
24493
24477
|
var isTransition = name === 'transition';
|
|
24494
24478
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24499,7 +24483,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24499
24483
|
if (isTransition) {
|
|
24500
24484
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24501
24485
|
}
|
|
24502
|
-
return _objectSpread$
|
|
24486
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24503
24487
|
}, {});
|
|
24504
24488
|
};
|
|
24505
24489
|
|
|
@@ -24509,7 +24493,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24509
24493
|
*/
|
|
24510
24494
|
var mapObject = function mapObject(fn, obj) {
|
|
24511
24495
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24512
|
-
return _objectSpread$
|
|
24496
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24513
24497
|
}, {});
|
|
24514
24498
|
};
|
|
24515
24499
|
|
|
@@ -24519,7 +24503,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24519
24503
|
*/
|
|
24520
24504
|
var translateStyle = function translateStyle(style) {
|
|
24521
24505
|
return Object.keys(style).reduce(function (res, key) {
|
|
24522
|
-
return _objectSpread$
|
|
24506
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24523
24507
|
}, style);
|
|
24524
24508
|
};
|
|
24525
24509
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24547,16 +24531,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24547
24531
|
}
|
|
24548
24532
|
};
|
|
24549
24533
|
|
|
24550
|
-
function _slicedToArray$
|
|
24551
|
-
function _nonIterableRest$
|
|
24552
|
-
function _iterableToArrayLimit$
|
|
24553
|
-
function _arrayWithHoles$
|
|
24554
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24534
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24535
|
+
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."); }
|
|
24536
|
+
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; } }
|
|
24537
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24538
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24555
24539
|
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."); }
|
|
24556
|
-
function _unsupportedIterableToArray$
|
|
24540
|
+
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); }
|
|
24557
24541
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24558
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24559
|
-
function _arrayLikeToArray$
|
|
24542
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24543
|
+
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; }
|
|
24560
24544
|
var ACCURACY = 1e-4;
|
|
24561
24545
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24562
24546
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24632,7 +24616,7 @@ var configBezier = function configBezier() {
|
|
|
24632
24616
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24633
24617
|
return parseFloat(x);
|
|
24634
24618
|
});
|
|
24635
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24619
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24636
24620
|
x1 = _easing$1$split$0$spl2[0];
|
|
24637
24621
|
y1 = _easing$1$split$0$spl2[1];
|
|
24638
24622
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24725,22 +24709,22 @@ var configEasing = function configEasing() {
|
|
|
24725
24709
|
return null;
|
|
24726
24710
|
};
|
|
24727
24711
|
|
|
24728
|
-
function _typeof$
|
|
24729
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24712
|
+
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); }
|
|
24713
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24730
24714
|
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."); }
|
|
24731
24715
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24732
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24733
|
-
function ownKeys$
|
|
24734
|
-
function _objectSpread$
|
|
24735
|
-
function _defineProperty$
|
|
24736
|
-
function _toPropertyKey$
|
|
24737
|
-
function _toPrimitive$
|
|
24738
|
-
function _slicedToArray$
|
|
24739
|
-
function _nonIterableRest$
|
|
24740
|
-
function _unsupportedIterableToArray$
|
|
24741
|
-
function _arrayLikeToArray$
|
|
24742
|
-
function _iterableToArrayLimit$
|
|
24743
|
-
function _arrayWithHoles$
|
|
24716
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24717
|
+
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; }
|
|
24718
|
+
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; }
|
|
24719
|
+
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; }
|
|
24720
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24721
|
+
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); }
|
|
24722
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24723
|
+
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."); }
|
|
24724
|
+
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); }
|
|
24725
|
+
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; }
|
|
24726
|
+
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; } }
|
|
24727
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24744
24728
|
var alpha = function alpha(begin, end, k) {
|
|
24745
24729
|
return begin + (end - begin) * k;
|
|
24746
24730
|
};
|
|
@@ -24758,10 +24742,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24758
24742
|
var nextStepVals = mapObject(function (key, val) {
|
|
24759
24743
|
if (needContinue(val)) {
|
|
24760
24744
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24761
|
-
_easing2 = _slicedToArray$
|
|
24745
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24762
24746
|
newX = _easing2[0],
|
|
24763
24747
|
newV = _easing2[1];
|
|
24764
|
-
return _objectSpread$
|
|
24748
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24765
24749
|
from: newX,
|
|
24766
24750
|
velocity: newV
|
|
24767
24751
|
});
|
|
@@ -24771,7 +24755,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24771
24755
|
if (steps < 1) {
|
|
24772
24756
|
return mapObject(function (key, val) {
|
|
24773
24757
|
if (needContinue(val)) {
|
|
24774
|
-
return _objectSpread$
|
|
24758
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24775
24759
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24776
24760
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24777
24761
|
});
|
|
@@ -24786,10 +24770,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24786
24770
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24787
24771
|
var interKeys = getIntersectionKeys(from, to);
|
|
24788
24772
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24789
|
-
return _objectSpread$
|
|
24773
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24790
24774
|
}, {});
|
|
24791
24775
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24792
|
-
return _objectSpread$
|
|
24776
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24793
24777
|
from: from[key],
|
|
24794
24778
|
velocity: 0,
|
|
24795
24779
|
to: to[key]
|
|
@@ -24819,7 +24803,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24819
24803
|
var steps = deltaTime / easing.dt;
|
|
24820
24804
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24821
24805
|
// get union set and add compatible prefix
|
|
24822
|
-
render(_objectSpread$
|
|
24806
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24823
24807
|
preTime = now;
|
|
24824
24808
|
if (!shouldStopAnimation()) {
|
|
24825
24809
|
cafId = requestAnimationFrame(update);
|
|
@@ -24837,14 +24821,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24837
24821
|
}, timingStyle);
|
|
24838
24822
|
|
|
24839
24823
|
// get union set and add compatible prefix
|
|
24840
|
-
render(_objectSpread$
|
|
24824
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24841
24825
|
if (t < 1) {
|
|
24842
24826
|
cafId = requestAnimationFrame(update);
|
|
24843
24827
|
} else {
|
|
24844
24828
|
var finalStyle = mapObject(function (key, val) {
|
|
24845
24829
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24846
24830
|
}, timingStyle);
|
|
24847
|
-
render(_objectSpread$
|
|
24831
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24848
24832
|
}
|
|
24849
24833
|
};
|
|
24850
24834
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24860,37 +24844,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24860
24844
|
};
|
|
24861
24845
|
});
|
|
24862
24846
|
|
|
24863
|
-
function _typeof$
|
|
24864
|
-
var _excluded$
|
|
24865
|
-
function _objectWithoutProperties$
|
|
24866
|
-
function _objectWithoutPropertiesLoose$
|
|
24867
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24847
|
+
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); }
|
|
24848
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24849
|
+
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; }
|
|
24850
|
+
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; }
|
|
24851
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24868
24852
|
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."); }
|
|
24869
|
-
function _unsupportedIterableToArray$
|
|
24853
|
+
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); }
|
|
24870
24854
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24871
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24872
|
-
function _arrayLikeToArray$
|
|
24873
|
-
function ownKeys$
|
|
24874
|
-
function _objectSpread$
|
|
24875
|
-
function _defineProperty$
|
|
24876
|
-
function _classCallCheck$
|
|
24877
|
-
function _defineProperties$
|
|
24878
|
-
function _createClass$
|
|
24879
|
-
function _toPropertyKey$
|
|
24880
|
-
function _toPrimitive$
|
|
24881
|
-
function _inherits$
|
|
24882
|
-
function _setPrototypeOf$
|
|
24883
|
-
function _createSuper$
|
|
24884
|
-
function _possibleConstructorReturn$
|
|
24885
|
-
function _assertThisInitialized$
|
|
24886
|
-
function _isNativeReflectConstruct$
|
|
24887
|
-
function _getPrototypeOf$
|
|
24855
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24856
|
+
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; }
|
|
24857
|
+
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; }
|
|
24858
|
+
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; }
|
|
24859
|
+
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; }
|
|
24860
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24861
|
+
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); } }
|
|
24862
|
+
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; }
|
|
24863
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24864
|
+
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); }
|
|
24865
|
+
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); }
|
|
24866
|
+
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); }
|
|
24867
|
+
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); }; }
|
|
24868
|
+
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); }
|
|
24869
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24870
|
+
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; } }
|
|
24871
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24888
24872
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24889
|
-
_inherits$
|
|
24890
|
-
var _super = _createSuper$
|
|
24873
|
+
_inherits$6(Animate, _PureComponent);
|
|
24874
|
+
var _super = _createSuper$6(Animate);
|
|
24891
24875
|
function Animate(props, context) {
|
|
24892
24876
|
var _this;
|
|
24893
|
-
_classCallCheck$
|
|
24877
|
+
_classCallCheck$8(this, Animate);
|
|
24894
24878
|
_this = _super.call(this, props, context);
|
|
24895
24879
|
var _this$props = _this.props,
|
|
24896
24880
|
isActive = _this$props.isActive,
|
|
@@ -24900,8 +24884,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24900
24884
|
steps = _this$props.steps,
|
|
24901
24885
|
children = _this$props.children,
|
|
24902
24886
|
duration = _this$props.duration;
|
|
24903
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24904
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24887
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24888
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24905
24889
|
if (!isActive || duration <= 0) {
|
|
24906
24890
|
_this.state = {
|
|
24907
24891
|
style: {}
|
|
@@ -24913,7 +24897,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24913
24897
|
style: to
|
|
24914
24898
|
};
|
|
24915
24899
|
}
|
|
24916
|
-
return _possibleConstructorReturn$
|
|
24900
|
+
return _possibleConstructorReturn$6(_this);
|
|
24917
24901
|
}
|
|
24918
24902
|
if (steps && steps.length) {
|
|
24919
24903
|
_this.state = {
|
|
@@ -24924,10 +24908,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24924
24908
|
_this.state = {
|
|
24925
24909
|
style: from
|
|
24926
24910
|
};
|
|
24927
|
-
return _possibleConstructorReturn$
|
|
24911
|
+
return _possibleConstructorReturn$6(_this);
|
|
24928
24912
|
}
|
|
24929
24913
|
_this.state = {
|
|
24930
|
-
style: attributeName ? _defineProperty$
|
|
24914
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24931
24915
|
};
|
|
24932
24916
|
} else {
|
|
24933
24917
|
_this.state = {
|
|
@@ -24936,7 +24920,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24936
24920
|
}
|
|
24937
24921
|
return _this;
|
|
24938
24922
|
}
|
|
24939
|
-
_createClass$
|
|
24923
|
+
_createClass$8(Animate, [{
|
|
24940
24924
|
key: "componentDidMount",
|
|
24941
24925
|
value: function componentDidMount() {
|
|
24942
24926
|
var _this$props2 = this.props,
|
|
@@ -24964,7 +24948,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24964
24948
|
}
|
|
24965
24949
|
if (!isActive) {
|
|
24966
24950
|
var newState = {
|
|
24967
|
-
style: attributeName ? _defineProperty$
|
|
24951
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24968
24952
|
};
|
|
24969
24953
|
if (this.state && style) {
|
|
24970
24954
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24987,14 +24971,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24987
24971
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24988
24972
|
if (this.state && style) {
|
|
24989
24973
|
var _newState = {
|
|
24990
|
-
style: attributeName ? _defineProperty$
|
|
24974
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24991
24975
|
};
|
|
24992
24976
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24993
24977
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24994
24978
|
this.setState(_newState);
|
|
24995
24979
|
}
|
|
24996
24980
|
}
|
|
24997
|
-
this.runAnimation(_objectSpread$
|
|
24981
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24998
24982
|
from: from,
|
|
24999
24983
|
begin: 0
|
|
25000
24984
|
}));
|
|
@@ -25077,7 +25061,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25077
25061
|
}), duration]);
|
|
25078
25062
|
}
|
|
25079
25063
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25080
|
-
var newStyle = _objectSpread$
|
|
25064
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25081
25065
|
transition: transition
|
|
25082
25066
|
});
|
|
25083
25067
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25109,9 +25093,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25109
25093
|
this.runStepAnimation(props);
|
|
25110
25094
|
return;
|
|
25111
25095
|
}
|
|
25112
|
-
var to = attributeName ? _defineProperty$
|
|
25096
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25113
25097
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25114
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25098
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25115
25099
|
transition: transition
|
|
25116
25100
|
}), duration, onAnimationEnd]);
|
|
25117
25101
|
}
|
|
@@ -25132,7 +25116,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25132
25116
|
_this$props4.onAnimationEnd;
|
|
25133
25117
|
_this$props4.shouldReAnimate;
|
|
25134
25118
|
_this$props4.onAnimationReStart;
|
|
25135
|
-
var others = _objectWithoutProperties$
|
|
25119
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25136
25120
|
var count = React$3.Children.count(children);
|
|
25137
25121
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25138
25122
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25147,8 +25131,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25147
25131
|
_container$props$styl = _container$props.style,
|
|
25148
25132
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25149
25133
|
className = _container$props.className;
|
|
25150
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25151
|
-
style: _objectSpread$
|
|
25134
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25135
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25152
25136
|
className: className
|
|
25153
25137
|
}));
|
|
25154
25138
|
return res;
|
|
@@ -25673,10 +25657,10 @@ var defineProperty$2 = (function() {
|
|
|
25673
25657
|
} catch (e) {}
|
|
25674
25658
|
}());
|
|
25675
25659
|
|
|
25676
|
-
var _defineProperty$
|
|
25660
|
+
var _defineProperty$l = defineProperty$2;
|
|
25677
25661
|
|
|
25678
25662
|
var constant$1 = constant_1,
|
|
25679
|
-
defineProperty$1 = _defineProperty$
|
|
25663
|
+
defineProperty$1 = _defineProperty$l,
|
|
25680
25664
|
identity$7 = identity_1;
|
|
25681
25665
|
|
|
25682
25666
|
/**
|
|
@@ -25853,18 +25837,18 @@ var sortBy_1 = sortBy;
|
|
|
25853
25837
|
/**
|
|
25854
25838
|
* @fileOverview Default Tooltip Content
|
|
25855
25839
|
*/
|
|
25856
|
-
function _typeof$
|
|
25857
|
-
function _slicedToArray$
|
|
25858
|
-
function _nonIterableRest$
|
|
25859
|
-
function _unsupportedIterableToArray$
|
|
25860
|
-
function _arrayLikeToArray$
|
|
25861
|
-
function _iterableToArrayLimit$
|
|
25862
|
-
function _arrayWithHoles$
|
|
25863
|
-
function ownKeys$
|
|
25864
|
-
function _objectSpread$
|
|
25865
|
-
function _defineProperty$
|
|
25866
|
-
function _toPropertyKey$
|
|
25867
|
-
function _toPrimitive$
|
|
25840
|
+
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); }
|
|
25841
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25842
|
+
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."); }
|
|
25843
|
+
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); }
|
|
25844
|
+
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; }
|
|
25845
|
+
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; } }
|
|
25846
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25847
|
+
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; }
|
|
25848
|
+
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; }
|
|
25849
|
+
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; }
|
|
25850
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25851
|
+
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); }
|
|
25868
25852
|
function defaultFormatter(value) {
|
|
25869
25853
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25870
25854
|
}
|
|
@@ -25894,7 +25878,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25894
25878
|
if (entry.type === 'none') {
|
|
25895
25879
|
return null;
|
|
25896
25880
|
}
|
|
25897
|
-
var finalItemStyle = _objectSpread$
|
|
25881
|
+
var finalItemStyle = _objectSpread$j({
|
|
25898
25882
|
display: 'block',
|
|
25899
25883
|
paddingTop: 4,
|
|
25900
25884
|
paddingBottom: 4,
|
|
@@ -25908,7 +25892,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25908
25892
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25909
25893
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25910
25894
|
if (Array.isArray(formatted)) {
|
|
25911
|
-
var _formatted = _slicedToArray$
|
|
25895
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25912
25896
|
finalValue = _formatted[0];
|
|
25913
25897
|
finalName = _formatted[1];
|
|
25914
25898
|
} else {
|
|
@@ -25940,14 +25924,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25940
25924
|
}
|
|
25941
25925
|
return null;
|
|
25942
25926
|
};
|
|
25943
|
-
var finalStyle = _objectSpread$
|
|
25927
|
+
var finalStyle = _objectSpread$j({
|
|
25944
25928
|
margin: 0,
|
|
25945
25929
|
padding: 10,
|
|
25946
25930
|
backgroundColor: '#fff',
|
|
25947
25931
|
border: '1px solid #ccc',
|
|
25948
25932
|
whiteSpace: 'nowrap'
|
|
25949
25933
|
}, contentStyle);
|
|
25950
|
-
var finalLabelStyle = _objectSpread$
|
|
25934
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25951
25935
|
margin: 0
|
|
25952
25936
|
}, labelStyle);
|
|
25953
25937
|
var hasLabel = !isNil_1(label);
|
|
@@ -25988,22 +25972,18 @@ var Global = {
|
|
|
25988
25972
|
}
|
|
25989
25973
|
};
|
|
25990
25974
|
|
|
25991
|
-
function _typeof$
|
|
25992
|
-
function ownKeys$
|
|
25993
|
-
function _objectSpread$
|
|
25994
|
-
function
|
|
25995
|
-
function
|
|
25996
|
-
function
|
|
25997
|
-
function
|
|
25998
|
-
function
|
|
25999
|
-
function
|
|
26000
|
-
function
|
|
26001
|
-
function
|
|
26002
|
-
function
|
|
26003
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26004
|
-
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; }
|
|
26005
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26006
|
-
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); }
|
|
25975
|
+
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); }
|
|
25976
|
+
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; }
|
|
25977
|
+
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; }
|
|
25978
|
+
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; }
|
|
25979
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25980
|
+
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); }
|
|
25981
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25982
|
+
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."); }
|
|
25983
|
+
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); }
|
|
25984
|
+
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; }
|
|
25985
|
+
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; } }
|
|
25986
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26007
25987
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26008
25988
|
var EPS$1 = 1;
|
|
26009
25989
|
function defaultUniqBy(entry) {
|
|
@@ -26027,204 +26007,7 @@ function renderContent(content, props) {
|
|
|
26027
26007
|
}
|
|
26028
26008
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26029
26009
|
}
|
|
26030
|
-
var
|
|
26031
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26032
|
-
var _super = _createSuper$6(Tooltip);
|
|
26033
|
-
function Tooltip() {
|
|
26034
|
-
var _this;
|
|
26035
|
-
_classCallCheck$8(this, Tooltip);
|
|
26036
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26037
|
-
args[_key] = arguments[_key];
|
|
26038
|
-
}
|
|
26039
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26040
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26041
|
-
boxWidth: -1,
|
|
26042
|
-
boxHeight: -1,
|
|
26043
|
-
dismissed: false,
|
|
26044
|
-
dismissedAtCoordinate: {
|
|
26045
|
-
x: 0,
|
|
26046
|
-
y: 0
|
|
26047
|
-
}
|
|
26048
|
-
});
|
|
26049
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26050
|
-
if (event.key === 'Escape') {
|
|
26051
|
-
_this.setState({
|
|
26052
|
-
dismissed: true,
|
|
26053
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26054
|
-
x: _this.props.coordinate.x,
|
|
26055
|
-
y: _this.props.coordinate.y
|
|
26056
|
-
})
|
|
26057
|
-
});
|
|
26058
|
-
}
|
|
26059
|
-
});
|
|
26060
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26061
|
-
var key = _ref.key,
|
|
26062
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26063
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26064
|
-
var _this$props = _this.props,
|
|
26065
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26066
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26067
|
-
coordinate = _this$props.coordinate,
|
|
26068
|
-
offset = _this$props.offset,
|
|
26069
|
-
position = _this$props.position,
|
|
26070
|
-
viewBox = _this$props.viewBox;
|
|
26071
|
-
if (position && isNumber(position[key])) {
|
|
26072
|
-
return position[key];
|
|
26073
|
-
}
|
|
26074
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26075
|
-
var positive = coordinate[key] + offset;
|
|
26076
|
-
if (allowEscapeViewBox[key]) {
|
|
26077
|
-
return reverseDirection[key] ? negative : positive;
|
|
26078
|
-
}
|
|
26079
|
-
if (reverseDirection[key]) {
|
|
26080
|
-
var _tooltipBoundary = negative;
|
|
26081
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26082
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26083
|
-
return Math.max(positive, viewBox[key]);
|
|
26084
|
-
}
|
|
26085
|
-
return Math.max(negative, viewBox[key]);
|
|
26086
|
-
}
|
|
26087
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26088
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26089
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26090
|
-
return Math.max(negative, viewBox[key]);
|
|
26091
|
-
}
|
|
26092
|
-
return Math.max(positive, viewBox[key]);
|
|
26093
|
-
});
|
|
26094
|
-
return _this;
|
|
26095
|
-
}
|
|
26096
|
-
_createClass$8(Tooltip, [{
|
|
26097
|
-
key: "componentDidMount",
|
|
26098
|
-
value: function componentDidMount() {
|
|
26099
|
-
this.updateBBox();
|
|
26100
|
-
}
|
|
26101
|
-
}, {
|
|
26102
|
-
key: "componentWillUnmount",
|
|
26103
|
-
value: function componentWillUnmount() {
|
|
26104
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26105
|
-
}
|
|
26106
|
-
}, {
|
|
26107
|
-
key: "componentDidUpdate",
|
|
26108
|
-
value: function componentDidUpdate() {
|
|
26109
|
-
this.updateBBox();
|
|
26110
|
-
}
|
|
26111
|
-
}, {
|
|
26112
|
-
key: "updateBBox",
|
|
26113
|
-
value: function updateBBox() {
|
|
26114
|
-
var _this$state = this.state,
|
|
26115
|
-
boxWidth = _this$state.boxWidth,
|
|
26116
|
-
boxHeight = _this$state.boxHeight,
|
|
26117
|
-
dismissed = _this$state.dismissed;
|
|
26118
|
-
if (dismissed) {
|
|
26119
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26120
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26121
|
-
this.setState({
|
|
26122
|
-
dismissed: false
|
|
26123
|
-
});
|
|
26124
|
-
}
|
|
26125
|
-
} else {
|
|
26126
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26127
|
-
}
|
|
26128
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26129
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26130
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26131
|
-
this.setState({
|
|
26132
|
-
boxWidth: box.width,
|
|
26133
|
-
boxHeight: box.height
|
|
26134
|
-
});
|
|
26135
|
-
}
|
|
26136
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26137
|
-
this.setState({
|
|
26138
|
-
boxWidth: -1,
|
|
26139
|
-
boxHeight: -1
|
|
26140
|
-
});
|
|
26141
|
-
}
|
|
26142
|
-
}
|
|
26143
|
-
}, {
|
|
26144
|
-
key: "render",
|
|
26145
|
-
value: function render() {
|
|
26146
|
-
var _classNames,
|
|
26147
|
-
_this2 = this;
|
|
26148
|
-
var _this$props2 = this.props,
|
|
26149
|
-
payload = _this$props2.payload,
|
|
26150
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26151
|
-
animationDuration = _this$props2.animationDuration,
|
|
26152
|
-
animationEasing = _this$props2.animationEasing,
|
|
26153
|
-
filterNull = _this$props2.filterNull,
|
|
26154
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26155
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26156
|
-
return !isNil_1(entry.value);
|
|
26157
|
-
}) : payload);
|
|
26158
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26159
|
-
var _this$props3 = this.props,
|
|
26160
|
-
content = _this$props3.content,
|
|
26161
|
-
viewBox = _this$props3.viewBox,
|
|
26162
|
-
coordinate = _this$props3.coordinate,
|
|
26163
|
-
position = _this$props3.position,
|
|
26164
|
-
active = _this$props3.active,
|
|
26165
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26166
|
-
var outerStyle = _objectSpread$l({
|
|
26167
|
-
pointerEvents: 'none',
|
|
26168
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26169
|
-
position: 'absolute',
|
|
26170
|
-
top: 0,
|
|
26171
|
-
left: 0
|
|
26172
|
-
}, wrapperStyle);
|
|
26173
|
-
var translateX, translateY;
|
|
26174
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26175
|
-
translateX = position.x;
|
|
26176
|
-
translateY = position.y;
|
|
26177
|
-
} else {
|
|
26178
|
-
var _this$state2 = this.state,
|
|
26179
|
-
boxWidth = _this$state2.boxWidth,
|
|
26180
|
-
boxHeight = _this$state2.boxHeight;
|
|
26181
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26182
|
-
translateX = this.getTranslate({
|
|
26183
|
-
key: 'x',
|
|
26184
|
-
tooltipDimension: boxWidth,
|
|
26185
|
-
viewBoxDimension: viewBox.width
|
|
26186
|
-
});
|
|
26187
|
-
translateY = this.getTranslate({
|
|
26188
|
-
key: 'y',
|
|
26189
|
-
tooltipDimension: boxHeight,
|
|
26190
|
-
viewBoxDimension: viewBox.height
|
|
26191
|
-
});
|
|
26192
|
-
} else {
|
|
26193
|
-
outerStyle.visibility = 'hidden';
|
|
26194
|
-
}
|
|
26195
|
-
}
|
|
26196
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26197
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26198
|
-
})), outerStyle);
|
|
26199
|
-
if (isAnimationActive && active) {
|
|
26200
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26201
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26202
|
-
})), outerStyle);
|
|
26203
|
-
}
|
|
26204
|
-
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));
|
|
26205
|
-
return (
|
|
26206
|
-
/*#__PURE__*/
|
|
26207
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26208
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26209
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26210
|
-
React__default["default"].createElement("div", {
|
|
26211
|
-
tabIndex: -1,
|
|
26212
|
-
role: "dialog",
|
|
26213
|
-
className: cls,
|
|
26214
|
-
style: outerStyle,
|
|
26215
|
-
ref: function ref(node) {
|
|
26216
|
-
_this2.wrapperNode = node;
|
|
26217
|
-
}
|
|
26218
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26219
|
-
payload: finalPayload
|
|
26220
|
-
})))
|
|
26221
|
-
);
|
|
26222
|
-
}
|
|
26223
|
-
}]);
|
|
26224
|
-
return Tooltip;
|
|
26225
|
-
}(React$3.PureComponent);
|
|
26226
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26227
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26010
|
+
var tooltipDefaultProps = {
|
|
26228
26011
|
active: false,
|
|
26229
26012
|
allowEscapeViewBox: {
|
|
26230
26013
|
x: false,
|
|
@@ -26245,6 +26028,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26245
26028
|
x: 0,
|
|
26246
26029
|
y: 0
|
|
26247
26030
|
},
|
|
26031
|
+
// this doesn't exist on TooltipProps
|
|
26032
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26033
|
+
// @ts-ignore
|
|
26248
26034
|
cursorStyle: {},
|
|
26249
26035
|
separator: ' : ',
|
|
26250
26036
|
wrapperStyle: {},
|
|
@@ -26258,7 +26044,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26258
26044
|
animationDuration: 400,
|
|
26259
26045
|
filterNull: true,
|
|
26260
26046
|
useTranslate3d: false
|
|
26261
|
-
}
|
|
26047
|
+
};
|
|
26048
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26049
|
+
var _classNames;
|
|
26050
|
+
var _useState = React$3.useState(-1),
|
|
26051
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26052
|
+
boxWidth = _useState2[0],
|
|
26053
|
+
setBoxWidth = _useState2[1];
|
|
26054
|
+
var _useState3 = React$3.useState(-1),
|
|
26055
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26056
|
+
boxHeight = _useState4[0],
|
|
26057
|
+
setBoxHeight = _useState4[1];
|
|
26058
|
+
var _useState5 = React$3.useState(false),
|
|
26059
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26060
|
+
dismissed = _useState6[0],
|
|
26061
|
+
setDismissed = _useState6[1];
|
|
26062
|
+
var _useState7 = React$3.useState({
|
|
26063
|
+
x: 0,
|
|
26064
|
+
y: 0
|
|
26065
|
+
}),
|
|
26066
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26067
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26068
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26069
|
+
var wrapperNode = React$3.useRef();
|
|
26070
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26071
|
+
reverseDirection = props.reverseDirection,
|
|
26072
|
+
coordinate = props.coordinate,
|
|
26073
|
+
offset = props.offset,
|
|
26074
|
+
position = props.position,
|
|
26075
|
+
viewBox = props.viewBox;
|
|
26076
|
+
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26077
|
+
if (event.key === 'Escape') {
|
|
26078
|
+
setDismissed(true);
|
|
26079
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26080
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26081
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26082
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26083
|
+
});
|
|
26084
|
+
});
|
|
26085
|
+
}
|
|
26086
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26087
|
+
React$3.useEffect(function () {
|
|
26088
|
+
var updateBBox = function updateBBox() {
|
|
26089
|
+
if (dismissed) {
|
|
26090
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26091
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26092
|
+
setDismissed(false);
|
|
26093
|
+
}
|
|
26094
|
+
} else {
|
|
26095
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26096
|
+
}
|
|
26097
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26098
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26099
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26100
|
+
setBoxWidth(box.width);
|
|
26101
|
+
setBoxHeight(box.height);
|
|
26102
|
+
}
|
|
26103
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26104
|
+
setBoxWidth(-1);
|
|
26105
|
+
setBoxHeight(-1);
|
|
26106
|
+
}
|
|
26107
|
+
};
|
|
26108
|
+
updateBBox();
|
|
26109
|
+
return function () {
|
|
26110
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26111
|
+
};
|
|
26112
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26113
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26114
|
+
var key = _ref.key,
|
|
26115
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26116
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26117
|
+
if (position && isNumber(position[key])) {
|
|
26118
|
+
return position[key];
|
|
26119
|
+
}
|
|
26120
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26121
|
+
var positive = coordinate[key] + offset;
|
|
26122
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26123
|
+
return reverseDirection[key] ? negative : positive;
|
|
26124
|
+
}
|
|
26125
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26126
|
+
var _tooltipBoundary = negative;
|
|
26127
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26128
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26129
|
+
return Math.max(positive, viewBox[key]);
|
|
26130
|
+
}
|
|
26131
|
+
return Math.max(negative, viewBox[key]);
|
|
26132
|
+
}
|
|
26133
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26134
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26135
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26136
|
+
return Math.max(negative, viewBox[key]);
|
|
26137
|
+
}
|
|
26138
|
+
return Math.max(positive, viewBox[key]);
|
|
26139
|
+
};
|
|
26140
|
+
var payload = props.payload,
|
|
26141
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26142
|
+
filterNull = props.filterNull,
|
|
26143
|
+
active = props.active,
|
|
26144
|
+
wrapperStyle = props.wrapperStyle,
|
|
26145
|
+
useTranslate3d = props.useTranslate3d,
|
|
26146
|
+
isAnimationActive = props.isAnimationActive,
|
|
26147
|
+
animationDuration = props.animationDuration,
|
|
26148
|
+
animationEasing = props.animationEasing;
|
|
26149
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26150
|
+
return !isNil_1(entry.value);
|
|
26151
|
+
}) : payload);
|
|
26152
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26153
|
+
var content = props.content;
|
|
26154
|
+
var outerStyle = _objectSpread$i({
|
|
26155
|
+
pointerEvents: 'none',
|
|
26156
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26157
|
+
position: 'absolute',
|
|
26158
|
+
top: 0,
|
|
26159
|
+
left: 0
|
|
26160
|
+
}, wrapperStyle);
|
|
26161
|
+
var translateX, translateY;
|
|
26162
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26163
|
+
translateX = position.x;
|
|
26164
|
+
translateY = position.y;
|
|
26165
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26166
|
+
translateX = getTranslate({
|
|
26167
|
+
key: 'x',
|
|
26168
|
+
tooltipDimension: boxWidth,
|
|
26169
|
+
viewBoxDimension: viewBox.width
|
|
26170
|
+
});
|
|
26171
|
+
translateY = getTranslate({
|
|
26172
|
+
key: 'y',
|
|
26173
|
+
tooltipDimension: boxHeight,
|
|
26174
|
+
viewBoxDimension: viewBox.height
|
|
26175
|
+
});
|
|
26176
|
+
} else {
|
|
26177
|
+
outerStyle.visibility = 'hidden';
|
|
26178
|
+
}
|
|
26179
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26180
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26181
|
+
})), outerStyle);
|
|
26182
|
+
if (isAnimationActive && active) {
|
|
26183
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26184
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26185
|
+
})), outerStyle);
|
|
26186
|
+
}
|
|
26187
|
+
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));
|
|
26188
|
+
return (
|
|
26189
|
+
/*#__PURE__*/
|
|
26190
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26191
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26192
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26193
|
+
React__default["default"].createElement("div", {
|
|
26194
|
+
tabIndex: -1,
|
|
26195
|
+
role: "dialog",
|
|
26196
|
+
className: cls,
|
|
26197
|
+
style: outerStyle,
|
|
26198
|
+
ref: wrapperNode
|
|
26199
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26200
|
+
payload: finalPayload
|
|
26201
|
+
})))
|
|
26202
|
+
);
|
|
26203
|
+
};
|
|
26204
|
+
|
|
26205
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26206
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26207
|
+
|
|
26208
|
+
/**
|
|
26209
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26210
|
+
* children.props when there are no props set by the consumer
|
|
26211
|
+
* doesn't work if using default parameters
|
|
26212
|
+
*/
|
|
26213
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26262
26214
|
|
|
26263
26215
|
var root = _root;
|
|
26264
26216
|
|
|
@@ -31828,12 +31780,12 @@ module.exports = exports['default'];
|
|
|
31828
31780
|
|
|
31829
31781
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31830
31782
|
|
|
31831
|
-
function _typeof$
|
|
31832
|
-
function ownKeys$
|
|
31833
|
-
function _objectSpread$
|
|
31834
|
-
function _defineProperty$
|
|
31835
|
-
function _toPropertyKey$
|
|
31836
|
-
function _toPrimitive$
|
|
31783
|
+
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); }
|
|
31784
|
+
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; }
|
|
31785
|
+
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; }
|
|
31786
|
+
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; }
|
|
31787
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31788
|
+
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); }
|
|
31837
31789
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31838
31790
|
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."); }
|
|
31839
31791
|
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); }
|
|
@@ -31901,7 +31853,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31901
31853
|
}
|
|
31902
31854
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31903
31855
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31904
|
-
var measurementSpanStyle = _objectSpread$
|
|
31856
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31905
31857
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31906
31858
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31907
31859
|
return styleKey;
|
|
@@ -31956,11 +31908,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31956
31908
|
};
|
|
31957
31909
|
};
|
|
31958
31910
|
|
|
31959
|
-
var _excluded$
|
|
31960
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31911
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31961
31912
|
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); }
|
|
31962
|
-
function _objectWithoutProperties$
|
|
31963
|
-
function _objectWithoutPropertiesLoose$
|
|
31913
|
+
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; }
|
|
31914
|
+
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; }
|
|
31964
31915
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31965
31916
|
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."); }
|
|
31966
31917
|
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); }
|
|
@@ -32114,46 +32065,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32114
32065
|
}
|
|
32115
32066
|
return getWordsWithoutCalculate(children);
|
|
32116
32067
|
};
|
|
32117
|
-
var
|
|
32118
|
-
|
|
32119
|
-
|
|
32120
|
-
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32127
|
-
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32131
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32132
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32133
|
-
_ref5$fill = _ref5.fill,
|
|
32134
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32135
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32068
|
+
var textDefaultProps = {
|
|
32069
|
+
x: 0,
|
|
32070
|
+
y: 0,
|
|
32071
|
+
lineHeight: '1em',
|
|
32072
|
+
capHeight: '0.71em',
|
|
32073
|
+
// Magic number from d3
|
|
32074
|
+
scaleToFit: false,
|
|
32075
|
+
textAnchor: 'start',
|
|
32076
|
+
verticalAnchor: 'end',
|
|
32077
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32078
|
+
fill: '#808080'
|
|
32079
|
+
};
|
|
32080
|
+
var Text = function Text(props) {
|
|
32136
32081
|
var wordsByLines = React$3.useMemo(function () {
|
|
32137
32082
|
return getWordsByLines({
|
|
32138
32083
|
breakAll: props.breakAll,
|
|
32139
32084
|
children: props.children,
|
|
32140
32085
|
maxLines: props.maxLines,
|
|
32141
|
-
scaleToFit: scaleToFit,
|
|
32086
|
+
scaleToFit: props.scaleToFit,
|
|
32142
32087
|
style: props.style,
|
|
32143
32088
|
width: props.width
|
|
32144
32089
|
});
|
|
32145
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32090
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32146
32091
|
var dx = props.dx,
|
|
32147
32092
|
dy = props.dy,
|
|
32093
|
+
textAnchor = props.textAnchor,
|
|
32094
|
+
verticalAnchor = props.verticalAnchor,
|
|
32095
|
+
scaleToFit = props.scaleToFit,
|
|
32148
32096
|
angle = props.angle,
|
|
32097
|
+
lineHeight = props.lineHeight,
|
|
32098
|
+
capHeight = props.capHeight,
|
|
32149
32099
|
className = props.className,
|
|
32150
32100
|
breakAll = props.breakAll,
|
|
32151
|
-
textProps = _objectWithoutProperties$
|
|
32152
|
-
if (!isNumOrStr(
|
|
32101
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32102
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32153
32103
|
return null;
|
|
32154
32104
|
}
|
|
32155
|
-
var x =
|
|
32156
|
-
var y =
|
|
32105
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32106
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32157
32107
|
var startDy;
|
|
32158
32108
|
switch (verticalAnchor) {
|
|
32159
32109
|
case 'start':
|
|
@@ -32183,7 +32133,7 @@ var Text = function Text(_ref5) {
|
|
|
32183
32133
|
y: y,
|
|
32184
32134
|
className: classNames('recharts-text', className),
|
|
32185
32135
|
textAnchor: textAnchor,
|
|
32186
|
-
fill: fill.includes('url') ?
|
|
32136
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32187
32137
|
}), wordsByLines.map(function (line, index) {
|
|
32188
32138
|
return (
|
|
32189
32139
|
/*#__PURE__*/
|
|
@@ -32196,6 +32146,7 @@ var Text = function Text(_ref5) {
|
|
|
32196
32146
|
);
|
|
32197
32147
|
}));
|
|
32198
32148
|
};
|
|
32149
|
+
Text.defaultProps = textDefaultProps;
|
|
32199
32150
|
|
|
32200
32151
|
var baseIsEqual = _baseIsEqual;
|
|
32201
32152
|
|
|
@@ -38463,7 +38414,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38463
38414
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38464
38415
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38465
38416
|
|
|
38466
|
-
var _excluded$
|
|
38417
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38467
38418
|
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); }
|
|
38468
38419
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38469
38420
|
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."); }
|
|
@@ -38471,8 +38422,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38471
38422
|
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; }
|
|
38472
38423
|
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; } }
|
|
38473
38424
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38474
|
-
function _objectWithoutProperties$
|
|
38475
|
-
function _objectWithoutPropertiesLoose$
|
|
38425
|
+
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; }
|
|
38426
|
+
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; }
|
|
38476
38427
|
function ErrorBar(props) {
|
|
38477
38428
|
var offset = props.offset,
|
|
38478
38429
|
layout = props.layout,
|
|
@@ -38482,7 +38433,7 @@ function ErrorBar(props) {
|
|
|
38482
38433
|
dataPointFormatter = props.dataPointFormatter,
|
|
38483
38434
|
xAxis = props.xAxis,
|
|
38484
38435
|
yAxis = props.yAxis,
|
|
38485
|
-
others = _objectWithoutProperties$
|
|
38436
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38486
38437
|
var svgProps = filterProps(others);
|
|
38487
38438
|
var errorBars = data.map(function (entry, i) {
|
|
38488
38439
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38593,18 +38544,18 @@ ErrorBar.defaultProps = {
|
|
|
38593
38544
|
};
|
|
38594
38545
|
ErrorBar.displayName = 'ErrorBar';
|
|
38595
38546
|
|
|
38596
|
-
function _typeof$
|
|
38547
|
+
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); }
|
|
38597
38548
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38598
38549
|
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."); }
|
|
38599
38550
|
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); }
|
|
38600
38551
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38601
38552
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38602
38553
|
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; }
|
|
38603
|
-
function ownKeys$
|
|
38604
|
-
function _objectSpread$
|
|
38605
|
-
function _defineProperty$
|
|
38606
|
-
function _toPropertyKey$
|
|
38607
|
-
function _toPrimitive$
|
|
38554
|
+
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; }
|
|
38555
|
+
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; }
|
|
38556
|
+
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; }
|
|
38557
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38558
|
+
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); }
|
|
38608
38559
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38609
38560
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38610
38561
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38775,7 +38726,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38775
38726
|
};
|
|
38776
38727
|
});
|
|
38777
38728
|
}
|
|
38778
|
-
return _objectSpread$
|
|
38729
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38779
38730
|
payload: legendData,
|
|
38780
38731
|
item: legendItem
|
|
38781
38732
|
});
|
|
@@ -38929,10 +38880,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38929
38880
|
verticalAlign = legendProps.verticalAlign,
|
|
38930
38881
|
layout = legendProps.layout;
|
|
38931
38882
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38932
|
-
newOffset = _objectSpread$
|
|
38883
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38933
38884
|
}
|
|
38934
38885
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38935
|
-
newOffset = _objectSpread$
|
|
38886
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38936
38887
|
}
|
|
38937
38888
|
}
|
|
38938
38889
|
return newOffset;
|
|
@@ -39358,14 +39309,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39358
39309
|
items: [item]
|
|
39359
39310
|
};
|
|
39360
39311
|
}
|
|
39361
|
-
return _objectSpread$
|
|
39312
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39362
39313
|
}, {});
|
|
39363
39314
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39364
39315
|
var group = stackGroups[axisId];
|
|
39365
39316
|
if (group.hasStack) {
|
|
39366
39317
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39367
39318
|
var g = group.stackGroups[stackId];
|
|
39368
|
-
return _objectSpread$
|
|
39319
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39369
39320
|
numericAxisId: numericAxisId,
|
|
39370
39321
|
cateAxisId: cateAxisId,
|
|
39371
39322
|
items: g.items,
|
|
@@ -39373,7 +39324,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39373
39324
|
}));
|
|
39374
39325
|
}, {});
|
|
39375
39326
|
}
|
|
39376
|
-
return _objectSpread$
|
|
39327
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39377
39328
|
}, {});
|
|
39378
39329
|
};
|
|
39379
39330
|
|
|
@@ -39587,7 +39538,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39587
39538
|
formatter = _graphicalItem$props.formatter,
|
|
39588
39539
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39589
39540
|
chartType = _graphicalItem$props.chartType;
|
|
39590
|
-
return _objectSpread$
|
|
39541
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39591
39542
|
dataKey: dataKey,
|
|
39592
39543
|
unit: unit,
|
|
39593
39544
|
formatter: formatter,
|
|
@@ -39600,12 +39551,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39600
39551
|
});
|
|
39601
39552
|
};
|
|
39602
39553
|
|
|
39603
|
-
function _typeof$
|
|
39604
|
-
function ownKeys$
|
|
39605
|
-
function _objectSpread$
|
|
39606
|
-
function _defineProperty$
|
|
39607
|
-
function _toPropertyKey$
|
|
39608
|
-
function _toPrimitive$
|
|
39554
|
+
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); }
|
|
39555
|
+
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; }
|
|
39556
|
+
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; }
|
|
39557
|
+
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; }
|
|
39558
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39559
|
+
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); }
|
|
39609
39560
|
var RADIAN = Math.PI / 180;
|
|
39610
39561
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39611
39562
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39710,7 +39661,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39710
39661
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39711
39662
|
}
|
|
39712
39663
|
if (inRange) {
|
|
39713
|
-
return _objectSpread$
|
|
39664
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39714
39665
|
radius: radius,
|
|
39715
39666
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39716
39667
|
});
|
|
@@ -39718,21 +39669,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39718
39669
|
return null;
|
|
39719
39670
|
};
|
|
39720
39671
|
|
|
39721
|
-
function _typeof$
|
|
39722
|
-
var _excluded$7 = ["offset"];
|
|
39672
|
+
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); }
|
|
39723
39673
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39724
39674
|
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."); }
|
|
39725
39675
|
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); }
|
|
39726
39676
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39727
39677
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39728
39678
|
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; }
|
|
39729
|
-
function
|
|
39730
|
-
function
|
|
39731
|
-
function
|
|
39732
|
-
function
|
|
39733
|
-
function
|
|
39734
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39735
|
-
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); }
|
|
39679
|
+
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; }
|
|
39680
|
+
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; }
|
|
39681
|
+
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; }
|
|
39682
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39683
|
+
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); }
|
|
39736
39684
|
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); }
|
|
39737
39685
|
var getLabel = function getLabel(props) {
|
|
39738
39686
|
var value = props.value,
|
|
@@ -39877,7 +39825,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39877
39825
|
textAnchor: 'middle',
|
|
39878
39826
|
verticalAnchor: verticalEnd
|
|
39879
39827
|
};
|
|
39880
|
-
return _objectSpread$
|
|
39828
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39881
39829
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39882
39830
|
width: width
|
|
39883
39831
|
} : {});
|
|
@@ -39889,7 +39837,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39889
39837
|
textAnchor: 'middle',
|
|
39890
39838
|
verticalAnchor: verticalStart
|
|
39891
39839
|
};
|
|
39892
|
-
return _objectSpread$
|
|
39840
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39893
39841
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39894
39842
|
width: width
|
|
39895
39843
|
} : {});
|
|
@@ -39901,7 +39849,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39901
39849
|
textAnchor: horizontalEnd,
|
|
39902
39850
|
verticalAnchor: 'middle'
|
|
39903
39851
|
};
|
|
39904
|
-
return _objectSpread$
|
|
39852
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39905
39853
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39906
39854
|
height: height
|
|
39907
39855
|
} : {});
|
|
@@ -39913,7 +39861,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39913
39861
|
textAnchor: horizontalStart,
|
|
39914
39862
|
verticalAnchor: 'middle'
|
|
39915
39863
|
};
|
|
39916
|
-
return _objectSpread$
|
|
39864
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39917
39865
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39918
39866
|
height: height
|
|
39919
39867
|
} : {});
|
|
@@ -39923,7 +39871,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39923
39871
|
height: height
|
|
39924
39872
|
} : {};
|
|
39925
39873
|
if (position === 'insideLeft') {
|
|
39926
|
-
return _objectSpread$
|
|
39874
|
+
return _objectSpread$e({
|
|
39927
39875
|
x: x + horizontalOffset,
|
|
39928
39876
|
y: y + height / 2,
|
|
39929
39877
|
textAnchor: horizontalStart,
|
|
@@ -39931,7 +39879,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39931
39879
|
}, sizeAttrs);
|
|
39932
39880
|
}
|
|
39933
39881
|
if (position === 'insideRight') {
|
|
39934
|
-
return _objectSpread$
|
|
39882
|
+
return _objectSpread$e({
|
|
39935
39883
|
x: x + width - horizontalOffset,
|
|
39936
39884
|
y: y + height / 2,
|
|
39937
39885
|
textAnchor: horizontalEnd,
|
|
@@ -39939,7 +39887,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39939
39887
|
}, sizeAttrs);
|
|
39940
39888
|
}
|
|
39941
39889
|
if (position === 'insideTop') {
|
|
39942
|
-
return _objectSpread$
|
|
39890
|
+
return _objectSpread$e({
|
|
39943
39891
|
x: x + width / 2,
|
|
39944
39892
|
y: y + verticalOffset,
|
|
39945
39893
|
textAnchor: 'middle',
|
|
@@ -39947,7 +39895,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39947
39895
|
}, sizeAttrs);
|
|
39948
39896
|
}
|
|
39949
39897
|
if (position === 'insideBottom') {
|
|
39950
|
-
return _objectSpread$
|
|
39898
|
+
return _objectSpread$e({
|
|
39951
39899
|
x: x + width / 2,
|
|
39952
39900
|
y: y + height - verticalOffset,
|
|
39953
39901
|
textAnchor: 'middle',
|
|
@@ -39955,7 +39903,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39955
39903
|
}, sizeAttrs);
|
|
39956
39904
|
}
|
|
39957
39905
|
if (position === 'insideTopLeft') {
|
|
39958
|
-
return _objectSpread$
|
|
39906
|
+
return _objectSpread$e({
|
|
39959
39907
|
x: x + horizontalOffset,
|
|
39960
39908
|
y: y + verticalOffset,
|
|
39961
39909
|
textAnchor: horizontalStart,
|
|
@@ -39963,7 +39911,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39963
39911
|
}, sizeAttrs);
|
|
39964
39912
|
}
|
|
39965
39913
|
if (position === 'insideTopRight') {
|
|
39966
|
-
return _objectSpread$
|
|
39914
|
+
return _objectSpread$e({
|
|
39967
39915
|
x: x + width - horizontalOffset,
|
|
39968
39916
|
y: y + verticalOffset,
|
|
39969
39917
|
textAnchor: horizontalEnd,
|
|
@@ -39971,7 +39919,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39971
39919
|
}, sizeAttrs);
|
|
39972
39920
|
}
|
|
39973
39921
|
if (position === 'insideBottomLeft') {
|
|
39974
|
-
return _objectSpread$
|
|
39922
|
+
return _objectSpread$e({
|
|
39975
39923
|
x: x + horizontalOffset,
|
|
39976
39924
|
y: y + height - verticalOffset,
|
|
39977
39925
|
textAnchor: horizontalStart,
|
|
@@ -39979,7 +39927,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39979
39927
|
}, sizeAttrs);
|
|
39980
39928
|
}
|
|
39981
39929
|
if (position === 'insideBottomRight') {
|
|
39982
|
-
return _objectSpread$
|
|
39930
|
+
return _objectSpread$e({
|
|
39983
39931
|
x: x + width - horizontalOffset,
|
|
39984
39932
|
y: y + height - verticalOffset,
|
|
39985
39933
|
textAnchor: horizontalEnd,
|
|
@@ -39987,14 +39935,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39987
39935
|
}, sizeAttrs);
|
|
39988
39936
|
}
|
|
39989
39937
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39990
|
-
return _objectSpread$
|
|
39938
|
+
return _objectSpread$e({
|
|
39991
39939
|
x: x + getPercentValue(position.x, width),
|
|
39992
39940
|
y: y + getPercentValue(position.y, height),
|
|
39993
39941
|
textAnchor: 'end',
|
|
39994
39942
|
verticalAnchor: 'end'
|
|
39995
39943
|
}, sizeAttrs);
|
|
39996
39944
|
}
|
|
39997
|
-
return _objectSpread$
|
|
39945
|
+
return _objectSpread$e({
|
|
39998
39946
|
x: x + width / 2,
|
|
39999
39947
|
y: y + height / 2,
|
|
40000
39948
|
textAnchor: 'middle',
|
|
@@ -40004,13 +39952,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40004
39952
|
var isPolar = function isPolar(viewBox) {
|
|
40005
39953
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40006
39954
|
};
|
|
40007
|
-
function Label$3(
|
|
40008
|
-
var _ref4$offset = _ref4.offset,
|
|
40009
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40010
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40011
|
-
var props = _objectSpread$h({
|
|
40012
|
-
offset: offset
|
|
40013
|
-
}, restProps);
|
|
39955
|
+
function Label$3(props) {
|
|
40014
39956
|
var viewBox = props.viewBox,
|
|
40015
39957
|
position = props.position,
|
|
40016
39958
|
value = props.value,
|
|
@@ -40047,6 +39989,9 @@ function Label$3(_ref4) {
|
|
|
40047
39989
|
}), label);
|
|
40048
39990
|
}
|
|
40049
39991
|
Label$3.displayName = 'Label';
|
|
39992
|
+
Label$3.defaultProps = {
|
|
39993
|
+
offset: 5
|
|
39994
|
+
};
|
|
40050
39995
|
var parseViewBox = function parseViewBox(props) {
|
|
40051
39996
|
var cx = props.cx,
|
|
40052
39997
|
cy = props.cy,
|
|
@@ -40201,9 +40146,8 @@ function last(array) {
|
|
|
40201
40146
|
|
|
40202
40147
|
var last_1 = last;
|
|
40203
40148
|
|
|
40204
|
-
function _typeof$
|
|
40205
|
-
var _excluded$
|
|
40206
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40149
|
+
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); }
|
|
40150
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40207
40151
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40208
40152
|
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."); }
|
|
40209
40153
|
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); }
|
|
@@ -40211,26 +40155,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40211
40155
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40212
40156
|
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; }
|
|
40213
40157
|
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); }
|
|
40214
|
-
function ownKeys$
|
|
40215
|
-
function _objectSpread$
|
|
40216
|
-
function _defineProperty$
|
|
40217
|
-
function _toPropertyKey$
|
|
40218
|
-
function _toPrimitive$
|
|
40219
|
-
function _objectWithoutProperties$
|
|
40220
|
-
function _objectWithoutPropertiesLoose$
|
|
40221
|
-
var
|
|
40222
|
-
|
|
40223
|
-
|
|
40224
|
-
|
|
40225
|
-
|
|
40226
|
-
|
|
40227
|
-
|
|
40228
|
-
|
|
40229
|
-
dataKey =
|
|
40230
|
-
clockWise =
|
|
40231
|
-
id =
|
|
40232
|
-
textBreakAll =
|
|
40233
|
-
others = _objectWithoutProperties$
|
|
40158
|
+
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; }
|
|
40159
|
+
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; }
|
|
40160
|
+
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; }
|
|
40161
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40162
|
+
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); }
|
|
40163
|
+
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; }
|
|
40164
|
+
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; }
|
|
40165
|
+
var defaultProps = {
|
|
40166
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40167
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40168
|
+
}
|
|
40169
|
+
};
|
|
40170
|
+
function LabelList(props) {
|
|
40171
|
+
var data = props.data,
|
|
40172
|
+
valueAccessor = props.valueAccessor,
|
|
40173
|
+
dataKey = props.dataKey,
|
|
40174
|
+
clockWise = props.clockWise,
|
|
40175
|
+
id = props.id,
|
|
40176
|
+
textBreakAll = props.textBreakAll,
|
|
40177
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40234
40178
|
if (!data || !data.length) {
|
|
40235
40179
|
return null;
|
|
40236
40180
|
}
|
|
@@ -40246,7 +40190,7 @@ function LabelList(_ref) {
|
|
|
40246
40190
|
index: index,
|
|
40247
40191
|
value: value,
|
|
40248
40192
|
textBreakAll: textBreakAll,
|
|
40249
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40193
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40250
40194
|
clockWise: clockWise
|
|
40251
40195
|
})),
|
|
40252
40196
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40301,14 +40245,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40301
40245
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40302
40246
|
}
|
|
40303
40247
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40248
|
+
LabelList.defaultProps = defaultProps;
|
|
40304
40249
|
|
|
40305
|
-
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); }
|
|
40306
40250
|
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); }
|
|
40307
|
-
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; }
|
|
40308
|
-
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; }
|
|
40309
|
-
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; }
|
|
40310
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40311
|
-
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); }
|
|
40312
40251
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40313
40252
|
var sign = mathSign(endAngle - startAngle);
|
|
40314
40253
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40449,19 +40388,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40449
40388
|
}
|
|
40450
40389
|
return path;
|
|
40451
40390
|
};
|
|
40452
|
-
var
|
|
40453
|
-
cx: 0,
|
|
40454
|
-
cy: 0,
|
|
40455
|
-
innerRadius: 0,
|
|
40456
|
-
outerRadius: 0,
|
|
40457
|
-
startAngle: 0,
|
|
40458
|
-
endAngle: 0,
|
|
40459
|
-
cornerRadius: 0,
|
|
40460
|
-
forceCornerRadius: false,
|
|
40461
|
-
cornerIsExternal: false
|
|
40462
|
-
};
|
|
40463
|
-
var Sector = function Sector(sectorProps) {
|
|
40464
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40391
|
+
var Sector = function Sector(props) {
|
|
40465
40392
|
var cx = props.cx,
|
|
40466
40393
|
cy = props.cy,
|
|
40467
40394
|
innerRadius = props.innerRadius,
|
|
@@ -40507,14 +40434,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40507
40434
|
role: "img"
|
|
40508
40435
|
}));
|
|
40509
40436
|
};
|
|
40437
|
+
Sector.defaultProps = {
|
|
40438
|
+
cx: 0,
|
|
40439
|
+
cy: 0,
|
|
40440
|
+
innerRadius: 0,
|
|
40441
|
+
outerRadius: 0,
|
|
40442
|
+
startAngle: 0,
|
|
40443
|
+
endAngle: 0,
|
|
40444
|
+
cornerRadius: 0,
|
|
40445
|
+
forceCornerRadius: false,
|
|
40446
|
+
cornerIsExternal: false
|
|
40447
|
+
};
|
|
40510
40448
|
|
|
40511
|
-
function _typeof$
|
|
40449
|
+
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); }
|
|
40512
40450
|
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); }
|
|
40513
|
-
function ownKeys$
|
|
40514
|
-
function _objectSpread$
|
|
40515
|
-
function _defineProperty$
|
|
40516
|
-
function _toPropertyKey$
|
|
40517
|
-
function _toPrimitive$
|
|
40451
|
+
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; }
|
|
40452
|
+
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; }
|
|
40453
|
+
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; }
|
|
40454
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40455
|
+
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); }
|
|
40518
40456
|
var CURVE_FACTORIES = {
|
|
40519
40457
|
curveBasisClosed: curveBasisClosed,
|
|
40520
40458
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40554,14 +40492,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40554
40492
|
* @return {String} path
|
|
40555
40493
|
*/
|
|
40556
40494
|
var getPath$1 = function getPath(_ref) {
|
|
40557
|
-
var
|
|
40558
|
-
|
|
40559
|
-
_ref$points = _ref.points,
|
|
40560
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40495
|
+
var type = _ref.type,
|
|
40496
|
+
points = _ref.points,
|
|
40561
40497
|
baseLine = _ref.baseLine,
|
|
40562
40498
|
layout = _ref.layout,
|
|
40563
|
-
|
|
40564
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40499
|
+
connectNulls = _ref.connectNulls;
|
|
40565
40500
|
var curveFactory = getCurveFactory(type, layout);
|
|
40566
40501
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40567
40502
|
return defined(entry);
|
|
@@ -40572,7 +40507,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40572
40507
|
return defined(base);
|
|
40573
40508
|
}) : baseLine;
|
|
40574
40509
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40575
|
-
return _objectSpread$
|
|
40510
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40576
40511
|
base: formatBaseLine[index]
|
|
40577
40512
|
});
|
|
40578
40513
|
});
|
|
@@ -40613,8 +40548,12 @@ var Curve = function Curve(props) {
|
|
|
40613
40548
|
ref: pathRef
|
|
40614
40549
|
}));
|
|
40615
40550
|
};
|
|
40551
|
+
Curve.defaultProps = {
|
|
40552
|
+
type: 'linear',
|
|
40553
|
+
points: [],
|
|
40554
|
+
connectNulls: false
|
|
40555
|
+
};
|
|
40616
40556
|
|
|
40617
|
-
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); }
|
|
40618
40557
|
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); }
|
|
40619
40558
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40620
40559
|
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."); }
|
|
@@ -40622,11 +40561,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40622
40561
|
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; }
|
|
40623
40562
|
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; } }
|
|
40624
40563
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40625
|
-
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; }
|
|
40626
|
-
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; }
|
|
40627
|
-
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; }
|
|
40628
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40629
|
-
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); }
|
|
40630
40564
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40631
40565
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40632
40566
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40682,29 +40616,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40682
40616
|
}
|
|
40683
40617
|
return false;
|
|
40684
40618
|
};
|
|
40685
|
-
var
|
|
40686
|
-
x: 0,
|
|
40687
|
-
y: 0,
|
|
40688
|
-
width: 0,
|
|
40689
|
-
height: 0,
|
|
40690
|
-
// The radius of border
|
|
40691
|
-
// The radius of four corners when radius is a number
|
|
40692
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40693
|
-
radius: 0,
|
|
40694
|
-
isAnimationActive: false,
|
|
40695
|
-
isUpdateAnimationActive: false,
|
|
40696
|
-
animationBegin: 0,
|
|
40697
|
-
animationDuration: 1500,
|
|
40698
|
-
animationEasing: 'ease'
|
|
40699
|
-
};
|
|
40700
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40701
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40619
|
+
var Rectangle = function Rectangle(props) {
|
|
40702
40620
|
var pathRef = React$3.useRef();
|
|
40703
40621
|
var _useState = React$3.useState(-1),
|
|
40704
40622
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40705
40623
|
totalLength = _useState2[0],
|
|
40706
40624
|
setTotalLength = _useState2[1];
|
|
40707
|
-
React$3.
|
|
40625
|
+
React$3.useLayoutEffect(function () {
|
|
40708
40626
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40709
40627
|
try {
|
|
40710
40628
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40775,6 +40693,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40775
40693
|
})));
|
|
40776
40694
|
});
|
|
40777
40695
|
};
|
|
40696
|
+
Rectangle.defaultProps = {
|
|
40697
|
+
x: 0,
|
|
40698
|
+
y: 0,
|
|
40699
|
+
width: 0,
|
|
40700
|
+
height: 0,
|
|
40701
|
+
// The radius of border
|
|
40702
|
+
// The radius of four corners when radius is a number
|
|
40703
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40704
|
+
radius: 0,
|
|
40705
|
+
isAnimationActive: false,
|
|
40706
|
+
isUpdateAnimationActive: false,
|
|
40707
|
+
animationBegin: 0,
|
|
40708
|
+
animationDuration: 1500,
|
|
40709
|
+
animationEasing: 'ease'
|
|
40710
|
+
};
|
|
40778
40711
|
|
|
40779
40712
|
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); }
|
|
40780
40713
|
var Dot$1 = function Dot(props) {
|
|
@@ -40794,42 +40727,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40794
40727
|
return null;
|
|
40795
40728
|
};
|
|
40796
40729
|
|
|
40797
|
-
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); }
|
|
40798
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40799
40730
|
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); }
|
|
40800
|
-
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; }
|
|
40801
|
-
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; }
|
|
40802
|
-
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; }
|
|
40803
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40804
|
-
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); }
|
|
40805
|
-
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; }
|
|
40806
|
-
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; }
|
|
40807
40731
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40808
40732
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40809
40733
|
};
|
|
40810
|
-
var Cross = function Cross(
|
|
40811
|
-
var
|
|
40812
|
-
|
|
40813
|
-
|
|
40814
|
-
|
|
40815
|
-
|
|
40816
|
-
|
|
40817
|
-
|
|
40818
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40819
|
-
_ref$width = _ref.width,
|
|
40820
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40821
|
-
_ref$height = _ref.height,
|
|
40822
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40823
|
-
className = _ref.className,
|
|
40824
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40825
|
-
var props = _objectSpread$c({
|
|
40826
|
-
x: x,
|
|
40827
|
-
y: y,
|
|
40828
|
-
top: top,
|
|
40829
|
-
left: left,
|
|
40830
|
-
width: width,
|
|
40831
|
-
height: height
|
|
40832
|
-
}, rest);
|
|
40734
|
+
var Cross = function Cross(props) {
|
|
40735
|
+
var x = props.x,
|
|
40736
|
+
y = props.y,
|
|
40737
|
+
width = props.width,
|
|
40738
|
+
height = props.height,
|
|
40739
|
+
top = props.top,
|
|
40740
|
+
left = props.left,
|
|
40741
|
+
className = props.className;
|
|
40833
40742
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40834
40743
|
return null;
|
|
40835
40744
|
}
|
|
@@ -40838,6 +40747,14 @@ var Cross = function Cross(_ref) {
|
|
|
40838
40747
|
d: getPath(x, y, width, height, top, left)
|
|
40839
40748
|
}));
|
|
40840
40749
|
};
|
|
40750
|
+
Cross.defaultProps = {
|
|
40751
|
+
x: 0,
|
|
40752
|
+
y: 0,
|
|
40753
|
+
top: 0,
|
|
40754
|
+
left: 0,
|
|
40755
|
+
width: 0,
|
|
40756
|
+
height: 0
|
|
40757
|
+
};
|
|
40841
40758
|
|
|
40842
40759
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40843
40760
|
|
|
@@ -41047,7 +40964,6 @@ var createScale = function createScale(_ref) {
|
|
|
41047
40964
|
isTextActive: false,
|
|
41048
40965
|
isSlideMoving: false,
|
|
41049
40966
|
isTravellerMoving: false,
|
|
41050
|
-
isTravellerFocused: false,
|
|
41051
40967
|
startX: scale(startIndex),
|
|
41052
40968
|
endX: scale(endIndex),
|
|
41053
40969
|
scale: scale,
|
|
@@ -41261,38 +41177,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41261
41177
|
}
|
|
41262
41178
|
});
|
|
41263
41179
|
}
|
|
41264
|
-
}, {
|
|
41265
|
-
key: "handleTravellerMoveKeyboard",
|
|
41266
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41267
|
-
var _this2 = this;
|
|
41268
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41269
|
-
var _this$state3 = this.state,
|
|
41270
|
-
scaleValues = _this$state3.scaleValues,
|
|
41271
|
-
startX = _this$state3.startX,
|
|
41272
|
-
endX = _this$state3.endX;
|
|
41273
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41274
|
-
var currentScaleValue = this.state[id];
|
|
41275
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41276
|
-
if (currentIndex === -1) {
|
|
41277
|
-
return;
|
|
41278
|
-
}
|
|
41279
|
-
var newIndex = currentIndex + direction;
|
|
41280
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41281
|
-
return;
|
|
41282
|
-
}
|
|
41283
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41284
|
-
|
|
41285
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41286
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41287
|
-
return;
|
|
41288
|
-
}
|
|
41289
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41290
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41291
|
-
startX: _this2.state.startX,
|
|
41292
|
-
endX: _this2.state.endX
|
|
41293
|
-
}));
|
|
41294
|
-
});
|
|
41295
|
-
}
|
|
41296
41180
|
}, {
|
|
41297
41181
|
key: "renderBackground",
|
|
41298
41182
|
value: function renderBackground() {
|
|
@@ -41340,7 +41224,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41340
41224
|
}, {
|
|
41341
41225
|
key: "renderTravellerLayer",
|
|
41342
41226
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41343
|
-
var _this3 = this;
|
|
41344
41227
|
var _this$props7 = this.props,
|
|
41345
41228
|
y = _this$props7.y,
|
|
41346
41229
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41354,31 +41237,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41354
41237
|
height: height
|
|
41355
41238
|
});
|
|
41356
41239
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41357
|
-
tabIndex: 0,
|
|
41358
|
-
role: "slider",
|
|
41359
41240
|
className: "recharts-brush-traveller",
|
|
41360
41241
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41361
41242
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41362
41243
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41363
41244
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41364
|
-
onKeyDown: function onKeyDown(e) {
|
|
41365
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41366
|
-
return;
|
|
41367
|
-
}
|
|
41368
|
-
e.preventDefault();
|
|
41369
|
-
e.stopPropagation();
|
|
41370
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41371
|
-
},
|
|
41372
|
-
onFocus: function onFocus() {
|
|
41373
|
-
_this3.setState({
|
|
41374
|
-
isTravellerFocused: true
|
|
41375
|
-
});
|
|
41376
|
-
},
|
|
41377
|
-
onBlur: function onBlur() {
|
|
41378
|
-
_this3.setState({
|
|
41379
|
-
isTravellerFocused: false
|
|
41380
|
-
});
|
|
41381
|
-
},
|
|
41382
41245
|
style: {
|
|
41383
41246
|
cursor: 'col-resize'
|
|
41384
41247
|
}
|
|
@@ -41422,9 +41285,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41422
41285
|
height = _this$props9.height,
|
|
41423
41286
|
travellerWidth = _this$props9.travellerWidth,
|
|
41424
41287
|
stroke = _this$props9.stroke;
|
|
41425
|
-
var _this$
|
|
41426
|
-
startX = _this$
|
|
41427
|
-
endX = _this$
|
|
41288
|
+
var _this$state3 = this.state,
|
|
41289
|
+
startX = _this$state3.startX,
|
|
41290
|
+
endX = _this$state3.endX;
|
|
41428
41291
|
var offset = 5;
|
|
41429
41292
|
var attrs = {
|
|
41430
41293
|
pointerEvents: 'none',
|
|
@@ -41456,13 +41319,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41456
41319
|
width = _this$props10.width,
|
|
41457
41320
|
height = _this$props10.height,
|
|
41458
41321
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41459
|
-
var _this$
|
|
41460
|
-
startX = _this$
|
|
41461
|
-
endX = _this$
|
|
41462
|
-
isTextActive = _this$
|
|
41463
|
-
isSlideMoving = _this$
|
|
41464
|
-
isTravellerMoving = _this$
|
|
41465
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41322
|
+
var _this$state4 = this.state,
|
|
41323
|
+
startX = _this$state4.startX,
|
|
41324
|
+
endX = _this$state4.endX,
|
|
41325
|
+
isTextActive = _this$state4.isTextActive,
|
|
41326
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41327
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41466
41328
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41467
41329
|
return null;
|
|
41468
41330
|
}
|
|
@@ -41474,7 +41336,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41474
41336
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41475
41337
|
onTouchMove: this.handleTouchMove,
|
|
41476
41338
|
style: style
|
|
41477
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41339
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41478
41340
|
}
|
|
41479
41341
|
}], [{
|
|
41480
41342
|
key: "renderDefaultTraveller",
|
|
@@ -41792,7 +41654,7 @@ function every(collection, predicate, guard) {
|
|
|
41792
41654
|
|
|
41793
41655
|
var every_1 = every;
|
|
41794
41656
|
|
|
41795
|
-
var defineProperty = _defineProperty$
|
|
41657
|
+
var defineProperty = _defineProperty$l;
|
|
41796
41658
|
|
|
41797
41659
|
/**
|
|
41798
41660
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42153,6 +42015,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42153
42015
|
legendType: 'rect',
|
|
42154
42016
|
minPointSize: 0,
|
|
42155
42017
|
hide: false,
|
|
42018
|
+
// data of bar
|
|
42156
42019
|
data: [],
|
|
42157
42020
|
layout: 'vertical',
|
|
42158
42021
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45065,11 +44928,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45065
44928
|
}
|
|
45066
44929
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45067
44930
|
x = _this$container$getBo.x,
|
|
45068
|
-
y = _this$container$getBo.y
|
|
45069
|
-
height = _this$container$getBo.height;
|
|
44931
|
+
y = _this$container$getBo.y;
|
|
45070
44932
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45071
44933
|
var pageX = x + coordinate;
|
|
45072
|
-
var pageY = y + this.offset.top
|
|
44934
|
+
var pageY = y + this.offset.top;
|
|
45073
44935
|
this.mouseHandlerCallback({
|
|
45074
44936
|
pageX: pageX,
|
|
45075
44937
|
pageY: pageY
|