@typeolymp/ui-components 1.18.1 → 1.18.2
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/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/stories.d.ts +36 -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
|
@@ -4489,7 +4489,7 @@ function requiredArgs(required, args) {
|
|
|
4489
4489
|
}
|
|
4490
4490
|
}
|
|
4491
4491
|
|
|
4492
|
-
function _typeof$
|
|
4492
|
+
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); }
|
|
4493
4493
|
/**
|
|
4494
4494
|
* @name toDate
|
|
4495
4495
|
* @category Common Helpers
|
|
@@ -4525,7 +4525,7 @@ function toDate(argument) {
|
|
|
4525
4525
|
requiredArgs(1, arguments);
|
|
4526
4526
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4527
4527
|
|
|
4528
|
-
if (argument instanceof Date || _typeof$
|
|
4528
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4529
4529
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4530
4530
|
return new Date(argument.getTime());
|
|
4531
4531
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4796,7 +4796,7 @@ var millisecondsInMinute = 60000;
|
|
|
4796
4796
|
|
|
4797
4797
|
var millisecondsInHour = 3600000;
|
|
4798
4798
|
|
|
4799
|
-
function _typeof$
|
|
4799
|
+
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); }
|
|
4800
4800
|
/**
|
|
4801
4801
|
* @name isDate
|
|
4802
4802
|
* @category Common Helpers
|
|
@@ -4832,7 +4832,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4832
4832
|
|
|
4833
4833
|
function isDate(value) {
|
|
4834
4834
|
requiredArgs(1, arguments);
|
|
4835
|
-
return value instanceof Date || _typeof$
|
|
4835
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4836
4836
|
}
|
|
4837
4837
|
|
|
4838
4838
|
/**
|
|
@@ -13499,15 +13499,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13499
13499
|
|
|
13500
13500
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13501
13501
|
|
|
13502
|
-
function _slicedToArray$
|
|
13503
|
-
return _arrayWithHoles$
|
|
13502
|
+
function _slicedToArray$d(arr, i) {
|
|
13503
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13504
13504
|
}
|
|
13505
13505
|
|
|
13506
|
-
function _arrayWithHoles$
|
|
13506
|
+
function _arrayWithHoles$e(arr) {
|
|
13507
13507
|
if (Array.isArray(arr)) return arr;
|
|
13508
13508
|
}
|
|
13509
13509
|
|
|
13510
|
-
function _iterableToArrayLimit$
|
|
13510
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13511
13511
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13512
13512
|
|
|
13513
13513
|
if (_i == null) return;
|
|
@@ -13537,16 +13537,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13537
13537
|
return _arr;
|
|
13538
13538
|
}
|
|
13539
13539
|
|
|
13540
|
-
function _unsupportedIterableToArray$
|
|
13540
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13541
13541
|
if (!o) return;
|
|
13542
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13542
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13543
13543
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13544
13544
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13545
13545
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13546
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13546
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13547
13547
|
}
|
|
13548
13548
|
|
|
13549
|
-
function _arrayLikeToArray$
|
|
13549
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13550
13550
|
if (len == null || len > arr.length) len = arr.length;
|
|
13551
13551
|
|
|
13552
13552
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13554,7 +13554,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13554
13554
|
return arr2;
|
|
13555
13555
|
}
|
|
13556
13556
|
|
|
13557
|
-
function _nonIterableRest$
|
|
13557
|
+
function _nonIterableRest$e() {
|
|
13558
13558
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13559
13559
|
}
|
|
13560
13560
|
|
|
@@ -13618,7 +13618,7 @@ reservedProps.forEach(function (name) {
|
|
|
13618
13618
|
// This is a mapping from React prop names to the attribute names.
|
|
13619
13619
|
|
|
13620
13620
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13621
|
-
var _ref2 = _slicedToArray$
|
|
13621
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13622
13622
|
name = _ref2[0],
|
|
13623
13623
|
attributeName = _ref2[1];
|
|
13624
13624
|
|
|
@@ -16018,31 +16018,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16018
16018
|
return true;
|
|
16019
16019
|
};
|
|
16020
16020
|
|
|
16021
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16021
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16022
16022
|
|
|
16023
16023
|
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."); }
|
|
16024
16024
|
|
|
16025
16025
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16026
16026
|
|
|
16027
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16027
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16028
16028
|
|
|
16029
|
-
function ownKeys$
|
|
16029
|
+
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; }
|
|
16030
16030
|
|
|
16031
|
-
function _objectSpread$
|
|
16031
|
+
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; }
|
|
16032
16032
|
|
|
16033
|
-
function _defineProperty$
|
|
16033
|
+
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; }
|
|
16034
16034
|
|
|
16035
|
-
function _slicedToArray$
|
|
16035
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16036
16036
|
|
|
16037
|
-
function _nonIterableRest$
|
|
16037
|
+
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."); }
|
|
16038
16038
|
|
|
16039
|
-
function _unsupportedIterableToArray$
|
|
16039
|
+
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); }
|
|
16040
16040
|
|
|
16041
|
-
function _arrayLikeToArray$
|
|
16041
|
+
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; }
|
|
16042
16042
|
|
|
16043
|
-
function _iterableToArrayLimit$
|
|
16043
|
+
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; }
|
|
16044
16044
|
|
|
16045
|
-
function _arrayWithHoles$
|
|
16045
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16046
16046
|
|
|
16047
16047
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16048
16048
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16122,11 +16122,11 @@ function allFilesAccepted(_ref) {
|
|
|
16122
16122
|
|
|
16123
16123
|
return files.every(function (file) {
|
|
16124
16124
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16125
|
-
_fileAccepted2 = _slicedToArray$
|
|
16125
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16126
16126
|
accepted = _fileAccepted2[0];
|
|
16127
16127
|
|
|
16128
16128
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16129
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16129
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16130
16130
|
sizeMatch = _fileMatchSize2[0];
|
|
16131
16131
|
|
|
16132
16132
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16223,7 +16223,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16223
16223
|
function pickerOptionsFromAccept(accept) {
|
|
16224
16224
|
if (isDefined(accept)) {
|
|
16225
16225
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16226
|
-
var _ref3 = _slicedToArray$
|
|
16226
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16227
16227
|
mimeType = _ref3[0],
|
|
16228
16228
|
ext = _ref3[1];
|
|
16229
16229
|
|
|
@@ -16241,11 +16241,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16241
16241
|
|
|
16242
16242
|
return ok;
|
|
16243
16243
|
}).reduce(function (agg, _ref4) {
|
|
16244
|
-
var _ref5 = _slicedToArray$
|
|
16244
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16245
16245
|
mimeType = _ref5[0],
|
|
16246
16246
|
ext = _ref5[1];
|
|
16247
16247
|
|
|
16248
|
-
return _objectSpread$
|
|
16248
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16249
16249
|
}, {});
|
|
16250
16250
|
return [{
|
|
16251
16251
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16265,7 +16265,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16265
16265
|
function acceptPropAsAcceptAttr(accept) {
|
|
16266
16266
|
if (isDefined(accept)) {
|
|
16267
16267
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16268
|
-
var _ref7 = _slicedToArray$
|
|
16268
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16269
16269
|
mimeType = _ref7[0],
|
|
16270
16270
|
ext = _ref7[1];
|
|
16271
16271
|
|
|
@@ -16333,40 +16333,40 @@ function isExt(v) {
|
|
|
16333
16333
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16334
16334
|
*/
|
|
16335
16335
|
|
|
16336
|
-
var _excluded$
|
|
16337
|
-
_excluded2$
|
|
16336
|
+
var _excluded$d = ["children"],
|
|
16337
|
+
_excluded2$3 = ["open"],
|
|
16338
16338
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16339
16339
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16340
16340
|
|
|
16341
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16341
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16342
16342
|
|
|
16343
16343
|
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."); }
|
|
16344
16344
|
|
|
16345
16345
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16346
16346
|
|
|
16347
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16347
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16348
16348
|
|
|
16349
|
-
function _slicedToArray$
|
|
16349
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16350
16350
|
|
|
16351
|
-
function _nonIterableRest$
|
|
16351
|
+
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."); }
|
|
16352
16352
|
|
|
16353
|
-
function _unsupportedIterableToArray$
|
|
16353
|
+
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); }
|
|
16354
16354
|
|
|
16355
|
-
function _arrayLikeToArray$
|
|
16355
|
+
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; }
|
|
16356
16356
|
|
|
16357
|
-
function _iterableToArrayLimit$
|
|
16357
|
+
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; }
|
|
16358
16358
|
|
|
16359
|
-
function _arrayWithHoles$
|
|
16359
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16360
16360
|
|
|
16361
|
-
function ownKeys$
|
|
16361
|
+
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; }
|
|
16362
16362
|
|
|
16363
|
-
function _objectSpread$
|
|
16363
|
+
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; }
|
|
16364
16364
|
|
|
16365
|
-
function _defineProperty$
|
|
16365
|
+
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; }
|
|
16366
16366
|
|
|
16367
|
-
function _objectWithoutProperties$
|
|
16367
|
+
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; }
|
|
16368
16368
|
|
|
16369
|
-
function _objectWithoutPropertiesLoose$
|
|
16369
|
+
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; }
|
|
16370
16370
|
/**
|
|
16371
16371
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16372
16372
|
*
|
|
@@ -16384,11 +16384,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16384
16384
|
|
|
16385
16385
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16386
16386
|
var children = _ref.children,
|
|
16387
|
-
params = _objectWithoutProperties$
|
|
16387
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16388
16388
|
|
|
16389
16389
|
var _useDropzone = useDropzone(params),
|
|
16390
16390
|
open = _useDropzone.open,
|
|
16391
|
-
props = _objectWithoutProperties$
|
|
16391
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16392
16392
|
|
|
16393
16393
|
useImperativeHandle(ref, function () {
|
|
16394
16394
|
return {
|
|
@@ -16396,13 +16396,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16396
16396
|
};
|
|
16397
16397
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16398
16398
|
|
|
16399
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16399
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16400
16400
|
open: open
|
|
16401
16401
|
})));
|
|
16402
16402
|
});
|
|
16403
16403
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16404
16404
|
|
|
16405
|
-
var defaultProps$
|
|
16405
|
+
var defaultProps$1 = {
|
|
16406
16406
|
disabled: false,
|
|
16407
16407
|
getFilesFromEvent: fromEvent,
|
|
16408
16408
|
maxSize: Infinity,
|
|
@@ -16418,7 +16418,7 @@ var defaultProps$2 = {
|
|
|
16418
16418
|
useFsAccessApi: true,
|
|
16419
16419
|
autoFocus: false
|
|
16420
16420
|
};
|
|
16421
|
-
Dropzone.defaultProps = defaultProps$
|
|
16421
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16422
16422
|
Dropzone.propTypes = {
|
|
16423
16423
|
/**
|
|
16424
16424
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16769,7 +16769,7 @@ var initialState = {
|
|
|
16769
16769
|
function useDropzone() {
|
|
16770
16770
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16771
16771
|
|
|
16772
|
-
var _defaultProps$props = _objectSpread$
|
|
16772
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16773
16773
|
accept = _defaultProps$props.accept,
|
|
16774
16774
|
disabled = _defaultProps$props.disabled,
|
|
16775
16775
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16816,7 +16816,7 @@ function useDropzone() {
|
|
|
16816
16816
|
var inputRef = useRef(null);
|
|
16817
16817
|
|
|
16818
16818
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16819
|
-
_useReducer2 = _slicedToArray$
|
|
16819
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16820
16820
|
state = _useReducer2[0],
|
|
16821
16821
|
dispatch = _useReducer2[1];
|
|
16822
16822
|
|
|
@@ -16986,12 +16986,12 @@ function useDropzone() {
|
|
|
16986
16986
|
var fileRejections = [];
|
|
16987
16987
|
files.forEach(function (file) {
|
|
16988
16988
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
16989
|
-
_fileAccepted2 = _slicedToArray$
|
|
16989
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
16990
16990
|
accepted = _fileAccepted2[0],
|
|
16991
16991
|
acceptError = _fileAccepted2[1];
|
|
16992
16992
|
|
|
16993
16993
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16994
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16994
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
16995
16995
|
sizeMatch = _fileMatchSize2[0],
|
|
16996
16996
|
sizeError = _fileMatchSize2[1];
|
|
16997
16997
|
|
|
@@ -17192,9 +17192,9 @@ function useDropzone() {
|
|
|
17192
17192
|
onDragOver = _ref2.onDragOver,
|
|
17193
17193
|
onDragLeave = _ref2.onDragLeave,
|
|
17194
17194
|
onDrop = _ref2.onDrop,
|
|
17195
|
-
rest = _objectWithoutProperties$
|
|
17195
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17196
17196
|
|
|
17197
|
-
return _objectSpread$
|
|
17197
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17198
17198
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17199
17199
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17200
17200
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17219,9 +17219,9 @@ function useDropzone() {
|
|
|
17219
17219
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17220
17220
|
onChange = _ref3.onChange,
|
|
17221
17221
|
onClick = _ref3.onClick,
|
|
17222
|
-
rest = _objectWithoutProperties$
|
|
17222
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17223
17223
|
|
|
17224
|
-
var inputProps = _defineProperty$
|
|
17224
|
+
var inputProps = _defineProperty$r({
|
|
17225
17225
|
accept: acceptAttr,
|
|
17226
17226
|
multiple: multiple,
|
|
17227
17227
|
type: "file",
|
|
@@ -17233,10 +17233,10 @@ function useDropzone() {
|
|
|
17233
17233
|
tabIndex: -1
|
|
17234
17234
|
}, refKey, inputRef);
|
|
17235
17235
|
|
|
17236
|
-
return _objectSpread$
|
|
17236
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17237
17237
|
};
|
|
17238
17238
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17239
|
-
return _objectSpread$
|
|
17239
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17240
17240
|
isFocused: isFocused && !disabled,
|
|
17241
17241
|
getRootProps: getRootProps,
|
|
17242
17242
|
getInputProps: getInputProps,
|
|
@@ -17255,40 +17255,40 @@ function reducer$1(state, action) {
|
|
|
17255
17255
|
/* istanbul ignore next */
|
|
17256
17256
|
switch (action.type) {
|
|
17257
17257
|
case "focus":
|
|
17258
|
-
return _objectSpread$
|
|
17258
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17259
17259
|
isFocused: true
|
|
17260
17260
|
});
|
|
17261
17261
|
|
|
17262
17262
|
case "blur":
|
|
17263
|
-
return _objectSpread$
|
|
17263
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17264
17264
|
isFocused: false
|
|
17265
17265
|
});
|
|
17266
17266
|
|
|
17267
17267
|
case "openDialog":
|
|
17268
|
-
return _objectSpread$
|
|
17268
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17269
17269
|
isFileDialogActive: true
|
|
17270
17270
|
});
|
|
17271
17271
|
|
|
17272
17272
|
case "closeDialog":
|
|
17273
|
-
return _objectSpread$
|
|
17273
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17274
17274
|
isFileDialogActive: false
|
|
17275
17275
|
});
|
|
17276
17276
|
|
|
17277
17277
|
case "setDraggedFiles":
|
|
17278
|
-
return _objectSpread$
|
|
17278
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17279
17279
|
isDragActive: action.isDragActive,
|
|
17280
17280
|
isDragAccept: action.isDragAccept,
|
|
17281
17281
|
isDragReject: action.isDragReject
|
|
17282
17282
|
});
|
|
17283
17283
|
|
|
17284
17284
|
case "setFiles":
|
|
17285
|
-
return _objectSpread$
|
|
17285
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17286
17286
|
acceptedFiles: action.acceptedFiles,
|
|
17287
17287
|
fileRejections: action.fileRejections
|
|
17288
17288
|
});
|
|
17289
17289
|
|
|
17290
17290
|
case "reset":
|
|
17291
|
-
return _objectSpread$
|
|
17291
|
+
return _objectSpread$p({}, initialState);
|
|
17292
17292
|
|
|
17293
17293
|
default:
|
|
17294
17294
|
return state;
|
|
@@ -19514,7 +19514,7 @@ function shallowEqual(a, b) {
|
|
|
19514
19514
|
return true;
|
|
19515
19515
|
}
|
|
19516
19516
|
|
|
19517
|
-
function _typeof$
|
|
19517
|
+
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); }
|
|
19518
19518
|
|
|
19519
19519
|
//
|
|
19520
19520
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19541,9 +19541,7 @@ var FilteredElementKeyMap = {
|
|
|
19541
19541
|
};
|
|
19542
19542
|
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'];
|
|
19543
19543
|
|
|
19544
|
-
|
|
19545
|
-
|
|
19546
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19544
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19547
19545
|
|
|
19548
19546
|
/** the offset of a chart, which define the blank space all around */
|
|
19549
19547
|
|
|
@@ -19579,7 +19577,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19579
19577
|
};
|
|
19580
19578
|
};
|
|
19581
19579
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19582
|
-
if (!isObject_1(props) || _typeof$
|
|
19580
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19583
19581
|
return null;
|
|
19584
19582
|
}
|
|
19585
19583
|
var out = null;
|
|
@@ -19593,11 +19591,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19593
19591
|
return out;
|
|
19594
19592
|
};
|
|
19595
19593
|
|
|
19596
|
-
var _excluded$
|
|
19597
|
-
_excluded2$
|
|
19598
|
-
function _objectWithoutProperties$
|
|
19599
|
-
function _objectWithoutPropertiesLoose$
|
|
19600
|
-
function _typeof$
|
|
19594
|
+
var _excluded$c = ["children"],
|
|
19595
|
+
_excluded2$2 = ["children"];
|
|
19596
|
+
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; }
|
|
19597
|
+
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; }
|
|
19598
|
+
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); }
|
|
19601
19599
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19602
19600
|
click: 'onClick',
|
|
19603
19601
|
mousedown: 'onMouseDown',
|
|
@@ -19704,7 +19702,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19704
19702
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19705
19703
|
};
|
|
19706
19704
|
var isDotProps = function isDotProps(dot) {
|
|
19707
|
-
return dot && _typeof$
|
|
19705
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19708
19706
|
};
|
|
19709
19707
|
|
|
19710
19708
|
/**
|
|
@@ -19796,10 +19794,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19796
19794
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19797
19795
|
var _ref = nextChild.props || {},
|
|
19798
19796
|
nextChildren = _ref.children,
|
|
19799
|
-
nextProps = _objectWithoutProperties$
|
|
19797
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19800
19798
|
var _ref2 = prevChild.props || {},
|
|
19801
19799
|
prevChildren = _ref2.children,
|
|
19802
|
-
prevProps = _objectWithoutProperties$
|
|
19800
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19803
19801
|
if (nextChildren && prevChildren) {
|
|
19804
19802
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19805
19803
|
}
|
|
@@ -19841,10 +19839,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19841
19839
|
return toArray(children).indexOf(child);
|
|
19842
19840
|
};
|
|
19843
19841
|
|
|
19844
|
-
var _excluded$
|
|
19842
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19845
19843
|
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); }
|
|
19846
|
-
function _objectWithoutProperties$
|
|
19847
|
-
function _objectWithoutPropertiesLoose$
|
|
19844
|
+
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; }
|
|
19845
|
+
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; }
|
|
19848
19846
|
function Surface(props) {
|
|
19849
19847
|
var children = props.children,
|
|
19850
19848
|
width = props.width,
|
|
@@ -19852,7 +19850,7 @@ function Surface(props) {
|
|
|
19852
19850
|
viewBox = props.viewBox,
|
|
19853
19851
|
className = props.className,
|
|
19854
19852
|
style = props.style,
|
|
19855
|
-
others = _objectWithoutProperties$
|
|
19853
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19856
19854
|
var svgView = viewBox || {
|
|
19857
19855
|
width: width,
|
|
19858
19856
|
height: height,
|
|
@@ -19869,14 +19867,14 @@ function Surface(props) {
|
|
|
19869
19867
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19870
19868
|
}
|
|
19871
19869
|
|
|
19872
|
-
var _excluded$
|
|
19870
|
+
var _excluded$a = ["children", "className"];
|
|
19873
19871
|
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); }
|
|
19874
|
-
function _objectWithoutProperties$
|
|
19875
|
-
function _objectWithoutPropertiesLoose$
|
|
19872
|
+
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; }
|
|
19873
|
+
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; }
|
|
19876
19874
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19877
19875
|
var children = props.children,
|
|
19878
19876
|
className = props.className,
|
|
19879
|
-
others = _objectWithoutProperties$
|
|
19877
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19880
19878
|
var layerClass = classNames('recharts-layer', className);
|
|
19881
19879
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19882
19880
|
className: layerClass
|
|
@@ -23291,16 +23289,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23291
23289
|
stackOffsetNone(series, order);
|
|
23292
23290
|
}
|
|
23293
23291
|
|
|
23294
|
-
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); }
|
|
23295
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23296
23292
|
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); }
|
|
23297
|
-
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; }
|
|
23298
|
-
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; }
|
|
23299
|
-
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; }
|
|
23300
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23301
|
-
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); }
|
|
23302
|
-
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; }
|
|
23303
|
-
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; }
|
|
23304
23293
|
var symbolFactories = {
|
|
23305
23294
|
symbolCircle: symbolCircle,
|
|
23306
23295
|
symbolCross: symbolCross,
|
|
@@ -23339,35 +23328,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23339
23328
|
return Math.PI * size * size / 4;
|
|
23340
23329
|
}
|
|
23341
23330
|
};
|
|
23331
|
+
var symbolsDefaultProps = {
|
|
23332
|
+
type: 'circle',
|
|
23333
|
+
size: 64,
|
|
23334
|
+
sizeType: 'area'
|
|
23335
|
+
};
|
|
23342
23336
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23343
23337
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23344
23338
|
};
|
|
23345
|
-
var Symbols = function Symbols(
|
|
23346
|
-
var _ref$type = _ref.type,
|
|
23347
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23348
|
-
_ref$size = _ref.size,
|
|
23349
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23350
|
-
_ref$sizeType = _ref.sizeType,
|
|
23351
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23352
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23353
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23354
|
-
type: type,
|
|
23355
|
-
size: size,
|
|
23356
|
-
sizeType: sizeType
|
|
23357
|
-
});
|
|
23358
|
-
|
|
23339
|
+
var Symbols = function Symbols(props) {
|
|
23359
23340
|
/**
|
|
23360
23341
|
* Calculate the path of curve
|
|
23361
23342
|
* @return {String} path
|
|
23362
23343
|
*/
|
|
23363
23344
|
var getPath = function getPath() {
|
|
23345
|
+
var size = props.size,
|
|
23346
|
+
sizeType = props.sizeType,
|
|
23347
|
+
type = props.type;
|
|
23364
23348
|
var symbolFactory = getSymbolFactory(type);
|
|
23365
23349
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23366
23350
|
return symbol();
|
|
23367
23351
|
};
|
|
23368
23352
|
var className = props.className,
|
|
23369
23353
|
cx = props.cx,
|
|
23370
|
-
cy = props.cy
|
|
23354
|
+
cy = props.cy,
|
|
23355
|
+
size = props.size;
|
|
23371
23356
|
var filteredProps = filterProps(props, true);
|
|
23372
23357
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23373
23358
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23378,34 +23363,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23378
23363
|
}
|
|
23379
23364
|
return null;
|
|
23380
23365
|
};
|
|
23366
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23381
23367
|
Symbols.registerSymbol = registerSymbol;
|
|
23382
23368
|
|
|
23383
|
-
function _typeof$
|
|
23369
|
+
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); }
|
|
23384
23370
|
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); }
|
|
23385
|
-
function ownKeys$
|
|
23386
|
-
function _objectSpread$
|
|
23387
|
-
function _classCallCheck$
|
|
23388
|
-
function _defineProperties$
|
|
23389
|
-
function _createClass$
|
|
23390
|
-
function _inherits$
|
|
23391
|
-
function _setPrototypeOf$
|
|
23392
|
-
function _createSuper$
|
|
23393
|
-
function _possibleConstructorReturn$
|
|
23394
|
-
function _assertThisInitialized$
|
|
23395
|
-
function _isNativeReflectConstruct$
|
|
23396
|
-
function _getPrototypeOf$
|
|
23397
|
-
function _defineProperty$
|
|
23398
|
-
function _toPropertyKey$
|
|
23399
|
-
function _toPrimitive$
|
|
23371
|
+
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; }
|
|
23372
|
+
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; }
|
|
23373
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23374
|
+
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); } }
|
|
23375
|
+
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; }
|
|
23376
|
+
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); }
|
|
23377
|
+
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); }
|
|
23378
|
+
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); }; }
|
|
23379
|
+
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); }
|
|
23380
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23381
|
+
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; } }
|
|
23382
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23383
|
+
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; }
|
|
23384
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23385
|
+
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); }
|
|
23400
23386
|
var SIZE = 32;
|
|
23401
23387
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23402
|
-
_inherits$
|
|
23403
|
-
var _super = _createSuper$
|
|
23388
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23389
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23404
23390
|
function DefaultLegendContent() {
|
|
23405
|
-
_classCallCheck$
|
|
23391
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23406
23392
|
return _super.apply(this, arguments);
|
|
23407
23393
|
}
|
|
23408
|
-
_createClass$
|
|
23394
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23409
23395
|
key: "renderIcon",
|
|
23410
23396
|
value:
|
|
23411
23397
|
/**
|
|
@@ -23450,7 +23436,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23450
23436
|
});
|
|
23451
23437
|
}
|
|
23452
23438
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23453
|
-
var iconProps = _objectSpread$
|
|
23439
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23454
23440
|
delete iconProps.legendIcon;
|
|
23455
23441
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23456
23442
|
}
|
|
@@ -23498,7 +23484,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23498
23484
|
var finalFormatter = entry.formatter || formatter;
|
|
23499
23485
|
var className = classNames((_classNames = {
|
|
23500
23486
|
'recharts-legend-item': true
|
|
23501
|
-
}, _defineProperty$
|
|
23487
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23502
23488
|
if (entry.type === 'none') {
|
|
23503
23489
|
return null;
|
|
23504
23490
|
}
|
|
@@ -23543,8 +23529,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23543
23529
|
}]);
|
|
23544
23530
|
return DefaultLegendContent;
|
|
23545
23531
|
}(PureComponent);
|
|
23546
|
-
_defineProperty$
|
|
23547
|
-
_defineProperty$
|
|
23532
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23533
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23548
23534
|
iconSize: 14,
|
|
23549
23535
|
layout: 'horizontal',
|
|
23550
23536
|
align: 'center',
|
|
@@ -23552,25 +23538,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23552
23538
|
inactiveColor: '#ccc'
|
|
23553
23539
|
});
|
|
23554
23540
|
|
|
23555
|
-
function _typeof$
|
|
23556
|
-
var _excluded$
|
|
23557
|
-
function ownKeys$
|
|
23558
|
-
function _objectSpread$
|
|
23559
|
-
function _classCallCheck$
|
|
23560
|
-
function _defineProperties$
|
|
23561
|
-
function _createClass$
|
|
23562
|
-
function _inherits$
|
|
23563
|
-
function _setPrototypeOf$
|
|
23564
|
-
function _createSuper$
|
|
23565
|
-
function _possibleConstructorReturn$
|
|
23566
|
-
function _assertThisInitialized$
|
|
23567
|
-
function _isNativeReflectConstruct$
|
|
23568
|
-
function _getPrototypeOf$
|
|
23569
|
-
function _defineProperty$
|
|
23570
|
-
function _toPropertyKey$
|
|
23571
|
-
function _toPrimitive$
|
|
23572
|
-
function _objectWithoutProperties$
|
|
23573
|
-
function _objectWithoutPropertiesLoose$
|
|
23541
|
+
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); }
|
|
23542
|
+
var _excluded$9 = ["ref"];
|
|
23543
|
+
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; }
|
|
23544
|
+
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; }
|
|
23545
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23546
|
+
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); } }
|
|
23547
|
+
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; }
|
|
23548
|
+
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); }
|
|
23549
|
+
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); }
|
|
23550
|
+
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); }; }
|
|
23551
|
+
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); }
|
|
23552
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23553
|
+
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; } }
|
|
23554
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23555
|
+
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; }
|
|
23556
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23557
|
+
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); }
|
|
23558
|
+
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; }
|
|
23559
|
+
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; }
|
|
23574
23560
|
function defaultUniqBy$1(entry) {
|
|
23575
23561
|
return entry.value;
|
|
23576
23562
|
}
|
|
@@ -23591,27 +23577,27 @@ function renderContent$1(content, props) {
|
|
|
23591
23577
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23592
23578
|
}
|
|
23593
23579
|
props.ref;
|
|
23594
|
-
var otherProps = _objectWithoutProperties$
|
|
23580
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23595
23581
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23596
23582
|
}
|
|
23597
23583
|
var EPS$2 = 1;
|
|
23598
23584
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23599
|
-
_inherits$
|
|
23600
|
-
var _super = _createSuper$
|
|
23585
|
+
_inherits$7(Legend, _PureComponent);
|
|
23586
|
+
var _super = _createSuper$7(Legend);
|
|
23601
23587
|
function Legend() {
|
|
23602
23588
|
var _this;
|
|
23603
|
-
_classCallCheck$
|
|
23589
|
+
_classCallCheck$9(this, Legend);
|
|
23604
23590
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23605
23591
|
args[_key] = arguments[_key];
|
|
23606
23592
|
}
|
|
23607
23593
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23608
|
-
_defineProperty$
|
|
23594
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23609
23595
|
boxWidth: -1,
|
|
23610
23596
|
boxHeight: -1
|
|
23611
23597
|
});
|
|
23612
23598
|
return _this;
|
|
23613
23599
|
}
|
|
23614
|
-
_createClass$
|
|
23600
|
+
_createClass$9(Legend, [{
|
|
23615
23601
|
key: "componentDidMount",
|
|
23616
23602
|
value: function componentDidMount() {
|
|
23617
23603
|
this.updateBBox();
|
|
@@ -23686,7 +23672,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23686
23672
|
};
|
|
23687
23673
|
}
|
|
23688
23674
|
}
|
|
23689
|
-
return _objectSpread$
|
|
23675
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23690
23676
|
}
|
|
23691
23677
|
}, {
|
|
23692
23678
|
key: "updateBBox",
|
|
@@ -23729,7 +23715,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23729
23715
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23730
23716
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23731
23717
|
payload = _this$props2.payload;
|
|
23732
|
-
var outerStyle = _objectSpread$
|
|
23718
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23733
23719
|
position: 'absolute',
|
|
23734
23720
|
width: width || 'auto',
|
|
23735
23721
|
height: height || 'auto'
|
|
@@ -23740,7 +23726,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23740
23726
|
ref: function ref(node) {
|
|
23741
23727
|
_this2.wrapperNode = node;
|
|
23742
23728
|
}
|
|
23743
|
-
}, renderContent$1(content, _objectSpread$
|
|
23729
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23744
23730
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23745
23731
|
})));
|
|
23746
23732
|
}
|
|
@@ -23763,8 +23749,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23763
23749
|
}]);
|
|
23764
23750
|
return Legend;
|
|
23765
23751
|
}(PureComponent);
|
|
23766
|
-
_defineProperty$
|
|
23767
|
-
_defineProperty$
|
|
23752
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23753
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23768
23754
|
iconSize: 14,
|
|
23769
23755
|
layout: 'horizontal',
|
|
23770
23756
|
align: 'center',
|
|
@@ -24328,13 +24314,13 @@ function setRafTimeout(callback) {
|
|
|
24328
24314
|
requestAnimationFrame(shouldUpdate);
|
|
24329
24315
|
}
|
|
24330
24316
|
|
|
24331
|
-
function _typeof$
|
|
24332
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24333
|
-
function _nonIterableRest$
|
|
24334
|
-
function _unsupportedIterableToArray$
|
|
24335
|
-
function _arrayLikeToArray$
|
|
24317
|
+
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); }
|
|
24318
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24319
|
+
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."); }
|
|
24320
|
+
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); }
|
|
24321
|
+
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; }
|
|
24336
24322
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24337
|
-
function _arrayWithHoles$
|
|
24323
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24338
24324
|
function createAnimateManager() {
|
|
24339
24325
|
var currStyle = {};
|
|
24340
24326
|
var handleChange = function handleChange() {
|
|
@@ -24361,7 +24347,7 @@ function createAnimateManager() {
|
|
|
24361
24347
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24362
24348
|
return;
|
|
24363
24349
|
}
|
|
24364
|
-
if (_typeof$
|
|
24350
|
+
if (_typeof$o(_style) === 'object') {
|
|
24365
24351
|
currStyle = _style;
|
|
24366
24352
|
handleChange(currStyle);
|
|
24367
24353
|
}
|
|
@@ -24388,12 +24374,12 @@ function createAnimateManager() {
|
|
|
24388
24374
|
};
|
|
24389
24375
|
}
|
|
24390
24376
|
|
|
24391
|
-
function _typeof$
|
|
24392
|
-
function ownKeys$
|
|
24393
|
-
function _objectSpread$
|
|
24394
|
-
function _defineProperty$
|
|
24395
|
-
function _toPropertyKey$
|
|
24396
|
-
function _toPrimitive$
|
|
24377
|
+
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); }
|
|
24378
|
+
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; }
|
|
24379
|
+
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; }
|
|
24380
|
+
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; }
|
|
24381
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24382
|
+
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); }
|
|
24397
24383
|
/* eslint no-console: 0 */
|
|
24398
24384
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24399
24385
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24425,7 +24411,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24425
24411
|
*/
|
|
24426
24412
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24427
24413
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24428
|
-
return _defineProperty$
|
|
24414
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24429
24415
|
}
|
|
24430
24416
|
var isTransition = name === 'transition';
|
|
24431
24417
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24436,7 +24422,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24436
24422
|
if (isTransition) {
|
|
24437
24423
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24438
24424
|
}
|
|
24439
|
-
return _objectSpread$
|
|
24425
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24440
24426
|
}, {});
|
|
24441
24427
|
};
|
|
24442
24428
|
|
|
@@ -24446,7 +24432,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24446
24432
|
*/
|
|
24447
24433
|
var mapObject = function mapObject(fn, obj) {
|
|
24448
24434
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24449
|
-
return _objectSpread$
|
|
24435
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24450
24436
|
}, {});
|
|
24451
24437
|
};
|
|
24452
24438
|
|
|
@@ -24456,7 +24442,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24456
24442
|
*/
|
|
24457
24443
|
var translateStyle = function translateStyle(style) {
|
|
24458
24444
|
return Object.keys(style).reduce(function (res, key) {
|
|
24459
|
-
return _objectSpread$
|
|
24445
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24460
24446
|
}, style);
|
|
24461
24447
|
};
|
|
24462
24448
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24484,16 +24470,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24484
24470
|
}
|
|
24485
24471
|
};
|
|
24486
24472
|
|
|
24487
|
-
function _slicedToArray$
|
|
24488
|
-
function _nonIterableRest$
|
|
24489
|
-
function _iterableToArrayLimit$
|
|
24490
|
-
function _arrayWithHoles$
|
|
24491
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24473
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24474
|
+
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."); }
|
|
24475
|
+
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; } }
|
|
24476
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24477
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24492
24478
|
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."); }
|
|
24493
|
-
function _unsupportedIterableToArray$
|
|
24479
|
+
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); }
|
|
24494
24480
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24495
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24496
|
-
function _arrayLikeToArray$
|
|
24481
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24482
|
+
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; }
|
|
24497
24483
|
var ACCURACY = 1e-4;
|
|
24498
24484
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24499
24485
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24569,7 +24555,7 @@ var configBezier = function configBezier() {
|
|
|
24569
24555
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24570
24556
|
return parseFloat(x);
|
|
24571
24557
|
});
|
|
24572
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24558
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24573
24559
|
x1 = _easing$1$split$0$spl2[0];
|
|
24574
24560
|
y1 = _easing$1$split$0$spl2[1];
|
|
24575
24561
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24662,22 +24648,22 @@ var configEasing = function configEasing() {
|
|
|
24662
24648
|
return null;
|
|
24663
24649
|
};
|
|
24664
24650
|
|
|
24665
|
-
function _typeof$
|
|
24666
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24651
|
+
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); }
|
|
24652
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24667
24653
|
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."); }
|
|
24668
24654
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24669
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24670
|
-
function ownKeys$
|
|
24671
|
-
function _objectSpread$
|
|
24672
|
-
function _defineProperty$
|
|
24673
|
-
function _toPropertyKey$
|
|
24674
|
-
function _toPrimitive$
|
|
24675
|
-
function _slicedToArray$
|
|
24676
|
-
function _nonIterableRest$
|
|
24677
|
-
function _unsupportedIterableToArray$
|
|
24678
|
-
function _arrayLikeToArray$
|
|
24679
|
-
function _iterableToArrayLimit$
|
|
24680
|
-
function _arrayWithHoles$
|
|
24655
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24656
|
+
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; }
|
|
24657
|
+
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; }
|
|
24658
|
+
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; }
|
|
24659
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24660
|
+
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); }
|
|
24661
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24662
|
+
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."); }
|
|
24663
|
+
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); }
|
|
24664
|
+
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; }
|
|
24665
|
+
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; } }
|
|
24666
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24681
24667
|
var alpha = function alpha(begin, end, k) {
|
|
24682
24668
|
return begin + (end - begin) * k;
|
|
24683
24669
|
};
|
|
@@ -24695,10 +24681,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24695
24681
|
var nextStepVals = mapObject(function (key, val) {
|
|
24696
24682
|
if (needContinue(val)) {
|
|
24697
24683
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24698
|
-
_easing2 = _slicedToArray$
|
|
24684
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24699
24685
|
newX = _easing2[0],
|
|
24700
24686
|
newV = _easing2[1];
|
|
24701
|
-
return _objectSpread$
|
|
24687
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24702
24688
|
from: newX,
|
|
24703
24689
|
velocity: newV
|
|
24704
24690
|
});
|
|
@@ -24708,7 +24694,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24708
24694
|
if (steps < 1) {
|
|
24709
24695
|
return mapObject(function (key, val) {
|
|
24710
24696
|
if (needContinue(val)) {
|
|
24711
|
-
return _objectSpread$
|
|
24697
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24712
24698
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24713
24699
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24714
24700
|
});
|
|
@@ -24723,10 +24709,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24723
24709
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24724
24710
|
var interKeys = getIntersectionKeys(from, to);
|
|
24725
24711
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24726
|
-
return _objectSpread$
|
|
24712
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24727
24713
|
}, {});
|
|
24728
24714
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24729
|
-
return _objectSpread$
|
|
24715
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24730
24716
|
from: from[key],
|
|
24731
24717
|
velocity: 0,
|
|
24732
24718
|
to: to[key]
|
|
@@ -24756,7 +24742,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24756
24742
|
var steps = deltaTime / easing.dt;
|
|
24757
24743
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24758
24744
|
// get union set and add compatible prefix
|
|
24759
|
-
render(_objectSpread$
|
|
24745
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24760
24746
|
preTime = now;
|
|
24761
24747
|
if (!shouldStopAnimation()) {
|
|
24762
24748
|
cafId = requestAnimationFrame(update);
|
|
@@ -24774,14 +24760,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24774
24760
|
}, timingStyle);
|
|
24775
24761
|
|
|
24776
24762
|
// get union set and add compatible prefix
|
|
24777
|
-
render(_objectSpread$
|
|
24763
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24778
24764
|
if (t < 1) {
|
|
24779
24765
|
cafId = requestAnimationFrame(update);
|
|
24780
24766
|
} else {
|
|
24781
24767
|
var finalStyle = mapObject(function (key, val) {
|
|
24782
24768
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24783
24769
|
}, timingStyle);
|
|
24784
|
-
render(_objectSpread$
|
|
24770
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24785
24771
|
}
|
|
24786
24772
|
};
|
|
24787
24773
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24797,37 +24783,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24797
24783
|
};
|
|
24798
24784
|
});
|
|
24799
24785
|
|
|
24800
|
-
function _typeof$
|
|
24801
|
-
var _excluded$
|
|
24802
|
-
function _objectWithoutProperties$
|
|
24803
|
-
function _objectWithoutPropertiesLoose$
|
|
24804
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24786
|
+
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); }
|
|
24787
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24788
|
+
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; }
|
|
24789
|
+
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; }
|
|
24790
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24805
24791
|
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."); }
|
|
24806
|
-
function _unsupportedIterableToArray$
|
|
24792
|
+
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); }
|
|
24807
24793
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24808
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24809
|
-
function _arrayLikeToArray$
|
|
24810
|
-
function ownKeys$
|
|
24811
|
-
function _objectSpread$
|
|
24812
|
-
function _defineProperty$
|
|
24813
|
-
function _classCallCheck$
|
|
24814
|
-
function _defineProperties$
|
|
24815
|
-
function _createClass$
|
|
24816
|
-
function _toPropertyKey$
|
|
24817
|
-
function _toPrimitive$
|
|
24818
|
-
function _inherits$
|
|
24819
|
-
function _setPrototypeOf$
|
|
24820
|
-
function _createSuper$
|
|
24821
|
-
function _possibleConstructorReturn$
|
|
24822
|
-
function _assertThisInitialized$
|
|
24823
|
-
function _isNativeReflectConstruct$
|
|
24824
|
-
function _getPrototypeOf$
|
|
24794
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24795
|
+
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; }
|
|
24796
|
+
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; }
|
|
24797
|
+
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; }
|
|
24798
|
+
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; }
|
|
24799
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24800
|
+
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); } }
|
|
24801
|
+
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; }
|
|
24802
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24803
|
+
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); }
|
|
24804
|
+
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); }
|
|
24805
|
+
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); }
|
|
24806
|
+
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); }; }
|
|
24807
|
+
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); }
|
|
24808
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24809
|
+
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; } }
|
|
24810
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24825
24811
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24826
|
-
_inherits$
|
|
24827
|
-
var _super = _createSuper$
|
|
24812
|
+
_inherits$6(Animate, _PureComponent);
|
|
24813
|
+
var _super = _createSuper$6(Animate);
|
|
24828
24814
|
function Animate(props, context) {
|
|
24829
24815
|
var _this;
|
|
24830
|
-
_classCallCheck$
|
|
24816
|
+
_classCallCheck$8(this, Animate);
|
|
24831
24817
|
_this = _super.call(this, props, context);
|
|
24832
24818
|
var _this$props = _this.props,
|
|
24833
24819
|
isActive = _this$props.isActive,
|
|
@@ -24837,8 +24823,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24837
24823
|
steps = _this$props.steps,
|
|
24838
24824
|
children = _this$props.children,
|
|
24839
24825
|
duration = _this$props.duration;
|
|
24840
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24841
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24826
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24827
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24842
24828
|
if (!isActive || duration <= 0) {
|
|
24843
24829
|
_this.state = {
|
|
24844
24830
|
style: {}
|
|
@@ -24850,7 +24836,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24850
24836
|
style: to
|
|
24851
24837
|
};
|
|
24852
24838
|
}
|
|
24853
|
-
return _possibleConstructorReturn$
|
|
24839
|
+
return _possibleConstructorReturn$6(_this);
|
|
24854
24840
|
}
|
|
24855
24841
|
if (steps && steps.length) {
|
|
24856
24842
|
_this.state = {
|
|
@@ -24861,10 +24847,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24861
24847
|
_this.state = {
|
|
24862
24848
|
style: from
|
|
24863
24849
|
};
|
|
24864
|
-
return _possibleConstructorReturn$
|
|
24850
|
+
return _possibleConstructorReturn$6(_this);
|
|
24865
24851
|
}
|
|
24866
24852
|
_this.state = {
|
|
24867
|
-
style: attributeName ? _defineProperty$
|
|
24853
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24868
24854
|
};
|
|
24869
24855
|
} else {
|
|
24870
24856
|
_this.state = {
|
|
@@ -24873,7 +24859,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24873
24859
|
}
|
|
24874
24860
|
return _this;
|
|
24875
24861
|
}
|
|
24876
|
-
_createClass$
|
|
24862
|
+
_createClass$8(Animate, [{
|
|
24877
24863
|
key: "componentDidMount",
|
|
24878
24864
|
value: function componentDidMount() {
|
|
24879
24865
|
var _this$props2 = this.props,
|
|
@@ -24901,7 +24887,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24901
24887
|
}
|
|
24902
24888
|
if (!isActive) {
|
|
24903
24889
|
var newState = {
|
|
24904
|
-
style: attributeName ? _defineProperty$
|
|
24890
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24905
24891
|
};
|
|
24906
24892
|
if (this.state && style) {
|
|
24907
24893
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24924,14 +24910,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24924
24910
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24925
24911
|
if (this.state && style) {
|
|
24926
24912
|
var _newState = {
|
|
24927
|
-
style: attributeName ? _defineProperty$
|
|
24913
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24928
24914
|
};
|
|
24929
24915
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24930
24916
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24931
24917
|
this.setState(_newState);
|
|
24932
24918
|
}
|
|
24933
24919
|
}
|
|
24934
|
-
this.runAnimation(_objectSpread$
|
|
24920
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24935
24921
|
from: from,
|
|
24936
24922
|
begin: 0
|
|
24937
24923
|
}));
|
|
@@ -25014,7 +25000,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25014
25000
|
}), duration]);
|
|
25015
25001
|
}
|
|
25016
25002
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25017
|
-
var newStyle = _objectSpread$
|
|
25003
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25018
25004
|
transition: transition
|
|
25019
25005
|
});
|
|
25020
25006
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25046,9 +25032,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25046
25032
|
this.runStepAnimation(props);
|
|
25047
25033
|
return;
|
|
25048
25034
|
}
|
|
25049
|
-
var to = attributeName ? _defineProperty$
|
|
25035
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25050
25036
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25051
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25037
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25052
25038
|
transition: transition
|
|
25053
25039
|
}), duration, onAnimationEnd]);
|
|
25054
25040
|
}
|
|
@@ -25069,7 +25055,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25069
25055
|
_this$props4.onAnimationEnd;
|
|
25070
25056
|
_this$props4.shouldReAnimate;
|
|
25071
25057
|
_this$props4.onAnimationReStart;
|
|
25072
|
-
var others = _objectWithoutProperties$
|
|
25058
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25073
25059
|
var count = Children.count(children);
|
|
25074
25060
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25075
25061
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25084,8 +25070,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25084
25070
|
_container$props$styl = _container$props.style,
|
|
25085
25071
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25086
25072
|
className = _container$props.className;
|
|
25087
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25088
|
-
style: _objectSpread$
|
|
25073
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25074
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25089
25075
|
className: className
|
|
25090
25076
|
}));
|
|
25091
25077
|
return res;
|
|
@@ -25610,10 +25596,10 @@ var defineProperty$2 = (function() {
|
|
|
25610
25596
|
} catch (e) {}
|
|
25611
25597
|
}());
|
|
25612
25598
|
|
|
25613
|
-
var _defineProperty$
|
|
25599
|
+
var _defineProperty$l = defineProperty$2;
|
|
25614
25600
|
|
|
25615
25601
|
var constant$1 = constant_1,
|
|
25616
|
-
defineProperty$1 = _defineProperty$
|
|
25602
|
+
defineProperty$1 = _defineProperty$l,
|
|
25617
25603
|
identity$7 = identity_1;
|
|
25618
25604
|
|
|
25619
25605
|
/**
|
|
@@ -25790,18 +25776,18 @@ var sortBy_1 = sortBy;
|
|
|
25790
25776
|
/**
|
|
25791
25777
|
* @fileOverview Default Tooltip Content
|
|
25792
25778
|
*/
|
|
25793
|
-
function _typeof$
|
|
25794
|
-
function _slicedToArray$
|
|
25795
|
-
function _nonIterableRest$
|
|
25796
|
-
function _unsupportedIterableToArray$
|
|
25797
|
-
function _arrayLikeToArray$
|
|
25798
|
-
function _iterableToArrayLimit$
|
|
25799
|
-
function _arrayWithHoles$
|
|
25800
|
-
function ownKeys$
|
|
25801
|
-
function _objectSpread$
|
|
25802
|
-
function _defineProperty$
|
|
25803
|
-
function _toPropertyKey$
|
|
25804
|
-
function _toPrimitive$
|
|
25779
|
+
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); }
|
|
25780
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25781
|
+
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."); }
|
|
25782
|
+
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); }
|
|
25783
|
+
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; }
|
|
25784
|
+
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; } }
|
|
25785
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25786
|
+
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; }
|
|
25787
|
+
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; }
|
|
25788
|
+
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; }
|
|
25789
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25790
|
+
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); }
|
|
25805
25791
|
function defaultFormatter(value) {
|
|
25806
25792
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25807
25793
|
}
|
|
@@ -25831,7 +25817,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25831
25817
|
if (entry.type === 'none') {
|
|
25832
25818
|
return null;
|
|
25833
25819
|
}
|
|
25834
|
-
var finalItemStyle = _objectSpread$
|
|
25820
|
+
var finalItemStyle = _objectSpread$j({
|
|
25835
25821
|
display: 'block',
|
|
25836
25822
|
paddingTop: 4,
|
|
25837
25823
|
paddingBottom: 4,
|
|
@@ -25845,7 +25831,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25845
25831
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25846
25832
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25847
25833
|
if (Array.isArray(formatted)) {
|
|
25848
|
-
var _formatted = _slicedToArray$
|
|
25834
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25849
25835
|
finalValue = _formatted[0];
|
|
25850
25836
|
finalName = _formatted[1];
|
|
25851
25837
|
} else {
|
|
@@ -25877,14 +25863,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25877
25863
|
}
|
|
25878
25864
|
return null;
|
|
25879
25865
|
};
|
|
25880
|
-
var finalStyle = _objectSpread$
|
|
25866
|
+
var finalStyle = _objectSpread$j({
|
|
25881
25867
|
margin: 0,
|
|
25882
25868
|
padding: 10,
|
|
25883
25869
|
backgroundColor: '#fff',
|
|
25884
25870
|
border: '1px solid #ccc',
|
|
25885
25871
|
whiteSpace: 'nowrap'
|
|
25886
25872
|
}, contentStyle);
|
|
25887
|
-
var finalLabelStyle = _objectSpread$
|
|
25873
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25888
25874
|
margin: 0
|
|
25889
25875
|
}, labelStyle);
|
|
25890
25876
|
var hasLabel = !isNil_1(label);
|
|
@@ -25925,22 +25911,18 @@ var Global = {
|
|
|
25925
25911
|
}
|
|
25926
25912
|
};
|
|
25927
25913
|
|
|
25928
|
-
function _typeof$
|
|
25929
|
-
function ownKeys$
|
|
25930
|
-
function _objectSpread$
|
|
25931
|
-
function
|
|
25932
|
-
function
|
|
25933
|
-
function
|
|
25934
|
-
function
|
|
25935
|
-
function
|
|
25936
|
-
function
|
|
25937
|
-
function
|
|
25938
|
-
function
|
|
25939
|
-
function
|
|
25940
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25941
|
-
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; }
|
|
25942
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25943
|
-
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); }
|
|
25914
|
+
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); }
|
|
25915
|
+
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; }
|
|
25916
|
+
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; }
|
|
25917
|
+
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; }
|
|
25918
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25919
|
+
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); }
|
|
25920
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25921
|
+
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."); }
|
|
25922
|
+
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); }
|
|
25923
|
+
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; }
|
|
25924
|
+
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; } }
|
|
25925
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25944
25926
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25945
25927
|
var EPS$1 = 1;
|
|
25946
25928
|
function defaultUniqBy(entry) {
|
|
@@ -25964,204 +25946,7 @@ function renderContent(content, props) {
|
|
|
25964
25946
|
}
|
|
25965
25947
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
25966
25948
|
}
|
|
25967
|
-
var
|
|
25968
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
25969
|
-
var _super = _createSuper$6(Tooltip);
|
|
25970
|
-
function Tooltip() {
|
|
25971
|
-
var _this;
|
|
25972
|
-
_classCallCheck$8(this, Tooltip);
|
|
25973
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25974
|
-
args[_key] = arguments[_key];
|
|
25975
|
-
}
|
|
25976
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
25977
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
25978
|
-
boxWidth: -1,
|
|
25979
|
-
boxHeight: -1,
|
|
25980
|
-
dismissed: false,
|
|
25981
|
-
dismissedAtCoordinate: {
|
|
25982
|
-
x: 0,
|
|
25983
|
-
y: 0
|
|
25984
|
-
}
|
|
25985
|
-
});
|
|
25986
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
25987
|
-
if (event.key === 'Escape') {
|
|
25988
|
-
_this.setState({
|
|
25989
|
-
dismissed: true,
|
|
25990
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
25991
|
-
x: _this.props.coordinate.x,
|
|
25992
|
-
y: _this.props.coordinate.y
|
|
25993
|
-
})
|
|
25994
|
-
});
|
|
25995
|
-
}
|
|
25996
|
-
});
|
|
25997
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
25998
|
-
var key = _ref.key,
|
|
25999
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26000
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26001
|
-
var _this$props = _this.props,
|
|
26002
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26003
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26004
|
-
coordinate = _this$props.coordinate,
|
|
26005
|
-
offset = _this$props.offset,
|
|
26006
|
-
position = _this$props.position,
|
|
26007
|
-
viewBox = _this$props.viewBox;
|
|
26008
|
-
if (position && isNumber(position[key])) {
|
|
26009
|
-
return position[key];
|
|
26010
|
-
}
|
|
26011
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26012
|
-
var positive = coordinate[key] + offset;
|
|
26013
|
-
if (allowEscapeViewBox[key]) {
|
|
26014
|
-
return reverseDirection[key] ? negative : positive;
|
|
26015
|
-
}
|
|
26016
|
-
if (reverseDirection[key]) {
|
|
26017
|
-
var _tooltipBoundary = negative;
|
|
26018
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26019
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26020
|
-
return Math.max(positive, viewBox[key]);
|
|
26021
|
-
}
|
|
26022
|
-
return Math.max(negative, viewBox[key]);
|
|
26023
|
-
}
|
|
26024
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26025
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26026
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26027
|
-
return Math.max(negative, viewBox[key]);
|
|
26028
|
-
}
|
|
26029
|
-
return Math.max(positive, viewBox[key]);
|
|
26030
|
-
});
|
|
26031
|
-
return _this;
|
|
26032
|
-
}
|
|
26033
|
-
_createClass$8(Tooltip, [{
|
|
26034
|
-
key: "componentDidMount",
|
|
26035
|
-
value: function componentDidMount() {
|
|
26036
|
-
this.updateBBox();
|
|
26037
|
-
}
|
|
26038
|
-
}, {
|
|
26039
|
-
key: "componentWillUnmount",
|
|
26040
|
-
value: function componentWillUnmount() {
|
|
26041
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26042
|
-
}
|
|
26043
|
-
}, {
|
|
26044
|
-
key: "componentDidUpdate",
|
|
26045
|
-
value: function componentDidUpdate() {
|
|
26046
|
-
this.updateBBox();
|
|
26047
|
-
}
|
|
26048
|
-
}, {
|
|
26049
|
-
key: "updateBBox",
|
|
26050
|
-
value: function updateBBox() {
|
|
26051
|
-
var _this$state = this.state,
|
|
26052
|
-
boxWidth = _this$state.boxWidth,
|
|
26053
|
-
boxHeight = _this$state.boxHeight,
|
|
26054
|
-
dismissed = _this$state.dismissed;
|
|
26055
|
-
if (dismissed) {
|
|
26056
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26057
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26058
|
-
this.setState({
|
|
26059
|
-
dismissed: false
|
|
26060
|
-
});
|
|
26061
|
-
}
|
|
26062
|
-
} else {
|
|
26063
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26064
|
-
}
|
|
26065
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26066
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26067
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26068
|
-
this.setState({
|
|
26069
|
-
boxWidth: box.width,
|
|
26070
|
-
boxHeight: box.height
|
|
26071
|
-
});
|
|
26072
|
-
}
|
|
26073
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26074
|
-
this.setState({
|
|
26075
|
-
boxWidth: -1,
|
|
26076
|
-
boxHeight: -1
|
|
26077
|
-
});
|
|
26078
|
-
}
|
|
26079
|
-
}
|
|
26080
|
-
}, {
|
|
26081
|
-
key: "render",
|
|
26082
|
-
value: function render() {
|
|
26083
|
-
var _classNames,
|
|
26084
|
-
_this2 = this;
|
|
26085
|
-
var _this$props2 = this.props,
|
|
26086
|
-
payload = _this$props2.payload,
|
|
26087
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26088
|
-
animationDuration = _this$props2.animationDuration,
|
|
26089
|
-
animationEasing = _this$props2.animationEasing,
|
|
26090
|
-
filterNull = _this$props2.filterNull,
|
|
26091
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26092
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26093
|
-
return !isNil_1(entry.value);
|
|
26094
|
-
}) : payload);
|
|
26095
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26096
|
-
var _this$props3 = this.props,
|
|
26097
|
-
content = _this$props3.content,
|
|
26098
|
-
viewBox = _this$props3.viewBox,
|
|
26099
|
-
coordinate = _this$props3.coordinate,
|
|
26100
|
-
position = _this$props3.position,
|
|
26101
|
-
active = _this$props3.active,
|
|
26102
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26103
|
-
var outerStyle = _objectSpread$l({
|
|
26104
|
-
pointerEvents: 'none',
|
|
26105
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26106
|
-
position: 'absolute',
|
|
26107
|
-
top: 0,
|
|
26108
|
-
left: 0
|
|
26109
|
-
}, wrapperStyle);
|
|
26110
|
-
var translateX, translateY;
|
|
26111
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26112
|
-
translateX = position.x;
|
|
26113
|
-
translateY = position.y;
|
|
26114
|
-
} else {
|
|
26115
|
-
var _this$state2 = this.state,
|
|
26116
|
-
boxWidth = _this$state2.boxWidth,
|
|
26117
|
-
boxHeight = _this$state2.boxHeight;
|
|
26118
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26119
|
-
translateX = this.getTranslate({
|
|
26120
|
-
key: 'x',
|
|
26121
|
-
tooltipDimension: boxWidth,
|
|
26122
|
-
viewBoxDimension: viewBox.width
|
|
26123
|
-
});
|
|
26124
|
-
translateY = this.getTranslate({
|
|
26125
|
-
key: 'y',
|
|
26126
|
-
tooltipDimension: boxHeight,
|
|
26127
|
-
viewBoxDimension: viewBox.height
|
|
26128
|
-
});
|
|
26129
|
-
} else {
|
|
26130
|
-
outerStyle.visibility = 'hidden';
|
|
26131
|
-
}
|
|
26132
|
-
}
|
|
26133
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26134
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26135
|
-
})), outerStyle);
|
|
26136
|
-
if (isAnimationActive && active) {
|
|
26137
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26138
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26139
|
-
})), outerStyle);
|
|
26140
|
-
}
|
|
26141
|
-
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));
|
|
26142
|
-
return (
|
|
26143
|
-
/*#__PURE__*/
|
|
26144
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26145
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26146
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26147
|
-
React__default.createElement("div", {
|
|
26148
|
-
tabIndex: -1,
|
|
26149
|
-
role: "dialog",
|
|
26150
|
-
className: cls,
|
|
26151
|
-
style: outerStyle,
|
|
26152
|
-
ref: function ref(node) {
|
|
26153
|
-
_this2.wrapperNode = node;
|
|
26154
|
-
}
|
|
26155
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26156
|
-
payload: finalPayload
|
|
26157
|
-
})))
|
|
26158
|
-
);
|
|
26159
|
-
}
|
|
26160
|
-
}]);
|
|
26161
|
-
return Tooltip;
|
|
26162
|
-
}(PureComponent);
|
|
26163
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26164
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25949
|
+
var tooltipDefaultProps = {
|
|
26165
25950
|
active: false,
|
|
26166
25951
|
allowEscapeViewBox: {
|
|
26167
25952
|
x: false,
|
|
@@ -26182,6 +25967,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26182
25967
|
x: 0,
|
|
26183
25968
|
y: 0
|
|
26184
25969
|
},
|
|
25970
|
+
// this doesn't exist on TooltipProps
|
|
25971
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25972
|
+
// @ts-ignore
|
|
26185
25973
|
cursorStyle: {},
|
|
26186
25974
|
separator: ' : ',
|
|
26187
25975
|
wrapperStyle: {},
|
|
@@ -26195,7 +25983,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26195
25983
|
animationDuration: 400,
|
|
26196
25984
|
filterNull: true,
|
|
26197
25985
|
useTranslate3d: false
|
|
26198
|
-
}
|
|
25986
|
+
};
|
|
25987
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
25988
|
+
var _classNames;
|
|
25989
|
+
var _useState = useState(-1),
|
|
25990
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
25991
|
+
boxWidth = _useState2[0],
|
|
25992
|
+
setBoxWidth = _useState2[1];
|
|
25993
|
+
var _useState3 = useState(-1),
|
|
25994
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
25995
|
+
boxHeight = _useState4[0],
|
|
25996
|
+
setBoxHeight = _useState4[1];
|
|
25997
|
+
var _useState5 = useState(false),
|
|
25998
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
25999
|
+
dismissed = _useState6[0],
|
|
26000
|
+
setDismissed = _useState6[1];
|
|
26001
|
+
var _useState7 = useState({
|
|
26002
|
+
x: 0,
|
|
26003
|
+
y: 0
|
|
26004
|
+
}),
|
|
26005
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26006
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26007
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26008
|
+
var wrapperNode = useRef();
|
|
26009
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26010
|
+
reverseDirection = props.reverseDirection,
|
|
26011
|
+
coordinate = props.coordinate,
|
|
26012
|
+
offset = props.offset,
|
|
26013
|
+
position = props.position,
|
|
26014
|
+
viewBox = props.viewBox;
|
|
26015
|
+
var handleKeyDown = useCallback(function (event) {
|
|
26016
|
+
if (event.key === 'Escape') {
|
|
26017
|
+
setDismissed(true);
|
|
26018
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26019
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26020
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26021
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26022
|
+
});
|
|
26023
|
+
});
|
|
26024
|
+
}
|
|
26025
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26026
|
+
useEffect(function () {
|
|
26027
|
+
var updateBBox = function updateBBox() {
|
|
26028
|
+
if (dismissed) {
|
|
26029
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26030
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26031
|
+
setDismissed(false);
|
|
26032
|
+
}
|
|
26033
|
+
} else {
|
|
26034
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26035
|
+
}
|
|
26036
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26037
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26038
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26039
|
+
setBoxWidth(box.width);
|
|
26040
|
+
setBoxHeight(box.height);
|
|
26041
|
+
}
|
|
26042
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26043
|
+
setBoxWidth(-1);
|
|
26044
|
+
setBoxHeight(-1);
|
|
26045
|
+
}
|
|
26046
|
+
};
|
|
26047
|
+
updateBBox();
|
|
26048
|
+
return function () {
|
|
26049
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26050
|
+
};
|
|
26051
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26052
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26053
|
+
var key = _ref.key,
|
|
26054
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26055
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26056
|
+
if (position && isNumber(position[key])) {
|
|
26057
|
+
return position[key];
|
|
26058
|
+
}
|
|
26059
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26060
|
+
var positive = coordinate[key] + offset;
|
|
26061
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26062
|
+
return reverseDirection[key] ? negative : positive;
|
|
26063
|
+
}
|
|
26064
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26065
|
+
var _tooltipBoundary = negative;
|
|
26066
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26067
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26068
|
+
return Math.max(positive, viewBox[key]);
|
|
26069
|
+
}
|
|
26070
|
+
return Math.max(negative, viewBox[key]);
|
|
26071
|
+
}
|
|
26072
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26073
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26074
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26075
|
+
return Math.max(negative, viewBox[key]);
|
|
26076
|
+
}
|
|
26077
|
+
return Math.max(positive, viewBox[key]);
|
|
26078
|
+
};
|
|
26079
|
+
var payload = props.payload,
|
|
26080
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26081
|
+
filterNull = props.filterNull,
|
|
26082
|
+
active = props.active,
|
|
26083
|
+
wrapperStyle = props.wrapperStyle,
|
|
26084
|
+
useTranslate3d = props.useTranslate3d,
|
|
26085
|
+
isAnimationActive = props.isAnimationActive,
|
|
26086
|
+
animationDuration = props.animationDuration,
|
|
26087
|
+
animationEasing = props.animationEasing;
|
|
26088
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26089
|
+
return !isNil_1(entry.value);
|
|
26090
|
+
}) : payload);
|
|
26091
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26092
|
+
var content = props.content;
|
|
26093
|
+
var outerStyle = _objectSpread$i({
|
|
26094
|
+
pointerEvents: 'none',
|
|
26095
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26096
|
+
position: 'absolute',
|
|
26097
|
+
top: 0,
|
|
26098
|
+
left: 0
|
|
26099
|
+
}, wrapperStyle);
|
|
26100
|
+
var translateX, translateY;
|
|
26101
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26102
|
+
translateX = position.x;
|
|
26103
|
+
translateY = position.y;
|
|
26104
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26105
|
+
translateX = getTranslate({
|
|
26106
|
+
key: 'x',
|
|
26107
|
+
tooltipDimension: boxWidth,
|
|
26108
|
+
viewBoxDimension: viewBox.width
|
|
26109
|
+
});
|
|
26110
|
+
translateY = getTranslate({
|
|
26111
|
+
key: 'y',
|
|
26112
|
+
tooltipDimension: boxHeight,
|
|
26113
|
+
viewBoxDimension: viewBox.height
|
|
26114
|
+
});
|
|
26115
|
+
} else {
|
|
26116
|
+
outerStyle.visibility = 'hidden';
|
|
26117
|
+
}
|
|
26118
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26119
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26120
|
+
})), outerStyle);
|
|
26121
|
+
if (isAnimationActive && active) {
|
|
26122
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26123
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26124
|
+
})), outerStyle);
|
|
26125
|
+
}
|
|
26126
|
+
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));
|
|
26127
|
+
return (
|
|
26128
|
+
/*#__PURE__*/
|
|
26129
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26130
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26131
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26132
|
+
React__default.createElement("div", {
|
|
26133
|
+
tabIndex: -1,
|
|
26134
|
+
role: "dialog",
|
|
26135
|
+
className: cls,
|
|
26136
|
+
style: outerStyle,
|
|
26137
|
+
ref: wrapperNode
|
|
26138
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26139
|
+
payload: finalPayload
|
|
26140
|
+
})))
|
|
26141
|
+
);
|
|
26142
|
+
};
|
|
26143
|
+
|
|
26144
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26145
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26146
|
+
|
|
26147
|
+
/**
|
|
26148
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26149
|
+
* children.props when there are no props set by the consumer
|
|
26150
|
+
* doesn't work if using default parameters
|
|
26151
|
+
*/
|
|
26152
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26199
26153
|
|
|
26200
26154
|
var root = _root;
|
|
26201
26155
|
|
|
@@ -31765,12 +31719,12 @@ module.exports = exports['default'];
|
|
|
31765
31719
|
|
|
31766
31720
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31767
31721
|
|
|
31768
|
-
function _typeof$
|
|
31769
|
-
function ownKeys$
|
|
31770
|
-
function _objectSpread$
|
|
31771
|
-
function _defineProperty$
|
|
31772
|
-
function _toPropertyKey$
|
|
31773
|
-
function _toPrimitive$
|
|
31722
|
+
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); }
|
|
31723
|
+
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; }
|
|
31724
|
+
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; }
|
|
31725
|
+
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; }
|
|
31726
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31727
|
+
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); }
|
|
31774
31728
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31775
31729
|
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."); }
|
|
31776
31730
|
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); }
|
|
@@ -31838,7 +31792,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31838
31792
|
}
|
|
31839
31793
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31840
31794
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31841
|
-
var measurementSpanStyle = _objectSpread$
|
|
31795
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31842
31796
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31843
31797
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31844
31798
|
return styleKey;
|
|
@@ -31893,11 +31847,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31893
31847
|
};
|
|
31894
31848
|
};
|
|
31895
31849
|
|
|
31896
|
-
var _excluded$
|
|
31897
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31850
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31898
31851
|
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); }
|
|
31899
|
-
function _objectWithoutProperties$
|
|
31900
|
-
function _objectWithoutPropertiesLoose$
|
|
31852
|
+
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; }
|
|
31853
|
+
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; }
|
|
31901
31854
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31902
31855
|
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."); }
|
|
31903
31856
|
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); }
|
|
@@ -32051,46 +32004,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32051
32004
|
}
|
|
32052
32005
|
return getWordsWithoutCalculate(children);
|
|
32053
32006
|
};
|
|
32054
|
-
var
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32062
|
-
|
|
32063
|
-
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32067
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32068
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32069
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32070
|
-
_ref5$fill = _ref5.fill,
|
|
32071
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32072
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32007
|
+
var textDefaultProps = {
|
|
32008
|
+
x: 0,
|
|
32009
|
+
y: 0,
|
|
32010
|
+
lineHeight: '1em',
|
|
32011
|
+
capHeight: '0.71em',
|
|
32012
|
+
// Magic number from d3
|
|
32013
|
+
scaleToFit: false,
|
|
32014
|
+
textAnchor: 'start',
|
|
32015
|
+
verticalAnchor: 'end',
|
|
32016
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32017
|
+
fill: '#808080'
|
|
32018
|
+
};
|
|
32019
|
+
var Text = function Text(props) {
|
|
32073
32020
|
var wordsByLines = useMemo(function () {
|
|
32074
32021
|
return getWordsByLines({
|
|
32075
32022
|
breakAll: props.breakAll,
|
|
32076
32023
|
children: props.children,
|
|
32077
32024
|
maxLines: props.maxLines,
|
|
32078
|
-
scaleToFit: scaleToFit,
|
|
32025
|
+
scaleToFit: props.scaleToFit,
|
|
32079
32026
|
style: props.style,
|
|
32080
32027
|
width: props.width
|
|
32081
32028
|
});
|
|
32082
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32029
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32083
32030
|
var dx = props.dx,
|
|
32084
32031
|
dy = props.dy,
|
|
32032
|
+
textAnchor = props.textAnchor,
|
|
32033
|
+
verticalAnchor = props.verticalAnchor,
|
|
32034
|
+
scaleToFit = props.scaleToFit,
|
|
32085
32035
|
angle = props.angle,
|
|
32036
|
+
lineHeight = props.lineHeight,
|
|
32037
|
+
capHeight = props.capHeight,
|
|
32086
32038
|
className = props.className,
|
|
32087
32039
|
breakAll = props.breakAll,
|
|
32088
|
-
textProps = _objectWithoutProperties$
|
|
32089
|
-
if (!isNumOrStr(
|
|
32040
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32041
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32090
32042
|
return null;
|
|
32091
32043
|
}
|
|
32092
|
-
var x =
|
|
32093
|
-
var y =
|
|
32044
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32045
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32094
32046
|
var startDy;
|
|
32095
32047
|
switch (verticalAnchor) {
|
|
32096
32048
|
case 'start':
|
|
@@ -32120,7 +32072,7 @@ var Text = function Text(_ref5) {
|
|
|
32120
32072
|
y: y,
|
|
32121
32073
|
className: classNames('recharts-text', className),
|
|
32122
32074
|
textAnchor: textAnchor,
|
|
32123
|
-
fill: fill.includes('url') ?
|
|
32075
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32124
32076
|
}), wordsByLines.map(function (line, index) {
|
|
32125
32077
|
return (
|
|
32126
32078
|
/*#__PURE__*/
|
|
@@ -32133,6 +32085,7 @@ var Text = function Text(_ref5) {
|
|
|
32133
32085
|
);
|
|
32134
32086
|
}));
|
|
32135
32087
|
};
|
|
32088
|
+
Text.defaultProps = textDefaultProps;
|
|
32136
32089
|
|
|
32137
32090
|
var baseIsEqual = _baseIsEqual;
|
|
32138
32091
|
|
|
@@ -38400,7 +38353,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38400
38353
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38401
38354
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38402
38355
|
|
|
38403
|
-
var _excluded$
|
|
38356
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38404
38357
|
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); }
|
|
38405
38358
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38406
38359
|
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."); }
|
|
@@ -38408,8 +38361,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38408
38361
|
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; }
|
|
38409
38362
|
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; } }
|
|
38410
38363
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38411
|
-
function _objectWithoutProperties$
|
|
38412
|
-
function _objectWithoutPropertiesLoose$
|
|
38364
|
+
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; }
|
|
38365
|
+
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; }
|
|
38413
38366
|
function ErrorBar(props) {
|
|
38414
38367
|
var offset = props.offset,
|
|
38415
38368
|
layout = props.layout,
|
|
@@ -38419,7 +38372,7 @@ function ErrorBar(props) {
|
|
|
38419
38372
|
dataPointFormatter = props.dataPointFormatter,
|
|
38420
38373
|
xAxis = props.xAxis,
|
|
38421
38374
|
yAxis = props.yAxis,
|
|
38422
|
-
others = _objectWithoutProperties$
|
|
38375
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38423
38376
|
var svgProps = filterProps(others);
|
|
38424
38377
|
var errorBars = data.map(function (entry, i) {
|
|
38425
38378
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38530,18 +38483,18 @@ ErrorBar.defaultProps = {
|
|
|
38530
38483
|
};
|
|
38531
38484
|
ErrorBar.displayName = 'ErrorBar';
|
|
38532
38485
|
|
|
38533
|
-
function _typeof$
|
|
38486
|
+
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); }
|
|
38534
38487
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38535
38488
|
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."); }
|
|
38536
38489
|
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); }
|
|
38537
38490
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38538
38491
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38539
38492
|
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; }
|
|
38540
|
-
function ownKeys$
|
|
38541
|
-
function _objectSpread$
|
|
38542
|
-
function _defineProperty$
|
|
38543
|
-
function _toPropertyKey$
|
|
38544
|
-
function _toPrimitive$
|
|
38493
|
+
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; }
|
|
38494
|
+
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; }
|
|
38495
|
+
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; }
|
|
38496
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38497
|
+
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); }
|
|
38545
38498
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38546
38499
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38547
38500
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38712,7 +38665,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38712
38665
|
};
|
|
38713
38666
|
});
|
|
38714
38667
|
}
|
|
38715
|
-
return _objectSpread$
|
|
38668
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38716
38669
|
payload: legendData,
|
|
38717
38670
|
item: legendItem
|
|
38718
38671
|
});
|
|
@@ -38866,10 +38819,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38866
38819
|
verticalAlign = legendProps.verticalAlign,
|
|
38867
38820
|
layout = legendProps.layout;
|
|
38868
38821
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38869
|
-
newOffset = _objectSpread$
|
|
38822
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38870
38823
|
}
|
|
38871
38824
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38872
|
-
newOffset = _objectSpread$
|
|
38825
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38873
38826
|
}
|
|
38874
38827
|
}
|
|
38875
38828
|
return newOffset;
|
|
@@ -39295,14 +39248,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39295
39248
|
items: [item]
|
|
39296
39249
|
};
|
|
39297
39250
|
}
|
|
39298
|
-
return _objectSpread$
|
|
39251
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39299
39252
|
}, {});
|
|
39300
39253
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39301
39254
|
var group = stackGroups[axisId];
|
|
39302
39255
|
if (group.hasStack) {
|
|
39303
39256
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39304
39257
|
var g = group.stackGroups[stackId];
|
|
39305
|
-
return _objectSpread$
|
|
39258
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39306
39259
|
numericAxisId: numericAxisId,
|
|
39307
39260
|
cateAxisId: cateAxisId,
|
|
39308
39261
|
items: g.items,
|
|
@@ -39310,7 +39263,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39310
39263
|
}));
|
|
39311
39264
|
}, {});
|
|
39312
39265
|
}
|
|
39313
|
-
return _objectSpread$
|
|
39266
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39314
39267
|
}, {});
|
|
39315
39268
|
};
|
|
39316
39269
|
|
|
@@ -39524,7 +39477,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39524
39477
|
formatter = _graphicalItem$props.formatter,
|
|
39525
39478
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39526
39479
|
chartType = _graphicalItem$props.chartType;
|
|
39527
|
-
return _objectSpread$
|
|
39480
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39528
39481
|
dataKey: dataKey,
|
|
39529
39482
|
unit: unit,
|
|
39530
39483
|
formatter: formatter,
|
|
@@ -39537,12 +39490,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39537
39490
|
});
|
|
39538
39491
|
};
|
|
39539
39492
|
|
|
39540
|
-
function _typeof$
|
|
39541
|
-
function ownKeys$
|
|
39542
|
-
function _objectSpread$
|
|
39543
|
-
function _defineProperty$
|
|
39544
|
-
function _toPropertyKey$
|
|
39545
|
-
function _toPrimitive$
|
|
39493
|
+
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); }
|
|
39494
|
+
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; }
|
|
39495
|
+
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; }
|
|
39496
|
+
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; }
|
|
39497
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39498
|
+
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); }
|
|
39546
39499
|
var RADIAN = Math.PI / 180;
|
|
39547
39500
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39548
39501
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39647,7 +39600,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39647
39600
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39648
39601
|
}
|
|
39649
39602
|
if (inRange) {
|
|
39650
|
-
return _objectSpread$
|
|
39603
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39651
39604
|
radius: radius,
|
|
39652
39605
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39653
39606
|
});
|
|
@@ -39655,21 +39608,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39655
39608
|
return null;
|
|
39656
39609
|
};
|
|
39657
39610
|
|
|
39658
|
-
function _typeof$
|
|
39659
|
-
var _excluded$7 = ["offset"];
|
|
39611
|
+
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); }
|
|
39660
39612
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39661
39613
|
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."); }
|
|
39662
39614
|
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); }
|
|
39663
39615
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39664
39616
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39665
39617
|
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; }
|
|
39666
|
-
function
|
|
39667
|
-
function
|
|
39668
|
-
function
|
|
39669
|
-
function
|
|
39670
|
-
function
|
|
39671
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39672
|
-
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); }
|
|
39618
|
+
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; }
|
|
39619
|
+
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; }
|
|
39620
|
+
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; }
|
|
39621
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39622
|
+
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); }
|
|
39673
39623
|
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); }
|
|
39674
39624
|
var getLabel = function getLabel(props) {
|
|
39675
39625
|
var value = props.value,
|
|
@@ -39814,7 +39764,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39814
39764
|
textAnchor: 'middle',
|
|
39815
39765
|
verticalAnchor: verticalEnd
|
|
39816
39766
|
};
|
|
39817
|
-
return _objectSpread$
|
|
39767
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39818
39768
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39819
39769
|
width: width
|
|
39820
39770
|
} : {});
|
|
@@ -39826,7 +39776,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39826
39776
|
textAnchor: 'middle',
|
|
39827
39777
|
verticalAnchor: verticalStart
|
|
39828
39778
|
};
|
|
39829
|
-
return _objectSpread$
|
|
39779
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39830
39780
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39831
39781
|
width: width
|
|
39832
39782
|
} : {});
|
|
@@ -39838,7 +39788,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39838
39788
|
textAnchor: horizontalEnd,
|
|
39839
39789
|
verticalAnchor: 'middle'
|
|
39840
39790
|
};
|
|
39841
|
-
return _objectSpread$
|
|
39791
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39842
39792
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39843
39793
|
height: height
|
|
39844
39794
|
} : {});
|
|
@@ -39850,7 +39800,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39850
39800
|
textAnchor: horizontalStart,
|
|
39851
39801
|
verticalAnchor: 'middle'
|
|
39852
39802
|
};
|
|
39853
|
-
return _objectSpread$
|
|
39803
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39854
39804
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39855
39805
|
height: height
|
|
39856
39806
|
} : {});
|
|
@@ -39860,7 +39810,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39860
39810
|
height: height
|
|
39861
39811
|
} : {};
|
|
39862
39812
|
if (position === 'insideLeft') {
|
|
39863
|
-
return _objectSpread$
|
|
39813
|
+
return _objectSpread$e({
|
|
39864
39814
|
x: x + horizontalOffset,
|
|
39865
39815
|
y: y + height / 2,
|
|
39866
39816
|
textAnchor: horizontalStart,
|
|
@@ -39868,7 +39818,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39868
39818
|
}, sizeAttrs);
|
|
39869
39819
|
}
|
|
39870
39820
|
if (position === 'insideRight') {
|
|
39871
|
-
return _objectSpread$
|
|
39821
|
+
return _objectSpread$e({
|
|
39872
39822
|
x: x + width - horizontalOffset,
|
|
39873
39823
|
y: y + height / 2,
|
|
39874
39824
|
textAnchor: horizontalEnd,
|
|
@@ -39876,7 +39826,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39876
39826
|
}, sizeAttrs);
|
|
39877
39827
|
}
|
|
39878
39828
|
if (position === 'insideTop') {
|
|
39879
|
-
return _objectSpread$
|
|
39829
|
+
return _objectSpread$e({
|
|
39880
39830
|
x: x + width / 2,
|
|
39881
39831
|
y: y + verticalOffset,
|
|
39882
39832
|
textAnchor: 'middle',
|
|
@@ -39884,7 +39834,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39884
39834
|
}, sizeAttrs);
|
|
39885
39835
|
}
|
|
39886
39836
|
if (position === 'insideBottom') {
|
|
39887
|
-
return _objectSpread$
|
|
39837
|
+
return _objectSpread$e({
|
|
39888
39838
|
x: x + width / 2,
|
|
39889
39839
|
y: y + height - verticalOffset,
|
|
39890
39840
|
textAnchor: 'middle',
|
|
@@ -39892,7 +39842,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39892
39842
|
}, sizeAttrs);
|
|
39893
39843
|
}
|
|
39894
39844
|
if (position === 'insideTopLeft') {
|
|
39895
|
-
return _objectSpread$
|
|
39845
|
+
return _objectSpread$e({
|
|
39896
39846
|
x: x + horizontalOffset,
|
|
39897
39847
|
y: y + verticalOffset,
|
|
39898
39848
|
textAnchor: horizontalStart,
|
|
@@ -39900,7 +39850,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39900
39850
|
}, sizeAttrs);
|
|
39901
39851
|
}
|
|
39902
39852
|
if (position === 'insideTopRight') {
|
|
39903
|
-
return _objectSpread$
|
|
39853
|
+
return _objectSpread$e({
|
|
39904
39854
|
x: x + width - horizontalOffset,
|
|
39905
39855
|
y: y + verticalOffset,
|
|
39906
39856
|
textAnchor: horizontalEnd,
|
|
@@ -39908,7 +39858,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39908
39858
|
}, sizeAttrs);
|
|
39909
39859
|
}
|
|
39910
39860
|
if (position === 'insideBottomLeft') {
|
|
39911
|
-
return _objectSpread$
|
|
39861
|
+
return _objectSpread$e({
|
|
39912
39862
|
x: x + horizontalOffset,
|
|
39913
39863
|
y: y + height - verticalOffset,
|
|
39914
39864
|
textAnchor: horizontalStart,
|
|
@@ -39916,7 +39866,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39916
39866
|
}, sizeAttrs);
|
|
39917
39867
|
}
|
|
39918
39868
|
if (position === 'insideBottomRight') {
|
|
39919
|
-
return _objectSpread$
|
|
39869
|
+
return _objectSpread$e({
|
|
39920
39870
|
x: x + width - horizontalOffset,
|
|
39921
39871
|
y: y + height - verticalOffset,
|
|
39922
39872
|
textAnchor: horizontalEnd,
|
|
@@ -39924,14 +39874,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39924
39874
|
}, sizeAttrs);
|
|
39925
39875
|
}
|
|
39926
39876
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39927
|
-
return _objectSpread$
|
|
39877
|
+
return _objectSpread$e({
|
|
39928
39878
|
x: x + getPercentValue(position.x, width),
|
|
39929
39879
|
y: y + getPercentValue(position.y, height),
|
|
39930
39880
|
textAnchor: 'end',
|
|
39931
39881
|
verticalAnchor: 'end'
|
|
39932
39882
|
}, sizeAttrs);
|
|
39933
39883
|
}
|
|
39934
|
-
return _objectSpread$
|
|
39884
|
+
return _objectSpread$e({
|
|
39935
39885
|
x: x + width / 2,
|
|
39936
39886
|
y: y + height / 2,
|
|
39937
39887
|
textAnchor: 'middle',
|
|
@@ -39941,13 +39891,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39941
39891
|
var isPolar = function isPolar(viewBox) {
|
|
39942
39892
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39943
39893
|
};
|
|
39944
|
-
function Label$3(
|
|
39945
|
-
var _ref4$offset = _ref4.offset,
|
|
39946
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39947
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39948
|
-
var props = _objectSpread$h({
|
|
39949
|
-
offset: offset
|
|
39950
|
-
}, restProps);
|
|
39894
|
+
function Label$3(props) {
|
|
39951
39895
|
var viewBox = props.viewBox,
|
|
39952
39896
|
position = props.position,
|
|
39953
39897
|
value = props.value,
|
|
@@ -39984,6 +39928,9 @@ function Label$3(_ref4) {
|
|
|
39984
39928
|
}), label);
|
|
39985
39929
|
}
|
|
39986
39930
|
Label$3.displayName = 'Label';
|
|
39931
|
+
Label$3.defaultProps = {
|
|
39932
|
+
offset: 5
|
|
39933
|
+
};
|
|
39987
39934
|
var parseViewBox = function parseViewBox(props) {
|
|
39988
39935
|
var cx = props.cx,
|
|
39989
39936
|
cy = props.cy,
|
|
@@ -40138,9 +40085,8 @@ function last(array) {
|
|
|
40138
40085
|
|
|
40139
40086
|
var last_1 = last;
|
|
40140
40087
|
|
|
40141
|
-
function _typeof$
|
|
40142
|
-
var _excluded$
|
|
40143
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40088
|
+
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); }
|
|
40089
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40144
40090
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40145
40091
|
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."); }
|
|
40146
40092
|
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); }
|
|
@@ -40148,26 +40094,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40148
40094
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40149
40095
|
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; }
|
|
40150
40096
|
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); }
|
|
40151
|
-
function ownKeys$
|
|
40152
|
-
function _objectSpread$
|
|
40153
|
-
function _defineProperty$
|
|
40154
|
-
function _toPropertyKey$
|
|
40155
|
-
function _toPrimitive$
|
|
40156
|
-
function _objectWithoutProperties$
|
|
40157
|
-
function _objectWithoutPropertiesLoose$
|
|
40158
|
-
var
|
|
40159
|
-
|
|
40160
|
-
|
|
40161
|
-
|
|
40162
|
-
|
|
40163
|
-
|
|
40164
|
-
|
|
40165
|
-
|
|
40166
|
-
dataKey =
|
|
40167
|
-
clockWise =
|
|
40168
|
-
id =
|
|
40169
|
-
textBreakAll =
|
|
40170
|
-
others = _objectWithoutProperties$
|
|
40097
|
+
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; }
|
|
40098
|
+
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; }
|
|
40099
|
+
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; }
|
|
40100
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40101
|
+
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); }
|
|
40102
|
+
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; }
|
|
40103
|
+
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; }
|
|
40104
|
+
var defaultProps = {
|
|
40105
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40106
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40107
|
+
}
|
|
40108
|
+
};
|
|
40109
|
+
function LabelList(props) {
|
|
40110
|
+
var data = props.data,
|
|
40111
|
+
valueAccessor = props.valueAccessor,
|
|
40112
|
+
dataKey = props.dataKey,
|
|
40113
|
+
clockWise = props.clockWise,
|
|
40114
|
+
id = props.id,
|
|
40115
|
+
textBreakAll = props.textBreakAll,
|
|
40116
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40171
40117
|
if (!data || !data.length) {
|
|
40172
40118
|
return null;
|
|
40173
40119
|
}
|
|
@@ -40183,7 +40129,7 @@ function LabelList(_ref) {
|
|
|
40183
40129
|
index: index,
|
|
40184
40130
|
value: value,
|
|
40185
40131
|
textBreakAll: textBreakAll,
|
|
40186
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40132
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40187
40133
|
clockWise: clockWise
|
|
40188
40134
|
})),
|
|
40189
40135
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40238,14 +40184,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40238
40184
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40239
40185
|
}
|
|
40240
40186
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40187
|
+
LabelList.defaultProps = defaultProps;
|
|
40241
40188
|
|
|
40242
|
-
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); }
|
|
40243
40189
|
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); }
|
|
40244
|
-
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; }
|
|
40245
|
-
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; }
|
|
40246
|
-
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; }
|
|
40247
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40248
|
-
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); }
|
|
40249
40190
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40250
40191
|
var sign = mathSign(endAngle - startAngle);
|
|
40251
40192
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40386,19 +40327,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40386
40327
|
}
|
|
40387
40328
|
return path;
|
|
40388
40329
|
};
|
|
40389
|
-
var
|
|
40390
|
-
cx: 0,
|
|
40391
|
-
cy: 0,
|
|
40392
|
-
innerRadius: 0,
|
|
40393
|
-
outerRadius: 0,
|
|
40394
|
-
startAngle: 0,
|
|
40395
|
-
endAngle: 0,
|
|
40396
|
-
cornerRadius: 0,
|
|
40397
|
-
forceCornerRadius: false,
|
|
40398
|
-
cornerIsExternal: false
|
|
40399
|
-
};
|
|
40400
|
-
var Sector = function Sector(sectorProps) {
|
|
40401
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40330
|
+
var Sector = function Sector(props) {
|
|
40402
40331
|
var cx = props.cx,
|
|
40403
40332
|
cy = props.cy,
|
|
40404
40333
|
innerRadius = props.innerRadius,
|
|
@@ -40444,14 +40373,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40444
40373
|
role: "img"
|
|
40445
40374
|
}));
|
|
40446
40375
|
};
|
|
40376
|
+
Sector.defaultProps = {
|
|
40377
|
+
cx: 0,
|
|
40378
|
+
cy: 0,
|
|
40379
|
+
innerRadius: 0,
|
|
40380
|
+
outerRadius: 0,
|
|
40381
|
+
startAngle: 0,
|
|
40382
|
+
endAngle: 0,
|
|
40383
|
+
cornerRadius: 0,
|
|
40384
|
+
forceCornerRadius: false,
|
|
40385
|
+
cornerIsExternal: false
|
|
40386
|
+
};
|
|
40447
40387
|
|
|
40448
|
-
function _typeof$
|
|
40388
|
+
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); }
|
|
40449
40389
|
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); }
|
|
40450
|
-
function ownKeys$
|
|
40451
|
-
function _objectSpread$
|
|
40452
|
-
function _defineProperty$
|
|
40453
|
-
function _toPropertyKey$
|
|
40454
|
-
function _toPrimitive$
|
|
40390
|
+
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; }
|
|
40391
|
+
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; }
|
|
40392
|
+
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; }
|
|
40393
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40394
|
+
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); }
|
|
40455
40395
|
var CURVE_FACTORIES = {
|
|
40456
40396
|
curveBasisClosed: curveBasisClosed,
|
|
40457
40397
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40491,14 +40431,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40491
40431
|
* @return {String} path
|
|
40492
40432
|
*/
|
|
40493
40433
|
var getPath$1 = function getPath(_ref) {
|
|
40494
|
-
var
|
|
40495
|
-
|
|
40496
|
-
_ref$points = _ref.points,
|
|
40497
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40434
|
+
var type = _ref.type,
|
|
40435
|
+
points = _ref.points,
|
|
40498
40436
|
baseLine = _ref.baseLine,
|
|
40499
40437
|
layout = _ref.layout,
|
|
40500
|
-
|
|
40501
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40438
|
+
connectNulls = _ref.connectNulls;
|
|
40502
40439
|
var curveFactory = getCurveFactory(type, layout);
|
|
40503
40440
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40504
40441
|
return defined(entry);
|
|
@@ -40509,7 +40446,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40509
40446
|
return defined(base);
|
|
40510
40447
|
}) : baseLine;
|
|
40511
40448
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40512
|
-
return _objectSpread$
|
|
40449
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40513
40450
|
base: formatBaseLine[index]
|
|
40514
40451
|
});
|
|
40515
40452
|
});
|
|
@@ -40550,8 +40487,12 @@ var Curve = function Curve(props) {
|
|
|
40550
40487
|
ref: pathRef
|
|
40551
40488
|
}));
|
|
40552
40489
|
};
|
|
40490
|
+
Curve.defaultProps = {
|
|
40491
|
+
type: 'linear',
|
|
40492
|
+
points: [],
|
|
40493
|
+
connectNulls: false
|
|
40494
|
+
};
|
|
40553
40495
|
|
|
40554
|
-
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); }
|
|
40555
40496
|
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); }
|
|
40556
40497
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40557
40498
|
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."); }
|
|
@@ -40559,11 +40500,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40559
40500
|
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; }
|
|
40560
40501
|
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; } }
|
|
40561
40502
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40562
|
-
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; }
|
|
40563
|
-
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; }
|
|
40564
|
-
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; }
|
|
40565
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40566
|
-
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); }
|
|
40567
40503
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40568
40504
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40569
40505
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40619,29 +40555,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40619
40555
|
}
|
|
40620
40556
|
return false;
|
|
40621
40557
|
};
|
|
40622
|
-
var
|
|
40623
|
-
x: 0,
|
|
40624
|
-
y: 0,
|
|
40625
|
-
width: 0,
|
|
40626
|
-
height: 0,
|
|
40627
|
-
// The radius of border
|
|
40628
|
-
// The radius of four corners when radius is a number
|
|
40629
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40630
|
-
radius: 0,
|
|
40631
|
-
isAnimationActive: false,
|
|
40632
|
-
isUpdateAnimationActive: false,
|
|
40633
|
-
animationBegin: 0,
|
|
40634
|
-
animationDuration: 1500,
|
|
40635
|
-
animationEasing: 'ease'
|
|
40636
|
-
};
|
|
40637
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40638
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40558
|
+
var Rectangle = function Rectangle(props) {
|
|
40639
40559
|
var pathRef = useRef();
|
|
40640
40560
|
var _useState = useState(-1),
|
|
40641
40561
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40642
40562
|
totalLength = _useState2[0],
|
|
40643
40563
|
setTotalLength = _useState2[1];
|
|
40644
|
-
|
|
40564
|
+
useLayoutEffect(function () {
|
|
40645
40565
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40646
40566
|
try {
|
|
40647
40567
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40712,6 +40632,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40712
40632
|
})));
|
|
40713
40633
|
});
|
|
40714
40634
|
};
|
|
40635
|
+
Rectangle.defaultProps = {
|
|
40636
|
+
x: 0,
|
|
40637
|
+
y: 0,
|
|
40638
|
+
width: 0,
|
|
40639
|
+
height: 0,
|
|
40640
|
+
// The radius of border
|
|
40641
|
+
// The radius of four corners when radius is a number
|
|
40642
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40643
|
+
radius: 0,
|
|
40644
|
+
isAnimationActive: false,
|
|
40645
|
+
isUpdateAnimationActive: false,
|
|
40646
|
+
animationBegin: 0,
|
|
40647
|
+
animationDuration: 1500,
|
|
40648
|
+
animationEasing: 'ease'
|
|
40649
|
+
};
|
|
40715
40650
|
|
|
40716
40651
|
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); }
|
|
40717
40652
|
var Dot$1 = function Dot(props) {
|
|
@@ -40731,42 +40666,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40731
40666
|
return null;
|
|
40732
40667
|
};
|
|
40733
40668
|
|
|
40734
|
-
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); }
|
|
40735
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40736
40669
|
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); }
|
|
40737
|
-
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; }
|
|
40738
|
-
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; }
|
|
40739
|
-
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; }
|
|
40740
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40741
|
-
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); }
|
|
40742
|
-
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; }
|
|
40743
|
-
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; }
|
|
40744
40670
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40745
40671
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40746
40672
|
};
|
|
40747
|
-
var Cross = function Cross(
|
|
40748
|
-
var
|
|
40749
|
-
|
|
40750
|
-
|
|
40751
|
-
|
|
40752
|
-
|
|
40753
|
-
|
|
40754
|
-
|
|
40755
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40756
|
-
_ref$width = _ref.width,
|
|
40757
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40758
|
-
_ref$height = _ref.height,
|
|
40759
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40760
|
-
className = _ref.className,
|
|
40761
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40762
|
-
var props = _objectSpread$c({
|
|
40763
|
-
x: x,
|
|
40764
|
-
y: y,
|
|
40765
|
-
top: top,
|
|
40766
|
-
left: left,
|
|
40767
|
-
width: width,
|
|
40768
|
-
height: height
|
|
40769
|
-
}, rest);
|
|
40673
|
+
var Cross = function Cross(props) {
|
|
40674
|
+
var x = props.x,
|
|
40675
|
+
y = props.y,
|
|
40676
|
+
width = props.width,
|
|
40677
|
+
height = props.height,
|
|
40678
|
+
top = props.top,
|
|
40679
|
+
left = props.left,
|
|
40680
|
+
className = props.className;
|
|
40770
40681
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40771
40682
|
return null;
|
|
40772
40683
|
}
|
|
@@ -40775,6 +40686,14 @@ var Cross = function Cross(_ref) {
|
|
|
40775
40686
|
d: getPath(x, y, width, height, top, left)
|
|
40776
40687
|
}));
|
|
40777
40688
|
};
|
|
40689
|
+
Cross.defaultProps = {
|
|
40690
|
+
x: 0,
|
|
40691
|
+
y: 0,
|
|
40692
|
+
top: 0,
|
|
40693
|
+
left: 0,
|
|
40694
|
+
width: 0,
|
|
40695
|
+
height: 0
|
|
40696
|
+
};
|
|
40778
40697
|
|
|
40779
40698
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40780
40699
|
|
|
@@ -40984,7 +40903,6 @@ var createScale = function createScale(_ref) {
|
|
|
40984
40903
|
isTextActive: false,
|
|
40985
40904
|
isSlideMoving: false,
|
|
40986
40905
|
isTravellerMoving: false,
|
|
40987
|
-
isTravellerFocused: false,
|
|
40988
40906
|
startX: scale(startIndex),
|
|
40989
40907
|
endX: scale(endIndex),
|
|
40990
40908
|
scale: scale,
|
|
@@ -41198,38 +41116,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41198
41116
|
}
|
|
41199
41117
|
});
|
|
41200
41118
|
}
|
|
41201
|
-
}, {
|
|
41202
|
-
key: "handleTravellerMoveKeyboard",
|
|
41203
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41204
|
-
var _this2 = this;
|
|
41205
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41206
|
-
var _this$state3 = this.state,
|
|
41207
|
-
scaleValues = _this$state3.scaleValues,
|
|
41208
|
-
startX = _this$state3.startX,
|
|
41209
|
-
endX = _this$state3.endX;
|
|
41210
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41211
|
-
var currentScaleValue = this.state[id];
|
|
41212
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41213
|
-
if (currentIndex === -1) {
|
|
41214
|
-
return;
|
|
41215
|
-
}
|
|
41216
|
-
var newIndex = currentIndex + direction;
|
|
41217
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41218
|
-
return;
|
|
41219
|
-
}
|
|
41220
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41221
|
-
|
|
41222
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41223
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41224
|
-
return;
|
|
41225
|
-
}
|
|
41226
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41227
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41228
|
-
startX: _this2.state.startX,
|
|
41229
|
-
endX: _this2.state.endX
|
|
41230
|
-
}));
|
|
41231
|
-
});
|
|
41232
|
-
}
|
|
41233
41119
|
}, {
|
|
41234
41120
|
key: "renderBackground",
|
|
41235
41121
|
value: function renderBackground() {
|
|
@@ -41277,7 +41163,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41277
41163
|
}, {
|
|
41278
41164
|
key: "renderTravellerLayer",
|
|
41279
41165
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41280
|
-
var _this3 = this;
|
|
41281
41166
|
var _this$props7 = this.props,
|
|
41282
41167
|
y = _this$props7.y,
|
|
41283
41168
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41291,31 +41176,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41291
41176
|
height: height
|
|
41292
41177
|
});
|
|
41293
41178
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41294
|
-
tabIndex: 0,
|
|
41295
|
-
role: "slider",
|
|
41296
41179
|
className: "recharts-brush-traveller",
|
|
41297
41180
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41298
41181
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41299
41182
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41300
41183
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41301
|
-
onKeyDown: function onKeyDown(e) {
|
|
41302
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41303
|
-
return;
|
|
41304
|
-
}
|
|
41305
|
-
e.preventDefault();
|
|
41306
|
-
e.stopPropagation();
|
|
41307
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41308
|
-
},
|
|
41309
|
-
onFocus: function onFocus() {
|
|
41310
|
-
_this3.setState({
|
|
41311
|
-
isTravellerFocused: true
|
|
41312
|
-
});
|
|
41313
|
-
},
|
|
41314
|
-
onBlur: function onBlur() {
|
|
41315
|
-
_this3.setState({
|
|
41316
|
-
isTravellerFocused: false
|
|
41317
|
-
});
|
|
41318
|
-
},
|
|
41319
41184
|
style: {
|
|
41320
41185
|
cursor: 'col-resize'
|
|
41321
41186
|
}
|
|
@@ -41359,9 +41224,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41359
41224
|
height = _this$props9.height,
|
|
41360
41225
|
travellerWidth = _this$props9.travellerWidth,
|
|
41361
41226
|
stroke = _this$props9.stroke;
|
|
41362
|
-
var _this$
|
|
41363
|
-
startX = _this$
|
|
41364
|
-
endX = _this$
|
|
41227
|
+
var _this$state3 = this.state,
|
|
41228
|
+
startX = _this$state3.startX,
|
|
41229
|
+
endX = _this$state3.endX;
|
|
41365
41230
|
var offset = 5;
|
|
41366
41231
|
var attrs = {
|
|
41367
41232
|
pointerEvents: 'none',
|
|
@@ -41393,13 +41258,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41393
41258
|
width = _this$props10.width,
|
|
41394
41259
|
height = _this$props10.height,
|
|
41395
41260
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41396
|
-
var _this$
|
|
41397
|
-
startX = _this$
|
|
41398
|
-
endX = _this$
|
|
41399
|
-
isTextActive = _this$
|
|
41400
|
-
isSlideMoving = _this$
|
|
41401
|
-
isTravellerMoving = _this$
|
|
41402
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41261
|
+
var _this$state4 = this.state,
|
|
41262
|
+
startX = _this$state4.startX,
|
|
41263
|
+
endX = _this$state4.endX,
|
|
41264
|
+
isTextActive = _this$state4.isTextActive,
|
|
41265
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41266
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41403
41267
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41404
41268
|
return null;
|
|
41405
41269
|
}
|
|
@@ -41411,7 +41275,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41411
41275
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41412
41276
|
onTouchMove: this.handleTouchMove,
|
|
41413
41277
|
style: style
|
|
41414
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41278
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41415
41279
|
}
|
|
41416
41280
|
}], [{
|
|
41417
41281
|
key: "renderDefaultTraveller",
|
|
@@ -41729,7 +41593,7 @@ function every(collection, predicate, guard) {
|
|
|
41729
41593
|
|
|
41730
41594
|
var every_1 = every;
|
|
41731
41595
|
|
|
41732
|
-
var defineProperty = _defineProperty$
|
|
41596
|
+
var defineProperty = _defineProperty$l;
|
|
41733
41597
|
|
|
41734
41598
|
/**
|
|
41735
41599
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42090,6 +41954,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42090
41954
|
legendType: 'rect',
|
|
42091
41955
|
minPointSize: 0,
|
|
42092
41956
|
hide: false,
|
|
41957
|
+
// data of bar
|
|
42093
41958
|
data: [],
|
|
42094
41959
|
layout: 'vertical',
|
|
42095
41960
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45002,11 +44867,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45002
44867
|
}
|
|
45003
44868
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45004
44869
|
x = _this$container$getBo.x,
|
|
45005
|
-
y = _this$container$getBo.y
|
|
45006
|
-
height = _this$container$getBo.height;
|
|
44870
|
+
y = _this$container$getBo.y;
|
|
45007
44871
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45008
44872
|
var pageX = x + coordinate;
|
|
45009
|
-
var pageY = y + this.offset.top
|
|
44873
|
+
var pageY = y + this.offset.top;
|
|
45010
44874
|
this.mouseHandlerCallback({
|
|
45011
44875
|
pageX: pageX,
|
|
45012
44876
|
pageY: pageY
|
|
@@ -47766,8 +47630,8 @@ var ProgressChart = function (_a) {
|
|
|
47766
47630
|
return parseISO(date) >= start;
|
|
47767
47631
|
});
|
|
47768
47632
|
var _a = prepareData(period, passedExercisesAfterStart), resultsByInterval = _a.resultsByInterval, xAxisTicks = _a.xAxisTicks;
|
|
47769
|
-
var count = passedExercisesBeforeStart.length;
|
|
47770
47633
|
setData(function () {
|
|
47634
|
+
var count = passedExercisesBeforeStart.length;
|
|
47771
47635
|
return resultsByInterval.map(function (exercises, index) {
|
|
47772
47636
|
count += exercises.length;
|
|
47773
47637
|
var progress = Math.floor(100 / (nExercisesInCourse / count));
|