@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.js
CHANGED
|
@@ -4516,7 +4516,7 @@ function requiredArgs(required, args) {
|
|
|
4516
4516
|
}
|
|
4517
4517
|
}
|
|
4518
4518
|
|
|
4519
|
-
function _typeof$
|
|
4519
|
+
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); }
|
|
4520
4520
|
/**
|
|
4521
4521
|
* @name toDate
|
|
4522
4522
|
* @category Common Helpers
|
|
@@ -4552,7 +4552,7 @@ function toDate(argument) {
|
|
|
4552
4552
|
requiredArgs(1, arguments);
|
|
4553
4553
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4554
4554
|
|
|
4555
|
-
if (argument instanceof Date || _typeof$
|
|
4555
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4556
4556
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4557
4557
|
return new Date(argument.getTime());
|
|
4558
4558
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4823,7 +4823,7 @@ var millisecondsInMinute = 60000;
|
|
|
4823
4823
|
|
|
4824
4824
|
var millisecondsInHour = 3600000;
|
|
4825
4825
|
|
|
4826
|
-
function _typeof$
|
|
4826
|
+
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); }
|
|
4827
4827
|
/**
|
|
4828
4828
|
* @name isDate
|
|
4829
4829
|
* @category Common Helpers
|
|
@@ -4859,7 +4859,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4859
4859
|
|
|
4860
4860
|
function isDate(value) {
|
|
4861
4861
|
requiredArgs(1, arguments);
|
|
4862
|
-
return value instanceof Date || _typeof$
|
|
4862
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4863
4863
|
}
|
|
4864
4864
|
|
|
4865
4865
|
/**
|
|
@@ -13526,15 +13526,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13526
13526
|
|
|
13527
13527
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13528
13528
|
|
|
13529
|
-
function _slicedToArray$
|
|
13530
|
-
return _arrayWithHoles$
|
|
13529
|
+
function _slicedToArray$d(arr, i) {
|
|
13530
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13531
13531
|
}
|
|
13532
13532
|
|
|
13533
|
-
function _arrayWithHoles$
|
|
13533
|
+
function _arrayWithHoles$e(arr) {
|
|
13534
13534
|
if (Array.isArray(arr)) return arr;
|
|
13535
13535
|
}
|
|
13536
13536
|
|
|
13537
|
-
function _iterableToArrayLimit$
|
|
13537
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13538
13538
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13539
13539
|
|
|
13540
13540
|
if (_i == null) return;
|
|
@@ -13564,16 +13564,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13564
13564
|
return _arr;
|
|
13565
13565
|
}
|
|
13566
13566
|
|
|
13567
|
-
function _unsupportedIterableToArray$
|
|
13567
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13568
13568
|
if (!o) return;
|
|
13569
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13569
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13570
13570
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13571
13571
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13572
13572
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13573
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13573
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13574
13574
|
}
|
|
13575
13575
|
|
|
13576
|
-
function _arrayLikeToArray$
|
|
13576
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13577
13577
|
if (len == null || len > arr.length) len = arr.length;
|
|
13578
13578
|
|
|
13579
13579
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13581,7 +13581,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13581
13581
|
return arr2;
|
|
13582
13582
|
}
|
|
13583
13583
|
|
|
13584
|
-
function _nonIterableRest$
|
|
13584
|
+
function _nonIterableRest$e() {
|
|
13585
13585
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13586
13586
|
}
|
|
13587
13587
|
|
|
@@ -13645,7 +13645,7 @@ reservedProps.forEach(function (name) {
|
|
|
13645
13645
|
// This is a mapping from React prop names to the attribute names.
|
|
13646
13646
|
|
|
13647
13647
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13648
|
-
var _ref2 = _slicedToArray$
|
|
13648
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13649
13649
|
name = _ref2[0],
|
|
13650
13650
|
attributeName = _ref2[1];
|
|
13651
13651
|
|
|
@@ -16045,31 +16045,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16045
16045
|
return true;
|
|
16046
16046
|
};
|
|
16047
16047
|
|
|
16048
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16048
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16049
16049
|
|
|
16050
16050
|
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."); }
|
|
16051
16051
|
|
|
16052
16052
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16053
16053
|
|
|
16054
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16054
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16055
16055
|
|
|
16056
|
-
function ownKeys$
|
|
16056
|
+
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; }
|
|
16057
16057
|
|
|
16058
|
-
function _objectSpread$
|
|
16058
|
+
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; }
|
|
16059
16059
|
|
|
16060
|
-
function _defineProperty$
|
|
16060
|
+
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; }
|
|
16061
16061
|
|
|
16062
|
-
function _slicedToArray$
|
|
16062
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16063
16063
|
|
|
16064
|
-
function _nonIterableRest$
|
|
16064
|
+
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."); }
|
|
16065
16065
|
|
|
16066
|
-
function _unsupportedIterableToArray$
|
|
16066
|
+
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); }
|
|
16067
16067
|
|
|
16068
|
-
function _arrayLikeToArray$
|
|
16068
|
+
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; }
|
|
16069
16069
|
|
|
16070
|
-
function _iterableToArrayLimit$
|
|
16070
|
+
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; }
|
|
16071
16071
|
|
|
16072
|
-
function _arrayWithHoles$
|
|
16072
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16073
16073
|
|
|
16074
16074
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16075
16075
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16149,11 +16149,11 @@ function allFilesAccepted(_ref) {
|
|
|
16149
16149
|
|
|
16150
16150
|
return files.every(function (file) {
|
|
16151
16151
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16152
|
-
_fileAccepted2 = _slicedToArray$
|
|
16152
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16153
16153
|
accepted = _fileAccepted2[0];
|
|
16154
16154
|
|
|
16155
16155
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16156
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16156
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16157
16157
|
sizeMatch = _fileMatchSize2[0];
|
|
16158
16158
|
|
|
16159
16159
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16250,7 +16250,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16250
16250
|
function pickerOptionsFromAccept(accept) {
|
|
16251
16251
|
if (isDefined(accept)) {
|
|
16252
16252
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16253
|
-
var _ref3 = _slicedToArray$
|
|
16253
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16254
16254
|
mimeType = _ref3[0],
|
|
16255
16255
|
ext = _ref3[1];
|
|
16256
16256
|
|
|
@@ -16268,11 +16268,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16268
16268
|
|
|
16269
16269
|
return ok;
|
|
16270
16270
|
}).reduce(function (agg, _ref4) {
|
|
16271
|
-
var _ref5 = _slicedToArray$
|
|
16271
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16272
16272
|
mimeType = _ref5[0],
|
|
16273
16273
|
ext = _ref5[1];
|
|
16274
16274
|
|
|
16275
|
-
return _objectSpread$
|
|
16275
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16276
16276
|
}, {});
|
|
16277
16277
|
return [{
|
|
16278
16278
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16292,7 +16292,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16292
16292
|
function acceptPropAsAcceptAttr(accept) {
|
|
16293
16293
|
if (isDefined(accept)) {
|
|
16294
16294
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16295
|
-
var _ref7 = _slicedToArray$
|
|
16295
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16296
16296
|
mimeType = _ref7[0],
|
|
16297
16297
|
ext = _ref7[1];
|
|
16298
16298
|
|
|
@@ -16360,40 +16360,40 @@ function isExt(v) {
|
|
|
16360
16360
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16361
16361
|
*/
|
|
16362
16362
|
|
|
16363
|
-
var _excluded$
|
|
16364
|
-
_excluded2$
|
|
16363
|
+
var _excluded$d = ["children"],
|
|
16364
|
+
_excluded2$3 = ["open"],
|
|
16365
16365
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16366
16366
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16367
16367
|
|
|
16368
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16368
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16369
16369
|
|
|
16370
16370
|
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."); }
|
|
16371
16371
|
|
|
16372
16372
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16373
16373
|
|
|
16374
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16374
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16375
16375
|
|
|
16376
|
-
function _slicedToArray$
|
|
16376
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16377
16377
|
|
|
16378
|
-
function _nonIterableRest$
|
|
16378
|
+
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."); }
|
|
16379
16379
|
|
|
16380
|
-
function _unsupportedIterableToArray$
|
|
16380
|
+
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); }
|
|
16381
16381
|
|
|
16382
|
-
function _arrayLikeToArray$
|
|
16382
|
+
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; }
|
|
16383
16383
|
|
|
16384
|
-
function _iterableToArrayLimit$
|
|
16384
|
+
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; }
|
|
16385
16385
|
|
|
16386
|
-
function _arrayWithHoles$
|
|
16386
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16387
16387
|
|
|
16388
|
-
function ownKeys$
|
|
16388
|
+
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; }
|
|
16389
16389
|
|
|
16390
|
-
function _objectSpread$
|
|
16390
|
+
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; }
|
|
16391
16391
|
|
|
16392
|
-
function _defineProperty$
|
|
16392
|
+
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; }
|
|
16393
16393
|
|
|
16394
|
-
function _objectWithoutProperties$
|
|
16394
|
+
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; }
|
|
16395
16395
|
|
|
16396
|
-
function _objectWithoutPropertiesLoose$
|
|
16396
|
+
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; }
|
|
16397
16397
|
/**
|
|
16398
16398
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16399
16399
|
*
|
|
@@ -16411,11 +16411,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16411
16411
|
|
|
16412
16412
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16413
16413
|
var children = _ref.children,
|
|
16414
|
-
params = _objectWithoutProperties$
|
|
16414
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16415
16415
|
|
|
16416
16416
|
var _useDropzone = useDropzone(params),
|
|
16417
16417
|
open = _useDropzone.open,
|
|
16418
|
-
props = _objectWithoutProperties$
|
|
16418
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16419
16419
|
|
|
16420
16420
|
React$3.useImperativeHandle(ref, function () {
|
|
16421
16421
|
return {
|
|
@@ -16423,13 +16423,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16423
16423
|
};
|
|
16424
16424
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16425
16425
|
|
|
16426
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16426
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16427
16427
|
open: open
|
|
16428
16428
|
})));
|
|
16429
16429
|
});
|
|
16430
16430
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16431
16431
|
|
|
16432
|
-
var defaultProps$
|
|
16432
|
+
var defaultProps$1 = {
|
|
16433
16433
|
disabled: false,
|
|
16434
16434
|
getFilesFromEvent: fromEvent,
|
|
16435
16435
|
maxSize: Infinity,
|
|
@@ -16445,7 +16445,7 @@ var defaultProps$2 = {
|
|
|
16445
16445
|
useFsAccessApi: true,
|
|
16446
16446
|
autoFocus: false
|
|
16447
16447
|
};
|
|
16448
|
-
Dropzone.defaultProps = defaultProps$
|
|
16448
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16449
16449
|
Dropzone.propTypes = {
|
|
16450
16450
|
/**
|
|
16451
16451
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16796,7 +16796,7 @@ var initialState = {
|
|
|
16796
16796
|
function useDropzone() {
|
|
16797
16797
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16798
16798
|
|
|
16799
|
-
var _defaultProps$props = _objectSpread$
|
|
16799
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16800
16800
|
accept = _defaultProps$props.accept,
|
|
16801
16801
|
disabled = _defaultProps$props.disabled,
|
|
16802
16802
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16843,7 +16843,7 @@ function useDropzone() {
|
|
|
16843
16843
|
var inputRef = React$3.useRef(null);
|
|
16844
16844
|
|
|
16845
16845
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
16846
|
-
_useReducer2 = _slicedToArray$
|
|
16846
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
16847
16847
|
state = _useReducer2[0],
|
|
16848
16848
|
dispatch = _useReducer2[1];
|
|
16849
16849
|
|
|
@@ -17013,12 +17013,12 @@ function useDropzone() {
|
|
|
17013
17013
|
var fileRejections = [];
|
|
17014
17014
|
files.forEach(function (file) {
|
|
17015
17015
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17016
|
-
_fileAccepted2 = _slicedToArray$
|
|
17016
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17017
17017
|
accepted = _fileAccepted2[0],
|
|
17018
17018
|
acceptError = _fileAccepted2[1];
|
|
17019
17019
|
|
|
17020
17020
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17021
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17021
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17022
17022
|
sizeMatch = _fileMatchSize2[0],
|
|
17023
17023
|
sizeError = _fileMatchSize2[1];
|
|
17024
17024
|
|
|
@@ -17219,9 +17219,9 @@ function useDropzone() {
|
|
|
17219
17219
|
onDragOver = _ref2.onDragOver,
|
|
17220
17220
|
onDragLeave = _ref2.onDragLeave,
|
|
17221
17221
|
onDrop = _ref2.onDrop,
|
|
17222
|
-
rest = _objectWithoutProperties$
|
|
17222
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17223
17223
|
|
|
17224
|
-
return _objectSpread$
|
|
17224
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17225
17225
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17226
17226
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17227
17227
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17246,9 +17246,9 @@ function useDropzone() {
|
|
|
17246
17246
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17247
17247
|
onChange = _ref3.onChange,
|
|
17248
17248
|
onClick = _ref3.onClick,
|
|
17249
|
-
rest = _objectWithoutProperties$
|
|
17249
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17250
17250
|
|
|
17251
|
-
var inputProps = _defineProperty$
|
|
17251
|
+
var inputProps = _defineProperty$r({
|
|
17252
17252
|
accept: acceptAttr,
|
|
17253
17253
|
multiple: multiple,
|
|
17254
17254
|
type: "file",
|
|
@@ -17260,10 +17260,10 @@ function useDropzone() {
|
|
|
17260
17260
|
tabIndex: -1
|
|
17261
17261
|
}, refKey, inputRef);
|
|
17262
17262
|
|
|
17263
|
-
return _objectSpread$
|
|
17263
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17264
17264
|
};
|
|
17265
17265
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17266
|
-
return _objectSpread$
|
|
17266
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17267
17267
|
isFocused: isFocused && !disabled,
|
|
17268
17268
|
getRootProps: getRootProps,
|
|
17269
17269
|
getInputProps: getInputProps,
|
|
@@ -17282,40 +17282,40 @@ function reducer$1(state, action) {
|
|
|
17282
17282
|
/* istanbul ignore next */
|
|
17283
17283
|
switch (action.type) {
|
|
17284
17284
|
case "focus":
|
|
17285
|
-
return _objectSpread$
|
|
17285
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17286
17286
|
isFocused: true
|
|
17287
17287
|
});
|
|
17288
17288
|
|
|
17289
17289
|
case "blur":
|
|
17290
|
-
return _objectSpread$
|
|
17290
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17291
17291
|
isFocused: false
|
|
17292
17292
|
});
|
|
17293
17293
|
|
|
17294
17294
|
case "openDialog":
|
|
17295
|
-
return _objectSpread$
|
|
17295
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17296
17296
|
isFileDialogActive: true
|
|
17297
17297
|
});
|
|
17298
17298
|
|
|
17299
17299
|
case "closeDialog":
|
|
17300
|
-
return _objectSpread$
|
|
17300
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17301
17301
|
isFileDialogActive: false
|
|
17302
17302
|
});
|
|
17303
17303
|
|
|
17304
17304
|
case "setDraggedFiles":
|
|
17305
|
-
return _objectSpread$
|
|
17305
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17306
17306
|
isDragActive: action.isDragActive,
|
|
17307
17307
|
isDragAccept: action.isDragAccept,
|
|
17308
17308
|
isDragReject: action.isDragReject
|
|
17309
17309
|
});
|
|
17310
17310
|
|
|
17311
17311
|
case "setFiles":
|
|
17312
|
-
return _objectSpread$
|
|
17312
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17313
17313
|
acceptedFiles: action.acceptedFiles,
|
|
17314
17314
|
fileRejections: action.fileRejections
|
|
17315
17315
|
});
|
|
17316
17316
|
|
|
17317
17317
|
case "reset":
|
|
17318
|
-
return _objectSpread$
|
|
17318
|
+
return _objectSpread$p({}, initialState);
|
|
17319
17319
|
|
|
17320
17320
|
default:
|
|
17321
17321
|
return state;
|
|
@@ -19541,7 +19541,7 @@ function shallowEqual(a, b) {
|
|
|
19541
19541
|
return true;
|
|
19542
19542
|
}
|
|
19543
19543
|
|
|
19544
|
-
function _typeof$
|
|
19544
|
+
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); }
|
|
19545
19545
|
|
|
19546
19546
|
//
|
|
19547
19547
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19568,9 +19568,7 @@ var FilteredElementKeyMap = {
|
|
|
19568
19568
|
};
|
|
19569
19569
|
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'];
|
|
19570
19570
|
|
|
19571
|
-
|
|
19572
|
-
|
|
19573
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19571
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19574
19572
|
|
|
19575
19573
|
/** the offset of a chart, which define the blank space all around */
|
|
19576
19574
|
|
|
@@ -19606,7 +19604,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19606
19604
|
};
|
|
19607
19605
|
};
|
|
19608
19606
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19609
|
-
if (!isObject_1(props) || _typeof$
|
|
19607
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19610
19608
|
return null;
|
|
19611
19609
|
}
|
|
19612
19610
|
var out = null;
|
|
@@ -19620,11 +19618,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19620
19618
|
return out;
|
|
19621
19619
|
};
|
|
19622
19620
|
|
|
19623
|
-
var _excluded$
|
|
19624
|
-
_excluded2$
|
|
19625
|
-
function _objectWithoutProperties$
|
|
19626
|
-
function _objectWithoutPropertiesLoose$
|
|
19627
|
-
function _typeof$
|
|
19621
|
+
var _excluded$c = ["children"],
|
|
19622
|
+
_excluded2$2 = ["children"];
|
|
19623
|
+
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; }
|
|
19624
|
+
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; }
|
|
19625
|
+
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); }
|
|
19628
19626
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19629
19627
|
click: 'onClick',
|
|
19630
19628
|
mousedown: 'onMouseDown',
|
|
@@ -19731,7 +19729,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19731
19729
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19732
19730
|
};
|
|
19733
19731
|
var isDotProps = function isDotProps(dot) {
|
|
19734
|
-
return dot && _typeof$
|
|
19732
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19735
19733
|
};
|
|
19736
19734
|
|
|
19737
19735
|
/**
|
|
@@ -19823,10 +19821,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19823
19821
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19824
19822
|
var _ref = nextChild.props || {},
|
|
19825
19823
|
nextChildren = _ref.children,
|
|
19826
|
-
nextProps = _objectWithoutProperties$
|
|
19824
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
19827
19825
|
var _ref2 = prevChild.props || {},
|
|
19828
19826
|
prevChildren = _ref2.children,
|
|
19829
|
-
prevProps = _objectWithoutProperties$
|
|
19827
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
19830
19828
|
if (nextChildren && prevChildren) {
|
|
19831
19829
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19832
19830
|
}
|
|
@@ -19868,10 +19866,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19868
19866
|
return toArray(children).indexOf(child);
|
|
19869
19867
|
};
|
|
19870
19868
|
|
|
19871
|
-
var _excluded$
|
|
19869
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19872
19870
|
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); }
|
|
19873
|
-
function _objectWithoutProperties$
|
|
19874
|
-
function _objectWithoutPropertiesLoose$
|
|
19871
|
+
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; }
|
|
19872
|
+
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; }
|
|
19875
19873
|
function Surface(props) {
|
|
19876
19874
|
var children = props.children,
|
|
19877
19875
|
width = props.width,
|
|
@@ -19879,7 +19877,7 @@ function Surface(props) {
|
|
|
19879
19877
|
viewBox = props.viewBox,
|
|
19880
19878
|
className = props.className,
|
|
19881
19879
|
style = props.style,
|
|
19882
|
-
others = _objectWithoutProperties$
|
|
19880
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
19883
19881
|
var svgView = viewBox || {
|
|
19884
19882
|
width: width,
|
|
19885
19883
|
height: height,
|
|
@@ -19896,14 +19894,14 @@ function Surface(props) {
|
|
|
19896
19894
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
19897
19895
|
}
|
|
19898
19896
|
|
|
19899
|
-
var _excluded$
|
|
19897
|
+
var _excluded$a = ["children", "className"];
|
|
19900
19898
|
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); }
|
|
19901
|
-
function _objectWithoutProperties$
|
|
19902
|
-
function _objectWithoutPropertiesLoose$
|
|
19899
|
+
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; }
|
|
19900
|
+
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; }
|
|
19903
19901
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
19904
19902
|
var children = props.children,
|
|
19905
19903
|
className = props.className,
|
|
19906
|
-
others = _objectWithoutProperties$
|
|
19904
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
19907
19905
|
var layerClass = classNames('recharts-layer', className);
|
|
19908
19906
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
19909
19907
|
className: layerClass
|
|
@@ -23318,16 +23316,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23318
23316
|
stackOffsetNone(series, order);
|
|
23319
23317
|
}
|
|
23320
23318
|
|
|
23321
|
-
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); }
|
|
23322
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23323
23319
|
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); }
|
|
23324
|
-
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; }
|
|
23325
|
-
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; }
|
|
23326
|
-
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; }
|
|
23327
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23328
|
-
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); }
|
|
23329
|
-
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; }
|
|
23330
|
-
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; }
|
|
23331
23320
|
var symbolFactories = {
|
|
23332
23321
|
symbolCircle: symbolCircle,
|
|
23333
23322
|
symbolCross: symbolCross,
|
|
@@ -23366,35 +23355,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23366
23355
|
return Math.PI * size * size / 4;
|
|
23367
23356
|
}
|
|
23368
23357
|
};
|
|
23358
|
+
var symbolsDefaultProps = {
|
|
23359
|
+
type: 'circle',
|
|
23360
|
+
size: 64,
|
|
23361
|
+
sizeType: 'area'
|
|
23362
|
+
};
|
|
23369
23363
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23370
23364
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23371
23365
|
};
|
|
23372
|
-
var Symbols = function Symbols(
|
|
23373
|
-
var _ref$type = _ref.type,
|
|
23374
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23375
|
-
_ref$size = _ref.size,
|
|
23376
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23377
|
-
_ref$sizeType = _ref.sizeType,
|
|
23378
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23379
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23380
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23381
|
-
type: type,
|
|
23382
|
-
size: size,
|
|
23383
|
-
sizeType: sizeType
|
|
23384
|
-
});
|
|
23385
|
-
|
|
23366
|
+
var Symbols = function Symbols(props) {
|
|
23386
23367
|
/**
|
|
23387
23368
|
* Calculate the path of curve
|
|
23388
23369
|
* @return {String} path
|
|
23389
23370
|
*/
|
|
23390
23371
|
var getPath = function getPath() {
|
|
23372
|
+
var size = props.size,
|
|
23373
|
+
sizeType = props.sizeType,
|
|
23374
|
+
type = props.type;
|
|
23391
23375
|
var symbolFactory = getSymbolFactory(type);
|
|
23392
23376
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23393
23377
|
return symbol();
|
|
23394
23378
|
};
|
|
23395
23379
|
var className = props.className,
|
|
23396
23380
|
cx = props.cx,
|
|
23397
|
-
cy = props.cy
|
|
23381
|
+
cy = props.cy,
|
|
23382
|
+
size = props.size;
|
|
23398
23383
|
var filteredProps = filterProps(props, true);
|
|
23399
23384
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23400
23385
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23405,34 +23390,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23405
23390
|
}
|
|
23406
23391
|
return null;
|
|
23407
23392
|
};
|
|
23393
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23408
23394
|
Symbols.registerSymbol = registerSymbol;
|
|
23409
23395
|
|
|
23410
|
-
function _typeof$
|
|
23396
|
+
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); }
|
|
23411
23397
|
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); }
|
|
23412
|
-
function ownKeys$
|
|
23413
|
-
function _objectSpread$
|
|
23414
|
-
function _classCallCheck$
|
|
23415
|
-
function _defineProperties$
|
|
23416
|
-
function _createClass$
|
|
23417
|
-
function _inherits$
|
|
23418
|
-
function _setPrototypeOf$
|
|
23419
|
-
function _createSuper$
|
|
23420
|
-
function _possibleConstructorReturn$
|
|
23421
|
-
function _assertThisInitialized$
|
|
23422
|
-
function _isNativeReflectConstruct$
|
|
23423
|
-
function _getPrototypeOf$
|
|
23424
|
-
function _defineProperty$
|
|
23425
|
-
function _toPropertyKey$
|
|
23426
|
-
function _toPrimitive$
|
|
23398
|
+
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; }
|
|
23399
|
+
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; }
|
|
23400
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23401
|
+
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); } }
|
|
23402
|
+
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; }
|
|
23403
|
+
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); }
|
|
23404
|
+
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); }
|
|
23405
|
+
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); }; }
|
|
23406
|
+
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); }
|
|
23407
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23408
|
+
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; } }
|
|
23409
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23410
|
+
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; }
|
|
23411
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23412
|
+
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); }
|
|
23427
23413
|
var SIZE = 32;
|
|
23428
23414
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23429
|
-
_inherits$
|
|
23430
|
-
var _super = _createSuper$
|
|
23415
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23416
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23431
23417
|
function DefaultLegendContent() {
|
|
23432
|
-
_classCallCheck$
|
|
23418
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23433
23419
|
return _super.apply(this, arguments);
|
|
23434
23420
|
}
|
|
23435
|
-
_createClass$
|
|
23421
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23436
23422
|
key: "renderIcon",
|
|
23437
23423
|
value:
|
|
23438
23424
|
/**
|
|
@@ -23477,7 +23463,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23477
23463
|
});
|
|
23478
23464
|
}
|
|
23479
23465
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23480
|
-
var iconProps = _objectSpread$
|
|
23466
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23481
23467
|
delete iconProps.legendIcon;
|
|
23482
23468
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23483
23469
|
}
|
|
@@ -23525,7 +23511,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23525
23511
|
var finalFormatter = entry.formatter || formatter;
|
|
23526
23512
|
var className = classNames((_classNames = {
|
|
23527
23513
|
'recharts-legend-item': true
|
|
23528
|
-
}, _defineProperty$
|
|
23514
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23529
23515
|
if (entry.type === 'none') {
|
|
23530
23516
|
return null;
|
|
23531
23517
|
}
|
|
@@ -23570,8 +23556,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23570
23556
|
}]);
|
|
23571
23557
|
return DefaultLegendContent;
|
|
23572
23558
|
}(React$3.PureComponent);
|
|
23573
|
-
_defineProperty$
|
|
23574
|
-
_defineProperty$
|
|
23559
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23560
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23575
23561
|
iconSize: 14,
|
|
23576
23562
|
layout: 'horizontal',
|
|
23577
23563
|
align: 'center',
|
|
@@ -23579,25 +23565,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23579
23565
|
inactiveColor: '#ccc'
|
|
23580
23566
|
});
|
|
23581
23567
|
|
|
23582
|
-
function _typeof$
|
|
23583
|
-
var _excluded$
|
|
23584
|
-
function ownKeys$
|
|
23585
|
-
function _objectSpread$
|
|
23586
|
-
function _classCallCheck$
|
|
23587
|
-
function _defineProperties$
|
|
23588
|
-
function _createClass$
|
|
23589
|
-
function _inherits$
|
|
23590
|
-
function _setPrototypeOf$
|
|
23591
|
-
function _createSuper$
|
|
23592
|
-
function _possibleConstructorReturn$
|
|
23593
|
-
function _assertThisInitialized$
|
|
23594
|
-
function _isNativeReflectConstruct$
|
|
23595
|
-
function _getPrototypeOf$
|
|
23596
|
-
function _defineProperty$
|
|
23597
|
-
function _toPropertyKey$
|
|
23598
|
-
function _toPrimitive$
|
|
23599
|
-
function _objectWithoutProperties$
|
|
23600
|
-
function _objectWithoutPropertiesLoose$
|
|
23568
|
+
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); }
|
|
23569
|
+
var _excluded$9 = ["ref"];
|
|
23570
|
+
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; }
|
|
23571
|
+
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; }
|
|
23572
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23573
|
+
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); } }
|
|
23574
|
+
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; }
|
|
23575
|
+
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); }
|
|
23576
|
+
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); }
|
|
23577
|
+
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); }; }
|
|
23578
|
+
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); }
|
|
23579
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23580
|
+
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; } }
|
|
23581
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23582
|
+
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; }
|
|
23583
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23584
|
+
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); }
|
|
23585
|
+
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; }
|
|
23586
|
+
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; }
|
|
23601
23587
|
function defaultUniqBy$1(entry) {
|
|
23602
23588
|
return entry.value;
|
|
23603
23589
|
}
|
|
@@ -23618,27 +23604,27 @@ function renderContent$1(content, props) {
|
|
|
23618
23604
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23619
23605
|
}
|
|
23620
23606
|
props.ref;
|
|
23621
|
-
var otherProps = _objectWithoutProperties$
|
|
23607
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23622
23608
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23623
23609
|
}
|
|
23624
23610
|
var EPS$2 = 1;
|
|
23625
23611
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23626
|
-
_inherits$
|
|
23627
|
-
var _super = _createSuper$
|
|
23612
|
+
_inherits$7(Legend, _PureComponent);
|
|
23613
|
+
var _super = _createSuper$7(Legend);
|
|
23628
23614
|
function Legend() {
|
|
23629
23615
|
var _this;
|
|
23630
|
-
_classCallCheck$
|
|
23616
|
+
_classCallCheck$9(this, Legend);
|
|
23631
23617
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23632
23618
|
args[_key] = arguments[_key];
|
|
23633
23619
|
}
|
|
23634
23620
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23635
|
-
_defineProperty$
|
|
23621
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23636
23622
|
boxWidth: -1,
|
|
23637
23623
|
boxHeight: -1
|
|
23638
23624
|
});
|
|
23639
23625
|
return _this;
|
|
23640
23626
|
}
|
|
23641
|
-
_createClass$
|
|
23627
|
+
_createClass$9(Legend, [{
|
|
23642
23628
|
key: "componentDidMount",
|
|
23643
23629
|
value: function componentDidMount() {
|
|
23644
23630
|
this.updateBBox();
|
|
@@ -23713,7 +23699,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23713
23699
|
};
|
|
23714
23700
|
}
|
|
23715
23701
|
}
|
|
23716
|
-
return _objectSpread$
|
|
23702
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23717
23703
|
}
|
|
23718
23704
|
}, {
|
|
23719
23705
|
key: "updateBBox",
|
|
@@ -23756,7 +23742,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23756
23742
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23757
23743
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23758
23744
|
payload = _this$props2.payload;
|
|
23759
|
-
var outerStyle = _objectSpread$
|
|
23745
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23760
23746
|
position: 'absolute',
|
|
23761
23747
|
width: width || 'auto',
|
|
23762
23748
|
height: height || 'auto'
|
|
@@ -23767,7 +23753,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23767
23753
|
ref: function ref(node) {
|
|
23768
23754
|
_this2.wrapperNode = node;
|
|
23769
23755
|
}
|
|
23770
|
-
}, renderContent$1(content, _objectSpread$
|
|
23756
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23771
23757
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23772
23758
|
})));
|
|
23773
23759
|
}
|
|
@@ -23790,8 +23776,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23790
23776
|
}]);
|
|
23791
23777
|
return Legend;
|
|
23792
23778
|
}(React$3.PureComponent);
|
|
23793
|
-
_defineProperty$
|
|
23794
|
-
_defineProperty$
|
|
23779
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23780
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23795
23781
|
iconSize: 14,
|
|
23796
23782
|
layout: 'horizontal',
|
|
23797
23783
|
align: 'center',
|
|
@@ -24355,13 +24341,13 @@ function setRafTimeout(callback) {
|
|
|
24355
24341
|
requestAnimationFrame(shouldUpdate);
|
|
24356
24342
|
}
|
|
24357
24343
|
|
|
24358
|
-
function _typeof$
|
|
24359
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24360
|
-
function _nonIterableRest$
|
|
24361
|
-
function _unsupportedIterableToArray$
|
|
24362
|
-
function _arrayLikeToArray$
|
|
24344
|
+
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); }
|
|
24345
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24346
|
+
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."); }
|
|
24347
|
+
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); }
|
|
24348
|
+
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; }
|
|
24363
24349
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24364
|
-
function _arrayWithHoles$
|
|
24350
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24365
24351
|
function createAnimateManager() {
|
|
24366
24352
|
var currStyle = {};
|
|
24367
24353
|
var handleChange = function handleChange() {
|
|
@@ -24388,7 +24374,7 @@ function createAnimateManager() {
|
|
|
24388
24374
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24389
24375
|
return;
|
|
24390
24376
|
}
|
|
24391
|
-
if (_typeof$
|
|
24377
|
+
if (_typeof$o(_style) === 'object') {
|
|
24392
24378
|
currStyle = _style;
|
|
24393
24379
|
handleChange(currStyle);
|
|
24394
24380
|
}
|
|
@@ -24415,12 +24401,12 @@ function createAnimateManager() {
|
|
|
24415
24401
|
};
|
|
24416
24402
|
}
|
|
24417
24403
|
|
|
24418
|
-
function _typeof$
|
|
24419
|
-
function ownKeys$
|
|
24420
|
-
function _objectSpread$
|
|
24421
|
-
function _defineProperty$
|
|
24422
|
-
function _toPropertyKey$
|
|
24423
|
-
function _toPrimitive$
|
|
24404
|
+
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); }
|
|
24405
|
+
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; }
|
|
24406
|
+
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; }
|
|
24407
|
+
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; }
|
|
24408
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24409
|
+
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); }
|
|
24424
24410
|
/* eslint no-console: 0 */
|
|
24425
24411
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24426
24412
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24452,7 +24438,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24452
24438
|
*/
|
|
24453
24439
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24454
24440
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24455
|
-
return _defineProperty$
|
|
24441
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24456
24442
|
}
|
|
24457
24443
|
var isTransition = name === 'transition';
|
|
24458
24444
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24463,7 +24449,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24463
24449
|
if (isTransition) {
|
|
24464
24450
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24465
24451
|
}
|
|
24466
|
-
return _objectSpread$
|
|
24452
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24467
24453
|
}, {});
|
|
24468
24454
|
};
|
|
24469
24455
|
|
|
@@ -24473,7 +24459,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24473
24459
|
*/
|
|
24474
24460
|
var mapObject = function mapObject(fn, obj) {
|
|
24475
24461
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24476
|
-
return _objectSpread$
|
|
24462
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24477
24463
|
}, {});
|
|
24478
24464
|
};
|
|
24479
24465
|
|
|
@@ -24483,7 +24469,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24483
24469
|
*/
|
|
24484
24470
|
var translateStyle = function translateStyle(style) {
|
|
24485
24471
|
return Object.keys(style).reduce(function (res, key) {
|
|
24486
|
-
return _objectSpread$
|
|
24472
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24487
24473
|
}, style);
|
|
24488
24474
|
};
|
|
24489
24475
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24511,16 +24497,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24511
24497
|
}
|
|
24512
24498
|
};
|
|
24513
24499
|
|
|
24514
|
-
function _slicedToArray$
|
|
24515
|
-
function _nonIterableRest$
|
|
24516
|
-
function _iterableToArrayLimit$
|
|
24517
|
-
function _arrayWithHoles$
|
|
24518
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24500
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24501
|
+
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."); }
|
|
24502
|
+
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; } }
|
|
24503
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24504
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24519
24505
|
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."); }
|
|
24520
|
-
function _unsupportedIterableToArray$
|
|
24506
|
+
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); }
|
|
24521
24507
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24522
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24523
|
-
function _arrayLikeToArray$
|
|
24508
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24509
|
+
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; }
|
|
24524
24510
|
var ACCURACY = 1e-4;
|
|
24525
24511
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24526
24512
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24596,7 +24582,7 @@ var configBezier = function configBezier() {
|
|
|
24596
24582
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24597
24583
|
return parseFloat(x);
|
|
24598
24584
|
});
|
|
24599
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24585
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24600
24586
|
x1 = _easing$1$split$0$spl2[0];
|
|
24601
24587
|
y1 = _easing$1$split$0$spl2[1];
|
|
24602
24588
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24689,22 +24675,22 @@ var configEasing = function configEasing() {
|
|
|
24689
24675
|
return null;
|
|
24690
24676
|
};
|
|
24691
24677
|
|
|
24692
|
-
function _typeof$
|
|
24693
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24678
|
+
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); }
|
|
24679
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24694
24680
|
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."); }
|
|
24695
24681
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24696
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24697
|
-
function ownKeys$
|
|
24698
|
-
function _objectSpread$
|
|
24699
|
-
function _defineProperty$
|
|
24700
|
-
function _toPropertyKey$
|
|
24701
|
-
function _toPrimitive$
|
|
24702
|
-
function _slicedToArray$
|
|
24703
|
-
function _nonIterableRest$
|
|
24704
|
-
function _unsupportedIterableToArray$
|
|
24705
|
-
function _arrayLikeToArray$
|
|
24706
|
-
function _iterableToArrayLimit$
|
|
24707
|
-
function _arrayWithHoles$
|
|
24682
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24683
|
+
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; }
|
|
24684
|
+
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; }
|
|
24685
|
+
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; }
|
|
24686
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24687
|
+
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); }
|
|
24688
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24689
|
+
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."); }
|
|
24690
|
+
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); }
|
|
24691
|
+
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; }
|
|
24692
|
+
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; } }
|
|
24693
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24708
24694
|
var alpha = function alpha(begin, end, k) {
|
|
24709
24695
|
return begin + (end - begin) * k;
|
|
24710
24696
|
};
|
|
@@ -24722,10 +24708,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24722
24708
|
var nextStepVals = mapObject(function (key, val) {
|
|
24723
24709
|
if (needContinue(val)) {
|
|
24724
24710
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24725
|
-
_easing2 = _slicedToArray$
|
|
24711
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24726
24712
|
newX = _easing2[0],
|
|
24727
24713
|
newV = _easing2[1];
|
|
24728
|
-
return _objectSpread$
|
|
24714
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24729
24715
|
from: newX,
|
|
24730
24716
|
velocity: newV
|
|
24731
24717
|
});
|
|
@@ -24735,7 +24721,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24735
24721
|
if (steps < 1) {
|
|
24736
24722
|
return mapObject(function (key, val) {
|
|
24737
24723
|
if (needContinue(val)) {
|
|
24738
|
-
return _objectSpread$
|
|
24724
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24739
24725
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24740
24726
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24741
24727
|
});
|
|
@@ -24750,10 +24736,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24750
24736
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24751
24737
|
var interKeys = getIntersectionKeys(from, to);
|
|
24752
24738
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24753
|
-
return _objectSpread$
|
|
24739
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24754
24740
|
}, {});
|
|
24755
24741
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24756
|
-
return _objectSpread$
|
|
24742
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24757
24743
|
from: from[key],
|
|
24758
24744
|
velocity: 0,
|
|
24759
24745
|
to: to[key]
|
|
@@ -24783,7 +24769,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24783
24769
|
var steps = deltaTime / easing.dt;
|
|
24784
24770
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24785
24771
|
// get union set and add compatible prefix
|
|
24786
|
-
render(_objectSpread$
|
|
24772
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24787
24773
|
preTime = now;
|
|
24788
24774
|
if (!shouldStopAnimation()) {
|
|
24789
24775
|
cafId = requestAnimationFrame(update);
|
|
@@ -24801,14 +24787,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24801
24787
|
}, timingStyle);
|
|
24802
24788
|
|
|
24803
24789
|
// get union set and add compatible prefix
|
|
24804
|
-
render(_objectSpread$
|
|
24790
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24805
24791
|
if (t < 1) {
|
|
24806
24792
|
cafId = requestAnimationFrame(update);
|
|
24807
24793
|
} else {
|
|
24808
24794
|
var finalStyle = mapObject(function (key, val) {
|
|
24809
24795
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24810
24796
|
}, timingStyle);
|
|
24811
|
-
render(_objectSpread$
|
|
24797
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
24812
24798
|
}
|
|
24813
24799
|
};
|
|
24814
24800
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24824,37 +24810,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24824
24810
|
};
|
|
24825
24811
|
});
|
|
24826
24812
|
|
|
24827
|
-
function _typeof$
|
|
24828
|
-
var _excluded$
|
|
24829
|
-
function _objectWithoutProperties$
|
|
24830
|
-
function _objectWithoutPropertiesLoose$
|
|
24831
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24813
|
+
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); }
|
|
24814
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24815
|
+
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; }
|
|
24816
|
+
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; }
|
|
24817
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
24832
24818
|
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."); }
|
|
24833
|
-
function _unsupportedIterableToArray$
|
|
24819
|
+
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); }
|
|
24834
24820
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24835
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24836
|
-
function _arrayLikeToArray$
|
|
24837
|
-
function ownKeys$
|
|
24838
|
-
function _objectSpread$
|
|
24839
|
-
function _defineProperty$
|
|
24840
|
-
function _classCallCheck$
|
|
24841
|
-
function _defineProperties$
|
|
24842
|
-
function _createClass$
|
|
24843
|
-
function _toPropertyKey$
|
|
24844
|
-
function _toPrimitive$
|
|
24845
|
-
function _inherits$
|
|
24846
|
-
function _setPrototypeOf$
|
|
24847
|
-
function _createSuper$
|
|
24848
|
-
function _possibleConstructorReturn$
|
|
24849
|
-
function _assertThisInitialized$
|
|
24850
|
-
function _isNativeReflectConstruct$
|
|
24851
|
-
function _getPrototypeOf$
|
|
24821
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24822
|
+
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; }
|
|
24823
|
+
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; }
|
|
24824
|
+
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; }
|
|
24825
|
+
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; }
|
|
24826
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24827
|
+
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); } }
|
|
24828
|
+
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; }
|
|
24829
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
24830
|
+
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); }
|
|
24831
|
+
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); }
|
|
24832
|
+
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); }
|
|
24833
|
+
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); }; }
|
|
24834
|
+
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); }
|
|
24835
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24836
|
+
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; } }
|
|
24837
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
24852
24838
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24853
|
-
_inherits$
|
|
24854
|
-
var _super = _createSuper$
|
|
24839
|
+
_inherits$6(Animate, _PureComponent);
|
|
24840
|
+
var _super = _createSuper$6(Animate);
|
|
24855
24841
|
function Animate(props, context) {
|
|
24856
24842
|
var _this;
|
|
24857
|
-
_classCallCheck$
|
|
24843
|
+
_classCallCheck$8(this, Animate);
|
|
24858
24844
|
_this = _super.call(this, props, context);
|
|
24859
24845
|
var _this$props = _this.props,
|
|
24860
24846
|
isActive = _this$props.isActive,
|
|
@@ -24864,8 +24850,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24864
24850
|
steps = _this$props.steps,
|
|
24865
24851
|
children = _this$props.children,
|
|
24866
24852
|
duration = _this$props.duration;
|
|
24867
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24868
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24853
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
24854
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
24869
24855
|
if (!isActive || duration <= 0) {
|
|
24870
24856
|
_this.state = {
|
|
24871
24857
|
style: {}
|
|
@@ -24877,7 +24863,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24877
24863
|
style: to
|
|
24878
24864
|
};
|
|
24879
24865
|
}
|
|
24880
|
-
return _possibleConstructorReturn$
|
|
24866
|
+
return _possibleConstructorReturn$6(_this);
|
|
24881
24867
|
}
|
|
24882
24868
|
if (steps && steps.length) {
|
|
24883
24869
|
_this.state = {
|
|
@@ -24888,10 +24874,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24888
24874
|
_this.state = {
|
|
24889
24875
|
style: from
|
|
24890
24876
|
};
|
|
24891
|
-
return _possibleConstructorReturn$
|
|
24877
|
+
return _possibleConstructorReturn$6(_this);
|
|
24892
24878
|
}
|
|
24893
24879
|
_this.state = {
|
|
24894
|
-
style: attributeName ? _defineProperty$
|
|
24880
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24895
24881
|
};
|
|
24896
24882
|
} else {
|
|
24897
24883
|
_this.state = {
|
|
@@ -24900,7 +24886,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24900
24886
|
}
|
|
24901
24887
|
return _this;
|
|
24902
24888
|
}
|
|
24903
|
-
_createClass$
|
|
24889
|
+
_createClass$8(Animate, [{
|
|
24904
24890
|
key: "componentDidMount",
|
|
24905
24891
|
value: function componentDidMount() {
|
|
24906
24892
|
var _this$props2 = this.props,
|
|
@@ -24928,7 +24914,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24928
24914
|
}
|
|
24929
24915
|
if (!isActive) {
|
|
24930
24916
|
var newState = {
|
|
24931
|
-
style: attributeName ? _defineProperty$
|
|
24917
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
24932
24918
|
};
|
|
24933
24919
|
if (this.state && style) {
|
|
24934
24920
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24951,14 +24937,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24951
24937
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24952
24938
|
if (this.state && style) {
|
|
24953
24939
|
var _newState = {
|
|
24954
|
-
style: attributeName ? _defineProperty$
|
|
24940
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
24955
24941
|
};
|
|
24956
24942
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24957
24943
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24958
24944
|
this.setState(_newState);
|
|
24959
24945
|
}
|
|
24960
24946
|
}
|
|
24961
|
-
this.runAnimation(_objectSpread$
|
|
24947
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
24962
24948
|
from: from,
|
|
24963
24949
|
begin: 0
|
|
24964
24950
|
}));
|
|
@@ -25041,7 +25027,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25041
25027
|
}), duration]);
|
|
25042
25028
|
}
|
|
25043
25029
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25044
|
-
var newStyle = _objectSpread$
|
|
25030
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25045
25031
|
transition: transition
|
|
25046
25032
|
});
|
|
25047
25033
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25073,9 +25059,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25073
25059
|
this.runStepAnimation(props);
|
|
25074
25060
|
return;
|
|
25075
25061
|
}
|
|
25076
|
-
var to = attributeName ? _defineProperty$
|
|
25062
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25077
25063
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25078
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25064
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25079
25065
|
transition: transition
|
|
25080
25066
|
}), duration, onAnimationEnd]);
|
|
25081
25067
|
}
|
|
@@ -25096,7 +25082,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25096
25082
|
_this$props4.onAnimationEnd;
|
|
25097
25083
|
_this$props4.shouldReAnimate;
|
|
25098
25084
|
_this$props4.onAnimationReStart;
|
|
25099
|
-
var others = _objectWithoutProperties$
|
|
25085
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25100
25086
|
var count = React$3.Children.count(children);
|
|
25101
25087
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25102
25088
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25111,8 +25097,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25111
25097
|
_container$props$styl = _container$props.style,
|
|
25112
25098
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25113
25099
|
className = _container$props.className;
|
|
25114
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25115
|
-
style: _objectSpread$
|
|
25100
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25101
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25116
25102
|
className: className
|
|
25117
25103
|
}));
|
|
25118
25104
|
return res;
|
|
@@ -25637,10 +25623,10 @@ var defineProperty$2 = (function() {
|
|
|
25637
25623
|
} catch (e) {}
|
|
25638
25624
|
}());
|
|
25639
25625
|
|
|
25640
|
-
var _defineProperty$
|
|
25626
|
+
var _defineProperty$l = defineProperty$2;
|
|
25641
25627
|
|
|
25642
25628
|
var constant$1 = constant_1,
|
|
25643
|
-
defineProperty$1 = _defineProperty$
|
|
25629
|
+
defineProperty$1 = _defineProperty$l,
|
|
25644
25630
|
identity$7 = identity_1;
|
|
25645
25631
|
|
|
25646
25632
|
/**
|
|
@@ -25817,18 +25803,18 @@ var sortBy_1 = sortBy;
|
|
|
25817
25803
|
/**
|
|
25818
25804
|
* @fileOverview Default Tooltip Content
|
|
25819
25805
|
*/
|
|
25820
|
-
function _typeof$
|
|
25821
|
-
function _slicedToArray$
|
|
25822
|
-
function _nonIterableRest$
|
|
25823
|
-
function _unsupportedIterableToArray$
|
|
25824
|
-
function _arrayLikeToArray$
|
|
25825
|
-
function _iterableToArrayLimit$
|
|
25826
|
-
function _arrayWithHoles$
|
|
25827
|
-
function ownKeys$
|
|
25828
|
-
function _objectSpread$
|
|
25829
|
-
function _defineProperty$
|
|
25830
|
-
function _toPropertyKey$
|
|
25831
|
-
function _toPrimitive$
|
|
25806
|
+
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); }
|
|
25807
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25808
|
+
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."); }
|
|
25809
|
+
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); }
|
|
25810
|
+
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; }
|
|
25811
|
+
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; } }
|
|
25812
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
25813
|
+
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; }
|
|
25814
|
+
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; }
|
|
25815
|
+
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; }
|
|
25816
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
25817
|
+
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); }
|
|
25832
25818
|
function defaultFormatter(value) {
|
|
25833
25819
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25834
25820
|
}
|
|
@@ -25858,7 +25844,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25858
25844
|
if (entry.type === 'none') {
|
|
25859
25845
|
return null;
|
|
25860
25846
|
}
|
|
25861
|
-
var finalItemStyle = _objectSpread$
|
|
25847
|
+
var finalItemStyle = _objectSpread$j({
|
|
25862
25848
|
display: 'block',
|
|
25863
25849
|
paddingTop: 4,
|
|
25864
25850
|
paddingBottom: 4,
|
|
@@ -25872,7 +25858,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25872
25858
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25873
25859
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25874
25860
|
if (Array.isArray(formatted)) {
|
|
25875
|
-
var _formatted = _slicedToArray$
|
|
25861
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
25876
25862
|
finalValue = _formatted[0];
|
|
25877
25863
|
finalName = _formatted[1];
|
|
25878
25864
|
} else {
|
|
@@ -25904,14 +25890,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25904
25890
|
}
|
|
25905
25891
|
return null;
|
|
25906
25892
|
};
|
|
25907
|
-
var finalStyle = _objectSpread$
|
|
25893
|
+
var finalStyle = _objectSpread$j({
|
|
25908
25894
|
margin: 0,
|
|
25909
25895
|
padding: 10,
|
|
25910
25896
|
backgroundColor: '#fff',
|
|
25911
25897
|
border: '1px solid #ccc',
|
|
25912
25898
|
whiteSpace: 'nowrap'
|
|
25913
25899
|
}, contentStyle);
|
|
25914
|
-
var finalLabelStyle = _objectSpread$
|
|
25900
|
+
var finalLabelStyle = _objectSpread$j({
|
|
25915
25901
|
margin: 0
|
|
25916
25902
|
}, labelStyle);
|
|
25917
25903
|
var hasLabel = !isNil_1(label);
|
|
@@ -25952,22 +25938,18 @@ var Global = {
|
|
|
25952
25938
|
}
|
|
25953
25939
|
};
|
|
25954
25940
|
|
|
25955
|
-
function _typeof$
|
|
25956
|
-
function ownKeys$
|
|
25957
|
-
function _objectSpread$
|
|
25958
|
-
function
|
|
25959
|
-
function
|
|
25960
|
-
function
|
|
25961
|
-
function
|
|
25962
|
-
function
|
|
25963
|
-
function
|
|
25964
|
-
function
|
|
25965
|
-
function
|
|
25966
|
-
function
|
|
25967
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25968
|
-
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; }
|
|
25969
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25970
|
-
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); }
|
|
25941
|
+
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); }
|
|
25942
|
+
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; }
|
|
25943
|
+
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; }
|
|
25944
|
+
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; }
|
|
25945
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
25946
|
+
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); }
|
|
25947
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25948
|
+
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."); }
|
|
25949
|
+
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); }
|
|
25950
|
+
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; }
|
|
25951
|
+
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; } }
|
|
25952
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25971
25953
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25972
25954
|
var EPS$1 = 1;
|
|
25973
25955
|
function defaultUniqBy(entry) {
|
|
@@ -25991,204 +25973,7 @@ function renderContent(content, props) {
|
|
|
25991
25973
|
}
|
|
25992
25974
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
25993
25975
|
}
|
|
25994
|
-
var
|
|
25995
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
25996
|
-
var _super = _createSuper$6(Tooltip);
|
|
25997
|
-
function Tooltip() {
|
|
25998
|
-
var _this;
|
|
25999
|
-
_classCallCheck$8(this, Tooltip);
|
|
26000
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26001
|
-
args[_key] = arguments[_key];
|
|
26002
|
-
}
|
|
26003
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26004
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26005
|
-
boxWidth: -1,
|
|
26006
|
-
boxHeight: -1,
|
|
26007
|
-
dismissed: false,
|
|
26008
|
-
dismissedAtCoordinate: {
|
|
26009
|
-
x: 0,
|
|
26010
|
-
y: 0
|
|
26011
|
-
}
|
|
26012
|
-
});
|
|
26013
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26014
|
-
if (event.key === 'Escape') {
|
|
26015
|
-
_this.setState({
|
|
26016
|
-
dismissed: true,
|
|
26017
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26018
|
-
x: _this.props.coordinate.x,
|
|
26019
|
-
y: _this.props.coordinate.y
|
|
26020
|
-
})
|
|
26021
|
-
});
|
|
26022
|
-
}
|
|
26023
|
-
});
|
|
26024
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26025
|
-
var key = _ref.key,
|
|
26026
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26027
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26028
|
-
var _this$props = _this.props,
|
|
26029
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26030
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26031
|
-
coordinate = _this$props.coordinate,
|
|
26032
|
-
offset = _this$props.offset,
|
|
26033
|
-
position = _this$props.position,
|
|
26034
|
-
viewBox = _this$props.viewBox;
|
|
26035
|
-
if (position && isNumber(position[key])) {
|
|
26036
|
-
return position[key];
|
|
26037
|
-
}
|
|
26038
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26039
|
-
var positive = coordinate[key] + offset;
|
|
26040
|
-
if (allowEscapeViewBox[key]) {
|
|
26041
|
-
return reverseDirection[key] ? negative : positive;
|
|
26042
|
-
}
|
|
26043
|
-
if (reverseDirection[key]) {
|
|
26044
|
-
var _tooltipBoundary = negative;
|
|
26045
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26046
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26047
|
-
return Math.max(positive, viewBox[key]);
|
|
26048
|
-
}
|
|
26049
|
-
return Math.max(negative, viewBox[key]);
|
|
26050
|
-
}
|
|
26051
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26052
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26053
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26054
|
-
return Math.max(negative, viewBox[key]);
|
|
26055
|
-
}
|
|
26056
|
-
return Math.max(positive, viewBox[key]);
|
|
26057
|
-
});
|
|
26058
|
-
return _this;
|
|
26059
|
-
}
|
|
26060
|
-
_createClass$8(Tooltip, [{
|
|
26061
|
-
key: "componentDidMount",
|
|
26062
|
-
value: function componentDidMount() {
|
|
26063
|
-
this.updateBBox();
|
|
26064
|
-
}
|
|
26065
|
-
}, {
|
|
26066
|
-
key: "componentWillUnmount",
|
|
26067
|
-
value: function componentWillUnmount() {
|
|
26068
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26069
|
-
}
|
|
26070
|
-
}, {
|
|
26071
|
-
key: "componentDidUpdate",
|
|
26072
|
-
value: function componentDidUpdate() {
|
|
26073
|
-
this.updateBBox();
|
|
26074
|
-
}
|
|
26075
|
-
}, {
|
|
26076
|
-
key: "updateBBox",
|
|
26077
|
-
value: function updateBBox() {
|
|
26078
|
-
var _this$state = this.state,
|
|
26079
|
-
boxWidth = _this$state.boxWidth,
|
|
26080
|
-
boxHeight = _this$state.boxHeight,
|
|
26081
|
-
dismissed = _this$state.dismissed;
|
|
26082
|
-
if (dismissed) {
|
|
26083
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26084
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26085
|
-
this.setState({
|
|
26086
|
-
dismissed: false
|
|
26087
|
-
});
|
|
26088
|
-
}
|
|
26089
|
-
} else {
|
|
26090
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26091
|
-
}
|
|
26092
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26093
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26094
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26095
|
-
this.setState({
|
|
26096
|
-
boxWidth: box.width,
|
|
26097
|
-
boxHeight: box.height
|
|
26098
|
-
});
|
|
26099
|
-
}
|
|
26100
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26101
|
-
this.setState({
|
|
26102
|
-
boxWidth: -1,
|
|
26103
|
-
boxHeight: -1
|
|
26104
|
-
});
|
|
26105
|
-
}
|
|
26106
|
-
}
|
|
26107
|
-
}, {
|
|
26108
|
-
key: "render",
|
|
26109
|
-
value: function render() {
|
|
26110
|
-
var _classNames,
|
|
26111
|
-
_this2 = this;
|
|
26112
|
-
var _this$props2 = this.props,
|
|
26113
|
-
payload = _this$props2.payload,
|
|
26114
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26115
|
-
animationDuration = _this$props2.animationDuration,
|
|
26116
|
-
animationEasing = _this$props2.animationEasing,
|
|
26117
|
-
filterNull = _this$props2.filterNull,
|
|
26118
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26119
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26120
|
-
return !isNil_1(entry.value);
|
|
26121
|
-
}) : payload);
|
|
26122
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26123
|
-
var _this$props3 = this.props,
|
|
26124
|
-
content = _this$props3.content,
|
|
26125
|
-
viewBox = _this$props3.viewBox,
|
|
26126
|
-
coordinate = _this$props3.coordinate,
|
|
26127
|
-
position = _this$props3.position,
|
|
26128
|
-
active = _this$props3.active,
|
|
26129
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26130
|
-
var outerStyle = _objectSpread$l({
|
|
26131
|
-
pointerEvents: 'none',
|
|
26132
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26133
|
-
position: 'absolute',
|
|
26134
|
-
top: 0,
|
|
26135
|
-
left: 0
|
|
26136
|
-
}, wrapperStyle);
|
|
26137
|
-
var translateX, translateY;
|
|
26138
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26139
|
-
translateX = position.x;
|
|
26140
|
-
translateY = position.y;
|
|
26141
|
-
} else {
|
|
26142
|
-
var _this$state2 = this.state,
|
|
26143
|
-
boxWidth = _this$state2.boxWidth,
|
|
26144
|
-
boxHeight = _this$state2.boxHeight;
|
|
26145
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26146
|
-
translateX = this.getTranslate({
|
|
26147
|
-
key: 'x',
|
|
26148
|
-
tooltipDimension: boxWidth,
|
|
26149
|
-
viewBoxDimension: viewBox.width
|
|
26150
|
-
});
|
|
26151
|
-
translateY = this.getTranslate({
|
|
26152
|
-
key: 'y',
|
|
26153
|
-
tooltipDimension: boxHeight,
|
|
26154
|
-
viewBoxDimension: viewBox.height
|
|
26155
|
-
});
|
|
26156
|
-
} else {
|
|
26157
|
-
outerStyle.visibility = 'hidden';
|
|
26158
|
-
}
|
|
26159
|
-
}
|
|
26160
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26161
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26162
|
-
})), outerStyle);
|
|
26163
|
-
if (isAnimationActive && active) {
|
|
26164
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26165
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26166
|
-
})), outerStyle);
|
|
26167
|
-
}
|
|
26168
|
-
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));
|
|
26169
|
-
return (
|
|
26170
|
-
/*#__PURE__*/
|
|
26171
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26172
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26173
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26174
|
-
React__default["default"].createElement("div", {
|
|
26175
|
-
tabIndex: -1,
|
|
26176
|
-
role: "dialog",
|
|
26177
|
-
className: cls,
|
|
26178
|
-
style: outerStyle,
|
|
26179
|
-
ref: function ref(node) {
|
|
26180
|
-
_this2.wrapperNode = node;
|
|
26181
|
-
}
|
|
26182
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26183
|
-
payload: finalPayload
|
|
26184
|
-
})))
|
|
26185
|
-
);
|
|
26186
|
-
}
|
|
26187
|
-
}]);
|
|
26188
|
-
return Tooltip;
|
|
26189
|
-
}(React$3.PureComponent);
|
|
26190
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26191
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25976
|
+
var tooltipDefaultProps = {
|
|
26192
25977
|
active: false,
|
|
26193
25978
|
allowEscapeViewBox: {
|
|
26194
25979
|
x: false,
|
|
@@ -26209,6 +25994,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26209
25994
|
x: 0,
|
|
26210
25995
|
y: 0
|
|
26211
25996
|
},
|
|
25997
|
+
// this doesn't exist on TooltipProps
|
|
25998
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25999
|
+
// @ts-ignore
|
|
26212
26000
|
cursorStyle: {},
|
|
26213
26001
|
separator: ' : ',
|
|
26214
26002
|
wrapperStyle: {},
|
|
@@ -26222,7 +26010,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26222
26010
|
animationDuration: 400,
|
|
26223
26011
|
filterNull: true,
|
|
26224
26012
|
useTranslate3d: false
|
|
26225
|
-
}
|
|
26013
|
+
};
|
|
26014
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26015
|
+
var _classNames;
|
|
26016
|
+
var _useState = React$3.useState(-1),
|
|
26017
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26018
|
+
boxWidth = _useState2[0],
|
|
26019
|
+
setBoxWidth = _useState2[1];
|
|
26020
|
+
var _useState3 = React$3.useState(-1),
|
|
26021
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26022
|
+
boxHeight = _useState4[0],
|
|
26023
|
+
setBoxHeight = _useState4[1];
|
|
26024
|
+
var _useState5 = React$3.useState(false),
|
|
26025
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26026
|
+
dismissed = _useState6[0],
|
|
26027
|
+
setDismissed = _useState6[1];
|
|
26028
|
+
var _useState7 = React$3.useState({
|
|
26029
|
+
x: 0,
|
|
26030
|
+
y: 0
|
|
26031
|
+
}),
|
|
26032
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26033
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26034
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26035
|
+
var wrapperNode = React$3.useRef();
|
|
26036
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26037
|
+
reverseDirection = props.reverseDirection,
|
|
26038
|
+
coordinate = props.coordinate,
|
|
26039
|
+
offset = props.offset,
|
|
26040
|
+
position = props.position,
|
|
26041
|
+
viewBox = props.viewBox;
|
|
26042
|
+
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26043
|
+
if (event.key === 'Escape') {
|
|
26044
|
+
setDismissed(true);
|
|
26045
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26046
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26047
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26048
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26049
|
+
});
|
|
26050
|
+
});
|
|
26051
|
+
}
|
|
26052
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26053
|
+
React$3.useEffect(function () {
|
|
26054
|
+
var updateBBox = function updateBBox() {
|
|
26055
|
+
if (dismissed) {
|
|
26056
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26057
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26058
|
+
setDismissed(false);
|
|
26059
|
+
}
|
|
26060
|
+
} else {
|
|
26061
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26062
|
+
}
|
|
26063
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26064
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26065
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26066
|
+
setBoxWidth(box.width);
|
|
26067
|
+
setBoxHeight(box.height);
|
|
26068
|
+
}
|
|
26069
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26070
|
+
setBoxWidth(-1);
|
|
26071
|
+
setBoxHeight(-1);
|
|
26072
|
+
}
|
|
26073
|
+
};
|
|
26074
|
+
updateBBox();
|
|
26075
|
+
return function () {
|
|
26076
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26077
|
+
};
|
|
26078
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26079
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26080
|
+
var key = _ref.key,
|
|
26081
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26082
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26083
|
+
if (position && isNumber(position[key])) {
|
|
26084
|
+
return position[key];
|
|
26085
|
+
}
|
|
26086
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26087
|
+
var positive = coordinate[key] + offset;
|
|
26088
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26089
|
+
return reverseDirection[key] ? negative : positive;
|
|
26090
|
+
}
|
|
26091
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26092
|
+
var _tooltipBoundary = negative;
|
|
26093
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26094
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26095
|
+
return Math.max(positive, viewBox[key]);
|
|
26096
|
+
}
|
|
26097
|
+
return Math.max(negative, viewBox[key]);
|
|
26098
|
+
}
|
|
26099
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26100
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26101
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26102
|
+
return Math.max(negative, viewBox[key]);
|
|
26103
|
+
}
|
|
26104
|
+
return Math.max(positive, viewBox[key]);
|
|
26105
|
+
};
|
|
26106
|
+
var payload = props.payload,
|
|
26107
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26108
|
+
filterNull = props.filterNull,
|
|
26109
|
+
active = props.active,
|
|
26110
|
+
wrapperStyle = props.wrapperStyle,
|
|
26111
|
+
useTranslate3d = props.useTranslate3d,
|
|
26112
|
+
isAnimationActive = props.isAnimationActive,
|
|
26113
|
+
animationDuration = props.animationDuration,
|
|
26114
|
+
animationEasing = props.animationEasing;
|
|
26115
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26116
|
+
return !isNil_1(entry.value);
|
|
26117
|
+
}) : payload);
|
|
26118
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26119
|
+
var content = props.content;
|
|
26120
|
+
var outerStyle = _objectSpread$i({
|
|
26121
|
+
pointerEvents: 'none',
|
|
26122
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26123
|
+
position: 'absolute',
|
|
26124
|
+
top: 0,
|
|
26125
|
+
left: 0
|
|
26126
|
+
}, wrapperStyle);
|
|
26127
|
+
var translateX, translateY;
|
|
26128
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26129
|
+
translateX = position.x;
|
|
26130
|
+
translateY = position.y;
|
|
26131
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26132
|
+
translateX = getTranslate({
|
|
26133
|
+
key: 'x',
|
|
26134
|
+
tooltipDimension: boxWidth,
|
|
26135
|
+
viewBoxDimension: viewBox.width
|
|
26136
|
+
});
|
|
26137
|
+
translateY = getTranslate({
|
|
26138
|
+
key: 'y',
|
|
26139
|
+
tooltipDimension: boxHeight,
|
|
26140
|
+
viewBoxDimension: viewBox.height
|
|
26141
|
+
});
|
|
26142
|
+
} else {
|
|
26143
|
+
outerStyle.visibility = 'hidden';
|
|
26144
|
+
}
|
|
26145
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26146
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26147
|
+
})), outerStyle);
|
|
26148
|
+
if (isAnimationActive && active) {
|
|
26149
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26150
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26151
|
+
})), outerStyle);
|
|
26152
|
+
}
|
|
26153
|
+
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));
|
|
26154
|
+
return (
|
|
26155
|
+
/*#__PURE__*/
|
|
26156
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26157
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26158
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26159
|
+
React__default["default"].createElement("div", {
|
|
26160
|
+
tabIndex: -1,
|
|
26161
|
+
role: "dialog",
|
|
26162
|
+
className: cls,
|
|
26163
|
+
style: outerStyle,
|
|
26164
|
+
ref: wrapperNode
|
|
26165
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26166
|
+
payload: finalPayload
|
|
26167
|
+
})))
|
|
26168
|
+
);
|
|
26169
|
+
};
|
|
26170
|
+
|
|
26171
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26172
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26173
|
+
|
|
26174
|
+
/**
|
|
26175
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26176
|
+
* children.props when there are no props set by the consumer
|
|
26177
|
+
* doesn't work if using default parameters
|
|
26178
|
+
*/
|
|
26179
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26226
26180
|
|
|
26227
26181
|
var root = _root;
|
|
26228
26182
|
|
|
@@ -31792,12 +31746,12 @@ module.exports = exports['default'];
|
|
|
31792
31746
|
|
|
31793
31747
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31794
31748
|
|
|
31795
|
-
function _typeof$
|
|
31796
|
-
function ownKeys$
|
|
31797
|
-
function _objectSpread$
|
|
31798
|
-
function _defineProperty$
|
|
31799
|
-
function _toPropertyKey$
|
|
31800
|
-
function _toPrimitive$
|
|
31749
|
+
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); }
|
|
31750
|
+
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; }
|
|
31751
|
+
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; }
|
|
31752
|
+
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; }
|
|
31753
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31754
|
+
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); }
|
|
31801
31755
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31802
31756
|
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."); }
|
|
31803
31757
|
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); }
|
|
@@ -31865,7 +31819,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31865
31819
|
}
|
|
31866
31820
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31867
31821
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31868
|
-
var measurementSpanStyle = _objectSpread$
|
|
31822
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
31869
31823
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31870
31824
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31871
31825
|
return styleKey;
|
|
@@ -31920,11 +31874,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31920
31874
|
};
|
|
31921
31875
|
};
|
|
31922
31876
|
|
|
31923
|
-
var _excluded$
|
|
31924
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31877
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
31925
31878
|
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); }
|
|
31926
|
-
function _objectWithoutProperties$
|
|
31927
|
-
function _objectWithoutPropertiesLoose$
|
|
31879
|
+
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; }
|
|
31880
|
+
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; }
|
|
31928
31881
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31929
31882
|
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."); }
|
|
31930
31883
|
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); }
|
|
@@ -32078,46 +32031,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32078
32031
|
}
|
|
32079
32032
|
return getWordsWithoutCalculate(children);
|
|
32080
32033
|
};
|
|
32081
|
-
var
|
|
32082
|
-
|
|
32083
|
-
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32087
|
-
|
|
32088
|
-
|
|
32089
|
-
|
|
32090
|
-
|
|
32091
|
-
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32095
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32096
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32097
|
-
_ref5$fill = _ref5.fill,
|
|
32098
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32099
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32034
|
+
var textDefaultProps = {
|
|
32035
|
+
x: 0,
|
|
32036
|
+
y: 0,
|
|
32037
|
+
lineHeight: '1em',
|
|
32038
|
+
capHeight: '0.71em',
|
|
32039
|
+
// Magic number from d3
|
|
32040
|
+
scaleToFit: false,
|
|
32041
|
+
textAnchor: 'start',
|
|
32042
|
+
verticalAnchor: 'end',
|
|
32043
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32044
|
+
fill: '#808080'
|
|
32045
|
+
};
|
|
32046
|
+
var Text = function Text(props) {
|
|
32100
32047
|
var wordsByLines = React$3.useMemo(function () {
|
|
32101
32048
|
return getWordsByLines({
|
|
32102
32049
|
breakAll: props.breakAll,
|
|
32103
32050
|
children: props.children,
|
|
32104
32051
|
maxLines: props.maxLines,
|
|
32105
|
-
scaleToFit: scaleToFit,
|
|
32052
|
+
scaleToFit: props.scaleToFit,
|
|
32106
32053
|
style: props.style,
|
|
32107
32054
|
width: props.width
|
|
32108
32055
|
});
|
|
32109
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32056
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32110
32057
|
var dx = props.dx,
|
|
32111
32058
|
dy = props.dy,
|
|
32059
|
+
textAnchor = props.textAnchor,
|
|
32060
|
+
verticalAnchor = props.verticalAnchor,
|
|
32061
|
+
scaleToFit = props.scaleToFit,
|
|
32112
32062
|
angle = props.angle,
|
|
32063
|
+
lineHeight = props.lineHeight,
|
|
32064
|
+
capHeight = props.capHeight,
|
|
32113
32065
|
className = props.className,
|
|
32114
32066
|
breakAll = props.breakAll,
|
|
32115
|
-
textProps = _objectWithoutProperties$
|
|
32116
|
-
if (!isNumOrStr(
|
|
32067
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32068
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32117
32069
|
return null;
|
|
32118
32070
|
}
|
|
32119
|
-
var x =
|
|
32120
|
-
var y =
|
|
32071
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32072
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32121
32073
|
var startDy;
|
|
32122
32074
|
switch (verticalAnchor) {
|
|
32123
32075
|
case 'start':
|
|
@@ -32147,7 +32099,7 @@ var Text = function Text(_ref5) {
|
|
|
32147
32099
|
y: y,
|
|
32148
32100
|
className: classNames('recharts-text', className),
|
|
32149
32101
|
textAnchor: textAnchor,
|
|
32150
|
-
fill: fill.includes('url') ?
|
|
32102
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32151
32103
|
}), wordsByLines.map(function (line, index) {
|
|
32152
32104
|
return (
|
|
32153
32105
|
/*#__PURE__*/
|
|
@@ -32160,6 +32112,7 @@ var Text = function Text(_ref5) {
|
|
|
32160
32112
|
);
|
|
32161
32113
|
}));
|
|
32162
32114
|
};
|
|
32115
|
+
Text.defaultProps = textDefaultProps;
|
|
32163
32116
|
|
|
32164
32117
|
var baseIsEqual = _baseIsEqual;
|
|
32165
32118
|
|
|
@@ -38427,7 +38380,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38427
38380
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38428
38381
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38429
38382
|
|
|
38430
|
-
var _excluded$
|
|
38383
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38431
38384
|
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); }
|
|
38432
38385
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38433
38386
|
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."); }
|
|
@@ -38435,8 +38388,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38435
38388
|
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; }
|
|
38436
38389
|
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; } }
|
|
38437
38390
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38438
|
-
function _objectWithoutProperties$
|
|
38439
|
-
function _objectWithoutPropertiesLoose$
|
|
38391
|
+
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; }
|
|
38392
|
+
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; }
|
|
38440
38393
|
function ErrorBar(props) {
|
|
38441
38394
|
var offset = props.offset,
|
|
38442
38395
|
layout = props.layout,
|
|
@@ -38446,7 +38399,7 @@ function ErrorBar(props) {
|
|
|
38446
38399
|
dataPointFormatter = props.dataPointFormatter,
|
|
38447
38400
|
xAxis = props.xAxis,
|
|
38448
38401
|
yAxis = props.yAxis,
|
|
38449
|
-
others = _objectWithoutProperties$
|
|
38402
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38450
38403
|
var svgProps = filterProps(others);
|
|
38451
38404
|
var errorBars = data.map(function (entry, i) {
|
|
38452
38405
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38557,18 +38510,18 @@ ErrorBar.defaultProps = {
|
|
|
38557
38510
|
};
|
|
38558
38511
|
ErrorBar.displayName = 'ErrorBar';
|
|
38559
38512
|
|
|
38560
|
-
function _typeof$
|
|
38513
|
+
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); }
|
|
38561
38514
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38562
38515
|
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."); }
|
|
38563
38516
|
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); }
|
|
38564
38517
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38565
38518
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38566
38519
|
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; }
|
|
38567
|
-
function ownKeys$
|
|
38568
|
-
function _objectSpread$
|
|
38569
|
-
function _defineProperty$
|
|
38570
|
-
function _toPropertyKey$
|
|
38571
|
-
function _toPrimitive$
|
|
38520
|
+
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; }
|
|
38521
|
+
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; }
|
|
38522
|
+
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; }
|
|
38523
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38524
|
+
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); }
|
|
38572
38525
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38573
38526
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38574
38527
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38739,7 +38692,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38739
38692
|
};
|
|
38740
38693
|
});
|
|
38741
38694
|
}
|
|
38742
|
-
return _objectSpread$
|
|
38695
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38743
38696
|
payload: legendData,
|
|
38744
38697
|
item: legendItem
|
|
38745
38698
|
});
|
|
@@ -38893,10 +38846,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38893
38846
|
verticalAlign = legendProps.verticalAlign,
|
|
38894
38847
|
layout = legendProps.layout;
|
|
38895
38848
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38896
|
-
newOffset = _objectSpread$
|
|
38849
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
38897
38850
|
}
|
|
38898
38851
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38899
|
-
newOffset = _objectSpread$
|
|
38852
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38900
38853
|
}
|
|
38901
38854
|
}
|
|
38902
38855
|
return newOffset;
|
|
@@ -39322,14 +39275,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39322
39275
|
items: [item]
|
|
39323
39276
|
};
|
|
39324
39277
|
}
|
|
39325
|
-
return _objectSpread$
|
|
39278
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39326
39279
|
}, {});
|
|
39327
39280
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39328
39281
|
var group = stackGroups[axisId];
|
|
39329
39282
|
if (group.hasStack) {
|
|
39330
39283
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39331
39284
|
var g = group.stackGroups[stackId];
|
|
39332
|
-
return _objectSpread$
|
|
39285
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39333
39286
|
numericAxisId: numericAxisId,
|
|
39334
39287
|
cateAxisId: cateAxisId,
|
|
39335
39288
|
items: g.items,
|
|
@@ -39337,7 +39290,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39337
39290
|
}));
|
|
39338
39291
|
}, {});
|
|
39339
39292
|
}
|
|
39340
|
-
return _objectSpread$
|
|
39293
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39341
39294
|
}, {});
|
|
39342
39295
|
};
|
|
39343
39296
|
|
|
@@ -39551,7 +39504,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39551
39504
|
formatter = _graphicalItem$props.formatter,
|
|
39552
39505
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39553
39506
|
chartType = _graphicalItem$props.chartType;
|
|
39554
|
-
return _objectSpread$
|
|
39507
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39555
39508
|
dataKey: dataKey,
|
|
39556
39509
|
unit: unit,
|
|
39557
39510
|
formatter: formatter,
|
|
@@ -39564,12 +39517,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39564
39517
|
});
|
|
39565
39518
|
};
|
|
39566
39519
|
|
|
39567
|
-
function _typeof$
|
|
39568
|
-
function ownKeys$
|
|
39569
|
-
function _objectSpread$
|
|
39570
|
-
function _defineProperty$
|
|
39571
|
-
function _toPropertyKey$
|
|
39572
|
-
function _toPrimitive$
|
|
39520
|
+
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); }
|
|
39521
|
+
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; }
|
|
39522
|
+
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; }
|
|
39523
|
+
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; }
|
|
39524
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39525
|
+
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); }
|
|
39573
39526
|
var RADIAN = Math.PI / 180;
|
|
39574
39527
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39575
39528
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39674,7 +39627,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39674
39627
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39675
39628
|
}
|
|
39676
39629
|
if (inRange) {
|
|
39677
|
-
return _objectSpread$
|
|
39630
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39678
39631
|
radius: radius,
|
|
39679
39632
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39680
39633
|
});
|
|
@@ -39682,21 +39635,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39682
39635
|
return null;
|
|
39683
39636
|
};
|
|
39684
39637
|
|
|
39685
|
-
function _typeof$
|
|
39686
|
-
var _excluded$7 = ["offset"];
|
|
39638
|
+
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); }
|
|
39687
39639
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39688
39640
|
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."); }
|
|
39689
39641
|
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); }
|
|
39690
39642
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39691
39643
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39692
39644
|
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; }
|
|
39693
|
-
function
|
|
39694
|
-
function
|
|
39695
|
-
function
|
|
39696
|
-
function
|
|
39697
|
-
function
|
|
39698
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39699
|
-
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); }
|
|
39645
|
+
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; }
|
|
39646
|
+
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; }
|
|
39647
|
+
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; }
|
|
39648
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39649
|
+
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); }
|
|
39700
39650
|
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); }
|
|
39701
39651
|
var getLabel = function getLabel(props) {
|
|
39702
39652
|
var value = props.value,
|
|
@@ -39841,7 +39791,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39841
39791
|
textAnchor: 'middle',
|
|
39842
39792
|
verticalAnchor: verticalEnd
|
|
39843
39793
|
};
|
|
39844
|
-
return _objectSpread$
|
|
39794
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
39845
39795
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39846
39796
|
width: width
|
|
39847
39797
|
} : {});
|
|
@@ -39853,7 +39803,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39853
39803
|
textAnchor: 'middle',
|
|
39854
39804
|
verticalAnchor: verticalStart
|
|
39855
39805
|
};
|
|
39856
|
-
return _objectSpread$
|
|
39806
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
39857
39807
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39858
39808
|
width: width
|
|
39859
39809
|
} : {});
|
|
@@ -39865,7 +39815,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39865
39815
|
textAnchor: horizontalEnd,
|
|
39866
39816
|
verticalAnchor: 'middle'
|
|
39867
39817
|
};
|
|
39868
|
-
return _objectSpread$
|
|
39818
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
39869
39819
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39870
39820
|
height: height
|
|
39871
39821
|
} : {});
|
|
@@ -39877,7 +39827,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39877
39827
|
textAnchor: horizontalStart,
|
|
39878
39828
|
verticalAnchor: 'middle'
|
|
39879
39829
|
};
|
|
39880
|
-
return _objectSpread$
|
|
39830
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
39881
39831
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39882
39832
|
height: height
|
|
39883
39833
|
} : {});
|
|
@@ -39887,7 +39837,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39887
39837
|
height: height
|
|
39888
39838
|
} : {};
|
|
39889
39839
|
if (position === 'insideLeft') {
|
|
39890
|
-
return _objectSpread$
|
|
39840
|
+
return _objectSpread$e({
|
|
39891
39841
|
x: x + horizontalOffset,
|
|
39892
39842
|
y: y + height / 2,
|
|
39893
39843
|
textAnchor: horizontalStart,
|
|
@@ -39895,7 +39845,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39895
39845
|
}, sizeAttrs);
|
|
39896
39846
|
}
|
|
39897
39847
|
if (position === 'insideRight') {
|
|
39898
|
-
return _objectSpread$
|
|
39848
|
+
return _objectSpread$e({
|
|
39899
39849
|
x: x + width - horizontalOffset,
|
|
39900
39850
|
y: y + height / 2,
|
|
39901
39851
|
textAnchor: horizontalEnd,
|
|
@@ -39903,7 +39853,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39903
39853
|
}, sizeAttrs);
|
|
39904
39854
|
}
|
|
39905
39855
|
if (position === 'insideTop') {
|
|
39906
|
-
return _objectSpread$
|
|
39856
|
+
return _objectSpread$e({
|
|
39907
39857
|
x: x + width / 2,
|
|
39908
39858
|
y: y + verticalOffset,
|
|
39909
39859
|
textAnchor: 'middle',
|
|
@@ -39911,7 +39861,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39911
39861
|
}, sizeAttrs);
|
|
39912
39862
|
}
|
|
39913
39863
|
if (position === 'insideBottom') {
|
|
39914
|
-
return _objectSpread$
|
|
39864
|
+
return _objectSpread$e({
|
|
39915
39865
|
x: x + width / 2,
|
|
39916
39866
|
y: y + height - verticalOffset,
|
|
39917
39867
|
textAnchor: 'middle',
|
|
@@ -39919,7 +39869,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39919
39869
|
}, sizeAttrs);
|
|
39920
39870
|
}
|
|
39921
39871
|
if (position === 'insideTopLeft') {
|
|
39922
|
-
return _objectSpread$
|
|
39872
|
+
return _objectSpread$e({
|
|
39923
39873
|
x: x + horizontalOffset,
|
|
39924
39874
|
y: y + verticalOffset,
|
|
39925
39875
|
textAnchor: horizontalStart,
|
|
@@ -39927,7 +39877,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39927
39877
|
}, sizeAttrs);
|
|
39928
39878
|
}
|
|
39929
39879
|
if (position === 'insideTopRight') {
|
|
39930
|
-
return _objectSpread$
|
|
39880
|
+
return _objectSpread$e({
|
|
39931
39881
|
x: x + width - horizontalOffset,
|
|
39932
39882
|
y: y + verticalOffset,
|
|
39933
39883
|
textAnchor: horizontalEnd,
|
|
@@ -39935,7 +39885,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39935
39885
|
}, sizeAttrs);
|
|
39936
39886
|
}
|
|
39937
39887
|
if (position === 'insideBottomLeft') {
|
|
39938
|
-
return _objectSpread$
|
|
39888
|
+
return _objectSpread$e({
|
|
39939
39889
|
x: x + horizontalOffset,
|
|
39940
39890
|
y: y + height - verticalOffset,
|
|
39941
39891
|
textAnchor: horizontalStart,
|
|
@@ -39943,7 +39893,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39943
39893
|
}, sizeAttrs);
|
|
39944
39894
|
}
|
|
39945
39895
|
if (position === 'insideBottomRight') {
|
|
39946
|
-
return _objectSpread$
|
|
39896
|
+
return _objectSpread$e({
|
|
39947
39897
|
x: x + width - horizontalOffset,
|
|
39948
39898
|
y: y + height - verticalOffset,
|
|
39949
39899
|
textAnchor: horizontalEnd,
|
|
@@ -39951,14 +39901,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39951
39901
|
}, sizeAttrs);
|
|
39952
39902
|
}
|
|
39953
39903
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39954
|
-
return _objectSpread$
|
|
39904
|
+
return _objectSpread$e({
|
|
39955
39905
|
x: x + getPercentValue(position.x, width),
|
|
39956
39906
|
y: y + getPercentValue(position.y, height),
|
|
39957
39907
|
textAnchor: 'end',
|
|
39958
39908
|
verticalAnchor: 'end'
|
|
39959
39909
|
}, sizeAttrs);
|
|
39960
39910
|
}
|
|
39961
|
-
return _objectSpread$
|
|
39911
|
+
return _objectSpread$e({
|
|
39962
39912
|
x: x + width / 2,
|
|
39963
39913
|
y: y + height / 2,
|
|
39964
39914
|
textAnchor: 'middle',
|
|
@@ -39968,13 +39918,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39968
39918
|
var isPolar = function isPolar(viewBox) {
|
|
39969
39919
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39970
39920
|
};
|
|
39971
|
-
function Label$3(
|
|
39972
|
-
var _ref4$offset = _ref4.offset,
|
|
39973
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39974
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39975
|
-
var props = _objectSpread$h({
|
|
39976
|
-
offset: offset
|
|
39977
|
-
}, restProps);
|
|
39921
|
+
function Label$3(props) {
|
|
39978
39922
|
var viewBox = props.viewBox,
|
|
39979
39923
|
position = props.position,
|
|
39980
39924
|
value = props.value,
|
|
@@ -40011,6 +39955,9 @@ function Label$3(_ref4) {
|
|
|
40011
39955
|
}), label);
|
|
40012
39956
|
}
|
|
40013
39957
|
Label$3.displayName = 'Label';
|
|
39958
|
+
Label$3.defaultProps = {
|
|
39959
|
+
offset: 5
|
|
39960
|
+
};
|
|
40014
39961
|
var parseViewBox = function parseViewBox(props) {
|
|
40015
39962
|
var cx = props.cx,
|
|
40016
39963
|
cy = props.cy,
|
|
@@ -40165,9 +40112,8 @@ function last(array) {
|
|
|
40165
40112
|
|
|
40166
40113
|
var last_1 = last;
|
|
40167
40114
|
|
|
40168
|
-
function _typeof$
|
|
40169
|
-
var _excluded$
|
|
40170
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40115
|
+
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); }
|
|
40116
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40171
40117
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40172
40118
|
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."); }
|
|
40173
40119
|
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); }
|
|
@@ -40175,26 +40121,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40175
40121
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40176
40122
|
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; }
|
|
40177
40123
|
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); }
|
|
40178
|
-
function ownKeys$
|
|
40179
|
-
function _objectSpread$
|
|
40180
|
-
function _defineProperty$
|
|
40181
|
-
function _toPropertyKey$
|
|
40182
|
-
function _toPrimitive$
|
|
40183
|
-
function _objectWithoutProperties$
|
|
40184
|
-
function _objectWithoutPropertiesLoose$
|
|
40185
|
-
var
|
|
40186
|
-
|
|
40187
|
-
|
|
40188
|
-
|
|
40189
|
-
|
|
40190
|
-
|
|
40191
|
-
|
|
40192
|
-
|
|
40193
|
-
dataKey =
|
|
40194
|
-
clockWise =
|
|
40195
|
-
id =
|
|
40196
|
-
textBreakAll =
|
|
40197
|
-
others = _objectWithoutProperties$
|
|
40124
|
+
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; }
|
|
40125
|
+
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; }
|
|
40126
|
+
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; }
|
|
40127
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40128
|
+
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); }
|
|
40129
|
+
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; }
|
|
40130
|
+
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; }
|
|
40131
|
+
var defaultProps = {
|
|
40132
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40133
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40134
|
+
}
|
|
40135
|
+
};
|
|
40136
|
+
function LabelList(props) {
|
|
40137
|
+
var data = props.data,
|
|
40138
|
+
valueAccessor = props.valueAccessor,
|
|
40139
|
+
dataKey = props.dataKey,
|
|
40140
|
+
clockWise = props.clockWise,
|
|
40141
|
+
id = props.id,
|
|
40142
|
+
textBreakAll = props.textBreakAll,
|
|
40143
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40198
40144
|
if (!data || !data.length) {
|
|
40199
40145
|
return null;
|
|
40200
40146
|
}
|
|
@@ -40210,7 +40156,7 @@ function LabelList(_ref) {
|
|
|
40210
40156
|
index: index,
|
|
40211
40157
|
value: value,
|
|
40212
40158
|
textBreakAll: textBreakAll,
|
|
40213
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40159
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40214
40160
|
clockWise: clockWise
|
|
40215
40161
|
})),
|
|
40216
40162
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40265,14 +40211,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40265
40211
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40266
40212
|
}
|
|
40267
40213
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40214
|
+
LabelList.defaultProps = defaultProps;
|
|
40268
40215
|
|
|
40269
|
-
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); }
|
|
40270
40216
|
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); }
|
|
40271
|
-
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; }
|
|
40272
|
-
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; }
|
|
40273
|
-
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; }
|
|
40274
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40275
|
-
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); }
|
|
40276
40217
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40277
40218
|
var sign = mathSign(endAngle - startAngle);
|
|
40278
40219
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40413,19 +40354,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40413
40354
|
}
|
|
40414
40355
|
return path;
|
|
40415
40356
|
};
|
|
40416
|
-
var
|
|
40417
|
-
cx: 0,
|
|
40418
|
-
cy: 0,
|
|
40419
|
-
innerRadius: 0,
|
|
40420
|
-
outerRadius: 0,
|
|
40421
|
-
startAngle: 0,
|
|
40422
|
-
endAngle: 0,
|
|
40423
|
-
cornerRadius: 0,
|
|
40424
|
-
forceCornerRadius: false,
|
|
40425
|
-
cornerIsExternal: false
|
|
40426
|
-
};
|
|
40427
|
-
var Sector = function Sector(sectorProps) {
|
|
40428
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40357
|
+
var Sector = function Sector(props) {
|
|
40429
40358
|
var cx = props.cx,
|
|
40430
40359
|
cy = props.cy,
|
|
40431
40360
|
innerRadius = props.innerRadius,
|
|
@@ -40471,14 +40400,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40471
40400
|
role: "img"
|
|
40472
40401
|
}));
|
|
40473
40402
|
};
|
|
40403
|
+
Sector.defaultProps = {
|
|
40404
|
+
cx: 0,
|
|
40405
|
+
cy: 0,
|
|
40406
|
+
innerRadius: 0,
|
|
40407
|
+
outerRadius: 0,
|
|
40408
|
+
startAngle: 0,
|
|
40409
|
+
endAngle: 0,
|
|
40410
|
+
cornerRadius: 0,
|
|
40411
|
+
forceCornerRadius: false,
|
|
40412
|
+
cornerIsExternal: false
|
|
40413
|
+
};
|
|
40474
40414
|
|
|
40475
|
-
function _typeof$
|
|
40415
|
+
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); }
|
|
40476
40416
|
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); }
|
|
40477
|
-
function ownKeys$
|
|
40478
|
-
function _objectSpread$
|
|
40479
|
-
function _defineProperty$
|
|
40480
|
-
function _toPropertyKey$
|
|
40481
|
-
function _toPrimitive$
|
|
40417
|
+
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; }
|
|
40418
|
+
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; }
|
|
40419
|
+
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; }
|
|
40420
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40421
|
+
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); }
|
|
40482
40422
|
var CURVE_FACTORIES = {
|
|
40483
40423
|
curveBasisClosed: curveBasisClosed,
|
|
40484
40424
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40518,14 +40458,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40518
40458
|
* @return {String} path
|
|
40519
40459
|
*/
|
|
40520
40460
|
var getPath$1 = function getPath(_ref) {
|
|
40521
|
-
var
|
|
40522
|
-
|
|
40523
|
-
_ref$points = _ref.points,
|
|
40524
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40461
|
+
var type = _ref.type,
|
|
40462
|
+
points = _ref.points,
|
|
40525
40463
|
baseLine = _ref.baseLine,
|
|
40526
40464
|
layout = _ref.layout,
|
|
40527
|
-
|
|
40528
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40465
|
+
connectNulls = _ref.connectNulls;
|
|
40529
40466
|
var curveFactory = getCurveFactory(type, layout);
|
|
40530
40467
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40531
40468
|
return defined(entry);
|
|
@@ -40536,7 +40473,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40536
40473
|
return defined(base);
|
|
40537
40474
|
}) : baseLine;
|
|
40538
40475
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40539
|
-
return _objectSpread$
|
|
40476
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40540
40477
|
base: formatBaseLine[index]
|
|
40541
40478
|
});
|
|
40542
40479
|
});
|
|
@@ -40577,8 +40514,12 @@ var Curve = function Curve(props) {
|
|
|
40577
40514
|
ref: pathRef
|
|
40578
40515
|
}));
|
|
40579
40516
|
};
|
|
40517
|
+
Curve.defaultProps = {
|
|
40518
|
+
type: 'linear',
|
|
40519
|
+
points: [],
|
|
40520
|
+
connectNulls: false
|
|
40521
|
+
};
|
|
40580
40522
|
|
|
40581
|
-
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); }
|
|
40582
40523
|
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); }
|
|
40583
40524
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40584
40525
|
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."); }
|
|
@@ -40586,11 +40527,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40586
40527
|
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; }
|
|
40587
40528
|
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; } }
|
|
40588
40529
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40589
|
-
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; }
|
|
40590
|
-
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; }
|
|
40591
|
-
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; }
|
|
40592
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40593
|
-
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); }
|
|
40594
40530
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40595
40531
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40596
40532
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40646,29 +40582,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40646
40582
|
}
|
|
40647
40583
|
return false;
|
|
40648
40584
|
};
|
|
40649
|
-
var
|
|
40650
|
-
x: 0,
|
|
40651
|
-
y: 0,
|
|
40652
|
-
width: 0,
|
|
40653
|
-
height: 0,
|
|
40654
|
-
// The radius of border
|
|
40655
|
-
// The radius of four corners when radius is a number
|
|
40656
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40657
|
-
radius: 0,
|
|
40658
|
-
isAnimationActive: false,
|
|
40659
|
-
isUpdateAnimationActive: false,
|
|
40660
|
-
animationBegin: 0,
|
|
40661
|
-
animationDuration: 1500,
|
|
40662
|
-
animationEasing: 'ease'
|
|
40663
|
-
};
|
|
40664
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40665
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40585
|
+
var Rectangle = function Rectangle(props) {
|
|
40666
40586
|
var pathRef = React$3.useRef();
|
|
40667
40587
|
var _useState = React$3.useState(-1),
|
|
40668
40588
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40669
40589
|
totalLength = _useState2[0],
|
|
40670
40590
|
setTotalLength = _useState2[1];
|
|
40671
|
-
React$3.
|
|
40591
|
+
React$3.useLayoutEffect(function () {
|
|
40672
40592
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40673
40593
|
try {
|
|
40674
40594
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40739,6 +40659,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40739
40659
|
})));
|
|
40740
40660
|
});
|
|
40741
40661
|
};
|
|
40662
|
+
Rectangle.defaultProps = {
|
|
40663
|
+
x: 0,
|
|
40664
|
+
y: 0,
|
|
40665
|
+
width: 0,
|
|
40666
|
+
height: 0,
|
|
40667
|
+
// The radius of border
|
|
40668
|
+
// The radius of four corners when radius is a number
|
|
40669
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40670
|
+
radius: 0,
|
|
40671
|
+
isAnimationActive: false,
|
|
40672
|
+
isUpdateAnimationActive: false,
|
|
40673
|
+
animationBegin: 0,
|
|
40674
|
+
animationDuration: 1500,
|
|
40675
|
+
animationEasing: 'ease'
|
|
40676
|
+
};
|
|
40742
40677
|
|
|
40743
40678
|
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); }
|
|
40744
40679
|
var Dot$1 = function Dot(props) {
|
|
@@ -40758,42 +40693,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40758
40693
|
return null;
|
|
40759
40694
|
};
|
|
40760
40695
|
|
|
40761
|
-
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); }
|
|
40762
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40763
40696
|
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); }
|
|
40764
|
-
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; }
|
|
40765
|
-
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; }
|
|
40766
|
-
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; }
|
|
40767
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40768
|
-
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); }
|
|
40769
|
-
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; }
|
|
40770
|
-
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; }
|
|
40771
40697
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40772
40698
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40773
40699
|
};
|
|
40774
|
-
var Cross = function Cross(
|
|
40775
|
-
var
|
|
40776
|
-
|
|
40777
|
-
|
|
40778
|
-
|
|
40779
|
-
|
|
40780
|
-
|
|
40781
|
-
|
|
40782
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40783
|
-
_ref$width = _ref.width,
|
|
40784
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40785
|
-
_ref$height = _ref.height,
|
|
40786
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40787
|
-
className = _ref.className,
|
|
40788
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40789
|
-
var props = _objectSpread$c({
|
|
40790
|
-
x: x,
|
|
40791
|
-
y: y,
|
|
40792
|
-
top: top,
|
|
40793
|
-
left: left,
|
|
40794
|
-
width: width,
|
|
40795
|
-
height: height
|
|
40796
|
-
}, rest);
|
|
40700
|
+
var Cross = function Cross(props) {
|
|
40701
|
+
var x = props.x,
|
|
40702
|
+
y = props.y,
|
|
40703
|
+
width = props.width,
|
|
40704
|
+
height = props.height,
|
|
40705
|
+
top = props.top,
|
|
40706
|
+
left = props.left,
|
|
40707
|
+
className = props.className;
|
|
40797
40708
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40798
40709
|
return null;
|
|
40799
40710
|
}
|
|
@@ -40802,6 +40713,14 @@ var Cross = function Cross(_ref) {
|
|
|
40802
40713
|
d: getPath(x, y, width, height, top, left)
|
|
40803
40714
|
}));
|
|
40804
40715
|
};
|
|
40716
|
+
Cross.defaultProps = {
|
|
40717
|
+
x: 0,
|
|
40718
|
+
y: 0,
|
|
40719
|
+
top: 0,
|
|
40720
|
+
left: 0,
|
|
40721
|
+
width: 0,
|
|
40722
|
+
height: 0
|
|
40723
|
+
};
|
|
40805
40724
|
|
|
40806
40725
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40807
40726
|
|
|
@@ -41011,7 +40930,6 @@ var createScale = function createScale(_ref) {
|
|
|
41011
40930
|
isTextActive: false,
|
|
41012
40931
|
isSlideMoving: false,
|
|
41013
40932
|
isTravellerMoving: false,
|
|
41014
|
-
isTravellerFocused: false,
|
|
41015
40933
|
startX: scale(startIndex),
|
|
41016
40934
|
endX: scale(endIndex),
|
|
41017
40935
|
scale: scale,
|
|
@@ -41225,38 +41143,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41225
41143
|
}
|
|
41226
41144
|
});
|
|
41227
41145
|
}
|
|
41228
|
-
}, {
|
|
41229
|
-
key: "handleTravellerMoveKeyboard",
|
|
41230
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41231
|
-
var _this2 = this;
|
|
41232
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41233
|
-
var _this$state3 = this.state,
|
|
41234
|
-
scaleValues = _this$state3.scaleValues,
|
|
41235
|
-
startX = _this$state3.startX,
|
|
41236
|
-
endX = _this$state3.endX;
|
|
41237
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41238
|
-
var currentScaleValue = this.state[id];
|
|
41239
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41240
|
-
if (currentIndex === -1) {
|
|
41241
|
-
return;
|
|
41242
|
-
}
|
|
41243
|
-
var newIndex = currentIndex + direction;
|
|
41244
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41245
|
-
return;
|
|
41246
|
-
}
|
|
41247
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41248
|
-
|
|
41249
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41250
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41251
|
-
return;
|
|
41252
|
-
}
|
|
41253
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41254
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41255
|
-
startX: _this2.state.startX,
|
|
41256
|
-
endX: _this2.state.endX
|
|
41257
|
-
}));
|
|
41258
|
-
});
|
|
41259
|
-
}
|
|
41260
41146
|
}, {
|
|
41261
41147
|
key: "renderBackground",
|
|
41262
41148
|
value: function renderBackground() {
|
|
@@ -41304,7 +41190,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41304
41190
|
}, {
|
|
41305
41191
|
key: "renderTravellerLayer",
|
|
41306
41192
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41307
|
-
var _this3 = this;
|
|
41308
41193
|
var _this$props7 = this.props,
|
|
41309
41194
|
y = _this$props7.y,
|
|
41310
41195
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41318,31 +41203,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41318
41203
|
height: height
|
|
41319
41204
|
});
|
|
41320
41205
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41321
|
-
tabIndex: 0,
|
|
41322
|
-
role: "slider",
|
|
41323
41206
|
className: "recharts-brush-traveller",
|
|
41324
41207
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41325
41208
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41326
41209
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41327
41210
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41328
|
-
onKeyDown: function onKeyDown(e) {
|
|
41329
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41330
|
-
return;
|
|
41331
|
-
}
|
|
41332
|
-
e.preventDefault();
|
|
41333
|
-
e.stopPropagation();
|
|
41334
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41335
|
-
},
|
|
41336
|
-
onFocus: function onFocus() {
|
|
41337
|
-
_this3.setState({
|
|
41338
|
-
isTravellerFocused: true
|
|
41339
|
-
});
|
|
41340
|
-
},
|
|
41341
|
-
onBlur: function onBlur() {
|
|
41342
|
-
_this3.setState({
|
|
41343
|
-
isTravellerFocused: false
|
|
41344
|
-
});
|
|
41345
|
-
},
|
|
41346
41211
|
style: {
|
|
41347
41212
|
cursor: 'col-resize'
|
|
41348
41213
|
}
|
|
@@ -41386,9 +41251,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41386
41251
|
height = _this$props9.height,
|
|
41387
41252
|
travellerWidth = _this$props9.travellerWidth,
|
|
41388
41253
|
stroke = _this$props9.stroke;
|
|
41389
|
-
var _this$
|
|
41390
|
-
startX = _this$
|
|
41391
|
-
endX = _this$
|
|
41254
|
+
var _this$state3 = this.state,
|
|
41255
|
+
startX = _this$state3.startX,
|
|
41256
|
+
endX = _this$state3.endX;
|
|
41392
41257
|
var offset = 5;
|
|
41393
41258
|
var attrs = {
|
|
41394
41259
|
pointerEvents: 'none',
|
|
@@ -41420,13 +41285,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41420
41285
|
width = _this$props10.width,
|
|
41421
41286
|
height = _this$props10.height,
|
|
41422
41287
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41423
|
-
var _this$
|
|
41424
|
-
startX = _this$
|
|
41425
|
-
endX = _this$
|
|
41426
|
-
isTextActive = _this$
|
|
41427
|
-
isSlideMoving = _this$
|
|
41428
|
-
isTravellerMoving = _this$
|
|
41429
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41288
|
+
var _this$state4 = this.state,
|
|
41289
|
+
startX = _this$state4.startX,
|
|
41290
|
+
endX = _this$state4.endX,
|
|
41291
|
+
isTextActive = _this$state4.isTextActive,
|
|
41292
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41293
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41430
41294
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41431
41295
|
return null;
|
|
41432
41296
|
}
|
|
@@ -41438,7 +41302,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41438
41302
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41439
41303
|
onTouchMove: this.handleTouchMove,
|
|
41440
41304
|
style: style
|
|
41441
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41305
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41442
41306
|
}
|
|
41443
41307
|
}], [{
|
|
41444
41308
|
key: "renderDefaultTraveller",
|
|
@@ -41756,7 +41620,7 @@ function every(collection, predicate, guard) {
|
|
|
41756
41620
|
|
|
41757
41621
|
var every_1 = every;
|
|
41758
41622
|
|
|
41759
|
-
var defineProperty = _defineProperty$
|
|
41623
|
+
var defineProperty = _defineProperty$l;
|
|
41760
41624
|
|
|
41761
41625
|
/**
|
|
41762
41626
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42117,6 +41981,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42117
41981
|
legendType: 'rect',
|
|
42118
41982
|
minPointSize: 0,
|
|
42119
41983
|
hide: false,
|
|
41984
|
+
// data of bar
|
|
42120
41985
|
data: [],
|
|
42121
41986
|
layout: 'vertical',
|
|
42122
41987
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45029,11 +44894,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45029
44894
|
}
|
|
45030
44895
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45031
44896
|
x = _this$container$getBo.x,
|
|
45032
|
-
y = _this$container$getBo.y
|
|
45033
|
-
height = _this$container$getBo.height;
|
|
44897
|
+
y = _this$container$getBo.y;
|
|
45034
44898
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45035
44899
|
var pageX = x + coordinate;
|
|
45036
|
-
var pageY = y + this.offset.top
|
|
44900
|
+
var pageY = y + this.offset.top;
|
|
45037
44901
|
this.mouseHandlerCallback({
|
|
45038
44902
|
pageX: pageX,
|
|
45039
44903
|
pageY: pageY
|
|
@@ -47793,8 +47657,8 @@ var ProgressChart = function (_a) {
|
|
|
47793
47657
|
return parseISO(date) >= start;
|
|
47794
47658
|
});
|
|
47795
47659
|
var _a = prepareData(period, passedExercisesAfterStart), resultsByInterval = _a.resultsByInterval, xAxisTicks = _a.xAxisTicks;
|
|
47796
|
-
var count = passedExercisesBeforeStart.length;
|
|
47797
47660
|
setData(function () {
|
|
47661
|
+
var count = passedExercisesBeforeStart.length;
|
|
47798
47662
|
return resultsByInterval.map(function (exercises, index) {
|
|
47799
47663
|
count += exercises.length;
|
|
47800
47664
|
var progress = Math.floor(100 / (nExercisesInCourse / count));
|