@typeolymp/ui-components 1.19.0 → 1.19.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/organisms/Chart/index.d.ts +3 -1
- package/build/components/organisms/Chart/stories.d.ts +1 -0
- package/build/components/organisms/Table/index.d.ts +1 -1
- package/build/index.es.js +773 -631
- package/build/index.es.js.map +1 -1
- package/build/index.js +773 -631
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/build/components/atoms/Input/translations.d.ts +0 -11
- package/build/components/molecules/Key/translations.d.ts +0 -5
- package/build/components/molecules/PasswordInputField/translations.d.ts +0 -11
- package/build/components/molecules/Tabs/styles.d.ts +0 -2
- package/build/components/organisms/Chart/data copy.d.ts +0 -30
- package/build/components/organisms/Chart/styles.d.ts +0 -1
- package/build/lib/enums.d.ts +0 -4
- package/build/lib/helpers.d.ts +0 -1
- package/build/lib/theme/index.d.ts +0 -3
- package/build/lib/theme/types.d.ts +0 -72
- package/build/lib/translations/index.d.ts +0 -6
- package/build/lib/types/TranslationType.d.ts +0 -7
package/build/index.es.js
CHANGED
|
@@ -4493,7 +4493,7 @@ function requiredArgs(required, args) {
|
|
|
4493
4493
|
}
|
|
4494
4494
|
}
|
|
4495
4495
|
|
|
4496
|
-
function _typeof$
|
|
4496
|
+
function _typeof$y(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$y = function _typeof(obj) { return typeof obj; }; } else { _typeof$y = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$y(obj); }
|
|
4497
4497
|
/**
|
|
4498
4498
|
* @name toDate
|
|
4499
4499
|
* @category Common Helpers
|
|
@@ -4529,7 +4529,7 @@ function toDate(argument) {
|
|
|
4529
4529
|
requiredArgs(1, arguments);
|
|
4530
4530
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4531
4531
|
|
|
4532
|
-
if (argument instanceof Date || _typeof$
|
|
4532
|
+
if (argument instanceof Date || _typeof$y(argument) === 'object' && argStr === '[object Date]') {
|
|
4533
4533
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4534
4534
|
return new Date(argument.getTime());
|
|
4535
4535
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4800,7 +4800,7 @@ var millisecondsInMinute = 60000;
|
|
|
4800
4800
|
|
|
4801
4801
|
var millisecondsInHour = 3600000;
|
|
4802
4802
|
|
|
4803
|
-
function _typeof$
|
|
4803
|
+
function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$x = function _typeof(obj) { return typeof obj; }; } else { _typeof$x = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$x(obj); }
|
|
4804
4804
|
/**
|
|
4805
4805
|
* @name isDate
|
|
4806
4806
|
* @category Common Helpers
|
|
@@ -4836,7 +4836,7 @@ function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4836
4836
|
|
|
4837
4837
|
function isDate(value) {
|
|
4838
4838
|
requiredArgs(1, arguments);
|
|
4839
|
-
return value instanceof Date || _typeof$
|
|
4839
|
+
return value instanceof Date || _typeof$x(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4840
4840
|
}
|
|
4841
4841
|
|
|
4842
4842
|
/**
|
|
@@ -13514,15 +13514,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13514
13514
|
|
|
13515
13515
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13516
13516
|
|
|
13517
|
-
function _slicedToArray$
|
|
13518
|
-
return _arrayWithHoles$
|
|
13517
|
+
function _slicedToArray$c(arr, i) {
|
|
13518
|
+
return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d();
|
|
13519
13519
|
}
|
|
13520
13520
|
|
|
13521
|
-
function _arrayWithHoles$
|
|
13521
|
+
function _arrayWithHoles$d(arr) {
|
|
13522
13522
|
if (Array.isArray(arr)) return arr;
|
|
13523
13523
|
}
|
|
13524
13524
|
|
|
13525
|
-
function _iterableToArrayLimit$
|
|
13525
|
+
function _iterableToArrayLimit$c(arr, i) {
|
|
13526
13526
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13527
13527
|
|
|
13528
13528
|
if (_i == null) return;
|
|
@@ -13552,16 +13552,16 @@ function _iterableToArrayLimit$d(arr, i) {
|
|
|
13552
13552
|
return _arr;
|
|
13553
13553
|
}
|
|
13554
13554
|
|
|
13555
|
-
function _unsupportedIterableToArray$
|
|
13555
|
+
function _unsupportedIterableToArray$k(o, minLen) {
|
|
13556
13556
|
if (!o) return;
|
|
13557
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13557
|
+
if (typeof o === "string") return _arrayLikeToArray$k(o, minLen);
|
|
13558
13558
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13559
13559
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13560
13560
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13561
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13561
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen);
|
|
13562
13562
|
}
|
|
13563
13563
|
|
|
13564
|
-
function _arrayLikeToArray$
|
|
13564
|
+
function _arrayLikeToArray$k(arr, len) {
|
|
13565
13565
|
if (len == null || len > arr.length) len = arr.length;
|
|
13566
13566
|
|
|
13567
13567
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13569,7 +13569,7 @@ function _arrayLikeToArray$l(arr, len) {
|
|
|
13569
13569
|
return arr2;
|
|
13570
13570
|
}
|
|
13571
13571
|
|
|
13572
|
-
function _nonIterableRest$
|
|
13572
|
+
function _nonIterableRest$d() {
|
|
13573
13573
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13574
13574
|
}
|
|
13575
13575
|
|
|
@@ -13633,7 +13633,7 @@ reservedProps.forEach(function (name) {
|
|
|
13633
13633
|
// This is a mapping from React prop names to the attribute names.
|
|
13634
13634
|
|
|
13635
13635
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13636
|
-
var _ref2 = _slicedToArray$
|
|
13636
|
+
var _ref2 = _slicedToArray$c(_ref, 2),
|
|
13637
13637
|
name = _ref2[0],
|
|
13638
13638
|
attributeName = _ref2[1];
|
|
13639
13639
|
|
|
@@ -16033,31 +16033,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16033
16033
|
return true;
|
|
16034
16034
|
};
|
|
16035
16035
|
|
|
16036
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16036
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$c(); }
|
|
16037
16037
|
|
|
16038
16038
|
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."); }
|
|
16039
16039
|
|
|
16040
16040
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16041
16041
|
|
|
16042
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16042
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16043
16043
|
|
|
16044
|
-
function ownKeys$
|
|
16044
|
+
function ownKeys$u(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16045
16045
|
|
|
16046
|
-
function _objectSpread$
|
|
16046
|
+
function _objectSpread$u(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$u(Object(source), !0).forEach(function (key) { _defineProperty$w(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$u(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16047
16047
|
|
|
16048
|
-
function _defineProperty$
|
|
16048
|
+
function _defineProperty$w(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16049
16049
|
|
|
16050
|
-
function _slicedToArray$
|
|
16050
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16051
16051
|
|
|
16052
|
-
function _nonIterableRest$
|
|
16052
|
+
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."); }
|
|
16053
16053
|
|
|
16054
|
-
function _unsupportedIterableToArray$
|
|
16054
|
+
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); }
|
|
16055
16055
|
|
|
16056
|
-
function _arrayLikeToArray$
|
|
16056
|
+
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; }
|
|
16057
16057
|
|
|
16058
|
-
function _iterableToArrayLimit$
|
|
16058
|
+
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; }
|
|
16059
16059
|
|
|
16060
|
-
function _arrayWithHoles$
|
|
16060
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16061
16061
|
|
|
16062
16062
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16063
16063
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16137,11 +16137,11 @@ function allFilesAccepted(_ref) {
|
|
|
16137
16137
|
|
|
16138
16138
|
return files.every(function (file) {
|
|
16139
16139
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16140
|
-
_fileAccepted2 = _slicedToArray$
|
|
16140
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 1),
|
|
16141
16141
|
accepted = _fileAccepted2[0];
|
|
16142
16142
|
|
|
16143
16143
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16144
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16144
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 1),
|
|
16145
16145
|
sizeMatch = _fileMatchSize2[0];
|
|
16146
16146
|
|
|
16147
16147
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16238,7 +16238,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16238
16238
|
function pickerOptionsFromAccept(accept) {
|
|
16239
16239
|
if (isDefined(accept)) {
|
|
16240
16240
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16241
|
-
var _ref3 = _slicedToArray$
|
|
16241
|
+
var _ref3 = _slicedToArray$b(_ref2, 2),
|
|
16242
16242
|
mimeType = _ref3[0],
|
|
16243
16243
|
ext = _ref3[1];
|
|
16244
16244
|
|
|
@@ -16256,11 +16256,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16256
16256
|
|
|
16257
16257
|
return ok;
|
|
16258
16258
|
}).reduce(function (agg, _ref4) {
|
|
16259
|
-
var _ref5 = _slicedToArray$
|
|
16259
|
+
var _ref5 = _slicedToArray$b(_ref4, 2),
|
|
16260
16260
|
mimeType = _ref5[0],
|
|
16261
16261
|
ext = _ref5[1];
|
|
16262
16262
|
|
|
16263
|
-
return _objectSpread$
|
|
16263
|
+
return _objectSpread$u(_objectSpread$u({}, agg), {}, _defineProperty$w({}, mimeType, ext));
|
|
16264
16264
|
}, {});
|
|
16265
16265
|
return [{
|
|
16266
16266
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16280,7 +16280,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16280
16280
|
function acceptPropAsAcceptAttr(accept) {
|
|
16281
16281
|
if (isDefined(accept)) {
|
|
16282
16282
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16283
|
-
var _ref7 = _slicedToArray$
|
|
16283
|
+
var _ref7 = _slicedToArray$b(_ref6, 2),
|
|
16284
16284
|
mimeType = _ref7[0],
|
|
16285
16285
|
ext = _ref7[1];
|
|
16286
16286
|
|
|
@@ -16348,40 +16348,40 @@ function isExt(v) {
|
|
|
16348
16348
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16349
16349
|
*/
|
|
16350
16350
|
|
|
16351
|
-
var _excluded$
|
|
16352
|
-
_excluded2$
|
|
16351
|
+
var _excluded$g = ["children"],
|
|
16352
|
+
_excluded2$5 = ["open"],
|
|
16353
16353
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16354
16354
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16355
16355
|
|
|
16356
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16356
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableSpread$b(); }
|
|
16357
16357
|
|
|
16358
16358
|
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."); }
|
|
16359
16359
|
|
|
16360
16360
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16361
16361
|
|
|
16362
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16362
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$i(arr); }
|
|
16363
16363
|
|
|
16364
|
-
function _slicedToArray$
|
|
16364
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$b(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$i(arr, i) || _nonIterableRest$b(); }
|
|
16365
16365
|
|
|
16366
|
-
function _nonIterableRest$
|
|
16366
|
+
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."); }
|
|
16367
16367
|
|
|
16368
|
-
function _unsupportedIterableToArray$
|
|
16368
|
+
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); }
|
|
16369
16369
|
|
|
16370
|
-
function _arrayLikeToArray$
|
|
16370
|
+
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; }
|
|
16371
16371
|
|
|
16372
|
-
function _iterableToArrayLimit$
|
|
16372
|
+
function _iterableToArrayLimit$a(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16373
16373
|
|
|
16374
|
-
function _arrayWithHoles$
|
|
16374
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
16375
16375
|
|
|
16376
|
-
function ownKeys$
|
|
16376
|
+
function ownKeys$t(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16377
16377
|
|
|
16378
|
-
function _objectSpread$
|
|
16378
|
+
function _objectSpread$t(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$t(Object(source), !0).forEach(function (key) { _defineProperty$v(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$t(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
16379
16379
|
|
|
16380
|
-
function _defineProperty$
|
|
16380
|
+
function _defineProperty$v(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16381
16381
|
|
|
16382
|
-
function _objectWithoutProperties$
|
|
16382
|
+
function _objectWithoutProperties$g(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$g(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16383
16383
|
|
|
16384
|
-
function _objectWithoutPropertiesLoose$
|
|
16384
|
+
function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
16385
16385
|
/**
|
|
16386
16386
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16387
16387
|
*
|
|
@@ -16399,11 +16399,11 @@ function _objectWithoutPropertiesLoose$d(source, excluded) { if (source == null)
|
|
|
16399
16399
|
|
|
16400
16400
|
var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
16401
16401
|
var children = _ref.children,
|
|
16402
|
-
params = _objectWithoutProperties$
|
|
16402
|
+
params = _objectWithoutProperties$g(_ref, _excluded$g);
|
|
16403
16403
|
|
|
16404
16404
|
var _useDropzone = useDropzone(params),
|
|
16405
16405
|
open = _useDropzone.open,
|
|
16406
|
-
props = _objectWithoutProperties$
|
|
16406
|
+
props = _objectWithoutProperties$g(_useDropzone, _excluded2$5);
|
|
16407
16407
|
|
|
16408
16408
|
useImperativeHandle(ref, function () {
|
|
16409
16409
|
return {
|
|
@@ -16411,13 +16411,13 @@ var Dropzone = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
16411
16411
|
};
|
|
16412
16412
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16413
16413
|
|
|
16414
|
-
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$
|
|
16414
|
+
return /*#__PURE__*/React__default.createElement(Fragment, null, children(_objectSpread$t(_objectSpread$t({}, props), {}, {
|
|
16415
16415
|
open: open
|
|
16416
16416
|
})));
|
|
16417
16417
|
});
|
|
16418
16418
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16419
16419
|
|
|
16420
|
-
var defaultProps$
|
|
16420
|
+
var defaultProps$2 = {
|
|
16421
16421
|
disabled: false,
|
|
16422
16422
|
getFilesFromEvent: fromEvent,
|
|
16423
16423
|
maxSize: Infinity,
|
|
@@ -16433,7 +16433,7 @@ var defaultProps$1 = {
|
|
|
16433
16433
|
useFsAccessApi: true,
|
|
16434
16434
|
autoFocus: false
|
|
16435
16435
|
};
|
|
16436
|
-
Dropzone.defaultProps = defaultProps$
|
|
16436
|
+
Dropzone.defaultProps = defaultProps$2;
|
|
16437
16437
|
Dropzone.propTypes = {
|
|
16438
16438
|
/**
|
|
16439
16439
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16784,7 +16784,7 @@ var initialState = {
|
|
|
16784
16784
|
function useDropzone() {
|
|
16785
16785
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16786
16786
|
|
|
16787
|
-
var _defaultProps$props = _objectSpread$
|
|
16787
|
+
var _defaultProps$props = _objectSpread$t(_objectSpread$t({}, defaultProps$2), props),
|
|
16788
16788
|
accept = _defaultProps$props.accept,
|
|
16789
16789
|
disabled = _defaultProps$props.disabled,
|
|
16790
16790
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -16831,7 +16831,7 @@ function useDropzone() {
|
|
|
16831
16831
|
var inputRef = useRef(null);
|
|
16832
16832
|
|
|
16833
16833
|
var _useReducer = useReducer(reducer$1, initialState),
|
|
16834
|
-
_useReducer2 = _slicedToArray$
|
|
16834
|
+
_useReducer2 = _slicedToArray$a(_useReducer, 2),
|
|
16835
16835
|
state = _useReducer2[0],
|
|
16836
16836
|
dispatch = _useReducer2[1];
|
|
16837
16837
|
|
|
@@ -17001,12 +17001,12 @@ function useDropzone() {
|
|
|
17001
17001
|
var fileRejections = [];
|
|
17002
17002
|
files.forEach(function (file) {
|
|
17003
17003
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17004
|
-
_fileAccepted2 = _slicedToArray$
|
|
17004
|
+
_fileAccepted2 = _slicedToArray$a(_fileAccepted, 2),
|
|
17005
17005
|
accepted = _fileAccepted2[0],
|
|
17006
17006
|
acceptError = _fileAccepted2[1];
|
|
17007
17007
|
|
|
17008
17008
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17009
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17009
|
+
_fileMatchSize2 = _slicedToArray$a(_fileMatchSize, 2),
|
|
17010
17010
|
sizeMatch = _fileMatchSize2[0],
|
|
17011
17011
|
sizeError = _fileMatchSize2[1];
|
|
17012
17012
|
|
|
@@ -17207,9 +17207,9 @@ function useDropzone() {
|
|
|
17207
17207
|
onDragOver = _ref2.onDragOver,
|
|
17208
17208
|
onDragLeave = _ref2.onDragLeave,
|
|
17209
17209
|
onDrop = _ref2.onDrop,
|
|
17210
|
-
rest = _objectWithoutProperties$
|
|
17210
|
+
rest = _objectWithoutProperties$g(_ref2, _excluded3$1);
|
|
17211
17211
|
|
|
17212
|
-
return _objectSpread$
|
|
17212
|
+
return _objectSpread$t(_objectSpread$t(_defineProperty$v({
|
|
17213
17213
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17214
17214
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17215
17215
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17234,9 +17234,9 @@ function useDropzone() {
|
|
|
17234
17234
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17235
17235
|
onChange = _ref3.onChange,
|
|
17236
17236
|
onClick = _ref3.onClick,
|
|
17237
|
-
rest = _objectWithoutProperties$
|
|
17237
|
+
rest = _objectWithoutProperties$g(_ref3, _excluded4);
|
|
17238
17238
|
|
|
17239
|
-
var inputProps = _defineProperty$
|
|
17239
|
+
var inputProps = _defineProperty$v({
|
|
17240
17240
|
accept: acceptAttr,
|
|
17241
17241
|
multiple: multiple,
|
|
17242
17242
|
type: "file",
|
|
@@ -17248,10 +17248,10 @@ function useDropzone() {
|
|
|
17248
17248
|
tabIndex: -1
|
|
17249
17249
|
}, refKey, inputRef);
|
|
17250
17250
|
|
|
17251
|
-
return _objectSpread$
|
|
17251
|
+
return _objectSpread$t(_objectSpread$t({}, inputProps), rest);
|
|
17252
17252
|
};
|
|
17253
17253
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17254
|
-
return _objectSpread$
|
|
17254
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17255
17255
|
isFocused: isFocused && !disabled,
|
|
17256
17256
|
getRootProps: getRootProps,
|
|
17257
17257
|
getInputProps: getInputProps,
|
|
@@ -17270,40 +17270,40 @@ function reducer$1(state, action) {
|
|
|
17270
17270
|
/* istanbul ignore next */
|
|
17271
17271
|
switch (action.type) {
|
|
17272
17272
|
case "focus":
|
|
17273
|
-
return _objectSpread$
|
|
17273
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17274
17274
|
isFocused: true
|
|
17275
17275
|
});
|
|
17276
17276
|
|
|
17277
17277
|
case "blur":
|
|
17278
|
-
return _objectSpread$
|
|
17278
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17279
17279
|
isFocused: false
|
|
17280
17280
|
});
|
|
17281
17281
|
|
|
17282
17282
|
case "openDialog":
|
|
17283
|
-
return _objectSpread$
|
|
17283
|
+
return _objectSpread$t(_objectSpread$t({}, initialState), {}, {
|
|
17284
17284
|
isFileDialogActive: true
|
|
17285
17285
|
});
|
|
17286
17286
|
|
|
17287
17287
|
case "closeDialog":
|
|
17288
|
-
return _objectSpread$
|
|
17288
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17289
17289
|
isFileDialogActive: false
|
|
17290
17290
|
});
|
|
17291
17291
|
|
|
17292
17292
|
case "setDraggedFiles":
|
|
17293
|
-
return _objectSpread$
|
|
17293
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17294
17294
|
isDragActive: action.isDragActive,
|
|
17295
17295
|
isDragAccept: action.isDragAccept,
|
|
17296
17296
|
isDragReject: action.isDragReject
|
|
17297
17297
|
});
|
|
17298
17298
|
|
|
17299
17299
|
case "setFiles":
|
|
17300
|
-
return _objectSpread$
|
|
17300
|
+
return _objectSpread$t(_objectSpread$t({}, state), {}, {
|
|
17301
17301
|
acceptedFiles: action.acceptedFiles,
|
|
17302
17302
|
fileRejections: action.fileRejections
|
|
17303
17303
|
});
|
|
17304
17304
|
|
|
17305
17305
|
case "reset":
|
|
17306
|
-
return _objectSpread$
|
|
17306
|
+
return _objectSpread$t({}, initialState);
|
|
17307
17307
|
|
|
17308
17308
|
default:
|
|
17309
17309
|
return state;
|
|
@@ -19529,7 +19529,7 @@ function shallowEqual(a, b) {
|
|
|
19529
19529
|
return true;
|
|
19530
19530
|
}
|
|
19531
19531
|
|
|
19532
|
-
function _typeof$
|
|
19532
|
+
function _typeof$w(obj) { "@babel/helpers - typeof"; return _typeof$w = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$w(obj); }
|
|
19533
19533
|
|
|
19534
19534
|
//
|
|
19535
19535
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19556,7 +19556,9 @@ var FilteredElementKeyMap = {
|
|
|
19556
19556
|
};
|
|
19557
19557
|
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'];
|
|
19558
19558
|
|
|
19559
|
-
|
|
19559
|
+
/** The type of easing function to use for animations */
|
|
19560
|
+
|
|
19561
|
+
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19560
19562
|
|
|
19561
19563
|
/** the offset of a chart, which define the blank space all around */
|
|
19562
19564
|
|
|
@@ -19592,7 +19594,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19592
19594
|
};
|
|
19593
19595
|
};
|
|
19594
19596
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19595
|
-
if (!isObject_1(props) || _typeof$
|
|
19597
|
+
if (!isObject_1(props) || _typeof$w(props) !== 'object') {
|
|
19596
19598
|
return null;
|
|
19597
19599
|
}
|
|
19598
19600
|
var out = null;
|
|
@@ -19606,11 +19608,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19606
19608
|
return out;
|
|
19607
19609
|
};
|
|
19608
19610
|
|
|
19609
|
-
var _excluded$
|
|
19610
|
-
_excluded2$
|
|
19611
|
-
function _objectWithoutProperties$
|
|
19612
|
-
function _objectWithoutPropertiesLoose$
|
|
19613
|
-
function _typeof$
|
|
19611
|
+
var _excluded$f = ["children"],
|
|
19612
|
+
_excluded2$4 = ["children"];
|
|
19613
|
+
function _objectWithoutProperties$f(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$f(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19614
|
+
function _objectWithoutPropertiesLoose$f(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19615
|
+
function _typeof$v(obj) { "@babel/helpers - typeof"; return _typeof$v = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$v(obj); }
|
|
19614
19616
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19615
19617
|
click: 'onClick',
|
|
19616
19618
|
mousedown: 'onMouseDown',
|
|
@@ -19717,7 +19719,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19717
19719
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19718
19720
|
};
|
|
19719
19721
|
var isDotProps = function isDotProps(dot) {
|
|
19720
|
-
return dot && _typeof$
|
|
19722
|
+
return dot && _typeof$v(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19721
19723
|
};
|
|
19722
19724
|
|
|
19723
19725
|
/**
|
|
@@ -19809,10 +19811,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
19809
19811
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
19810
19812
|
var _ref = nextChild.props || {},
|
|
19811
19813
|
nextChildren = _ref.children,
|
|
19812
|
-
nextProps = _objectWithoutProperties$
|
|
19814
|
+
nextProps = _objectWithoutProperties$f(_ref, _excluded$f);
|
|
19813
19815
|
var _ref2 = prevChild.props || {},
|
|
19814
19816
|
prevChildren = _ref2.children,
|
|
19815
|
-
prevProps = _objectWithoutProperties$
|
|
19817
|
+
prevProps = _objectWithoutProperties$f(_ref2, _excluded2$4);
|
|
19816
19818
|
if (nextChildren && prevChildren) {
|
|
19817
19819
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
19818
19820
|
}
|
|
@@ -19854,10 +19856,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
19854
19856
|
return toArray(children).indexOf(child);
|
|
19855
19857
|
};
|
|
19856
19858
|
|
|
19857
|
-
var _excluded$
|
|
19859
|
+
var _excluded$e = ["children", "width", "height", "viewBox", "className", "style"];
|
|
19858
19860
|
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); }
|
|
19859
|
-
function _objectWithoutProperties$
|
|
19860
|
-
function _objectWithoutPropertiesLoose$
|
|
19861
|
+
function _objectWithoutProperties$e(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$e(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19862
|
+
function _objectWithoutPropertiesLoose$e(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
19861
19863
|
function Surface(props) {
|
|
19862
19864
|
var children = props.children,
|
|
19863
19865
|
width = props.width,
|
|
@@ -19865,7 +19867,7 @@ function Surface(props) {
|
|
|
19865
19867
|
viewBox = props.viewBox,
|
|
19866
19868
|
className = props.className,
|
|
19867
19869
|
style = props.style,
|
|
19868
|
-
others = _objectWithoutProperties$
|
|
19870
|
+
others = _objectWithoutProperties$e(props, _excluded$e);
|
|
19869
19871
|
var svgView = viewBox || {
|
|
19870
19872
|
width: width,
|
|
19871
19873
|
height: height,
|
|
@@ -19882,14 +19884,14 @@ function Surface(props) {
|
|
|
19882
19884
|
}), /*#__PURE__*/React__default.createElement("title", null, props.title), /*#__PURE__*/React__default.createElement("desc", null, props.desc), children);
|
|
19883
19885
|
}
|
|
19884
19886
|
|
|
19885
|
-
var _excluded$
|
|
19887
|
+
var _excluded$d = ["children", "className"];
|
|
19886
19888
|
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); }
|
|
19887
|
-
function _objectWithoutProperties$
|
|
19888
|
-
function _objectWithoutPropertiesLoose$
|
|
19889
|
+
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; }
|
|
19890
|
+
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; }
|
|
19889
19891
|
var Layer = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
19890
19892
|
var children = props.children,
|
|
19891
19893
|
className = props.className,
|
|
19892
|
-
others = _objectWithoutProperties$
|
|
19894
|
+
others = _objectWithoutProperties$d(props, _excluded$d);
|
|
19893
19895
|
var layerClass = classNames('recharts-layer', className);
|
|
19894
19896
|
return /*#__PURE__*/React__default.createElement("g", _extends$l({
|
|
19895
19897
|
className: layerClass
|
|
@@ -23304,7 +23306,16 @@ function stackOffsetWiggle(series, order) {
|
|
|
23304
23306
|
stackOffsetNone(series, order);
|
|
23305
23307
|
}
|
|
23306
23308
|
|
|
23309
|
+
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); }
|
|
23310
|
+
var _excluded$c = ["type", "size", "sizeType"];
|
|
23307
23311
|
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); }
|
|
23312
|
+
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; }
|
|
23313
|
+
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; }
|
|
23314
|
+
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; }
|
|
23315
|
+
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23316
|
+
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); }
|
|
23317
|
+
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; }
|
|
23318
|
+
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; }
|
|
23308
23319
|
var symbolFactories = {
|
|
23309
23320
|
symbolCircle: symbolCircle,
|
|
23310
23321
|
symbolCross: symbolCross,
|
|
@@ -23343,31 +23354,35 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23343
23354
|
return Math.PI * size * size / 4;
|
|
23344
23355
|
}
|
|
23345
23356
|
};
|
|
23346
|
-
var symbolsDefaultProps = {
|
|
23347
|
-
type: 'circle',
|
|
23348
|
-
size: 64,
|
|
23349
|
-
sizeType: 'area'
|
|
23350
|
-
};
|
|
23351
23357
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23352
23358
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23353
23359
|
};
|
|
23354
|
-
var Symbols = function Symbols(
|
|
23360
|
+
var Symbols = function Symbols(_ref) {
|
|
23361
|
+
var _ref$type = _ref.type,
|
|
23362
|
+
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23363
|
+
_ref$size = _ref.size,
|
|
23364
|
+
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23365
|
+
_ref$sizeType = _ref.sizeType,
|
|
23366
|
+
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23367
|
+
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23368
|
+
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23369
|
+
type: type,
|
|
23370
|
+
size: size,
|
|
23371
|
+
sizeType: sizeType
|
|
23372
|
+
});
|
|
23373
|
+
|
|
23355
23374
|
/**
|
|
23356
23375
|
* Calculate the path of curve
|
|
23357
23376
|
* @return {String} path
|
|
23358
23377
|
*/
|
|
23359
23378
|
var getPath = function getPath() {
|
|
23360
|
-
var size = props.size,
|
|
23361
|
-
sizeType = props.sizeType,
|
|
23362
|
-
type = props.type;
|
|
23363
23379
|
var symbolFactory = getSymbolFactory(type);
|
|
23364
23380
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23365
23381
|
return symbol();
|
|
23366
23382
|
};
|
|
23367
23383
|
var className = props.className,
|
|
23368
23384
|
cx = props.cx,
|
|
23369
|
-
cy = props.cy
|
|
23370
|
-
size = props.size;
|
|
23385
|
+
cy = props.cy;
|
|
23371
23386
|
var filteredProps = filterProps(props, true);
|
|
23372
23387
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23373
23388
|
return /*#__PURE__*/React__default.createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23378,35 +23393,34 @@ var Symbols = function Symbols(props) {
|
|
|
23378
23393
|
}
|
|
23379
23394
|
return null;
|
|
23380
23395
|
};
|
|
23381
|
-
Symbols.defaultProps = symbolsDefaultProps;
|
|
23382
23396
|
Symbols.registerSymbol = registerSymbol;
|
|
23383
23397
|
|
|
23384
|
-
function _typeof$
|
|
23398
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; return _typeof$t = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof$t(obj); }
|
|
23385
23399
|
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); }
|
|
23386
|
-
function ownKeys$
|
|
23387
|
-
function _objectSpread$
|
|
23388
|
-
function _classCallCheck$
|
|
23389
|
-
function _defineProperties$
|
|
23390
|
-
function _createClass$
|
|
23391
|
-
function _inherits$
|
|
23392
|
-
function _setPrototypeOf$
|
|
23393
|
-
function _createSuper$
|
|
23394
|
-
function _possibleConstructorReturn$
|
|
23395
|
-
function _assertThisInitialized$
|
|
23396
|
-
function _isNativeReflectConstruct$
|
|
23397
|
-
function _getPrototypeOf$
|
|
23398
|
-
function _defineProperty$
|
|
23399
|
-
function _toPropertyKey$
|
|
23400
|
-
function _toPrimitive$
|
|
23400
|
+
function ownKeys$r(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23401
|
+
function _objectSpread$r(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$r(Object(source), !0).forEach(function (key) { _defineProperty$t(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$r(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23402
|
+
function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23403
|
+
function _defineProperties$b(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$s(descriptor.key), descriptor); } }
|
|
23404
|
+
function _createClass$b(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$b(Constructor.prototype, protoProps); if (staticProps) _defineProperties$b(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23405
|
+
function _inherits$9(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf$9(subClass, superClass); }
|
|
23406
|
+
function _setPrototypeOf$9(o, p) { _setPrototypeOf$9 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$9(o, p); }
|
|
23407
|
+
function _createSuper$9(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$9(); return function _createSuperInternal() { var Super = _getPrototypeOf$9(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf$9(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn$9(this, result); }; }
|
|
23408
|
+
function _possibleConstructorReturn$9(self, call) { if (call && (_typeof$t(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$9(self); }
|
|
23409
|
+
function _assertThisInitialized$9(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23410
|
+
function _isNativeReflectConstruct$9() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23411
|
+
function _getPrototypeOf$9(o) { _getPrototypeOf$9 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$9(o); }
|
|
23412
|
+
function _defineProperty$t(obj, key, value) { key = _toPropertyKey$s(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23413
|
+
function _toPropertyKey$s(arg) { var key = _toPrimitive$s(arg, "string"); return _typeof$t(key) === "symbol" ? key : String(key); }
|
|
23414
|
+
function _toPrimitive$s(input, hint) { if (_typeof$t(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$t(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23401
23415
|
var SIZE = 32;
|
|
23402
23416
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23403
|
-
_inherits$
|
|
23404
|
-
var _super = _createSuper$
|
|
23417
|
+
_inherits$9(DefaultLegendContent, _PureComponent);
|
|
23418
|
+
var _super = _createSuper$9(DefaultLegendContent);
|
|
23405
23419
|
function DefaultLegendContent() {
|
|
23406
|
-
_classCallCheck$
|
|
23420
|
+
_classCallCheck$b(this, DefaultLegendContent);
|
|
23407
23421
|
return _super.apply(this, arguments);
|
|
23408
23422
|
}
|
|
23409
|
-
_createClass$
|
|
23423
|
+
_createClass$b(DefaultLegendContent, [{
|
|
23410
23424
|
key: "renderIcon",
|
|
23411
23425
|
value:
|
|
23412
23426
|
/**
|
|
@@ -23451,7 +23465,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23451
23465
|
});
|
|
23452
23466
|
}
|
|
23453
23467
|
if ( /*#__PURE__*/React__default.isValidElement(data.legendIcon)) {
|
|
23454
|
-
var iconProps = _objectSpread$
|
|
23468
|
+
var iconProps = _objectSpread$r({}, data);
|
|
23455
23469
|
delete iconProps.legendIcon;
|
|
23456
23470
|
return /*#__PURE__*/React__default.cloneElement(data.legendIcon, iconProps);
|
|
23457
23471
|
}
|
|
@@ -23499,7 +23513,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23499
23513
|
var finalFormatter = entry.formatter || formatter;
|
|
23500
23514
|
var className = classNames((_classNames = {
|
|
23501
23515
|
'recharts-legend-item': true
|
|
23502
|
-
}, _defineProperty$
|
|
23516
|
+
}, _defineProperty$t(_classNames, "legend-item-".concat(i), true), _defineProperty$t(_classNames, "inactive", entry.inactive), _classNames));
|
|
23503
23517
|
if (entry.type === 'none') {
|
|
23504
23518
|
return null;
|
|
23505
23519
|
}
|
|
@@ -23544,8 +23558,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23544
23558
|
}]);
|
|
23545
23559
|
return DefaultLegendContent;
|
|
23546
23560
|
}(PureComponent);
|
|
23547
|
-
_defineProperty$
|
|
23548
|
-
_defineProperty$
|
|
23561
|
+
_defineProperty$t(DefaultLegendContent, "displayName", 'Legend');
|
|
23562
|
+
_defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
23549
23563
|
iconSize: 14,
|
|
23550
23564
|
layout: 'horizontal',
|
|
23551
23565
|
align: 'center',
|
|
@@ -23553,25 +23567,25 @@ _defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
|
23553
23567
|
inactiveColor: '#ccc'
|
|
23554
23568
|
});
|
|
23555
23569
|
|
|
23556
|
-
function _typeof$
|
|
23557
|
-
var _excluded$
|
|
23558
|
-
function ownKeys$
|
|
23559
|
-
function _objectSpread$
|
|
23560
|
-
function _classCallCheck$
|
|
23561
|
-
function _defineProperties$
|
|
23562
|
-
function _createClass$
|
|
23563
|
-
function _inherits$
|
|
23564
|
-
function _setPrototypeOf$
|
|
23565
|
-
function _createSuper$
|
|
23566
|
-
function _possibleConstructorReturn$
|
|
23567
|
-
function _assertThisInitialized$
|
|
23568
|
-
function _isNativeReflectConstruct$
|
|
23569
|
-
function _getPrototypeOf$
|
|
23570
|
-
function _defineProperty$
|
|
23571
|
-
function _toPropertyKey$
|
|
23572
|
-
function _toPrimitive$
|
|
23573
|
-
function _objectWithoutProperties$
|
|
23574
|
-
function _objectWithoutPropertiesLoose$
|
|
23570
|
+
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); }
|
|
23571
|
+
var _excluded$b = ["ref"];
|
|
23572
|
+
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; }
|
|
23573
|
+
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; }
|
|
23574
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23575
|
+
function _defineProperties$a(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$r(descriptor.key), descriptor); } }
|
|
23576
|
+
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; }
|
|
23577
|
+
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); }
|
|
23578
|
+
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); }
|
|
23579
|
+
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); }; }
|
|
23580
|
+
function _possibleConstructorReturn$8(self, call) { if (call && (_typeof$s(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$8(self); }
|
|
23581
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23582
|
+
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; } }
|
|
23583
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23584
|
+
function _defineProperty$s(obj, key, value) { key = _toPropertyKey$r(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23585
|
+
function _toPropertyKey$r(arg) { var key = _toPrimitive$r(arg, "string"); return _typeof$s(key) === "symbol" ? key : String(key); }
|
|
23586
|
+
function _toPrimitive$r(input, hint) { if (_typeof$s(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$s(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23587
|
+
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; }
|
|
23588
|
+
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; }
|
|
23575
23589
|
function defaultUniqBy$1(entry) {
|
|
23576
23590
|
return entry.value;
|
|
23577
23591
|
}
|
|
@@ -23592,27 +23606,27 @@ function renderContent$1(content, props) {
|
|
|
23592
23606
|
return /*#__PURE__*/React__default.createElement(content, props);
|
|
23593
23607
|
}
|
|
23594
23608
|
props.ref;
|
|
23595
|
-
var otherProps = _objectWithoutProperties$
|
|
23609
|
+
var otherProps = _objectWithoutProperties$b(props, _excluded$b);
|
|
23596
23610
|
return /*#__PURE__*/React__default.createElement(DefaultLegendContent, otherProps);
|
|
23597
23611
|
}
|
|
23598
23612
|
var EPS$2 = 1;
|
|
23599
23613
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23600
|
-
_inherits$
|
|
23601
|
-
var _super = _createSuper$
|
|
23614
|
+
_inherits$8(Legend, _PureComponent);
|
|
23615
|
+
var _super = _createSuper$8(Legend);
|
|
23602
23616
|
function Legend() {
|
|
23603
23617
|
var _this;
|
|
23604
|
-
_classCallCheck$
|
|
23618
|
+
_classCallCheck$a(this, Legend);
|
|
23605
23619
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23606
23620
|
args[_key] = arguments[_key];
|
|
23607
23621
|
}
|
|
23608
23622
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23609
|
-
_defineProperty$
|
|
23623
|
+
_defineProperty$s(_assertThisInitialized$8(_this), "state", {
|
|
23610
23624
|
boxWidth: -1,
|
|
23611
23625
|
boxHeight: -1
|
|
23612
23626
|
});
|
|
23613
23627
|
return _this;
|
|
23614
23628
|
}
|
|
23615
|
-
_createClass$
|
|
23629
|
+
_createClass$a(Legend, [{
|
|
23616
23630
|
key: "componentDidMount",
|
|
23617
23631
|
value: function componentDidMount() {
|
|
23618
23632
|
this.updateBBox();
|
|
@@ -23687,7 +23701,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23687
23701
|
};
|
|
23688
23702
|
}
|
|
23689
23703
|
}
|
|
23690
|
-
return _objectSpread$
|
|
23704
|
+
return _objectSpread$q(_objectSpread$q({}, hPos), vPos);
|
|
23691
23705
|
}
|
|
23692
23706
|
}, {
|
|
23693
23707
|
key: "updateBBox",
|
|
@@ -23730,7 +23744,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23730
23744
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23731
23745
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23732
23746
|
payload = _this$props2.payload;
|
|
23733
|
-
var outerStyle = _objectSpread$
|
|
23747
|
+
var outerStyle = _objectSpread$q(_objectSpread$q({
|
|
23734
23748
|
position: 'absolute',
|
|
23735
23749
|
width: width || 'auto',
|
|
23736
23750
|
height: height || 'auto'
|
|
@@ -23741,7 +23755,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23741
23755
|
ref: function ref(node) {
|
|
23742
23756
|
_this2.wrapperNode = node;
|
|
23743
23757
|
}
|
|
23744
|
-
}, renderContent$1(content, _objectSpread$
|
|
23758
|
+
}, renderContent$1(content, _objectSpread$q(_objectSpread$q({}, this.props), {}, {
|
|
23745
23759
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23746
23760
|
})));
|
|
23747
23761
|
}
|
|
@@ -23764,8 +23778,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23764
23778
|
}]);
|
|
23765
23779
|
return Legend;
|
|
23766
23780
|
}(PureComponent);
|
|
23767
|
-
_defineProperty$
|
|
23768
|
-
_defineProperty$
|
|
23781
|
+
_defineProperty$s(Legend, "displayName", 'Legend');
|
|
23782
|
+
_defineProperty$s(Legend, "defaultProps", {
|
|
23769
23783
|
iconSize: 14,
|
|
23770
23784
|
layout: 'horizontal',
|
|
23771
23785
|
align: 'center',
|
|
@@ -24329,13 +24343,13 @@ function setRafTimeout(callback) {
|
|
|
24329
24343
|
requestAnimationFrame(shouldUpdate);
|
|
24330
24344
|
}
|
|
24331
24345
|
|
|
24332
|
-
function _typeof$
|
|
24333
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24334
|
-
function _nonIterableRest$
|
|
24335
|
-
function _unsupportedIterableToArray$
|
|
24336
|
-
function _arrayLikeToArray$
|
|
24346
|
+
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); }
|
|
24347
|
+
function _toArray(arr) { return _arrayWithHoles$a(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableRest$a(); }
|
|
24348
|
+
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."); }
|
|
24349
|
+
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); }
|
|
24350
|
+
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; }
|
|
24337
24351
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24338
|
-
function _arrayWithHoles$
|
|
24352
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24339
24353
|
function createAnimateManager() {
|
|
24340
24354
|
var currStyle = {};
|
|
24341
24355
|
var handleChange = function handleChange() {
|
|
@@ -24362,7 +24376,7 @@ function createAnimateManager() {
|
|
|
24362
24376
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24363
24377
|
return;
|
|
24364
24378
|
}
|
|
24365
|
-
if (_typeof$
|
|
24379
|
+
if (_typeof$r(_style) === 'object') {
|
|
24366
24380
|
currStyle = _style;
|
|
24367
24381
|
handleChange(currStyle);
|
|
24368
24382
|
}
|
|
@@ -24389,12 +24403,12 @@ function createAnimateManager() {
|
|
|
24389
24403
|
};
|
|
24390
24404
|
}
|
|
24391
24405
|
|
|
24392
|
-
function _typeof$
|
|
24393
|
-
function ownKeys$
|
|
24394
|
-
function _objectSpread$
|
|
24395
|
-
function _defineProperty$
|
|
24396
|
-
function _toPropertyKey$
|
|
24397
|
-
function _toPrimitive$
|
|
24406
|
+
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); }
|
|
24407
|
+
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; }
|
|
24408
|
+
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; }
|
|
24409
|
+
function _defineProperty$r(obj, key, value) { key = _toPropertyKey$q(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24410
|
+
function _toPropertyKey$q(arg) { var key = _toPrimitive$q(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
24411
|
+
function _toPrimitive$q(input, hint) { if (_typeof$q(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$q(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24398
24412
|
/* eslint no-console: 0 */
|
|
24399
24413
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24400
24414
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24426,7 +24440,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24426
24440
|
*/
|
|
24427
24441
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24428
24442
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24429
|
-
return _defineProperty$
|
|
24443
|
+
return _defineProperty$r({}, name, Number.isNaN(value) ? 0 : value);
|
|
24430
24444
|
}
|
|
24431
24445
|
var isTransition = name === 'transition';
|
|
24432
24446
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24437,7 +24451,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24437
24451
|
if (isTransition) {
|
|
24438
24452
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24439
24453
|
}
|
|
24440
|
-
return _objectSpread$
|
|
24454
|
+
return _objectSpread$p(_objectSpread$p({}, result), {}, _defineProperty$r({}, property + camelName, styleVal));
|
|
24441
24455
|
}, {});
|
|
24442
24456
|
};
|
|
24443
24457
|
|
|
@@ -24447,7 +24461,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24447
24461
|
*/
|
|
24448
24462
|
var mapObject = function mapObject(fn, obj) {
|
|
24449
24463
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24450
|
-
return _objectSpread$
|
|
24464
|
+
return _objectSpread$p(_objectSpread$p({}, res), {}, _defineProperty$r({}, key, fn(key, obj[key])));
|
|
24451
24465
|
}, {});
|
|
24452
24466
|
};
|
|
24453
24467
|
|
|
@@ -24457,7 +24471,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24457
24471
|
*/
|
|
24458
24472
|
var translateStyle = function translateStyle(style) {
|
|
24459
24473
|
return Object.keys(style).reduce(function (res, key) {
|
|
24460
|
-
return _objectSpread$
|
|
24474
|
+
return _objectSpread$p(_objectSpread$p({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24461
24475
|
}, style);
|
|
24462
24476
|
};
|
|
24463
24477
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24485,16 +24499,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24485
24499
|
}
|
|
24486
24500
|
};
|
|
24487
24501
|
|
|
24488
|
-
function _slicedToArray$
|
|
24489
|
-
function _nonIterableRest$
|
|
24490
|
-
function _iterableToArrayLimit$
|
|
24491
|
-
function _arrayWithHoles$
|
|
24492
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24502
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24503
|
+
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."); }
|
|
24504
|
+
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; } }
|
|
24505
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24506
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$a(); }
|
|
24493
24507
|
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."); }
|
|
24494
|
-
function _unsupportedIterableToArray$
|
|
24508
|
+
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); }
|
|
24495
24509
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24496
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24497
|
-
function _arrayLikeToArray$
|
|
24510
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24511
|
+
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; }
|
|
24498
24512
|
var ACCURACY = 1e-4;
|
|
24499
24513
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24500
24514
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24570,7 +24584,7 @@ var configBezier = function configBezier() {
|
|
|
24570
24584
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24571
24585
|
return parseFloat(x);
|
|
24572
24586
|
});
|
|
24573
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24587
|
+
var _easing$1$split$0$spl2 = _slicedToArray$9(_easing$1$split$0$spl, 4);
|
|
24574
24588
|
x1 = _easing$1$split$0$spl2[0];
|
|
24575
24589
|
y1 = _easing$1$split$0$spl2[1];
|
|
24576
24590
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24663,22 +24677,22 @@ var configEasing = function configEasing() {
|
|
|
24663
24677
|
return null;
|
|
24664
24678
|
};
|
|
24665
24679
|
|
|
24666
|
-
function _typeof$
|
|
24667
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24680
|
+
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); }
|
|
24681
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$9(); }
|
|
24668
24682
|
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."); }
|
|
24669
24683
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24670
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24671
|
-
function ownKeys$
|
|
24672
|
-
function _objectSpread$
|
|
24673
|
-
function _defineProperty$
|
|
24674
|
-
function _toPropertyKey$
|
|
24675
|
-
function _toPrimitive$
|
|
24676
|
-
function _slicedToArray$
|
|
24677
|
-
function _nonIterableRest$
|
|
24678
|
-
function _unsupportedIterableToArray$
|
|
24679
|
-
function _arrayLikeToArray$
|
|
24680
|
-
function _iterableToArrayLimit$
|
|
24681
|
-
function _arrayWithHoles$
|
|
24684
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
24685
|
+
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; }
|
|
24686
|
+
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; }
|
|
24687
|
+
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; }
|
|
24688
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
24689
|
+
function _toPrimitive$p(input, hint) { if (_typeof$p(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$p(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24690
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$f(arr, i) || _nonIterableRest$8(); }
|
|
24691
|
+
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."); }
|
|
24692
|
+
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); }
|
|
24693
|
+
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; }
|
|
24694
|
+
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; } }
|
|
24695
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
24682
24696
|
var alpha = function alpha(begin, end, k) {
|
|
24683
24697
|
return begin + (end - begin) * k;
|
|
24684
24698
|
};
|
|
@@ -24696,10 +24710,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24696
24710
|
var nextStepVals = mapObject(function (key, val) {
|
|
24697
24711
|
if (needContinue(val)) {
|
|
24698
24712
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24699
|
-
_easing2 = _slicedToArray$
|
|
24713
|
+
_easing2 = _slicedToArray$8(_easing, 2),
|
|
24700
24714
|
newX = _easing2[0],
|
|
24701
24715
|
newV = _easing2[1];
|
|
24702
|
-
return _objectSpread$
|
|
24716
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24703
24717
|
from: newX,
|
|
24704
24718
|
velocity: newV
|
|
24705
24719
|
});
|
|
@@ -24709,7 +24723,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24709
24723
|
if (steps < 1) {
|
|
24710
24724
|
return mapObject(function (key, val) {
|
|
24711
24725
|
if (needContinue(val)) {
|
|
24712
|
-
return _objectSpread$
|
|
24726
|
+
return _objectSpread$o(_objectSpread$o({}, val), {}, {
|
|
24713
24727
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24714
24728
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24715
24729
|
});
|
|
@@ -24724,10 +24738,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24724
24738
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24725
24739
|
var interKeys = getIntersectionKeys(from, to);
|
|
24726
24740
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24727
|
-
return _objectSpread$
|
|
24741
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, [from[key], to[key]]));
|
|
24728
24742
|
}, {});
|
|
24729
24743
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24730
|
-
return _objectSpread$
|
|
24744
|
+
return _objectSpread$o(_objectSpread$o({}, res), {}, _defineProperty$q({}, key, {
|
|
24731
24745
|
from: from[key],
|
|
24732
24746
|
velocity: 0,
|
|
24733
24747
|
to: to[key]
|
|
@@ -24757,7 +24771,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24757
24771
|
var steps = deltaTime / easing.dt;
|
|
24758
24772
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24759
24773
|
// get union set and add compatible prefix
|
|
24760
|
-
render(_objectSpread$
|
|
24774
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), getCurrStyle()));
|
|
24761
24775
|
preTime = now;
|
|
24762
24776
|
if (!shouldStopAnimation()) {
|
|
24763
24777
|
cafId = requestAnimationFrame(update);
|
|
@@ -24775,14 +24789,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24775
24789
|
}, timingStyle);
|
|
24776
24790
|
|
|
24777
24791
|
// get union set and add compatible prefix
|
|
24778
|
-
render(_objectSpread$
|
|
24792
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), currStyle));
|
|
24779
24793
|
if (t < 1) {
|
|
24780
24794
|
cafId = requestAnimationFrame(update);
|
|
24781
24795
|
} else {
|
|
24782
24796
|
var finalStyle = mapObject(function (key, val) {
|
|
24783
24797
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24784
24798
|
}, timingStyle);
|
|
24785
|
-
render(_objectSpread$
|
|
24799
|
+
render(_objectSpread$o(_objectSpread$o(_objectSpread$o({}, from), to), finalStyle));
|
|
24786
24800
|
}
|
|
24787
24801
|
};
|
|
24788
24802
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -24798,37 +24812,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24798
24812
|
};
|
|
24799
24813
|
});
|
|
24800
24814
|
|
|
24801
|
-
function _typeof$
|
|
24802
|
-
var _excluded$
|
|
24803
|
-
function _objectWithoutProperties$
|
|
24804
|
-
function _objectWithoutPropertiesLoose$
|
|
24805
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
24815
|
+
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); }
|
|
24816
|
+
var _excluded$a = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
24817
|
+
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; }
|
|
24818
|
+
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; }
|
|
24819
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$e(arr) || _nonIterableSpread$8(); }
|
|
24806
24820
|
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."); }
|
|
24807
|
-
function _unsupportedIterableToArray$
|
|
24821
|
+
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); }
|
|
24808
24822
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24809
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24810
|
-
function _arrayLikeToArray$
|
|
24811
|
-
function ownKeys$
|
|
24812
|
-
function _objectSpread$
|
|
24813
|
-
function _defineProperty$
|
|
24814
|
-
function _classCallCheck$
|
|
24815
|
-
function _defineProperties$
|
|
24816
|
-
function _createClass$
|
|
24817
|
-
function _toPropertyKey$
|
|
24818
|
-
function _toPrimitive$
|
|
24819
|
-
function _inherits$
|
|
24820
|
-
function _setPrototypeOf$
|
|
24821
|
-
function _createSuper$
|
|
24822
|
-
function _possibleConstructorReturn$
|
|
24823
|
-
function _assertThisInitialized$
|
|
24824
|
-
function _isNativeReflectConstruct$
|
|
24825
|
-
function _getPrototypeOf$
|
|
24823
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$e(arr); }
|
|
24824
|
+
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; }
|
|
24825
|
+
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; }
|
|
24826
|
+
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; }
|
|
24827
|
+
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; }
|
|
24828
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
24829
|
+
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); } }
|
|
24830
|
+
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; }
|
|
24831
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$o(key) === "symbol" ? key : String(key); }
|
|
24832
|
+
function _toPrimitive$o(input, hint) { if (_typeof$o(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$o(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24833
|
+
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); }
|
|
24834
|
+
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); }
|
|
24835
|
+
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); }; }
|
|
24836
|
+
function _possibleConstructorReturn$7(self, call) { if (call && (_typeof$o(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$7(self); }
|
|
24837
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24838
|
+
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; } }
|
|
24839
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
24826
24840
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
24827
|
-
_inherits$
|
|
24828
|
-
var _super = _createSuper$
|
|
24841
|
+
_inherits$7(Animate, _PureComponent);
|
|
24842
|
+
var _super = _createSuper$7(Animate);
|
|
24829
24843
|
function Animate(props, context) {
|
|
24830
24844
|
var _this;
|
|
24831
|
-
_classCallCheck$
|
|
24845
|
+
_classCallCheck$9(this, Animate);
|
|
24832
24846
|
_this = _super.call(this, props, context);
|
|
24833
24847
|
var _this$props = _this.props,
|
|
24834
24848
|
isActive = _this$props.isActive,
|
|
@@ -24838,8 +24852,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24838
24852
|
steps = _this$props.steps,
|
|
24839
24853
|
children = _this$props.children,
|
|
24840
24854
|
duration = _this$props.duration;
|
|
24841
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
24842
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
24855
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$7(_this));
|
|
24856
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$7(_this));
|
|
24843
24857
|
if (!isActive || duration <= 0) {
|
|
24844
24858
|
_this.state = {
|
|
24845
24859
|
style: {}
|
|
@@ -24851,7 +24865,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24851
24865
|
style: to
|
|
24852
24866
|
};
|
|
24853
24867
|
}
|
|
24854
|
-
return _possibleConstructorReturn$
|
|
24868
|
+
return _possibleConstructorReturn$7(_this);
|
|
24855
24869
|
}
|
|
24856
24870
|
if (steps && steps.length) {
|
|
24857
24871
|
_this.state = {
|
|
@@ -24862,10 +24876,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24862
24876
|
_this.state = {
|
|
24863
24877
|
style: from
|
|
24864
24878
|
};
|
|
24865
|
-
return _possibleConstructorReturn$
|
|
24879
|
+
return _possibleConstructorReturn$7(_this);
|
|
24866
24880
|
}
|
|
24867
24881
|
_this.state = {
|
|
24868
|
-
style: attributeName ? _defineProperty$
|
|
24882
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
24869
24883
|
};
|
|
24870
24884
|
} else {
|
|
24871
24885
|
_this.state = {
|
|
@@ -24874,7 +24888,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24874
24888
|
}
|
|
24875
24889
|
return _this;
|
|
24876
24890
|
}
|
|
24877
|
-
_createClass$
|
|
24891
|
+
_createClass$9(Animate, [{
|
|
24878
24892
|
key: "componentDidMount",
|
|
24879
24893
|
value: function componentDidMount() {
|
|
24880
24894
|
var _this$props2 = this.props,
|
|
@@ -24902,7 +24916,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24902
24916
|
}
|
|
24903
24917
|
if (!isActive) {
|
|
24904
24918
|
var newState = {
|
|
24905
|
-
style: attributeName ? _defineProperty$
|
|
24919
|
+
style: attributeName ? _defineProperty$p({}, attributeName, to) : to
|
|
24906
24920
|
};
|
|
24907
24921
|
if (this.state && style) {
|
|
24908
24922
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -24925,14 +24939,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
24925
24939
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
24926
24940
|
if (this.state && style) {
|
|
24927
24941
|
var _newState = {
|
|
24928
|
-
style: attributeName ? _defineProperty$
|
|
24942
|
+
style: attributeName ? _defineProperty$p({}, attributeName, from) : from
|
|
24929
24943
|
};
|
|
24930
24944
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
24931
24945
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
24932
24946
|
this.setState(_newState);
|
|
24933
24947
|
}
|
|
24934
24948
|
}
|
|
24935
|
-
this.runAnimation(_objectSpread$
|
|
24949
|
+
this.runAnimation(_objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
24936
24950
|
from: from,
|
|
24937
24951
|
begin: 0
|
|
24938
24952
|
}));
|
|
@@ -25015,7 +25029,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25015
25029
|
}), duration]);
|
|
25016
25030
|
}
|
|
25017
25031
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25018
|
-
var newStyle = _objectSpread$
|
|
25032
|
+
var newStyle = _objectSpread$n(_objectSpread$n(_objectSpread$n({}, preItem.style), style), {}, {
|
|
25019
25033
|
transition: transition
|
|
25020
25034
|
});
|
|
25021
25035
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25047,9 +25061,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25047
25061
|
this.runStepAnimation(props);
|
|
25048
25062
|
return;
|
|
25049
25063
|
}
|
|
25050
|
-
var to = attributeName ? _defineProperty$
|
|
25064
|
+
var to = attributeName ? _defineProperty$p({}, attributeName, propsTo) : propsTo;
|
|
25051
25065
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25052
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25066
|
+
manager.start([onAnimationStart, begin, _objectSpread$n(_objectSpread$n({}, to), {}, {
|
|
25053
25067
|
transition: transition
|
|
25054
25068
|
}), duration, onAnimationEnd]);
|
|
25055
25069
|
}
|
|
@@ -25070,7 +25084,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25070
25084
|
_this$props4.onAnimationEnd;
|
|
25071
25085
|
_this$props4.shouldReAnimate;
|
|
25072
25086
|
_this$props4.onAnimationReStart;
|
|
25073
|
-
var others = _objectWithoutProperties$
|
|
25087
|
+
var others = _objectWithoutProperties$a(_this$props4, _excluded$a);
|
|
25074
25088
|
var count = Children.count(children);
|
|
25075
25089
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25076
25090
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25085,8 +25099,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25085
25099
|
_container$props$styl = _container$props.style,
|
|
25086
25100
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25087
25101
|
className = _container$props.className;
|
|
25088
|
-
var res = /*#__PURE__*/cloneElement(container, _objectSpread$
|
|
25089
|
-
style: _objectSpread$
|
|
25102
|
+
var res = /*#__PURE__*/cloneElement(container, _objectSpread$n(_objectSpread$n({}, others), {}, {
|
|
25103
|
+
style: _objectSpread$n(_objectSpread$n({}, style), stateStyle),
|
|
25090
25104
|
className: className
|
|
25091
25105
|
}));
|
|
25092
25106
|
return res;
|
|
@@ -25611,10 +25625,10 @@ var defineProperty$2 = (function() {
|
|
|
25611
25625
|
} catch (e) {}
|
|
25612
25626
|
}());
|
|
25613
25627
|
|
|
25614
|
-
var _defineProperty$
|
|
25628
|
+
var _defineProperty$o = defineProperty$2;
|
|
25615
25629
|
|
|
25616
25630
|
var constant$1 = constant_1,
|
|
25617
|
-
defineProperty$1 = _defineProperty$
|
|
25631
|
+
defineProperty$1 = _defineProperty$o,
|
|
25618
25632
|
identity$7 = identity_1;
|
|
25619
25633
|
|
|
25620
25634
|
/**
|
|
@@ -25791,18 +25805,18 @@ var sortBy_1 = sortBy;
|
|
|
25791
25805
|
/**
|
|
25792
25806
|
* @fileOverview Default Tooltip Content
|
|
25793
25807
|
*/
|
|
25794
|
-
function _typeof$
|
|
25795
|
-
function _slicedToArray$
|
|
25796
|
-
function _nonIterableRest$
|
|
25797
|
-
function _unsupportedIterableToArray$
|
|
25798
|
-
function _arrayLikeToArray$
|
|
25799
|
-
function _iterableToArrayLimit$
|
|
25800
|
-
function _arrayWithHoles$
|
|
25801
|
-
function ownKeys$
|
|
25802
|
-
function _objectSpread$
|
|
25803
|
-
function _defineProperty$
|
|
25804
|
-
function _toPropertyKey$
|
|
25805
|
-
function _toPrimitive$
|
|
25808
|
+
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); }
|
|
25809
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
25810
|
+
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."); }
|
|
25811
|
+
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); }
|
|
25812
|
+
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; }
|
|
25813
|
+
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; } }
|
|
25814
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
25815
|
+
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; }
|
|
25816
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty$n(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25817
|
+
function _defineProperty$n(obj, key, value) { key = _toPropertyKey$n(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25818
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
25819
|
+
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); }
|
|
25806
25820
|
function defaultFormatter(value) {
|
|
25807
25821
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
25808
25822
|
}
|
|
@@ -25832,7 +25846,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25832
25846
|
if (entry.type === 'none') {
|
|
25833
25847
|
return null;
|
|
25834
25848
|
}
|
|
25835
|
-
var finalItemStyle = _objectSpread$
|
|
25849
|
+
var finalItemStyle = _objectSpread$m({
|
|
25836
25850
|
display: 'block',
|
|
25837
25851
|
paddingTop: 4,
|
|
25838
25852
|
paddingBottom: 4,
|
|
@@ -25846,7 +25860,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25846
25860
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
25847
25861
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
25848
25862
|
if (Array.isArray(formatted)) {
|
|
25849
|
-
var _formatted = _slicedToArray$
|
|
25863
|
+
var _formatted = _slicedToArray$7(formatted, 2);
|
|
25850
25864
|
finalValue = _formatted[0];
|
|
25851
25865
|
finalName = _formatted[1];
|
|
25852
25866
|
} else {
|
|
@@ -25878,14 +25892,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
25878
25892
|
}
|
|
25879
25893
|
return null;
|
|
25880
25894
|
};
|
|
25881
|
-
var finalStyle = _objectSpread$
|
|
25895
|
+
var finalStyle = _objectSpread$m({
|
|
25882
25896
|
margin: 0,
|
|
25883
25897
|
padding: 10,
|
|
25884
25898
|
backgroundColor: '#fff',
|
|
25885
25899
|
border: '1px solid #ccc',
|
|
25886
25900
|
whiteSpace: 'nowrap'
|
|
25887
25901
|
}, contentStyle);
|
|
25888
|
-
var finalLabelStyle = _objectSpread$
|
|
25902
|
+
var finalLabelStyle = _objectSpread$m({
|
|
25889
25903
|
margin: 0
|
|
25890
25904
|
}, labelStyle);
|
|
25891
25905
|
var hasLabel = !isNil_1(label);
|
|
@@ -25926,18 +25940,22 @@ var Global = {
|
|
|
25926
25940
|
}
|
|
25927
25941
|
};
|
|
25928
25942
|
|
|
25929
|
-
function _typeof$
|
|
25930
|
-
function ownKeys$
|
|
25931
|
-
function _objectSpread$
|
|
25932
|
-
function
|
|
25933
|
-
function
|
|
25934
|
-
function
|
|
25935
|
-
function
|
|
25936
|
-
function
|
|
25937
|
-
function
|
|
25938
|
-
function
|
|
25939
|
-
function
|
|
25940
|
-
function
|
|
25943
|
+
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); }
|
|
25944
|
+
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; }
|
|
25945
|
+
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty$m(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25946
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25947
|
+
function _defineProperties$8(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$m(descriptor.key), descriptor); } }
|
|
25948
|
+
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; }
|
|
25949
|
+
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); }
|
|
25950
|
+
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); }
|
|
25951
|
+
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); }; }
|
|
25952
|
+
function _possibleConstructorReturn$6(self, call) { if (call && (_typeof$m(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$6(self); }
|
|
25953
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25954
|
+
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; } }
|
|
25955
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25956
|
+
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; }
|
|
25957
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
25958
|
+
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
25959
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
25942
25960
|
var EPS$1 = 1;
|
|
25943
25961
|
function defaultUniqBy(entry) {
|
|
@@ -25961,7 +25979,204 @@ function renderContent(content, props) {
|
|
|
25961
25979
|
}
|
|
25962
25980
|
return /*#__PURE__*/React__default.createElement(DefaultTooltipContent, props);
|
|
25963
25981
|
}
|
|
25964
|
-
var
|
|
25982
|
+
var Tooltip$1 = /*#__PURE__*/function (_PureComponent) {
|
|
25983
|
+
_inherits$6(Tooltip, _PureComponent);
|
|
25984
|
+
var _super = _createSuper$6(Tooltip);
|
|
25985
|
+
function Tooltip() {
|
|
25986
|
+
var _this;
|
|
25987
|
+
_classCallCheck$8(this, Tooltip);
|
|
25988
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
25989
|
+
args[_key] = arguments[_key];
|
|
25990
|
+
}
|
|
25991
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
25992
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
25993
|
+
boxWidth: -1,
|
|
25994
|
+
boxHeight: -1,
|
|
25995
|
+
dismissed: false,
|
|
25996
|
+
dismissedAtCoordinate: {
|
|
25997
|
+
x: 0,
|
|
25998
|
+
y: 0
|
|
25999
|
+
}
|
|
26000
|
+
});
|
|
26001
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26002
|
+
if (event.key === 'Escape') {
|
|
26003
|
+
_this.setState({
|
|
26004
|
+
dismissed: true,
|
|
26005
|
+
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26006
|
+
x: _this.props.coordinate.x,
|
|
26007
|
+
y: _this.props.coordinate.y
|
|
26008
|
+
})
|
|
26009
|
+
});
|
|
26010
|
+
}
|
|
26011
|
+
});
|
|
26012
|
+
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26013
|
+
var key = _ref.key,
|
|
26014
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26015
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26016
|
+
var _this$props = _this.props,
|
|
26017
|
+
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26018
|
+
reverseDirection = _this$props.reverseDirection,
|
|
26019
|
+
coordinate = _this$props.coordinate,
|
|
26020
|
+
offset = _this$props.offset,
|
|
26021
|
+
position = _this$props.position,
|
|
26022
|
+
viewBox = _this$props.viewBox;
|
|
26023
|
+
if (position && isNumber(position[key])) {
|
|
26024
|
+
return position[key];
|
|
26025
|
+
}
|
|
26026
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26027
|
+
var positive = coordinate[key] + offset;
|
|
26028
|
+
if (allowEscapeViewBox[key]) {
|
|
26029
|
+
return reverseDirection[key] ? negative : positive;
|
|
26030
|
+
}
|
|
26031
|
+
if (reverseDirection[key]) {
|
|
26032
|
+
var _tooltipBoundary = negative;
|
|
26033
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26034
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26035
|
+
return Math.max(positive, viewBox[key]);
|
|
26036
|
+
}
|
|
26037
|
+
return Math.max(negative, viewBox[key]);
|
|
26038
|
+
}
|
|
26039
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26040
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26041
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26042
|
+
return Math.max(negative, viewBox[key]);
|
|
26043
|
+
}
|
|
26044
|
+
return Math.max(positive, viewBox[key]);
|
|
26045
|
+
});
|
|
26046
|
+
return _this;
|
|
26047
|
+
}
|
|
26048
|
+
_createClass$8(Tooltip, [{
|
|
26049
|
+
key: "componentDidMount",
|
|
26050
|
+
value: function componentDidMount() {
|
|
26051
|
+
this.updateBBox();
|
|
26052
|
+
}
|
|
26053
|
+
}, {
|
|
26054
|
+
key: "componentWillUnmount",
|
|
26055
|
+
value: function componentWillUnmount() {
|
|
26056
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26057
|
+
}
|
|
26058
|
+
}, {
|
|
26059
|
+
key: "componentDidUpdate",
|
|
26060
|
+
value: function componentDidUpdate() {
|
|
26061
|
+
this.updateBBox();
|
|
26062
|
+
}
|
|
26063
|
+
}, {
|
|
26064
|
+
key: "updateBBox",
|
|
26065
|
+
value: function updateBBox() {
|
|
26066
|
+
var _this$state = this.state,
|
|
26067
|
+
boxWidth = _this$state.boxWidth,
|
|
26068
|
+
boxHeight = _this$state.boxHeight,
|
|
26069
|
+
dismissed = _this$state.dismissed;
|
|
26070
|
+
if (dismissed) {
|
|
26071
|
+
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26072
|
+
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26073
|
+
this.setState({
|
|
26074
|
+
dismissed: false
|
|
26075
|
+
});
|
|
26076
|
+
}
|
|
26077
|
+
} else {
|
|
26078
|
+
document.addEventListener('keydown', this.handleKeyDown);
|
|
26079
|
+
}
|
|
26080
|
+
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26081
|
+
var box = this.wrapperNode.getBoundingClientRect();
|
|
26082
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26083
|
+
this.setState({
|
|
26084
|
+
boxWidth: box.width,
|
|
26085
|
+
boxHeight: box.height
|
|
26086
|
+
});
|
|
26087
|
+
}
|
|
26088
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26089
|
+
this.setState({
|
|
26090
|
+
boxWidth: -1,
|
|
26091
|
+
boxHeight: -1
|
|
26092
|
+
});
|
|
26093
|
+
}
|
|
26094
|
+
}
|
|
26095
|
+
}, {
|
|
26096
|
+
key: "render",
|
|
26097
|
+
value: function render() {
|
|
26098
|
+
var _classNames,
|
|
26099
|
+
_this2 = this;
|
|
26100
|
+
var _this$props2 = this.props,
|
|
26101
|
+
payload = _this$props2.payload,
|
|
26102
|
+
isAnimationActive = _this$props2.isAnimationActive,
|
|
26103
|
+
animationDuration = _this$props2.animationDuration,
|
|
26104
|
+
animationEasing = _this$props2.animationEasing,
|
|
26105
|
+
filterNull = _this$props2.filterNull,
|
|
26106
|
+
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26107
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26108
|
+
return !isNil_1(entry.value);
|
|
26109
|
+
}) : payload);
|
|
26110
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26111
|
+
var _this$props3 = this.props,
|
|
26112
|
+
content = _this$props3.content,
|
|
26113
|
+
viewBox = _this$props3.viewBox,
|
|
26114
|
+
coordinate = _this$props3.coordinate,
|
|
26115
|
+
position = _this$props3.position,
|
|
26116
|
+
active = _this$props3.active,
|
|
26117
|
+
wrapperStyle = _this$props3.wrapperStyle;
|
|
26118
|
+
var outerStyle = _objectSpread$l({
|
|
26119
|
+
pointerEvents: 'none',
|
|
26120
|
+
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26121
|
+
position: 'absolute',
|
|
26122
|
+
top: 0,
|
|
26123
|
+
left: 0
|
|
26124
|
+
}, wrapperStyle);
|
|
26125
|
+
var translateX, translateY;
|
|
26126
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26127
|
+
translateX = position.x;
|
|
26128
|
+
translateY = position.y;
|
|
26129
|
+
} else {
|
|
26130
|
+
var _this$state2 = this.state,
|
|
26131
|
+
boxWidth = _this$state2.boxWidth,
|
|
26132
|
+
boxHeight = _this$state2.boxHeight;
|
|
26133
|
+
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26134
|
+
translateX = this.getTranslate({
|
|
26135
|
+
key: 'x',
|
|
26136
|
+
tooltipDimension: boxWidth,
|
|
26137
|
+
viewBoxDimension: viewBox.width
|
|
26138
|
+
});
|
|
26139
|
+
translateY = this.getTranslate({
|
|
26140
|
+
key: 'y',
|
|
26141
|
+
tooltipDimension: boxHeight,
|
|
26142
|
+
viewBoxDimension: viewBox.height
|
|
26143
|
+
});
|
|
26144
|
+
} else {
|
|
26145
|
+
outerStyle.visibility = 'hidden';
|
|
26146
|
+
}
|
|
26147
|
+
}
|
|
26148
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26149
|
+
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26150
|
+
})), outerStyle);
|
|
26151
|
+
if (isAnimationActive && active) {
|
|
26152
|
+
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26153
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26154
|
+
})), outerStyle);
|
|
26155
|
+
}
|
|
26156
|
+
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));
|
|
26157
|
+
return (
|
|
26158
|
+
/*#__PURE__*/
|
|
26159
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26160
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26161
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26162
|
+
React__default.createElement("div", {
|
|
26163
|
+
tabIndex: -1,
|
|
26164
|
+
role: "dialog",
|
|
26165
|
+
className: cls,
|
|
26166
|
+
style: outerStyle,
|
|
26167
|
+
ref: function ref(node) {
|
|
26168
|
+
_this2.wrapperNode = node;
|
|
26169
|
+
}
|
|
26170
|
+
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26171
|
+
payload: finalPayload
|
|
26172
|
+
})))
|
|
26173
|
+
);
|
|
26174
|
+
}
|
|
26175
|
+
}]);
|
|
26176
|
+
return Tooltip;
|
|
26177
|
+
}(PureComponent);
|
|
26178
|
+
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26179
|
+
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
25965
26180
|
active: false,
|
|
25966
26181
|
allowEscapeViewBox: {
|
|
25967
26182
|
x: false,
|
|
@@ -25982,9 +26197,6 @@ var tooltipDefaultProps = {
|
|
|
25982
26197
|
x: 0,
|
|
25983
26198
|
y: 0
|
|
25984
26199
|
},
|
|
25985
|
-
// this doesn't exist on TooltipProps
|
|
25986
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25987
|
-
// @ts-ignore
|
|
25988
26200
|
cursorStyle: {},
|
|
25989
26201
|
separator: ' : ',
|
|
25990
26202
|
wrapperStyle: {},
|
|
@@ -25998,173 +26210,7 @@ var tooltipDefaultProps = {
|
|
|
25998
26210
|
animationDuration: 400,
|
|
25999
26211
|
filterNull: true,
|
|
26000
26212
|
useTranslate3d: false
|
|
26001
|
-
};
|
|
26002
|
-
var Tooltip$1 = function Tooltip(props) {
|
|
26003
|
-
var _classNames;
|
|
26004
|
-
var _useState = useState(-1),
|
|
26005
|
-
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26006
|
-
boxWidth = _useState2[0],
|
|
26007
|
-
setBoxWidth = _useState2[1];
|
|
26008
|
-
var _useState3 = useState(-1),
|
|
26009
|
-
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26010
|
-
boxHeight = _useState4[0],
|
|
26011
|
-
setBoxHeight = _useState4[1];
|
|
26012
|
-
var _useState5 = useState(false),
|
|
26013
|
-
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26014
|
-
dismissed = _useState6[0],
|
|
26015
|
-
setDismissed = _useState6[1];
|
|
26016
|
-
var _useState7 = useState({
|
|
26017
|
-
x: 0,
|
|
26018
|
-
y: 0
|
|
26019
|
-
}),
|
|
26020
|
-
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26021
|
-
dismissedAtCoordinate = _useState8[0],
|
|
26022
|
-
setDismissedAtCoordinate = _useState8[1];
|
|
26023
|
-
var wrapperNode = useRef();
|
|
26024
|
-
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26025
|
-
reverseDirection = props.reverseDirection,
|
|
26026
|
-
coordinate = props.coordinate,
|
|
26027
|
-
offset = props.offset,
|
|
26028
|
-
position = props.position,
|
|
26029
|
-
viewBox = props.viewBox;
|
|
26030
|
-
var handleKeyDown = useCallback(function (event) {
|
|
26031
|
-
if (event.key === 'Escape') {
|
|
26032
|
-
setDismissed(true);
|
|
26033
|
-
setDismissedAtCoordinate(function (prev) {
|
|
26034
|
-
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26035
|
-
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26036
|
-
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26037
|
-
});
|
|
26038
|
-
});
|
|
26039
|
-
}
|
|
26040
|
-
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26041
|
-
useEffect(function () {
|
|
26042
|
-
var updateBBox = function updateBBox() {
|
|
26043
|
-
if (dismissed) {
|
|
26044
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26045
|
-
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26046
|
-
setDismissed(false);
|
|
26047
|
-
}
|
|
26048
|
-
} else {
|
|
26049
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
26050
|
-
}
|
|
26051
|
-
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26052
|
-
var box = wrapperNode.current.getBoundingClientRect();
|
|
26053
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26054
|
-
setBoxWidth(box.width);
|
|
26055
|
-
setBoxHeight(box.height);
|
|
26056
|
-
}
|
|
26057
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26058
|
-
setBoxWidth(-1);
|
|
26059
|
-
setBoxHeight(-1);
|
|
26060
|
-
}
|
|
26061
|
-
};
|
|
26062
|
-
updateBBox();
|
|
26063
|
-
return function () {
|
|
26064
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
26065
|
-
};
|
|
26066
|
-
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26067
|
-
var getTranslate = function getTranslate(_ref) {
|
|
26068
|
-
var key = _ref.key,
|
|
26069
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26070
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26071
|
-
if (position && isNumber(position[key])) {
|
|
26072
|
-
return position[key];
|
|
26073
|
-
}
|
|
26074
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26075
|
-
var positive = coordinate[key] + offset;
|
|
26076
|
-
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26077
|
-
return reverseDirection[key] ? negative : positive;
|
|
26078
|
-
}
|
|
26079
|
-
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26080
|
-
var _tooltipBoundary = negative;
|
|
26081
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26082
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26083
|
-
return Math.max(positive, viewBox[key]);
|
|
26084
|
-
}
|
|
26085
|
-
return Math.max(negative, viewBox[key]);
|
|
26086
|
-
}
|
|
26087
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26088
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26089
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26090
|
-
return Math.max(negative, viewBox[key]);
|
|
26091
|
-
}
|
|
26092
|
-
return Math.max(positive, viewBox[key]);
|
|
26093
|
-
};
|
|
26094
|
-
var payload = props.payload,
|
|
26095
|
-
payloadUniqBy = props.payloadUniqBy,
|
|
26096
|
-
filterNull = props.filterNull,
|
|
26097
|
-
active = props.active,
|
|
26098
|
-
wrapperStyle = props.wrapperStyle,
|
|
26099
|
-
useTranslate3d = props.useTranslate3d,
|
|
26100
|
-
isAnimationActive = props.isAnimationActive,
|
|
26101
|
-
animationDuration = props.animationDuration,
|
|
26102
|
-
animationEasing = props.animationEasing;
|
|
26103
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26104
|
-
return !isNil_1(entry.value);
|
|
26105
|
-
}) : payload);
|
|
26106
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26107
|
-
var content = props.content;
|
|
26108
|
-
var outerStyle = _objectSpread$i({
|
|
26109
|
-
pointerEvents: 'none',
|
|
26110
|
-
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26111
|
-
position: 'absolute',
|
|
26112
|
-
top: 0,
|
|
26113
|
-
left: 0
|
|
26114
|
-
}, wrapperStyle);
|
|
26115
|
-
var translateX, translateY;
|
|
26116
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26117
|
-
translateX = position.x;
|
|
26118
|
-
translateY = position.y;
|
|
26119
|
-
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26120
|
-
translateX = getTranslate({
|
|
26121
|
-
key: 'x',
|
|
26122
|
-
tooltipDimension: boxWidth,
|
|
26123
|
-
viewBoxDimension: viewBox.width
|
|
26124
|
-
});
|
|
26125
|
-
translateY = getTranslate({
|
|
26126
|
-
key: 'y',
|
|
26127
|
-
tooltipDimension: boxHeight,
|
|
26128
|
-
viewBoxDimension: viewBox.height
|
|
26129
|
-
});
|
|
26130
|
-
} else {
|
|
26131
|
-
outerStyle.visibility = 'hidden';
|
|
26132
|
-
}
|
|
26133
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26134
|
-
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26135
|
-
})), outerStyle);
|
|
26136
|
-
if (isAnimationActive && active) {
|
|
26137
|
-
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26138
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26139
|
-
})), outerStyle);
|
|
26140
|
-
}
|
|
26141
|
-
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));
|
|
26142
|
-
return (
|
|
26143
|
-
/*#__PURE__*/
|
|
26144
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26145
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26146
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26147
|
-
React__default.createElement("div", {
|
|
26148
|
-
tabIndex: -1,
|
|
26149
|
-
role: "dialog",
|
|
26150
|
-
className: cls,
|
|
26151
|
-
style: outerStyle,
|
|
26152
|
-
ref: wrapperNode
|
|
26153
|
-
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26154
|
-
payload: finalPayload
|
|
26155
|
-
})))
|
|
26156
|
-
);
|
|
26157
|
-
};
|
|
26158
|
-
|
|
26159
|
-
// needs to be set so that renderByOrder can find the correct handler function
|
|
26160
|
-
Tooltip$1.displayName = 'Tooltip';
|
|
26161
|
-
|
|
26162
|
-
/**
|
|
26163
|
-
* needs to be set so that renderByOrder can access an have default values for
|
|
26164
|
-
* children.props when there are no props set by the consumer
|
|
26165
|
-
* doesn't work if using default parameters
|
|
26166
|
-
*/
|
|
26167
|
-
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26213
|
+
});
|
|
26168
26214
|
|
|
26169
26215
|
var root = _root;
|
|
26170
26216
|
|
|
@@ -31734,12 +31780,12 @@ module.exports = exports['default'];
|
|
|
31734
31780
|
|
|
31735
31781
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31736
31782
|
|
|
31737
|
-
function _typeof$
|
|
31738
|
-
function ownKeys$
|
|
31739
|
-
function _objectSpread$
|
|
31740
|
-
function _defineProperty$
|
|
31741
|
-
function _toPropertyKey$
|
|
31742
|
-
function _toPrimitive$
|
|
31783
|
+
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); }
|
|
31784
|
+
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; }
|
|
31785
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty$l(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31786
|
+
function _defineProperty$l(obj, key, value) { key = _toPropertyKey$l(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31787
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
31788
|
+
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); }
|
|
31743
31789
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31744
31790
|
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."); }
|
|
31745
31791
|
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); }
|
|
@@ -31807,7 +31853,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
31807
31853
|
}
|
|
31808
31854
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
31809
31855
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
31810
|
-
var measurementSpanStyle = _objectSpread$
|
|
31856
|
+
var measurementSpanStyle = _objectSpread$k(_objectSpread$k({}, SPAN_STYLE), style);
|
|
31811
31857
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
31812
31858
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
31813
31859
|
return styleKey;
|
|
@@ -31862,10 +31908,11 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
31862
31908
|
};
|
|
31863
31909
|
};
|
|
31864
31910
|
|
|
31865
|
-
var _excluded$
|
|
31911
|
+
var _excluded$9 = ["x", "y", "lineHeight", "capHeight", "scaleToFit", "textAnchor", "verticalAnchor", "fill"],
|
|
31912
|
+
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
31866
31913
|
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); }
|
|
31867
|
-
function _objectWithoutProperties$
|
|
31868
|
-
function _objectWithoutPropertiesLoose$
|
|
31914
|
+
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; }
|
|
31915
|
+
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; }
|
|
31869
31916
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
31870
31917
|
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."); }
|
|
31871
31918
|
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); }
|
|
@@ -32019,45 +32066,46 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32019
32066
|
}
|
|
32020
32067
|
return getWordsWithoutCalculate(children);
|
|
32021
32068
|
};
|
|
32022
|
-
var
|
|
32023
|
-
|
|
32024
|
-
|
|
32025
|
-
|
|
32026
|
-
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32034
|
-
|
|
32069
|
+
var DEFAULT_FILL = '#808080';
|
|
32070
|
+
var Text = function Text(_ref5) {
|
|
32071
|
+
var _ref5$x = _ref5.x,
|
|
32072
|
+
propsX = _ref5$x === void 0 ? 0 : _ref5$x,
|
|
32073
|
+
_ref5$y = _ref5.y,
|
|
32074
|
+
propsY = _ref5$y === void 0 ? 0 : _ref5$y,
|
|
32075
|
+
_ref5$lineHeight = _ref5.lineHeight,
|
|
32076
|
+
lineHeight = _ref5$lineHeight === void 0 ? '1em' : _ref5$lineHeight,
|
|
32077
|
+
_ref5$capHeight = _ref5.capHeight,
|
|
32078
|
+
capHeight = _ref5$capHeight === void 0 ? '0.71em' : _ref5$capHeight,
|
|
32079
|
+
_ref5$scaleToFit = _ref5.scaleToFit,
|
|
32080
|
+
scaleToFit = _ref5$scaleToFit === void 0 ? false : _ref5$scaleToFit,
|
|
32081
|
+
_ref5$textAnchor = _ref5.textAnchor,
|
|
32082
|
+
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32083
|
+
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32084
|
+
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32085
|
+
_ref5$fill = _ref5.fill,
|
|
32086
|
+
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32087
|
+
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32035
32088
|
var wordsByLines = useMemo(function () {
|
|
32036
32089
|
return getWordsByLines({
|
|
32037
32090
|
breakAll: props.breakAll,
|
|
32038
32091
|
children: props.children,
|
|
32039
32092
|
maxLines: props.maxLines,
|
|
32040
|
-
scaleToFit:
|
|
32093
|
+
scaleToFit: scaleToFit,
|
|
32041
32094
|
style: props.style,
|
|
32042
32095
|
width: props.width
|
|
32043
32096
|
});
|
|
32044
|
-
}, [props.breakAll, props.children, props.maxLines,
|
|
32097
|
+
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32045
32098
|
var dx = props.dx,
|
|
32046
32099
|
dy = props.dy,
|
|
32047
|
-
textAnchor = props.textAnchor,
|
|
32048
|
-
verticalAnchor = props.verticalAnchor,
|
|
32049
|
-
scaleToFit = props.scaleToFit,
|
|
32050
32100
|
angle = props.angle,
|
|
32051
|
-
lineHeight = props.lineHeight,
|
|
32052
|
-
capHeight = props.capHeight,
|
|
32053
32101
|
className = props.className,
|
|
32054
32102
|
breakAll = props.breakAll,
|
|
32055
|
-
textProps = _objectWithoutProperties$
|
|
32056
|
-
if (!isNumOrStr(
|
|
32103
|
+
textProps = _objectWithoutProperties$9(props, _excluded2$3);
|
|
32104
|
+
if (!isNumOrStr(propsX) || !isNumOrStr(propsY)) {
|
|
32057
32105
|
return null;
|
|
32058
32106
|
}
|
|
32059
|
-
var x =
|
|
32060
|
-
var y =
|
|
32107
|
+
var x = propsX + (isNumber(dx) ? dx : 0);
|
|
32108
|
+
var y = propsY + (isNumber(dy) ? dy : 0);
|
|
32061
32109
|
var startDy;
|
|
32062
32110
|
switch (verticalAnchor) {
|
|
32063
32111
|
case 'start':
|
|
@@ -32087,7 +32135,7 @@ var Text = function Text(props) {
|
|
|
32087
32135
|
y: y,
|
|
32088
32136
|
className: classNames('recharts-text', className),
|
|
32089
32137
|
textAnchor: textAnchor,
|
|
32090
|
-
fill:
|
|
32138
|
+
fill: fill.includes('url') ? DEFAULT_FILL : fill
|
|
32091
32139
|
}), wordsByLines.map(function (line, index) {
|
|
32092
32140
|
return (
|
|
32093
32141
|
/*#__PURE__*/
|
|
@@ -32100,7 +32148,6 @@ var Text = function Text(props) {
|
|
|
32100
32148
|
);
|
|
32101
32149
|
}));
|
|
32102
32150
|
};
|
|
32103
|
-
Text.defaultProps = textDefaultProps;
|
|
32104
32151
|
|
|
32105
32152
|
var baseIsEqual = _baseIsEqual;
|
|
32106
32153
|
|
|
@@ -38368,7 +38415,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38368
38415
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38369
38416
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38370
38417
|
|
|
38371
|
-
var _excluded$
|
|
38418
|
+
var _excluded$8 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38372
38419
|
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); }
|
|
38373
38420
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38374
38421
|
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."); }
|
|
@@ -38376,8 +38423,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38376
38423
|
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; }
|
|
38377
38424
|
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; } }
|
|
38378
38425
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38379
|
-
function _objectWithoutProperties$
|
|
38380
|
-
function _objectWithoutPropertiesLoose$
|
|
38426
|
+
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; }
|
|
38427
|
+
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; }
|
|
38381
38428
|
function ErrorBar(props) {
|
|
38382
38429
|
var offset = props.offset,
|
|
38383
38430
|
layout = props.layout,
|
|
@@ -38387,7 +38434,7 @@ function ErrorBar(props) {
|
|
|
38387
38434
|
dataPointFormatter = props.dataPointFormatter,
|
|
38388
38435
|
xAxis = props.xAxis,
|
|
38389
38436
|
yAxis = props.yAxis,
|
|
38390
|
-
others = _objectWithoutProperties$
|
|
38437
|
+
others = _objectWithoutProperties$8(props, _excluded$8);
|
|
38391
38438
|
var svgProps = filterProps(others);
|
|
38392
38439
|
var errorBars = data.map(function (entry, i) {
|
|
38393
38440
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38498,18 +38545,18 @@ ErrorBar.defaultProps = {
|
|
|
38498
38545
|
};
|
|
38499
38546
|
ErrorBar.displayName = 'ErrorBar';
|
|
38500
38547
|
|
|
38501
|
-
function _typeof$
|
|
38548
|
+
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); }
|
|
38502
38549
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38503
38550
|
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."); }
|
|
38504
38551
|
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); }
|
|
38505
38552
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38506
38553
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38507
38554
|
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; }
|
|
38508
|
-
function ownKeys$
|
|
38509
|
-
function _objectSpread$
|
|
38510
|
-
function _defineProperty$
|
|
38511
|
-
function _toPropertyKey$
|
|
38512
|
-
function _toPrimitive$
|
|
38555
|
+
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; }
|
|
38556
|
+
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; }
|
|
38557
|
+
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; }
|
|
38558
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
38559
|
+
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); }
|
|
38513
38560
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38514
38561
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38515
38562
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38680,7 +38727,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38680
38727
|
};
|
|
38681
38728
|
});
|
|
38682
38729
|
}
|
|
38683
|
-
return _objectSpread$
|
|
38730
|
+
return _objectSpread$j(_objectSpread$j(_objectSpread$j({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38684
38731
|
payload: legendData,
|
|
38685
38732
|
item: legendItem
|
|
38686
38733
|
});
|
|
@@ -38834,10 +38881,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
38834
38881
|
verticalAlign = legendProps.verticalAlign,
|
|
38835
38882
|
layout = legendProps.layout;
|
|
38836
38883
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
38837
|
-
newOffset = _objectSpread$
|
|
38884
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, align, newOffset[align] + (box.width || 0)));
|
|
38838
38885
|
}
|
|
38839
38886
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
38840
|
-
newOffset = _objectSpread$
|
|
38887
|
+
newOffset = _objectSpread$j(_objectSpread$j({}, offset), {}, _defineProperty$k({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
38841
38888
|
}
|
|
38842
38889
|
}
|
|
38843
38890
|
return newOffset;
|
|
@@ -39263,14 +39310,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39263
39310
|
items: [item]
|
|
39264
39311
|
};
|
|
39265
39312
|
}
|
|
39266
|
-
return _objectSpread$
|
|
39313
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, parentGroup));
|
|
39267
39314
|
}, {});
|
|
39268
39315
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39269
39316
|
var group = stackGroups[axisId];
|
|
39270
39317
|
if (group.hasStack) {
|
|
39271
39318
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39272
39319
|
var g = group.stackGroups[stackId];
|
|
39273
|
-
return _objectSpread$
|
|
39320
|
+
return _objectSpread$j(_objectSpread$j({}, res), {}, _defineProperty$k({}, stackId, {
|
|
39274
39321
|
numericAxisId: numericAxisId,
|
|
39275
39322
|
cateAxisId: cateAxisId,
|
|
39276
39323
|
items: g.items,
|
|
@@ -39278,7 +39325,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39278
39325
|
}));
|
|
39279
39326
|
}, {});
|
|
39280
39327
|
}
|
|
39281
|
-
return _objectSpread$
|
|
39328
|
+
return _objectSpread$j(_objectSpread$j({}, result), {}, _defineProperty$k({}, axisId, group));
|
|
39282
39329
|
}, {});
|
|
39283
39330
|
};
|
|
39284
39331
|
|
|
@@ -39492,7 +39539,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39492
39539
|
formatter = _graphicalItem$props.formatter,
|
|
39493
39540
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39494
39541
|
chartType = _graphicalItem$props.chartType;
|
|
39495
|
-
return _objectSpread$
|
|
39542
|
+
return _objectSpread$j(_objectSpread$j({}, filterProps(graphicalItem)), {}, {
|
|
39496
39543
|
dataKey: dataKey,
|
|
39497
39544
|
unit: unit,
|
|
39498
39545
|
formatter: formatter,
|
|
@@ -39505,12 +39552,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39505
39552
|
});
|
|
39506
39553
|
};
|
|
39507
39554
|
|
|
39508
|
-
function _typeof$
|
|
39509
|
-
function ownKeys$
|
|
39510
|
-
function _objectSpread$
|
|
39511
|
-
function _defineProperty$
|
|
39512
|
-
function _toPropertyKey$
|
|
39513
|
-
function _toPrimitive$
|
|
39555
|
+
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); }
|
|
39556
|
+
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; }
|
|
39557
|
+
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; }
|
|
39558
|
+
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; }
|
|
39559
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
39560
|
+
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); }
|
|
39514
39561
|
var RADIAN = Math.PI / 180;
|
|
39515
39562
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39516
39563
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39615,7 +39662,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39615
39662
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39616
39663
|
}
|
|
39617
39664
|
if (inRange) {
|
|
39618
|
-
return _objectSpread$
|
|
39665
|
+
return _objectSpread$i(_objectSpread$i({}, sector), {}, {
|
|
39619
39666
|
radius: radius,
|
|
39620
39667
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39621
39668
|
});
|
|
@@ -39623,18 +39670,21 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39623
39670
|
return null;
|
|
39624
39671
|
};
|
|
39625
39672
|
|
|
39626
|
-
function _typeof$
|
|
39673
|
+
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); }
|
|
39674
|
+
var _excluded$7 = ["offset"];
|
|
39627
39675
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39628
39676
|
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."); }
|
|
39629
39677
|
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); }
|
|
39630
39678
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39631
39679
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39632
39680
|
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; }
|
|
39633
|
-
function
|
|
39634
|
-
function
|
|
39635
|
-
function
|
|
39636
|
-
function
|
|
39637
|
-
function
|
|
39681
|
+
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; }
|
|
39682
|
+
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; }
|
|
39683
|
+
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; }
|
|
39684
|
+
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; }
|
|
39685
|
+
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; }
|
|
39686
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39687
|
+
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); }
|
|
39638
39688
|
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); }
|
|
39639
39689
|
var getLabel = function getLabel(props) {
|
|
39640
39690
|
var value = props.value,
|
|
@@ -39779,7 +39829,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39779
39829
|
textAnchor: 'middle',
|
|
39780
39830
|
verticalAnchor: verticalEnd
|
|
39781
39831
|
};
|
|
39782
|
-
return _objectSpread$
|
|
39832
|
+
return _objectSpread$h(_objectSpread$h({}, attrs), parentViewBox ? {
|
|
39783
39833
|
height: Math.max(y - parentViewBox.y, 0),
|
|
39784
39834
|
width: width
|
|
39785
39835
|
} : {});
|
|
@@ -39791,7 +39841,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39791
39841
|
textAnchor: 'middle',
|
|
39792
39842
|
verticalAnchor: verticalStart
|
|
39793
39843
|
};
|
|
39794
|
-
return _objectSpread$
|
|
39844
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs), parentViewBox ? {
|
|
39795
39845
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
39796
39846
|
width: width
|
|
39797
39847
|
} : {});
|
|
@@ -39803,7 +39853,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39803
39853
|
textAnchor: horizontalEnd,
|
|
39804
39854
|
verticalAnchor: 'middle'
|
|
39805
39855
|
};
|
|
39806
|
-
return _objectSpread$
|
|
39856
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs2), parentViewBox ? {
|
|
39807
39857
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
39808
39858
|
height: height
|
|
39809
39859
|
} : {});
|
|
@@ -39815,7 +39865,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39815
39865
|
textAnchor: horizontalStart,
|
|
39816
39866
|
verticalAnchor: 'middle'
|
|
39817
39867
|
};
|
|
39818
|
-
return _objectSpread$
|
|
39868
|
+
return _objectSpread$h(_objectSpread$h({}, _attrs3), parentViewBox ? {
|
|
39819
39869
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
39820
39870
|
height: height
|
|
39821
39871
|
} : {});
|
|
@@ -39825,7 +39875,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39825
39875
|
height: height
|
|
39826
39876
|
} : {};
|
|
39827
39877
|
if (position === 'insideLeft') {
|
|
39828
|
-
return _objectSpread$
|
|
39878
|
+
return _objectSpread$h({
|
|
39829
39879
|
x: x + horizontalOffset,
|
|
39830
39880
|
y: y + height / 2,
|
|
39831
39881
|
textAnchor: horizontalStart,
|
|
@@ -39833,7 +39883,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39833
39883
|
}, sizeAttrs);
|
|
39834
39884
|
}
|
|
39835
39885
|
if (position === 'insideRight') {
|
|
39836
|
-
return _objectSpread$
|
|
39886
|
+
return _objectSpread$h({
|
|
39837
39887
|
x: x + width - horizontalOffset,
|
|
39838
39888
|
y: y + height / 2,
|
|
39839
39889
|
textAnchor: horizontalEnd,
|
|
@@ -39841,7 +39891,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39841
39891
|
}, sizeAttrs);
|
|
39842
39892
|
}
|
|
39843
39893
|
if (position === 'insideTop') {
|
|
39844
|
-
return _objectSpread$
|
|
39894
|
+
return _objectSpread$h({
|
|
39845
39895
|
x: x + width / 2,
|
|
39846
39896
|
y: y + verticalOffset,
|
|
39847
39897
|
textAnchor: 'middle',
|
|
@@ -39849,7 +39899,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39849
39899
|
}, sizeAttrs);
|
|
39850
39900
|
}
|
|
39851
39901
|
if (position === 'insideBottom') {
|
|
39852
|
-
return _objectSpread$
|
|
39902
|
+
return _objectSpread$h({
|
|
39853
39903
|
x: x + width / 2,
|
|
39854
39904
|
y: y + height - verticalOffset,
|
|
39855
39905
|
textAnchor: 'middle',
|
|
@@ -39857,7 +39907,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39857
39907
|
}, sizeAttrs);
|
|
39858
39908
|
}
|
|
39859
39909
|
if (position === 'insideTopLeft') {
|
|
39860
|
-
return _objectSpread$
|
|
39910
|
+
return _objectSpread$h({
|
|
39861
39911
|
x: x + horizontalOffset,
|
|
39862
39912
|
y: y + verticalOffset,
|
|
39863
39913
|
textAnchor: horizontalStart,
|
|
@@ -39865,7 +39915,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39865
39915
|
}, sizeAttrs);
|
|
39866
39916
|
}
|
|
39867
39917
|
if (position === 'insideTopRight') {
|
|
39868
|
-
return _objectSpread$
|
|
39918
|
+
return _objectSpread$h({
|
|
39869
39919
|
x: x + width - horizontalOffset,
|
|
39870
39920
|
y: y + verticalOffset,
|
|
39871
39921
|
textAnchor: horizontalEnd,
|
|
@@ -39873,7 +39923,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39873
39923
|
}, sizeAttrs);
|
|
39874
39924
|
}
|
|
39875
39925
|
if (position === 'insideBottomLeft') {
|
|
39876
|
-
return _objectSpread$
|
|
39926
|
+
return _objectSpread$h({
|
|
39877
39927
|
x: x + horizontalOffset,
|
|
39878
39928
|
y: y + height - verticalOffset,
|
|
39879
39929
|
textAnchor: horizontalStart,
|
|
@@ -39881,7 +39931,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39881
39931
|
}, sizeAttrs);
|
|
39882
39932
|
}
|
|
39883
39933
|
if (position === 'insideBottomRight') {
|
|
39884
|
-
return _objectSpread$
|
|
39934
|
+
return _objectSpread$h({
|
|
39885
39935
|
x: x + width - horizontalOffset,
|
|
39886
39936
|
y: y + height - verticalOffset,
|
|
39887
39937
|
textAnchor: horizontalEnd,
|
|
@@ -39889,14 +39939,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39889
39939
|
}, sizeAttrs);
|
|
39890
39940
|
}
|
|
39891
39941
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
39892
|
-
return _objectSpread$
|
|
39942
|
+
return _objectSpread$h({
|
|
39893
39943
|
x: x + getPercentValue(position.x, width),
|
|
39894
39944
|
y: y + getPercentValue(position.y, height),
|
|
39895
39945
|
textAnchor: 'end',
|
|
39896
39946
|
verticalAnchor: 'end'
|
|
39897
39947
|
}, sizeAttrs);
|
|
39898
39948
|
}
|
|
39899
|
-
return _objectSpread$
|
|
39949
|
+
return _objectSpread$h({
|
|
39900
39950
|
x: x + width / 2,
|
|
39901
39951
|
y: y + height / 2,
|
|
39902
39952
|
textAnchor: 'middle',
|
|
@@ -39906,7 +39956,13 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
39906
39956
|
var isPolar = function isPolar(viewBox) {
|
|
39907
39957
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
39908
39958
|
};
|
|
39909
|
-
function Label$3(
|
|
39959
|
+
function Label$3(_ref4) {
|
|
39960
|
+
var _ref4$offset = _ref4.offset,
|
|
39961
|
+
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
39962
|
+
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
39963
|
+
var props = _objectSpread$h({
|
|
39964
|
+
offset: offset
|
|
39965
|
+
}, restProps);
|
|
39910
39966
|
var viewBox = props.viewBox,
|
|
39911
39967
|
position = props.position,
|
|
39912
39968
|
value = props.value,
|
|
@@ -39943,9 +39999,6 @@ function Label$3(props) {
|
|
|
39943
39999
|
}), label);
|
|
39944
40000
|
}
|
|
39945
40001
|
Label$3.displayName = 'Label';
|
|
39946
|
-
Label$3.defaultProps = {
|
|
39947
|
-
offset: 5
|
|
39948
|
-
};
|
|
39949
40002
|
var parseViewBox = function parseViewBox(props) {
|
|
39950
40003
|
var cx = props.cx,
|
|
39951
40004
|
cy = props.cy,
|
|
@@ -40100,8 +40153,9 @@ function last(array) {
|
|
|
40100
40153
|
|
|
40101
40154
|
var last_1 = last;
|
|
40102
40155
|
|
|
40103
|
-
function _typeof$
|
|
40104
|
-
var _excluded$
|
|
40156
|
+
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); }
|
|
40157
|
+
var _excluded$6 = ["valueAccessor"],
|
|
40158
|
+
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40105
40159
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40106
40160
|
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."); }
|
|
40107
40161
|
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); }
|
|
@@ -40109,26 +40163,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40109
40163
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40110
40164
|
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; }
|
|
40111
40165
|
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); }
|
|
40112
|
-
function ownKeys$
|
|
40113
|
-
function _objectSpread$
|
|
40114
|
-
function _defineProperty$
|
|
40115
|
-
function _toPropertyKey$
|
|
40116
|
-
function _toPrimitive$
|
|
40117
|
-
function _objectWithoutProperties$
|
|
40118
|
-
function _objectWithoutPropertiesLoose$
|
|
40119
|
-
var
|
|
40120
|
-
|
|
40121
|
-
|
|
40122
|
-
|
|
40123
|
-
|
|
40124
|
-
|
|
40125
|
-
|
|
40126
|
-
|
|
40127
|
-
dataKey =
|
|
40128
|
-
clockWise =
|
|
40129
|
-
id =
|
|
40130
|
-
textBreakAll =
|
|
40131
|
-
others = _objectWithoutProperties$
|
|
40166
|
+
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; }
|
|
40167
|
+
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; }
|
|
40168
|
+
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; }
|
|
40169
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
40170
|
+
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); }
|
|
40171
|
+
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; }
|
|
40172
|
+
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; }
|
|
40173
|
+
var defaultAccessor = function defaultAccessor(entry) {
|
|
40174
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40175
|
+
};
|
|
40176
|
+
function LabelList(_ref) {
|
|
40177
|
+
var _ref$valueAccessor = _ref.valueAccessor,
|
|
40178
|
+
valueAccessor = _ref$valueAccessor === void 0 ? defaultAccessor : _ref$valueAccessor,
|
|
40179
|
+
restProps = _objectWithoutProperties$6(_ref, _excluded$6);
|
|
40180
|
+
var data = restProps.data,
|
|
40181
|
+
dataKey = restProps.dataKey,
|
|
40182
|
+
clockWise = restProps.clockWise,
|
|
40183
|
+
id = restProps.id,
|
|
40184
|
+
textBreakAll = restProps.textBreakAll,
|
|
40185
|
+
others = _objectWithoutProperties$6(restProps, _excluded2$2);
|
|
40132
40186
|
if (!data || !data.length) {
|
|
40133
40187
|
return null;
|
|
40134
40188
|
}
|
|
@@ -40144,7 +40198,7 @@ function LabelList(props) {
|
|
|
40144
40198
|
index: index,
|
|
40145
40199
|
value: value,
|
|
40146
40200
|
textBreakAll: textBreakAll,
|
|
40147
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40201
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$g(_objectSpread$g({}, entry), {}, {
|
|
40148
40202
|
clockWise: clockWise
|
|
40149
40203
|
})),
|
|
40150
40204
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40199,9 +40253,14 @@ function renderCallByParent(parentProps, data) {
|
|
|
40199
40253
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40200
40254
|
}
|
|
40201
40255
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40202
|
-
LabelList.defaultProps = defaultProps;
|
|
40203
40256
|
|
|
40257
|
+
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); }
|
|
40204
40258
|
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); }
|
|
40259
|
+
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; }
|
|
40260
|
+
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; }
|
|
40261
|
+
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; }
|
|
40262
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40263
|
+
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); }
|
|
40205
40264
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40206
40265
|
var sign = mathSign(endAngle - startAngle);
|
|
40207
40266
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40342,7 +40401,19 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40342
40401
|
}
|
|
40343
40402
|
return path;
|
|
40344
40403
|
};
|
|
40345
|
-
var
|
|
40404
|
+
var defaultProps$1 = {
|
|
40405
|
+
cx: 0,
|
|
40406
|
+
cy: 0,
|
|
40407
|
+
innerRadius: 0,
|
|
40408
|
+
outerRadius: 0,
|
|
40409
|
+
startAngle: 0,
|
|
40410
|
+
endAngle: 0,
|
|
40411
|
+
cornerRadius: 0,
|
|
40412
|
+
forceCornerRadius: false,
|
|
40413
|
+
cornerIsExternal: false
|
|
40414
|
+
};
|
|
40415
|
+
var Sector = function Sector(sectorProps) {
|
|
40416
|
+
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40346
40417
|
var cx = props.cx,
|
|
40347
40418
|
cy = props.cy,
|
|
40348
40419
|
innerRadius = props.innerRadius,
|
|
@@ -40388,25 +40459,14 @@ var Sector = function Sector(props) {
|
|
|
40388
40459
|
role: "img"
|
|
40389
40460
|
}));
|
|
40390
40461
|
};
|
|
40391
|
-
Sector.defaultProps = {
|
|
40392
|
-
cx: 0,
|
|
40393
|
-
cy: 0,
|
|
40394
|
-
innerRadius: 0,
|
|
40395
|
-
outerRadius: 0,
|
|
40396
|
-
startAngle: 0,
|
|
40397
|
-
endAngle: 0,
|
|
40398
|
-
cornerRadius: 0,
|
|
40399
|
-
forceCornerRadius: false,
|
|
40400
|
-
cornerIsExternal: false
|
|
40401
|
-
};
|
|
40402
40462
|
|
|
40403
|
-
function _typeof$
|
|
40463
|
+
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); }
|
|
40404
40464
|
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); }
|
|
40405
|
-
function ownKeys$
|
|
40406
|
-
function _objectSpread$
|
|
40407
|
-
function _defineProperty$
|
|
40408
|
-
function _toPropertyKey$
|
|
40409
|
-
function _toPrimitive$
|
|
40465
|
+
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; }
|
|
40466
|
+
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; }
|
|
40467
|
+
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; }
|
|
40468
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
40469
|
+
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); }
|
|
40410
40470
|
var CURVE_FACTORIES = {
|
|
40411
40471
|
curveBasisClosed: curveBasisClosed,
|
|
40412
40472
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40446,11 +40506,14 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40446
40506
|
* @return {String} path
|
|
40447
40507
|
*/
|
|
40448
40508
|
var getPath$1 = function getPath(_ref) {
|
|
40449
|
-
var type = _ref.type,
|
|
40450
|
-
|
|
40509
|
+
var _ref$type = _ref.type,
|
|
40510
|
+
type = _ref$type === void 0 ? 'linear' : _ref$type,
|
|
40511
|
+
_ref$points = _ref.points,
|
|
40512
|
+
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40451
40513
|
baseLine = _ref.baseLine,
|
|
40452
40514
|
layout = _ref.layout,
|
|
40453
|
-
connectNulls = _ref.connectNulls
|
|
40515
|
+
_ref$connectNulls = _ref.connectNulls,
|
|
40516
|
+
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40454
40517
|
var curveFactory = getCurveFactory(type, layout);
|
|
40455
40518
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40456
40519
|
return defined(entry);
|
|
@@ -40461,7 +40524,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40461
40524
|
return defined(base);
|
|
40462
40525
|
}) : baseLine;
|
|
40463
40526
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40464
|
-
return _objectSpread$
|
|
40527
|
+
return _objectSpread$e(_objectSpread$e({}, entry), {}, {
|
|
40465
40528
|
base: formatBaseLine[index]
|
|
40466
40529
|
});
|
|
40467
40530
|
});
|
|
@@ -40502,12 +40565,8 @@ var Curve = function Curve(props) {
|
|
|
40502
40565
|
ref: pathRef
|
|
40503
40566
|
}));
|
|
40504
40567
|
};
|
|
40505
|
-
Curve.defaultProps = {
|
|
40506
|
-
type: 'linear',
|
|
40507
|
-
points: [],
|
|
40508
|
-
connectNulls: false
|
|
40509
|
-
};
|
|
40510
40568
|
|
|
40569
|
+
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); }
|
|
40511
40570
|
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); }
|
|
40512
40571
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40513
40572
|
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."); }
|
|
@@ -40515,6 +40574,11 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40515
40574
|
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; }
|
|
40516
40575
|
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; } }
|
|
40517
40576
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40577
|
+
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; }
|
|
40578
|
+
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; }
|
|
40579
|
+
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; }
|
|
40580
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40581
|
+
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); }
|
|
40518
40582
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40519
40583
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40520
40584
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40570,13 +40634,29 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40570
40634
|
}
|
|
40571
40635
|
return false;
|
|
40572
40636
|
};
|
|
40573
|
-
var
|
|
40637
|
+
var defaultProps = {
|
|
40638
|
+
x: 0,
|
|
40639
|
+
y: 0,
|
|
40640
|
+
width: 0,
|
|
40641
|
+
height: 0,
|
|
40642
|
+
// The radius of border
|
|
40643
|
+
// The radius of four corners when radius is a number
|
|
40644
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40645
|
+
radius: 0,
|
|
40646
|
+
isAnimationActive: false,
|
|
40647
|
+
isUpdateAnimationActive: false,
|
|
40648
|
+
animationBegin: 0,
|
|
40649
|
+
animationDuration: 1500,
|
|
40650
|
+
animationEasing: 'ease'
|
|
40651
|
+
};
|
|
40652
|
+
var Rectangle = function Rectangle(rectangleProps) {
|
|
40653
|
+
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40574
40654
|
var pathRef = useRef();
|
|
40575
40655
|
var _useState = useState(-1),
|
|
40576
40656
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40577
40657
|
totalLength = _useState2[0],
|
|
40578
40658
|
setTotalLength = _useState2[1];
|
|
40579
|
-
|
|
40659
|
+
useEffect(function () {
|
|
40580
40660
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40581
40661
|
try {
|
|
40582
40662
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40647,21 +40727,6 @@ var Rectangle = function Rectangle(props) {
|
|
|
40647
40727
|
})));
|
|
40648
40728
|
});
|
|
40649
40729
|
};
|
|
40650
|
-
Rectangle.defaultProps = {
|
|
40651
|
-
x: 0,
|
|
40652
|
-
y: 0,
|
|
40653
|
-
width: 0,
|
|
40654
|
-
height: 0,
|
|
40655
|
-
// The radius of border
|
|
40656
|
-
// The radius of four corners when radius is a number
|
|
40657
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40658
|
-
radius: 0,
|
|
40659
|
-
isAnimationActive: false,
|
|
40660
|
-
isUpdateAnimationActive: false,
|
|
40661
|
-
animationBegin: 0,
|
|
40662
|
-
animationDuration: 1500,
|
|
40663
|
-
animationEasing: 'ease'
|
|
40664
|
-
};
|
|
40665
40730
|
|
|
40666
40731
|
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); }
|
|
40667
40732
|
var Dot$1 = function Dot(props) {
|
|
@@ -40681,18 +40746,42 @@ var Dot$1 = function Dot(props) {
|
|
|
40681
40746
|
return null;
|
|
40682
40747
|
};
|
|
40683
40748
|
|
|
40749
|
+
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); }
|
|
40750
|
+
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40684
40751
|
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); }
|
|
40752
|
+
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; }
|
|
40753
|
+
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; }
|
|
40754
|
+
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; }
|
|
40755
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40756
|
+
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); }
|
|
40757
|
+
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; }
|
|
40758
|
+
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; }
|
|
40685
40759
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40686
40760
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40687
40761
|
};
|
|
40688
|
-
var Cross = function Cross(
|
|
40689
|
-
var x =
|
|
40690
|
-
|
|
40691
|
-
|
|
40692
|
-
|
|
40693
|
-
top =
|
|
40694
|
-
|
|
40695
|
-
|
|
40762
|
+
var Cross = function Cross(_ref) {
|
|
40763
|
+
var _ref$x = _ref.x,
|
|
40764
|
+
x = _ref$x === void 0 ? 0 : _ref$x,
|
|
40765
|
+
_ref$y = _ref.y,
|
|
40766
|
+
y = _ref$y === void 0 ? 0 : _ref$y,
|
|
40767
|
+
_ref$top = _ref.top,
|
|
40768
|
+
top = _ref$top === void 0 ? 0 : _ref$top,
|
|
40769
|
+
_ref$left = _ref.left,
|
|
40770
|
+
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40771
|
+
_ref$width = _ref.width,
|
|
40772
|
+
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40773
|
+
_ref$height = _ref.height,
|
|
40774
|
+
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40775
|
+
className = _ref.className,
|
|
40776
|
+
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40777
|
+
var props = _objectSpread$c({
|
|
40778
|
+
x: x,
|
|
40779
|
+
y: y,
|
|
40780
|
+
top: top,
|
|
40781
|
+
left: left,
|
|
40782
|
+
width: width,
|
|
40783
|
+
height: height
|
|
40784
|
+
}, rest);
|
|
40696
40785
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40697
40786
|
return null;
|
|
40698
40787
|
}
|
|
@@ -40701,14 +40790,6 @@ var Cross = function Cross(props) {
|
|
|
40701
40790
|
d: getPath(x, y, width, height, top, left)
|
|
40702
40791
|
}));
|
|
40703
40792
|
};
|
|
40704
|
-
Cross.defaultProps = {
|
|
40705
|
-
x: 0,
|
|
40706
|
-
y: 0,
|
|
40707
|
-
top: 0,
|
|
40708
|
-
left: 0,
|
|
40709
|
-
width: 0,
|
|
40710
|
-
height: 0
|
|
40711
|
-
};
|
|
40712
40793
|
|
|
40713
40794
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40714
40795
|
|
|
@@ -40918,6 +40999,7 @@ var createScale = function createScale(_ref) {
|
|
|
40918
40999
|
isTextActive: false,
|
|
40919
41000
|
isSlideMoving: false,
|
|
40920
41001
|
isTravellerMoving: false,
|
|
41002
|
+
isTravellerFocused: false,
|
|
40921
41003
|
startX: scale(startIndex),
|
|
40922
41004
|
endX: scale(endIndex),
|
|
40923
41005
|
scale: scale,
|
|
@@ -41131,6 +41213,38 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41131
41213
|
}
|
|
41132
41214
|
});
|
|
41133
41215
|
}
|
|
41216
|
+
}, {
|
|
41217
|
+
key: "handleTravellerMoveKeyboard",
|
|
41218
|
+
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41219
|
+
var _this2 = this;
|
|
41220
|
+
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41221
|
+
var _this$state3 = this.state,
|
|
41222
|
+
scaleValues = _this$state3.scaleValues,
|
|
41223
|
+
startX = _this$state3.startX,
|
|
41224
|
+
endX = _this$state3.endX;
|
|
41225
|
+
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41226
|
+
var currentScaleValue = this.state[id];
|
|
41227
|
+
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41228
|
+
if (currentIndex === -1) {
|
|
41229
|
+
return;
|
|
41230
|
+
}
|
|
41231
|
+
var newIndex = currentIndex + direction;
|
|
41232
|
+
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41233
|
+
return;
|
|
41234
|
+
}
|
|
41235
|
+
var newScaleValue = scaleValues[newIndex];
|
|
41236
|
+
|
|
41237
|
+
// Prevent travellers from being on top of each other or overlapping
|
|
41238
|
+
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41239
|
+
return;
|
|
41240
|
+
}
|
|
41241
|
+
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41242
|
+
_this2.props.onChange(_this2.getIndex({
|
|
41243
|
+
startX: _this2.state.startX,
|
|
41244
|
+
endX: _this2.state.endX
|
|
41245
|
+
}));
|
|
41246
|
+
});
|
|
41247
|
+
}
|
|
41134
41248
|
}, {
|
|
41135
41249
|
key: "renderBackground",
|
|
41136
41250
|
value: function renderBackground() {
|
|
@@ -41178,6 +41292,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41178
41292
|
}, {
|
|
41179
41293
|
key: "renderTravellerLayer",
|
|
41180
41294
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41295
|
+
var _this3 = this;
|
|
41181
41296
|
var _this$props7 = this.props,
|
|
41182
41297
|
y = _this$props7.y,
|
|
41183
41298
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41191,11 +41306,31 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41191
41306
|
height: height
|
|
41192
41307
|
});
|
|
41193
41308
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
|
41309
|
+
tabIndex: 0,
|
|
41310
|
+
role: "slider",
|
|
41194
41311
|
className: "recharts-brush-traveller",
|
|
41195
41312
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41196
41313
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41197
41314
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41198
41315
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41316
|
+
onKeyDown: function onKeyDown(e) {
|
|
41317
|
+
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41318
|
+
return;
|
|
41319
|
+
}
|
|
41320
|
+
e.preventDefault();
|
|
41321
|
+
e.stopPropagation();
|
|
41322
|
+
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41323
|
+
},
|
|
41324
|
+
onFocus: function onFocus() {
|
|
41325
|
+
_this3.setState({
|
|
41326
|
+
isTravellerFocused: true
|
|
41327
|
+
});
|
|
41328
|
+
},
|
|
41329
|
+
onBlur: function onBlur() {
|
|
41330
|
+
_this3.setState({
|
|
41331
|
+
isTravellerFocused: false
|
|
41332
|
+
});
|
|
41333
|
+
},
|
|
41199
41334
|
style: {
|
|
41200
41335
|
cursor: 'col-resize'
|
|
41201
41336
|
}
|
|
@@ -41239,9 +41374,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41239
41374
|
height = _this$props9.height,
|
|
41240
41375
|
travellerWidth = _this$props9.travellerWidth,
|
|
41241
41376
|
stroke = _this$props9.stroke;
|
|
41242
|
-
var _this$
|
|
41243
|
-
startX = _this$
|
|
41244
|
-
endX = _this$
|
|
41377
|
+
var _this$state4 = this.state,
|
|
41378
|
+
startX = _this$state4.startX,
|
|
41379
|
+
endX = _this$state4.endX;
|
|
41245
41380
|
var offset = 5;
|
|
41246
41381
|
var attrs = {
|
|
41247
41382
|
pointerEvents: 'none',
|
|
@@ -41273,12 +41408,13 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41273
41408
|
width = _this$props10.width,
|
|
41274
41409
|
height = _this$props10.height,
|
|
41275
41410
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41276
|
-
var _this$
|
|
41277
|
-
startX = _this$
|
|
41278
|
-
endX = _this$
|
|
41279
|
-
isTextActive = _this$
|
|
41280
|
-
isSlideMoving = _this$
|
|
41281
|
-
isTravellerMoving = _this$
|
|
41411
|
+
var _this$state5 = this.state,
|
|
41412
|
+
startX = _this$state5.startX,
|
|
41413
|
+
endX = _this$state5.endX,
|
|
41414
|
+
isTextActive = _this$state5.isTextActive,
|
|
41415
|
+
isSlideMoving = _this$state5.isSlideMoving,
|
|
41416
|
+
isTravellerMoving = _this$state5.isTravellerMoving,
|
|
41417
|
+
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41282
41418
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41283
41419
|
return null;
|
|
41284
41420
|
}
|
|
@@ -41290,7 +41426,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41290
41426
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41291
41427
|
onTouchMove: this.handleTouchMove,
|
|
41292
41428
|
style: style
|
|
41293
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41429
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || isTravellerFocused || alwaysShowText) && this.renderText());
|
|
41294
41430
|
}
|
|
41295
41431
|
}], [{
|
|
41296
41432
|
key: "renderDefaultTraveller",
|
|
@@ -41608,7 +41744,7 @@ function every(collection, predicate, guard) {
|
|
|
41608
41744
|
|
|
41609
41745
|
var every_1 = every;
|
|
41610
41746
|
|
|
41611
|
-
var defineProperty = _defineProperty$
|
|
41747
|
+
var defineProperty = _defineProperty$o;
|
|
41612
41748
|
|
|
41613
41749
|
/**
|
|
41614
41750
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -41969,7 +42105,6 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
41969
42105
|
legendType: 'rect',
|
|
41970
42106
|
minPointSize: 0,
|
|
41971
42107
|
hide: false,
|
|
41972
|
-
// data of bar
|
|
41973
42108
|
data: [],
|
|
41974
42109
|
layout: 'vertical',
|
|
41975
42110
|
isAnimationActive: !Global.isSsr,
|
|
@@ -44882,10 +45017,11 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
44882
45017
|
}
|
|
44883
45018
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
44884
45019
|
x = _this$container$getBo.x,
|
|
44885
|
-
y = _this$container$getBo.y
|
|
45020
|
+
y = _this$container$getBo.y,
|
|
45021
|
+
height = _this$container$getBo.height;
|
|
44886
45022
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
44887
45023
|
var pageX = x + coordinate;
|
|
44888
|
-
var pageY = y + this.offset.top;
|
|
45024
|
+
var pageY = y + this.offset.top + height / 2;
|
|
44889
45025
|
this.mouseHandlerCallback({
|
|
44890
45026
|
pageX: pageX,
|
|
44891
45027
|
pageY: pageY
|
|
@@ -47686,8 +47822,11 @@ var TimeChart = function (_a) {
|
|
|
47686
47822
|
};
|
|
47687
47823
|
|
|
47688
47824
|
var Chart = function (_a) {
|
|
47689
|
-
var type = _a.type, locale = _a.locale, exerciseResults = _a.exerciseResults, nExercisesInCourse = _a.nExercisesInCourse;
|
|
47690
|
-
var
|
|
47825
|
+
var type = _a.type, locale = _a.locale, exerciseResults = _a.exerciseResults, _b = _a.defaultPeriod, defaultPeriod = _b === void 0 ? Period.TODAY : _b, onChangePeriod = _a.onChangePeriod, nExercisesInCourse = _a.nExercisesInCourse;
|
|
47826
|
+
var _c = useState(defaultPeriod), period = _c[0], setPeriod = _c[1];
|
|
47827
|
+
useEffect(function () {
|
|
47828
|
+
setPeriod(defaultPeriod);
|
|
47829
|
+
}, [defaultPeriod]);
|
|
47691
47830
|
var periods = [
|
|
47692
47831
|
{ value: Period.TODAY, label: translations[locale]["Today"] },
|
|
47693
47832
|
{ value: Period.LAST_7_DAYS, label: translations[locale]["Last 7 days"] },
|
|
@@ -47727,10 +47866,13 @@ var Chart = function (_a) {
|
|
|
47727
47866
|
justifyContent: "space-between",
|
|
47728
47867
|
marginBottom: 10,
|
|
47729
47868
|
padding: "0 15px 0 5px",
|
|
47730
|
-
} }, { children: [jsx$1(Heading, __assign$2({ type: "h3" }, { children: titles[type] })), jsx$1(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
47869
|
+
} }, { children: [jsx$1(Heading, __assign$2({ type: "h3" }, { children: titles[type] })), jsx$1(Select, __assign$2({ defaultValue: period, onChange: function (value) {
|
|
47870
|
+
setPeriod(value);
|
|
47871
|
+
onChangePeriod(value);
|
|
47872
|
+
}, id: "period", name: "period" }, { children: periods.map(function (_a) {
|
|
47731
47873
|
var value = _a.value, label = _a.label;
|
|
47732
47874
|
return (jsx$1("option", __assign$2({ value: value }, { children: label }), value));
|
|
47733
|
-
}) }))] })), renderChart()] }));
|
|
47875
|
+
}) }), period)] })), renderChart()] }));
|
|
47734
47876
|
};
|
|
47735
47877
|
|
|
47736
47878
|
var StyledTextarea = styled.textarea(templateObject_1$a || (templateObject_1$a = __makeTemplateObject$1(["\n width: 100%;\n min-width: 228px;\n min-height: 50px;\n background-color: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n box-sizing: border-box;\n border-radius: 4px;\n padding: 13px 15px;\n cursor: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 500;\n font-style: normal;\n line-height: ", ";\n color: ", ";\n resize: vertical;\n\n ::placeholder {\n font-family: ", ";\n font-size: ", ";\n font-weight: 500;\n font-style: normal;\n line-height: ", ";\n color: ", ";\n }\n\n ::-webkit-calendar-picker-indicator {\n display: none;\n }\n\n :focus {\n outline: 0;\n border-color: ", ";\n box-shadow: ", ";\n }\n"], ["\n width: 100%;\n min-width: 228px;\n min-height: 50px;\n background-color: ", ";\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n box-sizing: border-box;\n border-radius: 4px;\n padding: 13px 15px;\n cursor: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 500;\n font-style: normal;\n line-height: ", ";\n color: ", ";\n resize: vertical;\n\n ::placeholder {\n font-family: ", ";\n font-size: ", ";\n font-weight: 500;\n font-style: normal;\n line-height: ", ";\n color: ", ";\n }\n\n ::-webkit-calendar-picker-indicator {\n display: none;\n }\n\n :focus {\n outline: 0;\n border-color: ", ";\n box-shadow: ", ";\n }\n"])), function (_a) {
|
|
@@ -48230,7 +48372,7 @@ var EmptyTableCell = styled.td(templateObject_8 || (templateObject_8 = __makeTem
|
|
|
48230
48372
|
var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
48231
48373
|
|
|
48232
48374
|
var Table = function (_a) {
|
|
48233
|
-
var columns = _a.columns, data = _a.data,
|
|
48375
|
+
var columns = _a.columns, data = _a.data, emptyText = _a.emptyText, rowSelection = _a.rowSelection;
|
|
48234
48376
|
var _b = useState([]), selectedRowKeys = _b[0], setSelectedRowKeys = _b[1];
|
|
48235
48377
|
var onSelectRow = function (selectedKey) {
|
|
48236
48378
|
var index = selectedRowKeys.indexOf(selectedKey);
|
|
@@ -48254,7 +48396,7 @@ var Table = function (_a) {
|
|
|
48254
48396
|
return (jsxs(Container$1, { children: [jsx$1(TableHead, { children: jsxs(TableRow, { children: [rowSelection && jsx$1("th", { style: { width: 55 } }), columns.map(function (_a, index) {
|
|
48255
48397
|
var title = _a.title, dataIndex = _a.dataIndex;
|
|
48256
48398
|
return (jsx$1(ColumnTitle, { children: title && (jsx$1(Heading, __assign$2({ type: "h6", as: "span" }, { children: title }))) }, "".concat(dataIndex, "-").concat(index)));
|
|
48257
|
-
})] }) }), jsx$1(TableBody, { children: data.length === 0 ? (jsx$1(TableRow, { children: jsx$1(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsx$1(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children:
|
|
48399
|
+
})] }) }), jsx$1(TableBody, { children: data.length === 0 ? (jsx$1(TableRow, { children: jsx$1(EmptyTableCell, __assign$2({ colSpan: columns.length }, { children: jsx$1(Paragraph, __assign$2({ align: "center", size: "small", weight: "regular" }, { children: emptyText || "No data" })) })) })) : (data.map(function (row, rowIndex) {
|
|
48258
48400
|
return (jsxs(TableRow, { children: [rowSelection && (jsx$1(TableCell, { children: jsx$1(Checkbox, { id: "".concat(rowIndex), name: "".concat(rowIndex), value: row.key, onChange: onSelectRow }) }, "row-select-".concat(rowIndex))), columns.map(function (_a, colIndex) {
|
|
48259
48401
|
var dataIndex = _a.dataIndex, render = _a.render, align = _a.align;
|
|
48260
48402
|
var data = row[dataIndex];
|