@typeolymp/ui-components 1.19.26 → 1.19.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/atoms/Input/translations.d.ts +11 -0
- package/build/components/molecules/Dropdown/stories.d.ts +7 -0
- package/build/components/molecules/Key/translations.d.ts +5 -0
- package/build/components/molecules/PasswordInputField/translations.d.ts +11 -0
- package/build/components/molecules/Tabs/styles.d.ts +2 -0
- package/build/components/organisms/Chart/data copy.d.ts +30 -0
- package/build/components/organisms/Chart/styles.d.ts +1 -0
- package/build/index.es.js +626 -762
- package/build/index.es.js.map +1 -1
- package/build/index.js +626 -762
- package/build/index.js.map +1 -1
- package/build/lib/enums.d.ts +4 -0
- package/build/lib/helpers.d.ts +1 -0
- package/build/lib/theme/index.d.ts +3 -0
- package/build/lib/theme/types.d.ts +72 -0
- package/build/lib/translations/index.d.ts +6 -0
- package/build/lib/types/TranslationType.d.ts +7 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -4575,7 +4575,7 @@ function requiredArgs(required, args) {
|
|
|
4575
4575
|
}
|
|
4576
4576
|
}
|
|
4577
4577
|
|
|
4578
|
-
function _typeof$
|
|
4578
|
+
function _typeof$u(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$u = function _typeof(obj) { return typeof obj; }; } else { _typeof$u = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$u(obj); }
|
|
4579
4579
|
/**
|
|
4580
4580
|
* @name toDate
|
|
4581
4581
|
* @category Common Helpers
|
|
@@ -4611,7 +4611,7 @@ function toDate(argument) {
|
|
|
4611
4611
|
requiredArgs(1, arguments);
|
|
4612
4612
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
4613
4613
|
|
|
4614
|
-
if (argument instanceof Date || _typeof$
|
|
4614
|
+
if (argument instanceof Date || _typeof$u(argument) === 'object' && argStr === '[object Date]') {
|
|
4615
4615
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
4616
4616
|
return new Date(argument.getTime());
|
|
4617
4617
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -4882,7 +4882,7 @@ var millisecondsInMinute = 60000;
|
|
|
4882
4882
|
|
|
4883
4883
|
var millisecondsInHour = 3600000;
|
|
4884
4884
|
|
|
4885
|
-
function _typeof$
|
|
4885
|
+
function _typeof$t(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$t = function _typeof(obj) { return typeof obj; }; } else { _typeof$t = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$t(obj); }
|
|
4886
4886
|
/**
|
|
4887
4887
|
* @name isDate
|
|
4888
4888
|
* @category Common Helpers
|
|
@@ -4918,7 +4918,7 @@ function _typeof$x(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
4918
4918
|
|
|
4919
4919
|
function isDate(value) {
|
|
4920
4920
|
requiredArgs(1, arguments);
|
|
4921
|
-
return value instanceof Date || _typeof$
|
|
4921
|
+
return value instanceof Date || _typeof$t(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
4922
4922
|
}
|
|
4923
4923
|
|
|
4924
4924
|
/**
|
|
@@ -13694,15 +13694,15 @@ possibleStandardNamesOptimized$1.possibleStandardNames = {
|
|
|
13694
13694
|
|
|
13695
13695
|
Object.defineProperty(lib$1, '__esModule', { value: true });
|
|
13696
13696
|
|
|
13697
|
-
function _slicedToArray$
|
|
13698
|
-
return _arrayWithHoles$
|
|
13697
|
+
function _slicedToArray$d(arr, i) {
|
|
13698
|
+
return _arrayWithHoles$e(arr) || _iterableToArrayLimit$d(arr, i) || _unsupportedIterableToArray$l(arr, i) || _nonIterableRest$e();
|
|
13699
13699
|
}
|
|
13700
13700
|
|
|
13701
|
-
function _arrayWithHoles$
|
|
13701
|
+
function _arrayWithHoles$e(arr) {
|
|
13702
13702
|
if (Array.isArray(arr)) return arr;
|
|
13703
13703
|
}
|
|
13704
13704
|
|
|
13705
|
-
function _iterableToArrayLimit$
|
|
13705
|
+
function _iterableToArrayLimit$d(arr, i) {
|
|
13706
13706
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
13707
13707
|
|
|
13708
13708
|
if (_i == null) return;
|
|
@@ -13732,16 +13732,16 @@ function _iterableToArrayLimit$c(arr, i) {
|
|
|
13732
13732
|
return _arr;
|
|
13733
13733
|
}
|
|
13734
13734
|
|
|
13735
|
-
function _unsupportedIterableToArray$
|
|
13735
|
+
function _unsupportedIterableToArray$l(o, minLen) {
|
|
13736
13736
|
if (!o) return;
|
|
13737
|
-
if (typeof o === "string") return _arrayLikeToArray$
|
|
13737
|
+
if (typeof o === "string") return _arrayLikeToArray$l(o, minLen);
|
|
13738
13738
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13739
13739
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13740
13740
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13741
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$
|
|
13741
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$l(o, minLen);
|
|
13742
13742
|
}
|
|
13743
13743
|
|
|
13744
|
-
function _arrayLikeToArray$
|
|
13744
|
+
function _arrayLikeToArray$l(arr, len) {
|
|
13745
13745
|
if (len == null || len > arr.length) len = arr.length;
|
|
13746
13746
|
|
|
13747
13747
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
@@ -13749,7 +13749,7 @@ function _arrayLikeToArray$k(arr, len) {
|
|
|
13749
13749
|
return arr2;
|
|
13750
13750
|
}
|
|
13751
13751
|
|
|
13752
|
-
function _nonIterableRest$
|
|
13752
|
+
function _nonIterableRest$e() {
|
|
13753
13753
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13754
13754
|
}
|
|
13755
13755
|
|
|
@@ -13813,7 +13813,7 @@ reservedProps.forEach(function (name) {
|
|
|
13813
13813
|
// This is a mapping from React prop names to the attribute names.
|
|
13814
13814
|
|
|
13815
13815
|
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
|
|
13816
|
-
var _ref2 = _slicedToArray$
|
|
13816
|
+
var _ref2 = _slicedToArray$d(_ref, 2),
|
|
13817
13817
|
name = _ref2[0],
|
|
13818
13818
|
attributeName = _ref2[1];
|
|
13819
13819
|
|
|
@@ -14972,7 +14972,7 @@ var Dropdown = function (_a) {
|
|
|
14972
14972
|
setPosition({ x: x, y: y });
|
|
14973
14973
|
setIsVisible(true);
|
|
14974
14974
|
}
|
|
14975
|
-
}, [triggerId]);
|
|
14975
|
+
}, [triggerId, props.disabled]);
|
|
14976
14976
|
React$3.useEffect(function () {
|
|
14977
14977
|
var id = generateRandomString(5);
|
|
14978
14978
|
settriggerId(id);
|
|
@@ -16232,31 +16232,31 @@ var _default = function (file, acceptedFiles) {
|
|
|
16232
16232
|
return true;
|
|
16233
16233
|
};
|
|
16234
16234
|
|
|
16235
|
-
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$
|
|
16235
|
+
function _toConsumableArray$c(arr) { return _arrayWithoutHoles$c(arr) || _iterableToArray$d(arr) || _unsupportedIterableToArray$k(arr) || _nonIterableSpread$c(); }
|
|
16236
16236
|
|
|
16237
16237
|
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."); }
|
|
16238
16238
|
|
|
16239
16239
|
function _iterableToArray$d(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16240
16240
|
|
|
16241
|
-
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16241
|
+
function _arrayWithoutHoles$c(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$k(arr); }
|
|
16242
16242
|
|
|
16243
|
-
function ownKeys$
|
|
16243
|
+
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; }
|
|
16244
16244
|
|
|
16245
|
-
function _objectSpread$
|
|
16245
|
+
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; }
|
|
16246
16246
|
|
|
16247
|
-
function _defineProperty$
|
|
16247
|
+
function _defineProperty$s(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16248
16248
|
|
|
16249
|
-
function _slicedToArray$
|
|
16249
|
+
function _slicedToArray$c(arr, i) { return _arrayWithHoles$d(arr) || _iterableToArrayLimit$c(arr, i) || _unsupportedIterableToArray$k(arr, i) || _nonIterableRest$d(); }
|
|
16250
16250
|
|
|
16251
|
-
function _nonIterableRest$
|
|
16251
|
+
function _nonIterableRest$d() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16252
16252
|
|
|
16253
|
-
function _unsupportedIterableToArray$
|
|
16253
|
+
function _unsupportedIterableToArray$k(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$k(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen); }
|
|
16254
16254
|
|
|
16255
|
-
function _arrayLikeToArray$
|
|
16255
|
+
function _arrayLikeToArray$k(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16256
16256
|
|
|
16257
|
-
function _iterableToArrayLimit$
|
|
16257
|
+
function _iterableToArrayLimit$c(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
16258
16258
|
|
|
16259
|
-
function _arrayWithHoles$
|
|
16259
|
+
function _arrayWithHoles$d(arr) { if (Array.isArray(arr)) return arr; }
|
|
16260
16260
|
|
|
16261
16261
|
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
16262
16262
|
var FILE_TOO_LARGE = "file-too-large";
|
|
@@ -16336,11 +16336,11 @@ function allFilesAccepted(_ref) {
|
|
|
16336
16336
|
|
|
16337
16337
|
return files.every(function (file) {
|
|
16338
16338
|
var _fileAccepted = fileAccepted(file, accept),
|
|
16339
|
-
_fileAccepted2 = _slicedToArray$
|
|
16339
|
+
_fileAccepted2 = _slicedToArray$c(_fileAccepted, 1),
|
|
16340
16340
|
accepted = _fileAccepted2[0];
|
|
16341
16341
|
|
|
16342
16342
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
16343
|
-
_fileMatchSize2 = _slicedToArray$
|
|
16343
|
+
_fileMatchSize2 = _slicedToArray$c(_fileMatchSize, 1),
|
|
16344
16344
|
sizeMatch = _fileMatchSize2[0];
|
|
16345
16345
|
|
|
16346
16346
|
var customErrors = validator ? validator(file) : null;
|
|
@@ -16437,7 +16437,7 @@ function canUseFileSystemAccessAPI() {
|
|
|
16437
16437
|
function pickerOptionsFromAccept(accept) {
|
|
16438
16438
|
if (isDefined(accept)) {
|
|
16439
16439
|
var acceptForPicker = Object.entries(accept).filter(function (_ref2) {
|
|
16440
|
-
var _ref3 = _slicedToArray$
|
|
16440
|
+
var _ref3 = _slicedToArray$c(_ref2, 2),
|
|
16441
16441
|
mimeType = _ref3[0],
|
|
16442
16442
|
ext = _ref3[1];
|
|
16443
16443
|
|
|
@@ -16455,11 +16455,11 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16455
16455
|
|
|
16456
16456
|
return ok;
|
|
16457
16457
|
}).reduce(function (agg, _ref4) {
|
|
16458
|
-
var _ref5 = _slicedToArray$
|
|
16458
|
+
var _ref5 = _slicedToArray$c(_ref4, 2),
|
|
16459
16459
|
mimeType = _ref5[0],
|
|
16460
16460
|
ext = _ref5[1];
|
|
16461
16461
|
|
|
16462
|
-
return _objectSpread$
|
|
16462
|
+
return _objectSpread$q(_objectSpread$q({}, agg), {}, _defineProperty$s({}, mimeType, ext));
|
|
16463
16463
|
}, {});
|
|
16464
16464
|
return [{
|
|
16465
16465
|
// description is required due to https://crbug.com/1264708
|
|
@@ -16479,7 +16479,7 @@ function pickerOptionsFromAccept(accept) {
|
|
|
16479
16479
|
function acceptPropAsAcceptAttr(accept) {
|
|
16480
16480
|
if (isDefined(accept)) {
|
|
16481
16481
|
return Object.entries(accept).reduce(function (a, _ref6) {
|
|
16482
|
-
var _ref7 = _slicedToArray$
|
|
16482
|
+
var _ref7 = _slicedToArray$c(_ref6, 2),
|
|
16483
16483
|
mimeType = _ref7[0],
|
|
16484
16484
|
ext = _ref7[1];
|
|
16485
16485
|
|
|
@@ -16547,40 +16547,40 @@ function isExt(v) {
|
|
|
16547
16547
|
* @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode
|
|
16548
16548
|
*/
|
|
16549
16549
|
|
|
16550
|
-
var _excluded$
|
|
16551
|
-
_excluded2$
|
|
16550
|
+
var _excluded$d = ["children"],
|
|
16551
|
+
_excluded2$3 = ["open"],
|
|
16552
16552
|
_excluded3$1 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
16553
16553
|
_excluded4 = ["refKey", "onChange", "onClick"];
|
|
16554
16554
|
|
|
16555
|
-
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$
|
|
16555
|
+
function _toConsumableArray$b(arr) { return _arrayWithoutHoles$b(arr) || _iterableToArray$c(arr) || _unsupportedIterableToArray$j(arr) || _nonIterableSpread$b(); }
|
|
16556
16556
|
|
|
16557
16557
|
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."); }
|
|
16558
16558
|
|
|
16559
16559
|
function _iterableToArray$c(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
16560
16560
|
|
|
16561
|
-
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
16561
|
+
function _arrayWithoutHoles$b(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$j(arr); }
|
|
16562
16562
|
|
|
16563
|
-
function _slicedToArray$
|
|
16563
|
+
function _slicedToArray$b(arr, i) { return _arrayWithHoles$c(arr) || _iterableToArrayLimit$b(arr, i) || _unsupportedIterableToArray$j(arr, i) || _nonIterableRest$c(); }
|
|
16564
16564
|
|
|
16565
|
-
function _nonIterableRest$
|
|
16565
|
+
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."); }
|
|
16566
16566
|
|
|
16567
|
-
function _unsupportedIterableToArray$
|
|
16567
|
+
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); }
|
|
16568
16568
|
|
|
16569
|
-
function _arrayLikeToArray$
|
|
16569
|
+
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; }
|
|
16570
16570
|
|
|
16571
|
-
function _iterableToArrayLimit$
|
|
16571
|
+
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; }
|
|
16572
16572
|
|
|
16573
|
-
function _arrayWithHoles$
|
|
16573
|
+
function _arrayWithHoles$c(arr) { if (Array.isArray(arr)) return arr; }
|
|
16574
16574
|
|
|
16575
|
-
function ownKeys$
|
|
16575
|
+
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; }
|
|
16576
16576
|
|
|
16577
|
-
function _objectSpread$
|
|
16577
|
+
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; }
|
|
16578
16578
|
|
|
16579
|
-
function _defineProperty$
|
|
16579
|
+
function _defineProperty$r(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16580
16580
|
|
|
16581
|
-
function _objectWithoutProperties$
|
|
16581
|
+
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; }
|
|
16582
16582
|
|
|
16583
|
-
function _objectWithoutPropertiesLoose$
|
|
16583
|
+
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; }
|
|
16584
16584
|
/**
|
|
16585
16585
|
* Convenience wrapper component for the `useDropzone` hook
|
|
16586
16586
|
*
|
|
@@ -16598,11 +16598,11 @@ function _objectWithoutPropertiesLoose$g(source, excluded) { if (source == null)
|
|
|
16598
16598
|
|
|
16599
16599
|
var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
16600
16600
|
var children = _ref.children,
|
|
16601
|
-
params = _objectWithoutProperties$
|
|
16601
|
+
params = _objectWithoutProperties$d(_ref, _excluded$d);
|
|
16602
16602
|
|
|
16603
16603
|
var _useDropzone = useDropzone(params),
|
|
16604
16604
|
open = _useDropzone.open,
|
|
16605
|
-
props = _objectWithoutProperties$
|
|
16605
|
+
props = _objectWithoutProperties$d(_useDropzone, _excluded2$3);
|
|
16606
16606
|
|
|
16607
16607
|
React$3.useImperativeHandle(ref, function () {
|
|
16608
16608
|
return {
|
|
@@ -16610,13 +16610,13 @@ var Dropzone = /*#__PURE__*/React$3.forwardRef(function (_ref, ref) {
|
|
|
16610
16610
|
};
|
|
16611
16611
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
16612
16612
|
|
|
16613
|
-
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$
|
|
16613
|
+
return /*#__PURE__*/React__default["default"].createElement(React$3.Fragment, null, children(_objectSpread$p(_objectSpread$p({}, props), {}, {
|
|
16614
16614
|
open: open
|
|
16615
16615
|
})));
|
|
16616
16616
|
});
|
|
16617
16617
|
Dropzone.displayName = "Dropzone"; // Add default props for react-docgen
|
|
16618
16618
|
|
|
16619
|
-
var defaultProps$
|
|
16619
|
+
var defaultProps$1 = {
|
|
16620
16620
|
disabled: false,
|
|
16621
16621
|
getFilesFromEvent: fromEvent,
|
|
16622
16622
|
maxSize: Infinity,
|
|
@@ -16632,7 +16632,7 @@ var defaultProps$2 = {
|
|
|
16632
16632
|
useFsAccessApi: true,
|
|
16633
16633
|
autoFocus: false
|
|
16634
16634
|
};
|
|
16635
|
-
Dropzone.defaultProps = defaultProps$
|
|
16635
|
+
Dropzone.defaultProps = defaultProps$1;
|
|
16636
16636
|
Dropzone.propTypes = {
|
|
16637
16637
|
/**
|
|
16638
16638
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -16983,7 +16983,7 @@ var initialState = {
|
|
|
16983
16983
|
function useDropzone() {
|
|
16984
16984
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16985
16985
|
|
|
16986
|
-
var _defaultProps$props = _objectSpread$
|
|
16986
|
+
var _defaultProps$props = _objectSpread$p(_objectSpread$p({}, defaultProps$1), props),
|
|
16987
16987
|
accept = _defaultProps$props.accept,
|
|
16988
16988
|
disabled = _defaultProps$props.disabled,
|
|
16989
16989
|
getFilesFromEvent = _defaultProps$props.getFilesFromEvent,
|
|
@@ -17030,7 +17030,7 @@ function useDropzone() {
|
|
|
17030
17030
|
var inputRef = React$3.useRef(null);
|
|
17031
17031
|
|
|
17032
17032
|
var _useReducer = React$3.useReducer(reducer$1, initialState),
|
|
17033
|
-
_useReducer2 = _slicedToArray$
|
|
17033
|
+
_useReducer2 = _slicedToArray$b(_useReducer, 2),
|
|
17034
17034
|
state = _useReducer2[0],
|
|
17035
17035
|
dispatch = _useReducer2[1];
|
|
17036
17036
|
|
|
@@ -17200,12 +17200,12 @@ function useDropzone() {
|
|
|
17200
17200
|
var fileRejections = [];
|
|
17201
17201
|
files.forEach(function (file) {
|
|
17202
17202
|
var _fileAccepted = fileAccepted(file, acceptAttr),
|
|
17203
|
-
_fileAccepted2 = _slicedToArray$
|
|
17203
|
+
_fileAccepted2 = _slicedToArray$b(_fileAccepted, 2),
|
|
17204
17204
|
accepted = _fileAccepted2[0],
|
|
17205
17205
|
acceptError = _fileAccepted2[1];
|
|
17206
17206
|
|
|
17207
17207
|
var _fileMatchSize = fileMatchSize(file, minSize, maxSize),
|
|
17208
|
-
_fileMatchSize2 = _slicedToArray$
|
|
17208
|
+
_fileMatchSize2 = _slicedToArray$b(_fileMatchSize, 2),
|
|
17209
17209
|
sizeMatch = _fileMatchSize2[0],
|
|
17210
17210
|
sizeError = _fileMatchSize2[1];
|
|
17211
17211
|
|
|
@@ -17406,9 +17406,9 @@ function useDropzone() {
|
|
|
17406
17406
|
onDragOver = _ref2.onDragOver,
|
|
17407
17407
|
onDragLeave = _ref2.onDragLeave,
|
|
17408
17408
|
onDrop = _ref2.onDrop,
|
|
17409
|
-
rest = _objectWithoutProperties$
|
|
17409
|
+
rest = _objectWithoutProperties$d(_ref2, _excluded3$1);
|
|
17410
17410
|
|
|
17411
|
-
return _objectSpread$
|
|
17411
|
+
return _objectSpread$p(_objectSpread$p(_defineProperty$r({
|
|
17412
17412
|
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
17413
17413
|
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
17414
17414
|
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
@@ -17433,9 +17433,9 @@ function useDropzone() {
|
|
|
17433
17433
|
refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey,
|
|
17434
17434
|
onChange = _ref3.onChange,
|
|
17435
17435
|
onClick = _ref3.onClick,
|
|
17436
|
-
rest = _objectWithoutProperties$
|
|
17436
|
+
rest = _objectWithoutProperties$d(_ref3, _excluded4);
|
|
17437
17437
|
|
|
17438
|
-
var inputProps = _defineProperty$
|
|
17438
|
+
var inputProps = _defineProperty$r({
|
|
17439
17439
|
accept: acceptAttr,
|
|
17440
17440
|
multiple: multiple,
|
|
17441
17441
|
type: "file",
|
|
@@ -17447,10 +17447,10 @@ function useDropzone() {
|
|
|
17447
17447
|
tabIndex: -1
|
|
17448
17448
|
}, refKey, inputRef);
|
|
17449
17449
|
|
|
17450
|
-
return _objectSpread$
|
|
17450
|
+
return _objectSpread$p(_objectSpread$p({}, inputProps), rest);
|
|
17451
17451
|
};
|
|
17452
17452
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
17453
|
-
return _objectSpread$
|
|
17453
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17454
17454
|
isFocused: isFocused && !disabled,
|
|
17455
17455
|
getRootProps: getRootProps,
|
|
17456
17456
|
getInputProps: getInputProps,
|
|
@@ -17469,40 +17469,40 @@ function reducer$1(state, action) {
|
|
|
17469
17469
|
/* istanbul ignore next */
|
|
17470
17470
|
switch (action.type) {
|
|
17471
17471
|
case "focus":
|
|
17472
|
-
return _objectSpread$
|
|
17472
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17473
17473
|
isFocused: true
|
|
17474
17474
|
});
|
|
17475
17475
|
|
|
17476
17476
|
case "blur":
|
|
17477
|
-
return _objectSpread$
|
|
17477
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17478
17478
|
isFocused: false
|
|
17479
17479
|
});
|
|
17480
17480
|
|
|
17481
17481
|
case "openDialog":
|
|
17482
|
-
return _objectSpread$
|
|
17482
|
+
return _objectSpread$p(_objectSpread$p({}, initialState), {}, {
|
|
17483
17483
|
isFileDialogActive: true
|
|
17484
17484
|
});
|
|
17485
17485
|
|
|
17486
17486
|
case "closeDialog":
|
|
17487
|
-
return _objectSpread$
|
|
17487
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17488
17488
|
isFileDialogActive: false
|
|
17489
17489
|
});
|
|
17490
17490
|
|
|
17491
17491
|
case "setDraggedFiles":
|
|
17492
|
-
return _objectSpread$
|
|
17492
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17493
17493
|
isDragActive: action.isDragActive,
|
|
17494
17494
|
isDragAccept: action.isDragAccept,
|
|
17495
17495
|
isDragReject: action.isDragReject
|
|
17496
17496
|
});
|
|
17497
17497
|
|
|
17498
17498
|
case "setFiles":
|
|
17499
|
-
return _objectSpread$
|
|
17499
|
+
return _objectSpread$p(_objectSpread$p({}, state), {}, {
|
|
17500
17500
|
acceptedFiles: action.acceptedFiles,
|
|
17501
17501
|
fileRejections: action.fileRejections
|
|
17502
17502
|
});
|
|
17503
17503
|
|
|
17504
17504
|
case "reset":
|
|
17505
|
-
return _objectSpread$
|
|
17505
|
+
return _objectSpread$p({}, initialState);
|
|
17506
17506
|
|
|
17507
17507
|
default:
|
|
17508
17508
|
return state;
|
|
@@ -19730,7 +19730,7 @@ function shallowEqual(a, b) {
|
|
|
19730
19730
|
return true;
|
|
19731
19731
|
}
|
|
19732
19732
|
|
|
19733
|
-
function _typeof$
|
|
19733
|
+
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); }
|
|
19734
19734
|
|
|
19735
19735
|
//
|
|
19736
19736
|
// Event Handler Types -- Copied from @types/react/index.d.ts and adapted for Props.
|
|
@@ -19757,9 +19757,7 @@ var FilteredElementKeyMap = {
|
|
|
19757
19757
|
};
|
|
19758
19758
|
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'];
|
|
19759
19759
|
|
|
19760
|
-
|
|
19761
|
-
|
|
19762
|
-
/** Specifies the duration of animation, the unit of this option is ms. */
|
|
19760
|
+
// Animation Types => TODO: Should be moved when react-smooth is typescriptified.
|
|
19763
19761
|
|
|
19764
19762
|
/** the offset of a chart, which define the blank space all around */
|
|
19765
19763
|
|
|
@@ -19795,7 +19793,7 @@ var getEventHandlerOfChild = function getEventHandlerOfChild(originalHandler, da
|
|
|
19795
19793
|
};
|
|
19796
19794
|
};
|
|
19797
19795
|
var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
19798
|
-
if (!isObject_1(props) || _typeof$
|
|
19796
|
+
if (!isObject_1(props) || _typeof$s(props) !== 'object') {
|
|
19799
19797
|
return null;
|
|
19800
19798
|
}
|
|
19801
19799
|
var out = null;
|
|
@@ -19809,11 +19807,11 @@ var adaptEventsOfChild = function adaptEventsOfChild(props, data, index) {
|
|
|
19809
19807
|
return out;
|
|
19810
19808
|
};
|
|
19811
19809
|
|
|
19812
|
-
var _excluded$
|
|
19813
|
-
_excluded2$
|
|
19814
|
-
function _objectWithoutProperties$
|
|
19815
|
-
function _objectWithoutPropertiesLoose$
|
|
19816
|
-
function _typeof$
|
|
19810
|
+
var _excluded$c = ["children"],
|
|
19811
|
+
_excluded2$2 = ["children"];
|
|
19812
|
+
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; }
|
|
19813
|
+
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; }
|
|
19814
|
+
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); }
|
|
19817
19815
|
var REACT_BROWSER_EVENT_MAP = {
|
|
19818
19816
|
click: 'onClick',
|
|
19819
19817
|
mousedown: 'onMouseDown',
|
|
@@ -19920,7 +19918,7 @@ var isSvgElement = function isSvgElement(child) {
|
|
|
19920
19918
|
return child && child.type && isString_1(child.type) && SVG_TAGS.indexOf(child.type) >= 0;
|
|
19921
19919
|
};
|
|
19922
19920
|
var isDotProps = function isDotProps(dot) {
|
|
19923
|
-
return dot && _typeof$
|
|
19921
|
+
return dot && _typeof$r(dot) === 'object' && 'cx' in dot && 'cy' in dot && 'r' in dot;
|
|
19924
19922
|
};
|
|
19925
19923
|
|
|
19926
19924
|
/**
|
|
@@ -20012,10 +20010,10 @@ var isSingleChildEqual = function isSingleChildEqual(nextChild, prevChild) {
|
|
|
20012
20010
|
if (!isNil_1(nextChild) && !isNil_1(prevChild)) {
|
|
20013
20011
|
var _ref = nextChild.props || {},
|
|
20014
20012
|
nextChildren = _ref.children,
|
|
20015
|
-
nextProps = _objectWithoutProperties$
|
|
20013
|
+
nextProps = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
20016
20014
|
var _ref2 = prevChild.props || {},
|
|
20017
20015
|
prevChildren = _ref2.children,
|
|
20018
|
-
prevProps = _objectWithoutProperties$
|
|
20016
|
+
prevProps = _objectWithoutProperties$c(_ref2, _excluded2$2);
|
|
20019
20017
|
if (nextChildren && prevChildren) {
|
|
20020
20018
|
return shallowEqual(nextProps, prevProps) && isChildrenEqual(nextChildren, prevChildren);
|
|
20021
20019
|
}
|
|
@@ -20057,10 +20055,10 @@ var parseChildIndex = function parseChildIndex(child, children) {
|
|
|
20057
20055
|
return toArray(children).indexOf(child);
|
|
20058
20056
|
};
|
|
20059
20057
|
|
|
20060
|
-
var _excluded$
|
|
20058
|
+
var _excluded$b = ["children", "width", "height", "viewBox", "className", "style"];
|
|
20061
20059
|
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); }
|
|
20062
|
-
function _objectWithoutProperties$
|
|
20063
|
-
function _objectWithoutPropertiesLoose$
|
|
20060
|
+
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; }
|
|
20061
|
+
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; }
|
|
20064
20062
|
function Surface(props) {
|
|
20065
20063
|
var children = props.children,
|
|
20066
20064
|
width = props.width,
|
|
@@ -20068,7 +20066,7 @@ function Surface(props) {
|
|
|
20068
20066
|
viewBox = props.viewBox,
|
|
20069
20067
|
className = props.className,
|
|
20070
20068
|
style = props.style,
|
|
20071
|
-
others = _objectWithoutProperties$
|
|
20069
|
+
others = _objectWithoutProperties$b(props, _excluded$b);
|
|
20072
20070
|
var svgView = viewBox || {
|
|
20073
20071
|
width: width,
|
|
20074
20072
|
height: height,
|
|
@@ -20085,14 +20083,14 @@ function Surface(props) {
|
|
|
20085
20083
|
}), /*#__PURE__*/React__default["default"].createElement("title", null, props.title), /*#__PURE__*/React__default["default"].createElement("desc", null, props.desc), children);
|
|
20086
20084
|
}
|
|
20087
20085
|
|
|
20088
|
-
var _excluded$
|
|
20086
|
+
var _excluded$a = ["children", "className"];
|
|
20089
20087
|
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); }
|
|
20090
|
-
function _objectWithoutProperties$
|
|
20091
|
-
function _objectWithoutPropertiesLoose$
|
|
20088
|
+
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; }
|
|
20089
|
+
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; }
|
|
20092
20090
|
var Layer = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
|
|
20093
20091
|
var children = props.children,
|
|
20094
20092
|
className = props.className,
|
|
20095
|
-
others = _objectWithoutProperties$
|
|
20093
|
+
others = _objectWithoutProperties$a(props, _excluded$a);
|
|
20096
20094
|
var layerClass = classNames('recharts-layer', className);
|
|
20097
20095
|
return /*#__PURE__*/React__default["default"].createElement("g", _extends$l({
|
|
20098
20096
|
className: layerClass
|
|
@@ -23507,16 +23505,7 @@ function stackOffsetWiggle(series, order) {
|
|
|
23507
23505
|
stackOffsetNone(series, order);
|
|
23508
23506
|
}
|
|
23509
23507
|
|
|
23510
|
-
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); }
|
|
23511
|
-
var _excluded$c = ["type", "size", "sizeType"];
|
|
23512
23508
|
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); }
|
|
23513
|
-
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; }
|
|
23514
|
-
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; }
|
|
23515
|
-
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; }
|
|
23516
|
-
function _toPropertyKey$t(arg) { var key = _toPrimitive$t(arg, "string"); return _typeof$u(key) === "symbol" ? key : String(key); }
|
|
23517
|
-
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); }
|
|
23518
|
-
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; }
|
|
23519
|
-
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; }
|
|
23520
23509
|
var symbolFactories = {
|
|
23521
23510
|
symbolCircle: symbolCircle,
|
|
23522
23511
|
symbolCross: symbolCross,
|
|
@@ -23555,35 +23544,31 @@ var calculateAreaSize = function calculateAreaSize(size, sizeType, type) {
|
|
|
23555
23544
|
return Math.PI * size * size / 4;
|
|
23556
23545
|
}
|
|
23557
23546
|
};
|
|
23547
|
+
var symbolsDefaultProps = {
|
|
23548
|
+
type: 'circle',
|
|
23549
|
+
size: 64,
|
|
23550
|
+
sizeType: 'area'
|
|
23551
|
+
};
|
|
23558
23552
|
var registerSymbol = function registerSymbol(key, factory) {
|
|
23559
23553
|
symbolFactories["symbol".concat(upperFirst_1(key))] = factory;
|
|
23560
23554
|
};
|
|
23561
|
-
var Symbols = function Symbols(
|
|
23562
|
-
var _ref$type = _ref.type,
|
|
23563
|
-
type = _ref$type === void 0 ? 'circle' : _ref$type,
|
|
23564
|
-
_ref$size = _ref.size,
|
|
23565
|
-
size = _ref$size === void 0 ? 64 : _ref$size,
|
|
23566
|
-
_ref$sizeType = _ref.sizeType,
|
|
23567
|
-
sizeType = _ref$sizeType === void 0 ? 'area' : _ref$sizeType,
|
|
23568
|
-
rest = _objectWithoutProperties$c(_ref, _excluded$c);
|
|
23569
|
-
var props = _objectSpread$s(_objectSpread$s({}, rest), {}, {
|
|
23570
|
-
type: type,
|
|
23571
|
-
size: size,
|
|
23572
|
-
sizeType: sizeType
|
|
23573
|
-
});
|
|
23574
|
-
|
|
23555
|
+
var Symbols = function Symbols(props) {
|
|
23575
23556
|
/**
|
|
23576
23557
|
* Calculate the path of curve
|
|
23577
23558
|
* @return {String} path
|
|
23578
23559
|
*/
|
|
23579
23560
|
var getPath = function getPath() {
|
|
23561
|
+
var size = props.size,
|
|
23562
|
+
sizeType = props.sizeType,
|
|
23563
|
+
type = props.type;
|
|
23580
23564
|
var symbolFactory = getSymbolFactory(type);
|
|
23581
23565
|
var symbol = Symbol$2().type(symbolFactory).size(calculateAreaSize(size, sizeType, type));
|
|
23582
23566
|
return symbol();
|
|
23583
23567
|
};
|
|
23584
23568
|
var className = props.className,
|
|
23585
23569
|
cx = props.cx,
|
|
23586
|
-
cy = props.cy
|
|
23570
|
+
cy = props.cy,
|
|
23571
|
+
size = props.size;
|
|
23587
23572
|
var filteredProps = filterProps(props, true);
|
|
23588
23573
|
if (cx === +cx && cy === +cy && size === +size) {
|
|
23589
23574
|
return /*#__PURE__*/React__default["default"].createElement("path", _extends$k({}, filteredProps, {
|
|
@@ -23594,34 +23579,35 @@ var Symbols = function Symbols(_ref) {
|
|
|
23594
23579
|
}
|
|
23595
23580
|
return null;
|
|
23596
23581
|
};
|
|
23582
|
+
Symbols.defaultProps = symbolsDefaultProps;
|
|
23597
23583
|
Symbols.registerSymbol = registerSymbol;
|
|
23598
23584
|
|
|
23599
|
-
function _typeof$
|
|
23585
|
+
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); }
|
|
23600
23586
|
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); }
|
|
23601
|
-
function ownKeys$
|
|
23602
|
-
function _objectSpread$
|
|
23603
|
-
function _classCallCheck$
|
|
23604
|
-
function _defineProperties$
|
|
23605
|
-
function _createClass$
|
|
23606
|
-
function _inherits$
|
|
23607
|
-
function _setPrototypeOf$
|
|
23608
|
-
function _createSuper$
|
|
23609
|
-
function _possibleConstructorReturn$
|
|
23610
|
-
function _assertThisInitialized$
|
|
23611
|
-
function _isNativeReflectConstruct$
|
|
23612
|
-
function _getPrototypeOf$
|
|
23613
|
-
function _defineProperty$
|
|
23614
|
-
function _toPropertyKey$
|
|
23615
|
-
function _toPrimitive$
|
|
23587
|
+
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; }
|
|
23588
|
+
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; }
|
|
23589
|
+
function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23590
|
+
function _defineProperties$a(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$p(descriptor.key), descriptor); } }
|
|
23591
|
+
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; }
|
|
23592
|
+
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); }
|
|
23593
|
+
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); }
|
|
23594
|
+
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); }; }
|
|
23595
|
+
function _possibleConstructorReturn$8(self, call) { if (call && (_typeof$q(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$8(self); }
|
|
23596
|
+
function _assertThisInitialized$8(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23597
|
+
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; } }
|
|
23598
|
+
function _getPrototypeOf$8(o) { _getPrototypeOf$8 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$8(o); }
|
|
23599
|
+
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; }
|
|
23600
|
+
function _toPropertyKey$p(arg) { var key = _toPrimitive$p(arg, "string"); return _typeof$q(key) === "symbol" ? key : String(key); }
|
|
23601
|
+
function _toPrimitive$p(input, hint) { if (_typeof$q(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$q(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23616
23602
|
var SIZE = 32;
|
|
23617
23603
|
var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
23618
|
-
_inherits$
|
|
23619
|
-
var _super = _createSuper$
|
|
23604
|
+
_inherits$8(DefaultLegendContent, _PureComponent);
|
|
23605
|
+
var _super = _createSuper$8(DefaultLegendContent);
|
|
23620
23606
|
function DefaultLegendContent() {
|
|
23621
|
-
_classCallCheck$
|
|
23607
|
+
_classCallCheck$a(this, DefaultLegendContent);
|
|
23622
23608
|
return _super.apply(this, arguments);
|
|
23623
23609
|
}
|
|
23624
|
-
_createClass$
|
|
23610
|
+
_createClass$a(DefaultLegendContent, [{
|
|
23625
23611
|
key: "renderIcon",
|
|
23626
23612
|
value:
|
|
23627
23613
|
/**
|
|
@@ -23666,7 +23652,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23666
23652
|
});
|
|
23667
23653
|
}
|
|
23668
23654
|
if ( /*#__PURE__*/React__default["default"].isValidElement(data.legendIcon)) {
|
|
23669
|
-
var iconProps = _objectSpread$
|
|
23655
|
+
var iconProps = _objectSpread$o({}, data);
|
|
23670
23656
|
delete iconProps.legendIcon;
|
|
23671
23657
|
return /*#__PURE__*/React__default["default"].cloneElement(data.legendIcon, iconProps);
|
|
23672
23658
|
}
|
|
@@ -23714,7 +23700,7 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23714
23700
|
var finalFormatter = entry.formatter || formatter;
|
|
23715
23701
|
var className = classNames((_classNames = {
|
|
23716
23702
|
'recharts-legend-item': true
|
|
23717
|
-
}, _defineProperty$
|
|
23703
|
+
}, _defineProperty$q(_classNames, "legend-item-".concat(i), true), _defineProperty$q(_classNames, "inactive", entry.inactive), _classNames));
|
|
23718
23704
|
if (entry.type === 'none') {
|
|
23719
23705
|
return null;
|
|
23720
23706
|
}
|
|
@@ -23759,8 +23745,8 @@ var DefaultLegendContent = /*#__PURE__*/function (_PureComponent) {
|
|
|
23759
23745
|
}]);
|
|
23760
23746
|
return DefaultLegendContent;
|
|
23761
23747
|
}(React$3.PureComponent);
|
|
23762
|
-
_defineProperty$
|
|
23763
|
-
_defineProperty$
|
|
23748
|
+
_defineProperty$q(DefaultLegendContent, "displayName", 'Legend');
|
|
23749
|
+
_defineProperty$q(DefaultLegendContent, "defaultProps", {
|
|
23764
23750
|
iconSize: 14,
|
|
23765
23751
|
layout: 'horizontal',
|
|
23766
23752
|
align: 'center',
|
|
@@ -23768,25 +23754,25 @@ _defineProperty$t(DefaultLegendContent, "defaultProps", {
|
|
|
23768
23754
|
inactiveColor: '#ccc'
|
|
23769
23755
|
});
|
|
23770
23756
|
|
|
23771
|
-
function _typeof$
|
|
23772
|
-
var _excluded$
|
|
23773
|
-
function ownKeys$
|
|
23774
|
-
function _objectSpread$
|
|
23775
|
-
function _classCallCheck$
|
|
23776
|
-
function _defineProperties$
|
|
23777
|
-
function _createClass$
|
|
23778
|
-
function _inherits$
|
|
23779
|
-
function _setPrototypeOf$
|
|
23780
|
-
function _createSuper$
|
|
23781
|
-
function _possibleConstructorReturn$
|
|
23782
|
-
function _assertThisInitialized$
|
|
23783
|
-
function _isNativeReflectConstruct$
|
|
23784
|
-
function _getPrototypeOf$
|
|
23785
|
-
function _defineProperty$
|
|
23786
|
-
function _toPropertyKey$
|
|
23787
|
-
function _toPrimitive$
|
|
23788
|
-
function _objectWithoutProperties$
|
|
23789
|
-
function _objectWithoutPropertiesLoose$
|
|
23757
|
+
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); }
|
|
23758
|
+
var _excluded$9 = ["ref"];
|
|
23759
|
+
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; }
|
|
23760
|
+
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; }
|
|
23761
|
+
function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23762
|
+
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); } }
|
|
23763
|
+
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; }
|
|
23764
|
+
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); }
|
|
23765
|
+
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); }
|
|
23766
|
+
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); }; }
|
|
23767
|
+
function _possibleConstructorReturn$7(self, call) { if (call && (_typeof$p(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$7(self); }
|
|
23768
|
+
function _assertThisInitialized$7(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
23769
|
+
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; } }
|
|
23770
|
+
function _getPrototypeOf$7(o) { _getPrototypeOf$7 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$7(o); }
|
|
23771
|
+
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; }
|
|
23772
|
+
function _toPropertyKey$o(arg) { var key = _toPrimitive$o(arg, "string"); return _typeof$p(key) === "symbol" ? key : String(key); }
|
|
23773
|
+
function _toPrimitive$o(input, hint) { if (_typeof$p(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof$p(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
23774
|
+
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; }
|
|
23775
|
+
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; }
|
|
23790
23776
|
function defaultUniqBy$1(entry) {
|
|
23791
23777
|
return entry.value;
|
|
23792
23778
|
}
|
|
@@ -23807,27 +23793,27 @@ function renderContent$1(content, props) {
|
|
|
23807
23793
|
return /*#__PURE__*/React__default["default"].createElement(content, props);
|
|
23808
23794
|
}
|
|
23809
23795
|
props.ref;
|
|
23810
|
-
var otherProps = _objectWithoutProperties$
|
|
23796
|
+
var otherProps = _objectWithoutProperties$9(props, _excluded$9);
|
|
23811
23797
|
return /*#__PURE__*/React__default["default"].createElement(DefaultLegendContent, otherProps);
|
|
23812
23798
|
}
|
|
23813
23799
|
var EPS$2 = 1;
|
|
23814
23800
|
var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
23815
|
-
_inherits$
|
|
23816
|
-
var _super = _createSuper$
|
|
23801
|
+
_inherits$7(Legend, _PureComponent);
|
|
23802
|
+
var _super = _createSuper$7(Legend);
|
|
23817
23803
|
function Legend() {
|
|
23818
23804
|
var _this;
|
|
23819
|
-
_classCallCheck$
|
|
23805
|
+
_classCallCheck$9(this, Legend);
|
|
23820
23806
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
23821
23807
|
args[_key] = arguments[_key];
|
|
23822
23808
|
}
|
|
23823
23809
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
23824
|
-
_defineProperty$
|
|
23810
|
+
_defineProperty$p(_assertThisInitialized$7(_this), "state", {
|
|
23825
23811
|
boxWidth: -1,
|
|
23826
23812
|
boxHeight: -1
|
|
23827
23813
|
});
|
|
23828
23814
|
return _this;
|
|
23829
23815
|
}
|
|
23830
|
-
_createClass$
|
|
23816
|
+
_createClass$9(Legend, [{
|
|
23831
23817
|
key: "componentDidMount",
|
|
23832
23818
|
value: function componentDidMount() {
|
|
23833
23819
|
this.updateBBox();
|
|
@@ -23902,7 +23888,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23902
23888
|
};
|
|
23903
23889
|
}
|
|
23904
23890
|
}
|
|
23905
|
-
return _objectSpread$
|
|
23891
|
+
return _objectSpread$n(_objectSpread$n({}, hPos), vPos);
|
|
23906
23892
|
}
|
|
23907
23893
|
}, {
|
|
23908
23894
|
key: "updateBBox",
|
|
@@ -23945,7 +23931,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23945
23931
|
wrapperStyle = _this$props2.wrapperStyle,
|
|
23946
23932
|
payloadUniqBy = _this$props2.payloadUniqBy,
|
|
23947
23933
|
payload = _this$props2.payload;
|
|
23948
|
-
var outerStyle = _objectSpread$
|
|
23934
|
+
var outerStyle = _objectSpread$n(_objectSpread$n({
|
|
23949
23935
|
position: 'absolute',
|
|
23950
23936
|
width: width || 'auto',
|
|
23951
23937
|
height: height || 'auto'
|
|
@@ -23956,7 +23942,7 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23956
23942
|
ref: function ref(node) {
|
|
23957
23943
|
_this2.wrapperNode = node;
|
|
23958
23944
|
}
|
|
23959
|
-
}, renderContent$1(content, _objectSpread$
|
|
23945
|
+
}, renderContent$1(content, _objectSpread$n(_objectSpread$n({}, this.props), {}, {
|
|
23960
23946
|
payload: getUniqPayload$1(payloadUniqBy, payload)
|
|
23961
23947
|
})));
|
|
23962
23948
|
}
|
|
@@ -23979,8 +23965,8 @@ var Legend = /*#__PURE__*/function (_PureComponent) {
|
|
|
23979
23965
|
}]);
|
|
23980
23966
|
return Legend;
|
|
23981
23967
|
}(React$3.PureComponent);
|
|
23982
|
-
_defineProperty$
|
|
23983
|
-
_defineProperty$
|
|
23968
|
+
_defineProperty$p(Legend, "displayName", 'Legend');
|
|
23969
|
+
_defineProperty$p(Legend, "defaultProps", {
|
|
23984
23970
|
iconSize: 14,
|
|
23985
23971
|
layout: 'horizontal',
|
|
23986
23972
|
align: 'center',
|
|
@@ -24544,13 +24530,13 @@ function setRafTimeout(callback) {
|
|
|
24544
24530
|
requestAnimationFrame(shouldUpdate);
|
|
24545
24531
|
}
|
|
24546
24532
|
|
|
24547
|
-
function _typeof$
|
|
24548
|
-
function _toArray(arr) { return _arrayWithHoles$
|
|
24549
|
-
function _nonIterableRest$
|
|
24550
|
-
function _unsupportedIterableToArray$
|
|
24551
|
-
function _arrayLikeToArray$
|
|
24533
|
+
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); }
|
|
24534
|
+
function _toArray(arr) { return _arrayWithHoles$b(arr) || _iterableToArray$b(arr) || _unsupportedIterableToArray$i(arr) || _nonIterableRest$b(); }
|
|
24535
|
+
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."); }
|
|
24536
|
+
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); }
|
|
24537
|
+
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; }
|
|
24552
24538
|
function _iterableToArray$b(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24553
|
-
function _arrayWithHoles$
|
|
24539
|
+
function _arrayWithHoles$b(arr) { if (Array.isArray(arr)) return arr; }
|
|
24554
24540
|
function createAnimateManager() {
|
|
24555
24541
|
var currStyle = {};
|
|
24556
24542
|
var handleChange = function handleChange() {
|
|
@@ -24577,7 +24563,7 @@ function createAnimateManager() {
|
|
|
24577
24563
|
setRafTimeout(setStyle.bind(null, restStyles));
|
|
24578
24564
|
return;
|
|
24579
24565
|
}
|
|
24580
|
-
if (_typeof$
|
|
24566
|
+
if (_typeof$o(_style) === 'object') {
|
|
24581
24567
|
currStyle = _style;
|
|
24582
24568
|
handleChange(currStyle);
|
|
24583
24569
|
}
|
|
@@ -24604,12 +24590,12 @@ function createAnimateManager() {
|
|
|
24604
24590
|
};
|
|
24605
24591
|
}
|
|
24606
24592
|
|
|
24607
|
-
function _typeof$
|
|
24608
|
-
function ownKeys$
|
|
24609
|
-
function _objectSpread$
|
|
24610
|
-
function _defineProperty$
|
|
24611
|
-
function _toPropertyKey$
|
|
24612
|
-
function _toPrimitive$
|
|
24593
|
+
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); }
|
|
24594
|
+
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; }
|
|
24595
|
+
function _objectSpread$m(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$m(Object(source), !0).forEach(function (key) { _defineProperty$o(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$m(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24596
|
+
function _defineProperty$o(obj, key, value) { key = _toPropertyKey$n(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24597
|
+
function _toPropertyKey$n(arg) { var key = _toPrimitive$n(arg, "string"); return _typeof$n(key) === "symbol" ? key : String(key); }
|
|
24598
|
+
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); }
|
|
24613
24599
|
/* eslint no-console: 0 */
|
|
24614
24600
|
var PREFIX_LIST$1 = ['Webkit', 'Moz', 'O', 'ms'];
|
|
24615
24601
|
var IN_LINE_PREFIX_LIST = ['-webkit-', '-moz-', '-o-', '-ms-'];
|
|
@@ -24641,7 +24627,7 @@ var getDashCase = function getDashCase(name) {
|
|
|
24641
24627
|
*/
|
|
24642
24628
|
var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
24643
24629
|
if (IN_COMPATIBLE_PROPERTY.indexOf(name) === -1) {
|
|
24644
|
-
return _defineProperty$
|
|
24630
|
+
return _defineProperty$o({}, name, Number.isNaN(value) ? 0 : value);
|
|
24645
24631
|
}
|
|
24646
24632
|
var isTransition = name === 'transition';
|
|
24647
24633
|
var camelName = name.replace(/(\w)/, function (v) {
|
|
@@ -24652,7 +24638,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24652
24638
|
if (isTransition) {
|
|
24653
24639
|
styleVal = value.replace(/(transform|transform-origin)/gim, "".concat(IN_LINE_PREFIX_LIST[i], "$1"));
|
|
24654
24640
|
}
|
|
24655
|
-
return _objectSpread$
|
|
24641
|
+
return _objectSpread$m(_objectSpread$m({}, result), {}, _defineProperty$o({}, property + camelName, styleVal));
|
|
24656
24642
|
}, {});
|
|
24657
24643
|
};
|
|
24658
24644
|
|
|
@@ -24662,7 +24648,7 @@ var generatePrefixStyle$1 = function generatePrefixStyle(name, value) {
|
|
|
24662
24648
|
*/
|
|
24663
24649
|
var mapObject = function mapObject(fn, obj) {
|
|
24664
24650
|
return Object.keys(obj).reduce(function (res, key) {
|
|
24665
|
-
return _objectSpread$
|
|
24651
|
+
return _objectSpread$m(_objectSpread$m({}, res), {}, _defineProperty$o({}, key, fn(key, obj[key])));
|
|
24666
24652
|
}, {});
|
|
24667
24653
|
};
|
|
24668
24654
|
|
|
@@ -24672,7 +24658,7 @@ var mapObject = function mapObject(fn, obj) {
|
|
|
24672
24658
|
*/
|
|
24673
24659
|
var translateStyle = function translateStyle(style) {
|
|
24674
24660
|
return Object.keys(style).reduce(function (res, key) {
|
|
24675
|
-
return _objectSpread$
|
|
24661
|
+
return _objectSpread$m(_objectSpread$m({}, res), generatePrefixStyle$1(key, res[key]));
|
|
24676
24662
|
}, style);
|
|
24677
24663
|
};
|
|
24678
24664
|
var getTransitionVal = function getTransitionVal(props, duration, easing) {
|
|
@@ -24700,16 +24686,16 @@ var warn$1 = function warn(condition, format, a, b, c, d, e, f) {
|
|
|
24700
24686
|
}
|
|
24701
24687
|
};
|
|
24702
24688
|
|
|
24703
|
-
function _slicedToArray$
|
|
24704
|
-
function _nonIterableRest$
|
|
24705
|
-
function _iterableToArrayLimit$
|
|
24706
|
-
function _arrayWithHoles$
|
|
24707
|
-
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$
|
|
24689
|
+
function _slicedToArray$a(arr, i) { return _arrayWithHoles$a(arr) || _iterableToArrayLimit$a(arr, i) || _unsupportedIterableToArray$h(arr, i) || _nonIterableRest$a(); }
|
|
24690
|
+
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."); }
|
|
24691
|
+
function _iterableToArrayLimit$a(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24692
|
+
function _arrayWithHoles$a(arr) { if (Array.isArray(arr)) return arr; }
|
|
24693
|
+
function _toConsumableArray$a(arr) { return _arrayWithoutHoles$a(arr) || _iterableToArray$a(arr) || _unsupportedIterableToArray$h(arr) || _nonIterableSpread$a(); }
|
|
24708
24694
|
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."); }
|
|
24709
|
-
function _unsupportedIterableToArray$
|
|
24695
|
+
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); }
|
|
24710
24696
|
function _iterableToArray$a(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24711
|
-
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24712
|
-
function _arrayLikeToArray$
|
|
24697
|
+
function _arrayWithoutHoles$a(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$h(arr); }
|
|
24698
|
+
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; }
|
|
24713
24699
|
var ACCURACY = 1e-4;
|
|
24714
24700
|
var cubicBezierFactor = function cubicBezierFactor(c1, c2) {
|
|
24715
24701
|
return [0, 3 * c1, 3 * c2 - 6 * c1, 3 * c1 - 3 * c2 + 1];
|
|
@@ -24785,7 +24771,7 @@ var configBezier = function configBezier() {
|
|
|
24785
24771
|
var _easing$1$split$0$spl = easing[1].split(')')[0].split(',').map(function (x) {
|
|
24786
24772
|
return parseFloat(x);
|
|
24787
24773
|
});
|
|
24788
|
-
var _easing$1$split$0$spl2 = _slicedToArray$
|
|
24774
|
+
var _easing$1$split$0$spl2 = _slicedToArray$a(_easing$1$split$0$spl, 4);
|
|
24789
24775
|
x1 = _easing$1$split$0$spl2[0];
|
|
24790
24776
|
y1 = _easing$1$split$0$spl2[1];
|
|
24791
24777
|
x2 = _easing$1$split$0$spl2[2];
|
|
@@ -24878,22 +24864,22 @@ var configEasing = function configEasing() {
|
|
|
24878
24864
|
return null;
|
|
24879
24865
|
};
|
|
24880
24866
|
|
|
24881
|
-
function _typeof$
|
|
24882
|
-
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$
|
|
24867
|
+
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); }
|
|
24868
|
+
function _toConsumableArray$9(arr) { return _arrayWithoutHoles$9(arr) || _iterableToArray$9(arr) || _unsupportedIterableToArray$g(arr) || _nonIterableSpread$9(); }
|
|
24883
24869
|
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."); }
|
|
24884
24870
|
function _iterableToArray$9(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24885
|
-
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
24886
|
-
function ownKeys$
|
|
24887
|
-
function _objectSpread$
|
|
24888
|
-
function _defineProperty$
|
|
24889
|
-
function _toPropertyKey$
|
|
24890
|
-
function _toPrimitive$
|
|
24891
|
-
function _slicedToArray$
|
|
24892
|
-
function _nonIterableRest$
|
|
24893
|
-
function _unsupportedIterableToArray$
|
|
24894
|
-
function _arrayLikeToArray$
|
|
24895
|
-
function _iterableToArrayLimit$
|
|
24896
|
-
function _arrayWithHoles$
|
|
24871
|
+
function _arrayWithoutHoles$9(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$g(arr); }
|
|
24872
|
+
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; }
|
|
24873
|
+
function _objectSpread$l(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$l(Object(source), !0).forEach(function (key) { _defineProperty$n(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$l(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
24874
|
+
function _defineProperty$n(obj, key, value) { key = _toPropertyKey$m(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24875
|
+
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
24876
|
+
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); }
|
|
24877
|
+
function _slicedToArray$9(arr, i) { return _arrayWithHoles$9(arr) || _iterableToArrayLimit$9(arr, i) || _unsupportedIterableToArray$g(arr, i) || _nonIterableRest$9(); }
|
|
24878
|
+
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."); }
|
|
24879
|
+
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); }
|
|
24880
|
+
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; }
|
|
24881
|
+
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; } }
|
|
24882
|
+
function _arrayWithHoles$9(arr) { if (Array.isArray(arr)) return arr; }
|
|
24897
24883
|
var alpha = function alpha(begin, end, k) {
|
|
24898
24884
|
return begin + (end - begin) * k;
|
|
24899
24885
|
};
|
|
@@ -24911,10 +24897,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24911
24897
|
var nextStepVals = mapObject(function (key, val) {
|
|
24912
24898
|
if (needContinue(val)) {
|
|
24913
24899
|
var _easing = easing(val.from, val.to, val.velocity),
|
|
24914
|
-
_easing2 = _slicedToArray$
|
|
24900
|
+
_easing2 = _slicedToArray$9(_easing, 2),
|
|
24915
24901
|
newX = _easing2[0],
|
|
24916
24902
|
newV = _easing2[1];
|
|
24917
|
-
return _objectSpread$
|
|
24903
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24918
24904
|
from: newX,
|
|
24919
24905
|
velocity: newV
|
|
24920
24906
|
});
|
|
@@ -24924,7 +24910,7 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24924
24910
|
if (steps < 1) {
|
|
24925
24911
|
return mapObject(function (key, val) {
|
|
24926
24912
|
if (needContinue(val)) {
|
|
24927
|
-
return _objectSpread$
|
|
24913
|
+
return _objectSpread$l(_objectSpread$l({}, val), {}, {
|
|
24928
24914
|
velocity: alpha(val.velocity, nextStepVals[key].velocity, steps),
|
|
24929
24915
|
from: alpha(val.from, nextStepVals[key].from, steps)
|
|
24930
24916
|
});
|
|
@@ -24939,10 +24925,10 @@ var calStepperVals = function calStepperVals(easing, preVals, steps) {
|
|
|
24939
24925
|
var configUpdate = (function (from, to, easing, duration, render) {
|
|
24940
24926
|
var interKeys = getIntersectionKeys(from, to);
|
|
24941
24927
|
var timingStyle = interKeys.reduce(function (res, key) {
|
|
24942
|
-
return _objectSpread$
|
|
24928
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, [from[key], to[key]]));
|
|
24943
24929
|
}, {});
|
|
24944
24930
|
var stepperStyle = interKeys.reduce(function (res, key) {
|
|
24945
|
-
return _objectSpread$
|
|
24931
|
+
return _objectSpread$l(_objectSpread$l({}, res), {}, _defineProperty$n({}, key, {
|
|
24946
24932
|
from: from[key],
|
|
24947
24933
|
velocity: 0,
|
|
24948
24934
|
to: to[key]
|
|
@@ -24972,7 +24958,7 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24972
24958
|
var steps = deltaTime / easing.dt;
|
|
24973
24959
|
stepperStyle = calStepperVals(easing, stepperStyle, steps);
|
|
24974
24960
|
// get union set and add compatible prefix
|
|
24975
|
-
render(_objectSpread$
|
|
24961
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), getCurrStyle()));
|
|
24976
24962
|
preTime = now;
|
|
24977
24963
|
if (!shouldStopAnimation()) {
|
|
24978
24964
|
cafId = requestAnimationFrame(update);
|
|
@@ -24990,14 +24976,14 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
24990
24976
|
}, timingStyle);
|
|
24991
24977
|
|
|
24992
24978
|
// get union set and add compatible prefix
|
|
24993
|
-
render(_objectSpread$
|
|
24979
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), currStyle));
|
|
24994
24980
|
if (t < 1) {
|
|
24995
24981
|
cafId = requestAnimationFrame(update);
|
|
24996
24982
|
} else {
|
|
24997
24983
|
var finalStyle = mapObject(function (key, val) {
|
|
24998
24984
|
return alpha.apply(void 0, _toConsumableArray$9(val).concat([easing(1)]));
|
|
24999
24985
|
}, timingStyle);
|
|
25000
|
-
render(_objectSpread$
|
|
24986
|
+
render(_objectSpread$l(_objectSpread$l(_objectSpread$l({}, from), to), finalStyle));
|
|
25001
24987
|
}
|
|
25002
24988
|
};
|
|
25003
24989
|
update = easing.isStepper ? stepperUpdate : timingUpdate;
|
|
@@ -25013,37 +24999,37 @@ var configUpdate = (function (from, to, easing, duration, render) {
|
|
|
25013
24999
|
};
|
|
25014
25000
|
});
|
|
25015
25001
|
|
|
25016
|
-
function _typeof$
|
|
25017
|
-
var _excluded$
|
|
25018
|
-
function _objectWithoutProperties$
|
|
25019
|
-
function _objectWithoutPropertiesLoose$
|
|
25020
|
-
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$
|
|
25002
|
+
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); }
|
|
25003
|
+
var _excluded$8 = ["children", "begin", "duration", "attributeName", "easing", "isActive", "steps", "from", "to", "canBegin", "onAnimationEnd", "shouldReAnimate", "onAnimationReStart"];
|
|
25004
|
+
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; }
|
|
25005
|
+
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; }
|
|
25006
|
+
function _toConsumableArray$8(arr) { return _arrayWithoutHoles$8(arr) || _iterableToArray$8(arr) || _unsupportedIterableToArray$f(arr) || _nonIterableSpread$8(); }
|
|
25021
25007
|
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."); }
|
|
25022
|
-
function _unsupportedIterableToArray$
|
|
25008
|
+
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); }
|
|
25023
25009
|
function _iterableToArray$8(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
25024
|
-
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$
|
|
25025
|
-
function _arrayLikeToArray$
|
|
25026
|
-
function ownKeys$
|
|
25027
|
-
function _objectSpread$
|
|
25028
|
-
function _defineProperty$
|
|
25029
|
-
function _classCallCheck$
|
|
25030
|
-
function _defineProperties$
|
|
25031
|
-
function _createClass$
|
|
25032
|
-
function _toPropertyKey$
|
|
25033
|
-
function _toPrimitive$
|
|
25034
|
-
function _inherits$
|
|
25035
|
-
function _setPrototypeOf$
|
|
25036
|
-
function _createSuper$
|
|
25037
|
-
function _possibleConstructorReturn$
|
|
25038
|
-
function _assertThisInitialized$
|
|
25039
|
-
function _isNativeReflectConstruct$
|
|
25040
|
-
function _getPrototypeOf$
|
|
25010
|
+
function _arrayWithoutHoles$8(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$f(arr); }
|
|
25011
|
+
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; }
|
|
25012
|
+
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; }
|
|
25013
|
+
function _objectSpread$k(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$k(Object(source), !0).forEach(function (key) { _defineProperty$m(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$k(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25014
|
+
function _defineProperty$m(obj, key, value) { key = _toPropertyKey$l(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25015
|
+
function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25016
|
+
function _defineProperties$8(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey$l(descriptor.key), descriptor); } }
|
|
25017
|
+
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; }
|
|
25018
|
+
function _toPropertyKey$l(arg) { var key = _toPrimitive$l(arg, "string"); return _typeof$l(key) === "symbol" ? key : String(key); }
|
|
25019
|
+
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); }
|
|
25020
|
+
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); }
|
|
25021
|
+
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); }
|
|
25022
|
+
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); }; }
|
|
25023
|
+
function _possibleConstructorReturn$6(self, call) { if (call && (_typeof$l(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized$6(self); }
|
|
25024
|
+
function _assertThisInitialized$6(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25025
|
+
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; } }
|
|
25026
|
+
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
25041
25027
|
var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
25042
|
-
_inherits$
|
|
25043
|
-
var _super = _createSuper$
|
|
25028
|
+
_inherits$6(Animate, _PureComponent);
|
|
25029
|
+
var _super = _createSuper$6(Animate);
|
|
25044
25030
|
function Animate(props, context) {
|
|
25045
25031
|
var _this;
|
|
25046
|
-
_classCallCheck$
|
|
25032
|
+
_classCallCheck$8(this, Animate);
|
|
25047
25033
|
_this = _super.call(this, props, context);
|
|
25048
25034
|
var _this$props = _this.props,
|
|
25049
25035
|
isActive = _this$props.isActive,
|
|
@@ -25053,8 +25039,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25053
25039
|
steps = _this$props.steps,
|
|
25054
25040
|
children = _this$props.children,
|
|
25055
25041
|
duration = _this$props.duration;
|
|
25056
|
-
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$
|
|
25057
|
-
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$
|
|
25042
|
+
_this.handleStyleChange = _this.handleStyleChange.bind(_assertThisInitialized$6(_this));
|
|
25043
|
+
_this.changeStyle = _this.changeStyle.bind(_assertThisInitialized$6(_this));
|
|
25058
25044
|
if (!isActive || duration <= 0) {
|
|
25059
25045
|
_this.state = {
|
|
25060
25046
|
style: {}
|
|
@@ -25066,7 +25052,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25066
25052
|
style: to
|
|
25067
25053
|
};
|
|
25068
25054
|
}
|
|
25069
|
-
return _possibleConstructorReturn$
|
|
25055
|
+
return _possibleConstructorReturn$6(_this);
|
|
25070
25056
|
}
|
|
25071
25057
|
if (steps && steps.length) {
|
|
25072
25058
|
_this.state = {
|
|
@@ -25077,10 +25063,10 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25077
25063
|
_this.state = {
|
|
25078
25064
|
style: from
|
|
25079
25065
|
};
|
|
25080
|
-
return _possibleConstructorReturn$
|
|
25066
|
+
return _possibleConstructorReturn$6(_this);
|
|
25081
25067
|
}
|
|
25082
25068
|
_this.state = {
|
|
25083
|
-
style: attributeName ? _defineProperty$
|
|
25069
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25084
25070
|
};
|
|
25085
25071
|
} else {
|
|
25086
25072
|
_this.state = {
|
|
@@ -25089,7 +25075,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25089
25075
|
}
|
|
25090
25076
|
return _this;
|
|
25091
25077
|
}
|
|
25092
|
-
_createClass$
|
|
25078
|
+
_createClass$8(Animate, [{
|
|
25093
25079
|
key: "componentDidMount",
|
|
25094
25080
|
value: function componentDidMount() {
|
|
25095
25081
|
var _this$props2 = this.props,
|
|
@@ -25117,7 +25103,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25117
25103
|
}
|
|
25118
25104
|
if (!isActive) {
|
|
25119
25105
|
var newState = {
|
|
25120
|
-
style: attributeName ? _defineProperty$
|
|
25106
|
+
style: attributeName ? _defineProperty$m({}, attributeName, to) : to
|
|
25121
25107
|
};
|
|
25122
25108
|
if (this.state && style) {
|
|
25123
25109
|
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
|
@@ -25140,14 +25126,14 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25140
25126
|
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
|
25141
25127
|
if (this.state && style) {
|
|
25142
25128
|
var _newState = {
|
|
25143
|
-
style: attributeName ? _defineProperty$
|
|
25129
|
+
style: attributeName ? _defineProperty$m({}, attributeName, from) : from
|
|
25144
25130
|
};
|
|
25145
25131
|
if (attributeName && [attributeName] !== from || !attributeName && style !== from) {
|
|
25146
25132
|
// eslint-disable-next-line react/no-did-update-set-state
|
|
25147
25133
|
this.setState(_newState);
|
|
25148
25134
|
}
|
|
25149
25135
|
}
|
|
25150
|
-
this.runAnimation(_objectSpread$
|
|
25136
|
+
this.runAnimation(_objectSpread$k(_objectSpread$k({}, this.props), {}, {
|
|
25151
25137
|
from: from,
|
|
25152
25138
|
begin: 0
|
|
25153
25139
|
}));
|
|
@@ -25230,7 +25216,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25230
25216
|
}), duration]);
|
|
25231
25217
|
}
|
|
25232
25218
|
var transition = getTransitionVal(properties, duration, easing);
|
|
25233
|
-
var newStyle = _objectSpread$
|
|
25219
|
+
var newStyle = _objectSpread$k(_objectSpread$k(_objectSpread$k({}, preItem.style), style), {}, {
|
|
25234
25220
|
transition: transition
|
|
25235
25221
|
});
|
|
25236
25222
|
return [].concat(_toConsumableArray$8(sequence), [newStyle, duration, onAnimationEnd]).filter(identity$9);
|
|
@@ -25262,9 +25248,9 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25262
25248
|
this.runStepAnimation(props);
|
|
25263
25249
|
return;
|
|
25264
25250
|
}
|
|
25265
|
-
var to = attributeName ? _defineProperty$
|
|
25251
|
+
var to = attributeName ? _defineProperty$m({}, attributeName, propsTo) : propsTo;
|
|
25266
25252
|
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
|
25267
|
-
manager.start([onAnimationStart, begin, _objectSpread$
|
|
25253
|
+
manager.start([onAnimationStart, begin, _objectSpread$k(_objectSpread$k({}, to), {}, {
|
|
25268
25254
|
transition: transition
|
|
25269
25255
|
}), duration, onAnimationEnd]);
|
|
25270
25256
|
}
|
|
@@ -25285,7 +25271,7 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25285
25271
|
_this$props4.onAnimationEnd;
|
|
25286
25272
|
_this$props4.shouldReAnimate;
|
|
25287
25273
|
_this$props4.onAnimationReStart;
|
|
25288
|
-
var others = _objectWithoutProperties$
|
|
25274
|
+
var others = _objectWithoutProperties$8(_this$props4, _excluded$8);
|
|
25289
25275
|
var count = React$3.Children.count(children);
|
|
25290
25276
|
// eslint-disable-next-line react/destructuring-assignment
|
|
25291
25277
|
var stateStyle = translateStyle(this.state.style);
|
|
@@ -25300,8 +25286,8 @@ var Animate = /*#__PURE__*/function (_PureComponent) {
|
|
|
25300
25286
|
_container$props$styl = _container$props.style,
|
|
25301
25287
|
style = _container$props$styl === void 0 ? {} : _container$props$styl,
|
|
25302
25288
|
className = _container$props.className;
|
|
25303
|
-
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$
|
|
25304
|
-
style: _objectSpread$
|
|
25289
|
+
var res = /*#__PURE__*/React$3.cloneElement(container, _objectSpread$k(_objectSpread$k({}, others), {}, {
|
|
25290
|
+
style: _objectSpread$k(_objectSpread$k({}, style), stateStyle),
|
|
25305
25291
|
className: className
|
|
25306
25292
|
}));
|
|
25307
25293
|
return res;
|
|
@@ -25826,10 +25812,10 @@ var defineProperty$2 = (function() {
|
|
|
25826
25812
|
} catch (e) {}
|
|
25827
25813
|
}());
|
|
25828
25814
|
|
|
25829
|
-
var _defineProperty$
|
|
25815
|
+
var _defineProperty$l = defineProperty$2;
|
|
25830
25816
|
|
|
25831
25817
|
var constant$1 = constant_1,
|
|
25832
|
-
defineProperty$1 = _defineProperty$
|
|
25818
|
+
defineProperty$1 = _defineProperty$l,
|
|
25833
25819
|
identity$7 = identity_1;
|
|
25834
25820
|
|
|
25835
25821
|
/**
|
|
@@ -26006,18 +25992,18 @@ var sortBy_1 = sortBy;
|
|
|
26006
25992
|
/**
|
|
26007
25993
|
* @fileOverview Default Tooltip Content
|
|
26008
25994
|
*/
|
|
26009
|
-
function _typeof$
|
|
26010
|
-
function _slicedToArray$
|
|
26011
|
-
function _nonIterableRest$
|
|
26012
|
-
function _unsupportedIterableToArray$
|
|
26013
|
-
function _arrayLikeToArray$
|
|
26014
|
-
function _iterableToArrayLimit$
|
|
26015
|
-
function _arrayWithHoles$
|
|
26016
|
-
function ownKeys$
|
|
26017
|
-
function _objectSpread$
|
|
26018
|
-
function _defineProperty$
|
|
26019
|
-
function _toPropertyKey$
|
|
26020
|
-
function _toPrimitive$
|
|
25995
|
+
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); }
|
|
25996
|
+
function _slicedToArray$8(arr, i) { return _arrayWithHoles$8(arr) || _iterableToArrayLimit$8(arr, i) || _unsupportedIterableToArray$e(arr, i) || _nonIterableRest$8(); }
|
|
25997
|
+
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."); }
|
|
25998
|
+
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); }
|
|
25999
|
+
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; }
|
|
26000
|
+
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; } }
|
|
26001
|
+
function _arrayWithHoles$8(arr) { if (Array.isArray(arr)) return arr; }
|
|
26002
|
+
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; }
|
|
26003
|
+
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; }
|
|
26004
|
+
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; }
|
|
26005
|
+
function _toPropertyKey$k(arg) { var key = _toPrimitive$k(arg, "string"); return _typeof$k(key) === "symbol" ? key : String(key); }
|
|
26006
|
+
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); }
|
|
26021
26007
|
function defaultFormatter(value) {
|
|
26022
26008
|
return isArray_1(value) && isNumOrStr(value[0]) && isNumOrStr(value[1]) ? value.join(' ~ ') : value;
|
|
26023
26009
|
}
|
|
@@ -26047,7 +26033,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26047
26033
|
if (entry.type === 'none') {
|
|
26048
26034
|
return null;
|
|
26049
26035
|
}
|
|
26050
|
-
var finalItemStyle = _objectSpread$
|
|
26036
|
+
var finalItemStyle = _objectSpread$j({
|
|
26051
26037
|
display: 'block',
|
|
26052
26038
|
paddingTop: 4,
|
|
26053
26039
|
paddingBottom: 4,
|
|
@@ -26061,7 +26047,7 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26061
26047
|
if (finalFormatter && finalValue != null && finalName != null) {
|
|
26062
26048
|
var formatted = finalFormatter(value, name, entry, i, payload);
|
|
26063
26049
|
if (Array.isArray(formatted)) {
|
|
26064
|
-
var _formatted = _slicedToArray$
|
|
26050
|
+
var _formatted = _slicedToArray$8(formatted, 2);
|
|
26065
26051
|
finalValue = _formatted[0];
|
|
26066
26052
|
finalName = _formatted[1];
|
|
26067
26053
|
} else {
|
|
@@ -26093,14 +26079,14 @@ var DefaultTooltipContent = function DefaultTooltipContent(props) {
|
|
|
26093
26079
|
}
|
|
26094
26080
|
return null;
|
|
26095
26081
|
};
|
|
26096
|
-
var finalStyle = _objectSpread$
|
|
26082
|
+
var finalStyle = _objectSpread$j({
|
|
26097
26083
|
margin: 0,
|
|
26098
26084
|
padding: 10,
|
|
26099
26085
|
backgroundColor: '#fff',
|
|
26100
26086
|
border: '1px solid #ccc',
|
|
26101
26087
|
whiteSpace: 'nowrap'
|
|
26102
26088
|
}, contentStyle);
|
|
26103
|
-
var finalLabelStyle = _objectSpread$
|
|
26089
|
+
var finalLabelStyle = _objectSpread$j({
|
|
26104
26090
|
margin: 0
|
|
26105
26091
|
}, labelStyle);
|
|
26106
26092
|
var hasLabel = !isNil_1(label);
|
|
@@ -26141,22 +26127,18 @@ var Global = {
|
|
|
26141
26127
|
}
|
|
26142
26128
|
};
|
|
26143
26129
|
|
|
26144
|
-
function _typeof$
|
|
26145
|
-
function ownKeys$
|
|
26146
|
-
function _objectSpread$
|
|
26147
|
-
function
|
|
26148
|
-
function
|
|
26149
|
-
function
|
|
26150
|
-
function
|
|
26151
|
-
function
|
|
26152
|
-
function
|
|
26153
|
-
function
|
|
26154
|
-
function
|
|
26155
|
-
function
|
|
26156
|
-
function _getPrototypeOf$6(o) { _getPrototypeOf$6 = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$6(o); }
|
|
26157
|
-
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; }
|
|
26158
|
-
function _toPropertyKey$m(arg) { var key = _toPrimitive$m(arg, "string"); return _typeof$m(key) === "symbol" ? key : String(key); }
|
|
26159
|
-
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); }
|
|
26130
|
+
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); }
|
|
26131
|
+
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; }
|
|
26132
|
+
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; }
|
|
26133
|
+
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; }
|
|
26134
|
+
function _toPropertyKey$j(arg) { var key = _toPrimitive$j(arg, "string"); return _typeof$j(key) === "symbol" ? key : String(key); }
|
|
26135
|
+
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); }
|
|
26136
|
+
function _slicedToArray$7(arr, i) { return _arrayWithHoles$7(arr) || _iterableToArrayLimit$7(arr, i) || _unsupportedIterableToArray$d(arr, i) || _nonIterableRest$7(); }
|
|
26137
|
+
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."); }
|
|
26138
|
+
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); }
|
|
26139
|
+
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; }
|
|
26140
|
+
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; } }
|
|
26141
|
+
function _arrayWithHoles$7(arr) { if (Array.isArray(arr)) return arr; }
|
|
26160
26142
|
var CLS_PREFIX = 'recharts-tooltip-wrapper';
|
|
26161
26143
|
var EPS$1 = 1;
|
|
26162
26144
|
function defaultUniqBy(entry) {
|
|
@@ -26180,204 +26162,7 @@ function renderContent(content, props) {
|
|
|
26180
26162
|
}
|
|
26181
26163
|
return /*#__PURE__*/React__default["default"].createElement(DefaultTooltipContent, props);
|
|
26182
26164
|
}
|
|
26183
|
-
var
|
|
26184
|
-
_inherits$6(Tooltip, _PureComponent);
|
|
26185
|
-
var _super = _createSuper$6(Tooltip);
|
|
26186
|
-
function Tooltip() {
|
|
26187
|
-
var _this;
|
|
26188
|
-
_classCallCheck$8(this, Tooltip);
|
|
26189
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
26190
|
-
args[_key] = arguments[_key];
|
|
26191
|
-
}
|
|
26192
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
26193
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "state", {
|
|
26194
|
-
boxWidth: -1,
|
|
26195
|
-
boxHeight: -1,
|
|
26196
|
-
dismissed: false,
|
|
26197
|
-
dismissedAtCoordinate: {
|
|
26198
|
-
x: 0,
|
|
26199
|
-
y: 0
|
|
26200
|
-
}
|
|
26201
|
-
});
|
|
26202
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "handleKeyDown", function (event) {
|
|
26203
|
-
if (event.key === 'Escape') {
|
|
26204
|
-
_this.setState({
|
|
26205
|
-
dismissed: true,
|
|
26206
|
-
dismissedAtCoordinate: _objectSpread$l(_objectSpread$l({}, _this.state.dismissedAtCoordinate), {}, {
|
|
26207
|
-
x: _this.props.coordinate.x,
|
|
26208
|
-
y: _this.props.coordinate.y
|
|
26209
|
-
})
|
|
26210
|
-
});
|
|
26211
|
-
}
|
|
26212
|
-
});
|
|
26213
|
-
_defineProperty$m(_assertThisInitialized$6(_this), "getTranslate", function (_ref) {
|
|
26214
|
-
var key = _ref.key,
|
|
26215
|
-
tooltipDimension = _ref.tooltipDimension,
|
|
26216
|
-
viewBoxDimension = _ref.viewBoxDimension;
|
|
26217
|
-
var _this$props = _this.props,
|
|
26218
|
-
allowEscapeViewBox = _this$props.allowEscapeViewBox,
|
|
26219
|
-
reverseDirection = _this$props.reverseDirection,
|
|
26220
|
-
coordinate = _this$props.coordinate,
|
|
26221
|
-
offset = _this$props.offset,
|
|
26222
|
-
position = _this$props.position,
|
|
26223
|
-
viewBox = _this$props.viewBox;
|
|
26224
|
-
if (position && isNumber(position[key])) {
|
|
26225
|
-
return position[key];
|
|
26226
|
-
}
|
|
26227
|
-
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26228
|
-
var positive = coordinate[key] + offset;
|
|
26229
|
-
if (allowEscapeViewBox[key]) {
|
|
26230
|
-
return reverseDirection[key] ? negative : positive;
|
|
26231
|
-
}
|
|
26232
|
-
if (reverseDirection[key]) {
|
|
26233
|
-
var _tooltipBoundary = negative;
|
|
26234
|
-
var _viewBoxBoundary = viewBox[key];
|
|
26235
|
-
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26236
|
-
return Math.max(positive, viewBox[key]);
|
|
26237
|
-
}
|
|
26238
|
-
return Math.max(negative, viewBox[key]);
|
|
26239
|
-
}
|
|
26240
|
-
var tooltipBoundary = positive + tooltipDimension;
|
|
26241
|
-
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26242
|
-
if (tooltipBoundary > viewBoxBoundary) {
|
|
26243
|
-
return Math.max(negative, viewBox[key]);
|
|
26244
|
-
}
|
|
26245
|
-
return Math.max(positive, viewBox[key]);
|
|
26246
|
-
});
|
|
26247
|
-
return _this;
|
|
26248
|
-
}
|
|
26249
|
-
_createClass$8(Tooltip, [{
|
|
26250
|
-
key: "componentDidMount",
|
|
26251
|
-
value: function componentDidMount() {
|
|
26252
|
-
this.updateBBox();
|
|
26253
|
-
}
|
|
26254
|
-
}, {
|
|
26255
|
-
key: "componentWillUnmount",
|
|
26256
|
-
value: function componentWillUnmount() {
|
|
26257
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26258
|
-
}
|
|
26259
|
-
}, {
|
|
26260
|
-
key: "componentDidUpdate",
|
|
26261
|
-
value: function componentDidUpdate() {
|
|
26262
|
-
this.updateBBox();
|
|
26263
|
-
}
|
|
26264
|
-
}, {
|
|
26265
|
-
key: "updateBBox",
|
|
26266
|
-
value: function updateBBox() {
|
|
26267
|
-
var _this$state = this.state,
|
|
26268
|
-
boxWidth = _this$state.boxWidth,
|
|
26269
|
-
boxHeight = _this$state.boxHeight,
|
|
26270
|
-
dismissed = _this$state.dismissed;
|
|
26271
|
-
if (dismissed) {
|
|
26272
|
-
document.removeEventListener('keydown', this.handleKeyDown);
|
|
26273
|
-
if (this.props.coordinate.x !== this.state.dismissedAtCoordinate.x || this.props.coordinate.y !== this.state.dismissedAtCoordinate.y) {
|
|
26274
|
-
this.setState({
|
|
26275
|
-
dismissed: false
|
|
26276
|
-
});
|
|
26277
|
-
}
|
|
26278
|
-
} else {
|
|
26279
|
-
document.addEventListener('keydown', this.handleKeyDown);
|
|
26280
|
-
}
|
|
26281
|
-
if (this.wrapperNode && this.wrapperNode.getBoundingClientRect) {
|
|
26282
|
-
var box = this.wrapperNode.getBoundingClientRect();
|
|
26283
|
-
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26284
|
-
this.setState({
|
|
26285
|
-
boxWidth: box.width,
|
|
26286
|
-
boxHeight: box.height
|
|
26287
|
-
});
|
|
26288
|
-
}
|
|
26289
|
-
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26290
|
-
this.setState({
|
|
26291
|
-
boxWidth: -1,
|
|
26292
|
-
boxHeight: -1
|
|
26293
|
-
});
|
|
26294
|
-
}
|
|
26295
|
-
}
|
|
26296
|
-
}, {
|
|
26297
|
-
key: "render",
|
|
26298
|
-
value: function render() {
|
|
26299
|
-
var _classNames,
|
|
26300
|
-
_this2 = this;
|
|
26301
|
-
var _this$props2 = this.props,
|
|
26302
|
-
payload = _this$props2.payload,
|
|
26303
|
-
isAnimationActive = _this$props2.isAnimationActive,
|
|
26304
|
-
animationDuration = _this$props2.animationDuration,
|
|
26305
|
-
animationEasing = _this$props2.animationEasing,
|
|
26306
|
-
filterNull = _this$props2.filterNull,
|
|
26307
|
-
payloadUniqBy = _this$props2.payloadUniqBy;
|
|
26308
|
-
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26309
|
-
return !isNil_1(entry.value);
|
|
26310
|
-
}) : payload);
|
|
26311
|
-
var hasPayload = finalPayload && finalPayload.length;
|
|
26312
|
-
var _this$props3 = this.props,
|
|
26313
|
-
content = _this$props3.content,
|
|
26314
|
-
viewBox = _this$props3.viewBox,
|
|
26315
|
-
coordinate = _this$props3.coordinate,
|
|
26316
|
-
position = _this$props3.position,
|
|
26317
|
-
active = _this$props3.active,
|
|
26318
|
-
wrapperStyle = _this$props3.wrapperStyle;
|
|
26319
|
-
var outerStyle = _objectSpread$l({
|
|
26320
|
-
pointerEvents: 'none',
|
|
26321
|
-
visibility: !this.state.dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26322
|
-
position: 'absolute',
|
|
26323
|
-
top: 0,
|
|
26324
|
-
left: 0
|
|
26325
|
-
}, wrapperStyle);
|
|
26326
|
-
var translateX, translateY;
|
|
26327
|
-
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26328
|
-
translateX = position.x;
|
|
26329
|
-
translateY = position.y;
|
|
26330
|
-
} else {
|
|
26331
|
-
var _this$state2 = this.state,
|
|
26332
|
-
boxWidth = _this$state2.boxWidth,
|
|
26333
|
-
boxHeight = _this$state2.boxHeight;
|
|
26334
|
-
if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26335
|
-
translateX = this.getTranslate({
|
|
26336
|
-
key: 'x',
|
|
26337
|
-
tooltipDimension: boxWidth,
|
|
26338
|
-
viewBoxDimension: viewBox.width
|
|
26339
|
-
});
|
|
26340
|
-
translateY = this.getTranslate({
|
|
26341
|
-
key: 'y',
|
|
26342
|
-
tooltipDimension: boxHeight,
|
|
26343
|
-
viewBoxDimension: viewBox.height
|
|
26344
|
-
});
|
|
26345
|
-
} else {
|
|
26346
|
-
outerStyle.visibility = 'hidden';
|
|
26347
|
-
}
|
|
26348
|
-
}
|
|
26349
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26350
|
-
transform: this.props.useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26351
|
-
})), outerStyle);
|
|
26352
|
-
if (isAnimationActive && active) {
|
|
26353
|
-
outerStyle = _objectSpread$l(_objectSpread$l({}, translateStyle({
|
|
26354
|
-
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26355
|
-
})), outerStyle);
|
|
26356
|
-
}
|
|
26357
|
-
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));
|
|
26358
|
-
return (
|
|
26359
|
-
/*#__PURE__*/
|
|
26360
|
-
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26361
|
-
// https://github.com/recharts/recharts/pull/2925
|
|
26362
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26363
|
-
React__default["default"].createElement("div", {
|
|
26364
|
-
tabIndex: -1,
|
|
26365
|
-
role: "dialog",
|
|
26366
|
-
className: cls,
|
|
26367
|
-
style: outerStyle,
|
|
26368
|
-
ref: function ref(node) {
|
|
26369
|
-
_this2.wrapperNode = node;
|
|
26370
|
-
}
|
|
26371
|
-
}, renderContent(content, _objectSpread$l(_objectSpread$l({}, this.props), {}, {
|
|
26372
|
-
payload: finalPayload
|
|
26373
|
-
})))
|
|
26374
|
-
);
|
|
26375
|
-
}
|
|
26376
|
-
}]);
|
|
26377
|
-
return Tooltip;
|
|
26378
|
-
}(React$3.PureComponent);
|
|
26379
|
-
_defineProperty$m(Tooltip$1, "displayName", 'Tooltip');
|
|
26380
|
-
_defineProperty$m(Tooltip$1, "defaultProps", {
|
|
26165
|
+
var tooltipDefaultProps = {
|
|
26381
26166
|
active: false,
|
|
26382
26167
|
allowEscapeViewBox: {
|
|
26383
26168
|
x: false,
|
|
@@ -26398,6 +26183,9 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26398
26183
|
x: 0,
|
|
26399
26184
|
y: 0
|
|
26400
26185
|
},
|
|
26186
|
+
// this doesn't exist on TooltipProps
|
|
26187
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
26188
|
+
// @ts-ignore
|
|
26401
26189
|
cursorStyle: {},
|
|
26402
26190
|
separator: ' : ',
|
|
26403
26191
|
wrapperStyle: {},
|
|
@@ -26411,7 +26199,173 @@ _defineProperty$m(Tooltip$1, "defaultProps", {
|
|
|
26411
26199
|
animationDuration: 400,
|
|
26412
26200
|
filterNull: true,
|
|
26413
26201
|
useTranslate3d: false
|
|
26414
|
-
}
|
|
26202
|
+
};
|
|
26203
|
+
var Tooltip$1 = function Tooltip(props) {
|
|
26204
|
+
var _classNames;
|
|
26205
|
+
var _useState = React$3.useState(-1),
|
|
26206
|
+
_useState2 = _slicedToArray$7(_useState, 2),
|
|
26207
|
+
boxWidth = _useState2[0],
|
|
26208
|
+
setBoxWidth = _useState2[1];
|
|
26209
|
+
var _useState3 = React$3.useState(-1),
|
|
26210
|
+
_useState4 = _slicedToArray$7(_useState3, 2),
|
|
26211
|
+
boxHeight = _useState4[0],
|
|
26212
|
+
setBoxHeight = _useState4[1];
|
|
26213
|
+
var _useState5 = React$3.useState(false),
|
|
26214
|
+
_useState6 = _slicedToArray$7(_useState5, 2),
|
|
26215
|
+
dismissed = _useState6[0],
|
|
26216
|
+
setDismissed = _useState6[1];
|
|
26217
|
+
var _useState7 = React$3.useState({
|
|
26218
|
+
x: 0,
|
|
26219
|
+
y: 0
|
|
26220
|
+
}),
|
|
26221
|
+
_useState8 = _slicedToArray$7(_useState7, 2),
|
|
26222
|
+
dismissedAtCoordinate = _useState8[0],
|
|
26223
|
+
setDismissedAtCoordinate = _useState8[1];
|
|
26224
|
+
var wrapperNode = React$3.useRef();
|
|
26225
|
+
var allowEscapeViewBox = props.allowEscapeViewBox,
|
|
26226
|
+
reverseDirection = props.reverseDirection,
|
|
26227
|
+
coordinate = props.coordinate,
|
|
26228
|
+
offset = props.offset,
|
|
26229
|
+
position = props.position,
|
|
26230
|
+
viewBox = props.viewBox;
|
|
26231
|
+
var handleKeyDown = React$3.useCallback(function (event) {
|
|
26232
|
+
if (event.key === 'Escape') {
|
|
26233
|
+
setDismissed(true);
|
|
26234
|
+
setDismissedAtCoordinate(function (prev) {
|
|
26235
|
+
return _objectSpread$i(_objectSpread$i({}, prev), {}, {
|
|
26236
|
+
x: coordinate === null || coordinate === void 0 ? void 0 : coordinate.x,
|
|
26237
|
+
y: coordinate === null || coordinate === void 0 ? void 0 : coordinate.y
|
|
26238
|
+
});
|
|
26239
|
+
});
|
|
26240
|
+
}
|
|
26241
|
+
}, [coordinate === null || coordinate === void 0 ? void 0 : coordinate.x, coordinate === null || coordinate === void 0 ? void 0 : coordinate.y]);
|
|
26242
|
+
React$3.useEffect(function () {
|
|
26243
|
+
var updateBBox = function updateBBox() {
|
|
26244
|
+
if (dismissed) {
|
|
26245
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26246
|
+
if ((coordinate === null || coordinate === void 0 ? void 0 : coordinate.x) !== dismissedAtCoordinate.x || (coordinate === null || coordinate === void 0 ? void 0 : coordinate.y) !== dismissedAtCoordinate.y) {
|
|
26247
|
+
setDismissed(false);
|
|
26248
|
+
}
|
|
26249
|
+
} else {
|
|
26250
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
26251
|
+
}
|
|
26252
|
+
if (wrapperNode.current && wrapperNode.current.getBoundingClientRect) {
|
|
26253
|
+
var box = wrapperNode.current.getBoundingClientRect();
|
|
26254
|
+
if (Math.abs(box.width - boxWidth) > EPS$1 || Math.abs(box.height - boxHeight) > EPS$1) {
|
|
26255
|
+
setBoxWidth(box.width);
|
|
26256
|
+
setBoxHeight(box.height);
|
|
26257
|
+
}
|
|
26258
|
+
} else if (boxWidth !== -1 || boxHeight !== -1) {
|
|
26259
|
+
setBoxWidth(-1);
|
|
26260
|
+
setBoxHeight(-1);
|
|
26261
|
+
}
|
|
26262
|
+
};
|
|
26263
|
+
updateBBox();
|
|
26264
|
+
return function () {
|
|
26265
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
26266
|
+
};
|
|
26267
|
+
}, [boxHeight, boxWidth, coordinate, dismissed, dismissedAtCoordinate.x, dismissedAtCoordinate.y, handleKeyDown]);
|
|
26268
|
+
var getTranslate = function getTranslate(_ref) {
|
|
26269
|
+
var key = _ref.key,
|
|
26270
|
+
tooltipDimension = _ref.tooltipDimension,
|
|
26271
|
+
viewBoxDimension = _ref.viewBoxDimension;
|
|
26272
|
+
if (position && isNumber(position[key])) {
|
|
26273
|
+
return position[key];
|
|
26274
|
+
}
|
|
26275
|
+
var negative = coordinate[key] - tooltipDimension - offset;
|
|
26276
|
+
var positive = coordinate[key] + offset;
|
|
26277
|
+
if (allowEscapeViewBox !== null && allowEscapeViewBox !== void 0 && allowEscapeViewBox[key]) {
|
|
26278
|
+
return reverseDirection[key] ? negative : positive;
|
|
26279
|
+
}
|
|
26280
|
+
if (reverseDirection !== null && reverseDirection !== void 0 && reverseDirection[key]) {
|
|
26281
|
+
var _tooltipBoundary = negative;
|
|
26282
|
+
var _viewBoxBoundary = viewBox[key];
|
|
26283
|
+
if (_tooltipBoundary < _viewBoxBoundary) {
|
|
26284
|
+
return Math.max(positive, viewBox[key]);
|
|
26285
|
+
}
|
|
26286
|
+
return Math.max(negative, viewBox[key]);
|
|
26287
|
+
}
|
|
26288
|
+
var tooltipBoundary = positive + tooltipDimension;
|
|
26289
|
+
var viewBoxBoundary = viewBox[key] + viewBoxDimension;
|
|
26290
|
+
if (tooltipBoundary > viewBoxBoundary) {
|
|
26291
|
+
return Math.max(negative, viewBox[key]);
|
|
26292
|
+
}
|
|
26293
|
+
return Math.max(positive, viewBox[key]);
|
|
26294
|
+
};
|
|
26295
|
+
var payload = props.payload,
|
|
26296
|
+
payloadUniqBy = props.payloadUniqBy,
|
|
26297
|
+
filterNull = props.filterNull,
|
|
26298
|
+
active = props.active,
|
|
26299
|
+
wrapperStyle = props.wrapperStyle,
|
|
26300
|
+
useTranslate3d = props.useTranslate3d,
|
|
26301
|
+
isAnimationActive = props.isAnimationActive,
|
|
26302
|
+
animationDuration = props.animationDuration,
|
|
26303
|
+
animationEasing = props.animationEasing;
|
|
26304
|
+
var finalPayload = getUniqPayload(payloadUniqBy, filterNull && payload && payload.length ? payload.filter(function (entry) {
|
|
26305
|
+
return !isNil_1(entry.value);
|
|
26306
|
+
}) : payload);
|
|
26307
|
+
var hasPayload = finalPayload && finalPayload.length;
|
|
26308
|
+
var content = props.content;
|
|
26309
|
+
var outerStyle = _objectSpread$i({
|
|
26310
|
+
pointerEvents: 'none',
|
|
26311
|
+
visibility: !dismissed && active && hasPayload ? 'visible' : 'hidden',
|
|
26312
|
+
position: 'absolute',
|
|
26313
|
+
top: 0,
|
|
26314
|
+
left: 0
|
|
26315
|
+
}, wrapperStyle);
|
|
26316
|
+
var translateX, translateY;
|
|
26317
|
+
if (position && isNumber(position.x) && isNumber(position.y)) {
|
|
26318
|
+
translateX = position.x;
|
|
26319
|
+
translateY = position.y;
|
|
26320
|
+
} else if (boxWidth > 0 && boxHeight > 0 && coordinate) {
|
|
26321
|
+
translateX = getTranslate({
|
|
26322
|
+
key: 'x',
|
|
26323
|
+
tooltipDimension: boxWidth,
|
|
26324
|
+
viewBoxDimension: viewBox.width
|
|
26325
|
+
});
|
|
26326
|
+
translateY = getTranslate({
|
|
26327
|
+
key: 'y',
|
|
26328
|
+
tooltipDimension: boxHeight,
|
|
26329
|
+
viewBoxDimension: viewBox.height
|
|
26330
|
+
});
|
|
26331
|
+
} else {
|
|
26332
|
+
outerStyle.visibility = 'hidden';
|
|
26333
|
+
}
|
|
26334
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26335
|
+
transform: useTranslate3d ? "translate3d(".concat(translateX, "px, ").concat(translateY, "px, 0)") : "translate(".concat(translateX, "px, ").concat(translateY, "px)")
|
|
26336
|
+
})), outerStyle);
|
|
26337
|
+
if (isAnimationActive && active) {
|
|
26338
|
+
outerStyle = _objectSpread$i(_objectSpread$i({}, translateStyle({
|
|
26339
|
+
transition: "transform ".concat(animationDuration, "ms ").concat(animationEasing)
|
|
26340
|
+
})), outerStyle);
|
|
26341
|
+
}
|
|
26342
|
+
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));
|
|
26343
|
+
return (
|
|
26344
|
+
/*#__PURE__*/
|
|
26345
|
+
// ESLint is disabled to allow listening to the `Escape` key. Refer to
|
|
26346
|
+
// https://github.com/recharts/recharts/pull/2925
|
|
26347
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
26348
|
+
React__default["default"].createElement("div", {
|
|
26349
|
+
tabIndex: -1,
|
|
26350
|
+
role: "dialog",
|
|
26351
|
+
className: cls,
|
|
26352
|
+
style: outerStyle,
|
|
26353
|
+
ref: wrapperNode
|
|
26354
|
+
}, renderContent(content, _objectSpread$i(_objectSpread$i({}, props), {}, {
|
|
26355
|
+
payload: finalPayload
|
|
26356
|
+
})))
|
|
26357
|
+
);
|
|
26358
|
+
};
|
|
26359
|
+
|
|
26360
|
+
// needs to be set so that renderByOrder can find the correct handler function
|
|
26361
|
+
Tooltip$1.displayName = 'Tooltip';
|
|
26362
|
+
|
|
26363
|
+
/**
|
|
26364
|
+
* needs to be set so that renderByOrder can access an have default values for
|
|
26365
|
+
* children.props when there are no props set by the consumer
|
|
26366
|
+
* doesn't work if using default parameters
|
|
26367
|
+
*/
|
|
26368
|
+
Tooltip$1.defaultProps = tooltipDefaultProps;
|
|
26415
26369
|
|
|
26416
26370
|
var root = _root;
|
|
26417
26371
|
|
|
@@ -31981,12 +31935,12 @@ module.exports = exports['default'];
|
|
|
31981
31935
|
|
|
31982
31936
|
var reduceCSSCalc = /*@__PURE__*/getDefaultExportFromCjs(dist.exports);
|
|
31983
31937
|
|
|
31984
|
-
function _typeof$
|
|
31985
|
-
function ownKeys$
|
|
31986
|
-
function _objectSpread$
|
|
31987
|
-
function _defineProperty$
|
|
31988
|
-
function _toPropertyKey$
|
|
31989
|
-
function _toPrimitive$
|
|
31938
|
+
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); }
|
|
31939
|
+
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; }
|
|
31940
|
+
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; }
|
|
31941
|
+
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; }
|
|
31942
|
+
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
31943
|
+
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); }
|
|
31990
31944
|
function _toConsumableArray$7(arr) { return _arrayWithoutHoles$7(arr) || _iterableToArray$7(arr) || _unsupportedIterableToArray$b(arr) || _nonIterableSpread$7(); }
|
|
31991
31945
|
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."); }
|
|
31992
31946
|
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); }
|
|
@@ -32054,7 +32008,7 @@ var getStringSize = function getStringSize(text) {
|
|
|
32054
32008
|
}
|
|
32055
32009
|
// Need to use CSS Object Model (CSSOM) to be able to comply with Content Security Policy (CSP)
|
|
32056
32010
|
// https://en.wikipedia.org/wiki/Content_Security_Policy
|
|
32057
|
-
var measurementSpanStyle = _objectSpread$
|
|
32011
|
+
var measurementSpanStyle = _objectSpread$h(_objectSpread$h({}, SPAN_STYLE), style);
|
|
32058
32012
|
Object.keys(measurementSpanStyle).map(function (styleKey) {
|
|
32059
32013
|
measurementSpan.style[styleKey] = measurementSpanStyle[styleKey];
|
|
32060
32014
|
return styleKey;
|
|
@@ -32109,11 +32063,10 @@ var calculateChartCoordinate = function calculateChartCoordinate(event, offset)
|
|
|
32109
32063
|
};
|
|
32110
32064
|
};
|
|
32111
32065
|
|
|
32112
|
-
var _excluded$
|
|
32113
|
-
_excluded2$3 = ["dx", "dy", "angle", "className", "breakAll"];
|
|
32066
|
+
var _excluded$7 = ["dx", "dy", "textAnchor", "verticalAnchor", "scaleToFit", "angle", "lineHeight", "capHeight", "className", "breakAll"];
|
|
32114
32067
|
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); }
|
|
32115
|
-
function _objectWithoutProperties$
|
|
32116
|
-
function _objectWithoutPropertiesLoose$
|
|
32068
|
+
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; }
|
|
32069
|
+
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; }
|
|
32117
32070
|
function _slicedToArray$5(arr, i) { return _arrayWithHoles$5(arr) || _iterableToArrayLimit$5(arr, i) || _unsupportedIterableToArray$a(arr, i) || _nonIterableRest$5(); }
|
|
32118
32071
|
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."); }
|
|
32119
32072
|
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); }
|
|
@@ -32267,46 +32220,45 @@ var getWordsByLines = function getWordsByLines(_ref4) {
|
|
|
32267
32220
|
}
|
|
32268
32221
|
return getWordsWithoutCalculate(children);
|
|
32269
32222
|
};
|
|
32270
|
-
var
|
|
32271
|
-
|
|
32272
|
-
|
|
32273
|
-
|
|
32274
|
-
|
|
32275
|
-
|
|
32276
|
-
|
|
32277
|
-
|
|
32278
|
-
|
|
32279
|
-
|
|
32280
|
-
|
|
32281
|
-
|
|
32282
|
-
|
|
32283
|
-
textAnchor = _ref5$textAnchor === void 0 ? 'start' : _ref5$textAnchor,
|
|
32284
|
-
_ref5$verticalAnchor = _ref5.verticalAnchor,
|
|
32285
|
-
verticalAnchor = _ref5$verticalAnchor === void 0 ? 'end' : _ref5$verticalAnchor,
|
|
32286
|
-
_ref5$fill = _ref5.fill,
|
|
32287
|
-
fill = _ref5$fill === void 0 ? DEFAULT_FILL : _ref5$fill,
|
|
32288
|
-
props = _objectWithoutProperties$9(_ref5, _excluded$9);
|
|
32223
|
+
var textDefaultProps = {
|
|
32224
|
+
x: 0,
|
|
32225
|
+
y: 0,
|
|
32226
|
+
lineHeight: '1em',
|
|
32227
|
+
capHeight: '0.71em',
|
|
32228
|
+
// Magic number from d3
|
|
32229
|
+
scaleToFit: false,
|
|
32230
|
+
textAnchor: 'start',
|
|
32231
|
+
verticalAnchor: 'end',
|
|
32232
|
+
// Maintain compat with existing charts / default SVG behavior
|
|
32233
|
+
fill: '#808080'
|
|
32234
|
+
};
|
|
32235
|
+
var Text = function Text(props) {
|
|
32289
32236
|
var wordsByLines = React$3.useMemo(function () {
|
|
32290
32237
|
return getWordsByLines({
|
|
32291
32238
|
breakAll: props.breakAll,
|
|
32292
32239
|
children: props.children,
|
|
32293
32240
|
maxLines: props.maxLines,
|
|
32294
|
-
scaleToFit: scaleToFit,
|
|
32241
|
+
scaleToFit: props.scaleToFit,
|
|
32295
32242
|
style: props.style,
|
|
32296
32243
|
width: props.width
|
|
32297
32244
|
});
|
|
32298
|
-
}, [props.breakAll, props.children, props.maxLines, scaleToFit, props.style, props.width]);
|
|
32245
|
+
}, [props.breakAll, props.children, props.maxLines, props.scaleToFit, props.style, props.width]);
|
|
32299
32246
|
var dx = props.dx,
|
|
32300
32247
|
dy = props.dy,
|
|
32248
|
+
textAnchor = props.textAnchor,
|
|
32249
|
+
verticalAnchor = props.verticalAnchor,
|
|
32250
|
+
scaleToFit = props.scaleToFit,
|
|
32301
32251
|
angle = props.angle,
|
|
32252
|
+
lineHeight = props.lineHeight,
|
|
32253
|
+
capHeight = props.capHeight,
|
|
32302
32254
|
className = props.className,
|
|
32303
32255
|
breakAll = props.breakAll,
|
|
32304
|
-
textProps = _objectWithoutProperties$
|
|
32305
|
-
if (!isNumOrStr(
|
|
32256
|
+
textProps = _objectWithoutProperties$7(props, _excluded$7);
|
|
32257
|
+
if (!isNumOrStr(textProps.x) || !isNumOrStr(textProps.y)) {
|
|
32306
32258
|
return null;
|
|
32307
32259
|
}
|
|
32308
|
-
var x =
|
|
32309
|
-
var y =
|
|
32260
|
+
var x = textProps.x + (isNumber(dx) ? dx : 0);
|
|
32261
|
+
var y = textProps.y + (isNumber(dy) ? dy : 0);
|
|
32310
32262
|
var startDy;
|
|
32311
32263
|
switch (verticalAnchor) {
|
|
32312
32264
|
case 'start':
|
|
@@ -32336,7 +32288,7 @@ var Text = function Text(_ref5) {
|
|
|
32336
32288
|
y: y,
|
|
32337
32289
|
className: classNames('recharts-text', className),
|
|
32338
32290
|
textAnchor: textAnchor,
|
|
32339
|
-
fill: fill.includes('url') ?
|
|
32291
|
+
fill: textProps.fill.includes('url') ? textDefaultProps.fill : textProps.fill
|
|
32340
32292
|
}), wordsByLines.map(function (line, index) {
|
|
32341
32293
|
return (
|
|
32342
32294
|
/*#__PURE__*/
|
|
@@ -32349,6 +32301,7 @@ var Text = function Text(_ref5) {
|
|
|
32349
32301
|
);
|
|
32350
32302
|
}));
|
|
32351
32303
|
};
|
|
32304
|
+
Text.defaultProps = textDefaultProps;
|
|
32352
32305
|
|
|
32353
32306
|
var baseIsEqual = _baseIsEqual;
|
|
32354
32307
|
|
|
@@ -38616,7 +38569,7 @@ function getTickValuesFixedDomainFn(_ref7, tickCount) {
|
|
|
38616
38569
|
var getNiceTickValues = memoize(getNiceTickValuesFn);
|
|
38617
38570
|
var getTickValuesFixedDomain = memoize(getTickValuesFixedDomainFn);
|
|
38618
38571
|
|
|
38619
|
-
var _excluded$
|
|
38572
|
+
var _excluded$6 = ["offset", "layout", "width", "dataKey", "data", "dataPointFormatter", "xAxis", "yAxis"];
|
|
38620
38573
|
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); }
|
|
38621
38574
|
function _slicedToArray$3(arr, i) { return _arrayWithHoles$3(arr) || _iterableToArrayLimit$3(arr, i) || _unsupportedIterableToArray$7(arr, i) || _nonIterableRest$3(); }
|
|
38622
38575
|
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."); }
|
|
@@ -38624,8 +38577,8 @@ function _unsupportedIterableToArray$7(o, minLen) { if (!o) return; if (typeof o
|
|
|
38624
38577
|
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; }
|
|
38625
38578
|
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; } }
|
|
38626
38579
|
function _arrayWithHoles$3(arr) { if (Array.isArray(arr)) return arr; }
|
|
38627
|
-
function _objectWithoutProperties$
|
|
38628
|
-
function _objectWithoutPropertiesLoose$
|
|
38580
|
+
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; }
|
|
38581
|
+
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; }
|
|
38629
38582
|
function ErrorBar(props) {
|
|
38630
38583
|
var offset = props.offset,
|
|
38631
38584
|
layout = props.layout,
|
|
@@ -38635,7 +38588,7 @@ function ErrorBar(props) {
|
|
|
38635
38588
|
dataPointFormatter = props.dataPointFormatter,
|
|
38636
38589
|
xAxis = props.xAxis,
|
|
38637
38590
|
yAxis = props.yAxis,
|
|
38638
|
-
others = _objectWithoutProperties$
|
|
38591
|
+
others = _objectWithoutProperties$6(props, _excluded$6);
|
|
38639
38592
|
var svgProps = filterProps(others);
|
|
38640
38593
|
var errorBars = data.map(function (entry, i) {
|
|
38641
38594
|
var _dataPointFormatter = dataPointFormatter(entry, dataKey),
|
|
@@ -38746,18 +38699,18 @@ ErrorBar.defaultProps = {
|
|
|
38746
38699
|
};
|
|
38747
38700
|
ErrorBar.displayName = 'ErrorBar';
|
|
38748
38701
|
|
|
38749
|
-
function _typeof$
|
|
38702
|
+
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); }
|
|
38750
38703
|
function _toConsumableArray$4(arr) { return _arrayWithoutHoles$4(arr) || _iterableToArray$4(arr) || _unsupportedIterableToArray$6(arr) || _nonIterableSpread$4(); }
|
|
38751
38704
|
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."); }
|
|
38752
38705
|
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); }
|
|
38753
38706
|
function _iterableToArray$4(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
38754
38707
|
function _arrayWithoutHoles$4(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$6(arr); }
|
|
38755
38708
|
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; }
|
|
38756
|
-
function ownKeys$
|
|
38757
|
-
function _objectSpread$
|
|
38758
|
-
function _defineProperty$
|
|
38759
|
-
function _toPropertyKey$
|
|
38760
|
-
function _toPrimitive$
|
|
38709
|
+
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; }
|
|
38710
|
+
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; }
|
|
38711
|
+
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; }
|
|
38712
|
+
function _toPropertyKey$h(arg) { var key = _toPrimitive$h(arg, "string"); return _typeof$h(key) === "symbol" ? key : String(key); }
|
|
38713
|
+
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); }
|
|
38761
38714
|
// TODO: Cause of circular dependency. Needs refactor.
|
|
38762
38715
|
// import { RadiusAxisProps, AngleAxisProps } from '../polar/types';
|
|
38763
38716
|
function getValueByDataKey(obj, dataKey, defaultValue) {
|
|
@@ -38928,7 +38881,7 @@ var getLegendProps = function getLegendProps(_ref2) {
|
|
|
38928
38881
|
};
|
|
38929
38882
|
});
|
|
38930
38883
|
}
|
|
38931
|
-
return _objectSpread$
|
|
38884
|
+
return _objectSpread$g(_objectSpread$g(_objectSpread$g({}, legendItem.props), Legend.getWithHeight(legendItem, legendWidth)), {}, {
|
|
38932
38885
|
payload: legendData,
|
|
38933
38886
|
item: legendItem
|
|
38934
38887
|
});
|
|
@@ -39082,10 +39035,10 @@ var appendOffsetOfLegend = function appendOffsetOfLegend(offset, items, props, l
|
|
|
39082
39035
|
verticalAlign = legendProps.verticalAlign,
|
|
39083
39036
|
layout = legendProps.layout;
|
|
39084
39037
|
if ((layout === 'vertical' || layout === 'horizontal' && verticalAlign === 'middle') && isNumber(offset[align])) {
|
|
39085
|
-
newOffset = _objectSpread$
|
|
39038
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, align, newOffset[align] + (box.width || 0)));
|
|
39086
39039
|
}
|
|
39087
39040
|
if ((layout === 'horizontal' || layout === 'vertical' && align === 'center') && isNumber(offset[verticalAlign])) {
|
|
39088
|
-
newOffset = _objectSpread$
|
|
39041
|
+
newOffset = _objectSpread$g(_objectSpread$g({}, offset), {}, _defineProperty$h({}, verticalAlign, newOffset[verticalAlign] + (box.height || 0)));
|
|
39089
39042
|
}
|
|
39090
39043
|
}
|
|
39091
39044
|
return newOffset;
|
|
@@ -39511,14 +39464,14 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39511
39464
|
items: [item]
|
|
39512
39465
|
};
|
|
39513
39466
|
}
|
|
39514
|
-
return _objectSpread$
|
|
39467
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, parentGroup));
|
|
39515
39468
|
}, {});
|
|
39516
39469
|
return Object.keys(stackGroups).reduce(function (result, axisId) {
|
|
39517
39470
|
var group = stackGroups[axisId];
|
|
39518
39471
|
if (group.hasStack) {
|
|
39519
39472
|
group.stackGroups = Object.keys(group.stackGroups).reduce(function (res, stackId) {
|
|
39520
39473
|
var g = group.stackGroups[stackId];
|
|
39521
|
-
return _objectSpread$
|
|
39474
|
+
return _objectSpread$g(_objectSpread$g({}, res), {}, _defineProperty$h({}, stackId, {
|
|
39522
39475
|
numericAxisId: numericAxisId,
|
|
39523
39476
|
cateAxisId: cateAxisId,
|
|
39524
39477
|
items: g.items,
|
|
@@ -39526,7 +39479,7 @@ var getStackGroupsByAxisId = function getStackGroupsByAxisId(data, _items, numer
|
|
|
39526
39479
|
}));
|
|
39527
39480
|
}, {});
|
|
39528
39481
|
}
|
|
39529
|
-
return _objectSpread$
|
|
39482
|
+
return _objectSpread$g(_objectSpread$g({}, result), {}, _defineProperty$h({}, axisId, group));
|
|
39530
39483
|
}, {});
|
|
39531
39484
|
};
|
|
39532
39485
|
|
|
@@ -39740,7 +39693,7 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39740
39693
|
formatter = _graphicalItem$props.formatter,
|
|
39741
39694
|
tooltipType = _graphicalItem$props.tooltipType,
|
|
39742
39695
|
chartType = _graphicalItem$props.chartType;
|
|
39743
|
-
return _objectSpread$
|
|
39696
|
+
return _objectSpread$g(_objectSpread$g({}, filterProps(graphicalItem)), {}, {
|
|
39744
39697
|
dataKey: dataKey,
|
|
39745
39698
|
unit: unit,
|
|
39746
39699
|
formatter: formatter,
|
|
@@ -39753,12 +39706,12 @@ var getTooltipItem = function getTooltipItem(graphicalItem, payload) {
|
|
|
39753
39706
|
});
|
|
39754
39707
|
};
|
|
39755
39708
|
|
|
39756
|
-
function _typeof$
|
|
39757
|
-
function ownKeys$
|
|
39758
|
-
function _objectSpread$
|
|
39759
|
-
function _defineProperty$
|
|
39760
|
-
function _toPropertyKey$
|
|
39761
|
-
function _toPrimitive$
|
|
39709
|
+
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); }
|
|
39710
|
+
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; }
|
|
39711
|
+
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; }
|
|
39712
|
+
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; }
|
|
39713
|
+
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
39714
|
+
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); }
|
|
39762
39715
|
var RADIAN = Math.PI / 180;
|
|
39763
39716
|
var radianToDegree = function radianToDegree(angleInRadian) {
|
|
39764
39717
|
return angleInRadian * 180 / Math.PI;
|
|
@@ -39863,7 +39816,7 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39863
39816
|
inRange = formatAngle >= endAngle && formatAngle <= startAngle;
|
|
39864
39817
|
}
|
|
39865
39818
|
if (inRange) {
|
|
39866
|
-
return _objectSpread$
|
|
39819
|
+
return _objectSpread$f(_objectSpread$f({}, sector), {}, {
|
|
39867
39820
|
radius: radius,
|
|
39868
39821
|
angle: reverseFormatAngleOfSetor(formatAngle, sector)
|
|
39869
39822
|
});
|
|
@@ -39871,21 +39824,18 @@ var inRangeOfSector = function inRangeOfSector(_ref5, sector) {
|
|
|
39871
39824
|
return null;
|
|
39872
39825
|
};
|
|
39873
39826
|
|
|
39874
|
-
function _typeof$
|
|
39875
|
-
var _excluded$7 = ["offset"];
|
|
39827
|
+
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); }
|
|
39876
39828
|
function _toConsumableArray$3(arr) { return _arrayWithoutHoles$3(arr) || _iterableToArray$3(arr) || _unsupportedIterableToArray$5(arr) || _nonIterableSpread$3(); }
|
|
39877
39829
|
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."); }
|
|
39878
39830
|
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); }
|
|
39879
39831
|
function _iterableToArray$3(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
39880
39832
|
function _arrayWithoutHoles$3(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$5(arr); }
|
|
39881
39833
|
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; }
|
|
39882
|
-
function
|
|
39883
|
-
function
|
|
39884
|
-
function
|
|
39885
|
-
function
|
|
39886
|
-
function
|
|
39887
|
-
function _toPropertyKey$i(arg) { var key = _toPrimitive$i(arg, "string"); return _typeof$i(key) === "symbol" ? key : String(key); }
|
|
39888
|
-
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); }
|
|
39834
|
+
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; }
|
|
39835
|
+
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; }
|
|
39836
|
+
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; }
|
|
39837
|
+
function _toPropertyKey$f(arg) { var key = _toPrimitive$f(arg, "string"); return _typeof$f(key) === "symbol" ? key : String(key); }
|
|
39838
|
+
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); }
|
|
39889
39839
|
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); }
|
|
39890
39840
|
var getLabel = function getLabel(props) {
|
|
39891
39841
|
var value = props.value,
|
|
@@ -40030,7 +39980,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40030
39980
|
textAnchor: 'middle',
|
|
40031
39981
|
verticalAnchor: verticalEnd
|
|
40032
39982
|
};
|
|
40033
|
-
return _objectSpread$
|
|
39983
|
+
return _objectSpread$e(_objectSpread$e({}, attrs), parentViewBox ? {
|
|
40034
39984
|
height: Math.max(y - parentViewBox.y, 0),
|
|
40035
39985
|
width: width
|
|
40036
39986
|
} : {});
|
|
@@ -40042,7 +39992,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40042
39992
|
textAnchor: 'middle',
|
|
40043
39993
|
verticalAnchor: verticalStart
|
|
40044
39994
|
};
|
|
40045
|
-
return _objectSpread$
|
|
39995
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs), parentViewBox ? {
|
|
40046
39996
|
height: Math.max(parentViewBox.y + parentViewBox.height - (y + height), 0),
|
|
40047
39997
|
width: width
|
|
40048
39998
|
} : {});
|
|
@@ -40054,7 +40004,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40054
40004
|
textAnchor: horizontalEnd,
|
|
40055
40005
|
verticalAnchor: 'middle'
|
|
40056
40006
|
};
|
|
40057
|
-
return _objectSpread$
|
|
40007
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs2), parentViewBox ? {
|
|
40058
40008
|
width: Math.max(_attrs2.x - parentViewBox.x, 0),
|
|
40059
40009
|
height: height
|
|
40060
40010
|
} : {});
|
|
@@ -40066,7 +40016,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40066
40016
|
textAnchor: horizontalStart,
|
|
40067
40017
|
verticalAnchor: 'middle'
|
|
40068
40018
|
};
|
|
40069
|
-
return _objectSpread$
|
|
40019
|
+
return _objectSpread$e(_objectSpread$e({}, _attrs3), parentViewBox ? {
|
|
40070
40020
|
width: Math.max(parentViewBox.x + parentViewBox.width - _attrs3.x, 0),
|
|
40071
40021
|
height: height
|
|
40072
40022
|
} : {});
|
|
@@ -40076,7 +40026,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40076
40026
|
height: height
|
|
40077
40027
|
} : {};
|
|
40078
40028
|
if (position === 'insideLeft') {
|
|
40079
|
-
return _objectSpread$
|
|
40029
|
+
return _objectSpread$e({
|
|
40080
40030
|
x: x + horizontalOffset,
|
|
40081
40031
|
y: y + height / 2,
|
|
40082
40032
|
textAnchor: horizontalStart,
|
|
@@ -40084,7 +40034,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40084
40034
|
}, sizeAttrs);
|
|
40085
40035
|
}
|
|
40086
40036
|
if (position === 'insideRight') {
|
|
40087
|
-
return _objectSpread$
|
|
40037
|
+
return _objectSpread$e({
|
|
40088
40038
|
x: x + width - horizontalOffset,
|
|
40089
40039
|
y: y + height / 2,
|
|
40090
40040
|
textAnchor: horizontalEnd,
|
|
@@ -40092,7 +40042,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40092
40042
|
}, sizeAttrs);
|
|
40093
40043
|
}
|
|
40094
40044
|
if (position === 'insideTop') {
|
|
40095
|
-
return _objectSpread$
|
|
40045
|
+
return _objectSpread$e({
|
|
40096
40046
|
x: x + width / 2,
|
|
40097
40047
|
y: y + verticalOffset,
|
|
40098
40048
|
textAnchor: 'middle',
|
|
@@ -40100,7 +40050,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40100
40050
|
}, sizeAttrs);
|
|
40101
40051
|
}
|
|
40102
40052
|
if (position === 'insideBottom') {
|
|
40103
|
-
return _objectSpread$
|
|
40053
|
+
return _objectSpread$e({
|
|
40104
40054
|
x: x + width / 2,
|
|
40105
40055
|
y: y + height - verticalOffset,
|
|
40106
40056
|
textAnchor: 'middle',
|
|
@@ -40108,7 +40058,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40108
40058
|
}, sizeAttrs);
|
|
40109
40059
|
}
|
|
40110
40060
|
if (position === 'insideTopLeft') {
|
|
40111
|
-
return _objectSpread$
|
|
40061
|
+
return _objectSpread$e({
|
|
40112
40062
|
x: x + horizontalOffset,
|
|
40113
40063
|
y: y + verticalOffset,
|
|
40114
40064
|
textAnchor: horizontalStart,
|
|
@@ -40116,7 +40066,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40116
40066
|
}, sizeAttrs);
|
|
40117
40067
|
}
|
|
40118
40068
|
if (position === 'insideTopRight') {
|
|
40119
|
-
return _objectSpread$
|
|
40069
|
+
return _objectSpread$e({
|
|
40120
40070
|
x: x + width - horizontalOffset,
|
|
40121
40071
|
y: y + verticalOffset,
|
|
40122
40072
|
textAnchor: horizontalEnd,
|
|
@@ -40124,7 +40074,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40124
40074
|
}, sizeAttrs);
|
|
40125
40075
|
}
|
|
40126
40076
|
if (position === 'insideBottomLeft') {
|
|
40127
|
-
return _objectSpread$
|
|
40077
|
+
return _objectSpread$e({
|
|
40128
40078
|
x: x + horizontalOffset,
|
|
40129
40079
|
y: y + height - verticalOffset,
|
|
40130
40080
|
textAnchor: horizontalStart,
|
|
@@ -40132,7 +40082,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40132
40082
|
}, sizeAttrs);
|
|
40133
40083
|
}
|
|
40134
40084
|
if (position === 'insideBottomRight') {
|
|
40135
|
-
return _objectSpread$
|
|
40085
|
+
return _objectSpread$e({
|
|
40136
40086
|
x: x + width - horizontalOffset,
|
|
40137
40087
|
y: y + height - verticalOffset,
|
|
40138
40088
|
textAnchor: horizontalEnd,
|
|
@@ -40140,14 +40090,14 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40140
40090
|
}, sizeAttrs);
|
|
40141
40091
|
}
|
|
40142
40092
|
if (isObject_1(position) && (isNumber(position.x) || isPercent(position.x)) && (isNumber(position.y) || isPercent(position.y))) {
|
|
40143
|
-
return _objectSpread$
|
|
40093
|
+
return _objectSpread$e({
|
|
40144
40094
|
x: x + getPercentValue(position.x, width),
|
|
40145
40095
|
y: y + getPercentValue(position.y, height),
|
|
40146
40096
|
textAnchor: 'end',
|
|
40147
40097
|
verticalAnchor: 'end'
|
|
40148
40098
|
}, sizeAttrs);
|
|
40149
40099
|
}
|
|
40150
|
-
return _objectSpread$
|
|
40100
|
+
return _objectSpread$e({
|
|
40151
40101
|
x: x + width / 2,
|
|
40152
40102
|
y: y + height / 2,
|
|
40153
40103
|
textAnchor: 'middle',
|
|
@@ -40157,13 +40107,7 @@ var getAttrsOfCartesianLabel = function getAttrsOfCartesianLabel(props) {
|
|
|
40157
40107
|
var isPolar = function isPolar(viewBox) {
|
|
40158
40108
|
return 'cx' in viewBox && isNumber(viewBox.cx);
|
|
40159
40109
|
};
|
|
40160
|
-
function Label$3(
|
|
40161
|
-
var _ref4$offset = _ref4.offset,
|
|
40162
|
-
offset = _ref4$offset === void 0 ? 5 : _ref4$offset,
|
|
40163
|
-
restProps = _objectWithoutProperties$7(_ref4, _excluded$7);
|
|
40164
|
-
var props = _objectSpread$h({
|
|
40165
|
-
offset: offset
|
|
40166
|
-
}, restProps);
|
|
40110
|
+
function Label$3(props) {
|
|
40167
40111
|
var viewBox = props.viewBox,
|
|
40168
40112
|
position = props.position,
|
|
40169
40113
|
value = props.value,
|
|
@@ -40200,6 +40144,9 @@ function Label$3(_ref4) {
|
|
|
40200
40144
|
}), label);
|
|
40201
40145
|
}
|
|
40202
40146
|
Label$3.displayName = 'Label';
|
|
40147
|
+
Label$3.defaultProps = {
|
|
40148
|
+
offset: 5
|
|
40149
|
+
};
|
|
40203
40150
|
var parseViewBox = function parseViewBox(props) {
|
|
40204
40151
|
var cx = props.cx,
|
|
40205
40152
|
cy = props.cy,
|
|
@@ -40354,9 +40301,8 @@ function last(array) {
|
|
|
40354
40301
|
|
|
40355
40302
|
var last_1 = last;
|
|
40356
40303
|
|
|
40357
|
-
function _typeof$
|
|
40358
|
-
var _excluded$
|
|
40359
|
-
_excluded2$2 = ["data", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40304
|
+
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); }
|
|
40305
|
+
var _excluded$5 = ["data", "valueAccessor", "dataKey", "clockWise", "id", "textBreakAll"];
|
|
40360
40306
|
function _toConsumableArray$2(arr) { return _arrayWithoutHoles$2(arr) || _iterableToArray$2(arr) || _unsupportedIterableToArray$4(arr) || _nonIterableSpread$2(); }
|
|
40361
40307
|
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."); }
|
|
40362
40308
|
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); }
|
|
@@ -40364,26 +40310,26 @@ function _iterableToArray$2(iter) { if (typeof Symbol !== "undefined" && iter[Sy
|
|
|
40364
40310
|
function _arrayWithoutHoles$2(arr) { if (Array.isArray(arr)) return _arrayLikeToArray$4(arr); }
|
|
40365
40311
|
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; }
|
|
40366
40312
|
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); }
|
|
40367
|
-
function ownKeys$
|
|
40368
|
-
function _objectSpread$
|
|
40369
|
-
function _defineProperty$
|
|
40370
|
-
function _toPropertyKey$
|
|
40371
|
-
function _toPrimitive$
|
|
40372
|
-
function _objectWithoutProperties$
|
|
40373
|
-
function _objectWithoutPropertiesLoose$
|
|
40374
|
-
var
|
|
40375
|
-
|
|
40376
|
-
|
|
40377
|
-
|
|
40378
|
-
|
|
40379
|
-
|
|
40380
|
-
|
|
40381
|
-
|
|
40382
|
-
dataKey =
|
|
40383
|
-
clockWise =
|
|
40384
|
-
id =
|
|
40385
|
-
textBreakAll =
|
|
40386
|
-
others = _objectWithoutProperties$
|
|
40313
|
+
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; }
|
|
40314
|
+
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; }
|
|
40315
|
+
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; }
|
|
40316
|
+
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40317
|
+
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); }
|
|
40318
|
+
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; }
|
|
40319
|
+
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; }
|
|
40320
|
+
var defaultProps = {
|
|
40321
|
+
valueAccessor: function valueAccessor(entry) {
|
|
40322
|
+
return isArray_1(entry.value) ? last_1(entry.value) : entry.value;
|
|
40323
|
+
}
|
|
40324
|
+
};
|
|
40325
|
+
function LabelList(props) {
|
|
40326
|
+
var data = props.data,
|
|
40327
|
+
valueAccessor = props.valueAccessor,
|
|
40328
|
+
dataKey = props.dataKey,
|
|
40329
|
+
clockWise = props.clockWise,
|
|
40330
|
+
id = props.id,
|
|
40331
|
+
textBreakAll = props.textBreakAll,
|
|
40332
|
+
others = _objectWithoutProperties$5(props, _excluded$5);
|
|
40387
40333
|
if (!data || !data.length) {
|
|
40388
40334
|
return null;
|
|
40389
40335
|
}
|
|
@@ -40399,7 +40345,7 @@ function LabelList(_ref) {
|
|
|
40399
40345
|
index: index,
|
|
40400
40346
|
value: value,
|
|
40401
40347
|
textBreakAll: textBreakAll,
|
|
40402
|
-
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$
|
|
40348
|
+
viewBox: Label$3.parseViewBox(isNil_1(clockWise) ? entry : _objectSpread$d(_objectSpread$d({}, entry), {}, {
|
|
40403
40349
|
clockWise: clockWise
|
|
40404
40350
|
})),
|
|
40405
40351
|
key: "label-".concat(index) // eslint-disable-line react/no-array-index-key
|
|
@@ -40454,14 +40400,9 @@ function renderCallByParent(parentProps, data) {
|
|
|
40454
40400
|
return [implicitLabelList].concat(_toConsumableArray$2(explicitChildren));
|
|
40455
40401
|
}
|
|
40456
40402
|
LabelList.renderCallByParent = renderCallByParent;
|
|
40403
|
+
LabelList.defaultProps = defaultProps;
|
|
40457
40404
|
|
|
40458
|
-
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); }
|
|
40459
40405
|
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); }
|
|
40460
|
-
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; }
|
|
40461
|
-
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; }
|
|
40462
|
-
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; }
|
|
40463
|
-
function _toPropertyKey$g(arg) { var key = _toPrimitive$g(arg, "string"); return _typeof$g(key) === "symbol" ? key : String(key); }
|
|
40464
|
-
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); }
|
|
40465
40406
|
var getDeltaAngle = function getDeltaAngle(startAngle, endAngle) {
|
|
40466
40407
|
var sign = mathSign(endAngle - startAngle);
|
|
40467
40408
|
var deltaAngle = Math.min(Math.abs(endAngle - startAngle), 359.999);
|
|
@@ -40602,19 +40543,7 @@ var getSectorWithCorner = function getSectorWithCorner(_ref3) {
|
|
|
40602
40543
|
}
|
|
40603
40544
|
return path;
|
|
40604
40545
|
};
|
|
40605
|
-
var
|
|
40606
|
-
cx: 0,
|
|
40607
|
-
cy: 0,
|
|
40608
|
-
innerRadius: 0,
|
|
40609
|
-
outerRadius: 0,
|
|
40610
|
-
startAngle: 0,
|
|
40611
|
-
endAngle: 0,
|
|
40612
|
-
cornerRadius: 0,
|
|
40613
|
-
forceCornerRadius: false,
|
|
40614
|
-
cornerIsExternal: false
|
|
40615
|
-
};
|
|
40616
|
-
var Sector = function Sector(sectorProps) {
|
|
40617
|
-
var props = _objectSpread$f(_objectSpread$f({}, defaultProps$1), sectorProps);
|
|
40546
|
+
var Sector = function Sector(props) {
|
|
40618
40547
|
var cx = props.cx,
|
|
40619
40548
|
cy = props.cy,
|
|
40620
40549
|
innerRadius = props.innerRadius,
|
|
@@ -40660,14 +40589,25 @@ var Sector = function Sector(sectorProps) {
|
|
|
40660
40589
|
role: "img"
|
|
40661
40590
|
}));
|
|
40662
40591
|
};
|
|
40592
|
+
Sector.defaultProps = {
|
|
40593
|
+
cx: 0,
|
|
40594
|
+
cy: 0,
|
|
40595
|
+
innerRadius: 0,
|
|
40596
|
+
outerRadius: 0,
|
|
40597
|
+
startAngle: 0,
|
|
40598
|
+
endAngle: 0,
|
|
40599
|
+
cornerRadius: 0,
|
|
40600
|
+
forceCornerRadius: false,
|
|
40601
|
+
cornerIsExternal: false
|
|
40602
|
+
};
|
|
40663
40603
|
|
|
40664
|
-
function _typeof$
|
|
40604
|
+
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); }
|
|
40665
40605
|
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); }
|
|
40666
|
-
function ownKeys$
|
|
40667
|
-
function _objectSpread$
|
|
40668
|
-
function _defineProperty$
|
|
40669
|
-
function _toPropertyKey$
|
|
40670
|
-
function _toPrimitive$
|
|
40606
|
+
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; }
|
|
40607
|
+
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; }
|
|
40608
|
+
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; }
|
|
40609
|
+
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40610
|
+
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); }
|
|
40671
40611
|
var CURVE_FACTORIES = {
|
|
40672
40612
|
curveBasisClosed: curveBasisClosed,
|
|
40673
40613
|
curveBasisOpen: curveBasisOpen,
|
|
@@ -40707,14 +40647,11 @@ var getCurveFactory = function getCurveFactory(type, layout) {
|
|
|
40707
40647
|
* @return {String} path
|
|
40708
40648
|
*/
|
|
40709
40649
|
var getPath$1 = function getPath(_ref) {
|
|
40710
|
-
var
|
|
40711
|
-
|
|
40712
|
-
_ref$points = _ref.points,
|
|
40713
|
-
points = _ref$points === void 0 ? [] : _ref$points,
|
|
40650
|
+
var type = _ref.type,
|
|
40651
|
+
points = _ref.points,
|
|
40714
40652
|
baseLine = _ref.baseLine,
|
|
40715
40653
|
layout = _ref.layout,
|
|
40716
|
-
|
|
40717
|
-
connectNulls = _ref$connectNulls === void 0 ? false : _ref$connectNulls;
|
|
40654
|
+
connectNulls = _ref.connectNulls;
|
|
40718
40655
|
var curveFactory = getCurveFactory(type, layout);
|
|
40719
40656
|
var formatPoints = connectNulls ? points.filter(function (entry) {
|
|
40720
40657
|
return defined(entry);
|
|
@@ -40725,7 +40662,7 @@ var getPath$1 = function getPath(_ref) {
|
|
|
40725
40662
|
return defined(base);
|
|
40726
40663
|
}) : baseLine;
|
|
40727
40664
|
var areaPoints = formatPoints.map(function (entry, index) {
|
|
40728
|
-
return _objectSpread$
|
|
40665
|
+
return _objectSpread$c(_objectSpread$c({}, entry), {}, {
|
|
40729
40666
|
base: formatBaseLine[index]
|
|
40730
40667
|
});
|
|
40731
40668
|
});
|
|
@@ -40766,8 +40703,12 @@ var Curve = function Curve(props) {
|
|
|
40766
40703
|
ref: pathRef
|
|
40767
40704
|
}));
|
|
40768
40705
|
};
|
|
40706
|
+
Curve.defaultProps = {
|
|
40707
|
+
type: 'linear',
|
|
40708
|
+
points: [],
|
|
40709
|
+
connectNulls: false
|
|
40710
|
+
};
|
|
40769
40711
|
|
|
40770
|
-
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); }
|
|
40771
40712
|
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); }
|
|
40772
40713
|
function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
|
|
40773
40714
|
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."); }
|
|
@@ -40775,11 +40716,6 @@ function _unsupportedIterableToArray$3(o, minLen) { if (!o) return; if (typeof o
|
|
|
40775
40716
|
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; }
|
|
40776
40717
|
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; } }
|
|
40777
40718
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
40778
|
-
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; }
|
|
40779
|
-
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; }
|
|
40780
|
-
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; }
|
|
40781
|
-
function _toPropertyKey$e(arg) { var key = _toPrimitive$e(arg, "string"); return _typeof$e(key) === "symbol" ? key : String(key); }
|
|
40782
|
-
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); }
|
|
40783
40719
|
var getRectanglePath = function getRectanglePath(x, y, width, height, radius) {
|
|
40784
40720
|
var maxRadius = Math.min(Math.abs(width) / 2, Math.abs(height) / 2);
|
|
40785
40721
|
var ySign = height >= 0 ? 1 : -1;
|
|
@@ -40835,29 +40771,13 @@ var isInRectangle = function isInRectangle(point, rect) {
|
|
|
40835
40771
|
}
|
|
40836
40772
|
return false;
|
|
40837
40773
|
};
|
|
40838
|
-
var
|
|
40839
|
-
x: 0,
|
|
40840
|
-
y: 0,
|
|
40841
|
-
width: 0,
|
|
40842
|
-
height: 0,
|
|
40843
|
-
// The radius of border
|
|
40844
|
-
// The radius of four corners when radius is a number
|
|
40845
|
-
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40846
|
-
radius: 0,
|
|
40847
|
-
isAnimationActive: false,
|
|
40848
|
-
isUpdateAnimationActive: false,
|
|
40849
|
-
animationBegin: 0,
|
|
40850
|
-
animationDuration: 1500,
|
|
40851
|
-
animationEasing: 'ease'
|
|
40852
|
-
};
|
|
40853
|
-
var Rectangle = function Rectangle(rectangleProps) {
|
|
40854
|
-
var props = _objectSpread$d(_objectSpread$d({}, defaultProps), rectangleProps);
|
|
40774
|
+
var Rectangle = function Rectangle(props) {
|
|
40855
40775
|
var pathRef = React$3.useRef();
|
|
40856
40776
|
var _useState = React$3.useState(-1),
|
|
40857
40777
|
_useState2 = _slicedToArray$2(_useState, 2),
|
|
40858
40778
|
totalLength = _useState2[0],
|
|
40859
40779
|
setTotalLength = _useState2[1];
|
|
40860
|
-
React$3.
|
|
40780
|
+
React$3.useLayoutEffect(function () {
|
|
40861
40781
|
if (pathRef.current && pathRef.current.getTotalLength) {
|
|
40862
40782
|
try {
|
|
40863
40783
|
var pathTotalLength = pathRef.current.getTotalLength();
|
|
@@ -40928,6 +40848,21 @@ var Rectangle = function Rectangle(rectangleProps) {
|
|
|
40928
40848
|
})));
|
|
40929
40849
|
});
|
|
40930
40850
|
};
|
|
40851
|
+
Rectangle.defaultProps = {
|
|
40852
|
+
x: 0,
|
|
40853
|
+
y: 0,
|
|
40854
|
+
width: 0,
|
|
40855
|
+
height: 0,
|
|
40856
|
+
// The radius of border
|
|
40857
|
+
// The radius of four corners when radius is a number
|
|
40858
|
+
// The radius of left-top, right-top, right-bottom, left-bottom when radius is an array
|
|
40859
|
+
radius: 0,
|
|
40860
|
+
isAnimationActive: false,
|
|
40861
|
+
isUpdateAnimationActive: false,
|
|
40862
|
+
animationBegin: 0,
|
|
40863
|
+
animationDuration: 1500,
|
|
40864
|
+
animationEasing: 'ease'
|
|
40865
|
+
};
|
|
40931
40866
|
|
|
40932
40867
|
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); }
|
|
40933
40868
|
var Dot$1 = function Dot(props) {
|
|
@@ -40947,42 +40882,18 @@ var Dot$1 = function Dot(props) {
|
|
|
40947
40882
|
return null;
|
|
40948
40883
|
};
|
|
40949
40884
|
|
|
40950
|
-
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); }
|
|
40951
|
-
var _excluded$5 = ["x", "y", "top", "left", "width", "height", "className"];
|
|
40952
40885
|
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); }
|
|
40953
|
-
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; }
|
|
40954
|
-
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; }
|
|
40955
|
-
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; }
|
|
40956
|
-
function _toPropertyKey$d(arg) { var key = _toPrimitive$d(arg, "string"); return _typeof$d(key) === "symbol" ? key : String(key); }
|
|
40957
|
-
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); }
|
|
40958
|
-
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; }
|
|
40959
|
-
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; }
|
|
40960
40886
|
var getPath = function getPath(x, y, width, height, top, left) {
|
|
40961
40887
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
|
40962
40888
|
};
|
|
40963
|
-
var Cross = function Cross(
|
|
40964
|
-
var
|
|
40965
|
-
|
|
40966
|
-
|
|
40967
|
-
|
|
40968
|
-
|
|
40969
|
-
|
|
40970
|
-
|
|
40971
|
-
left = _ref$left === void 0 ? 0 : _ref$left,
|
|
40972
|
-
_ref$width = _ref.width,
|
|
40973
|
-
width = _ref$width === void 0 ? 0 : _ref$width,
|
|
40974
|
-
_ref$height = _ref.height,
|
|
40975
|
-
height = _ref$height === void 0 ? 0 : _ref$height,
|
|
40976
|
-
className = _ref.className,
|
|
40977
|
-
rest = _objectWithoutProperties$5(_ref, _excluded$5);
|
|
40978
|
-
var props = _objectSpread$c({
|
|
40979
|
-
x: x,
|
|
40980
|
-
y: y,
|
|
40981
|
-
top: top,
|
|
40982
|
-
left: left,
|
|
40983
|
-
width: width,
|
|
40984
|
-
height: height
|
|
40985
|
-
}, rest);
|
|
40889
|
+
var Cross = function Cross(props) {
|
|
40890
|
+
var x = props.x,
|
|
40891
|
+
y = props.y,
|
|
40892
|
+
width = props.width,
|
|
40893
|
+
height = props.height,
|
|
40894
|
+
top = props.top,
|
|
40895
|
+
left = props.left,
|
|
40896
|
+
className = props.className;
|
|
40986
40897
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
|
40987
40898
|
return null;
|
|
40988
40899
|
}
|
|
@@ -40991,6 +40902,14 @@ var Cross = function Cross(_ref) {
|
|
|
40991
40902
|
d: getPath(x, y, width, height, top, left)
|
|
40992
40903
|
}));
|
|
40993
40904
|
};
|
|
40905
|
+
Cross.defaultProps = {
|
|
40906
|
+
x: 0,
|
|
40907
|
+
y: 0,
|
|
40908
|
+
top: 0,
|
|
40909
|
+
left: 0,
|
|
40910
|
+
width: 0,
|
|
40911
|
+
height: 0
|
|
40912
|
+
};
|
|
40994
40913
|
|
|
40995
40914
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
40996
40915
|
|
|
@@ -41200,7 +41119,6 @@ var createScale = function createScale(_ref) {
|
|
|
41200
41119
|
isTextActive: false,
|
|
41201
41120
|
isSlideMoving: false,
|
|
41202
41121
|
isTravellerMoving: false,
|
|
41203
|
-
isTravellerFocused: false,
|
|
41204
41122
|
startX: scale(startIndex),
|
|
41205
41123
|
endX: scale(endIndex),
|
|
41206
41124
|
scale: scale,
|
|
@@ -41414,38 +41332,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41414
41332
|
}
|
|
41415
41333
|
});
|
|
41416
41334
|
}
|
|
41417
|
-
}, {
|
|
41418
|
-
key: "handleTravellerMoveKeyboard",
|
|
41419
|
-
value: function handleTravellerMoveKeyboard(direction, id) {
|
|
41420
|
-
var _this2 = this;
|
|
41421
|
-
// scaleValues are a list of coordinates. For example: [65, 250, 435, 620, 805, 990].
|
|
41422
|
-
var _this$state3 = this.state,
|
|
41423
|
-
scaleValues = _this$state3.scaleValues,
|
|
41424
|
-
startX = _this$state3.startX,
|
|
41425
|
-
endX = _this$state3.endX;
|
|
41426
|
-
// currentScaleValue refers to which coordinate the current traveller should be placed at.
|
|
41427
|
-
var currentScaleValue = this.state[id];
|
|
41428
|
-
var currentIndex = scaleValues.indexOf(currentScaleValue);
|
|
41429
|
-
if (currentIndex === -1) {
|
|
41430
|
-
return;
|
|
41431
|
-
}
|
|
41432
|
-
var newIndex = currentIndex + direction;
|
|
41433
|
-
if (newIndex === -1 || newIndex >= scaleValues.length) {
|
|
41434
|
-
return;
|
|
41435
|
-
}
|
|
41436
|
-
var newScaleValue = scaleValues[newIndex];
|
|
41437
|
-
|
|
41438
|
-
// Prevent travellers from being on top of each other or overlapping
|
|
41439
|
-
if (id === 'startX' && newScaleValue >= endX || id === 'endX' && newScaleValue <= startX) {
|
|
41440
|
-
return;
|
|
41441
|
-
}
|
|
41442
|
-
this.setState(_defineProperty$b({}, id, newScaleValue), function () {
|
|
41443
|
-
_this2.props.onChange(_this2.getIndex({
|
|
41444
|
-
startX: _this2.state.startX,
|
|
41445
|
-
endX: _this2.state.endX
|
|
41446
|
-
}));
|
|
41447
|
-
});
|
|
41448
|
-
}
|
|
41449
41335
|
}, {
|
|
41450
41336
|
key: "renderBackground",
|
|
41451
41337
|
value: function renderBackground() {
|
|
@@ -41493,7 +41379,6 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41493
41379
|
}, {
|
|
41494
41380
|
key: "renderTravellerLayer",
|
|
41495
41381
|
value: function renderTravellerLayer(travellerX, id) {
|
|
41496
|
-
var _this3 = this;
|
|
41497
41382
|
var _this$props7 = this.props,
|
|
41498
41383
|
y = _this$props7.y,
|
|
41499
41384
|
travellerWidth = _this$props7.travellerWidth,
|
|
@@ -41507,31 +41392,11 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41507
41392
|
height: height
|
|
41508
41393
|
});
|
|
41509
41394
|
return /*#__PURE__*/React__default["default"].createElement(Layer, {
|
|
41510
|
-
tabIndex: 0,
|
|
41511
|
-
role: "slider",
|
|
41512
41395
|
className: "recharts-brush-traveller",
|
|
41513
41396
|
onMouseEnter: this.handleEnterSlideOrTraveller,
|
|
41514
41397
|
onMouseLeave: this.handleLeaveSlideOrTraveller,
|
|
41515
41398
|
onMouseDown: this.travellerDragStartHandlers[id],
|
|
41516
41399
|
onTouchStart: this.travellerDragStartHandlers[id],
|
|
41517
|
-
onKeyDown: function onKeyDown(e) {
|
|
41518
|
-
if (!['ArrowLeft', 'ArrowRight'].includes(e.key)) {
|
|
41519
|
-
return;
|
|
41520
|
-
}
|
|
41521
|
-
e.preventDefault();
|
|
41522
|
-
e.stopPropagation();
|
|
41523
|
-
_this3.handleTravellerMoveKeyboard(e.key === 'ArrowRight' ? 1 : -1, id);
|
|
41524
|
-
},
|
|
41525
|
-
onFocus: function onFocus() {
|
|
41526
|
-
_this3.setState({
|
|
41527
|
-
isTravellerFocused: true
|
|
41528
|
-
});
|
|
41529
|
-
},
|
|
41530
|
-
onBlur: function onBlur() {
|
|
41531
|
-
_this3.setState({
|
|
41532
|
-
isTravellerFocused: false
|
|
41533
|
-
});
|
|
41534
|
-
},
|
|
41535
41400
|
style: {
|
|
41536
41401
|
cursor: 'col-resize'
|
|
41537
41402
|
}
|
|
@@ -41575,9 +41440,9 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41575
41440
|
height = _this$props9.height,
|
|
41576
41441
|
travellerWidth = _this$props9.travellerWidth,
|
|
41577
41442
|
stroke = _this$props9.stroke;
|
|
41578
|
-
var _this$
|
|
41579
|
-
startX = _this$
|
|
41580
|
-
endX = _this$
|
|
41443
|
+
var _this$state3 = this.state,
|
|
41444
|
+
startX = _this$state3.startX,
|
|
41445
|
+
endX = _this$state3.endX;
|
|
41581
41446
|
var offset = 5;
|
|
41582
41447
|
var attrs = {
|
|
41583
41448
|
pointerEvents: 'none',
|
|
@@ -41609,13 +41474,12 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41609
41474
|
width = _this$props10.width,
|
|
41610
41475
|
height = _this$props10.height,
|
|
41611
41476
|
alwaysShowText = _this$props10.alwaysShowText;
|
|
41612
|
-
var _this$
|
|
41613
|
-
startX = _this$
|
|
41614
|
-
endX = _this$
|
|
41615
|
-
isTextActive = _this$
|
|
41616
|
-
isSlideMoving = _this$
|
|
41617
|
-
isTravellerMoving = _this$
|
|
41618
|
-
isTravellerFocused = _this$state5.isTravellerFocused;
|
|
41477
|
+
var _this$state4 = this.state,
|
|
41478
|
+
startX = _this$state4.startX,
|
|
41479
|
+
endX = _this$state4.endX,
|
|
41480
|
+
isTextActive = _this$state4.isTextActive,
|
|
41481
|
+
isSlideMoving = _this$state4.isSlideMoving,
|
|
41482
|
+
isTravellerMoving = _this$state4.isTravellerMoving;
|
|
41619
41483
|
if (!data || !data.length || !isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || width <= 0 || height <= 0) {
|
|
41620
41484
|
return null;
|
|
41621
41485
|
}
|
|
@@ -41627,7 +41491,7 @@ var Brush = /*#__PURE__*/function (_PureComponent) {
|
|
|
41627
41491
|
onMouseLeave: this.handleLeaveWrapper,
|
|
41628
41492
|
onTouchMove: this.handleTouchMove,
|
|
41629
41493
|
style: style
|
|
41630
|
-
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving ||
|
|
41494
|
+
}, this.renderBackground(), isPanoramic && this.renderPanorama(), this.renderSlide(startX, endX), this.renderTravellerLayer(startX, 'startX'), this.renderTravellerLayer(endX, 'endX'), (isTextActive || isSlideMoving || isTravellerMoving || alwaysShowText) && this.renderText());
|
|
41631
41495
|
}
|
|
41632
41496
|
}], [{
|
|
41633
41497
|
key: "renderDefaultTraveller",
|
|
@@ -41945,7 +41809,7 @@ function every(collection, predicate, guard) {
|
|
|
41945
41809
|
|
|
41946
41810
|
var every_1 = every;
|
|
41947
41811
|
|
|
41948
|
-
var defineProperty = _defineProperty$
|
|
41812
|
+
var defineProperty = _defineProperty$l;
|
|
41949
41813
|
|
|
41950
41814
|
/**
|
|
41951
41815
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
@@ -42306,6 +42170,7 @@ _defineProperty$a(Bar, "defaultProps", {
|
|
|
42306
42170
|
legendType: 'rect',
|
|
42307
42171
|
minPointSize: 0,
|
|
42308
42172
|
hide: false,
|
|
42173
|
+
// data of bar
|
|
42309
42174
|
data: [],
|
|
42310
42175
|
layout: 'vertical',
|
|
42311
42176
|
isAnimationActive: !Global.isSsr,
|
|
@@ -45218,11 +45083,10 @@ var AccessibilityManager = /*#__PURE__*/function () {
|
|
|
45218
45083
|
}
|
|
45219
45084
|
var _this$container$getBo = this.container.getBoundingClientRect(),
|
|
45220
45085
|
x = _this$container$getBo.x,
|
|
45221
|
-
y = _this$container$getBo.y
|
|
45222
|
-
height = _this$container$getBo.height;
|
|
45086
|
+
y = _this$container$getBo.y;
|
|
45223
45087
|
var coordinate = this.coordinateList[this.activeIndex].coordinate;
|
|
45224
45088
|
var pageX = x + coordinate;
|
|
45225
|
-
var pageY = y + this.offset.top
|
|
45089
|
+
var pageY = y + this.offset.top;
|
|
45226
45090
|
this.mouseHandlerCallback({
|
|
45227
45091
|
pageX: pageX,
|
|
45228
45092
|
pageY: pageY
|