@alfadocs/ui-kit 0.30.5 → 0.31.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/{booking-Cw92aqo3.js → booking-Bhk9IYm3.js} +136 -147
- package/dist/_chunks/calendar-clock-CYkcqdwl.js +19 -0
- package/dist/_chunks/{editable-currency-cell-renderer-CztRy_21.js → editable-currency-cell-renderer-Od3Q-Y8J.js} +178 -189
- package/dist/_chunks/practice-results-CEKjwsgS.js +1441 -0
- package/dist/_chunks/refresh-cw-CC8jSKMr.js +17 -0
- package/dist/_chunks/smile-BSYLAHy6.js +17 -0
- package/dist/_chunks/{transaction-chip-z9ENE50O.js → transaction-chip-B8ujzowA.js} +47 -60
- package/dist/agent-catalog.json +42 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/practice-results/index.d.ts +4 -0
- package/dist/components/practice-results/index.js +6 -0
- package/dist/components/practice-results/practice-results.agent.d.ts +4 -0
- package/dist/components/practice-results/practice-results.d.ts +137 -0
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/i18n/locales/en.d.ts +65 -0
- package/dist/i18n/locales/en.js +65 -0
- package/dist/index.js +100 -97
- package/dist/locales/en.json +65 -0
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { jsx as s, jsxs as E } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as I, forwardRef as
|
|
2
|
+
import { useMemo as I, forwardRef as _, useState as R, useCallback as M, useEffect as P, useRef as X, createContext as Ce, useContext as Ne, isValidElement as Se, cloneElement as we, useImperativeHandle as yt, useLayoutEffect as Tt } from "react";
|
|
3
3
|
import { S as xt } from "./skeleton-CZbwyJAA.js";
|
|
4
4
|
import { E as Ct } from "./empty-state-BLy7tigq.js";
|
|
5
5
|
import { c as Nt } from "./index-D2ZczOXr.js";
|
|
6
6
|
import { useTranslation as F } from "react-i18next";
|
|
7
7
|
import { useGridFilter as J, AgGridReact as St } from "ag-grid-react";
|
|
8
8
|
import { ModuleRegistry as wt, AllCommunityModule as Ft } from "ag-grid-community";
|
|
9
|
-
import { B as
|
|
9
|
+
import { B as j } from "./button-DD_0Xdmr.js";
|
|
10
10
|
import { I as B } from "./icon-button-DPEqBKBQ.js";
|
|
11
11
|
import { P as Z } from "./popover-BfHSBEKq.js";
|
|
12
|
-
import { C as
|
|
12
|
+
import { C as Fe } from "./checkbox-Dgp_cfUr.js";
|
|
13
13
|
import { T as fe } from "./text-input-CakysYnD.js";
|
|
14
14
|
import { T as ae } from "./tag-bBPAvXyh.js";
|
|
15
15
|
import { D as Y } from "./dropdown-menu-DZxwF23X.js";
|
|
16
|
-
import { X as
|
|
17
|
-
import {
|
|
18
|
-
import { S as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
16
|
+
import { X as Re } from "./x-CCcI3eJp.js";
|
|
17
|
+
import { R as Rt } from "./refresh-cw-CC8jSKMr.js";
|
|
18
|
+
import { S as pe } from "./search-BonnQsHv.js";
|
|
19
|
+
import { c as De } from "./createLucideIcon-CrFbzy84.js";
|
|
20
|
+
import { G as Dt } from "./grip-vertical-Dlg0_k5C.js";
|
|
21
|
+
import { P as kt } from "./printer-CeVEWfQq.js";
|
|
21
22
|
import { F as ke } from "./file-text-DSNuv2B8.js";
|
|
22
|
-
import { F as
|
|
23
|
-
import
|
|
23
|
+
import { F as Et } from "./file-spreadsheet-zUkY8rJ2.js";
|
|
24
|
+
import It from "i18next";
|
|
24
25
|
import { S as Ee } from "./select-C92AT_OZ.js";
|
|
25
|
-
import { u as
|
|
26
|
+
import { u as zt } from "./registry-C9nwlNyL.js";
|
|
26
27
|
import { D as Ie } from "./date-range-picker-DYgHzMOo.js";
|
|
27
|
-
import { M as
|
|
28
|
+
import { M as At } from "./multi-select-dSe6Xtc4.js";
|
|
28
29
|
import { A as ze } from "./autocomplete-CUh0f7Dj.js";
|
|
29
30
|
import { N as ee } from "./number-input-BZXu6bPY.js";
|
|
30
|
-
import { B as
|
|
31
|
+
import { B as Pt } from "./badge-CIjQ1Us1.js";
|
|
31
32
|
import { A as Ae } from "./avatar-D_H4emLo.js";
|
|
32
|
-
import { T as
|
|
33
|
-
import { T as
|
|
34
|
-
import { S as
|
|
35
|
-
import { S as
|
|
33
|
+
import { T as Ot } from "./tooltip-ClJd0ciy.js";
|
|
34
|
+
import { T as be } from "./timestamp-BV2lC-wV.js";
|
|
35
|
+
import { S as Mt } from "./square-check-big-Jr-0202D.js";
|
|
36
|
+
import { S as Lt } from "./square-CZoGU14v.js";
|
|
36
37
|
import { c as Pe, a as Oe, b as Me, d as Le } from "./input-surface-xyERuLU_.js";
|
|
37
38
|
/**
|
|
38
39
|
* @license lucide-react v1.8.0 - ISC
|
|
@@ -40,48 +41,36 @@ import { c as Pe, a as Oe, b as Me, d as Le } from "./input-surface-xyERuLU_.js"
|
|
|
40
41
|
* This source code is licensed under the ISC license.
|
|
41
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
43
|
*/
|
|
43
|
-
const
|
|
44
|
+
const jt = [
|
|
44
45
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
45
46
|
["path", { d: "M12 3v18", key: "108xh3" }]
|
|
46
|
-
], _t =
|
|
47
|
+
], _t = De("columns-2", jt);
|
|
47
48
|
/**
|
|
48
49
|
* @license lucide-react v1.8.0 - ISC
|
|
49
50
|
*
|
|
50
51
|
* This source code is licensed under the ISC license.
|
|
51
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
53
|
*/
|
|
53
|
-
const
|
|
54
|
+
const $t = [
|
|
54
55
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
55
56
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
56
57
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
57
|
-
], ne =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/
|
|
64
|
-
const $t = [
|
|
65
|
-
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
66
|
-
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
67
|
-
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
68
|
-
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
69
|
-
], qt = pe("refresh-cw", $t);
|
|
70
|
-
function Gt(t) {
|
|
71
|
-
if (!we(t)) return t;
|
|
58
|
+
], ne = De("download", $t);
|
|
59
|
+
function qt(t) {
|
|
60
|
+
if (!Se(t)) return t;
|
|
72
61
|
const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
|
|
73
|
-
return
|
|
62
|
+
return we(e, { className: n, size: e.props.size ?? 16 });
|
|
74
63
|
}
|
|
75
|
-
const
|
|
64
|
+
const je = Ce(null);
|
|
76
65
|
function $(t) {
|
|
77
|
-
const e =
|
|
66
|
+
const e = Ne(je);
|
|
78
67
|
if (!e)
|
|
79
68
|
throw new Error(
|
|
80
69
|
`${t} must be rendered inside <DataTable.Toolbar> as a descendant of <DataTable>.`
|
|
81
70
|
);
|
|
82
71
|
return e;
|
|
83
72
|
}
|
|
84
|
-
function
|
|
73
|
+
function Gt({
|
|
85
74
|
getApi: t,
|
|
86
75
|
selectionCount: e,
|
|
87
76
|
onPrint: a,
|
|
@@ -91,9 +80,9 @@ function Vt({
|
|
|
91
80
|
() => ({ getApi: t, selectionCount: e, onPrint: a }),
|
|
92
81
|
[t, e, a]
|
|
93
82
|
);
|
|
94
|
-
return /* @__PURE__ */ s(
|
|
83
|
+
return /* @__PURE__ */ s(je.Provider, { value: r, children: n });
|
|
95
84
|
}
|
|
96
|
-
const
|
|
85
|
+
const Vt = [
|
|
97
86
|
"data-table-toolbar",
|
|
98
87
|
// Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
|
|
99
88
|
// Actions cluster on narrow screens. From `sm` (≥640px) we switch to
|
|
@@ -112,20 +101,20 @@ const Bt = [
|
|
|
112
101
|
"ds:border ds:border-[color:var(--card-border)]",
|
|
113
102
|
"ds:shadow-[var(--shadow-sm)]",
|
|
114
103
|
"ds:py-[var(--spacing-sm)] ds:px-[var(--spacing-md)]"
|
|
115
|
-
].join(" "),
|
|
104
|
+
].join(" "), _e = _(
|
|
116
105
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
117
106
|
"div",
|
|
118
107
|
{
|
|
119
108
|
ref: n,
|
|
120
109
|
role: "toolbar",
|
|
121
|
-
className: [
|
|
110
|
+
className: [Vt, t ?? ""].join(" ").trim(),
|
|
122
111
|
...a,
|
|
123
112
|
children: e
|
|
124
113
|
}
|
|
125
114
|
)
|
|
126
115
|
);
|
|
127
|
-
|
|
128
|
-
const $e =
|
|
116
|
+
_e.displayName = "DataTable.Toolbar";
|
|
117
|
+
const $e = _(
|
|
129
118
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
130
119
|
"div",
|
|
131
120
|
{
|
|
@@ -145,7 +134,7 @@ const $e = j(
|
|
|
145
134
|
)
|
|
146
135
|
);
|
|
147
136
|
$e.displayName = "DataTable.Toolbar.FilterBar";
|
|
148
|
-
const qe =
|
|
137
|
+
const qe = _(
|
|
149
138
|
({ className: t, children: e, ...a }, n) => /* @__PURE__ */ s(
|
|
150
139
|
"div",
|
|
151
140
|
{
|
|
@@ -161,7 +150,7 @@ const qe = j(
|
|
|
161
150
|
)
|
|
162
151
|
);
|
|
163
152
|
qe.displayName = "DataTable.Toolbar.Actions";
|
|
164
|
-
const Ge =
|
|
153
|
+
const Ge = _(
|
|
165
154
|
({ label: t, onExport: e, intent: a = "outline", ...n }, r) => {
|
|
166
155
|
const { t: o } = F(), { getApi: l } = $("DataTable.Toolbar.ExportCsv"), u = M(() => {
|
|
167
156
|
const d = l();
|
|
@@ -182,7 +171,7 @@ const Ge = j(
|
|
|
182
171
|
}
|
|
183
172
|
);
|
|
184
173
|
Ge.displayName = "DataTable.Toolbar.ExportCsv";
|
|
185
|
-
function
|
|
174
|
+
function H(t, e = [30, 30, 30]) {
|
|
186
175
|
if (typeof document > "u") return e;
|
|
187
176
|
const a = document.createElement("span");
|
|
188
177
|
a.style.color = `hsl(var(${t}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
|
|
@@ -211,7 +200,7 @@ async function Ve(t, e) {
|
|
|
211
200
|
});
|
|
212
201
|
u.push(b);
|
|
213
202
|
});
|
|
214
|
-
const d =
|
|
203
|
+
const d = H("--muted", [240, 240, 240]), i = H("--foreground", [30, 30, 30]), c = H("--card-foreground", [30, 30, 30]), p = H("--card", [250, 250, 250]), v = new a({ orientation: "landscape" });
|
|
215
204
|
n(v, {
|
|
216
205
|
head: l,
|
|
217
206
|
body: u,
|
|
@@ -225,7 +214,7 @@ async function Ve(t, e) {
|
|
|
225
214
|
}
|
|
226
215
|
}), v.save(e.fileName);
|
|
227
216
|
}
|
|
228
|
-
const Be =
|
|
217
|
+
const Be = _(
|
|
229
218
|
({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r }, o) => {
|
|
230
219
|
const { t: l } = F(), { getApi: u } = $("DataTable.Toolbar.ExportPdf"), d = M(() => {
|
|
231
220
|
const i = u();
|
|
@@ -252,7 +241,7 @@ const Be = j(
|
|
|
252
241
|
}
|
|
253
242
|
);
|
|
254
243
|
Be.displayName = "DataTable.Toolbar.ExportPdf";
|
|
255
|
-
const Ue =
|
|
244
|
+
const Ue = _(
|
|
256
245
|
({ label: t, intent: e = "outline", ...a }, n) => {
|
|
257
246
|
const { t: r } = F(), { onPrint: o } = $("DataTable.Toolbar.Print");
|
|
258
247
|
return /* @__PURE__ */ s(
|
|
@@ -261,7 +250,7 @@ const Ue = j(
|
|
|
261
250
|
ref: n,
|
|
262
251
|
type: "button",
|
|
263
252
|
intent: e,
|
|
264
|
-
icon: /* @__PURE__ */ s(
|
|
253
|
+
icon: /* @__PURE__ */ s(kt, { "aria-hidden": !0 }),
|
|
265
254
|
tooltip: t ?? r("dataTable.print"),
|
|
266
255
|
onClick: o,
|
|
267
256
|
...a
|
|
@@ -270,7 +259,7 @@ const Ue = j(
|
|
|
270
259
|
}
|
|
271
260
|
);
|
|
272
261
|
Ue.displayName = "DataTable.Toolbar.Print";
|
|
273
|
-
const
|
|
262
|
+
const Ke = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
274
263
|
const { t: a } = F(), { getApi: n } = $("DataTable.Toolbar.QuickSearch"), [r, o] = R(""), l = X(void 0);
|
|
275
264
|
return P(() => (l.current && window.clearTimeout(l.current), l.current = window.setTimeout(() => {
|
|
276
265
|
const u = n();
|
|
@@ -292,15 +281,15 @@ const He = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
|
292
281
|
value: r,
|
|
293
282
|
onChange: (u) => o(u.target.value),
|
|
294
283
|
placeholder: t ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
295
|
-
startAdornment: /* @__PURE__ */ s(
|
|
284
|
+
startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
296
285
|
clearable: !0,
|
|
297
286
|
onClear: () => o(""),
|
|
298
287
|
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
299
288
|
}
|
|
300
289
|
) });
|
|
301
290
|
};
|
|
302
|
-
|
|
303
|
-
const
|
|
291
|
+
Ke.displayName = "DataTable.Toolbar.QuickSearch";
|
|
292
|
+
const He = _(
|
|
304
293
|
({ onRefresh: t, label: e, intent: a = "outline", ...n }, r) => {
|
|
305
294
|
const { t: o } = F();
|
|
306
295
|
return /* @__PURE__ */ s(
|
|
@@ -309,7 +298,7 @@ const Ke = j(
|
|
|
309
298
|
ref: r,
|
|
310
299
|
type: "button",
|
|
311
300
|
intent: a,
|
|
312
|
-
icon: /* @__PURE__ */ s(
|
|
301
|
+
icon: /* @__PURE__ */ s(Rt, { "aria-hidden": !0 }),
|
|
313
302
|
tooltip: e ?? o("dataTable.refresh", "Refresh"),
|
|
314
303
|
onClick: t,
|
|
315
304
|
...n
|
|
@@ -317,8 +306,8 @@ const Ke = j(
|
|
|
317
306
|
);
|
|
318
307
|
}
|
|
319
308
|
);
|
|
320
|
-
|
|
321
|
-
function
|
|
309
|
+
He.displayName = "DataTable.Toolbar.Refresh";
|
|
310
|
+
function Bt(t) {
|
|
322
311
|
if (!t || typeof t != "object") return "";
|
|
323
312
|
const e = t;
|
|
324
313
|
if (typeof e.filter == "string" || typeof e.filter == "number") {
|
|
@@ -340,7 +329,7 @@ const We = () => {
|
|
|
340
329
|
g.push({
|
|
341
330
|
colId: y,
|
|
342
331
|
headerName: f,
|
|
343
|
-
text:
|
|
332
|
+
text: Bt(p[y])
|
|
344
333
|
});
|
|
345
334
|
}
|
|
346
335
|
n(g);
|
|
@@ -393,13 +382,13 @@ const We = () => {
|
|
|
393
382
|
c.colId
|
|
394
383
|
)),
|
|
395
384
|
/* @__PURE__ */ s(
|
|
396
|
-
|
|
385
|
+
j,
|
|
397
386
|
{
|
|
398
387
|
type: "button",
|
|
399
388
|
intent: "ghost",
|
|
400
389
|
size: "sm",
|
|
401
390
|
onClick: i,
|
|
402
|
-
startIcon: /* @__PURE__ */ s(
|
|
391
|
+
startIcon: /* @__PURE__ */ s(Re, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
403
392
|
children: t("dataTable.filterChips.clearAll", "Clear all")
|
|
404
393
|
}
|
|
405
394
|
)
|
|
@@ -437,7 +426,7 @@ const Qe = ({
|
|
|
437
426
|
children: e.map((d) => {
|
|
438
427
|
const i = o === d.value;
|
|
439
428
|
return /* @__PURE__ */ s(
|
|
440
|
-
|
|
429
|
+
j,
|
|
441
430
|
{
|
|
442
431
|
type: "button",
|
|
443
432
|
size: "sm",
|
|
@@ -453,7 +442,7 @@ const Qe = ({
|
|
|
453
442
|
);
|
|
454
443
|
};
|
|
455
444
|
Qe.displayName = "DataTable.Toolbar.FacetFilter";
|
|
456
|
-
const
|
|
445
|
+
const Ut = ["csv", "xlsx", "pdf"];
|
|
457
446
|
async function Kt(t, e) {
|
|
458
447
|
if (!t) return;
|
|
459
448
|
const a = await import("./exceljs.min-DUJ-5CGx.js").then((y) => y.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"), l = (t.getColumns() ?? []).filter((y) => y.isVisible());
|
|
@@ -473,7 +462,7 @@ async function Kt(t, e) {
|
|
|
473
462
|
})
|
|
474
463
|
);
|
|
475
464
|
});
|
|
476
|
-
const u =
|
|
465
|
+
const u = H("--muted", [240, 240, 240]), d = H("--foreground", [30, 30, 30]), i = r.getRow(1), c = ([y, x, f]) => `${y.toString(16).padStart(2, "0")}${x.toString(16).padStart(2, "0")}${f.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
477
466
|
i.eachCell((y) => {
|
|
478
467
|
y.font = { bold: !0, color: { argb: `FF${c(d)}` } }, y.fill = {
|
|
479
468
|
type: "pattern",
|
|
@@ -486,9 +475,9 @@ async function Kt(t, e) {
|
|
|
486
475
|
}), g = URL.createObjectURL(v), b = document.createElement("a");
|
|
487
476
|
b.href = g, b.download = e.fileName, document.body.appendChild(b), b.click(), document.body.removeChild(b), URL.revokeObjectURL(g);
|
|
488
477
|
}
|
|
489
|
-
const Xe =
|
|
490
|
-
function
|
|
491
|
-
const t =
|
|
478
|
+
const Xe = Ce(null);
|
|
479
|
+
function Ht() {
|
|
480
|
+
const t = Ne(Xe);
|
|
492
481
|
if (!t)
|
|
493
482
|
throw new Error(
|
|
494
483
|
"DataTable.Toolbar.ExportMenu.Item must be rendered inside DataTable.Toolbar.ExportMenu."
|
|
@@ -496,7 +485,7 @@ function Wt() {
|
|
|
496
485
|
return t;
|
|
497
486
|
}
|
|
498
487
|
const Je = ({ children: t, label: e }) => {
|
|
499
|
-
const { t: a } = F(), { getApi: n } = $("DataTable.Toolbar.ExportMenu"), r = I(() => ({ getApi: n }), [n]), o = t ??
|
|
488
|
+
const { t: a } = F(), { getApi: n } = $("DataTable.Toolbar.ExportMenu"), r = I(() => ({ getApi: n }), [n]), o = t ?? Ut.map((l) => /* @__PURE__ */ s(me, { format: l }, l));
|
|
500
489
|
return /* @__PURE__ */ s(Xe.Provider, { value: r, children: /* @__PURE__ */ E(Y.Root, { children: [
|
|
501
490
|
/* @__PURE__ */ s(Y.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
502
491
|
B,
|
|
@@ -513,19 +502,19 @@ const Je = ({ children: t, label: e }) => {
|
|
|
513
502
|
] }) });
|
|
514
503
|
};
|
|
515
504
|
Je.displayName = "DataTable.Toolbar.ExportMenu";
|
|
516
|
-
function
|
|
505
|
+
function Wt(t, e) {
|
|
517
506
|
return e === "csv" ? t("dataTable.export.csv", "Export CSV") : e === "xlsx" ? t("dataTable.export.xlsx", "Export Excel") : e === "pdf" ? t("dataTable.export.pdf", "Export PDF") : t("dataTable.export.custom", "Export");
|
|
518
507
|
}
|
|
519
|
-
function
|
|
520
|
-
return t === "csv" ? /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" }) : t === "xlsx" ? /* @__PURE__ */ s(
|
|
508
|
+
function Qt(t) {
|
|
509
|
+
return t === "csv" ? /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" }) : t === "xlsx" ? /* @__PURE__ */ s(Et, { "aria-hidden": !0, className: "ds:size-4" }) : t === "pdf" ? /* @__PURE__ */ s(ke, { "aria-hidden": !0, className: "ds:size-4" }) : /* @__PURE__ */ s(ne, { "aria-hidden": !0, className: "ds:size-4" });
|
|
521
510
|
}
|
|
522
|
-
const
|
|
511
|
+
const me = ({
|
|
523
512
|
format: t,
|
|
524
513
|
label: e,
|
|
525
514
|
onClick: a,
|
|
526
515
|
fileName: n
|
|
527
516
|
}) => {
|
|
528
|
-
const { t: r } = F(), { getApi: o } =
|
|
517
|
+
const { t: r } = F(), { getApi: o } = Ht(), l = M(() => {
|
|
529
518
|
const u = o();
|
|
530
519
|
if (t === "csv") {
|
|
531
520
|
u == null || u.exportDataAsCsv();
|
|
@@ -546,12 +535,12 @@ const ge = ({
|
|
|
546
535
|
a == null || a(u);
|
|
547
536
|
}, [t, n, a, o]);
|
|
548
537
|
return /* @__PURE__ */ s(Y.Item, { onSelect: l, children: /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
549
|
-
|
|
550
|
-
/* @__PURE__ */ s("span", { children: e ??
|
|
538
|
+
Qt(t),
|
|
539
|
+
/* @__PURE__ */ s("span", { children: e ?? Wt(r, t) })
|
|
551
540
|
] }) });
|
|
552
541
|
};
|
|
553
|
-
|
|
554
|
-
function
|
|
542
|
+
me.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
543
|
+
function Xt(t) {
|
|
555
544
|
return t ? (t.getColumns() ?? []).map((a) => a.getColDef().hide === void 0 && a.getColId().startsWith("ag-Grid-") ? null : {
|
|
556
545
|
colId: a.getColId(),
|
|
557
546
|
displayName: t.getDisplayNameForColumn(a, null) || a.getColId(),
|
|
@@ -561,7 +550,7 @@ function Jt(t) {
|
|
|
561
550
|
const Ze = ({ label: t }) => {
|
|
562
551
|
const { t: e } = F(), { getApi: a } = $("DataTable.Toolbar.ColumnToggle"), [n, r] = R(!1), [o, l] = R([]), [u, d] = R(null), [i, c] = R(null);
|
|
563
552
|
P(() => {
|
|
564
|
-
n && l(
|
|
553
|
+
n && l(Xt(a()));
|
|
565
554
|
}, [n, a]);
|
|
566
555
|
const p = M(
|
|
567
556
|
(b, y) => {
|
|
@@ -641,11 +630,11 @@ const Ze = ({ label: t }) => {
|
|
|
641
630
|
{
|
|
642
631
|
"aria-hidden": "true",
|
|
643
632
|
className: "ds:cursor-grab ds:text-[color:var(--muted-foreground)] ds:active:cursor-grabbing",
|
|
644
|
-
children: /* @__PURE__ */ s(
|
|
633
|
+
children: /* @__PURE__ */ s(Dt, { className: "ds:size-4" })
|
|
645
634
|
}
|
|
646
635
|
),
|
|
647
636
|
/* @__PURE__ */ s(
|
|
648
|
-
|
|
637
|
+
Fe,
|
|
649
638
|
{
|
|
650
639
|
label: b.displayName,
|
|
651
640
|
checked: b.visible,
|
|
@@ -663,19 +652,19 @@ const Ze = ({ label: t }) => {
|
|
|
663
652
|
] });
|
|
664
653
|
};
|
|
665
654
|
Ze.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
666
|
-
const Ye =
|
|
655
|
+
const Ye = _(
|
|
667
656
|
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...o }, l) => {
|
|
668
657
|
const { t: u } = F(), { getApi: d, selectionCount: i } = $(
|
|
669
658
|
"DataTable.Toolbar.BulkAction"
|
|
670
659
|
);
|
|
671
660
|
return i === 0 ? null : /* @__PURE__ */ E(
|
|
672
|
-
|
|
661
|
+
j,
|
|
673
662
|
{
|
|
674
663
|
ref: l,
|
|
675
664
|
type: "button",
|
|
676
665
|
intent: n === "destructive" ? "destructive" : "secondary",
|
|
677
666
|
size: r,
|
|
678
|
-
startIcon:
|
|
667
|
+
startIcon: qt(e),
|
|
679
668
|
onClick: () => a(d()),
|
|
680
669
|
"aria-label": `${t} (${u("dataTable.bulkAction", { count: i })})`,
|
|
681
670
|
...o,
|
|
@@ -695,9 +684,9 @@ const Ye = j(
|
|
|
695
684
|
}
|
|
696
685
|
);
|
|
697
686
|
Ye.displayName = "DataTable.Toolbar.BulkAction";
|
|
698
|
-
const
|
|
699
|
-
Item:
|
|
700
|
-
}), te = Object.assign(
|
|
687
|
+
const Jt = Object.assign(Je, {
|
|
688
|
+
Item: me
|
|
689
|
+
}), te = Object.assign(_e, {
|
|
701
690
|
FilterBar: $e,
|
|
702
691
|
Actions: qe,
|
|
703
692
|
/** @deprecated Use `Toolbar.ExportMenu` with a `csv` item. */
|
|
@@ -707,19 +696,19 @@ const Zt = Object.assign(Je, {
|
|
|
707
696
|
Print: Ue,
|
|
708
697
|
ColumnToggle: Ze,
|
|
709
698
|
BulkAction: Ye,
|
|
710
|
-
QuickSearch:
|
|
711
|
-
Refresh:
|
|
699
|
+
QuickSearch: Ke,
|
|
700
|
+
Refresh: He,
|
|
712
701
|
FilterChips: We,
|
|
713
702
|
FacetFilter: Qe,
|
|
714
|
-
ExportMenu:
|
|
715
|
-
}),
|
|
703
|
+
ExportMenu: Jt
|
|
704
|
+
}), Zt = [
|
|
716
705
|
"contains",
|
|
717
706
|
"equals",
|
|
718
707
|
"startsWith",
|
|
719
708
|
"endsWith",
|
|
720
709
|
"notContains"
|
|
721
710
|
];
|
|
722
|
-
function
|
|
711
|
+
function Yt(t) {
|
|
723
712
|
const e = new Intl.Collator(t, {
|
|
724
713
|
sensitivity: "base",
|
|
725
714
|
usage: "search"
|
|
@@ -742,20 +731,20 @@ function ea(t) {
|
|
|
742
731
|
) === 0
|
|
743
732
|
};
|
|
744
733
|
}
|
|
745
|
-
function
|
|
734
|
+
function ea(t) {
|
|
746
735
|
return t == null ? null : typeof t == "string" ? t : String(t);
|
|
747
736
|
}
|
|
748
|
-
function
|
|
737
|
+
function ta(t) {
|
|
749
738
|
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: o } = t, { t: l } = F("ui"), u = (e == null ? void 0 : e.type) ?? o ?? "contains", [d, i] = R(u), [c, p] = R((e == null ? void 0 : e.filter) ?? "");
|
|
750
739
|
P(() => {
|
|
751
740
|
i((e == null ? void 0 : e.type) ?? o ?? "contains"), p((e == null ? void 0 : e.filter) ?? "");
|
|
752
741
|
}, [e, o]);
|
|
753
|
-
const v = I(() =>
|
|
742
|
+
const v = I(() => Yt(It.language), []);
|
|
754
743
|
J({
|
|
755
744
|
doesFilterPass: (f) => {
|
|
756
745
|
const m = e;
|
|
757
746
|
if (!m || m.filter === "") return !0;
|
|
758
|
-
const h =
|
|
747
|
+
const h = ea(n(f.node));
|
|
759
748
|
if (h === null) return !1;
|
|
760
749
|
switch (m.type) {
|
|
761
750
|
case "equals":
|
|
@@ -783,7 +772,7 @@ function aa(t) {
|
|
|
783
772
|
function b() {
|
|
784
773
|
p(""), i(o ?? "contains"), a(null);
|
|
785
774
|
}
|
|
786
|
-
const y =
|
|
775
|
+
const y = Zt.map(
|
|
787
776
|
(f) => ({
|
|
788
777
|
value: f,
|
|
789
778
|
label: l(`dataTable.textFilter.operators.${f}`)
|
|
@@ -818,18 +807,18 @@ function aa(t) {
|
|
|
818
807
|
},
|
|
819
808
|
placeholder: x,
|
|
820
809
|
"aria-label": x,
|
|
821
|
-
startAdornment: /* @__PURE__ */ s(
|
|
810
|
+
startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": "true", className: "ds:size-4" })
|
|
822
811
|
}
|
|
823
812
|
),
|
|
824
813
|
/* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
825
|
-
/* @__PURE__ */ s(
|
|
826
|
-
/* @__PURE__ */ s(
|
|
814
|
+
/* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: b, type: "button", children: l("dataTable.textFilter.clear") }),
|
|
815
|
+
/* @__PURE__ */ s(j, { intent: "primary", size: "sm", onClick: g, type: "button", children: l("dataTable.textFilter.apply") })
|
|
827
816
|
] })
|
|
828
817
|
]
|
|
829
818
|
}
|
|
830
819
|
);
|
|
831
820
|
}
|
|
832
|
-
function
|
|
821
|
+
function aa(t) {
|
|
833
822
|
var p, v;
|
|
834
823
|
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), o = ((v = (p = n == null ? void 0 : n.getColDef) == null ? void 0 : p.call(n)) == null ? void 0 : v.filterParams) ?? {}, l = o.defaultOperator ?? "contains", u = o.placeholder ?? r("dataTable.textFilter.placeholder"), [d, i] = R((e == null ? void 0 : e.filter) ?? "");
|
|
835
824
|
P(() => {
|
|
@@ -856,7 +845,7 @@ function na(t) {
|
|
|
856
845
|
onChange: (g) => i(g.target.value),
|
|
857
846
|
placeholder: u,
|
|
858
847
|
"aria-label": u,
|
|
859
|
-
startAdornment: /* @__PURE__ */ s(
|
|
848
|
+
startAdornment: /* @__PURE__ */ s(pe, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
860
849
|
endAdornment: d.length > 0 ? /* @__PURE__ */ s(
|
|
861
850
|
"button",
|
|
862
851
|
{
|
|
@@ -864,13 +853,13 @@ function na(t) {
|
|
|
864
853
|
"aria-label": r("dataTable.textFilter.clear"),
|
|
865
854
|
onClick: c,
|
|
866
855
|
className: "ds:pointer-events-auto ds:flex ds:items-center ds:text-[var(--muted-foreground)] ds:hover:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
867
|
-
children: /* @__PURE__ */ s(
|
|
856
|
+
children: /* @__PURE__ */ s(Re, { "aria-hidden": "true", className: "ds:size-4" })
|
|
868
857
|
}
|
|
869
858
|
) : void 0
|
|
870
859
|
}
|
|
871
860
|
) });
|
|
872
861
|
}
|
|
873
|
-
const
|
|
862
|
+
const na = {
|
|
874
863
|
id: "data-table",
|
|
875
864
|
capabilities: [
|
|
876
865
|
"select_single",
|
|
@@ -979,7 +968,7 @@ const ra = {
|
|
|
979
968
|
}
|
|
980
969
|
};
|
|
981
970
|
wt.registerModules([Ft]);
|
|
982
|
-
const
|
|
971
|
+
const ra = Nt("ag-theme-alfadocs ds:w-full", {
|
|
983
972
|
variants: {
|
|
984
973
|
density: {
|
|
985
974
|
default: "",
|
|
@@ -996,7 +985,7 @@ const sa = Nt("ag-theme-alfadocs ds:w-full", {
|
|
|
996
985
|
bordered: !0
|
|
997
986
|
}
|
|
998
987
|
});
|
|
999
|
-
function
|
|
988
|
+
function sa() {
|
|
1000
989
|
const { t } = F();
|
|
1001
990
|
return I(
|
|
1002
991
|
() => ({
|
|
@@ -1030,7 +1019,7 @@ function oa() {
|
|
|
1030
1019
|
[t]
|
|
1031
1020
|
);
|
|
1032
1021
|
}
|
|
1033
|
-
function
|
|
1022
|
+
function oa() {
|
|
1034
1023
|
return /* @__PURE__ */ s(
|
|
1035
1024
|
"div",
|
|
1036
1025
|
{
|
|
@@ -1048,7 +1037,7 @@ function la() {
|
|
|
1048
1037
|
}
|
|
1049
1038
|
);
|
|
1050
1039
|
}
|
|
1051
|
-
function
|
|
1040
|
+
function la() {
|
|
1052
1041
|
const { t } = F();
|
|
1053
1042
|
return /* @__PURE__ */ s(
|
|
1054
1043
|
Ct,
|
|
@@ -1060,7 +1049,7 @@ function ia() {
|
|
|
1060
1049
|
}
|
|
1061
1050
|
);
|
|
1062
1051
|
}
|
|
1063
|
-
function
|
|
1052
|
+
function ia(t) {
|
|
1064
1053
|
try {
|
|
1065
1054
|
const e = localStorage.getItem(`data-table-col-state:${t}`);
|
|
1066
1055
|
return e ? JSON.parse(e) : null;
|
|
@@ -1068,7 +1057,7 @@ function ca(t) {
|
|
|
1068
1057
|
return null;
|
|
1069
1058
|
}
|
|
1070
1059
|
}
|
|
1071
|
-
function
|
|
1060
|
+
function ca(t, e) {
|
|
1072
1061
|
try {
|
|
1073
1062
|
localStorage.setItem(
|
|
1074
1063
|
`data-table-col-state:${t}`,
|
|
@@ -1077,7 +1066,7 @@ function da(t, e) {
|
|
|
1077
1066
|
} catch {
|
|
1078
1067
|
}
|
|
1079
1068
|
}
|
|
1080
|
-
function
|
|
1069
|
+
function da(t, e) {
|
|
1081
1070
|
const {
|
|
1082
1071
|
columnDefs: a,
|
|
1083
1072
|
rowData: n,
|
|
@@ -1100,7 +1089,7 @@ function ua(t, e) {
|
|
|
1100
1089
|
pinnedBottomRowData: C,
|
|
1101
1090
|
printMode: S = !1,
|
|
1102
1091
|
children: z
|
|
1103
|
-
} = t, { t: D, i18n: q } = F(), k = X(null), [G, tt] = R(0), [se, oe] = R(""), at =
|
|
1092
|
+
} = t, { t: D, i18n: q } = F(), k = X(null), [G, tt] = R(0), [se, oe] = R(""), at = sa(), le = I(
|
|
1104
1093
|
() => ({
|
|
1105
1094
|
getSelection: () => {
|
|
1106
1095
|
var w;
|
|
@@ -1121,8 +1110,8 @@ function ua(t, e) {
|
|
|
1121
1110
|
});
|
|
1122
1111
|
},
|
|
1123
1112
|
selectRange: (T, N) => {
|
|
1124
|
-
var
|
|
1125
|
-
const w = (
|
|
1113
|
+
var ge;
|
|
1114
|
+
const w = (ge = k.current) == null ? void 0 : ge.api;
|
|
1126
1115
|
if (!w) return;
|
|
1127
1116
|
const O = [];
|
|
1128
1117
|
w.forEachNodeAfterFilterAndSort((U) => {
|
|
@@ -1177,7 +1166,7 @@ function ua(t, e) {
|
|
|
1177
1166
|
}),
|
|
1178
1167
|
[]
|
|
1179
1168
|
);
|
|
1180
|
-
yt(e, () => le, [le]),
|
|
1169
|
+
yt(e, () => le, [le]), zt(na, le, d);
|
|
1181
1170
|
const nt = q.dir() === "rtl", rt = n === void 0, st = I(
|
|
1182
1171
|
() => window.matchMedia("(prefers-reduced-motion: reduce)").matches,
|
|
1183
1172
|
[]
|
|
@@ -1194,14 +1183,14 @@ function ua(t, e) {
|
|
|
1194
1183
|
}, [r]), it = M(() => {
|
|
1195
1184
|
var N;
|
|
1196
1185
|
if (!d || !((N = k.current) != null && N.api)) return;
|
|
1197
|
-
const T =
|
|
1186
|
+
const T = ia(d);
|
|
1198
1187
|
T && k.current.api.applyColumnState({
|
|
1199
1188
|
state: T,
|
|
1200
1189
|
applyOrder: !0
|
|
1201
1190
|
});
|
|
1202
1191
|
}, [d]), ie = M(() => {
|
|
1203
1192
|
var T;
|
|
1204
|
-
d && ((T = k.current) != null && T.api) &&
|
|
1193
|
+
d && ((T = k.current) != null && T.api) && ca(d, k.current.api);
|
|
1205
1194
|
}, [d]), ct = M(() => {
|
|
1206
1195
|
var w;
|
|
1207
1196
|
const T = (w = k.current) == null ? void 0 : w.api;
|
|
@@ -1239,7 +1228,7 @@ function ua(t, e) {
|
|
|
1239
1228
|
const T = setTimeout(() => oe(""), 3e3);
|
|
1240
1229
|
return () => clearTimeout(T);
|
|
1241
1230
|
}, [se]);
|
|
1242
|
-
const ft = v ??
|
|
1231
|
+
const ft = v ?? la, pt = g ?? oa, mt = M(
|
|
1243
1232
|
() => {
|
|
1244
1233
|
var T;
|
|
1245
1234
|
return (T = k.current) == null ? void 0 : T.api;
|
|
@@ -1247,7 +1236,7 @@ function ua(t, e) {
|
|
|
1247
1236
|
[]
|
|
1248
1237
|
), gt = M(() => {
|
|
1249
1238
|
typeof window < "u" && window.print();
|
|
1250
|
-
}, []), bt =
|
|
1239
|
+
}, []), bt = ra({
|
|
1251
1240
|
density: ot,
|
|
1252
1241
|
bordered: x,
|
|
1253
1242
|
className: m
|
|
@@ -1262,7 +1251,7 @@ function ua(t, e) {
|
|
|
1262
1251
|
"data-print-mode": S ? "true" : void 0,
|
|
1263
1252
|
children: [
|
|
1264
1253
|
!S && /* @__PURE__ */ s(
|
|
1265
|
-
|
|
1254
|
+
Gt,
|
|
1266
1255
|
{
|
|
1267
1256
|
getApi: mt,
|
|
1268
1257
|
selectionCount: G,
|
|
@@ -1288,8 +1277,8 @@ function ua(t, e) {
|
|
|
1288
1277
|
// language instead of AG Grid's stock browser-skinned input.
|
|
1289
1278
|
// Number / date / select columns opt into their dedicated
|
|
1290
1279
|
// wrapper per-column.
|
|
1291
|
-
filter:
|
|
1292
|
-
floatingFilterComponent:
|
|
1280
|
+
filter: ta,
|
|
1281
|
+
floatingFilterComponent: aa,
|
|
1293
1282
|
resizable: !0,
|
|
1294
1283
|
floatingFilter: !0,
|
|
1295
1284
|
// §13d — faint sort icon advertises which columns are
|
|
@@ -1345,7 +1334,7 @@ function ua(t, e) {
|
|
|
1345
1334
|
}
|
|
1346
1335
|
);
|
|
1347
1336
|
}
|
|
1348
|
-
const et =
|
|
1337
|
+
const et = _(da);
|
|
1349
1338
|
et.displayName = "DataTable";
|
|
1350
1339
|
const mn = Object.assign(et, {
|
|
1351
1340
|
Toolbar: te
|
|
@@ -1416,7 +1405,7 @@ function hn(t) {
|
|
|
1416
1405
|
}
|
|
1417
1406
|
return /* @__PURE__ */ s("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(Ie, { value: n, onChange: o, size: "sm" }) });
|
|
1418
1407
|
}
|
|
1419
|
-
function
|
|
1408
|
+
function K(t) {
|
|
1420
1409
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
1421
1410
|
}
|
|
1422
1411
|
function vn(t) {
|
|
@@ -1427,14 +1416,14 @@ function vn(t) {
|
|
|
1427
1416
|
return r.forEachNode((m) => {
|
|
1428
1417
|
const h = n(m);
|
|
1429
1418
|
if (h == null) return;
|
|
1430
|
-
const C = typeof h == "string" || typeof h == "number" ? h : String(h), S =
|
|
1419
|
+
const C = typeof h == "string" || typeof h == "number" ? h : String(h), S = K(C);
|
|
1431
1420
|
f.has(S) || f.set(S, { value: C, label: String(C) });
|
|
1432
1421
|
}), Array.from(f.values()).sort(
|
|
1433
1422
|
(m, h) => String(m.label).localeCompare(String(h.label))
|
|
1434
1423
|
);
|
|
1435
1424
|
}, [l, r, o, n]), c = I(() => {
|
|
1436
1425
|
const f = /* @__PURE__ */ new Set(), m = (e == null ? void 0 : e.values) ?? [];
|
|
1437
|
-
for (const h of m) f.add(
|
|
1426
|
+
for (const h of m) f.add(K(h));
|
|
1438
1427
|
return f;
|
|
1439
1428
|
}, [e]), [p, v] = R(c);
|
|
1440
1429
|
P(() => {
|
|
@@ -1445,8 +1434,8 @@ function vn(t) {
|
|
|
1445
1434
|
if (!m || m.length === 0) return !0;
|
|
1446
1435
|
const h = n(f.node);
|
|
1447
1436
|
if (h == null) return !1;
|
|
1448
|
-
const C = typeof h == "string" || typeof h == "number" ? h : String(h), S =
|
|
1449
|
-
return m.some((z) =>
|
|
1437
|
+
const C = typeof h == "string" || typeof h == "number" ? h : String(h), S = K(C);
|
|
1438
|
+
return m.some((z) => K(z) === S);
|
|
1450
1439
|
}
|
|
1451
1440
|
});
|
|
1452
1441
|
function g(f) {
|
|
@@ -1462,7 +1451,7 @@ function vn(t) {
|
|
|
1462
1451
|
}
|
|
1463
1452
|
const f = [];
|
|
1464
1453
|
for (const m of i)
|
|
1465
|
-
p.has(
|
|
1454
|
+
p.has(K(m.value)) && f.push(m.value);
|
|
1466
1455
|
a({ type: "set", values: f });
|
|
1467
1456
|
}
|
|
1468
1457
|
function y() {
|
|
@@ -1482,9 +1471,9 @@ function vn(t) {
|
|
|
1482
1471
|
"aria-label": x,
|
|
1483
1472
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:max-h-[240px] ds:overflow-y-auto",
|
|
1484
1473
|
children: i.length === 0 ? /* @__PURE__ */ s("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: d("dataTable.agGrid.noRowsToShow") }) : i.map((f) => {
|
|
1485
|
-
const m =
|
|
1474
|
+
const m = K(f.value);
|
|
1486
1475
|
return /* @__PURE__ */ s(
|
|
1487
|
-
|
|
1476
|
+
Fe,
|
|
1488
1477
|
{
|
|
1489
1478
|
size: "sm",
|
|
1490
1479
|
label: f.label,
|
|
@@ -1497,8 +1486,8 @@ function vn(t) {
|
|
|
1497
1486
|
}
|
|
1498
1487
|
),
|
|
1499
1488
|
/* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
1500
|
-
/* @__PURE__ */ s(
|
|
1501
|
-
/* @__PURE__ */ s(
|
|
1489
|
+
/* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: y, type: "button", children: d("dataTable.selectFilter.clear") }),
|
|
1490
|
+
/* @__PURE__ */ s(j, { intent: "primary", size: "sm", onClick: b, type: "button", children: d("dataTable.selectFilter.apply") })
|
|
1502
1491
|
] })
|
|
1503
1492
|
]
|
|
1504
1493
|
}
|
|
@@ -1533,7 +1522,7 @@ function yn(t) {
|
|
|
1533
1522
|
a({ type: "set", values: g });
|
|
1534
1523
|
}
|
|
1535
1524
|
return /* @__PURE__ */ s("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1536
|
-
|
|
1525
|
+
At,
|
|
1537
1526
|
{
|
|
1538
1527
|
size: "sm",
|
|
1539
1528
|
options: u,
|
|
@@ -1615,7 +1604,7 @@ function Tn(t) {
|
|
|
1615
1604
|
"aria-label": f
|
|
1616
1605
|
}
|
|
1617
1606
|
),
|
|
1618
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ s(
|
|
1607
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: x, type: "button", children: i("dataTable.typeaheadFilter.clear") }) })
|
|
1619
1608
|
]
|
|
1620
1609
|
}
|
|
1621
1610
|
);
|
|
@@ -1650,7 +1639,7 @@ function xn(t) {
|
|
|
1650
1639
|
}
|
|
1651
1640
|
) });
|
|
1652
1641
|
}
|
|
1653
|
-
const
|
|
1642
|
+
const ua = [
|
|
1654
1643
|
"equals",
|
|
1655
1644
|
"notEqual",
|
|
1656
1645
|
"greaterThan",
|
|
@@ -1661,13 +1650,13 @@ const fa = [
|
|
|
1661
1650
|
"blank",
|
|
1662
1651
|
"notBlank"
|
|
1663
1652
|
];
|
|
1664
|
-
function
|
|
1653
|
+
function he(t) {
|
|
1665
1654
|
return t !== "blank" && t !== "notBlank";
|
|
1666
1655
|
}
|
|
1667
|
-
function
|
|
1656
|
+
function ve(t) {
|
|
1668
1657
|
return t === "inRange";
|
|
1669
1658
|
}
|
|
1670
|
-
function
|
|
1659
|
+
function fa(t, e, a, n) {
|
|
1671
1660
|
if (t === "blank") return e === null;
|
|
1672
1661
|
if (t === "notBlank") return e !== null;
|
|
1673
1662
|
if (e === null) return !1;
|
|
@@ -1694,7 +1683,7 @@ function pa(t, e, a, n) {
|
|
|
1694
1683
|
return !0;
|
|
1695
1684
|
}
|
|
1696
1685
|
}
|
|
1697
|
-
function
|
|
1686
|
+
function pa(t) {
|
|
1698
1687
|
if (t == null || t === "") return null;
|
|
1699
1688
|
const e = typeof t == "number" ? t : Number(t);
|
|
1700
1689
|
return Number.isNaN(e) ? null : e;
|
|
@@ -1721,8 +1710,8 @@ function Cn(t) {
|
|
|
1721
1710
|
}, [e, r]), J({
|
|
1722
1711
|
doesFilterPass: (D) => {
|
|
1723
1712
|
if (!e) return !0;
|
|
1724
|
-
const q =
|
|
1725
|
-
return
|
|
1713
|
+
const q = pa(n(D.node));
|
|
1714
|
+
return fa(
|
|
1726
1715
|
e.type,
|
|
1727
1716
|
q,
|
|
1728
1717
|
e.filter ?? null,
|
|
@@ -1731,14 +1720,14 @@ function Cn(t) {
|
|
|
1731
1720
|
}
|
|
1732
1721
|
});
|
|
1733
1722
|
const f = I(
|
|
1734
|
-
() =>
|
|
1723
|
+
() => ua.map((D) => ({
|
|
1735
1724
|
value: D,
|
|
1736
1725
|
label: i(`dataTable.numberFilter.operators.${D}`)
|
|
1737
1726
|
})),
|
|
1738
1727
|
[i]
|
|
1739
1728
|
), m = d ?? i("dataTable.numberFilter.placeholder");
|
|
1740
1729
|
function h() {
|
|
1741
|
-
if (!
|
|
1730
|
+
if (!he(p)) {
|
|
1742
1731
|
a({ type: p, filter: 0 });
|
|
1743
1732
|
return;
|
|
1744
1733
|
}
|
|
@@ -1746,7 +1735,7 @@ function Cn(t) {
|
|
|
1746
1735
|
a(null);
|
|
1747
1736
|
return;
|
|
1748
1737
|
}
|
|
1749
|
-
if (
|
|
1738
|
+
if (ve(p)) {
|
|
1750
1739
|
a({
|
|
1751
1740
|
type: p,
|
|
1752
1741
|
filter: g,
|
|
@@ -1759,7 +1748,7 @@ function Cn(t) {
|
|
|
1759
1748
|
function C() {
|
|
1760
1749
|
v(r ?? "equals"), b(null), x(null), a(null);
|
|
1761
1750
|
}
|
|
1762
|
-
const S =
|
|
1751
|
+
const S = he(p), z = ve(p);
|
|
1763
1752
|
return /* @__PURE__ */ E(
|
|
1764
1753
|
"div",
|
|
1765
1754
|
{
|
|
@@ -1820,8 +1809,8 @@ function Cn(t) {
|
|
|
1820
1809
|
)
|
|
1821
1810
|
] }),
|
|
1822
1811
|
/* @__PURE__ */ E("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
1823
|
-
/* @__PURE__ */ s(
|
|
1824
|
-
/* @__PURE__ */ s(
|
|
1812
|
+
/* @__PURE__ */ s(j, { intent: "ghost", size: "sm", onClick: C, type: "button", children: i("dataTable.numberFilter.clear") }),
|
|
1813
|
+
/* @__PURE__ */ s(j, { intent: "primary", size: "sm", onClick: h, type: "button", children: i("dataTable.numberFilter.apply") })
|
|
1825
1814
|
] })
|
|
1826
1815
|
]
|
|
1827
1816
|
}
|
|
@@ -1858,7 +1847,7 @@ function Nn(t) {
|
|
|
1858
1847
|
}
|
|
1859
1848
|
function Sn(t) {
|
|
1860
1849
|
const { value: e, variantMap: a } = t, n = (a == null ? void 0 : a[e]) ?? "neutral";
|
|
1861
|
-
return /* @__PURE__ */ s(
|
|
1850
|
+
return /* @__PURE__ */ s(Pt, { variant: n, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
1862
1851
|
}
|
|
1863
1852
|
function wn(t) {
|
|
1864
1853
|
const { value: e } = t;
|
|
@@ -1867,11 +1856,11 @@ function wn(t) {
|
|
|
1867
1856
|
/* @__PURE__ */ s("span", { children: e.name })
|
|
1868
1857
|
] }) : null;
|
|
1869
1858
|
}
|
|
1870
|
-
const
|
|
1859
|
+
const ma = {
|
|
1871
1860
|
sm: "ds:size-8",
|
|
1872
1861
|
md: "ds:size-10",
|
|
1873
1862
|
lg: "ds:size-12"
|
|
1874
|
-
},
|
|
1863
|
+
}, ga = {
|
|
1875
1864
|
square: "ds:rounded-none",
|
|
1876
1865
|
rounded: "ds:rounded-[var(--radius-md)]",
|
|
1877
1866
|
circle: "ds:rounded-[var(--radius-full)]"
|
|
@@ -1881,12 +1870,12 @@ function ue(t, e) {
|
|
|
1881
1870
|
const a = t[e];
|
|
1882
1871
|
return typeof a == "string" ? a : void 0;
|
|
1883
1872
|
}
|
|
1884
|
-
const
|
|
1885
|
-
function
|
|
1873
|
+
const ba = /^(?:https?:|data:image\/)/i;
|
|
1874
|
+
function ha(t) {
|
|
1886
1875
|
if (!t) return;
|
|
1887
1876
|
const e = t.trim();
|
|
1888
1877
|
if (e.length !== 0)
|
|
1889
|
-
return
|
|
1878
|
+
return ba.test(e) ? e : void 0;
|
|
1890
1879
|
}
|
|
1891
1880
|
function Fn(t) {
|
|
1892
1881
|
const {
|
|
@@ -1898,7 +1887,7 @@ function Fn(t) {
|
|
|
1898
1887
|
shape: l = "rounded"
|
|
1899
1888
|
} = t;
|
|
1900
1889
|
if (!e) return null;
|
|
1901
|
-
const u = ue(e, a), d =
|
|
1890
|
+
const u = ue(e, a), d = ha(u), i = n ? ue(e, n) ?? "" : "", c = r ? ue(e, r) : void 0;
|
|
1902
1891
|
return d ? /* @__PURE__ */ s(
|
|
1903
1892
|
"img",
|
|
1904
1893
|
{
|
|
@@ -1906,7 +1895,7 @@ function Fn(t) {
|
|
|
1906
1895
|
alt: i,
|
|
1907
1896
|
loading: "lazy",
|
|
1908
1897
|
decoding: "async",
|
|
1909
|
-
className: ["ds:object-cover",
|
|
1898
|
+
className: ["ds:object-cover", ma[o], ga[l]].join(
|
|
1910
1899
|
" "
|
|
1911
1900
|
)
|
|
1912
1901
|
}
|
|
@@ -1918,7 +1907,7 @@ function Rn(t) {
|
|
|
1918
1907
|
const r = e.slice(0, a), o = e.length - a;
|
|
1919
1908
|
return /* @__PURE__ */ E("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1920
1909
|
r.map((l) => /* @__PURE__ */ s(ae, { label: l, size: "sm" }, l)),
|
|
1921
|
-
o > 0 && /* @__PURE__ */ s(
|
|
1910
|
+
o > 0 && /* @__PURE__ */ s(Ot, { label: e.slice(a).join(", "), children: /* @__PURE__ */ s(
|
|
1922
1911
|
ae,
|
|
1923
1912
|
{
|
|
1924
1913
|
label: n("inputs.multiSelect.overflow", { count: o }),
|
|
@@ -1929,7 +1918,7 @@ function Rn(t) {
|
|
|
1929
1918
|
) })
|
|
1930
1919
|
] });
|
|
1931
1920
|
}
|
|
1932
|
-
const
|
|
1921
|
+
const va = {
|
|
1933
1922
|
date: { year: "numeric", month: "short", day: "numeric" },
|
|
1934
1923
|
time: { hour: "2-digit", minute: "2-digit" },
|
|
1935
1924
|
datetime: {
|
|
@@ -1942,17 +1931,17 @@ const ya = {
|
|
|
1942
1931
|
};
|
|
1943
1932
|
function Dn(t) {
|
|
1944
1933
|
const { value: e, format: a = "date", options: n } = t;
|
|
1945
|
-
return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(
|
|
1946
|
-
|
|
1934
|
+
return e == null || e === "" ? null : a === "relative" && !n ? /* @__PURE__ */ s(be, { value: e, shape: "bare" }) : /* @__PURE__ */ s(
|
|
1935
|
+
be,
|
|
1947
1936
|
{
|
|
1948
1937
|
value: e,
|
|
1949
1938
|
format: "absolute",
|
|
1950
1939
|
shape: "bare",
|
|
1951
|
-
absoluteFormat: n ??
|
|
1940
|
+
absoluteFormat: n ?? va[a === "relative" ? "date" : a]
|
|
1952
1941
|
}
|
|
1953
1942
|
);
|
|
1954
1943
|
}
|
|
1955
|
-
function
|
|
1944
|
+
function ya(t) {
|
|
1956
1945
|
if (t == null || t === "") return null;
|
|
1957
1946
|
const e = typeof t == "number" ? t : Number(t);
|
|
1958
1947
|
return Number.isFinite(e) ? e : null;
|
|
@@ -1964,7 +1953,7 @@ function kn(t) {
|
|
|
1964
1953
|
colorNegative: n,
|
|
1965
1954
|
strikethrough: r,
|
|
1966
1955
|
options: o
|
|
1967
|
-
} = t, { i18n: l } = F(), u =
|
|
1956
|
+
} = t, { i18n: l } = F(), u = ya(e);
|
|
1968
1957
|
if (u === null) return null;
|
|
1969
1958
|
const d = l.language || "en", i = new Intl.NumberFormat(d, {
|
|
1970
1959
|
style: "currency",
|
|
@@ -1973,25 +1962,25 @@ function kn(t) {
|
|
|
1973
1962
|
}).format(u), c = ["ds:tabular-nums"];
|
|
1974
1963
|
return n && u < 0 && c.push("ds:text-[color:var(--destructive)]"), r && c.push("line-through"), /* @__PURE__ */ s("span", { className: c.join(" "), children: i });
|
|
1975
1964
|
}
|
|
1976
|
-
function
|
|
1977
|
-
if (!
|
|
1965
|
+
function Ta(t) {
|
|
1966
|
+
if (!Se(t)) return t;
|
|
1978
1967
|
const e = t, a = e.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
|
|
1979
|
-
return
|
|
1968
|
+
return we(e, { className: n, size: e.props.size ?? 16 });
|
|
1980
1969
|
}
|
|
1981
|
-
function
|
|
1970
|
+
function ye(t, e) {
|
|
1982
1971
|
return typeof t == "function" ? t(e) : !!t;
|
|
1983
1972
|
}
|
|
1984
1973
|
function En(t) {
|
|
1985
1974
|
const { data: e, actions: a } = t;
|
|
1986
1975
|
return e ? /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: a.map((n, r) => {
|
|
1987
|
-
if (
|
|
1988
|
-
const o =
|
|
1976
|
+
if (ye(n.hidden, e)) return null;
|
|
1977
|
+
const o = ye(n.disabled, e), l = o && n.disabledReason ? n.disabledReason : n.label, u = n.variant === "destructive";
|
|
1989
1978
|
return /* @__PURE__ */ s(
|
|
1990
1979
|
B,
|
|
1991
1980
|
{
|
|
1992
1981
|
size: "sm",
|
|
1993
1982
|
intent: "ghost",
|
|
1994
|
-
icon:
|
|
1983
|
+
icon: Ta(n.icon),
|
|
1995
1984
|
tooltip: l,
|
|
1996
1985
|
"aria-label": n.label,
|
|
1997
1986
|
disabled: o,
|
|
@@ -2004,16 +1993,16 @@ function En(t) {
|
|
|
2004
1993
|
);
|
|
2005
1994
|
}) }) : null;
|
|
2006
1995
|
}
|
|
2007
|
-
function
|
|
1996
|
+
function Te(t, e) {
|
|
2008
1997
|
return typeof t == "function" ? t(e) : t;
|
|
2009
1998
|
}
|
|
2010
|
-
function
|
|
1999
|
+
function xa(t) {
|
|
2011
2000
|
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
2012
2001
|
}
|
|
2013
2002
|
function In(t) {
|
|
2014
2003
|
const { value: e, data: a, href: n, onClick: r, secondary: o } = t;
|
|
2015
2004
|
if (!a) return null;
|
|
2016
|
-
const l =
|
|
2005
|
+
const l = Te(n, a), u = Te(o, a), d = e == null || e === "" ? "" : String(e), i = [
|
|
2017
2006
|
"ds:text-[color:var(--primary)]",
|
|
2018
2007
|
"ds:hover:underline",
|
|
2019
2008
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -2028,7 +2017,7 @@ function In(t) {
|
|
|
2028
2017
|
l ? /* @__PURE__ */ s(
|
|
2029
2018
|
"a",
|
|
2030
2019
|
{
|
|
2031
|
-
href:
|
|
2020
|
+
href: xa(l),
|
|
2032
2021
|
onClick: c,
|
|
2033
2022
|
className: i,
|
|
2034
2023
|
children: d
|
|
@@ -2061,7 +2050,7 @@ function zn(t) {
|
|
|
2061
2050
|
label: i
|
|
2062
2051
|
} = t, { t: c } = F(), [p, v] = R(!1);
|
|
2063
2052
|
if (!a) return null;
|
|
2064
|
-
const g = !!e, b = g ? o ?? /* @__PURE__ */ s(
|
|
2053
|
+
const g = !!e, b = g ? o ?? /* @__PURE__ */ s(Mt, { "aria-hidden": !0, className: "ds:size-4" }) : l ?? /* @__PURE__ */ s(Lt, { "aria-hidden": !0, className: "ds:size-4" }), y = g ? u : d, x = i ?? c(g ? "inputs.switch.on" : "inputs.switch.off");
|
|
2065
2054
|
async function f(m) {
|
|
2066
2055
|
if (m.stopPropagation(), p || !a) return;
|
|
2067
2056
|
const C = n(a, !g);
|
|
@@ -2102,25 +2091,25 @@ function zn(t) {
|
|
|
2102
2091
|
}
|
|
2103
2092
|
);
|
|
2104
2093
|
}
|
|
2105
|
-
const
|
|
2094
|
+
const Ca = {
|
|
2106
2095
|
sm: "ds:size-[var(--icon-size-sm)]",
|
|
2107
2096
|
md: "ds:size-[var(--icon-size-md)]",
|
|
2108
2097
|
lg: "ds:size-[var(--icon-size-lg)]"
|
|
2109
2098
|
};
|
|
2110
|
-
function
|
|
2099
|
+
function xe(t, e) {
|
|
2111
2100
|
if (!t || typeof t != "object") return;
|
|
2112
2101
|
const a = t[e];
|
|
2113
2102
|
return typeof a == "string" ? a : void 0;
|
|
2114
2103
|
}
|
|
2115
|
-
const
|
|
2116
|
-
function
|
|
2104
|
+
const Na = /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i, Sa = /^rgba?\(\s*[\d.\s,%/]+\)$/i, wa = /^hsla?\(\s*[\d.\s,%/]+\)$/i, Fa = /^var\(--[a-z0-9-]+(?:,\s*[^)]+)?\)$/i;
|
|
2105
|
+
function Ra(t) {
|
|
2117
2106
|
if (!t) return;
|
|
2118
2107
|
const e = t.trim();
|
|
2119
|
-
if (
|
|
2108
|
+
if (Na.test(e) || Sa.test(e) || wa.test(e) || Fa.test(e))
|
|
2120
2109
|
return e;
|
|
2121
2110
|
}
|
|
2122
2111
|
function An(t) {
|
|
2123
|
-
const { data: e, colorField: a, size: n = "md", labelField: r } = t, o = X(null), l = e ?
|
|
2112
|
+
const { data: e, colorField: a, size: n = "md", labelField: r } = t, o = X(null), l = e ? xe(e, a) : void 0, u = Ra(l), d = e && r ? xe(e, r) : void 0;
|
|
2124
2113
|
return Tt(() => {
|
|
2125
2114
|
const i = o.current;
|
|
2126
2115
|
i && (u ? i.style.setProperty("--data-table-dot-color", u) : i.style.removeProperty("--data-table-dot-color"));
|
|
@@ -2134,14 +2123,14 @@ function An(t) {
|
|
|
2134
2123
|
"ds:inline-block ds:shrink-0 ds:rounded-[var(--radius-full)]",
|
|
2135
2124
|
"ds:bg-[var(--data-table-dot-color)]",
|
|
2136
2125
|
"ds:border ds:border-[color:var(--border)]",
|
|
2137
|
-
|
|
2126
|
+
Ca[n]
|
|
2138
2127
|
].join(" ")
|
|
2139
2128
|
}
|
|
2140
2129
|
),
|
|
2141
2130
|
d ? /* @__PURE__ */ s("span", { children: d }) : null
|
|
2142
2131
|
] }) : null;
|
|
2143
2132
|
}
|
|
2144
|
-
function
|
|
2133
|
+
function Da(t, e) {
|
|
2145
2134
|
if (!t || typeof t != "object") return null;
|
|
2146
2135
|
const a = t[e], n = typeof a == "number" ? a : Number(a);
|
|
2147
2136
|
return Number.isFinite(n) ? n : null;
|
|
@@ -2150,7 +2139,7 @@ function Pn(t) {
|
|
|
2150
2139
|
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: o } = F();
|
|
2151
2140
|
if (!e) return null;
|
|
2152
2141
|
const l = o.language || "en", u = (i) => {
|
|
2153
|
-
const c =
|
|
2142
|
+
const c = Da(e, i.valueField);
|
|
2154
2143
|
if (c === null) return null;
|
|
2155
2144
|
let p;
|
|
2156
2145
|
switch (i.format ?? "number") {
|
|
@@ -2335,15 +2324,15 @@ export {
|
|
|
2335
2324
|
Nn as f,
|
|
2336
2325
|
yn as g,
|
|
2337
2326
|
Sn as h,
|
|
2338
|
-
|
|
2339
|
-
|
|
2327
|
+
ta as i,
|
|
2328
|
+
aa as j,
|
|
2340
2329
|
zn as k,
|
|
2341
2330
|
te as l,
|
|
2342
|
-
|
|
2331
|
+
Gt as m,
|
|
2343
2332
|
Tn as n,
|
|
2344
2333
|
xn as o,
|
|
2345
|
-
|
|
2334
|
+
na as p,
|
|
2346
2335
|
Ve as q,
|
|
2347
2336
|
gn as u
|
|
2348
2337
|
};
|
|
2349
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
2338
|
+
//# sourceMappingURL=editable-currency-cell-renderer-Od3Q-Y8J.js.map
|