@aveonline/ui-react 2.19.7 → 2.19.9
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.
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { XAxisProps } from 'recharts';
|
|
1
|
+
import { XAxisProps, YAxisProps } from 'recharts';
|
|
2
2
|
import { CurveType } from 'recharts/types/shape/Curve';
|
|
3
3
|
export interface ILineConfig {
|
|
4
4
|
dataKey: string;
|
|
5
5
|
stroke: string;
|
|
6
6
|
}
|
|
7
|
+
export interface IPercentageData {
|
|
8
|
+
dataKey: string;
|
|
9
|
+
percentage: number;
|
|
10
|
+
}
|
|
7
11
|
export interface IPropsLine<T> {
|
|
8
12
|
data: T[];
|
|
9
13
|
width: number;
|
|
10
14
|
height: number;
|
|
11
15
|
xaxis: XAxisProps;
|
|
16
|
+
yaxis: YAxisProps;
|
|
12
17
|
type?: CurveType;
|
|
13
18
|
strokeDasharray?: string;
|
|
14
19
|
linesConfig: ILineConfig[];
|
|
15
20
|
isLoading?: boolean;
|
|
21
|
+
yAxisTickFormatter?: (tick: number) => string;
|
|
22
|
+
percentageData?: IPercentageData[];
|
|
23
|
+
simbol?: string;
|
|
16
24
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { IPropsLine } from './ILine';
|
|
2
|
-
export default function Line<T>({ data, width, height, linesConfig, xaxis, type, strokeDasharray, isLoading }: IPropsLine<T>
|
|
2
|
+
export default function Line<T>({ data, width, height, linesConfig, xaxis, yaxis, type, strokeDasharray, isLoading, simbol, yAxisTickFormatter }: IPropsLine<T> & {
|
|
3
|
+
yAxisTickFormatter?: (tick: number) => string;
|
|
4
|
+
simbol?: string;
|
|
5
|
+
}): JSX.Element;
|
package/dist/ui-react.mjs
CHANGED
|
@@ -11087,7 +11087,6 @@ function wue({
|
|
|
11087
11087
|
{
|
|
11088
11088
|
placement: "right",
|
|
11089
11089
|
withClick: !0,
|
|
11090
|
-
asChild: !0,
|
|
11091
11090
|
description: A,
|
|
11092
11091
|
children: /* @__PURE__ */ m.jsx(
|
|
11093
11092
|
lt,
|
|
@@ -11117,7 +11116,7 @@ function wue({
|
|
|
11117
11116
|
),
|
|
11118
11117
|
children: [
|
|
11119
11118
|
v,
|
|
11120
|
-
b && A && /* @__PURE__ */ m.jsx(Yl, { placement: "right", withClick: !0, description: A,
|
|
11119
|
+
b && A && /* @__PURE__ */ m.jsx(Yl, { placement: "right", withClick: !0, description: A, children: /* @__PURE__ */ m.jsx(
|
|
11121
11120
|
lt,
|
|
11122
11121
|
{
|
|
11123
11122
|
kind: "info",
|
|
@@ -41851,23 +41850,26 @@ function Kue({
|
|
|
41851
41850
|
height: n,
|
|
41852
41851
|
linesConfig: r,
|
|
41853
41852
|
xaxis: i,
|
|
41854
|
-
|
|
41855
|
-
|
|
41856
|
-
|
|
41853
|
+
yaxis: a,
|
|
41854
|
+
type: o = "linear",
|
|
41855
|
+
strokeDasharray: s = "3 3",
|
|
41856
|
+
isLoading: l = !1,
|
|
41857
|
+
simbol: u,
|
|
41858
|
+
yAxisTickFormatter: c = (f) => `${f}` || `${u}`
|
|
41857
41859
|
}) {
|
|
41858
|
-
return
|
|
41859
|
-
/* @__PURE__ */ m.jsx(lc, { strokeDasharray:
|
|
41860
|
+
return l ? /* @__PURE__ */ m.jsx("div", { className: "flex flex-col items-center gap-y-3 justify-center text-center rounded-b-sm border-border-subdued", children: /* @__PURE__ */ m.jsx("div", { className: "py-8", children: /* @__PURE__ */ m.jsx(ya, { size: "lg" }) }) }) : /* @__PURE__ */ m.jsxs(Yie, { width: t, height: n, data: e, children: [
|
|
41861
|
+
/* @__PURE__ */ m.jsx(lc, { strokeDasharray: s }),
|
|
41860
41862
|
/* @__PURE__ */ m.jsx(gi, { ...i }),
|
|
41861
|
-
/* @__PURE__ */ m.jsx(hi, {}),
|
|
41862
|
-
/* @__PURE__ */ m.jsx(ti, {}),
|
|
41863
|
-
r.map((
|
|
41863
|
+
/* @__PURE__ */ m.jsx(hi, { ...a, tickFormatter: c }),
|
|
41864
|
+
/* @__PURE__ */ m.jsx(ti, { formatter: (f) => `${f} ${u}` }),
|
|
41865
|
+
r.map((f, d) => /* @__PURE__ */ m.jsx(
|
|
41864
41866
|
uc,
|
|
41865
41867
|
{
|
|
41866
|
-
type:
|
|
41867
|
-
dataKey:
|
|
41868
|
-
stroke:
|
|
41868
|
+
type: o,
|
|
41869
|
+
dataKey: f.dataKey,
|
|
41870
|
+
stroke: f.stroke
|
|
41869
41871
|
},
|
|
41870
|
-
|
|
41872
|
+
d
|
|
41871
41873
|
))
|
|
41872
41874
|
] });
|
|
41873
41875
|
}
|