@krosoft/react 0.0.267 → 0.0.269
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/{AppActions-D8KKXpq-.js → AppActions-B5bHV6ky.js} +2 -2
- package/dist/{AppSubTitle-CVhjWRBp.js → AppSubTitle-BG-y_dRR.js} +2 -2
- package/dist/{AppTitle-DBGJRsjU.js → AppTitle-B1wOSQGM.js} +1 -1
- package/dist/{ErrorAlert-6ECy_Dox.js → ErrorAlert-BiyjpXW1.js} +1 -1
- package/dist/{GenericForm-C86_Jk7X.js → GenericForm-GIiJmyAJ.js} +6 -6
- package/dist/{ImageInput-DvHgBYsy.js → ImageInput-Ds-GibEE.js} +2 -2
- package/dist/{MultiSelect-TGu_k3KM.js → MultiSelect-BX04DnEZ.js} +2 -2
- package/dist/{SearchInput-Csflv8Az.js → SearchInput-Dze-QJa9.js} +3 -3
- package/dist/{behavior-C4WdfbR1.js → behavior-DeOud61U.js} +1 -1
- package/dist/{cards-nqZOcSkh.js → cards-VxLmvEWW.js} +2 -2
- package/dist/{charts-BfeSrTmX.js → charts-CavpyGbG.js} +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/charts/index.js +1 -1
- package/dist/components/core/dialogs/index.js +3 -3
- package/dist/components/core/filters/index.js +5 -5
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +18 -18
- package/dist/components/core/inputs/index.js +4 -4
- package/dist/components/core/language/index.js +1 -1
- package/dist/components/core/layouts/index.js +8 -8
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/DataTable.d.ts.map +1 -1
- package/dist/components/core/table/TableBody.d.ts +3 -3
- package/dist/components/core/table/TableBody.d.ts.map +1 -1
- package/dist/components/core/table/TableBulkActions.d.ts +6 -6
- package/dist/components/core/table/TableBulkActions.d.ts.map +1 -1
- package/dist/components/core/table/TableHeader.d.ts +3 -3
- package/dist/components/core/table/TableHeader.d.ts.map +1 -1
- package/dist/components/core/table/index.js +163 -163
- package/dist/components/core/tabs/index.js +5 -5
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +18 -18
- package/dist/components/ui/index.js +2 -2
- package/dist/{dialogs-BiPcEbRx.js → dialogs-BPZ20MEC.js} +5 -5
- package/dist/hooks/behavior/index.js +1 -1
- package/dist/hooks/index.js +6 -6
- package/dist/hooks/ui/index.js +5 -5
- package/dist/hooks/ui/useDataTable.d.ts.map +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/krosoftLocales.d.ts +8 -0
- package/dist/i18n/krosoftLocales.d.ts.map +1 -1
- package/dist/{i18n-CevI9Cgk.js → i18n-DSZAo18R.js} +8 -0
- package/dist/{inputs-BUXmTc40.js → inputs-DgBGdVLB.js} +3 -3
- package/dist/{language-DeQC57bX.js → language-wGKLt6oh.js} +2 -2
- package/dist/{navbar-Cl4welok.js → navbar-C5mcPBII.js} +3 -3
- package/dist/pwa/index.js +1 -1
- package/dist/{sheet-RYwa4-Nl.js → sheet-Do476vsm.js} +1 -1
- package/dist/{states-C6lWnADN.js → states-DGjgfPuG.js} +2 -2
- package/dist/{theme-Dwc4zNXG.js → theme-DedDA2ib.js} +2 -2
- package/dist/types/DataTableBulkAction.d.ts +2 -2
- package/dist/types/DataTableBulkAction.d.ts.map +1 -1
- package/dist/types/DataTableConfig.d.ts +1 -1
- package/dist/types/DataTableConfig.d.ts.map +1 -1
- package/dist/types/UseDataTableProps.d.ts +1 -1
- package/dist/types/UseDataTableProps.d.ts.map +1 -1
- package/dist/types/UseDataTableResult.d.ts +4 -3
- package/dist/types/UseDataTableResult.d.ts.map +1 -1
- package/dist/{ui-CnhA3ntY.js → ui-BfGGZ1gy.js} +4 -4
- package/dist/{ui-D7YSs2kF.js → ui-D-vbKleB.js} +1 -1
- package/dist/{useDocumentTitle-C5TsEDqh.js → useDocumentTitle-DncN-eAg.js} +1 -1
- package/dist/{useFixedColumns-BVZs3wbh.js → useFixedColumns-DPVEdA6b.js} +46 -42
- package/dist/{useLanguage-DdVIzhME.js → useLanguage-zEDzcT3_.js} +1 -1
- package/dist/{useTheme-ZzPZl0MM.js → useTheme-C1MiTFa9.js} +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { ACTIONS_COLUMN_KEY as e, SELECTION_COLUMN_KEY as t, getAlignmentClass as n, getColumnAlignment as r, getFixedCellProps as i } from "../../../helpers/index.js";
|
|
2
|
-
import { t as a } from "../../../i18n-
|
|
3
|
-
import { At as o, C as s, D as c, Ft as l, Gt as u, Mt as d, Nt as f, O as p, S as m, T as h, bn as g, jt as _, k as v, v as y } from "../../../ui-
|
|
2
|
+
import { t as a } from "../../../i18n-DSZAo18R.js";
|
|
3
|
+
import { At as o, C as s, D as c, Ft as l, Gt as u, Mt as d, Nt as f, O as p, S as m, T as h, bn as g, jt as _, k as v, v as y } from "../../../ui-D-vbKleB.js";
|
|
4
4
|
import { s as b } from "../../../tooltip-BmZ9Bfou.js";
|
|
5
5
|
import { i as x, l as S, n as C, t as w, u as T } from "../../../select-DmLScQKX.js";
|
|
6
|
-
import { n as E, t as D } from "../../../useFixedColumns-
|
|
6
|
+
import { n as E, t as D } from "../../../useFixedColumns-DPVEdA6b.js";
|
|
7
7
|
import { n as O, r as k } from "../../../datatable-COQcYUrk.js";
|
|
8
|
-
import {
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { formatJsonValue as
|
|
11
|
-
import { AlertTriangleIcon as
|
|
8
|
+
import { useMemo as A, useState as j } from "react";
|
|
9
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
10
|
+
import { formatJsonValue as F, isRecord as I, tryParseJson as L } from "@krosoft/core/helpers";
|
|
11
|
+
import { AlertTriangleIcon as R, ArrowDownIcon as z, ArrowUpDownIcon as ee, ArrowUpIcon as te, ChevronLeftIcon as B, ChevronRightIcon as V, GripVerticalIcon as H, Loader2Icon as U, MoreVerticalIcon as W, SettingsIcon as G } from "lucide-react";
|
|
12
12
|
import { useNavigate as K } from "react-router-dom";
|
|
13
13
|
//#region src/components/core/table/TableActions.tsx
|
|
14
14
|
function q({ actions: e, row: t }) {
|
|
15
15
|
let { t: n } = a(), r = e.filter((e) => e.visible === void 0 || e.visible(t));
|
|
16
16
|
if (r.length === 0) return null;
|
|
17
17
|
let i = r.filter((e) => e.overflow !== !0), o = r.filter((e) => e.overflow === !0);
|
|
18
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ P("div", {
|
|
19
19
|
className: "flex items-center justify-end gap-1",
|
|
20
20
|
children: [i.map((e, r) => {
|
|
21
21
|
let i = e.icon;
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ P(b, {
|
|
23
23
|
variant: e.variant ?? "ghost",
|
|
24
24
|
size: "sm",
|
|
25
25
|
disabled: e.disabled?.(t) ?? !1,
|
|
@@ -27,32 +27,32 @@ function q({ actions: e, row: t }) {
|
|
|
27
27
|
onClick: (n) => {
|
|
28
28
|
n.stopPropagation(), e.onClick(t);
|
|
29
29
|
},
|
|
30
|
-
children: [i !== void 0 && /* @__PURE__ */
|
|
30
|
+
children: [i !== void 0 && /* @__PURE__ */ N(i, { className: "size-3.5" }), n(e.labelKey)]
|
|
31
31
|
}, r);
|
|
32
|
-
}), o.length > 0 && /* @__PURE__ */
|
|
32
|
+
}), o.length > 0 && /* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N(u, {
|
|
33
33
|
asChild: !0,
|
|
34
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ N(b, {
|
|
35
35
|
variant: "ghost",
|
|
36
36
|
size: "icon",
|
|
37
37
|
className: "h-7 w-7 text-muted-foreground hover:text-foreground",
|
|
38
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ N(W, { className: "size-3.5" })
|
|
39
39
|
})
|
|
40
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ N(f, {
|
|
41
41
|
align: "end",
|
|
42
42
|
onClick: (e) => {
|
|
43
43
|
e.stopPropagation();
|
|
44
44
|
},
|
|
45
45
|
children: o.map((e, r) => {
|
|
46
46
|
let i = e.icon;
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ P(l, {
|
|
48
48
|
disabled: e.disabled?.(t) ?? !1,
|
|
49
49
|
onClick: () => {
|
|
50
50
|
e.onClick(t);
|
|
51
51
|
},
|
|
52
52
|
className: e.className,
|
|
53
|
-
children: [i !== void 0 && /* @__PURE__ */
|
|
53
|
+
children: [i !== void 0 && /* @__PURE__ */ N("span", {
|
|
54
54
|
className: "mr-2 size-4 flex items-center justify-center",
|
|
55
|
-
children: /* @__PURE__ */
|
|
55
|
+
children: /* @__PURE__ */ N(i, { className: "size-4" })
|
|
56
56
|
}), n(e.labelKey)]
|
|
57
57
|
}, r);
|
|
58
58
|
})
|
|
@@ -61,104 +61,104 @@ function q({ actions: e, row: t }) {
|
|
|
61
61
|
}
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/components/core/table/TableBody.tsx
|
|
64
|
-
function J({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData: u, rowKey: d, onRowClick: f, onRowNavigate: p, hasBulkActions: m,
|
|
64
|
+
function J({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData: u, rowKey: d, onRowClick: f, onRowNavigate: p, hasBulkActions: m, selectedKeys: h, toggleRowSelection: _, visibleColumnsArray: v, columnWidths: y, hasActions: b, actions: x, columns: S, bordered: C = !1, dense: w = !1, resizableColumns: T = !1, fixedColumns: E = {} }) {
|
|
65
65
|
let { t: D } = a(), O = D(l?.loadingKey ?? "states.loading"), k = D(l?.emptyKey ?? "states.noResult"), A = K(), j = (e, t) => {
|
|
66
66
|
let n = S.find((e) => e.key === t);
|
|
67
67
|
if (n?.renderCell !== void 0) return n.renderCell(e);
|
|
68
68
|
let r = e[t];
|
|
69
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ N("span", {
|
|
70
70
|
className: "text-sm truncate",
|
|
71
71
|
children: r == null ? "-" : String(r)
|
|
72
72
|
});
|
|
73
73
|
};
|
|
74
|
-
if (o) return /* @__PURE__ */
|
|
74
|
+
if (o) return /* @__PURE__ */ N("tbody", {
|
|
75
75
|
className: "divide-y divide-border",
|
|
76
|
-
children: /* @__PURE__ */
|
|
76
|
+
children: /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
|
|
77
77
|
colSpan: c,
|
|
78
78
|
className: "py-8 text-center",
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ P("div", {
|
|
80
80
|
className: "flex flex-col items-center justify-center gap-2 text-muted-foreground",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ N(U, { className: "h-6 w-6 animate-spin text-primary" }), /* @__PURE__ */ N("span", {
|
|
82
82
|
className: "text-sm",
|
|
83
83
|
children: O
|
|
84
84
|
})]
|
|
85
85
|
})
|
|
86
86
|
}) })
|
|
87
87
|
});
|
|
88
|
-
if (s) return /* @__PURE__ */
|
|
88
|
+
if (s) return /* @__PURE__ */ N("tbody", {
|
|
89
89
|
className: "divide-y divide-border",
|
|
90
|
-
children: /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
|
|
91
91
|
colSpan: c,
|
|
92
92
|
className: "py-8 text-center",
|
|
93
|
-
children: /* @__PURE__ */
|
|
93
|
+
children: /* @__PURE__ */ P("div", {
|
|
94
94
|
className: "flex flex-col items-center justify-center gap-2 text-destructive",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ N(R, { className: "h-6 w-6" }), /* @__PURE__ */ N("span", {
|
|
96
96
|
className: "text-sm",
|
|
97
97
|
children: s
|
|
98
98
|
})]
|
|
99
99
|
})
|
|
100
100
|
}) })
|
|
101
101
|
});
|
|
102
|
-
if (u.length === 0) return /* @__PURE__ */
|
|
102
|
+
if (u.length === 0) return /* @__PURE__ */ N("tbody", {
|
|
103
103
|
className: "divide-y divide-border",
|
|
104
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ N("tr", { children: /* @__PURE__ */ N("td", {
|
|
105
105
|
colSpan: c,
|
|
106
106
|
className: "py-8 text-center text-sm text-muted-foreground",
|
|
107
107
|
children: k
|
|
108
108
|
}) })
|
|
109
109
|
});
|
|
110
|
-
let
|
|
110
|
+
let M = i(E[t], "body"), F = i(E[e], "body"), I = p !== void 0 || f !== void 0, L = (e, t) => {
|
|
111
111
|
if (p !== void 0) {
|
|
112
112
|
let n = p(e);
|
|
113
113
|
t.ctrlKey || t.metaKey ? window.open(n, "_blank") : A(n);
|
|
114
114
|
} else f?.(e, t);
|
|
115
115
|
};
|
|
116
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ N("tbody", {
|
|
117
117
|
className: "divide-y divide-border",
|
|
118
118
|
children: u.map((e) => {
|
|
119
119
|
let t = d(e);
|
|
120
|
-
return /* @__PURE__ */
|
|
120
|
+
return /* @__PURE__ */ P("tr", {
|
|
121
121
|
className: `group hover:bg-muted/50 transition-colors ${I ? "cursor-pointer" : ""}`,
|
|
122
122
|
onClick: (t) => {
|
|
123
|
-
|
|
123
|
+
L(e, t);
|
|
124
124
|
},
|
|
125
125
|
children: [
|
|
126
|
-
m ? /* @__PURE__ */
|
|
127
|
-
className: `p-1 text-center align-middle ${
|
|
126
|
+
m ? /* @__PURE__ */ N("td", {
|
|
127
|
+
className: `p-1 text-center align-middle ${M.className}`,
|
|
128
128
|
style: {
|
|
129
129
|
width: "48px",
|
|
130
130
|
minWidth: "48px",
|
|
131
131
|
maxWidth: "48px",
|
|
132
|
-
...
|
|
132
|
+
...M.style
|
|
133
133
|
},
|
|
134
134
|
onClick: (e) => {
|
|
135
135
|
e.stopPropagation();
|
|
136
136
|
},
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ N("div", {
|
|
138
138
|
className: "flex items-center justify-center",
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
checked: h.
|
|
139
|
+
children: /* @__PURE__ */ N(g, {
|
|
140
|
+
checked: h.has(t),
|
|
141
141
|
onCheckedChange: () => {
|
|
142
|
-
_(
|
|
142
|
+
_(e);
|
|
143
143
|
}
|
|
144
144
|
})
|
|
145
145
|
})
|
|
146
146
|
}) : null,
|
|
147
147
|
v.map((t, a) => {
|
|
148
148
|
let o = a === v.length - 1, s = i(E[t.key], "body");
|
|
149
|
-
return /* @__PURE__ */
|
|
149
|
+
return /* @__PURE__ */ N("td", {
|
|
150
150
|
className: `${`${a === 0 && !m ? "pl-4" : "pl-2"} ${o && !b ? "pr-4" : "pr-2"}`} ${w ? "py-2" : "py-4"} text-sm ${n(r(t))} ${s.className} ${C && !o ? "border-r border-border" : ""} ${t.className ?? ""}`,
|
|
151
151
|
style: {
|
|
152
152
|
...T ? { width: y[t.key] } : { minWidth: y[t.key] },
|
|
153
153
|
...s.style
|
|
154
154
|
},
|
|
155
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ N("div", {
|
|
156
156
|
className: "w-full h-full",
|
|
157
157
|
children: j(e, t.key)
|
|
158
158
|
})
|
|
159
159
|
}, t.key);
|
|
160
160
|
}),
|
|
161
|
-
b ? /* @__PURE__ */
|
|
161
|
+
b ? /* @__PURE__ */ N("td", {
|
|
162
162
|
className: `py-1 pl-1 pr-4 text-right align-middle whitespace-nowrap ${F.className}`,
|
|
163
163
|
style: {
|
|
164
164
|
minWidth: "32px",
|
|
@@ -167,9 +167,9 @@ function J({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData
|
|
|
167
167
|
onClick: (e) => {
|
|
168
168
|
e.stopPropagation();
|
|
169
169
|
},
|
|
170
|
-
children: x !== void 0 && x.length > 0 ? /* @__PURE__ */
|
|
170
|
+
children: x !== void 0 && x.length > 0 ? /* @__PURE__ */ N("div", {
|
|
171
171
|
className: "flex items-center justify-end",
|
|
172
|
-
children: /* @__PURE__ */
|
|
172
|
+
children: /* @__PURE__ */ N(q, {
|
|
173
173
|
actions: x,
|
|
174
174
|
row: e
|
|
175
175
|
})
|
|
@@ -184,18 +184,18 @@ function J({ isLoading: o, error: s, colSpanCount: c, messages: l, paginatedData
|
|
|
184
184
|
//#region src/components/core/table/TableBulkActions.tsx
|
|
185
185
|
function Y({ selectedRows: e, setSelectedRows: t, bulkActions: n }) {
|
|
186
186
|
let { t: r } = a();
|
|
187
|
-
return /* @__PURE__ */
|
|
187
|
+
return /* @__PURE__ */ P("div", {
|
|
188
188
|
className: "bg-muted/60 border border-border px-3 py-1.5 flex items-center justify-between rounded-surface",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ P("div", {
|
|
190
190
|
className: "flex items-center gap-4",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ N("span", {
|
|
192
192
|
className: "text-sm font-medium text-primary ml-1",
|
|
193
193
|
children: r("table.selectedCount", { count: e.length })
|
|
194
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ N("div", {
|
|
195
195
|
className: "flex items-center gap-2",
|
|
196
196
|
children: n.map((n, i) => {
|
|
197
197
|
let a = n.icon;
|
|
198
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ P(b, {
|
|
199
199
|
variant: "outline",
|
|
200
200
|
size: "sm",
|
|
201
201
|
onClick: () => {
|
|
@@ -204,14 +204,14 @@ function Y({ selectedRows: e, setSelectedRows: t, bulkActions: n }) {
|
|
|
204
204
|
});
|
|
205
205
|
},
|
|
206
206
|
className: `h-7 bg-background shadow-sm text-xs px-2.5 ${n.variant === "destructive" ? "text-destructive border-destructive/30 hover:bg-destructive/10 hover:text-destructive" : "text-foreground"}`,
|
|
207
|
-
children: [a !== void 0 && /* @__PURE__ */
|
|
207
|
+
children: [a !== void 0 && /* @__PURE__ */ N("span", {
|
|
208
208
|
className: "mr-1.5 flex items-center justify-center",
|
|
209
|
-
children: /* @__PURE__ */
|
|
209
|
+
children: /* @__PURE__ */ N(a, { className: "h-3.5 w-3.5" })
|
|
210
210
|
}), r(n.labelKey)]
|
|
211
211
|
}, i);
|
|
212
212
|
})
|
|
213
213
|
})]
|
|
214
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ N(b, {
|
|
215
215
|
variant: "ghost",
|
|
216
216
|
size: "sm",
|
|
217
217
|
onClick: () => {
|
|
@@ -224,17 +224,17 @@ function Y({ selectedRows: e, setSelectedRows: t, bulkActions: n }) {
|
|
|
224
224
|
}
|
|
225
225
|
//#endregion
|
|
226
226
|
//#region src/components/core/table/TableHeader.tsx
|
|
227
|
-
var
|
|
227
|
+
var ne = {
|
|
228
228
|
left: "justify-start",
|
|
229
229
|
center: "justify-center",
|
|
230
230
|
right: "justify-end"
|
|
231
231
|
};
|
|
232
|
-
function
|
|
232
|
+
function re({ hasBulkActions: o, allSelected: s, someSelected: c, toggleSelectAll: l, visibleColumnsArray: u, draggableColumns: d, resizableColumns: f, columnWidths: p, sortColumn: m, sortDirection: h, handleSort: _, handleDragStart: v, handleDragOver: y, handleDrop: b, handleMouseDown: x, hasActions: S, settingsNode: C, bordered: w = !1, dense: T = !1, fixedColumns: E = {}, fixedSelection: D = !1, fixedActions: O = !1 }) {
|
|
233
233
|
let { t: k } = a(), A = !1;
|
|
234
|
-
s
|
|
235
|
-
let j = (e) => e.sortable === !0 ? m === e.key ?
|
|
234
|
+
s ? A = !0 : c && (A = "indeterminate");
|
|
235
|
+
let j = (e) => e.sortable === !0 ? m === e.key ? N(h === "asc" ? te : z, { className: "size-3.5 text-foreground" }) : /* @__PURE__ */ N(ee, { className: "size-3.5 text-muted-foreground/50 group-hover:text-muted-foreground transition-colors" }) : null, M = (e, t, a) => {
|
|
236
236
|
let s = a !== !1 && e.fixed === void 0, c = e.sortable === !0, l = i(E[e.key], "header"), d = r(e), m = j(e), h = t === 0 && !o, g = t === u.length - 1 && !(S || C !== void 0), D = `${h ? "pl-4" : "pl-2"} ${g ? "pr-4" : "pr-2"}`;
|
|
237
|
-
return /* @__PURE__ */
|
|
237
|
+
return /* @__PURE__ */ P("th", {
|
|
238
238
|
"data-column-key": e.key,
|
|
239
239
|
"data-fixed-side": e.fixed,
|
|
240
240
|
className: [
|
|
@@ -262,20 +262,20 @@ function te({ hasBulkActions: o, selectedRows: s, totalItems: c, toggleSelectAll
|
|
|
262
262
|
onDrop: (t) => {
|
|
263
263
|
b(t, e.key);
|
|
264
264
|
},
|
|
265
|
-
children: [/* @__PURE__ */
|
|
266
|
-
className: `flex items-center gap-1 ${
|
|
265
|
+
children: [/* @__PURE__ */ P("div", {
|
|
266
|
+
className: `flex items-center gap-1 ${ne[d]} ${f ? "pr-2" : ""}`,
|
|
267
267
|
children: [
|
|
268
|
-
s ? /* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
268
|
+
s ? /* @__PURE__ */ N(H, { className: "size-4 text-muted-foreground cursor-grab shrink-0" }) : null,
|
|
269
|
+
/* @__PURE__ */ N("span", {
|
|
270
270
|
className: "truncate",
|
|
271
271
|
children: k(e.headerKey)
|
|
272
272
|
}),
|
|
273
|
-
m === null ? null : /* @__PURE__ */
|
|
273
|
+
m === null ? null : /* @__PURE__ */ N("span", {
|
|
274
274
|
className: "ml-1 shrink-0",
|
|
275
275
|
children: m
|
|
276
276
|
})
|
|
277
277
|
]
|
|
278
|
-
}), f ? /* @__PURE__ */
|
|
278
|
+
}), f ? /* @__PURE__ */ N("div", {
|
|
279
279
|
className: "absolute right-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-blue-500 opacity-0 group-hover:opacity-50 transition-opacity",
|
|
280
280
|
onMouseDown: (t) => {
|
|
281
281
|
x(t, e.key);
|
|
@@ -283,10 +283,10 @@ function te({ hasBulkActions: o, selectedRows: s, totalItems: c, toggleSelectAll
|
|
|
283
283
|
}) : null]
|
|
284
284
|
}, e.key);
|
|
285
285
|
}, F = i(E[t], "header"), I = i(E[e], "header");
|
|
286
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ N("thead", {
|
|
287
287
|
className: "bg-muted/50 border-b border-border",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
-
o ? /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ P("tr", { children: [
|
|
289
|
+
o ? /* @__PURE__ */ N("th", {
|
|
290
290
|
"data-column-key": t,
|
|
291
291
|
"data-fixed-side": D ? "left" : void 0,
|
|
292
292
|
className: `p-1 text-center align-middle ${F.className}`,
|
|
@@ -296,16 +296,16 @@ function te({ hasBulkActions: o, selectedRows: s, totalItems: c, toggleSelectAll
|
|
|
296
296
|
maxWidth: "48px",
|
|
297
297
|
...F.style
|
|
298
298
|
},
|
|
299
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ N("div", {
|
|
300
300
|
className: "flex items-center justify-center",
|
|
301
|
-
children: /* @__PURE__ */
|
|
301
|
+
children: /* @__PURE__ */ N(g, {
|
|
302
302
|
checked: A,
|
|
303
303
|
onCheckedChange: l
|
|
304
304
|
})
|
|
305
305
|
})
|
|
306
306
|
}) : null,
|
|
307
|
-
u.map((e, t) =>
|
|
308
|
-
S || C !== void 0 ? /* @__PURE__ */
|
|
307
|
+
u.map((e, t) => M(e, t, d)),
|
|
308
|
+
S || C !== void 0 ? /* @__PURE__ */ N("th", {
|
|
309
309
|
"data-column-key": e,
|
|
310
310
|
"data-fixed-side": O ? "right" : void 0,
|
|
311
311
|
className: `py-1 pl-1 pr-4 text-right align-middle ${I.className}`,
|
|
@@ -320,45 +320,45 @@ function te({ hasBulkActions: o, selectedRows: s, totalItems: c, toggleSelectAll
|
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/components/core/table/TablePagination.tsx
|
|
323
|
-
var
|
|
324
|
-
function
|
|
323
|
+
var X = "…";
|
|
324
|
+
function Z(e, t) {
|
|
325
325
|
return Array.from({ length: t - e + 1 }, (t, n) => e + n);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
328
|
-
if (n * 2 + 5 >= t) return
|
|
327
|
+
function ie(e, t, n = 1) {
|
|
328
|
+
if (n * 2 + 5 >= t) return Z(1, t);
|
|
329
329
|
let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
|
|
330
330
|
return !a && o ? [
|
|
331
|
-
...
|
|
332
|
-
|
|
331
|
+
...Z(1, n + 2),
|
|
332
|
+
X,
|
|
333
333
|
t
|
|
334
334
|
] : a && !o ? [
|
|
335
335
|
1,
|
|
336
|
-
|
|
337
|
-
...
|
|
336
|
+
X,
|
|
337
|
+
...Z(t - (n + 2) + 1, t)
|
|
338
338
|
] : [
|
|
339
339
|
1,
|
|
340
|
-
|
|
341
|
-
...
|
|
342
|
-
|
|
340
|
+
X,
|
|
341
|
+
...Z(r, i),
|
|
342
|
+
X,
|
|
343
343
|
t
|
|
344
344
|
];
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
let { t: u } = a(), d =
|
|
348
|
-
return /* @__PURE__ */
|
|
346
|
+
function ae({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSize: i, currentPage: o, setCurrentPage: s, pageSizeOptions: c, totalPages: l }) {
|
|
347
|
+
let { t: u } = a(), d = ie(o, l);
|
|
348
|
+
return /* @__PURE__ */ P("div", {
|
|
349
349
|
className: "px-4 py-2 border-t border-border flex flex-col sm:grid sm:grid-cols-3 items-center gap-2 bg-muted/50",
|
|
350
350
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ N("div", {
|
|
352
352
|
className: "text-sm text-muted-foreground justify-self-start",
|
|
353
353
|
children: u("table.rangeOfTotal", {
|
|
354
354
|
range: e === 0 ? "0" : `${String(t + 1)} - ${String(n)}`,
|
|
355
355
|
total: e
|
|
356
356
|
})
|
|
357
357
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ N("div", {
|
|
359
359
|
className: "flex items-center justify-center gap-1",
|
|
360
|
-
children: l > 1 && /* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
360
|
+
children: l > 1 && /* @__PURE__ */ P(M, { children: [
|
|
361
|
+
/* @__PURE__ */ N(b, {
|
|
362
362
|
variant: "ghost",
|
|
363
363
|
size: "icon",
|
|
364
364
|
className: "h-8 w-8 rounded-control",
|
|
@@ -367,12 +367,12 @@ function re({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
|
|
|
367
367
|
},
|
|
368
368
|
disabled: o === 1,
|
|
369
369
|
"aria-label": u("table.previousPage"),
|
|
370
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ N(B, { className: "size-4" })
|
|
371
371
|
}),
|
|
372
|
-
d.map((e, t) => e ===
|
|
372
|
+
d.map((e, t) => e === X ? /* @__PURE__ */ N("span", {
|
|
373
373
|
className: "flex h-8 w-8 items-center justify-center text-sm text-muted-foreground",
|
|
374
|
-
children:
|
|
375
|
-
}, `dots-${String(t)}`) : /* @__PURE__ */
|
|
374
|
+
children: X
|
|
375
|
+
}, `dots-${String(t)}`) : /* @__PURE__ */ N(b, {
|
|
376
376
|
variant: e === o ? "default" : "ghost",
|
|
377
377
|
size: "icon",
|
|
378
378
|
className: "h-8 w-8 rounded-control text-sm",
|
|
@@ -382,7 +382,7 @@ function re({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
|
|
|
382
382
|
"aria-current": e === o ? "page" : void 0,
|
|
383
383
|
children: e
|
|
384
384
|
}, e)),
|
|
385
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ N(b, {
|
|
386
386
|
variant: "ghost",
|
|
387
387
|
size: "icon",
|
|
388
388
|
className: "h-8 w-8 rounded-control",
|
|
@@ -391,21 +391,21 @@ function re({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
|
|
|
391
391
|
},
|
|
392
392
|
disabled: o === l,
|
|
393
393
|
"aria-label": u("table.nextPage"),
|
|
394
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ N(V, { className: "size-4" })
|
|
395
395
|
})
|
|
396
396
|
] })
|
|
397
397
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ N("div", {
|
|
399
399
|
className: "justify-self-end",
|
|
400
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ P(w, {
|
|
401
401
|
value: String(r),
|
|
402
402
|
onValueChange: (e) => {
|
|
403
403
|
i(Number(e)), s(1);
|
|
404
404
|
},
|
|
405
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ N(S, {
|
|
406
406
|
className: "h-8 w-[110px] text-sm",
|
|
407
|
-
children: /* @__PURE__ */
|
|
408
|
-
}), /* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ N(T, {})
|
|
408
|
+
}), /* @__PURE__ */ N(C, { children: c.map((e) => /* @__PURE__ */ N(x, {
|
|
409
409
|
value: String(e),
|
|
410
410
|
children: u("table.perPage", { count: e })
|
|
411
411
|
}, e)) })]
|
|
@@ -416,20 +416,20 @@ function re({ totalItems: e, startIndex: t, endIndex: n, pageSize: r, setPageSiz
|
|
|
416
416
|
}
|
|
417
417
|
//#endregion
|
|
418
418
|
//#region src/components/core/table/TableSettings.tsx
|
|
419
|
-
function
|
|
419
|
+
function oe({ columns: e, visibleColumns: t, toggleColumnVisibility: n }) {
|
|
420
420
|
let { t: r } = a();
|
|
421
|
-
return /* @__PURE__ */
|
|
421
|
+
return /* @__PURE__ */ P(_, { children: [/* @__PURE__ */ N(u, {
|
|
422
422
|
asChild: !0,
|
|
423
|
-
children: /* @__PURE__ */
|
|
423
|
+
children: /* @__PURE__ */ N(b, {
|
|
424
424
|
variant: "outline",
|
|
425
425
|
size: "sm",
|
|
426
426
|
className: "size-7 p-0 bg-background hover:bg-muted shadow-sm border-border",
|
|
427
|
-
children: /* @__PURE__ */
|
|
427
|
+
children: /* @__PURE__ */ N(G, { className: "size-3.5 text-muted-foreground" })
|
|
428
428
|
})
|
|
429
|
-
}), /* @__PURE__ */
|
|
429
|
+
}), /* @__PURE__ */ N(f, {
|
|
430
430
|
align: "end",
|
|
431
431
|
className: "w-56",
|
|
432
|
-
children: e.map((e) => /* @__PURE__ */
|
|
432
|
+
children: e.map((e) => /* @__PURE__ */ N(d, {
|
|
433
433
|
checked: t.has(e.key),
|
|
434
434
|
onCheckedChange: () => {
|
|
435
435
|
n(e.key);
|
|
@@ -440,8 +440,8 @@ function ie({ columns: e, visibleColumns: t, toggleColumnVisibility: n }) {
|
|
|
440
440
|
}
|
|
441
441
|
//#endregion
|
|
442
442
|
//#region src/components/core/table/DataTable.tsx
|
|
443
|
-
function
|
|
444
|
-
let { columns: a, rowKey: o, onRowClick: s, onRowNavigate: c, actions: l, bulkActions: u } = r, d = r.pageSizeDefault ?? O, f = r.pageSizeOptions ?? k, p = r.dense ?? !1, m = r.bordered ?? !1, h = r.draggableColumns ?? !1, g = r.resizableColumns ?? !1, _ = r.columnVisibility ?? !1, v = r.fixedActions ?? !1, { sortColumn: y, sortDirection: b, selectedRows: x, setSelectedRows: S, visibleColumns: C, columnWidths: w, safeCurrentPage: T, totalPages:
|
|
443
|
+
function Q({ data: e, isLoading: t = !1, error: n = null, config: r, server: i }) {
|
|
444
|
+
let { columns: a, rowKey: o, onRowClick: s, onRowNavigate: c, actions: l, bulkActions: u } = r, d = r.pageSizeDefault ?? O, f = r.pageSizeOptions ?? k, p = r.dense ?? !1, m = r.bordered ?? !1, h = r.draggableColumns ?? !1, g = r.resizableColumns ?? !1, _ = r.columnVisibility ?? !1, v = r.fixedActions ?? !1, { sortColumn: y, sortDirection: b, selectedRows: x, setSelectedRows: S, visibleColumns: C, columnWidths: w, safeCurrentPage: T, totalPages: j, startIndex: M, endIndex: F, tableRef: I, hasActions: L, hasBulkActions: R, visibleColumnsArray: z, colSpanCount: ee, paginatedData: te, handleSort: B, handleMouseDown: V, handleDragStart: H, handleDragOver: U, handleDrop: W, toggleColumnVisibility: G, toggleRowSelection: K, toggleSelectAll: q, pageSize: ne, setPageSize: X, setCurrentPage: Z } = E({
|
|
445
445
|
data: e,
|
|
446
446
|
columns: a,
|
|
447
447
|
rowKey: o,
|
|
@@ -450,26 +450,26 @@ function $({ data: e, isLoading: t = !1, error: n = null, config: r, server: i }
|
|
|
450
450
|
bulkActions: u,
|
|
451
451
|
columnVisibility: _,
|
|
452
452
|
server: i
|
|
453
|
-
}),
|
|
454
|
-
return /* @__PURE__ */
|
|
453
|
+
}), ie = R && z.some((e) => e.fixed === "left"), Q = D(I), $ = A(() => new Set(x.map(o)), [x, o]), se = e.length > 0 && e.every((e) => $.has(o(e))), ce = !se && e.some((e) => $.has(o(e)));
|
|
454
|
+
return /* @__PURE__ */ P("div", {
|
|
455
455
|
className: "space-y-4 [--k-radius-control:var(--k-radius-control-dense,0.5rem)] [--k-radius-surface:var(--k-radius-surface-dense,0.75rem)]",
|
|
456
|
-
children: [x.length > 0 && u !== void 0 && u.length > 0 && /* @__PURE__ */
|
|
456
|
+
children: [x.length > 0 && u !== void 0 && u.length > 0 && /* @__PURE__ */ N(Y, {
|
|
457
457
|
selectedRows: x,
|
|
458
458
|
setSelectedRows: S,
|
|
459
459
|
bulkActions: u
|
|
460
|
-
}), /* @__PURE__ */
|
|
460
|
+
}), /* @__PURE__ */ P("div", {
|
|
461
461
|
className: "w-full bg-card rounded-surface border border-border overflow-hidden",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
462
|
+
children: [/* @__PURE__ */ N("div", {
|
|
463
463
|
className: "overflow-x-auto",
|
|
464
|
-
children: /* @__PURE__ */
|
|
465
|
-
ref:
|
|
464
|
+
children: /* @__PURE__ */ P("table", {
|
|
465
|
+
ref: I,
|
|
466
466
|
className: "w-full",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
468
|
-
hasBulkActions:
|
|
469
|
-
|
|
470
|
-
|
|
467
|
+
children: [/* @__PURE__ */ N(re, {
|
|
468
|
+
hasBulkActions: R,
|
|
469
|
+
allSelected: se,
|
|
470
|
+
someSelected: ce,
|
|
471
471
|
toggleSelectAll: q,
|
|
472
|
-
visibleColumnsArray:
|
|
472
|
+
visibleColumnsArray: z,
|
|
473
473
|
draggableColumns: h,
|
|
474
474
|
resizableColumns: g,
|
|
475
475
|
columnWidths: w,
|
|
@@ -480,120 +480,120 @@ function $({ data: e, isLoading: t = !1, error: n = null, config: r, server: i }
|
|
|
480
480
|
handleDragOver: U,
|
|
481
481
|
handleDrop: W,
|
|
482
482
|
handleMouseDown: V,
|
|
483
|
-
hasActions:
|
|
483
|
+
hasActions: L,
|
|
484
484
|
bordered: m,
|
|
485
485
|
dense: p,
|
|
486
|
-
fixedColumns:
|
|
487
|
-
fixedSelection:
|
|
486
|
+
fixedColumns: Q,
|
|
487
|
+
fixedSelection: ie,
|
|
488
488
|
fixedActions: v,
|
|
489
|
-
settingsNode: _ ? /* @__PURE__ */
|
|
489
|
+
settingsNode: _ ? /* @__PURE__ */ N(oe, {
|
|
490
490
|
columns: a,
|
|
491
491
|
visibleColumns: C,
|
|
492
492
|
toggleColumnVisibility: G
|
|
493
493
|
}) : void 0
|
|
494
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ N(J, {
|
|
495
495
|
bordered: m,
|
|
496
496
|
dense: p,
|
|
497
497
|
isLoading: t,
|
|
498
498
|
error: n,
|
|
499
499
|
colSpanCount: ee,
|
|
500
500
|
messages: r.messages,
|
|
501
|
-
paginatedData:
|
|
501
|
+
paginatedData: te,
|
|
502
502
|
rowKey: o,
|
|
503
503
|
onRowClick: s,
|
|
504
504
|
onRowNavigate: c,
|
|
505
|
-
hasBulkActions:
|
|
506
|
-
|
|
505
|
+
hasBulkActions: R,
|
|
506
|
+
selectedKeys: $,
|
|
507
507
|
toggleRowSelection: K,
|
|
508
|
-
visibleColumnsArray:
|
|
508
|
+
visibleColumnsArray: z,
|
|
509
509
|
columnWidths: w,
|
|
510
|
-
hasActions:
|
|
510
|
+
hasActions: L || _,
|
|
511
511
|
actions: l,
|
|
512
512
|
columns: a,
|
|
513
513
|
resizableColumns: g,
|
|
514
|
-
fixedColumns:
|
|
514
|
+
fixedColumns: Q
|
|
515
515
|
})]
|
|
516
516
|
})
|
|
517
|
-
}), /* @__PURE__ */
|
|
517
|
+
}), /* @__PURE__ */ N(ae, {
|
|
518
518
|
totalItems: i?.totalRows ?? e.length,
|
|
519
|
-
startIndex:
|
|
520
|
-
endIndex:
|
|
521
|
-
pageSize:
|
|
522
|
-
setPageSize:
|
|
519
|
+
startIndex: M,
|
|
520
|
+
endIndex: F,
|
|
521
|
+
pageSize: ne,
|
|
522
|
+
setPageSize: X,
|
|
523
523
|
currentPage: T,
|
|
524
|
-
setCurrentPage:
|
|
524
|
+
setCurrentPage: Z,
|
|
525
525
|
pageSizeOptions: f,
|
|
526
|
-
totalPages:
|
|
526
|
+
totalPages: j
|
|
527
527
|
})]
|
|
528
528
|
})]
|
|
529
529
|
});
|
|
530
530
|
}
|
|
531
531
|
//#endregion
|
|
532
532
|
//#region src/components/core/table/JsonTableOutput.tsx
|
|
533
|
-
var
|
|
534
|
-
let [n, r] =
|
|
533
|
+
var $ = ({ header: e, output: t }) => {
|
|
534
|
+
let [n, r] = j(!0), i = L(t), a = i !== null, l = () => /* @__PURE__ */ P("div", {
|
|
535
535
|
className: "flex items-center justify-between mb-2",
|
|
536
|
-
children: [/* @__PURE__ */
|
|
536
|
+
children: [/* @__PURE__ */ N("span", {
|
|
537
537
|
className: "font-medium text-sm",
|
|
538
538
|
children: e
|
|
539
|
-
}), /* @__PURE__ */
|
|
539
|
+
}), /* @__PURE__ */ P("div", {
|
|
540
540
|
className: "flex items-center gap-2",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ N(y, {
|
|
542
542
|
id: "table-mode",
|
|
543
543
|
checked: n,
|
|
544
544
|
onCheckedChange: r
|
|
545
|
-
}), /* @__PURE__ */
|
|
545
|
+
}), /* @__PURE__ */ N(o, {
|
|
546
546
|
htmlFor: "table-mode",
|
|
547
547
|
className: "text-xs",
|
|
548
548
|
children: "Mode tableau"
|
|
549
549
|
})]
|
|
550
550
|
})]
|
|
551
|
-
}), u = ({ children: e }) => /* @__PURE__ */
|
|
551
|
+
}), u = ({ children: e }) => /* @__PURE__ */ N("div", {
|
|
552
552
|
className: "border rounded min-w-0 w-full",
|
|
553
|
-
children: /* @__PURE__ */
|
|
554
|
-
}), d = () => /* @__PURE__ */
|
|
553
|
+
children: /* @__PURE__ */ N(m, { children: e })
|
|
554
|
+
}), d = () => /* @__PURE__ */ N("pre", {
|
|
555
555
|
className: "text-xs bg-muted p-4 rounded overflow-x-auto whitespace-pre-wrap",
|
|
556
556
|
children: a && !n ? JSON.stringify(i, null, 2) : t
|
|
557
557
|
});
|
|
558
|
-
return t ? /* @__PURE__ */
|
|
558
|
+
return t ? /* @__PURE__ */ P("div", {
|
|
559
559
|
className: "min-w-0 w-full",
|
|
560
560
|
children: [l(), (() => {
|
|
561
|
-
if (!a || !n) return /* @__PURE__ */
|
|
562
|
-
if (Array.isArray(i) && i.length > 0 &&
|
|
561
|
+
if (!a || !n) return /* @__PURE__ */ N(d, {});
|
|
562
|
+
if (Array.isArray(i) && i.length > 0 && I(i[0])) {
|
|
563
563
|
let e = i, t = Object.keys(e[0]);
|
|
564
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ P(u, { children: [/* @__PURE__ */ N(p, {
|
|
565
565
|
className: "bg-muted/50",
|
|
566
|
-
children: /* @__PURE__ */
|
|
566
|
+
children: /* @__PURE__ */ N(v, { children: t.map((e) => /* @__PURE__ */ N(c, {
|
|
567
567
|
className: "font-medium",
|
|
568
568
|
children: e
|
|
569
569
|
}, e)) })
|
|
570
|
-
}), /* @__PURE__ */
|
|
570
|
+
}), /* @__PURE__ */ N(s, { children: e.map((e, n) => /* @__PURE__ */ N(v, { children: t.map((t) => /* @__PURE__ */ N(h, {
|
|
571
571
|
className: "text-sm whitespace-pre-wrap",
|
|
572
|
-
children:
|
|
572
|
+
children: F(e[t])
|
|
573
573
|
}, t)) }, n)) })] });
|
|
574
574
|
}
|
|
575
|
-
if (
|
|
575
|
+
if (I(i)) {
|
|
576
576
|
let e = Object.entries(i);
|
|
577
|
-
return /* @__PURE__ */
|
|
577
|
+
return /* @__PURE__ */ P(u, { children: [/* @__PURE__ */ N(p, {
|
|
578
578
|
className: "bg-muted/50",
|
|
579
|
-
children: /* @__PURE__ */
|
|
579
|
+
children: /* @__PURE__ */ P(v, { children: [/* @__PURE__ */ N(c, {
|
|
580
580
|
className: "font-medium",
|
|
581
581
|
children: "Propriété"
|
|
582
|
-
}), /* @__PURE__ */
|
|
582
|
+
}), /* @__PURE__ */ N(c, {
|
|
583
583
|
className: "font-medium",
|
|
584
584
|
children: "Valeur"
|
|
585
585
|
})] })
|
|
586
|
-
}), /* @__PURE__ */
|
|
586
|
+
}), /* @__PURE__ */ N(s, { children: e.map(([e, t]) => /* @__PURE__ */ P(v, { children: [/* @__PURE__ */ N(h, {
|
|
587
587
|
className: "font-medium text-sm",
|
|
588
588
|
children: e
|
|
589
|
-
}), /* @__PURE__ */
|
|
589
|
+
}), /* @__PURE__ */ N(h, {
|
|
590
590
|
className: "text-sm whitespace-pre-wrap",
|
|
591
|
-
children:
|
|
591
|
+
children: F(t)
|
|
592
592
|
})] }, e)) })] });
|
|
593
593
|
}
|
|
594
|
-
return /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ N(d, {});
|
|
595
595
|
})()]
|
|
596
596
|
}) : null;
|
|
597
597
|
};
|
|
598
598
|
//#endregion
|
|
599
|
-
export {
|
|
599
|
+
export { Q as DataTable, $ as JsonTableOutput, q as TableActions, J as TableBody, Y as TableBulkActions, re as TableHeader, ae as TablePagination, oe as TableSettings };
|