@alfadocs/ui-kit-debug 0.86.0 → 0.88.0
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/_chunks/{chart-GFLv4cXm.js → chart-CNaLgvx4.js} +254 -230
- package/dist/_chunks/chart-CNaLgvx4.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Chcj4q4z.js → marketplace-app-shell-DX5aLeIJ.js} +132 -128
- package/dist/_chunks/marketplace-app-shell-DX5aLeIJ.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/chart/chart.d.ts +30 -0
- package/dist/components/chart/chart.d.ts.map +1 -1
- package/dist/components/chart/index.d.ts +1 -1
- package/dist/components/chart/index.d.ts.map +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/index.js +2 -2
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +8 -0
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts.map +1 -1
- package/package.json +5 -1
- package/dist/_chunks/chart-GFLv4cXm.js.map +0 -1
- package/dist/_chunks/marketplace-app-shell-Chcj4q4z.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { I as
|
|
11
|
-
import { I as
|
|
12
|
-
import { c as
|
|
1
|
+
import { jsxs as I, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Se, useId as we, useMemo as d, useRef as Ie, useState as G, useEffect as re, useImperativeHandle as Ce } from "react";
|
|
3
|
+
import { c as ke } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as Re } from "react-i18next";
|
|
5
|
+
import _e from "react-apexcharts";
|
|
6
|
+
import oe from "apexcharts";
|
|
7
|
+
import { u as Le, g as ie } from "./apexcharts-theme-BJigns_V.js";
|
|
8
|
+
import { u as xe } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
9
|
+
import { u as Ee } from "./registry-DvAUVLHh.js";
|
|
10
|
+
import { I as Ne } from "./icon-button-C_kbcd7I.js";
|
|
11
|
+
import { I as ze } from "./icon-button-group-BLHPN6jg.js";
|
|
12
|
+
import { c as C } from "./createLucideIcon-DhHxpK9K.js";
|
|
13
13
|
/**
|
|
14
14
|
* @license lucide-react v1.22.0 - ISC
|
|
15
15
|
*
|
|
16
16
|
* This source code is licensed under the ISC license.
|
|
17
17
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
19
|
+
const Pe = [
|
|
20
20
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
21
21
|
[
|
|
22
22
|
"path",
|
|
@@ -25,36 +25,36 @@ const xe = [
|
|
|
25
25
|
key: "q0gr47"
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
|
-
],
|
|
28
|
+
], Ae = C("chart-area", Pe);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v1.22.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const Be = [
|
|
36
36
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
37
37
|
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
38
38
|
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
39
39
|
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
40
|
-
],
|
|
40
|
+
], Oe = C("chart-column", Be);
|
|
41
41
|
/**
|
|
42
42
|
* @license lucide-react v1.22.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const Me = [
|
|
48
48
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
49
49
|
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
50
|
-
],
|
|
50
|
+
], $e = C("chart-line", Me);
|
|
51
51
|
/**
|
|
52
52
|
* @license lucide-react v1.22.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
56
|
*/
|
|
57
|
-
const
|
|
57
|
+
const He = [
|
|
58
58
|
[
|
|
59
59
|
"path",
|
|
60
60
|
{
|
|
@@ -63,14 +63,14 @@ const Be = [
|
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }]
|
|
66
|
-
],
|
|
66
|
+
], Ge = C("chart-pie", He);
|
|
67
67
|
/**
|
|
68
68
|
* @license lucide-react v1.22.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
72
|
*/
|
|
73
|
-
const
|
|
73
|
+
const je = [
|
|
74
74
|
[
|
|
75
75
|
"path",
|
|
76
76
|
{
|
|
@@ -79,7 +79,7 @@ const Oe = [
|
|
|
79
79
|
}
|
|
80
80
|
],
|
|
81
81
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
82
|
-
],
|
|
82
|
+
], De = C("donut", je), Ke = {
|
|
83
83
|
id: "chart",
|
|
84
84
|
// view_change backs the opt-in type switcher (`switchableTypes` prop):
|
|
85
85
|
// the same chart re-presented as line / bar / area / pie / donut.
|
|
@@ -89,19 +89,19 @@ const Oe = [
|
|
|
89
89
|
type: "'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'",
|
|
90
90
|
descriptionKey: "ui.agent.chart.state.declaredType",
|
|
91
91
|
description: "The consumer-declared chart type — the shape `update_series` expects.",
|
|
92
|
-
read: (
|
|
92
|
+
read: (r) => r.getTypeState().declaredType
|
|
93
93
|
},
|
|
94
94
|
effectiveType: {
|
|
95
95
|
type: "'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar'",
|
|
96
96
|
descriptionKey: "ui.agent.chart.state.effectiveType",
|
|
97
97
|
description: "The type currently rendered — differs from declaredType after a type-switcher pick.",
|
|
98
|
-
read: (
|
|
98
|
+
read: (r) => r.getTypeState().effectiveType
|
|
99
99
|
},
|
|
100
100
|
availableTypes: {
|
|
101
101
|
type: "ChartType[]",
|
|
102
102
|
descriptionKey: "ui.agent.chart.state.availableTypes",
|
|
103
103
|
description: "Types the switcher offers. Empty when the chart has no type switcher.",
|
|
104
|
-
read: (
|
|
104
|
+
read: (r) => r.getTypeState().availableTypes
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
actions: {
|
|
@@ -129,7 +129,7 @@ const Oe = [
|
|
|
129
129
|
idempotent: !0,
|
|
130
130
|
descriptionKey: "ui.agent.chart.actions.changeView",
|
|
131
131
|
description: "Switch the rendered chart type via the type switcher. No-op (returns false) when the chart has no switcher or the type is not offered.",
|
|
132
|
-
invoke: (
|
|
132
|
+
invoke: (r, h) => r.setType(h.type)
|
|
133
133
|
},
|
|
134
134
|
update_series: {
|
|
135
135
|
// Replacing the rendered series mutates what the chart displays — it
|
|
@@ -169,8 +169,8 @@ const Oe = [
|
|
|
169
169
|
idempotent: !0,
|
|
170
170
|
descriptionKey: "ui.agent.chart.actions.updateSeries",
|
|
171
171
|
description: "Replace the chart series without remounting. Pass the DECLARED type’s shape (see declaredType state) — when the user has switched the view cross-shape the values are converted to the rendered shape. The write targets the live instance only: a later type switch re-reads the original props and discards it.",
|
|
172
|
-
invoke: (
|
|
173
|
-
|
|
172
|
+
invoke: (r, h) => {
|
|
173
|
+
r.updateSeries(h.series);
|
|
174
174
|
}
|
|
175
175
|
},
|
|
176
176
|
export_png: {
|
|
@@ -183,7 +183,7 @@ const Oe = [
|
|
|
183
183
|
idempotent: !0,
|
|
184
184
|
descriptionKey: "ui.agent.chart.actions.exportPng",
|
|
185
185
|
description: "Return a PNG data URI of the chart for export or screenshotting.",
|
|
186
|
-
invoke: (
|
|
186
|
+
invoke: (r) => r.dataURI()
|
|
187
187
|
}
|
|
188
188
|
},
|
|
189
189
|
domHooks: {
|
|
@@ -194,7 +194,7 @@ const Oe = [
|
|
|
194
194
|
description: "Sourced from the id prop."
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
},
|
|
197
|
+
}, Ue = ke("ds:relative ds:block ds:w-full", {
|
|
198
198
|
variants: {
|
|
199
199
|
density: {
|
|
200
200
|
compact: "ds:min-h-[var(--chart-min-height-compact)]",
|
|
@@ -206,87 +206,90 @@ const Oe = [
|
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
208
|
defaultVariants: { density: "comfortable" }
|
|
209
|
-
}),
|
|
209
|
+
}), Ve = [
|
|
210
210
|
"verticalLines",
|
|
211
211
|
"horizontalLines",
|
|
212
212
|
"slantedLines",
|
|
213
213
|
"squares",
|
|
214
214
|
"circles"
|
|
215
|
-
],
|
|
215
|
+
], We = ["line", "bar", "area"], Ye = ["pie", "donut", "radialBar"], ne = [
|
|
216
216
|
"line",
|
|
217
217
|
"bar",
|
|
218
218
|
"area",
|
|
219
219
|
"pie",
|
|
220
220
|
"donut"
|
|
221
|
-
],
|
|
221
|
+
], qe = {
|
|
222
222
|
line: "chart.typeSwitcher.line",
|
|
223
223
|
bar: "chart.typeSwitcher.bar",
|
|
224
224
|
area: "chart.typeSwitcher.area",
|
|
225
225
|
pie: "chart.typeSwitcher.pie",
|
|
226
226
|
donut: "chart.typeSwitcher.donut"
|
|
227
|
-
},
|
|
228
|
-
line: /* @__PURE__ */ c(
|
|
229
|
-
bar: /* @__PURE__ */ c(
|
|
230
|
-
area: /* @__PURE__ */ c(
|
|
231
|
-
pie: /* @__PURE__ */ c(
|
|
232
|
-
donut: /* @__PURE__ */ c(
|
|
227
|
+
}, Ze = {
|
|
228
|
+
line: /* @__PURE__ */ c($e, {}),
|
|
229
|
+
bar: /* @__PURE__ */ c(Oe, {}),
|
|
230
|
+
area: /* @__PURE__ */ c(Ae, {}),
|
|
231
|
+
pie: /* @__PURE__ */ c(Ge, {}),
|
|
232
|
+
donut: /* @__PURE__ */ c(De, {})
|
|
233
233
|
};
|
|
234
|
-
function
|
|
235
|
-
return
|
|
234
|
+
function m(r) {
|
|
235
|
+
return Ye.includes(r);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return
|
|
237
|
+
function se(r) {
|
|
238
|
+
return We.includes(r);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
return
|
|
240
|
+
function Fe(r, h) {
|
|
241
|
+
return m(h) ? [
|
|
242
242
|
{
|
|
243
243
|
name: "",
|
|
244
|
-
data:
|
|
244
|
+
data: r
|
|
245
245
|
}
|
|
246
|
-
] :
|
|
246
|
+
] : r;
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const Je = Se(
|
|
249
249
|
({
|
|
250
|
-
title:
|
|
250
|
+
title: r,
|
|
251
251
|
id: h,
|
|
252
252
|
type: l,
|
|
253
|
-
series:
|
|
254
|
-
categories:
|
|
255
|
-
labels:
|
|
256
|
-
height:
|
|
257
|
-
width:
|
|
258
|
-
patterns:
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
253
|
+
series: k,
|
|
254
|
+
categories: j,
|
|
255
|
+
labels: x,
|
|
256
|
+
height: D,
|
|
257
|
+
width: ce,
|
|
258
|
+
patterns: K = !1,
|
|
259
|
+
stacked: U = !1,
|
|
260
|
+
orientation: E = "vertical",
|
|
261
|
+
curve: V = "smooth",
|
|
262
|
+
colors: R,
|
|
263
|
+
toolbar: N = !1,
|
|
264
|
+
locale: de,
|
|
265
|
+
radialValueFormatter: y,
|
|
266
|
+
valueFormatter: W,
|
|
267
|
+
switchableTypes: _,
|
|
268
|
+
onTypeChange: z,
|
|
269
|
+
density: le,
|
|
270
|
+
className: Y
|
|
271
|
+
}, pe) => {
|
|
272
|
+
const { t: o, i18n: he } = Re(), q = we(), b = d(
|
|
273
|
+
() => `chart-${q.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
274
|
+
[q]
|
|
275
|
+
), P = `${b}-summary`, A = Ie(null), [Z, ue] = G(0);
|
|
276
|
+
Le(A);
|
|
277
|
+
const v = de ?? he.language ?? "en", [F, fe] = G(
|
|
275
278
|
() => {
|
|
276
279
|
try {
|
|
277
|
-
return
|
|
280
|
+
return ie();
|
|
278
281
|
} catch {
|
|
279
282
|
return {};
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
285
|
);
|
|
283
|
-
|
|
286
|
+
re(() => {
|
|
284
287
|
if (typeof document > "u") return;
|
|
285
288
|
let e;
|
|
286
289
|
const t = new MutationObserver(() => {
|
|
287
290
|
clearTimeout(e), e = setTimeout(() => {
|
|
288
291
|
try {
|
|
289
|
-
|
|
292
|
+
fe(ie());
|
|
290
293
|
} catch {
|
|
291
294
|
}
|
|
292
295
|
}, 50);
|
|
@@ -297,136 +300,140 @@ const qe = be(
|
|
|
297
300
|
}), () => {
|
|
298
301
|
clearTimeout(e), t.disconnect();
|
|
299
302
|
};
|
|
300
|
-
}, []),
|
|
303
|
+
}, []), re(() => {
|
|
301
304
|
const e = A.current;
|
|
302
305
|
if (!e || typeof ResizeObserver > "u") return;
|
|
303
|
-
const t = new ResizeObserver((
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
+
const t = new ResizeObserver((n) => {
|
|
307
|
+
const s = n[0];
|
|
308
|
+
s && ue(Math.floor(s.contentRect.width));
|
|
306
309
|
});
|
|
307
310
|
return t.observe(e), () => t.disconnect();
|
|
308
311
|
}, []);
|
|
309
|
-
const
|
|
310
|
-
if (!
|
|
311
|
-
const e =
|
|
312
|
-
(
|
|
312
|
+
const g = d(() => {
|
|
313
|
+
if (!_ || _.length === 0) return [];
|
|
314
|
+
const e = _.filter(
|
|
315
|
+
(n) => ne.includes(n)
|
|
313
316
|
);
|
|
314
|
-
if (!
|
|
317
|
+
if (!ne.includes(l))
|
|
315
318
|
return [];
|
|
316
319
|
const t = e.includes(l) ? e : [l, ...e];
|
|
317
320
|
return [...new Set(t)];
|
|
318
|
-
}, [
|
|
319
|
-
if (
|
|
321
|
+
}, [_, l]), u = g.length >= 2, [B, J] = G(null), a = u && B && g.includes(B) ? B : l, O = m(l), Q = m(a), { effectiveSeries: S, effectiveCategories: L, effectiveLabels: w } = d(() => {
|
|
322
|
+
if (O === Q)
|
|
320
323
|
return {
|
|
321
|
-
effectiveSeries:
|
|
322
|
-
effectiveCategories:
|
|
323
|
-
effectiveLabels:
|
|
324
|
+
effectiveSeries: k,
|
|
325
|
+
effectiveCategories: j,
|
|
326
|
+
effectiveLabels: x
|
|
324
327
|
};
|
|
325
|
-
if (!
|
|
326
|
-
const t =
|
|
328
|
+
if (!O) {
|
|
329
|
+
const t = k;
|
|
327
330
|
return {
|
|
328
331
|
effectiveSeries: t.map(
|
|
329
|
-
(
|
|
332
|
+
(s) => s.data.reduce((p, i) => p + i, 0)
|
|
330
333
|
),
|
|
331
334
|
effectiveCategories: void 0,
|
|
332
|
-
effectiveLabels: t.map((
|
|
335
|
+
effectiveLabels: t.map((s) => s.name)
|
|
333
336
|
};
|
|
334
337
|
}
|
|
335
|
-
const e =
|
|
338
|
+
const e = k;
|
|
336
339
|
return {
|
|
337
340
|
effectiveSeries: [
|
|
338
|
-
{ name:
|
|
341
|
+
{ name: o("chart.table.value"), data: e }
|
|
339
342
|
],
|
|
340
|
-
effectiveCategories:
|
|
343
|
+
effectiveCategories: x ?? [],
|
|
341
344
|
effectiveLabels: void 0
|
|
342
345
|
};
|
|
343
|
-
}, [
|
|
346
|
+
}, [k, j, x, O, Q, o]), M = d(
|
|
344
347
|
() => ({
|
|
345
348
|
async dataURI() {
|
|
346
|
-
const e =
|
|
349
|
+
const e = oe.getChartByID(b);
|
|
347
350
|
return e ? (await e.dataURI()).imgURI : "";
|
|
348
351
|
},
|
|
349
352
|
updateSeries(e) {
|
|
350
|
-
const t =
|
|
353
|
+
const t = oe.getChartByID(b);
|
|
351
354
|
if (!t) return;
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
355
|
+
const n = m(l), s = m(a);
|
|
356
|
+
if (n === s) {
|
|
354
357
|
t.updateSeries(e);
|
|
355
358
|
return;
|
|
356
359
|
}
|
|
357
|
-
if (!
|
|
360
|
+
if (!n) {
|
|
358
361
|
const p = e;
|
|
359
362
|
t.updateOptions(
|
|
360
|
-
{ labels: p.map((
|
|
363
|
+
{ labels: p.map((i) => i.name) },
|
|
361
364
|
!1,
|
|
362
365
|
!0
|
|
363
366
|
), t.updateSeries(
|
|
364
|
-
p.map((
|
|
367
|
+
p.map((i) => i.data.reduce((f, Te) => f + Te, 0))
|
|
365
368
|
);
|
|
366
369
|
return;
|
|
367
370
|
}
|
|
368
371
|
t.updateSeries([
|
|
369
|
-
{ name:
|
|
372
|
+
{ name: o("chart.table.value"), data: e }
|
|
370
373
|
]);
|
|
371
374
|
},
|
|
372
375
|
setType(e) {
|
|
373
|
-
return !u || !
|
|
376
|
+
return !u || !g.includes(e) ? !1 : (J(e), !0);
|
|
374
377
|
},
|
|
375
378
|
getTypeState() {
|
|
376
379
|
return {
|
|
377
380
|
declaredType: l,
|
|
378
|
-
effectiveType:
|
|
379
|
-
availableTypes: u ? [...
|
|
381
|
+
effectiveType: a,
|
|
382
|
+
availableTypes: u ? [...g] : []
|
|
380
383
|
};
|
|
381
384
|
}
|
|
382
385
|
}),
|
|
383
|
-
[
|
|
386
|
+
[b, l, a, o, u, g]
|
|
384
387
|
);
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
() =>
|
|
388
|
-
[
|
|
389
|
-
),
|
|
390
|
-
() => new Intl.NumberFormat(
|
|
391
|
-
[
|
|
392
|
-
),
|
|
393
|
-
() =>
|
|
394
|
-
[
|
|
395
|
-
),
|
|
388
|
+
Ce(pe, () => M, [M]), Ee(Ke, M, h);
|
|
389
|
+
const $ = typeof document < "u" && document.documentElement.dir === "rtl", X = d(
|
|
390
|
+
() => Fe(S, a),
|
|
391
|
+
[S, a]
|
|
392
|
+
), ee = d(
|
|
393
|
+
() => new Intl.NumberFormat(v),
|
|
394
|
+
[v]
|
|
395
|
+
), T = d(
|
|
396
|
+
() => W ?? ((e) => ee.format(e)),
|
|
397
|
+
[W, ee]
|
|
398
|
+
), te = d(
|
|
396
399
|
() => ({
|
|
397
|
-
name:
|
|
400
|
+
name: v,
|
|
398
401
|
options: {
|
|
399
402
|
toolbar: {
|
|
400
|
-
download:
|
|
401
|
-
selection:
|
|
402
|
-
selectionZoom:
|
|
403
|
-
zoomIn:
|
|
404
|
-
zoomOut:
|
|
405
|
-
pan:
|
|
406
|
-
reset:
|
|
407
|
-
exportToSVG:
|
|
408
|
-
exportToPNG:
|
|
409
|
-
exportToCSV:
|
|
403
|
+
download: o("chart.toolbar.download"),
|
|
404
|
+
selection: o("chart.toolbar.selection"),
|
|
405
|
+
selectionZoom: o("chart.toolbar.selectionZoom"),
|
|
406
|
+
zoomIn: o("chart.toolbar.zoomIn"),
|
|
407
|
+
zoomOut: o("chart.toolbar.zoomOut"),
|
|
408
|
+
pan: o("chart.toolbar.pan"),
|
|
409
|
+
reset: o("chart.toolbar.reset"),
|
|
410
|
+
exportToSVG: o("chart.toolbar.exportToSVG"),
|
|
411
|
+
exportToPNG: o("chart.toolbar.exportToPNG"),
|
|
412
|
+
exportToCSV: o("chart.toolbar.exportToCSV")
|
|
410
413
|
}
|
|
411
414
|
}
|
|
412
415
|
}),
|
|
413
|
-
[
|
|
414
|
-
),
|
|
415
|
-
var
|
|
416
|
-
const e =
|
|
416
|
+
[v, o]
|
|
417
|
+
), H = xe(), me = d(() => {
|
|
418
|
+
var n, s, p;
|
|
419
|
+
const e = F, t = {
|
|
417
420
|
...e,
|
|
418
421
|
chart: {
|
|
419
422
|
...e.chart,
|
|
420
|
-
id:
|
|
421
|
-
toolbar: { show:
|
|
422
|
-
zoom: { enabled:
|
|
423
|
+
id: b,
|
|
424
|
+
toolbar: { show: N },
|
|
425
|
+
zoom: { enabled: N },
|
|
423
426
|
animations: {
|
|
424
|
-
enabled: !
|
|
425
|
-
dynamicAnimation: { enabled: !
|
|
427
|
+
enabled: !H,
|
|
428
|
+
dynamicAnimation: { enabled: !H }
|
|
426
429
|
},
|
|
427
|
-
locales: [
|
|
428
|
-
defaultLocale:
|
|
429
|
-
parentHeightOffset: 0
|
|
430
|
+
locales: [te],
|
|
431
|
+
defaultLocale: v,
|
|
432
|
+
parentHeightOffset: 0,
|
|
433
|
+
// Stacking is an axis-only concept — gate on the categorical types
|
|
434
|
+
// so a slice/radial chart never receives it, and omit the key
|
|
435
|
+
// entirely when unstacked so the default output is byte-identical.
|
|
436
|
+
...U && se(a) ? { stacked: !0 } : {}
|
|
430
437
|
},
|
|
431
438
|
// Only set `labels` when the effective type actually has them (slice
|
|
432
439
|
// charts). Emitting `labels: undefined` crashes ApexCharts' bar
|
|
@@ -434,7 +441,7 @@ const qe = be(
|
|
|
434
441
|
// "Cannot read properties of undefined (reading 'length')", which
|
|
435
442
|
// aborts the render and leaves a blank chart. Absent is safe; area /
|
|
436
443
|
// line tolerate the undefined but bar does not, so never pass it.
|
|
437
|
-
...
|
|
444
|
+
...w ? { labels: w } : {},
|
|
438
445
|
legend: {
|
|
439
446
|
...e.legend,
|
|
440
447
|
position: "bottom",
|
|
@@ -442,168 +449,185 @@ const qe = be(
|
|
|
442
449
|
// to the chart's own text flow. For RTL we flip via `yaxis.opposite`
|
|
443
450
|
// and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
|
|
444
451
|
// to the inline-start by asking for 'left' on LTR and 'right' on RTL.
|
|
445
|
-
horizontalAlign:
|
|
452
|
+
horizontalAlign: $ ? "right" : "left",
|
|
446
453
|
fontFamily: "inherit"
|
|
447
454
|
},
|
|
448
455
|
tooltip: {
|
|
449
456
|
...e.tooltip,
|
|
450
457
|
y: {
|
|
451
|
-
formatter: (
|
|
458
|
+
formatter: (i) => T(i)
|
|
452
459
|
}
|
|
453
460
|
},
|
|
454
461
|
noData: {
|
|
455
|
-
text:
|
|
462
|
+
text: o("chart.noData")
|
|
456
463
|
}
|
|
457
464
|
};
|
|
458
|
-
if (
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
465
|
+
if (R && R.length > 0 && (t.colors = R), se(a)) {
|
|
466
|
+
const i = a === "bar" && E === "horizontal";
|
|
467
|
+
t.xaxis = {
|
|
468
|
+
...e.xaxis,
|
|
469
|
+
categories: L ?? [],
|
|
470
|
+
...i ? {
|
|
471
|
+
labels: {
|
|
472
|
+
formatter: (f) => T(Number(f))
|
|
473
|
+
}
|
|
474
|
+
} : {}
|
|
475
|
+
}, t.yaxis = {
|
|
476
|
+
...e.yaxis,
|
|
477
|
+
opposite: $,
|
|
478
|
+
...i ? {} : { labels: { formatter: (f) => T(f) } }
|
|
479
|
+
}, t.stroke = {
|
|
480
|
+
curve: V,
|
|
481
|
+
width: a === "bar" ? 0 : 2
|
|
482
|
+
}, t.dataLabels = { enabled: !1 };
|
|
483
|
+
}
|
|
484
|
+
if (a === "radialBar" && y) {
|
|
485
|
+
const i = e.plotOptions ?? {};
|
|
472
486
|
t.plotOptions = {
|
|
473
|
-
...
|
|
487
|
+
...i,
|
|
474
488
|
radialBar: {
|
|
475
|
-
...
|
|
489
|
+
...i.radialBar ?? {},
|
|
476
490
|
dataLabels: {
|
|
477
|
-
...((
|
|
491
|
+
...((n = i.radialBar) == null ? void 0 : n.dataLabels) ?? {},
|
|
478
492
|
value: {
|
|
479
|
-
...((p = (
|
|
480
|
-
formatter: (
|
|
493
|
+
...((p = (s = i.radialBar) == null ? void 0 : s.dataLabels) == null ? void 0 : p.value) ?? {},
|
|
494
|
+
formatter: (f) => y(Number(f))
|
|
481
495
|
}
|
|
482
496
|
}
|
|
483
497
|
}
|
|
484
498
|
};
|
|
485
499
|
}
|
|
486
|
-
|
|
500
|
+
if (a === "bar" && E === "horizontal") {
|
|
501
|
+
const i = e.plotOptions ?? {};
|
|
502
|
+
t.plotOptions = {
|
|
503
|
+
...i,
|
|
504
|
+
bar: { ...i.bar ?? {}, horizontal: !0 }
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
return K ? t.fill = {
|
|
487
508
|
type: "pattern",
|
|
488
|
-
opacity:
|
|
509
|
+
opacity: a === "area" ? 0.3 : 1,
|
|
489
510
|
pattern: {
|
|
490
|
-
style: [...
|
|
511
|
+
style: [...Ve],
|
|
491
512
|
strokeWidth: 2
|
|
492
513
|
}
|
|
493
|
-
} :
|
|
514
|
+
} : a === "area" && (t.fill = {
|
|
494
515
|
type: "gradient",
|
|
495
516
|
opacity: 0.3
|
|
496
517
|
}), t;
|
|
497
518
|
}, [
|
|
498
|
-
|
|
499
|
-
y,
|
|
500
|
-
x,
|
|
501
|
-
O,
|
|
502
|
-
Q,
|
|
519
|
+
F,
|
|
503
520
|
b,
|
|
521
|
+
N,
|
|
522
|
+
H,
|
|
523
|
+
te,
|
|
524
|
+
v,
|
|
525
|
+
w,
|
|
504
526
|
T,
|
|
505
|
-
S,
|
|
506
|
-
r,
|
|
507
527
|
o,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
528
|
+
a,
|
|
529
|
+
L,
|
|
530
|
+
$,
|
|
531
|
+
K,
|
|
532
|
+
U,
|
|
533
|
+
E,
|
|
534
|
+
V,
|
|
535
|
+
R,
|
|
536
|
+
y
|
|
537
|
+
]), ye = ce ?? (Z > 0 ? Z : "100%"), be = D ?? 320, ve = d(() => {
|
|
538
|
+
const e = m(a) ? w ?? [] : L ?? [], t = X;
|
|
539
|
+
return /* @__PURE__ */ I("table", { id: P, className: "ds:sr-only", children: [
|
|
540
|
+
/* @__PURE__ */ c("caption", { children: r }),
|
|
541
|
+
/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ I("tr", { children: [
|
|
542
|
+
/* @__PURE__ */ c("th", { scope: "col", children: o("chart.table.series") }),
|
|
543
|
+
e.map((n, s) => /* @__PURE__ */ c("th", { scope: "col", children: n }, `${n}-${s}`))
|
|
520
544
|
] }) }),
|
|
521
|
-
/* @__PURE__ */ c("tbody", { children: t.map((
|
|
522
|
-
/* @__PURE__ */ c("th", { scope: "row", children:
|
|
523
|
-
|
|
524
|
-
] }, `${
|
|
545
|
+
/* @__PURE__ */ c("tbody", { children: t.map((n, s) => /* @__PURE__ */ I("tr", { children: [
|
|
546
|
+
/* @__PURE__ */ c("th", { scope: "row", children: n.name || o("chart.table.value") }),
|
|
547
|
+
n.data.map((p, i) => /* @__PURE__ */ c("td", { children: a === "radialBar" && y ? y(p) : T(p) }, `${s}-${i}`))
|
|
548
|
+
] }, `${n.name}-${s}`)) })
|
|
525
549
|
] });
|
|
526
550
|
}, [
|
|
527
|
-
o,
|
|
528
|
-
F,
|
|
529
|
-
T,
|
|
530
|
-
_,
|
|
531
|
-
N,
|
|
532
551
|
a,
|
|
552
|
+
X,
|
|
553
|
+
w,
|
|
554
|
+
L,
|
|
555
|
+
P,
|
|
533
556
|
r,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
557
|
+
o,
|
|
558
|
+
T,
|
|
559
|
+
y
|
|
560
|
+
]), ge = d(() => (m(a), S), [S, a]), ae = /* @__PURE__ */ I(
|
|
537
561
|
"div",
|
|
538
562
|
{
|
|
539
563
|
ref: A,
|
|
540
564
|
role: "img",
|
|
541
|
-
"aria-label":
|
|
542
|
-
"aria-describedby":
|
|
543
|
-
className:
|
|
565
|
+
"aria-label": r,
|
|
566
|
+
"aria-describedby": P,
|
|
567
|
+
className: Ue({
|
|
544
568
|
// Explicit height wins over the density min-height unless the
|
|
545
569
|
// caller also asked for a density explicitly.
|
|
546
|
-
density:
|
|
547
|
-
className: u ? void 0 :
|
|
570
|
+
density: le ?? (D !== void 0 ? "none" : void 0),
|
|
571
|
+
className: u ? void 0 : Y
|
|
548
572
|
}),
|
|
549
573
|
...u ? {} : { "data-component": "chart", "data-component-id": h },
|
|
550
574
|
children: [
|
|
551
|
-
|
|
575
|
+
ve,
|
|
552
576
|
/* @__PURE__ */ c(
|
|
553
|
-
|
|
577
|
+
_e,
|
|
554
578
|
{
|
|
555
|
-
type:
|
|
556
|
-
series:
|
|
557
|
-
options:
|
|
558
|
-
width:
|
|
559
|
-
height:
|
|
579
|
+
type: a,
|
|
580
|
+
series: ge,
|
|
581
|
+
options: me,
|
|
582
|
+
width: ye,
|
|
583
|
+
height: be,
|
|
560
584
|
"aria-hidden": "true"
|
|
561
585
|
},
|
|
562
|
-
|
|
586
|
+
a
|
|
563
587
|
)
|
|
564
588
|
]
|
|
565
589
|
}
|
|
566
590
|
);
|
|
567
|
-
return u ? /* @__PURE__ */
|
|
591
|
+
return u ? /* @__PURE__ */ I(
|
|
568
592
|
"div",
|
|
569
593
|
{
|
|
570
594
|
"data-component": "chart",
|
|
571
595
|
"data-component-id": h,
|
|
572
|
-
className: `ds:block ds:w-full ${
|
|
596
|
+
className: `ds:block ds:w-full ${Y ?? ""}`.trim(),
|
|
573
597
|
children: [
|
|
574
598
|
/* @__PURE__ */ c("div", { className: "ds:mb-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ c(
|
|
575
|
-
|
|
599
|
+
ze,
|
|
576
600
|
{
|
|
577
601
|
role: "radiogroup",
|
|
578
602
|
mode: "toggle-single",
|
|
579
603
|
size: "sm",
|
|
580
|
-
"aria-label":
|
|
581
|
-
value:
|
|
604
|
+
"aria-label": o("chart.typeSwitcher.label"),
|
|
605
|
+
value: a,
|
|
582
606
|
onValueChange: (e) => {
|
|
583
|
-
e !==
|
|
607
|
+
e !== a && (J(e), z == null || z(e));
|
|
584
608
|
},
|
|
585
|
-
children:
|
|
586
|
-
|
|
609
|
+
children: g.map((e) => /* @__PURE__ */ c(
|
|
610
|
+
Ne,
|
|
587
611
|
{
|
|
588
612
|
value: e,
|
|
589
613
|
type: "button",
|
|
590
|
-
icon:
|
|
591
|
-
"aria-label":
|
|
614
|
+
icon: Ze[e],
|
|
615
|
+
"aria-label": o(qe[e])
|
|
592
616
|
},
|
|
593
617
|
e
|
|
594
618
|
))
|
|
595
619
|
}
|
|
596
620
|
) }),
|
|
597
|
-
|
|
621
|
+
ae
|
|
598
622
|
]
|
|
599
623
|
}
|
|
600
|
-
) :
|
|
624
|
+
) : ae;
|
|
601
625
|
}
|
|
602
626
|
);
|
|
603
|
-
|
|
627
|
+
Je.displayName = "Chart";
|
|
604
628
|
export {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
629
|
+
Je as C,
|
|
630
|
+
Ue as a,
|
|
631
|
+
Ke as c
|
|
608
632
|
};
|
|
609
|
-
//# sourceMappingURL=chart-
|
|
633
|
+
//# sourceMappingURL=chart-CNaLgvx4.js.map
|