ivt 0.3.4 → 0.3.6
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/dist/accordion/index.mjs +14 -14
- package/dist/alert/index.mjs +2 -2
- package/dist/alert-dialog/index.mjs +17 -17
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/avatar/index.mjs +8 -8
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/badge/index.mjs +3 -3
- package/dist/base/index.d.ts +18 -1
- package/dist/base/index.mjs +168 -29
- package/dist/base/index.mjs.map +1 -1
- package/dist/button/index.mjs +3 -3
- package/dist/calendar/index.mjs +8 -8
- package/dist/card/index.mjs +2 -2
- package/dist/chart/index.mjs +541 -831
- package/dist/chart/index.mjs.map +1 -1
- package/dist/checkbox/index.mjs +14 -14
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/{_commonjsHelpers-DqEvkrE1.mjs → _commonjsHelpers-DKISyIRi.mjs} +1 -1
- package/dist/chunks/_commonjsHelpers-DKISyIRi.mjs.map +1 -0
- package/dist/chunks/{accordion-BMP2PSSC.mjs → accordion-DISpV98f.mjs} +13 -13
- package/dist/chunks/{accordion-BMP2PSSC.mjs.map → accordion-DISpV98f.mjs.map} +1 -1
- package/dist/chunks/{badge-DxuZhgBF.mjs → badge-CT_hmjd2.mjs} +2 -2
- package/dist/chunks/{badge-DxuZhgBF.mjs.map → badge-CT_hmjd2.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-tFg__FnT.mjs → bundle-mjs-CS-QKnOm.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-tFg__FnT.mjs.map → bundle-mjs-CS-QKnOm.mjs.map} +1 -1
- package/dist/chunks/{button-CX0htulo.mjs → button-BHeYV17S.mjs} +2 -2
- package/dist/chunks/{button-CX0htulo.mjs.map → button-BHeYV17S.mjs.map} +1 -1
- package/dist/chunks/{calendar-B4IV5RyM.mjs → calendar-CU6HdJET.mjs} +6 -6
- package/dist/chunks/{calendar-B4IV5RyM.mjs.map → calendar-CU6HdJET.mjs.map} +1 -1
- package/dist/chunks/{check-B7209s3e.mjs → check-B3pXhibW.mjs} +2 -2
- package/dist/chunks/{check-B7209s3e.mjs.map → check-B3pXhibW.mjs.map} +1 -1
- package/dist/chunks/{chevron-down-D84DRJBv.mjs → chevron-down-BV5gvmUW.mjs} +2 -2
- package/dist/chunks/{chevron-down-D84DRJBv.mjs.map → chevron-down-BV5gvmUW.mjs.map} +1 -1
- package/dist/chunks/{chevron-left-DtL1t1DJ.mjs → chevron-left-BjGcH2KQ.mjs} +2 -2
- package/dist/chunks/{chevron-left-DtL1t1DJ.mjs.map → chevron-left-BjGcH2KQ.mjs.map} +1 -1
- package/dist/chunks/{chevron-right-Cdxg1JSQ.mjs → chevron-right-DmZu0xvo.mjs} +2 -2
- package/dist/chunks/{chevron-right-Cdxg1JSQ.mjs.map → chevron-right-DmZu0xvo.mjs.map} +1 -1
- package/dist/chunks/{chevrons-up-down-DtBUG1i8.mjs → chevrons-up-down-COuCmfU7.mjs} +2 -2
- package/dist/chunks/{chevrons-up-down-DtBUG1i8.mjs.map → chevrons-up-down-COuCmfU7.mjs.map} +1 -1
- package/dist/chunks/{circle-BLWMZ9yp.mjs → circle-BKsPjIbw.mjs} +2 -2
- package/dist/chunks/{circle-BLWMZ9yp.mjs.map → circle-BKsPjIbw.mjs.map} +1 -1
- package/dist/chunks/{command-C8cVzg-x.mjs → command-CUWr3X1X.mjs} +8 -8
- package/dist/chunks/{command-C8cVzg-x.mjs.map → command-CUWr3X1X.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-Ba0IWqsz.mjs → createLucideIcon-BSP_Jxu-.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-Ba0IWqsz.mjs.map → createLucideIcon-BSP_Jxu-.mjs.map} +1 -1
- package/dist/chunks/{dialog-D9vbxUuQ.mjs → dialog-zZCazow7.mjs} +4 -4
- package/dist/chunks/{dialog-D9vbxUuQ.mjs.map → dialog-zZCazow7.mjs.map} +1 -1
- package/dist/chunks/{hover-card-idvDPXrI.mjs → hover-card-ssfyy6SY.mjs} +11 -11
- package/dist/chunks/{hover-card-idvDPXrI.mjs.map → hover-card-ssfyy6SY.mjs.map} +1 -1
- package/dist/chunks/{index-CyMuypYR.mjs → index-3XcV7C7l.mjs} +10 -10
- package/dist/chunks/{index-CyMuypYR.mjs.map → index-3XcV7C7l.mjs.map} +1 -1
- package/dist/chunks/{index-BE-_q4IW.mjs → index-B1VVz0MP.mjs} +6 -6
- package/dist/chunks/{index-BE-_q4IW.mjs.map → index-B1VVz0MP.mjs.map} +1 -1
- package/dist/chunks/{index-kr6_v_F8.mjs → index-BFDafXar.mjs} +7 -7
- package/dist/chunks/{index-kr6_v_F8.mjs.map → index-BFDafXar.mjs.map} +1 -1
- package/dist/chunks/{index-D23BhVQG.mjs → index-BF_TaONY.mjs} +13 -13
- package/dist/chunks/{index-D23BhVQG.mjs.map → index-BF_TaONY.mjs.map} +1 -1
- package/dist/chunks/{index-DNvm9MP3.mjs → index-BOOPeiVs.mjs} +2 -2
- package/dist/chunks/{index-DNvm9MP3.mjs.map → index-BOOPeiVs.mjs.map} +1 -1
- package/dist/chunks/{index-Dm4_czlz.mjs → index-BYijxgZz.mjs} +1 -1
- package/dist/chunks/{index-Dm4_czlz.mjs.map → index-BYijxgZz.mjs.map} +1 -1
- package/dist/chunks/{index-B4VRyyD1.mjs → index-BZyzz9k8.mjs} +1 -1
- package/dist/chunks/{index-B4VRyyD1.mjs.map → index-BZyzz9k8.mjs.map} +1 -1
- package/dist/chunks/{index-BZUrHhU8.mjs → index-Bgiaprdv.mjs} +1 -1
- package/dist/chunks/{index-BZUrHhU8.mjs.map → index-Bgiaprdv.mjs.map} +1 -1
- package/dist/chunks/{index-B_FsTtnF.mjs → index-Bl6nVRXe.mjs} +1 -1
- package/dist/chunks/{index-B_FsTtnF.mjs.map → index-Bl6nVRXe.mjs.map} +1 -1
- package/dist/chunks/{index-PaJVyocC.mjs → index-BwQDLVf8.mjs} +1 -1
- package/dist/chunks/{index-PaJVyocC.mjs.map → index-BwQDLVf8.mjs.map} +1 -1
- package/dist/chunks/{index-sz_BcBbA.mjs → index-CHyZo-Tj.mjs} +5 -5
- package/dist/chunks/{index-sz_BcBbA.mjs.map → index-CHyZo-Tj.mjs.map} +1 -1
- package/dist/chunks/{index-CglX-DNW.mjs → index-CZ7Wntp7.mjs} +1 -1
- package/dist/chunks/{index-CglX-DNW.mjs.map → index-CZ7Wntp7.mjs.map} +1 -1
- package/dist/chunks/{index-CAg47KJ6.mjs → index-D1yPZAOL.mjs} +1 -1
- package/dist/chunks/{index-CAg47KJ6.mjs.map → index-D1yPZAOL.mjs.map} +1 -1
- package/dist/chunks/{index-D2wfJaZh.mjs → index-DIBl7n6R.mjs} +3 -3
- package/dist/chunks/{index-D2wfJaZh.mjs.map → index-DIBl7n6R.mjs.map} +1 -1
- package/dist/chunks/{index-BNxaLFA6.mjs → index-DRk0bB4A.mjs} +9 -9
- package/dist/chunks/{index-BNxaLFA6.mjs.map → index-DRk0bB4A.mjs.map} +1 -1
- package/dist/chunks/{index-C_jFwfR_.mjs → index-DUFr75Kc.mjs} +2 -2
- package/dist/chunks/{index-C_jFwfR_.mjs.map → index-DUFr75Kc.mjs.map} +1 -1
- package/dist/chunks/{index-6JUj2Tld.mjs → index-DrnQ43fz.mjs} +2 -2
- package/dist/chunks/{index-6JUj2Tld.mjs.map → index-DrnQ43fz.mjs.map} +1 -1
- package/dist/chunks/{index-CXuEm8w1.mjs → index-Dulm0stf.mjs} +1 -1
- package/dist/chunks/{index-CXuEm8w1.mjs.map → index-Dulm0stf.mjs.map} +1 -1
- package/dist/chunks/{index-D0S6rRRE.mjs → index-fWnSEyU5.mjs} +1 -1
- package/dist/chunks/{index-D0S6rRRE.mjs.map → index-fWnSEyU5.mjs.map} +1 -1
- package/dist/chunks/{index-B0IElWB4.mjs → index-tNc5GmLL.mjs} +2 -2
- package/dist/chunks/{index-B0IElWB4.mjs.map → index-tNc5GmLL.mjs.map} +1 -1
- package/dist/chunks/{input-DK1slFF1.mjs → input-D9-FhnGc.mjs} +2 -2
- package/dist/chunks/{input-DK1slFF1.mjs.map → input-D9-FhnGc.mjs.map} +1 -1
- package/dist/chunks/{label-D7ONQdHc.mjs → label-CiJcd2F9.mjs} +3 -3
- package/dist/chunks/{label-D7ONQdHc.mjs.map → label-CiJcd2F9.mjs.map} +1 -1
- package/dist/chunks/{pagination-BM_IQ6Qk.mjs → pagination-SOhqOW7I.mjs} +6 -6
- package/dist/chunks/{pagination-BM_IQ6Qk.mjs.map → pagination-SOhqOW7I.mjs.map} +1 -1
- package/dist/chunks/{popover-D3F326FR.mjs → popover-CtxxPI-t.mjs} +13 -13
- package/dist/chunks/{popover-D3F326FR.mjs.map → popover-CtxxPI-t.mjs.map} +1 -1
- package/dist/chunks/{progress-BCl5yD5Q.mjs → progress-WrZK6klx.mjs} +5 -5
- package/dist/chunks/{progress-BCl5yD5Q.mjs.map → progress-WrZK6klx.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-DB3eUx8V.mjs → scroll-area-BVyyR0Km.mjs} +11 -11
- package/dist/chunks/{scroll-area-DB3eUx8V.mjs.map → scroll-area-BVyyR0Km.mjs.map} +1 -1
- package/dist/chunks/{select-Cw81y8pT.mjs → select-COGYOg3A.mjs} +5 -5
- package/dist/chunks/{select-Cw81y8pT.mjs.map → select-COGYOg3A.mjs.map} +1 -1
- package/dist/chunks/{separator-2k1C7RSn.mjs → separator-D6Y96f4g.mjs} +3 -3
- package/dist/chunks/{separator-2k1C7RSn.mjs.map → separator-D6Y96f4g.mjs.map} +1 -1
- package/dist/chunks/{skeleton-qx8-vr62.mjs → skeleton-CRfBAk8U.mjs} +2 -2
- package/dist/chunks/{skeleton-qx8-vr62.mjs.map → skeleton-CRfBAk8U.mjs.map} +1 -1
- package/dist/chunks/{sortable-D8ayoe_b.mjs → sortable-tiuZWf3S.mjs} +3 -3
- package/dist/chunks/{sortable-D8ayoe_b.mjs.map → sortable-tiuZWf3S.mjs.map} +1 -1
- package/dist/chunks/{table-BDNUhtz-.mjs → table-BlTF56Yn.mjs} +2 -2
- package/dist/chunks/{table-BDNUhtz-.mjs.map → table-BlTF56Yn.mjs.map} +1 -1
- package/dist/chunks/{toggle-CE2ycSdL.mjs → toggle-D5tCYA7L.mjs} +5 -5
- package/dist/chunks/{toggle-CE2ycSdL.mjs.map → toggle-D5tCYA7L.mjs.map} +1 -1
- package/dist/chunks/{tooltip-DLD0ycR4.mjs → tooltip-DgNjTTxv.mjs} +13 -13
- package/dist/chunks/{tooltip-DLD0ycR4.mjs.map → tooltip-DgNjTTxv.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-BgHLrbno.mjs → tslib.es6-O3UsmxNe.mjs} +1 -1
- package/dist/chunks/{tslib.es6-BgHLrbno.mjs.map → tslib.es6-O3UsmxNe.mjs.map} +1 -1
- package/dist/chunks/{utils-BUelq9Ro.mjs → utils-tbIgc9YG.mjs} +2 -2
- package/dist/chunks/{utils-BUelq9Ro.mjs.map → utils-tbIgc9YG.mjs.map} +1 -1
- package/dist/chunks/{x-Bjz0Vo6R.mjs → x-5oL4uC6I.mjs} +2 -2
- package/dist/chunks/{x-Bjz0Vo6R.mjs.map → x-5oL4uC6I.mjs.map} +1 -1
- package/dist/combobox/index.mjs +25 -25
- package/dist/command/index.mjs +19 -19
- package/dist/data-table/index.mjs +33 -33
- package/dist/dialog/index.mjs +18 -18
- package/dist/dropdown-menu/index.mjs +24 -24
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +17 -17
- package/dist/form/index.mjs +4 -4
- package/dist/hover-card/index.mjs +14 -14
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +3 -3
- package/dist/ivt.css +1 -1
- package/dist/label/index.mjs +4 -4
- package/dist/menubar/index.mjs +24 -24
- package/dist/menubar/index.mjs.map +1 -1
- package/dist/multi-select/index.mjs +29 -29
- package/dist/pagination/index.mjs +7 -7
- package/dist/popover/index.mjs +17 -17
- package/dist/progress/index.mjs +5 -5
- package/dist/radio-group/index.mjs +18 -18
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/scroll-area/index.mjs +11 -11
- package/dist/select/index.mjs +6 -6
- package/dist/separator/index.mjs +4 -4
- package/dist/sheet/index.mjs +17 -17
- package/dist/skeleton/index.mjs +3 -3
- package/dist/sortable/index.mjs +4 -4
- package/dist/table/index.mjs +3 -3
- package/dist/tabs/index.mjs +14 -14
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.mjs +2 -2
- package/dist/toast/index.mjs +15 -15
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toggle/index.mjs +7 -7
- package/dist/toggle-group/index.mjs +14 -14
- package/dist/toggle-group/index.mjs.map +1 -1
- package/dist/tooltip/index.mjs +16 -16
- package/package.json +5 -4
- package/dist/chunks/_commonjsHelpers-DqEvkrE1.mjs.map +0 -1
package/dist/chart/index.mjs
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import React__default, { isValidElement, forwardRef, useContext, createContext, PureComponent, useState, useCallback, useEffect, useMemo,
|
3
|
-
import { a as clsx, c as cn } from '../chunks/utils-
|
2
|
+
import React__default, { isValidElement, forwardRef, useContext, createContext, PureComponent, useState, useCallback, useEffect, useMemo, useRef, cloneElement, createElement, useImperativeHandle } from 'react';
|
3
|
+
import { a as clsx, c as cn } from '../chunks/utils-tbIgc9YG.mjs';
|
4
4
|
import { createPortal } from 'react-dom';
|
5
|
-
import { g as getDefaultExportFromCjs } from '../chunks/_commonjsHelpers-
|
6
|
-
import { r as requireShim } from '../chunks/index-
|
7
|
-
import '../chunks/bundle-mjs-
|
5
|
+
import { g as getDefaultExportFromCjs } from '../chunks/_commonjsHelpers-DKISyIRi.mjs';
|
6
|
+
import { r as requireShim } from '../chunks/index-BwQDLVf8.mjs';
|
7
|
+
import '../chunks/bundle-mjs-CS-QKnOm.mjs';
|
8
8
|
|
9
9
|
var get$2 = {};
|
10
10
|
|
@@ -268,6 +268,11 @@ var isNan = (value)=>{
|
|
268
268
|
var isPercent = (value)=>typeof value === 'string' && value.indexOf('%') === value.length - 1;
|
269
269
|
var isNumber = (value)=>(typeof value === 'number' || value instanceof Number) && !isNan(value);
|
270
270
|
var isNumOrStr = (value)=>isNumber(value) || typeof value === 'string';
|
271
|
+
var idCounter = 0;
|
272
|
+
var uniqueId = (prefix)=>{
|
273
|
+
var id = ++idCounter;
|
274
|
+
return "".concat(prefix || '').concat(id);
|
275
|
+
};
|
271
276
|
/**
|
272
277
|
* Get percent value of a total value
|
273
278
|
* @param {number|string} percent A percent
|
@@ -314,6 +319,12 @@ var hasDuplicate = (ary)=>{
|
|
314
319
|
}
|
315
320
|
return false;
|
316
321
|
};
|
322
|
+
function interpolate$1(start, end, t) {
|
323
|
+
if (isNumber(start) && isNumber(end)) {
|
324
|
+
return start + t * (end - start);
|
325
|
+
}
|
326
|
+
return end;
|
327
|
+
}
|
317
328
|
function findEntryInArray(ary, specifiedKey, specifiedValue) {
|
318
329
|
if (!ary || !ary.length) {
|
319
330
|
return undefined;
|
@@ -1001,7 +1012,7 @@ function isSvgElementPropKey(key) {
|
|
1001
1012
|
* @deprecated do not use this function, as it is not type-safe and may lead to unexpected behavior. Returns `any`.
|
1002
1013
|
* Instead, use:
|
1003
1014
|
* - `excludeEventProps` to exclude event handlers
|
1004
|
-
* - `
|
1015
|
+
* - `svgPropertiesNoEvents` to exclude non-SVG attributes, and exclude event handlers too
|
1005
1016
|
* @param props - The props object to filter, which can be a Record, Component, FunctionComponent, boolean, or unknown.
|
1006
1017
|
* @param includeEvents - A boolean indicating whether to include event handlers in the filtered props.
|
1007
1018
|
* @param svgElementType - An optional parameter specifying the type of SVG element to filter attributes for.
|
@@ -1033,7 +1044,7 @@ function isSvgElementPropKey(key) {
|
|
1033
1044
|
return out;
|
1034
1045
|
};
|
1035
1046
|
|
1036
|
-
var _excluded$
|
1047
|
+
var _excluded$3 = [
|
1037
1048
|
"children",
|
1038
1049
|
"width",
|
1039
1050
|
"height",
|
@@ -1043,25 +1054,25 @@ var _excluded$4 = [
|
|
1043
1054
|
"title",
|
1044
1055
|
"desc"
|
1045
1056
|
];
|
1046
|
-
function _extends$
|
1047
|
-
return _extends$
|
1057
|
+
function _extends$9() {
|
1058
|
+
return _extends$9 = Object.assign ? Object.assign.bind() : function(n) {
|
1048
1059
|
for(var e = 1; e < arguments.length; e++){
|
1049
1060
|
var t = arguments[e];
|
1050
1061
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
1051
1062
|
}
|
1052
1063
|
return n;
|
1053
|
-
}, _extends$
|
1064
|
+
}, _extends$9.apply(null, arguments);
|
1054
1065
|
}
|
1055
|
-
function _objectWithoutProperties$
|
1066
|
+
function _objectWithoutProperties$3(e, t) {
|
1056
1067
|
if (null == e) return {};
|
1057
|
-
var o, r, i = _objectWithoutPropertiesLoose$
|
1068
|
+
var o, r, i = _objectWithoutPropertiesLoose$3(e, t);
|
1058
1069
|
if (Object.getOwnPropertySymbols) {
|
1059
1070
|
var n = Object.getOwnPropertySymbols(e);
|
1060
1071
|
for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
1061
1072
|
}
|
1062
1073
|
return i;
|
1063
1074
|
}
|
1064
|
-
function _objectWithoutPropertiesLoose$
|
1075
|
+
function _objectWithoutPropertiesLoose$3(r, e) {
|
1065
1076
|
if (null == r) return {};
|
1066
1077
|
var t = {};
|
1067
1078
|
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
@@ -1071,7 +1082,7 @@ function _objectWithoutPropertiesLoose$4(r, e) {
|
|
1071
1082
|
return t;
|
1072
1083
|
}
|
1073
1084
|
var Surface = /*#__PURE__*/ forwardRef((props, ref)=>{
|
1074
|
-
var { children, width, height, viewBox, className, style, title, desc } = props, others = _objectWithoutProperties$
|
1085
|
+
var { children, width, height, viewBox, className, style, title, desc } = props, others = _objectWithoutProperties$3(props, _excluded$3);
|
1075
1086
|
var svgView = viewBox || {
|
1076
1087
|
width,
|
1077
1088
|
height,
|
@@ -1079,7 +1090,7 @@ var Surface = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
1079
1090
|
y: 0
|
1080
1091
|
};
|
1081
1092
|
var layerClass = clsx('recharts-surface', className);
|
1082
|
-
return /*#__PURE__*/ React.createElement("svg", _extends$
|
1093
|
+
return /*#__PURE__*/ React.createElement("svg", _extends$9({}, filterProps(others, true, 'svg'), {
|
1083
1094
|
className: layerClass,
|
1084
1095
|
width: width,
|
1085
1096
|
height: height,
|
@@ -2035,19 +2046,19 @@ function stackOffsetWiggle(series, order) {
|
|
2035
2046
|
stackOffsetNone(series, order);
|
2036
2047
|
}
|
2037
2048
|
|
2038
|
-
var _excluded$
|
2049
|
+
var _excluded$2 = [
|
2039
2050
|
"type",
|
2040
2051
|
"size",
|
2041
2052
|
"sizeType"
|
2042
2053
|
];
|
2043
|
-
function _extends$
|
2044
|
-
return _extends$
|
2054
|
+
function _extends$8() {
|
2055
|
+
return _extends$8 = Object.assign ? Object.assign.bind() : function(n) {
|
2045
2056
|
for(var e = 1; e < arguments.length; e++){
|
2046
2057
|
var t = arguments[e];
|
2047
2058
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
2048
2059
|
}
|
2049
2060
|
return n;
|
2050
|
-
}, _extends$
|
2061
|
+
}, _extends$8.apply(null, arguments);
|
2051
2062
|
}
|
2052
2063
|
function ownKeys$j(e, r) {
|
2053
2064
|
var t = Object.keys(e);
|
@@ -2092,16 +2103,16 @@ function _toPrimitive$j(t, r) {
|
|
2092
2103
|
}
|
2093
2104
|
return ("string" === r ? String : Number)(t);
|
2094
2105
|
}
|
2095
|
-
function _objectWithoutProperties$
|
2106
|
+
function _objectWithoutProperties$2(e, t) {
|
2096
2107
|
if (null == e) return {};
|
2097
|
-
var o, r, i = _objectWithoutPropertiesLoose$
|
2108
|
+
var o, r, i = _objectWithoutPropertiesLoose$2(e, t);
|
2098
2109
|
if (Object.getOwnPropertySymbols) {
|
2099
2110
|
var n = Object.getOwnPropertySymbols(e);
|
2100
2111
|
for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
2101
2112
|
}
|
2102
2113
|
return i;
|
2103
2114
|
}
|
2104
|
-
function _objectWithoutPropertiesLoose$
|
2115
|
+
function _objectWithoutPropertiesLoose$2(r, e) {
|
2105
2116
|
if (null == r) return {};
|
2106
2117
|
var t = {};
|
2107
2118
|
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
@@ -2152,24 +2163,34 @@ var registerSymbol = (key, factory)=>{
|
|
2152
2163
|
symbolFactories["symbol".concat(upperFirst(key))] = factory;
|
2153
2164
|
};
|
2154
2165
|
var Symbols = (_ref)=>{
|
2155
|
-
var { type = 'circle', size = 64, sizeType = 'area' } = _ref, rest = _objectWithoutProperties$
|
2166
|
+
var { type = 'circle', size = 64, sizeType = 'area' } = _ref, rest = _objectWithoutProperties$2(_ref, _excluded$2);
|
2156
2167
|
var props = _objectSpread$j(_objectSpread$j({}, rest), {}, {
|
2157
2168
|
type,
|
2158
2169
|
size,
|
2159
2170
|
sizeType
|
2160
2171
|
});
|
2172
|
+
var realType = 'circle';
|
2173
|
+
if (typeof type === 'string') {
|
2174
|
+
/*
|
2175
|
+
* Our type guard is not as strong as it could be (i.e. non-existent),
|
2176
|
+
* and so despite the typescript type saying that `type` is a `SymbolType`,
|
2177
|
+
* we can get numbers or really anything, so let's have a runtime check here to fix the exception.
|
2178
|
+
*
|
2179
|
+
* https://github.com/recharts/recharts/issues/6197
|
2180
|
+
*/ realType = type;
|
2181
|
+
}
|
2161
2182
|
/**
|
2162
2183
|
* Calculate the path of curve
|
2163
2184
|
* @return {String} path
|
2164
2185
|
*/ var getPath = ()=>{
|
2165
|
-
var symbolFactory = getSymbolFactory(
|
2166
|
-
var symbol = Symbol$1().type(symbolFactory).size(calculateAreaSize(size, sizeType,
|
2186
|
+
var symbolFactory = getSymbolFactory(realType);
|
2187
|
+
var symbol = Symbol$1().type(symbolFactory).size(calculateAreaSize(size, sizeType, realType));
|
2167
2188
|
return symbol();
|
2168
2189
|
};
|
2169
2190
|
var { className, cx, cy } = props;
|
2170
2191
|
var filteredProps = filterProps(props, true);
|
2171
2192
|
if (cx === +cx && cy === +cy && size === +size) {
|
2172
|
-
return /*#__PURE__*/ React.createElement("path", _extends$
|
2193
|
+
return /*#__PURE__*/ React.createElement("path", _extends$8({}, filteredProps, {
|
2173
2194
|
className: clsx('recharts-symbols', className),
|
2174
2195
|
transform: "translate(".concat(cx, ", ").concat(cy, ")"),
|
2175
2196
|
d: getPath()
|
@@ -2179,14 +2200,14 @@ var Symbols = (_ref)=>{
|
|
2179
2200
|
};
|
2180
2201
|
Symbols.registerSymbol = registerSymbol;
|
2181
2202
|
|
2182
|
-
function _extends$
|
2183
|
-
return _extends$
|
2203
|
+
function _extends$7() {
|
2204
|
+
return _extends$7 = Object.assign ? Object.assign.bind() : function(n) {
|
2184
2205
|
for(var e = 1; e < arguments.length; e++){
|
2185
2206
|
var t = arguments[e];
|
2186
2207
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
2187
2208
|
}
|
2188
2209
|
return n;
|
2189
|
-
}, _extends$
|
2210
|
+
}, _extends$7.apply(null, arguments);
|
2190
2211
|
}
|
2191
2212
|
function ownKeys$i(e, r) {
|
2192
2213
|
var t = Object.keys(e);
|
@@ -2324,7 +2345,7 @@ class DefaultLegendContent extends PureComponent {
|
|
2324
2345
|
}
|
2325
2346
|
var color = entry.inactive ? inactiveColor : entry.color;
|
2326
2347
|
var finalValue = finalFormatter ? finalFormatter(entry.value, entry, i) : entry.value;
|
2327
|
-
return /*#__PURE__*/ React.createElement("li", _extends$
|
2348
|
+
return /*#__PURE__*/ React.createElement("li", _extends$7({
|
2328
2349
|
className: className,
|
2329
2350
|
style: itemStyle,
|
2330
2351
|
key: "legend-item-".concat(i)
|
@@ -4227,7 +4248,8 @@ var EPS$1 = 1;
|
|
4227
4248
|
});
|
4228
4249
|
}
|
4229
4250
|
}
|
4230
|
-
},
|
4251
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
4252
|
+
[
|
4231
4253
|
lastBoundingBox.width,
|
4232
4254
|
lastBoundingBox.height,
|
4233
4255
|
lastBoundingBox.top,
|
@@ -4242,7 +4264,7 @@ var EPS$1 = 1;
|
|
4242
4264
|
|
4243
4265
|
// src/utils/formatProdErrorMessage.ts
|
4244
4266
|
// src/utils/isPlainObject.ts
|
4245
|
-
function isPlainObject$
|
4267
|
+
function isPlainObject$1(obj) {
|
4246
4268
|
if (typeof obj !== "object" || obj === null) return false;
|
4247
4269
|
let proto = obj;
|
4248
4270
|
while(Object.getPrototypeOf(proto) !== null){
|
@@ -4252,7 +4274,7 @@ function isPlainObject$2(obj) {
|
|
4252
4274
|
}
|
4253
4275
|
// src/utils/isAction.ts
|
4254
4276
|
function isAction(action) {
|
4255
|
-
return isPlainObject$
|
4277
|
+
return isPlainObject$1(action) && "type" in action && typeof action.type === "string";
|
4256
4278
|
}
|
4257
4279
|
|
4258
4280
|
// src/utils/env.ts
|
@@ -4304,10 +4326,10 @@ function isDraft(value) {
|
|
4304
4326
|
}
|
4305
4327
|
function isDraftable(value) {
|
4306
4328
|
if (!value) return false;
|
4307
|
-
return isPlainObject
|
4329
|
+
return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);
|
4308
4330
|
}
|
4309
4331
|
var objectCtorString = Object.prototype.constructor.toString();
|
4310
|
-
function isPlainObject
|
4332
|
+
function isPlainObject(value) {
|
4311
4333
|
if (!value || typeof value !== "object") return false;
|
4312
4334
|
const proto = getPrototypeOf(value);
|
4313
4335
|
if (proto === null) {
|
@@ -4364,7 +4386,7 @@ function shallowCopy(base, strict) {
|
|
4364
4386
|
return new Set(base);
|
4365
4387
|
}
|
4366
4388
|
if (Array.isArray(base)) return Array.prototype.slice.call(base);
|
4367
|
-
const isPlain = isPlainObject
|
4389
|
+
const isPlain = isPlainObject(base);
|
4368
4390
|
if (strict === true || strict === "class_only" && !isPlain) {
|
4369
4391
|
const descriptors = Object.getOwnPropertyDescriptors(base);
|
4370
4392
|
delete descriptors[DRAFT_STATE];
|
@@ -5655,6 +5677,44 @@ function _toPrimitive$g(t, r) {
|
|
5655
5677
|
return ("string" === r ? String : Number)(t);
|
5656
5678
|
}
|
5657
5679
|
var selectBrushHeight = (state)=>state.brush.height;
|
5680
|
+
function selectLeftAxesOffset(state) {
|
5681
|
+
var yAxes = selectAllYAxes(state);
|
5682
|
+
return yAxes.reduce((result, entry)=>{
|
5683
|
+
if (entry.orientation === 'left' && !entry.mirror && !entry.hide) {
|
5684
|
+
var width = typeof entry.width === 'number' ? entry.width : DEFAULT_Y_AXIS_WIDTH;
|
5685
|
+
return result + width;
|
5686
|
+
}
|
5687
|
+
return result;
|
5688
|
+
}, 0);
|
5689
|
+
}
|
5690
|
+
function selectRightAxesOffset(state) {
|
5691
|
+
var yAxes = selectAllYAxes(state);
|
5692
|
+
return yAxes.reduce((result, entry)=>{
|
5693
|
+
if (entry.orientation === 'right' && !entry.mirror && !entry.hide) {
|
5694
|
+
var width = typeof entry.width === 'number' ? entry.width : DEFAULT_Y_AXIS_WIDTH;
|
5695
|
+
return result + width;
|
5696
|
+
}
|
5697
|
+
return result;
|
5698
|
+
}, 0);
|
5699
|
+
}
|
5700
|
+
function selectTopAxesOffset(state) {
|
5701
|
+
var xAxes = selectAllXAxes(state);
|
5702
|
+
return xAxes.reduce((result, entry)=>{
|
5703
|
+
if (entry.orientation === 'top' && !entry.mirror && !entry.hide) {
|
5704
|
+
return result + entry.height;
|
5705
|
+
}
|
5706
|
+
return result;
|
5707
|
+
}, 0);
|
5708
|
+
}
|
5709
|
+
function selectBottomAxesOffset(state) {
|
5710
|
+
var xAxes = selectAllXAxes(state);
|
5711
|
+
return xAxes.reduce((result, entry)=>{
|
5712
|
+
if (entry.orientation === 'bottom' && !entry.mirror && !entry.hide) {
|
5713
|
+
return result + entry.height;
|
5714
|
+
}
|
5715
|
+
return result;
|
5716
|
+
}, 0);
|
5717
|
+
}
|
5658
5718
|
/**
|
5659
5719
|
* For internal use only.
|
5660
5720
|
*
|
@@ -5665,36 +5725,21 @@ var selectBrushHeight = (state)=>state.brush.height;
|
|
5665
5725
|
selectChartHeight,
|
5666
5726
|
selectMargin,
|
5667
5727
|
selectBrushHeight,
|
5668
|
-
|
5669
|
-
|
5728
|
+
selectLeftAxesOffset,
|
5729
|
+
selectRightAxesOffset,
|
5730
|
+
selectTopAxesOffset,
|
5731
|
+
selectBottomAxesOffset,
|
5670
5732
|
selectLegendSettings,
|
5671
5733
|
selectLegendSize
|
5672
|
-
], (chartWidth, chartHeight, margin, brushHeight,
|
5673
|
-
var offsetH =
|
5674
|
-
|
5675
|
-
|
5676
|
-
|
5677
|
-
|
5678
|
-
|
5679
|
-
|
5680
|
-
|
5681
|
-
return result;
|
5682
|
-
}, {
|
5683
|
-
left: margin.left || 0,
|
5684
|
-
right: margin.right || 0
|
5685
|
-
});
|
5686
|
-
var offsetV = xAxes.reduce((result, entry)=>{
|
5687
|
-
var { orientation } = entry;
|
5688
|
-
if (!entry.mirror && !entry.hide) {
|
5689
|
-
return _objectSpread$g(_objectSpread$g({}, result), {}, {
|
5690
|
-
[orientation]: get(result, "".concat(orientation)) + entry.height
|
5691
|
-
});
|
5692
|
-
}
|
5693
|
-
return result;
|
5694
|
-
}, {
|
5695
|
-
top: margin.top || 0,
|
5696
|
-
bottom: margin.bottom || 0
|
5697
|
-
});
|
5734
|
+
], (chartWidth, chartHeight, margin, brushHeight, leftAxesOffset, rightAxesOffset, topAxesOffset, bottomAxesOffset, legendSettings, legendSize)=>{
|
5735
|
+
var offsetH = {
|
5736
|
+
left: (margin.left || 0) + leftAxesOffset,
|
5737
|
+
right: (margin.right || 0) + rightAxesOffset
|
5738
|
+
};
|
5739
|
+
var offsetV = {
|
5740
|
+
top: (margin.top || 0) + topAxesOffset,
|
5741
|
+
bottom: (margin.bottom || 0) + bottomAxesOffset
|
5742
|
+
};
|
5698
5743
|
var offset = _objectSpread$g(_objectSpread$g({}, offsetV), offsetH);
|
5699
5744
|
var brushBottom = offset.bottom;
|
5700
5745
|
offset.bottom += brushHeight;
|
@@ -5814,15 +5859,17 @@ var manyComponentsThrowErrorsIfOffsetIsUndefined = {
|
|
5814
5859
|
*/ var useChartHeight = ()=>{
|
5815
5860
|
return useAppSelector(selectChartHeight);
|
5816
5861
|
};
|
5817
|
-
|
5818
|
-
|
5819
|
-
|
5820
|
-
|
5821
|
-
|
5822
|
-
|
5823
|
-
|
5824
|
-
|
5825
|
-
|
5862
|
+
/**
|
5863
|
+
* Margin is the empty space around the chart. Excludes axes and legend and brushes and the like.
|
5864
|
+
* This is declared by the user in the chart props.
|
5865
|
+
* If you are interested in the space occupied by axes, legend, or brushes,
|
5866
|
+
* use `useOffset` instead.
|
5867
|
+
*
|
5868
|
+
* Returns `undefined` if used outside a chart context.
|
5869
|
+
*
|
5870
|
+
* @returns {Margin | undefined} The margin of the chart in pixels, or `undefined` if not in a chart context.
|
5871
|
+
*/ var useMargin = ()=>{
|
5872
|
+
return useAppSelector((state)=>state.layout.margin);
|
5826
5873
|
};
|
5827
5874
|
var selectChartLayout = (state)=>state.layout.layoutType;
|
5828
5875
|
var useChartLayout = ()=>useAppSelector(selectChartLayout);
|
@@ -5873,17 +5920,17 @@ var legendSlice = createSlice({
|
|
5873
5920
|
});
|
5874
5921
|
var { setLegendSize, setLegendSettings, addLegendPayload, removeLegendPayload } = legendSlice.actions;
|
5875
5922
|
|
5876
|
-
var _excluded$
|
5923
|
+
var _excluded$1 = [
|
5877
5924
|
"contextPayload"
|
5878
5925
|
];
|
5879
|
-
function _extends$
|
5880
|
-
return _extends$
|
5926
|
+
function _extends$6() {
|
5927
|
+
return _extends$6 = Object.assign ? Object.assign.bind() : function(n) {
|
5881
5928
|
for(var e = 1; e < arguments.length; e++){
|
5882
5929
|
var t = arguments[e];
|
5883
5930
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
5884
5931
|
}
|
5885
5932
|
return n;
|
5886
|
-
}, _extends$
|
5933
|
+
}, _extends$6.apply(null, arguments);
|
5887
5934
|
}
|
5888
5935
|
function ownKeys$f(e, r) {
|
5889
5936
|
var t = Object.keys(e);
|
@@ -5928,16 +5975,16 @@ function _toPrimitive$f(t, r) {
|
|
5928
5975
|
}
|
5929
5976
|
return ("string" === r ? String : Number)(t);
|
5930
5977
|
}
|
5931
|
-
function _objectWithoutProperties$
|
5978
|
+
function _objectWithoutProperties$1(e, t) {
|
5932
5979
|
if (null == e) return {};
|
5933
|
-
var o, r, i = _objectWithoutPropertiesLoose$
|
5980
|
+
var o, r, i = _objectWithoutPropertiesLoose$1(e, t);
|
5934
5981
|
if (Object.getOwnPropertySymbols) {
|
5935
5982
|
var n = Object.getOwnPropertySymbols(e);
|
5936
5983
|
for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
5937
5984
|
}
|
5938
5985
|
return i;
|
5939
5986
|
}
|
5940
|
-
function _objectWithoutPropertiesLoose$
|
5987
|
+
function _objectWithoutPropertiesLoose$1(r, e) {
|
5941
5988
|
if (null == r) return {};
|
5942
5989
|
var t = {};
|
5943
5990
|
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
@@ -5950,7 +5997,7 @@ function defaultUniqBy$1(entry) {
|
|
5950
5997
|
return entry.value;
|
5951
5998
|
}
|
5952
5999
|
function LegendContent(props) {
|
5953
|
-
var { contextPayload } = props, otherProps = _objectWithoutProperties$
|
6000
|
+
var { contextPayload } = props, otherProps = _objectWithoutProperties$1(props, _excluded$1);
|
5954
6001
|
var finalPayload = getUniqPayload(contextPayload, props.payloadUniqBy, defaultUniqBy$1);
|
5955
6002
|
var contentProps = _objectSpread$f(_objectSpread$f({}, otherProps), {}, {
|
5956
6003
|
payload: finalPayload
|
@@ -6032,6 +6079,9 @@ function LegendWrapper(props) {
|
|
6032
6079
|
]);
|
6033
6080
|
var chartWidth = useChartWidth();
|
6034
6081
|
var chartHeight = useChartHeight();
|
6082
|
+
if (chartWidth == null || chartHeight == null) {
|
6083
|
+
return null;
|
6084
|
+
}
|
6035
6085
|
var maxWidth = chartWidth - (margin.left || 0) - (margin.right || 0);
|
6036
6086
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
6037
6087
|
var widthOrHeight = Legend.getWidthOrHeight(props.layout, heightFromProps, widthFromProps, maxWidth);
|
@@ -6057,7 +6107,7 @@ function LegendWrapper(props) {
|
|
6057
6107
|
}), /*#__PURE__*/ React.createElement(LegendSizeDispatcher, {
|
6058
6108
|
width: lastBoundingBox.width,
|
6059
6109
|
height: lastBoundingBox.height
|
6060
|
-
}), /*#__PURE__*/ React.createElement(LegendContent, _extends$
|
6110
|
+
}), /*#__PURE__*/ React.createElement(LegendContent, _extends$6({}, props, widthOrHeight, {
|
6061
6111
|
margin: margin,
|
6062
6112
|
chartWidth: chartWidth,
|
6063
6113
|
chartHeight: chartHeight,
|
@@ -6092,14 +6142,14 @@ _defineProperty$f(Legend, "defaultProps", {
|
|
6092
6142
|
verticalAlign: 'bottom'
|
6093
6143
|
});
|
6094
6144
|
|
6095
|
-
function _extends$
|
6096
|
-
return _extends$
|
6145
|
+
function _extends$5() {
|
6146
|
+
return _extends$5 = Object.assign ? Object.assign.bind() : function(n) {
|
6097
6147
|
for(var e = 1; e < arguments.length; e++){
|
6098
6148
|
var t = arguments[e];
|
6099
6149
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
6100
6150
|
}
|
6101
6151
|
return n;
|
6102
|
-
}, _extends$
|
6152
|
+
}, _extends$5.apply(null, arguments);
|
6103
6153
|
}
|
6104
6154
|
function ownKeys$e(e, r) {
|
6105
6155
|
var t = Object.keys(e);
|
@@ -6222,7 +6272,7 @@ var DefaultTooltipContent = (props)=>{
|
|
6222
6272
|
role: 'status',
|
6223
6273
|
'aria-live': 'assertive'
|
6224
6274
|
} : {};
|
6225
|
-
return /*#__PURE__*/ React.createElement("div", _extends$
|
6275
|
+
return /*#__PURE__*/ React.createElement("div", _extends$5({
|
6226
6276
|
className: wrapperCN,
|
6227
6277
|
style: finalStyle
|
6228
6278
|
}, accessibilityAttributes), /*#__PURE__*/ React.createElement("p", {
|
@@ -6458,14 +6508,14 @@ function isWellBehavedNumber(n) {
|
|
6458
6508
|
return Number.isFinite(n);
|
6459
6509
|
}
|
6460
6510
|
|
6461
|
-
function _extends$
|
6462
|
-
return _extends$
|
6511
|
+
function _extends$4() {
|
6512
|
+
return _extends$4 = Object.assign ? Object.assign.bind() : function(n) {
|
6463
6513
|
for(var e = 1; e < arguments.length; e++){
|
6464
6514
|
var t = arguments[e];
|
6465
6515
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
6466
6516
|
}
|
6467
6517
|
return n;
|
6468
|
-
}, _extends$
|
6518
|
+
}, _extends$4.apply(null, arguments);
|
6469
6519
|
}
|
6470
6520
|
function ownKeys$c(e, r) {
|
6471
6521
|
var t = Object.keys(e);
|
@@ -6581,14 +6631,14 @@ var Curve = (props)=>{
|
|
6581
6631
|
return null;
|
6582
6632
|
}
|
6583
6633
|
var realPath = points && points.length ? getPath$1(props) : path;
|
6584
|
-
return /*#__PURE__*/ React.createElement("path", _extends$
|
6634
|
+
return /*#__PURE__*/ React.createElement("path", _extends$4({}, svgPropertiesNoEvents(props), adaptEventHandlers(props), {
|
6585
6635
|
className: clsx('recharts-curve', className),
|
6586
6636
|
d: realPath === null ? undefined : realPath,
|
6587
6637
|
ref: pathRef
|
6588
6638
|
}));
|
6589
6639
|
};
|
6590
6640
|
|
6591
|
-
var _excluded
|
6641
|
+
var _excluded = [
|
6592
6642
|
"x",
|
6593
6643
|
"y",
|
6594
6644
|
"top",
|
@@ -6597,14 +6647,14 @@ var _excluded$1 = [
|
|
6597
6647
|
"height",
|
6598
6648
|
"className"
|
6599
6649
|
];
|
6600
|
-
function _extends$
|
6601
|
-
return _extends$
|
6650
|
+
function _extends$3() {
|
6651
|
+
return _extends$3 = Object.assign ? Object.assign.bind() : function(n) {
|
6602
6652
|
for(var e = 1; e < arguments.length; e++){
|
6603
6653
|
var t = arguments[e];
|
6604
6654
|
for(var r in t)({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
6605
6655
|
}
|
6606
6656
|
return n;
|
6607
|
-
}, _extends$
|
6657
|
+
}, _extends$3.apply(null, arguments);
|
6608
6658
|
}
|
6609
6659
|
function ownKeys$b(e, r) {
|
6610
6660
|
var t = Object.keys(e);
|
@@ -6649,16 +6699,16 @@ function _toPrimitive$b(t, r) {
|
|
6649
6699
|
}
|
6650
6700
|
return ("string" === r ? String : Number)(t);
|
6651
6701
|
}
|
6652
|
-
function _objectWithoutProperties
|
6702
|
+
function _objectWithoutProperties(e, t) {
|
6653
6703
|
if (null == e) return {};
|
6654
|
-
var o, r, i = _objectWithoutPropertiesLoose
|
6704
|
+
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
6655
6705
|
if (Object.getOwnPropertySymbols) {
|
6656
6706
|
var n = Object.getOwnPropertySymbols(e);
|
6657
6707
|
for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
6658
6708
|
}
|
6659
6709
|
return i;
|
6660
6710
|
}
|
6661
|
-
function _objectWithoutPropertiesLoose
|
6711
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
6662
6712
|
if (null == r) return {};
|
6663
6713
|
var t = {};
|
6664
6714
|
for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
|
@@ -6671,7 +6721,7 @@ var getPath = (x, y, width, height, top, left)=>{
|
|
6671
6721
|
return "M".concat(x, ",").concat(top, "v").concat(height, "M").concat(left, ",").concat(y, "h").concat(width);
|
6672
6722
|
};
|
6673
6723
|
var Cross = (_ref)=>{
|
6674
|
-
var { x = 0, y = 0, top = 0, left = 0, width = 0, height = 0, className } = _ref, rest = _objectWithoutProperties
|
6724
|
+
var { x = 0, y = 0, top = 0, left = 0, width = 0, height = 0, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded);
|
6675
6725
|
var props = _objectSpread$b({
|
6676
6726
|
x,
|
6677
6727
|
y,
|
@@ -6683,7 +6733,7 @@ var Cross = (_ref)=>{
|
|
6683
6733
|
if (!isNumber(x) || !isNumber(y) || !isNumber(width) || !isNumber(height) || !isNumber(top) || !isNumber(left)) {
|
6684
6734
|
return null;
|
6685
6735
|
}
|
6686
|
-
return /*#__PURE__*/ React.createElement("path", _extends$
|
6736
|
+
return /*#__PURE__*/ React.createElement("path", _extends$3({}, filterProps(props, true), {
|
6687
6737
|
className: clsx('recharts-cross', className),
|
6688
6738
|
d: getPath(x, y, width, height, top, left)
|
6689
6739
|
}));
|
@@ -6812,448 +6862,7 @@ function _toPrimitive$a(t, r) {
|
|
6812
6862
|
* This is useful for creating a type that represents the resolved props of a component with default props.
|
6813
6863
|
*/
|
6814
6864
|
|
6815
|
-
|
6816
|
-
|
6817
|
-
var isEqualWith = {};
|
6818
|
-
|
6819
|
-
var isPlainObject = {};
|
6820
|
-
|
6821
|
-
var hasRequiredIsPlainObject;
|
6822
|
-
function requireIsPlainObject() {
|
6823
|
-
if (hasRequiredIsPlainObject) return isPlainObject;
|
6824
|
-
hasRequiredIsPlainObject = 1;
|
6825
|
-
(function(exports) {
|
6826
|
-
Object.defineProperty(exports, Symbol.toStringTag, {
|
6827
|
-
value: 'Module'
|
6828
|
-
});
|
6829
|
-
function isPlainObject(value) {
|
6830
|
-
if (!value || typeof value !== 'object') {
|
6831
|
-
return false;
|
6832
|
-
}
|
6833
|
-
const proto = Object.getPrototypeOf(value);
|
6834
|
-
const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
|
6835
|
-
if (!hasObjectPrototype) {
|
6836
|
-
return false;
|
6837
|
-
}
|
6838
|
-
return Object.prototype.toString.call(value) === '[object Object]';
|
6839
|
-
}
|
6840
|
-
exports.isPlainObject = isPlainObject;
|
6841
|
-
})(isPlainObject);
|
6842
|
-
return isPlainObject;
|
6843
|
-
}
|
6844
|
-
|
6845
|
-
var hasRequiredIsEqualWith;
|
6846
|
-
function requireIsEqualWith() {
|
6847
|
-
if (hasRequiredIsEqualWith) return isEqualWith;
|
6848
|
-
hasRequiredIsEqualWith = 1;
|
6849
|
-
(function(exports) {
|
6850
|
-
Object.defineProperty(exports, Symbol.toStringTag, {
|
6851
|
-
value: 'Module'
|
6852
|
-
});
|
6853
|
-
const isPlainObject = /*@__PURE__*/ requireIsPlainObject();
|
6854
|
-
const getSymbols = /*@__PURE__*/ requireGetSymbols();
|
6855
|
-
const getTag = /*@__PURE__*/ requireGetTag();
|
6856
|
-
const tags = /*@__PURE__*/ requireTags();
|
6857
|
-
const eq = /*@__PURE__*/ requireEq();
|
6858
|
-
function isEqualWith(a, b, areValuesEqual) {
|
6859
|
-
return isEqualWithImpl(a, b, undefined, undefined, undefined, undefined, areValuesEqual);
|
6860
|
-
}
|
6861
|
-
function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
|
6862
|
-
const result = areValuesEqual(a, b, property, aParent, bParent, stack);
|
6863
|
-
if (result !== undefined) {
|
6864
|
-
return result;
|
6865
|
-
}
|
6866
|
-
if (typeof a === typeof b) {
|
6867
|
-
switch(typeof a){
|
6868
|
-
case 'bigint':
|
6869
|
-
case 'string':
|
6870
|
-
case 'boolean':
|
6871
|
-
case 'symbol':
|
6872
|
-
case 'undefined':
|
6873
|
-
{
|
6874
|
-
return a === b;
|
6875
|
-
}
|
6876
|
-
case 'number':
|
6877
|
-
{
|
6878
|
-
return a === b || Object.is(a, b);
|
6879
|
-
}
|
6880
|
-
case 'function':
|
6881
|
-
{
|
6882
|
-
return a === b;
|
6883
|
-
}
|
6884
|
-
case 'object':
|
6885
|
-
{
|
6886
|
-
return areObjectsEqual(a, b, stack, areValuesEqual);
|
6887
|
-
}
|
6888
|
-
}
|
6889
|
-
}
|
6890
|
-
return areObjectsEqual(a, b, stack, areValuesEqual);
|
6891
|
-
}
|
6892
|
-
function areObjectsEqual(a, b, stack, areValuesEqual) {
|
6893
|
-
if (Object.is(a, b)) {
|
6894
|
-
return true;
|
6895
|
-
}
|
6896
|
-
let aTag = getTag.getTag(a);
|
6897
|
-
let bTag = getTag.getTag(b);
|
6898
|
-
if (aTag === tags.argumentsTag) {
|
6899
|
-
aTag = tags.objectTag;
|
6900
|
-
}
|
6901
|
-
if (bTag === tags.argumentsTag) {
|
6902
|
-
bTag = tags.objectTag;
|
6903
|
-
}
|
6904
|
-
if (aTag !== bTag) {
|
6905
|
-
return false;
|
6906
|
-
}
|
6907
|
-
switch(aTag){
|
6908
|
-
case tags.stringTag:
|
6909
|
-
return a.toString() === b.toString();
|
6910
|
-
case tags.numberTag:
|
6911
|
-
{
|
6912
|
-
const x = a.valueOf();
|
6913
|
-
const y = b.valueOf();
|
6914
|
-
return eq.eq(x, y);
|
6915
|
-
}
|
6916
|
-
case tags.booleanTag:
|
6917
|
-
case tags.dateTag:
|
6918
|
-
case tags.symbolTag:
|
6919
|
-
return Object.is(a.valueOf(), b.valueOf());
|
6920
|
-
case tags.regexpTag:
|
6921
|
-
{
|
6922
|
-
return a.source === b.source && a.flags === b.flags;
|
6923
|
-
}
|
6924
|
-
case tags.functionTag:
|
6925
|
-
{
|
6926
|
-
return a === b;
|
6927
|
-
}
|
6928
|
-
}
|
6929
|
-
stack = stack ?? new Map();
|
6930
|
-
const aStack = stack.get(a);
|
6931
|
-
const bStack = stack.get(b);
|
6932
|
-
if (aStack != null && bStack != null) {
|
6933
|
-
return aStack === b;
|
6934
|
-
}
|
6935
|
-
stack.set(a, b);
|
6936
|
-
stack.set(b, a);
|
6937
|
-
try {
|
6938
|
-
switch(aTag){
|
6939
|
-
case tags.mapTag:
|
6940
|
-
{
|
6941
|
-
if (a.size !== b.size) {
|
6942
|
-
return false;
|
6943
|
-
}
|
6944
|
-
for (const [key, value] of a.entries()){
|
6945
|
-
if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) {
|
6946
|
-
return false;
|
6947
|
-
}
|
6948
|
-
}
|
6949
|
-
return true;
|
6950
|
-
}
|
6951
|
-
case tags.setTag:
|
6952
|
-
{
|
6953
|
-
if (a.size !== b.size) {
|
6954
|
-
return false;
|
6955
|
-
}
|
6956
|
-
const aValues = Array.from(a.values());
|
6957
|
-
const bValues = Array.from(b.values());
|
6958
|
-
for(let i = 0; i < aValues.length; i++){
|
6959
|
-
const aValue = aValues[i];
|
6960
|
-
const index = bValues.findIndex((bValue)=>{
|
6961
|
-
return isEqualWithImpl(aValue, bValue, undefined, a, b, stack, areValuesEqual);
|
6962
|
-
});
|
6963
|
-
if (index === -1) {
|
6964
|
-
return false;
|
6965
|
-
}
|
6966
|
-
bValues.splice(index, 1);
|
6967
|
-
}
|
6968
|
-
return true;
|
6969
|
-
}
|
6970
|
-
case tags.arrayTag:
|
6971
|
-
case tags.uint8ArrayTag:
|
6972
|
-
case tags.uint8ClampedArrayTag:
|
6973
|
-
case tags.uint16ArrayTag:
|
6974
|
-
case tags.uint32ArrayTag:
|
6975
|
-
case tags.bigUint64ArrayTag:
|
6976
|
-
case tags.int8ArrayTag:
|
6977
|
-
case tags.int16ArrayTag:
|
6978
|
-
case tags.int32ArrayTag:
|
6979
|
-
case tags.bigInt64ArrayTag:
|
6980
|
-
case tags.float32ArrayTag:
|
6981
|
-
case tags.float64ArrayTag:
|
6982
|
-
{
|
6983
|
-
if (typeof Buffer !== 'undefined' && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) {
|
6984
|
-
return false;
|
6985
|
-
}
|
6986
|
-
if (a.length !== b.length) {
|
6987
|
-
return false;
|
6988
|
-
}
|
6989
|
-
for(let i = 0; i < a.length; i++){
|
6990
|
-
if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) {
|
6991
|
-
return false;
|
6992
|
-
}
|
6993
|
-
}
|
6994
|
-
return true;
|
6995
|
-
}
|
6996
|
-
case tags.arrayBufferTag:
|
6997
|
-
{
|
6998
|
-
if (a.byteLength !== b.byteLength) {
|
6999
|
-
return false;
|
7000
|
-
}
|
7001
|
-
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
7002
|
-
}
|
7003
|
-
case tags.dataViewTag:
|
7004
|
-
{
|
7005
|
-
if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) {
|
7006
|
-
return false;
|
7007
|
-
}
|
7008
|
-
return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
|
7009
|
-
}
|
7010
|
-
case tags.errorTag:
|
7011
|
-
{
|
7012
|
-
return a.name === b.name && a.message === b.message;
|
7013
|
-
}
|
7014
|
-
case tags.objectTag:
|
7015
|
-
{
|
7016
|
-
const areEqualInstances = areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject.isPlainObject(a) && isPlainObject.isPlainObject(b);
|
7017
|
-
if (!areEqualInstances) {
|
7018
|
-
return false;
|
7019
|
-
}
|
7020
|
-
const aKeys = [
|
7021
|
-
...Object.keys(a),
|
7022
|
-
...getSymbols.getSymbols(a)
|
7023
|
-
];
|
7024
|
-
const bKeys = [
|
7025
|
-
...Object.keys(b),
|
7026
|
-
...getSymbols.getSymbols(b)
|
7027
|
-
];
|
7028
|
-
if (aKeys.length !== bKeys.length) {
|
7029
|
-
return false;
|
7030
|
-
}
|
7031
|
-
for(let i = 0; i < aKeys.length; i++){
|
7032
|
-
const propKey = aKeys[i];
|
7033
|
-
const aProp = a[propKey];
|
7034
|
-
if (!Object.hasOwn(b, propKey)) {
|
7035
|
-
return false;
|
7036
|
-
}
|
7037
|
-
const bProp = b[propKey];
|
7038
|
-
if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) {
|
7039
|
-
return false;
|
7040
|
-
}
|
7041
|
-
}
|
7042
|
-
return true;
|
7043
|
-
}
|
7044
|
-
default:
|
7045
|
-
{
|
7046
|
-
return false;
|
7047
|
-
}
|
7048
|
-
}
|
7049
|
-
} finally{
|
7050
|
-
stack.delete(a);
|
7051
|
-
stack.delete(b);
|
7052
|
-
}
|
7053
|
-
}
|
7054
|
-
exports.isEqualWith = isEqualWith;
|
7055
|
-
})(isEqualWith);
|
7056
|
-
return isEqualWith;
|
7057
|
-
}
|
7058
|
-
|
7059
|
-
var noop = {};
|
7060
|
-
|
7061
|
-
var hasRequiredNoop;
|
7062
|
-
function requireNoop() {
|
7063
|
-
if (hasRequiredNoop) return noop;
|
7064
|
-
hasRequiredNoop = 1;
|
7065
|
-
(function(exports) {
|
7066
|
-
Object.defineProperty(exports, Symbol.toStringTag, {
|
7067
|
-
value: 'Module'
|
7068
|
-
});
|
7069
|
-
function noop() {}
|
7070
|
-
exports.noop = noop;
|
7071
|
-
})(noop);
|
7072
|
-
return noop;
|
7073
|
-
}
|
7074
|
-
|
7075
|
-
var hasRequiredIsEqual$1;
|
7076
|
-
function requireIsEqual$1() {
|
7077
|
-
if (hasRequiredIsEqual$1) return isEqual$2;
|
7078
|
-
hasRequiredIsEqual$1 = 1;
|
7079
|
-
(function(exports) {
|
7080
|
-
Object.defineProperty(exports, Symbol.toStringTag, {
|
7081
|
-
value: 'Module'
|
7082
|
-
});
|
7083
|
-
const isEqualWith = /*@__PURE__*/ requireIsEqualWith();
|
7084
|
-
const noop = /*@__PURE__*/ requireNoop();
|
7085
|
-
function isEqual(a, b) {
|
7086
|
-
return isEqualWith.isEqualWith(a, b, noop.noop);
|
7087
|
-
}
|
7088
|
-
exports.isEqual = isEqual;
|
7089
|
-
})(isEqual$2);
|
7090
|
-
return isEqual$2;
|
7091
|
-
}
|
7092
|
-
|
7093
|
-
var isEqual$1;
|
7094
|
-
var hasRequiredIsEqual;
|
7095
|
-
function requireIsEqual() {
|
7096
|
-
if (hasRequiredIsEqual) return isEqual$1;
|
7097
|
-
hasRequiredIsEqual = 1;
|
7098
|
-
isEqual$1 = /*@__PURE__*/ requireIsEqual$1().isEqual;
|
7099
|
-
return isEqual$1;
|
7100
|
-
}
|
7101
|
-
|
7102
|
-
var isEqualExports = /*@__PURE__*/ requireIsEqual();
|
7103
|
-
var isEqual = /*@__PURE__*/getDefaultExportFromCjs(isEqualExports);
|
7104
|
-
|
7105
|
-
var ACCURACY = 1e-4;
|
7106
|
-
var cubicBezierFactor = (c1, c2)=>[
|
7107
|
-
0,
|
7108
|
-
3 * c1,
|
7109
|
-
3 * c2 - 6 * c1,
|
7110
|
-
3 * c1 - 3 * c2 + 1
|
7111
|
-
];
|
7112
|
-
var evaluatePolynomial = (params, t)=>params.map((param, i)=>param * t ** i).reduce((pre, curr)=>pre + curr);
|
7113
|
-
var cubicBezier = (c1, c2)=>(t)=>{
|
7114
|
-
var params = cubicBezierFactor(c1, c2);
|
7115
|
-
return evaluatePolynomial(params, t);
|
7116
|
-
};
|
7117
|
-
var derivativeCubicBezier = (c1, c2)=>(t)=>{
|
7118
|
-
var params = cubicBezierFactor(c1, c2);
|
7119
|
-
var newParams = [
|
7120
|
-
...params.map((param, i)=>param * i).slice(1),
|
7121
|
-
0
|
7122
|
-
];
|
7123
|
-
return evaluatePolynomial(newParams, t);
|
7124
|
-
};
|
7125
|
-
// calculate cubic-bezier using Newton's method
|
7126
|
-
var configBezier = function configBezier() {
|
7127
|
-
var x1, x2, y1, y2;
|
7128
|
-
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
7129
|
-
args[_key] = arguments[_key];
|
7130
|
-
}
|
7131
|
-
if (args.length === 1) {
|
7132
|
-
switch(args[0]){
|
7133
|
-
case 'linear':
|
7134
|
-
[x1, y1, x2, y2] = [
|
7135
|
-
0.0,
|
7136
|
-
0.0,
|
7137
|
-
1.0,
|
7138
|
-
1.0
|
7139
|
-
];
|
7140
|
-
break;
|
7141
|
-
case 'ease':
|
7142
|
-
[x1, y1, x2, y2] = [
|
7143
|
-
0.25,
|
7144
|
-
0.1,
|
7145
|
-
0.25,
|
7146
|
-
1.0
|
7147
|
-
];
|
7148
|
-
break;
|
7149
|
-
case 'ease-in':
|
7150
|
-
[x1, y1, x2, y2] = [
|
7151
|
-
0.42,
|
7152
|
-
0.0,
|
7153
|
-
1.0,
|
7154
|
-
1.0
|
7155
|
-
];
|
7156
|
-
break;
|
7157
|
-
case 'ease-out':
|
7158
|
-
[x1, y1, x2, y2] = [
|
7159
|
-
0.42,
|
7160
|
-
0.0,
|
7161
|
-
0.58,
|
7162
|
-
1.0
|
7163
|
-
];
|
7164
|
-
break;
|
7165
|
-
case 'ease-in-out':
|
7166
|
-
[x1, y1, x2, y2] = [
|
7167
|
-
0.0,
|
7168
|
-
0.0,
|
7169
|
-
0.58,
|
7170
|
-
1.0
|
7171
|
-
];
|
7172
|
-
break;
|
7173
|
-
default:
|
7174
|
-
{
|
7175
|
-
var easing = args[0].split('(');
|
7176
|
-
if (easing[0] === 'cubic-bezier' && easing[1].split(')')[0].split(',').length === 4) {
|
7177
|
-
[x1, y1, x2, y2] = easing[1].split(')')[0].split(',').map((x)=>parseFloat(x));
|
7178
|
-
}
|
7179
|
-
}
|
7180
|
-
}
|
7181
|
-
} else if (args.length === 4) {
|
7182
|
-
[x1, y1, x2, y2] = args;
|
7183
|
-
}
|
7184
|
-
var curveX = cubicBezier(x1, x2);
|
7185
|
-
var curveY = cubicBezier(y1, y2);
|
7186
|
-
var derCurveX = derivativeCubicBezier(x1, x2);
|
7187
|
-
var rangeValue = (value)=>{
|
7188
|
-
if (value > 1) {
|
7189
|
-
return 1;
|
7190
|
-
}
|
7191
|
-
if (value < 0) {
|
7192
|
-
return 0;
|
7193
|
-
}
|
7194
|
-
return value;
|
7195
|
-
};
|
7196
|
-
var bezier = (_t)=>{
|
7197
|
-
var t = _t > 1 ? 1 : _t;
|
7198
|
-
var x = t;
|
7199
|
-
for(var i = 0; i < 8; ++i){
|
7200
|
-
var evalT = curveX(x) - t;
|
7201
|
-
var derVal = derCurveX(x);
|
7202
|
-
if (Math.abs(evalT - t) < ACCURACY || derVal < ACCURACY) {
|
7203
|
-
return curveY(x);
|
7204
|
-
}
|
7205
|
-
x = rangeValue(x - evalT / derVal);
|
7206
|
-
}
|
7207
|
-
return curveY(x);
|
7208
|
-
};
|
7209
|
-
bezier.isStepper = false;
|
7210
|
-
return bezier;
|
7211
|
-
};
|
7212
|
-
var configSpring = function configSpring() {
|
7213
|
-
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7214
|
-
var { stiff = 100, damping = 8, dt = 17 } = config;
|
7215
|
-
var stepper = (currX, destX, currV)=>{
|
7216
|
-
var FSpring = -(currX - destX) * stiff;
|
7217
|
-
var FDamping = currV * damping;
|
7218
|
-
var newV = currV + (FSpring - FDamping) * dt / 1000;
|
7219
|
-
var newX = currV * dt / 1000 + currX;
|
7220
|
-
if (Math.abs(newX - destX) < ACCURACY && Math.abs(newV) < ACCURACY) {
|
7221
|
-
return [
|
7222
|
-
destX,
|
7223
|
-
0
|
7224
|
-
];
|
7225
|
-
}
|
7226
|
-
return [
|
7227
|
-
newX,
|
7228
|
-
newV
|
7229
|
-
];
|
7230
|
-
};
|
7231
|
-
stepper.isStepper = true;
|
7232
|
-
stepper.dt = dt;
|
7233
|
-
return stepper;
|
7234
|
-
};
|
7235
|
-
var configEasing = (easing)=>{
|
7236
|
-
if (typeof easing === 'string') {
|
7237
|
-
switch(easing){
|
7238
|
-
case 'ease':
|
7239
|
-
case 'ease-in-out':
|
7240
|
-
case 'ease-out':
|
7241
|
-
case 'ease-in':
|
7242
|
-
case 'linear':
|
7243
|
-
return configBezier(easing);
|
7244
|
-
case 'spring':
|
7245
|
-
return configSpring();
|
7246
|
-
default:
|
7247
|
-
if (easing.split('(')[0] === 'cubic-bezier') {
|
7248
|
-
return configBezier(easing);
|
7249
|
-
}
|
7250
|
-
}
|
7251
|
-
}
|
7252
|
-
if (typeof easing === 'function') {
|
7253
|
-
return easing;
|
7254
|
-
}
|
7255
|
-
return null;
|
7256
|
-
};
|
6865
|
+
function noop() {}
|
7257
6866
|
|
7258
6867
|
function ownKeys$9(e, r) {
|
7259
6868
|
var t = Object.keys(e);
|
@@ -7455,21 +7064,174 @@ function createTimingUpdate(from, to, easing, duration, interKeys, render, timeo
|
|
7455
7064
|
render(_objectSpread$8(_objectSpread$8(_objectSpread$8({}, from), to), finalStyle));
|
7456
7065
|
}
|
7457
7066
|
};
|
7458
|
-
// return start animation method
|
7459
|
-
return ()=>{
|
7460
|
-
stopAnimation = timeoutController.setTimeout(timingUpdate);
|
7461
|
-
// return stop animation method
|
7462
|
-
return ()=>{
|
7463
|
-
stopAnimation();
|
7464
|
-
};
|
7067
|
+
// return start animation method
|
7068
|
+
return ()=>{
|
7069
|
+
stopAnimation = timeoutController.setTimeout(timingUpdate);
|
7070
|
+
// return stop animation method
|
7071
|
+
return ()=>{
|
7072
|
+
stopAnimation();
|
7073
|
+
};
|
7074
|
+
};
|
7075
|
+
}
|
7076
|
+
// configure update function
|
7077
|
+
// eslint-disable-next-line import/no-default-export
|
7078
|
+
var configUpdate = ((from, to, easing, duration, render, timeoutController)=>{
|
7079
|
+
var interKeys = getIntersectionKeys(from, to);
|
7080
|
+
return easing.isStepper === true ? createStepperUpdate(from, to, easing, interKeys, render, timeoutController) : createTimingUpdate(from, to, easing, duration, interKeys, render, timeoutController);
|
7081
|
+
});
|
7082
|
+
|
7083
|
+
var ACCURACY = 1e-4;
|
7084
|
+
var cubicBezierFactor = (c1, c2)=>[
|
7085
|
+
0,
|
7086
|
+
3 * c1,
|
7087
|
+
3 * c2 - 6 * c1,
|
7088
|
+
3 * c1 - 3 * c2 + 1
|
7089
|
+
];
|
7090
|
+
var evaluatePolynomial = (params, t)=>params.map((param, i)=>param * t ** i).reduce((pre, curr)=>pre + curr);
|
7091
|
+
var cubicBezier = (c1, c2)=>(t)=>{
|
7092
|
+
var params = cubicBezierFactor(c1, c2);
|
7093
|
+
return evaluatePolynomial(params, t);
|
7094
|
+
};
|
7095
|
+
var derivativeCubicBezier = (c1, c2)=>(t)=>{
|
7096
|
+
var params = cubicBezierFactor(c1, c2);
|
7097
|
+
var newParams = [
|
7098
|
+
...params.map((param, i)=>param * i).slice(1),
|
7099
|
+
0
|
7100
|
+
];
|
7101
|
+
return evaluatePolynomial(newParams, t);
|
7102
|
+
};
|
7103
|
+
// calculate cubic-bezier using Newton's method
|
7104
|
+
var configBezier = function configBezier() {
|
7105
|
+
var x1, x2, y1, y2;
|
7106
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
7107
|
+
args[_key] = arguments[_key];
|
7108
|
+
}
|
7109
|
+
if (args.length === 1) {
|
7110
|
+
switch(args[0]){
|
7111
|
+
case 'linear':
|
7112
|
+
[x1, y1, x2, y2] = [
|
7113
|
+
0.0,
|
7114
|
+
0.0,
|
7115
|
+
1.0,
|
7116
|
+
1.0
|
7117
|
+
];
|
7118
|
+
break;
|
7119
|
+
case 'ease':
|
7120
|
+
[x1, y1, x2, y2] = [
|
7121
|
+
0.25,
|
7122
|
+
0.1,
|
7123
|
+
0.25,
|
7124
|
+
1.0
|
7125
|
+
];
|
7126
|
+
break;
|
7127
|
+
case 'ease-in':
|
7128
|
+
[x1, y1, x2, y2] = [
|
7129
|
+
0.42,
|
7130
|
+
0.0,
|
7131
|
+
1.0,
|
7132
|
+
1.0
|
7133
|
+
];
|
7134
|
+
break;
|
7135
|
+
case 'ease-out':
|
7136
|
+
[x1, y1, x2, y2] = [
|
7137
|
+
0.42,
|
7138
|
+
0.0,
|
7139
|
+
0.58,
|
7140
|
+
1.0
|
7141
|
+
];
|
7142
|
+
break;
|
7143
|
+
case 'ease-in-out':
|
7144
|
+
[x1, y1, x2, y2] = [
|
7145
|
+
0.0,
|
7146
|
+
0.0,
|
7147
|
+
0.58,
|
7148
|
+
1.0
|
7149
|
+
];
|
7150
|
+
break;
|
7151
|
+
default:
|
7152
|
+
{
|
7153
|
+
var easing = args[0].split('(');
|
7154
|
+
if (easing[0] === 'cubic-bezier' && easing[1].split(')')[0].split(',').length === 4) {
|
7155
|
+
[x1, y1, x2, y2] = easing[1].split(')')[0].split(',').map((x)=>parseFloat(x));
|
7156
|
+
}
|
7157
|
+
}
|
7158
|
+
}
|
7159
|
+
} else if (args.length === 4) {
|
7160
|
+
[x1, y1, x2, y2] = args;
|
7161
|
+
}
|
7162
|
+
var curveX = cubicBezier(x1, x2);
|
7163
|
+
var curveY = cubicBezier(y1, y2);
|
7164
|
+
var derCurveX = derivativeCubicBezier(x1, x2);
|
7165
|
+
var rangeValue = (value)=>{
|
7166
|
+
if (value > 1) {
|
7167
|
+
return 1;
|
7168
|
+
}
|
7169
|
+
if (value < 0) {
|
7170
|
+
return 0;
|
7171
|
+
}
|
7172
|
+
return value;
|
7173
|
+
};
|
7174
|
+
var bezier = (_t)=>{
|
7175
|
+
var t = _t > 1 ? 1 : _t;
|
7176
|
+
var x = t;
|
7177
|
+
for(var i = 0; i < 8; ++i){
|
7178
|
+
var evalT = curveX(x) - t;
|
7179
|
+
var derVal = derCurveX(x);
|
7180
|
+
if (Math.abs(evalT - t) < ACCURACY || derVal < ACCURACY) {
|
7181
|
+
return curveY(x);
|
7182
|
+
}
|
7183
|
+
x = rangeValue(x - evalT / derVal);
|
7184
|
+
}
|
7185
|
+
return curveY(x);
|
7186
|
+
};
|
7187
|
+
bezier.isStepper = false;
|
7188
|
+
return bezier;
|
7189
|
+
};
|
7190
|
+
var configSpring = function configSpring() {
|
7191
|
+
var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
7192
|
+
var { stiff = 100, damping = 8, dt = 17 } = config;
|
7193
|
+
var stepper = (currX, destX, currV)=>{
|
7194
|
+
var FSpring = -(currX - destX) * stiff;
|
7195
|
+
var FDamping = currV * damping;
|
7196
|
+
var newV = currV + (FSpring - FDamping) * dt / 1000;
|
7197
|
+
var newX = currV * dt / 1000 + currX;
|
7198
|
+
if (Math.abs(newX - destX) < ACCURACY && Math.abs(newV) < ACCURACY) {
|
7199
|
+
return [
|
7200
|
+
destX,
|
7201
|
+
0
|
7202
|
+
];
|
7203
|
+
}
|
7204
|
+
return [
|
7205
|
+
newX,
|
7206
|
+
newV
|
7207
|
+
];
|
7465
7208
|
};
|
7466
|
-
|
7467
|
-
|
7468
|
-
|
7469
|
-
|
7470
|
-
|
7471
|
-
|
7472
|
-
|
7209
|
+
stepper.isStepper = true;
|
7210
|
+
stepper.dt = dt;
|
7211
|
+
return stepper;
|
7212
|
+
};
|
7213
|
+
var configEasing = (easing)=>{
|
7214
|
+
if (typeof easing === 'string') {
|
7215
|
+
switch(easing){
|
7216
|
+
case 'ease':
|
7217
|
+
case 'ease-in-out':
|
7218
|
+
case 'ease-out':
|
7219
|
+
case 'ease-in':
|
7220
|
+
case 'linear':
|
7221
|
+
return configBezier(easing);
|
7222
|
+
case 'spring':
|
7223
|
+
return configSpring();
|
7224
|
+
default:
|
7225
|
+
if (easing.split('(')[0] === 'cubic-bezier') {
|
7226
|
+
return configBezier(easing);
|
7227
|
+
}
|
7228
|
+
}
|
7229
|
+
}
|
7230
|
+
if (typeof easing === 'function') {
|
7231
|
+
return easing;
|
7232
|
+
}
|
7233
|
+
return null;
|
7234
|
+
};
|
7473
7235
|
|
7474
7236
|
/**
|
7475
7237
|
* Represents a single item in the ReactSmoothQueue.
|
@@ -7576,48 +7338,93 @@ function useAnimationManager(animationId, animationManagerFromProps) {
|
|
7576
7338
|
]);
|
7577
7339
|
}
|
7578
7340
|
|
7579
|
-
var
|
7580
|
-
|
7581
|
-
|
7582
|
-
|
7583
|
-
|
7584
|
-
|
7585
|
-
|
7586
|
-
|
7587
|
-
|
7588
|
-
|
7589
|
-
|
7590
|
-
|
7591
|
-
|
7592
|
-
|
7593
|
-
|
7594
|
-
function
|
7595
|
-
|
7596
|
-
|
7597
|
-
|
7598
|
-
|
7341
|
+
var defaultJavascriptAnimateProps = {
|
7342
|
+
begin: 0,
|
7343
|
+
duration: 1000,
|
7344
|
+
easing: 'ease',
|
7345
|
+
isActive: true,
|
7346
|
+
canBegin: true,
|
7347
|
+
onAnimationEnd: ()=>{},
|
7348
|
+
onAnimationStart: ()=>{}
|
7349
|
+
};
|
7350
|
+
var from = {
|
7351
|
+
t: 0
|
7352
|
+
};
|
7353
|
+
var to = {
|
7354
|
+
t: 1
|
7355
|
+
};
|
7356
|
+
function JavascriptAnimate(outsideProps) {
|
7357
|
+
var props = resolveDefaultProps(outsideProps, defaultJavascriptAnimateProps);
|
7358
|
+
var { isActive, canBegin, duration, easing, begin, onAnimationEnd, onAnimationStart, children } = props;
|
7359
|
+
var animationManager = useAnimationManager(props.animationId, props.animationManager);
|
7360
|
+
var [style, setStyle] = useState(isActive ? from : to);
|
7361
|
+
var stopJSAnimation = useRef(null);
|
7362
|
+
useEffect(()=>{
|
7363
|
+
if (!isActive) {
|
7364
|
+
setStyle(to);
|
7599
7365
|
}
|
7600
|
-
|
7601
|
-
|
7602
|
-
|
7603
|
-
|
7604
|
-
|
7605
|
-
|
7606
|
-
|
7607
|
-
var
|
7608
|
-
|
7609
|
-
|
7610
|
-
|
7366
|
+
}, [
|
7367
|
+
isActive
|
7368
|
+
]);
|
7369
|
+
useEffect(()=>{
|
7370
|
+
if (!isActive || !canBegin) {
|
7371
|
+
return noop;
|
7372
|
+
}
|
7373
|
+
var startAnimation = configUpdate(from, to, configEasing(easing), duration, setStyle, animationManager.getTimeoutController());
|
7374
|
+
var onAnimationActive = ()=>{
|
7375
|
+
stopJSAnimation.current = startAnimation();
|
7376
|
+
};
|
7377
|
+
animationManager.start([
|
7378
|
+
onAnimationStart,
|
7379
|
+
begin,
|
7380
|
+
onAnimationActive,
|
7381
|
+
duration,
|
7382
|
+
onAnimationEnd
|
7383
|
+
]);
|
7384
|
+
return ()=>{
|
7385
|
+
animationManager.stop();
|
7386
|
+
if (stopJSAnimation.current) {
|
7387
|
+
stopJSAnimation.current();
|
7388
|
+
}
|
7389
|
+
onAnimationEnd();
|
7390
|
+
};
|
7391
|
+
}, [
|
7392
|
+
isActive,
|
7393
|
+
canBegin,
|
7394
|
+
duration,
|
7395
|
+
easing,
|
7396
|
+
begin,
|
7397
|
+
onAnimationStart,
|
7398
|
+
onAnimationEnd,
|
7399
|
+
animationManager
|
7400
|
+
]);
|
7401
|
+
return children(style.t);
|
7611
7402
|
}
|
7612
|
-
|
7613
|
-
|
7614
|
-
|
7615
|
-
|
7616
|
-
|
7617
|
-
|
7403
|
+
|
7404
|
+
/**
|
7405
|
+
* This hook returns a unique animation id for the object input.
|
7406
|
+
* If input changes (as in, reference equality is different), the animation id will change.
|
7407
|
+
* If input does not change, the animation id will not change.
|
7408
|
+
*
|
7409
|
+
* This is useful for animations. The Animate component
|
7410
|
+
* does have a `shouldReAnimate` prop but that doesn't seem to be doing what the name implies.
|
7411
|
+
* Also, we don't always want to re-animate on every render;
|
7412
|
+
* we only want to re-animate when the input changes. Not the internal state (e.g. `isAnimating`).
|
7413
|
+
*
|
7414
|
+
* @param input The object to check for changes. Uses reference equality (=== operator)
|
7415
|
+
* @param prefix Optional prefix to use for the animation id
|
7416
|
+
* @returns A unique animation id
|
7417
|
+
*/ function useAnimationId(input) {
|
7418
|
+
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'animation-';
|
7419
|
+
var animationId = useRef(uniqueId(prefix));
|
7420
|
+
var prevProps = useRef(input);
|
7421
|
+
if (prevProps.current !== input) {
|
7422
|
+
animationId.current = uniqueId(prefix);
|
7423
|
+
prevProps.current = input;
|
7618
7424
|
}
|
7619
|
-
return
|
7425
|
+
return animationId.current;
|
7620
7426
|
}
|
7427
|
+
|
7621
7428
|
function ownKeys$7(e, r) {
|
7622
7429
|
var t = Object.keys(e);
|
7623
7430
|
if (Object.getOwnPropertySymbols) {
|
@@ -7661,202 +7468,6 @@ function _toPrimitive$7(t, r) {
|
|
7661
7468
|
}
|
7662
7469
|
return ("string" === r ? String : Number)(t);
|
7663
7470
|
}
|
7664
|
-
class AnimateImpl extends PureComponent {
|
7665
|
-
componentDidMount() {
|
7666
|
-
var { isActive, canBegin } = this.props;
|
7667
|
-
this.mounted = true;
|
7668
|
-
if (!isActive || !canBegin) {
|
7669
|
-
return;
|
7670
|
-
}
|
7671
|
-
this.runAnimation(this.props);
|
7672
|
-
}
|
7673
|
-
componentDidUpdate(prevProps) {
|
7674
|
-
var { isActive, canBegin, attributeName, shouldReAnimate, to, from: currentFrom } = this.props;
|
7675
|
-
var { style } = this.state;
|
7676
|
-
if (!canBegin) {
|
7677
|
-
return;
|
7678
|
-
}
|
7679
|
-
if (!isActive) {
|
7680
|
-
var newState = {
|
7681
|
-
style: attributeName ? {
|
7682
|
-
[attributeName]: to
|
7683
|
-
} : to
|
7684
|
-
};
|
7685
|
-
if (this.state && style) {
|
7686
|
-
if (attributeName && style[attributeName] !== to || !attributeName && style !== to) {
|
7687
|
-
this.setState(newState);
|
7688
|
-
}
|
7689
|
-
}
|
7690
|
-
return;
|
7691
|
-
}
|
7692
|
-
if (isEqual(prevProps.to, to) && prevProps.canBegin && prevProps.isActive) {
|
7693
|
-
return;
|
7694
|
-
}
|
7695
|
-
var isTriggered = !prevProps.canBegin || !prevProps.isActive;
|
7696
|
-
this.manager.stop();
|
7697
|
-
if (this.stopJSAnimation) {
|
7698
|
-
this.stopJSAnimation();
|
7699
|
-
}
|
7700
|
-
var from = isTriggered || shouldReAnimate ? currentFrom : prevProps.to;
|
7701
|
-
if (this.state && style) {
|
7702
|
-
var _newState = {
|
7703
|
-
style: attributeName ? {
|
7704
|
-
[attributeName]: from
|
7705
|
-
} : from
|
7706
|
-
};
|
7707
|
-
if (attributeName && style[attributeName] !== from || !attributeName && style !== from) {
|
7708
|
-
this.setState(_newState);
|
7709
|
-
}
|
7710
|
-
}
|
7711
|
-
this.runAnimation(_objectSpread$7(_objectSpread$7({}, this.props), {}, {
|
7712
|
-
from,
|
7713
|
-
begin: 0
|
7714
|
-
}));
|
7715
|
-
}
|
7716
|
-
componentWillUnmount() {
|
7717
|
-
this.mounted = false;
|
7718
|
-
var { onAnimationEnd } = this.props;
|
7719
|
-
if (this.unSubscribe) {
|
7720
|
-
this.unSubscribe();
|
7721
|
-
}
|
7722
|
-
this.manager.stop();
|
7723
|
-
if (this.stopJSAnimation) {
|
7724
|
-
this.stopJSAnimation();
|
7725
|
-
}
|
7726
|
-
if (onAnimationEnd) {
|
7727
|
-
onAnimationEnd();
|
7728
|
-
}
|
7729
|
-
}
|
7730
|
-
handleStyleChange(style) {
|
7731
|
-
this.changeStyle(style);
|
7732
|
-
}
|
7733
|
-
changeStyle(style) {
|
7734
|
-
if (this.mounted) {
|
7735
|
-
this.setState({
|
7736
|
-
style
|
7737
|
-
});
|
7738
|
-
}
|
7739
|
-
}
|
7740
|
-
runJSAnimation(props) {
|
7741
|
-
var { from, to, duration, easing, begin, onAnimationEnd, onAnimationStart } = props;
|
7742
|
-
var startAnimation = configUpdate(from, to, configEasing(easing), duration, this.changeStyle, this.manager.getTimeoutController());
|
7743
|
-
var finalStartAnimation = ()=>{
|
7744
|
-
this.stopJSAnimation = startAnimation();
|
7745
|
-
};
|
7746
|
-
this.manager.start([
|
7747
|
-
onAnimationStart,
|
7748
|
-
begin,
|
7749
|
-
finalStartAnimation,
|
7750
|
-
duration,
|
7751
|
-
onAnimationEnd
|
7752
|
-
]);
|
7753
|
-
}
|
7754
|
-
runAnimation(props) {
|
7755
|
-
var { begin, duration, attributeName, to: propsTo, easing, onAnimationStart, onAnimationEnd, children } = props;
|
7756
|
-
this.unSubscribe = this.manager.subscribe(this.handleStyleChange);
|
7757
|
-
if (typeof easing === 'function' || typeof children === 'function' || easing === 'spring') {
|
7758
|
-
this.runJSAnimation(props);
|
7759
|
-
return;
|
7760
|
-
}
|
7761
|
-
var to = attributeName ? {
|
7762
|
-
[attributeName]: propsTo
|
7763
|
-
} : propsTo;
|
7764
|
-
var transition = getTransitionVal(Object.keys(to), duration, easing);
|
7765
|
-
this.manager.start([
|
7766
|
-
onAnimationStart,
|
7767
|
-
begin,
|
7768
|
-
_objectSpread$7(_objectSpread$7({}, to), {}, {
|
7769
|
-
transition
|
7770
|
-
}),
|
7771
|
-
duration,
|
7772
|
-
onAnimationEnd
|
7773
|
-
]);
|
7774
|
-
}
|
7775
|
-
render() {
|
7776
|
-
var _this$props = this.props, { children, begin, duration, attributeName, easing, isActive, from, to, canBegin, onAnimationEnd, shouldReAnimate, onAnimationReStart, animationManager } = _this$props, others = _objectWithoutProperties(_this$props, _excluded);
|
7777
|
-
var count = Children.count(children);
|
7778
|
-
var stateStyle = this.state.style;
|
7779
|
-
if (typeof children === 'function') {
|
7780
|
-
return children(stateStyle);
|
7781
|
-
}
|
7782
|
-
if (!isActive || count === 0 || duration <= 0) {
|
7783
|
-
return children;
|
7784
|
-
}
|
7785
|
-
var cloneContainer = (container)=>{
|
7786
|
-
var { style = {}, className } = container.props;
|
7787
|
-
var res = /*#__PURE__*/ cloneElement(container, _objectSpread$7(_objectSpread$7({}, others), {}, {
|
7788
|
-
style: _objectSpread$7(_objectSpread$7({}, style), stateStyle),
|
7789
|
-
className
|
7790
|
-
}));
|
7791
|
-
return res;
|
7792
|
-
};
|
7793
|
-
if (count === 1) {
|
7794
|
-
// @ts-expect-error TODO - fix the type error
|
7795
|
-
return cloneContainer(Children.only(children));
|
7796
|
-
}
|
7797
|
-
// @ts-expect-error TODO - fix the type error
|
7798
|
-
return /*#__PURE__*/ React.createElement("div", null, Children.map(children, (child)=>cloneContainer(child)));
|
7799
|
-
}
|
7800
|
-
constructor(props, context){
|
7801
|
-
super(props, context);
|
7802
|
-
_defineProperty$7(this, "mounted", false);
|
7803
|
-
_defineProperty$7(this, "manager", undefined);
|
7804
|
-
_defineProperty$7(this, "stopJSAnimation", null);
|
7805
|
-
_defineProperty$7(this, "unSubscribe", null);
|
7806
|
-
var { isActive, attributeName, from, to, children, duration, animationManager } = this.props;
|
7807
|
-
this.manager = animationManager;
|
7808
|
-
this.handleStyleChange = this.handleStyleChange.bind(this);
|
7809
|
-
this.changeStyle = this.changeStyle.bind(this);
|
7810
|
-
if (!isActive || duration <= 0) {
|
7811
|
-
this.state = {
|
7812
|
-
style: {}
|
7813
|
-
};
|
7814
|
-
// if children is a function and animation is not active, set style to 'to'
|
7815
|
-
if (typeof children === 'function') {
|
7816
|
-
this.state = {
|
7817
|
-
style: to
|
7818
|
-
};
|
7819
|
-
}
|
7820
|
-
return;
|
7821
|
-
}
|
7822
|
-
if (from) {
|
7823
|
-
if (typeof children === 'function') {
|
7824
|
-
this.state = {
|
7825
|
-
style: from
|
7826
|
-
};
|
7827
|
-
return;
|
7828
|
-
}
|
7829
|
-
this.state = {
|
7830
|
-
style: attributeName ? {
|
7831
|
-
[attributeName]: from
|
7832
|
-
} : from
|
7833
|
-
};
|
7834
|
-
} else {
|
7835
|
-
this.state = {
|
7836
|
-
style: {}
|
7837
|
-
};
|
7838
|
-
}
|
7839
|
-
}
|
7840
|
-
}
|
7841
|
-
_defineProperty$7(AnimateImpl, "displayName", 'Animate');
|
7842
|
-
_defineProperty$7(AnimateImpl, "defaultProps", {
|
7843
|
-
begin: 0,
|
7844
|
-
duration: 1000,
|
7845
|
-
attributeName: '',
|
7846
|
-
easing: 'ease',
|
7847
|
-
isActive: true,
|
7848
|
-
canBegin: true,
|
7849
|
-
onAnimationEnd: ()=>{},
|
7850
|
-
onAnimationStart: ()=>{}
|
7851
|
-
});
|
7852
|
-
function Animate(props) {
|
7853
|
-
var _props$attributeName;
|
7854
|
-
var animationManager = useAnimationManager((_props$attributeName = props.attributeName) !== null && _props$attributeName !== void 0 ? _props$attributeName : Object.keys(props.to).join(','), props.animationManager);
|
7855
|
-
return /*#__PURE__*/ React.createElement(AnimateImpl, _extends$3({}, props, {
|
7856
|
-
animationManager: animationManager
|
7857
|
-
}));
|
7858
|
-
}
|
7859
|
-
|
7860
7471
|
function _extends$2() {
|
7861
7472
|
return _extends$2 = Object.assign ? Object.assign.bind() : function(n) {
|
7862
7473
|
for(var e = 1; e < arguments.length; e++){
|
@@ -7940,6 +7551,24 @@ var Rectangle = (rectangleProps)=>{
|
|
7940
7551
|
}, []);
|
7941
7552
|
var { x, y, width, height, radius, className } = props;
|
7942
7553
|
var { animationEasing, animationDuration, animationBegin, isAnimationActive, isUpdateAnimationActive } = props;
|
7554
|
+
var prevWidthRef = useRef(width);
|
7555
|
+
var prevHeightRef = useRef(height);
|
7556
|
+
var prevXRef = useRef(x);
|
7557
|
+
var prevYRef = useRef(y);
|
7558
|
+
var animationIdInput = useMemo(()=>({
|
7559
|
+
x,
|
7560
|
+
y,
|
7561
|
+
width,
|
7562
|
+
height,
|
7563
|
+
radius
|
7564
|
+
}), [
|
7565
|
+
x,
|
7566
|
+
y,
|
7567
|
+
width,
|
7568
|
+
height,
|
7569
|
+
radius
|
7570
|
+
]);
|
7571
|
+
var animationId = useAnimationId(animationIdInput, 'rectangle-');
|
7943
7572
|
if (x !== +x || y !== +y || width !== +width || height !== +height || width === 0 || height === 0) {
|
7944
7573
|
return null;
|
7945
7574
|
}
|
@@ -7950,39 +7579,55 @@ var Rectangle = (rectangleProps)=>{
|
|
7950
7579
|
d: getRectanglePath(x, y, width, height, radius)
|
7951
7580
|
}));
|
7952
7581
|
}
|
7953
|
-
|
7582
|
+
var prevWidth = prevWidthRef.current;
|
7583
|
+
var prevHeight = prevHeightRef.current;
|
7584
|
+
var prevX = prevXRef.current;
|
7585
|
+
var prevY = prevYRef.current;
|
7586
|
+
var from = "0px ".concat(totalLength === -1 ? 1 : totalLength, "px");
|
7587
|
+
var to = "".concat(totalLength, "px 0px");
|
7588
|
+
var transition = getTransitionVal([
|
7589
|
+
'strokeDasharray'
|
7590
|
+
], animationDuration, typeof animationEasing === 'string' ? animationEasing : undefined);
|
7591
|
+
return /*#__PURE__*/ React.createElement(JavascriptAnimate, {
|
7592
|
+
animationId: animationId,
|
7593
|
+
key: animationId,
|
7954
7594
|
canBegin: totalLength > 0,
|
7955
|
-
from: {
|
7956
|
-
width,
|
7957
|
-
height,
|
7958
|
-
x,
|
7959
|
-
y
|
7960
|
-
},
|
7961
|
-
to: {
|
7962
|
-
width,
|
7963
|
-
height,
|
7964
|
-
x,
|
7965
|
-
y
|
7966
|
-
},
|
7967
7595
|
duration: animationDuration,
|
7968
|
-
|
7969
|
-
isActive: isUpdateAnimationActive
|
7970
|
-
|
7971
|
-
|
7972
|
-
|
7973
|
-
|
7974
|
-
|
7975
|
-
|
7976
|
-
|
7977
|
-
|
7978
|
-
|
7979
|
-
|
7980
|
-
|
7981
|
-
}
|
7596
|
+
easing: animationEasing,
|
7597
|
+
isActive: isUpdateAnimationActive,
|
7598
|
+
begin: animationBegin
|
7599
|
+
}, (t)=>{
|
7600
|
+
var currWidth = interpolate$1(prevWidth, width, t);
|
7601
|
+
var currHeight = interpolate$1(prevHeight, height, t);
|
7602
|
+
var currX = interpolate$1(prevX, x, t);
|
7603
|
+
var currY = interpolate$1(prevY, y, t);
|
7604
|
+
if (pathRef.current) {
|
7605
|
+
prevWidthRef.current = currWidth;
|
7606
|
+
prevHeightRef.current = currHeight;
|
7607
|
+
prevXRef.current = currX;
|
7608
|
+
prevYRef.current = currY;
|
7609
|
+
}
|
7610
|
+
var animationStyle;
|
7611
|
+
if (!isAnimationActive) {
|
7612
|
+
animationStyle = {
|
7613
|
+
strokeDasharray: to
|
7614
|
+
};
|
7615
|
+
} else if (t > 0) {
|
7616
|
+
animationStyle = {
|
7617
|
+
transition,
|
7618
|
+
strokeDasharray: to
|
7619
|
+
};
|
7620
|
+
} else {
|
7621
|
+
animationStyle = {
|
7622
|
+
strokeDasharray: from
|
7623
|
+
};
|
7624
|
+
}
|
7625
|
+
return /*#__PURE__*/ React.createElement("path", _extends$2({}, filterProps(props, true), {
|
7982
7626
|
className: layerClass,
|
7983
7627
|
d: getRectanglePath(currX, currY, currWidth, currHeight, radius),
|
7984
|
-
ref: pathRef
|
7985
|
-
|
7628
|
+
ref: pathRef,
|
7629
|
+
style: _objectSpread$7(_objectSpread$7({}, animationStyle), props.style)
|
7630
|
+
}));
|
7986
7631
|
});
|
7987
7632
|
};
|
7988
7633
|
|
@@ -13605,7 +13250,7 @@ createSelector([
|
|
13605
13250
|
outerRadius,
|
13606
13251
|
startAngle,
|
13607
13252
|
endAngle,
|
13608
|
-
clockWise: false
|
13253
|
+
clockWise: false // this property look useful, why not use it?
|
13609
13254
|
};
|
13610
13255
|
});
|
13611
13256
|
|
@@ -13642,6 +13287,9 @@ var selectTooltipAxis = (state)=>{
|
|
13642
13287
|
var axisId = selectTooltipAxisId(state);
|
13643
13288
|
return selectAxisSettings(state, axisType, axisId);
|
13644
13289
|
};
|
13290
|
+
var selectTooltipAxisDataKey = createSelector([
|
13291
|
+
selectTooltipAxis
|
13292
|
+
], (axis)=>axis === null || axis === void 0 ? void 0 : axis.dataKey);
|
13645
13293
|
|
13646
13294
|
/**
|
13647
13295
|
* In a stacked chart, each graphical item has its own data. That data could be either:
|
@@ -13654,7 +13302,7 @@ var selectTooltipAxis = (state)=>{
|
|
13654
13302
|
* and the value is the numeric value for that series using the numerical axis dataKey.
|
13655
13303
|
*/ function combineDisplayedStackedData(stackedGraphicalItems, _ref, tooltipAxisSettings) {
|
13656
13304
|
var { chartData = [] } = _ref;
|
13657
|
-
var
|
13305
|
+
var { allowDuplicatedCategory, dataKey: tooltipDataKey } = tooltipAxisSettings;
|
13658
13306
|
// A map of tooltip data keys to the stacked data points
|
13659
13307
|
var knownItemsByDataKey = new Map();
|
13660
13308
|
stackedGraphicalItems.forEach((item)=>{
|
@@ -13667,7 +13315,7 @@ var selectTooltipAxis = (state)=>{
|
|
13667
13315
|
}
|
13668
13316
|
var stackIdentifier = getStackSeriesIdentifier(item);
|
13669
13317
|
resolvedData.forEach((entry, index)=>{
|
13670
|
-
var tooltipValue = tooltipDataKey == null ? index : String(getValueByDataKey(entry, tooltipDataKey, null));
|
13318
|
+
var tooltipValue = tooltipDataKey == null || allowDuplicatedCategory ? index : String(getValueByDataKey(entry, tooltipDataKey, null));
|
13671
13319
|
var numericValue = getValueByDataKey(entry, item.dataKey, 0);
|
13672
13320
|
var curr;
|
13673
13321
|
if (knownItemsByDataKey.has(tooltipValue)) {
|
@@ -13780,8 +13428,11 @@ var defaultNumericDomain = [
|
|
13780
13428
|
type: 'category',
|
13781
13429
|
unit: undefined
|
13782
13430
|
};
|
13431
|
+
var selectXAxisSettingsNoDefaults = (state, axisId)=>{
|
13432
|
+
return state.cartesianAxis.xAxis[axisId];
|
13433
|
+
};
|
13783
13434
|
var selectXAxisSettings = (state, axisId)=>{
|
13784
|
-
var axis = state
|
13435
|
+
var axis = selectXAxisSettingsNoDefaults(state, axisId);
|
13785
13436
|
if (axis == null) {
|
13786
13437
|
return implicitXAxis;
|
13787
13438
|
}
|
@@ -13820,8 +13471,11 @@ var selectXAxisSettings = (state, axisId)=>{
|
|
13820
13471
|
unit: undefined,
|
13821
13472
|
width: DEFAULT_Y_AXIS_WIDTH
|
13822
13473
|
};
|
13474
|
+
var selectYAxisSettingsNoDefaults = (state, axisId)=>{
|
13475
|
+
return state.cartesianAxis.yAxis[axisId];
|
13476
|
+
};
|
13823
13477
|
var selectYAxisSettings = (state, axisId)=>{
|
13824
|
-
var axis = state
|
13478
|
+
var axis = selectYAxisSettingsNoDefaults(state, axisId);
|
13825
13479
|
if (axis == null) {
|
13826
13480
|
return implicitYAxis;
|
13827
13481
|
}
|
@@ -14707,7 +14361,7 @@ var combineYAxisPositionStartingPoint = (offset, orientation, chartWidth)=>{
|
|
14707
14361
|
return 0;
|
14708
14362
|
}
|
14709
14363
|
};
|
14710
|
-
createSelector(selectChartHeight, selectChartOffsetInternal, selectAllXAxesWithOffsetType, pickAxisOrientation, pickMirror, (chartHeight, offset, allAxesWithSameOffsetType, orientation, mirror)=>{
|
14364
|
+
var selectAllXAxesOffsetSteps = createSelector(selectChartHeight, selectChartOffsetInternal, selectAllXAxesWithOffsetType, pickAxisOrientation, pickMirror, (chartHeight, offset, allAxesWithSameOffsetType, orientation, mirror)=>{
|
14711
14365
|
var steps = {};
|
14712
14366
|
var position;
|
14713
14367
|
allAxesWithSameOffsetType.forEach((axis)=>{
|
@@ -14721,7 +14375,7 @@ createSelector(selectChartHeight, selectChartOffsetInternal, selectAllXAxesWithO
|
|
14721
14375
|
});
|
14722
14376
|
return steps;
|
14723
14377
|
});
|
14724
|
-
createSelector(selectChartWidth, selectChartOffsetInternal, selectAllYAxesWithOffsetType, pickAxisOrientation, pickMirror, (chartWidth, offset, allAxesWithSameOffsetType, orientation, mirror)=>{
|
14378
|
+
var selectAllYAxesOffsetSteps = createSelector(selectChartWidth, selectChartOffsetInternal, selectAllYAxesWithOffsetType, pickAxisOrientation, pickMirror, (chartWidth, offset, allAxesWithSameOffsetType, orientation, mirror)=>{
|
14725
14379
|
var steps = {};
|
14726
14380
|
var position;
|
14727
14381
|
allAxesWithSameOffsetType.forEach((axis)=>{
|
@@ -14735,6 +14389,62 @@ createSelector(selectChartWidth, selectChartOffsetInternal, selectAllYAxesWithOf
|
|
14735
14389
|
});
|
14736
14390
|
return steps;
|
14737
14391
|
});
|
14392
|
+
var selectXAxisOffsetSteps = (state, axisId)=>{
|
14393
|
+
var axisSettings = selectXAxisSettings(state, axisId);
|
14394
|
+
if (axisSettings == null) {
|
14395
|
+
return undefined;
|
14396
|
+
}
|
14397
|
+
return selectAllXAxesOffsetSteps(state, axisSettings.orientation, axisSettings.mirror);
|
14398
|
+
};
|
14399
|
+
createSelector([
|
14400
|
+
selectChartOffsetInternal,
|
14401
|
+
selectXAxisSettings,
|
14402
|
+
selectXAxisOffsetSteps,
|
14403
|
+
(_, axisId)=>axisId
|
14404
|
+
], (offset, axisSettings, allSteps, axisId)=>{
|
14405
|
+
if (axisSettings == null) {
|
14406
|
+
return undefined;
|
14407
|
+
}
|
14408
|
+
var stepOfThisAxis = allSteps === null || allSteps === void 0 ? void 0 : allSteps[axisId];
|
14409
|
+
if (stepOfThisAxis == null) {
|
14410
|
+
return {
|
14411
|
+
x: offset.left,
|
14412
|
+
y: 0
|
14413
|
+
};
|
14414
|
+
}
|
14415
|
+
return {
|
14416
|
+
x: offset.left,
|
14417
|
+
y: stepOfThisAxis
|
14418
|
+
};
|
14419
|
+
});
|
14420
|
+
var selectYAxisOffsetSteps = (state, axisId)=>{
|
14421
|
+
var axisSettings = selectYAxisSettings(state, axisId);
|
14422
|
+
if (axisSettings == null) {
|
14423
|
+
return undefined;
|
14424
|
+
}
|
14425
|
+
return selectAllYAxesOffsetSteps(state, axisSettings.orientation, axisSettings.mirror);
|
14426
|
+
};
|
14427
|
+
createSelector([
|
14428
|
+
selectChartOffsetInternal,
|
14429
|
+
selectYAxisSettings,
|
14430
|
+
selectYAxisOffsetSteps,
|
14431
|
+
(_, axisId)=>axisId
|
14432
|
+
], (offset, axisSettings, allSteps, axisId)=>{
|
14433
|
+
if (axisSettings == null) {
|
14434
|
+
return undefined;
|
14435
|
+
}
|
14436
|
+
var stepOfThisAxis = allSteps === null || allSteps === void 0 ? void 0 : allSteps[axisId];
|
14437
|
+
if (stepOfThisAxis == null) {
|
14438
|
+
return {
|
14439
|
+
x: 0,
|
14440
|
+
y: offset.top
|
14441
|
+
};
|
14442
|
+
}
|
14443
|
+
return {
|
14444
|
+
x: stepOfThisAxis,
|
14445
|
+
y: offset.top
|
14446
|
+
};
|
14447
|
+
});
|
14738
14448
|
createSelector(selectChartOffsetInternal, selectYAxisSettings, (offset, axisSettings)=>{
|
14739
14449
|
var width = typeof axisSettings.width === 'number' ? axisSettings.width : DEFAULT_Y_AXIS_WIDTH;
|
14740
14450
|
return {
|
@@ -15392,7 +15102,7 @@ function selectFinalData(dataDefinedOnItem, dataDefinedOnChart) {
|
|
15392
15102
|
}
|
15393
15103
|
return dataDefinedOnChart;
|
15394
15104
|
}
|
15395
|
-
var combineTooltipPayload = (tooltipPayloadConfigurations, activeIndex, chartDataState,
|
15105
|
+
var combineTooltipPayload = (tooltipPayloadConfigurations, activeIndex, chartDataState, tooltipAxisDataKey, activeLabel, tooltipPayloadSearcher, tooltipEventType)=>{
|
15396
15106
|
if (activeIndex == null || tooltipPayloadSearcher == null) {
|
15397
15107
|
return undefined;
|
15398
15108
|
}
|
@@ -15403,11 +15113,11 @@ var combineTooltipPayload = (tooltipPayloadConfigurations, activeIndex, chartDat
|
|
15403
15113
|
var { dataDefinedOnItem, settings } = _ref;
|
15404
15114
|
var finalData = selectFinalData(dataDefinedOnItem, chartData);
|
15405
15115
|
var sliced = Array.isArray(finalData) ? getSliced(finalData, dataStartIndex, dataEndIndex) : finalData;
|
15406
|
-
var finalDataKey = (_settings$dataKey = settings === null || settings === void 0 ? void 0 : settings.dataKey) !== null && _settings$dataKey !== void 0 ? _settings$dataKey :
|
15116
|
+
var finalDataKey = (_settings$dataKey = settings === null || settings === void 0 ? void 0 : settings.dataKey) !== null && _settings$dataKey !== void 0 ? _settings$dataKey : tooltipAxisDataKey;
|
15407
15117
|
// BaseAxisProps does not support nameKey but it could!
|
15408
15118
|
var finalNameKey = settings === null || settings === void 0 ? void 0 : settings.nameKey; // ?? tooltipAxis?.nameKey;
|
15409
15119
|
var tooltipPayload;
|
15410
|
-
if (
|
15120
|
+
if (tooltipAxisDataKey && Array.isArray(sliced) && /*
|
15411
15121
|
* findEntryInArray won't work for Scatter because Scatter provides an array of arrays
|
15412
15122
|
* as tooltip payloads and findEntryInArray is not prepared to handle that.
|
15413
15123
|
* Sad but also ScatterChart only allows 'item' tooltipEventType
|
@@ -15427,7 +15137,7 @@ var combineTooltipPayload = (tooltipPayloadConfigurations, activeIndex, chartDat
|
|
15427
15137
|
* because we get the index from interacting over the individual elements
|
15428
15138
|
* which is always accurate, irrespective of the allowDuplicatedCategory setting.
|
15429
15139
|
*/ tooltipEventType === 'axis') {
|
15430
|
-
tooltipPayload = findEntryInArray(sliced,
|
15140
|
+
tooltipPayload = findEntryInArray(sliced, tooltipAxisDataKey, activeLabel);
|
15431
15141
|
} else {
|
15432
15142
|
/*
|
15433
15143
|
* This is a problem because it assumes that the index is pointing to the displayed data
|
@@ -15735,7 +15445,7 @@ var selectActiveTooltipPayload = createSelector([
|
|
15735
15445
|
selectTooltipPayloadConfigurations$1,
|
15736
15446
|
selectActiveTooltipIndex,
|
15737
15447
|
selectChartDataWithIndexes,
|
15738
|
-
|
15448
|
+
selectTooltipAxisDataKey,
|
15739
15449
|
selectActiveLabel$1,
|
15740
15450
|
selectTooltipPayloadSearcher,
|
15741
15451
|
selectTooltipEventType
|
@@ -15864,7 +15574,7 @@ var selectTooltipPayload = createSelector([
|
|
15864
15574
|
selectTooltipPayloadConfigurations,
|
15865
15575
|
selectActiveIndex,
|
15866
15576
|
selectChartDataWithIndexes,
|
15867
|
-
|
15577
|
+
selectTooltipAxisDataKey,
|
15868
15578
|
selectActiveLabel,
|
15869
15579
|
selectTooltipPayloadSearcher,
|
15870
15580
|
pickTooltipEventType
|