@typeolymp/ui-components 1.19.24 → 1.19.26
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/molecules/Dropdown/Button.d.ts +1 -1
- package/build/components/molecules/Dropdown/index.d.ts +2 -1
- package/build/index.es.js +794 -639
- package/build/index.es.js.map +1 -1
- package/build/index.js +794 -639
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/build/components/atoms/Input/translations.d.ts +0 -11
- package/build/components/molecules/Key/translations.d.ts +0 -5
- package/build/components/molecules/PasswordInputField/translations.d.ts +0 -11
- package/build/components/molecules/Tabs/styles.d.ts +0 -2
- package/build/components/organisms/Chart/data copy.d.ts +0 -30
- package/build/components/organisms/Chart/styles.d.ts +0 -1
- package/build/lib/enums.d.ts +0 -4
- package/build/lib/helpers.d.ts +0 -1
- package/build/lib/theme/index.d.ts +0 -3
- package/build/lib/theme/types.d.ts +0 -72
- package/build/lib/translations/index.d.ts +0 -6
- package/build/lib/types/TranslationType.d.ts +0 -7
package/build/index.js
CHANGED
|
@@ -4575,7 +4575,7 @@ function requiredArgs(required, args) {
|
|
|
4575
4575
|
}
|
|
4576
4576
|
}
|
|
4577
4577
|
|
|
4578
|
-
function _typeof$
|
|
4578
|
+
function _typeof$y(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$y = function _typeof(obj) { return typeof obj; }; } else { _typeof$y = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$y(obj); }
|
|
4579
4579
|
/**
|
|
4580
4580
|
* @name toDate
|
|
4581
4581
|
* @category Common Helpers
|
|
@@ -4611,7 +4611,7 @@ function toDate(argument) {
|
|
|
4611
4611
|
requiredArgs(1, arguments);
|
|
4612
4612
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4613
4613
|
|
|
4614
|
-
if (argument instanceof Date || _typeof$
|
|
4614
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4615
4615
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4616
4616
|
return new Date(argument.getTime());
|
|
4617
4617
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4882,7 +4882,7 @@ var millisecondsInMinute = 60000;
|
|
|
4882
4882
|
|
|
4883
4883
|
var millisecondsInHour = 3600000;
|
|
4884
4884
|
|
|
4885
|
-
function _typeof$
|
|
4885
|
+
function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$x = function _typeof(obj) { return typeof obj; }; } else { _typeof$x = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$x(obj); }
|
|
4886
4886
|
/**
|
|
4887
4887
|
* @name isDate
|
|
4888
4888
|
* @category Common Helpers
|
|
@@ -4918,7 +4918,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4918
4918
|
|
|
4919
4919
|
function isDate(value) {
|
|
4920
4920
|
requiredArgs(1, arguments);
|
|
4921
|
-
return value instanceof Date || _typeof$
|
|
4921
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4922
4922
|
}
|
|
4923
4923
|
|
|
4924
4924
|
/**
|
|
@@ -13694,15 +13694,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13694
13694
|
|
|
13695
13695
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13696
13696
|
|
|
13697
|
-
function _slicedToArray$
|
|
13698
|
-
return _arrayWithHoles$
|
|
13697
|
+
function _slicedToArray$c(arr, i) {
|
|
13698
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13699
13699
|
}
|
|
13700
13700
|
|
|
13701
|
-
function _arrayWithHoles$
|
|
13701
|
+
function _arrayWithHoles$d(arr) {
|
|
13702
13702
|
if (Array.isArray(arr)) return arr;
|
|
13703
13703
|
}
|
|
13704
13704
|
|
|
13705
|
-
function _iterableToArrayLimit$
|
|
13705
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13706
13706
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13707
13707
|
|
|
13708
13708
|
if (_i == null) return;
|
|
@@ -13732,16 +13732,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13732
13732
|
return _arr;
|
|
13733
13733
|
}
|
|
13734
13734
|
|
|
13735
|
-
function _unsupportedIterableToArray$
|
|
13735
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13736
13736
|
if (!o) return;
|
|
13737
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13737
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13738
13738
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13739
13739
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13740
13740
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13741
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13741
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13742
13742
|
}
|
|
13743
13743
|
|
|
13744
|
-
function _arrayLikeToArray$
|
|
13744
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13745
13745
|
if (len == null || len > arr.length) len = arr.length;
|
|
13746
13746
|
|
|
13747
13747
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13749,7 +13749,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13749
13749
|
return arr2;
|
|
13750
13750
|
}
|
|
13751
13751
|
|
|
13752
|
-
function _nonIterableRest$
|
|
13752
|
+
function _nonIterableRest$d() {
|
|
13753
13753
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13754
13754
|
}
|
|
13755
13755
|
|
|
@@ -13813,7 +13813,7 @@ reservedProps.forEach(function (name) {
|
|
|
13813
13813
|
// This is a mapping from React prop names to the attribute names.
|
|
13814
13814
|
|
|
13815
13815
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13816
|
-
var _ref2 = _slicedToArray$
|
|
13816
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13817
13817
|
name = _ref2[0],
|
|
13818
13818
|
attributeName = _ref2[1];
|
|
13819
13819
|
|
|
@@ -14935,15 +14935,15 @@ var MenuItem = styled__default["default"].div(templateObject_3$b || (templateObj
|
|
|
14935
14935
|
var templateObject_1$w, templateObject_2$s, templateObject_3$b;
|
|
14936
14936
|
|
|
14937
14937
|
var DropdownButton = function (props) {
|
|
14938
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Dropdown, __assign$2({}, props, { children: jsxRuntime.jsx(ButtonWrapper$1, { children: jsxRuntime.jsx(Button, { label: props.label,
|
|
14938
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Dropdown, __assign$2({}, props, { yOffset: props.yOffset || 10, trigger: ["click"] }, { children: jsxRuntime.jsx(ButtonWrapper$1, { children: jsxRuntime.jsx(Button, { label: props.label, color: props.color, size: props.size, disabled: props.disabled, icon: "chevronDown" }) }) })) }) }));
|
|
14939
14939
|
};
|
|
14940
14940
|
|
|
14941
14941
|
var Dropdown = function (_a) {
|
|
14942
|
-
var menu = _a.menu, trigger = _a.trigger, props = __rest$1(_a, ["menu", "trigger"]);
|
|
14942
|
+
var menu = _a.menu, trigger = _a.trigger, _b = _a.yOffset, yOffset = _b === void 0 ? 5 : _b, props = __rest$1(_a, ["menu", "trigger", "yOffset"]);
|
|
14943
14943
|
var dropwdownRef = React$3.useRef(null);
|
|
14944
|
-
var
|
|
14945
|
-
var
|
|
14946
|
-
var
|
|
14944
|
+
var _c = React$3.useState(""), triggerId = _c[0], settriggerId = _c[1];
|
|
14945
|
+
var _d = React$3.useState(false), isVisible = _d[0], setIsVisible = _d[1];
|
|
14946
|
+
var _e = React$3.useState(), position = _e[0], setPosition = _e[1];
|
|
14947
14947
|
var handleClickOutside = React$3.useCallback(function (event) {
|
|
14948
14948
|
return isVisible &&
|
|
14949
14949
|
dropwdownRef.current &&
|
|
@@ -14965,7 +14965,7 @@ var Dropdown = function (_a) {
|
|
|
14965
14965
|
var _a = el.getBoundingClientRect(), bottom = _a.bottom, left = _a.left;
|
|
14966
14966
|
var width = el.offsetWidth;
|
|
14967
14967
|
var position_1 = left + width > window.innerWidth / 2 ? "right" : "left";
|
|
14968
|
-
var y = bottom +
|
|
14968
|
+
var y = bottom + yOffset;
|
|
14969
14969
|
var x = position_1 === "left"
|
|
14970
14970
|
? left
|
|
14971
14971
|
: left + width - dropwdownRef.current.offsetWidth;
|
|
@@ -16232,31 +16232,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16232
16232
|
return true;
|
|
16233
16233
|
};
|
|
16234
16234
|
|
|
16235
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16235
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16236
16236
|
|
|
16237
16237
|
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."); }
|
|
16238
16238
|
|
|
16239
16239
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16240
16240
|
|
|
16241
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16241
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16242
16242
|
|
|
16243
|
-
function ownKeys$
|
|
16243
|
+
function ownKeys$u(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; }
|
|
16244
16244
|
|
|
16245
|
-
function _objectSpread$
|
|
16245
|
+
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$u(Object(source), !0).forEach(function (key) { _defineProperty$w(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$u(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16246
16246
|
|
|
16247
|
-
function _defineProperty$
|
|
16247
|
+
function _defineProperty$w(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; }
|
|
16248
16248
|
|
|
16249
|
-
function _slicedToArray$
|
|
16249
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16250
16250
|
|
|
16251
|
-
function _nonIterableRest$
|
|
16251
|
+
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."); }
|
|
16252
16252
|
|
|
16253
|
-
function _unsupportedIterableToArray$
|
|
16253
|
+
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); }
|
|
16254
16254
|
|
|
16255
|
-
function _arrayLikeToArray$
|
|
16255
|
+
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; }
|
|
16256
16256
|
|
|
16257
|
-
function _iterableToArrayLimit$
|
|
16257
|
+
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; }
|
|
16258
16258
|
|
|
16259
|
-
function _arrayWithHoles$
|
|
16259
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16260
16260
|
|
|
16261
16261
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16262
16262
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16336,11 +16336,11 @@ function allFilesAccepted(_ref) {
|
|
|
16336
16336
|
|
|
16337
16337
|
return files.every(function (file) {
|
|
16338
16338
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16339
|
-
_fileAccepted2 = _slicedToArray$
|
|
16339
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16340
16340
|
accepted = _fileAccepted2[0];
|
|
16341
16341
|
|
|
16342
16342
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16343
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16343
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16344
16344
|
sizeMatch = _fileMatchSize2[0];
|
|
16345
16345
|
|
|
16346
16346
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16437,7 +16437,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16437
16437
|
function pickerOptionsFromAccept(accept) {
|
|
16438
16438
|
if (isDefined(accept)) {
|
|
16439
16439
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16440
|
-
var _ref3 = _slicedToArray$
|
|
16440
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16441
16441
|
mimeType = _ref3[0],
|
|
16442
16442
|
ext = _ref3[1];
|
|
16443
16443
|
|
|
@@ -16455,11 +16455,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16455
16455
|
|
|
16456
16456
|
return ok;
|
|
16457
16457
|
}).reduce(function (agg, _ref4) {
|
|
16458
|
-
var _ref5 = _slicedToArray$
|
|
16458
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16459
16459
|
mimeType = _ref5[0],
|
|
16460
16460
|
ext = _ref5[1];
|
|
16461
16461
|
|
|
16462
|
-
return _objectSpread$
|
|
16462
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16463
16463
|
}, {});
|
|
16464
16464
|
return [{
|
|
16465
16465
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16479,7 +16479,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16479
16479
|
function acceptPropAsAcceptAttr(accept) {
|
|
16480
16480
|
if (isDefined(accept)) {
|
|
16481
16481
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16482
|
-
var _ref7 = _slicedToArray$
|
|
16482
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16483
16483
|
mimeType = _ref7[0],
|
|
16484
16484
|
ext = _ref7[1];
|
|
16485
16485
|
|
|
@@ -16547,40 +16547,40 @@ function isExt(v) {
|
|
|
16547
16547
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16548
16548
|
*/
|
|
16549
16549
|
|
|
16550
|
-
var _excluded$
|
|
16551
|
-
_excluded2$
|
|
16550
|
+
var _excluded$g = ["children"],
|
|
16551
|
+
_excluded2$5 = ["open"],
|
|
16552
16552
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16553
16553
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16554
16554
|
|
|
16555
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16555
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16556
16556
|
|
|
16557
16557
|
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."); }
|
|
16558
16558
|
|
|
16559
16559
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16560
16560
|
|
|
16561
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16561
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16562
16562
|
|
|
16563
|
-
function _slicedToArray$
|
|
16563
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16564
16564
|
|
|
16565
|
-
function _nonIterableRest$
|
|
16565
|
+
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."); }
|
|
16566
16566
|
|
|
16567
|
-
function _unsupportedIterableToArray$
|
|
16567
|
+
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); }
|
|
16568
16568
|
|
|
16569
|
-
function _arrayLikeToArray$
|
|
16569
|
+
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; }
|
|
16570
16570
|
|
|
16571
|
-
function _iterableToArrayLimit$
|
|
16571
|
+
function _iterableToArrayLimit$a(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; }
|
|
16572
16572
|
|
|
16573
|
-
function _arrayWithHoles$
|
|
16573
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16574
16574
|
|
|
16575
|
-
function ownKeys$
|
|
16575
|
+
function ownKeys$t(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; }
|
|
16576
16576
|
|
|
16577
|
-
function _objectSpread$
|
|
16577
|
+
function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$t(Object(source), !0).forEach(function (key) { _defineProperty$v(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$t(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16578
16578
|
|
|
16579
|
-
function _defineProperty$
|
|
16579
|
+
function _defineProperty$v(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; }
|
|
16580
16580
|
|
|
16581
|
-
function _objectWithoutProperties$
|
|
16581
|
+
function _objectWithoutProperties$g(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$g(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; }
|
|
16582
16582
|
|
|
16583
|
-
function _objectWithoutPropertiesLoose$
|
|
16583
|
+
function _objectWithoutPropertiesLoose$g(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; }
|
|
16584
16584
|
/**
|
|
16585
16585
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16586
16586
|
*
|
|
@@ -16598,11 +16598,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16598
16598
|
|
|
16599
16599
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16600
16600
|
var children = _ref.children,
|
|
16601
|
-
params = _objectWithoutProperties$
|
|
16601
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16602
16602
|
|
|
16603
16603
|
var _useDropzone = useDropzone(params),
|
|
16604
16604
|
open = _useDropzone.open,
|
|
16605
|
-
props = _objectWithoutProperties$
|
|
16605
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16606
16606
|
|
|
16607
16607
|
React$3.useImperativeHandle(ref, function () {
|
|
16608
16608
|
return {
|
|
@@ -16610,13 +16610,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16610
16610
|
};
|
|
16611
16611
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16612
16612
|
|
|
16613
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16613
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16614
16614
|
open: open
|
|
16615
16615
|
})));
|
|
16616
16616
|
});
|
|
16617
16617
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16618
16618
|
|
|
16619
|
-
var defaultProps$
|
|
16619
|
+
var defaultProps$2 = {
|
|
16620
16620
|
disabled: false,
|
|
16621
16621
|
getFilesFromEvent: fromEvent,
|
|
16622
16622
|
maxSize: Infinity,
|
|
@@ -16632,7 +16632,7 @@ var defaultProps$1 = {
|
|
|
16632
16632
|
useFsAccessApi: true,
|
|
16633
16633
|
autoFocus: false
|
|
16634
16634
|
};
|
|
16635
|
-
Dropzone.defaultProps = defaultProps$
|
|
16635
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16636
16636
|
Dropzone.propTypes = {
|
|
16637
16637
|
/**
|
|
16638
16638
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16983,7 +16983,7 @@ var initialState = {
|
|
|
16983
16983
|
function useDropzone() {
|
|
16984
16984
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16985
16985
|
|
|
16986
|
-
var _defaultProps$props = _objectSpread$
|
|
16986
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16987
16987
|
accept = _defaultProps$props.accept,
|
|
16988
16988
|
disabled = _defaultProps$props.disabled,
|
|
16989
16989
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17030,7 +17030,7 @@ function useDropzone() {
|
|
|
17030
17030
|
var inputRef = React$3.useRef(null);
|
|
17031
17031
|
|
|
17032
17032
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
17033
|
-
_useReducer2 = _slicedToArray$
|
|
17033
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
17034
17034
|
state = _useReducer2[0],
|
|
17035
17035
|
dispatch = _useReducer2[1];
|
|
17036
17036
|
|
|
@@ -17200,12 +17200,12 @@ function useDropzone() {
|
|
|
17200
17200
|
var fileRejections = [];
|
|
17201
17201
|
files.forEach(function (file) {
|
|
17202
17202
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17203
|
-
_fileAccepted2 = _slicedToArray$
|
|
17203
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17204
17204
|
accepted = _fileAccepted2[0],
|
|
17205
17205
|
acceptError = _fileAccepted2[1];
|
|
17206
17206
|
|
|
17207
17207
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17208
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17208
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17209
17209
|
sizeMatch = _fileMatchSize2[0],
|
|
17210
17210
|
sizeError = _fileMatchSize2[1];
|
|
17211
17211
|
|
|
@@ -17406,9 +17406,9 @@ function useDropzone() {
|
|
|
17406
17406
|
onDragOver = _ref2.onDragOver,
|
|
17407
17407
|
onDragLeave = _ref2.onDragLeave,
|
|
17408
17408
|
onDrop = _ref2.onDrop,
|
|
17409
|
-
rest = _objectWithoutProperties$
|
|
17409
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17410
17410
|
|
|
17411
|
-
return _objectSpread$
|
|
17411
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17412
17412
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17413
17413
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17414
17414
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17433,9 +17433,9 @@ function useDropzone() {
|
|
|
17433
17433
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17434
17434
|
onChange = _ref3.onChange,
|
|
17435
17435
|
onClick = _ref3.onClick,
|
|
17436
|
-
rest = _objectWithoutProperties$
|
|
17436
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17437
17437
|
|
|
17438
|
-
var inputProps = _defineProperty$
|
|
17438
|
+
var inputProps = _defineProperty$v({
|
|
17439
17439
|
accept: acceptAttr,
|
|
17440
17440
|
multiple: multiple,
|
|
17441
17441
|
type: "file",
|
|
@@ -17447,10 +17447,10 @@ function useDropzone() {
|
|
|
17447
17447
|
tabIndex: -1
|
|
17448
17448
|
}, refKey, inputRef);
|
|
17449
17449
|
|
|
17450
|
-
return _objectSpread$
|
|
17450
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17451
17451
|
};
|
|
17452
17452
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17453
|
-
return _objectSpread$
|
|
17453
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17454
17454
|
isFocused: isFocused && !disabled,
|
|
17455
17455
|
getRootProps: getRootProps,
|
|
17456
17456
|
getInputProps: getInputProps,
|
|
@@ -17469,40 +17469,40 @@ function reducer$1(state, action) {
|
|
|
17469
17469
|
/* istanbul ignore next */
|
|
17470
17470
|
switch (action.type) {
|
|
17471
17471
|
case "focus":
|
|
17472
|
-
return _objectSpread$
|
|
17472
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17473
17473
|
isFocused: true
|
|
17474
17474
|
});
|
|
17475
17475
|
|
|
17476
17476
|
case "blur":
|
|
17477
|
-
return _objectSpread$
|
|
17477
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17478
17478
|
isFocused: false
|
|
17479
17479
|
});
|
|
17480
17480
|
|
|
17481
17481
|
case "openDialog":
|
|
17482
|
-
return _objectSpread$
|
|
17482
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17483
17483
|
isFileDialogActive: true
|
|
17484
17484
|
});
|
|
17485
17485
|
|
|
17486
17486
|
case "closeDialog":
|
|
17487
|
-
return _objectSpread$
|
|
17487
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17488
17488
|
isFileDialogActive: false
|
|
17489
17489
|
});
|
|
17490
17490
|
|
|
17491
17491
|
case "setDraggedFiles":
|
|
17492
|
-
return _objectSpread$
|
|
17492
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17493
17493
|
isDragActive: action.isDragActive,
|
|
17494
17494
|
isDragAccept: action.isDragAccept,
|
|
17495
17495
|
isDragReject: action.isDragReject
|
|
17496
17496
|
});
|
|
17497
17497
|
|
|
17498
17498
|
case "setFiles":
|
|
17499
|
-
return _objectSpread$
|
|
17499
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17500
17500
|
acceptedFiles: action.acceptedFiles,
|
|
17501
17501
|
fileRejections: action.fileRejections
|
|
17502
17502
|
});
|
|
17503
17503
|
|
|
17504
17504
|
case "reset":
|
|
17505
|
-
return _objectSpread$
|
|
17505
|
+
return _objectSpread$t({}, initialState);
|
|
17506
17506
|
|
|
17507
17507
|
default:
|
|
17508
17508
|
return state;
|
|
@@ -19730,7 +19730,7 @@ function shallowEqual(a, b) {
|
|
|
19730
19730
|
return true;
|
|
19731
19731
|
}
|
|
19732
19732
|
|
|
19733
|
-
function _typeof$
|
|
19733
|
+
function _typeof$w(obj) { "@babel/helpers - typeof"; return _typeof$w = "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$w(obj); }
|
|
19734
19734
|
|
|
19735
19735
|
//
|
|
19736
19736
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19757,7 +19757,9 @@ var FilteredElementKeyMap = {
|
|
|
19757
19757
|
};
|
|
19758
19758
|
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'];
|
|
19759
19759
|
|
|
19760
|
-
|
|
19760
|
+
/** The type of easing function to use for animations */
|
|
19761
|
+
|
|
19762
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19761
19763
|
|
|
19762
19764
|
/** the offset of a chart, which define the blank space all around */
|
|
19763
19765
|
|
|
@@ -19793,7 +19795,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19793
19795
|
};
|
|
19794
19796
|
};
|
|
19795
19797
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19796
|
-
if (!isObject_1(props) || _typeof$
|
|
19798
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19797
19799
|
return null;
|
|
19798
19800
|
}
|
|
19799
19801
|
var out = null;
|
|
@@ -19807,11 +19809,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19807
19809
|
return out;
|
|
19808
19810
|
};
|
|
19809
19811
|
|
|
19810
|
-
var _excluded$
|
|
19811
|
-
_excluded2$
|
|
19812
|
-
function _objectWithoutProperties$
|
|
19813
|
-
function _objectWithoutPropertiesLoose$
|
|
19814
|
-
function _typeof$
|
|
19812
|
+
var _excluded$f = ["children"],
|
|
19813
|
+
_excluded2$4 = ["children"];
|
|
19814
|
+
function _objectWithoutProperties$f(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$f(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; }
|
|
19815
|
+
function _objectWithoutPropertiesLoose$f(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; }
|
|
19816
|
+
function _typeof$v(obj) { "@babel/helpers - typeof"; return _typeof$v = "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$v(obj); }
|
|
19815
19817
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19816
19818
|
click: 'onClick',
|
|
19817
19819
|
mousedown: 'onMouseDown',
|
|
@@ -19918,7 +19920,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19918
19920
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19919
19921
|
};
|
|
19920
19922
|
var isDotProps = function isDotProps(dot) {
|
|
19921
|
-
return dot && _typeof$
|
|
19923
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19922
19924
|
};
|
|
19923
19925
|
|
|
19924
19926
|
/**
|
|
@@ -20010,10 +20012,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
20010
20012
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
20011
20013
|
var _ref = nextChild.props || {},
|
|
20012
20014
|
nextChildren = _ref.children,
|
|
20013
|
-
nextProps = _objectWithoutProperties$
|
|
20015
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
20014
20016
|
var _ref2 = prevChild.props || {},
|
|
20015
20017
|
prevChildren = _ref2.children,
|
|
20016
|
-
prevProps = _objectWithoutProperties$
|
|
20018
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
20017
20019
|
if (nextChildren && prevChildren) {
|
|
20018
20020
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
20019
20021
|
}
|
|
@@ -20055,10 +20057,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20055
20057
|
return toArray(children).indexOf(child);
|
|
20056
20058
|
};
|
|
20057
20059
|
|
|
20058
|
-
var _excluded$
|
|
20060
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20059
20061
|
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); }
|
|
20060
|
-
function _objectWithoutProperties$
|
|
20061
|
-
function _objectWithoutPropertiesLoose$
|
|
20062
|
+
function _objectWithoutProperties$e(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$e(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; }
|
|
20063
|
+
function _objectWithoutPropertiesLoose$e(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; }
|
|
20062
20064
|
function Surface(props) {
|
|
20063
20065
|
var children = props.children,
|
|
20064
20066
|
width = props.width,
|
|
@@ -20066,7 +20068,7 @@ function Surface(props) {
|
|
|
20066
20068
|
viewBox = props.viewBox,
|
|
20067
20069
|
className = props.className,
|
|
20068
20070
|
style = props.style,
|
|
20069
|
-
others = _objectWithoutProperties$
|
|
20071
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
20070
20072
|
var svgView = viewBox || {
|
|
20071
20073
|
width: width,
|
|
20072
20074
|
height: height,
|
|
@@ -20083,14 +20085,14 @@ function Surface(props) {
|
|
|
20083
20085
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
20084
20086
|
}
|
|
20085
20087
|
|
|
20086
|
-
var _excluded$
|
|
20088
|
+
var _excluded$d = ["children", "className"];
|
|
20087
20089
|
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); }
|
|
20088
|
-
function _objectWithoutProperties$
|
|
20089
|
-
function _objectWithoutPropertiesLoose$
|
|
20090
|
+
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; }
|
|
20091
|
+
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; }
|
|
20090
20092
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
20091
20093
|
var children = props.children,
|
|
20092
20094
|
className = props.className,
|
|
20093
|
-
others = _objectWithoutProperties$
|
|
20095
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
20094
20096
|
var layerClass = classNames('recharts-layer', className);
|
|
20095
20097
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
20096
20098
|
className: layerClass
|
|
@@ -23505,7 +23507,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23505
23507
|
stackOffsetNone(series, order);
|
|
23506
23508
|
}
|
|
23507
23509
|
|
|
23510
|
+
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); }
|
|
23511
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23508
23512
|
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); }
|
|
23513
|
+
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; }
|
|
23514
|
+
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; }
|
|
23515
|
+
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; }
|
|
23516
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23517
|
+
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); }
|
|
23518
|
+
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; }
|
|
23519
|
+
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; }
|
|
23509
23520
|
var symbolFactories = {
|
|
23510
23521
|
symbolCircle: symbolCircle,
|
|
23511
23522
|
symbolCross: symbolCross,
|
|
@@ -23544,31 +23555,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23544
23555
|
return Math.PI * size * size / 4;
|
|
23545
23556
|
}
|
|
23546
23557
|
};
|
|
23547
|
-
var symbolsDefaultProps = {
|
|
23548
|
-
type: 'circle',
|
|
23549
|
-
size: 64,
|
|
23550
|
-
sizeType: 'area'
|
|
23551
|
-
};
|
|
23552
23558
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23553
23559
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23554
23560
|
};
|
|
23555
|
-
var Symbols = function Symbols(
|
|
23561
|
+
var Symbols = function Symbols(_ref) {
|
|
23562
|
+
var _ref$type = _ref.type,
|
|
23563
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23564
|
+
_ref$size = _ref.size,
|
|
23565
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23566
|
+
_ref$sizeType = _ref.sizeType,
|
|
23567
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23568
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23569
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23570
|
+
type: type,
|
|
23571
|
+
size: size,
|
|
23572
|
+
sizeType: sizeType
|
|
23573
|
+
});
|
|
23574
|
+
|
|
23556
23575
|
/**
|
|
23557
23576
|
* Calculate the path of curve
|
|
23558
23577
|
* @return {String} path
|
|
23559
23578
|
*/
|
|
23560
23579
|
var getPath = function getPath() {
|
|
23561
|
-
var size = props.size,
|
|
23562
|
-
sizeType = props.sizeType,
|
|
23563
|
-
type = props.type;
|
|
23564
23580
|
var symbolFactory = getSymbolFactory(type);
|
|
23565
23581
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23566
23582
|
return symbol();
|
|
23567
23583
|
};
|
|
23568
23584
|
var className = props.className,
|
|
23569
23585
|
cx = props.cx,
|
|
23570
|
-
cy = props.cy
|
|
23571
|
-
size = props.size;
|
|
23586
|
+
cy = props.cy;
|
|
23572
23587
|
var filteredProps = filterProps(props, true);
|
|
23573
23588
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23574
23589
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23579,35 +23594,34 @@ var Symbols = function Symbols(props) {
|
|
|
23579
23594
|
}
|
|
23580
23595
|
return null;
|
|
23581
23596
|
};
|
|
23582
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23583
23597
|
Symbols.registerSymbol = registerSymbol;
|
|
23584
23598
|
|
|
23585
|
-
function _typeof$
|
|
23599
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; return _typeof$t = "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$t(obj); }
|
|
23586
23600
|
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); }
|
|
23587
|
-
function ownKeys$
|
|
23588
|
-
function _objectSpread$
|
|
23589
|
-
function _classCallCheck$
|
|
23590
|
-
function _defineProperties$
|
|
23591
|
-
function _createClass$
|
|
23592
|
-
function _inherits$
|
|
23593
|
-
function _setPrototypeOf$
|
|
23594
|
-
function _createSuper$
|
|
23595
|
-
function _possibleConstructorReturn$
|
|
23596
|
-
function _assertThisInitialized$
|
|
23597
|
-
function _isNativeReflectConstruct$
|
|
23598
|
-
function _getPrototypeOf$
|
|
23599
|
-
function _defineProperty$
|
|
23600
|
-
function _toPropertyKey$
|
|
23601
|
-
function _toPrimitive$
|
|
23601
|
+
function ownKeys$r(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; }
|
|
23602
|
+
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$r(Object(source), !0).forEach(function (key) { _defineProperty$t(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23603
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23604
|
+
function _defineProperties$b(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$s(descriptor.key), descriptor); } }
|
|
23605
|
+
function _createClass$b(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$b(Constructor.prototype, protoProps); if (staticProps) _defineProperties$b(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23606
|
+
function _inherits$9(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$9(subClass, superClass); }
|
|
23607
|
+
function _setPrototypeOf$9(o, p) { _setPrototypeOf$9 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$9(o, p); }
|
|
23608
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf$9(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$9(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$9(this, result); }; }
|
|
23609
|
+
function _possibleConstructorReturn$9(self, call) { if (call && (_typeof$t(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$9(self); }
|
|
23610
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23611
|
+
function _isNativeReflectConstruct$9() { 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; } }
|
|
23612
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23613
|
+
function _defineProperty$t(obj, key, value) { key = _toPropertyKey$s(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23614
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23615
|
+
function _toPrimitive$s(input, hint) { if (_typeof$t(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$t(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23602
23616
|
var SIZE = 32;
|
|
23603
23617
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23604
|
-
_inherits$
|
|
23605
|
-
var _super = _createSuper$
|
|
23618
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23619
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23606
23620
|
function DefaultLegendContent() {
|
|
23607
|
-
_classCallCheck$
|
|
23621
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23608
23622
|
return _super.apply(this, arguments);
|
|
23609
23623
|
}
|
|
23610
|
-
_createClass$
|
|
23624
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23611
23625
|
key: "renderIcon",
|
|
23612
23626
|
value:
|
|
23613
23627
|
/**
|
|
@@ -23652,7 +23666,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23652
23666
|
});
|
|
23653
23667
|
}
|
|
23654
23668
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23655
|
-
var iconProps = _objectSpread$
|
|
23669
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23656
23670
|
delete iconProps.legendIcon;
|
|
23657
23671
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23658
23672
|
}
|
|
@@ -23700,7 +23714,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23700
23714
|
var finalFormatter = entry.formatter || formatter;
|
|
23701
23715
|
var className = classNames((_classNames = {
|
|
23702
23716
|
'recharts-legend-item': true
|
|
23703
|
-
}, _defineProperty$
|
|
23717
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23704
23718
|
if (entry.type === 'none') {
|
|
23705
23719
|
return null;
|
|
23706
23720
|
}
|
|
@@ -23745,8 +23759,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23745
23759
|
}]);
|
|
23746
23760
|
return DefaultLegendContent;
|
|
23747
23761
|
}(React$3.PureComponent);
|
|
23748
|
-
_defineProperty$
|
|
23749
|
-
_defineProperty$
|
|
23762
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23763
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23750
23764
|
iconSize: 14,
|
|
23751
23765
|
layout: 'horizontal',
|
|
23752
23766
|
align: 'center',
|
|
@@ -23754,25 +23768,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23754
23768
|
inactiveColor: '#ccc'
|
|
23755
23769
|
});
|
|
23756
23770
|
|
|
23757
|
-
function _typeof$
|
|
23758
|
-
var _excluded$
|
|
23759
|
-
function ownKeys$
|
|
23760
|
-
function _objectSpread$
|
|
23761
|
-
function _classCallCheck$
|
|
23762
|
-
function _defineProperties$
|
|
23763
|
-
function _createClass$
|
|
23764
|
-
function _inherits$
|
|
23765
|
-
function _setPrototypeOf$
|
|
23766
|
-
function _createSuper$
|
|
23767
|
-
function _possibleConstructorReturn$
|
|
23768
|
-
function _assertThisInitialized$
|
|
23769
|
-
function _isNativeReflectConstruct$
|
|
23770
|
-
function _getPrototypeOf$
|
|
23771
|
-
function _defineProperty$
|
|
23772
|
-
function _toPropertyKey$
|
|
23773
|
-
function _toPrimitive$
|
|
23774
|
-
function _objectWithoutProperties$
|
|
23775
|
-
function _objectWithoutPropertiesLoose$
|
|
23771
|
+
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); }
|
|
23772
|
+
var _excluded$b = ["ref"];
|
|
23773
|
+
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; }
|
|
23774
|
+
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; }
|
|
23775
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23776
|
+
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$r(descriptor.key), descriptor); } }
|
|
23777
|
+
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; }
|
|
23778
|
+
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); }
|
|
23779
|
+
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); }
|
|
23780
|
+
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); }; }
|
|
23781
|
+
function _possibleConstructorReturn$8(self, call) { if (call && (_typeof$s(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); }
|
|
23782
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23783
|
+
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; } }
|
|
23784
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23785
|
+
function _defineProperty$s(obj, key, value) { key = _toPropertyKey$r(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23786
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23787
|
+
function _toPrimitive$r(input, hint) { if (_typeof$s(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$s(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23788
|
+
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; }
|
|
23789
|
+
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; }
|
|
23776
23790
|
function defaultUniqBy$1(entry) {
|
|
23777
23791
|
return entry.value;
|
|
23778
23792
|
}
|
|
@@ -23793,27 +23807,27 @@ function renderContent$1(content, props) {
|
|
|
23793
23807
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23794
23808
|
}
|
|
23795
23809
|
props.ref;
|
|
23796
|
-
var otherProps = _objectWithoutProperties$
|
|
23810
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23797
23811
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23798
23812
|
}
|
|
23799
23813
|
var EPS$2 = 1;
|
|
23800
23814
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23801
|
-
_inherits$
|
|
23802
|
-
var _super = _createSuper$
|
|
23815
|
+
_inherits$8(Legend, _PureComponent);
|
|
23816
|
+
var _super = _createSuper$8(Legend);
|
|
23803
23817
|
function Legend() {
|
|
23804
23818
|
var _this;
|
|
23805
|
-
_classCallCheck$
|
|
23819
|
+
_classCallCheck$a(this, Legend);
|
|
23806
23820
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23807
23821
|
args[_key] = arguments[_key];
|
|
23808
23822
|
}
|
|
23809
23823
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23810
|
-
_defineProperty$
|
|
23824
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23811
23825
|
boxWidth: -1,
|
|
23812
23826
|
boxHeight: -1
|
|
23813
23827
|
});
|
|
23814
23828
|
return _this;
|
|
23815
23829
|
}
|
|
23816
|
-
_createClass$
|
|
23830
|
+
_createClass$a(Legend, [{
|
|
23817
23831
|
key: "componentDidMount",
|
|
23818
23832
|
value: function componentDidMount() {
|
|
23819
23833
|
this.updateBBox();
|
|
@@ -23888,7 +23902,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23888
23902
|
};
|
|
23889
23903
|
}
|
|
23890
23904
|
}
|
|
23891
|
-
return _objectSpread$
|
|
23905
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23892
23906
|
}
|
|
23893
23907
|
}, {
|
|
23894
23908
|
key: "updateBBox",
|
|
@@ -23931,7 +23945,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23931
23945
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23932
23946
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23933
23947
|
payload = _this$props2.payload;
|
|
23934
|
-
var outerStyle = _objectSpread$
|
|
23948
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23935
23949
|
position: 'absolute',
|
|
23936
23950
|
width: width || 'auto',
|
|
23937
23951
|
height: height || 'auto'
|
|
@@ -23942,7 +23956,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23942
23956
|
ref: function ref(node) {
|
|
23943
23957
|
_this2.wrapperNode = node;
|
|
23944
23958
|
}
|
|
23945
|
-
}, renderContent$1(content, _objectSpread$
|
|
23959
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23946
23960
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23947
23961
|
})));
|
|
23948
23962
|
}
|
|
@@ -23965,8 +23979,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23965
23979
|
}]);
|
|
23966
23980
|
return Legend;
|
|
23967
23981
|
}(React$3.PureComponent);
|
|
23968
|
-
_defineProperty$
|
|
23969
|
-
_defineProperty$
|
|
23982
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23983
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23970
23984
|
iconSize: 14,
|
|
23971
23985
|
layout: 'horizontal',
|
|
23972
23986
|
align: 'center',
|
|
@@ -24530,13 +24544,13 @@ function setRafTimeout(callback) {
|
|
|
24530
24544
|
requestAnimationFrame(shouldUpdate);
|
|
24531
24545
|
}
|
|
24532
24546
|
|
|
24533
|
-
function _typeof$
|
|
24534
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24535
|
-
function _nonIterableRest$
|
|
24536
|
-
function _unsupportedIterableToArray$
|
|
24537
|
-
function _arrayLikeToArray$
|
|
24547
|
+
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); }
|
|
24548
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24549
|
+
function _nonIterableRest$a() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
24550
|
+
function _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); }
|
|
24551
|
+
function _arrayLikeToArray$h(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24538
24552
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24539
|
-
function _arrayWithHoles$
|
|
24553
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24540
24554
|
function createAnimateManager() {
|
|
24541
24555
|
var currStyle = {};
|
|
24542
24556
|
var handleChange = function handleChange() {
|
|
@@ -24563,7 +24577,7 @@ function createAnimateManager() {
|
|
|
24563
24577
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24564
24578
|
return;
|
|
24565
24579
|
}
|
|
24566
|
-
if (_typeof$
|
|
24580
|
+
if (_typeof$r(_style) === 'object') {
|
|
24567
24581
|
currStyle = _style;
|
|
24568
24582
|
handleChange(currStyle);
|
|
24569
24583
|
}
|
|
@@ -24590,12 +24604,12 @@ function createAnimateManager() {
|
|
|
24590
24604
|
};
|
|
24591
24605
|
}
|
|
24592
24606
|
|
|
24593
|
-
function _typeof$
|
|
24594
|
-
function ownKeys$
|
|
24595
|
-
function _objectSpread$
|
|
24596
|
-
function _defineProperty$
|
|
24597
|
-
function _toPropertyKey$
|
|
24598
|
-
function _toPrimitive$
|
|
24607
|
+
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); }
|
|
24608
|
+
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; }
|
|
24609
|
+
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; }
|
|
24610
|
+
function _defineProperty$r(obj, key, value) { key = _toPropertyKey$q(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24611
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24612
|
+
function _toPrimitive$q(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); }
|
|
24599
24613
|
/* eslint no-console: 0 */
|
|
24600
24614
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24601
24615
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24627,7 +24641,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24627
24641
|
*/
|
|
24628
24642
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24629
24643
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24630
|
-
return _defineProperty$
|
|
24644
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24631
24645
|
}
|
|
24632
24646
|
var isTransition = name === 'transition';
|
|
24633
24647
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24638,7 +24652,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24638
24652
|
if (isTransition) {
|
|
24639
24653
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24640
24654
|
}
|
|
24641
|
-
return _objectSpread$
|
|
24655
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24642
24656
|
}, {});
|
|
24643
24657
|
};
|
|
24644
24658
|
|
|
@@ -24648,7 +24662,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24648
24662
|
*/
|
|
24649
24663
|
var mapObject = function mapObject(fn, obj) {
|
|
24650
24664
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24651
|
-
return _objectSpread$
|
|
24665
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24652
24666
|
}, {});
|
|
24653
24667
|
};
|
|
24654
24668
|
|
|
@@ -24658,7 +24672,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24658
24672
|
*/
|
|
24659
24673
|
var translateStyle = function translateStyle(style) {
|
|
24660
24674
|
return Object.keys(style).reduce(function (res, key) {
|
|
24661
|
-
return _objectSpread$
|
|
24675
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24662
24676
|
}, style);
|
|
24663
24677
|
};
|
|
24664
24678
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24686,16 +24700,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24686
24700
|
}
|
|
24687
24701
|
};
|
|
24688
24702
|
|
|
24689
|
-
function _slicedToArray$
|
|
24690
|
-
function _nonIterableRest$
|
|
24691
|
-
function _iterableToArrayLimit$
|
|
24692
|
-
function _arrayWithHoles$
|
|
24693
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24703
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24704
|
+
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."); }
|
|
24705
|
+
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; } }
|
|
24706
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24707
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24694
24708
|
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."); }
|
|
24695
|
-
function _unsupportedIterableToArray$
|
|
24709
|
+
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); }
|
|
24696
24710
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24697
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24698
|
-
function _arrayLikeToArray$
|
|
24711
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24712
|
+
function _arrayLikeToArray$g(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24699
24713
|
var ACCURACY = 1e-4;
|
|
24700
24714
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24701
24715
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24771,7 +24785,7 @@ var configBezier = function configBezier() {
|
|
|
24771
24785
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24772
24786
|
return parseFloat(x);
|
|
24773
24787
|
});
|
|
24774
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24788
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24775
24789
|
x1 = _easing$1$split$0$spl2[0];
|
|
24776
24790
|
y1 = _easing$1$split$0$spl2[1];
|
|
24777
24791
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24864,22 +24878,22 @@ var configEasing = function configEasing() {
|
|
|
24864
24878
|
return null;
|
|
24865
24879
|
};
|
|
24866
24880
|
|
|
24867
|
-
function _typeof$
|
|
24868
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24881
|
+
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); }
|
|
24882
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24869
24883
|
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."); }
|
|
24870
24884
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24871
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24872
|
-
function ownKeys$
|
|
24873
|
-
function _objectSpread$
|
|
24874
|
-
function _defineProperty$
|
|
24875
|
-
function _toPropertyKey$
|
|
24876
|
-
function _toPrimitive$
|
|
24877
|
-
function _slicedToArray$
|
|
24878
|
-
function _nonIterableRest$
|
|
24879
|
-
function _unsupportedIterableToArray$
|
|
24880
|
-
function _arrayLikeToArray$
|
|
24881
|
-
function _iterableToArrayLimit$
|
|
24882
|
-
function _arrayWithHoles$
|
|
24885
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24886
|
+
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; }
|
|
24887
|
+
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; }
|
|
24888
|
+
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; }
|
|
24889
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24890
|
+
function _toPrimitive$p(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); }
|
|
24891
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24892
|
+
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."); }
|
|
24893
|
+
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); }
|
|
24894
|
+
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; }
|
|
24895
|
+
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; } }
|
|
24896
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24883
24897
|
var alpha = function alpha(begin, end, k) {
|
|
24884
24898
|
return begin + (end - begin) * k;
|
|
24885
24899
|
};
|
|
@@ -24897,10 +24911,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24897
24911
|
var nextStepVals = mapObject(function (key, val) {
|
|
24898
24912
|
if (needContinue(val)) {
|
|
24899
24913
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24900
|
-
_easing2 = _slicedToArray$
|
|
24914
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24901
24915
|
newX = _easing2[0],
|
|
24902
24916
|
newV = _easing2[1];
|
|
24903
|
-
return _objectSpread$
|
|
24917
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24904
24918
|
from: newX,
|
|
24905
24919
|
velocity: newV
|
|
24906
24920
|
});
|
|
@@ -24910,7 +24924,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24910
24924
|
if (steps < 1) {
|
|
24911
24925
|
return mapObject(function (key, val) {
|
|
24912
24926
|
if (needContinue(val)) {
|
|
24913
|
-
return _objectSpread$
|
|
24927
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24914
24928
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24915
24929
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24916
24930
|
});
|
|
@@ -24925,10 +24939,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24925
24939
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24926
24940
|
var interKeys = getIntersectionKeys(from, to);
|
|
24927
24941
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24928
|
-
return _objectSpread$
|
|
24942
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24929
24943
|
}, {});
|
|
24930
24944
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24931
|
-
return _objectSpread$
|
|
24945
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24932
24946
|
from: from[key],
|
|
24933
24947
|
velocity: 0,
|
|
24934
24948
|
to: to[key]
|
|
@@ -24958,7 +24972,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24958
24972
|
var steps = deltaTime / easing.dt;
|
|
24959
24973
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24960
24974
|
// get union set and add compatible prefix
|
|
24961
|
-
render(_objectSpread$
|
|
24975
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24962
24976
|
preTime = now;
|
|
24963
24977
|
if (!shouldStopAnimation()) {
|
|
24964
24978
|
cafId = requestAnimationFrame(update);
|
|
@@ -24976,14 +24990,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24976
24990
|
}, timingStyle);
|
|
24977
24991
|
|
|
24978
24992
|
// get union set and add compatible prefix
|
|
24979
|
-
render(_objectSpread$
|
|
24993
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24980
24994
|
if (t < 1) {
|
|
24981
24995
|
cafId = requestAnimationFrame(update);
|
|
24982
24996
|
} else {
|
|
24983
24997
|
var finalStyle = mapObject(function (key, val) {
|
|
24984
24998
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24985
24999
|
}, timingStyle);
|
|
24986
|
-
render(_objectSpread$
|
|
25000
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24987
25001
|
}
|
|
24988
25002
|
};
|
|
24989
25003
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24999,37 +25013,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24999
25013
|
};
|
|
25000
25014
|
});
|
|
25001
25015
|
|
|
25002
|
-
function _typeof$
|
|
25003
|
-
var _excluded$
|
|
25004
|
-
function _objectWithoutProperties$
|
|
25005
|
-
function _objectWithoutPropertiesLoose$
|
|
25006
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
25016
|
+
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); }
|
|
25017
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
25018
|
+
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; }
|
|
25019
|
+
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; }
|
|
25020
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
25007
25021
|
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."); }
|
|
25008
|
-
function _unsupportedIterableToArray$
|
|
25022
|
+
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); }
|
|
25009
25023
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25010
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
25011
|
-
function _arrayLikeToArray$
|
|
25012
|
-
function ownKeys$
|
|
25013
|
-
function _objectSpread$
|
|
25014
|
-
function _defineProperty$
|
|
25015
|
-
function _classCallCheck$
|
|
25016
|
-
function _defineProperties$
|
|
25017
|
-
function _createClass$
|
|
25018
|
-
function _toPropertyKey$
|
|
25019
|
-
function _toPrimitive$
|
|
25020
|
-
function _inherits$
|
|
25021
|
-
function _setPrototypeOf$
|
|
25022
|
-
function _createSuper$
|
|
25023
|
-
function _possibleConstructorReturn$
|
|
25024
|
-
function _assertThisInitialized$
|
|
25025
|
-
function _isNativeReflectConstruct$
|
|
25026
|
-
function _getPrototypeOf$
|
|
25024
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
25025
|
+
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; }
|
|
25026
|
+
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; }
|
|
25027
|
+
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; }
|
|
25028
|
+
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; }
|
|
25029
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25030
|
+
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); } }
|
|
25031
|
+
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; }
|
|
25032
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
25033
|
+
function _toPrimitive$o(input, hint) { if (_typeof$o(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$o(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25034
|
+
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); }
|
|
25035
|
+
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); }
|
|
25036
|
+
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); }; }
|
|
25037
|
+
function _possibleConstructorReturn$7(self, call) { if (call && (_typeof$o(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); }
|
|
25038
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25039
|
+
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; } }
|
|
25040
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
25027
25041
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25028
|
-
_inherits$
|
|
25029
|
-
var _super = _createSuper$
|
|
25042
|
+
_inherits$7(Animate, _PureComponent);
|
|
25043
|
+
var _super = _createSuper$7(Animate);
|
|
25030
25044
|
function Animate(props, context) {
|
|
25031
25045
|
var _this;
|
|
25032
|
-
_classCallCheck$
|
|
25046
|
+
_classCallCheck$9(this, Animate);
|
|
25033
25047
|
_this = _super.call(this, props, context);
|
|
25034
25048
|
var _this$props = _this.props,
|
|
25035
25049
|
isActive = _this$props.isActive,
|
|
@@ -25039,8 +25053,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25039
25053
|
steps = _this$props.steps,
|
|
25040
25054
|
children = _this$props.children,
|
|
25041
25055
|
duration = _this$props.duration;
|
|
25042
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25043
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25056
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
25057
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
25044
25058
|
if (!isActive || duration <= 0) {
|
|
25045
25059
|
_this.state = {
|
|
25046
25060
|
style: {}
|
|
@@ -25052,7 +25066,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25052
25066
|
style: to
|
|
25053
25067
|
};
|
|
25054
25068
|
}
|
|
25055
|
-
return _possibleConstructorReturn$
|
|
25069
|
+
return _possibleConstructorReturn$7(_this);
|
|
25056
25070
|
}
|
|
25057
25071
|
if (steps && steps.length) {
|
|
25058
25072
|
_this.state = {
|
|
@@ -25063,10 +25077,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25063
25077
|
_this.state = {
|
|
25064
25078
|
style: from
|
|
25065
25079
|
};
|
|
25066
|
-
return _possibleConstructorReturn$
|
|
25080
|
+
return _possibleConstructorReturn$7(_this);
|
|
25067
25081
|
}
|
|
25068
25082
|
_this.state = {
|
|
25069
|
-
style: attributeName ? _defineProperty$
|
|
25083
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25070
25084
|
};
|
|
25071
25085
|
} else {
|
|
25072
25086
|
_this.state = {
|
|
@@ -25075,7 +25089,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25075
25089
|
}
|
|
25076
25090
|
return _this;
|
|
25077
25091
|
}
|
|
25078
|
-
_createClass$
|
|
25092
|
+
_createClass$9(Animate, [{
|
|
25079
25093
|
key: "componentDidMount",
|
|
25080
25094
|
value: function componentDidMount() {
|
|
25081
25095
|
var _this$props2 = this.props,
|
|
@@ -25103,7 +25117,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25103
25117
|
}
|
|
25104
25118
|
if (!isActive) {
|
|
25105
25119
|
var newState = {
|
|
25106
|
-
style: attributeName ? _defineProperty$
|
|
25120
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
25107
25121
|
};
|
|
25108
25122
|
if (this.state && style) {
|
|
25109
25123
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25126,14 +25140,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25126
25140
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25127
25141
|
if (this.state && style) {
|
|
25128
25142
|
var _newState = {
|
|
25129
|
-
style: attributeName ? _defineProperty$
|
|
25143
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25130
25144
|
};
|
|
25131
25145
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25132
25146
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25133
25147
|
this.setState(_newState);
|
|
25134
25148
|
}
|
|
25135
25149
|
}
|
|
25136
|
-
this.runAnimation(_objectSpread$
|
|
25150
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
25137
25151
|
from: from,
|
|
25138
25152
|
begin: 0
|
|
25139
25153
|
}));
|
|
@@ -25216,7 +25230,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25216
25230
|
}), duration]);
|
|
25217
25231
|
}
|
|
25218
25232
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25219
|
-
var newStyle = _objectSpread$
|
|
25233
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25220
25234
|
transition: transition
|
|
25221
25235
|
});
|
|
25222
25236
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25248,9 +25262,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25248
25262
|
this.runStepAnimation(props);
|
|
25249
25263
|
return;
|
|
25250
25264
|
}
|
|
25251
|
-
var to = attributeName ? _defineProperty$
|
|
25265
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25252
25266
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25253
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25267
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25254
25268
|
transition: transition
|
|
25255
25269
|
}), duration, onAnimationEnd]);
|
|
25256
25270
|
}
|
|
@@ -25271,7 +25285,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25271
25285
|
_this$props4.onAnimationEnd;
|
|
25272
25286
|
_this$props4.shouldReAnimate;
|
|
25273
25287
|
_this$props4.onAnimationReStart;
|
|
25274
|
-
var others = _objectWithoutProperties$
|
|
25288
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25275
25289
|
var count = React$3.Children.count(children);
|
|
25276
25290
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25277
25291
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25286,8 +25300,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25286
25300
|
_container$props$styl = _container$props.style,
|
|
25287
25301
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25288
25302
|
className = _container$props.className;
|
|
25289
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25290
|
-
style: _objectSpread$
|
|
25303
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25304
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25291
25305
|
className: className
|
|
25292
25306
|
}));
|
|
25293
25307
|
return res;
|
|
@@ -25812,10 +25826,10 @@ var defineProperty$2 = (function() {
|
|
|
25812
25826
|
} catch (e) {}
|
|
25813
25827
|
}());
|
|
25814
25828
|
|
|
25815
|
-
var _defineProperty$
|
|
25829
|
+
var _defineProperty$o = defineProperty$2;
|
|
25816
25830
|
|
|
25817
25831
|
var constant$1 = constant_1,
|
|
25818
|
-
defineProperty$1 = _defineProperty$
|
|
25832
|
+
defineProperty$1 = _defineProperty$o,
|
|
25819
25833
|
identity$7 = identity_1;
|
|
25820
25834
|
|
|
25821
25835
|
/**
|
|
@@ -25992,18 +26006,18 @@ var sortBy_1 = sortBy;
|
|
|
25992
26006
|
/**
|
|
25993
26007
|
* @fileOverview Default Tooltip Content
|
|
25994
26008
|
*/
|
|
25995
|
-
function _typeof$
|
|
25996
|
-
function _slicedToArray$
|
|
25997
|
-
function _nonIterableRest$
|
|
25998
|
-
function _unsupportedIterableToArray$
|
|
25999
|
-
function _arrayLikeToArray$
|
|
26000
|
-
function _iterableToArrayLimit$
|
|
26001
|
-
function _arrayWithHoles$
|
|
26002
|
-
function ownKeys$
|
|
26003
|
-
function _objectSpread$
|
|
26004
|
-
function _defineProperty$
|
|
26005
|
-
function _toPropertyKey$
|
|
26006
|
-
function _toPrimitive$
|
|
26009
|
+
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); }
|
|
26010
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26011
|
+
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."); }
|
|
26012
|
+
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); }
|
|
26013
|
+
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; }
|
|
26014
|
+
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; } }
|
|
26015
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26016
|
+
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; }
|
|
26017
|
+
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$n(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; }
|
|
26018
|
+
function _defineProperty$n(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; }
|
|
26019
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
26020
|
+
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); }
|
|
26007
26021
|
function defaultFormatter(value) {
|
|
26008
26022
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
26009
26023
|
}
|
|
@@ -26033,7 +26047,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26033
26047
|
if (entry.type === 'none') {
|
|
26034
26048
|
return null;
|
|
26035
26049
|
}
|
|
26036
|
-
var finalItemStyle = _objectSpread$
|
|
26050
|
+
var finalItemStyle = _objectSpread$m({
|
|
26037
26051
|
display: 'block',
|
|
26038
26052
|
paddingTop: 4,
|
|
26039
26053
|
paddingBottom: 4,
|
|
@@ -26047,7 +26061,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26047
26061
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26048
26062
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26049
26063
|
if (Array.isArray(formatted)) {
|
|
26050
|
-
var _formatted = _slicedToArray$
|
|
26064
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
26051
26065
|
finalValue = _formatted[0];
|
|
26052
26066
|
finalName = _formatted[1];
|
|
26053
26067
|
} else {
|
|
@@ -26079,14 +26093,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26079
26093
|
}
|
|
26080
26094
|
return null;
|
|
26081
26095
|
};
|
|
26082
|
-
var finalStyle = _objectSpread$
|
|
26096
|
+
var finalStyle = _objectSpread$m({
|
|
26083
26097
|
margin: 0,
|
|
26084
26098
|
padding: 10,
|
|
26085
26099
|
backgroundColor: '#fff',
|
|
26086
26100
|
border: '1px solid #ccc',
|
|
26087
26101
|
whiteSpace: 'nowrap'
|
|
26088
26102
|
}, contentStyle);
|
|
26089
|
-
var finalLabelStyle = _objectSpread$
|
|
26103
|
+
var finalLabelStyle = _objectSpread$m({
|
|
26090
26104
|
margin: 0
|
|
26091
26105
|
}, labelStyle);
|
|
26092
26106
|
var hasLabel = !isNil_1(label);
|
|
@@ -26127,18 +26141,22 @@ var Global = {
|
|
|
26127
26141
|
}
|
|
26128
26142
|
};
|
|
26129
26143
|
|
|
26130
|
-
function _typeof$
|
|
26131
|
-
function ownKeys$
|
|
26132
|
-
function _objectSpread$
|
|
26133
|
-
function
|
|
26134
|
-
function
|
|
26135
|
-
function
|
|
26136
|
-
function
|
|
26137
|
-
function
|
|
26138
|
-
function
|
|
26139
|
-
function
|
|
26140
|
-
function
|
|
26141
|
-
function
|
|
26144
|
+
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); }
|
|
26145
|
+
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; }
|
|
26146
|
+
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$m(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; }
|
|
26147
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26148
|
+
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$m(descriptor.key), descriptor); } }
|
|
26149
|
+
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; }
|
|
26150
|
+
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); }
|
|
26151
|
+
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); }
|
|
26152
|
+
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); }; }
|
|
26153
|
+
function _possibleConstructorReturn$6(self, call) { if (call && (_typeof$m(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); }
|
|
26154
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26155
|
+
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; } }
|
|
26156
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26157
|
+
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; }
|
|
26158
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26159
|
+
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); }
|
|
26142
26160
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26143
26161
|
var EPS$1 = 1;
|
|
26144
26162
|
function defaultUniqBy(entry) {
|
|
@@ -26162,7 +26180,204 @@ function renderContent(content, props) {
|
|
|
26162
26180
|
}
|
|
26163
26181
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26164
26182
|
}
|
|
26165
|
-
var
|
|
26183
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
26184
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
26185
|
+
var _super = _createSuper$6(Tooltip);
|
|
26186
|
+
function Tooltip() {
|
|
26187
|
+
var _this;
|
|
26188
|
+
_classCallCheck$8(this, Tooltip);
|
|
26189
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26190
|
+
args[_key] = arguments[_key];
|
|
26191
|
+
}
|
|
26192
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
26193
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26194
|
+
boxWidth: -1,
|
|
26195
|
+
boxHeight: -1,
|
|
26196
|
+
dismissed: false,
|
|
26197
|
+
dismissedAtCoordinate: {
|
|
26198
|
+
x: 0,
|
|
26199
|
+
y: 0
|
|
26200
|
+
}
|
|
26201
|
+
});
|
|
26202
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26203
|
+
if (event.key === 'Escape') {
|
|
26204
|
+
_this.setState({
|
|
26205
|
+
dismissed: true,
|
|
26206
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26207
|
+
x: _this.props.coordinate.x,
|
|
26208
|
+
y: _this.props.coordinate.y
|
|
26209
|
+
})
|
|
26210
|
+
});
|
|
26211
|
+
}
|
|
26212
|
+
});
|
|
26213
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26214
|
+
var key = _ref.key,
|
|
26215
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26216
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26217
|
+
var _this$props = _this.props,
|
|
26218
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26219
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26220
|
+
coordinate = _this$props.coordinate,
|
|
26221
|
+
offset = _this$props.offset,
|
|
26222
|
+
position = _this$props.position,
|
|
26223
|
+
viewBox = _this$props.viewBox;
|
|
26224
|
+
if (position && isNumber(position[key])) {
|
|
26225
|
+
return position[key];
|
|
26226
|
+
}
|
|
26227
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26228
|
+
var positive = coordinate[key] + offset;
|
|
26229
|
+
if (allowEscapeViewBox[key]) {
|
|
26230
|
+
return reverseDirection[key] ? negative : positive;
|
|
26231
|
+
}
|
|
26232
|
+
if (reverseDirection[key]) {
|
|
26233
|
+
var _tooltipBoundary = negative;
|
|
26234
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26235
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26236
|
+
return Math.max(positive, viewBox[key]);
|
|
26237
|
+
}
|
|
26238
|
+
return Math.max(negative, viewBox[key]);
|
|
26239
|
+
}
|
|
26240
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26241
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26242
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26243
|
+
return Math.max(negative, viewBox[key]);
|
|
26244
|
+
}
|
|
26245
|
+
return Math.max(positive, viewBox[key]);
|
|
26246
|
+
});
|
|
26247
|
+
return _this;
|
|
26248
|
+
}
|
|
26249
|
+
_createClass$8(Tooltip, [{
|
|
26250
|
+
key: "componentDidMount",
|
|
26251
|
+
value: function componentDidMount() {
|
|
26252
|
+
this.updateBBox();
|
|
26253
|
+
}
|
|
26254
|
+
}, {
|
|
26255
|
+
key: "componentWillUnmount",
|
|
26256
|
+
value: function componentWillUnmount() {
|
|
26257
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26258
|
+
}
|
|
26259
|
+
}, {
|
|
26260
|
+
key: "componentDidUpdate",
|
|
26261
|
+
value: function componentDidUpdate() {
|
|
26262
|
+
this.updateBBox();
|
|
26263
|
+
}
|
|
26264
|
+
}, {
|
|
26265
|
+
key: "updateBBox",
|
|
26266
|
+
value: function updateBBox() {
|
|
26267
|
+
var _this$state = this.state,
|
|
26268
|
+
boxWidth = _this$state.boxWidth,
|
|
26269
|
+
boxHeight = _this$state.boxHeight,
|
|
26270
|
+
dismissed = _this$state.dismissed;
|
|
26271
|
+
if (dismissed) {
|
|
26272
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26273
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26274
|
+
this.setState({
|
|
26275
|
+
dismissed: false
|
|
26276
|
+
});
|
|
26277
|
+
}
|
|
26278
|
+
} else {
|
|
26279
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26280
|
+
}
|
|
26281
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26282
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26283
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26284
|
+
this.setState({
|
|
26285
|
+
boxWidth: box.width,
|
|
26286
|
+
boxHeight: box.height
|
|
26287
|
+
});
|
|
26288
|
+
}
|
|
26289
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26290
|
+
this.setState({
|
|
26291
|
+
boxWidth: -1,
|
|
26292
|
+
boxHeight: -1
|
|
26293
|
+
});
|
|
26294
|
+
}
|
|
26295
|
+
}
|
|
26296
|
+
}, {
|
|
26297
|
+
key: "render",
|
|
26298
|
+
value: function render() {
|
|
26299
|
+
var _classNames,
|
|
26300
|
+
_this2 = this;
|
|
26301
|
+
var _this$props2 = this.props,
|
|
26302
|
+
payload = _this$props2.payload,
|
|
26303
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26304
|
+
animationDuration = _this$props2.animationDuration,
|
|
26305
|
+
animationEasing = _this$props2.animationEasing,
|
|
26306
|
+
filterNull = _this$props2.filterNull,
|
|
26307
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26308
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26309
|
+
return !isNil_1(entry.value);
|
|
26310
|
+
}) : payload);
|
|
26311
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26312
|
+
var _this$props3 = this.props,
|
|
26313
|
+
content = _this$props3.content,
|
|
26314
|
+
viewBox = _this$props3.viewBox,
|
|
26315
|
+
coordinate = _this$props3.coordinate,
|
|
26316
|
+
position = _this$props3.position,
|
|
26317
|
+
active = _this$props3.active,
|
|
26318
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26319
|
+
var outerStyle = _objectSpread$l({
|
|
26320
|
+
pointerEvents: 'none',
|
|
26321
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26322
|
+
position: 'absolute',
|
|
26323
|
+
top: 0,
|
|
26324
|
+
left: 0
|
|
26325
|
+
}, wrapperStyle);
|
|
26326
|
+
var translateX, translateY;
|
|
26327
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26328
|
+
translateX = position.x;
|
|
26329
|
+
translateY = position.y;
|
|
26330
|
+
} else {
|
|
26331
|
+
var _this$state2 = this.state,
|
|
26332
|
+
boxWidth = _this$state2.boxWidth,
|
|
26333
|
+
boxHeight = _this$state2.boxHeight;
|
|
26334
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26335
|
+
translateX = this.getTranslate({
|
|
26336
|
+
key: 'x',
|
|
26337
|
+
tooltipDimension: boxWidth,
|
|
26338
|
+
viewBoxDimension: viewBox.width
|
|
26339
|
+
});
|
|
26340
|
+
translateY = this.getTranslate({
|
|
26341
|
+
key: 'y',
|
|
26342
|
+
tooltipDimension: boxHeight,
|
|
26343
|
+
viewBoxDimension: viewBox.height
|
|
26344
|
+
});
|
|
26345
|
+
} else {
|
|
26346
|
+
outerStyle.visibility = 'hidden';
|
|
26347
|
+
}
|
|
26348
|
+
}
|
|
26349
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26350
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26351
|
+
})), outerStyle);
|
|
26352
|
+
if (isAnimationActive && active) {
|
|
26353
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26354
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26355
|
+
})), outerStyle);
|
|
26356
|
+
}
|
|
26357
|
+
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));
|
|
26358
|
+
return (
|
|
26359
|
+
/*#__PURE__*/
|
|
26360
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26361
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26362
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26363
|
+
React__default["default"].createElement("div", {
|
|
26364
|
+
tabIndex: -1,
|
|
26365
|
+
role: "dialog",
|
|
26366
|
+
className: cls,
|
|
26367
|
+
style: outerStyle,
|
|
26368
|
+
ref: function ref(node) {
|
|
26369
|
+
_this2.wrapperNode = node;
|
|
26370
|
+
}
|
|
26371
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26372
|
+
payload: finalPayload
|
|
26373
|
+
})))
|
|
26374
|
+
);
|
|
26375
|
+
}
|
|
26376
|
+
}]);
|
|
26377
|
+
return Tooltip;
|
|
26378
|
+
}(React$3.PureComponent);
|
|
26379
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26380
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26166
26381
|
active: false,
|
|
26167
26382
|
allowEscapeViewBox: {
|
|
26168
26383
|
x: false,
|
|
@@ -26183,9 +26398,6 @@ var tooltipDefaultProps = {
|
|
|
26183
26398
|
x: 0,
|
|
26184
26399
|
y: 0
|
|
26185
26400
|
},
|
|
26186
|
-
// this doesn't exist on TooltipProps
|
|
26187
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26188
|
-
// @ts-ignore
|
|
26189
26401
|
cursorStyle: {},
|
|
26190
26402
|
separator: ' : ',
|
|
26191
26403
|
wrapperStyle: {},
|
|
@@ -26199,173 +26411,7 @@ var tooltipDefaultProps = {
|
|
|
26199
26411
|
animationDuration: 400,
|
|
26200
26412
|
filterNull: true,
|
|
26201
26413
|
useTranslate3d: false
|
|
26202
|
-
};
|
|
26203
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26204
|
-
var _classNames;
|
|
26205
|
-
var _useState = React$3.useState(-1),
|
|
26206
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26207
|
-
boxWidth = _useState2[0],
|
|
26208
|
-
setBoxWidth = _useState2[1];
|
|
26209
|
-
var _useState3 = React$3.useState(-1),
|
|
26210
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26211
|
-
boxHeight = _useState4[0],
|
|
26212
|
-
setBoxHeight = _useState4[1];
|
|
26213
|
-
var _useState5 = React$3.useState(false),
|
|
26214
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26215
|
-
dismissed = _useState6[0],
|
|
26216
|
-
setDismissed = _useState6[1];
|
|
26217
|
-
var _useState7 = React$3.useState({
|
|
26218
|
-
x: 0,
|
|
26219
|
-
y: 0
|
|
26220
|
-
}),
|
|
26221
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26222
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26223
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26224
|
-
var wrapperNode = React$3.useRef();
|
|
26225
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26226
|
-
reverseDirection = props.reverseDirection,
|
|
26227
|
-
coordinate = props.coordinate,
|
|
26228
|
-
offset = props.offset,
|
|
26229
|
-
position = props.position,
|
|
26230
|
-
viewBox = props.viewBox;
|
|
26231
|
-
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26232
|
-
if (event.key === 'Escape') {
|
|
26233
|
-
setDismissed(true);
|
|
26234
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26235
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26236
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26237
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26238
|
-
});
|
|
26239
|
-
});
|
|
26240
|
-
}
|
|
26241
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26242
|
-
React$3.useEffect(function () {
|
|
26243
|
-
var updateBBox = function updateBBox() {
|
|
26244
|
-
if (dismissed) {
|
|
26245
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26246
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26247
|
-
setDismissed(false);
|
|
26248
|
-
}
|
|
26249
|
-
} else {
|
|
26250
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26251
|
-
}
|
|
26252
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26253
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26254
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26255
|
-
setBoxWidth(box.width);
|
|
26256
|
-
setBoxHeight(box.height);
|
|
26257
|
-
}
|
|
26258
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26259
|
-
setBoxWidth(-1);
|
|
26260
|
-
setBoxHeight(-1);
|
|
26261
|
-
}
|
|
26262
|
-
};
|
|
26263
|
-
updateBBox();
|
|
26264
|
-
return function () {
|
|
26265
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26266
|
-
};
|
|
26267
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26268
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26269
|
-
var key = _ref.key,
|
|
26270
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26271
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26272
|
-
if (position && isNumber(position[key])) {
|
|
26273
|
-
return position[key];
|
|
26274
|
-
}
|
|
26275
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26276
|
-
var positive = coordinate[key] + offset;
|
|
26277
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26278
|
-
return reverseDirection[key] ? negative : positive;
|
|
26279
|
-
}
|
|
26280
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26281
|
-
var _tooltipBoundary = negative;
|
|
26282
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26283
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26284
|
-
return Math.max(positive, viewBox[key]);
|
|
26285
|
-
}
|
|
26286
|
-
return Math.max(negative, viewBox[key]);
|
|
26287
|
-
}
|
|
26288
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26289
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26290
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26291
|
-
return Math.max(negative, viewBox[key]);
|
|
26292
|
-
}
|
|
26293
|
-
return Math.max(positive, viewBox[key]);
|
|
26294
|
-
};
|
|
26295
|
-
var payload = props.payload,
|
|
26296
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26297
|
-
filterNull = props.filterNull,
|
|
26298
|
-
active = props.active,
|
|
26299
|
-
wrapperStyle = props.wrapperStyle,
|
|
26300
|
-
useTranslate3d = props.useTranslate3d,
|
|
26301
|
-
isAnimationActive = props.isAnimationActive,
|
|
26302
|
-
animationDuration = props.animationDuration,
|
|
26303
|
-
animationEasing = props.animationEasing;
|
|
26304
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26305
|
-
return !isNil_1(entry.value);
|
|
26306
|
-
}) : payload);
|
|
26307
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26308
|
-
var content = props.content;
|
|
26309
|
-
var outerStyle = _objectSpread$i({
|
|
26310
|
-
pointerEvents: 'none',
|
|
26311
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26312
|
-
position: 'absolute',
|
|
26313
|
-
top: 0,
|
|
26314
|
-
left: 0
|
|
26315
|
-
}, wrapperStyle);
|
|
26316
|
-
var translateX, translateY;
|
|
26317
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26318
|
-
translateX = position.x;
|
|
26319
|
-
translateY = position.y;
|
|
26320
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26321
|
-
translateX = getTranslate({
|
|
26322
|
-
key: 'x',
|
|
26323
|
-
tooltipDimension: boxWidth,
|
|
26324
|
-
viewBoxDimension: viewBox.width
|
|
26325
|
-
});
|
|
26326
|
-
translateY = getTranslate({
|
|
26327
|
-
key: 'y',
|
|
26328
|
-
tooltipDimension: boxHeight,
|
|
26329
|
-
viewBoxDimension: viewBox.height
|
|
26330
|
-
});
|
|
26331
|
-
} else {
|
|
26332
|
-
outerStyle.visibility = 'hidden';
|
|
26333
|
-
}
|
|
26334
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26335
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26336
|
-
})), outerStyle);
|
|
26337
|
-
if (isAnimationActive && active) {
|
|
26338
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26339
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26340
|
-
})), outerStyle);
|
|
26341
|
-
}
|
|
26342
|
-
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));
|
|
26343
|
-
return (
|
|
26344
|
-
/*#__PURE__*/
|
|
26345
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26346
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26347
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26348
|
-
React__default["default"].createElement("div", {
|
|
26349
|
-
tabIndex: -1,
|
|
26350
|
-
role: "dialog",
|
|
26351
|
-
className: cls,
|
|
26352
|
-
style: outerStyle,
|
|
26353
|
-
ref: wrapperNode
|
|
26354
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26355
|
-
payload: finalPayload
|
|
26356
|
-
})))
|
|
26357
|
-
);
|
|
26358
|
-
};
|
|
26359
|
-
|
|
26360
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26361
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26362
|
-
|
|
26363
|
-
/**
|
|
26364
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26365
|
-
* children.props when there are no props set by the consumer
|
|
26366
|
-
* doesn't work if using default parameters
|
|
26367
|
-
*/
|
|
26368
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26414
|
+
});
|
|
26369
26415
|
|
|
26370
26416
|
var root = _root;
|
|
26371
26417
|
|
|
@@ -31935,12 +31981,12 @@ module.exports = exports['default'];
|
|
|
31935
31981
|
|
|
31936
31982
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31937
31983
|
|
|
31938
|
-
function _typeof$
|
|
31939
|
-
function ownKeys$
|
|
31940
|
-
function _objectSpread$
|
|
31941
|
-
function _defineProperty$
|
|
31942
|
-
function _toPropertyKey$
|
|
31943
|
-
function _toPrimitive$
|
|
31984
|
+
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); }
|
|
31985
|
+
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; }
|
|
31986
|
+
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$l(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; }
|
|
31987
|
+
function _defineProperty$l(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; }
|
|
31988
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31989
|
+
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); }
|
|
31944
31990
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31945
31991
|
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."); }
|
|
31946
31992
|
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); }
|
|
@@ -32008,7 +32054,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
32008
32054
|
}
|
|
32009
32055
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
32010
32056
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
32011
|
-
var measurementSpanStyle = _objectSpread$
|
|
32057
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
32012
32058
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
32013
32059
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
32014
32060
|
return styleKey;
|
|
@@ -32063,10 +32109,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32063
32109
|
};
|
|
32064
32110
|
};
|
|
32065
32111
|
|
|
32066
|
-
var _excluded$
|
|
32112
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
32113
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32067
32114
|
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); }
|
|
32068
|
-
function _objectWithoutProperties$
|
|
32069
|
-
function _objectWithoutPropertiesLoose$
|
|
32115
|
+
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; }
|
|
32116
|
+
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; }
|
|
32070
32117
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32071
32118
|
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."); }
|
|
32072
32119
|
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); }
|
|
@@ -32220,45 +32267,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32220
32267
|
}
|
|
32221
32268
|
return getWordsWithoutCalculate(children);
|
|
32222
32269
|
};
|
|
32223
|
-
var
|
|
32224
|
-
|
|
32225
|
-
|
|
32226
|
-
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32270
|
+
var DEFAULT_FILL = '#808080';
|
|
32271
|
+
var Text = function Text(_ref5) {
|
|
32272
|
+
var _ref5$x = _ref5.x,
|
|
32273
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32274
|
+
_ref5$y = _ref5.y,
|
|
32275
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32276
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32277
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32278
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32279
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32280
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32281
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32282
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32283
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32284
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32285
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32286
|
+
_ref5$fill = _ref5.fill,
|
|
32287
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32288
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32236
32289
|
var wordsByLines = React$3.useMemo(function () {
|
|
32237
32290
|
return getWordsByLines({
|
|
32238
32291
|
breakAll: props.breakAll,
|
|
32239
32292
|
children: props.children,
|
|
32240
32293
|
maxLines: props.maxLines,
|
|
32241
|
-
scaleToFit:
|
|
32294
|
+
scaleToFit: scaleToFit,
|
|
32242
32295
|
style: props.style,
|
|
32243
32296
|
width: props.width
|
|
32244
32297
|
});
|
|
32245
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32298
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32246
32299
|
var dx = props.dx,
|
|
32247
32300
|
dy = props.dy,
|
|
32248
|
-
textAnchor = props.textAnchor,
|
|
32249
|
-
verticalAnchor = props.verticalAnchor,
|
|
32250
|
-
scaleToFit = props.scaleToFit,
|
|
32251
32301
|
angle = props.angle,
|
|
32252
|
-
lineHeight = props.lineHeight,
|
|
32253
|
-
capHeight = props.capHeight,
|
|
32254
32302
|
className = props.className,
|
|
32255
32303
|
breakAll = props.breakAll,
|
|
32256
|
-
textProps = _objectWithoutProperties$
|
|
32257
|
-
if (!isNumOrStr(
|
|
32304
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32305
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32258
32306
|
return null;
|
|
32259
32307
|
}
|
|
32260
|
-
var x =
|
|
32261
|
-
var y =
|
|
32308
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32309
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32262
32310
|
var startDy;
|
|
32263
32311
|
switch (verticalAnchor) {
|
|
32264
32312
|
case 'start':
|
|
@@ -32288,7 +32336,7 @@ var Text = function Text(props) {
|
|
|
32288
32336
|
y: y,
|
|
32289
32337
|
className: classNames('recharts-text', className),
|
|
32290
32338
|
textAnchor: textAnchor,
|
|
32291
|
-
fill:
|
|
32339
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32292
32340
|
}), wordsByLines.map(function (line, index) {
|
|
32293
32341
|
return (
|
|
32294
32342
|
/*#__PURE__*/
|
|
@@ -32301,7 +32349,6 @@ var Text = function Text(props) {
|
|
|
32301
32349
|
);
|
|
32302
32350
|
}));
|
|
32303
32351
|
};
|
|
32304
|
-
Text.defaultProps = textDefaultProps;
|
|
32305
32352
|
|
|
32306
32353
|
var baseIsEqual = _baseIsEqual;
|
|
32307
32354
|
|
|
@@ -38569,7 +38616,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38569
38616
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38570
38617
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38571
38618
|
|
|
38572
|
-
var _excluded$
|
|
38619
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38573
38620
|
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); }
|
|
38574
38621
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38575
38622
|
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."); }
|
|
@@ -38577,8 +38624,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38577
38624
|
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; }
|
|
38578
38625
|
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; } }
|
|
38579
38626
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38580
|
-
function _objectWithoutProperties$
|
|
38581
|
-
function _objectWithoutPropertiesLoose$
|
|
38627
|
+
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; }
|
|
38628
|
+
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; }
|
|
38582
38629
|
function ErrorBar(props) {
|
|
38583
38630
|
var offset = props.offset,
|
|
38584
38631
|
layout = props.layout,
|
|
@@ -38588,7 +38635,7 @@ function ErrorBar(props) {
|
|
|
38588
38635
|
dataPointFormatter = props.dataPointFormatter,
|
|
38589
38636
|
xAxis = props.xAxis,
|
|
38590
38637
|
yAxis = props.yAxis,
|
|
38591
|
-
others = _objectWithoutProperties$
|
|
38638
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38592
38639
|
var svgProps = filterProps(others);
|
|
38593
38640
|
var errorBars = data.map(function (entry, i) {
|
|
38594
38641
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38699,18 +38746,18 @@ ErrorBar.defaultProps = {
|
|
|
38699
38746
|
};
|
|
38700
38747
|
ErrorBar.displayName = 'ErrorBar';
|
|
38701
38748
|
|
|
38702
|
-
function _typeof$
|
|
38749
|
+
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); }
|
|
38703
38750
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38704
38751
|
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."); }
|
|
38705
38752
|
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); }
|
|
38706
38753
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38707
38754
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38708
38755
|
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; }
|
|
38709
|
-
function ownKeys$
|
|
38710
|
-
function _objectSpread$
|
|
38711
|
-
function _defineProperty$
|
|
38712
|
-
function _toPropertyKey$
|
|
38713
|
-
function _toPrimitive$
|
|
38756
|
+
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; }
|
|
38757
|
+
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; }
|
|
38758
|
+
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; }
|
|
38759
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38760
|
+
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); }
|
|
38714
38761
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38715
38762
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38716
38763
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38881,7 +38928,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38881
38928
|
};
|
|
38882
38929
|
});
|
|
38883
38930
|
}
|
|
38884
|
-
return _objectSpread$
|
|
38931
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38885
38932
|
payload: legendData,
|
|
38886
38933
|
item: legendItem
|
|
38887
38934
|
});
|
|
@@ -39035,10 +39082,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39035
39082
|
verticalAlign = legendProps.verticalAlign,
|
|
39036
39083
|
layout = legendProps.layout;
|
|
39037
39084
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39038
|
-
newOffset = _objectSpread$
|
|
39085
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
39039
39086
|
}
|
|
39040
39087
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39041
|
-
newOffset = _objectSpread$
|
|
39088
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39042
39089
|
}
|
|
39043
39090
|
}
|
|
39044
39091
|
return newOffset;
|
|
@@ -39464,14 +39511,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39464
39511
|
items: [item]
|
|
39465
39512
|
};
|
|
39466
39513
|
}
|
|
39467
|
-
return _objectSpread$
|
|
39514
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39468
39515
|
}, {});
|
|
39469
39516
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39470
39517
|
var group = stackGroups[axisId];
|
|
39471
39518
|
if (group.hasStack) {
|
|
39472
39519
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39473
39520
|
var g = group.stackGroups[stackId];
|
|
39474
|
-
return _objectSpread$
|
|
39521
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39475
39522
|
numericAxisId: numericAxisId,
|
|
39476
39523
|
cateAxisId: cateAxisId,
|
|
39477
39524
|
items: g.items,
|
|
@@ -39479,7 +39526,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39479
39526
|
}));
|
|
39480
39527
|
}, {});
|
|
39481
39528
|
}
|
|
39482
|
-
return _objectSpread$
|
|
39529
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39483
39530
|
}, {});
|
|
39484
39531
|
};
|
|
39485
39532
|
|
|
@@ -39693,7 +39740,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39693
39740
|
formatter = _graphicalItem$props.formatter,
|
|
39694
39741
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39695
39742
|
chartType = _graphicalItem$props.chartType;
|
|
39696
|
-
return _objectSpread$
|
|
39743
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39697
39744
|
dataKey: dataKey,
|
|
39698
39745
|
unit: unit,
|
|
39699
39746
|
formatter: formatter,
|
|
@@ -39706,12 +39753,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39706
39753
|
});
|
|
39707
39754
|
};
|
|
39708
39755
|
|
|
39709
|
-
function _typeof$
|
|
39710
|
-
function ownKeys$
|
|
39711
|
-
function _objectSpread$
|
|
39712
|
-
function _defineProperty$
|
|
39713
|
-
function _toPropertyKey$
|
|
39714
|
-
function _toPrimitive$
|
|
39756
|
+
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); }
|
|
39757
|
+
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; }
|
|
39758
|
+
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; }
|
|
39759
|
+
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; }
|
|
39760
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39761
|
+
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); }
|
|
39715
39762
|
var RADIAN = Math.PI / 180;
|
|
39716
39763
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39717
39764
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39816,7 +39863,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39816
39863
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39817
39864
|
}
|
|
39818
39865
|
if (inRange) {
|
|
39819
|
-
return _objectSpread$
|
|
39866
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39820
39867
|
radius: radius,
|
|
39821
39868
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39822
39869
|
});
|
|
@@ -39824,18 +39871,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39824
39871
|
return null;
|
|
39825
39872
|
};
|
|
39826
39873
|
|
|
39827
|
-
function _typeof$
|
|
39874
|
+
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); }
|
|
39875
|
+
var _excluded$7 = ["offset"];
|
|
39828
39876
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39829
39877
|
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."); }
|
|
39830
39878
|
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); }
|
|
39831
39879
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39832
39880
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39833
39881
|
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; }
|
|
39834
|
-
function
|
|
39835
|
-
function
|
|
39836
|
-
function
|
|
39837
|
-
function
|
|
39838
|
-
function
|
|
39882
|
+
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; }
|
|
39883
|
+
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; }
|
|
39884
|
+
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; }
|
|
39885
|
+
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; }
|
|
39886
|
+
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; }
|
|
39887
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39888
|
+
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); }
|
|
39839
39889
|
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); }
|
|
39840
39890
|
var getLabel = function getLabel(props) {
|
|
39841
39891
|
var value = props.value,
|
|
@@ -39980,7 +40030,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39980
40030
|
textAnchor: 'middle',
|
|
39981
40031
|
verticalAnchor: verticalEnd
|
|
39982
40032
|
};
|
|
39983
|
-
return _objectSpread$
|
|
40033
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39984
40034
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39985
40035
|
width: width
|
|
39986
40036
|
} : {});
|
|
@@ -39992,7 +40042,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39992
40042
|
textAnchor: 'middle',
|
|
39993
40043
|
verticalAnchor: verticalStart
|
|
39994
40044
|
};
|
|
39995
|
-
return _objectSpread$
|
|
40045
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39996
40046
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39997
40047
|
width: width
|
|
39998
40048
|
} : {});
|
|
@@ -40004,7 +40054,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40004
40054
|
textAnchor: horizontalEnd,
|
|
40005
40055
|
verticalAnchor: 'middle'
|
|
40006
40056
|
};
|
|
40007
|
-
return _objectSpread$
|
|
40057
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
40008
40058
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
40009
40059
|
height: height
|
|
40010
40060
|
} : {});
|
|
@@ -40016,7 +40066,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40016
40066
|
textAnchor: horizontalStart,
|
|
40017
40067
|
verticalAnchor: 'middle'
|
|
40018
40068
|
};
|
|
40019
|
-
return _objectSpread$
|
|
40069
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
40020
40070
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
40021
40071
|
height: height
|
|
40022
40072
|
} : {});
|
|
@@ -40026,7 +40076,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40026
40076
|
height: height
|
|
40027
40077
|
} : {};
|
|
40028
40078
|
if (position === 'insideLeft') {
|
|
40029
|
-
return _objectSpread$
|
|
40079
|
+
return _objectSpread$h({
|
|
40030
40080
|
x: x + horizontalOffset,
|
|
40031
40081
|
y: y + height / 2,
|
|
40032
40082
|
textAnchor: horizontalStart,
|
|
@@ -40034,7 +40084,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40034
40084
|
}, sizeAttrs);
|
|
40035
40085
|
}
|
|
40036
40086
|
if (position === 'insideRight') {
|
|
40037
|
-
return _objectSpread$
|
|
40087
|
+
return _objectSpread$h({
|
|
40038
40088
|
x: x + width - horizontalOffset,
|
|
40039
40089
|
y: y + height / 2,
|
|
40040
40090
|
textAnchor: horizontalEnd,
|
|
@@ -40042,7 +40092,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40042
40092
|
}, sizeAttrs);
|
|
40043
40093
|
}
|
|
40044
40094
|
if (position === 'insideTop') {
|
|
40045
|
-
return _objectSpread$
|
|
40095
|
+
return _objectSpread$h({
|
|
40046
40096
|
x: x + width / 2,
|
|
40047
40097
|
y: y + verticalOffset,
|
|
40048
40098
|
textAnchor: 'middle',
|
|
@@ -40050,7 +40100,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40050
40100
|
}, sizeAttrs);
|
|
40051
40101
|
}
|
|
40052
40102
|
if (position === 'insideBottom') {
|
|
40053
|
-
return _objectSpread$
|
|
40103
|
+
return _objectSpread$h({
|
|
40054
40104
|
x: x + width / 2,
|
|
40055
40105
|
y: y + height - verticalOffset,
|
|
40056
40106
|
textAnchor: 'middle',
|
|
@@ -40058,7 +40108,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40058
40108
|
}, sizeAttrs);
|
|
40059
40109
|
}
|
|
40060
40110
|
if (position === 'insideTopLeft') {
|
|
40061
|
-
return _objectSpread$
|
|
40111
|
+
return _objectSpread$h({
|
|
40062
40112
|
x: x + horizontalOffset,
|
|
40063
40113
|
y: y + verticalOffset,
|
|
40064
40114
|
textAnchor: horizontalStart,
|
|
@@ -40066,7 +40116,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40066
40116
|
}, sizeAttrs);
|
|
40067
40117
|
}
|
|
40068
40118
|
if (position === 'insideTopRight') {
|
|
40069
|
-
return _objectSpread$
|
|
40119
|
+
return _objectSpread$h({
|
|
40070
40120
|
x: x + width - horizontalOffset,
|
|
40071
40121
|
y: y + verticalOffset,
|
|
40072
40122
|
textAnchor: horizontalEnd,
|
|
@@ -40074,7 +40124,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40074
40124
|
}, sizeAttrs);
|
|
40075
40125
|
}
|
|
40076
40126
|
if (position === 'insideBottomLeft') {
|
|
40077
|
-
return _objectSpread$
|
|
40127
|
+
return _objectSpread$h({
|
|
40078
40128
|
x: x + horizontalOffset,
|
|
40079
40129
|
y: y + height - verticalOffset,
|
|
40080
40130
|
textAnchor: horizontalStart,
|
|
@@ -40082,7 +40132,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40082
40132
|
}, sizeAttrs);
|
|
40083
40133
|
}
|
|
40084
40134
|
if (position === 'insideBottomRight') {
|
|
40085
|
-
return _objectSpread$
|
|
40135
|
+
return _objectSpread$h({
|
|
40086
40136
|
x: x + width - horizontalOffset,
|
|
40087
40137
|
y: y + height - verticalOffset,
|
|
40088
40138
|
textAnchor: horizontalEnd,
|
|
@@ -40090,14 +40140,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40090
40140
|
}, sizeAttrs);
|
|
40091
40141
|
}
|
|
40092
40142
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40093
|
-
return _objectSpread$
|
|
40143
|
+
return _objectSpread$h({
|
|
40094
40144
|
x: x + getPercentValue(position.x, width),
|
|
40095
40145
|
y: y + getPercentValue(position.y, height),
|
|
40096
40146
|
textAnchor: 'end',
|
|
40097
40147
|
verticalAnchor: 'end'
|
|
40098
40148
|
}, sizeAttrs);
|
|
40099
40149
|
}
|
|
40100
|
-
return _objectSpread$
|
|
40150
|
+
return _objectSpread$h({
|
|
40101
40151
|
x: x + width / 2,
|
|
40102
40152
|
y: y + height / 2,
|
|
40103
40153
|
textAnchor: 'middle',
|
|
@@ -40107,7 +40157,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40107
40157
|
var isPolar = function isPolar(viewBox) {
|
|
40108
40158
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40109
40159
|
};
|
|
40110
|
-
function Label$3(
|
|
40160
|
+
function Label$3(_ref4) {
|
|
40161
|
+
var _ref4$offset = _ref4.offset,
|
|
40162
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40163
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40164
|
+
var props = _objectSpread$h({
|
|
40165
|
+
offset: offset
|
|
40166
|
+
}, restProps);
|
|
40111
40167
|
var viewBox = props.viewBox,
|
|
40112
40168
|
position = props.position,
|
|
40113
40169
|
value = props.value,
|
|
@@ -40144,9 +40200,6 @@ function Label$3(props) {
|
|
|
40144
40200
|
}), label);
|
|
40145
40201
|
}
|
|
40146
40202
|
Label$3.displayName = 'Label';
|
|
40147
|
-
Label$3.defaultProps = {
|
|
40148
|
-
offset: 5
|
|
40149
|
-
};
|
|
40150
40203
|
var parseViewBox = function parseViewBox(props) {
|
|
40151
40204
|
var cx = props.cx,
|
|
40152
40205
|
cy = props.cy,
|
|
@@ -40301,8 +40354,9 @@ function last(array) {
|
|
|
40301
40354
|
|
|
40302
40355
|
var last_1 = last;
|
|
40303
40356
|
|
|
40304
|
-
function _typeof$
|
|
40305
|
-
var _excluded$
|
|
40357
|
+
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); }
|
|
40358
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40359
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40306
40360
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40307
40361
|
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."); }
|
|
40308
40362
|
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); }
|
|
@@ -40310,26 +40364,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40310
40364
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40311
40365
|
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; }
|
|
40312
40366
|
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); }
|
|
40313
|
-
function ownKeys$
|
|
40314
|
-
function _objectSpread$
|
|
40315
|
-
function _defineProperty$
|
|
40316
|
-
function _toPropertyKey$
|
|
40317
|
-
function _toPrimitive$
|
|
40318
|
-
function _objectWithoutProperties$
|
|
40319
|
-
function _objectWithoutPropertiesLoose$
|
|
40320
|
-
var
|
|
40321
|
-
|
|
40322
|
-
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40328
|
-
dataKey =
|
|
40329
|
-
clockWise =
|
|
40330
|
-
id =
|
|
40331
|
-
textBreakAll =
|
|
40332
|
-
others = _objectWithoutProperties$
|
|
40367
|
+
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; }
|
|
40368
|
+
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; }
|
|
40369
|
+
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; }
|
|
40370
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40371
|
+
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); }
|
|
40372
|
+
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; }
|
|
40373
|
+
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; }
|
|
40374
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40375
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40376
|
+
};
|
|
40377
|
+
function LabelList(_ref) {
|
|
40378
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40379
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40380
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40381
|
+
var data = restProps.data,
|
|
40382
|
+
dataKey = restProps.dataKey,
|
|
40383
|
+
clockWise = restProps.clockWise,
|
|
40384
|
+
id = restProps.id,
|
|
40385
|
+
textBreakAll = restProps.textBreakAll,
|
|
40386
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40333
40387
|
if (!data || !data.length) {
|
|
40334
40388
|
return null;
|
|
40335
40389
|
}
|
|
@@ -40345,7 +40399,7 @@ function LabelList(props) {
|
|
|
40345
40399
|
index: index,
|
|
40346
40400
|
value: value,
|
|
40347
40401
|
textBreakAll: textBreakAll,
|
|
40348
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40402
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40349
40403
|
clockWise: clockWise
|
|
40350
40404
|
})),
|
|
40351
40405
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40400,9 +40454,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40400
40454
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40401
40455
|
}
|
|
40402
40456
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40403
|
-
LabelList.defaultProps = defaultProps;
|
|
40404
40457
|
|
|
40458
|
+
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); }
|
|
40405
40459
|
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); }
|
|
40460
|
+
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; }
|
|
40461
|
+
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; }
|
|
40462
|
+
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; }
|
|
40463
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40464
|
+
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); }
|
|
40406
40465
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40407
40466
|
var sign = mathSign(endAngle - startAngle);
|
|
40408
40467
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40543,7 +40602,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40543
40602
|
}
|
|
40544
40603
|
return path;
|
|
40545
40604
|
};
|
|
40546
|
-
var
|
|
40605
|
+
var defaultProps$1 = {
|
|
40606
|
+
cx: 0,
|
|
40607
|
+
cy: 0,
|
|
40608
|
+
innerRadius: 0,
|
|
40609
|
+
outerRadius: 0,
|
|
40610
|
+
startAngle: 0,
|
|
40611
|
+
endAngle: 0,
|
|
40612
|
+
cornerRadius: 0,
|
|
40613
|
+
forceCornerRadius: false,
|
|
40614
|
+
cornerIsExternal: false
|
|
40615
|
+
};
|
|
40616
|
+
var Sector = function Sector(sectorProps) {
|
|
40617
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40547
40618
|
var cx = props.cx,
|
|
40548
40619
|
cy = props.cy,
|
|
40549
40620
|
innerRadius = props.innerRadius,
|
|
@@ -40589,25 +40660,14 @@ var Sector = function Sector(props) {
|
|
|
40589
40660
|
role: "img"
|
|
40590
40661
|
}));
|
|
40591
40662
|
};
|
|
40592
|
-
Sector.defaultProps = {
|
|
40593
|
-
cx: 0,
|
|
40594
|
-
cy: 0,
|
|
40595
|
-
innerRadius: 0,
|
|
40596
|
-
outerRadius: 0,
|
|
40597
|
-
startAngle: 0,
|
|
40598
|
-
endAngle: 0,
|
|
40599
|
-
cornerRadius: 0,
|
|
40600
|
-
forceCornerRadius: false,
|
|
40601
|
-
cornerIsExternal: false
|
|
40602
|
-
};
|
|
40603
40663
|
|
|
40604
|
-
function _typeof$
|
|
40664
|
+
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); }
|
|
40605
40665
|
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); }
|
|
40606
|
-
function ownKeys$
|
|
40607
|
-
function _objectSpread$
|
|
40608
|
-
function _defineProperty$
|
|
40609
|
-
function _toPropertyKey$
|
|
40610
|
-
function _toPrimitive$
|
|
40666
|
+
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; }
|
|
40667
|
+
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; }
|
|
40668
|
+
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; }
|
|
40669
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40670
|
+
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); }
|
|
40611
40671
|
var CURVE_FACTORIES = {
|
|
40612
40672
|
curveBasisClosed: curveBasisClosed,
|
|
40613
40673
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40647,11 +40707,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40647
40707
|
* @return {String} path
|
|
40648
40708
|
*/
|
|
40649
40709
|
var getPath$1 = function getPath(_ref) {
|
|
40650
|
-
var type = _ref.type,
|
|
40651
|
-
|
|
40710
|
+
var _ref$type = _ref.type,
|
|
40711
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40712
|
+
_ref$points = _ref.points,
|
|
40713
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40652
40714
|
baseLine = _ref.baseLine,
|
|
40653
40715
|
layout = _ref.layout,
|
|
40654
|
-
connectNulls = _ref.connectNulls
|
|
40716
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40717
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40655
40718
|
var curveFactory = getCurveFactory(type, layout);
|
|
40656
40719
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40657
40720
|
return defined(entry);
|
|
@@ -40662,7 +40725,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40662
40725
|
return defined(base);
|
|
40663
40726
|
}) : baseLine;
|
|
40664
40727
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40665
|
-
return _objectSpread$
|
|
40728
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40666
40729
|
base: formatBaseLine[index]
|
|
40667
40730
|
});
|
|
40668
40731
|
});
|
|
@@ -40703,12 +40766,8 @@ var Curve = function Curve(props) {
|
|
|
40703
40766
|
ref: pathRef
|
|
40704
40767
|
}));
|
|
40705
40768
|
};
|
|
40706
|
-
Curve.defaultProps = {
|
|
40707
|
-
type: 'linear',
|
|
40708
|
-
points: [],
|
|
40709
|
-
connectNulls: false
|
|
40710
|
-
};
|
|
40711
40769
|
|
|
40770
|
+
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); }
|
|
40712
40771
|
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); }
|
|
40713
40772
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40714
40773
|
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."); }
|
|
@@ -40716,6 +40775,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40716
40775
|
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; }
|
|
40717
40776
|
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; } }
|
|
40718
40777
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40778
|
+
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; }
|
|
40779
|
+
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; }
|
|
40780
|
+
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; }
|
|
40781
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40782
|
+
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); }
|
|
40719
40783
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40720
40784
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40721
40785
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40771,13 +40835,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40771
40835
|
}
|
|
40772
40836
|
return false;
|
|
40773
40837
|
};
|
|
40774
|
-
var
|
|
40838
|
+
var defaultProps = {
|
|
40839
|
+
x: 0,
|
|
40840
|
+
y: 0,
|
|
40841
|
+
width: 0,
|
|
40842
|
+
height: 0,
|
|
40843
|
+
// The radius of border
|
|
40844
|
+
// The radius of four corners when radius is a number
|
|
40845
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40846
|
+
radius: 0,
|
|
40847
|
+
isAnimationActive: false,
|
|
40848
|
+
isUpdateAnimationActive: false,
|
|
40849
|
+
animationBegin: 0,
|
|
40850
|
+
animationDuration: 1500,
|
|
40851
|
+
animationEasing: 'ease'
|
|
40852
|
+
};
|
|
40853
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40854
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40775
40855
|
var pathRef = React$3.useRef();
|
|
40776
40856
|
var _useState = React$3.useState(-1),
|
|
40777
40857
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40778
40858
|
totalLength = _useState2[0],
|
|
40779
40859
|
setTotalLength = _useState2[1];
|
|
40780
|
-
React$3.
|
|
40860
|
+
React$3.useEffect(function () {
|
|
40781
40861
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40782
40862
|
try {
|
|
40783
40863
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40848,21 +40928,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40848
40928
|
})));
|
|
40849
40929
|
});
|
|
40850
40930
|
};
|
|
40851
|
-
Rectangle.defaultProps = {
|
|
40852
|
-
x: 0,
|
|
40853
|
-
y: 0,
|
|
40854
|
-
width: 0,
|
|
40855
|
-
height: 0,
|
|
40856
|
-
// The radius of border
|
|
40857
|
-
// The radius of four corners when radius is a number
|
|
40858
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40859
|
-
radius: 0,
|
|
40860
|
-
isAnimationActive: false,
|
|
40861
|
-
isUpdateAnimationActive: false,
|
|
40862
|
-
animationBegin: 0,
|
|
40863
|
-
animationDuration: 1500,
|
|
40864
|
-
animationEasing: 'ease'
|
|
40865
|
-
};
|
|
40866
40931
|
|
|
40867
40932
|
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); }
|
|
40868
40933
|
var Dot$1 = function Dot(props) {
|
|
@@ -40882,18 +40947,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40882
40947
|
return null;
|
|
40883
40948
|
};
|
|
40884
40949
|
|
|
40950
|
+
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); }
|
|
40951
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40885
40952
|
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); }
|
|
40953
|
+
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; }
|
|
40954
|
+
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; }
|
|
40955
|
+
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; }
|
|
40956
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40957
|
+
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); }
|
|
40958
|
+
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; }
|
|
40959
|
+
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; }
|
|
40886
40960
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40887
40961
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40888
40962
|
};
|
|
40889
|
-
var Cross = function Cross(
|
|
40890
|
-
var x =
|
|
40891
|
-
|
|
40892
|
-
|
|
40893
|
-
|
|
40894
|
-
top =
|
|
40895
|
-
|
|
40896
|
-
|
|
40963
|
+
var Cross = function Cross(_ref) {
|
|
40964
|
+
var _ref$x = _ref.x,
|
|
40965
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40966
|
+
_ref$y = _ref.y,
|
|
40967
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40968
|
+
_ref$top = _ref.top,
|
|
40969
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40970
|
+
_ref$left = _ref.left,
|
|
40971
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40972
|
+
_ref$width = _ref.width,
|
|
40973
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40974
|
+
_ref$height = _ref.height,
|
|
40975
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40976
|
+
className = _ref.className,
|
|
40977
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40978
|
+
var props = _objectSpread$c({
|
|
40979
|
+
x: x,
|
|
40980
|
+
y: y,
|
|
40981
|
+
top: top,
|
|
40982
|
+
left: left,
|
|
40983
|
+
width: width,
|
|
40984
|
+
height: height
|
|
40985
|
+
}, rest);
|
|
40897
40986
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40898
40987
|
return null;
|
|
40899
40988
|
}
|
|
@@ -40902,14 +40991,6 @@ var Cross = function Cross(props) {
|
|
|
40902
40991
|
d: getPath(x, y, width, height, top, left)
|
|
40903
40992
|
}));
|
|
40904
40993
|
};
|
|
40905
|
-
Cross.defaultProps = {
|
|
40906
|
-
x: 0,
|
|
40907
|
-
y: 0,
|
|
40908
|
-
top: 0,
|
|
40909
|
-
left: 0,
|
|
40910
|
-
width: 0,
|
|
40911
|
-
height: 0
|
|
40912
|
-
};
|
|
40913
40994
|
|
|
40914
40995
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40915
40996
|
|
|
@@ -41119,6 +41200,7 @@ var createScale = function createScale(_ref) {
|
|
|
41119
41200
|
isTextActive: false,
|
|
41120
41201
|
isSlideMoving: false,
|
|
41121
41202
|
isTravellerMoving: false,
|
|
41203
|
+
isTravellerFocused: false,
|
|
41122
41204
|
startX: scale(startIndex),
|
|
41123
41205
|
endX: scale(endIndex),
|
|
41124
41206
|
scale: scale,
|
|
@@ -41332,6 +41414,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41332
41414
|
}
|
|
41333
41415
|
});
|
|
41334
41416
|
}
|
|
41417
|
+
}, {
|
|
41418
|
+
key: "handleTravellerMoveKeyboard",
|
|
41419
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41420
|
+
var _this2 = this;
|
|
41421
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41422
|
+
var _this$state3 = this.state,
|
|
41423
|
+
scaleValues = _this$state3.scaleValues,
|
|
41424
|
+
startX = _this$state3.startX,
|
|
41425
|
+
endX = _this$state3.endX;
|
|
41426
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41427
|
+
var currentScaleValue = this.state[id];
|
|
41428
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41429
|
+
if (currentIndex === -1) {
|
|
41430
|
+
return;
|
|
41431
|
+
}
|
|
41432
|
+
var newIndex = currentIndex + direction;
|
|
41433
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41434
|
+
return;
|
|
41435
|
+
}
|
|
41436
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41437
|
+
|
|
41438
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41439
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41440
|
+
return;
|
|
41441
|
+
}
|
|
41442
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41443
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41444
|
+
startX: _this2.state.startX,
|
|
41445
|
+
endX: _this2.state.endX
|
|
41446
|
+
}));
|
|
41447
|
+
});
|
|
41448
|
+
}
|
|
41335
41449
|
}, {
|
|
41336
41450
|
key: "renderBackground",
|
|
41337
41451
|
value: function renderBackground() {
|
|
@@ -41379,6 +41493,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41379
41493
|
}, {
|
|
41380
41494
|
key: "renderTravellerLayer",
|
|
41381
41495
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41496
|
+
var _this3 = this;
|
|
41382
41497
|
var _this$props7 = this.props,
|
|
41383
41498
|
y = _this$props7.y,
|
|
41384
41499
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41392,11 +41507,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41392
41507
|
height: height
|
|
41393
41508
|
});
|
|
41394
41509
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41510
|
+
tabIndex: 0,
|
|
41511
|
+
role: "slider",
|
|
41395
41512
|
className: "recharts-brush-traveller",
|
|
41396
41513
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41397
41514
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41398
41515
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41399
41516
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41517
|
+
onKeyDown: function onKeyDown(e) {
|
|
41518
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41519
|
+
return;
|
|
41520
|
+
}
|
|
41521
|
+
e.preventDefault();
|
|
41522
|
+
e.stopPropagation();
|
|
41523
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41524
|
+
},
|
|
41525
|
+
onFocus: function onFocus() {
|
|
41526
|
+
_this3.setState({
|
|
41527
|
+
isTravellerFocused: true
|
|
41528
|
+
});
|
|
41529
|
+
},
|
|
41530
|
+
onBlur: function onBlur() {
|
|
41531
|
+
_this3.setState({
|
|
41532
|
+
isTravellerFocused: false
|
|
41533
|
+
});
|
|
41534
|
+
},
|
|
41400
41535
|
style: {
|
|
41401
41536
|
cursor: 'col-resize'
|
|
41402
41537
|
}
|
|
@@ -41440,9 +41575,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41440
41575
|
height = _this$props9.height,
|
|
41441
41576
|
travellerWidth = _this$props9.travellerWidth,
|
|
41442
41577
|
stroke = _this$props9.stroke;
|
|
41443
|
-
var _this$
|
|
41444
|
-
startX = _this$
|
|
41445
|
-
endX = _this$
|
|
41578
|
+
var _this$state4 = this.state,
|
|
41579
|
+
startX = _this$state4.startX,
|
|
41580
|
+
endX = _this$state4.endX;
|
|
41446
41581
|
var offset = 5;
|
|
41447
41582
|
var attrs = {
|
|
41448
41583
|
pointerEvents: 'none',
|
|
@@ -41474,12 +41609,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41474
41609
|
width = _this$props10.width,
|
|
41475
41610
|
height = _this$props10.height,
|
|
41476
41611
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41477
|
-
var _this$
|
|
41478
|
-
startX = _this$
|
|
41479
|
-
endX = _this$
|
|
41480
|
-
isTextActive = _this$
|
|
41481
|
-
isSlideMoving = _this$
|
|
41482
|
-
isTravellerMoving = _this$
|
|
41612
|
+
var _this$state5 = this.state,
|
|
41613
|
+
startX = _this$state5.startX,
|
|
41614
|
+
endX = _this$state5.endX,
|
|
41615
|
+
isTextActive = _this$state5.isTextActive,
|
|
41616
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41617
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41618
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41483
41619
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41484
41620
|
return null;
|
|
41485
41621
|
}
|
|
@@ -41491,7 +41627,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41491
41627
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41492
41628
|
onTouchMove: this.handleTouchMove,
|
|
41493
41629
|
style: style
|
|
41494
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41630
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41495
41631
|
}
|
|
41496
41632
|
}], [{
|
|
41497
41633
|
key: "renderDefaultTraveller",
|
|
@@ -41809,7 +41945,7 @@ function every(collection, predicate, guard) {
|
|
|
41809
41945
|
|
|
41810
41946
|
var every_1 = every;
|
|
41811
41947
|
|
|
41812
|
-
var defineProperty = _defineProperty$
|
|
41948
|
+
var defineProperty = _defineProperty$o;
|
|
41813
41949
|
|
|
41814
41950
|
/**
|
|
41815
41951
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42170,7 +42306,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42170
42306
|
legendType: 'rect',
|
|
42171
42307
|
minPointSize: 0,
|
|
42172
42308
|
hide: false,
|
|
42173
|
-
// data of bar
|
|
42174
42309
|
data: [],
|
|
42175
42310
|
layout: 'vertical',
|
|
42176
42311
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45083,10 +45218,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45083
45218
|
}
|
|
45084
45219
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45085
45220
|
x = _this$container$getBo.x,
|
|
45086
|
-
y = _this$container$getBo.y
|
|
45221
|
+
y = _this$container$getBo.y,
|
|
45222
|
+
height = _this$container$getBo.height;
|
|
45087
45223
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45088
45224
|
var pageX = x + coordinate;
|
|
45089
|
-
var pageY = y + this.offset.top;
|
|
45225
|
+
var pageY = y + this.offset.top + height / 2;
|
|
45090
45226
|
this.mouseHandlerCallback({
|
|
45091
45227
|
pageX: pageX,
|
|
45092
45228
|
pageY: pageY
|
|
@@ -48445,16 +48581,35 @@ var Table = function (_a) {
|
|
|
48445
48581
|
if (rowSelection && rowSelection.onChange)
|
|
48446
48582
|
rowSelection.onChange(newSelectedRowKeys, selectedKey, selectedRows, selectedRow);
|
|
48447
48583
|
};
|
|
48448
|
-
|
|
48584
|
+
var onSelectAllRows = function () {
|
|
48585
|
+
if (!rowSelection)
|
|
48586
|
+
return;
|
|
48587
|
+
if (selectedRowKeys.length === data.length) {
|
|
48588
|
+
setSelectedRowKeys([]);
|
|
48589
|
+
rowSelection.onChange([], "", [], undefined);
|
|
48590
|
+
}
|
|
48591
|
+
else {
|
|
48592
|
+
var newSelectedRowKeys = data.map(function (_a) {
|
|
48593
|
+
var key = _a.key;
|
|
48594
|
+
return key;
|
|
48595
|
+
});
|
|
48596
|
+
setSelectedRowKeys(newSelectedRowKeys);
|
|
48597
|
+
rowSelection.onChange(newSelectedRowKeys, "", data, undefined);
|
|
48598
|
+
}
|
|
48599
|
+
};
|
|
48600
|
+
return (jsxRuntime.jsxs(Container$1, { children: [jsxRuntime.jsx(TableHead, { children: jsxRuntime.jsxs(TableRow, { children: [rowSelection && (jsxRuntime.jsx("th", __assign$2({ style: {
|
|
48601
|
+
width: 55,
|
|
48602
|
+
display: "flex",
|
|
48603
|
+
justifyContent: "center",
|
|
48604
|
+
marginTop: 10,
|
|
48605
|
+
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48449
48606
|
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48450
48607
|
return (jsxRuntime.jsx(ColumnTitle, { children: jsxRuntime.jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title && (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))), titlePopup && (jsxRuntime.jsx(Popup, __assign$2({ content: titlePopup }, { children: jsxRuntime.jsx(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
|
|
48451
|
-
})] }) }), jsxRuntime.jsx(TableBody, { children: data.length === 0 ? (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsxRuntime.jsx(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) {
|
|
48452
|
-
|
|
48453
|
-
|
|
48454
|
-
|
|
48455
|
-
|
|
48456
|
-
})] }, "row-".concat(rowIndex)));
|
|
48457
|
-
})) })] }));
|
|
48608
|
+
})] }) }), jsxRuntime.jsx(TableBody, { children: data.length === 0 ? (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsxRuntime.jsx(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) { return (jsxRuntime.jsxs(TableRow, { children: [rowSelection && (jsxRuntime.jsx(TableCell, { children: jsxRuntime.jsx(Checkbox, { id: rowIndex.toString(), name: rowIndex.toString(), value: row.key, checked: selectedRowKeys.includes(row.key), onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|
|
48609
|
+
var dataIndex = _a.dataIndex, render = _a.render, align = _a.align;
|
|
48610
|
+
var data = row[dataIndex];
|
|
48611
|
+
return (jsxRuntime.jsx(TableCell, __assign$2({ align: align }, { children: render ? render(data, row) : data }), "col-".concat(colIndex)));
|
|
48612
|
+
})] }, "row-".concat(rowIndex))); })) })] }));
|
|
48458
48613
|
};
|
|
48459
48614
|
|
|
48460
48615
|
var Container = styled__default["default"].div(templateObject_1 || (templateObject_1 = __makeTemplateObject$1(["\n display: flex;\n align-items: stretch;\n\n > div:nth-child(odd) {\n width: 100%;\n min-width: 180px;\n min-height: 180px;\n\n > div {\n padding: 0;\n }\n }\n"], ["\n display: flex;\n align-items: stretch;\n\n > div:nth-child(odd) {\n width: 100%;\n min-width: 180px;\n min-height: 180px;\n\n > div {\n padding: 0;\n }\n }\n"])));
|