@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.js
CHANGED
|
@@ -4578,7 +4578,7 @@ function requiredArgs(required, args) {
|
|
|
4578
4578
|
}
|
|
4579
4579
|
}
|
|
4580
4580
|
|
|
4581
|
-
function _typeof$
|
|
4581
|
+
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); }
|
|
4582
4582
|
/**
|
|
4583
4583
|
* @name toDate
|
|
4584
4584
|
* @category Common Helpers
|
|
@@ -4614,7 +4614,7 @@ function toDate(argument) {
|
|
|
4614
4614
|
requiredArgs(1, arguments);
|
|
4615
4615
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4616
4616
|
|
|
4617
|
-
if (argument instanceof Date || _typeof$
|
|
4617
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4618
4618
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4619
4619
|
return new Date(argument.getTime());
|
|
4620
4620
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4885,7 +4885,7 @@ var millisecondsInMinute = 60000;
|
|
|
4885
4885
|
|
|
4886
4886
|
var millisecondsInHour = 3600000;
|
|
4887
4887
|
|
|
4888
|
-
function _typeof$
|
|
4888
|
+
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); }
|
|
4889
4889
|
/**
|
|
4890
4890
|
* @name isDate
|
|
4891
4891
|
* @category Common Helpers
|
|
@@ -4921,7 +4921,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4921
4921
|
|
|
4922
4922
|
function isDate(value) {
|
|
4923
4923
|
requiredArgs(1, arguments);
|
|
4924
|
-
return value instanceof Date || _typeof$
|
|
4924
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4925
4925
|
}
|
|
4926
4926
|
|
|
4927
4927
|
/**
|
|
@@ -13697,15 +13697,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13697
13697
|
|
|
13698
13698
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13699
13699
|
|
|
13700
|
-
function _slicedToArray$
|
|
13701
|
-
return _arrayWithHoles$
|
|
13700
|
+
function _slicedToArray$c(arr, i) {
|
|
13701
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13702
13702
|
}
|
|
13703
13703
|
|
|
13704
|
-
function _arrayWithHoles$
|
|
13704
|
+
function _arrayWithHoles$d(arr) {
|
|
13705
13705
|
if (Array.isArray(arr)) return arr;
|
|
13706
13706
|
}
|
|
13707
13707
|
|
|
13708
|
-
function _iterableToArrayLimit$
|
|
13708
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13709
13709
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13710
13710
|
|
|
13711
13711
|
if (_i == null) return;
|
|
@@ -13735,16 +13735,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13735
13735
|
return _arr;
|
|
13736
13736
|
}
|
|
13737
13737
|
|
|
13738
|
-
function _unsupportedIterableToArray$
|
|
13738
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13739
13739
|
if (!o) return;
|
|
13740
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13740
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13741
13741
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13742
13742
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13743
13743
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13744
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13744
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13745
13745
|
}
|
|
13746
13746
|
|
|
13747
|
-
function _arrayLikeToArray$
|
|
13747
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13748
13748
|
if (len == null || len > arr.length) len = arr.length;
|
|
13749
13749
|
|
|
13750
13750
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13752,7 +13752,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13752
13752
|
return arr2;
|
|
13753
13753
|
}
|
|
13754
13754
|
|
|
13755
|
-
function _nonIterableRest$
|
|
13755
|
+
function _nonIterableRest$d() {
|
|
13756
13756
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13757
13757
|
}
|
|
13758
13758
|
|
|
@@ -13816,7 +13816,7 @@ reservedProps.forEach(function (name) {
|
|
|
13816
13816
|
// This is a mapping from React prop names to the attribute names.
|
|
13817
13817
|
|
|
13818
13818
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13819
|
-
var _ref2 = _slicedToArray$
|
|
13819
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13820
13820
|
name = _ref2[0],
|
|
13821
13821
|
attributeName = _ref2[1];
|
|
13822
13822
|
|
|
@@ -16235,31 +16235,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16235
16235
|
return true;
|
|
16236
16236
|
};
|
|
16237
16237
|
|
|
16238
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16238
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16239
16239
|
|
|
16240
16240
|
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."); }
|
|
16241
16241
|
|
|
16242
16242
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16243
16243
|
|
|
16244
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16244
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16245
16245
|
|
|
16246
|
-
function ownKeys$
|
|
16246
|
+
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; }
|
|
16247
16247
|
|
|
16248
|
-
function _objectSpread$
|
|
16248
|
+
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; }
|
|
16249
16249
|
|
|
16250
|
-
function _defineProperty$
|
|
16250
|
+
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; }
|
|
16251
16251
|
|
|
16252
|
-
function _slicedToArray$
|
|
16252
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16253
16253
|
|
|
16254
|
-
function _nonIterableRest$
|
|
16254
|
+
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."); }
|
|
16255
16255
|
|
|
16256
|
-
function _unsupportedIterableToArray$
|
|
16256
|
+
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); }
|
|
16257
16257
|
|
|
16258
|
-
function _arrayLikeToArray$
|
|
16258
|
+
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; }
|
|
16259
16259
|
|
|
16260
|
-
function _iterableToArrayLimit$
|
|
16260
|
+
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; }
|
|
16261
16261
|
|
|
16262
|
-
function _arrayWithHoles$
|
|
16262
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16263
16263
|
|
|
16264
16264
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16265
16265
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16339,11 +16339,11 @@ function allFilesAccepted(_ref) {
|
|
|
16339
16339
|
|
|
16340
16340
|
return files.every(function (file) {
|
|
16341
16341
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16342
|
-
_fileAccepted2 = _slicedToArray$
|
|
16342
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16343
16343
|
accepted = _fileAccepted2[0];
|
|
16344
16344
|
|
|
16345
16345
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16346
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16346
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16347
16347
|
sizeMatch = _fileMatchSize2[0];
|
|
16348
16348
|
|
|
16349
16349
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16440,7 +16440,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16440
16440
|
function pickerOptionsFromAccept(accept) {
|
|
16441
16441
|
if (isDefined(accept)) {
|
|
16442
16442
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16443
|
-
var _ref3 = _slicedToArray$
|
|
16443
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16444
16444
|
mimeType = _ref3[0],
|
|
16445
16445
|
ext = _ref3[1];
|
|
16446
16446
|
|
|
@@ -16458,11 +16458,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16458
16458
|
|
|
16459
16459
|
return ok;
|
|
16460
16460
|
}).reduce(function (agg, _ref4) {
|
|
16461
|
-
var _ref5 = _slicedToArray$
|
|
16461
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16462
16462
|
mimeType = _ref5[0],
|
|
16463
16463
|
ext = _ref5[1];
|
|
16464
16464
|
|
|
16465
|
-
return _objectSpread$
|
|
16465
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16466
16466
|
}, {});
|
|
16467
16467
|
return [{
|
|
16468
16468
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16482,7 +16482,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16482
16482
|
function acceptPropAsAcceptAttr(accept) {
|
|
16483
16483
|
if (isDefined(accept)) {
|
|
16484
16484
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16485
|
-
var _ref7 = _slicedToArray$
|
|
16485
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16486
16486
|
mimeType = _ref7[0],
|
|
16487
16487
|
ext = _ref7[1];
|
|
16488
16488
|
|
|
@@ -16550,40 +16550,40 @@ function isExt(v) {
|
|
|
16550
16550
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16551
16551
|
*/
|
|
16552
16552
|
|
|
16553
|
-
var _excluded$
|
|
16554
|
-
_excluded2$
|
|
16553
|
+
var _excluded$g = ["children"],
|
|
16554
|
+
_excluded2$5 = ["open"],
|
|
16555
16555
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16556
16556
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16557
16557
|
|
|
16558
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16558
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16559
16559
|
|
|
16560
16560
|
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."); }
|
|
16561
16561
|
|
|
16562
16562
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16563
16563
|
|
|
16564
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16564
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16565
16565
|
|
|
16566
|
-
function _slicedToArray$
|
|
16566
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16567
16567
|
|
|
16568
|
-
function _nonIterableRest$
|
|
16568
|
+
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."); }
|
|
16569
16569
|
|
|
16570
|
-
function _unsupportedIterableToArray$
|
|
16570
|
+
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); }
|
|
16571
16571
|
|
|
16572
|
-
function _arrayLikeToArray$
|
|
16572
|
+
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; }
|
|
16573
16573
|
|
|
16574
|
-
function _iterableToArrayLimit$
|
|
16574
|
+
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; }
|
|
16575
16575
|
|
|
16576
|
-
function _arrayWithHoles$
|
|
16576
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16577
16577
|
|
|
16578
|
-
function ownKeys$
|
|
16578
|
+
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; }
|
|
16579
16579
|
|
|
16580
|
-
function _objectSpread$
|
|
16580
|
+
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; }
|
|
16581
16581
|
|
|
16582
|
-
function _defineProperty$
|
|
16582
|
+
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; }
|
|
16583
16583
|
|
|
16584
|
-
function _objectWithoutProperties$
|
|
16584
|
+
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; }
|
|
16585
16585
|
|
|
16586
|
-
function _objectWithoutPropertiesLoose$
|
|
16586
|
+
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; }
|
|
16587
16587
|
/**
|
|
16588
16588
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16589
16589
|
*
|
|
@@ -16601,11 +16601,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16601
16601
|
|
|
16602
16602
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16603
16603
|
var children = _ref.children,
|
|
16604
|
-
params = _objectWithoutProperties$
|
|
16604
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16605
16605
|
|
|
16606
16606
|
var _useDropzone = useDropzone(params),
|
|
16607
16607
|
open = _useDropzone.open,
|
|
16608
|
-
props = _objectWithoutProperties$
|
|
16608
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16609
16609
|
|
|
16610
16610
|
React$3.useImperativeHandle(ref, function () {
|
|
16611
16611
|
return {
|
|
@@ -16613,13 +16613,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16613
16613
|
};
|
|
16614
16614
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16615
16615
|
|
|
16616
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16616
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16617
16617
|
open: open
|
|
16618
16618
|
})));
|
|
16619
16619
|
});
|
|
16620
16620
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16621
16621
|
|
|
16622
|
-
var defaultProps$
|
|
16622
|
+
var defaultProps$2 = {
|
|
16623
16623
|
disabled: false,
|
|
16624
16624
|
getFilesFromEvent: fromEvent,
|
|
16625
16625
|
maxSize: Infinity,
|
|
@@ -16635,7 +16635,7 @@ var defaultProps$1 = {
|
|
|
16635
16635
|
useFsAccessApi: true,
|
|
16636
16636
|
autoFocus: false
|
|
16637
16637
|
};
|
|
16638
|
-
Dropzone.defaultProps = defaultProps$
|
|
16638
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16639
16639
|
Dropzone.propTypes = {
|
|
16640
16640
|
/**
|
|
16641
16641
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16986,7 +16986,7 @@ var initialState = {
|
|
|
16986
16986
|
function useDropzone() {
|
|
16987
16987
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16988
16988
|
|
|
16989
|
-
var _defaultProps$props = _objectSpread$
|
|
16989
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16990
16990
|
accept = _defaultProps$props.accept,
|
|
16991
16991
|
disabled = _defaultProps$props.disabled,
|
|
16992
16992
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17033,7 +17033,7 @@ function useDropzone() {
|
|
|
17033
17033
|
var inputRef = React$3.useRef(null);
|
|
17034
17034
|
|
|
17035
17035
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
17036
|
-
_useReducer2 = _slicedToArray$
|
|
17036
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
17037
17037
|
state = _useReducer2[0],
|
|
17038
17038
|
dispatch = _useReducer2[1];
|
|
17039
17039
|
|
|
@@ -17203,12 +17203,12 @@ function useDropzone() {
|
|
|
17203
17203
|
var fileRejections = [];
|
|
17204
17204
|
files.forEach(function (file) {
|
|
17205
17205
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17206
|
-
_fileAccepted2 = _slicedToArray$
|
|
17206
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17207
17207
|
accepted = _fileAccepted2[0],
|
|
17208
17208
|
acceptError = _fileAccepted2[1];
|
|
17209
17209
|
|
|
17210
17210
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17211
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17211
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17212
17212
|
sizeMatch = _fileMatchSize2[0],
|
|
17213
17213
|
sizeError = _fileMatchSize2[1];
|
|
17214
17214
|
|
|
@@ -17409,9 +17409,9 @@ function useDropzone() {
|
|
|
17409
17409
|
onDragOver = _ref2.onDragOver,
|
|
17410
17410
|
onDragLeave = _ref2.onDragLeave,
|
|
17411
17411
|
onDrop = _ref2.onDrop,
|
|
17412
|
-
rest = _objectWithoutProperties$
|
|
17412
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17413
17413
|
|
|
17414
|
-
return _objectSpread$
|
|
17414
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17415
17415
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17416
17416
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17417
17417
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17436,9 +17436,9 @@ function useDropzone() {
|
|
|
17436
17436
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17437
17437
|
onChange = _ref3.onChange,
|
|
17438
17438
|
onClick = _ref3.onClick,
|
|
17439
|
-
rest = _objectWithoutProperties$
|
|
17439
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17440
17440
|
|
|
17441
|
-
var inputProps = _defineProperty$
|
|
17441
|
+
var inputProps = _defineProperty$v({
|
|
17442
17442
|
accept: acceptAttr,
|
|
17443
17443
|
multiple: multiple,
|
|
17444
17444
|
type: "file",
|
|
@@ -17450,10 +17450,10 @@ function useDropzone() {
|
|
|
17450
17450
|
tabIndex: -1
|
|
17451
17451
|
}, refKey, inputRef);
|
|
17452
17452
|
|
|
17453
|
-
return _objectSpread$
|
|
17453
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17454
17454
|
};
|
|
17455
17455
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17456
|
-
return _objectSpread$
|
|
17456
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17457
17457
|
isFocused: isFocused && !disabled,
|
|
17458
17458
|
getRootProps: getRootProps,
|
|
17459
17459
|
getInputProps: getInputProps,
|
|
@@ -17472,40 +17472,40 @@ function reducer$1(state, action) {
|
|
|
17472
17472
|
/* istanbul ignore next */
|
|
17473
17473
|
switch (action.type) {
|
|
17474
17474
|
case "focus":
|
|
17475
|
-
return _objectSpread$
|
|
17475
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17476
17476
|
isFocused: true
|
|
17477
17477
|
});
|
|
17478
17478
|
|
|
17479
17479
|
case "blur":
|
|
17480
|
-
return _objectSpread$
|
|
17480
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17481
17481
|
isFocused: false
|
|
17482
17482
|
});
|
|
17483
17483
|
|
|
17484
17484
|
case "openDialog":
|
|
17485
|
-
return _objectSpread$
|
|
17485
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17486
17486
|
isFileDialogActive: true
|
|
17487
17487
|
});
|
|
17488
17488
|
|
|
17489
17489
|
case "closeDialog":
|
|
17490
|
-
return _objectSpread$
|
|
17490
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17491
17491
|
isFileDialogActive: false
|
|
17492
17492
|
});
|
|
17493
17493
|
|
|
17494
17494
|
case "setDraggedFiles":
|
|
17495
|
-
return _objectSpread$
|
|
17495
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17496
17496
|
isDragActive: action.isDragActive,
|
|
17497
17497
|
isDragAccept: action.isDragAccept,
|
|
17498
17498
|
isDragReject: action.isDragReject
|
|
17499
17499
|
});
|
|
17500
17500
|
|
|
17501
17501
|
case "setFiles":
|
|
17502
|
-
return _objectSpread$
|
|
17502
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17503
17503
|
acceptedFiles: action.acceptedFiles,
|
|
17504
17504
|
fileRejections: action.fileRejections
|
|
17505
17505
|
});
|
|
17506
17506
|
|
|
17507
17507
|
case "reset":
|
|
17508
|
-
return _objectSpread$
|
|
17508
|
+
return _objectSpread$t({}, initialState);
|
|
17509
17509
|
|
|
17510
17510
|
default:
|
|
17511
17511
|
return state;
|
|
@@ -19733,7 +19733,7 @@ function shallowEqual(a, b) {
|
|
|
19733
19733
|
return true;
|
|
19734
19734
|
}
|
|
19735
19735
|
|
|
19736
|
-
function _typeof$
|
|
19736
|
+
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); }
|
|
19737
19737
|
|
|
19738
19738
|
//
|
|
19739
19739
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19760,7 +19760,9 @@ var FilteredElementKeyMap = {
|
|
|
19760
19760
|
};
|
|
19761
19761
|
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'];
|
|
19762
19762
|
|
|
19763
|
-
|
|
19763
|
+
/** The type of easing function to use for animations */
|
|
19764
|
+
|
|
19765
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19764
19766
|
|
|
19765
19767
|
/** the offset of a chart, which define the blank space all around */
|
|
19766
19768
|
|
|
@@ -19796,7 +19798,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19796
19798
|
};
|
|
19797
19799
|
};
|
|
19798
19800
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19799
|
-
if (!isObject_1(props) || _typeof$
|
|
19801
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19800
19802
|
return null;
|
|
19801
19803
|
}
|
|
19802
19804
|
var out = null;
|
|
@@ -19810,11 +19812,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19810
19812
|
return out;
|
|
19811
19813
|
};
|
|
19812
19814
|
|
|
19813
|
-
var _excluded$
|
|
19814
|
-
_excluded2$
|
|
19815
|
-
function _objectWithoutProperties$
|
|
19816
|
-
function _objectWithoutPropertiesLoose$
|
|
19817
|
-
function _typeof$
|
|
19815
|
+
var _excluded$f = ["children"],
|
|
19816
|
+
_excluded2$4 = ["children"];
|
|
19817
|
+
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; }
|
|
19818
|
+
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; }
|
|
19819
|
+
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); }
|
|
19818
19820
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19819
19821
|
click: 'onClick',
|
|
19820
19822
|
mousedown: 'onMouseDown',
|
|
@@ -19921,7 +19923,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19921
19923
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19922
19924
|
};
|
|
19923
19925
|
var isDotProps = function isDotProps(dot) {
|
|
19924
|
-
return dot && _typeof$
|
|
19926
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19925
19927
|
};
|
|
19926
19928
|
|
|
19927
19929
|
/**
|
|
@@ -20013,10 +20015,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
20013
20015
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
20014
20016
|
var _ref = nextChild.props || {},
|
|
20015
20017
|
nextChildren = _ref.children,
|
|
20016
|
-
nextProps = _objectWithoutProperties$
|
|
20018
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
20017
20019
|
var _ref2 = prevChild.props || {},
|
|
20018
20020
|
prevChildren = _ref2.children,
|
|
20019
|
-
prevProps = _objectWithoutProperties$
|
|
20021
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
20020
20022
|
if (nextChildren && prevChildren) {
|
|
20021
20023
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
20022
20024
|
}
|
|
@@ -20058,10 +20060,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20058
20060
|
return toArray(children).indexOf(child);
|
|
20059
20061
|
};
|
|
20060
20062
|
|
|
20061
|
-
var _excluded$
|
|
20063
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20062
20064
|
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); }
|
|
20063
|
-
function _objectWithoutProperties$
|
|
20064
|
-
function _objectWithoutPropertiesLoose$
|
|
20065
|
+
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; }
|
|
20066
|
+
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; }
|
|
20065
20067
|
function Surface(props) {
|
|
20066
20068
|
var children = props.children,
|
|
20067
20069
|
width = props.width,
|
|
@@ -20069,7 +20071,7 @@ function Surface(props) {
|
|
|
20069
20071
|
viewBox = props.viewBox,
|
|
20070
20072
|
className = props.className,
|
|
20071
20073
|
style = props.style,
|
|
20072
|
-
others = _objectWithoutProperties$
|
|
20074
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
20073
20075
|
var svgView = viewBox || {
|
|
20074
20076
|
width: width,
|
|
20075
20077
|
height: height,
|
|
@@ -20086,14 +20088,14 @@ function Surface(props) {
|
|
|
20086
20088
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
20087
20089
|
}
|
|
20088
20090
|
|
|
20089
|
-
var _excluded$
|
|
20091
|
+
var _excluded$d = ["children", "className"];
|
|
20090
20092
|
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); }
|
|
20091
|
-
function _objectWithoutProperties$
|
|
20092
|
-
function _objectWithoutPropertiesLoose$
|
|
20093
|
+
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; }
|
|
20094
|
+
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; }
|
|
20093
20095
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
20094
20096
|
var children = props.children,
|
|
20095
20097
|
className = props.className,
|
|
20096
|
-
others = _objectWithoutProperties$
|
|
20098
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
20097
20099
|
var layerClass = classNames('recharts-layer', className);
|
|
20098
20100
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
20099
20101
|
className: layerClass
|
|
@@ -23508,7 +23510,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23508
23510
|
stackOffsetNone(series, order);
|
|
23509
23511
|
}
|
|
23510
23512
|
|
|
23513
|
+
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); }
|
|
23514
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23511
23515
|
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); }
|
|
23516
|
+
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; }
|
|
23517
|
+
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; }
|
|
23518
|
+
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; }
|
|
23519
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23520
|
+
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); }
|
|
23521
|
+
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; }
|
|
23522
|
+
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; }
|
|
23512
23523
|
var symbolFactories = {
|
|
23513
23524
|
symbolCircle: symbolCircle,
|
|
23514
23525
|
symbolCross: symbolCross,
|
|
@@ -23547,31 +23558,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23547
23558
|
return Math.PI * size * size / 4;
|
|
23548
23559
|
}
|
|
23549
23560
|
};
|
|
23550
|
-
var symbolsDefaultProps = {
|
|
23551
|
-
type: 'circle',
|
|
23552
|
-
size: 64,
|
|
23553
|
-
sizeType: 'area'
|
|
23554
|
-
};
|
|
23555
23561
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23556
23562
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23557
23563
|
};
|
|
23558
|
-
var Symbols = function Symbols(
|
|
23564
|
+
var Symbols = function Symbols(_ref) {
|
|
23565
|
+
var _ref$type = _ref.type,
|
|
23566
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23567
|
+
_ref$size = _ref.size,
|
|
23568
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23569
|
+
_ref$sizeType = _ref.sizeType,
|
|
23570
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23571
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23572
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23573
|
+
type: type,
|
|
23574
|
+
size: size,
|
|
23575
|
+
sizeType: sizeType
|
|
23576
|
+
});
|
|
23577
|
+
|
|
23559
23578
|
/**
|
|
23560
23579
|
* Calculate the path of curve
|
|
23561
23580
|
* @return {String} path
|
|
23562
23581
|
*/
|
|
23563
23582
|
var getPath = function getPath() {
|
|
23564
|
-
var size = props.size,
|
|
23565
|
-
sizeType = props.sizeType,
|
|
23566
|
-
type = props.type;
|
|
23567
23583
|
var symbolFactory = getSymbolFactory(type);
|
|
23568
23584
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23569
23585
|
return symbol();
|
|
23570
23586
|
};
|
|
23571
23587
|
var className = props.className,
|
|
23572
23588
|
cx = props.cx,
|
|
23573
|
-
cy = props.cy
|
|
23574
|
-
size = props.size;
|
|
23589
|
+
cy = props.cy;
|
|
23575
23590
|
var filteredProps = filterProps(props, true);
|
|
23576
23591
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23577
23592
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23582,35 +23597,34 @@ var Symbols = function Symbols(props) {
|
|
|
23582
23597
|
}
|
|
23583
23598
|
return null;
|
|
23584
23599
|
};
|
|
23585
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23586
23600
|
Symbols.registerSymbol = registerSymbol;
|
|
23587
23601
|
|
|
23588
|
-
function _typeof$
|
|
23602
|
+
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); }
|
|
23589
23603
|
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); }
|
|
23590
|
-
function ownKeys$
|
|
23591
|
-
function _objectSpread$
|
|
23592
|
-
function _classCallCheck$
|
|
23593
|
-
function _defineProperties$
|
|
23594
|
-
function _createClass$
|
|
23595
|
-
function _inherits$
|
|
23596
|
-
function _setPrototypeOf$
|
|
23597
|
-
function _createSuper$
|
|
23598
|
-
function _possibleConstructorReturn$
|
|
23599
|
-
function _assertThisInitialized$
|
|
23600
|
-
function _isNativeReflectConstruct$
|
|
23601
|
-
function _getPrototypeOf$
|
|
23602
|
-
function _defineProperty$
|
|
23603
|
-
function _toPropertyKey$
|
|
23604
|
-
function _toPrimitive$
|
|
23604
|
+
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; }
|
|
23605
|
+
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; }
|
|
23606
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23607
|
+
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); } }
|
|
23608
|
+
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; }
|
|
23609
|
+
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); }
|
|
23610
|
+
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); }
|
|
23611
|
+
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); }; }
|
|
23612
|
+
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); }
|
|
23613
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23614
|
+
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; } }
|
|
23615
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23616
|
+
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; }
|
|
23617
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23618
|
+
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); }
|
|
23605
23619
|
var SIZE = 32;
|
|
23606
23620
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23607
|
-
_inherits$
|
|
23608
|
-
var _super = _createSuper$
|
|
23621
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23622
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23609
23623
|
function DefaultLegendContent() {
|
|
23610
|
-
_classCallCheck$
|
|
23624
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23611
23625
|
return _super.apply(this, arguments);
|
|
23612
23626
|
}
|
|
23613
|
-
_createClass$
|
|
23627
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23614
23628
|
key: "renderIcon",
|
|
23615
23629
|
value:
|
|
23616
23630
|
/**
|
|
@@ -23655,7 +23669,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23655
23669
|
});
|
|
23656
23670
|
}
|
|
23657
23671
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23658
|
-
var iconProps = _objectSpread$
|
|
23672
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23659
23673
|
delete iconProps.legendIcon;
|
|
23660
23674
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23661
23675
|
}
|
|
@@ -23703,7 +23717,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23703
23717
|
var finalFormatter = entry.formatter || formatter;
|
|
23704
23718
|
var className = classNames((_classNames = {
|
|
23705
23719
|
'recharts-legend-item': true
|
|
23706
|
-
}, _defineProperty$
|
|
23720
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23707
23721
|
if (entry.type === 'none') {
|
|
23708
23722
|
return null;
|
|
23709
23723
|
}
|
|
@@ -23748,8 +23762,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23748
23762
|
}]);
|
|
23749
23763
|
return DefaultLegendContent;
|
|
23750
23764
|
}(React$3.PureComponent);
|
|
23751
|
-
_defineProperty$
|
|
23752
|
-
_defineProperty$
|
|
23765
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23766
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23753
23767
|
iconSize: 14,
|
|
23754
23768
|
layout: 'horizontal',
|
|
23755
23769
|
align: 'center',
|
|
@@ -23757,25 +23771,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23757
23771
|
inactiveColor: '#ccc'
|
|
23758
23772
|
});
|
|
23759
23773
|
|
|
23760
|
-
function _typeof$
|
|
23761
|
-
var _excluded$
|
|
23762
|
-
function ownKeys$
|
|
23763
|
-
function _objectSpread$
|
|
23764
|
-
function _classCallCheck$
|
|
23765
|
-
function _defineProperties$
|
|
23766
|
-
function _createClass$
|
|
23767
|
-
function _inherits$
|
|
23768
|
-
function _setPrototypeOf$
|
|
23769
|
-
function _createSuper$
|
|
23770
|
-
function _possibleConstructorReturn$
|
|
23771
|
-
function _assertThisInitialized$
|
|
23772
|
-
function _isNativeReflectConstruct$
|
|
23773
|
-
function _getPrototypeOf$
|
|
23774
|
-
function _defineProperty$
|
|
23775
|
-
function _toPropertyKey$
|
|
23776
|
-
function _toPrimitive$
|
|
23777
|
-
function _objectWithoutProperties$
|
|
23778
|
-
function _objectWithoutPropertiesLoose$
|
|
23774
|
+
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); }
|
|
23775
|
+
var _excluded$b = ["ref"];
|
|
23776
|
+
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; }
|
|
23777
|
+
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; }
|
|
23778
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23779
|
+
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); } }
|
|
23780
|
+
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; }
|
|
23781
|
+
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); }
|
|
23782
|
+
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); }
|
|
23783
|
+
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); }; }
|
|
23784
|
+
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); }
|
|
23785
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23786
|
+
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; } }
|
|
23787
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23788
|
+
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; }
|
|
23789
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23790
|
+
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); }
|
|
23791
|
+
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; }
|
|
23792
|
+
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; }
|
|
23779
23793
|
function defaultUniqBy$1(entry) {
|
|
23780
23794
|
return entry.value;
|
|
23781
23795
|
}
|
|
@@ -23796,27 +23810,27 @@ function renderContent$1(content, props) {
|
|
|
23796
23810
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23797
23811
|
}
|
|
23798
23812
|
props.ref;
|
|
23799
|
-
var otherProps = _objectWithoutProperties$
|
|
23813
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23800
23814
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23801
23815
|
}
|
|
23802
23816
|
var EPS$2 = 1;
|
|
23803
23817
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23804
|
-
_inherits$
|
|
23805
|
-
var _super = _createSuper$
|
|
23818
|
+
_inherits$8(Legend, _PureComponent);
|
|
23819
|
+
var _super = _createSuper$8(Legend);
|
|
23806
23820
|
function Legend() {
|
|
23807
23821
|
var _this;
|
|
23808
|
-
_classCallCheck$
|
|
23822
|
+
_classCallCheck$a(this, Legend);
|
|
23809
23823
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23810
23824
|
args[_key] = arguments[_key];
|
|
23811
23825
|
}
|
|
23812
23826
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23813
|
-
_defineProperty$
|
|
23827
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23814
23828
|
boxWidth: -1,
|
|
23815
23829
|
boxHeight: -1
|
|
23816
23830
|
});
|
|
23817
23831
|
return _this;
|
|
23818
23832
|
}
|
|
23819
|
-
_createClass$
|
|
23833
|
+
_createClass$a(Legend, [{
|
|
23820
23834
|
key: "componentDidMount",
|
|
23821
23835
|
value: function componentDidMount() {
|
|
23822
23836
|
this.updateBBox();
|
|
@@ -23891,7 +23905,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23891
23905
|
};
|
|
23892
23906
|
}
|
|
23893
23907
|
}
|
|
23894
|
-
return _objectSpread$
|
|
23908
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23895
23909
|
}
|
|
23896
23910
|
}, {
|
|
23897
23911
|
key: "updateBBox",
|
|
@@ -23934,7 +23948,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23934
23948
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23935
23949
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23936
23950
|
payload = _this$props2.payload;
|
|
23937
|
-
var outerStyle = _objectSpread$
|
|
23951
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23938
23952
|
position: 'absolute',
|
|
23939
23953
|
width: width || 'auto',
|
|
23940
23954
|
height: height || 'auto'
|
|
@@ -23945,7 +23959,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23945
23959
|
ref: function ref(node) {
|
|
23946
23960
|
_this2.wrapperNode = node;
|
|
23947
23961
|
}
|
|
23948
|
-
}, renderContent$1(content, _objectSpread$
|
|
23962
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23949
23963
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23950
23964
|
})));
|
|
23951
23965
|
}
|
|
@@ -23968,8 +23982,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23968
23982
|
}]);
|
|
23969
23983
|
return Legend;
|
|
23970
23984
|
}(React$3.PureComponent);
|
|
23971
|
-
_defineProperty$
|
|
23972
|
-
_defineProperty$
|
|
23985
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23986
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23973
23987
|
iconSize: 14,
|
|
23974
23988
|
layout: 'horizontal',
|
|
23975
23989
|
align: 'center',
|
|
@@ -24533,13 +24547,13 @@ function setRafTimeout(callback) {
|
|
|
24533
24547
|
requestAnimationFrame(shouldUpdate);
|
|
24534
24548
|
}
|
|
24535
24549
|
|
|
24536
|
-
function _typeof$
|
|
24537
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24538
|
-
function _nonIterableRest$
|
|
24539
|
-
function _unsupportedIterableToArray$
|
|
24540
|
-
function _arrayLikeToArray$
|
|
24550
|
+
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); }
|
|
24551
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24552
|
+
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."); }
|
|
24553
|
+
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); }
|
|
24554
|
+
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; }
|
|
24541
24555
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24542
|
-
function _arrayWithHoles$
|
|
24556
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24543
24557
|
function createAnimateManager() {
|
|
24544
24558
|
var currStyle = {};
|
|
24545
24559
|
var handleChange = function handleChange() {
|
|
@@ -24566,7 +24580,7 @@ function createAnimateManager() {
|
|
|
24566
24580
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24567
24581
|
return;
|
|
24568
24582
|
}
|
|
24569
|
-
if (_typeof$
|
|
24583
|
+
if (_typeof$r(_style) === 'object') {
|
|
24570
24584
|
currStyle = _style;
|
|
24571
24585
|
handleChange(currStyle);
|
|
24572
24586
|
}
|
|
@@ -24593,12 +24607,12 @@ function createAnimateManager() {
|
|
|
24593
24607
|
};
|
|
24594
24608
|
}
|
|
24595
24609
|
|
|
24596
|
-
function _typeof$
|
|
24597
|
-
function ownKeys$
|
|
24598
|
-
function _objectSpread$
|
|
24599
|
-
function _defineProperty$
|
|
24600
|
-
function _toPropertyKey$
|
|
24601
|
-
function _toPrimitive$
|
|
24610
|
+
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); }
|
|
24611
|
+
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; }
|
|
24612
|
+
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; }
|
|
24613
|
+
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; }
|
|
24614
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24615
|
+
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); }
|
|
24602
24616
|
/* eslint no-console: 0 */
|
|
24603
24617
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24604
24618
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24630,7 +24644,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24630
24644
|
*/
|
|
24631
24645
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24632
24646
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24633
|
-
return _defineProperty$
|
|
24647
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24634
24648
|
}
|
|
24635
24649
|
var isTransition = name === 'transition';
|
|
24636
24650
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24641,7 +24655,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24641
24655
|
if (isTransition) {
|
|
24642
24656
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24643
24657
|
}
|
|
24644
|
-
return _objectSpread$
|
|
24658
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24645
24659
|
}, {});
|
|
24646
24660
|
};
|
|
24647
24661
|
|
|
@@ -24651,7 +24665,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24651
24665
|
*/
|
|
24652
24666
|
var mapObject = function mapObject(fn, obj) {
|
|
24653
24667
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24654
|
-
return _objectSpread$
|
|
24668
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24655
24669
|
}, {});
|
|
24656
24670
|
};
|
|
24657
24671
|
|
|
@@ -24661,7 +24675,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24661
24675
|
*/
|
|
24662
24676
|
var translateStyle = function translateStyle(style) {
|
|
24663
24677
|
return Object.keys(style).reduce(function (res, key) {
|
|
24664
|
-
return _objectSpread$
|
|
24678
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24665
24679
|
}, style);
|
|
24666
24680
|
};
|
|
24667
24681
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24689,16 +24703,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24689
24703
|
}
|
|
24690
24704
|
};
|
|
24691
24705
|
|
|
24692
|
-
function _slicedToArray$
|
|
24693
|
-
function _nonIterableRest$
|
|
24694
|
-
function _iterableToArrayLimit$
|
|
24695
|
-
function _arrayWithHoles$
|
|
24696
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24706
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24707
|
+
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."); }
|
|
24708
|
+
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; } }
|
|
24709
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24710
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24697
24711
|
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."); }
|
|
24698
|
-
function _unsupportedIterableToArray$
|
|
24712
|
+
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); }
|
|
24699
24713
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24700
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24701
|
-
function _arrayLikeToArray$
|
|
24714
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24715
|
+
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; }
|
|
24702
24716
|
var ACCURACY = 1e-4;
|
|
24703
24717
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24704
24718
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24774,7 +24788,7 @@ var configBezier = function configBezier() {
|
|
|
24774
24788
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24775
24789
|
return parseFloat(x);
|
|
24776
24790
|
});
|
|
24777
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24791
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24778
24792
|
x1 = _easing$1$split$0$spl2[0];
|
|
24779
24793
|
y1 = _easing$1$split$0$spl2[1];
|
|
24780
24794
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24867,22 +24881,22 @@ var configEasing = function configEasing() {
|
|
|
24867
24881
|
return null;
|
|
24868
24882
|
};
|
|
24869
24883
|
|
|
24870
|
-
function _typeof$
|
|
24871
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24884
|
+
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); }
|
|
24885
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24872
24886
|
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."); }
|
|
24873
24887
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24874
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24875
|
-
function ownKeys$
|
|
24876
|
-
function _objectSpread$
|
|
24877
|
-
function _defineProperty$
|
|
24878
|
-
function _toPropertyKey$
|
|
24879
|
-
function _toPrimitive$
|
|
24880
|
-
function _slicedToArray$
|
|
24881
|
-
function _nonIterableRest$
|
|
24882
|
-
function _unsupportedIterableToArray$
|
|
24883
|
-
function _arrayLikeToArray$
|
|
24884
|
-
function _iterableToArrayLimit$
|
|
24885
|
-
function _arrayWithHoles$
|
|
24888
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24889
|
+
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; }
|
|
24890
|
+
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; }
|
|
24891
|
+
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; }
|
|
24892
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24893
|
+
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); }
|
|
24894
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24895
|
+
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."); }
|
|
24896
|
+
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); }
|
|
24897
|
+
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; }
|
|
24898
|
+
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; } }
|
|
24899
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24886
24900
|
var alpha = function alpha(begin, end, k) {
|
|
24887
24901
|
return begin + (end - begin) * k;
|
|
24888
24902
|
};
|
|
@@ -24900,10 +24914,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24900
24914
|
var nextStepVals = mapObject(function (key, val) {
|
|
24901
24915
|
if (needContinue(val)) {
|
|
24902
24916
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24903
|
-
_easing2 = _slicedToArray$
|
|
24917
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24904
24918
|
newX = _easing2[0],
|
|
24905
24919
|
newV = _easing2[1];
|
|
24906
|
-
return _objectSpread$
|
|
24920
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24907
24921
|
from: newX,
|
|
24908
24922
|
velocity: newV
|
|
24909
24923
|
});
|
|
@@ -24913,7 +24927,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24913
24927
|
if (steps < 1) {
|
|
24914
24928
|
return mapObject(function (key, val) {
|
|
24915
24929
|
if (needContinue(val)) {
|
|
24916
|
-
return _objectSpread$
|
|
24930
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24917
24931
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24918
24932
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24919
24933
|
});
|
|
@@ -24928,10 +24942,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24928
24942
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24929
24943
|
var interKeys = getIntersectionKeys(from, to);
|
|
24930
24944
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24931
|
-
return _objectSpread$
|
|
24945
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24932
24946
|
}, {});
|
|
24933
24947
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24934
|
-
return _objectSpread$
|
|
24948
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24935
24949
|
from: from[key],
|
|
24936
24950
|
velocity: 0,
|
|
24937
24951
|
to: to[key]
|
|
@@ -24961,7 +24975,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24961
24975
|
var steps = deltaTime / easing.dt;
|
|
24962
24976
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24963
24977
|
// get union set and add compatible prefix
|
|
24964
|
-
render(_objectSpread$
|
|
24978
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24965
24979
|
preTime = now;
|
|
24966
24980
|
if (!shouldStopAnimation()) {
|
|
24967
24981
|
cafId = requestAnimationFrame(update);
|
|
@@ -24979,14 +24993,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24979
24993
|
}, timingStyle);
|
|
24980
24994
|
|
|
24981
24995
|
// get union set and add compatible prefix
|
|
24982
|
-
render(_objectSpread$
|
|
24996
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24983
24997
|
if (t < 1) {
|
|
24984
24998
|
cafId = requestAnimationFrame(update);
|
|
24985
24999
|
} else {
|
|
24986
25000
|
var finalStyle = mapObject(function (key, val) {
|
|
24987
25001
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24988
25002
|
}, timingStyle);
|
|
24989
|
-
render(_objectSpread$
|
|
25003
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24990
25004
|
}
|
|
24991
25005
|
};
|
|
24992
25006
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -25002,37 +25016,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
25002
25016
|
};
|
|
25003
25017
|
});
|
|
25004
25018
|
|
|
25005
|
-
function _typeof$
|
|
25006
|
-
var _excluded$
|
|
25007
|
-
function _objectWithoutProperties$
|
|
25008
|
-
function _objectWithoutPropertiesLoose$
|
|
25009
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
25019
|
+
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); }
|
|
25020
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
25021
|
+
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; }
|
|
25022
|
+
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; }
|
|
25023
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
25010
25024
|
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."); }
|
|
25011
|
-
function _unsupportedIterableToArray$
|
|
25025
|
+
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); }
|
|
25012
25026
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25013
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
25014
|
-
function _arrayLikeToArray$
|
|
25015
|
-
function ownKeys$
|
|
25016
|
-
function _objectSpread$
|
|
25017
|
-
function _defineProperty$
|
|
25018
|
-
function _classCallCheck$
|
|
25019
|
-
function _defineProperties$
|
|
25020
|
-
function _createClass$
|
|
25021
|
-
function _toPropertyKey$
|
|
25022
|
-
function _toPrimitive$
|
|
25023
|
-
function _inherits$
|
|
25024
|
-
function _setPrototypeOf$
|
|
25025
|
-
function _createSuper$
|
|
25026
|
-
function _possibleConstructorReturn$
|
|
25027
|
-
function _assertThisInitialized$
|
|
25028
|
-
function _isNativeReflectConstruct$
|
|
25029
|
-
function _getPrototypeOf$
|
|
25027
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
25028
|
+
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; }
|
|
25029
|
+
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; }
|
|
25030
|
+
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; }
|
|
25031
|
+
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; }
|
|
25032
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25033
|
+
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); } }
|
|
25034
|
+
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; }
|
|
25035
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
25036
|
+
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); }
|
|
25037
|
+
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); }
|
|
25038
|
+
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); }
|
|
25039
|
+
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); }; }
|
|
25040
|
+
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); }
|
|
25041
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25042
|
+
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; } }
|
|
25043
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
25030
25044
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25031
|
-
_inherits$
|
|
25032
|
-
var _super = _createSuper$
|
|
25045
|
+
_inherits$7(Animate, _PureComponent);
|
|
25046
|
+
var _super = _createSuper$7(Animate);
|
|
25033
25047
|
function Animate(props, context) {
|
|
25034
25048
|
var _this;
|
|
25035
|
-
_classCallCheck$
|
|
25049
|
+
_classCallCheck$9(this, Animate);
|
|
25036
25050
|
_this = _super.call(this, props, context);
|
|
25037
25051
|
var _this$props = _this.props,
|
|
25038
25052
|
isActive = _this$props.isActive,
|
|
@@ -25042,8 +25056,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25042
25056
|
steps = _this$props.steps,
|
|
25043
25057
|
children = _this$props.children,
|
|
25044
25058
|
duration = _this$props.duration;
|
|
25045
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25046
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25059
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
25060
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
25047
25061
|
if (!isActive || duration <= 0) {
|
|
25048
25062
|
_this.state = {
|
|
25049
25063
|
style: {}
|
|
@@ -25055,7 +25069,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25055
25069
|
style: to
|
|
25056
25070
|
};
|
|
25057
25071
|
}
|
|
25058
|
-
return _possibleConstructorReturn$
|
|
25072
|
+
return _possibleConstructorReturn$7(_this);
|
|
25059
25073
|
}
|
|
25060
25074
|
if (steps && steps.length) {
|
|
25061
25075
|
_this.state = {
|
|
@@ -25066,10 +25080,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25066
25080
|
_this.state = {
|
|
25067
25081
|
style: from
|
|
25068
25082
|
};
|
|
25069
|
-
return _possibleConstructorReturn$
|
|
25083
|
+
return _possibleConstructorReturn$7(_this);
|
|
25070
25084
|
}
|
|
25071
25085
|
_this.state = {
|
|
25072
|
-
style: attributeName ? _defineProperty$
|
|
25086
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25073
25087
|
};
|
|
25074
25088
|
} else {
|
|
25075
25089
|
_this.state = {
|
|
@@ -25078,7 +25092,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25078
25092
|
}
|
|
25079
25093
|
return _this;
|
|
25080
25094
|
}
|
|
25081
|
-
_createClass$
|
|
25095
|
+
_createClass$9(Animate, [{
|
|
25082
25096
|
key: "componentDidMount",
|
|
25083
25097
|
value: function componentDidMount() {
|
|
25084
25098
|
var _this$props2 = this.props,
|
|
@@ -25106,7 +25120,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25106
25120
|
}
|
|
25107
25121
|
if (!isActive) {
|
|
25108
25122
|
var newState = {
|
|
25109
|
-
style: attributeName ? _defineProperty$
|
|
25123
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
25110
25124
|
};
|
|
25111
25125
|
if (this.state && style) {
|
|
25112
25126
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25129,14 +25143,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25129
25143
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25130
25144
|
if (this.state && style) {
|
|
25131
25145
|
var _newState = {
|
|
25132
|
-
style: attributeName ? _defineProperty$
|
|
25146
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
25133
25147
|
};
|
|
25134
25148
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25135
25149
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25136
25150
|
this.setState(_newState);
|
|
25137
25151
|
}
|
|
25138
25152
|
}
|
|
25139
|
-
this.runAnimation(_objectSpread$
|
|
25153
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
25140
25154
|
from: from,
|
|
25141
25155
|
begin: 0
|
|
25142
25156
|
}));
|
|
@@ -25219,7 +25233,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25219
25233
|
}), duration]);
|
|
25220
25234
|
}
|
|
25221
25235
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25222
|
-
var newStyle = _objectSpread$
|
|
25236
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25223
25237
|
transition: transition
|
|
25224
25238
|
});
|
|
25225
25239
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25251,9 +25265,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25251
25265
|
this.runStepAnimation(props);
|
|
25252
25266
|
return;
|
|
25253
25267
|
}
|
|
25254
|
-
var to = attributeName ? _defineProperty$
|
|
25268
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25255
25269
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25256
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25270
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25257
25271
|
transition: transition
|
|
25258
25272
|
}), duration, onAnimationEnd]);
|
|
25259
25273
|
}
|
|
@@ -25274,7 +25288,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25274
25288
|
_this$props4.onAnimationEnd;
|
|
25275
25289
|
_this$props4.shouldReAnimate;
|
|
25276
25290
|
_this$props4.onAnimationReStart;
|
|
25277
|
-
var others = _objectWithoutProperties$
|
|
25291
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25278
25292
|
var count = React$3.Children.count(children);
|
|
25279
25293
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25280
25294
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25289,8 +25303,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25289
25303
|
_container$props$styl = _container$props.style,
|
|
25290
25304
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25291
25305
|
className = _container$props.className;
|
|
25292
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25293
|
-
style: _objectSpread$
|
|
25306
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25307
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25294
25308
|
className: className
|
|
25295
25309
|
}));
|
|
25296
25310
|
return res;
|
|
@@ -25815,10 +25829,10 @@ var defineProperty$2 = (function() {
|
|
|
25815
25829
|
} catch (e) {}
|
|
25816
25830
|
}());
|
|
25817
25831
|
|
|
25818
|
-
var _defineProperty$
|
|
25832
|
+
var _defineProperty$o = defineProperty$2;
|
|
25819
25833
|
|
|
25820
25834
|
var constant$1 = constant_1,
|
|
25821
|
-
defineProperty$1 = _defineProperty$
|
|
25835
|
+
defineProperty$1 = _defineProperty$o,
|
|
25822
25836
|
identity$7 = identity_1;
|
|
25823
25837
|
|
|
25824
25838
|
/**
|
|
@@ -25995,18 +26009,18 @@ var sortBy_1 = sortBy;
|
|
|
25995
26009
|
/**
|
|
25996
26010
|
* @fileOverview Default Tooltip Content
|
|
25997
26011
|
*/
|
|
25998
|
-
function _typeof$
|
|
25999
|
-
function _slicedToArray$
|
|
26000
|
-
function _nonIterableRest$
|
|
26001
|
-
function _unsupportedIterableToArray$
|
|
26002
|
-
function _arrayLikeToArray$
|
|
26003
|
-
function _iterableToArrayLimit$
|
|
26004
|
-
function _arrayWithHoles$
|
|
26005
|
-
function ownKeys$
|
|
26006
|
-
function _objectSpread$
|
|
26007
|
-
function _defineProperty$
|
|
26008
|
-
function _toPropertyKey$
|
|
26009
|
-
function _toPrimitive$
|
|
26012
|
+
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); }
|
|
26013
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26014
|
+
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."); }
|
|
26015
|
+
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); }
|
|
26016
|
+
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; }
|
|
26017
|
+
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; } }
|
|
26018
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26019
|
+
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; }
|
|
26020
|
+
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; }
|
|
26021
|
+
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; }
|
|
26022
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
26023
|
+
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); }
|
|
26010
26024
|
function defaultFormatter(value) {
|
|
26011
26025
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
26012
26026
|
}
|
|
@@ -26036,7 +26050,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26036
26050
|
if (entry.type === 'none') {
|
|
26037
26051
|
return null;
|
|
26038
26052
|
}
|
|
26039
|
-
var finalItemStyle = _objectSpread$
|
|
26053
|
+
var finalItemStyle = _objectSpread$m({
|
|
26040
26054
|
display: 'block',
|
|
26041
26055
|
paddingTop: 4,
|
|
26042
26056
|
paddingBottom: 4,
|
|
@@ -26050,7 +26064,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26050
26064
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26051
26065
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26052
26066
|
if (Array.isArray(formatted)) {
|
|
26053
|
-
var _formatted = _slicedToArray$
|
|
26067
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
26054
26068
|
finalValue = _formatted[0];
|
|
26055
26069
|
finalName = _formatted[1];
|
|
26056
26070
|
} else {
|
|
@@ -26082,14 +26096,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26082
26096
|
}
|
|
26083
26097
|
return null;
|
|
26084
26098
|
};
|
|
26085
|
-
var finalStyle = _objectSpread$
|
|
26099
|
+
var finalStyle = _objectSpread$m({
|
|
26086
26100
|
margin: 0,
|
|
26087
26101
|
padding: 10,
|
|
26088
26102
|
backgroundColor: '#fff',
|
|
26089
26103
|
border: '1px solid #ccc',
|
|
26090
26104
|
whiteSpace: 'nowrap'
|
|
26091
26105
|
}, contentStyle);
|
|
26092
|
-
var finalLabelStyle = _objectSpread$
|
|
26106
|
+
var finalLabelStyle = _objectSpread$m({
|
|
26093
26107
|
margin: 0
|
|
26094
26108
|
}, labelStyle);
|
|
26095
26109
|
var hasLabel = !isNil_1(label);
|
|
@@ -26130,18 +26144,22 @@ var Global = {
|
|
|
26130
26144
|
}
|
|
26131
26145
|
};
|
|
26132
26146
|
|
|
26133
|
-
function _typeof$
|
|
26134
|
-
function ownKeys$
|
|
26135
|
-
function _objectSpread$
|
|
26136
|
-
function
|
|
26137
|
-
function
|
|
26138
|
-
function
|
|
26139
|
-
function
|
|
26140
|
-
function
|
|
26141
|
-
function
|
|
26142
|
-
function
|
|
26143
|
-
function
|
|
26144
|
-
function
|
|
26147
|
+
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); }
|
|
26148
|
+
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; }
|
|
26149
|
+
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; }
|
|
26150
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
26151
|
+
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); } }
|
|
26152
|
+
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; }
|
|
26153
|
+
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); }
|
|
26154
|
+
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); }
|
|
26155
|
+
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); }; }
|
|
26156
|
+
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); }
|
|
26157
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
26158
|
+
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; } }
|
|
26159
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26160
|
+
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; }
|
|
26161
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26162
|
+
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); }
|
|
26145
26163
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26146
26164
|
var EPS$1 = 1;
|
|
26147
26165
|
function defaultUniqBy(entry) {
|
|
@@ -26165,7 +26183,204 @@ function renderContent(content, props) {
|
|
|
26165
26183
|
}
|
|
26166
26184
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26167
26185
|
}
|
|
26168
|
-
var
|
|
26186
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
26187
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
26188
|
+
var _super = _createSuper$6(Tooltip);
|
|
26189
|
+
function Tooltip() {
|
|
26190
|
+
var _this;
|
|
26191
|
+
_classCallCheck$8(this, Tooltip);
|
|
26192
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26193
|
+
args[_key] = arguments[_key];
|
|
26194
|
+
}
|
|
26195
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
26196
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26197
|
+
boxWidth: -1,
|
|
26198
|
+
boxHeight: -1,
|
|
26199
|
+
dismissed: false,
|
|
26200
|
+
dismissedAtCoordinate: {
|
|
26201
|
+
x: 0,
|
|
26202
|
+
y: 0
|
|
26203
|
+
}
|
|
26204
|
+
});
|
|
26205
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26206
|
+
if (event.key === 'Escape') {
|
|
26207
|
+
_this.setState({
|
|
26208
|
+
dismissed: true,
|
|
26209
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26210
|
+
x: _this.props.coordinate.x,
|
|
26211
|
+
y: _this.props.coordinate.y
|
|
26212
|
+
})
|
|
26213
|
+
});
|
|
26214
|
+
}
|
|
26215
|
+
});
|
|
26216
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26217
|
+
var key = _ref.key,
|
|
26218
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26219
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26220
|
+
var _this$props = _this.props,
|
|
26221
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26222
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26223
|
+
coordinate = _this$props.coordinate,
|
|
26224
|
+
offset = _this$props.offset,
|
|
26225
|
+
position = _this$props.position,
|
|
26226
|
+
viewBox = _this$props.viewBox;
|
|
26227
|
+
if (position && isNumber(position[key])) {
|
|
26228
|
+
return position[key];
|
|
26229
|
+
}
|
|
26230
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26231
|
+
var positive = coordinate[key] + offset;
|
|
26232
|
+
if (allowEscapeViewBox[key]) {
|
|
26233
|
+
return reverseDirection[key] ? negative : positive;
|
|
26234
|
+
}
|
|
26235
|
+
if (reverseDirection[key]) {
|
|
26236
|
+
var _tooltipBoundary = negative;
|
|
26237
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26238
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26239
|
+
return Math.max(positive, viewBox[key]);
|
|
26240
|
+
}
|
|
26241
|
+
return Math.max(negative, viewBox[key]);
|
|
26242
|
+
}
|
|
26243
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26244
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26245
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26246
|
+
return Math.max(negative, viewBox[key]);
|
|
26247
|
+
}
|
|
26248
|
+
return Math.max(positive, viewBox[key]);
|
|
26249
|
+
});
|
|
26250
|
+
return _this;
|
|
26251
|
+
}
|
|
26252
|
+
_createClass$8(Tooltip, [{
|
|
26253
|
+
key: "componentDidMount",
|
|
26254
|
+
value: function componentDidMount() {
|
|
26255
|
+
this.updateBBox();
|
|
26256
|
+
}
|
|
26257
|
+
}, {
|
|
26258
|
+
key: "componentWillUnmount",
|
|
26259
|
+
value: function componentWillUnmount() {
|
|
26260
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26261
|
+
}
|
|
26262
|
+
}, {
|
|
26263
|
+
key: "componentDidUpdate",
|
|
26264
|
+
value: function componentDidUpdate() {
|
|
26265
|
+
this.updateBBox();
|
|
26266
|
+
}
|
|
26267
|
+
}, {
|
|
26268
|
+
key: "updateBBox",
|
|
26269
|
+
value: function updateBBox() {
|
|
26270
|
+
var _this$state = this.state,
|
|
26271
|
+
boxWidth = _this$state.boxWidth,
|
|
26272
|
+
boxHeight = _this$state.boxHeight,
|
|
26273
|
+
dismissed = _this$state.dismissed;
|
|
26274
|
+
if (dismissed) {
|
|
26275
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26276
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26277
|
+
this.setState({
|
|
26278
|
+
dismissed: false
|
|
26279
|
+
});
|
|
26280
|
+
}
|
|
26281
|
+
} else {
|
|
26282
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26283
|
+
}
|
|
26284
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26285
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26286
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26287
|
+
this.setState({
|
|
26288
|
+
boxWidth: box.width,
|
|
26289
|
+
boxHeight: box.height
|
|
26290
|
+
});
|
|
26291
|
+
}
|
|
26292
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26293
|
+
this.setState({
|
|
26294
|
+
boxWidth: -1,
|
|
26295
|
+
boxHeight: -1
|
|
26296
|
+
});
|
|
26297
|
+
}
|
|
26298
|
+
}
|
|
26299
|
+
}, {
|
|
26300
|
+
key: "render",
|
|
26301
|
+
value: function render() {
|
|
26302
|
+
var _classNames,
|
|
26303
|
+
_this2 = this;
|
|
26304
|
+
var _this$props2 = this.props,
|
|
26305
|
+
payload = _this$props2.payload,
|
|
26306
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26307
|
+
animationDuration = _this$props2.animationDuration,
|
|
26308
|
+
animationEasing = _this$props2.animationEasing,
|
|
26309
|
+
filterNull = _this$props2.filterNull,
|
|
26310
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26311
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26312
|
+
return !isNil_1(entry.value);
|
|
26313
|
+
}) : payload);
|
|
26314
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26315
|
+
var _this$props3 = this.props,
|
|
26316
|
+
content = _this$props3.content,
|
|
26317
|
+
viewBox = _this$props3.viewBox,
|
|
26318
|
+
coordinate = _this$props3.coordinate,
|
|
26319
|
+
position = _this$props3.position,
|
|
26320
|
+
active = _this$props3.active,
|
|
26321
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26322
|
+
var outerStyle = _objectSpread$l({
|
|
26323
|
+
pointerEvents: 'none',
|
|
26324
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26325
|
+
position: 'absolute',
|
|
26326
|
+
top: 0,
|
|
26327
|
+
left: 0
|
|
26328
|
+
}, wrapperStyle);
|
|
26329
|
+
var translateX, translateY;
|
|
26330
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26331
|
+
translateX = position.x;
|
|
26332
|
+
translateY = position.y;
|
|
26333
|
+
} else {
|
|
26334
|
+
var _this$state2 = this.state,
|
|
26335
|
+
boxWidth = _this$state2.boxWidth,
|
|
26336
|
+
boxHeight = _this$state2.boxHeight;
|
|
26337
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26338
|
+
translateX = this.getTranslate({
|
|
26339
|
+
key: 'x',
|
|
26340
|
+
tooltipDimension: boxWidth,
|
|
26341
|
+
viewBoxDimension: viewBox.width
|
|
26342
|
+
});
|
|
26343
|
+
translateY = this.getTranslate({
|
|
26344
|
+
key: 'y',
|
|
26345
|
+
tooltipDimension: boxHeight,
|
|
26346
|
+
viewBoxDimension: viewBox.height
|
|
26347
|
+
});
|
|
26348
|
+
} else {
|
|
26349
|
+
outerStyle.visibility = 'hidden';
|
|
26350
|
+
}
|
|
26351
|
+
}
|
|
26352
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26353
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26354
|
+
})), outerStyle);
|
|
26355
|
+
if (isAnimationActive && active) {
|
|
26356
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26357
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26358
|
+
})), outerStyle);
|
|
26359
|
+
}
|
|
26360
|
+
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));
|
|
26361
|
+
return (
|
|
26362
|
+
/*#__PURE__*/
|
|
26363
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26364
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26365
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26366
|
+
React__default["default"].createElement("div", {
|
|
26367
|
+
tabIndex: -1,
|
|
26368
|
+
role: "dialog",
|
|
26369
|
+
className: cls,
|
|
26370
|
+
style: outerStyle,
|
|
26371
|
+
ref: function ref(node) {
|
|
26372
|
+
_this2.wrapperNode = node;
|
|
26373
|
+
}
|
|
26374
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26375
|
+
payload: finalPayload
|
|
26376
|
+
})))
|
|
26377
|
+
);
|
|
26378
|
+
}
|
|
26379
|
+
}]);
|
|
26380
|
+
return Tooltip;
|
|
26381
|
+
}(React$3.PureComponent);
|
|
26382
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26383
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26169
26384
|
active: false,
|
|
26170
26385
|
allowEscapeViewBox: {
|
|
26171
26386
|
x: false,
|
|
@@ -26186,9 +26401,6 @@ var tooltipDefaultProps = {
|
|
|
26186
26401
|
x: 0,
|
|
26187
26402
|
y: 0
|
|
26188
26403
|
},
|
|
26189
|
-
// this doesn't exist on TooltipProps
|
|
26190
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26191
|
-
// @ts-ignore
|
|
26192
26404
|
cursorStyle: {},
|
|
26193
26405
|
separator: ' : ',
|
|
26194
26406
|
wrapperStyle: {},
|
|
@@ -26202,173 +26414,7 @@ var tooltipDefaultProps = {
|
|
|
26202
26414
|
animationDuration: 400,
|
|
26203
26415
|
filterNull: true,
|
|
26204
26416
|
useTranslate3d: false
|
|
26205
|
-
};
|
|
26206
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26207
|
-
var _classNames;
|
|
26208
|
-
var _useState = React$3.useState(-1),
|
|
26209
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26210
|
-
boxWidth = _useState2[0],
|
|
26211
|
-
setBoxWidth = _useState2[1];
|
|
26212
|
-
var _useState3 = React$3.useState(-1),
|
|
26213
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26214
|
-
boxHeight = _useState4[0],
|
|
26215
|
-
setBoxHeight = _useState4[1];
|
|
26216
|
-
var _useState5 = React$3.useState(false),
|
|
26217
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26218
|
-
dismissed = _useState6[0],
|
|
26219
|
-
setDismissed = _useState6[1];
|
|
26220
|
-
var _useState7 = React$3.useState({
|
|
26221
|
-
x: 0,
|
|
26222
|
-
y: 0
|
|
26223
|
-
}),
|
|
26224
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26225
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26226
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26227
|
-
var wrapperNode = React$3.useRef();
|
|
26228
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26229
|
-
reverseDirection = props.reverseDirection,
|
|
26230
|
-
coordinate = props.coordinate,
|
|
26231
|
-
offset = props.offset,
|
|
26232
|
-
position = props.position,
|
|
26233
|
-
viewBox = props.viewBox;
|
|
26234
|
-
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26235
|
-
if (event.key === 'Escape') {
|
|
26236
|
-
setDismissed(true);
|
|
26237
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26238
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26239
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26240
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26241
|
-
});
|
|
26242
|
-
});
|
|
26243
|
-
}
|
|
26244
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26245
|
-
React$3.useEffect(function () {
|
|
26246
|
-
var updateBBox = function updateBBox() {
|
|
26247
|
-
if (dismissed) {
|
|
26248
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26249
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26250
|
-
setDismissed(false);
|
|
26251
|
-
}
|
|
26252
|
-
} else {
|
|
26253
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26254
|
-
}
|
|
26255
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26256
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26257
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26258
|
-
setBoxWidth(box.width);
|
|
26259
|
-
setBoxHeight(box.height);
|
|
26260
|
-
}
|
|
26261
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26262
|
-
setBoxWidth(-1);
|
|
26263
|
-
setBoxHeight(-1);
|
|
26264
|
-
}
|
|
26265
|
-
};
|
|
26266
|
-
updateBBox();
|
|
26267
|
-
return function () {
|
|
26268
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26269
|
-
};
|
|
26270
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26271
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26272
|
-
var key = _ref.key,
|
|
26273
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26274
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26275
|
-
if (position && isNumber(position[key])) {
|
|
26276
|
-
return position[key];
|
|
26277
|
-
}
|
|
26278
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26279
|
-
var positive = coordinate[key] + offset;
|
|
26280
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26281
|
-
return reverseDirection[key] ? negative : positive;
|
|
26282
|
-
}
|
|
26283
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26284
|
-
var _tooltipBoundary = negative;
|
|
26285
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26286
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26287
|
-
return Math.max(positive, viewBox[key]);
|
|
26288
|
-
}
|
|
26289
|
-
return Math.max(negative, viewBox[key]);
|
|
26290
|
-
}
|
|
26291
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26292
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26293
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26294
|
-
return Math.max(negative, viewBox[key]);
|
|
26295
|
-
}
|
|
26296
|
-
return Math.max(positive, viewBox[key]);
|
|
26297
|
-
};
|
|
26298
|
-
var payload = props.payload,
|
|
26299
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26300
|
-
filterNull = props.filterNull,
|
|
26301
|
-
active = props.active,
|
|
26302
|
-
wrapperStyle = props.wrapperStyle,
|
|
26303
|
-
useTranslate3d = props.useTranslate3d,
|
|
26304
|
-
isAnimationActive = props.isAnimationActive,
|
|
26305
|
-
animationDuration = props.animationDuration,
|
|
26306
|
-
animationEasing = props.animationEasing;
|
|
26307
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26308
|
-
return !isNil_1(entry.value);
|
|
26309
|
-
}) : payload);
|
|
26310
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26311
|
-
var content = props.content;
|
|
26312
|
-
var outerStyle = _objectSpread$i({
|
|
26313
|
-
pointerEvents: 'none',
|
|
26314
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26315
|
-
position: 'absolute',
|
|
26316
|
-
top: 0,
|
|
26317
|
-
left: 0
|
|
26318
|
-
}, wrapperStyle);
|
|
26319
|
-
var translateX, translateY;
|
|
26320
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26321
|
-
translateX = position.x;
|
|
26322
|
-
translateY = position.y;
|
|
26323
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26324
|
-
translateX = getTranslate({
|
|
26325
|
-
key: 'x',
|
|
26326
|
-
tooltipDimension: boxWidth,
|
|
26327
|
-
viewBoxDimension: viewBox.width
|
|
26328
|
-
});
|
|
26329
|
-
translateY = getTranslate({
|
|
26330
|
-
key: 'y',
|
|
26331
|
-
tooltipDimension: boxHeight,
|
|
26332
|
-
viewBoxDimension: viewBox.height
|
|
26333
|
-
});
|
|
26334
|
-
} else {
|
|
26335
|
-
outerStyle.visibility = 'hidden';
|
|
26336
|
-
}
|
|
26337
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26338
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26339
|
-
})), outerStyle);
|
|
26340
|
-
if (isAnimationActive && active) {
|
|
26341
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26342
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26343
|
-
})), outerStyle);
|
|
26344
|
-
}
|
|
26345
|
-
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));
|
|
26346
|
-
return (
|
|
26347
|
-
/*#__PURE__*/
|
|
26348
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26349
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26350
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26351
|
-
React__default["default"].createElement("div", {
|
|
26352
|
-
tabIndex: -1,
|
|
26353
|
-
role: "dialog",
|
|
26354
|
-
className: cls,
|
|
26355
|
-
style: outerStyle,
|
|
26356
|
-
ref: wrapperNode
|
|
26357
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26358
|
-
payload: finalPayload
|
|
26359
|
-
})))
|
|
26360
|
-
);
|
|
26361
|
-
};
|
|
26362
|
-
|
|
26363
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26364
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26365
|
-
|
|
26366
|
-
/**
|
|
26367
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26368
|
-
* children.props when there are no props set by the consumer
|
|
26369
|
-
* doesn't work if using default parameters
|
|
26370
|
-
*/
|
|
26371
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26417
|
+
});
|
|
26372
26418
|
|
|
26373
26419
|
var root = _root;
|
|
26374
26420
|
|
|
@@ -31938,12 +31984,12 @@ module.exports = exports['default'];
|
|
|
31938
31984
|
|
|
31939
31985
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31940
31986
|
|
|
31941
|
-
function _typeof$
|
|
31942
|
-
function ownKeys$
|
|
31943
|
-
function _objectSpread$
|
|
31944
|
-
function _defineProperty$
|
|
31945
|
-
function _toPropertyKey$
|
|
31946
|
-
function _toPrimitive$
|
|
31987
|
+
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); }
|
|
31988
|
+
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; }
|
|
31989
|
+
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; }
|
|
31990
|
+
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; }
|
|
31991
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31992
|
+
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); }
|
|
31947
31993
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31948
31994
|
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."); }
|
|
31949
31995
|
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); }
|
|
@@ -32011,7 +32057,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
32011
32057
|
}
|
|
32012
32058
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
32013
32059
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
32014
|
-
var measurementSpanStyle = _objectSpread$
|
|
32060
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
32015
32061
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
32016
32062
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
32017
32063
|
return styleKey;
|
|
@@ -32066,10 +32112,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32066
32112
|
};
|
|
32067
32113
|
};
|
|
32068
32114
|
|
|
32069
|
-
var _excluded$
|
|
32115
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
32116
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32070
32117
|
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); }
|
|
32071
|
-
function _objectWithoutProperties$
|
|
32072
|
-
function _objectWithoutPropertiesLoose$
|
|
32118
|
+
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; }
|
|
32119
|
+
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; }
|
|
32073
32120
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32074
32121
|
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."); }
|
|
32075
32122
|
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); }
|
|
@@ -32223,45 +32270,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32223
32270
|
}
|
|
32224
32271
|
return getWordsWithoutCalculate(children);
|
|
32225
32272
|
};
|
|
32226
|
-
var
|
|
32227
|
-
|
|
32228
|
-
|
|
32229
|
-
|
|
32230
|
-
|
|
32231
|
-
|
|
32232
|
-
|
|
32233
|
-
|
|
32234
|
-
|
|
32235
|
-
|
|
32236
|
-
|
|
32237
|
-
|
|
32238
|
-
|
|
32273
|
+
var DEFAULT_FILL = '#808080';
|
|
32274
|
+
var Text = function Text(_ref5) {
|
|
32275
|
+
var _ref5$x = _ref5.x,
|
|
32276
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32277
|
+
_ref5$y = _ref5.y,
|
|
32278
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32279
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32280
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32281
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32282
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32283
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32284
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32285
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32286
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32287
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32288
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32289
|
+
_ref5$fill = _ref5.fill,
|
|
32290
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32291
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32239
32292
|
var wordsByLines = React$3.useMemo(function () {
|
|
32240
32293
|
return getWordsByLines({
|
|
32241
32294
|
breakAll: props.breakAll,
|
|
32242
32295
|
children: props.children,
|
|
32243
32296
|
maxLines: props.maxLines,
|
|
32244
|
-
scaleToFit:
|
|
32297
|
+
scaleToFit: scaleToFit,
|
|
32245
32298
|
style: props.style,
|
|
32246
32299
|
width: props.width
|
|
32247
32300
|
});
|
|
32248
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32301
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32249
32302
|
var dx = props.dx,
|
|
32250
32303
|
dy = props.dy,
|
|
32251
|
-
textAnchor = props.textAnchor,
|
|
32252
|
-
verticalAnchor = props.verticalAnchor,
|
|
32253
|
-
scaleToFit = props.scaleToFit,
|
|
32254
32304
|
angle = props.angle,
|
|
32255
|
-
lineHeight = props.lineHeight,
|
|
32256
|
-
capHeight = props.capHeight,
|
|
32257
32305
|
className = props.className,
|
|
32258
32306
|
breakAll = props.breakAll,
|
|
32259
|
-
textProps = _objectWithoutProperties$
|
|
32260
|
-
if (!isNumOrStr(
|
|
32307
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32308
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32261
32309
|
return null;
|
|
32262
32310
|
}
|
|
32263
|
-
var x =
|
|
32264
|
-
var y =
|
|
32311
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32312
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32265
32313
|
var startDy;
|
|
32266
32314
|
switch (verticalAnchor) {
|
|
32267
32315
|
case 'start':
|
|
@@ -32291,7 +32339,7 @@ var Text = function Text(props) {
|
|
|
32291
32339
|
y: y,
|
|
32292
32340
|
className: classNames('recharts-text', className),
|
|
32293
32341
|
textAnchor: textAnchor,
|
|
32294
|
-
fill:
|
|
32342
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32295
32343
|
}), wordsByLines.map(function (line, index) {
|
|
32296
32344
|
return (
|
|
32297
32345
|
/*#__PURE__*/
|
|
@@ -32304,7 +32352,6 @@ var Text = function Text(props) {
|
|
|
32304
32352
|
);
|
|
32305
32353
|
}));
|
|
32306
32354
|
};
|
|
32307
|
-
Text.defaultProps = textDefaultProps;
|
|
32308
32355
|
|
|
32309
32356
|
var baseIsEqual = _baseIsEqual;
|
|
32310
32357
|
|
|
@@ -38572,7 +38619,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38572
38619
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38573
38620
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38574
38621
|
|
|
38575
|
-
var _excluded$
|
|
38622
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38576
38623
|
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); }
|
|
38577
38624
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38578
38625
|
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."); }
|
|
@@ -38580,8 +38627,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38580
38627
|
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; }
|
|
38581
38628
|
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; } }
|
|
38582
38629
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38583
|
-
function _objectWithoutProperties$
|
|
38584
|
-
function _objectWithoutPropertiesLoose$
|
|
38630
|
+
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; }
|
|
38631
|
+
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; }
|
|
38585
38632
|
function ErrorBar(props) {
|
|
38586
38633
|
var offset = props.offset,
|
|
38587
38634
|
layout = props.layout,
|
|
@@ -38591,7 +38638,7 @@ function ErrorBar(props) {
|
|
|
38591
38638
|
dataPointFormatter = props.dataPointFormatter,
|
|
38592
38639
|
xAxis = props.xAxis,
|
|
38593
38640
|
yAxis = props.yAxis,
|
|
38594
|
-
others = _objectWithoutProperties$
|
|
38641
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38595
38642
|
var svgProps = filterProps(others);
|
|
38596
38643
|
var errorBars = data.map(function (entry, i) {
|
|
38597
38644
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38702,18 +38749,18 @@ ErrorBar.defaultProps = {
|
|
|
38702
38749
|
};
|
|
38703
38750
|
ErrorBar.displayName = 'ErrorBar';
|
|
38704
38751
|
|
|
38705
|
-
function _typeof$
|
|
38752
|
+
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); }
|
|
38706
38753
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38707
38754
|
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."); }
|
|
38708
38755
|
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); }
|
|
38709
38756
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38710
38757
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38711
38758
|
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; }
|
|
38712
|
-
function ownKeys$
|
|
38713
|
-
function _objectSpread$
|
|
38714
|
-
function _defineProperty$
|
|
38715
|
-
function _toPropertyKey$
|
|
38716
|
-
function _toPrimitive$
|
|
38759
|
+
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; }
|
|
38760
|
+
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; }
|
|
38761
|
+
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; }
|
|
38762
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38763
|
+
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); }
|
|
38717
38764
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38718
38765
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38719
38766
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38884,7 +38931,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38884
38931
|
};
|
|
38885
38932
|
});
|
|
38886
38933
|
}
|
|
38887
|
-
return _objectSpread$
|
|
38934
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38888
38935
|
payload: legendData,
|
|
38889
38936
|
item: legendItem
|
|
38890
38937
|
});
|
|
@@ -39038,10 +39085,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39038
39085
|
verticalAlign = legendProps.verticalAlign,
|
|
39039
39086
|
layout = legendProps.layout;
|
|
39040
39087
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39041
|
-
newOffset = _objectSpread$
|
|
39088
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
39042
39089
|
}
|
|
39043
39090
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39044
|
-
newOffset = _objectSpread$
|
|
39091
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39045
39092
|
}
|
|
39046
39093
|
}
|
|
39047
39094
|
return newOffset;
|
|
@@ -39467,14 +39514,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39467
39514
|
items: [item]
|
|
39468
39515
|
};
|
|
39469
39516
|
}
|
|
39470
|
-
return _objectSpread$
|
|
39517
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39471
39518
|
}, {});
|
|
39472
39519
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39473
39520
|
var group = stackGroups[axisId];
|
|
39474
39521
|
if (group.hasStack) {
|
|
39475
39522
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39476
39523
|
var g = group.stackGroups[stackId];
|
|
39477
|
-
return _objectSpread$
|
|
39524
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39478
39525
|
numericAxisId: numericAxisId,
|
|
39479
39526
|
cateAxisId: cateAxisId,
|
|
39480
39527
|
items: g.items,
|
|
@@ -39482,7 +39529,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39482
39529
|
}));
|
|
39483
39530
|
}, {});
|
|
39484
39531
|
}
|
|
39485
|
-
return _objectSpread$
|
|
39532
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39486
39533
|
}, {});
|
|
39487
39534
|
};
|
|
39488
39535
|
|
|
@@ -39696,7 +39743,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39696
39743
|
formatter = _graphicalItem$props.formatter,
|
|
39697
39744
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39698
39745
|
chartType = _graphicalItem$props.chartType;
|
|
39699
|
-
return _objectSpread$
|
|
39746
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39700
39747
|
dataKey: dataKey,
|
|
39701
39748
|
unit: unit,
|
|
39702
39749
|
formatter: formatter,
|
|
@@ -39709,12 +39756,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39709
39756
|
});
|
|
39710
39757
|
};
|
|
39711
39758
|
|
|
39712
|
-
function _typeof$
|
|
39713
|
-
function ownKeys$
|
|
39714
|
-
function _objectSpread$
|
|
39715
|
-
function _defineProperty$
|
|
39716
|
-
function _toPropertyKey$
|
|
39717
|
-
function _toPrimitive$
|
|
39759
|
+
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); }
|
|
39760
|
+
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; }
|
|
39761
|
+
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; }
|
|
39762
|
+
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; }
|
|
39763
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39764
|
+
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); }
|
|
39718
39765
|
var RADIAN = Math.PI / 180;
|
|
39719
39766
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39720
39767
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39819,7 +39866,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39819
39866
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39820
39867
|
}
|
|
39821
39868
|
if (inRange) {
|
|
39822
|
-
return _objectSpread$
|
|
39869
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39823
39870
|
radius: radius,
|
|
39824
39871
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39825
39872
|
});
|
|
@@ -39827,18 +39874,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39827
39874
|
return null;
|
|
39828
39875
|
};
|
|
39829
39876
|
|
|
39830
|
-
function _typeof$
|
|
39877
|
+
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); }
|
|
39878
|
+
var _excluded$7 = ["offset"];
|
|
39831
39879
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39832
39880
|
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."); }
|
|
39833
39881
|
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); }
|
|
39834
39882
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39835
39883
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39836
39884
|
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; }
|
|
39837
|
-
function
|
|
39838
|
-
function
|
|
39839
|
-
function
|
|
39840
|
-
function
|
|
39841
|
-
function
|
|
39885
|
+
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; }
|
|
39886
|
+
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; }
|
|
39887
|
+
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; }
|
|
39888
|
+
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; }
|
|
39889
|
+
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; }
|
|
39890
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39891
|
+
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); }
|
|
39842
39892
|
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); }
|
|
39843
39893
|
var getLabel = function getLabel(props) {
|
|
39844
39894
|
var value = props.value,
|
|
@@ -39983,7 +40033,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39983
40033
|
textAnchor: 'middle',
|
|
39984
40034
|
verticalAnchor: verticalEnd
|
|
39985
40035
|
};
|
|
39986
|
-
return _objectSpread$
|
|
40036
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39987
40037
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39988
40038
|
width: width
|
|
39989
40039
|
} : {});
|
|
@@ -39995,7 +40045,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39995
40045
|
textAnchor: 'middle',
|
|
39996
40046
|
verticalAnchor: verticalStart
|
|
39997
40047
|
};
|
|
39998
|
-
return _objectSpread$
|
|
40048
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39999
40049
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
40000
40050
|
width: width
|
|
40001
40051
|
} : {});
|
|
@@ -40007,7 +40057,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40007
40057
|
textAnchor: horizontalEnd,
|
|
40008
40058
|
verticalAnchor: 'middle'
|
|
40009
40059
|
};
|
|
40010
|
-
return _objectSpread$
|
|
40060
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
40011
40061
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
40012
40062
|
height: height
|
|
40013
40063
|
} : {});
|
|
@@ -40019,7 +40069,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40019
40069
|
textAnchor: horizontalStart,
|
|
40020
40070
|
verticalAnchor: 'middle'
|
|
40021
40071
|
};
|
|
40022
|
-
return _objectSpread$
|
|
40072
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
40023
40073
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
40024
40074
|
height: height
|
|
40025
40075
|
} : {});
|
|
@@ -40029,7 +40079,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40029
40079
|
height: height
|
|
40030
40080
|
} : {};
|
|
40031
40081
|
if (position === 'insideLeft') {
|
|
40032
|
-
return _objectSpread$
|
|
40082
|
+
return _objectSpread$h({
|
|
40033
40083
|
x: x + horizontalOffset,
|
|
40034
40084
|
y: y + height / 2,
|
|
40035
40085
|
textAnchor: horizontalStart,
|
|
@@ -40037,7 +40087,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40037
40087
|
}, sizeAttrs);
|
|
40038
40088
|
}
|
|
40039
40089
|
if (position === 'insideRight') {
|
|
40040
|
-
return _objectSpread$
|
|
40090
|
+
return _objectSpread$h({
|
|
40041
40091
|
x: x + width - horizontalOffset,
|
|
40042
40092
|
y: y + height / 2,
|
|
40043
40093
|
textAnchor: horizontalEnd,
|
|
@@ -40045,7 +40095,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40045
40095
|
}, sizeAttrs);
|
|
40046
40096
|
}
|
|
40047
40097
|
if (position === 'insideTop') {
|
|
40048
|
-
return _objectSpread$
|
|
40098
|
+
return _objectSpread$h({
|
|
40049
40099
|
x: x + width / 2,
|
|
40050
40100
|
y: y + verticalOffset,
|
|
40051
40101
|
textAnchor: 'middle',
|
|
@@ -40053,7 +40103,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40053
40103
|
}, sizeAttrs);
|
|
40054
40104
|
}
|
|
40055
40105
|
if (position === 'insideBottom') {
|
|
40056
|
-
return _objectSpread$
|
|
40106
|
+
return _objectSpread$h({
|
|
40057
40107
|
x: x + width / 2,
|
|
40058
40108
|
y: y + height - verticalOffset,
|
|
40059
40109
|
textAnchor: 'middle',
|
|
@@ -40061,7 +40111,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40061
40111
|
}, sizeAttrs);
|
|
40062
40112
|
}
|
|
40063
40113
|
if (position === 'insideTopLeft') {
|
|
40064
|
-
return _objectSpread$
|
|
40114
|
+
return _objectSpread$h({
|
|
40065
40115
|
x: x + horizontalOffset,
|
|
40066
40116
|
y: y + verticalOffset,
|
|
40067
40117
|
textAnchor: horizontalStart,
|
|
@@ -40069,7 +40119,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40069
40119
|
}, sizeAttrs);
|
|
40070
40120
|
}
|
|
40071
40121
|
if (position === 'insideTopRight') {
|
|
40072
|
-
return _objectSpread$
|
|
40122
|
+
return _objectSpread$h({
|
|
40073
40123
|
x: x + width - horizontalOffset,
|
|
40074
40124
|
y: y + verticalOffset,
|
|
40075
40125
|
textAnchor: horizontalEnd,
|
|
@@ -40077,7 +40127,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40077
40127
|
}, sizeAttrs);
|
|
40078
40128
|
}
|
|
40079
40129
|
if (position === 'insideBottomLeft') {
|
|
40080
|
-
return _objectSpread$
|
|
40130
|
+
return _objectSpread$h({
|
|
40081
40131
|
x: x + horizontalOffset,
|
|
40082
40132
|
y: y + height - verticalOffset,
|
|
40083
40133
|
textAnchor: horizontalStart,
|
|
@@ -40085,7 +40135,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40085
40135
|
}, sizeAttrs);
|
|
40086
40136
|
}
|
|
40087
40137
|
if (position === 'insideBottomRight') {
|
|
40088
|
-
return _objectSpread$
|
|
40138
|
+
return _objectSpread$h({
|
|
40089
40139
|
x: x + width - horizontalOffset,
|
|
40090
40140
|
y: y + height - verticalOffset,
|
|
40091
40141
|
textAnchor: horizontalEnd,
|
|
@@ -40093,14 +40143,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40093
40143
|
}, sizeAttrs);
|
|
40094
40144
|
}
|
|
40095
40145
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40096
|
-
return _objectSpread$
|
|
40146
|
+
return _objectSpread$h({
|
|
40097
40147
|
x: x + getPercentValue(position.x, width),
|
|
40098
40148
|
y: y + getPercentValue(position.y, height),
|
|
40099
40149
|
textAnchor: 'end',
|
|
40100
40150
|
verticalAnchor: 'end'
|
|
40101
40151
|
}, sizeAttrs);
|
|
40102
40152
|
}
|
|
40103
|
-
return _objectSpread$
|
|
40153
|
+
return _objectSpread$h({
|
|
40104
40154
|
x: x + width / 2,
|
|
40105
40155
|
y: y + height / 2,
|
|
40106
40156
|
textAnchor: 'middle',
|
|
@@ -40110,7 +40160,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40110
40160
|
var isPolar = function isPolar(viewBox) {
|
|
40111
40161
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40112
40162
|
};
|
|
40113
|
-
function Label$3(
|
|
40163
|
+
function Label$3(_ref4) {
|
|
40164
|
+
var _ref4$offset = _ref4.offset,
|
|
40165
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40166
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40167
|
+
var props = _objectSpread$h({
|
|
40168
|
+
offset: offset
|
|
40169
|
+
}, restProps);
|
|
40114
40170
|
var viewBox = props.viewBox,
|
|
40115
40171
|
position = props.position,
|
|
40116
40172
|
value = props.value,
|
|
@@ -40147,9 +40203,6 @@ function Label$3(props) {
|
|
|
40147
40203
|
}), label);
|
|
40148
40204
|
}
|
|
40149
40205
|
Label$3.displayName = 'Label';
|
|
40150
|
-
Label$3.defaultProps = {
|
|
40151
|
-
offset: 5
|
|
40152
|
-
};
|
|
40153
40206
|
var parseViewBox = function parseViewBox(props) {
|
|
40154
40207
|
var cx = props.cx,
|
|
40155
40208
|
cy = props.cy,
|
|
@@ -40304,8 +40357,9 @@ function last(array) {
|
|
|
40304
40357
|
|
|
40305
40358
|
var last_1 = last;
|
|
40306
40359
|
|
|
40307
|
-
function _typeof$
|
|
40308
|
-
var _excluded$
|
|
40360
|
+
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); }
|
|
40361
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40362
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40309
40363
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40310
40364
|
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."); }
|
|
40311
40365
|
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); }
|
|
@@ -40313,26 +40367,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40313
40367
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40314
40368
|
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; }
|
|
40315
40369
|
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); }
|
|
40316
|
-
function ownKeys$
|
|
40317
|
-
function _objectSpread$
|
|
40318
|
-
function _defineProperty$
|
|
40319
|
-
function _toPropertyKey$
|
|
40320
|
-
function _toPrimitive$
|
|
40321
|
-
function _objectWithoutProperties$
|
|
40322
|
-
function _objectWithoutPropertiesLoose$
|
|
40323
|
-
var
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40328
|
-
|
|
40329
|
-
|
|
40330
|
-
|
|
40331
|
-
dataKey =
|
|
40332
|
-
clockWise =
|
|
40333
|
-
id =
|
|
40334
|
-
textBreakAll =
|
|
40335
|
-
others = _objectWithoutProperties$
|
|
40370
|
+
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; }
|
|
40371
|
+
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; }
|
|
40372
|
+
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; }
|
|
40373
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40374
|
+
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); }
|
|
40375
|
+
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; }
|
|
40376
|
+
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; }
|
|
40377
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40378
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40379
|
+
};
|
|
40380
|
+
function LabelList(_ref) {
|
|
40381
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40382
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40383
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40384
|
+
var data = restProps.data,
|
|
40385
|
+
dataKey = restProps.dataKey,
|
|
40386
|
+
clockWise = restProps.clockWise,
|
|
40387
|
+
id = restProps.id,
|
|
40388
|
+
textBreakAll = restProps.textBreakAll,
|
|
40389
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40336
40390
|
if (!data || !data.length) {
|
|
40337
40391
|
return null;
|
|
40338
40392
|
}
|
|
@@ -40348,7 +40402,7 @@ function LabelList(props) {
|
|
|
40348
40402
|
index: index,
|
|
40349
40403
|
value: value,
|
|
40350
40404
|
textBreakAll: textBreakAll,
|
|
40351
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40405
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40352
40406
|
clockWise: clockWise
|
|
40353
40407
|
})),
|
|
40354
40408
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40403,9 +40457,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40403
40457
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40404
40458
|
}
|
|
40405
40459
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40406
|
-
LabelList.defaultProps = defaultProps;
|
|
40407
40460
|
|
|
40461
|
+
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); }
|
|
40408
40462
|
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); }
|
|
40463
|
+
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; }
|
|
40464
|
+
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; }
|
|
40465
|
+
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; }
|
|
40466
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40467
|
+
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); }
|
|
40409
40468
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40410
40469
|
var sign = mathSign(endAngle - startAngle);
|
|
40411
40470
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40546,7 +40605,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40546
40605
|
}
|
|
40547
40606
|
return path;
|
|
40548
40607
|
};
|
|
40549
|
-
var
|
|
40608
|
+
var defaultProps$1 = {
|
|
40609
|
+
cx: 0,
|
|
40610
|
+
cy: 0,
|
|
40611
|
+
innerRadius: 0,
|
|
40612
|
+
outerRadius: 0,
|
|
40613
|
+
startAngle: 0,
|
|
40614
|
+
endAngle: 0,
|
|
40615
|
+
cornerRadius: 0,
|
|
40616
|
+
forceCornerRadius: false,
|
|
40617
|
+
cornerIsExternal: false
|
|
40618
|
+
};
|
|
40619
|
+
var Sector = function Sector(sectorProps) {
|
|
40620
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40550
40621
|
var cx = props.cx,
|
|
40551
40622
|
cy = props.cy,
|
|
40552
40623
|
innerRadius = props.innerRadius,
|
|
@@ -40592,25 +40663,14 @@ var Sector = function Sector(props) {
|
|
|
40592
40663
|
role: "img"
|
|
40593
40664
|
}));
|
|
40594
40665
|
};
|
|
40595
|
-
Sector.defaultProps = {
|
|
40596
|
-
cx: 0,
|
|
40597
|
-
cy: 0,
|
|
40598
|
-
innerRadius: 0,
|
|
40599
|
-
outerRadius: 0,
|
|
40600
|
-
startAngle: 0,
|
|
40601
|
-
endAngle: 0,
|
|
40602
|
-
cornerRadius: 0,
|
|
40603
|
-
forceCornerRadius: false,
|
|
40604
|
-
cornerIsExternal: false
|
|
40605
|
-
};
|
|
40606
40666
|
|
|
40607
|
-
function _typeof$
|
|
40667
|
+
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); }
|
|
40608
40668
|
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); }
|
|
40609
|
-
function ownKeys$
|
|
40610
|
-
function _objectSpread$
|
|
40611
|
-
function _defineProperty$
|
|
40612
|
-
function _toPropertyKey$
|
|
40613
|
-
function _toPrimitive$
|
|
40669
|
+
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; }
|
|
40670
|
+
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; }
|
|
40671
|
+
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; }
|
|
40672
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40673
|
+
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); }
|
|
40614
40674
|
var CURVE_FACTORIES = {
|
|
40615
40675
|
curveBasisClosed: curveBasisClosed,
|
|
40616
40676
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40650,11 +40710,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40650
40710
|
* @return {String} path
|
|
40651
40711
|
*/
|
|
40652
40712
|
var getPath$1 = function getPath(_ref) {
|
|
40653
|
-
var type = _ref.type,
|
|
40654
|
-
|
|
40713
|
+
var _ref$type = _ref.type,
|
|
40714
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40715
|
+
_ref$points = _ref.points,
|
|
40716
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40655
40717
|
baseLine = _ref.baseLine,
|
|
40656
40718
|
layout = _ref.layout,
|
|
40657
|
-
connectNulls = _ref.connectNulls
|
|
40719
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40720
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40658
40721
|
var curveFactory = getCurveFactory(type, layout);
|
|
40659
40722
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40660
40723
|
return defined(entry);
|
|
@@ -40665,7 +40728,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40665
40728
|
return defined(base);
|
|
40666
40729
|
}) : baseLine;
|
|
40667
40730
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40668
|
-
return _objectSpread$
|
|
40731
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40669
40732
|
base: formatBaseLine[index]
|
|
40670
40733
|
});
|
|
40671
40734
|
});
|
|
@@ -40706,12 +40769,8 @@ var Curve = function Curve(props) {
|
|
|
40706
40769
|
ref: pathRef
|
|
40707
40770
|
}));
|
|
40708
40771
|
};
|
|
40709
|
-
Curve.defaultProps = {
|
|
40710
|
-
type: 'linear',
|
|
40711
|
-
points: [],
|
|
40712
|
-
connectNulls: false
|
|
40713
|
-
};
|
|
40714
40772
|
|
|
40773
|
+
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); }
|
|
40715
40774
|
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); }
|
|
40716
40775
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40717
40776
|
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."); }
|
|
@@ -40719,6 +40778,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40719
40778
|
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; }
|
|
40720
40779
|
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; } }
|
|
40721
40780
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40781
|
+
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; }
|
|
40782
|
+
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; }
|
|
40783
|
+
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; }
|
|
40784
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40785
|
+
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); }
|
|
40722
40786
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40723
40787
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40724
40788
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40774,13 +40838,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40774
40838
|
}
|
|
40775
40839
|
return false;
|
|
40776
40840
|
};
|
|
40777
|
-
var
|
|
40841
|
+
var defaultProps = {
|
|
40842
|
+
x: 0,
|
|
40843
|
+
y: 0,
|
|
40844
|
+
width: 0,
|
|
40845
|
+
height: 0,
|
|
40846
|
+
// The radius of border
|
|
40847
|
+
// The radius of four corners when radius is a number
|
|
40848
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40849
|
+
radius: 0,
|
|
40850
|
+
isAnimationActive: false,
|
|
40851
|
+
isUpdateAnimationActive: false,
|
|
40852
|
+
animationBegin: 0,
|
|
40853
|
+
animationDuration: 1500,
|
|
40854
|
+
animationEasing: 'ease'
|
|
40855
|
+
};
|
|
40856
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40857
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40778
40858
|
var pathRef = React$3.useRef();
|
|
40779
40859
|
var _useState = React$3.useState(-1),
|
|
40780
40860
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40781
40861
|
totalLength = _useState2[0],
|
|
40782
40862
|
setTotalLength = _useState2[1];
|
|
40783
|
-
React$3.
|
|
40863
|
+
React$3.useEffect(function () {
|
|
40784
40864
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40785
40865
|
try {
|
|
40786
40866
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40851,21 +40931,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40851
40931
|
})));
|
|
40852
40932
|
});
|
|
40853
40933
|
};
|
|
40854
|
-
Rectangle.defaultProps = {
|
|
40855
|
-
x: 0,
|
|
40856
|
-
y: 0,
|
|
40857
|
-
width: 0,
|
|
40858
|
-
height: 0,
|
|
40859
|
-
// The radius of border
|
|
40860
|
-
// The radius of four corners when radius is a number
|
|
40861
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40862
|
-
radius: 0,
|
|
40863
|
-
isAnimationActive: false,
|
|
40864
|
-
isUpdateAnimationActive: false,
|
|
40865
|
-
animationBegin: 0,
|
|
40866
|
-
animationDuration: 1500,
|
|
40867
|
-
animationEasing: 'ease'
|
|
40868
|
-
};
|
|
40869
40934
|
|
|
40870
40935
|
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); }
|
|
40871
40936
|
var Dot$1 = function Dot(props) {
|
|
@@ -40885,18 +40950,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40885
40950
|
return null;
|
|
40886
40951
|
};
|
|
40887
40952
|
|
|
40953
|
+
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); }
|
|
40954
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40888
40955
|
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); }
|
|
40956
|
+
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; }
|
|
40957
|
+
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; }
|
|
40958
|
+
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; }
|
|
40959
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40960
|
+
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); }
|
|
40961
|
+
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; }
|
|
40962
|
+
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; }
|
|
40889
40963
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40890
40964
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40891
40965
|
};
|
|
40892
|
-
var Cross = function Cross(
|
|
40893
|
-
var x =
|
|
40894
|
-
|
|
40895
|
-
|
|
40896
|
-
|
|
40897
|
-
top =
|
|
40898
|
-
|
|
40899
|
-
|
|
40966
|
+
var Cross = function Cross(_ref) {
|
|
40967
|
+
var _ref$x = _ref.x,
|
|
40968
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40969
|
+
_ref$y = _ref.y,
|
|
40970
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40971
|
+
_ref$top = _ref.top,
|
|
40972
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40973
|
+
_ref$left = _ref.left,
|
|
40974
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40975
|
+
_ref$width = _ref.width,
|
|
40976
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40977
|
+
_ref$height = _ref.height,
|
|
40978
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40979
|
+
className = _ref.className,
|
|
40980
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40981
|
+
var props = _objectSpread$c({
|
|
40982
|
+
x: x,
|
|
40983
|
+
y: y,
|
|
40984
|
+
top: top,
|
|
40985
|
+
left: left,
|
|
40986
|
+
width: width,
|
|
40987
|
+
height: height
|
|
40988
|
+
}, rest);
|
|
40900
40989
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40901
40990
|
return null;
|
|
40902
40991
|
}
|
|
@@ -40905,14 +40994,6 @@ var Cross = function Cross(props) {
|
|
|
40905
40994
|
d: getPath(x, y, width, height, top, left)
|
|
40906
40995
|
}));
|
|
40907
40996
|
};
|
|
40908
|
-
Cross.defaultProps = {
|
|
40909
|
-
x: 0,
|
|
40910
|
-
y: 0,
|
|
40911
|
-
top: 0,
|
|
40912
|
-
left: 0,
|
|
40913
|
-
width: 0,
|
|
40914
|
-
height: 0
|
|
40915
|
-
};
|
|
40916
40997
|
|
|
40917
40998
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40918
40999
|
|
|
@@ -41122,6 +41203,7 @@ var createScale = function createScale(_ref) {
|
|
|
41122
41203
|
isTextActive: false,
|
|
41123
41204
|
isSlideMoving: false,
|
|
41124
41205
|
isTravellerMoving: false,
|
|
41206
|
+
isTravellerFocused: false,
|
|
41125
41207
|
startX: scale(startIndex),
|
|
41126
41208
|
endX: scale(endIndex),
|
|
41127
41209
|
scale: scale,
|
|
@@ -41335,6 +41417,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41335
41417
|
}
|
|
41336
41418
|
});
|
|
41337
41419
|
}
|
|
41420
|
+
}, {
|
|
41421
|
+
key: "handleTravellerMoveKeyboard",
|
|
41422
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41423
|
+
var _this2 = this;
|
|
41424
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41425
|
+
var _this$state3 = this.state,
|
|
41426
|
+
scaleValues = _this$state3.scaleValues,
|
|
41427
|
+
startX = _this$state3.startX,
|
|
41428
|
+
endX = _this$state3.endX;
|
|
41429
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41430
|
+
var currentScaleValue = this.state[id];
|
|
41431
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41432
|
+
if (currentIndex === -1) {
|
|
41433
|
+
return;
|
|
41434
|
+
}
|
|
41435
|
+
var newIndex = currentIndex + direction;
|
|
41436
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41437
|
+
return;
|
|
41438
|
+
}
|
|
41439
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41440
|
+
|
|
41441
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41442
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41443
|
+
return;
|
|
41444
|
+
}
|
|
41445
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41446
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41447
|
+
startX: _this2.state.startX,
|
|
41448
|
+
endX: _this2.state.endX
|
|
41449
|
+
}));
|
|
41450
|
+
});
|
|
41451
|
+
}
|
|
41338
41452
|
}, {
|
|
41339
41453
|
key: "renderBackground",
|
|
41340
41454
|
value: function renderBackground() {
|
|
@@ -41382,6 +41496,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41382
41496
|
}, {
|
|
41383
41497
|
key: "renderTravellerLayer",
|
|
41384
41498
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41499
|
+
var _this3 = this;
|
|
41385
41500
|
var _this$props7 = this.props,
|
|
41386
41501
|
y = _this$props7.y,
|
|
41387
41502
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41395,11 +41510,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41395
41510
|
height: height
|
|
41396
41511
|
});
|
|
41397
41512
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41513
|
+
tabIndex: 0,
|
|
41514
|
+
role: "slider",
|
|
41398
41515
|
className: "recharts-brush-traveller",
|
|
41399
41516
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41400
41517
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41401
41518
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41402
41519
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41520
|
+
onKeyDown: function onKeyDown(e) {
|
|
41521
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41522
|
+
return;
|
|
41523
|
+
}
|
|
41524
|
+
e.preventDefault();
|
|
41525
|
+
e.stopPropagation();
|
|
41526
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41527
|
+
},
|
|
41528
|
+
onFocus: function onFocus() {
|
|
41529
|
+
_this3.setState({
|
|
41530
|
+
isTravellerFocused: true
|
|
41531
|
+
});
|
|
41532
|
+
},
|
|
41533
|
+
onBlur: function onBlur() {
|
|
41534
|
+
_this3.setState({
|
|
41535
|
+
isTravellerFocused: false
|
|
41536
|
+
});
|
|
41537
|
+
},
|
|
41403
41538
|
style: {
|
|
41404
41539
|
cursor: 'col-resize'
|
|
41405
41540
|
}
|
|
@@ -41443,9 +41578,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41443
41578
|
height = _this$props9.height,
|
|
41444
41579
|
travellerWidth = _this$props9.travellerWidth,
|
|
41445
41580
|
stroke = _this$props9.stroke;
|
|
41446
|
-
var _this$
|
|
41447
|
-
startX = _this$
|
|
41448
|
-
endX = _this$
|
|
41581
|
+
var _this$state4 = this.state,
|
|
41582
|
+
startX = _this$state4.startX,
|
|
41583
|
+
endX = _this$state4.endX;
|
|
41449
41584
|
var offset = 5;
|
|
41450
41585
|
var attrs = {
|
|
41451
41586
|
pointerEvents: 'none',
|
|
@@ -41477,12 +41612,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41477
41612
|
width = _this$props10.width,
|
|
41478
41613
|
height = _this$props10.height,
|
|
41479
41614
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41480
|
-
var _this$
|
|
41481
|
-
startX = _this$
|
|
41482
|
-
endX = _this$
|
|
41483
|
-
isTextActive = _this$
|
|
41484
|
-
isSlideMoving = _this$
|
|
41485
|
-
isTravellerMoving = _this$
|
|
41615
|
+
var _this$state5 = this.state,
|
|
41616
|
+
startX = _this$state5.startX,
|
|
41617
|
+
endX = _this$state5.endX,
|
|
41618
|
+
isTextActive = _this$state5.isTextActive,
|
|
41619
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41620
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41621
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41486
41622
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41487
41623
|
return null;
|
|
41488
41624
|
}
|
|
@@ -41494,7 +41630,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41494
41630
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41495
41631
|
onTouchMove: this.handleTouchMove,
|
|
41496
41632
|
style: style
|
|
41497
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41633
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41498
41634
|
}
|
|
41499
41635
|
}], [{
|
|
41500
41636
|
key: "renderDefaultTraveller",
|
|
@@ -41812,7 +41948,7 @@ function every(collection, predicate, guard) {
|
|
|
41812
41948
|
|
|
41813
41949
|
var every_1 = every;
|
|
41814
41950
|
|
|
41815
|
-
var defineProperty = _defineProperty$
|
|
41951
|
+
var defineProperty = _defineProperty$o;
|
|
41816
41952
|
|
|
41817
41953
|
/**
|
|
41818
41954
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42173,7 +42309,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42173
42309
|
legendType: 'rect',
|
|
42174
42310
|
minPointSize: 0,
|
|
42175
42311
|
hide: false,
|
|
42176
|
-
// data of bar
|
|
42177
42312
|
data: [],
|
|
42178
42313
|
layout: 'vertical',
|
|
42179
42314
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45086,10 +45221,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45086
45221
|
}
|
|
45087
45222
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45088
45223
|
x = _this$container$getBo.x,
|
|
45089
|
-
y = _this$container$getBo.y
|
|
45224
|
+
y = _this$container$getBo.y,
|
|
45225
|
+
height = _this$container$getBo.height;
|
|
45090
45226
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45091
45227
|
var pageX = x + coordinate;
|
|
45092
|
-
var pageY = y + this.offset.top;
|
|
45228
|
+
var pageY = y + this.offset.top + height / 2;
|
|
45093
45229
|
this.mouseHandlerCallback({
|
|
45094
45230
|
pageX: pageX,
|
|
45095
45231
|
pageY: pageY
|
|
@@ -48429,6 +48565,9 @@ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4
|
|
|
48429
48565
|
var Table = function (_a) {
|
|
48430
48566
|
var columns = _a.columns, data = _a.data, emptyText = _a.emptyText, rowSelection = _a.rowSelection;
|
|
48431
48567
|
var _b = React$3.useState([]), selectedRowKeys = _b[0], setSelectedRowKeys = _b[1];
|
|
48568
|
+
React$3.useEffect(function () {
|
|
48569
|
+
setSelectedRowKeys([]);
|
|
48570
|
+
}, [data]);
|
|
48432
48571
|
var onSelectRow = function (selectedKey) {
|
|
48433
48572
|
var index = selectedRowKeys.indexOf(selectedKey);
|
|
48434
48573
|
var newSelectedRowKeys = __spreadArray([], selectedRowKeys, true);
|
|
@@ -48469,7 +48608,7 @@ var Table = function (_a) {
|
|
|
48469
48608
|
display: "flex",
|
|
48470
48609
|
justifyContent: "center",
|
|
48471
48610
|
marginTop: 10,
|
|
48472
|
-
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48611
|
+
} }, { children: jsxRuntime.jsx(Checkbox, { id: "selectAll", name: "selectAll", value: "selectAll", checked: selectedRowKeys.length === data.length, onChange: onSelectAllRows }) }))), columns.map(function (_a, index) {
|
|
48473
48612
|
var title = _a.title, titlePopup = _a.titlePopup, dataIndex = _a.dataIndex;
|
|
48474
48613
|
return (jsxRuntime.jsx(ColumnTitle, { children: jsxRuntime.jsxs("div", __assign$2({ style: { display: "flex", alignItems: "center", gap: 5 } }, { children: [title && (jsxRuntime.jsx(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))), titlePopup && (jsxRuntime.jsx(Popup, __assign$2({ content: titlePopup }, { children: jsxRuntime.jsx(Icon, { type: "questionCircle", size: "tiny", color: "lightGray" }) })))] })) }, "".concat(dataIndex, "-").concat(index)));
|
|
48475
48614
|
})] }) }), jsxRuntime.jsx(TableBody, { children: data.length === 0 ? (jsxRuntime.jsx(TableRow, { children: jsxRuntime.jsx(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsxRuntime.jsx(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) { return (jsxRuntime.jsxs(TableRow, { children: [rowSelection && (jsxRuntime.jsx(TableCell, { children: jsxRuntime.jsx(Checkbox, { id: rowIndex.toString(), name: rowIndex.toString(), value: row.key, checked: selectedRowKeys.includes(row.key), onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|