@typeolymp/ui-components 1.19.6 → 1.19.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/atoms/Number/index.d.ts +1 -1
- package/build/components/organisms/Chart/index.d.ts +1 -0
- package/build/index.d.ts +3 -3
- package/build/index.es.js +763 -627
- package/build/index.es.js.map +1 -1
- package/build/index.js +790 -654
- 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.es.js
CHANGED
|
@@ -4493,7 +4493,7 @@ function requiredArgs(required, args) {
|
|
|
4493
4493
|
}
|
|
4494
4494
|
}
|
|
4495
4495
|
|
|
4496
|
-
function _typeof$
|
|
4496
|
+
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); }
|
|
4497
4497
|
/**
|
|
4498
4498
|
* @name toDate
|
|
4499
4499
|
* @category Common Helpers
|
|
@@ -4529,7 +4529,7 @@ function toDate(argument) {
|
|
|
4529
4529
|
requiredArgs(1, arguments);
|
|
4530
4530
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4531
4531
|
|
|
4532
|
-
if (argument instanceof Date || _typeof$
|
|
4532
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4533
4533
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4534
4534
|
return new Date(argument.getTime());
|
|
4535
4535
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4800,7 +4800,7 @@ var millisecondsInMinute = 60000;
|
|
|
4800
4800
|
|
|
4801
4801
|
var millisecondsInHour = 3600000;
|
|
4802
4802
|
|
|
4803
|
-
function _typeof$
|
|
4803
|
+
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); }
|
|
4804
4804
|
/**
|
|
4805
4805
|
* @name isDate
|
|
4806
4806
|
* @category Common Helpers
|
|
@@ -4836,7 +4836,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4836
4836
|
|
|
4837
4837
|
function isDate(value) {
|
|
4838
4838
|
requiredArgs(1, arguments);
|
|
4839
|
-
return value instanceof Date || _typeof$
|
|
4839
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4840
4840
|
}
|
|
4841
4841
|
|
|
4842
4842
|
/**
|
|
@@ -8030,7 +8030,7 @@ var Number$1 = function (props) {
|
|
|
8030
8030
|
if (value !== newValue && !!props.onChange)
|
|
8031
8031
|
onChange();
|
|
8032
8032
|
if (!!props.onBlur)
|
|
8033
|
-
props.onBlur();
|
|
8033
|
+
props.onBlur(newValue);
|
|
8034
8034
|
};
|
|
8035
8035
|
var decrease = function () {
|
|
8036
8036
|
var value = parseInt(inputRef.current.value) - 1;
|
|
@@ -13540,15 +13540,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13540
13540
|
|
|
13541
13541
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13542
13542
|
|
|
13543
|
-
function _slicedToArray$
|
|
13544
|
-
return _arrayWithHoles$
|
|
13543
|
+
function _slicedToArray$c(arr, i) {
|
|
13544
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13545
13545
|
}
|
|
13546
13546
|
|
|
13547
|
-
function _arrayWithHoles$
|
|
13547
|
+
function _arrayWithHoles$d(arr) {
|
|
13548
13548
|
if (Array.isArray(arr)) return arr;
|
|
13549
13549
|
}
|
|
13550
13550
|
|
|
13551
|
-
function _iterableToArrayLimit$
|
|
13551
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13552
13552
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13553
13553
|
|
|
13554
13554
|
if (_i == null) return;
|
|
@@ -13578,16 +13578,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13578
13578
|
return _arr;
|
|
13579
13579
|
}
|
|
13580
13580
|
|
|
13581
|
-
function _unsupportedIterableToArray$
|
|
13581
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13582
13582
|
if (!o) return;
|
|
13583
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13583
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13584
13584
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13585
13585
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13586
13586
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13587
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13587
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13588
13588
|
}
|
|
13589
13589
|
|
|
13590
|
-
function _arrayLikeToArray$
|
|
13590
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13591
13591
|
if (len == null || len > arr.length) len = arr.length;
|
|
13592
13592
|
|
|
13593
13593
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13595,7 +13595,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13595
13595
|
return arr2;
|
|
13596
13596
|
}
|
|
13597
13597
|
|
|
13598
|
-
function _nonIterableRest$
|
|
13598
|
+
function _nonIterableRest$d() {
|
|
13599
13599
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13600
13600
|
}
|
|
13601
13601
|
|
|
@@ -13659,7 +13659,7 @@ reservedProps.forEach(function (name) {
|
|
|
13659
13659
|
// This is a mapping from React prop names to the attribute names.
|
|
13660
13660
|
|
|
13661
13661
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13662
|
-
var _ref2 = _slicedToArray$
|
|
13662
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13663
13663
|
name = _ref2[0],
|
|
13664
13664
|
attributeName = _ref2[1];
|
|
13665
13665
|
|
|
@@ -16059,31 +16059,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16059
16059
|
return true;
|
|
16060
16060
|
};
|
|
16061
16061
|
|
|
16062
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16062
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16063
16063
|
|
|
16064
16064
|
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."); }
|
|
16065
16065
|
|
|
16066
16066
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16067
16067
|
|
|
16068
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16068
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16069
16069
|
|
|
16070
|
-
function ownKeys$
|
|
16070
|
+
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; }
|
|
16071
16071
|
|
|
16072
|
-
function _objectSpread$
|
|
16072
|
+
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; }
|
|
16073
16073
|
|
|
16074
|
-
function _defineProperty$
|
|
16074
|
+
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; }
|
|
16075
16075
|
|
|
16076
|
-
function _slicedToArray$
|
|
16076
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16077
16077
|
|
|
16078
|
-
function _nonIterableRest$
|
|
16078
|
+
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."); }
|
|
16079
16079
|
|
|
16080
|
-
function _unsupportedIterableToArray$
|
|
16080
|
+
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); }
|
|
16081
16081
|
|
|
16082
|
-
function _arrayLikeToArray$
|
|
16082
|
+
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; }
|
|
16083
16083
|
|
|
16084
|
-
function _iterableToArrayLimit$
|
|
16084
|
+
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; }
|
|
16085
16085
|
|
|
16086
|
-
function _arrayWithHoles$
|
|
16086
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16087
16087
|
|
|
16088
16088
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16089
16089
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16163,11 +16163,11 @@ function allFilesAccepted(_ref) {
|
|
|
16163
16163
|
|
|
16164
16164
|
return files.every(function (file) {
|
|
16165
16165
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16166
|
-
_fileAccepted2 = _slicedToArray$
|
|
16166
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16167
16167
|
accepted = _fileAccepted2[0];
|
|
16168
16168
|
|
|
16169
16169
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16170
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16170
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16171
16171
|
sizeMatch = _fileMatchSize2[0];
|
|
16172
16172
|
|
|
16173
16173
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16264,7 +16264,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16264
16264
|
function pickerOptionsFromAccept(accept) {
|
|
16265
16265
|
if (isDefined(accept)) {
|
|
16266
16266
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16267
|
-
var _ref3 = _slicedToArray$
|
|
16267
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16268
16268
|
mimeType = _ref3[0],
|
|
16269
16269
|
ext = _ref3[1];
|
|
16270
16270
|
|
|
@@ -16282,11 +16282,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16282
16282
|
|
|
16283
16283
|
return ok;
|
|
16284
16284
|
}).reduce(function (agg, _ref4) {
|
|
16285
|
-
var _ref5 = _slicedToArray$
|
|
16285
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16286
16286
|
mimeType = _ref5[0],
|
|
16287
16287
|
ext = _ref5[1];
|
|
16288
16288
|
|
|
16289
|
-
return _objectSpread$
|
|
16289
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16290
16290
|
}, {});
|
|
16291
16291
|
return [{
|
|
16292
16292
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16306,7 +16306,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16306
16306
|
function acceptPropAsAcceptAttr(accept) {
|
|
16307
16307
|
if (isDefined(accept)) {
|
|
16308
16308
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16309
|
-
var _ref7 = _slicedToArray$
|
|
16309
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16310
16310
|
mimeType = _ref7[0],
|
|
16311
16311
|
ext = _ref7[1];
|
|
16312
16312
|
|
|
@@ -16374,40 +16374,40 @@ function isExt(v) {
|
|
|
16374
16374
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16375
16375
|
*/
|
|
16376
16376
|
|
|
16377
|
-
var _excluded$
|
|
16378
|
-
_excluded2$
|
|
16377
|
+
var _excluded$g = ["children"],
|
|
16378
|
+
_excluded2$5 = ["open"],
|
|
16379
16379
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16380
16380
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16381
16381
|
|
|
16382
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16382
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16383
16383
|
|
|
16384
16384
|
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."); }
|
|
16385
16385
|
|
|
16386
16386
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16387
16387
|
|
|
16388
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16388
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16389
16389
|
|
|
16390
|
-
function _slicedToArray$
|
|
16390
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16391
16391
|
|
|
16392
|
-
function _nonIterableRest$
|
|
16392
|
+
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."); }
|
|
16393
16393
|
|
|
16394
|
-
function _unsupportedIterableToArray$
|
|
16394
|
+
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); }
|
|
16395
16395
|
|
|
16396
|
-
function _arrayLikeToArray$
|
|
16396
|
+
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; }
|
|
16397
16397
|
|
|
16398
|
-
function _iterableToArrayLimit$
|
|
16398
|
+
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; }
|
|
16399
16399
|
|
|
16400
|
-
function _arrayWithHoles$
|
|
16400
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16401
16401
|
|
|
16402
|
-
function ownKeys$
|
|
16402
|
+
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; }
|
|
16403
16403
|
|
|
16404
|
-
function _objectSpread$
|
|
16404
|
+
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; }
|
|
16405
16405
|
|
|
16406
|
-
function _defineProperty$
|
|
16406
|
+
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; }
|
|
16407
16407
|
|
|
16408
|
-
function _objectWithoutProperties$
|
|
16408
|
+
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; }
|
|
16409
16409
|
|
|
16410
|
-
function _objectWithoutPropertiesLoose$
|
|
16410
|
+
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; }
|
|
16411
16411
|
/**
|
|
16412
16412
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16413
16413
|
*
|
|
@@ -16425,11 +16425,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16425
16425
|
|
|
16426
16426
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16427
16427
|
var children = _ref.children,
|
|
16428
|
-
params = _objectWithoutProperties$
|
|
16428
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16429
16429
|
|
|
16430
16430
|
var _useDropzone = useDropzone(params),
|
|
16431
16431
|
open = _useDropzone.open,
|
|
16432
|
-
props = _objectWithoutProperties$
|
|
16432
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16433
16433
|
|
|
16434
16434
|
useImperativeHandle(ref, function () {
|
|
16435
16435
|
return {
|
|
@@ -16437,13 +16437,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16437
16437
|
};
|
|
16438
16438
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16439
16439
|
|
|
16440
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16440
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16441
16441
|
open: open
|
|
16442
16442
|
})));
|
|
16443
16443
|
});
|
|
16444
16444
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16445
16445
|
|
|
16446
|
-
var defaultProps$
|
|
16446
|
+
var defaultProps$2 = {
|
|
16447
16447
|
disabled: false,
|
|
16448
16448
|
getFilesFromEvent: fromEvent,
|
|
16449
16449
|
maxSize: Infinity,
|
|
@@ -16459,7 +16459,7 @@ var defaultProps$1 = {
|
|
|
16459
16459
|
useFsAccessApi: true,
|
|
16460
16460
|
autoFocus: false
|
|
16461
16461
|
};
|
|
16462
|
-
Dropzone.defaultProps = defaultProps$
|
|
16462
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16463
16463
|
Dropzone.propTypes = {
|
|
16464
16464
|
/**
|
|
16465
16465
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16810,7 +16810,7 @@ var initialState = {
|
|
|
16810
16810
|
function useDropzone() {
|
|
16811
16811
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16812
16812
|
|
|
16813
|
-
var _defaultProps$props = _objectSpread$
|
|
16813
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16814
16814
|
accept = _defaultProps$props.accept,
|
|
16815
16815
|
disabled = _defaultProps$props.disabled,
|
|
16816
16816
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16857,7 +16857,7 @@ function useDropzone() {
|
|
|
16857
16857
|
var inputRef = useRef(null);
|
|
16858
16858
|
|
|
16859
16859
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16860
|
-
_useReducer2 = _slicedToArray$
|
|
16860
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
16861
16861
|
state = _useReducer2[0],
|
|
16862
16862
|
dispatch = _useReducer2[1];
|
|
16863
16863
|
|
|
@@ -17027,12 +17027,12 @@ function useDropzone() {
|
|
|
17027
17027
|
var fileRejections = [];
|
|
17028
17028
|
files.forEach(function (file) {
|
|
17029
17029
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17030
|
-
_fileAccepted2 = _slicedToArray$
|
|
17030
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17031
17031
|
accepted = _fileAccepted2[0],
|
|
17032
17032
|
acceptError = _fileAccepted2[1];
|
|
17033
17033
|
|
|
17034
17034
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17035
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17035
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17036
17036
|
sizeMatch = _fileMatchSize2[0],
|
|
17037
17037
|
sizeError = _fileMatchSize2[1];
|
|
17038
17038
|
|
|
@@ -17233,9 +17233,9 @@ function useDropzone() {
|
|
|
17233
17233
|
onDragOver = _ref2.onDragOver,
|
|
17234
17234
|
onDragLeave = _ref2.onDragLeave,
|
|
17235
17235
|
onDrop = _ref2.onDrop,
|
|
17236
|
-
rest = _objectWithoutProperties$
|
|
17236
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17237
17237
|
|
|
17238
|
-
return _objectSpread$
|
|
17238
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17239
17239
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17240
17240
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17241
17241
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17260,9 +17260,9 @@ function useDropzone() {
|
|
|
17260
17260
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17261
17261
|
onChange = _ref3.onChange,
|
|
17262
17262
|
onClick = _ref3.onClick,
|
|
17263
|
-
rest = _objectWithoutProperties$
|
|
17263
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17264
17264
|
|
|
17265
|
-
var inputProps = _defineProperty$
|
|
17265
|
+
var inputProps = _defineProperty$v({
|
|
17266
17266
|
accept: acceptAttr,
|
|
17267
17267
|
multiple: multiple,
|
|
17268
17268
|
type: "file",
|
|
@@ -17274,10 +17274,10 @@ function useDropzone() {
|
|
|
17274
17274
|
tabIndex: -1
|
|
17275
17275
|
}, refKey, inputRef);
|
|
17276
17276
|
|
|
17277
|
-
return _objectSpread$
|
|
17277
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17278
17278
|
};
|
|
17279
17279
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17280
|
-
return _objectSpread$
|
|
17280
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17281
17281
|
isFocused: isFocused && !disabled,
|
|
17282
17282
|
getRootProps: getRootProps,
|
|
17283
17283
|
getInputProps: getInputProps,
|
|
@@ -17296,40 +17296,40 @@ function reducer$1(state, action) {
|
|
|
17296
17296
|
/* istanbul ignore next */
|
|
17297
17297
|
switch (action.type) {
|
|
17298
17298
|
case "focus":
|
|
17299
|
-
return _objectSpread$
|
|
17299
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17300
17300
|
isFocused: true
|
|
17301
17301
|
});
|
|
17302
17302
|
|
|
17303
17303
|
case "blur":
|
|
17304
|
-
return _objectSpread$
|
|
17304
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17305
17305
|
isFocused: false
|
|
17306
17306
|
});
|
|
17307
17307
|
|
|
17308
17308
|
case "openDialog":
|
|
17309
|
-
return _objectSpread$
|
|
17309
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17310
17310
|
isFileDialogActive: true
|
|
17311
17311
|
});
|
|
17312
17312
|
|
|
17313
17313
|
case "closeDialog":
|
|
17314
|
-
return _objectSpread$
|
|
17314
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17315
17315
|
isFileDialogActive: false
|
|
17316
17316
|
});
|
|
17317
17317
|
|
|
17318
17318
|
case "setDraggedFiles":
|
|
17319
|
-
return _objectSpread$
|
|
17319
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17320
17320
|
isDragActive: action.isDragActive,
|
|
17321
17321
|
isDragAccept: action.isDragAccept,
|
|
17322
17322
|
isDragReject: action.isDragReject
|
|
17323
17323
|
});
|
|
17324
17324
|
|
|
17325
17325
|
case "setFiles":
|
|
17326
|
-
return _objectSpread$
|
|
17326
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17327
17327
|
acceptedFiles: action.acceptedFiles,
|
|
17328
17328
|
fileRejections: action.fileRejections
|
|
17329
17329
|
});
|
|
17330
17330
|
|
|
17331
17331
|
case "reset":
|
|
17332
|
-
return _objectSpread$
|
|
17332
|
+
return _objectSpread$t({}, initialState);
|
|
17333
17333
|
|
|
17334
17334
|
default:
|
|
17335
17335
|
return state;
|
|
@@ -19555,7 +19555,7 @@ function shallowEqual(a, b) {
|
|
|
19555
19555
|
return true;
|
|
19556
19556
|
}
|
|
19557
19557
|
|
|
19558
|
-
function _typeof$
|
|
19558
|
+
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); }
|
|
19559
19559
|
|
|
19560
19560
|
//
|
|
19561
19561
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19582,7 +19582,9 @@ var FilteredElementKeyMap = {
|
|
|
19582
19582
|
};
|
|
19583
19583
|
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'];
|
|
19584
19584
|
|
|
19585
|
-
|
|
19585
|
+
/** The type of easing function to use for animations */
|
|
19586
|
+
|
|
19587
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19586
19588
|
|
|
19587
19589
|
/** the offset of a chart, which define the blank space all around */
|
|
19588
19590
|
|
|
@@ -19618,7 +19620,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19618
19620
|
};
|
|
19619
19621
|
};
|
|
19620
19622
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19621
|
-
if (!isObject_1(props) || _typeof$
|
|
19623
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19622
19624
|
return null;
|
|
19623
19625
|
}
|
|
19624
19626
|
var out = null;
|
|
@@ -19632,11 +19634,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19632
19634
|
return out;
|
|
19633
19635
|
};
|
|
19634
19636
|
|
|
19635
|
-
var _excluded$
|
|
19636
|
-
_excluded2$
|
|
19637
|
-
function _objectWithoutProperties$
|
|
19638
|
-
function _objectWithoutPropertiesLoose$
|
|
19639
|
-
function _typeof$
|
|
19637
|
+
var _excluded$f = ["children"],
|
|
19638
|
+
_excluded2$4 = ["children"];
|
|
19639
|
+
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; }
|
|
19640
|
+
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; }
|
|
19641
|
+
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); }
|
|
19640
19642
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19641
19643
|
click: 'onClick',
|
|
19642
19644
|
mousedown: 'onMouseDown',
|
|
@@ -19743,7 +19745,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19743
19745
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19744
19746
|
};
|
|
19745
19747
|
var isDotProps = function isDotProps(dot) {
|
|
19746
|
-
return dot && _typeof$
|
|
19748
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19747
19749
|
};
|
|
19748
19750
|
|
|
19749
19751
|
/**
|
|
@@ -19835,10 +19837,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19835
19837
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19836
19838
|
var _ref = nextChild.props || {},
|
|
19837
19839
|
nextChildren = _ref.children,
|
|
19838
|
-
nextProps = _objectWithoutProperties$
|
|
19840
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
19839
19841
|
var _ref2 = prevChild.props || {},
|
|
19840
19842
|
prevChildren = _ref2.children,
|
|
19841
|
-
prevProps = _objectWithoutProperties$
|
|
19843
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
19842
19844
|
if (nextChildren && prevChildren) {
|
|
19843
19845
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19844
19846
|
}
|
|
@@ -19880,10 +19882,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19880
19882
|
return toArray(children).indexOf(child);
|
|
19881
19883
|
};
|
|
19882
19884
|
|
|
19883
|
-
var _excluded$
|
|
19885
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19884
19886
|
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); }
|
|
19885
|
-
function _objectWithoutProperties$
|
|
19886
|
-
function _objectWithoutPropertiesLoose$
|
|
19887
|
+
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; }
|
|
19888
|
+
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; }
|
|
19887
19889
|
function Surface(props) {
|
|
19888
19890
|
var children = props.children,
|
|
19889
19891
|
width = props.width,
|
|
@@ -19891,7 +19893,7 @@ function Surface(props) {
|
|
|
19891
19893
|
viewBox = props.viewBox,
|
|
19892
19894
|
className = props.className,
|
|
19893
19895
|
style = props.style,
|
|
19894
|
-
others = _objectWithoutProperties$
|
|
19896
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
19895
19897
|
var svgView = viewBox || {
|
|
19896
19898
|
width: width,
|
|
19897
19899
|
height: height,
|
|
@@ -19908,14 +19910,14 @@ function Surface(props) {
|
|
|
19908
19910
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19909
19911
|
}
|
|
19910
19912
|
|
|
19911
|
-
var _excluded$
|
|
19913
|
+
var _excluded$d = ["children", "className"];
|
|
19912
19914
|
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); }
|
|
19913
|
-
function _objectWithoutProperties$
|
|
19914
|
-
function _objectWithoutPropertiesLoose$
|
|
19915
|
+
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; }
|
|
19916
|
+
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; }
|
|
19915
19917
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19916
19918
|
var children = props.children,
|
|
19917
19919
|
className = props.className,
|
|
19918
|
-
others = _objectWithoutProperties$
|
|
19920
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
19919
19921
|
var layerClass = classNames('recharts-layer', className);
|
|
19920
19922
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19921
19923
|
className: layerClass
|
|
@@ -23330,7 +23332,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23330
23332
|
stackOffsetNone(series, order);
|
|
23331
23333
|
}
|
|
23332
23334
|
|
|
23335
|
+
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); }
|
|
23336
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23333
23337
|
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); }
|
|
23338
|
+
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; }
|
|
23339
|
+
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; }
|
|
23340
|
+
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; }
|
|
23341
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23342
|
+
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); }
|
|
23343
|
+
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; }
|
|
23344
|
+
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; }
|
|
23334
23345
|
var symbolFactories = {
|
|
23335
23346
|
symbolCircle: symbolCircle,
|
|
23336
23347
|
symbolCross: symbolCross,
|
|
@@ -23369,31 +23380,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23369
23380
|
return Math.PI * size * size / 4;
|
|
23370
23381
|
}
|
|
23371
23382
|
};
|
|
23372
|
-
var symbolsDefaultProps = {
|
|
23373
|
-
type: 'circle',
|
|
23374
|
-
size: 64,
|
|
23375
|
-
sizeType: 'area'
|
|
23376
|
-
};
|
|
23377
23383
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23378
23384
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23379
23385
|
};
|
|
23380
|
-
var Symbols = function Symbols(
|
|
23386
|
+
var Symbols = function Symbols(_ref) {
|
|
23387
|
+
var _ref$type = _ref.type,
|
|
23388
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23389
|
+
_ref$size = _ref.size,
|
|
23390
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23391
|
+
_ref$sizeType = _ref.sizeType,
|
|
23392
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23393
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23394
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23395
|
+
type: type,
|
|
23396
|
+
size: size,
|
|
23397
|
+
sizeType: sizeType
|
|
23398
|
+
});
|
|
23399
|
+
|
|
23381
23400
|
/**
|
|
23382
23401
|
* Calculate the path of curve
|
|
23383
23402
|
* @return {String} path
|
|
23384
23403
|
*/
|
|
23385
23404
|
var getPath = function getPath() {
|
|
23386
|
-
var size = props.size,
|
|
23387
|
-
sizeType = props.sizeType,
|
|
23388
|
-
type = props.type;
|
|
23389
23405
|
var symbolFactory = getSymbolFactory(type);
|
|
23390
23406
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23391
23407
|
return symbol();
|
|
23392
23408
|
};
|
|
23393
23409
|
var className = props.className,
|
|
23394
23410
|
cx = props.cx,
|
|
23395
|
-
cy = props.cy
|
|
23396
|
-
size = props.size;
|
|
23411
|
+
cy = props.cy;
|
|
23397
23412
|
var filteredProps = filterProps(props, true);
|
|
23398
23413
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23399
23414
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23404,35 +23419,34 @@ var Symbols = function Symbols(props) {
|
|
|
23404
23419
|
}
|
|
23405
23420
|
return null;
|
|
23406
23421
|
};
|
|
23407
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23408
23422
|
Symbols.registerSymbol = registerSymbol;
|
|
23409
23423
|
|
|
23410
|
-
function _typeof$
|
|
23424
|
+
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); }
|
|
23411
23425
|
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); }
|
|
23412
|
-
function ownKeys$
|
|
23413
|
-
function _objectSpread$
|
|
23414
|
-
function _classCallCheck$
|
|
23415
|
-
function _defineProperties$
|
|
23416
|
-
function _createClass$
|
|
23417
|
-
function _inherits$
|
|
23418
|
-
function _setPrototypeOf$
|
|
23419
|
-
function _createSuper$
|
|
23420
|
-
function _possibleConstructorReturn$
|
|
23421
|
-
function _assertThisInitialized$
|
|
23422
|
-
function _isNativeReflectConstruct$
|
|
23423
|
-
function _getPrototypeOf$
|
|
23424
|
-
function _defineProperty$
|
|
23425
|
-
function _toPropertyKey$
|
|
23426
|
-
function _toPrimitive$
|
|
23426
|
+
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; }
|
|
23427
|
+
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; }
|
|
23428
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23429
|
+
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); } }
|
|
23430
|
+
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; }
|
|
23431
|
+
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); }
|
|
23432
|
+
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); }
|
|
23433
|
+
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); }; }
|
|
23434
|
+
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); }
|
|
23435
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23436
|
+
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; } }
|
|
23437
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23438
|
+
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; }
|
|
23439
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23440
|
+
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); }
|
|
23427
23441
|
var SIZE = 32;
|
|
23428
23442
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23429
|
-
_inherits$
|
|
23430
|
-
var _super = _createSuper$
|
|
23443
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23444
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23431
23445
|
function DefaultLegendContent() {
|
|
23432
|
-
_classCallCheck$
|
|
23446
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23433
23447
|
return _super.apply(this, arguments);
|
|
23434
23448
|
}
|
|
23435
|
-
_createClass$
|
|
23449
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23436
23450
|
key: "renderIcon",
|
|
23437
23451
|
value:
|
|
23438
23452
|
/**
|
|
@@ -23477,7 +23491,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23477
23491
|
});
|
|
23478
23492
|
}
|
|
23479
23493
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23480
|
-
var iconProps = _objectSpread$
|
|
23494
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23481
23495
|
delete iconProps.legendIcon;
|
|
23482
23496
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23483
23497
|
}
|
|
@@ -23525,7 +23539,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23525
23539
|
var finalFormatter = entry.formatter || formatter;
|
|
23526
23540
|
var className = classNames((_classNames = {
|
|
23527
23541
|
'recharts-legend-item': true
|
|
23528
|
-
}, _defineProperty$
|
|
23542
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23529
23543
|
if (entry.type === 'none') {
|
|
23530
23544
|
return null;
|
|
23531
23545
|
}
|
|
@@ -23570,8 +23584,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23570
23584
|
}]);
|
|
23571
23585
|
return DefaultLegendContent;
|
|
23572
23586
|
}(PureComponent);
|
|
23573
|
-
_defineProperty$
|
|
23574
|
-
_defineProperty$
|
|
23587
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23588
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23575
23589
|
iconSize: 14,
|
|
23576
23590
|
layout: 'horizontal',
|
|
23577
23591
|
align: 'center',
|
|
@@ -23579,25 +23593,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23579
23593
|
inactiveColor: '#ccc'
|
|
23580
23594
|
});
|
|
23581
23595
|
|
|
23582
|
-
function _typeof$
|
|
23583
|
-
var _excluded$
|
|
23584
|
-
function ownKeys$
|
|
23585
|
-
function _objectSpread$
|
|
23586
|
-
function _classCallCheck$
|
|
23587
|
-
function _defineProperties$
|
|
23588
|
-
function _createClass$
|
|
23589
|
-
function _inherits$
|
|
23590
|
-
function _setPrototypeOf$
|
|
23591
|
-
function _createSuper$
|
|
23592
|
-
function _possibleConstructorReturn$
|
|
23593
|
-
function _assertThisInitialized$
|
|
23594
|
-
function _isNativeReflectConstruct$
|
|
23595
|
-
function _getPrototypeOf$
|
|
23596
|
-
function _defineProperty$
|
|
23597
|
-
function _toPropertyKey$
|
|
23598
|
-
function _toPrimitive$
|
|
23599
|
-
function _objectWithoutProperties$
|
|
23600
|
-
function _objectWithoutPropertiesLoose$
|
|
23596
|
+
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); }
|
|
23597
|
+
var _excluded$b = ["ref"];
|
|
23598
|
+
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; }
|
|
23599
|
+
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; }
|
|
23600
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23601
|
+
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); } }
|
|
23602
|
+
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; }
|
|
23603
|
+
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); }
|
|
23604
|
+
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); }
|
|
23605
|
+
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); }; }
|
|
23606
|
+
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); }
|
|
23607
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23608
|
+
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; } }
|
|
23609
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23610
|
+
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; }
|
|
23611
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23612
|
+
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); }
|
|
23613
|
+
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; }
|
|
23614
|
+
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; }
|
|
23601
23615
|
function defaultUniqBy$1(entry) {
|
|
23602
23616
|
return entry.value;
|
|
23603
23617
|
}
|
|
@@ -23618,27 +23632,27 @@ function renderContent$1(content, props) {
|
|
|
23618
23632
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23619
23633
|
}
|
|
23620
23634
|
props.ref;
|
|
23621
|
-
var otherProps = _objectWithoutProperties$
|
|
23635
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23622
23636
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23623
23637
|
}
|
|
23624
23638
|
var EPS$2 = 1;
|
|
23625
23639
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23626
|
-
_inherits$
|
|
23627
|
-
var _super = _createSuper$
|
|
23640
|
+
_inherits$8(Legend, _PureComponent);
|
|
23641
|
+
var _super = _createSuper$8(Legend);
|
|
23628
23642
|
function Legend() {
|
|
23629
23643
|
var _this;
|
|
23630
|
-
_classCallCheck$
|
|
23644
|
+
_classCallCheck$a(this, Legend);
|
|
23631
23645
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23632
23646
|
args[_key] = arguments[_key];
|
|
23633
23647
|
}
|
|
23634
23648
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23635
|
-
_defineProperty$
|
|
23649
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23636
23650
|
boxWidth: -1,
|
|
23637
23651
|
boxHeight: -1
|
|
23638
23652
|
});
|
|
23639
23653
|
return _this;
|
|
23640
23654
|
}
|
|
23641
|
-
_createClass$
|
|
23655
|
+
_createClass$a(Legend, [{
|
|
23642
23656
|
key: "componentDidMount",
|
|
23643
23657
|
value: function componentDidMount() {
|
|
23644
23658
|
this.updateBBox();
|
|
@@ -23713,7 +23727,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23713
23727
|
};
|
|
23714
23728
|
}
|
|
23715
23729
|
}
|
|
23716
|
-
return _objectSpread$
|
|
23730
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23717
23731
|
}
|
|
23718
23732
|
}, {
|
|
23719
23733
|
key: "updateBBox",
|
|
@@ -23756,7 +23770,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23756
23770
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23757
23771
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23758
23772
|
payload = _this$props2.payload;
|
|
23759
|
-
var outerStyle = _objectSpread$
|
|
23773
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23760
23774
|
position: 'absolute',
|
|
23761
23775
|
width: width || 'auto',
|
|
23762
23776
|
height: height || 'auto'
|
|
@@ -23767,7 +23781,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23767
23781
|
ref: function ref(node) {
|
|
23768
23782
|
_this2.wrapperNode = node;
|
|
23769
23783
|
}
|
|
23770
|
-
}, renderContent$1(content, _objectSpread$
|
|
23784
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23771
23785
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23772
23786
|
})));
|
|
23773
23787
|
}
|
|
@@ -23790,8 +23804,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23790
23804
|
}]);
|
|
23791
23805
|
return Legend;
|
|
23792
23806
|
}(PureComponent);
|
|
23793
|
-
_defineProperty$
|
|
23794
|
-
_defineProperty$
|
|
23807
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23808
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23795
23809
|
iconSize: 14,
|
|
23796
23810
|
layout: 'horizontal',
|
|
23797
23811
|
align: 'center',
|
|
@@ -24355,13 +24369,13 @@ function setRafTimeout(callback) {
|
|
|
24355
24369
|
requestAnimationFrame(shouldUpdate);
|
|
24356
24370
|
}
|
|
24357
24371
|
|
|
24358
|
-
function _typeof$
|
|
24359
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24360
|
-
function _nonIterableRest$
|
|
24361
|
-
function _unsupportedIterableToArray$
|
|
24362
|
-
function _arrayLikeToArray$
|
|
24372
|
+
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); }
|
|
24373
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24374
|
+
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."); }
|
|
24375
|
+
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); }
|
|
24376
|
+
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; }
|
|
24363
24377
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24364
|
-
function _arrayWithHoles$
|
|
24378
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24365
24379
|
function createAnimateManager() {
|
|
24366
24380
|
var currStyle = {};
|
|
24367
24381
|
var handleChange = function handleChange() {
|
|
@@ -24388,7 +24402,7 @@ function createAnimateManager() {
|
|
|
24388
24402
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24389
24403
|
return;
|
|
24390
24404
|
}
|
|
24391
|
-
if (_typeof$
|
|
24405
|
+
if (_typeof$r(_style) === 'object') {
|
|
24392
24406
|
currStyle = _style;
|
|
24393
24407
|
handleChange(currStyle);
|
|
24394
24408
|
}
|
|
@@ -24415,12 +24429,12 @@ function createAnimateManager() {
|
|
|
24415
24429
|
};
|
|
24416
24430
|
}
|
|
24417
24431
|
|
|
24418
|
-
function _typeof$
|
|
24419
|
-
function ownKeys$
|
|
24420
|
-
function _objectSpread$
|
|
24421
|
-
function _defineProperty$
|
|
24422
|
-
function _toPropertyKey$
|
|
24423
|
-
function _toPrimitive$
|
|
24432
|
+
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); }
|
|
24433
|
+
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; }
|
|
24434
|
+
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; }
|
|
24435
|
+
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; }
|
|
24436
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24437
|
+
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); }
|
|
24424
24438
|
/* eslint no-console: 0 */
|
|
24425
24439
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24426
24440
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24452,7 +24466,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24452
24466
|
*/
|
|
24453
24467
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24454
24468
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24455
|
-
return _defineProperty$
|
|
24469
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24456
24470
|
}
|
|
24457
24471
|
var isTransition = name === 'transition';
|
|
24458
24472
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24463,7 +24477,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24463
24477
|
if (isTransition) {
|
|
24464
24478
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24465
24479
|
}
|
|
24466
|
-
return _objectSpread$
|
|
24480
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24467
24481
|
}, {});
|
|
24468
24482
|
};
|
|
24469
24483
|
|
|
@@ -24473,7 +24487,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24473
24487
|
*/
|
|
24474
24488
|
var mapObject = function mapObject(fn, obj) {
|
|
24475
24489
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24476
|
-
return _objectSpread$
|
|
24490
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24477
24491
|
}, {});
|
|
24478
24492
|
};
|
|
24479
24493
|
|
|
@@ -24483,7 +24497,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24483
24497
|
*/
|
|
24484
24498
|
var translateStyle = function translateStyle(style) {
|
|
24485
24499
|
return Object.keys(style).reduce(function (res, key) {
|
|
24486
|
-
return _objectSpread$
|
|
24500
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24487
24501
|
}, style);
|
|
24488
24502
|
};
|
|
24489
24503
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24511,16 +24525,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24511
24525
|
}
|
|
24512
24526
|
};
|
|
24513
24527
|
|
|
24514
|
-
function _slicedToArray$
|
|
24515
|
-
function _nonIterableRest$
|
|
24516
|
-
function _iterableToArrayLimit$
|
|
24517
|
-
function _arrayWithHoles$
|
|
24518
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24528
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24529
|
+
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."); }
|
|
24530
|
+
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; } }
|
|
24531
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24532
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24519
24533
|
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."); }
|
|
24520
|
-
function _unsupportedIterableToArray$
|
|
24534
|
+
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); }
|
|
24521
24535
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24522
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24523
|
-
function _arrayLikeToArray$
|
|
24536
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24537
|
+
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; }
|
|
24524
24538
|
var ACCURACY = 1e-4;
|
|
24525
24539
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24526
24540
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24596,7 +24610,7 @@ var configBezier = function configBezier() {
|
|
|
24596
24610
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24597
24611
|
return parseFloat(x);
|
|
24598
24612
|
});
|
|
24599
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24613
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24600
24614
|
x1 = _easing$1$split$0$spl2[0];
|
|
24601
24615
|
y1 = _easing$1$split$0$spl2[1];
|
|
24602
24616
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24689,22 +24703,22 @@ var configEasing = function configEasing() {
|
|
|
24689
24703
|
return null;
|
|
24690
24704
|
};
|
|
24691
24705
|
|
|
24692
|
-
function _typeof$
|
|
24693
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24706
|
+
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); }
|
|
24707
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24694
24708
|
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."); }
|
|
24695
24709
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24696
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24697
|
-
function ownKeys$
|
|
24698
|
-
function _objectSpread$
|
|
24699
|
-
function _defineProperty$
|
|
24700
|
-
function _toPropertyKey$
|
|
24701
|
-
function _toPrimitive$
|
|
24702
|
-
function _slicedToArray$
|
|
24703
|
-
function _nonIterableRest$
|
|
24704
|
-
function _unsupportedIterableToArray$
|
|
24705
|
-
function _arrayLikeToArray$
|
|
24706
|
-
function _iterableToArrayLimit$
|
|
24707
|
-
function _arrayWithHoles$
|
|
24710
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24711
|
+
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; }
|
|
24712
|
+
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; }
|
|
24713
|
+
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; }
|
|
24714
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24715
|
+
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); }
|
|
24716
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24717
|
+
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."); }
|
|
24718
|
+
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); }
|
|
24719
|
+
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; }
|
|
24720
|
+
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; } }
|
|
24721
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24708
24722
|
var alpha = function alpha(begin, end, k) {
|
|
24709
24723
|
return begin + (end - begin) * k;
|
|
24710
24724
|
};
|
|
@@ -24722,10 +24736,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24722
24736
|
var nextStepVals = mapObject(function (key, val) {
|
|
24723
24737
|
if (needContinue(val)) {
|
|
24724
24738
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24725
|
-
_easing2 = _slicedToArray$
|
|
24739
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24726
24740
|
newX = _easing2[0],
|
|
24727
24741
|
newV = _easing2[1];
|
|
24728
|
-
return _objectSpread$
|
|
24742
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24729
24743
|
from: newX,
|
|
24730
24744
|
velocity: newV
|
|
24731
24745
|
});
|
|
@@ -24735,7 +24749,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24735
24749
|
if (steps < 1) {
|
|
24736
24750
|
return mapObject(function (key, val) {
|
|
24737
24751
|
if (needContinue(val)) {
|
|
24738
|
-
return _objectSpread$
|
|
24752
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24739
24753
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24740
24754
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24741
24755
|
});
|
|
@@ -24750,10 +24764,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24750
24764
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24751
24765
|
var interKeys = getIntersectionKeys(from, to);
|
|
24752
24766
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24753
|
-
return _objectSpread$
|
|
24767
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24754
24768
|
}, {});
|
|
24755
24769
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24756
|
-
return _objectSpread$
|
|
24770
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24757
24771
|
from: from[key],
|
|
24758
24772
|
velocity: 0,
|
|
24759
24773
|
to: to[key]
|
|
@@ -24783,7 +24797,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24783
24797
|
var steps = deltaTime / easing.dt;
|
|
24784
24798
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24785
24799
|
// get union set and add compatible prefix
|
|
24786
|
-
render(_objectSpread$
|
|
24800
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24787
24801
|
preTime = now;
|
|
24788
24802
|
if (!shouldStopAnimation()) {
|
|
24789
24803
|
cafId = requestAnimationFrame(update);
|
|
@@ -24801,14 +24815,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24801
24815
|
}, timingStyle);
|
|
24802
24816
|
|
|
24803
24817
|
// get union set and add compatible prefix
|
|
24804
|
-
render(_objectSpread$
|
|
24818
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24805
24819
|
if (t < 1) {
|
|
24806
24820
|
cafId = requestAnimationFrame(update);
|
|
24807
24821
|
} else {
|
|
24808
24822
|
var finalStyle = mapObject(function (key, val) {
|
|
24809
24823
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24810
24824
|
}, timingStyle);
|
|
24811
|
-
render(_objectSpread$
|
|
24825
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24812
24826
|
}
|
|
24813
24827
|
};
|
|
24814
24828
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24824,37 +24838,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24824
24838
|
};
|
|
24825
24839
|
});
|
|
24826
24840
|
|
|
24827
|
-
function _typeof$
|
|
24828
|
-
var _excluded$
|
|
24829
|
-
function _objectWithoutProperties$
|
|
24830
|
-
function _objectWithoutPropertiesLoose$
|
|
24831
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24841
|
+
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); }
|
|
24842
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24843
|
+
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; }
|
|
24844
|
+
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; }
|
|
24845
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
24832
24846
|
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."); }
|
|
24833
|
-
function _unsupportedIterableToArray$
|
|
24847
|
+
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); }
|
|
24834
24848
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24835
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24836
|
-
function _arrayLikeToArray$
|
|
24837
|
-
function ownKeys$
|
|
24838
|
-
function _objectSpread$
|
|
24839
|
-
function _defineProperty$
|
|
24840
|
-
function _classCallCheck$
|
|
24841
|
-
function _defineProperties$
|
|
24842
|
-
function _createClass$
|
|
24843
|
-
function _toPropertyKey$
|
|
24844
|
-
function _toPrimitive$
|
|
24845
|
-
function _inherits$
|
|
24846
|
-
function _setPrototypeOf$
|
|
24847
|
-
function _createSuper$
|
|
24848
|
-
function _possibleConstructorReturn$
|
|
24849
|
-
function _assertThisInitialized$
|
|
24850
|
-
function _isNativeReflectConstruct$
|
|
24851
|
-
function _getPrototypeOf$
|
|
24849
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
24850
|
+
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; }
|
|
24851
|
+
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; }
|
|
24852
|
+
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; }
|
|
24853
|
+
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; }
|
|
24854
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24855
|
+
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); } }
|
|
24856
|
+
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; }
|
|
24857
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
24858
|
+
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); }
|
|
24859
|
+
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); }
|
|
24860
|
+
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); }
|
|
24861
|
+
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); }; }
|
|
24862
|
+
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); }
|
|
24863
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24864
|
+
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; } }
|
|
24865
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
24852
24866
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24853
|
-
_inherits$
|
|
24854
|
-
var _super = _createSuper$
|
|
24867
|
+
_inherits$7(Animate, _PureComponent);
|
|
24868
|
+
var _super = _createSuper$7(Animate);
|
|
24855
24869
|
function Animate(props, context) {
|
|
24856
24870
|
var _this;
|
|
24857
|
-
_classCallCheck$
|
|
24871
|
+
_classCallCheck$9(this, Animate);
|
|
24858
24872
|
_this = _super.call(this, props, context);
|
|
24859
24873
|
var _this$props = _this.props,
|
|
24860
24874
|
isActive = _this$props.isActive,
|
|
@@ -24864,8 +24878,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24864
24878
|
steps = _this$props.steps,
|
|
24865
24879
|
children = _this$props.children,
|
|
24866
24880
|
duration = _this$props.duration;
|
|
24867
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24868
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24881
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
24882
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
24869
24883
|
if (!isActive || duration <= 0) {
|
|
24870
24884
|
_this.state = {
|
|
24871
24885
|
style: {}
|
|
@@ -24877,7 +24891,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24877
24891
|
style: to
|
|
24878
24892
|
};
|
|
24879
24893
|
}
|
|
24880
|
-
return _possibleConstructorReturn$
|
|
24894
|
+
return _possibleConstructorReturn$7(_this);
|
|
24881
24895
|
}
|
|
24882
24896
|
if (steps && steps.length) {
|
|
24883
24897
|
_this.state = {
|
|
@@ -24888,10 +24902,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24888
24902
|
_this.state = {
|
|
24889
24903
|
style: from
|
|
24890
24904
|
};
|
|
24891
|
-
return _possibleConstructorReturn$
|
|
24905
|
+
return _possibleConstructorReturn$7(_this);
|
|
24892
24906
|
}
|
|
24893
24907
|
_this.state = {
|
|
24894
|
-
style: attributeName ? _defineProperty$
|
|
24908
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
24895
24909
|
};
|
|
24896
24910
|
} else {
|
|
24897
24911
|
_this.state = {
|
|
@@ -24900,7 +24914,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24900
24914
|
}
|
|
24901
24915
|
return _this;
|
|
24902
24916
|
}
|
|
24903
|
-
_createClass$
|
|
24917
|
+
_createClass$9(Animate, [{
|
|
24904
24918
|
key: "componentDidMount",
|
|
24905
24919
|
value: function componentDidMount() {
|
|
24906
24920
|
var _this$props2 = this.props,
|
|
@@ -24928,7 +24942,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24928
24942
|
}
|
|
24929
24943
|
if (!isActive) {
|
|
24930
24944
|
var newState = {
|
|
24931
|
-
style: attributeName ? _defineProperty$
|
|
24945
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
24932
24946
|
};
|
|
24933
24947
|
if (this.state && style) {
|
|
24934
24948
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24951,14 +24965,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24951
24965
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24952
24966
|
if (this.state && style) {
|
|
24953
24967
|
var _newState = {
|
|
24954
|
-
style: attributeName ? _defineProperty$
|
|
24968
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
24955
24969
|
};
|
|
24956
24970
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24957
24971
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24958
24972
|
this.setState(_newState);
|
|
24959
24973
|
}
|
|
24960
24974
|
}
|
|
24961
|
-
this.runAnimation(_objectSpread$
|
|
24975
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
24962
24976
|
from: from,
|
|
24963
24977
|
begin: 0
|
|
24964
24978
|
}));
|
|
@@ -25041,7 +25055,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25041
25055
|
}), duration]);
|
|
25042
25056
|
}
|
|
25043
25057
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25044
|
-
var newStyle = _objectSpread$
|
|
25058
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25045
25059
|
transition: transition
|
|
25046
25060
|
});
|
|
25047
25061
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25073,9 +25087,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25073
25087
|
this.runStepAnimation(props);
|
|
25074
25088
|
return;
|
|
25075
25089
|
}
|
|
25076
|
-
var to = attributeName ? _defineProperty$
|
|
25090
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25077
25091
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25078
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25092
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25079
25093
|
transition: transition
|
|
25080
25094
|
}), duration, onAnimationEnd]);
|
|
25081
25095
|
}
|
|
@@ -25096,7 +25110,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25096
25110
|
_this$props4.onAnimationEnd;
|
|
25097
25111
|
_this$props4.shouldReAnimate;
|
|
25098
25112
|
_this$props4.onAnimationReStart;
|
|
25099
|
-
var others = _objectWithoutProperties$
|
|
25113
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25100
25114
|
var count = Children.count(children);
|
|
25101
25115
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25102
25116
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25111,8 +25125,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25111
25125
|
_container$props$styl = _container$props.style,
|
|
25112
25126
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25113
25127
|
className = _container$props.className;
|
|
25114
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25115
|
-
style: _objectSpread$
|
|
25128
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25129
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25116
25130
|
className: className
|
|
25117
25131
|
}));
|
|
25118
25132
|
return res;
|
|
@@ -25637,10 +25651,10 @@ var defineProperty$2 = (function() {
|
|
|
25637
25651
|
} catch (e) {}
|
|
25638
25652
|
}());
|
|
25639
25653
|
|
|
25640
|
-
var _defineProperty$
|
|
25654
|
+
var _defineProperty$o = defineProperty$2;
|
|
25641
25655
|
|
|
25642
25656
|
var constant$1 = constant_1,
|
|
25643
|
-
defineProperty$1 = _defineProperty$
|
|
25657
|
+
defineProperty$1 = _defineProperty$o,
|
|
25644
25658
|
identity$7 = identity_1;
|
|
25645
25659
|
|
|
25646
25660
|
/**
|
|
@@ -25817,18 +25831,18 @@ var sortBy_1 = sortBy;
|
|
|
25817
25831
|
/**
|
|
25818
25832
|
* @fileOverview Default Tooltip Content
|
|
25819
25833
|
*/
|
|
25820
|
-
function _typeof$
|
|
25821
|
-
function _slicedToArray$
|
|
25822
|
-
function _nonIterableRest$
|
|
25823
|
-
function _unsupportedIterableToArray$
|
|
25824
|
-
function _arrayLikeToArray$
|
|
25825
|
-
function _iterableToArrayLimit$
|
|
25826
|
-
function _arrayWithHoles$
|
|
25827
|
-
function ownKeys$
|
|
25828
|
-
function _objectSpread$
|
|
25829
|
-
function _defineProperty$
|
|
25830
|
-
function _toPropertyKey$
|
|
25831
|
-
function _toPrimitive$
|
|
25834
|
+
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); }
|
|
25835
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25836
|
+
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."); }
|
|
25837
|
+
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); }
|
|
25838
|
+
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; }
|
|
25839
|
+
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; } }
|
|
25840
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25841
|
+
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; }
|
|
25842
|
+
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; }
|
|
25843
|
+
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; }
|
|
25844
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
25845
|
+
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); }
|
|
25832
25846
|
function defaultFormatter(value) {
|
|
25833
25847
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25834
25848
|
}
|
|
@@ -25858,7 +25872,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25858
25872
|
if (entry.type === 'none') {
|
|
25859
25873
|
return null;
|
|
25860
25874
|
}
|
|
25861
|
-
var finalItemStyle = _objectSpread$
|
|
25875
|
+
var finalItemStyle = _objectSpread$m({
|
|
25862
25876
|
display: 'block',
|
|
25863
25877
|
paddingTop: 4,
|
|
25864
25878
|
paddingBottom: 4,
|
|
@@ -25872,7 +25886,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25872
25886
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25873
25887
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25874
25888
|
if (Array.isArray(formatted)) {
|
|
25875
|
-
var _formatted = _slicedToArray$
|
|
25889
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
25876
25890
|
finalValue = _formatted[0];
|
|
25877
25891
|
finalName = _formatted[1];
|
|
25878
25892
|
} else {
|
|
@@ -25904,14 +25918,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25904
25918
|
}
|
|
25905
25919
|
return null;
|
|
25906
25920
|
};
|
|
25907
|
-
var finalStyle = _objectSpread$
|
|
25921
|
+
var finalStyle = _objectSpread$m({
|
|
25908
25922
|
margin: 0,
|
|
25909
25923
|
padding: 10,
|
|
25910
25924
|
backgroundColor: '#fff',
|
|
25911
25925
|
border: '1px solid #ccc',
|
|
25912
25926
|
whiteSpace: 'nowrap'
|
|
25913
25927
|
}, contentStyle);
|
|
25914
|
-
var finalLabelStyle = _objectSpread$
|
|
25928
|
+
var finalLabelStyle = _objectSpread$m({
|
|
25915
25929
|
margin: 0
|
|
25916
25930
|
}, labelStyle);
|
|
25917
25931
|
var hasLabel = !isNil_1(label);
|
|
@@ -25952,18 +25966,22 @@ var Global = {
|
|
|
25952
25966
|
}
|
|
25953
25967
|
};
|
|
25954
25968
|
|
|
25955
|
-
function _typeof$
|
|
25956
|
-
function ownKeys$
|
|
25957
|
-
function _objectSpread$
|
|
25958
|
-
function
|
|
25959
|
-
function
|
|
25960
|
-
function
|
|
25961
|
-
function
|
|
25962
|
-
function
|
|
25963
|
-
function
|
|
25964
|
-
function
|
|
25965
|
-
function
|
|
25966
|
-
function
|
|
25969
|
+
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); }
|
|
25970
|
+
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; }
|
|
25971
|
+
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; }
|
|
25972
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25973
|
+
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); } }
|
|
25974
|
+
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; }
|
|
25975
|
+
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); }
|
|
25976
|
+
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); }
|
|
25977
|
+
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); }; }
|
|
25978
|
+
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); }
|
|
25979
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25980
|
+
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; } }
|
|
25981
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25982
|
+
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; }
|
|
25983
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25984
|
+
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); }
|
|
25967
25985
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25968
25986
|
var EPS$1 = 1;
|
|
25969
25987
|
function defaultUniqBy(entry) {
|
|
@@ -25987,7 +26005,204 @@ function renderContent(content, props) {
|
|
|
25987
26005
|
}
|
|
25988
26006
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
25989
26007
|
}
|
|
25990
|
-
var
|
|
26008
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
26009
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
26010
|
+
var _super = _createSuper$6(Tooltip);
|
|
26011
|
+
function Tooltip() {
|
|
26012
|
+
var _this;
|
|
26013
|
+
_classCallCheck$8(this, Tooltip);
|
|
26014
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26015
|
+
args[_key] = arguments[_key];
|
|
26016
|
+
}
|
|
26017
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
26018
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26019
|
+
boxWidth: -1,
|
|
26020
|
+
boxHeight: -1,
|
|
26021
|
+
dismissed: false,
|
|
26022
|
+
dismissedAtCoordinate: {
|
|
26023
|
+
x: 0,
|
|
26024
|
+
y: 0
|
|
26025
|
+
}
|
|
26026
|
+
});
|
|
26027
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26028
|
+
if (event.key === 'Escape') {
|
|
26029
|
+
_this.setState({
|
|
26030
|
+
dismissed: true,
|
|
26031
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26032
|
+
x: _this.props.coordinate.x,
|
|
26033
|
+
y: _this.props.coordinate.y
|
|
26034
|
+
})
|
|
26035
|
+
});
|
|
26036
|
+
}
|
|
26037
|
+
});
|
|
26038
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26039
|
+
var key = _ref.key,
|
|
26040
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26041
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26042
|
+
var _this$props = _this.props,
|
|
26043
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26044
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26045
|
+
coordinate = _this$props.coordinate,
|
|
26046
|
+
offset = _this$props.offset,
|
|
26047
|
+
position = _this$props.position,
|
|
26048
|
+
viewBox = _this$props.viewBox;
|
|
26049
|
+
if (position && isNumber(position[key])) {
|
|
26050
|
+
return position[key];
|
|
26051
|
+
}
|
|
26052
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26053
|
+
var positive = coordinate[key] + offset;
|
|
26054
|
+
if (allowEscapeViewBox[key]) {
|
|
26055
|
+
return reverseDirection[key] ? negative : positive;
|
|
26056
|
+
}
|
|
26057
|
+
if (reverseDirection[key]) {
|
|
26058
|
+
var _tooltipBoundary = negative;
|
|
26059
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26060
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26061
|
+
return Math.max(positive, viewBox[key]);
|
|
26062
|
+
}
|
|
26063
|
+
return Math.max(negative, viewBox[key]);
|
|
26064
|
+
}
|
|
26065
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26066
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26067
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26068
|
+
return Math.max(negative, viewBox[key]);
|
|
26069
|
+
}
|
|
26070
|
+
return Math.max(positive, viewBox[key]);
|
|
26071
|
+
});
|
|
26072
|
+
return _this;
|
|
26073
|
+
}
|
|
26074
|
+
_createClass$8(Tooltip, [{
|
|
26075
|
+
key: "componentDidMount",
|
|
26076
|
+
value: function componentDidMount() {
|
|
26077
|
+
this.updateBBox();
|
|
26078
|
+
}
|
|
26079
|
+
}, {
|
|
26080
|
+
key: "componentWillUnmount",
|
|
26081
|
+
value: function componentWillUnmount() {
|
|
26082
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26083
|
+
}
|
|
26084
|
+
}, {
|
|
26085
|
+
key: "componentDidUpdate",
|
|
26086
|
+
value: function componentDidUpdate() {
|
|
26087
|
+
this.updateBBox();
|
|
26088
|
+
}
|
|
26089
|
+
}, {
|
|
26090
|
+
key: "updateBBox",
|
|
26091
|
+
value: function updateBBox() {
|
|
26092
|
+
var _this$state = this.state,
|
|
26093
|
+
boxWidth = _this$state.boxWidth,
|
|
26094
|
+
boxHeight = _this$state.boxHeight,
|
|
26095
|
+
dismissed = _this$state.dismissed;
|
|
26096
|
+
if (dismissed) {
|
|
26097
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26098
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26099
|
+
this.setState({
|
|
26100
|
+
dismissed: false
|
|
26101
|
+
});
|
|
26102
|
+
}
|
|
26103
|
+
} else {
|
|
26104
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26105
|
+
}
|
|
26106
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26107
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26108
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26109
|
+
this.setState({
|
|
26110
|
+
boxWidth: box.width,
|
|
26111
|
+
boxHeight: box.height
|
|
26112
|
+
});
|
|
26113
|
+
}
|
|
26114
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26115
|
+
this.setState({
|
|
26116
|
+
boxWidth: -1,
|
|
26117
|
+
boxHeight: -1
|
|
26118
|
+
});
|
|
26119
|
+
}
|
|
26120
|
+
}
|
|
26121
|
+
}, {
|
|
26122
|
+
key: "render",
|
|
26123
|
+
value: function render() {
|
|
26124
|
+
var _classNames,
|
|
26125
|
+
_this2 = this;
|
|
26126
|
+
var _this$props2 = this.props,
|
|
26127
|
+
payload = _this$props2.payload,
|
|
26128
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26129
|
+
animationDuration = _this$props2.animationDuration,
|
|
26130
|
+
animationEasing = _this$props2.animationEasing,
|
|
26131
|
+
filterNull = _this$props2.filterNull,
|
|
26132
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26133
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26134
|
+
return !isNil_1(entry.value);
|
|
26135
|
+
}) : payload);
|
|
26136
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26137
|
+
var _this$props3 = this.props,
|
|
26138
|
+
content = _this$props3.content,
|
|
26139
|
+
viewBox = _this$props3.viewBox,
|
|
26140
|
+
coordinate = _this$props3.coordinate,
|
|
26141
|
+
position = _this$props3.position,
|
|
26142
|
+
active = _this$props3.active,
|
|
26143
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26144
|
+
var outerStyle = _objectSpread$l({
|
|
26145
|
+
pointerEvents: 'none',
|
|
26146
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26147
|
+
position: 'absolute',
|
|
26148
|
+
top: 0,
|
|
26149
|
+
left: 0
|
|
26150
|
+
}, wrapperStyle);
|
|
26151
|
+
var translateX, translateY;
|
|
26152
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26153
|
+
translateX = position.x;
|
|
26154
|
+
translateY = position.y;
|
|
26155
|
+
} else {
|
|
26156
|
+
var _this$state2 = this.state,
|
|
26157
|
+
boxWidth = _this$state2.boxWidth,
|
|
26158
|
+
boxHeight = _this$state2.boxHeight;
|
|
26159
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26160
|
+
translateX = this.getTranslate({
|
|
26161
|
+
key: 'x',
|
|
26162
|
+
tooltipDimension: boxWidth,
|
|
26163
|
+
viewBoxDimension: viewBox.width
|
|
26164
|
+
});
|
|
26165
|
+
translateY = this.getTranslate({
|
|
26166
|
+
key: 'y',
|
|
26167
|
+
tooltipDimension: boxHeight,
|
|
26168
|
+
viewBoxDimension: viewBox.height
|
|
26169
|
+
});
|
|
26170
|
+
} else {
|
|
26171
|
+
outerStyle.visibility = 'hidden';
|
|
26172
|
+
}
|
|
26173
|
+
}
|
|
26174
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26175
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26176
|
+
})), outerStyle);
|
|
26177
|
+
if (isAnimationActive && active) {
|
|
26178
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26179
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26180
|
+
})), outerStyle);
|
|
26181
|
+
}
|
|
26182
|
+
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));
|
|
26183
|
+
return (
|
|
26184
|
+
/*#__PURE__*/
|
|
26185
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26186
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26187
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26188
|
+
React__default.createElement("div", {
|
|
26189
|
+
tabIndex: -1,
|
|
26190
|
+
role: "dialog",
|
|
26191
|
+
className: cls,
|
|
26192
|
+
style: outerStyle,
|
|
26193
|
+
ref: function ref(node) {
|
|
26194
|
+
_this2.wrapperNode = node;
|
|
26195
|
+
}
|
|
26196
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26197
|
+
payload: finalPayload
|
|
26198
|
+
})))
|
|
26199
|
+
);
|
|
26200
|
+
}
|
|
26201
|
+
}]);
|
|
26202
|
+
return Tooltip;
|
|
26203
|
+
}(PureComponent);
|
|
26204
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26205
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25991
26206
|
active: false,
|
|
25992
26207
|
allowEscapeViewBox: {
|
|
25993
26208
|
x: false,
|
|
@@ -26008,9 +26223,6 @@ var tooltipDefaultProps = {
|
|
|
26008
26223
|
x: 0,
|
|
26009
26224
|
y: 0
|
|
26010
26225
|
},
|
|
26011
|
-
// this doesn't exist on TooltipProps
|
|
26012
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26013
|
-
// @ts-ignore
|
|
26014
26226
|
cursorStyle: {},
|
|
26015
26227
|
separator: ' : ',
|
|
26016
26228
|
wrapperStyle: {},
|
|
@@ -26024,173 +26236,7 @@ var tooltipDefaultProps = {
|
|
|
26024
26236
|
animationDuration: 400,
|
|
26025
26237
|
filterNull: true,
|
|
26026
26238
|
useTranslate3d: false
|
|
26027
|
-
};
|
|
26028
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26029
|
-
var _classNames;
|
|
26030
|
-
var _useState = useState(-1),
|
|
26031
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26032
|
-
boxWidth = _useState2[0],
|
|
26033
|
-
setBoxWidth = _useState2[1];
|
|
26034
|
-
var _useState3 = useState(-1),
|
|
26035
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26036
|
-
boxHeight = _useState4[0],
|
|
26037
|
-
setBoxHeight = _useState4[1];
|
|
26038
|
-
var _useState5 = useState(false),
|
|
26039
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26040
|
-
dismissed = _useState6[0],
|
|
26041
|
-
setDismissed = _useState6[1];
|
|
26042
|
-
var _useState7 = useState({
|
|
26043
|
-
x: 0,
|
|
26044
|
-
y: 0
|
|
26045
|
-
}),
|
|
26046
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26047
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26048
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26049
|
-
var wrapperNode = useRef();
|
|
26050
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26051
|
-
reverseDirection = props.reverseDirection,
|
|
26052
|
-
coordinate = props.coordinate,
|
|
26053
|
-
offset = props.offset,
|
|
26054
|
-
position = props.position,
|
|
26055
|
-
viewBox = props.viewBox;
|
|
26056
|
-
var handleKeyDown = useCallback(function (event) {
|
|
26057
|
-
if (event.key === 'Escape') {
|
|
26058
|
-
setDismissed(true);
|
|
26059
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26060
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26061
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26062
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26063
|
-
});
|
|
26064
|
-
});
|
|
26065
|
-
}
|
|
26066
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26067
|
-
useEffect(function () {
|
|
26068
|
-
var updateBBox = function updateBBox() {
|
|
26069
|
-
if (dismissed) {
|
|
26070
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26071
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26072
|
-
setDismissed(false);
|
|
26073
|
-
}
|
|
26074
|
-
} else {
|
|
26075
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26076
|
-
}
|
|
26077
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26078
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26079
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26080
|
-
setBoxWidth(box.width);
|
|
26081
|
-
setBoxHeight(box.height);
|
|
26082
|
-
}
|
|
26083
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26084
|
-
setBoxWidth(-1);
|
|
26085
|
-
setBoxHeight(-1);
|
|
26086
|
-
}
|
|
26087
|
-
};
|
|
26088
|
-
updateBBox();
|
|
26089
|
-
return function () {
|
|
26090
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26091
|
-
};
|
|
26092
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26093
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26094
|
-
var key = _ref.key,
|
|
26095
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26096
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26097
|
-
if (position && isNumber(position[key])) {
|
|
26098
|
-
return position[key];
|
|
26099
|
-
}
|
|
26100
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26101
|
-
var positive = coordinate[key] + offset;
|
|
26102
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26103
|
-
return reverseDirection[key] ? negative : positive;
|
|
26104
|
-
}
|
|
26105
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26106
|
-
var _tooltipBoundary = negative;
|
|
26107
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26108
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26109
|
-
return Math.max(positive, viewBox[key]);
|
|
26110
|
-
}
|
|
26111
|
-
return Math.max(negative, viewBox[key]);
|
|
26112
|
-
}
|
|
26113
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26114
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26115
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26116
|
-
return Math.max(negative, viewBox[key]);
|
|
26117
|
-
}
|
|
26118
|
-
return Math.max(positive, viewBox[key]);
|
|
26119
|
-
};
|
|
26120
|
-
var payload = props.payload,
|
|
26121
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26122
|
-
filterNull = props.filterNull,
|
|
26123
|
-
active = props.active,
|
|
26124
|
-
wrapperStyle = props.wrapperStyle,
|
|
26125
|
-
useTranslate3d = props.useTranslate3d,
|
|
26126
|
-
isAnimationActive = props.isAnimationActive,
|
|
26127
|
-
animationDuration = props.animationDuration,
|
|
26128
|
-
animationEasing = props.animationEasing;
|
|
26129
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26130
|
-
return !isNil_1(entry.value);
|
|
26131
|
-
}) : payload);
|
|
26132
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26133
|
-
var content = props.content;
|
|
26134
|
-
var outerStyle = _objectSpread$i({
|
|
26135
|
-
pointerEvents: 'none',
|
|
26136
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26137
|
-
position: 'absolute',
|
|
26138
|
-
top: 0,
|
|
26139
|
-
left: 0
|
|
26140
|
-
}, wrapperStyle);
|
|
26141
|
-
var translateX, translateY;
|
|
26142
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26143
|
-
translateX = position.x;
|
|
26144
|
-
translateY = position.y;
|
|
26145
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26146
|
-
translateX = getTranslate({
|
|
26147
|
-
key: 'x',
|
|
26148
|
-
tooltipDimension: boxWidth,
|
|
26149
|
-
viewBoxDimension: viewBox.width
|
|
26150
|
-
});
|
|
26151
|
-
translateY = getTranslate({
|
|
26152
|
-
key: 'y',
|
|
26153
|
-
tooltipDimension: boxHeight,
|
|
26154
|
-
viewBoxDimension: viewBox.height
|
|
26155
|
-
});
|
|
26156
|
-
} else {
|
|
26157
|
-
outerStyle.visibility = 'hidden';
|
|
26158
|
-
}
|
|
26159
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26160
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26161
|
-
})), outerStyle);
|
|
26162
|
-
if (isAnimationActive && active) {
|
|
26163
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26164
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26165
|
-
})), outerStyle);
|
|
26166
|
-
}
|
|
26167
|
-
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));
|
|
26168
|
-
return (
|
|
26169
|
-
/*#__PURE__*/
|
|
26170
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26171
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26172
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26173
|
-
React__default.createElement("div", {
|
|
26174
|
-
tabIndex: -1,
|
|
26175
|
-
role: "dialog",
|
|
26176
|
-
className: cls,
|
|
26177
|
-
style: outerStyle,
|
|
26178
|
-
ref: wrapperNode
|
|
26179
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26180
|
-
payload: finalPayload
|
|
26181
|
-
})))
|
|
26182
|
-
);
|
|
26183
|
-
};
|
|
26184
|
-
|
|
26185
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26186
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26187
|
-
|
|
26188
|
-
/**
|
|
26189
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26190
|
-
* children.props when there are no props set by the consumer
|
|
26191
|
-
* doesn't work if using default parameters
|
|
26192
|
-
*/
|
|
26193
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26239
|
+
});
|
|
26194
26240
|
|
|
26195
26241
|
var root = _root;
|
|
26196
26242
|
|
|
@@ -31760,12 +31806,12 @@ module.exports = exports['default'];
|
|
|
31760
31806
|
|
|
31761
31807
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31762
31808
|
|
|
31763
|
-
function _typeof$
|
|
31764
|
-
function ownKeys$
|
|
31765
|
-
function _objectSpread$
|
|
31766
|
-
function _defineProperty$
|
|
31767
|
-
function _toPropertyKey$
|
|
31768
|
-
function _toPrimitive$
|
|
31809
|
+
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); }
|
|
31810
|
+
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; }
|
|
31811
|
+
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; }
|
|
31812
|
+
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; }
|
|
31813
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31814
|
+
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); }
|
|
31769
31815
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31770
31816
|
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."); }
|
|
31771
31817
|
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); }
|
|
@@ -31833,7 +31879,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31833
31879
|
}
|
|
31834
31880
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31835
31881
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31836
|
-
var measurementSpanStyle = _objectSpread$
|
|
31882
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
31837
31883
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31838
31884
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31839
31885
|
return styleKey;
|
|
@@ -31888,10 +31934,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31888
31934
|
};
|
|
31889
31935
|
};
|
|
31890
31936
|
|
|
31891
|
-
var _excluded$
|
|
31937
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
31938
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31892
31939
|
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); }
|
|
31893
|
-
function _objectWithoutProperties$
|
|
31894
|
-
function _objectWithoutPropertiesLoose$
|
|
31940
|
+
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; }
|
|
31941
|
+
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; }
|
|
31895
31942
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31896
31943
|
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."); }
|
|
31897
31944
|
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); }
|
|
@@ -32045,45 +32092,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32045
32092
|
}
|
|
32046
32093
|
return getWordsWithoutCalculate(children);
|
|
32047
32094
|
};
|
|
32048
|
-
var
|
|
32049
|
-
|
|
32050
|
-
|
|
32051
|
-
|
|
32052
|
-
|
|
32053
|
-
|
|
32054
|
-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32095
|
+
var DEFAULT_FILL = '#808080';
|
|
32096
|
+
var Text = function Text(_ref5) {
|
|
32097
|
+
var _ref5$x = _ref5.x,
|
|
32098
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32099
|
+
_ref5$y = _ref5.y,
|
|
32100
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32101
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32102
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32103
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32104
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32105
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32106
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32107
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32108
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32109
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32110
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32111
|
+
_ref5$fill = _ref5.fill,
|
|
32112
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32113
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32061
32114
|
var wordsByLines = useMemo(function () {
|
|
32062
32115
|
return getWordsByLines({
|
|
32063
32116
|
breakAll: props.breakAll,
|
|
32064
32117
|
children: props.children,
|
|
32065
32118
|
maxLines: props.maxLines,
|
|
32066
|
-
scaleToFit:
|
|
32119
|
+
scaleToFit: scaleToFit,
|
|
32067
32120
|
style: props.style,
|
|
32068
32121
|
width: props.width
|
|
32069
32122
|
});
|
|
32070
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32123
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32071
32124
|
var dx = props.dx,
|
|
32072
32125
|
dy = props.dy,
|
|
32073
|
-
textAnchor = props.textAnchor,
|
|
32074
|
-
verticalAnchor = props.verticalAnchor,
|
|
32075
|
-
scaleToFit = props.scaleToFit,
|
|
32076
32126
|
angle = props.angle,
|
|
32077
|
-
lineHeight = props.lineHeight,
|
|
32078
|
-
capHeight = props.capHeight,
|
|
32079
32127
|
className = props.className,
|
|
32080
32128
|
breakAll = props.breakAll,
|
|
32081
|
-
textProps = _objectWithoutProperties$
|
|
32082
|
-
if (!isNumOrStr(
|
|
32129
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32130
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32083
32131
|
return null;
|
|
32084
32132
|
}
|
|
32085
|
-
var x =
|
|
32086
|
-
var y =
|
|
32133
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32134
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32087
32135
|
var startDy;
|
|
32088
32136
|
switch (verticalAnchor) {
|
|
32089
32137
|
case 'start':
|
|
@@ -32113,7 +32161,7 @@ var Text = function Text(props) {
|
|
|
32113
32161
|
y: y,
|
|
32114
32162
|
className: classNames('recharts-text', className),
|
|
32115
32163
|
textAnchor: textAnchor,
|
|
32116
|
-
fill:
|
|
32164
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32117
32165
|
}), wordsByLines.map(function (line, index) {
|
|
32118
32166
|
return (
|
|
32119
32167
|
/*#__PURE__*/
|
|
@@ -32126,7 +32174,6 @@ var Text = function Text(props) {
|
|
|
32126
32174
|
);
|
|
32127
32175
|
}));
|
|
32128
32176
|
};
|
|
32129
|
-
Text.defaultProps = textDefaultProps;
|
|
32130
32177
|
|
|
32131
32178
|
var baseIsEqual = _baseIsEqual;
|
|
32132
32179
|
|
|
@@ -38394,7 +38441,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38394
38441
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38395
38442
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38396
38443
|
|
|
38397
|
-
var _excluded$
|
|
38444
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38398
38445
|
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); }
|
|
38399
38446
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38400
38447
|
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."); }
|
|
@@ -38402,8 +38449,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38402
38449
|
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; }
|
|
38403
38450
|
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; } }
|
|
38404
38451
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38405
|
-
function _objectWithoutProperties$
|
|
38406
|
-
function _objectWithoutPropertiesLoose$
|
|
38452
|
+
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; }
|
|
38453
|
+
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; }
|
|
38407
38454
|
function ErrorBar(props) {
|
|
38408
38455
|
var offset = props.offset,
|
|
38409
38456
|
layout = props.layout,
|
|
@@ -38413,7 +38460,7 @@ function ErrorBar(props) {
|
|
|
38413
38460
|
dataPointFormatter = props.dataPointFormatter,
|
|
38414
38461
|
xAxis = props.xAxis,
|
|
38415
38462
|
yAxis = props.yAxis,
|
|
38416
|
-
others = _objectWithoutProperties$
|
|
38463
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38417
38464
|
var svgProps = filterProps(others);
|
|
38418
38465
|
var errorBars = data.map(function (entry, i) {
|
|
38419
38466
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38524,18 +38571,18 @@ ErrorBar.defaultProps = {
|
|
|
38524
38571
|
};
|
|
38525
38572
|
ErrorBar.displayName = 'ErrorBar';
|
|
38526
38573
|
|
|
38527
|
-
function _typeof$
|
|
38574
|
+
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); }
|
|
38528
38575
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38529
38576
|
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."); }
|
|
38530
38577
|
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); }
|
|
38531
38578
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38532
38579
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38533
38580
|
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; }
|
|
38534
|
-
function ownKeys$
|
|
38535
|
-
function _objectSpread$
|
|
38536
|
-
function _defineProperty$
|
|
38537
|
-
function _toPropertyKey$
|
|
38538
|
-
function _toPrimitive$
|
|
38581
|
+
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; }
|
|
38582
|
+
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; }
|
|
38583
|
+
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; }
|
|
38584
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38585
|
+
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); }
|
|
38539
38586
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38540
38587
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38541
38588
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38706,7 +38753,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38706
38753
|
};
|
|
38707
38754
|
});
|
|
38708
38755
|
}
|
|
38709
|
-
return _objectSpread$
|
|
38756
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38710
38757
|
payload: legendData,
|
|
38711
38758
|
item: legendItem
|
|
38712
38759
|
});
|
|
@@ -38860,10 +38907,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38860
38907
|
verticalAlign = legendProps.verticalAlign,
|
|
38861
38908
|
layout = legendProps.layout;
|
|
38862
38909
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38863
|
-
newOffset = _objectSpread$
|
|
38910
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
38864
38911
|
}
|
|
38865
38912
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38866
|
-
newOffset = _objectSpread$
|
|
38913
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38867
38914
|
}
|
|
38868
38915
|
}
|
|
38869
38916
|
return newOffset;
|
|
@@ -39289,14 +39336,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39289
39336
|
items: [item]
|
|
39290
39337
|
};
|
|
39291
39338
|
}
|
|
39292
|
-
return _objectSpread$
|
|
39339
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39293
39340
|
}, {});
|
|
39294
39341
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39295
39342
|
var group = stackGroups[axisId];
|
|
39296
39343
|
if (group.hasStack) {
|
|
39297
39344
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39298
39345
|
var g = group.stackGroups[stackId];
|
|
39299
|
-
return _objectSpread$
|
|
39346
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39300
39347
|
numericAxisId: numericAxisId,
|
|
39301
39348
|
cateAxisId: cateAxisId,
|
|
39302
39349
|
items: g.items,
|
|
@@ -39304,7 +39351,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39304
39351
|
}));
|
|
39305
39352
|
}, {});
|
|
39306
39353
|
}
|
|
39307
|
-
return _objectSpread$
|
|
39354
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39308
39355
|
}, {});
|
|
39309
39356
|
};
|
|
39310
39357
|
|
|
@@ -39518,7 +39565,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39518
39565
|
formatter = _graphicalItem$props.formatter,
|
|
39519
39566
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39520
39567
|
chartType = _graphicalItem$props.chartType;
|
|
39521
|
-
return _objectSpread$
|
|
39568
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39522
39569
|
dataKey: dataKey,
|
|
39523
39570
|
unit: unit,
|
|
39524
39571
|
formatter: formatter,
|
|
@@ -39531,12 +39578,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39531
39578
|
});
|
|
39532
39579
|
};
|
|
39533
39580
|
|
|
39534
|
-
function _typeof$
|
|
39535
|
-
function ownKeys$
|
|
39536
|
-
function _objectSpread$
|
|
39537
|
-
function _defineProperty$
|
|
39538
|
-
function _toPropertyKey$
|
|
39539
|
-
function _toPrimitive$
|
|
39581
|
+
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); }
|
|
39582
|
+
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; }
|
|
39583
|
+
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; }
|
|
39584
|
+
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; }
|
|
39585
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39586
|
+
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); }
|
|
39540
39587
|
var RADIAN = Math.PI / 180;
|
|
39541
39588
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39542
39589
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39641,7 +39688,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39641
39688
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39642
39689
|
}
|
|
39643
39690
|
if (inRange) {
|
|
39644
|
-
return _objectSpread$
|
|
39691
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39645
39692
|
radius: radius,
|
|
39646
39693
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39647
39694
|
});
|
|
@@ -39649,18 +39696,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39649
39696
|
return null;
|
|
39650
39697
|
};
|
|
39651
39698
|
|
|
39652
|
-
function _typeof$
|
|
39699
|
+
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); }
|
|
39700
|
+
var _excluded$7 = ["offset"];
|
|
39653
39701
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39654
39702
|
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."); }
|
|
39655
39703
|
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); }
|
|
39656
39704
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39657
39705
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39658
39706
|
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; }
|
|
39659
|
-
function
|
|
39660
|
-
function
|
|
39661
|
-
function
|
|
39662
|
-
function
|
|
39663
|
-
function
|
|
39707
|
+
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; }
|
|
39708
|
+
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; }
|
|
39709
|
+
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; }
|
|
39710
|
+
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; }
|
|
39711
|
+
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; }
|
|
39712
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39713
|
+
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); }
|
|
39664
39714
|
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); }
|
|
39665
39715
|
var getLabel = function getLabel(props) {
|
|
39666
39716
|
var value = props.value,
|
|
@@ -39805,7 +39855,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39805
39855
|
textAnchor: 'middle',
|
|
39806
39856
|
verticalAnchor: verticalEnd
|
|
39807
39857
|
};
|
|
39808
|
-
return _objectSpread$
|
|
39858
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39809
39859
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39810
39860
|
width: width
|
|
39811
39861
|
} : {});
|
|
@@ -39817,7 +39867,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39817
39867
|
textAnchor: 'middle',
|
|
39818
39868
|
verticalAnchor: verticalStart
|
|
39819
39869
|
};
|
|
39820
|
-
return _objectSpread$
|
|
39870
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39821
39871
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39822
39872
|
width: width
|
|
39823
39873
|
} : {});
|
|
@@ -39829,7 +39879,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39829
39879
|
textAnchor: horizontalEnd,
|
|
39830
39880
|
verticalAnchor: 'middle'
|
|
39831
39881
|
};
|
|
39832
|
-
return _objectSpread$
|
|
39882
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
39833
39883
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39834
39884
|
height: height
|
|
39835
39885
|
} : {});
|
|
@@ -39841,7 +39891,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39841
39891
|
textAnchor: horizontalStart,
|
|
39842
39892
|
verticalAnchor: 'middle'
|
|
39843
39893
|
};
|
|
39844
|
-
return _objectSpread$
|
|
39894
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
39845
39895
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39846
39896
|
height: height
|
|
39847
39897
|
} : {});
|
|
@@ -39851,7 +39901,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39851
39901
|
height: height
|
|
39852
39902
|
} : {};
|
|
39853
39903
|
if (position === 'insideLeft') {
|
|
39854
|
-
return _objectSpread$
|
|
39904
|
+
return _objectSpread$h({
|
|
39855
39905
|
x: x + horizontalOffset,
|
|
39856
39906
|
y: y + height / 2,
|
|
39857
39907
|
textAnchor: horizontalStart,
|
|
@@ -39859,7 +39909,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39859
39909
|
}, sizeAttrs);
|
|
39860
39910
|
}
|
|
39861
39911
|
if (position === 'insideRight') {
|
|
39862
|
-
return _objectSpread$
|
|
39912
|
+
return _objectSpread$h({
|
|
39863
39913
|
x: x + width - horizontalOffset,
|
|
39864
39914
|
y: y + height / 2,
|
|
39865
39915
|
textAnchor: horizontalEnd,
|
|
@@ -39867,7 +39917,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39867
39917
|
}, sizeAttrs);
|
|
39868
39918
|
}
|
|
39869
39919
|
if (position === 'insideTop') {
|
|
39870
|
-
return _objectSpread$
|
|
39920
|
+
return _objectSpread$h({
|
|
39871
39921
|
x: x + width / 2,
|
|
39872
39922
|
y: y + verticalOffset,
|
|
39873
39923
|
textAnchor: 'middle',
|
|
@@ -39875,7 +39925,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39875
39925
|
}, sizeAttrs);
|
|
39876
39926
|
}
|
|
39877
39927
|
if (position === 'insideBottom') {
|
|
39878
|
-
return _objectSpread$
|
|
39928
|
+
return _objectSpread$h({
|
|
39879
39929
|
x: x + width / 2,
|
|
39880
39930
|
y: y + height - verticalOffset,
|
|
39881
39931
|
textAnchor: 'middle',
|
|
@@ -39883,7 +39933,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39883
39933
|
}, sizeAttrs);
|
|
39884
39934
|
}
|
|
39885
39935
|
if (position === 'insideTopLeft') {
|
|
39886
|
-
return _objectSpread$
|
|
39936
|
+
return _objectSpread$h({
|
|
39887
39937
|
x: x + horizontalOffset,
|
|
39888
39938
|
y: y + verticalOffset,
|
|
39889
39939
|
textAnchor: horizontalStart,
|
|
@@ -39891,7 +39941,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39891
39941
|
}, sizeAttrs);
|
|
39892
39942
|
}
|
|
39893
39943
|
if (position === 'insideTopRight') {
|
|
39894
|
-
return _objectSpread$
|
|
39944
|
+
return _objectSpread$h({
|
|
39895
39945
|
x: x + width - horizontalOffset,
|
|
39896
39946
|
y: y + verticalOffset,
|
|
39897
39947
|
textAnchor: horizontalEnd,
|
|
@@ -39899,7 +39949,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39899
39949
|
}, sizeAttrs);
|
|
39900
39950
|
}
|
|
39901
39951
|
if (position === 'insideBottomLeft') {
|
|
39902
|
-
return _objectSpread$
|
|
39952
|
+
return _objectSpread$h({
|
|
39903
39953
|
x: x + horizontalOffset,
|
|
39904
39954
|
y: y + height - verticalOffset,
|
|
39905
39955
|
textAnchor: horizontalStart,
|
|
@@ -39907,7 +39957,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39907
39957
|
}, sizeAttrs);
|
|
39908
39958
|
}
|
|
39909
39959
|
if (position === 'insideBottomRight') {
|
|
39910
|
-
return _objectSpread$
|
|
39960
|
+
return _objectSpread$h({
|
|
39911
39961
|
x: x + width - horizontalOffset,
|
|
39912
39962
|
y: y + height - verticalOffset,
|
|
39913
39963
|
textAnchor: horizontalEnd,
|
|
@@ -39915,14 +39965,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39915
39965
|
}, sizeAttrs);
|
|
39916
39966
|
}
|
|
39917
39967
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39918
|
-
return _objectSpread$
|
|
39968
|
+
return _objectSpread$h({
|
|
39919
39969
|
x: x + getPercentValue(position.x, width),
|
|
39920
39970
|
y: y + getPercentValue(position.y, height),
|
|
39921
39971
|
textAnchor: 'end',
|
|
39922
39972
|
verticalAnchor: 'end'
|
|
39923
39973
|
}, sizeAttrs);
|
|
39924
39974
|
}
|
|
39925
|
-
return _objectSpread$
|
|
39975
|
+
return _objectSpread$h({
|
|
39926
39976
|
x: x + width / 2,
|
|
39927
39977
|
y: y + height / 2,
|
|
39928
39978
|
textAnchor: 'middle',
|
|
@@ -39932,7 +39982,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39932
39982
|
var isPolar = function isPolar(viewBox) {
|
|
39933
39983
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39934
39984
|
};
|
|
39935
|
-
function Label$3(
|
|
39985
|
+
function Label$3(_ref4) {
|
|
39986
|
+
var _ref4$offset = _ref4.offset,
|
|
39987
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39988
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39989
|
+
var props = _objectSpread$h({
|
|
39990
|
+
offset: offset
|
|
39991
|
+
}, restProps);
|
|
39936
39992
|
var viewBox = props.viewBox,
|
|
39937
39993
|
position = props.position,
|
|
39938
39994
|
value = props.value,
|
|
@@ -39969,9 +40025,6 @@ function Label$3(props) {
|
|
|
39969
40025
|
}), label);
|
|
39970
40026
|
}
|
|
39971
40027
|
Label$3.displayName = 'Label';
|
|
39972
|
-
Label$3.defaultProps = {
|
|
39973
|
-
offset: 5
|
|
39974
|
-
};
|
|
39975
40028
|
var parseViewBox = function parseViewBox(props) {
|
|
39976
40029
|
var cx = props.cx,
|
|
39977
40030
|
cy = props.cy,
|
|
@@ -40126,8 +40179,9 @@ function last(array) {
|
|
|
40126
40179
|
|
|
40127
40180
|
var last_1 = last;
|
|
40128
40181
|
|
|
40129
|
-
function _typeof$
|
|
40130
|
-
var _excluded$
|
|
40182
|
+
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); }
|
|
40183
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40184
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40131
40185
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40132
40186
|
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."); }
|
|
40133
40187
|
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); }
|
|
@@ -40135,26 +40189,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40135
40189
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40136
40190
|
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; }
|
|
40137
40191
|
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); }
|
|
40138
|
-
function ownKeys$
|
|
40139
|
-
function _objectSpread$
|
|
40140
|
-
function _defineProperty$
|
|
40141
|
-
function _toPropertyKey$
|
|
40142
|
-
function _toPrimitive$
|
|
40143
|
-
function _objectWithoutProperties$
|
|
40144
|
-
function _objectWithoutPropertiesLoose$
|
|
40145
|
-
var
|
|
40146
|
-
|
|
40147
|
-
|
|
40148
|
-
|
|
40149
|
-
|
|
40150
|
-
|
|
40151
|
-
|
|
40152
|
-
|
|
40153
|
-
dataKey =
|
|
40154
|
-
clockWise =
|
|
40155
|
-
id =
|
|
40156
|
-
textBreakAll =
|
|
40157
|
-
others = _objectWithoutProperties$
|
|
40192
|
+
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; }
|
|
40193
|
+
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; }
|
|
40194
|
+
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; }
|
|
40195
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40196
|
+
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); }
|
|
40197
|
+
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; }
|
|
40198
|
+
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; }
|
|
40199
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40200
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40201
|
+
};
|
|
40202
|
+
function LabelList(_ref) {
|
|
40203
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40204
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40205
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40206
|
+
var data = restProps.data,
|
|
40207
|
+
dataKey = restProps.dataKey,
|
|
40208
|
+
clockWise = restProps.clockWise,
|
|
40209
|
+
id = restProps.id,
|
|
40210
|
+
textBreakAll = restProps.textBreakAll,
|
|
40211
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40158
40212
|
if (!data || !data.length) {
|
|
40159
40213
|
return null;
|
|
40160
40214
|
}
|
|
@@ -40170,7 +40224,7 @@ function LabelList(props) {
|
|
|
40170
40224
|
index: index,
|
|
40171
40225
|
value: value,
|
|
40172
40226
|
textBreakAll: textBreakAll,
|
|
40173
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40227
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40174
40228
|
clockWise: clockWise
|
|
40175
40229
|
})),
|
|
40176
40230
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40225,9 +40279,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40225
40279
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40226
40280
|
}
|
|
40227
40281
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40228
|
-
LabelList.defaultProps = defaultProps;
|
|
40229
40282
|
|
|
40283
|
+
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); }
|
|
40230
40284
|
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); }
|
|
40285
|
+
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; }
|
|
40286
|
+
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; }
|
|
40287
|
+
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; }
|
|
40288
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40289
|
+
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); }
|
|
40231
40290
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40232
40291
|
var sign = mathSign(endAngle - startAngle);
|
|
40233
40292
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40368,7 +40427,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40368
40427
|
}
|
|
40369
40428
|
return path;
|
|
40370
40429
|
};
|
|
40371
|
-
var
|
|
40430
|
+
var defaultProps$1 = {
|
|
40431
|
+
cx: 0,
|
|
40432
|
+
cy: 0,
|
|
40433
|
+
innerRadius: 0,
|
|
40434
|
+
outerRadius: 0,
|
|
40435
|
+
startAngle: 0,
|
|
40436
|
+
endAngle: 0,
|
|
40437
|
+
cornerRadius: 0,
|
|
40438
|
+
forceCornerRadius: false,
|
|
40439
|
+
cornerIsExternal: false
|
|
40440
|
+
};
|
|
40441
|
+
var Sector = function Sector(sectorProps) {
|
|
40442
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40372
40443
|
var cx = props.cx,
|
|
40373
40444
|
cy = props.cy,
|
|
40374
40445
|
innerRadius = props.innerRadius,
|
|
@@ -40414,25 +40485,14 @@ var Sector = function Sector(props) {
|
|
|
40414
40485
|
role: "img"
|
|
40415
40486
|
}));
|
|
40416
40487
|
};
|
|
40417
|
-
Sector.defaultProps = {
|
|
40418
|
-
cx: 0,
|
|
40419
|
-
cy: 0,
|
|
40420
|
-
innerRadius: 0,
|
|
40421
|
-
outerRadius: 0,
|
|
40422
|
-
startAngle: 0,
|
|
40423
|
-
endAngle: 0,
|
|
40424
|
-
cornerRadius: 0,
|
|
40425
|
-
forceCornerRadius: false,
|
|
40426
|
-
cornerIsExternal: false
|
|
40427
|
-
};
|
|
40428
40488
|
|
|
40429
|
-
function _typeof$
|
|
40489
|
+
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); }
|
|
40430
40490
|
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); }
|
|
40431
|
-
function ownKeys$
|
|
40432
|
-
function _objectSpread$
|
|
40433
|
-
function _defineProperty$
|
|
40434
|
-
function _toPropertyKey$
|
|
40435
|
-
function _toPrimitive$
|
|
40491
|
+
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; }
|
|
40492
|
+
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; }
|
|
40493
|
+
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; }
|
|
40494
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40495
|
+
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); }
|
|
40436
40496
|
var CURVE_FACTORIES = {
|
|
40437
40497
|
curveBasisClosed: curveBasisClosed,
|
|
40438
40498
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40472,11 +40532,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40472
40532
|
* @return {String} path
|
|
40473
40533
|
*/
|
|
40474
40534
|
var getPath$1 = function getPath(_ref) {
|
|
40475
|
-
var type = _ref.type,
|
|
40476
|
-
|
|
40535
|
+
var _ref$type = _ref.type,
|
|
40536
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40537
|
+
_ref$points = _ref.points,
|
|
40538
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40477
40539
|
baseLine = _ref.baseLine,
|
|
40478
40540
|
layout = _ref.layout,
|
|
40479
|
-
connectNulls = _ref.connectNulls
|
|
40541
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40542
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40480
40543
|
var curveFactory = getCurveFactory(type, layout);
|
|
40481
40544
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40482
40545
|
return defined(entry);
|
|
@@ -40487,7 +40550,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40487
40550
|
return defined(base);
|
|
40488
40551
|
}) : baseLine;
|
|
40489
40552
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40490
|
-
return _objectSpread$
|
|
40553
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40491
40554
|
base: formatBaseLine[index]
|
|
40492
40555
|
});
|
|
40493
40556
|
});
|
|
@@ -40528,12 +40591,8 @@ var Curve = function Curve(props) {
|
|
|
40528
40591
|
ref: pathRef
|
|
40529
40592
|
}));
|
|
40530
40593
|
};
|
|
40531
|
-
Curve.defaultProps = {
|
|
40532
|
-
type: 'linear',
|
|
40533
|
-
points: [],
|
|
40534
|
-
connectNulls: false
|
|
40535
|
-
};
|
|
40536
40594
|
|
|
40595
|
+
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); }
|
|
40537
40596
|
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); }
|
|
40538
40597
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40539
40598
|
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."); }
|
|
@@ -40541,6 +40600,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40541
40600
|
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; }
|
|
40542
40601
|
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; } }
|
|
40543
40602
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40603
|
+
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; }
|
|
40604
|
+
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; }
|
|
40605
|
+
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; }
|
|
40606
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40607
|
+
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); }
|
|
40544
40608
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40545
40609
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40546
40610
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40596,13 +40660,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40596
40660
|
}
|
|
40597
40661
|
return false;
|
|
40598
40662
|
};
|
|
40599
|
-
var
|
|
40663
|
+
var defaultProps = {
|
|
40664
|
+
x: 0,
|
|
40665
|
+
y: 0,
|
|
40666
|
+
width: 0,
|
|
40667
|
+
height: 0,
|
|
40668
|
+
// The radius of border
|
|
40669
|
+
// The radius of four corners when radius is a number
|
|
40670
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40671
|
+
radius: 0,
|
|
40672
|
+
isAnimationActive: false,
|
|
40673
|
+
isUpdateAnimationActive: false,
|
|
40674
|
+
animationBegin: 0,
|
|
40675
|
+
animationDuration: 1500,
|
|
40676
|
+
animationEasing: 'ease'
|
|
40677
|
+
};
|
|
40678
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40679
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40600
40680
|
var pathRef = useRef();
|
|
40601
40681
|
var _useState = useState(-1),
|
|
40602
40682
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40603
40683
|
totalLength = _useState2[0],
|
|
40604
40684
|
setTotalLength = _useState2[1];
|
|
40605
|
-
|
|
40685
|
+
useEffect(function () {
|
|
40606
40686
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40607
40687
|
try {
|
|
40608
40688
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40673,21 +40753,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40673
40753
|
})));
|
|
40674
40754
|
});
|
|
40675
40755
|
};
|
|
40676
|
-
Rectangle.defaultProps = {
|
|
40677
|
-
x: 0,
|
|
40678
|
-
y: 0,
|
|
40679
|
-
width: 0,
|
|
40680
|
-
height: 0,
|
|
40681
|
-
// The radius of border
|
|
40682
|
-
// The radius of four corners when radius is a number
|
|
40683
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40684
|
-
radius: 0,
|
|
40685
|
-
isAnimationActive: false,
|
|
40686
|
-
isUpdateAnimationActive: false,
|
|
40687
|
-
animationBegin: 0,
|
|
40688
|
-
animationDuration: 1500,
|
|
40689
|
-
animationEasing: 'ease'
|
|
40690
|
-
};
|
|
40691
40756
|
|
|
40692
40757
|
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); }
|
|
40693
40758
|
var Dot$1 = function Dot(props) {
|
|
@@ -40707,18 +40772,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40707
40772
|
return null;
|
|
40708
40773
|
};
|
|
40709
40774
|
|
|
40775
|
+
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); }
|
|
40776
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40710
40777
|
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); }
|
|
40778
|
+
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; }
|
|
40779
|
+
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; }
|
|
40780
|
+
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; }
|
|
40781
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40782
|
+
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); }
|
|
40783
|
+
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; }
|
|
40784
|
+
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; }
|
|
40711
40785
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40712
40786
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40713
40787
|
};
|
|
40714
|
-
var Cross = function Cross(
|
|
40715
|
-
var x =
|
|
40716
|
-
|
|
40717
|
-
|
|
40718
|
-
|
|
40719
|
-
top =
|
|
40720
|
-
|
|
40721
|
-
|
|
40788
|
+
var Cross = function Cross(_ref) {
|
|
40789
|
+
var _ref$x = _ref.x,
|
|
40790
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40791
|
+
_ref$y = _ref.y,
|
|
40792
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40793
|
+
_ref$top = _ref.top,
|
|
40794
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40795
|
+
_ref$left = _ref.left,
|
|
40796
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40797
|
+
_ref$width = _ref.width,
|
|
40798
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40799
|
+
_ref$height = _ref.height,
|
|
40800
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40801
|
+
className = _ref.className,
|
|
40802
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40803
|
+
var props = _objectSpread$c({
|
|
40804
|
+
x: x,
|
|
40805
|
+
y: y,
|
|
40806
|
+
top: top,
|
|
40807
|
+
left: left,
|
|
40808
|
+
width: width,
|
|
40809
|
+
height: height
|
|
40810
|
+
}, rest);
|
|
40722
40811
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40723
40812
|
return null;
|
|
40724
40813
|
}
|
|
@@ -40727,14 +40816,6 @@ var Cross = function Cross(props) {
|
|
|
40727
40816
|
d: getPath(x, y, width, height, top, left)
|
|
40728
40817
|
}));
|
|
40729
40818
|
};
|
|
40730
|
-
Cross.defaultProps = {
|
|
40731
|
-
x: 0,
|
|
40732
|
-
y: 0,
|
|
40733
|
-
top: 0,
|
|
40734
|
-
left: 0,
|
|
40735
|
-
width: 0,
|
|
40736
|
-
height: 0
|
|
40737
|
-
};
|
|
40738
40819
|
|
|
40739
40820
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40740
40821
|
|
|
@@ -40944,6 +41025,7 @@ var createScale = function createScale(_ref) {
|
|
|
40944
41025
|
isTextActive: false,
|
|
40945
41026
|
isSlideMoving: false,
|
|
40946
41027
|
isTravellerMoving: false,
|
|
41028
|
+
isTravellerFocused: false,
|
|
40947
41029
|
startX: scale(startIndex),
|
|
40948
41030
|
endX: scale(endIndex),
|
|
40949
41031
|
scale: scale,
|
|
@@ -41157,6 +41239,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41157
41239
|
}
|
|
41158
41240
|
});
|
|
41159
41241
|
}
|
|
41242
|
+
}, {
|
|
41243
|
+
key: "handleTravellerMoveKeyboard",
|
|
41244
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41245
|
+
var _this2 = this;
|
|
41246
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41247
|
+
var _this$state3 = this.state,
|
|
41248
|
+
scaleValues = _this$state3.scaleValues,
|
|
41249
|
+
startX = _this$state3.startX,
|
|
41250
|
+
endX = _this$state3.endX;
|
|
41251
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41252
|
+
var currentScaleValue = this.state[id];
|
|
41253
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41254
|
+
if (currentIndex === -1) {
|
|
41255
|
+
return;
|
|
41256
|
+
}
|
|
41257
|
+
var newIndex = currentIndex + direction;
|
|
41258
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41259
|
+
return;
|
|
41260
|
+
}
|
|
41261
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41262
|
+
|
|
41263
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41264
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41265
|
+
return;
|
|
41266
|
+
}
|
|
41267
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41268
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41269
|
+
startX: _this2.state.startX,
|
|
41270
|
+
endX: _this2.state.endX
|
|
41271
|
+
}));
|
|
41272
|
+
});
|
|
41273
|
+
}
|
|
41160
41274
|
}, {
|
|
41161
41275
|
key: "renderBackground",
|
|
41162
41276
|
value: function renderBackground() {
|
|
@@ -41204,6 +41318,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41204
41318
|
}, {
|
|
41205
41319
|
key: "renderTravellerLayer",
|
|
41206
41320
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41321
|
+
var _this3 = this;
|
|
41207
41322
|
var _this$props7 = this.props,
|
|
41208
41323
|
y = _this$props7.y,
|
|
41209
41324
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41217,11 +41332,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41217
41332
|
height: height
|
|
41218
41333
|
});
|
|
41219
41334
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41335
|
+
tabIndex: 0,
|
|
41336
|
+
role: "slider",
|
|
41220
41337
|
className: "recharts-brush-traveller",
|
|
41221
41338
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41222
41339
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41223
41340
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41224
41341
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41342
|
+
onKeyDown: function onKeyDown(e) {
|
|
41343
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41344
|
+
return;
|
|
41345
|
+
}
|
|
41346
|
+
e.preventDefault();
|
|
41347
|
+
e.stopPropagation();
|
|
41348
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41349
|
+
},
|
|
41350
|
+
onFocus: function onFocus() {
|
|
41351
|
+
_this3.setState({
|
|
41352
|
+
isTravellerFocused: true
|
|
41353
|
+
});
|
|
41354
|
+
},
|
|
41355
|
+
onBlur: function onBlur() {
|
|
41356
|
+
_this3.setState({
|
|
41357
|
+
isTravellerFocused: false
|
|
41358
|
+
});
|
|
41359
|
+
},
|
|
41225
41360
|
style: {
|
|
41226
41361
|
cursor: 'col-resize'
|
|
41227
41362
|
}
|
|
@@ -41265,9 +41400,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41265
41400
|
height = _this$props9.height,
|
|
41266
41401
|
travellerWidth = _this$props9.travellerWidth,
|
|
41267
41402
|
stroke = _this$props9.stroke;
|
|
41268
|
-
var _this$
|
|
41269
|
-
startX = _this$
|
|
41270
|
-
endX = _this$
|
|
41403
|
+
var _this$state4 = this.state,
|
|
41404
|
+
startX = _this$state4.startX,
|
|
41405
|
+
endX = _this$state4.endX;
|
|
41271
41406
|
var offset = 5;
|
|
41272
41407
|
var attrs = {
|
|
41273
41408
|
pointerEvents: 'none',
|
|
@@ -41299,12 +41434,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41299
41434
|
width = _this$props10.width,
|
|
41300
41435
|
height = _this$props10.height,
|
|
41301
41436
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41302
|
-
var _this$
|
|
41303
|
-
startX = _this$
|
|
41304
|
-
endX = _this$
|
|
41305
|
-
isTextActive = _this$
|
|
41306
|
-
isSlideMoving = _this$
|
|
41307
|
-
isTravellerMoving = _this$
|
|
41437
|
+
var _this$state5 = this.state,
|
|
41438
|
+
startX = _this$state5.startX,
|
|
41439
|
+
endX = _this$state5.endX,
|
|
41440
|
+
isTextActive = _this$state5.isTextActive,
|
|
41441
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41442
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41443
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41308
41444
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41309
41445
|
return null;
|
|
41310
41446
|
}
|
|
@@ -41316,7 +41452,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41316
41452
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41317
41453
|
onTouchMove: this.handleTouchMove,
|
|
41318
41454
|
style: style
|
|
41319
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41455
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41320
41456
|
}
|
|
41321
41457
|
}], [{
|
|
41322
41458
|
key: "renderDefaultTraveller",
|
|
@@ -41634,7 +41770,7 @@ function every(collection, predicate, guard) {
|
|
|
41634
41770
|
|
|
41635
41771
|
var every_1 = every;
|
|
41636
41772
|
|
|
41637
|
-
var defineProperty = _defineProperty$
|
|
41773
|
+
var defineProperty = _defineProperty$o;
|
|
41638
41774
|
|
|
41639
41775
|
/**
|
|
41640
41776
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -41995,7 +42131,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
41995
42131
|
legendType: 'rect',
|
|
41996
42132
|
minPointSize: 0,
|
|
41997
42133
|
hide: false,
|
|
41998
|
-
// data of bar
|
|
41999
42134
|
data: [],
|
|
42000
42135
|
layout: 'vertical',
|
|
42001
42136
|
isAnimationActive: !Global.isSsr,
|
|
@@ -44908,10 +45043,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
44908
45043
|
}
|
|
44909
45044
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
44910
45045
|
x = _this$container$getBo.x,
|
|
44911
|
-
y = _this$container$getBo.y
|
|
45046
|
+
y = _this$container$getBo.y,
|
|
45047
|
+
height = _this$container$getBo.height;
|
|
44912
45048
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
44913
45049
|
var pageX = x + coordinate;
|
|
44914
|
-
var pageY = y + this.offset.top;
|
|
45050
|
+
var pageY = y + this.offset.top + height / 2;
|
|
44915
45051
|
this.mouseHandlerCallback({
|
|
44916
45052
|
pageX: pageX,
|
|
44917
45053
|
pageY: pageY
|
|
@@ -48364,5 +48500,5 @@ var Transfer = function (props) {
|
|
|
48364
48500
|
}) }) }, selectedTargetKeys)] }))] }));
|
|
48365
48501
|
};
|
|
48366
48502
|
|
|
48367
|
-
export { Alert, Button, Card, Chart, Checkbox, Checkboxes, Collapse, Countdown, DataSummary, DateInputField, Dropdown, FileUpload, Flag, Form, Heading, Icon, IconButton, Illustration, Input, InputField, Key$1 as Key, Keyboard, Link, Loading, LocaleSelect, Logo, Medal, Medals, Modal, Notification, Number$1 as Number, NumberField, Paragraph, PasswordInputField, Popup, ProgressBar, Radio, RadioGroup, Range, Result, Select, SelectField, Spacer, Steps, Subheading, Table, Tabs, Tag, Toggle, ToggleField, Tooltip$2 as Tooltip, Transfer, Trophy, theme };
|
|
48503
|
+
export { Alert, Button, Card, Chart, Period as ChartPeriod, Checkbox, Checkboxes, Collapse, Countdown, DataSummary, DateInputField, Dropdown, FileUpload, Flag, Form, Heading, Icon, IconButton, Illustration, Input, InputField, Key$1 as Key, Keyboard, Link, Loading, LocaleSelect, Logo, Medal, Medals, Modal, Notification, Number$1 as Number, NumberField, Paragraph, PasswordInputField, Popup, ProgressBar, Radio, RadioGroup, Range, Result, Select, SelectField, Spacer, Steps, Subheading, Table, Tabs, Tag, Toggle, ToggleField, Tooltip$2 as Tooltip, Transfer, Trophy, theme };
|
|
48368
48504
|
//# sourceMappingURL=index.es.js.map
|