tekivex-ui 2.5.2 → 2.5.4
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/TkxForm-DSMDo2Ol.js +388 -0
- package/dist/TkxForm-DwV_n-eE.cjs +12 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.js +324 -301
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +396 -195
- package/dist/i18n.cjs +1 -0
- package/dist/i18n.js +757 -0
- package/dist/index.cjs +27 -22
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4994 -5089
- package/dist/quantum.cjs +91 -0
- package/dist/quantum.js +2312 -0
- package/dist/realtime.cjs +25 -0
- package/dist/realtime.js +944 -0
- package/dist/security-C369oOWH.cjs +1 -0
- package/dist/security-CzAmaMqa.js +97 -0
- package/dist/src/charts/TkxDonutChart.d.ts.map +1 -1
- package/dist/src/charts/TkxPieChart.d.ts.map +1 -1
- package/dist/src/components/TkxDataGrid.d.ts +9 -1
- package/dist/src/components/TkxDataGrid.d.ts.map +1 -1
- package/dist/src/components/TkxDropdown.d.ts +41 -0
- package/dist/src/components/TkxDropdown.d.ts.map +1 -0
- package/dist/src/components/TkxLiveFeed.d.ts +891 -0
- package/dist/src/components/TkxLiveFeed.d.ts.map +1 -0
- package/dist/src/components/TkxLiveLog.d.ts +892 -0
- package/dist/src/components/TkxLiveLog.d.ts.map +1 -0
- package/dist/src/components/TkxLiveMetrics.d.ts +24 -0
- package/dist/src/components/TkxLiveMetrics.d.ts.map +1 -0
- package/dist/src/components/TkxPlayground.d.ts +15 -0
- package/dist/src/components/TkxPlayground.d.ts.map +1 -0
- package/dist/src/components/TkxQuantumForm.d.ts +20 -0
- package/dist/src/components/TkxQuantumForm.d.ts.map +1 -0
- package/dist/src/components/TkxRealTimeChart.d.ts +27 -0
- package/dist/src/components/TkxRealTimeChart.d.ts.map +1 -0
- package/dist/src/components/TkxTable.d.ts +11 -1
- package/dist/src/components/TkxTable.d.ts.map +1 -1
- package/dist/src/components/TkxThemeBuilder.d.ts +9 -0
- package/dist/src/components/TkxThemeBuilder.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/engine/index.d.ts +2 -0
- package/dist/src/engine/index.d.ts.map +1 -1
- package/dist/src/engine/quantum-ai.d.ts +201 -0
- package/dist/src/engine/quantum-ai.d.ts.map +1 -0
- package/dist/src/engine/tkx.d.ts.map +1 -1
- package/dist/src/headless/index.d.ts +6 -0
- package/dist/src/headless/index.d.ts.map +1 -1
- package/dist/src/headless/useInfiniteQuery.d.ts +35 -0
- package/dist/src/headless/useInfiniteQuery.d.ts.map +1 -0
- package/dist/src/headless/useSSE.d.ts +36 -0
- package/dist/src/headless/useSSE.d.ts.map +1 -0
- package/dist/src/headless/useWebSocket.d.ts +33 -0
- package/dist/src/headless/useWebSocket.d.ts.map +1 -0
- package/dist/src/quantum/index.d.ts +9 -0
- package/dist/src/quantum/index.d.ts.map +1 -0
- package/dist/src/realtime/index.d.ts +9 -0
- package/dist/src/realtime/index.d.ts.map +1 -0
- package/dist/{TkxForm-BWK4LqY3.js → tkx-BJ10JtMv.js} +372 -721
- package/dist/tkx-BeNyC0w7.cjs +4 -0
- package/package.json +16 -1
- package/src/charts/TkxDonutChart.tsx +15 -2
- package/src/charts/TkxPieChart.tsx +17 -2
- package/src/components/TkxDataGrid.tsx +72 -0
- package/src/components/TkxDropdown.tsx +802 -0
- package/src/components/TkxLiveFeed.tsx +329 -0
- package/src/components/TkxLiveLog.tsx +470 -0
- package/src/components/TkxLiveMetrics.tsx +291 -0
- package/src/components/TkxPlayground.tsx +736 -0
- package/src/components/TkxQuantumForm.tsx +592 -0
- package/src/components/TkxRealTimeChart.tsx +381 -0
- package/src/components/TkxTable.tsx +351 -77
- package/src/components/TkxThemeBuilder.tsx +685 -0
- package/src/components/index.ts +4 -0
- package/src/engine/index.ts +2 -0
- package/src/engine/quantum-ai.ts +1045 -0
- package/src/engine/tkx.ts +95 -4
- package/src/headless/index.ts +6 -0
- package/src/headless/useInfiniteQuery.ts +153 -0
- package/src/headless/useSSE.ts +165 -0
- package/src/headless/useWebSocket.ts +229 -0
- package/src/quantum/index.ts +39 -0
- package/src/realtime/index.ts +21 -0
- package/dist/TkxForm-ljQjX7KD.cjs +0 -15
package/dist/charts.js
CHANGED
|
@@ -1,235 +1,236 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { ResponsiveContainer as
|
|
1
|
+
import { jsx as t, jsxs as g, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { ResponsiveContainer as v, AreaChart as j, CartesianGrid as D, XAxis as F, YAxis as K, Tooltip as L, Legend as w, Area as E, BarChart as G, Bar as q, LineChart as H, ReferenceLine as N, Line as U, PieChart as P, Pie as B, Cell as I, ScatterChart as V, ZAxis as X, Scatter as Y, RadarChart as Z, PolarGrid as _, PolarAngleAxis as J, PolarRadiusAxis as Q, Radar as tt } from "recharts";
|
|
3
3
|
import { u as z } from "./index-eT_U4qB2.js";
|
|
4
|
-
|
|
4
|
+
import { useState as O, useEffect as $ } from "react";
|
|
5
|
+
function C(r) {
|
|
5
6
|
return [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
r.primary,
|
|
8
|
+
r.secondary,
|
|
9
|
+
r.info,
|
|
10
|
+
r.success,
|
|
11
|
+
r.warning,
|
|
12
|
+
r.danger,
|
|
12
13
|
"#a855f7",
|
|
13
14
|
"#f97316",
|
|
14
15
|
"#14b8a6",
|
|
15
16
|
"#e879f9"
|
|
16
17
|
];
|
|
17
18
|
}
|
|
18
|
-
const
|
|
19
|
-
function M(
|
|
19
|
+
const T = { top: 10, right: 30, bottom: 10, left: 0 };
|
|
20
|
+
function M(r) {
|
|
20
21
|
return {
|
|
21
22
|
contentStyle: {
|
|
22
|
-
backgroundColor:
|
|
23
|
-
border: `1px solid ${
|
|
23
|
+
backgroundColor: r.surface,
|
|
24
|
+
border: `1px solid ${r.border}`,
|
|
24
25
|
borderRadius: 8,
|
|
25
26
|
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
26
|
-
color:
|
|
27
|
+
color: r.text,
|
|
27
28
|
fontSize: 13
|
|
28
29
|
},
|
|
29
|
-
labelStyle: { color:
|
|
30
|
-
itemStyle: { color:
|
|
31
|
-
cursor: { fill: `${
|
|
30
|
+
labelStyle: { color: r.textMuted, fontWeight: 600, marginBottom: 4 },
|
|
31
|
+
itemStyle: { color: r.text },
|
|
32
|
+
cursor: { fill: `${r.primary}15` }
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
data:
|
|
36
|
-
series:
|
|
37
|
-
xKey:
|
|
38
|
-
height:
|
|
39
|
-
margin: d =
|
|
40
|
-
showGrid:
|
|
41
|
-
showLegend:
|
|
35
|
+
function ot({
|
|
36
|
+
data: r,
|
|
37
|
+
series: m,
|
|
38
|
+
xKey: h,
|
|
39
|
+
height: S = 300,
|
|
40
|
+
margin: d = T,
|
|
41
|
+
showGrid: y = !0,
|
|
42
|
+
showLegend: k = !0,
|
|
42
43
|
showTooltip: p = !0,
|
|
43
44
|
smooth: o = !0,
|
|
44
|
-
xTickFormatter:
|
|
45
|
-
yTickFormatter:
|
|
46
|
-
yDomain:
|
|
47
|
-
ariaLabel:
|
|
45
|
+
xTickFormatter: u,
|
|
46
|
+
yTickFormatter: i,
|
|
47
|
+
yDomain: a,
|
|
48
|
+
ariaLabel: s = "Area chart"
|
|
48
49
|
}) {
|
|
49
|
-
const
|
|
50
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
51
|
-
|
|
50
|
+
const e = z(), c = C(e), l = M(e), x = { fill: e.textMuted, fontSize: 12 };
|
|
51
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": s, style: { width: "100%", height: S }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(j, { data: r, margin: d, children: [
|
|
52
|
+
y && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke: e.border, vertical: !1 }),
|
|
52
53
|
/* @__PURE__ */ t(
|
|
53
|
-
|
|
54
|
+
F,
|
|
54
55
|
{
|
|
55
|
-
dataKey:
|
|
56
|
-
tick:
|
|
57
|
-
axisLine: { stroke:
|
|
56
|
+
dataKey: h,
|
|
57
|
+
tick: x,
|
|
58
|
+
axisLine: { stroke: e.border },
|
|
58
59
|
tickLine: !1,
|
|
59
|
-
tickFormatter:
|
|
60
|
+
tickFormatter: u
|
|
60
61
|
}
|
|
61
62
|
),
|
|
62
63
|
/* @__PURE__ */ t(
|
|
63
|
-
|
|
64
|
+
K,
|
|
64
65
|
{
|
|
65
|
-
tick:
|
|
66
|
+
tick: x,
|
|
66
67
|
axisLine: !1,
|
|
67
68
|
tickLine: !1,
|
|
68
|
-
tickFormatter:
|
|
69
|
-
domain:
|
|
69
|
+
tickFormatter: i,
|
|
70
|
+
domain: a
|
|
70
71
|
}
|
|
71
72
|
),
|
|
72
73
|
p && /* @__PURE__ */ t(
|
|
73
|
-
|
|
74
|
+
L,
|
|
74
75
|
{
|
|
75
|
-
contentStyle:
|
|
76
|
-
labelStyle:
|
|
77
|
-
itemStyle:
|
|
78
|
-
cursor:
|
|
76
|
+
contentStyle: l.contentStyle,
|
|
77
|
+
labelStyle: l.labelStyle,
|
|
78
|
+
itemStyle: l.itemStyle,
|
|
79
|
+
cursor: l.cursor
|
|
79
80
|
}
|
|
80
81
|
),
|
|
81
|
-
|
|
82
|
+
k && /* @__PURE__ */ t(
|
|
82
83
|
w,
|
|
83
84
|
{
|
|
84
|
-
wrapperStyle: { fontSize: 13, color:
|
|
85
|
+
wrapperStyle: { fontSize: 13, color: e.textMuted, paddingTop: 8 }
|
|
85
86
|
}
|
|
86
87
|
),
|
|
87
|
-
|
|
88
|
-
const n =
|
|
88
|
+
m.map((f, b) => {
|
|
89
|
+
const n = f.color ?? c[b % c.length];
|
|
89
90
|
return /* @__PURE__ */ t(
|
|
90
|
-
|
|
91
|
+
E,
|
|
91
92
|
{
|
|
92
93
|
type: o ? "monotone" : "linear",
|
|
93
|
-
dataKey:
|
|
94
|
-
name:
|
|
94
|
+
dataKey: f.key,
|
|
95
|
+
name: f.label ?? f.key,
|
|
95
96
|
stroke: n,
|
|
96
97
|
strokeWidth: 2,
|
|
97
98
|
fill: n,
|
|
98
|
-
fillOpacity:
|
|
99
|
-
stackId:
|
|
99
|
+
fillOpacity: f.fillOpacity ?? 0.2,
|
|
100
|
+
stackId: f.stacked ? "stack" : void 0,
|
|
100
101
|
dot: !1,
|
|
101
102
|
activeDot: { r: 5, strokeWidth: 0 }
|
|
102
103
|
},
|
|
103
|
-
|
|
104
|
+
f.key
|
|
104
105
|
);
|
|
105
106
|
})
|
|
106
107
|
] }) }) });
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
-
data:
|
|
110
|
-
series:
|
|
111
|
-
xKey:
|
|
112
|
-
height:
|
|
113
|
-
margin: d =
|
|
114
|
-
showGrid:
|
|
115
|
-
showLegend:
|
|
109
|
+
function at({
|
|
110
|
+
data: r,
|
|
111
|
+
series: m,
|
|
112
|
+
xKey: h,
|
|
113
|
+
height: S = 300,
|
|
114
|
+
margin: d = T,
|
|
115
|
+
showGrid: y = !0,
|
|
116
|
+
showLegend: k = !0,
|
|
116
117
|
showTooltip: p = !0,
|
|
117
118
|
layout: o = "horizontal",
|
|
118
|
-
barSize:
|
|
119
|
-
xTickFormatter:
|
|
120
|
-
yTickFormatter:
|
|
121
|
-
ariaLabel:
|
|
119
|
+
barSize: u,
|
|
120
|
+
xTickFormatter: i,
|
|
121
|
+
yTickFormatter: a,
|
|
122
|
+
ariaLabel: s = "Bar chart"
|
|
122
123
|
}) {
|
|
123
|
-
const
|
|
124
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
const e = z(), c = C(e), l = M(e), x = { fill: e.textMuted, fontSize: 12 }, f = o === "vertical";
|
|
125
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": s, style: { width: "100%", height: S }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(G, { data: r, margin: d, layout: o, children: [
|
|
126
|
+
y && /* @__PURE__ */ t(
|
|
127
|
+
D,
|
|
127
128
|
{
|
|
128
129
|
strokeDasharray: "3 3",
|
|
129
|
-
stroke:
|
|
130
|
-
vertical:
|
|
131
|
-
horizontal: !
|
|
130
|
+
stroke: e.border,
|
|
131
|
+
vertical: f,
|
|
132
|
+
horizontal: !f
|
|
132
133
|
}
|
|
133
134
|
),
|
|
134
|
-
|
|
135
|
-
/* @__PURE__ */ t(
|
|
136
|
-
/* @__PURE__ */ t(
|
|
137
|
-
] }) : /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */ t(
|
|
139
|
-
/* @__PURE__ */ t(
|
|
135
|
+
f ? /* @__PURE__ */ g(R, { children: [
|
|
136
|
+
/* @__PURE__ */ t(K, { dataKey: h, type: "category", tick: x, axisLine: !1, tickLine: !1, tickFormatter: i, width: 100 }),
|
|
137
|
+
/* @__PURE__ */ t(F, { type: "number", tick: x, axisLine: { stroke: e.border }, tickLine: !1, tickFormatter: a })
|
|
138
|
+
] }) : /* @__PURE__ */ g(R, { children: [
|
|
139
|
+
/* @__PURE__ */ t(F, { dataKey: h, tick: x, axisLine: { stroke: e.border }, tickLine: !1, tickFormatter: i }),
|
|
140
|
+
/* @__PURE__ */ t(K, { tick: x, axisLine: !1, tickLine: !1, tickFormatter: a })
|
|
140
141
|
] }),
|
|
141
142
|
p && /* @__PURE__ */ t(
|
|
142
|
-
|
|
143
|
+
L,
|
|
143
144
|
{
|
|
144
|
-
contentStyle:
|
|
145
|
-
labelStyle:
|
|
146
|
-
itemStyle:
|
|
147
|
-
cursor: { fill: `${
|
|
145
|
+
contentStyle: l.contentStyle,
|
|
146
|
+
labelStyle: l.labelStyle,
|
|
147
|
+
itemStyle: l.itemStyle,
|
|
148
|
+
cursor: { fill: `${e.surfaceAlt}` }
|
|
148
149
|
}
|
|
149
150
|
),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const
|
|
151
|
+
k && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: e.textMuted, paddingTop: 8 } }),
|
|
152
|
+
m.map((b, n) => {
|
|
153
|
+
const A = b.color ?? c[n % c.length];
|
|
153
154
|
return /* @__PURE__ */ t(
|
|
154
|
-
|
|
155
|
+
q,
|
|
155
156
|
{
|
|
156
|
-
dataKey:
|
|
157
|
-
name:
|
|
158
|
-
fill:
|
|
159
|
-
stackId:
|
|
160
|
-
maxBarSize:
|
|
161
|
-
radius:
|
|
157
|
+
dataKey: b.key,
|
|
158
|
+
name: b.label ?? b.key,
|
|
159
|
+
fill: A,
|
|
160
|
+
stackId: b.stackId,
|
|
161
|
+
maxBarSize: u ?? 40,
|
|
162
|
+
radius: b.radius ?? [4, 4, 0, 0]
|
|
162
163
|
},
|
|
163
|
-
|
|
164
|
+
b.key
|
|
164
165
|
);
|
|
165
166
|
})
|
|
166
167
|
] }) }) });
|
|
167
168
|
}
|
|
168
|
-
function
|
|
169
|
-
data:
|
|
170
|
-
series:
|
|
171
|
-
xKey:
|
|
172
|
-
height:
|
|
173
|
-
margin: d =
|
|
174
|
-
showGrid:
|
|
175
|
-
showLegend:
|
|
169
|
+
function nt({
|
|
170
|
+
data: r,
|
|
171
|
+
series: m,
|
|
172
|
+
xKey: h,
|
|
173
|
+
height: S = 300,
|
|
174
|
+
margin: d = T,
|
|
175
|
+
showGrid: y = !0,
|
|
176
|
+
showLegend: k = !0,
|
|
176
177
|
showTooltip: p = !0,
|
|
177
178
|
smooth: o = !0,
|
|
178
|
-
referenceLines:
|
|
179
|
-
xTickFormatter:
|
|
180
|
-
yTickFormatter:
|
|
181
|
-
yDomain:
|
|
182
|
-
connectNulls:
|
|
183
|
-
ariaLabel:
|
|
179
|
+
referenceLines: u = [],
|
|
180
|
+
xTickFormatter: i,
|
|
181
|
+
yTickFormatter: a,
|
|
182
|
+
yDomain: s,
|
|
183
|
+
connectNulls: e = !1,
|
|
184
|
+
ariaLabel: c = "Line chart"
|
|
184
185
|
}) {
|
|
185
|
-
const
|
|
186
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
187
|
-
|
|
186
|
+
const l = z(), x = C(l), f = M(l), b = { fill: l.textMuted, fontSize: 12 };
|
|
187
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": c, style: { width: "100%", height: S }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(H, { data: r, margin: d, children: [
|
|
188
|
+
y && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke: l.border, vertical: !1 }),
|
|
188
189
|
/* @__PURE__ */ t(
|
|
189
|
-
|
|
190
|
+
F,
|
|
190
191
|
{
|
|
191
|
-
dataKey:
|
|
192
|
-
tick:
|
|
193
|
-
axisLine: { stroke:
|
|
192
|
+
dataKey: h,
|
|
193
|
+
tick: b,
|
|
194
|
+
axisLine: { stroke: l.border },
|
|
194
195
|
tickLine: !1,
|
|
195
|
-
tickFormatter:
|
|
196
|
+
tickFormatter: i
|
|
196
197
|
}
|
|
197
198
|
),
|
|
198
199
|
/* @__PURE__ */ t(
|
|
199
|
-
|
|
200
|
+
K,
|
|
200
201
|
{
|
|
201
|
-
tick:
|
|
202
|
+
tick: b,
|
|
202
203
|
axisLine: !1,
|
|
203
204
|
tickLine: !1,
|
|
204
|
-
tickFormatter:
|
|
205
|
-
domain:
|
|
205
|
+
tickFormatter: a,
|
|
206
|
+
domain: s
|
|
206
207
|
}
|
|
207
208
|
),
|
|
208
209
|
p && /* @__PURE__ */ t(
|
|
209
|
-
|
|
210
|
+
L,
|
|
210
211
|
{
|
|
211
|
-
contentStyle:
|
|
212
|
-
labelStyle:
|
|
213
|
-
itemStyle:
|
|
214
|
-
cursor: { stroke:
|
|
212
|
+
contentStyle: f.contentStyle,
|
|
213
|
+
labelStyle: f.labelStyle,
|
|
214
|
+
itemStyle: f.itemStyle,
|
|
215
|
+
cursor: { stroke: l.border, strokeWidth: 1 }
|
|
215
216
|
}
|
|
216
217
|
),
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
k && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: l.textMuted, paddingTop: 8 } }),
|
|
219
|
+
u.map((n, A) => /* @__PURE__ */ t(
|
|
220
|
+
N,
|
|
220
221
|
{
|
|
221
222
|
y: n.y,
|
|
222
223
|
x: n.x,
|
|
223
|
-
label: n.label ? { value: n.label, fill:
|
|
224
|
-
stroke: n.color ??
|
|
224
|
+
label: n.label ? { value: n.label, fill: l.textMuted, fontSize: 11 } : void 0,
|
|
225
|
+
stroke: n.color ?? l.border,
|
|
225
226
|
strokeDasharray: n.dashed ? "4 4" : void 0
|
|
226
227
|
},
|
|
227
|
-
|
|
228
|
+
A
|
|
228
229
|
)),
|
|
229
|
-
|
|
230
|
-
const W = n.color ??
|
|
230
|
+
m.map((n, A) => {
|
|
231
|
+
const W = n.color ?? x[A % x.length];
|
|
231
232
|
return /* @__PURE__ */ t(
|
|
232
|
-
|
|
233
|
+
U,
|
|
233
234
|
{
|
|
234
235
|
type: o ? "monotone" : "linear",
|
|
235
236
|
dataKey: n.key,
|
|
@@ -239,242 +240,264 @@ function lt({
|
|
|
239
240
|
strokeDasharray: n.dashed ? "6 3" : void 0,
|
|
240
241
|
dot: n.dot ?? !1,
|
|
241
242
|
activeDot: { r: 5, strokeWidth: 0, fill: W },
|
|
242
|
-
connectNulls:
|
|
243
|
+
connectNulls: e
|
|
243
244
|
},
|
|
244
245
|
n.key
|
|
245
246
|
);
|
|
246
247
|
})
|
|
247
248
|
] }) }) });
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
-
data:
|
|
251
|
-
height:
|
|
252
|
-
showLegend:
|
|
253
|
-
showTooltip:
|
|
250
|
+
function ct({
|
|
251
|
+
data: r,
|
|
252
|
+
height: m = 300,
|
|
253
|
+
showLegend: h = !0,
|
|
254
|
+
showTooltip: S = !0,
|
|
254
255
|
showLabels: d = !1,
|
|
255
|
-
outerRadius:
|
|
256
|
-
startAngle:
|
|
256
|
+
outerRadius: y = "70%",
|
|
257
|
+
startAngle: k = 90,
|
|
257
258
|
ariaLabel: p = "Pie chart"
|
|
258
259
|
}) {
|
|
259
|
-
const o = z(),
|
|
260
|
-
return
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
{
|
|
273
|
-
data: e,
|
|
274
|
-
dataKey: "value",
|
|
275
|
-
nameKey: "name",
|
|
276
|
-
outerRadius: s,
|
|
277
|
-
startAngle: f,
|
|
278
|
-
endAngle: f - 360,
|
|
279
|
-
label: d ? ({ name: l, percent: c }) => `${l} (${(c * 100).toFixed(0)}%)` : void 0,
|
|
280
|
-
labelLine: d,
|
|
281
|
-
strokeWidth: 2,
|
|
282
|
-
stroke: o.bg,
|
|
283
|
-
children: e.map((l, c) => /* @__PURE__ */ t(
|
|
284
|
-
I,
|
|
260
|
+
const o = z(), u = C(o), i = M(o), [a, s] = O(!1);
|
|
261
|
+
return $(() => {
|
|
262
|
+
const e = requestAnimationFrame(() => s(!0));
|
|
263
|
+
return () => cancelAnimationFrame(e);
|
|
264
|
+
}, []), /* @__PURE__ */ t(
|
|
265
|
+
"div",
|
|
266
|
+
{
|
|
267
|
+
role: "img",
|
|
268
|
+
"aria-label": p,
|
|
269
|
+
style: { width: "100%", minWidth: 240, height: m, position: "relative" },
|
|
270
|
+
children: a && /* @__PURE__ */ t(v, { width: "100%", height: "100%", debounce: 50, children: /* @__PURE__ */ g(P, { children: [
|
|
271
|
+
S && /* @__PURE__ */ t(
|
|
272
|
+
L,
|
|
285
273
|
{
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
274
|
+
contentStyle: i.contentStyle,
|
|
275
|
+
labelStyle: i.labelStyle,
|
|
276
|
+
itemStyle: i.itemStyle
|
|
277
|
+
}
|
|
278
|
+
),
|
|
279
|
+
h && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: o.textMuted } }),
|
|
280
|
+
/* @__PURE__ */ t(
|
|
281
|
+
B,
|
|
282
|
+
{
|
|
283
|
+
data: r,
|
|
284
|
+
dataKey: "value",
|
|
285
|
+
nameKey: "name",
|
|
286
|
+
outerRadius: y,
|
|
287
|
+
startAngle: k,
|
|
288
|
+
endAngle: k - 360,
|
|
289
|
+
label: d ? ({ name: e, percent: c }) => `${e} (${(c * 100).toFixed(0)}%)` : void 0,
|
|
290
|
+
labelLine: d,
|
|
291
|
+
strokeWidth: 2,
|
|
292
|
+
stroke: o.bg,
|
|
293
|
+
children: r.map((e, c) => /* @__PURE__ */ t(
|
|
294
|
+
I,
|
|
295
|
+
{
|
|
296
|
+
fill: e.color ?? u[c % u.length]
|
|
297
|
+
},
|
|
298
|
+
e.name
|
|
299
|
+
))
|
|
300
|
+
}
|
|
301
|
+
)
|
|
302
|
+
] }) })
|
|
303
|
+
}
|
|
304
|
+
);
|
|
293
305
|
}
|
|
294
|
-
function
|
|
295
|
-
data:
|
|
296
|
-
height:
|
|
297
|
-
showLegend:
|
|
298
|
-
showTooltip:
|
|
306
|
+
function dt({
|
|
307
|
+
data: r,
|
|
308
|
+
height: m = 300,
|
|
309
|
+
showLegend: h = !0,
|
|
310
|
+
showTooltip: S = !0,
|
|
299
311
|
centerLabel: d,
|
|
300
|
-
centerSublabel:
|
|
301
|
-
innerRadius:
|
|
312
|
+
centerSublabel: y,
|
|
313
|
+
innerRadius: k = "55%",
|
|
302
314
|
outerRadius: p = "75%",
|
|
303
315
|
startAngle: o = 90,
|
|
304
|
-
ariaLabel:
|
|
316
|
+
ariaLabel: u = "Donut chart"
|
|
305
317
|
}) {
|
|
306
|
-
const
|
|
307
|
-
return
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
318
|
+
const i = z(), a = C(i), s = M(i), [e, c] = O(!1);
|
|
319
|
+
return $(() => {
|
|
320
|
+
const l = requestAnimationFrame(() => c(!0));
|
|
321
|
+
return () => cancelAnimationFrame(l);
|
|
322
|
+
}, []), /* @__PURE__ */ g(
|
|
323
|
+
"div",
|
|
324
|
+
{
|
|
325
|
+
role: "img",
|
|
326
|
+
"aria-label": u,
|
|
327
|
+
style: { width: "100%", minWidth: 240, height: m, position: "relative" },
|
|
328
|
+
children: [
|
|
329
|
+
e && /* @__PURE__ */ t(v, { width: "100%", height: "100%", debounce: 50, children: /* @__PURE__ */ g(P, { children: [
|
|
330
|
+
S && /* @__PURE__ */ t(
|
|
331
|
+
L,
|
|
332
|
+
{
|
|
333
|
+
contentStyle: s.contentStyle,
|
|
334
|
+
labelStyle: s.labelStyle,
|
|
335
|
+
itemStyle: s.itemStyle
|
|
336
|
+
}
|
|
337
|
+
),
|
|
338
|
+
h && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: i.textMuted } }),
|
|
339
|
+
/* @__PURE__ */ t(
|
|
340
|
+
B,
|
|
341
|
+
{
|
|
342
|
+
data: r,
|
|
343
|
+
dataKey: "value",
|
|
344
|
+
nameKey: "name",
|
|
345
|
+
innerRadius: k,
|
|
346
|
+
outerRadius: p,
|
|
347
|
+
startAngle: o,
|
|
348
|
+
endAngle: o - 360,
|
|
349
|
+
strokeWidth: 3,
|
|
350
|
+
stroke: i.bg,
|
|
351
|
+
label: !1,
|
|
352
|
+
labelLine: !1,
|
|
353
|
+
children: r.map((l, x) => /* @__PURE__ */ t(I, { fill: l.color ?? a[x % a.length] }, l.name))
|
|
354
|
+
}
|
|
355
|
+
),
|
|
356
|
+
(d || y) && /* @__PURE__ */ t("text", {})
|
|
357
|
+
] }) }),
|
|
358
|
+
(d || y) && /* @__PURE__ */ g(
|
|
359
|
+
"div",
|
|
360
|
+
{
|
|
361
|
+
style: {
|
|
362
|
+
position: "absolute",
|
|
363
|
+
inset: 0,
|
|
364
|
+
display: "flex",
|
|
365
|
+
flexDirection: "column",
|
|
366
|
+
alignItems: "center",
|
|
367
|
+
justifyContent: "center",
|
|
368
|
+
pointerEvents: "none",
|
|
369
|
+
marginTop: h ? -24 : 0
|
|
370
|
+
},
|
|
371
|
+
children: [
|
|
372
|
+
d && /* @__PURE__ */ t("span", { style: { fontSize: 22, fontWeight: 700, color: i.text, lineHeight: 1 }, children: d }),
|
|
373
|
+
y && /* @__PURE__ */ t("span", { style: { fontSize: 13, color: i.textMuted, marginTop: 4 }, children: y })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
)
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
);
|
|
357
380
|
}
|
|
358
|
-
function
|
|
359
|
-
series:
|
|
360
|
-
height:
|
|
361
|
-
margin:
|
|
362
|
-
showGrid:
|
|
381
|
+
function st({
|
|
382
|
+
series: r,
|
|
383
|
+
height: m = 300,
|
|
384
|
+
margin: h = T,
|
|
385
|
+
showGrid: S = !0,
|
|
363
386
|
showLegend: d = !0,
|
|
364
|
-
showTooltip:
|
|
365
|
-
xTickFormatter:
|
|
387
|
+
showTooltip: y = !0,
|
|
388
|
+
xTickFormatter: k,
|
|
366
389
|
yTickFormatter: p,
|
|
367
390
|
zRange: o = [20, 400],
|
|
368
|
-
ariaLabel:
|
|
391
|
+
ariaLabel: u = "Scatter chart"
|
|
369
392
|
}) {
|
|
370
|
-
const
|
|
371
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label":
|
|
372
|
-
|
|
393
|
+
const i = z(), a = C(i), s = M(i), e = { fill: i.textMuted, fontSize: 12 };
|
|
394
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": u, style: { width: "100%", height: m }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(V, { margin: h, children: [
|
|
395
|
+
S && /* @__PURE__ */ t(D, { strokeDasharray: "3 3", stroke: i.border }),
|
|
373
396
|
/* @__PURE__ */ t(
|
|
374
|
-
|
|
397
|
+
F,
|
|
375
398
|
{
|
|
376
399
|
type: "number",
|
|
377
400
|
dataKey: "x",
|
|
378
|
-
tick:
|
|
379
|
-
axisLine: { stroke:
|
|
401
|
+
tick: e,
|
|
402
|
+
axisLine: { stroke: i.border },
|
|
380
403
|
tickLine: !1,
|
|
381
|
-
tickFormatter:
|
|
404
|
+
tickFormatter: k
|
|
382
405
|
}
|
|
383
406
|
),
|
|
384
407
|
/* @__PURE__ */ t(
|
|
385
|
-
|
|
408
|
+
K,
|
|
386
409
|
{
|
|
387
410
|
type: "number",
|
|
388
411
|
dataKey: "y",
|
|
389
|
-
tick:
|
|
412
|
+
tick: e,
|
|
390
413
|
axisLine: !1,
|
|
391
414
|
tickLine: !1,
|
|
392
415
|
tickFormatter: p
|
|
393
416
|
}
|
|
394
417
|
),
|
|
395
|
-
/* @__PURE__ */ t(
|
|
396
|
-
|
|
397
|
-
|
|
418
|
+
/* @__PURE__ */ t(X, { type: "number", dataKey: "z", range: o }),
|
|
419
|
+
y && /* @__PURE__ */ t(
|
|
420
|
+
L,
|
|
398
421
|
{
|
|
399
|
-
contentStyle:
|
|
400
|
-
labelStyle:
|
|
401
|
-
itemStyle:
|
|
422
|
+
contentStyle: s.contentStyle,
|
|
423
|
+
labelStyle: s.labelStyle,
|
|
424
|
+
itemStyle: s.itemStyle,
|
|
402
425
|
cursor: { strokeDasharray: "3 3" }
|
|
403
426
|
}
|
|
404
427
|
),
|
|
405
|
-
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color:
|
|
406
|
-
|
|
407
|
-
|
|
428
|
+
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: i.textMuted, paddingTop: 8 } }),
|
|
429
|
+
r.map((c, l) => /* @__PURE__ */ t(
|
|
430
|
+
Y,
|
|
408
431
|
{
|
|
409
|
-
name:
|
|
410
|
-
data:
|
|
411
|
-
fill:
|
|
432
|
+
name: c.name,
|
|
433
|
+
data: c.data,
|
|
434
|
+
fill: c.color ?? a[l % a.length],
|
|
412
435
|
fillOpacity: 0.8
|
|
413
436
|
},
|
|
414
|
-
|
|
437
|
+
c.name ?? l
|
|
415
438
|
))
|
|
416
439
|
] }) }) });
|
|
417
440
|
}
|
|
418
|
-
function
|
|
419
|
-
data:
|
|
420
|
-
series:
|
|
421
|
-
angleKey:
|
|
422
|
-
height:
|
|
441
|
+
function yt({
|
|
442
|
+
data: r,
|
|
443
|
+
series: m,
|
|
444
|
+
angleKey: h,
|
|
445
|
+
height: S = 300,
|
|
423
446
|
showLegend: d = !0,
|
|
424
|
-
showTooltip:
|
|
425
|
-
outerRadius:
|
|
447
|
+
showTooltip: y = !0,
|
|
448
|
+
outerRadius: k = "70%",
|
|
426
449
|
ariaLabel: p = "Radar chart"
|
|
427
450
|
}) {
|
|
428
|
-
const o = z(),
|
|
429
|
-
return /* @__PURE__ */ t("div", { role: "img", "aria-label": p, style: { width: "100%", height:
|
|
430
|
-
/* @__PURE__ */ t(
|
|
451
|
+
const o = z(), u = C(o), i = M(o);
|
|
452
|
+
return /* @__PURE__ */ t("div", { role: "img", "aria-label": p, style: { width: "100%", height: S }, children: /* @__PURE__ */ t(v, { width: "100%", height: "100%", children: /* @__PURE__ */ g(Z, { data: r, outerRadius: k, children: [
|
|
453
|
+
/* @__PURE__ */ t(_, { stroke: o.border }),
|
|
431
454
|
/* @__PURE__ */ t(
|
|
432
|
-
|
|
455
|
+
J,
|
|
433
456
|
{
|
|
434
|
-
dataKey:
|
|
457
|
+
dataKey: h,
|
|
435
458
|
tick: { fill: o.textMuted, fontSize: 12 }
|
|
436
459
|
}
|
|
437
460
|
),
|
|
438
461
|
/* @__PURE__ */ t(
|
|
439
|
-
|
|
462
|
+
Q,
|
|
440
463
|
{
|
|
441
464
|
tick: { fill: o.textMuted, fontSize: 10 },
|
|
442
465
|
axisLine: !1,
|
|
443
466
|
tickLine: !1
|
|
444
467
|
}
|
|
445
468
|
),
|
|
446
|
-
|
|
447
|
-
|
|
469
|
+
y && /* @__PURE__ */ t(
|
|
470
|
+
L,
|
|
448
471
|
{
|
|
449
|
-
contentStyle:
|
|
450
|
-
labelStyle:
|
|
451
|
-
itemStyle:
|
|
472
|
+
contentStyle: i.contentStyle,
|
|
473
|
+
labelStyle: i.labelStyle,
|
|
474
|
+
itemStyle: i.itemStyle
|
|
452
475
|
}
|
|
453
476
|
),
|
|
454
477
|
d && /* @__PURE__ */ t(w, { wrapperStyle: { fontSize: 13, color: o.textMuted } }),
|
|
455
|
-
|
|
456
|
-
const
|
|
478
|
+
m.map((a, s) => {
|
|
479
|
+
const e = a.color ?? u[s % u.length];
|
|
457
480
|
return /* @__PURE__ */ t(
|
|
458
|
-
|
|
481
|
+
tt,
|
|
459
482
|
{
|
|
460
|
-
name:
|
|
461
|
-
dataKey:
|
|
462
|
-
stroke:
|
|
463
|
-
fill:
|
|
464
|
-
fillOpacity:
|
|
483
|
+
name: a.label ?? a.key,
|
|
484
|
+
dataKey: a.key,
|
|
485
|
+
stroke: e,
|
|
486
|
+
fill: e,
|
|
487
|
+
fillOpacity: a.fillOpacity ?? 0.2,
|
|
465
488
|
strokeWidth: 2
|
|
466
489
|
},
|
|
467
|
-
|
|
490
|
+
a.key
|
|
468
491
|
);
|
|
469
492
|
})
|
|
470
493
|
] }) }) });
|
|
471
494
|
}
|
|
472
495
|
export {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
496
|
+
ot as TkxAreaChart,
|
|
497
|
+
at as TkxBarChart,
|
|
498
|
+
dt as TkxDonutChart,
|
|
499
|
+
nt as TkxLineChart,
|
|
500
|
+
ct as TkxPieChart,
|
|
501
|
+
yt as TkxRadarChart,
|
|
502
|
+
st as TkxScatterChart
|
|
480
503
|
};
|