@typeolymp/ui-components 1.19.26 → 1.19.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/atoms/Input/translations.d.ts +11 -0
- package/build/components/molecules/Dropdown/stories.d.ts +7 -0
- package/build/components/molecules/Key/translations.d.ts +5 -0
- package/build/components/molecules/PasswordInputField/translations.d.ts +11 -0
- package/build/components/molecules/Tabs/styles.d.ts +2 -0
- package/build/components/organisms/Chart/data copy.d.ts +30 -0
- package/build/components/organisms/Chart/styles.d.ts +1 -0
- package/build/index.es.js +626 -762
- package/build/index.es.js.map +1 -1
- package/build/index.js +626 -762
- package/build/index.js.map +1 -1
- package/build/lib/enums.d.ts +4 -0
- package/build/lib/helpers.d.ts +1 -0
- package/build/lib/theme/index.d.ts +3 -0
- package/build/lib/theme/types.d.ts +72 -0
- package/build/lib/translations/index.d.ts +6 -0
- package/build/lib/types/TranslationType.d.ts +7 -0
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -4548,7 +4548,7 @@ function requiredArgs(required, args) {
|
|
|
4548
4548
|
}
|
|
4549
4549
|
}
|
|
4550
4550
|
|
|
4551
|
-
function _typeof$
|
|
4551
|
+
function _typeof$u(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$u = function _typeof(obj) { return typeof obj; }; } else { _typeof$u = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$u(obj); }
|
|
4552
4552
|
/**
|
|
4553
4553
|
* @name toDate
|
|
4554
4554
|
* @category Common Helpers
|
|
@@ -4584,7 +4584,7 @@ function toDate(argument) {
|
|
|
4584
4584
|
requiredArgs(1, arguments);
|
|
4585
4585
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4586
4586
|
|
|
4587
|
-
if (argument instanceof Date || _typeof$
|
|
4587
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4588
4588
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4589
4589
|
return new Date(argument.getTime());
|
|
4590
4590
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4855,7 +4855,7 @@ var millisecondsInMinute = 60000;
|
|
|
4855
4855
|
|
|
4856
4856
|
var millisecondsInHour = 3600000;
|
|
4857
4857
|
|
|
4858
|
-
function _typeof$
|
|
4858
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$t = function _typeof(obj) { return typeof obj; }; } else { _typeof$t = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$t(obj); }
|
|
4859
4859
|
/**
|
|
4860
4860
|
* @name isDate
|
|
4861
4861
|
* @category Common Helpers
|
|
@@ -4891,7 +4891,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4891
4891
|
|
|
4892
4892
|
function isDate(value) {
|
|
4893
4893
|
requiredArgs(1, arguments);
|
|
4894
|
-
return value instanceof Date || _typeof$
|
|
4894
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4895
4895
|
}
|
|
4896
4896
|
|
|
4897
4897
|
/**
|
|
@@ -13667,15 +13667,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13667
13667
|
|
|
13668
13668
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13669
13669
|
|
|
13670
|
-
function _slicedToArray$
|
|
13671
|
-
return _arrayWithHoles$
|
|
13670
|
+
function _slicedToArray$d(arr, i) {
|
|
13671
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13672
13672
|
}
|
|
13673
13673
|
|
|
13674
|
-
function _arrayWithHoles$
|
|
13674
|
+
function _arrayWithHoles$e(arr) {
|
|
13675
13675
|
if (Array.isArray(arr)) return arr;
|
|
13676
13676
|
}
|
|
13677
13677
|
|
|
13678
|
-
function _iterableToArrayLimit$
|
|
13678
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13679
13679
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13680
13680
|
|
|
13681
13681
|
if (_i == null) return;
|
|
@@ -13705,16 +13705,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13705
13705
|
return _arr;
|
|
13706
13706
|
}
|
|
13707
13707
|
|
|
13708
|
-
function _unsupportedIterableToArray$
|
|
13708
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13709
13709
|
if (!o) return;
|
|
13710
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13710
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13711
13711
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13712
13712
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13713
13713
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13714
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13714
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13715
13715
|
}
|
|
13716
13716
|
|
|
13717
|
-
function _arrayLikeToArray$
|
|
13717
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13718
13718
|
if (len == null || len > arr.length) len = arr.length;
|
|
13719
13719
|
|
|
13720
13720
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13722,7 +13722,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13722
13722
|
return arr2;
|
|
13723
13723
|
}
|
|
13724
13724
|
|
|
13725
|
-
function _nonIterableRest$
|
|
13725
|
+
function _nonIterableRest$e() {
|
|
13726
13726
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13727
13727
|
}
|
|
13728
13728
|
|
|
@@ -13786,7 +13786,7 @@ reservedProps.forEach(function (name) {
|
|
|
13786
13786
|
// This is a mapping from React prop names to the attribute names.
|
|
13787
13787
|
|
|
13788
13788
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13789
|
-
var _ref2 = _slicedToArray$
|
|
13789
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13790
13790
|
name = _ref2[0],
|
|
13791
13791
|
attributeName = _ref2[1];
|
|
13792
13792
|
|
|
@@ -14945,7 +14945,7 @@ var Dropdown = function (_a) {
|
|
|
14945
14945
|
setPosition({ x: x, y: y });
|
|
14946
14946
|
setIsVisible(true);
|
|
14947
14947
|
}
|
|
14948
|
-
}, [triggerId]);
|
|
14948
|
+
}, [triggerId, props.disabled]);
|
|
14949
14949
|
useEffect(function () {
|
|
14950
14950
|
var id = generateRandomString(5);
|
|
14951
14951
|
settriggerId(id);
|
|
@@ -16205,31 +16205,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16205
16205
|
return true;
|
|
16206
16206
|
};
|
|
16207
16207
|
|
|
16208
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16208
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16209
16209
|
|
|
16210
16210
|
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."); }
|
|
16211
16211
|
|
|
16212
16212
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16213
16213
|
|
|
16214
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16214
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16215
16215
|
|
|
16216
|
-
function ownKeys$
|
|
16216
|
+
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; }
|
|
16217
16217
|
|
|
16218
|
-
function _objectSpread$
|
|
16218
|
+
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; }
|
|
16219
16219
|
|
|
16220
|
-
function _defineProperty$
|
|
16220
|
+
function _defineProperty$s(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; }
|
|
16221
16221
|
|
|
16222
|
-
function _slicedToArray$
|
|
16222
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16223
16223
|
|
|
16224
|
-
function _nonIterableRest$
|
|
16224
|
+
function _nonIterableRest$d() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16225
16225
|
|
|
16226
|
-
function _unsupportedIterableToArray$
|
|
16226
|
+
function _unsupportedIterableToArray$k(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$k(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$k(o, minLen); }
|
|
16227
16227
|
|
|
16228
|
-
function _arrayLikeToArray$
|
|
16228
|
+
function _arrayLikeToArray$k(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; }
|
|
16229
16229
|
|
|
16230
|
-
function _iterableToArrayLimit$
|
|
16230
|
+
function _iterableToArrayLimit$c(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; }
|
|
16231
16231
|
|
|
16232
|
-
function _arrayWithHoles$
|
|
16232
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16233
16233
|
|
|
16234
16234
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16235
16235
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16309,11 +16309,11 @@ function allFilesAccepted(_ref) {
|
|
|
16309
16309
|
|
|
16310
16310
|
return files.every(function (file) {
|
|
16311
16311
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16312
|
-
_fileAccepted2 = _slicedToArray$
|
|
16312
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16313
16313
|
accepted = _fileAccepted2[0];
|
|
16314
16314
|
|
|
16315
16315
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16316
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16316
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16317
16317
|
sizeMatch = _fileMatchSize2[0];
|
|
16318
16318
|
|
|
16319
16319
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16410,7 +16410,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16410
16410
|
function pickerOptionsFromAccept(accept) {
|
|
16411
16411
|
if (isDefined(accept)) {
|
|
16412
16412
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16413
|
-
var _ref3 = _slicedToArray$
|
|
16413
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16414
16414
|
mimeType = _ref3[0],
|
|
16415
16415
|
ext = _ref3[1];
|
|
16416
16416
|
|
|
@@ -16428,11 +16428,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16428
16428
|
|
|
16429
16429
|
return ok;
|
|
16430
16430
|
}).reduce(function (agg, _ref4) {
|
|
16431
|
-
var _ref5 = _slicedToArray$
|
|
16431
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16432
16432
|
mimeType = _ref5[0],
|
|
16433
16433
|
ext = _ref5[1];
|
|
16434
16434
|
|
|
16435
|
-
return _objectSpread$
|
|
16435
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16436
16436
|
}, {});
|
|
16437
16437
|
return [{
|
|
16438
16438
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16452,7 +16452,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16452
16452
|
function acceptPropAsAcceptAttr(accept) {
|
|
16453
16453
|
if (isDefined(accept)) {
|
|
16454
16454
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16455
|
-
var _ref7 = _slicedToArray$
|
|
16455
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16456
16456
|
mimeType = _ref7[0],
|
|
16457
16457
|
ext = _ref7[1];
|
|
16458
16458
|
|
|
@@ -16520,40 +16520,40 @@ function isExt(v) {
|
|
|
16520
16520
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16521
16521
|
*/
|
|
16522
16522
|
|
|
16523
|
-
var _excluded$
|
|
16524
|
-
_excluded2$
|
|
16523
|
+
var _excluded$d = ["children"],
|
|
16524
|
+
_excluded2$3 = ["open"],
|
|
16525
16525
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16526
16526
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16527
16527
|
|
|
16528
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16528
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16529
16529
|
|
|
16530
16530
|
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."); }
|
|
16531
16531
|
|
|
16532
16532
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16533
16533
|
|
|
16534
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16534
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16535
16535
|
|
|
16536
|
-
function _slicedToArray$
|
|
16536
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16537
16537
|
|
|
16538
|
-
function _nonIterableRest$
|
|
16538
|
+
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."); }
|
|
16539
16539
|
|
|
16540
|
-
function _unsupportedIterableToArray$
|
|
16540
|
+
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); }
|
|
16541
16541
|
|
|
16542
|
-
function _arrayLikeToArray$
|
|
16542
|
+
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; }
|
|
16543
16543
|
|
|
16544
|
-
function _iterableToArrayLimit$
|
|
16544
|
+
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; }
|
|
16545
16545
|
|
|
16546
|
-
function _arrayWithHoles$
|
|
16546
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16547
16547
|
|
|
16548
|
-
function ownKeys$
|
|
16548
|
+
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; }
|
|
16549
16549
|
|
|
16550
|
-
function _objectSpread$
|
|
16550
|
+
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; }
|
|
16551
16551
|
|
|
16552
|
-
function _defineProperty$
|
|
16552
|
+
function _defineProperty$r(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; }
|
|
16553
16553
|
|
|
16554
|
-
function _objectWithoutProperties$
|
|
16554
|
+
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; }
|
|
16555
16555
|
|
|
16556
|
-
function _objectWithoutPropertiesLoose$
|
|
16556
|
+
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; }
|
|
16557
16557
|
/**
|
|
16558
16558
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16559
16559
|
*
|
|
@@ -16571,11 +16571,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16571
16571
|
|
|
16572
16572
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16573
16573
|
var children = _ref.children,
|
|
16574
|
-
params = _objectWithoutProperties$
|
|
16574
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16575
16575
|
|
|
16576
16576
|
var _useDropzone = useDropzone(params),
|
|
16577
16577
|
open = _useDropzone.open,
|
|
16578
|
-
props = _objectWithoutProperties$
|
|
16578
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16579
16579
|
|
|
16580
16580
|
useImperativeHandle(ref, function () {
|
|
16581
16581
|
return {
|
|
@@ -16583,13 +16583,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16583
16583
|
};
|
|
16584
16584
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16585
16585
|
|
|
16586
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16586
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16587
16587
|
open: open
|
|
16588
16588
|
})));
|
|
16589
16589
|
});
|
|
16590
16590
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16591
16591
|
|
|
16592
|
-
var defaultProps$
|
|
16592
|
+
var defaultProps$1 = {
|
|
16593
16593
|
disabled: false,
|
|
16594
16594
|
getFilesFromEvent: fromEvent,
|
|
16595
16595
|
maxSize: Infinity,
|
|
@@ -16605,7 +16605,7 @@ var defaultProps$2 = {
|
|
|
16605
16605
|
useFsAccessApi: true,
|
|
16606
16606
|
autoFocus: false
|
|
16607
16607
|
};
|
|
16608
|
-
Dropzone.defaultProps = defaultProps$
|
|
16608
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16609
16609
|
Dropzone.propTypes = {
|
|
16610
16610
|
/**
|
|
16611
16611
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16956,7 +16956,7 @@ var initialState = {
|
|
|
16956
16956
|
function useDropzone() {
|
|
16957
16957
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16958
16958
|
|
|
16959
|
-
var _defaultProps$props = _objectSpread$
|
|
16959
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16960
16960
|
accept = _defaultProps$props.accept,
|
|
16961
16961
|
disabled = _defaultProps$props.disabled,
|
|
16962
16962
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17003,7 +17003,7 @@ function useDropzone() {
|
|
|
17003
17003
|
var inputRef = useRef(null);
|
|
17004
17004
|
|
|
17005
17005
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
17006
|
-
_useReducer2 = _slicedToArray$
|
|
17006
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
17007
17007
|
state = _useReducer2[0],
|
|
17008
17008
|
dispatch = _useReducer2[1];
|
|
17009
17009
|
|
|
@@ -17173,12 +17173,12 @@ function useDropzone() {
|
|
|
17173
17173
|
var fileRejections = [];
|
|
17174
17174
|
files.forEach(function (file) {
|
|
17175
17175
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17176
|
-
_fileAccepted2 = _slicedToArray$
|
|
17176
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17177
17177
|
accepted = _fileAccepted2[0],
|
|
17178
17178
|
acceptError = _fileAccepted2[1];
|
|
17179
17179
|
|
|
17180
17180
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17181
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17181
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17182
17182
|
sizeMatch = _fileMatchSize2[0],
|
|
17183
17183
|
sizeError = _fileMatchSize2[1];
|
|
17184
17184
|
|
|
@@ -17379,9 +17379,9 @@ function useDropzone() {
|
|
|
17379
17379
|
onDragOver = _ref2.onDragOver,
|
|
17380
17380
|
onDragLeave = _ref2.onDragLeave,
|
|
17381
17381
|
onDrop = _ref2.onDrop,
|
|
17382
|
-
rest = _objectWithoutProperties$
|
|
17382
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17383
17383
|
|
|
17384
|
-
return _objectSpread$
|
|
17384
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17385
17385
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17386
17386
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17387
17387
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17406,9 +17406,9 @@ function useDropzone() {
|
|
|
17406
17406
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17407
17407
|
onChange = _ref3.onChange,
|
|
17408
17408
|
onClick = _ref3.onClick,
|
|
17409
|
-
rest = _objectWithoutProperties$
|
|
17409
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17410
17410
|
|
|
17411
|
-
var inputProps = _defineProperty$
|
|
17411
|
+
var inputProps = _defineProperty$r({
|
|
17412
17412
|
accept: acceptAttr,
|
|
17413
17413
|
multiple: multiple,
|
|
17414
17414
|
type: "file",
|
|
@@ -17420,10 +17420,10 @@ function useDropzone() {
|
|
|
17420
17420
|
tabIndex: -1
|
|
17421
17421
|
}, refKey, inputRef);
|
|
17422
17422
|
|
|
17423
|
-
return _objectSpread$
|
|
17423
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17424
17424
|
};
|
|
17425
17425
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17426
|
-
return _objectSpread$
|
|
17426
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17427
17427
|
isFocused: isFocused && !disabled,
|
|
17428
17428
|
getRootProps: getRootProps,
|
|
17429
17429
|
getInputProps: getInputProps,
|
|
@@ -17442,40 +17442,40 @@ function reducer$1(state, action) {
|
|
|
17442
17442
|
/* istanbul ignore next */
|
|
17443
17443
|
switch (action.type) {
|
|
17444
17444
|
case "focus":
|
|
17445
|
-
return _objectSpread$
|
|
17445
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17446
17446
|
isFocused: true
|
|
17447
17447
|
});
|
|
17448
17448
|
|
|
17449
17449
|
case "blur":
|
|
17450
|
-
return _objectSpread$
|
|
17450
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17451
17451
|
isFocused: false
|
|
17452
17452
|
});
|
|
17453
17453
|
|
|
17454
17454
|
case "openDialog":
|
|
17455
|
-
return _objectSpread$
|
|
17455
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17456
17456
|
isFileDialogActive: true
|
|
17457
17457
|
});
|
|
17458
17458
|
|
|
17459
17459
|
case "closeDialog":
|
|
17460
|
-
return _objectSpread$
|
|
17460
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17461
17461
|
isFileDialogActive: false
|
|
17462
17462
|
});
|
|
17463
17463
|
|
|
17464
17464
|
case "setDraggedFiles":
|
|
17465
|
-
return _objectSpread$
|
|
17465
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17466
17466
|
isDragActive: action.isDragActive,
|
|
17467
17467
|
isDragAccept: action.isDragAccept,
|
|
17468
17468
|
isDragReject: action.isDragReject
|
|
17469
17469
|
});
|
|
17470
17470
|
|
|
17471
17471
|
case "setFiles":
|
|
17472
|
-
return _objectSpread$
|
|
17472
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17473
17473
|
acceptedFiles: action.acceptedFiles,
|
|
17474
17474
|
fileRejections: action.fileRejections
|
|
17475
17475
|
});
|
|
17476
17476
|
|
|
17477
17477
|
case "reset":
|
|
17478
|
-
return _objectSpread$
|
|
17478
|
+
return _objectSpread$p({}, initialState);
|
|
17479
17479
|
|
|
17480
17480
|
default:
|
|
17481
17481
|
return state;
|
|
@@ -19703,7 +19703,7 @@ function shallowEqual(a, b) {
|
|
|
19703
19703
|
return true;
|
|
19704
19704
|
}
|
|
19705
19705
|
|
|
19706
|
-
function _typeof$
|
|
19706
|
+
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); }
|
|
19707
19707
|
|
|
19708
19708
|
//
|
|
19709
19709
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19730,9 +19730,7 @@ var FilteredElementKeyMap = {
|
|
|
19730
19730
|
};
|
|
19731
19731
|
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'];
|
|
19732
19732
|
|
|
19733
|
-
|
|
19734
|
-
|
|
19735
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19733
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19736
19734
|
|
|
19737
19735
|
/** the offset of a chart, which define the blank space all around */
|
|
19738
19736
|
|
|
@@ -19768,7 +19766,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19768
19766
|
};
|
|
19769
19767
|
};
|
|
19770
19768
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19771
|
-
if (!isObject_1(props) || _typeof$
|
|
19769
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19772
19770
|
return null;
|
|
19773
19771
|
}
|
|
19774
19772
|
var out = null;
|
|
@@ -19782,11 +19780,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19782
19780
|
return out;
|
|
19783
19781
|
};
|
|
19784
19782
|
|
|
19785
|
-
var _excluded$
|
|
19786
|
-
_excluded2$
|
|
19787
|
-
function _objectWithoutProperties$
|
|
19788
|
-
function _objectWithoutPropertiesLoose$
|
|
19789
|
-
function _typeof$
|
|
19783
|
+
var _excluded$c = ["children"],
|
|
19784
|
+
_excluded2$2 = ["children"];
|
|
19785
|
+
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; }
|
|
19786
|
+
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; }
|
|
19787
|
+
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); }
|
|
19790
19788
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19791
19789
|
click: 'onClick',
|
|
19792
19790
|
mousedown: 'onMouseDown',
|
|
@@ -19893,7 +19891,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19893
19891
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19894
19892
|
};
|
|
19895
19893
|
var isDotProps = function isDotProps(dot) {
|
|
19896
|
-
return dot && _typeof$
|
|
19894
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19897
19895
|
};
|
|
19898
19896
|
|
|
19899
19897
|
/**
|
|
@@ -19985,10 +19983,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19985
19983
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19986
19984
|
var _ref = nextChild.props || {},
|
|
19987
19985
|
nextChildren = _ref.children,
|
|
19988
|
-
nextProps = _objectWithoutProperties$
|
|
19986
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19989
19987
|
var _ref2 = prevChild.props || {},
|
|
19990
19988
|
prevChildren = _ref2.children,
|
|
19991
|
-
prevProps = _objectWithoutProperties$
|
|
19989
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19992
19990
|
if (nextChildren && prevChildren) {
|
|
19993
19991
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19994
19992
|
}
|
|
@@ -20030,10 +20028,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20030
20028
|
return toArray(children).indexOf(child);
|
|
20031
20029
|
};
|
|
20032
20030
|
|
|
20033
|
-
var _excluded$
|
|
20031
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20034
20032
|
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); }
|
|
20035
|
-
function _objectWithoutProperties$
|
|
20036
|
-
function _objectWithoutPropertiesLoose$
|
|
20033
|
+
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; }
|
|
20034
|
+
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; }
|
|
20037
20035
|
function Surface(props) {
|
|
20038
20036
|
var children = props.children,
|
|
20039
20037
|
width = props.width,
|
|
@@ -20041,7 +20039,7 @@ function Surface(props) {
|
|
|
20041
20039
|
viewBox = props.viewBox,
|
|
20042
20040
|
className = props.className,
|
|
20043
20041
|
style = props.style,
|
|
20044
|
-
others = _objectWithoutProperties$
|
|
20042
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
20045
20043
|
var svgView = viewBox || {
|
|
20046
20044
|
width: width,
|
|
20047
20045
|
height: height,
|
|
@@ -20058,14 +20056,14 @@ function Surface(props) {
|
|
|
20058
20056
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
20059
20057
|
}
|
|
20060
20058
|
|
|
20061
|
-
var _excluded$
|
|
20059
|
+
var _excluded$a = ["children", "className"];
|
|
20062
20060
|
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); }
|
|
20063
|
-
function _objectWithoutProperties$
|
|
20064
|
-
function _objectWithoutPropertiesLoose$
|
|
20061
|
+
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; }
|
|
20062
|
+
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; }
|
|
20065
20063
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
20066
20064
|
var children = props.children,
|
|
20067
20065
|
className = props.className,
|
|
20068
|
-
others = _objectWithoutProperties$
|
|
20066
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
20069
20067
|
var layerClass = classNames('recharts-layer', className);
|
|
20070
20068
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
20071
20069
|
className: layerClass
|
|
@@ -23480,16 +23478,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23480
23478
|
stackOffsetNone(series, order);
|
|
23481
23479
|
}
|
|
23482
23480
|
|
|
23483
|
-
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); }
|
|
23484
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23485
23481
|
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); }
|
|
23486
|
-
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; }
|
|
23487
|
-
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; }
|
|
23488
|
-
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; }
|
|
23489
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23490
|
-
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); }
|
|
23491
|
-
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; }
|
|
23492
|
-
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; }
|
|
23493
23482
|
var symbolFactories = {
|
|
23494
23483
|
symbolCircle: symbolCircle,
|
|
23495
23484
|
symbolCross: symbolCross,
|
|
@@ -23528,35 +23517,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23528
23517
|
return Math.PI * size * size / 4;
|
|
23529
23518
|
}
|
|
23530
23519
|
};
|
|
23520
|
+
var symbolsDefaultProps = {
|
|
23521
|
+
type: 'circle',
|
|
23522
|
+
size: 64,
|
|
23523
|
+
sizeType: 'area'
|
|
23524
|
+
};
|
|
23531
23525
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23532
23526
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23533
23527
|
};
|
|
23534
|
-
var Symbols = function Symbols(
|
|
23535
|
-
var _ref$type = _ref.type,
|
|
23536
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23537
|
-
_ref$size = _ref.size,
|
|
23538
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23539
|
-
_ref$sizeType = _ref.sizeType,
|
|
23540
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23541
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23542
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23543
|
-
type: type,
|
|
23544
|
-
size: size,
|
|
23545
|
-
sizeType: sizeType
|
|
23546
|
-
});
|
|
23547
|
-
|
|
23528
|
+
var Symbols = function Symbols(props) {
|
|
23548
23529
|
/**
|
|
23549
23530
|
* Calculate the path of curve
|
|
23550
23531
|
* @return {String} path
|
|
23551
23532
|
*/
|
|
23552
23533
|
var getPath = function getPath() {
|
|
23534
|
+
var size = props.size,
|
|
23535
|
+
sizeType = props.sizeType,
|
|
23536
|
+
type = props.type;
|
|
23553
23537
|
var symbolFactory = getSymbolFactory(type);
|
|
23554
23538
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23555
23539
|
return symbol();
|
|
23556
23540
|
};
|
|
23557
23541
|
var className = props.className,
|
|
23558
23542
|
cx = props.cx,
|
|
23559
|
-
cy = props.cy
|
|
23543
|
+
cy = props.cy,
|
|
23544
|
+
size = props.size;
|
|
23560
23545
|
var filteredProps = filterProps(props, true);
|
|
23561
23546
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23562
23547
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23567,34 +23552,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23567
23552
|
}
|
|
23568
23553
|
return null;
|
|
23569
23554
|
};
|
|
23555
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23570
23556
|
Symbols.registerSymbol = registerSymbol;
|
|
23571
23557
|
|
|
23572
|
-
function _typeof$
|
|
23558
|
+
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); }
|
|
23573
23559
|
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); }
|
|
23574
|
-
function ownKeys$
|
|
23575
|
-
function _objectSpread$
|
|
23576
|
-
function _classCallCheck$
|
|
23577
|
-
function _defineProperties$
|
|
23578
|
-
function _createClass$
|
|
23579
|
-
function _inherits$
|
|
23580
|
-
function _setPrototypeOf$
|
|
23581
|
-
function _createSuper$
|
|
23582
|
-
function _possibleConstructorReturn$
|
|
23583
|
-
function _assertThisInitialized$
|
|
23584
|
-
function _isNativeReflectConstruct$
|
|
23585
|
-
function _getPrototypeOf$
|
|
23586
|
-
function _defineProperty$
|
|
23587
|
-
function _toPropertyKey$
|
|
23588
|
-
function _toPrimitive$
|
|
23560
|
+
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; }
|
|
23561
|
+
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; }
|
|
23562
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23563
|
+
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$p(descriptor.key), descriptor); } }
|
|
23564
|
+
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; }
|
|
23565
|
+
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); }
|
|
23566
|
+
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); }
|
|
23567
|
+
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); }; }
|
|
23568
|
+
function _possibleConstructorReturn$8(self, call) { if (call && (_typeof$q(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); }
|
|
23569
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23570
|
+
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; } }
|
|
23571
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23572
|
+
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; }
|
|
23573
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23574
|
+
function _toPrimitive$p(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); }
|
|
23589
23575
|
var SIZE = 32;
|
|
23590
23576
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23591
|
-
_inherits$
|
|
23592
|
-
var _super = _createSuper$
|
|
23577
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23578
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23593
23579
|
function DefaultLegendContent() {
|
|
23594
|
-
_classCallCheck$
|
|
23580
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23595
23581
|
return _super.apply(this, arguments);
|
|
23596
23582
|
}
|
|
23597
|
-
_createClass$
|
|
23583
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23598
23584
|
key: "renderIcon",
|
|
23599
23585
|
value:
|
|
23600
23586
|
/**
|
|
@@ -23639,7 +23625,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23639
23625
|
});
|
|
23640
23626
|
}
|
|
23641
23627
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23642
|
-
var iconProps = _objectSpread$
|
|
23628
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23643
23629
|
delete iconProps.legendIcon;
|
|
23644
23630
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23645
23631
|
}
|
|
@@ -23687,7 +23673,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23687
23673
|
var finalFormatter = entry.formatter || formatter;
|
|
23688
23674
|
var className = classNames((_classNames = {
|
|
23689
23675
|
'recharts-legend-item': true
|
|
23690
|
-
}, _defineProperty$
|
|
23676
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23691
23677
|
if (entry.type === 'none') {
|
|
23692
23678
|
return null;
|
|
23693
23679
|
}
|
|
@@ -23732,8 +23718,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23732
23718
|
}]);
|
|
23733
23719
|
return DefaultLegendContent;
|
|
23734
23720
|
}(PureComponent);
|
|
23735
|
-
_defineProperty$
|
|
23736
|
-
_defineProperty$
|
|
23721
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23722
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23737
23723
|
iconSize: 14,
|
|
23738
23724
|
layout: 'horizontal',
|
|
23739
23725
|
align: 'center',
|
|
@@ -23741,25 +23727,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23741
23727
|
inactiveColor: '#ccc'
|
|
23742
23728
|
});
|
|
23743
23729
|
|
|
23744
|
-
function _typeof$
|
|
23745
|
-
var _excluded$
|
|
23746
|
-
function ownKeys$
|
|
23747
|
-
function _objectSpread$
|
|
23748
|
-
function _classCallCheck$
|
|
23749
|
-
function _defineProperties$
|
|
23750
|
-
function _createClass$
|
|
23751
|
-
function _inherits$
|
|
23752
|
-
function _setPrototypeOf$
|
|
23753
|
-
function _createSuper$
|
|
23754
|
-
function _possibleConstructorReturn$
|
|
23755
|
-
function _assertThisInitialized$
|
|
23756
|
-
function _isNativeReflectConstruct$
|
|
23757
|
-
function _getPrototypeOf$
|
|
23758
|
-
function _defineProperty$
|
|
23759
|
-
function _toPropertyKey$
|
|
23760
|
-
function _toPrimitive$
|
|
23761
|
-
function _objectWithoutProperties$
|
|
23762
|
-
function _objectWithoutPropertiesLoose$
|
|
23730
|
+
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); }
|
|
23731
|
+
var _excluded$9 = ["ref"];
|
|
23732
|
+
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; }
|
|
23733
|
+
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; }
|
|
23734
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23735
|
+
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); } }
|
|
23736
|
+
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; }
|
|
23737
|
+
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); }
|
|
23738
|
+
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); }
|
|
23739
|
+
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); }; }
|
|
23740
|
+
function _possibleConstructorReturn$7(self, call) { if (call && (_typeof$p(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); }
|
|
23741
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23742
|
+
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; } }
|
|
23743
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23744
|
+
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; }
|
|
23745
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23746
|
+
function _toPrimitive$o(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); }
|
|
23747
|
+
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; }
|
|
23748
|
+
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; }
|
|
23763
23749
|
function defaultUniqBy$1(entry) {
|
|
23764
23750
|
return entry.value;
|
|
23765
23751
|
}
|
|
@@ -23780,27 +23766,27 @@ function renderContent$1(content, props) {
|
|
|
23780
23766
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23781
23767
|
}
|
|
23782
23768
|
props.ref;
|
|
23783
|
-
var otherProps = _objectWithoutProperties$
|
|
23769
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23784
23770
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23785
23771
|
}
|
|
23786
23772
|
var EPS$2 = 1;
|
|
23787
23773
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23788
|
-
_inherits$
|
|
23789
|
-
var _super = _createSuper$
|
|
23774
|
+
_inherits$7(Legend, _PureComponent);
|
|
23775
|
+
var _super = _createSuper$7(Legend);
|
|
23790
23776
|
function Legend() {
|
|
23791
23777
|
var _this;
|
|
23792
|
-
_classCallCheck$
|
|
23778
|
+
_classCallCheck$9(this, Legend);
|
|
23793
23779
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23794
23780
|
args[_key] = arguments[_key];
|
|
23795
23781
|
}
|
|
23796
23782
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23797
|
-
_defineProperty$
|
|
23783
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23798
23784
|
boxWidth: -1,
|
|
23799
23785
|
boxHeight: -1
|
|
23800
23786
|
});
|
|
23801
23787
|
return _this;
|
|
23802
23788
|
}
|
|
23803
|
-
_createClass$
|
|
23789
|
+
_createClass$9(Legend, [{
|
|
23804
23790
|
key: "componentDidMount",
|
|
23805
23791
|
value: function componentDidMount() {
|
|
23806
23792
|
this.updateBBox();
|
|
@@ -23875,7 +23861,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23875
23861
|
};
|
|
23876
23862
|
}
|
|
23877
23863
|
}
|
|
23878
|
-
return _objectSpread$
|
|
23864
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23879
23865
|
}
|
|
23880
23866
|
}, {
|
|
23881
23867
|
key: "updateBBox",
|
|
@@ -23918,7 +23904,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23918
23904
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23919
23905
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23920
23906
|
payload = _this$props2.payload;
|
|
23921
|
-
var outerStyle = _objectSpread$
|
|
23907
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23922
23908
|
position: 'absolute',
|
|
23923
23909
|
width: width || 'auto',
|
|
23924
23910
|
height: height || 'auto'
|
|
@@ -23929,7 +23915,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23929
23915
|
ref: function ref(node) {
|
|
23930
23916
|
_this2.wrapperNode = node;
|
|
23931
23917
|
}
|
|
23932
|
-
}, renderContent$1(content, _objectSpread$
|
|
23918
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23933
23919
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23934
23920
|
})));
|
|
23935
23921
|
}
|
|
@@ -23952,8 +23938,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23952
23938
|
}]);
|
|
23953
23939
|
return Legend;
|
|
23954
23940
|
}(PureComponent);
|
|
23955
|
-
_defineProperty$
|
|
23956
|
-
_defineProperty$
|
|
23941
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23942
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23957
23943
|
iconSize: 14,
|
|
23958
23944
|
layout: 'horizontal',
|
|
23959
23945
|
align: 'center',
|
|
@@ -24517,13 +24503,13 @@ function setRafTimeout(callback) {
|
|
|
24517
24503
|
requestAnimationFrame(shouldUpdate);
|
|
24518
24504
|
}
|
|
24519
24505
|
|
|
24520
|
-
function _typeof$
|
|
24521
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24522
|
-
function _nonIterableRest$
|
|
24523
|
-
function _unsupportedIterableToArray$
|
|
24524
|
-
function _arrayLikeToArray$
|
|
24506
|
+
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); }
|
|
24507
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24508
|
+
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."); }
|
|
24509
|
+
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); }
|
|
24510
|
+
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; }
|
|
24525
24511
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24526
|
-
function _arrayWithHoles$
|
|
24512
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24527
24513
|
function createAnimateManager() {
|
|
24528
24514
|
var currStyle = {};
|
|
24529
24515
|
var handleChange = function handleChange() {
|
|
@@ -24550,7 +24536,7 @@ function createAnimateManager() {
|
|
|
24550
24536
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24551
24537
|
return;
|
|
24552
24538
|
}
|
|
24553
|
-
if (_typeof$
|
|
24539
|
+
if (_typeof$o(_style) === 'object') {
|
|
24554
24540
|
currStyle = _style;
|
|
24555
24541
|
handleChange(currStyle);
|
|
24556
24542
|
}
|
|
@@ -24577,12 +24563,12 @@ function createAnimateManager() {
|
|
|
24577
24563
|
};
|
|
24578
24564
|
}
|
|
24579
24565
|
|
|
24580
|
-
function _typeof$
|
|
24581
|
-
function ownKeys$
|
|
24582
|
-
function _objectSpread$
|
|
24583
|
-
function _defineProperty$
|
|
24584
|
-
function _toPropertyKey$
|
|
24585
|
-
function _toPrimitive$
|
|
24566
|
+
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); }
|
|
24567
|
+
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; }
|
|
24568
|
+
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$o(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; }
|
|
24569
|
+
function _defineProperty$o(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; }
|
|
24570
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24571
|
+
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); }
|
|
24586
24572
|
/* eslint no-console: 0 */
|
|
24587
24573
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24588
24574
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24614,7 +24600,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24614
24600
|
*/
|
|
24615
24601
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24616
24602
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24617
|
-
return _defineProperty$
|
|
24603
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24618
24604
|
}
|
|
24619
24605
|
var isTransition = name === 'transition';
|
|
24620
24606
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24625,7 +24611,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24625
24611
|
if (isTransition) {
|
|
24626
24612
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24627
24613
|
}
|
|
24628
|
-
return _objectSpread$
|
|
24614
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24629
24615
|
}, {});
|
|
24630
24616
|
};
|
|
24631
24617
|
|
|
@@ -24635,7 +24621,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24635
24621
|
*/
|
|
24636
24622
|
var mapObject = function mapObject(fn, obj) {
|
|
24637
24623
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24638
|
-
return _objectSpread$
|
|
24624
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24639
24625
|
}, {});
|
|
24640
24626
|
};
|
|
24641
24627
|
|
|
@@ -24645,7 +24631,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24645
24631
|
*/
|
|
24646
24632
|
var translateStyle = function translateStyle(style) {
|
|
24647
24633
|
return Object.keys(style).reduce(function (res, key) {
|
|
24648
|
-
return _objectSpread$
|
|
24634
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24649
24635
|
}, style);
|
|
24650
24636
|
};
|
|
24651
24637
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24673,16 +24659,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24673
24659
|
}
|
|
24674
24660
|
};
|
|
24675
24661
|
|
|
24676
|
-
function _slicedToArray$
|
|
24677
|
-
function _nonIterableRest$
|
|
24678
|
-
function _iterableToArrayLimit$
|
|
24679
|
-
function _arrayWithHoles$
|
|
24680
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24662
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24663
|
+
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."); }
|
|
24664
|
+
function _iterableToArrayLimit$a(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; } }
|
|
24665
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24666
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24681
24667
|
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."); }
|
|
24682
|
-
function _unsupportedIterableToArray$
|
|
24668
|
+
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); }
|
|
24683
24669
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24684
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24685
|
-
function _arrayLikeToArray$
|
|
24670
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24671
|
+
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; }
|
|
24686
24672
|
var ACCURACY = 1e-4;
|
|
24687
24673
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24688
24674
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24758,7 +24744,7 @@ var configBezier = function configBezier() {
|
|
|
24758
24744
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24759
24745
|
return parseFloat(x);
|
|
24760
24746
|
});
|
|
24761
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24747
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24762
24748
|
x1 = _easing$1$split$0$spl2[0];
|
|
24763
24749
|
y1 = _easing$1$split$0$spl2[1];
|
|
24764
24750
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24851,22 +24837,22 @@ var configEasing = function configEasing() {
|
|
|
24851
24837
|
return null;
|
|
24852
24838
|
};
|
|
24853
24839
|
|
|
24854
|
-
function _typeof$
|
|
24855
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24840
|
+
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); }
|
|
24841
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24856
24842
|
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."); }
|
|
24857
24843
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24858
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24859
|
-
function ownKeys$
|
|
24860
|
-
function _objectSpread$
|
|
24861
|
-
function _defineProperty$
|
|
24862
|
-
function _toPropertyKey$
|
|
24863
|
-
function _toPrimitive$
|
|
24864
|
-
function _slicedToArray$
|
|
24865
|
-
function _nonIterableRest$
|
|
24866
|
-
function _unsupportedIterableToArray$
|
|
24867
|
-
function _arrayLikeToArray$
|
|
24868
|
-
function _iterableToArrayLimit$
|
|
24869
|
-
function _arrayWithHoles$
|
|
24844
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24845
|
+
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; }
|
|
24846
|
+
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$n(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; }
|
|
24847
|
+
function _defineProperty$n(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; }
|
|
24848
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24849
|
+
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); }
|
|
24850
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24851
|
+
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."); }
|
|
24852
|
+
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); }
|
|
24853
|
+
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; }
|
|
24854
|
+
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; } }
|
|
24855
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24870
24856
|
var alpha = function alpha(begin, end, k) {
|
|
24871
24857
|
return begin + (end - begin) * k;
|
|
24872
24858
|
};
|
|
@@ -24884,10 +24870,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24884
24870
|
var nextStepVals = mapObject(function (key, val) {
|
|
24885
24871
|
if (needContinue(val)) {
|
|
24886
24872
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24887
|
-
_easing2 = _slicedToArray$
|
|
24873
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24888
24874
|
newX = _easing2[0],
|
|
24889
24875
|
newV = _easing2[1];
|
|
24890
|
-
return _objectSpread$
|
|
24876
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24891
24877
|
from: newX,
|
|
24892
24878
|
velocity: newV
|
|
24893
24879
|
});
|
|
@@ -24897,7 +24883,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24897
24883
|
if (steps < 1) {
|
|
24898
24884
|
return mapObject(function (key, val) {
|
|
24899
24885
|
if (needContinue(val)) {
|
|
24900
|
-
return _objectSpread$
|
|
24886
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24901
24887
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24902
24888
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24903
24889
|
});
|
|
@@ -24912,10 +24898,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24912
24898
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24913
24899
|
var interKeys = getIntersectionKeys(from, to);
|
|
24914
24900
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24915
|
-
return _objectSpread$
|
|
24901
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24916
24902
|
}, {});
|
|
24917
24903
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24918
|
-
return _objectSpread$
|
|
24904
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24919
24905
|
from: from[key],
|
|
24920
24906
|
velocity: 0,
|
|
24921
24907
|
to: to[key]
|
|
@@ -24945,7 +24931,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24945
24931
|
var steps = deltaTime / easing.dt;
|
|
24946
24932
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24947
24933
|
// get union set and add compatible prefix
|
|
24948
|
-
render(_objectSpread$
|
|
24934
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24949
24935
|
preTime = now;
|
|
24950
24936
|
if (!shouldStopAnimation()) {
|
|
24951
24937
|
cafId = requestAnimationFrame(update);
|
|
@@ -24963,14 +24949,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24963
24949
|
}, timingStyle);
|
|
24964
24950
|
|
|
24965
24951
|
// get union set and add compatible prefix
|
|
24966
|
-
render(_objectSpread$
|
|
24952
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24967
24953
|
if (t < 1) {
|
|
24968
24954
|
cafId = requestAnimationFrame(update);
|
|
24969
24955
|
} else {
|
|
24970
24956
|
var finalStyle = mapObject(function (key, val) {
|
|
24971
24957
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24972
24958
|
}, timingStyle);
|
|
24973
|
-
render(_objectSpread$
|
|
24959
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24974
24960
|
}
|
|
24975
24961
|
};
|
|
24976
24962
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24986,37 +24972,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24986
24972
|
};
|
|
24987
24973
|
});
|
|
24988
24974
|
|
|
24989
|
-
function _typeof$
|
|
24990
|
-
var _excluded$
|
|
24991
|
-
function _objectWithoutProperties$
|
|
24992
|
-
function _objectWithoutPropertiesLoose$
|
|
24993
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24975
|
+
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); }
|
|
24976
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24977
|
+
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; }
|
|
24978
|
+
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; }
|
|
24979
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24994
24980
|
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."); }
|
|
24995
|
-
function _unsupportedIterableToArray$
|
|
24981
|
+
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); }
|
|
24996
24982
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24997
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24998
|
-
function _arrayLikeToArray$
|
|
24999
|
-
function ownKeys$
|
|
25000
|
-
function _objectSpread$
|
|
25001
|
-
function _defineProperty$
|
|
25002
|
-
function _classCallCheck$
|
|
25003
|
-
function _defineProperties$
|
|
25004
|
-
function _createClass$
|
|
25005
|
-
function _toPropertyKey$
|
|
25006
|
-
function _toPrimitive$
|
|
25007
|
-
function _inherits$
|
|
25008
|
-
function _setPrototypeOf$
|
|
25009
|
-
function _createSuper$
|
|
25010
|
-
function _possibleConstructorReturn$
|
|
25011
|
-
function _assertThisInitialized$
|
|
25012
|
-
function _isNativeReflectConstruct$
|
|
25013
|
-
function _getPrototypeOf$
|
|
24983
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24984
|
+
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; }
|
|
24985
|
+
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; }
|
|
24986
|
+
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$m(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; }
|
|
24987
|
+
function _defineProperty$m(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; }
|
|
24988
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24989
|
+
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$l(descriptor.key), descriptor); } }
|
|
24990
|
+
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; }
|
|
24991
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24992
|
+
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); }
|
|
24993
|
+
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); }
|
|
24994
|
+
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); }
|
|
24995
|
+
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); }; }
|
|
24996
|
+
function _possibleConstructorReturn$6(self, call) { if (call && (_typeof$l(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); }
|
|
24997
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24998
|
+
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; } }
|
|
24999
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25014
25000
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25015
|
-
_inherits$
|
|
25016
|
-
var _super = _createSuper$
|
|
25001
|
+
_inherits$6(Animate, _PureComponent);
|
|
25002
|
+
var _super = _createSuper$6(Animate);
|
|
25017
25003
|
function Animate(props, context) {
|
|
25018
25004
|
var _this;
|
|
25019
|
-
_classCallCheck$
|
|
25005
|
+
_classCallCheck$8(this, Animate);
|
|
25020
25006
|
_this = _super.call(this, props, context);
|
|
25021
25007
|
var _this$props = _this.props,
|
|
25022
25008
|
isActive = _this$props.isActive,
|
|
@@ -25026,8 +25012,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25026
25012
|
steps = _this$props.steps,
|
|
25027
25013
|
children = _this$props.children,
|
|
25028
25014
|
duration = _this$props.duration;
|
|
25029
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25030
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25015
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
25016
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
25031
25017
|
if (!isActive || duration <= 0) {
|
|
25032
25018
|
_this.state = {
|
|
25033
25019
|
style: {}
|
|
@@ -25039,7 +25025,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25039
25025
|
style: to
|
|
25040
25026
|
};
|
|
25041
25027
|
}
|
|
25042
|
-
return _possibleConstructorReturn$
|
|
25028
|
+
return _possibleConstructorReturn$6(_this);
|
|
25043
25029
|
}
|
|
25044
25030
|
if (steps && steps.length) {
|
|
25045
25031
|
_this.state = {
|
|
@@ -25050,10 +25036,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25050
25036
|
_this.state = {
|
|
25051
25037
|
style: from
|
|
25052
25038
|
};
|
|
25053
|
-
return _possibleConstructorReturn$
|
|
25039
|
+
return _possibleConstructorReturn$6(_this);
|
|
25054
25040
|
}
|
|
25055
25041
|
_this.state = {
|
|
25056
|
-
style: attributeName ? _defineProperty$
|
|
25042
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25057
25043
|
};
|
|
25058
25044
|
} else {
|
|
25059
25045
|
_this.state = {
|
|
@@ -25062,7 +25048,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25062
25048
|
}
|
|
25063
25049
|
return _this;
|
|
25064
25050
|
}
|
|
25065
|
-
_createClass$
|
|
25051
|
+
_createClass$8(Animate, [{
|
|
25066
25052
|
key: "componentDidMount",
|
|
25067
25053
|
value: function componentDidMount() {
|
|
25068
25054
|
var _this$props2 = this.props,
|
|
@@ -25090,7 +25076,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25090
25076
|
}
|
|
25091
25077
|
if (!isActive) {
|
|
25092
25078
|
var newState = {
|
|
25093
|
-
style: attributeName ? _defineProperty$
|
|
25079
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
25094
25080
|
};
|
|
25095
25081
|
if (this.state && style) {
|
|
25096
25082
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25113,14 +25099,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25113
25099
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25114
25100
|
if (this.state && style) {
|
|
25115
25101
|
var _newState = {
|
|
25116
|
-
style: attributeName ? _defineProperty$
|
|
25102
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25117
25103
|
};
|
|
25118
25104
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25119
25105
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25120
25106
|
this.setState(_newState);
|
|
25121
25107
|
}
|
|
25122
25108
|
}
|
|
25123
|
-
this.runAnimation(_objectSpread$
|
|
25109
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
25124
25110
|
from: from,
|
|
25125
25111
|
begin: 0
|
|
25126
25112
|
}));
|
|
@@ -25203,7 +25189,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25203
25189
|
}), duration]);
|
|
25204
25190
|
}
|
|
25205
25191
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25206
|
-
var newStyle = _objectSpread$
|
|
25192
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25207
25193
|
transition: transition
|
|
25208
25194
|
});
|
|
25209
25195
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25235,9 +25221,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25235
25221
|
this.runStepAnimation(props);
|
|
25236
25222
|
return;
|
|
25237
25223
|
}
|
|
25238
|
-
var to = attributeName ? _defineProperty$
|
|
25224
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25239
25225
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25240
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25226
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25241
25227
|
transition: transition
|
|
25242
25228
|
}), duration, onAnimationEnd]);
|
|
25243
25229
|
}
|
|
@@ -25258,7 +25244,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25258
25244
|
_this$props4.onAnimationEnd;
|
|
25259
25245
|
_this$props4.shouldReAnimate;
|
|
25260
25246
|
_this$props4.onAnimationReStart;
|
|
25261
|
-
var others = _objectWithoutProperties$
|
|
25247
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25262
25248
|
var count = Children.count(children);
|
|
25263
25249
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25264
25250
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25273,8 +25259,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25273
25259
|
_container$props$styl = _container$props.style,
|
|
25274
25260
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25275
25261
|
className = _container$props.className;
|
|
25276
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25277
|
-
style: _objectSpread$
|
|
25262
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25263
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25278
25264
|
className: className
|
|
25279
25265
|
}));
|
|
25280
25266
|
return res;
|
|
@@ -25799,10 +25785,10 @@ var defineProperty$2 = (function() {
|
|
|
25799
25785
|
} catch (e) {}
|
|
25800
25786
|
}());
|
|
25801
25787
|
|
|
25802
|
-
var _defineProperty$
|
|
25788
|
+
var _defineProperty$l = defineProperty$2;
|
|
25803
25789
|
|
|
25804
25790
|
var constant$1 = constant_1,
|
|
25805
|
-
defineProperty$1 = _defineProperty$
|
|
25791
|
+
defineProperty$1 = _defineProperty$l,
|
|
25806
25792
|
identity$7 = identity_1;
|
|
25807
25793
|
|
|
25808
25794
|
/**
|
|
@@ -25979,18 +25965,18 @@ var sortBy_1 = sortBy;
|
|
|
25979
25965
|
/**
|
|
25980
25966
|
* @fileOverview Default Tooltip Content
|
|
25981
25967
|
*/
|
|
25982
|
-
function _typeof$
|
|
25983
|
-
function _slicedToArray$
|
|
25984
|
-
function _nonIterableRest$
|
|
25985
|
-
function _unsupportedIterableToArray$
|
|
25986
|
-
function _arrayLikeToArray$
|
|
25987
|
-
function _iterableToArrayLimit$
|
|
25988
|
-
function _arrayWithHoles$
|
|
25989
|
-
function ownKeys$
|
|
25990
|
-
function _objectSpread$
|
|
25991
|
-
function _defineProperty$
|
|
25992
|
-
function _toPropertyKey$
|
|
25993
|
-
function _toPrimitive$
|
|
25968
|
+
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); }
|
|
25969
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25970
|
+
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."); }
|
|
25971
|
+
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); }
|
|
25972
|
+
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; }
|
|
25973
|
+
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; } }
|
|
25974
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25975
|
+
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; }
|
|
25976
|
+
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; }
|
|
25977
|
+
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; }
|
|
25978
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25979
|
+
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); }
|
|
25994
25980
|
function defaultFormatter(value) {
|
|
25995
25981
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25996
25982
|
}
|
|
@@ -26020,7 +26006,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26020
26006
|
if (entry.type === 'none') {
|
|
26021
26007
|
return null;
|
|
26022
26008
|
}
|
|
26023
|
-
var finalItemStyle = _objectSpread$
|
|
26009
|
+
var finalItemStyle = _objectSpread$j({
|
|
26024
26010
|
display: 'block',
|
|
26025
26011
|
paddingTop: 4,
|
|
26026
26012
|
paddingBottom: 4,
|
|
@@ -26034,7 +26020,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26034
26020
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26035
26021
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26036
26022
|
if (Array.isArray(formatted)) {
|
|
26037
|
-
var _formatted = _slicedToArray$
|
|
26023
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
26038
26024
|
finalValue = _formatted[0];
|
|
26039
26025
|
finalName = _formatted[1];
|
|
26040
26026
|
} else {
|
|
@@ -26066,14 +26052,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26066
26052
|
}
|
|
26067
26053
|
return null;
|
|
26068
26054
|
};
|
|
26069
|
-
var finalStyle = _objectSpread$
|
|
26055
|
+
var finalStyle = _objectSpread$j({
|
|
26070
26056
|
margin: 0,
|
|
26071
26057
|
padding: 10,
|
|
26072
26058
|
backgroundColor: '#fff',
|
|
26073
26059
|
border: '1px solid #ccc',
|
|
26074
26060
|
whiteSpace: 'nowrap'
|
|
26075
26061
|
}, contentStyle);
|
|
26076
|
-
var finalLabelStyle = _objectSpread$
|
|
26062
|
+
var finalLabelStyle = _objectSpread$j({
|
|
26077
26063
|
margin: 0
|
|
26078
26064
|
}, labelStyle);
|
|
26079
26065
|
var hasLabel = !isNil_1(label);
|
|
@@ -26114,22 +26100,18 @@ var Global = {
|
|
|
26114
26100
|
}
|
|
26115
26101
|
};
|
|
26116
26102
|
|
|
26117
|
-
function _typeof$
|
|
26118
|
-
function ownKeys$
|
|
26119
|
-
function _objectSpread$
|
|
26120
|
-
function
|
|
26121
|
-
function
|
|
26122
|
-
function
|
|
26123
|
-
function
|
|
26124
|
-
function
|
|
26125
|
-
function
|
|
26126
|
-
function
|
|
26127
|
-
function
|
|
26128
|
-
function
|
|
26129
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26130
|
-
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; }
|
|
26131
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26132
|
-
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); }
|
|
26103
|
+
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); }
|
|
26104
|
+
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; }
|
|
26105
|
+
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; }
|
|
26106
|
+
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; }
|
|
26107
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
26108
|
+
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); }
|
|
26109
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26110
|
+
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."); }
|
|
26111
|
+
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); }
|
|
26112
|
+
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; }
|
|
26113
|
+
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; } }
|
|
26114
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26133
26115
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26134
26116
|
var EPS$1 = 1;
|
|
26135
26117
|
function defaultUniqBy(entry) {
|
|
@@ -26153,204 +26135,7 @@ function renderContent(content, props) {
|
|
|
26153
26135
|
}
|
|
26154
26136
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
26155
26137
|
}
|
|
26156
|
-
var
|
|
26157
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26158
|
-
var _super = _createSuper$6(Tooltip);
|
|
26159
|
-
function Tooltip() {
|
|
26160
|
-
var _this;
|
|
26161
|
-
_classCallCheck$8(this, Tooltip);
|
|
26162
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26163
|
-
args[_key] = arguments[_key];
|
|
26164
|
-
}
|
|
26165
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26166
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26167
|
-
boxWidth: -1,
|
|
26168
|
-
boxHeight: -1,
|
|
26169
|
-
dismissed: false,
|
|
26170
|
-
dismissedAtCoordinate: {
|
|
26171
|
-
x: 0,
|
|
26172
|
-
y: 0
|
|
26173
|
-
}
|
|
26174
|
-
});
|
|
26175
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26176
|
-
if (event.key === 'Escape') {
|
|
26177
|
-
_this.setState({
|
|
26178
|
-
dismissed: true,
|
|
26179
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26180
|
-
x: _this.props.coordinate.x,
|
|
26181
|
-
y: _this.props.coordinate.y
|
|
26182
|
-
})
|
|
26183
|
-
});
|
|
26184
|
-
}
|
|
26185
|
-
});
|
|
26186
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26187
|
-
var key = _ref.key,
|
|
26188
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26189
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26190
|
-
var _this$props = _this.props,
|
|
26191
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26192
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26193
|
-
coordinate = _this$props.coordinate,
|
|
26194
|
-
offset = _this$props.offset,
|
|
26195
|
-
position = _this$props.position,
|
|
26196
|
-
viewBox = _this$props.viewBox;
|
|
26197
|
-
if (position && isNumber(position[key])) {
|
|
26198
|
-
return position[key];
|
|
26199
|
-
}
|
|
26200
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26201
|
-
var positive = coordinate[key] + offset;
|
|
26202
|
-
if (allowEscapeViewBox[key]) {
|
|
26203
|
-
return reverseDirection[key] ? negative : positive;
|
|
26204
|
-
}
|
|
26205
|
-
if (reverseDirection[key]) {
|
|
26206
|
-
var _tooltipBoundary = negative;
|
|
26207
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26208
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26209
|
-
return Math.max(positive, viewBox[key]);
|
|
26210
|
-
}
|
|
26211
|
-
return Math.max(negative, viewBox[key]);
|
|
26212
|
-
}
|
|
26213
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26214
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26215
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26216
|
-
return Math.max(negative, viewBox[key]);
|
|
26217
|
-
}
|
|
26218
|
-
return Math.max(positive, viewBox[key]);
|
|
26219
|
-
});
|
|
26220
|
-
return _this;
|
|
26221
|
-
}
|
|
26222
|
-
_createClass$8(Tooltip, [{
|
|
26223
|
-
key: "componentDidMount",
|
|
26224
|
-
value: function componentDidMount() {
|
|
26225
|
-
this.updateBBox();
|
|
26226
|
-
}
|
|
26227
|
-
}, {
|
|
26228
|
-
key: "componentWillUnmount",
|
|
26229
|
-
value: function componentWillUnmount() {
|
|
26230
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26231
|
-
}
|
|
26232
|
-
}, {
|
|
26233
|
-
key: "componentDidUpdate",
|
|
26234
|
-
value: function componentDidUpdate() {
|
|
26235
|
-
this.updateBBox();
|
|
26236
|
-
}
|
|
26237
|
-
}, {
|
|
26238
|
-
key: "updateBBox",
|
|
26239
|
-
value: function updateBBox() {
|
|
26240
|
-
var _this$state = this.state,
|
|
26241
|
-
boxWidth = _this$state.boxWidth,
|
|
26242
|
-
boxHeight = _this$state.boxHeight,
|
|
26243
|
-
dismissed = _this$state.dismissed;
|
|
26244
|
-
if (dismissed) {
|
|
26245
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26246
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26247
|
-
this.setState({
|
|
26248
|
-
dismissed: false
|
|
26249
|
-
});
|
|
26250
|
-
}
|
|
26251
|
-
} else {
|
|
26252
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26253
|
-
}
|
|
26254
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26255
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26256
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26257
|
-
this.setState({
|
|
26258
|
-
boxWidth: box.width,
|
|
26259
|
-
boxHeight: box.height
|
|
26260
|
-
});
|
|
26261
|
-
}
|
|
26262
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26263
|
-
this.setState({
|
|
26264
|
-
boxWidth: -1,
|
|
26265
|
-
boxHeight: -1
|
|
26266
|
-
});
|
|
26267
|
-
}
|
|
26268
|
-
}
|
|
26269
|
-
}, {
|
|
26270
|
-
key: "render",
|
|
26271
|
-
value: function render() {
|
|
26272
|
-
var _classNames,
|
|
26273
|
-
_this2 = this;
|
|
26274
|
-
var _this$props2 = this.props,
|
|
26275
|
-
payload = _this$props2.payload,
|
|
26276
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26277
|
-
animationDuration = _this$props2.animationDuration,
|
|
26278
|
-
animationEasing = _this$props2.animationEasing,
|
|
26279
|
-
filterNull = _this$props2.filterNull,
|
|
26280
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26281
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26282
|
-
return !isNil_1(entry.value);
|
|
26283
|
-
}) : payload);
|
|
26284
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26285
|
-
var _this$props3 = this.props,
|
|
26286
|
-
content = _this$props3.content,
|
|
26287
|
-
viewBox = _this$props3.viewBox,
|
|
26288
|
-
coordinate = _this$props3.coordinate,
|
|
26289
|
-
position = _this$props3.position,
|
|
26290
|
-
active = _this$props3.active,
|
|
26291
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26292
|
-
var outerStyle = _objectSpread$l({
|
|
26293
|
-
pointerEvents: 'none',
|
|
26294
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26295
|
-
position: 'absolute',
|
|
26296
|
-
top: 0,
|
|
26297
|
-
left: 0
|
|
26298
|
-
}, wrapperStyle);
|
|
26299
|
-
var translateX, translateY;
|
|
26300
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26301
|
-
translateX = position.x;
|
|
26302
|
-
translateY = position.y;
|
|
26303
|
-
} else {
|
|
26304
|
-
var _this$state2 = this.state,
|
|
26305
|
-
boxWidth = _this$state2.boxWidth,
|
|
26306
|
-
boxHeight = _this$state2.boxHeight;
|
|
26307
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26308
|
-
translateX = this.getTranslate({
|
|
26309
|
-
key: 'x',
|
|
26310
|
-
tooltipDimension: boxWidth,
|
|
26311
|
-
viewBoxDimension: viewBox.width
|
|
26312
|
-
});
|
|
26313
|
-
translateY = this.getTranslate({
|
|
26314
|
-
key: 'y',
|
|
26315
|
-
tooltipDimension: boxHeight,
|
|
26316
|
-
viewBoxDimension: viewBox.height
|
|
26317
|
-
});
|
|
26318
|
-
} else {
|
|
26319
|
-
outerStyle.visibility = 'hidden';
|
|
26320
|
-
}
|
|
26321
|
-
}
|
|
26322
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26323
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26324
|
-
})), outerStyle);
|
|
26325
|
-
if (isAnimationActive && active) {
|
|
26326
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26327
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26328
|
-
})), outerStyle);
|
|
26329
|
-
}
|
|
26330
|
-
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));
|
|
26331
|
-
return (
|
|
26332
|
-
/*#__PURE__*/
|
|
26333
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26334
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26335
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26336
|
-
React__default.createElement("div", {
|
|
26337
|
-
tabIndex: -1,
|
|
26338
|
-
role: "dialog",
|
|
26339
|
-
className: cls,
|
|
26340
|
-
style: outerStyle,
|
|
26341
|
-
ref: function ref(node) {
|
|
26342
|
-
_this2.wrapperNode = node;
|
|
26343
|
-
}
|
|
26344
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26345
|
-
payload: finalPayload
|
|
26346
|
-
})))
|
|
26347
|
-
);
|
|
26348
|
-
}
|
|
26349
|
-
}]);
|
|
26350
|
-
return Tooltip;
|
|
26351
|
-
}(PureComponent);
|
|
26352
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26353
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26138
|
+
var tooltipDefaultProps = {
|
|
26354
26139
|
active: false,
|
|
26355
26140
|
allowEscapeViewBox: {
|
|
26356
26141
|
x: false,
|
|
@@ -26371,6 +26156,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26371
26156
|
x: 0,
|
|
26372
26157
|
y: 0
|
|
26373
26158
|
},
|
|
26159
|
+
// this doesn't exist on TooltipProps
|
|
26160
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26161
|
+
// @ts-ignore
|
|
26374
26162
|
cursorStyle: {},
|
|
26375
26163
|
separator: ' : ',
|
|
26376
26164
|
wrapperStyle: {},
|
|
@@ -26384,7 +26172,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26384
26172
|
animationDuration: 400,
|
|
26385
26173
|
filterNull: true,
|
|
26386
26174
|
useTranslate3d: false
|
|
26387
|
-
}
|
|
26175
|
+
};
|
|
26176
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26177
|
+
var _classNames;
|
|
26178
|
+
var _useState = useState(-1),
|
|
26179
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26180
|
+
boxWidth = _useState2[0],
|
|
26181
|
+
setBoxWidth = _useState2[1];
|
|
26182
|
+
var _useState3 = useState(-1),
|
|
26183
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26184
|
+
boxHeight = _useState4[0],
|
|
26185
|
+
setBoxHeight = _useState4[1];
|
|
26186
|
+
var _useState5 = useState(false),
|
|
26187
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26188
|
+
dismissed = _useState6[0],
|
|
26189
|
+
setDismissed = _useState6[1];
|
|
26190
|
+
var _useState7 = useState({
|
|
26191
|
+
x: 0,
|
|
26192
|
+
y: 0
|
|
26193
|
+
}),
|
|
26194
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26195
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26196
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26197
|
+
var wrapperNode = useRef();
|
|
26198
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26199
|
+
reverseDirection = props.reverseDirection,
|
|
26200
|
+
coordinate = props.coordinate,
|
|
26201
|
+
offset = props.offset,
|
|
26202
|
+
position = props.position,
|
|
26203
|
+
viewBox = props.viewBox;
|
|
26204
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26205
|
+
if (event.key === 'Escape') {
|
|
26206
|
+
setDismissed(true);
|
|
26207
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26208
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26209
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26210
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26211
|
+
});
|
|
26212
|
+
});
|
|
26213
|
+
}
|
|
26214
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26215
|
+
useEffect(function () {
|
|
26216
|
+
var updateBBox = function updateBBox() {
|
|
26217
|
+
if (dismissed) {
|
|
26218
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26219
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26220
|
+
setDismissed(false);
|
|
26221
|
+
}
|
|
26222
|
+
} else {
|
|
26223
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26224
|
+
}
|
|
26225
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26226
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26227
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26228
|
+
setBoxWidth(box.width);
|
|
26229
|
+
setBoxHeight(box.height);
|
|
26230
|
+
}
|
|
26231
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26232
|
+
setBoxWidth(-1);
|
|
26233
|
+
setBoxHeight(-1);
|
|
26234
|
+
}
|
|
26235
|
+
};
|
|
26236
|
+
updateBBox();
|
|
26237
|
+
return function () {
|
|
26238
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26239
|
+
};
|
|
26240
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26241
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26242
|
+
var key = _ref.key,
|
|
26243
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26244
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26245
|
+
if (position && isNumber(position[key])) {
|
|
26246
|
+
return position[key];
|
|
26247
|
+
}
|
|
26248
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26249
|
+
var positive = coordinate[key] + offset;
|
|
26250
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26251
|
+
return reverseDirection[key] ? negative : positive;
|
|
26252
|
+
}
|
|
26253
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26254
|
+
var _tooltipBoundary = negative;
|
|
26255
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26256
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26257
|
+
return Math.max(positive, viewBox[key]);
|
|
26258
|
+
}
|
|
26259
|
+
return Math.max(negative, viewBox[key]);
|
|
26260
|
+
}
|
|
26261
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26262
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26263
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26264
|
+
return Math.max(negative, viewBox[key]);
|
|
26265
|
+
}
|
|
26266
|
+
return Math.max(positive, viewBox[key]);
|
|
26267
|
+
};
|
|
26268
|
+
var payload = props.payload,
|
|
26269
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26270
|
+
filterNull = props.filterNull,
|
|
26271
|
+
active = props.active,
|
|
26272
|
+
wrapperStyle = props.wrapperStyle,
|
|
26273
|
+
useTranslate3d = props.useTranslate3d,
|
|
26274
|
+
isAnimationActive = props.isAnimationActive,
|
|
26275
|
+
animationDuration = props.animationDuration,
|
|
26276
|
+
animationEasing = props.animationEasing;
|
|
26277
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26278
|
+
return !isNil_1(entry.value);
|
|
26279
|
+
}) : payload);
|
|
26280
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26281
|
+
var content = props.content;
|
|
26282
|
+
var outerStyle = _objectSpread$i({
|
|
26283
|
+
pointerEvents: 'none',
|
|
26284
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26285
|
+
position: 'absolute',
|
|
26286
|
+
top: 0,
|
|
26287
|
+
left: 0
|
|
26288
|
+
}, wrapperStyle);
|
|
26289
|
+
var translateX, translateY;
|
|
26290
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26291
|
+
translateX = position.x;
|
|
26292
|
+
translateY = position.y;
|
|
26293
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26294
|
+
translateX = getTranslate({
|
|
26295
|
+
key: 'x',
|
|
26296
|
+
tooltipDimension: boxWidth,
|
|
26297
|
+
viewBoxDimension: viewBox.width
|
|
26298
|
+
});
|
|
26299
|
+
translateY = getTranslate({
|
|
26300
|
+
key: 'y',
|
|
26301
|
+
tooltipDimension: boxHeight,
|
|
26302
|
+
viewBoxDimension: viewBox.height
|
|
26303
|
+
});
|
|
26304
|
+
} else {
|
|
26305
|
+
outerStyle.visibility = 'hidden';
|
|
26306
|
+
}
|
|
26307
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26308
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26309
|
+
})), outerStyle);
|
|
26310
|
+
if (isAnimationActive && active) {
|
|
26311
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26312
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26313
|
+
})), outerStyle);
|
|
26314
|
+
}
|
|
26315
|
+
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));
|
|
26316
|
+
return (
|
|
26317
|
+
/*#__PURE__*/
|
|
26318
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26319
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26320
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26321
|
+
React__default.createElement("div", {
|
|
26322
|
+
tabIndex: -1,
|
|
26323
|
+
role: "dialog",
|
|
26324
|
+
className: cls,
|
|
26325
|
+
style: outerStyle,
|
|
26326
|
+
ref: wrapperNode
|
|
26327
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26328
|
+
payload: finalPayload
|
|
26329
|
+
})))
|
|
26330
|
+
);
|
|
26331
|
+
};
|
|
26332
|
+
|
|
26333
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26334
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26335
|
+
|
|
26336
|
+
/**
|
|
26337
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26338
|
+
* children.props when there are no props set by the consumer
|
|
26339
|
+
* doesn't work if using default parameters
|
|
26340
|
+
*/
|
|
26341
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26388
26342
|
|
|
26389
26343
|
var root = _root;
|
|
26390
26344
|
|
|
@@ -31954,12 +31908,12 @@ module.exports = exports['default'];
|
|
|
31954
31908
|
|
|
31955
31909
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31956
31910
|
|
|
31957
|
-
function _typeof$
|
|
31958
|
-
function ownKeys$
|
|
31959
|
-
function _objectSpread$
|
|
31960
|
-
function _defineProperty$
|
|
31961
|
-
function _toPropertyKey$
|
|
31962
|
-
function _toPrimitive$
|
|
31911
|
+
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); }
|
|
31912
|
+
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; }
|
|
31913
|
+
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; }
|
|
31914
|
+
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; }
|
|
31915
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31916
|
+
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); }
|
|
31963
31917
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31964
31918
|
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."); }
|
|
31965
31919
|
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); }
|
|
@@ -32027,7 +31981,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
32027
31981
|
}
|
|
32028
31982
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
32029
31983
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
32030
|
-
var measurementSpanStyle = _objectSpread$
|
|
31984
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
32031
31985
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
32032
31986
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
32033
31987
|
return styleKey;
|
|
@@ -32082,11 +32036,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32082
32036
|
};
|
|
32083
32037
|
};
|
|
32084
32038
|
|
|
32085
|
-
var _excluded$
|
|
32086
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32039
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
32087
32040
|
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); }
|
|
32088
|
-
function _objectWithoutProperties$
|
|
32089
|
-
function _objectWithoutPropertiesLoose$
|
|
32041
|
+
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; }
|
|
32042
|
+
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; }
|
|
32090
32043
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32091
32044
|
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."); }
|
|
32092
32045
|
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); }
|
|
@@ -32240,46 +32193,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32240
32193
|
}
|
|
32241
32194
|
return getWordsWithoutCalculate(children);
|
|
32242
32195
|
};
|
|
32243
|
-
var
|
|
32244
|
-
|
|
32245
|
-
|
|
32246
|
-
|
|
32247
|
-
|
|
32248
|
-
|
|
32249
|
-
|
|
32250
|
-
|
|
32251
|
-
|
|
32252
|
-
|
|
32253
|
-
|
|
32254
|
-
|
|
32255
|
-
|
|
32256
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32257
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32258
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32259
|
-
_ref5$fill = _ref5.fill,
|
|
32260
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32261
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32196
|
+
var textDefaultProps = {
|
|
32197
|
+
x: 0,
|
|
32198
|
+
y: 0,
|
|
32199
|
+
lineHeight: '1em',
|
|
32200
|
+
capHeight: '0.71em',
|
|
32201
|
+
// Magic number from d3
|
|
32202
|
+
scaleToFit: false,
|
|
32203
|
+
textAnchor: 'start',
|
|
32204
|
+
verticalAnchor: 'end',
|
|
32205
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32206
|
+
fill: '#808080'
|
|
32207
|
+
};
|
|
32208
|
+
var Text = function Text(props) {
|
|
32262
32209
|
var wordsByLines = useMemo(function () {
|
|
32263
32210
|
return getWordsByLines({
|
|
32264
32211
|
breakAll: props.breakAll,
|
|
32265
32212
|
children: props.children,
|
|
32266
32213
|
maxLines: props.maxLines,
|
|
32267
|
-
scaleToFit: scaleToFit,
|
|
32214
|
+
scaleToFit: props.scaleToFit,
|
|
32268
32215
|
style: props.style,
|
|
32269
32216
|
width: props.width
|
|
32270
32217
|
});
|
|
32271
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32218
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32272
32219
|
var dx = props.dx,
|
|
32273
32220
|
dy = props.dy,
|
|
32221
|
+
textAnchor = props.textAnchor,
|
|
32222
|
+
verticalAnchor = props.verticalAnchor,
|
|
32223
|
+
scaleToFit = props.scaleToFit,
|
|
32274
32224
|
angle = props.angle,
|
|
32225
|
+
lineHeight = props.lineHeight,
|
|
32226
|
+
capHeight = props.capHeight,
|
|
32275
32227
|
className = props.className,
|
|
32276
32228
|
breakAll = props.breakAll,
|
|
32277
|
-
textProps = _objectWithoutProperties$
|
|
32278
|
-
if (!isNumOrStr(
|
|
32229
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32230
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32279
32231
|
return null;
|
|
32280
32232
|
}
|
|
32281
|
-
var x =
|
|
32282
|
-
var y =
|
|
32233
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32234
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32283
32235
|
var startDy;
|
|
32284
32236
|
switch (verticalAnchor) {
|
|
32285
32237
|
case 'start':
|
|
@@ -32309,7 +32261,7 @@ var Text = function Text(_ref5) {
|
|
|
32309
32261
|
y: y,
|
|
32310
32262
|
className: classNames('recharts-text', className),
|
|
32311
32263
|
textAnchor: textAnchor,
|
|
32312
|
-
fill: fill.includes('url') ?
|
|
32264
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32313
32265
|
}), wordsByLines.map(function (line, index) {
|
|
32314
32266
|
return (
|
|
32315
32267
|
/*#__PURE__*/
|
|
@@ -32322,6 +32274,7 @@ var Text = function Text(_ref5) {
|
|
|
32322
32274
|
);
|
|
32323
32275
|
}));
|
|
32324
32276
|
};
|
|
32277
|
+
Text.defaultProps = textDefaultProps;
|
|
32325
32278
|
|
|
32326
32279
|
var baseIsEqual = _baseIsEqual;
|
|
32327
32280
|
|
|
@@ -38589,7 +38542,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38589
38542
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38590
38543
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38591
38544
|
|
|
38592
|
-
var _excluded$
|
|
38545
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38593
38546
|
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); }
|
|
38594
38547
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38595
38548
|
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."); }
|
|
@@ -38597,8 +38550,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38597
38550
|
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; }
|
|
38598
38551
|
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; } }
|
|
38599
38552
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38600
|
-
function _objectWithoutProperties$
|
|
38601
|
-
function _objectWithoutPropertiesLoose$
|
|
38553
|
+
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; }
|
|
38554
|
+
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; }
|
|
38602
38555
|
function ErrorBar(props) {
|
|
38603
38556
|
var offset = props.offset,
|
|
38604
38557
|
layout = props.layout,
|
|
@@ -38608,7 +38561,7 @@ function ErrorBar(props) {
|
|
|
38608
38561
|
dataPointFormatter = props.dataPointFormatter,
|
|
38609
38562
|
xAxis = props.xAxis,
|
|
38610
38563
|
yAxis = props.yAxis,
|
|
38611
|
-
others = _objectWithoutProperties$
|
|
38564
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38612
38565
|
var svgProps = filterProps(others);
|
|
38613
38566
|
var errorBars = data.map(function (entry, i) {
|
|
38614
38567
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38719,18 +38672,18 @@ ErrorBar.defaultProps = {
|
|
|
38719
38672
|
};
|
|
38720
38673
|
ErrorBar.displayName = 'ErrorBar';
|
|
38721
38674
|
|
|
38722
|
-
function _typeof$
|
|
38675
|
+
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); }
|
|
38723
38676
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38724
38677
|
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."); }
|
|
38725
38678
|
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); }
|
|
38726
38679
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38727
38680
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38728
38681
|
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; }
|
|
38729
|
-
function ownKeys$
|
|
38730
|
-
function _objectSpread$
|
|
38731
|
-
function _defineProperty$
|
|
38732
|
-
function _toPropertyKey$
|
|
38733
|
-
function _toPrimitive$
|
|
38682
|
+
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; }
|
|
38683
|
+
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; }
|
|
38684
|
+
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; }
|
|
38685
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38686
|
+
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); }
|
|
38734
38687
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38735
38688
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38736
38689
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38901,7 +38854,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38901
38854
|
};
|
|
38902
38855
|
});
|
|
38903
38856
|
}
|
|
38904
|
-
return _objectSpread$
|
|
38857
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38905
38858
|
payload: legendData,
|
|
38906
38859
|
item: legendItem
|
|
38907
38860
|
});
|
|
@@ -39055,10 +39008,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39055
39008
|
verticalAlign = legendProps.verticalAlign,
|
|
39056
39009
|
layout = legendProps.layout;
|
|
39057
39010
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39058
|
-
newOffset = _objectSpread$
|
|
39011
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
39059
39012
|
}
|
|
39060
39013
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39061
|
-
newOffset = _objectSpread$
|
|
39014
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39062
39015
|
}
|
|
39063
39016
|
}
|
|
39064
39017
|
return newOffset;
|
|
@@ -39484,14 +39437,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39484
39437
|
items: [item]
|
|
39485
39438
|
};
|
|
39486
39439
|
}
|
|
39487
|
-
return _objectSpread$
|
|
39440
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39488
39441
|
}, {});
|
|
39489
39442
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39490
39443
|
var group = stackGroups[axisId];
|
|
39491
39444
|
if (group.hasStack) {
|
|
39492
39445
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39493
39446
|
var g = group.stackGroups[stackId];
|
|
39494
|
-
return _objectSpread$
|
|
39447
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39495
39448
|
numericAxisId: numericAxisId,
|
|
39496
39449
|
cateAxisId: cateAxisId,
|
|
39497
39450
|
items: g.items,
|
|
@@ -39499,7 +39452,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39499
39452
|
}));
|
|
39500
39453
|
}, {});
|
|
39501
39454
|
}
|
|
39502
|
-
return _objectSpread$
|
|
39455
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39503
39456
|
}, {});
|
|
39504
39457
|
};
|
|
39505
39458
|
|
|
@@ -39713,7 +39666,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39713
39666
|
formatter = _graphicalItem$props.formatter,
|
|
39714
39667
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39715
39668
|
chartType = _graphicalItem$props.chartType;
|
|
39716
|
-
return _objectSpread$
|
|
39669
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39717
39670
|
dataKey: dataKey,
|
|
39718
39671
|
unit: unit,
|
|
39719
39672
|
formatter: formatter,
|
|
@@ -39726,12 +39679,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39726
39679
|
});
|
|
39727
39680
|
};
|
|
39728
39681
|
|
|
39729
|
-
function _typeof$
|
|
39730
|
-
function ownKeys$
|
|
39731
|
-
function _objectSpread$
|
|
39732
|
-
function _defineProperty$
|
|
39733
|
-
function _toPropertyKey$
|
|
39734
|
-
function _toPrimitive$
|
|
39682
|
+
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); }
|
|
39683
|
+
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; }
|
|
39684
|
+
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; }
|
|
39685
|
+
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; }
|
|
39686
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39687
|
+
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); }
|
|
39735
39688
|
var RADIAN = Math.PI / 180;
|
|
39736
39689
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39737
39690
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39836,7 +39789,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39836
39789
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39837
39790
|
}
|
|
39838
39791
|
if (inRange) {
|
|
39839
|
-
return _objectSpread$
|
|
39792
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39840
39793
|
radius: radius,
|
|
39841
39794
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39842
39795
|
});
|
|
@@ -39844,21 +39797,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39844
39797
|
return null;
|
|
39845
39798
|
};
|
|
39846
39799
|
|
|
39847
|
-
function _typeof$
|
|
39848
|
-
var _excluded$7 = ["offset"];
|
|
39800
|
+
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); }
|
|
39849
39801
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39850
39802
|
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."); }
|
|
39851
39803
|
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); }
|
|
39852
39804
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39853
39805
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39854
39806
|
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; }
|
|
39855
|
-
function
|
|
39856
|
-
function
|
|
39857
|
-
function
|
|
39858
|
-
function
|
|
39859
|
-
function
|
|
39860
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39861
|
-
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); }
|
|
39807
|
+
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; }
|
|
39808
|
+
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; }
|
|
39809
|
+
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; }
|
|
39810
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39811
|
+
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); }
|
|
39862
39812
|
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); }
|
|
39863
39813
|
var getLabel = function getLabel(props) {
|
|
39864
39814
|
var value = props.value,
|
|
@@ -40003,7 +39953,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40003
39953
|
textAnchor: 'middle',
|
|
40004
39954
|
verticalAnchor: verticalEnd
|
|
40005
39955
|
};
|
|
40006
|
-
return _objectSpread$
|
|
39956
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
40007
39957
|
height: Math.max(y - parentViewBox.y, 0),
|
|
40008
39958
|
width: width
|
|
40009
39959
|
} : {});
|
|
@@ -40015,7 +39965,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40015
39965
|
textAnchor: 'middle',
|
|
40016
39966
|
verticalAnchor: verticalStart
|
|
40017
39967
|
};
|
|
40018
|
-
return _objectSpread$
|
|
39968
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
40019
39969
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
40020
39970
|
width: width
|
|
40021
39971
|
} : {});
|
|
@@ -40027,7 +39977,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40027
39977
|
textAnchor: horizontalEnd,
|
|
40028
39978
|
verticalAnchor: 'middle'
|
|
40029
39979
|
};
|
|
40030
|
-
return _objectSpread$
|
|
39980
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
40031
39981
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
40032
39982
|
height: height
|
|
40033
39983
|
} : {});
|
|
@@ -40039,7 +39989,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40039
39989
|
textAnchor: horizontalStart,
|
|
40040
39990
|
verticalAnchor: 'middle'
|
|
40041
39991
|
};
|
|
40042
|
-
return _objectSpread$
|
|
39992
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
40043
39993
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
40044
39994
|
height: height
|
|
40045
39995
|
} : {});
|
|
@@ -40049,7 +39999,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40049
39999
|
height: height
|
|
40050
40000
|
} : {};
|
|
40051
40001
|
if (position === 'insideLeft') {
|
|
40052
|
-
return _objectSpread$
|
|
40002
|
+
return _objectSpread$e({
|
|
40053
40003
|
x: x + horizontalOffset,
|
|
40054
40004
|
y: y + height / 2,
|
|
40055
40005
|
textAnchor: horizontalStart,
|
|
@@ -40057,7 +40007,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40057
40007
|
}, sizeAttrs);
|
|
40058
40008
|
}
|
|
40059
40009
|
if (position === 'insideRight') {
|
|
40060
|
-
return _objectSpread$
|
|
40010
|
+
return _objectSpread$e({
|
|
40061
40011
|
x: x + width - horizontalOffset,
|
|
40062
40012
|
y: y + height / 2,
|
|
40063
40013
|
textAnchor: horizontalEnd,
|
|
@@ -40065,7 +40015,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40065
40015
|
}, sizeAttrs);
|
|
40066
40016
|
}
|
|
40067
40017
|
if (position === 'insideTop') {
|
|
40068
|
-
return _objectSpread$
|
|
40018
|
+
return _objectSpread$e({
|
|
40069
40019
|
x: x + width / 2,
|
|
40070
40020
|
y: y + verticalOffset,
|
|
40071
40021
|
textAnchor: 'middle',
|
|
@@ -40073,7 +40023,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40073
40023
|
}, sizeAttrs);
|
|
40074
40024
|
}
|
|
40075
40025
|
if (position === 'insideBottom') {
|
|
40076
|
-
return _objectSpread$
|
|
40026
|
+
return _objectSpread$e({
|
|
40077
40027
|
x: x + width / 2,
|
|
40078
40028
|
y: y + height - verticalOffset,
|
|
40079
40029
|
textAnchor: 'middle',
|
|
@@ -40081,7 +40031,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40081
40031
|
}, sizeAttrs);
|
|
40082
40032
|
}
|
|
40083
40033
|
if (position === 'insideTopLeft') {
|
|
40084
|
-
return _objectSpread$
|
|
40034
|
+
return _objectSpread$e({
|
|
40085
40035
|
x: x + horizontalOffset,
|
|
40086
40036
|
y: y + verticalOffset,
|
|
40087
40037
|
textAnchor: horizontalStart,
|
|
@@ -40089,7 +40039,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40089
40039
|
}, sizeAttrs);
|
|
40090
40040
|
}
|
|
40091
40041
|
if (position === 'insideTopRight') {
|
|
40092
|
-
return _objectSpread$
|
|
40042
|
+
return _objectSpread$e({
|
|
40093
40043
|
x: x + width - horizontalOffset,
|
|
40094
40044
|
y: y + verticalOffset,
|
|
40095
40045
|
textAnchor: horizontalEnd,
|
|
@@ -40097,7 +40047,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40097
40047
|
}, sizeAttrs);
|
|
40098
40048
|
}
|
|
40099
40049
|
if (position === 'insideBottomLeft') {
|
|
40100
|
-
return _objectSpread$
|
|
40050
|
+
return _objectSpread$e({
|
|
40101
40051
|
x: x + horizontalOffset,
|
|
40102
40052
|
y: y + height - verticalOffset,
|
|
40103
40053
|
textAnchor: horizontalStart,
|
|
@@ -40105,7 +40055,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40105
40055
|
}, sizeAttrs);
|
|
40106
40056
|
}
|
|
40107
40057
|
if (position === 'insideBottomRight') {
|
|
40108
|
-
return _objectSpread$
|
|
40058
|
+
return _objectSpread$e({
|
|
40109
40059
|
x: x + width - horizontalOffset,
|
|
40110
40060
|
y: y + height - verticalOffset,
|
|
40111
40061
|
textAnchor: horizontalEnd,
|
|
@@ -40113,14 +40063,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40113
40063
|
}, sizeAttrs);
|
|
40114
40064
|
}
|
|
40115
40065
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40116
|
-
return _objectSpread$
|
|
40066
|
+
return _objectSpread$e({
|
|
40117
40067
|
x: x + getPercentValue(position.x, width),
|
|
40118
40068
|
y: y + getPercentValue(position.y, height),
|
|
40119
40069
|
textAnchor: 'end',
|
|
40120
40070
|
verticalAnchor: 'end'
|
|
40121
40071
|
}, sizeAttrs);
|
|
40122
40072
|
}
|
|
40123
|
-
return _objectSpread$
|
|
40073
|
+
return _objectSpread$e({
|
|
40124
40074
|
x: x + width / 2,
|
|
40125
40075
|
y: y + height / 2,
|
|
40126
40076
|
textAnchor: 'middle',
|
|
@@ -40130,13 +40080,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40130
40080
|
var isPolar = function isPolar(viewBox) {
|
|
40131
40081
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40132
40082
|
};
|
|
40133
|
-
function Label$3(
|
|
40134
|
-
var _ref4$offset = _ref4.offset,
|
|
40135
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40136
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40137
|
-
var props = _objectSpread$h({
|
|
40138
|
-
offset: offset
|
|
40139
|
-
}, restProps);
|
|
40083
|
+
function Label$3(props) {
|
|
40140
40084
|
var viewBox = props.viewBox,
|
|
40141
40085
|
position = props.position,
|
|
40142
40086
|
value = props.value,
|
|
@@ -40173,6 +40117,9 @@ function Label$3(_ref4) {
|
|
|
40173
40117
|
}), label);
|
|
40174
40118
|
}
|
|
40175
40119
|
Label$3.displayName = 'Label';
|
|
40120
|
+
Label$3.defaultProps = {
|
|
40121
|
+
offset: 5
|
|
40122
|
+
};
|
|
40176
40123
|
var parseViewBox = function parseViewBox(props) {
|
|
40177
40124
|
var cx = props.cx,
|
|
40178
40125
|
cy = props.cy,
|
|
@@ -40327,9 +40274,8 @@ function last(array) {
|
|
|
40327
40274
|
|
|
40328
40275
|
var last_1 = last;
|
|
40329
40276
|
|
|
40330
|
-
function _typeof$
|
|
40331
|
-
var _excluded$
|
|
40332
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40277
|
+
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); }
|
|
40278
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40333
40279
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40334
40280
|
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."); }
|
|
40335
40281
|
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); }
|
|
@@ -40337,26 +40283,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40337
40283
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40338
40284
|
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; }
|
|
40339
40285
|
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); }
|
|
40340
|
-
function ownKeys$
|
|
40341
|
-
function _objectSpread$
|
|
40342
|
-
function _defineProperty$
|
|
40343
|
-
function _toPropertyKey$
|
|
40344
|
-
function _toPrimitive$
|
|
40345
|
-
function _objectWithoutProperties$
|
|
40346
|
-
function _objectWithoutPropertiesLoose$
|
|
40347
|
-
var
|
|
40348
|
-
|
|
40349
|
-
|
|
40350
|
-
|
|
40351
|
-
|
|
40352
|
-
|
|
40353
|
-
|
|
40354
|
-
|
|
40355
|
-
dataKey =
|
|
40356
|
-
clockWise =
|
|
40357
|
-
id =
|
|
40358
|
-
textBreakAll =
|
|
40359
|
-
others = _objectWithoutProperties$
|
|
40286
|
+
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; }
|
|
40287
|
+
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; }
|
|
40288
|
+
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; }
|
|
40289
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40290
|
+
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); }
|
|
40291
|
+
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; }
|
|
40292
|
+
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; }
|
|
40293
|
+
var defaultProps = {
|
|
40294
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40295
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40296
|
+
}
|
|
40297
|
+
};
|
|
40298
|
+
function LabelList(props) {
|
|
40299
|
+
var data = props.data,
|
|
40300
|
+
valueAccessor = props.valueAccessor,
|
|
40301
|
+
dataKey = props.dataKey,
|
|
40302
|
+
clockWise = props.clockWise,
|
|
40303
|
+
id = props.id,
|
|
40304
|
+
textBreakAll = props.textBreakAll,
|
|
40305
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40360
40306
|
if (!data || !data.length) {
|
|
40361
40307
|
return null;
|
|
40362
40308
|
}
|
|
@@ -40372,7 +40318,7 @@ function LabelList(_ref) {
|
|
|
40372
40318
|
index: index,
|
|
40373
40319
|
value: value,
|
|
40374
40320
|
textBreakAll: textBreakAll,
|
|
40375
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40321
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40376
40322
|
clockWise: clockWise
|
|
40377
40323
|
})),
|
|
40378
40324
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40427,14 +40373,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40427
40373
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40428
40374
|
}
|
|
40429
40375
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40376
|
+
LabelList.defaultProps = defaultProps;
|
|
40430
40377
|
|
|
40431
|
-
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); }
|
|
40432
40378
|
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); }
|
|
40433
|
-
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; }
|
|
40434
|
-
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; }
|
|
40435
|
-
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; }
|
|
40436
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40437
|
-
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); }
|
|
40438
40379
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40439
40380
|
var sign = mathSign(endAngle - startAngle);
|
|
40440
40381
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40575,19 +40516,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40575
40516
|
}
|
|
40576
40517
|
return path;
|
|
40577
40518
|
};
|
|
40578
|
-
var
|
|
40579
|
-
cx: 0,
|
|
40580
|
-
cy: 0,
|
|
40581
|
-
innerRadius: 0,
|
|
40582
|
-
outerRadius: 0,
|
|
40583
|
-
startAngle: 0,
|
|
40584
|
-
endAngle: 0,
|
|
40585
|
-
cornerRadius: 0,
|
|
40586
|
-
forceCornerRadius: false,
|
|
40587
|
-
cornerIsExternal: false
|
|
40588
|
-
};
|
|
40589
|
-
var Sector = function Sector(sectorProps) {
|
|
40590
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40519
|
+
var Sector = function Sector(props) {
|
|
40591
40520
|
var cx = props.cx,
|
|
40592
40521
|
cy = props.cy,
|
|
40593
40522
|
innerRadius = props.innerRadius,
|
|
@@ -40633,14 +40562,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40633
40562
|
role: "img"
|
|
40634
40563
|
}));
|
|
40635
40564
|
};
|
|
40565
|
+
Sector.defaultProps = {
|
|
40566
|
+
cx: 0,
|
|
40567
|
+
cy: 0,
|
|
40568
|
+
innerRadius: 0,
|
|
40569
|
+
outerRadius: 0,
|
|
40570
|
+
startAngle: 0,
|
|
40571
|
+
endAngle: 0,
|
|
40572
|
+
cornerRadius: 0,
|
|
40573
|
+
forceCornerRadius: false,
|
|
40574
|
+
cornerIsExternal: false
|
|
40575
|
+
};
|
|
40636
40576
|
|
|
40637
|
-
function _typeof$
|
|
40577
|
+
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); }
|
|
40638
40578
|
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); }
|
|
40639
|
-
function ownKeys$
|
|
40640
|
-
function _objectSpread$
|
|
40641
|
-
function _defineProperty$
|
|
40642
|
-
function _toPropertyKey$
|
|
40643
|
-
function _toPrimitive$
|
|
40579
|
+
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; }
|
|
40580
|
+
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; }
|
|
40581
|
+
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; }
|
|
40582
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40583
|
+
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); }
|
|
40644
40584
|
var CURVE_FACTORIES = {
|
|
40645
40585
|
curveBasisClosed: curveBasisClosed,
|
|
40646
40586
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40680,14 +40620,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40680
40620
|
* @return {String} path
|
|
40681
40621
|
*/
|
|
40682
40622
|
var getPath$1 = function getPath(_ref) {
|
|
40683
|
-
var
|
|
40684
|
-
|
|
40685
|
-
_ref$points = _ref.points,
|
|
40686
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40623
|
+
var type = _ref.type,
|
|
40624
|
+
points = _ref.points,
|
|
40687
40625
|
baseLine = _ref.baseLine,
|
|
40688
40626
|
layout = _ref.layout,
|
|
40689
|
-
|
|
40690
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40627
|
+
connectNulls = _ref.connectNulls;
|
|
40691
40628
|
var curveFactory = getCurveFactory(type, layout);
|
|
40692
40629
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40693
40630
|
return defined(entry);
|
|
@@ -40698,7 +40635,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40698
40635
|
return defined(base);
|
|
40699
40636
|
}) : baseLine;
|
|
40700
40637
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40701
|
-
return _objectSpread$
|
|
40638
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40702
40639
|
base: formatBaseLine[index]
|
|
40703
40640
|
});
|
|
40704
40641
|
});
|
|
@@ -40739,8 +40676,12 @@ var Curve = function Curve(props) {
|
|
|
40739
40676
|
ref: pathRef
|
|
40740
40677
|
}));
|
|
40741
40678
|
};
|
|
40679
|
+
Curve.defaultProps = {
|
|
40680
|
+
type: 'linear',
|
|
40681
|
+
points: [],
|
|
40682
|
+
connectNulls: false
|
|
40683
|
+
};
|
|
40742
40684
|
|
|
40743
|
-
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); }
|
|
40744
40685
|
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); }
|
|
40745
40686
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40746
40687
|
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."); }
|
|
@@ -40748,11 +40689,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40748
40689
|
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; }
|
|
40749
40690
|
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; } }
|
|
40750
40691
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40751
|
-
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; }
|
|
40752
|
-
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; }
|
|
40753
|
-
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; }
|
|
40754
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40755
|
-
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); }
|
|
40756
40692
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40757
40693
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40758
40694
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40808,29 +40744,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40808
40744
|
}
|
|
40809
40745
|
return false;
|
|
40810
40746
|
};
|
|
40811
|
-
var
|
|
40812
|
-
x: 0,
|
|
40813
|
-
y: 0,
|
|
40814
|
-
width: 0,
|
|
40815
|
-
height: 0,
|
|
40816
|
-
// The radius of border
|
|
40817
|
-
// The radius of four corners when radius is a number
|
|
40818
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40819
|
-
radius: 0,
|
|
40820
|
-
isAnimationActive: false,
|
|
40821
|
-
isUpdateAnimationActive: false,
|
|
40822
|
-
animationBegin: 0,
|
|
40823
|
-
animationDuration: 1500,
|
|
40824
|
-
animationEasing: 'ease'
|
|
40825
|
-
};
|
|
40826
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40827
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40747
|
+
var Rectangle = function Rectangle(props) {
|
|
40828
40748
|
var pathRef = useRef();
|
|
40829
40749
|
var _useState = useState(-1),
|
|
40830
40750
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40831
40751
|
totalLength = _useState2[0],
|
|
40832
40752
|
setTotalLength = _useState2[1];
|
|
40833
|
-
|
|
40753
|
+
useLayoutEffect(function () {
|
|
40834
40754
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40835
40755
|
try {
|
|
40836
40756
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40901,6 +40821,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40901
40821
|
})));
|
|
40902
40822
|
});
|
|
40903
40823
|
};
|
|
40824
|
+
Rectangle.defaultProps = {
|
|
40825
|
+
x: 0,
|
|
40826
|
+
y: 0,
|
|
40827
|
+
width: 0,
|
|
40828
|
+
height: 0,
|
|
40829
|
+
// The radius of border
|
|
40830
|
+
// The radius of four corners when radius is a number
|
|
40831
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40832
|
+
radius: 0,
|
|
40833
|
+
isAnimationActive: false,
|
|
40834
|
+
isUpdateAnimationActive: false,
|
|
40835
|
+
animationBegin: 0,
|
|
40836
|
+
animationDuration: 1500,
|
|
40837
|
+
animationEasing: 'ease'
|
|
40838
|
+
};
|
|
40904
40839
|
|
|
40905
40840
|
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); }
|
|
40906
40841
|
var Dot$1 = function Dot(props) {
|
|
@@ -40920,42 +40855,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40920
40855
|
return null;
|
|
40921
40856
|
};
|
|
40922
40857
|
|
|
40923
|
-
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); }
|
|
40924
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40925
40858
|
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); }
|
|
40926
|
-
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; }
|
|
40927
|
-
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; }
|
|
40928
|
-
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; }
|
|
40929
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40930
|
-
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); }
|
|
40931
|
-
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; }
|
|
40932
|
-
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; }
|
|
40933
40859
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40934
40860
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40935
40861
|
};
|
|
40936
|
-
var Cross = function Cross(
|
|
40937
|
-
var
|
|
40938
|
-
|
|
40939
|
-
|
|
40940
|
-
|
|
40941
|
-
|
|
40942
|
-
|
|
40943
|
-
|
|
40944
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40945
|
-
_ref$width = _ref.width,
|
|
40946
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40947
|
-
_ref$height = _ref.height,
|
|
40948
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40949
|
-
className = _ref.className,
|
|
40950
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40951
|
-
var props = _objectSpread$c({
|
|
40952
|
-
x: x,
|
|
40953
|
-
y: y,
|
|
40954
|
-
top: top,
|
|
40955
|
-
left: left,
|
|
40956
|
-
width: width,
|
|
40957
|
-
height: height
|
|
40958
|
-
}, rest);
|
|
40862
|
+
var Cross = function Cross(props) {
|
|
40863
|
+
var x = props.x,
|
|
40864
|
+
y = props.y,
|
|
40865
|
+
width = props.width,
|
|
40866
|
+
height = props.height,
|
|
40867
|
+
top = props.top,
|
|
40868
|
+
left = props.left,
|
|
40869
|
+
className = props.className;
|
|
40959
40870
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40960
40871
|
return null;
|
|
40961
40872
|
}
|
|
@@ -40964,6 +40875,14 @@ var Cross = function Cross(_ref) {
|
|
|
40964
40875
|
d: getPath(x, y, width, height, top, left)
|
|
40965
40876
|
}));
|
|
40966
40877
|
};
|
|
40878
|
+
Cross.defaultProps = {
|
|
40879
|
+
x: 0,
|
|
40880
|
+
y: 0,
|
|
40881
|
+
top: 0,
|
|
40882
|
+
left: 0,
|
|
40883
|
+
width: 0,
|
|
40884
|
+
height: 0
|
|
40885
|
+
};
|
|
40967
40886
|
|
|
40968
40887
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40969
40888
|
|
|
@@ -41173,7 +41092,6 @@ var createScale = function createScale(_ref) {
|
|
|
41173
41092
|
isTextActive: false,
|
|
41174
41093
|
isSlideMoving: false,
|
|
41175
41094
|
isTravellerMoving: false,
|
|
41176
|
-
isTravellerFocused: false,
|
|
41177
41095
|
startX: scale(startIndex),
|
|
41178
41096
|
endX: scale(endIndex),
|
|
41179
41097
|
scale: scale,
|
|
@@ -41387,38 +41305,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41387
41305
|
}
|
|
41388
41306
|
});
|
|
41389
41307
|
}
|
|
41390
|
-
}, {
|
|
41391
|
-
key: "handleTravellerMoveKeyboard",
|
|
41392
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41393
|
-
var _this2 = this;
|
|
41394
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41395
|
-
var _this$state3 = this.state,
|
|
41396
|
-
scaleValues = _this$state3.scaleValues,
|
|
41397
|
-
startX = _this$state3.startX,
|
|
41398
|
-
endX = _this$state3.endX;
|
|
41399
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41400
|
-
var currentScaleValue = this.state[id];
|
|
41401
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41402
|
-
if (currentIndex === -1) {
|
|
41403
|
-
return;
|
|
41404
|
-
}
|
|
41405
|
-
var newIndex = currentIndex + direction;
|
|
41406
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41407
|
-
return;
|
|
41408
|
-
}
|
|
41409
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41410
|
-
|
|
41411
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41412
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41413
|
-
return;
|
|
41414
|
-
}
|
|
41415
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41416
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41417
|
-
startX: _this2.state.startX,
|
|
41418
|
-
endX: _this2.state.endX
|
|
41419
|
-
}));
|
|
41420
|
-
});
|
|
41421
|
-
}
|
|
41422
41308
|
}, {
|
|
41423
41309
|
key: "renderBackground",
|
|
41424
41310
|
value: function renderBackground() {
|
|
@@ -41466,7 +41352,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41466
41352
|
}, {
|
|
41467
41353
|
key: "renderTravellerLayer",
|
|
41468
41354
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41469
|
-
var _this3 = this;
|
|
41470
41355
|
var _this$props7 = this.props,
|
|
41471
41356
|
y = _this$props7.y,
|
|
41472
41357
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41480,31 +41365,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41480
41365
|
height: height
|
|
41481
41366
|
});
|
|
41482
41367
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41483
|
-
tabIndex: 0,
|
|
41484
|
-
role: "slider",
|
|
41485
41368
|
className: "recharts-brush-traveller",
|
|
41486
41369
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41487
41370
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41488
41371
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41489
41372
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41490
|
-
onKeyDown: function onKeyDown(e) {
|
|
41491
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41492
|
-
return;
|
|
41493
|
-
}
|
|
41494
|
-
e.preventDefault();
|
|
41495
|
-
e.stopPropagation();
|
|
41496
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41497
|
-
},
|
|
41498
|
-
onFocus: function onFocus() {
|
|
41499
|
-
_this3.setState({
|
|
41500
|
-
isTravellerFocused: true
|
|
41501
|
-
});
|
|
41502
|
-
},
|
|
41503
|
-
onBlur: function onBlur() {
|
|
41504
|
-
_this3.setState({
|
|
41505
|
-
isTravellerFocused: false
|
|
41506
|
-
});
|
|
41507
|
-
},
|
|
41508
41373
|
style: {
|
|
41509
41374
|
cursor: 'col-resize'
|
|
41510
41375
|
}
|
|
@@ -41548,9 +41413,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41548
41413
|
height = _this$props9.height,
|
|
41549
41414
|
travellerWidth = _this$props9.travellerWidth,
|
|
41550
41415
|
stroke = _this$props9.stroke;
|
|
41551
|
-
var _this$
|
|
41552
|
-
startX = _this$
|
|
41553
|
-
endX = _this$
|
|
41416
|
+
var _this$state3 = this.state,
|
|
41417
|
+
startX = _this$state3.startX,
|
|
41418
|
+
endX = _this$state3.endX;
|
|
41554
41419
|
var offset = 5;
|
|
41555
41420
|
var attrs = {
|
|
41556
41421
|
pointerEvents: 'none',
|
|
@@ -41582,13 +41447,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41582
41447
|
width = _this$props10.width,
|
|
41583
41448
|
height = _this$props10.height,
|
|
41584
41449
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41585
|
-
var _this$
|
|
41586
|
-
startX = _this$
|
|
41587
|
-
endX = _this$
|
|
41588
|
-
isTextActive = _this$
|
|
41589
|
-
isSlideMoving = _this$
|
|
41590
|
-
isTravellerMoving = _this$
|
|
41591
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41450
|
+
var _this$state4 = this.state,
|
|
41451
|
+
startX = _this$state4.startX,
|
|
41452
|
+
endX = _this$state4.endX,
|
|
41453
|
+
isTextActive = _this$state4.isTextActive,
|
|
41454
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41455
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41592
41456
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41593
41457
|
return null;
|
|
41594
41458
|
}
|
|
@@ -41600,7 +41464,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41600
41464
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41601
41465
|
onTouchMove: this.handleTouchMove,
|
|
41602
41466
|
style: style
|
|
41603
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41467
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41604
41468
|
}
|
|
41605
41469
|
}], [{
|
|
41606
41470
|
key: "renderDefaultTraveller",
|
|
@@ -41918,7 +41782,7 @@ function every(collection, predicate, guard) {
|
|
|
41918
41782
|
|
|
41919
41783
|
var every_1 = every;
|
|
41920
41784
|
|
|
41921
|
-
var defineProperty = _defineProperty$
|
|
41785
|
+
var defineProperty = _defineProperty$l;
|
|
41922
41786
|
|
|
41923
41787
|
/**
|
|
41924
41788
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42279,6 +42143,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42279
42143
|
legendType: 'rect',
|
|
42280
42144
|
minPointSize: 0,
|
|
42281
42145
|
hide: false,
|
|
42146
|
+
// data of bar
|
|
42282
42147
|
data: [],
|
|
42283
42148
|
layout: 'vertical',
|
|
42284
42149
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45191,11 +45056,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45191
45056
|
}
|
|
45192
45057
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45193
45058
|
x = _this$container$getBo.x,
|
|
45194
|
-
y = _this$container$getBo.y
|
|
45195
|
-
height = _this$container$getBo.height;
|
|
45059
|
+
y = _this$container$getBo.y;
|
|
45196
45060
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45197
45061
|
var pageX = x + coordinate;
|
|
45198
|
-
var pageY = y + this.offset.top
|
|
45062
|
+
var pageY = y + this.offset.top;
|
|
45199
45063
|
this.mouseHandlerCallback({
|
|
45200
45064
|
pageX: pageX,
|
|
45201
45065
|
pageY: pageY
|