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