@typeolymp/ui-components 1.19.31 → 1.19.32
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/index.es.js +765 -626
- package/build/index.es.js.map +1 -1
- package/build/index.js +765 -626
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/build/components/atoms/Input/translations.d.ts +0 -11
- package/build/components/molecules/Key/translations.d.ts +0 -5
- package/build/components/molecules/PasswordInputField/translations.d.ts +0 -11
- package/build/components/molecules/Tabs/styles.d.ts +0 -2
- package/build/components/organisms/Chart/data copy.d.ts +0 -30
- package/build/components/organisms/Chart/styles.d.ts +0 -1
- package/build/lib/enums.d.ts +0 -4
- package/build/lib/helpers.d.ts +0 -1
- package/build/lib/theme/index.d.ts +0 -3
- package/build/lib/theme/types.d.ts +0 -72
- package/build/lib/translations/index.d.ts +0 -6
- package/build/lib/types/TranslationType.d.ts +0 -7
package/build/index.es.js
CHANGED
|
@@ -4551,7 +4551,7 @@ function requiredArgs(required, args) {
|
|
|
4551
4551
|
}
|
|
4552
4552
|
}
|
|
4553
4553
|
|
|
4554
|
-
function _typeof$
|
|
4554
|
+
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); }
|
|
4555
4555
|
/**
|
|
4556
4556
|
* @name toDate
|
|
4557
4557
|
* @category Common Helpers
|
|
@@ -4587,7 +4587,7 @@ function toDate(argument) {
|
|
|
4587
4587
|
requiredArgs(1, arguments);
|
|
4588
4588
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4589
4589
|
|
|
4590
|
-
if (argument instanceof Date || _typeof$
|
|
4590
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4591
4591
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4592
4592
|
return new Date(argument.getTime());
|
|
4593
4593
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4858,7 +4858,7 @@ var millisecondsInMinute = 60000;
|
|
|
4858
4858
|
|
|
4859
4859
|
var millisecondsInHour = 3600000;
|
|
4860
4860
|
|
|
4861
|
-
function _typeof$
|
|
4861
|
+
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); }
|
|
4862
4862
|
/**
|
|
4863
4863
|
* @name isDate
|
|
4864
4864
|
* @category Common Helpers
|
|
@@ -4894,7 +4894,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4894
4894
|
|
|
4895
4895
|
function isDate(value) {
|
|
4896
4896
|
requiredArgs(1, arguments);
|
|
4897
|
-
return value instanceof Date || _typeof$
|
|
4897
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4898
4898
|
}
|
|
4899
4899
|
|
|
4900
4900
|
/**
|
|
@@ -13670,15 +13670,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13670
13670
|
|
|
13671
13671
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13672
13672
|
|
|
13673
|
-
function _slicedToArray$
|
|
13674
|
-
return _arrayWithHoles$
|
|
13673
|
+
function _slicedToArray$c(arr, i) {
|
|
13674
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13675
13675
|
}
|
|
13676
13676
|
|
|
13677
|
-
function _arrayWithHoles$
|
|
13677
|
+
function _arrayWithHoles$d(arr) {
|
|
13678
13678
|
if (Array.isArray(arr)) return arr;
|
|
13679
13679
|
}
|
|
13680
13680
|
|
|
13681
|
-
function _iterableToArrayLimit$
|
|
13681
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13682
13682
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13683
13683
|
|
|
13684
13684
|
if (_i == null) return;
|
|
@@ -13708,16 +13708,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13708
13708
|
return _arr;
|
|
13709
13709
|
}
|
|
13710
13710
|
|
|
13711
|
-
function _unsupportedIterableToArray$
|
|
13711
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13712
13712
|
if (!o) return;
|
|
13713
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13713
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13714
13714
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13715
13715
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13716
13716
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13717
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13717
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13718
13718
|
}
|
|
13719
13719
|
|
|
13720
|
-
function _arrayLikeToArray$
|
|
13720
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13721
13721
|
if (len == null || len > arr.length) len = arr.length;
|
|
13722
13722
|
|
|
13723
13723
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13725,7 +13725,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13725
13725
|
return arr2;
|
|
13726
13726
|
}
|
|
13727
13727
|
|
|
13728
|
-
function _nonIterableRest$
|
|
13728
|
+
function _nonIterableRest$d() {
|
|
13729
13729
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13730
13730
|
}
|
|
13731
13731
|
|
|
@@ -13789,7 +13789,7 @@ reservedProps.forEach(function (name) {
|
|
|
13789
13789
|
// This is a mapping from React prop names to the attribute names.
|
|
13790
13790
|
|
|
13791
13791
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13792
|
-
var _ref2 = _slicedToArray$
|
|
13792
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13793
13793
|
name = _ref2[0],
|
|
13794
13794
|
attributeName = _ref2[1];
|
|
13795
13795
|
|
|
@@ -16208,31 +16208,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16208
16208
|
return true;
|
|
16209
16209
|
};
|
|
16210
16210
|
|
|
16211
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16211
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16212
16212
|
|
|
16213
16213
|
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."); }
|
|
16214
16214
|
|
|
16215
16215
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16216
16216
|
|
|
16217
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16217
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16218
16218
|
|
|
16219
|
-
function ownKeys$
|
|
16219
|
+
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; }
|
|
16220
16220
|
|
|
16221
|
-
function _objectSpread$
|
|
16221
|
+
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; }
|
|
16222
16222
|
|
|
16223
|
-
function _defineProperty$
|
|
16223
|
+
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; }
|
|
16224
16224
|
|
|
16225
|
-
function _slicedToArray$
|
|
16225
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16226
16226
|
|
|
16227
|
-
function _nonIterableRest$
|
|
16227
|
+
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."); }
|
|
16228
16228
|
|
|
16229
|
-
function _unsupportedIterableToArray$
|
|
16229
|
+
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); }
|
|
16230
16230
|
|
|
16231
|
-
function _arrayLikeToArray$
|
|
16231
|
+
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; }
|
|
16232
16232
|
|
|
16233
|
-
function _iterableToArrayLimit$
|
|
16233
|
+
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; }
|
|
16234
16234
|
|
|
16235
|
-
function _arrayWithHoles$
|
|
16235
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16236
16236
|
|
|
16237
16237
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16238
16238
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16312,11 +16312,11 @@ function allFilesAccepted(_ref) {
|
|
|
16312
16312
|
|
|
16313
16313
|
return files.every(function (file) {
|
|
16314
16314
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16315
|
-
_fileAccepted2 = _slicedToArray$
|
|
16315
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16316
16316
|
accepted = _fileAccepted2[0];
|
|
16317
16317
|
|
|
16318
16318
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16319
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16319
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16320
16320
|
sizeMatch = _fileMatchSize2[0];
|
|
16321
16321
|
|
|
16322
16322
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16413,7 +16413,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16413
16413
|
function pickerOptionsFromAccept(accept) {
|
|
16414
16414
|
if (isDefined(accept)) {
|
|
16415
16415
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16416
|
-
var _ref3 = _slicedToArray$
|
|
16416
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16417
16417
|
mimeType = _ref3[0],
|
|
16418
16418
|
ext = _ref3[1];
|
|
16419
16419
|
|
|
@@ -16431,11 +16431,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16431
16431
|
|
|
16432
16432
|
return ok;
|
|
16433
16433
|
}).reduce(function (agg, _ref4) {
|
|
16434
|
-
var _ref5 = _slicedToArray$
|
|
16434
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16435
16435
|
mimeType = _ref5[0],
|
|
16436
16436
|
ext = _ref5[1];
|
|
16437
16437
|
|
|
16438
|
-
return _objectSpread$
|
|
16438
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16439
16439
|
}, {});
|
|
16440
16440
|
return [{
|
|
16441
16441
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16455,7 +16455,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16455
16455
|
function acceptPropAsAcceptAttr(accept) {
|
|
16456
16456
|
if (isDefined(accept)) {
|
|
16457
16457
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16458
|
-
var _ref7 = _slicedToArray$
|
|
16458
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16459
16459
|
mimeType = _ref7[0],
|
|
16460
16460
|
ext = _ref7[1];
|
|
16461
16461
|
|
|
@@ -16523,40 +16523,40 @@ function isExt(v) {
|
|
|
16523
16523
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16524
16524
|
*/
|
|
16525
16525
|
|
|
16526
|
-
var _excluded$
|
|
16527
|
-
_excluded2$
|
|
16526
|
+
var _excluded$g = ["children"],
|
|
16527
|
+
_excluded2$5 = ["open"],
|
|
16528
16528
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16529
16529
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16530
16530
|
|
|
16531
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16531
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16532
16532
|
|
|
16533
16533
|
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."); }
|
|
16534
16534
|
|
|
16535
16535
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16536
16536
|
|
|
16537
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16537
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16538
16538
|
|
|
16539
|
-
function _slicedToArray$
|
|
16539
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16540
16540
|
|
|
16541
|
-
function _nonIterableRest$
|
|
16541
|
+
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."); }
|
|
16542
16542
|
|
|
16543
|
-
function _unsupportedIterableToArray$
|
|
16543
|
+
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); }
|
|
16544
16544
|
|
|
16545
|
-
function _arrayLikeToArray$
|
|
16545
|
+
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; }
|
|
16546
16546
|
|
|
16547
|
-
function _iterableToArrayLimit$
|
|
16547
|
+
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; }
|
|
16548
16548
|
|
|
16549
|
-
function _arrayWithHoles$
|
|
16549
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16550
16550
|
|
|
16551
|
-
function ownKeys$
|
|
16551
|
+
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; }
|
|
16552
16552
|
|
|
16553
|
-
function _objectSpread$
|
|
16553
|
+
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; }
|
|
16554
16554
|
|
|
16555
|
-
function _defineProperty$
|
|
16555
|
+
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; }
|
|
16556
16556
|
|
|
16557
|
-
function _objectWithoutProperties$
|
|
16557
|
+
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; }
|
|
16558
16558
|
|
|
16559
|
-
function _objectWithoutPropertiesLoose$
|
|
16559
|
+
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; }
|
|
16560
16560
|
/**
|
|
16561
16561
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16562
16562
|
*
|
|
@@ -16574,11 +16574,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16574
16574
|
|
|
16575
16575
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16576
16576
|
var children = _ref.children,
|
|
16577
|
-
params = _objectWithoutProperties$
|
|
16577
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16578
16578
|
|
|
16579
16579
|
var _useDropzone = useDropzone(params),
|
|
16580
16580
|
open = _useDropzone.open,
|
|
16581
|
-
props = _objectWithoutProperties$
|
|
16581
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16582
16582
|
|
|
16583
16583
|
useImperativeHandle(ref, function () {
|
|
16584
16584
|
return {
|
|
@@ -16586,13 +16586,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16586
16586
|
};
|
|
16587
16587
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16588
16588
|
|
|
16589
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16589
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16590
16590
|
open: open
|
|
16591
16591
|
})));
|
|
16592
16592
|
});
|
|
16593
16593
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16594
16594
|
|
|
16595
|
-
var defaultProps$
|
|
16595
|
+
var defaultProps$2 = {
|
|
16596
16596
|
disabled: false,
|
|
16597
16597
|
getFilesFromEvent: fromEvent,
|
|
16598
16598
|
maxSize: Infinity,
|
|
@@ -16608,7 +16608,7 @@ var defaultProps$1 = {
|
|
|
16608
16608
|
useFsAccessApi: true,
|
|
16609
16609
|
autoFocus: false
|
|
16610
16610
|
};
|
|
16611
|
-
Dropzone.defaultProps = defaultProps$
|
|
16611
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16612
16612
|
Dropzone.propTypes = {
|
|
16613
16613
|
/**
|
|
16614
16614
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16959,7 +16959,7 @@ var initialState = {
|
|
|
16959
16959
|
function useDropzone() {
|
|
16960
16960
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16961
16961
|
|
|
16962
|
-
var _defaultProps$props = _objectSpread$
|
|
16962
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16963
16963
|
accept = _defaultProps$props.accept,
|
|
16964
16964
|
disabled = _defaultProps$props.disabled,
|
|
16965
16965
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17006,7 +17006,7 @@ function useDropzone() {
|
|
|
17006
17006
|
var inputRef = useRef(null);
|
|
17007
17007
|
|
|
17008
17008
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
17009
|
-
_useReducer2 = _slicedToArray$
|
|
17009
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
17010
17010
|
state = _useReducer2[0],
|
|
17011
17011
|
dispatch = _useReducer2[1];
|
|
17012
17012
|
|
|
@@ -17176,12 +17176,12 @@ function useDropzone() {
|
|
|
17176
17176
|
var fileRejections = [];
|
|
17177
17177
|
files.forEach(function (file) {
|
|
17178
17178
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17179
|
-
_fileAccepted2 = _slicedToArray$
|
|
17179
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17180
17180
|
accepted = _fileAccepted2[0],
|
|
17181
17181
|
acceptError = _fileAccepted2[1];
|
|
17182
17182
|
|
|
17183
17183
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17184
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17184
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17185
17185
|
sizeMatch = _fileMatchSize2[0],
|
|
17186
17186
|
sizeError = _fileMatchSize2[1];
|
|
17187
17187
|
|
|
@@ -17382,9 +17382,9 @@ function useDropzone() {
|
|
|
17382
17382
|
onDragOver = _ref2.onDragOver,
|
|
17383
17383
|
onDragLeave = _ref2.onDragLeave,
|
|
17384
17384
|
onDrop = _ref2.onDrop,
|
|
17385
|
-
rest = _objectWithoutProperties$
|
|
17385
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17386
17386
|
|
|
17387
|
-
return _objectSpread$
|
|
17387
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17388
17388
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17389
17389
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17390
17390
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17409,9 +17409,9 @@ function useDropzone() {
|
|
|
17409
17409
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17410
17410
|
onChange = _ref3.onChange,
|
|
17411
17411
|
onClick = _ref3.onClick,
|
|
17412
|
-
rest = _objectWithoutProperties$
|
|
17412
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17413
17413
|
|
|
17414
|
-
var inputProps = _defineProperty$
|
|
17414
|
+
var inputProps = _defineProperty$v({
|
|
17415
17415
|
accept: acceptAttr,
|
|
17416
17416
|
multiple: multiple,
|
|
17417
17417
|
type: "file",
|
|
@@ -17423,10 +17423,10 @@ function useDropzone() {
|
|
|
17423
17423
|
tabIndex: -1
|
|
17424
17424
|
}, refKey, inputRef);
|
|
17425
17425
|
|
|
17426
|
-
return _objectSpread$
|
|
17426
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17427
17427
|
};
|
|
17428
17428
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17429
|
-
return _objectSpread$
|
|
17429
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17430
17430
|
isFocused: isFocused && !disabled,
|
|
17431
17431
|
getRootProps: getRootProps,
|
|
17432
17432
|
getInputProps: getInputProps,
|
|
@@ -17445,40 +17445,40 @@ function reducer$1(state, action) {
|
|
|
17445
17445
|
/* istanbul ignore next */
|
|
17446
17446
|
switch (action.type) {
|
|
17447
17447
|
case "focus":
|
|
17448
|
-
return _objectSpread$
|
|
17448
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17449
17449
|
isFocused: true
|
|
17450
17450
|
});
|
|
17451
17451
|
|
|
17452
17452
|
case "blur":
|
|
17453
|
-
return _objectSpread$
|
|
17453
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17454
17454
|
isFocused: false
|
|
17455
17455
|
});
|
|
17456
17456
|
|
|
17457
17457
|
case "openDialog":
|
|
17458
|
-
return _objectSpread$
|
|
17458
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17459
17459
|
isFileDialogActive: true
|
|
17460
17460
|
});
|
|
17461
17461
|
|
|
17462
17462
|
case "closeDialog":
|
|
17463
|
-
return _objectSpread$
|
|
17463
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17464
17464
|
isFileDialogActive: false
|
|
17465
17465
|
});
|
|
17466
17466
|
|
|
17467
17467
|
case "setDraggedFiles":
|
|
17468
|
-
return _objectSpread$
|
|
17468
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17469
17469
|
isDragActive: action.isDragActive,
|
|
17470
17470
|
isDragAccept: action.isDragAccept,
|
|
17471
17471
|
isDragReject: action.isDragReject
|
|
17472
17472
|
});
|
|
17473
17473
|
|
|
17474
17474
|
case "setFiles":
|
|
17475
|
-
return _objectSpread$
|
|
17475
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17476
17476
|
acceptedFiles: action.acceptedFiles,
|
|
17477
17477
|
fileRejections: action.fileRejections
|
|
17478
17478
|
});
|
|
17479
17479
|
|
|
17480
17480
|
case "reset":
|
|
17481
|
-
return _objectSpread$
|
|
17481
|
+
return _objectSpread$t({}, initialState);
|
|
17482
17482
|
|
|
17483
17483
|
default:
|
|
17484
17484
|
return state;
|
|
@@ -19706,7 +19706,7 @@ function shallowEqual(a, b) {
|
|
|
19706
19706
|
return true;
|
|
19707
19707
|
}
|
|
19708
19708
|
|
|
19709
|
-
function _typeof$
|
|
19709
|
+
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); }
|
|
19710
19710
|
|
|
19711
19711
|
//
|
|
19712
19712
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19733,7 +19733,9 @@ var FilteredElementKeyMap = {
|
|
|
19733
19733
|
};
|
|
19734
19734
|
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'];
|
|
19735
19735
|
|
|
19736
|
-
|
|
19736
|
+
/** The type of easing function to use for animations */
|
|
19737
|
+
|
|
19738
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19737
19739
|
|
|
19738
19740
|
/** the offset of a chart, which define the blank space all around */
|
|
19739
19741
|
|
|
@@ -19769,7 +19771,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19769
19771
|
};
|
|
19770
19772
|
};
|
|
19771
19773
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19772
|
-
if (!isObject_1(props) || _typeof$
|
|
19774
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19773
19775
|
return null;
|
|
19774
19776
|
}
|
|
19775
19777
|
var out = null;
|
|
@@ -19783,11 +19785,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19783
19785
|
return out;
|
|
19784
19786
|
};
|
|
19785
19787
|
|
|
19786
|
-
var _excluded$
|
|
19787
|
-
_excluded2$
|
|
19788
|
-
function _objectWithoutProperties$
|
|
19789
|
-
function _objectWithoutPropertiesLoose$
|
|
19790
|
-
function _typeof$
|
|
19788
|
+
var _excluded$f = ["children"],
|
|
19789
|
+
_excluded2$4 = ["children"];
|
|
19790
|
+
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; }
|
|
19791
|
+
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; }
|
|
19792
|
+
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); }
|
|
19791
19793
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19792
19794
|
click: 'onClick',
|
|
19793
19795
|
mousedown: 'onMouseDown',
|
|
@@ -19894,7 +19896,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19894
19896
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19895
19897
|
};
|
|
19896
19898
|
var isDotProps = function isDotProps(dot) {
|
|
19897
|
-
return dot && _typeof$
|
|
19899
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19898
19900
|
};
|
|
19899
19901
|
|
|
19900
19902
|
/**
|
|
@@ -19986,10 +19988,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19986
19988
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19987
19989
|
var _ref = nextChild.props || {},
|
|
19988
19990
|
nextChildren = _ref.children,
|
|
19989
|
-
nextProps = _objectWithoutProperties$
|
|
19991
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
19990
19992
|
var _ref2 = prevChild.props || {},
|
|
19991
19993
|
prevChildren = _ref2.children,
|
|
19992
|
-
prevProps = _objectWithoutProperties$
|
|
19994
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
19993
19995
|
if (nextChildren && prevChildren) {
|
|
19994
19996
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19995
19997
|
}
|
|
@@ -20031,10 +20033,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20031
20033
|
return toArray(children).indexOf(child);
|
|
20032
20034
|
};
|
|
20033
20035
|
|
|
20034
|
-
var _excluded$
|
|
20036
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20035
20037
|
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); }
|
|
20036
|
-
function _objectWithoutProperties$
|
|
20037
|
-
function _objectWithoutPropertiesLoose$
|
|
20038
|
+
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; }
|
|
20039
|
+
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; }
|
|
20038
20040
|
function Surface(props) {
|
|
20039
20041
|
var children = props.children,
|
|
20040
20042
|
width = props.width,
|
|
@@ -20042,7 +20044,7 @@ function Surface(props) {
|
|
|
20042
20044
|
viewBox = props.viewBox,
|
|
20043
20045
|
className = props.className,
|
|
20044
20046
|
style = props.style,
|
|
20045
|
-
others = _objectWithoutProperties$
|
|
20047
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
20046
20048
|
var svgView = viewBox || {
|
|
20047
20049
|
width: width,
|
|
20048
20050
|
height: height,
|
|
@@ -20059,14 +20061,14 @@ function Surface(props) {
|
|
|
20059
20061
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
20060
20062
|
}
|
|
20061
20063
|
|
|
20062
|
-
var _excluded$
|
|
20064
|
+
var _excluded$d = ["children", "className"];
|
|
20063
20065
|
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); }
|
|
20064
|
-
function _objectWithoutProperties$
|
|
20065
|
-
function _objectWithoutPropertiesLoose$
|
|
20066
|
+
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; }
|
|
20067
|
+
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; }
|
|
20066
20068
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
20067
20069
|
var children = props.children,
|
|
20068
20070
|
className = props.className,
|
|
20069
|
-
others = _objectWithoutProperties$
|
|
20071
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
20070
20072
|
var layerClass = classNames('recharts-layer', className);
|
|
20071
20073
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
20072
20074
|
className: layerClass
|
|
@@ -23481,7 +23483,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23481
23483
|
stackOffsetNone(series, order);
|
|
23482
23484
|
}
|
|
23483
23485
|
|
|
23486
|
+
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); }
|
|
23487
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23484
23488
|
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); }
|
|
23489
|
+
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; }
|
|
23490
|
+
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; }
|
|
23491
|
+
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; }
|
|
23492
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23493
|
+
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); }
|
|
23494
|
+
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; }
|
|
23495
|
+
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; }
|
|
23485
23496
|
var symbolFactories = {
|
|
23486
23497
|
symbolCircle: symbolCircle,
|
|
23487
23498
|
symbolCross: symbolCross,
|
|
@@ -23520,31 +23531,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23520
23531
|
return Math.PI * size * size / 4;
|
|
23521
23532
|
}
|
|
23522
23533
|
};
|
|
23523
|
-
var symbolsDefaultProps = {
|
|
23524
|
-
type: 'circle',
|
|
23525
|
-
size: 64,
|
|
23526
|
-
sizeType: 'area'
|
|
23527
|
-
};
|
|
23528
23534
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23529
23535
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23530
23536
|
};
|
|
23531
|
-
var Symbols = function Symbols(
|
|
23537
|
+
var Symbols = function Symbols(_ref) {
|
|
23538
|
+
var _ref$type = _ref.type,
|
|
23539
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23540
|
+
_ref$size = _ref.size,
|
|
23541
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23542
|
+
_ref$sizeType = _ref.sizeType,
|
|
23543
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23544
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23545
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23546
|
+
type: type,
|
|
23547
|
+
size: size,
|
|
23548
|
+
sizeType: sizeType
|
|
23549
|
+
});
|
|
23550
|
+
|
|
23532
23551
|
/**
|
|
23533
23552
|
* Calculate the path of curve
|
|
23534
23553
|
* @return {String} path
|
|
23535
23554
|
*/
|
|
23536
23555
|
var getPath = function getPath() {
|
|
23537
|
-
var size = props.size,
|
|
23538
|
-
sizeType = props.sizeType,
|
|
23539
|
-
type = props.type;
|
|
23540
23556
|
var symbolFactory = getSymbolFactory(type);
|
|
23541
23557
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23542
23558
|
return symbol();
|
|
23543
23559
|
};
|
|
23544
23560
|
var className = props.className,
|
|
23545
23561
|
cx = props.cx,
|
|
23546
|
-
cy = props.cy
|
|
23547
|
-
size = props.size;
|
|
23562
|
+
cy = props.cy;
|
|
23548
23563
|
var filteredProps = filterProps(props, true);
|
|
23549
23564
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23550
23565
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23555,35 +23570,34 @@ var Symbols = function Symbols(props) {
|
|
|
23555
23570
|
}
|
|
23556
23571
|
return null;
|
|
23557
23572
|
};
|
|
23558
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23559
23573
|
Symbols.registerSymbol = registerSymbol;
|
|
23560
23574
|
|
|
23561
|
-
function _typeof$
|
|
23575
|
+
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); }
|
|
23562
23576
|
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); }
|
|
23563
|
-
function ownKeys$
|
|
23564
|
-
function _objectSpread$
|
|
23565
|
-
function _classCallCheck$
|
|
23566
|
-
function _defineProperties$
|
|
23567
|
-
function _createClass$
|
|
23568
|
-
function _inherits$
|
|
23569
|
-
function _setPrototypeOf$
|
|
23570
|
-
function _createSuper$
|
|
23571
|
-
function _possibleConstructorReturn$
|
|
23572
|
-
function _assertThisInitialized$
|
|
23573
|
-
function _isNativeReflectConstruct$
|
|
23574
|
-
function _getPrototypeOf$
|
|
23575
|
-
function _defineProperty$
|
|
23576
|
-
function _toPropertyKey$
|
|
23577
|
-
function _toPrimitive$
|
|
23577
|
+
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; }
|
|
23578
|
+
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; }
|
|
23579
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23580
|
+
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); } }
|
|
23581
|
+
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; }
|
|
23582
|
+
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); }
|
|
23583
|
+
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); }
|
|
23584
|
+
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); }; }
|
|
23585
|
+
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); }
|
|
23586
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23587
|
+
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; } }
|
|
23588
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23589
|
+
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; }
|
|
23590
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23591
|
+
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); }
|
|
23578
23592
|
var SIZE = 32;
|
|
23579
23593
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23580
|
-
_inherits$
|
|
23581
|
-
var _super = _createSuper$
|
|
23594
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23595
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23582
23596
|
function DefaultLegendContent() {
|
|
23583
|
-
_classCallCheck$
|
|
23597
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23584
23598
|
return _super.apply(this, arguments);
|
|
23585
23599
|
}
|
|
23586
|
-
_createClass$
|
|
23600
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23587
23601
|
key: "renderIcon",
|
|
23588
23602
|
value:
|
|
23589
23603
|
/**
|
|
@@ -23628,7 +23642,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23628
23642
|
});
|
|
23629
23643
|
}
|
|
23630
23644
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23631
|
-
var iconProps = _objectSpread$
|
|
23645
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23632
23646
|
delete iconProps.legendIcon;
|
|
23633
23647
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23634
23648
|
}
|
|
@@ -23676,7 +23690,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23676
23690
|
var finalFormatter = entry.formatter || formatter;
|
|
23677
23691
|
var className = classNames((_classNames = {
|
|
23678
23692
|
'recharts-legend-item': true
|
|
23679
|
-
}, _defineProperty$
|
|
23693
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23680
23694
|
if (entry.type === 'none') {
|
|
23681
23695
|
return null;
|
|
23682
23696
|
}
|
|
@@ -23721,8 +23735,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23721
23735
|
}]);
|
|
23722
23736
|
return DefaultLegendContent;
|
|
23723
23737
|
}(PureComponent);
|
|
23724
|
-
_defineProperty$
|
|
23725
|
-
_defineProperty$
|
|
23738
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23739
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23726
23740
|
iconSize: 14,
|
|
23727
23741
|
layout: 'horizontal',
|
|
23728
23742
|
align: 'center',
|
|
@@ -23730,25 +23744,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23730
23744
|
inactiveColor: '#ccc'
|
|
23731
23745
|
});
|
|
23732
23746
|
|
|
23733
|
-
function _typeof$
|
|
23734
|
-
var _excluded$
|
|
23735
|
-
function ownKeys$
|
|
23736
|
-
function _objectSpread$
|
|
23737
|
-
function _classCallCheck$
|
|
23738
|
-
function _defineProperties$
|
|
23739
|
-
function _createClass$
|
|
23740
|
-
function _inherits$
|
|
23741
|
-
function _setPrototypeOf$
|
|
23742
|
-
function _createSuper$
|
|
23743
|
-
function _possibleConstructorReturn$
|
|
23744
|
-
function _assertThisInitialized$
|
|
23745
|
-
function _isNativeReflectConstruct$
|
|
23746
|
-
function _getPrototypeOf$
|
|
23747
|
-
function _defineProperty$
|
|
23748
|
-
function _toPropertyKey$
|
|
23749
|
-
function _toPrimitive$
|
|
23750
|
-
function _objectWithoutProperties$
|
|
23751
|
-
function _objectWithoutPropertiesLoose$
|
|
23747
|
+
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); }
|
|
23748
|
+
var _excluded$b = ["ref"];
|
|
23749
|
+
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; }
|
|
23750
|
+
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; }
|
|
23751
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23752
|
+
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); } }
|
|
23753
|
+
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; }
|
|
23754
|
+
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); }
|
|
23755
|
+
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); }
|
|
23756
|
+
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); }; }
|
|
23757
|
+
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); }
|
|
23758
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23759
|
+
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; } }
|
|
23760
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23761
|
+
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; }
|
|
23762
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23763
|
+
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); }
|
|
23764
|
+
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; }
|
|
23765
|
+
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; }
|
|
23752
23766
|
function defaultUniqBy$1(entry) {
|
|
23753
23767
|
return entry.value;
|
|
23754
23768
|
}
|
|
@@ -23769,27 +23783,27 @@ function renderContent$1(content, props) {
|
|
|
23769
23783
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23770
23784
|
}
|
|
23771
23785
|
props.ref;
|
|
23772
|
-
var otherProps = _objectWithoutProperties$
|
|
23786
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23773
23787
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23774
23788
|
}
|
|
23775
23789
|
var EPS$2 = 1;
|
|
23776
23790
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23777
|
-
_inherits$
|
|
23778
|
-
var _super = _createSuper$
|
|
23791
|
+
_inherits$8(Legend, _PureComponent);
|
|
23792
|
+
var _super = _createSuper$8(Legend);
|
|
23779
23793
|
function Legend() {
|
|
23780
23794
|
var _this;
|
|
23781
|
-
_classCallCheck$
|
|
23795
|
+
_classCallCheck$a(this, Legend);
|
|
23782
23796
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23783
23797
|
args[_key] = arguments[_key];
|
|
23784
23798
|
}
|
|
23785
23799
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23786
|
-
_defineProperty$
|
|
23800
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23787
23801
|
boxWidth: -1,
|
|
23788
23802
|
boxHeight: -1
|
|
23789
23803
|
});
|
|
23790
23804
|
return _this;
|
|
23791
23805
|
}
|
|
23792
|
-
_createClass$
|
|
23806
|
+
_createClass$a(Legend, [{
|
|
23793
23807
|
key: "componentDidMount",
|
|
23794
23808
|
value: function componentDidMount() {
|
|
23795
23809
|
this.updateBBox();
|
|
@@ -23864,7 +23878,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23864
23878
|
};
|
|
23865
23879
|
}
|
|
23866
23880
|
}
|
|
23867
|
-
return _objectSpread$
|
|
23881
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23868
23882
|
}
|
|
23869
23883
|
}, {
|
|
23870
23884
|
key: "updateBBox",
|
|
@@ -23907,7 +23921,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23907
23921
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23908
23922
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23909
23923
|
payload = _this$props2.payload;
|
|
23910
|
-
var outerStyle = _objectSpread$
|
|
23924
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23911
23925
|
position: 'absolute',
|
|
23912
23926
|
width: width || 'auto',
|
|
23913
23927
|
height: height || 'auto'
|
|
@@ -23918,7 +23932,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23918
23932
|
ref: function ref(node) {
|
|
23919
23933
|
_this2.wrapperNode = node;
|
|
23920
23934
|
}
|
|
23921
|
-
}, renderContent$1(content, _objectSpread$
|
|
23935
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23922
23936
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23923
23937
|
})));
|
|
23924
23938
|
}
|
|
@@ -23941,8 +23955,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23941
23955
|
}]);
|
|
23942
23956
|
return Legend;
|
|
23943
23957
|
}(PureComponent);
|
|
23944
|
-
_defineProperty$
|
|
23945
|
-
_defineProperty$
|
|
23958
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23959
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23946
23960
|
iconSize: 14,
|
|
23947
23961
|
layout: 'horizontal',
|
|
23948
23962
|
align: 'center',
|
|
@@ -24506,13 +24520,13 @@ function setRafTimeout(callback) {
|
|
|
24506
24520
|
requestAnimationFrame(shouldUpdate);
|
|
24507
24521
|
}
|
|
24508
24522
|
|
|
24509
|
-
function _typeof$
|
|
24510
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24511
|
-
function _nonIterableRest$
|
|
24512
|
-
function _unsupportedIterableToArray$
|
|
24513
|
-
function _arrayLikeToArray$
|
|
24523
|
+
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); }
|
|
24524
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24525
|
+
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."); }
|
|
24526
|
+
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); }
|
|
24527
|
+
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; }
|
|
24514
24528
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24515
|
-
function _arrayWithHoles$
|
|
24529
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24516
24530
|
function createAnimateManager() {
|
|
24517
24531
|
var currStyle = {};
|
|
24518
24532
|
var handleChange = function handleChange() {
|
|
@@ -24539,7 +24553,7 @@ function createAnimateManager() {
|
|
|
24539
24553
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24540
24554
|
return;
|
|
24541
24555
|
}
|
|
24542
|
-
if (_typeof$
|
|
24556
|
+
if (_typeof$r(_style) === 'object') {
|
|
24543
24557
|
currStyle = _style;
|
|
24544
24558
|
handleChange(currStyle);
|
|
24545
24559
|
}
|
|
@@ -24566,12 +24580,12 @@ function createAnimateManager() {
|
|
|
24566
24580
|
};
|
|
24567
24581
|
}
|
|
24568
24582
|
|
|
24569
|
-
function _typeof$
|
|
24570
|
-
function ownKeys$
|
|
24571
|
-
function _objectSpread$
|
|
24572
|
-
function _defineProperty$
|
|
24573
|
-
function _toPropertyKey$
|
|
24574
|
-
function _toPrimitive$
|
|
24583
|
+
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); }
|
|
24584
|
+
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; }
|
|
24585
|
+
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; }
|
|
24586
|
+
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; }
|
|
24587
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24588
|
+
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); }
|
|
24575
24589
|
/* eslint no-console: 0 */
|
|
24576
24590
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24577
24591
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24603,7 +24617,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24603
24617
|
*/
|
|
24604
24618
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24605
24619
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24606
|
-
return _defineProperty$
|
|
24620
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24607
24621
|
}
|
|
24608
24622
|
var isTransition = name === 'transition';
|
|
24609
24623
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24614,7 +24628,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24614
24628
|
if (isTransition) {
|
|
24615
24629
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24616
24630
|
}
|
|
24617
|
-
return _objectSpread$
|
|
24631
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24618
24632
|
}, {});
|
|
24619
24633
|
};
|
|
24620
24634
|
|
|
@@ -24624,7 +24638,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24624
24638
|
*/
|
|
24625
24639
|
var mapObject = function mapObject(fn, obj) {
|
|
24626
24640
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24627
|
-
return _objectSpread$
|
|
24641
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24628
24642
|
}, {});
|
|
24629
24643
|
};
|
|
24630
24644
|
|
|
@@ -24634,7 +24648,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24634
24648
|
*/
|
|
24635
24649
|
var translateStyle = function translateStyle(style) {
|
|
24636
24650
|
return Object.keys(style).reduce(function (res, key) {
|
|
24637
|
-
return _objectSpread$
|
|
24651
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24638
24652
|
}, style);
|
|
24639
24653
|
};
|
|
24640
24654
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24662,16 +24676,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24662
24676
|
}
|
|
24663
24677
|
};
|
|
24664
24678
|
|
|
24665
|
-
function _slicedToArray$
|
|
24666
|
-
function _nonIterableRest$
|
|
24667
|
-
function _iterableToArrayLimit$
|
|
24668
|
-
function _arrayWithHoles$
|
|
24669
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24679
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24680
|
+
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."); }
|
|
24681
|
+
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; } }
|
|
24682
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24683
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24670
24684
|
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."); }
|
|
24671
|
-
function _unsupportedIterableToArray$
|
|
24685
|
+
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); }
|
|
24672
24686
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24673
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24674
|
-
function _arrayLikeToArray$
|
|
24687
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24688
|
+
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; }
|
|
24675
24689
|
var ACCURACY = 1e-4;
|
|
24676
24690
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24677
24691
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24747,7 +24761,7 @@ var configBezier = function configBezier() {
|
|
|
24747
24761
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24748
24762
|
return parseFloat(x);
|
|
24749
24763
|
});
|
|
24750
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24764
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24751
24765
|
x1 = _easing$1$split$0$spl2[0];
|
|
24752
24766
|
y1 = _easing$1$split$0$spl2[1];
|
|
24753
24767
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24840,22 +24854,22 @@ var configEasing = function configEasing() {
|
|
|
24840
24854
|
return null;
|
|
24841
24855
|
};
|
|
24842
24856
|
|
|
24843
|
-
function _typeof$
|
|
24844
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24857
|
+
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); }
|
|
24858
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24845
24859
|
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."); }
|
|
24846
24860
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24847
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24848
|
-
function ownKeys$
|
|
24849
|
-
function _objectSpread$
|
|
24850
|
-
function _defineProperty$
|
|
24851
|
-
function _toPropertyKey$
|
|
24852
|
-
function _toPrimitive$
|
|
24853
|
-
function _slicedToArray$
|
|
24854
|
-
function _nonIterableRest$
|
|
24855
|
-
function _unsupportedIterableToArray$
|
|
24856
|
-
function _arrayLikeToArray$
|
|
24857
|
-
function _iterableToArrayLimit$
|
|
24858
|
-
function _arrayWithHoles$
|
|
24861
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24862
|
+
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; }
|
|
24863
|
+
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; }
|
|
24864
|
+
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; }
|
|
24865
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24866
|
+
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); }
|
|
24867
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24868
|
+
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."); }
|
|
24869
|
+
function _unsupportedIterableToArray$f(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$f(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$f(o, minLen); }
|
|
24870
|
+
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; }
|
|
24871
|
+
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; } }
|
|
24872
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24859
24873
|
var alpha = function alpha(begin, end, k) {
|
|
24860
24874
|
return begin + (end - begin) * k;
|
|
24861
24875
|
};
|
|
@@ -24873,10 +24887,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24873
24887
|
var nextStepVals = mapObject(function (key, val) {
|
|
24874
24888
|
if (needContinue(val)) {
|
|
24875
24889
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24876
|
-
_easing2 = _slicedToArray$
|
|
24890
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24877
24891
|
newX = _easing2[0],
|
|
24878
24892
|
newV = _easing2[1];
|
|
24879
|
-
return _objectSpread$
|
|
24893
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24880
24894
|
from: newX,
|
|
24881
24895
|
velocity: newV
|
|
24882
24896
|
});
|
|
@@ -24886,7 +24900,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24886
24900
|
if (steps < 1) {
|
|
24887
24901
|
return mapObject(function (key, val) {
|
|
24888
24902
|
if (needContinue(val)) {
|
|
24889
|
-
return _objectSpread$
|
|
24903
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24890
24904
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24891
24905
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24892
24906
|
});
|
|
@@ -24901,10 +24915,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24901
24915
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24902
24916
|
var interKeys = getIntersectionKeys(from, to);
|
|
24903
24917
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24904
|
-
return _objectSpread$
|
|
24918
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24905
24919
|
}, {});
|
|
24906
24920
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24907
|
-
return _objectSpread$
|
|
24921
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24908
24922
|
from: from[key],
|
|
24909
24923
|
velocity: 0,
|
|
24910
24924
|
to: to[key]
|
|
@@ -24934,7 +24948,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24934
24948
|
var steps = deltaTime / easing.dt;
|
|
24935
24949
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24936
24950
|
// get union set and add compatible prefix
|
|
24937
|
-
render(_objectSpread$
|
|
24951
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24938
24952
|
preTime = now;
|
|
24939
24953
|
if (!shouldStopAnimation()) {
|
|
24940
24954
|
cafId = requestAnimationFrame(update);
|
|
@@ -24952,14 +24966,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24952
24966
|
}, timingStyle);
|
|
24953
24967
|
|
|
24954
24968
|
// get union set and add compatible prefix
|
|
24955
|
-
render(_objectSpread$
|
|
24969
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24956
24970
|
if (t < 1) {
|
|
24957
24971
|
cafId = requestAnimationFrame(update);
|
|
24958
24972
|
} else {
|
|
24959
24973
|
var finalStyle = mapObject(function (key, val) {
|
|
24960
24974
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24961
24975
|
}, timingStyle);
|
|
24962
|
-
render(_objectSpread$
|
|
24976
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24963
24977
|
}
|
|
24964
24978
|
};
|
|
24965
24979
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24975,37 +24989,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24975
24989
|
};
|
|
24976
24990
|
});
|
|
24977
24991
|
|
|
24978
|
-
function _typeof$
|
|
24979
|
-
var _excluded$
|
|
24980
|
-
function _objectWithoutProperties$
|
|
24981
|
-
function _objectWithoutPropertiesLoose$
|
|
24982
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24992
|
+
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); }
|
|
24993
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24994
|
+
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; }
|
|
24995
|
+
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; }
|
|
24996
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
24983
24997
|
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."); }
|
|
24984
|
-
function _unsupportedIterableToArray$
|
|
24998
|
+
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); }
|
|
24985
24999
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24986
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24987
|
-
function _arrayLikeToArray$
|
|
24988
|
-
function ownKeys$
|
|
24989
|
-
function _objectSpread$
|
|
24990
|
-
function _defineProperty$
|
|
24991
|
-
function _classCallCheck$
|
|
24992
|
-
function _defineProperties$
|
|
24993
|
-
function _createClass$
|
|
24994
|
-
function _toPropertyKey$
|
|
24995
|
-
function _toPrimitive$
|
|
24996
|
-
function _inherits$
|
|
24997
|
-
function _setPrototypeOf$
|
|
24998
|
-
function _createSuper$
|
|
24999
|
-
function _possibleConstructorReturn$
|
|
25000
|
-
function _assertThisInitialized$
|
|
25001
|
-
function _isNativeReflectConstruct$
|
|
25002
|
-
function _getPrototypeOf$
|
|
25000
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
25001
|
+
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; }
|
|
25002
|
+
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; }
|
|
25003
|
+
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; }
|
|
25004
|
+
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; }
|
|
25005
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25006
|
+
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); } }
|
|
25007
|
+
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; }
|
|
25008
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
25009
|
+
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); }
|
|
25010
|
+
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); }
|
|
25011
|
+
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); }
|
|
25012
|
+
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); }; }
|
|
25013
|
+
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); }
|
|
25014
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25015
|
+
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; } }
|
|
25016
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
25003
25017
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25004
|
-
_inherits$
|
|
25005
|
-
var _super = _createSuper$
|
|
25018
|
+
_inherits$7(Animate, _PureComponent);
|
|
25019
|
+
var _super = _createSuper$7(Animate);
|
|
25006
25020
|
function Animate(props, context) {
|
|
25007
25021
|
var _this;
|
|
25008
|
-
_classCallCheck$
|
|
25022
|
+
_classCallCheck$9(this, Animate);
|
|
25009
25023
|
_this = _super.call(this, props, context);
|
|
25010
25024
|
var _this$props = _this.props,
|
|
25011
25025
|
isActive = _this$props.isActive,
|
|
@@ -25015,8 +25029,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25015
25029
|
steps = _this$props.steps,
|
|
25016
25030
|
children = _this$props.children,
|
|
25017
25031
|
duration = _this$props.duration;
|
|
25018
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25019
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25032
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
25033
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
25020
25034
|
if (!isActive || duration <= 0) {
|
|
25021
25035
|
_this.state = {
|
|
25022
25036
|
style: {}
|
|
@@ -25028,7 +25042,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25028
25042
|
style: to
|
|
25029
25043
|
};
|
|
25030
25044
|
}
|
|
25031
|
-
return _possibleConstructorReturn$
|
|
25045
|
+
return _possibleConstructorReturn$7(_this);
|
|
25032
25046
|
}
|
|
25033
25047
|
if (steps && steps.length) {
|
|
25034
25048
|
_this.state = {
|
|
@@ -25039,10 +25053,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25039
25053
|
_this.state = {
|
|
25040
25054
|
style: from
|
|
25041
25055
|
};
|
|
25042
|
-
return _possibleConstructorReturn$
|
|
25056
|
+
return _possibleConstructorReturn$7(_this);
|
|
25043
25057
|
}
|
|
25044
25058
|
_this.state = {
|
|
25045
|
-
style: attributeName ? _defineProperty$
|
|
25059
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25046
25060
|
};
|
|
25047
25061
|
} else {
|
|
25048
25062
|
_this.state = {
|
|
@@ -25051,7 +25065,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25051
25065
|
}
|
|
25052
25066
|
return _this;
|
|
25053
25067
|
}
|
|
25054
|
-
_createClass$
|
|
25068
|
+
_createClass$9(Animate, [{
|
|
25055
25069
|
key: "componentDidMount",
|
|
25056
25070
|
value: function componentDidMount() {
|
|
25057
25071
|
var _this$props2 = this.props,
|
|
@@ -25079,7 +25093,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25079
25093
|
}
|
|
25080
25094
|
if (!isActive) {
|
|
25081
25095
|
var newState = {
|
|
25082
|
-
style: attributeName ? _defineProperty$
|
|
25096
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
25083
25097
|
};
|
|
25084
25098
|
if (this.state && style) {
|
|
25085
25099
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25102,14 +25116,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25102
25116
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25103
25117
|
if (this.state && style) {
|
|
25104
25118
|
var _newState = {
|
|
25105
|
-
style: attributeName ? _defineProperty$
|
|
25119
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25106
25120
|
};
|
|
25107
25121
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25108
25122
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25109
25123
|
this.setState(_newState);
|
|
25110
25124
|
}
|
|
25111
25125
|
}
|
|
25112
|
-
this.runAnimation(_objectSpread$
|
|
25126
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
25113
25127
|
from: from,
|
|
25114
25128
|
begin: 0
|
|
25115
25129
|
}));
|
|
@@ -25192,7 +25206,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25192
25206
|
}), duration]);
|
|
25193
25207
|
}
|
|
25194
25208
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25195
|
-
var newStyle = _objectSpread$
|
|
25209
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25196
25210
|
transition: transition
|
|
25197
25211
|
});
|
|
25198
25212
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25224,9 +25238,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25224
25238
|
this.runStepAnimation(props);
|
|
25225
25239
|
return;
|
|
25226
25240
|
}
|
|
25227
|
-
var to = attributeName ? _defineProperty$
|
|
25241
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25228
25242
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25229
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25243
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25230
25244
|
transition: transition
|
|
25231
25245
|
}), duration, onAnimationEnd]);
|
|
25232
25246
|
}
|
|
@@ -25247,7 +25261,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25247
25261
|
_this$props4.onAnimationEnd;
|
|
25248
25262
|
_this$props4.shouldReAnimate;
|
|
25249
25263
|
_this$props4.onAnimationReStart;
|
|
25250
|
-
var others = _objectWithoutProperties$
|
|
25264
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25251
25265
|
var count = Children.count(children);
|
|
25252
25266
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25253
25267
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25262,8 +25276,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25262
25276
|
_container$props$styl = _container$props.style,
|
|
25263
25277
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25264
25278
|
className = _container$props.className;
|
|
25265
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25266
|
-
style: _objectSpread$
|
|
25279
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25280
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25267
25281
|
className: className
|
|
25268
25282
|
}));
|
|
25269
25283
|
return res;
|
|
@@ -25788,10 +25802,10 @@ var defineProperty$2 = (function() {
|
|
|
25788
25802
|
} catch (e) {}
|
|
25789
25803
|
}());
|
|
25790
25804
|
|
|
25791
|
-
var _defineProperty$
|
|
25805
|
+
var _defineProperty$o = defineProperty$2;
|
|
25792
25806
|
|
|
25793
25807
|
var constant$1 = constant_1,
|
|
25794
|
-
defineProperty$1 = _defineProperty$
|
|
25808
|
+
defineProperty$1 = _defineProperty$o,
|
|
25795
25809
|
identity$7 = identity_1;
|
|
25796
25810
|
|
|
25797
25811
|
/**
|
|
@@ -25968,18 +25982,18 @@ var sortBy_1 = sortBy;
|
|
|
25968
25982
|
/**
|
|
25969
25983
|
* @fileOverview Default Tooltip Content
|
|
25970
25984
|
*/
|
|
25971
|
-
function _typeof$
|
|
25972
|
-
function _slicedToArray$
|
|
25973
|
-
function _nonIterableRest$
|
|
25974
|
-
function _unsupportedIterableToArray$
|
|
25975
|
-
function _arrayLikeToArray$
|
|
25976
|
-
function _iterableToArrayLimit$
|
|
25977
|
-
function _arrayWithHoles$
|
|
25978
|
-
function ownKeys$
|
|
25979
|
-
function _objectSpread$
|
|
25980
|
-
function _defineProperty$
|
|
25981
|
-
function _toPropertyKey$
|
|
25982
|
-
function _toPrimitive$
|
|
25985
|
+
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); }
|
|
25986
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25987
|
+
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."); }
|
|
25988
|
+
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); }
|
|
25989
|
+
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; }
|
|
25990
|
+
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; } }
|
|
25991
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25992
|
+
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; }
|
|
25993
|
+
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; }
|
|
25994
|
+
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; }
|
|
25995
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
25996
|
+
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); }
|
|
25983
25997
|
function defaultFormatter(value) {
|
|
25984
25998
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25985
25999
|
}
|
|
@@ -26009,7 +26023,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26009
26023
|
if (entry.type === 'none') {
|
|
26010
26024
|
return null;
|
|
26011
26025
|
}
|
|
26012
|
-
var finalItemStyle = _objectSpread$
|
|
26026
|
+
var finalItemStyle = _objectSpread$m({
|
|
26013
26027
|
display: 'block',
|
|
26014
26028
|
paddingTop: 4,
|
|
26015
26029
|
paddingBottom: 4,
|
|
@@ -26023,7 +26037,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26023
26037
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26024
26038
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26025
26039
|
if (Array.isArray(formatted)) {
|
|
26026
|
-
var _formatted = _slicedToArray$
|
|
26040
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
26027
26041
|
finalValue = _formatted[0];
|
|
26028
26042
|
finalName = _formatted[1];
|
|
26029
26043
|
} else {
|
|
@@ -26055,14 +26069,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26055
26069
|
}
|
|
26056
26070
|
return null;
|
|
26057
26071
|
};
|
|
26058
|
-
var finalStyle = _objectSpread$
|
|
26072
|
+
var finalStyle = _objectSpread$m({
|
|
26059
26073
|
margin: 0,
|
|
26060
26074
|
padding: 10,
|
|
26061
26075
|
backgroundColor: '#fff',
|
|
26062
26076
|
border: '1px solid #ccc',
|
|
26063
26077
|
whiteSpace: 'nowrap'
|
|
26064
26078
|
}, contentStyle);
|
|
26065
|
-
var finalLabelStyle = _objectSpread$
|
|
26079
|
+
var finalLabelStyle = _objectSpread$m({
|
|
26066
26080
|
margin: 0
|
|
26067
26081
|
}, labelStyle);
|
|
26068
26082
|
var hasLabel = !isNil_1(label);
|
|
@@ -26103,18 +26117,22 @@ var Global = {
|
|
|
26103
26117
|
}
|
|
26104
26118
|
};
|
|
26105
26119
|
|
|
26106
|
-
function _typeof$
|
|
26107
|
-
function ownKeys$
|
|
26108
|
-
function _objectSpread$
|
|
26109
|
-
function
|
|
26110
|
-
function
|
|
26111
|
-
function
|
|
26112
|
-
function
|
|
26113
|
-
function
|
|
26114
|
-
function
|
|
26115
|
-
function
|
|
26116
|
-
function
|
|
26117
|
-
function
|
|
26120
|
+
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); }
|
|
26121
|
+
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; }
|
|
26122
|
+
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; }
|
|
26123
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26124
|
+
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); } }
|
|
26125
|
+
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; }
|
|
26126
|
+
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); }
|
|
26127
|
+
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); }
|
|
26128
|
+
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); }; }
|
|
26129
|
+
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); }
|
|
26130
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26131
|
+
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; } }
|
|
26132
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26133
|
+
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; }
|
|
26134
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26135
|
+
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); }
|
|
26118
26136
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26119
26137
|
var EPS$1 = 1;
|
|
26120
26138
|
function defaultUniqBy(entry) {
|
|
@@ -26138,7 +26156,204 @@ function renderContent(content, props) {
|
|
|
26138
26156
|
}
|
|
26139
26157
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26140
26158
|
}
|
|
26141
|
-
var
|
|
26159
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
26160
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
26161
|
+
var _super = _createSuper$6(Tooltip);
|
|
26162
|
+
function Tooltip() {
|
|
26163
|
+
var _this;
|
|
26164
|
+
_classCallCheck$8(this, Tooltip);
|
|
26165
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26166
|
+
args[_key] = arguments[_key];
|
|
26167
|
+
}
|
|
26168
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
26169
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26170
|
+
boxWidth: -1,
|
|
26171
|
+
boxHeight: -1,
|
|
26172
|
+
dismissed: false,
|
|
26173
|
+
dismissedAtCoordinate: {
|
|
26174
|
+
x: 0,
|
|
26175
|
+
y: 0
|
|
26176
|
+
}
|
|
26177
|
+
});
|
|
26178
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26179
|
+
if (event.key === 'Escape') {
|
|
26180
|
+
_this.setState({
|
|
26181
|
+
dismissed: true,
|
|
26182
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26183
|
+
x: _this.props.coordinate.x,
|
|
26184
|
+
y: _this.props.coordinate.y
|
|
26185
|
+
})
|
|
26186
|
+
});
|
|
26187
|
+
}
|
|
26188
|
+
});
|
|
26189
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26190
|
+
var key = _ref.key,
|
|
26191
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26192
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26193
|
+
var _this$props = _this.props,
|
|
26194
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26195
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26196
|
+
coordinate = _this$props.coordinate,
|
|
26197
|
+
offset = _this$props.offset,
|
|
26198
|
+
position = _this$props.position,
|
|
26199
|
+
viewBox = _this$props.viewBox;
|
|
26200
|
+
if (position && isNumber(position[key])) {
|
|
26201
|
+
return position[key];
|
|
26202
|
+
}
|
|
26203
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26204
|
+
var positive = coordinate[key] + offset;
|
|
26205
|
+
if (allowEscapeViewBox[key]) {
|
|
26206
|
+
return reverseDirection[key] ? negative : positive;
|
|
26207
|
+
}
|
|
26208
|
+
if (reverseDirection[key]) {
|
|
26209
|
+
var _tooltipBoundary = negative;
|
|
26210
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26211
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26212
|
+
return Math.max(positive, viewBox[key]);
|
|
26213
|
+
}
|
|
26214
|
+
return Math.max(negative, viewBox[key]);
|
|
26215
|
+
}
|
|
26216
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26217
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26218
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26219
|
+
return Math.max(negative, viewBox[key]);
|
|
26220
|
+
}
|
|
26221
|
+
return Math.max(positive, viewBox[key]);
|
|
26222
|
+
});
|
|
26223
|
+
return _this;
|
|
26224
|
+
}
|
|
26225
|
+
_createClass$8(Tooltip, [{
|
|
26226
|
+
key: "componentDidMount",
|
|
26227
|
+
value: function componentDidMount() {
|
|
26228
|
+
this.updateBBox();
|
|
26229
|
+
}
|
|
26230
|
+
}, {
|
|
26231
|
+
key: "componentWillUnmount",
|
|
26232
|
+
value: function componentWillUnmount() {
|
|
26233
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26234
|
+
}
|
|
26235
|
+
}, {
|
|
26236
|
+
key: "componentDidUpdate",
|
|
26237
|
+
value: function componentDidUpdate() {
|
|
26238
|
+
this.updateBBox();
|
|
26239
|
+
}
|
|
26240
|
+
}, {
|
|
26241
|
+
key: "updateBBox",
|
|
26242
|
+
value: function updateBBox() {
|
|
26243
|
+
var _this$state = this.state,
|
|
26244
|
+
boxWidth = _this$state.boxWidth,
|
|
26245
|
+
boxHeight = _this$state.boxHeight,
|
|
26246
|
+
dismissed = _this$state.dismissed;
|
|
26247
|
+
if (dismissed) {
|
|
26248
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26249
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26250
|
+
this.setState({
|
|
26251
|
+
dismissed: false
|
|
26252
|
+
});
|
|
26253
|
+
}
|
|
26254
|
+
} else {
|
|
26255
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26256
|
+
}
|
|
26257
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26258
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26259
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26260
|
+
this.setState({
|
|
26261
|
+
boxWidth: box.width,
|
|
26262
|
+
boxHeight: box.height
|
|
26263
|
+
});
|
|
26264
|
+
}
|
|
26265
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26266
|
+
this.setState({
|
|
26267
|
+
boxWidth: -1,
|
|
26268
|
+
boxHeight: -1
|
|
26269
|
+
});
|
|
26270
|
+
}
|
|
26271
|
+
}
|
|
26272
|
+
}, {
|
|
26273
|
+
key: "render",
|
|
26274
|
+
value: function render() {
|
|
26275
|
+
var _classNames,
|
|
26276
|
+
_this2 = this;
|
|
26277
|
+
var _this$props2 = this.props,
|
|
26278
|
+
payload = _this$props2.payload,
|
|
26279
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26280
|
+
animationDuration = _this$props2.animationDuration,
|
|
26281
|
+
animationEasing = _this$props2.animationEasing,
|
|
26282
|
+
filterNull = _this$props2.filterNull,
|
|
26283
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26284
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26285
|
+
return !isNil_1(entry.value);
|
|
26286
|
+
}) : payload);
|
|
26287
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26288
|
+
var _this$props3 = this.props,
|
|
26289
|
+
content = _this$props3.content,
|
|
26290
|
+
viewBox = _this$props3.viewBox,
|
|
26291
|
+
coordinate = _this$props3.coordinate,
|
|
26292
|
+
position = _this$props3.position,
|
|
26293
|
+
active = _this$props3.active,
|
|
26294
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26295
|
+
var outerStyle = _objectSpread$l({
|
|
26296
|
+
pointerEvents: 'none',
|
|
26297
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26298
|
+
position: 'absolute',
|
|
26299
|
+
top: 0,
|
|
26300
|
+
left: 0
|
|
26301
|
+
}, wrapperStyle);
|
|
26302
|
+
var translateX, translateY;
|
|
26303
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26304
|
+
translateX = position.x;
|
|
26305
|
+
translateY = position.y;
|
|
26306
|
+
} else {
|
|
26307
|
+
var _this$state2 = this.state,
|
|
26308
|
+
boxWidth = _this$state2.boxWidth,
|
|
26309
|
+
boxHeight = _this$state2.boxHeight;
|
|
26310
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26311
|
+
translateX = this.getTranslate({
|
|
26312
|
+
key: 'x',
|
|
26313
|
+
tooltipDimension: boxWidth,
|
|
26314
|
+
viewBoxDimension: viewBox.width
|
|
26315
|
+
});
|
|
26316
|
+
translateY = this.getTranslate({
|
|
26317
|
+
key: 'y',
|
|
26318
|
+
tooltipDimension: boxHeight,
|
|
26319
|
+
viewBoxDimension: viewBox.height
|
|
26320
|
+
});
|
|
26321
|
+
} else {
|
|
26322
|
+
outerStyle.visibility = 'hidden';
|
|
26323
|
+
}
|
|
26324
|
+
}
|
|
26325
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26326
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26327
|
+
})), outerStyle);
|
|
26328
|
+
if (isAnimationActive && active) {
|
|
26329
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26330
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26331
|
+
})), outerStyle);
|
|
26332
|
+
}
|
|
26333
|
+
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));
|
|
26334
|
+
return (
|
|
26335
|
+
/*#__PURE__*/
|
|
26336
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26337
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26338
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26339
|
+
React__default.createElement("div", {
|
|
26340
|
+
tabIndex: -1,
|
|
26341
|
+
role: "dialog",
|
|
26342
|
+
className: cls,
|
|
26343
|
+
style: outerStyle,
|
|
26344
|
+
ref: function ref(node) {
|
|
26345
|
+
_this2.wrapperNode = node;
|
|
26346
|
+
}
|
|
26347
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26348
|
+
payload: finalPayload
|
|
26349
|
+
})))
|
|
26350
|
+
);
|
|
26351
|
+
}
|
|
26352
|
+
}]);
|
|
26353
|
+
return Tooltip;
|
|
26354
|
+
}(PureComponent);
|
|
26355
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26356
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26142
26357
|
active: false,
|
|
26143
26358
|
allowEscapeViewBox: {
|
|
26144
26359
|
x: false,
|
|
@@ -26159,9 +26374,6 @@ var tooltipDefaultProps = {
|
|
|
26159
26374
|
x: 0,
|
|
26160
26375
|
y: 0
|
|
26161
26376
|
},
|
|
26162
|
-
// this doesn't exist on TooltipProps
|
|
26163
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26164
|
-
// @ts-ignore
|
|
26165
26377
|
cursorStyle: {},
|
|
26166
26378
|
separator: ' : ',
|
|
26167
26379
|
wrapperStyle: {},
|
|
@@ -26175,173 +26387,7 @@ var tooltipDefaultProps = {
|
|
|
26175
26387
|
animationDuration: 400,
|
|
26176
26388
|
filterNull: true,
|
|
26177
26389
|
useTranslate3d: false
|
|
26178
|
-
};
|
|
26179
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26180
|
-
var _classNames;
|
|
26181
|
-
var _useState = useState(-1),
|
|
26182
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26183
|
-
boxWidth = _useState2[0],
|
|
26184
|
-
setBoxWidth = _useState2[1];
|
|
26185
|
-
var _useState3 = useState(-1),
|
|
26186
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26187
|
-
boxHeight = _useState4[0],
|
|
26188
|
-
setBoxHeight = _useState4[1];
|
|
26189
|
-
var _useState5 = useState(false),
|
|
26190
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26191
|
-
dismissed = _useState6[0],
|
|
26192
|
-
setDismissed = _useState6[1];
|
|
26193
|
-
var _useState7 = useState({
|
|
26194
|
-
x: 0,
|
|
26195
|
-
y: 0
|
|
26196
|
-
}),
|
|
26197
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26198
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26199
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26200
|
-
var wrapperNode = useRef();
|
|
26201
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26202
|
-
reverseDirection = props.reverseDirection,
|
|
26203
|
-
coordinate = props.coordinate,
|
|
26204
|
-
offset = props.offset,
|
|
26205
|
-
position = props.position,
|
|
26206
|
-
viewBox = props.viewBox;
|
|
26207
|
-
var handleKeyDown = useCallback(function (event) {
|
|
26208
|
-
if (event.key === 'Escape') {
|
|
26209
|
-
setDismissed(true);
|
|
26210
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26211
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26212
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26213
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26214
|
-
});
|
|
26215
|
-
});
|
|
26216
|
-
}
|
|
26217
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26218
|
-
useEffect(function () {
|
|
26219
|
-
var updateBBox = function updateBBox() {
|
|
26220
|
-
if (dismissed) {
|
|
26221
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26222
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26223
|
-
setDismissed(false);
|
|
26224
|
-
}
|
|
26225
|
-
} else {
|
|
26226
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26227
|
-
}
|
|
26228
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26229
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26230
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26231
|
-
setBoxWidth(box.width);
|
|
26232
|
-
setBoxHeight(box.height);
|
|
26233
|
-
}
|
|
26234
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26235
|
-
setBoxWidth(-1);
|
|
26236
|
-
setBoxHeight(-1);
|
|
26237
|
-
}
|
|
26238
|
-
};
|
|
26239
|
-
updateBBox();
|
|
26240
|
-
return function () {
|
|
26241
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26242
|
-
};
|
|
26243
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26244
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26245
|
-
var key = _ref.key,
|
|
26246
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26247
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26248
|
-
if (position && isNumber(position[key])) {
|
|
26249
|
-
return position[key];
|
|
26250
|
-
}
|
|
26251
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26252
|
-
var positive = coordinate[key] + offset;
|
|
26253
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26254
|
-
return reverseDirection[key] ? negative : positive;
|
|
26255
|
-
}
|
|
26256
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26257
|
-
var _tooltipBoundary = negative;
|
|
26258
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26259
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26260
|
-
return Math.max(positive, viewBox[key]);
|
|
26261
|
-
}
|
|
26262
|
-
return Math.max(negative, viewBox[key]);
|
|
26263
|
-
}
|
|
26264
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26265
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26266
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26267
|
-
return Math.max(negative, viewBox[key]);
|
|
26268
|
-
}
|
|
26269
|
-
return Math.max(positive, viewBox[key]);
|
|
26270
|
-
};
|
|
26271
|
-
var payload = props.payload,
|
|
26272
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26273
|
-
filterNull = props.filterNull,
|
|
26274
|
-
active = props.active,
|
|
26275
|
-
wrapperStyle = props.wrapperStyle,
|
|
26276
|
-
useTranslate3d = props.useTranslate3d,
|
|
26277
|
-
isAnimationActive = props.isAnimationActive,
|
|
26278
|
-
animationDuration = props.animationDuration,
|
|
26279
|
-
animationEasing = props.animationEasing;
|
|
26280
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26281
|
-
return !isNil_1(entry.value);
|
|
26282
|
-
}) : payload);
|
|
26283
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26284
|
-
var content = props.content;
|
|
26285
|
-
var outerStyle = _objectSpread$i({
|
|
26286
|
-
pointerEvents: 'none',
|
|
26287
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26288
|
-
position: 'absolute',
|
|
26289
|
-
top: 0,
|
|
26290
|
-
left: 0
|
|
26291
|
-
}, wrapperStyle);
|
|
26292
|
-
var translateX, translateY;
|
|
26293
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26294
|
-
translateX = position.x;
|
|
26295
|
-
translateY = position.y;
|
|
26296
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26297
|
-
translateX = getTranslate({
|
|
26298
|
-
key: 'x',
|
|
26299
|
-
tooltipDimension: boxWidth,
|
|
26300
|
-
viewBoxDimension: viewBox.width
|
|
26301
|
-
});
|
|
26302
|
-
translateY = getTranslate({
|
|
26303
|
-
key: 'y',
|
|
26304
|
-
tooltipDimension: boxHeight,
|
|
26305
|
-
viewBoxDimension: viewBox.height
|
|
26306
|
-
});
|
|
26307
|
-
} else {
|
|
26308
|
-
outerStyle.visibility = 'hidden';
|
|
26309
|
-
}
|
|
26310
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26311
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26312
|
-
})), outerStyle);
|
|
26313
|
-
if (isAnimationActive && active) {
|
|
26314
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26315
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26316
|
-
})), outerStyle);
|
|
26317
|
-
}
|
|
26318
|
-
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));
|
|
26319
|
-
return (
|
|
26320
|
-
/*#__PURE__*/
|
|
26321
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26322
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26323
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26324
|
-
React__default.createElement("div", {
|
|
26325
|
-
tabIndex: -1,
|
|
26326
|
-
role: "dialog",
|
|
26327
|
-
className: cls,
|
|
26328
|
-
style: outerStyle,
|
|
26329
|
-
ref: wrapperNode
|
|
26330
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26331
|
-
payload: finalPayload
|
|
26332
|
-
})))
|
|
26333
|
-
);
|
|
26334
|
-
};
|
|
26335
|
-
|
|
26336
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26337
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26338
|
-
|
|
26339
|
-
/**
|
|
26340
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26341
|
-
* children.props when there are no props set by the consumer
|
|
26342
|
-
* doesn't work if using default parameters
|
|
26343
|
-
*/
|
|
26344
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26390
|
+
});
|
|
26345
26391
|
|
|
26346
26392
|
var root = _root;
|
|
26347
26393
|
|
|
@@ -31911,12 +31957,12 @@ module.exports = exports['default'];
|
|
|
31911
31957
|
|
|
31912
31958
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31913
31959
|
|
|
31914
|
-
function _typeof$
|
|
31915
|
-
function ownKeys$
|
|
31916
|
-
function _objectSpread$
|
|
31917
|
-
function _defineProperty$
|
|
31918
|
-
function _toPropertyKey$
|
|
31919
|
-
function _toPrimitive$
|
|
31960
|
+
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); }
|
|
31961
|
+
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; }
|
|
31962
|
+
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; }
|
|
31963
|
+
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; }
|
|
31964
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31965
|
+
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); }
|
|
31920
31966
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31921
31967
|
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."); }
|
|
31922
31968
|
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); }
|
|
@@ -31984,7 +32030,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31984
32030
|
}
|
|
31985
32031
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31986
32032
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31987
|
-
var measurementSpanStyle = _objectSpread$
|
|
32033
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
31988
32034
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31989
32035
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31990
32036
|
return styleKey;
|
|
@@ -32039,10 +32085,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32039
32085
|
};
|
|
32040
32086
|
};
|
|
32041
32087
|
|
|
32042
|
-
var _excluded$
|
|
32088
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
32089
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32043
32090
|
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); }
|
|
32044
|
-
function _objectWithoutProperties$
|
|
32045
|
-
function _objectWithoutPropertiesLoose$
|
|
32091
|
+
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; }
|
|
32092
|
+
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; }
|
|
32046
32093
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32047
32094
|
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."); }
|
|
32048
32095
|
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); }
|
|
@@ -32196,45 +32243,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32196
32243
|
}
|
|
32197
32244
|
return getWordsWithoutCalculate(children);
|
|
32198
32245
|
};
|
|
32199
|
-
var
|
|
32200
|
-
|
|
32201
|
-
|
|
32202
|
-
|
|
32203
|
-
|
|
32204
|
-
|
|
32205
|
-
|
|
32206
|
-
|
|
32207
|
-
|
|
32208
|
-
|
|
32209
|
-
|
|
32210
|
-
|
|
32211
|
-
|
|
32246
|
+
var DEFAULT_FILL = '#808080';
|
|
32247
|
+
var Text = function Text(_ref5) {
|
|
32248
|
+
var _ref5$x = _ref5.x,
|
|
32249
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32250
|
+
_ref5$y = _ref5.y,
|
|
32251
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32252
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32253
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32254
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32255
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32256
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32257
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32258
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32259
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32260
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32261
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32262
|
+
_ref5$fill = _ref5.fill,
|
|
32263
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32264
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32212
32265
|
var wordsByLines = useMemo(function () {
|
|
32213
32266
|
return getWordsByLines({
|
|
32214
32267
|
breakAll: props.breakAll,
|
|
32215
32268
|
children: props.children,
|
|
32216
32269
|
maxLines: props.maxLines,
|
|
32217
|
-
scaleToFit:
|
|
32270
|
+
scaleToFit: scaleToFit,
|
|
32218
32271
|
style: props.style,
|
|
32219
32272
|
width: props.width
|
|
32220
32273
|
});
|
|
32221
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32274
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32222
32275
|
var dx = props.dx,
|
|
32223
32276
|
dy = props.dy,
|
|
32224
|
-
textAnchor = props.textAnchor,
|
|
32225
|
-
verticalAnchor = props.verticalAnchor,
|
|
32226
|
-
scaleToFit = props.scaleToFit,
|
|
32227
32277
|
angle = props.angle,
|
|
32228
|
-
lineHeight = props.lineHeight,
|
|
32229
|
-
capHeight = props.capHeight,
|
|
32230
32278
|
className = props.className,
|
|
32231
32279
|
breakAll = props.breakAll,
|
|
32232
|
-
textProps = _objectWithoutProperties$
|
|
32233
|
-
if (!isNumOrStr(
|
|
32280
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32281
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32234
32282
|
return null;
|
|
32235
32283
|
}
|
|
32236
|
-
var x =
|
|
32237
|
-
var y =
|
|
32284
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32285
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32238
32286
|
var startDy;
|
|
32239
32287
|
switch (verticalAnchor) {
|
|
32240
32288
|
case 'start':
|
|
@@ -32264,7 +32312,7 @@ var Text = function Text(props) {
|
|
|
32264
32312
|
y: y,
|
|
32265
32313
|
className: classNames('recharts-text', className),
|
|
32266
32314
|
textAnchor: textAnchor,
|
|
32267
|
-
fill:
|
|
32315
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32268
32316
|
}), wordsByLines.map(function (line, index) {
|
|
32269
32317
|
return (
|
|
32270
32318
|
/*#__PURE__*/
|
|
@@ -32277,7 +32325,6 @@ var Text = function Text(props) {
|
|
|
32277
32325
|
);
|
|
32278
32326
|
}));
|
|
32279
32327
|
};
|
|
32280
|
-
Text.defaultProps = textDefaultProps;
|
|
32281
32328
|
|
|
32282
32329
|
var baseIsEqual = _baseIsEqual;
|
|
32283
32330
|
|
|
@@ -38545,7 +38592,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38545
38592
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38546
38593
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38547
38594
|
|
|
38548
|
-
var _excluded$
|
|
38595
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38549
38596
|
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); }
|
|
38550
38597
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38551
38598
|
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."); }
|
|
@@ -38553,8 +38600,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38553
38600
|
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; }
|
|
38554
38601
|
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; } }
|
|
38555
38602
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38556
|
-
function _objectWithoutProperties$
|
|
38557
|
-
function _objectWithoutPropertiesLoose$
|
|
38603
|
+
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; }
|
|
38604
|
+
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; }
|
|
38558
38605
|
function ErrorBar(props) {
|
|
38559
38606
|
var offset = props.offset,
|
|
38560
38607
|
layout = props.layout,
|
|
@@ -38564,7 +38611,7 @@ function ErrorBar(props) {
|
|
|
38564
38611
|
dataPointFormatter = props.dataPointFormatter,
|
|
38565
38612
|
xAxis = props.xAxis,
|
|
38566
38613
|
yAxis = props.yAxis,
|
|
38567
|
-
others = _objectWithoutProperties$
|
|
38614
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38568
38615
|
var svgProps = filterProps(others);
|
|
38569
38616
|
var errorBars = data.map(function (entry, i) {
|
|
38570
38617
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38675,18 +38722,18 @@ ErrorBar.defaultProps = {
|
|
|
38675
38722
|
};
|
|
38676
38723
|
ErrorBar.displayName = 'ErrorBar';
|
|
38677
38724
|
|
|
38678
|
-
function _typeof$
|
|
38725
|
+
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); }
|
|
38679
38726
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38680
38727
|
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."); }
|
|
38681
38728
|
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); }
|
|
38682
38729
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38683
38730
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38684
38731
|
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; }
|
|
38685
|
-
function ownKeys$
|
|
38686
|
-
function _objectSpread$
|
|
38687
|
-
function _defineProperty$
|
|
38688
|
-
function _toPropertyKey$
|
|
38689
|
-
function _toPrimitive$
|
|
38732
|
+
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; }
|
|
38733
|
+
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; }
|
|
38734
|
+
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; }
|
|
38735
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38736
|
+
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); }
|
|
38690
38737
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38691
38738
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38692
38739
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38857,7 +38904,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38857
38904
|
};
|
|
38858
38905
|
});
|
|
38859
38906
|
}
|
|
38860
|
-
return _objectSpread$
|
|
38907
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38861
38908
|
payload: legendData,
|
|
38862
38909
|
item: legendItem
|
|
38863
38910
|
});
|
|
@@ -39011,10 +39058,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39011
39058
|
verticalAlign = legendProps.verticalAlign,
|
|
39012
39059
|
layout = legendProps.layout;
|
|
39013
39060
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39014
|
-
newOffset = _objectSpread$
|
|
39061
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
39015
39062
|
}
|
|
39016
39063
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39017
|
-
newOffset = _objectSpread$
|
|
39064
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39018
39065
|
}
|
|
39019
39066
|
}
|
|
39020
39067
|
return newOffset;
|
|
@@ -39440,14 +39487,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39440
39487
|
items: [item]
|
|
39441
39488
|
};
|
|
39442
39489
|
}
|
|
39443
|
-
return _objectSpread$
|
|
39490
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39444
39491
|
}, {});
|
|
39445
39492
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39446
39493
|
var group = stackGroups[axisId];
|
|
39447
39494
|
if (group.hasStack) {
|
|
39448
39495
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39449
39496
|
var g = group.stackGroups[stackId];
|
|
39450
|
-
return _objectSpread$
|
|
39497
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39451
39498
|
numericAxisId: numericAxisId,
|
|
39452
39499
|
cateAxisId: cateAxisId,
|
|
39453
39500
|
items: g.items,
|
|
@@ -39455,7 +39502,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39455
39502
|
}));
|
|
39456
39503
|
}, {});
|
|
39457
39504
|
}
|
|
39458
|
-
return _objectSpread$
|
|
39505
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39459
39506
|
}, {});
|
|
39460
39507
|
};
|
|
39461
39508
|
|
|
@@ -39669,7 +39716,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39669
39716
|
formatter = _graphicalItem$props.formatter,
|
|
39670
39717
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39671
39718
|
chartType = _graphicalItem$props.chartType;
|
|
39672
|
-
return _objectSpread$
|
|
39719
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39673
39720
|
dataKey: dataKey,
|
|
39674
39721
|
unit: unit,
|
|
39675
39722
|
formatter: formatter,
|
|
@@ -39682,12 +39729,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39682
39729
|
});
|
|
39683
39730
|
};
|
|
39684
39731
|
|
|
39685
|
-
function _typeof$
|
|
39686
|
-
function ownKeys$
|
|
39687
|
-
function _objectSpread$
|
|
39688
|
-
function _defineProperty$
|
|
39689
|
-
function _toPropertyKey$
|
|
39690
|
-
function _toPrimitive$
|
|
39732
|
+
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); }
|
|
39733
|
+
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; }
|
|
39734
|
+
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; }
|
|
39735
|
+
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; }
|
|
39736
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39737
|
+
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); }
|
|
39691
39738
|
var RADIAN = Math.PI / 180;
|
|
39692
39739
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39693
39740
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39792,7 +39839,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39792
39839
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39793
39840
|
}
|
|
39794
39841
|
if (inRange) {
|
|
39795
|
-
return _objectSpread$
|
|
39842
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39796
39843
|
radius: radius,
|
|
39797
39844
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39798
39845
|
});
|
|
@@ -39800,18 +39847,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39800
39847
|
return null;
|
|
39801
39848
|
};
|
|
39802
39849
|
|
|
39803
|
-
function _typeof$
|
|
39850
|
+
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); }
|
|
39851
|
+
var _excluded$7 = ["offset"];
|
|
39804
39852
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39805
39853
|
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."); }
|
|
39806
39854
|
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); }
|
|
39807
39855
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39808
39856
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39809
39857
|
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; }
|
|
39810
|
-
function
|
|
39811
|
-
function
|
|
39812
|
-
function
|
|
39813
|
-
function
|
|
39814
|
-
function
|
|
39858
|
+
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; }
|
|
39859
|
+
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; }
|
|
39860
|
+
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; }
|
|
39861
|
+
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; }
|
|
39862
|
+
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; }
|
|
39863
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39864
|
+
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); }
|
|
39815
39865
|
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); }
|
|
39816
39866
|
var getLabel = function getLabel(props) {
|
|
39817
39867
|
var value = props.value,
|
|
@@ -39956,7 +40006,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39956
40006
|
textAnchor: 'middle',
|
|
39957
40007
|
verticalAnchor: verticalEnd
|
|
39958
40008
|
};
|
|
39959
|
-
return _objectSpread$
|
|
40009
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39960
40010
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39961
40011
|
width: width
|
|
39962
40012
|
} : {});
|
|
@@ -39968,7 +40018,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39968
40018
|
textAnchor: 'middle',
|
|
39969
40019
|
verticalAnchor: verticalStart
|
|
39970
40020
|
};
|
|
39971
|
-
return _objectSpread$
|
|
40021
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39972
40022
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39973
40023
|
width: width
|
|
39974
40024
|
} : {});
|
|
@@ -39980,7 +40030,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39980
40030
|
textAnchor: horizontalEnd,
|
|
39981
40031
|
verticalAnchor: 'middle'
|
|
39982
40032
|
};
|
|
39983
|
-
return _objectSpread$
|
|
40033
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
39984
40034
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39985
40035
|
height: height
|
|
39986
40036
|
} : {});
|
|
@@ -39992,7 +40042,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39992
40042
|
textAnchor: horizontalStart,
|
|
39993
40043
|
verticalAnchor: 'middle'
|
|
39994
40044
|
};
|
|
39995
|
-
return _objectSpread$
|
|
40045
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
39996
40046
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39997
40047
|
height: height
|
|
39998
40048
|
} : {});
|
|
@@ -40002,7 +40052,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40002
40052
|
height: height
|
|
40003
40053
|
} : {};
|
|
40004
40054
|
if (position === 'insideLeft') {
|
|
40005
|
-
return _objectSpread$
|
|
40055
|
+
return _objectSpread$h({
|
|
40006
40056
|
x: x + horizontalOffset,
|
|
40007
40057
|
y: y + height / 2,
|
|
40008
40058
|
textAnchor: horizontalStart,
|
|
@@ -40010,7 +40060,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40010
40060
|
}, sizeAttrs);
|
|
40011
40061
|
}
|
|
40012
40062
|
if (position === 'insideRight') {
|
|
40013
|
-
return _objectSpread$
|
|
40063
|
+
return _objectSpread$h({
|
|
40014
40064
|
x: x + width - horizontalOffset,
|
|
40015
40065
|
y: y + height / 2,
|
|
40016
40066
|
textAnchor: horizontalEnd,
|
|
@@ -40018,7 +40068,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40018
40068
|
}, sizeAttrs);
|
|
40019
40069
|
}
|
|
40020
40070
|
if (position === 'insideTop') {
|
|
40021
|
-
return _objectSpread$
|
|
40071
|
+
return _objectSpread$h({
|
|
40022
40072
|
x: x + width / 2,
|
|
40023
40073
|
y: y + verticalOffset,
|
|
40024
40074
|
textAnchor: 'middle',
|
|
@@ -40026,7 +40076,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40026
40076
|
}, sizeAttrs);
|
|
40027
40077
|
}
|
|
40028
40078
|
if (position === 'insideBottom') {
|
|
40029
|
-
return _objectSpread$
|
|
40079
|
+
return _objectSpread$h({
|
|
40030
40080
|
x: x + width / 2,
|
|
40031
40081
|
y: y + height - verticalOffset,
|
|
40032
40082
|
textAnchor: 'middle',
|
|
@@ -40034,7 +40084,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40034
40084
|
}, sizeAttrs);
|
|
40035
40085
|
}
|
|
40036
40086
|
if (position === 'insideTopLeft') {
|
|
40037
|
-
return _objectSpread$
|
|
40087
|
+
return _objectSpread$h({
|
|
40038
40088
|
x: x + horizontalOffset,
|
|
40039
40089
|
y: y + verticalOffset,
|
|
40040
40090
|
textAnchor: horizontalStart,
|
|
@@ -40042,7 +40092,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40042
40092
|
}, sizeAttrs);
|
|
40043
40093
|
}
|
|
40044
40094
|
if (position === 'insideTopRight') {
|
|
40045
|
-
return _objectSpread$
|
|
40095
|
+
return _objectSpread$h({
|
|
40046
40096
|
x: x + width - horizontalOffset,
|
|
40047
40097
|
y: y + verticalOffset,
|
|
40048
40098
|
textAnchor: horizontalEnd,
|
|
@@ -40050,7 +40100,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40050
40100
|
}, sizeAttrs);
|
|
40051
40101
|
}
|
|
40052
40102
|
if (position === 'insideBottomLeft') {
|
|
40053
|
-
return _objectSpread$
|
|
40103
|
+
return _objectSpread$h({
|
|
40054
40104
|
x: x + horizontalOffset,
|
|
40055
40105
|
y: y + height - verticalOffset,
|
|
40056
40106
|
textAnchor: horizontalStart,
|
|
@@ -40058,7 +40108,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40058
40108
|
}, sizeAttrs);
|
|
40059
40109
|
}
|
|
40060
40110
|
if (position === 'insideBottomRight') {
|
|
40061
|
-
return _objectSpread$
|
|
40111
|
+
return _objectSpread$h({
|
|
40062
40112
|
x: x + width - horizontalOffset,
|
|
40063
40113
|
y: y + height - verticalOffset,
|
|
40064
40114
|
textAnchor: horizontalEnd,
|
|
@@ -40066,14 +40116,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40066
40116
|
}, sizeAttrs);
|
|
40067
40117
|
}
|
|
40068
40118
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40069
|
-
return _objectSpread$
|
|
40119
|
+
return _objectSpread$h({
|
|
40070
40120
|
x: x + getPercentValue(position.x, width),
|
|
40071
40121
|
y: y + getPercentValue(position.y, height),
|
|
40072
40122
|
textAnchor: 'end',
|
|
40073
40123
|
verticalAnchor: 'end'
|
|
40074
40124
|
}, sizeAttrs);
|
|
40075
40125
|
}
|
|
40076
|
-
return _objectSpread$
|
|
40126
|
+
return _objectSpread$h({
|
|
40077
40127
|
x: x + width / 2,
|
|
40078
40128
|
y: y + height / 2,
|
|
40079
40129
|
textAnchor: 'middle',
|
|
@@ -40083,7 +40133,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40083
40133
|
var isPolar = function isPolar(viewBox) {
|
|
40084
40134
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40085
40135
|
};
|
|
40086
|
-
function Label$3(
|
|
40136
|
+
function Label$3(_ref4) {
|
|
40137
|
+
var _ref4$offset = _ref4.offset,
|
|
40138
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40139
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40140
|
+
var props = _objectSpread$h({
|
|
40141
|
+
offset: offset
|
|
40142
|
+
}, restProps);
|
|
40087
40143
|
var viewBox = props.viewBox,
|
|
40088
40144
|
position = props.position,
|
|
40089
40145
|
value = props.value,
|
|
@@ -40120,9 +40176,6 @@ function Label$3(props) {
|
|
|
40120
40176
|
}), label);
|
|
40121
40177
|
}
|
|
40122
40178
|
Label$3.displayName = 'Label';
|
|
40123
|
-
Label$3.defaultProps = {
|
|
40124
|
-
offset: 5
|
|
40125
|
-
};
|
|
40126
40179
|
var parseViewBox = function parseViewBox(props) {
|
|
40127
40180
|
var cx = props.cx,
|
|
40128
40181
|
cy = props.cy,
|
|
@@ -40277,8 +40330,9 @@ function last(array) {
|
|
|
40277
40330
|
|
|
40278
40331
|
var last_1 = last;
|
|
40279
40332
|
|
|
40280
|
-
function _typeof$
|
|
40281
|
-
var _excluded$
|
|
40333
|
+
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); }
|
|
40334
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40335
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40282
40336
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40283
40337
|
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."); }
|
|
40284
40338
|
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); }
|
|
@@ -40286,26 +40340,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40286
40340
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40287
40341
|
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; }
|
|
40288
40342
|
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); }
|
|
40289
|
-
function ownKeys$
|
|
40290
|
-
function _objectSpread$
|
|
40291
|
-
function _defineProperty$
|
|
40292
|
-
function _toPropertyKey$
|
|
40293
|
-
function _toPrimitive$
|
|
40294
|
-
function _objectWithoutProperties$
|
|
40295
|
-
function _objectWithoutPropertiesLoose$
|
|
40296
|
-
var
|
|
40297
|
-
|
|
40298
|
-
|
|
40299
|
-
|
|
40300
|
-
|
|
40301
|
-
|
|
40302
|
-
|
|
40303
|
-
|
|
40304
|
-
dataKey =
|
|
40305
|
-
clockWise =
|
|
40306
|
-
id =
|
|
40307
|
-
textBreakAll =
|
|
40308
|
-
others = _objectWithoutProperties$
|
|
40343
|
+
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; }
|
|
40344
|
+
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; }
|
|
40345
|
+
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; }
|
|
40346
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40347
|
+
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); }
|
|
40348
|
+
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; }
|
|
40349
|
+
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; }
|
|
40350
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40351
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40352
|
+
};
|
|
40353
|
+
function LabelList(_ref) {
|
|
40354
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40355
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40356
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40357
|
+
var data = restProps.data,
|
|
40358
|
+
dataKey = restProps.dataKey,
|
|
40359
|
+
clockWise = restProps.clockWise,
|
|
40360
|
+
id = restProps.id,
|
|
40361
|
+
textBreakAll = restProps.textBreakAll,
|
|
40362
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40309
40363
|
if (!data || !data.length) {
|
|
40310
40364
|
return null;
|
|
40311
40365
|
}
|
|
@@ -40321,7 +40375,7 @@ function LabelList(props) {
|
|
|
40321
40375
|
index: index,
|
|
40322
40376
|
value: value,
|
|
40323
40377
|
textBreakAll: textBreakAll,
|
|
40324
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40378
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40325
40379
|
clockWise: clockWise
|
|
40326
40380
|
})),
|
|
40327
40381
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40376,9 +40430,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40376
40430
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40377
40431
|
}
|
|
40378
40432
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40379
|
-
LabelList.defaultProps = defaultProps;
|
|
40380
40433
|
|
|
40434
|
+
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); }
|
|
40381
40435
|
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); }
|
|
40436
|
+
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; }
|
|
40437
|
+
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; }
|
|
40438
|
+
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; }
|
|
40439
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40440
|
+
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); }
|
|
40382
40441
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40383
40442
|
var sign = mathSign(endAngle - startAngle);
|
|
40384
40443
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40519,7 +40578,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40519
40578
|
}
|
|
40520
40579
|
return path;
|
|
40521
40580
|
};
|
|
40522
|
-
var
|
|
40581
|
+
var defaultProps$1 = {
|
|
40582
|
+
cx: 0,
|
|
40583
|
+
cy: 0,
|
|
40584
|
+
innerRadius: 0,
|
|
40585
|
+
outerRadius: 0,
|
|
40586
|
+
startAngle: 0,
|
|
40587
|
+
endAngle: 0,
|
|
40588
|
+
cornerRadius: 0,
|
|
40589
|
+
forceCornerRadius: false,
|
|
40590
|
+
cornerIsExternal: false
|
|
40591
|
+
};
|
|
40592
|
+
var Sector = function Sector(sectorProps) {
|
|
40593
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40523
40594
|
var cx = props.cx,
|
|
40524
40595
|
cy = props.cy,
|
|
40525
40596
|
innerRadius = props.innerRadius,
|
|
@@ -40565,25 +40636,14 @@ var Sector = function Sector(props) {
|
|
|
40565
40636
|
role: "img"
|
|
40566
40637
|
}));
|
|
40567
40638
|
};
|
|
40568
|
-
Sector.defaultProps = {
|
|
40569
|
-
cx: 0,
|
|
40570
|
-
cy: 0,
|
|
40571
|
-
innerRadius: 0,
|
|
40572
|
-
outerRadius: 0,
|
|
40573
|
-
startAngle: 0,
|
|
40574
|
-
endAngle: 0,
|
|
40575
|
-
cornerRadius: 0,
|
|
40576
|
-
forceCornerRadius: false,
|
|
40577
|
-
cornerIsExternal: false
|
|
40578
|
-
};
|
|
40579
40639
|
|
|
40580
|
-
function _typeof$
|
|
40640
|
+
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); }
|
|
40581
40641
|
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); }
|
|
40582
|
-
function ownKeys$
|
|
40583
|
-
function _objectSpread$
|
|
40584
|
-
function _defineProperty$
|
|
40585
|
-
function _toPropertyKey$
|
|
40586
|
-
function _toPrimitive$
|
|
40642
|
+
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; }
|
|
40643
|
+
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; }
|
|
40644
|
+
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; }
|
|
40645
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40646
|
+
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); }
|
|
40587
40647
|
var CURVE_FACTORIES = {
|
|
40588
40648
|
curveBasisClosed: curveBasisClosed,
|
|
40589
40649
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40623,11 +40683,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40623
40683
|
* @return {String} path
|
|
40624
40684
|
*/
|
|
40625
40685
|
var getPath$1 = function getPath(_ref) {
|
|
40626
|
-
var type = _ref.type,
|
|
40627
|
-
|
|
40686
|
+
var _ref$type = _ref.type,
|
|
40687
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40688
|
+
_ref$points = _ref.points,
|
|
40689
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40628
40690
|
baseLine = _ref.baseLine,
|
|
40629
40691
|
layout = _ref.layout,
|
|
40630
|
-
connectNulls = _ref.connectNulls
|
|
40692
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40693
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40631
40694
|
var curveFactory = getCurveFactory(type, layout);
|
|
40632
40695
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40633
40696
|
return defined(entry);
|
|
@@ -40638,7 +40701,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40638
40701
|
return defined(base);
|
|
40639
40702
|
}) : baseLine;
|
|
40640
40703
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40641
|
-
return _objectSpread$
|
|
40704
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40642
40705
|
base: formatBaseLine[index]
|
|
40643
40706
|
});
|
|
40644
40707
|
});
|
|
@@ -40679,12 +40742,8 @@ var Curve = function Curve(props) {
|
|
|
40679
40742
|
ref: pathRef
|
|
40680
40743
|
}));
|
|
40681
40744
|
};
|
|
40682
|
-
Curve.defaultProps = {
|
|
40683
|
-
type: 'linear',
|
|
40684
|
-
points: [],
|
|
40685
|
-
connectNulls: false
|
|
40686
|
-
};
|
|
40687
40745
|
|
|
40746
|
+
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); }
|
|
40688
40747
|
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); }
|
|
40689
40748
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40690
40749
|
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."); }
|
|
@@ -40692,6 +40751,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40692
40751
|
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; }
|
|
40693
40752
|
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; } }
|
|
40694
40753
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40754
|
+
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; }
|
|
40755
|
+
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; }
|
|
40756
|
+
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; }
|
|
40757
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40758
|
+
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); }
|
|
40695
40759
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40696
40760
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40697
40761
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40747,13 +40811,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40747
40811
|
}
|
|
40748
40812
|
return false;
|
|
40749
40813
|
};
|
|
40750
|
-
var
|
|
40814
|
+
var defaultProps = {
|
|
40815
|
+
x: 0,
|
|
40816
|
+
y: 0,
|
|
40817
|
+
width: 0,
|
|
40818
|
+
height: 0,
|
|
40819
|
+
// The radius of border
|
|
40820
|
+
// The radius of four corners when radius is a number
|
|
40821
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40822
|
+
radius: 0,
|
|
40823
|
+
isAnimationActive: false,
|
|
40824
|
+
isUpdateAnimationActive: false,
|
|
40825
|
+
animationBegin: 0,
|
|
40826
|
+
animationDuration: 1500,
|
|
40827
|
+
animationEasing: 'ease'
|
|
40828
|
+
};
|
|
40829
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40830
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40751
40831
|
var pathRef = useRef();
|
|
40752
40832
|
var _useState = useState(-1),
|
|
40753
40833
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40754
40834
|
totalLength = _useState2[0],
|
|
40755
40835
|
setTotalLength = _useState2[1];
|
|
40756
|
-
|
|
40836
|
+
useEffect(function () {
|
|
40757
40837
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40758
40838
|
try {
|
|
40759
40839
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40824,21 +40904,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40824
40904
|
})));
|
|
40825
40905
|
});
|
|
40826
40906
|
};
|
|
40827
|
-
Rectangle.defaultProps = {
|
|
40828
|
-
x: 0,
|
|
40829
|
-
y: 0,
|
|
40830
|
-
width: 0,
|
|
40831
|
-
height: 0,
|
|
40832
|
-
// The radius of border
|
|
40833
|
-
// The radius of four corners when radius is a number
|
|
40834
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40835
|
-
radius: 0,
|
|
40836
|
-
isAnimationActive: false,
|
|
40837
|
-
isUpdateAnimationActive: false,
|
|
40838
|
-
animationBegin: 0,
|
|
40839
|
-
animationDuration: 1500,
|
|
40840
|
-
animationEasing: 'ease'
|
|
40841
|
-
};
|
|
40842
40907
|
|
|
40843
40908
|
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); }
|
|
40844
40909
|
var Dot$1 = function Dot(props) {
|
|
@@ -40858,18 +40923,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40858
40923
|
return null;
|
|
40859
40924
|
};
|
|
40860
40925
|
|
|
40926
|
+
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); }
|
|
40927
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40861
40928
|
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); }
|
|
40929
|
+
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; }
|
|
40930
|
+
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; }
|
|
40931
|
+
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; }
|
|
40932
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40933
|
+
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); }
|
|
40934
|
+
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; }
|
|
40935
|
+
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; }
|
|
40862
40936
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40863
40937
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40864
40938
|
};
|
|
40865
|
-
var Cross = function Cross(
|
|
40866
|
-
var x =
|
|
40867
|
-
|
|
40868
|
-
|
|
40869
|
-
|
|
40870
|
-
top =
|
|
40871
|
-
|
|
40872
|
-
|
|
40939
|
+
var Cross = function Cross(_ref) {
|
|
40940
|
+
var _ref$x = _ref.x,
|
|
40941
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40942
|
+
_ref$y = _ref.y,
|
|
40943
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40944
|
+
_ref$top = _ref.top,
|
|
40945
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40946
|
+
_ref$left = _ref.left,
|
|
40947
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40948
|
+
_ref$width = _ref.width,
|
|
40949
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40950
|
+
_ref$height = _ref.height,
|
|
40951
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40952
|
+
className = _ref.className,
|
|
40953
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40954
|
+
var props = _objectSpread$c({
|
|
40955
|
+
x: x,
|
|
40956
|
+
y: y,
|
|
40957
|
+
top: top,
|
|
40958
|
+
left: left,
|
|
40959
|
+
width: width,
|
|
40960
|
+
height: height
|
|
40961
|
+
}, rest);
|
|
40873
40962
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40874
40963
|
return null;
|
|
40875
40964
|
}
|
|
@@ -40878,14 +40967,6 @@ var Cross = function Cross(props) {
|
|
|
40878
40967
|
d: getPath(x, y, width, height, top, left)
|
|
40879
40968
|
}));
|
|
40880
40969
|
};
|
|
40881
|
-
Cross.defaultProps = {
|
|
40882
|
-
x: 0,
|
|
40883
|
-
y: 0,
|
|
40884
|
-
top: 0,
|
|
40885
|
-
left: 0,
|
|
40886
|
-
width: 0,
|
|
40887
|
-
height: 0
|
|
40888
|
-
};
|
|
40889
40970
|
|
|
40890
40971
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40891
40972
|
|
|
@@ -41095,6 +41176,7 @@ var createScale = function createScale(_ref) {
|
|
|
41095
41176
|
isTextActive: false,
|
|
41096
41177
|
isSlideMoving: false,
|
|
41097
41178
|
isTravellerMoving: false,
|
|
41179
|
+
isTravellerFocused: false,
|
|
41098
41180
|
startX: scale(startIndex),
|
|
41099
41181
|
endX: scale(endIndex),
|
|
41100
41182
|
scale: scale,
|
|
@@ -41308,6 +41390,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41308
41390
|
}
|
|
41309
41391
|
});
|
|
41310
41392
|
}
|
|
41393
|
+
}, {
|
|
41394
|
+
key: "handleTravellerMoveKeyboard",
|
|
41395
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41396
|
+
var _this2 = this;
|
|
41397
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41398
|
+
var _this$state3 = this.state,
|
|
41399
|
+
scaleValues = _this$state3.scaleValues,
|
|
41400
|
+
startX = _this$state3.startX,
|
|
41401
|
+
endX = _this$state3.endX;
|
|
41402
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41403
|
+
var currentScaleValue = this.state[id];
|
|
41404
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41405
|
+
if (currentIndex === -1) {
|
|
41406
|
+
return;
|
|
41407
|
+
}
|
|
41408
|
+
var newIndex = currentIndex + direction;
|
|
41409
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41410
|
+
return;
|
|
41411
|
+
}
|
|
41412
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41413
|
+
|
|
41414
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41415
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41416
|
+
return;
|
|
41417
|
+
}
|
|
41418
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41419
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41420
|
+
startX: _this2.state.startX,
|
|
41421
|
+
endX: _this2.state.endX
|
|
41422
|
+
}));
|
|
41423
|
+
});
|
|
41424
|
+
}
|
|
41311
41425
|
}, {
|
|
41312
41426
|
key: "renderBackground",
|
|
41313
41427
|
value: function renderBackground() {
|
|
@@ -41355,6 +41469,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41355
41469
|
}, {
|
|
41356
41470
|
key: "renderTravellerLayer",
|
|
41357
41471
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41472
|
+
var _this3 = this;
|
|
41358
41473
|
var _this$props7 = this.props,
|
|
41359
41474
|
y = _this$props7.y,
|
|
41360
41475
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41368,11 +41483,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41368
41483
|
height: height
|
|
41369
41484
|
});
|
|
41370
41485
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41486
|
+
tabIndex: 0,
|
|
41487
|
+
role: "slider",
|
|
41371
41488
|
className: "recharts-brush-traveller",
|
|
41372
41489
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41373
41490
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41374
41491
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41375
41492
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41493
|
+
onKeyDown: function onKeyDown(e) {
|
|
41494
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41495
|
+
return;
|
|
41496
|
+
}
|
|
41497
|
+
e.preventDefault();
|
|
41498
|
+
e.stopPropagation();
|
|
41499
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41500
|
+
},
|
|
41501
|
+
onFocus: function onFocus() {
|
|
41502
|
+
_this3.setState({
|
|
41503
|
+
isTravellerFocused: true
|
|
41504
|
+
});
|
|
41505
|
+
},
|
|
41506
|
+
onBlur: function onBlur() {
|
|
41507
|
+
_this3.setState({
|
|
41508
|
+
isTravellerFocused: false
|
|
41509
|
+
});
|
|
41510
|
+
},
|
|
41376
41511
|
style: {
|
|
41377
41512
|
cursor: 'col-resize'
|
|
41378
41513
|
}
|
|
@@ -41416,9 +41551,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41416
41551
|
height = _this$props9.height,
|
|
41417
41552
|
travellerWidth = _this$props9.travellerWidth,
|
|
41418
41553
|
stroke = _this$props9.stroke;
|
|
41419
|
-
var _this$
|
|
41420
|
-
startX = _this$
|
|
41421
|
-
endX = _this$
|
|
41554
|
+
var _this$state4 = this.state,
|
|
41555
|
+
startX = _this$state4.startX,
|
|
41556
|
+
endX = _this$state4.endX;
|
|
41422
41557
|
var offset = 5;
|
|
41423
41558
|
var attrs = {
|
|
41424
41559
|
pointerEvents: 'none',
|
|
@@ -41450,12 +41585,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41450
41585
|
width = _this$props10.width,
|
|
41451
41586
|
height = _this$props10.height,
|
|
41452
41587
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41453
|
-
var _this$
|
|
41454
|
-
startX = _this$
|
|
41455
|
-
endX = _this$
|
|
41456
|
-
isTextActive = _this$
|
|
41457
|
-
isSlideMoving = _this$
|
|
41458
|
-
isTravellerMoving = _this$
|
|
41588
|
+
var _this$state5 = this.state,
|
|
41589
|
+
startX = _this$state5.startX,
|
|
41590
|
+
endX = _this$state5.endX,
|
|
41591
|
+
isTextActive = _this$state5.isTextActive,
|
|
41592
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41593
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41594
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41459
41595
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41460
41596
|
return null;
|
|
41461
41597
|
}
|
|
@@ -41467,7 +41603,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41467
41603
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41468
41604
|
onTouchMove: this.handleTouchMove,
|
|
41469
41605
|
style: style
|
|
41470
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41606
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41471
41607
|
}
|
|
41472
41608
|
}], [{
|
|
41473
41609
|
key: "renderDefaultTraveller",
|
|
@@ -41785,7 +41921,7 @@ function every(collection, predicate, guard) {
|
|
|
41785
41921
|
|
|
41786
41922
|
var every_1 = every;
|
|
41787
41923
|
|
|
41788
|
-
var defineProperty = _defineProperty$
|
|
41924
|
+
var defineProperty = _defineProperty$o;
|
|
41789
41925
|
|
|
41790
41926
|
/**
|
|
41791
41927
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42146,7 +42282,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42146
42282
|
legendType: 'rect',
|
|
42147
42283
|
minPointSize: 0,
|
|
42148
42284
|
hide: false,
|
|
42149
|
-
// data of bar
|
|
42150
42285
|
data: [],
|
|
42151
42286
|
layout: 'vertical',
|
|
42152
42287
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45059,10 +45194,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45059
45194
|
}
|
|
45060
45195
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45061
45196
|
x = _this$container$getBo.x,
|
|
45062
|
-
y = _this$container$getBo.y
|
|
45197
|
+
y = _this$container$getBo.y,
|
|
45198
|
+
height = _this$container$getBo.height;
|
|
45063
45199
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45064
45200
|
var pageX = x + coordinate;
|
|
45065
|
-
var pageY = y + this.offset.top;
|
|
45201
|
+
var pageY = y + this.offset.top + height / 2;
|
|
45066
45202
|
this.mouseHandlerCallback({
|
|
45067
45203
|
pageX: pageX,
|
|
45068
45204
|
pageY: pageY
|
|
@@ -48402,6 +48538,9 @@ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4
|
|
|
48402
48538
|
var Table = function (_a) {
|
|
48403
48539
|
var columns = _a.columns, data = _a.data, emptyText = _a.emptyText, rowSelection = _a.rowSelection;
|
|
48404
48540
|
var _b = useState([]), selectedRowKeys = _b[0], setSelectedRowKeys = _b[1];
|
|
48541
|
+
useEffect(function () {
|
|
48542
|
+
setSelectedRowKeys([]);
|
|
48543
|
+
}, [data]);
|
|
48405
48544
|
var onSelectRow = function (selectedKey) {
|
|
48406
48545
|
var index = selectedRowKeys.indexOf(selectedKey);
|
|
48407
48546
|
var newSelectedRowKeys = __spreadArray([], selectedRowKeys, true);
|
|
@@ -48442,7 +48581,7 @@ var Table = function (_a) {
|
|
|
48442
48581
|
display: "flex",
|
|
48443
48582
|
justifyContent: "center",
|
|
48444
48583
|
marginTop: 10,
|
|
48445
|
-
} }, { children: jsx$1(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48584
|
+
} }, { children: jsx$1(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length === data.length, onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48446
48585
|
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48447
48586
|
return (jsx$1(ColumnTitle, { children: jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title && (jsx$1(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))), titlePopup && (jsx$1(Popup, __assign$2({ content: titlePopup }, { children: jsx$1(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
|
|
48448
48587
|
})] }) }), jsx$1(TableBody, { children: data.length === 0 ? (jsx$1(TableRow, { children: jsx$1(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsx$1(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) { return (jsxs(TableRow, { children: [rowSelection && (jsx$1(TableCell, { children: jsx$1(Checkbox, { id: rowIndex.toString(), name: rowIndex.toString(), value: row.key, checked: selectedRowKeys.includes(row.key), onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|