@typeolymp/ui-components 1.19.3 → 1.19.5
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 +653 -787
- package/build/index.es.js.map +1 -1
- package/build/index.js +653 -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,39 @@ 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
|
+
if (!props.disabled && !!props.onChange)
|
|
8060
|
+
props.onChange(value);
|
|
8061
|
+
};
|
|
8062
|
+
var onBlur = function () {
|
|
8063
|
+
var value = parseInt(inputRef.current.value);
|
|
8064
|
+
var newValue = setValue(value);
|
|
8065
|
+
// If the value has changed, call the onChange callback
|
|
8066
|
+
if (value !== newValue && !!props.onChange)
|
|
8067
|
+
props.onChange(newValue);
|
|
8068
|
+
if (!!props.onBlur)
|
|
8069
|
+
props.onBlur();
|
|
8068
8070
|
};
|
|
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:
|
|
8071
|
+
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
8072
|
};
|
|
8071
8073
|
|
|
8072
8074
|
var Paragraph = function (props) { return (jsxRuntime.jsx(StyledParagraph, __assign$2({}, props, { children: props.children }))); };
|
|
@@ -13562,15 +13564,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13562
13564
|
|
|
13563
13565
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13564
13566
|
|
|
13565
|
-
function _slicedToArray$
|
|
13566
|
-
return _arrayWithHoles$
|
|
13567
|
+
function _slicedToArray$d(arr, i) {
|
|
13568
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13567
13569
|
}
|
|
13568
13570
|
|
|
13569
|
-
function _arrayWithHoles$
|
|
13571
|
+
function _arrayWithHoles$e(arr) {
|
|
13570
13572
|
if (Array.isArray(arr)) return arr;
|
|
13571
13573
|
}
|
|
13572
13574
|
|
|
13573
|
-
function _iterableToArrayLimit$
|
|
13575
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13574
13576
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13575
13577
|
|
|
13576
13578
|
if (_i == null) return;
|
|
@@ -13600,16 +13602,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13600
13602
|
return _arr;
|
|
13601
13603
|
}
|
|
13602
13604
|
|
|
13603
|
-
function _unsupportedIterableToArray$
|
|
13605
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13604
13606
|
if (!o) return;
|
|
13605
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13607
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13606
13608
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13607
13609
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13608
13610
|
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$
|
|
13611
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13610
13612
|
}
|
|
13611
13613
|
|
|
13612
|
-
function _arrayLikeToArray$
|
|
13614
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13613
13615
|
if (len == null || len > arr.length) len = arr.length;
|
|
13614
13616
|
|
|
13615
13617
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13617,7 +13619,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13617
13619
|
return arr2;
|
|
13618
13620
|
}
|
|
13619
13621
|
|
|
13620
|
-
function _nonIterableRest$
|
|
13622
|
+
function _nonIterableRest$e() {
|
|
13621
13623
|
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
13624
|
}
|
|
13623
13625
|
|
|
@@ -13681,7 +13683,7 @@ reservedProps.forEach(function (name) {
|
|
|
13681
13683
|
// This is a mapping from React prop names to the attribute names.
|
|
13682
13684
|
|
|
13683
13685
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13684
|
-
var _ref2 = _slicedToArray$
|
|
13686
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13685
13687
|
name = _ref2[0],
|
|
13686
13688
|
attributeName = _ref2[1];
|
|
13687
13689
|
|
|
@@ -16081,31 +16083,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16081
16083
|
return true;
|
|
16082
16084
|
};
|
|
16083
16085
|
|
|
16084
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16086
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16085
16087
|
|
|
16086
16088
|
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
16089
|
|
|
16088
16090
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16089
16091
|
|
|
16090
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16092
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16091
16093
|
|
|
16092
|
-
function ownKeys$
|
|
16094
|
+
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
16095
|
|
|
16094
|
-
function _objectSpread$
|
|
16096
|
+
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
16097
|
|
|
16096
|
-
function _defineProperty$
|
|
16098
|
+
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
16099
|
|
|
16098
|
-
function _slicedToArray$
|
|
16100
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16099
16101
|
|
|
16100
|
-
function _nonIterableRest$
|
|
16102
|
+
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
16103
|
|
|
16102
|
-
function _unsupportedIterableToArray$
|
|
16104
|
+
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
16105
|
|
|
16104
|
-
function _arrayLikeToArray$
|
|
16106
|
+
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
16107
|
|
|
16106
|
-
function _iterableToArrayLimit$
|
|
16108
|
+
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
16109
|
|
|
16108
|
-
function _arrayWithHoles$
|
|
16110
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16109
16111
|
|
|
16110
16112
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16111
16113
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16185,11 +16187,11 @@ function allFilesAccepted(_ref) {
|
|
|
16185
16187
|
|
|
16186
16188
|
return files.every(function (file) {
|
|
16187
16189
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16188
|
-
_fileAccepted2 = _slicedToArray$
|
|
16190
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16189
16191
|
accepted = _fileAccepted2[0];
|
|
16190
16192
|
|
|
16191
16193
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16192
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16194
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16193
16195
|
sizeMatch = _fileMatchSize2[0];
|
|
16194
16196
|
|
|
16195
16197
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16286,7 +16288,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16286
16288
|
function pickerOptionsFromAccept(accept) {
|
|
16287
16289
|
if (isDefined(accept)) {
|
|
16288
16290
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16289
|
-
var _ref3 = _slicedToArray$
|
|
16291
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16290
16292
|
mimeType = _ref3[0],
|
|
16291
16293
|
ext = _ref3[1];
|
|
16292
16294
|
|
|
@@ -16304,11 +16306,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16304
16306
|
|
|
16305
16307
|
return ok;
|
|
16306
16308
|
}).reduce(function (agg, _ref4) {
|
|
16307
|
-
var _ref5 = _slicedToArray$
|
|
16309
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16308
16310
|
mimeType = _ref5[0],
|
|
16309
16311
|
ext = _ref5[1];
|
|
16310
16312
|
|
|
16311
|
-
return _objectSpread$
|
|
16313
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16312
16314
|
}, {});
|
|
16313
16315
|
return [{
|
|
16314
16316
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16328,7 +16330,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16328
16330
|
function acceptPropAsAcceptAttr(accept) {
|
|
16329
16331
|
if (isDefined(accept)) {
|
|
16330
16332
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16331
|
-
var _ref7 = _slicedToArray$
|
|
16333
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16332
16334
|
mimeType = _ref7[0],
|
|
16333
16335
|
ext = _ref7[1];
|
|
16334
16336
|
|
|
@@ -16396,40 +16398,40 @@ function isExt(v) {
|
|
|
16396
16398
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16397
16399
|
*/
|
|
16398
16400
|
|
|
16399
|
-
var _excluded$
|
|
16400
|
-
_excluded2$
|
|
16401
|
+
var _excluded$d = ["children"],
|
|
16402
|
+
_excluded2$3 = ["open"],
|
|
16401
16403
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16402
16404
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16403
16405
|
|
|
16404
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16406
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16405
16407
|
|
|
16406
16408
|
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
16409
|
|
|
16408
16410
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16409
16411
|
|
|
16410
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16412
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16411
16413
|
|
|
16412
|
-
function _slicedToArray$
|
|
16414
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16413
16415
|
|
|
16414
|
-
function _nonIterableRest$
|
|
16416
|
+
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
16417
|
|
|
16416
|
-
function _unsupportedIterableToArray$
|
|
16418
|
+
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
16419
|
|
|
16418
|
-
function _arrayLikeToArray$
|
|
16420
|
+
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
16421
|
|
|
16420
|
-
function _iterableToArrayLimit$
|
|
16422
|
+
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
16423
|
|
|
16422
|
-
function _arrayWithHoles$
|
|
16424
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16423
16425
|
|
|
16424
|
-
function ownKeys$
|
|
16426
|
+
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
16427
|
|
|
16426
|
-
function _objectSpread$
|
|
16428
|
+
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
16429
|
|
|
16428
|
-
function _defineProperty$
|
|
16430
|
+
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
16431
|
|
|
16430
|
-
function _objectWithoutProperties$
|
|
16432
|
+
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
16433
|
|
|
16432
|
-
function _objectWithoutPropertiesLoose$
|
|
16434
|
+
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
16435
|
/**
|
|
16434
16436
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16435
16437
|
*
|
|
@@ -16447,11 +16449,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16447
16449
|
|
|
16448
16450
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16449
16451
|
var children = _ref.children,
|
|
16450
|
-
params = _objectWithoutProperties$
|
|
16452
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16451
16453
|
|
|
16452
16454
|
var _useDropzone = useDropzone(params),
|
|
16453
16455
|
open = _useDropzone.open,
|
|
16454
|
-
props = _objectWithoutProperties$
|
|
16456
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16455
16457
|
|
|
16456
16458
|
React$3.useImperativeHandle(ref, function () {
|
|
16457
16459
|
return {
|
|
@@ -16459,13 +16461,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16459
16461
|
};
|
|
16460
16462
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16461
16463
|
|
|
16462
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16464
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16463
16465
|
open: open
|
|
16464
16466
|
})));
|
|
16465
16467
|
});
|
|
16466
16468
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16467
16469
|
|
|
16468
|
-
var defaultProps$
|
|
16470
|
+
var defaultProps$1 = {
|
|
16469
16471
|
disabled: false,
|
|
16470
16472
|
getFilesFromEvent: fromEvent,
|
|
16471
16473
|
maxSize: Infinity,
|
|
@@ -16481,7 +16483,7 @@ var defaultProps$2 = {
|
|
|
16481
16483
|
useFsAccessApi: true,
|
|
16482
16484
|
autoFocus: false
|
|
16483
16485
|
};
|
|
16484
|
-
Dropzone.defaultProps = defaultProps$
|
|
16486
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16485
16487
|
Dropzone.propTypes = {
|
|
16486
16488
|
/**
|
|
16487
16489
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16832,7 +16834,7 @@ var initialState = {
|
|
|
16832
16834
|
function useDropzone() {
|
|
16833
16835
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16834
16836
|
|
|
16835
|
-
var _defaultProps$props = _objectSpread$
|
|
16837
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16836
16838
|
accept = _defaultProps$props.accept,
|
|
16837
16839
|
disabled = _defaultProps$props.disabled,
|
|
16838
16840
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16879,7 +16881,7 @@ function useDropzone() {
|
|
|
16879
16881
|
var inputRef = React$3.useRef(null);
|
|
16880
16882
|
|
|
16881
16883
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
16882
|
-
_useReducer2 = _slicedToArray$
|
|
16884
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16883
16885
|
state = _useReducer2[0],
|
|
16884
16886
|
dispatch = _useReducer2[1];
|
|
16885
16887
|
|
|
@@ -17049,12 +17051,12 @@ function useDropzone() {
|
|
|
17049
17051
|
var fileRejections = [];
|
|
17050
17052
|
files.forEach(function (file) {
|
|
17051
17053
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17052
|
-
_fileAccepted2 = _slicedToArray$
|
|
17054
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17053
17055
|
accepted = _fileAccepted2[0],
|
|
17054
17056
|
acceptError = _fileAccepted2[1];
|
|
17055
17057
|
|
|
17056
17058
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17057
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17059
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17058
17060
|
sizeMatch = _fileMatchSize2[0],
|
|
17059
17061
|
sizeError = _fileMatchSize2[1];
|
|
17060
17062
|
|
|
@@ -17255,9 +17257,9 @@ function useDropzone() {
|
|
|
17255
17257
|
onDragOver = _ref2.onDragOver,
|
|
17256
17258
|
onDragLeave = _ref2.onDragLeave,
|
|
17257
17259
|
onDrop = _ref2.onDrop,
|
|
17258
|
-
rest = _objectWithoutProperties$
|
|
17260
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17259
17261
|
|
|
17260
|
-
return _objectSpread$
|
|
17262
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17261
17263
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17262
17264
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17263
17265
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17282,9 +17284,9 @@ function useDropzone() {
|
|
|
17282
17284
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17283
17285
|
onChange = _ref3.onChange,
|
|
17284
17286
|
onClick = _ref3.onClick,
|
|
17285
|
-
rest = _objectWithoutProperties$
|
|
17287
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17286
17288
|
|
|
17287
|
-
var inputProps = _defineProperty$
|
|
17289
|
+
var inputProps = _defineProperty$r({
|
|
17288
17290
|
accept: acceptAttr,
|
|
17289
17291
|
multiple: multiple,
|
|
17290
17292
|
type: "file",
|
|
@@ -17296,10 +17298,10 @@ function useDropzone() {
|
|
|
17296
17298
|
tabIndex: -1
|
|
17297
17299
|
}, refKey, inputRef);
|
|
17298
17300
|
|
|
17299
|
-
return _objectSpread$
|
|
17301
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17300
17302
|
};
|
|
17301
17303
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17302
|
-
return _objectSpread$
|
|
17304
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17303
17305
|
isFocused: isFocused && !disabled,
|
|
17304
17306
|
getRootProps: getRootProps,
|
|
17305
17307
|
getInputProps: getInputProps,
|
|
@@ -17318,40 +17320,40 @@ function reducer$1(state, action) {
|
|
|
17318
17320
|
/* istanbul ignore next */
|
|
17319
17321
|
switch (action.type) {
|
|
17320
17322
|
case "focus":
|
|
17321
|
-
return _objectSpread$
|
|
17323
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17322
17324
|
isFocused: true
|
|
17323
17325
|
});
|
|
17324
17326
|
|
|
17325
17327
|
case "blur":
|
|
17326
|
-
return _objectSpread$
|
|
17328
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17327
17329
|
isFocused: false
|
|
17328
17330
|
});
|
|
17329
17331
|
|
|
17330
17332
|
case "openDialog":
|
|
17331
|
-
return _objectSpread$
|
|
17333
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17332
17334
|
isFileDialogActive: true
|
|
17333
17335
|
});
|
|
17334
17336
|
|
|
17335
17337
|
case "closeDialog":
|
|
17336
|
-
return _objectSpread$
|
|
17338
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17337
17339
|
isFileDialogActive: false
|
|
17338
17340
|
});
|
|
17339
17341
|
|
|
17340
17342
|
case "setDraggedFiles":
|
|
17341
|
-
return _objectSpread$
|
|
17343
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17342
17344
|
isDragActive: action.isDragActive,
|
|
17343
17345
|
isDragAccept: action.isDragAccept,
|
|
17344
17346
|
isDragReject: action.isDragReject
|
|
17345
17347
|
});
|
|
17346
17348
|
|
|
17347
17349
|
case "setFiles":
|
|
17348
|
-
return _objectSpread$
|
|
17350
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17349
17351
|
acceptedFiles: action.acceptedFiles,
|
|
17350
17352
|
fileRejections: action.fileRejections
|
|
17351
17353
|
});
|
|
17352
17354
|
|
|
17353
17355
|
case "reset":
|
|
17354
|
-
return _objectSpread$
|
|
17356
|
+
return _objectSpread$p({}, initialState);
|
|
17355
17357
|
|
|
17356
17358
|
default:
|
|
17357
17359
|
return state;
|
|
@@ -19577,7 +19579,7 @@ function shallowEqual(a, b) {
|
|
|
19577
19579
|
return true;
|
|
19578
19580
|
}
|
|
19579
19581
|
|
|
19580
|
-
function _typeof$
|
|
19582
|
+
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
19583
|
|
|
19582
19584
|
//
|
|
19583
19585
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19604,9 +19606,7 @@ var FilteredElementKeyMap = {
|
|
|
19604
19606
|
};
|
|
19605
19607
|
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
19608
|
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19609
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19610
19610
|
|
|
19611
19611
|
/** the offset of a chart, which define the blank space all around */
|
|
19612
19612
|
|
|
@@ -19642,7 +19642,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19642
19642
|
};
|
|
19643
19643
|
};
|
|
19644
19644
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19645
|
-
if (!isObject_1(props) || _typeof$
|
|
19645
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19646
19646
|
return null;
|
|
19647
19647
|
}
|
|
19648
19648
|
var out = null;
|
|
@@ -19656,11 +19656,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19656
19656
|
return out;
|
|
19657
19657
|
};
|
|
19658
19658
|
|
|
19659
|
-
var _excluded$
|
|
19660
|
-
_excluded2$
|
|
19661
|
-
function _objectWithoutProperties$
|
|
19662
|
-
function _objectWithoutPropertiesLoose$
|
|
19663
|
-
function _typeof$
|
|
19659
|
+
var _excluded$c = ["children"],
|
|
19660
|
+
_excluded2$2 = ["children"];
|
|
19661
|
+
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; }
|
|
19662
|
+
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; }
|
|
19663
|
+
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
19664
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19665
19665
|
click: 'onClick',
|
|
19666
19666
|
mousedown: 'onMouseDown',
|
|
@@ -19767,7 +19767,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19767
19767
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19768
19768
|
};
|
|
19769
19769
|
var isDotProps = function isDotProps(dot) {
|
|
19770
|
-
return dot && _typeof$
|
|
19770
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19771
19771
|
};
|
|
19772
19772
|
|
|
19773
19773
|
/**
|
|
@@ -19859,10 +19859,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19859
19859
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19860
19860
|
var _ref = nextChild.props || {},
|
|
19861
19861
|
nextChildren = _ref.children,
|
|
19862
|
-
nextProps = _objectWithoutProperties$
|
|
19862
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19863
19863
|
var _ref2 = prevChild.props || {},
|
|
19864
19864
|
prevChildren = _ref2.children,
|
|
19865
|
-
prevProps = _objectWithoutProperties$
|
|
19865
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19866
19866
|
if (nextChildren && prevChildren) {
|
|
19867
19867
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19868
19868
|
}
|
|
@@ -19904,10 +19904,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19904
19904
|
return toArray(children).indexOf(child);
|
|
19905
19905
|
};
|
|
19906
19906
|
|
|
19907
|
-
var _excluded$
|
|
19907
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19908
19908
|
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$
|
|
19909
|
+
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; }
|
|
19910
|
+
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
19911
|
function Surface(props) {
|
|
19912
19912
|
var children = props.children,
|
|
19913
19913
|
width = props.width,
|
|
@@ -19915,7 +19915,7 @@ function Surface(props) {
|
|
|
19915
19915
|
viewBox = props.viewBox,
|
|
19916
19916
|
className = props.className,
|
|
19917
19917
|
style = props.style,
|
|
19918
|
-
others = _objectWithoutProperties$
|
|
19918
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19919
19919
|
var svgView = viewBox || {
|
|
19920
19920
|
width: width,
|
|
19921
19921
|
height: height,
|
|
@@ -19932,14 +19932,14 @@ function Surface(props) {
|
|
|
19932
19932
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
19933
19933
|
}
|
|
19934
19934
|
|
|
19935
|
-
var _excluded$
|
|
19935
|
+
var _excluded$a = ["children", "className"];
|
|
19936
19936
|
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$
|
|
19937
|
+
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; }
|
|
19938
|
+
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
19939
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
19940
19940
|
var children = props.children,
|
|
19941
19941
|
className = props.className,
|
|
19942
|
-
others = _objectWithoutProperties$
|
|
19942
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19943
19943
|
var layerClass = classNames('recharts-layer', className);
|
|
19944
19944
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
19945
19945
|
className: layerClass
|
|
@@ -23354,16 +23354,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23354
23354
|
stackOffsetNone(series, order);
|
|
23355
23355
|
}
|
|
23356
23356
|
|
|
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
23357
|
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
23358
|
var symbolFactories = {
|
|
23368
23359
|
symbolCircle: symbolCircle,
|
|
23369
23360
|
symbolCross: symbolCross,
|
|
@@ -23402,35 +23393,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23402
23393
|
return Math.PI * size * size / 4;
|
|
23403
23394
|
}
|
|
23404
23395
|
};
|
|
23396
|
+
var symbolsDefaultProps = {
|
|
23397
|
+
type: 'circle',
|
|
23398
|
+
size: 64,
|
|
23399
|
+
sizeType: 'area'
|
|
23400
|
+
};
|
|
23405
23401
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23406
23402
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23407
23403
|
};
|
|
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
|
-
|
|
23404
|
+
var Symbols = function Symbols(props) {
|
|
23422
23405
|
/**
|
|
23423
23406
|
* Calculate the path of curve
|
|
23424
23407
|
* @return {String} path
|
|
23425
23408
|
*/
|
|
23426
23409
|
var getPath = function getPath() {
|
|
23410
|
+
var size = props.size,
|
|
23411
|
+
sizeType = props.sizeType,
|
|
23412
|
+
type = props.type;
|
|
23427
23413
|
var symbolFactory = getSymbolFactory(type);
|
|
23428
23414
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23429
23415
|
return symbol();
|
|
23430
23416
|
};
|
|
23431
23417
|
var className = props.className,
|
|
23432
23418
|
cx = props.cx,
|
|
23433
|
-
cy = props.cy
|
|
23419
|
+
cy = props.cy,
|
|
23420
|
+
size = props.size;
|
|
23434
23421
|
var filteredProps = filterProps(props, true);
|
|
23435
23422
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23436
23423
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23441,34 +23428,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23441
23428
|
}
|
|
23442
23429
|
return null;
|
|
23443
23430
|
};
|
|
23431
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23444
23432
|
Symbols.registerSymbol = registerSymbol;
|
|
23445
23433
|
|
|
23446
|
-
function _typeof$
|
|
23434
|
+
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
23435
|
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$
|
|
23436
|
+
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; }
|
|
23437
|
+
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; }
|
|
23438
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23439
|
+
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); } }
|
|
23440
|
+
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; }
|
|
23441
|
+
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); }
|
|
23442
|
+
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); }
|
|
23443
|
+
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); }; }
|
|
23444
|
+
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); }
|
|
23445
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23446
|
+
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; } }
|
|
23447
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23448
|
+
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; }
|
|
23449
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23450
|
+
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
23451
|
var SIZE = 32;
|
|
23464
23452
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23465
|
-
_inherits$
|
|
23466
|
-
var _super = _createSuper$
|
|
23453
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23454
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23467
23455
|
function DefaultLegendContent() {
|
|
23468
|
-
_classCallCheck$
|
|
23456
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23469
23457
|
return _super.apply(this, arguments);
|
|
23470
23458
|
}
|
|
23471
|
-
_createClass$
|
|
23459
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23472
23460
|
key: "renderIcon",
|
|
23473
23461
|
value:
|
|
23474
23462
|
/**
|
|
@@ -23513,7 +23501,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23513
23501
|
});
|
|
23514
23502
|
}
|
|
23515
23503
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23516
|
-
var iconProps = _objectSpread$
|
|
23504
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23517
23505
|
delete iconProps.legendIcon;
|
|
23518
23506
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23519
23507
|
}
|
|
@@ -23561,7 +23549,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23561
23549
|
var finalFormatter = entry.formatter || formatter;
|
|
23562
23550
|
var className = classNames((_classNames = {
|
|
23563
23551
|
'recharts-legend-item': true
|
|
23564
|
-
}, _defineProperty$
|
|
23552
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23565
23553
|
if (entry.type === 'none') {
|
|
23566
23554
|
return null;
|
|
23567
23555
|
}
|
|
@@ -23606,8 +23594,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23606
23594
|
}]);
|
|
23607
23595
|
return DefaultLegendContent;
|
|
23608
23596
|
}(React$3.PureComponent);
|
|
23609
|
-
_defineProperty$
|
|
23610
|
-
_defineProperty$
|
|
23597
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23598
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23611
23599
|
iconSize: 14,
|
|
23612
23600
|
layout: 'horizontal',
|
|
23613
23601
|
align: 'center',
|
|
@@ -23615,25 +23603,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23615
23603
|
inactiveColor: '#ccc'
|
|
23616
23604
|
});
|
|
23617
23605
|
|
|
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$
|
|
23606
|
+
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); }
|
|
23607
|
+
var _excluded$9 = ["ref"];
|
|
23608
|
+
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; }
|
|
23609
|
+
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; }
|
|
23610
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23611
|
+
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); } }
|
|
23612
|
+
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; }
|
|
23613
|
+
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); }
|
|
23614
|
+
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); }
|
|
23615
|
+
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); }; }
|
|
23616
|
+
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); }
|
|
23617
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23618
|
+
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; } }
|
|
23619
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23620
|
+
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; }
|
|
23621
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23622
|
+
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); }
|
|
23623
|
+
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; }
|
|
23624
|
+
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
23625
|
function defaultUniqBy$1(entry) {
|
|
23638
23626
|
return entry.value;
|
|
23639
23627
|
}
|
|
@@ -23654,27 +23642,27 @@ function renderContent$1(content, props) {
|
|
|
23654
23642
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23655
23643
|
}
|
|
23656
23644
|
props.ref;
|
|
23657
|
-
var otherProps = _objectWithoutProperties$
|
|
23645
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23658
23646
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23659
23647
|
}
|
|
23660
23648
|
var EPS$2 = 1;
|
|
23661
23649
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23662
|
-
_inherits$
|
|
23663
|
-
var _super = _createSuper$
|
|
23650
|
+
_inherits$7(Legend, _PureComponent);
|
|
23651
|
+
var _super = _createSuper$7(Legend);
|
|
23664
23652
|
function Legend() {
|
|
23665
23653
|
var _this;
|
|
23666
|
-
_classCallCheck$
|
|
23654
|
+
_classCallCheck$9(this, Legend);
|
|
23667
23655
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23668
23656
|
args[_key] = arguments[_key];
|
|
23669
23657
|
}
|
|
23670
23658
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23671
|
-
_defineProperty$
|
|
23659
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23672
23660
|
boxWidth: -1,
|
|
23673
23661
|
boxHeight: -1
|
|
23674
23662
|
});
|
|
23675
23663
|
return _this;
|
|
23676
23664
|
}
|
|
23677
|
-
_createClass$
|
|
23665
|
+
_createClass$9(Legend, [{
|
|
23678
23666
|
key: "componentDidMount",
|
|
23679
23667
|
value: function componentDidMount() {
|
|
23680
23668
|
this.updateBBox();
|
|
@@ -23749,7 +23737,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23749
23737
|
};
|
|
23750
23738
|
}
|
|
23751
23739
|
}
|
|
23752
|
-
return _objectSpread$
|
|
23740
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23753
23741
|
}
|
|
23754
23742
|
}, {
|
|
23755
23743
|
key: "updateBBox",
|
|
@@ -23792,7 +23780,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23792
23780
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23793
23781
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23794
23782
|
payload = _this$props2.payload;
|
|
23795
|
-
var outerStyle = _objectSpread$
|
|
23783
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23796
23784
|
position: 'absolute',
|
|
23797
23785
|
width: width || 'auto',
|
|
23798
23786
|
height: height || 'auto'
|
|
@@ -23803,7 +23791,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23803
23791
|
ref: function ref(node) {
|
|
23804
23792
|
_this2.wrapperNode = node;
|
|
23805
23793
|
}
|
|
23806
|
-
}, renderContent$1(content, _objectSpread$
|
|
23794
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23807
23795
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23808
23796
|
})));
|
|
23809
23797
|
}
|
|
@@ -23826,8 +23814,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23826
23814
|
}]);
|
|
23827
23815
|
return Legend;
|
|
23828
23816
|
}(React$3.PureComponent);
|
|
23829
|
-
_defineProperty$
|
|
23830
|
-
_defineProperty$
|
|
23817
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23818
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23831
23819
|
iconSize: 14,
|
|
23832
23820
|
layout: 'horizontal',
|
|
23833
23821
|
align: 'center',
|
|
@@ -24391,13 +24379,13 @@ function setRafTimeout(callback) {
|
|
|
24391
24379
|
requestAnimationFrame(shouldUpdate);
|
|
24392
24380
|
}
|
|
24393
24381
|
|
|
24394
|
-
function _typeof$
|
|
24395
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24396
|
-
function _nonIterableRest$
|
|
24397
|
-
function _unsupportedIterableToArray$
|
|
24398
|
-
function _arrayLikeToArray$
|
|
24382
|
+
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); }
|
|
24383
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24384
|
+
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."); }
|
|
24385
|
+
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); }
|
|
24386
|
+
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
24387
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24400
|
-
function _arrayWithHoles$
|
|
24388
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24401
24389
|
function createAnimateManager() {
|
|
24402
24390
|
var currStyle = {};
|
|
24403
24391
|
var handleChange = function handleChange() {
|
|
@@ -24424,7 +24412,7 @@ function createAnimateManager() {
|
|
|
24424
24412
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24425
24413
|
return;
|
|
24426
24414
|
}
|
|
24427
|
-
if (_typeof$
|
|
24415
|
+
if (_typeof$o(_style) === 'object') {
|
|
24428
24416
|
currStyle = _style;
|
|
24429
24417
|
handleChange(currStyle);
|
|
24430
24418
|
}
|
|
@@ -24451,12 +24439,12 @@ function createAnimateManager() {
|
|
|
24451
24439
|
};
|
|
24452
24440
|
}
|
|
24453
24441
|
|
|
24454
|
-
function _typeof$
|
|
24455
|
-
function ownKeys$
|
|
24456
|
-
function _objectSpread$
|
|
24457
|
-
function _defineProperty$
|
|
24458
|
-
function _toPropertyKey$
|
|
24459
|
-
function _toPrimitive$
|
|
24442
|
+
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); }
|
|
24443
|
+
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; }
|
|
24444
|
+
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; }
|
|
24445
|
+
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; }
|
|
24446
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24447
|
+
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
24448
|
/* eslint no-console: 0 */
|
|
24461
24449
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24462
24450
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24488,7 +24476,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24488
24476
|
*/
|
|
24489
24477
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24490
24478
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24491
|
-
return _defineProperty$
|
|
24479
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24492
24480
|
}
|
|
24493
24481
|
var isTransition = name === 'transition';
|
|
24494
24482
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24499,7 +24487,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24499
24487
|
if (isTransition) {
|
|
24500
24488
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24501
24489
|
}
|
|
24502
|
-
return _objectSpread$
|
|
24490
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24503
24491
|
}, {});
|
|
24504
24492
|
};
|
|
24505
24493
|
|
|
@@ -24509,7 +24497,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24509
24497
|
*/
|
|
24510
24498
|
var mapObject = function mapObject(fn, obj) {
|
|
24511
24499
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24512
|
-
return _objectSpread$
|
|
24500
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24513
24501
|
}, {});
|
|
24514
24502
|
};
|
|
24515
24503
|
|
|
@@ -24519,7 +24507,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24519
24507
|
*/
|
|
24520
24508
|
var translateStyle = function translateStyle(style) {
|
|
24521
24509
|
return Object.keys(style).reduce(function (res, key) {
|
|
24522
|
-
return _objectSpread$
|
|
24510
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24523
24511
|
}, style);
|
|
24524
24512
|
};
|
|
24525
24513
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24547,16 +24535,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24547
24535
|
}
|
|
24548
24536
|
};
|
|
24549
24537
|
|
|
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$
|
|
24538
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24539
|
+
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."); }
|
|
24540
|
+
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; } }
|
|
24541
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24542
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24555
24543
|
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$
|
|
24544
|
+
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
24545
|
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$
|
|
24546
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24547
|
+
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
24548
|
var ACCURACY = 1e-4;
|
|
24561
24549
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24562
24550
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24632,7 +24620,7 @@ var configBezier = function configBezier() {
|
|
|
24632
24620
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24633
24621
|
return parseFloat(x);
|
|
24634
24622
|
});
|
|
24635
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24623
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24636
24624
|
x1 = _easing$1$split$0$spl2[0];
|
|
24637
24625
|
y1 = _easing$1$split$0$spl2[1];
|
|
24638
24626
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24725,22 +24713,22 @@ var configEasing = function configEasing() {
|
|
|
24725
24713
|
return null;
|
|
24726
24714
|
};
|
|
24727
24715
|
|
|
24728
|
-
function _typeof$
|
|
24729
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24716
|
+
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); }
|
|
24717
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24730
24718
|
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
24719
|
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$
|
|
24720
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24721
|
+
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; }
|
|
24722
|
+
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; }
|
|
24723
|
+
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; }
|
|
24724
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24725
|
+
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); }
|
|
24726
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24727
|
+
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."); }
|
|
24728
|
+
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); }
|
|
24729
|
+
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; }
|
|
24730
|
+
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; } }
|
|
24731
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24744
24732
|
var alpha = function alpha(begin, end, k) {
|
|
24745
24733
|
return begin + (end - begin) * k;
|
|
24746
24734
|
};
|
|
@@ -24758,10 +24746,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24758
24746
|
var nextStepVals = mapObject(function (key, val) {
|
|
24759
24747
|
if (needContinue(val)) {
|
|
24760
24748
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24761
|
-
_easing2 = _slicedToArray$
|
|
24749
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24762
24750
|
newX = _easing2[0],
|
|
24763
24751
|
newV = _easing2[1];
|
|
24764
|
-
return _objectSpread$
|
|
24752
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24765
24753
|
from: newX,
|
|
24766
24754
|
velocity: newV
|
|
24767
24755
|
});
|
|
@@ -24771,7 +24759,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24771
24759
|
if (steps < 1) {
|
|
24772
24760
|
return mapObject(function (key, val) {
|
|
24773
24761
|
if (needContinue(val)) {
|
|
24774
|
-
return _objectSpread$
|
|
24762
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24775
24763
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24776
24764
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24777
24765
|
});
|
|
@@ -24786,10 +24774,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24786
24774
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24787
24775
|
var interKeys = getIntersectionKeys(from, to);
|
|
24788
24776
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24789
|
-
return _objectSpread$
|
|
24777
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24790
24778
|
}, {});
|
|
24791
24779
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24792
|
-
return _objectSpread$
|
|
24780
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24793
24781
|
from: from[key],
|
|
24794
24782
|
velocity: 0,
|
|
24795
24783
|
to: to[key]
|
|
@@ -24819,7 +24807,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24819
24807
|
var steps = deltaTime / easing.dt;
|
|
24820
24808
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24821
24809
|
// get union set and add compatible prefix
|
|
24822
|
-
render(_objectSpread$
|
|
24810
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24823
24811
|
preTime = now;
|
|
24824
24812
|
if (!shouldStopAnimation()) {
|
|
24825
24813
|
cafId = requestAnimationFrame(update);
|
|
@@ -24837,14 +24825,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24837
24825
|
}, timingStyle);
|
|
24838
24826
|
|
|
24839
24827
|
// get union set and add compatible prefix
|
|
24840
|
-
render(_objectSpread$
|
|
24828
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24841
24829
|
if (t < 1) {
|
|
24842
24830
|
cafId = requestAnimationFrame(update);
|
|
24843
24831
|
} else {
|
|
24844
24832
|
var finalStyle = mapObject(function (key, val) {
|
|
24845
24833
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24846
24834
|
}, timingStyle);
|
|
24847
|
-
render(_objectSpread$
|
|
24835
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24848
24836
|
}
|
|
24849
24837
|
};
|
|
24850
24838
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24860,37 +24848,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24860
24848
|
};
|
|
24861
24849
|
});
|
|
24862
24850
|
|
|
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$
|
|
24851
|
+
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); }
|
|
24852
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24853
|
+
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; }
|
|
24854
|
+
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; }
|
|
24855
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24868
24856
|
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$
|
|
24857
|
+
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
24858
|
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$
|
|
24859
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24860
|
+
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; }
|
|
24861
|
+
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; }
|
|
24862
|
+
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; }
|
|
24863
|
+
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; }
|
|
24864
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24865
|
+
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); } }
|
|
24866
|
+
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; }
|
|
24867
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24868
|
+
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); }
|
|
24869
|
+
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); }
|
|
24870
|
+
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); }
|
|
24871
|
+
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); }; }
|
|
24872
|
+
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); }
|
|
24873
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24874
|
+
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; } }
|
|
24875
|
+
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
24876
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24889
|
-
_inherits$
|
|
24890
|
-
var _super = _createSuper$
|
|
24877
|
+
_inherits$6(Animate, _PureComponent);
|
|
24878
|
+
var _super = _createSuper$6(Animate);
|
|
24891
24879
|
function Animate(props, context) {
|
|
24892
24880
|
var _this;
|
|
24893
|
-
_classCallCheck$
|
|
24881
|
+
_classCallCheck$8(this, Animate);
|
|
24894
24882
|
_this = _super.call(this, props, context);
|
|
24895
24883
|
var _this$props = _this.props,
|
|
24896
24884
|
isActive = _this$props.isActive,
|
|
@@ -24900,8 +24888,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24900
24888
|
steps = _this$props.steps,
|
|
24901
24889
|
children = _this$props.children,
|
|
24902
24890
|
duration = _this$props.duration;
|
|
24903
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24904
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24891
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24892
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24905
24893
|
if (!isActive || duration <= 0) {
|
|
24906
24894
|
_this.state = {
|
|
24907
24895
|
style: {}
|
|
@@ -24913,7 +24901,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24913
24901
|
style: to
|
|
24914
24902
|
};
|
|
24915
24903
|
}
|
|
24916
|
-
return _possibleConstructorReturn$
|
|
24904
|
+
return _possibleConstructorReturn$6(_this);
|
|
24917
24905
|
}
|
|
24918
24906
|
if (steps && steps.length) {
|
|
24919
24907
|
_this.state = {
|
|
@@ -24924,10 +24912,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24924
24912
|
_this.state = {
|
|
24925
24913
|
style: from
|
|
24926
24914
|
};
|
|
24927
|
-
return _possibleConstructorReturn$
|
|
24915
|
+
return _possibleConstructorReturn$6(_this);
|
|
24928
24916
|
}
|
|
24929
24917
|
_this.state = {
|
|
24930
|
-
style: attributeName ? _defineProperty$
|
|
24918
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24931
24919
|
};
|
|
24932
24920
|
} else {
|
|
24933
24921
|
_this.state = {
|
|
@@ -24936,7 +24924,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24936
24924
|
}
|
|
24937
24925
|
return _this;
|
|
24938
24926
|
}
|
|
24939
|
-
_createClass$
|
|
24927
|
+
_createClass$8(Animate, [{
|
|
24940
24928
|
key: "componentDidMount",
|
|
24941
24929
|
value: function componentDidMount() {
|
|
24942
24930
|
var _this$props2 = this.props,
|
|
@@ -24964,7 +24952,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24964
24952
|
}
|
|
24965
24953
|
if (!isActive) {
|
|
24966
24954
|
var newState = {
|
|
24967
|
-
style: attributeName ? _defineProperty$
|
|
24955
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24968
24956
|
};
|
|
24969
24957
|
if (this.state && style) {
|
|
24970
24958
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24987,14 +24975,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24987
24975
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24988
24976
|
if (this.state && style) {
|
|
24989
24977
|
var _newState = {
|
|
24990
|
-
style: attributeName ? _defineProperty$
|
|
24978
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24991
24979
|
};
|
|
24992
24980
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24993
24981
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24994
24982
|
this.setState(_newState);
|
|
24995
24983
|
}
|
|
24996
24984
|
}
|
|
24997
|
-
this.runAnimation(_objectSpread$
|
|
24985
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24998
24986
|
from: from,
|
|
24999
24987
|
begin: 0
|
|
25000
24988
|
}));
|
|
@@ -25077,7 +25065,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25077
25065
|
}), duration]);
|
|
25078
25066
|
}
|
|
25079
25067
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25080
|
-
var newStyle = _objectSpread$
|
|
25068
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25081
25069
|
transition: transition
|
|
25082
25070
|
});
|
|
25083
25071
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25109,9 +25097,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25109
25097
|
this.runStepAnimation(props);
|
|
25110
25098
|
return;
|
|
25111
25099
|
}
|
|
25112
|
-
var to = attributeName ? _defineProperty$
|
|
25100
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25113
25101
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25114
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25102
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25115
25103
|
transition: transition
|
|
25116
25104
|
}), duration, onAnimationEnd]);
|
|
25117
25105
|
}
|
|
@@ -25132,7 +25120,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25132
25120
|
_this$props4.onAnimationEnd;
|
|
25133
25121
|
_this$props4.shouldReAnimate;
|
|
25134
25122
|
_this$props4.onAnimationReStart;
|
|
25135
|
-
var others = _objectWithoutProperties$
|
|
25123
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25136
25124
|
var count = React$3.Children.count(children);
|
|
25137
25125
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25138
25126
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25147,8 +25135,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25147
25135
|
_container$props$styl = _container$props.style,
|
|
25148
25136
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25149
25137
|
className = _container$props.className;
|
|
25150
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25151
|
-
style: _objectSpread$
|
|
25138
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25139
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25152
25140
|
className: className
|
|
25153
25141
|
}));
|
|
25154
25142
|
return res;
|
|
@@ -25673,10 +25661,10 @@ var defineProperty$2 = (function() {
|
|
|
25673
25661
|
} catch (e) {}
|
|
25674
25662
|
}());
|
|
25675
25663
|
|
|
25676
|
-
var _defineProperty$
|
|
25664
|
+
var _defineProperty$l = defineProperty$2;
|
|
25677
25665
|
|
|
25678
25666
|
var constant$1 = constant_1,
|
|
25679
|
-
defineProperty$1 = _defineProperty$
|
|
25667
|
+
defineProperty$1 = _defineProperty$l,
|
|
25680
25668
|
identity$7 = identity_1;
|
|
25681
25669
|
|
|
25682
25670
|
/**
|
|
@@ -25853,18 +25841,18 @@ var sortBy_1 = sortBy;
|
|
|
25853
25841
|
/**
|
|
25854
25842
|
* @fileOverview Default Tooltip Content
|
|
25855
25843
|
*/
|
|
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$
|
|
25844
|
+
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); }
|
|
25845
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25846
|
+
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."); }
|
|
25847
|
+
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); }
|
|
25848
|
+
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; }
|
|
25849
|
+
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; } }
|
|
25850
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25851
|
+
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; }
|
|
25852
|
+
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; }
|
|
25853
|
+
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; }
|
|
25854
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25855
|
+
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
25856
|
function defaultFormatter(value) {
|
|
25869
25857
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25870
25858
|
}
|
|
@@ -25894,7 +25882,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25894
25882
|
if (entry.type === 'none') {
|
|
25895
25883
|
return null;
|
|
25896
25884
|
}
|
|
25897
|
-
var finalItemStyle = _objectSpread$
|
|
25885
|
+
var finalItemStyle = _objectSpread$j({
|
|
25898
25886
|
display: 'block',
|
|
25899
25887
|
paddingTop: 4,
|
|
25900
25888
|
paddingBottom: 4,
|
|
@@ -25908,7 +25896,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25908
25896
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25909
25897
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25910
25898
|
if (Array.isArray(formatted)) {
|
|
25911
|
-
var _formatted = _slicedToArray$
|
|
25899
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25912
25900
|
finalValue = _formatted[0];
|
|
25913
25901
|
finalName = _formatted[1];
|
|
25914
25902
|
} else {
|
|
@@ -25940,14 +25928,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25940
25928
|
}
|
|
25941
25929
|
return null;
|
|
25942
25930
|
};
|
|
25943
|
-
var finalStyle = _objectSpread$
|
|
25931
|
+
var finalStyle = _objectSpread$j({
|
|
25944
25932
|
margin: 0,
|
|
25945
25933
|
padding: 10,
|
|
25946
25934
|
backgroundColor: '#fff',
|
|
25947
25935
|
border: '1px solid #ccc',
|
|
25948
25936
|
whiteSpace: 'nowrap'
|
|
25949
25937
|
}, contentStyle);
|
|
25950
|
-
var finalLabelStyle = _objectSpread$
|
|
25938
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25951
25939
|
margin: 0
|
|
25952
25940
|
}, labelStyle);
|
|
25953
25941
|
var hasLabel = !isNil_1(label);
|
|
@@ -25988,22 +25976,18 @@ var Global = {
|
|
|
25988
25976
|
}
|
|
25989
25977
|
};
|
|
25990
25978
|
|
|
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); }
|
|
25979
|
+
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); }
|
|
25980
|
+
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; }
|
|
25981
|
+
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; }
|
|
25982
|
+
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; }
|
|
25983
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25984
|
+
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); }
|
|
25985
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25986
|
+
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."); }
|
|
25987
|
+
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); }
|
|
25988
|
+
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; }
|
|
25989
|
+
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; } }
|
|
25990
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26007
25991
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26008
25992
|
var EPS$1 = 1;
|
|
26009
25993
|
function defaultUniqBy(entry) {
|
|
@@ -26027,204 +26011,7 @@ function renderContent(content, props) {
|
|
|
26027
26011
|
}
|
|
26028
26012
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26029
26013
|
}
|
|
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", {
|
|
26014
|
+
var tooltipDefaultProps = {
|
|
26228
26015
|
active: false,
|
|
26229
26016
|
allowEscapeViewBox: {
|
|
26230
26017
|
x: false,
|
|
@@ -26245,6 +26032,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26245
26032
|
x: 0,
|
|
26246
26033
|
y: 0
|
|
26247
26034
|
},
|
|
26035
|
+
// this doesn't exist on TooltipProps
|
|
26036
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26037
|
+
// @ts-ignore
|
|
26248
26038
|
cursorStyle: {},
|
|
26249
26039
|
separator: ' : ',
|
|
26250
26040
|
wrapperStyle: {},
|
|
@@ -26258,7 +26048,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26258
26048
|
animationDuration: 400,
|
|
26259
26049
|
filterNull: true,
|
|
26260
26050
|
useTranslate3d: false
|
|
26261
|
-
}
|
|
26051
|
+
};
|
|
26052
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26053
|
+
var _classNames;
|
|
26054
|
+
var _useState = React$3.useState(-1),
|
|
26055
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26056
|
+
boxWidth = _useState2[0],
|
|
26057
|
+
setBoxWidth = _useState2[1];
|
|
26058
|
+
var _useState3 = React$3.useState(-1),
|
|
26059
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26060
|
+
boxHeight = _useState4[0],
|
|
26061
|
+
setBoxHeight = _useState4[1];
|
|
26062
|
+
var _useState5 = React$3.useState(false),
|
|
26063
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26064
|
+
dismissed = _useState6[0],
|
|
26065
|
+
setDismissed = _useState6[1];
|
|
26066
|
+
var _useState7 = React$3.useState({
|
|
26067
|
+
x: 0,
|
|
26068
|
+
y: 0
|
|
26069
|
+
}),
|
|
26070
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26071
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26072
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26073
|
+
var wrapperNode = React$3.useRef();
|
|
26074
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26075
|
+
reverseDirection = props.reverseDirection,
|
|
26076
|
+
coordinate = props.coordinate,
|
|
26077
|
+
offset = props.offset,
|
|
26078
|
+
position = props.position,
|
|
26079
|
+
viewBox = props.viewBox;
|
|
26080
|
+
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26081
|
+
if (event.key === 'Escape') {
|
|
26082
|
+
setDismissed(true);
|
|
26083
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26084
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26085
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26086
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26087
|
+
});
|
|
26088
|
+
});
|
|
26089
|
+
}
|
|
26090
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26091
|
+
React$3.useEffect(function () {
|
|
26092
|
+
var updateBBox = function updateBBox() {
|
|
26093
|
+
if (dismissed) {
|
|
26094
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26095
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26096
|
+
setDismissed(false);
|
|
26097
|
+
}
|
|
26098
|
+
} else {
|
|
26099
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26100
|
+
}
|
|
26101
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26102
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26103
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26104
|
+
setBoxWidth(box.width);
|
|
26105
|
+
setBoxHeight(box.height);
|
|
26106
|
+
}
|
|
26107
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26108
|
+
setBoxWidth(-1);
|
|
26109
|
+
setBoxHeight(-1);
|
|
26110
|
+
}
|
|
26111
|
+
};
|
|
26112
|
+
updateBBox();
|
|
26113
|
+
return function () {
|
|
26114
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26115
|
+
};
|
|
26116
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26117
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26118
|
+
var key = _ref.key,
|
|
26119
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26120
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26121
|
+
if (position && isNumber(position[key])) {
|
|
26122
|
+
return position[key];
|
|
26123
|
+
}
|
|
26124
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26125
|
+
var positive = coordinate[key] + offset;
|
|
26126
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26127
|
+
return reverseDirection[key] ? negative : positive;
|
|
26128
|
+
}
|
|
26129
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26130
|
+
var _tooltipBoundary = negative;
|
|
26131
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26132
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26133
|
+
return Math.max(positive, viewBox[key]);
|
|
26134
|
+
}
|
|
26135
|
+
return Math.max(negative, viewBox[key]);
|
|
26136
|
+
}
|
|
26137
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26138
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26139
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26140
|
+
return Math.max(negative, viewBox[key]);
|
|
26141
|
+
}
|
|
26142
|
+
return Math.max(positive, viewBox[key]);
|
|
26143
|
+
};
|
|
26144
|
+
var payload = props.payload,
|
|
26145
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26146
|
+
filterNull = props.filterNull,
|
|
26147
|
+
active = props.active,
|
|
26148
|
+
wrapperStyle = props.wrapperStyle,
|
|
26149
|
+
useTranslate3d = props.useTranslate3d,
|
|
26150
|
+
isAnimationActive = props.isAnimationActive,
|
|
26151
|
+
animationDuration = props.animationDuration,
|
|
26152
|
+
animationEasing = props.animationEasing;
|
|
26153
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26154
|
+
return !isNil_1(entry.value);
|
|
26155
|
+
}) : payload);
|
|
26156
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26157
|
+
var content = props.content;
|
|
26158
|
+
var outerStyle = _objectSpread$i({
|
|
26159
|
+
pointerEvents: 'none',
|
|
26160
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26161
|
+
position: 'absolute',
|
|
26162
|
+
top: 0,
|
|
26163
|
+
left: 0
|
|
26164
|
+
}, wrapperStyle);
|
|
26165
|
+
var translateX, translateY;
|
|
26166
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26167
|
+
translateX = position.x;
|
|
26168
|
+
translateY = position.y;
|
|
26169
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26170
|
+
translateX = getTranslate({
|
|
26171
|
+
key: 'x',
|
|
26172
|
+
tooltipDimension: boxWidth,
|
|
26173
|
+
viewBoxDimension: viewBox.width
|
|
26174
|
+
});
|
|
26175
|
+
translateY = getTranslate({
|
|
26176
|
+
key: 'y',
|
|
26177
|
+
tooltipDimension: boxHeight,
|
|
26178
|
+
viewBoxDimension: viewBox.height
|
|
26179
|
+
});
|
|
26180
|
+
} else {
|
|
26181
|
+
outerStyle.visibility = 'hidden';
|
|
26182
|
+
}
|
|
26183
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26184
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26185
|
+
})), outerStyle);
|
|
26186
|
+
if (isAnimationActive && active) {
|
|
26187
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26188
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26189
|
+
})), outerStyle);
|
|
26190
|
+
}
|
|
26191
|
+
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));
|
|
26192
|
+
return (
|
|
26193
|
+
/*#__PURE__*/
|
|
26194
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26195
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26196
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26197
|
+
React__default["default"].createElement("div", {
|
|
26198
|
+
tabIndex: -1,
|
|
26199
|
+
role: "dialog",
|
|
26200
|
+
className: cls,
|
|
26201
|
+
style: outerStyle,
|
|
26202
|
+
ref: wrapperNode
|
|
26203
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26204
|
+
payload: finalPayload
|
|
26205
|
+
})))
|
|
26206
|
+
);
|
|
26207
|
+
};
|
|
26208
|
+
|
|
26209
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26210
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26211
|
+
|
|
26212
|
+
/**
|
|
26213
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26214
|
+
* children.props when there are no props set by the consumer
|
|
26215
|
+
* doesn't work if using default parameters
|
|
26216
|
+
*/
|
|
26217
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26262
26218
|
|
|
26263
26219
|
var root = _root;
|
|
26264
26220
|
|
|
@@ -31828,12 +31784,12 @@ module.exports = exports['default'];
|
|
|
31828
31784
|
|
|
31829
31785
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31830
31786
|
|
|
31831
|
-
function _typeof$
|
|
31832
|
-
function ownKeys$
|
|
31833
|
-
function _objectSpread$
|
|
31834
|
-
function _defineProperty$
|
|
31835
|
-
function _toPropertyKey$
|
|
31836
|
-
function _toPrimitive$
|
|
31787
|
+
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); }
|
|
31788
|
+
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; }
|
|
31789
|
+
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; }
|
|
31790
|
+
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; }
|
|
31791
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31792
|
+
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
31793
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31838
31794
|
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
31795
|
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 +31857,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31901
31857
|
}
|
|
31902
31858
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31903
31859
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31904
|
-
var measurementSpanStyle = _objectSpread$
|
|
31860
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31905
31861
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31906
31862
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31907
31863
|
return styleKey;
|
|
@@ -31956,11 +31912,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31956
31912
|
};
|
|
31957
31913
|
};
|
|
31958
31914
|
|
|
31959
|
-
var _excluded$
|
|
31960
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31915
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31961
31916
|
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$
|
|
31917
|
+
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; }
|
|
31918
|
+
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
31919
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31965
31920
|
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
31921
|
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 +32069,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32114
32069
|
}
|
|
32115
32070
|
return getWordsWithoutCalculate(children);
|
|
32116
32071
|
};
|
|
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);
|
|
32072
|
+
var textDefaultProps = {
|
|
32073
|
+
x: 0,
|
|
32074
|
+
y: 0,
|
|
32075
|
+
lineHeight: '1em',
|
|
32076
|
+
capHeight: '0.71em',
|
|
32077
|
+
// Magic number from d3
|
|
32078
|
+
scaleToFit: false,
|
|
32079
|
+
textAnchor: 'start',
|
|
32080
|
+
verticalAnchor: 'end',
|
|
32081
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32082
|
+
fill: '#808080'
|
|
32083
|
+
};
|
|
32084
|
+
var Text = function Text(props) {
|
|
32136
32085
|
var wordsByLines = React$3.useMemo(function () {
|
|
32137
32086
|
return getWordsByLines({
|
|
32138
32087
|
breakAll: props.breakAll,
|
|
32139
32088
|
children: props.children,
|
|
32140
32089
|
maxLines: props.maxLines,
|
|
32141
|
-
scaleToFit: scaleToFit,
|
|
32090
|
+
scaleToFit: props.scaleToFit,
|
|
32142
32091
|
style: props.style,
|
|
32143
32092
|
width: props.width
|
|
32144
32093
|
});
|
|
32145
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32094
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32146
32095
|
var dx = props.dx,
|
|
32147
32096
|
dy = props.dy,
|
|
32097
|
+
textAnchor = props.textAnchor,
|
|
32098
|
+
verticalAnchor = props.verticalAnchor,
|
|
32099
|
+
scaleToFit = props.scaleToFit,
|
|
32148
32100
|
angle = props.angle,
|
|
32101
|
+
lineHeight = props.lineHeight,
|
|
32102
|
+
capHeight = props.capHeight,
|
|
32149
32103
|
className = props.className,
|
|
32150
32104
|
breakAll = props.breakAll,
|
|
32151
|
-
textProps = _objectWithoutProperties$
|
|
32152
|
-
if (!isNumOrStr(
|
|
32105
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32106
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32153
32107
|
return null;
|
|
32154
32108
|
}
|
|
32155
|
-
var x =
|
|
32156
|
-
var y =
|
|
32109
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32110
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32157
32111
|
var startDy;
|
|
32158
32112
|
switch (verticalAnchor) {
|
|
32159
32113
|
case 'start':
|
|
@@ -32183,7 +32137,7 @@ var Text = function Text(_ref5) {
|
|
|
32183
32137
|
y: y,
|
|
32184
32138
|
className: classNames('recharts-text', className),
|
|
32185
32139
|
textAnchor: textAnchor,
|
|
32186
|
-
fill: fill.includes('url') ?
|
|
32140
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32187
32141
|
}), wordsByLines.map(function (line, index) {
|
|
32188
32142
|
return (
|
|
32189
32143
|
/*#__PURE__*/
|
|
@@ -32196,6 +32150,7 @@ var Text = function Text(_ref5) {
|
|
|
32196
32150
|
);
|
|
32197
32151
|
}));
|
|
32198
32152
|
};
|
|
32153
|
+
Text.defaultProps = textDefaultProps;
|
|
32199
32154
|
|
|
32200
32155
|
var baseIsEqual = _baseIsEqual;
|
|
32201
32156
|
|
|
@@ -38463,7 +38418,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38463
38418
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38464
38419
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38465
38420
|
|
|
38466
|
-
var _excluded$
|
|
38421
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38467
38422
|
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
38423
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38469
38424
|
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 +38426,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38471
38426
|
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
38427
|
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
38428
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38474
|
-
function _objectWithoutProperties$
|
|
38475
|
-
function _objectWithoutPropertiesLoose$
|
|
38429
|
+
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; }
|
|
38430
|
+
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
38431
|
function ErrorBar(props) {
|
|
38477
38432
|
var offset = props.offset,
|
|
38478
38433
|
layout = props.layout,
|
|
@@ -38482,7 +38437,7 @@ function ErrorBar(props) {
|
|
|
38482
38437
|
dataPointFormatter = props.dataPointFormatter,
|
|
38483
38438
|
xAxis = props.xAxis,
|
|
38484
38439
|
yAxis = props.yAxis,
|
|
38485
|
-
others = _objectWithoutProperties$
|
|
38440
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38486
38441
|
var svgProps = filterProps(others);
|
|
38487
38442
|
var errorBars = data.map(function (entry, i) {
|
|
38488
38443
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38593,18 +38548,18 @@ ErrorBar.defaultProps = {
|
|
|
38593
38548
|
};
|
|
38594
38549
|
ErrorBar.displayName = 'ErrorBar';
|
|
38595
38550
|
|
|
38596
|
-
function _typeof$
|
|
38551
|
+
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
38552
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38598
38553
|
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
38554
|
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
38555
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38601
38556
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38602
38557
|
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$
|
|
38558
|
+
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; }
|
|
38559
|
+
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; }
|
|
38560
|
+
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; }
|
|
38561
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38562
|
+
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
38563
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38609
38564
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38610
38565
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38775,7 +38730,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38775
38730
|
};
|
|
38776
38731
|
});
|
|
38777
38732
|
}
|
|
38778
|
-
return _objectSpread$
|
|
38733
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38779
38734
|
payload: legendData,
|
|
38780
38735
|
item: legendItem
|
|
38781
38736
|
});
|
|
@@ -38929,10 +38884,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38929
38884
|
verticalAlign = legendProps.verticalAlign,
|
|
38930
38885
|
layout = legendProps.layout;
|
|
38931
38886
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38932
|
-
newOffset = _objectSpread$
|
|
38887
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38933
38888
|
}
|
|
38934
38889
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38935
|
-
newOffset = _objectSpread$
|
|
38890
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38936
38891
|
}
|
|
38937
38892
|
}
|
|
38938
38893
|
return newOffset;
|
|
@@ -39358,14 +39313,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39358
39313
|
items: [item]
|
|
39359
39314
|
};
|
|
39360
39315
|
}
|
|
39361
|
-
return _objectSpread$
|
|
39316
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39362
39317
|
}, {});
|
|
39363
39318
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39364
39319
|
var group = stackGroups[axisId];
|
|
39365
39320
|
if (group.hasStack) {
|
|
39366
39321
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39367
39322
|
var g = group.stackGroups[stackId];
|
|
39368
|
-
return _objectSpread$
|
|
39323
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39369
39324
|
numericAxisId: numericAxisId,
|
|
39370
39325
|
cateAxisId: cateAxisId,
|
|
39371
39326
|
items: g.items,
|
|
@@ -39373,7 +39328,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39373
39328
|
}));
|
|
39374
39329
|
}, {});
|
|
39375
39330
|
}
|
|
39376
|
-
return _objectSpread$
|
|
39331
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39377
39332
|
}, {});
|
|
39378
39333
|
};
|
|
39379
39334
|
|
|
@@ -39587,7 +39542,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39587
39542
|
formatter = _graphicalItem$props.formatter,
|
|
39588
39543
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39589
39544
|
chartType = _graphicalItem$props.chartType;
|
|
39590
|
-
return _objectSpread$
|
|
39545
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39591
39546
|
dataKey: dataKey,
|
|
39592
39547
|
unit: unit,
|
|
39593
39548
|
formatter: formatter,
|
|
@@ -39600,12 +39555,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39600
39555
|
});
|
|
39601
39556
|
};
|
|
39602
39557
|
|
|
39603
|
-
function _typeof$
|
|
39604
|
-
function ownKeys$
|
|
39605
|
-
function _objectSpread$
|
|
39606
|
-
function _defineProperty$
|
|
39607
|
-
function _toPropertyKey$
|
|
39608
|
-
function _toPrimitive$
|
|
39558
|
+
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); }
|
|
39559
|
+
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; }
|
|
39560
|
+
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; }
|
|
39561
|
+
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; }
|
|
39562
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39563
|
+
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
39564
|
var RADIAN = Math.PI / 180;
|
|
39610
39565
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39611
39566
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39710,7 +39665,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39710
39665
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39711
39666
|
}
|
|
39712
39667
|
if (inRange) {
|
|
39713
|
-
return _objectSpread$
|
|
39668
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39714
39669
|
radius: radius,
|
|
39715
39670
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39716
39671
|
});
|
|
@@ -39718,21 +39673,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39718
39673
|
return null;
|
|
39719
39674
|
};
|
|
39720
39675
|
|
|
39721
|
-
function _typeof$
|
|
39722
|
-
var _excluded$7 = ["offset"];
|
|
39676
|
+
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
39677
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39724
39678
|
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
39679
|
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
39680
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39727
39681
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39728
39682
|
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); }
|
|
39683
|
+
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; }
|
|
39684
|
+
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; }
|
|
39685
|
+
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; }
|
|
39686
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39687
|
+
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
39688
|
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
39689
|
var getLabel = function getLabel(props) {
|
|
39738
39690
|
var value = props.value,
|
|
@@ -39877,7 +39829,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39877
39829
|
textAnchor: 'middle',
|
|
39878
39830
|
verticalAnchor: verticalEnd
|
|
39879
39831
|
};
|
|
39880
|
-
return _objectSpread$
|
|
39832
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39881
39833
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39882
39834
|
width: width
|
|
39883
39835
|
} : {});
|
|
@@ -39889,7 +39841,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39889
39841
|
textAnchor: 'middle',
|
|
39890
39842
|
verticalAnchor: verticalStart
|
|
39891
39843
|
};
|
|
39892
|
-
return _objectSpread$
|
|
39844
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39893
39845
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39894
39846
|
width: width
|
|
39895
39847
|
} : {});
|
|
@@ -39901,7 +39853,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39901
39853
|
textAnchor: horizontalEnd,
|
|
39902
39854
|
verticalAnchor: 'middle'
|
|
39903
39855
|
};
|
|
39904
|
-
return _objectSpread$
|
|
39856
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39905
39857
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39906
39858
|
height: height
|
|
39907
39859
|
} : {});
|
|
@@ -39913,7 +39865,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39913
39865
|
textAnchor: horizontalStart,
|
|
39914
39866
|
verticalAnchor: 'middle'
|
|
39915
39867
|
};
|
|
39916
|
-
return _objectSpread$
|
|
39868
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39917
39869
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39918
39870
|
height: height
|
|
39919
39871
|
} : {});
|
|
@@ -39923,7 +39875,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39923
39875
|
height: height
|
|
39924
39876
|
} : {};
|
|
39925
39877
|
if (position === 'insideLeft') {
|
|
39926
|
-
return _objectSpread$
|
|
39878
|
+
return _objectSpread$e({
|
|
39927
39879
|
x: x + horizontalOffset,
|
|
39928
39880
|
y: y + height / 2,
|
|
39929
39881
|
textAnchor: horizontalStart,
|
|
@@ -39931,7 +39883,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39931
39883
|
}, sizeAttrs);
|
|
39932
39884
|
}
|
|
39933
39885
|
if (position === 'insideRight') {
|
|
39934
|
-
return _objectSpread$
|
|
39886
|
+
return _objectSpread$e({
|
|
39935
39887
|
x: x + width - horizontalOffset,
|
|
39936
39888
|
y: y + height / 2,
|
|
39937
39889
|
textAnchor: horizontalEnd,
|
|
@@ -39939,7 +39891,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39939
39891
|
}, sizeAttrs);
|
|
39940
39892
|
}
|
|
39941
39893
|
if (position === 'insideTop') {
|
|
39942
|
-
return _objectSpread$
|
|
39894
|
+
return _objectSpread$e({
|
|
39943
39895
|
x: x + width / 2,
|
|
39944
39896
|
y: y + verticalOffset,
|
|
39945
39897
|
textAnchor: 'middle',
|
|
@@ -39947,7 +39899,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39947
39899
|
}, sizeAttrs);
|
|
39948
39900
|
}
|
|
39949
39901
|
if (position === 'insideBottom') {
|
|
39950
|
-
return _objectSpread$
|
|
39902
|
+
return _objectSpread$e({
|
|
39951
39903
|
x: x + width / 2,
|
|
39952
39904
|
y: y + height - verticalOffset,
|
|
39953
39905
|
textAnchor: 'middle',
|
|
@@ -39955,7 +39907,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39955
39907
|
}, sizeAttrs);
|
|
39956
39908
|
}
|
|
39957
39909
|
if (position === 'insideTopLeft') {
|
|
39958
|
-
return _objectSpread$
|
|
39910
|
+
return _objectSpread$e({
|
|
39959
39911
|
x: x + horizontalOffset,
|
|
39960
39912
|
y: y + verticalOffset,
|
|
39961
39913
|
textAnchor: horizontalStart,
|
|
@@ -39963,7 +39915,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39963
39915
|
}, sizeAttrs);
|
|
39964
39916
|
}
|
|
39965
39917
|
if (position === 'insideTopRight') {
|
|
39966
|
-
return _objectSpread$
|
|
39918
|
+
return _objectSpread$e({
|
|
39967
39919
|
x: x + width - horizontalOffset,
|
|
39968
39920
|
y: y + verticalOffset,
|
|
39969
39921
|
textAnchor: horizontalEnd,
|
|
@@ -39971,7 +39923,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39971
39923
|
}, sizeAttrs);
|
|
39972
39924
|
}
|
|
39973
39925
|
if (position === 'insideBottomLeft') {
|
|
39974
|
-
return _objectSpread$
|
|
39926
|
+
return _objectSpread$e({
|
|
39975
39927
|
x: x + horizontalOffset,
|
|
39976
39928
|
y: y + height - verticalOffset,
|
|
39977
39929
|
textAnchor: horizontalStart,
|
|
@@ -39979,7 +39931,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39979
39931
|
}, sizeAttrs);
|
|
39980
39932
|
}
|
|
39981
39933
|
if (position === 'insideBottomRight') {
|
|
39982
|
-
return _objectSpread$
|
|
39934
|
+
return _objectSpread$e({
|
|
39983
39935
|
x: x + width - horizontalOffset,
|
|
39984
39936
|
y: y + height - verticalOffset,
|
|
39985
39937
|
textAnchor: horizontalEnd,
|
|
@@ -39987,14 +39939,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39987
39939
|
}, sizeAttrs);
|
|
39988
39940
|
}
|
|
39989
39941
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39990
|
-
return _objectSpread$
|
|
39942
|
+
return _objectSpread$e({
|
|
39991
39943
|
x: x + getPercentValue(position.x, width),
|
|
39992
39944
|
y: y + getPercentValue(position.y, height),
|
|
39993
39945
|
textAnchor: 'end',
|
|
39994
39946
|
verticalAnchor: 'end'
|
|
39995
39947
|
}, sizeAttrs);
|
|
39996
39948
|
}
|
|
39997
|
-
return _objectSpread$
|
|
39949
|
+
return _objectSpread$e({
|
|
39998
39950
|
x: x + width / 2,
|
|
39999
39951
|
y: y + height / 2,
|
|
40000
39952
|
textAnchor: 'middle',
|
|
@@ -40004,13 +39956,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40004
39956
|
var isPolar = function isPolar(viewBox) {
|
|
40005
39957
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40006
39958
|
};
|
|
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);
|
|
39959
|
+
function Label$3(props) {
|
|
40014
39960
|
var viewBox = props.viewBox,
|
|
40015
39961
|
position = props.position,
|
|
40016
39962
|
value = props.value,
|
|
@@ -40047,6 +39993,9 @@ function Label$3(_ref4) {
|
|
|
40047
39993
|
}), label);
|
|
40048
39994
|
}
|
|
40049
39995
|
Label$3.displayName = 'Label';
|
|
39996
|
+
Label$3.defaultProps = {
|
|
39997
|
+
offset: 5
|
|
39998
|
+
};
|
|
40050
39999
|
var parseViewBox = function parseViewBox(props) {
|
|
40051
40000
|
var cx = props.cx,
|
|
40052
40001
|
cy = props.cy,
|
|
@@ -40201,9 +40150,8 @@ function last(array) {
|
|
|
40201
40150
|
|
|
40202
40151
|
var last_1 = last;
|
|
40203
40152
|
|
|
40204
|
-
function _typeof$
|
|
40205
|
-
var _excluded$
|
|
40206
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40153
|
+
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); }
|
|
40154
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40207
40155
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40208
40156
|
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
40157
|
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 +40159,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40211
40159
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40212
40160
|
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
40161
|
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$
|
|
40162
|
+
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; }
|
|
40163
|
+
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; }
|
|
40164
|
+
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; }
|
|
40165
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40166
|
+
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); }
|
|
40167
|
+
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; }
|
|
40168
|
+
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; }
|
|
40169
|
+
var defaultProps = {
|
|
40170
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40171
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40172
|
+
}
|
|
40173
|
+
};
|
|
40174
|
+
function LabelList(props) {
|
|
40175
|
+
var data = props.data,
|
|
40176
|
+
valueAccessor = props.valueAccessor,
|
|
40177
|
+
dataKey = props.dataKey,
|
|
40178
|
+
clockWise = props.clockWise,
|
|
40179
|
+
id = props.id,
|
|
40180
|
+
textBreakAll = props.textBreakAll,
|
|
40181
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40234
40182
|
if (!data || !data.length) {
|
|
40235
40183
|
return null;
|
|
40236
40184
|
}
|
|
@@ -40246,7 +40194,7 @@ function LabelList(_ref) {
|
|
|
40246
40194
|
index: index,
|
|
40247
40195
|
value: value,
|
|
40248
40196
|
textBreakAll: textBreakAll,
|
|
40249
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40197
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40250
40198
|
clockWise: clockWise
|
|
40251
40199
|
})),
|
|
40252
40200
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40301,14 +40249,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40301
40249
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40302
40250
|
}
|
|
40303
40251
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40252
|
+
LabelList.defaultProps = defaultProps;
|
|
40304
40253
|
|
|
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
40254
|
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
40255
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40313
40256
|
var sign = mathSign(endAngle - startAngle);
|
|
40314
40257
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40449,19 +40392,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40449
40392
|
}
|
|
40450
40393
|
return path;
|
|
40451
40394
|
};
|
|
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);
|
|
40395
|
+
var Sector = function Sector(props) {
|
|
40465
40396
|
var cx = props.cx,
|
|
40466
40397
|
cy = props.cy,
|
|
40467
40398
|
innerRadius = props.innerRadius,
|
|
@@ -40507,14 +40438,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40507
40438
|
role: "img"
|
|
40508
40439
|
}));
|
|
40509
40440
|
};
|
|
40441
|
+
Sector.defaultProps = {
|
|
40442
|
+
cx: 0,
|
|
40443
|
+
cy: 0,
|
|
40444
|
+
innerRadius: 0,
|
|
40445
|
+
outerRadius: 0,
|
|
40446
|
+
startAngle: 0,
|
|
40447
|
+
endAngle: 0,
|
|
40448
|
+
cornerRadius: 0,
|
|
40449
|
+
forceCornerRadius: false,
|
|
40450
|
+
cornerIsExternal: false
|
|
40451
|
+
};
|
|
40510
40452
|
|
|
40511
|
-
function _typeof$
|
|
40453
|
+
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
40454
|
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$
|
|
40455
|
+
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; }
|
|
40456
|
+
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; }
|
|
40457
|
+
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; }
|
|
40458
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40459
|
+
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
40460
|
var CURVE_FACTORIES = {
|
|
40519
40461
|
curveBasisClosed: curveBasisClosed,
|
|
40520
40462
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40554,14 +40496,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40554
40496
|
* @return {String} path
|
|
40555
40497
|
*/
|
|
40556
40498
|
var getPath$1 = function getPath(_ref) {
|
|
40557
|
-
var
|
|
40558
|
-
|
|
40559
|
-
_ref$points = _ref.points,
|
|
40560
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40499
|
+
var type = _ref.type,
|
|
40500
|
+
points = _ref.points,
|
|
40561
40501
|
baseLine = _ref.baseLine,
|
|
40562
40502
|
layout = _ref.layout,
|
|
40563
|
-
|
|
40564
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40503
|
+
connectNulls = _ref.connectNulls;
|
|
40565
40504
|
var curveFactory = getCurveFactory(type, layout);
|
|
40566
40505
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40567
40506
|
return defined(entry);
|
|
@@ -40572,7 +40511,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40572
40511
|
return defined(base);
|
|
40573
40512
|
}) : baseLine;
|
|
40574
40513
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40575
|
-
return _objectSpread$
|
|
40514
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40576
40515
|
base: formatBaseLine[index]
|
|
40577
40516
|
});
|
|
40578
40517
|
});
|
|
@@ -40613,8 +40552,12 @@ var Curve = function Curve(props) {
|
|
|
40613
40552
|
ref: pathRef
|
|
40614
40553
|
}));
|
|
40615
40554
|
};
|
|
40555
|
+
Curve.defaultProps = {
|
|
40556
|
+
type: 'linear',
|
|
40557
|
+
points: [],
|
|
40558
|
+
connectNulls: false
|
|
40559
|
+
};
|
|
40616
40560
|
|
|
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
40561
|
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
40562
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40620
40563
|
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 +40565,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40622
40565
|
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
40566
|
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
40567
|
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
40568
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40631
40569
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40632
40570
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40682,29 +40620,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40682
40620
|
}
|
|
40683
40621
|
return false;
|
|
40684
40622
|
};
|
|
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);
|
|
40623
|
+
var Rectangle = function Rectangle(props) {
|
|
40702
40624
|
var pathRef = React$3.useRef();
|
|
40703
40625
|
var _useState = React$3.useState(-1),
|
|
40704
40626
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40705
40627
|
totalLength = _useState2[0],
|
|
40706
40628
|
setTotalLength = _useState2[1];
|
|
40707
|
-
React$3.
|
|
40629
|
+
React$3.useLayoutEffect(function () {
|
|
40708
40630
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40709
40631
|
try {
|
|
40710
40632
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40775,6 +40697,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40775
40697
|
})));
|
|
40776
40698
|
});
|
|
40777
40699
|
};
|
|
40700
|
+
Rectangle.defaultProps = {
|
|
40701
|
+
x: 0,
|
|
40702
|
+
y: 0,
|
|
40703
|
+
width: 0,
|
|
40704
|
+
height: 0,
|
|
40705
|
+
// The radius of border
|
|
40706
|
+
// The radius of four corners when radius is a number
|
|
40707
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40708
|
+
radius: 0,
|
|
40709
|
+
isAnimationActive: false,
|
|
40710
|
+
isUpdateAnimationActive: false,
|
|
40711
|
+
animationBegin: 0,
|
|
40712
|
+
animationDuration: 1500,
|
|
40713
|
+
animationEasing: 'ease'
|
|
40714
|
+
};
|
|
40778
40715
|
|
|
40779
40716
|
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
40717
|
var Dot$1 = function Dot(props) {
|
|
@@ -40794,42 +40731,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40794
40731
|
return null;
|
|
40795
40732
|
};
|
|
40796
40733
|
|
|
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
40734
|
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
40735
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40808
40736
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40809
40737
|
};
|
|
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);
|
|
40738
|
+
var Cross = function Cross(props) {
|
|
40739
|
+
var x = props.x,
|
|
40740
|
+
y = props.y,
|
|
40741
|
+
width = props.width,
|
|
40742
|
+
height = props.height,
|
|
40743
|
+
top = props.top,
|
|
40744
|
+
left = props.left,
|
|
40745
|
+
className = props.className;
|
|
40833
40746
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40834
40747
|
return null;
|
|
40835
40748
|
}
|
|
@@ -40838,6 +40751,14 @@ var Cross = function Cross(_ref) {
|
|
|
40838
40751
|
d: getPath(x, y, width, height, top, left)
|
|
40839
40752
|
}));
|
|
40840
40753
|
};
|
|
40754
|
+
Cross.defaultProps = {
|
|
40755
|
+
x: 0,
|
|
40756
|
+
y: 0,
|
|
40757
|
+
top: 0,
|
|
40758
|
+
left: 0,
|
|
40759
|
+
width: 0,
|
|
40760
|
+
height: 0
|
|
40761
|
+
};
|
|
40841
40762
|
|
|
40842
40763
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40843
40764
|
|
|
@@ -41047,7 +40968,6 @@ var createScale = function createScale(_ref) {
|
|
|
41047
40968
|
isTextActive: false,
|
|
41048
40969
|
isSlideMoving: false,
|
|
41049
40970
|
isTravellerMoving: false,
|
|
41050
|
-
isTravellerFocused: false,
|
|
41051
40971
|
startX: scale(startIndex),
|
|
41052
40972
|
endX: scale(endIndex),
|
|
41053
40973
|
scale: scale,
|
|
@@ -41261,38 +41181,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41261
41181
|
}
|
|
41262
41182
|
});
|
|
41263
41183
|
}
|
|
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
41184
|
}, {
|
|
41297
41185
|
key: "renderBackground",
|
|
41298
41186
|
value: function renderBackground() {
|
|
@@ -41340,7 +41228,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41340
41228
|
}, {
|
|
41341
41229
|
key: "renderTravellerLayer",
|
|
41342
41230
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41343
|
-
var _this3 = this;
|
|
41344
41231
|
var _this$props7 = this.props,
|
|
41345
41232
|
y = _this$props7.y,
|
|
41346
41233
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41354,31 +41241,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41354
41241
|
height: height
|
|
41355
41242
|
});
|
|
41356
41243
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41357
|
-
tabIndex: 0,
|
|
41358
|
-
role: "slider",
|
|
41359
41244
|
className: "recharts-brush-traveller",
|
|
41360
41245
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41361
41246
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41362
41247
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41363
41248
|
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
41249
|
style: {
|
|
41383
41250
|
cursor: 'col-resize'
|
|
41384
41251
|
}
|
|
@@ -41422,9 +41289,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41422
41289
|
height = _this$props9.height,
|
|
41423
41290
|
travellerWidth = _this$props9.travellerWidth,
|
|
41424
41291
|
stroke = _this$props9.stroke;
|
|
41425
|
-
var _this$
|
|
41426
|
-
startX = _this$
|
|
41427
|
-
endX = _this$
|
|
41292
|
+
var _this$state3 = this.state,
|
|
41293
|
+
startX = _this$state3.startX,
|
|
41294
|
+
endX = _this$state3.endX;
|
|
41428
41295
|
var offset = 5;
|
|
41429
41296
|
var attrs = {
|
|
41430
41297
|
pointerEvents: 'none',
|
|
@@ -41456,13 +41323,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41456
41323
|
width = _this$props10.width,
|
|
41457
41324
|
height = _this$props10.height,
|
|
41458
41325
|
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;
|
|
41326
|
+
var _this$state4 = this.state,
|
|
41327
|
+
startX = _this$state4.startX,
|
|
41328
|
+
endX = _this$state4.endX,
|
|
41329
|
+
isTextActive = _this$state4.isTextActive,
|
|
41330
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41331
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41466
41332
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41467
41333
|
return null;
|
|
41468
41334
|
}
|
|
@@ -41474,7 +41340,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41474
41340
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41475
41341
|
onTouchMove: this.handleTouchMove,
|
|
41476
41342
|
style: style
|
|
41477
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41343
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41478
41344
|
}
|
|
41479
41345
|
}], [{
|
|
41480
41346
|
key: "renderDefaultTraveller",
|
|
@@ -41792,7 +41658,7 @@ function every(collection, predicate, guard) {
|
|
|
41792
41658
|
|
|
41793
41659
|
var every_1 = every;
|
|
41794
41660
|
|
|
41795
|
-
var defineProperty = _defineProperty$
|
|
41661
|
+
var defineProperty = _defineProperty$l;
|
|
41796
41662
|
|
|
41797
41663
|
/**
|
|
41798
41664
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42153,6 +42019,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42153
42019
|
legendType: 'rect',
|
|
42154
42020
|
minPointSize: 0,
|
|
42155
42021
|
hide: false,
|
|
42022
|
+
// data of bar
|
|
42156
42023
|
data: [],
|
|
42157
42024
|
layout: 'vertical',
|
|
42158
42025
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45065,11 +44932,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45065
44932
|
}
|
|
45066
44933
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45067
44934
|
x = _this$container$getBo.x,
|
|
45068
|
-
y = _this$container$getBo.y
|
|
45069
|
-
height = _this$container$getBo.height;
|
|
44935
|
+
y = _this$container$getBo.y;
|
|
45070
44936
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45071
44937
|
var pageX = x + coordinate;
|
|
45072
|
-
var pageY = y + this.offset.top
|
|
44938
|
+
var pageY = y + this.offset.top;
|
|
45073
44939
|
this.mouseHandlerCallback({
|
|
45074
44940
|
pageX: pageX,
|
|
45075
44941
|
pageY: pageY
|