@ztwoint/z-ui 0.1.128 → 0.1.129
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as R, jsx as o, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { Fragment as P } from "react";
|
|
3
3
|
import { Z2Checkbox as k } from "../checkbox/checkbox.js";
|
|
4
|
-
import { useZ2Table as
|
|
4
|
+
import { useZ2Table as b } from "./z2-table-context.js";
|
|
5
5
|
import { flexRender as w } from "@tanstack/react-table";
|
|
6
6
|
import { cva as v } from "class-variance-authority";
|
|
7
7
|
import { cn as p } from "../../lib/utils.js";
|
|
8
8
|
import { Z2Skeleton as Z } from "../skeleton/skeleton.js";
|
|
9
|
-
const
|
|
9
|
+
const _ = v("", {
|
|
10
10
|
variants: {
|
|
11
11
|
size: {
|
|
12
12
|
dense: "p-2 h-8",
|
|
@@ -37,33 +37,33 @@ function N(l) {
|
|
|
37
37
|
zIndex: e ? 1 : 0
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
var
|
|
42
|
-
const { props: e } =
|
|
40
|
+
function B({ children: l }) {
|
|
41
|
+
var a, r, t;
|
|
42
|
+
const { props: e } = b();
|
|
43
43
|
return /* @__PURE__ */ o(
|
|
44
44
|
"table",
|
|
45
45
|
{
|
|
46
46
|
"data-slot": "data-grid-table",
|
|
47
47
|
className: p(
|
|
48
48
|
"w-full align-middle text-left rtl:text-right text-neutral-secondary",
|
|
49
|
-
!((
|
|
49
|
+
!((a = e.tableLayout) != null && a.columnsDraggable) && "border-separate border-spacing-0",
|
|
50
50
|
((r = e.tableLayout) == null ? void 0 : r.width) === "fixed" ? "table-fixed" : "table-auto",
|
|
51
|
-
(
|
|
51
|
+
(t = e.tableClassNames) == null ? void 0 : t.base
|
|
52
52
|
),
|
|
53
53
|
children: l
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
function I({ children: l }) {
|
|
58
|
-
var
|
|
59
|
-
const { props: e } =
|
|
58
|
+
var a, r, t;
|
|
59
|
+
const { props: e } = b();
|
|
60
60
|
return /* @__PURE__ */ o(
|
|
61
61
|
"thead",
|
|
62
62
|
{
|
|
63
63
|
className: p(
|
|
64
64
|
"",
|
|
65
|
-
(
|
|
66
|
-
((r = e.tableLayout) == null ? void 0 : r.headerSticky) && ((
|
|
65
|
+
(a = e.tableClassNames) == null ? void 0 : a.header,
|
|
66
|
+
((r = e.tableLayout) == null ? void 0 : r.headerSticky) && ((t = e.tableClassNames) == null ? void 0 : t.headerSticky)
|
|
67
67
|
),
|
|
68
68
|
children: l
|
|
69
69
|
}
|
|
@@ -73,18 +73,18 @@ function T({
|
|
|
73
73
|
children: l,
|
|
74
74
|
headerGroup: e
|
|
75
75
|
}) {
|
|
76
|
-
var r,
|
|
77
|
-
const { props:
|
|
76
|
+
var r, t, n, d, i;
|
|
77
|
+
const { props: a } = b();
|
|
78
78
|
return /* @__PURE__ */ o(
|
|
79
79
|
"tr",
|
|
80
80
|
{
|
|
81
81
|
className: p(
|
|
82
82
|
"bg-transparent tracking-wider rounded-xl",
|
|
83
|
-
((r =
|
|
84
|
-
((
|
|
85
|
-
((n =
|
|
86
|
-
((d =
|
|
87
|
-
(
|
|
83
|
+
((r = a.tableLayout) == null ? void 0 : r.headerBorder) && "[&>th]:border-b border-stroke-solid-light",
|
|
84
|
+
((t = a.tableLayout) == null ? void 0 : t.cellBorder) && "[&_>:last-child]:border-e-0",
|
|
85
|
+
((n = a.tableLayout) == null ? void 0 : n.stripped) && "bg-transparent",
|
|
86
|
+
((d = a.tableLayout) == null ? void 0 : d.headerBackground) !== !1 && "bg-background-neutral-medium",
|
|
87
|
+
(i = a.tableClassNames) == null ? void 0 : i.headerRow
|
|
88
88
|
),
|
|
89
89
|
children: l
|
|
90
90
|
},
|
|
@@ -94,42 +94,42 @@ function T({
|
|
|
94
94
|
function D({
|
|
95
95
|
children: l,
|
|
96
96
|
header: e,
|
|
97
|
-
dndRef:
|
|
97
|
+
dndRef: a,
|
|
98
98
|
dndStyle: r
|
|
99
99
|
}) {
|
|
100
|
-
var
|
|
101
|
-
const { props:
|
|
102
|
-
size: (
|
|
100
|
+
var u, g, m, h, f, C, y, x;
|
|
101
|
+
const { props: t } = b(), { column: n } = e, d = n.getIsPinned(), i = d === "left" && n.getIsLastColumn("left"), s = d === "right" && n.getIsFirstColumn("right"), c = _({
|
|
102
|
+
size: (u = t.tableLayout) != null && u.dense ? "dense" : "default"
|
|
103
103
|
});
|
|
104
104
|
return /* @__PURE__ */ o(
|
|
105
105
|
"th",
|
|
106
106
|
{
|
|
107
|
-
ref:
|
|
107
|
+
ref: a,
|
|
108
108
|
colSpan: e.colSpan,
|
|
109
109
|
style: {
|
|
110
|
-
...((
|
|
110
|
+
...((g = t.tableLayout) == null ? void 0 : g.width) === "fixed" && {
|
|
111
111
|
width: `${e.getSize()}px`
|
|
112
112
|
},
|
|
113
|
-
...((m =
|
|
113
|
+
...((m = t.tableLayout) == null ? void 0 : m.columnsPinnable) && n.getCanPin() && N(n),
|
|
114
114
|
...r || null
|
|
115
115
|
},
|
|
116
116
|
"data-pinned": d || void 0,
|
|
117
|
-
"data-last-col":
|
|
117
|
+
"data-last-col": i ? "left" : s ? "right" : void 0,
|
|
118
118
|
className: p(
|
|
119
119
|
"relative h-10 text-left rtl:text-right align-middle [&:has([role=checkbox])]:pe-0 border-stroke-solid-light leading-none-medium-sm dark:text-inverted-secondary",
|
|
120
|
-
|
|
121
|
-
((h =
|
|
122
|
-
((f =
|
|
123
|
-
((C =
|
|
120
|
+
c,
|
|
121
|
+
((h = t.tableLayout) == null ? void 0 : h.cellBorder) && "border-e",
|
|
122
|
+
((f = t.tableLayout) == null ? void 0 : f.columnsResizable) && n.getCanResize() && "truncate",
|
|
123
|
+
((C = t.tableLayout) == null ? void 0 : C.columnsPinnable) && n.getCanPin() && "[&:not([data-pinned]):has(+[data-pinned])_div.cursor-col-resize:last-child]:opacity-0 [&[data-last-col=left]_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right]:last-child_div.cursor-col-resize:last-child]:opacity-0 [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-muted/90 data-pinned:backdrop-blur-xs",
|
|
124
124
|
(y = e.column.columnDef.meta) == null ? void 0 : y.headerClassName,
|
|
125
|
-
n.getIndex() === 0 || n.getIndex() === e.headerGroup.headers.length - 1 ? (x =
|
|
125
|
+
n.getIndex() === 0 || n.getIndex() === e.headerGroup.headers.length - 1 ? (x = t.tableClassNames) == null ? void 0 : x.edgeCell : ""
|
|
126
126
|
),
|
|
127
127
|
children: l
|
|
128
128
|
},
|
|
129
129
|
e.id
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function M({ header: l }) {
|
|
133
133
|
const { column: e } = l;
|
|
134
134
|
return /* @__PURE__ */ o(
|
|
135
135
|
"div",
|
|
@@ -141,18 +141,18 @@ function A({ header: l }) {
|
|
|
141
141
|
}
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function A() {
|
|
145
145
|
return /* @__PURE__ */ o("tbody", { "aria-hidden": "true", className: "h-2" });
|
|
146
146
|
}
|
|
147
147
|
function V({ children: l }) {
|
|
148
|
-
var
|
|
149
|
-
const { props: e } =
|
|
148
|
+
var a, r;
|
|
149
|
+
const { props: e } = b();
|
|
150
150
|
return /* @__PURE__ */ o(
|
|
151
151
|
"tbody",
|
|
152
152
|
{
|
|
153
153
|
className: p(
|
|
154
154
|
"[&_tr:last-child]:border-0",
|
|
155
|
-
((
|
|
155
|
+
((a = e.tableLayout) == null ? void 0 : a.rowRounded) && "[&_td:first-child]:rounded-s-lg [&_td:last-child]:rounded-e-lg",
|
|
156
156
|
(r = e.tableClassNames) == null ? void 0 : r.body
|
|
157
157
|
),
|
|
158
158
|
children: l
|
|
@@ -160,19 +160,19 @@ function V({ children: l }) {
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
function F({ children: l }) {
|
|
163
|
-
var r,
|
|
164
|
-
const { table: e, props:
|
|
163
|
+
var r, t, n, d, i;
|
|
164
|
+
const { table: e, props: a } = b();
|
|
165
165
|
return /* @__PURE__ */ o(
|
|
166
166
|
"tr",
|
|
167
167
|
{
|
|
168
168
|
className: p(
|
|
169
169
|
"hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 border-stroke-solid-light",
|
|
170
|
-
|
|
171
|
-
!((r =
|
|
172
|
-
((n =
|
|
173
|
-
((d =
|
|
170
|
+
a.onRowClick && "cursor-pointer",
|
|
171
|
+
!((r = a.tableLayout) != null && r.stripped) && ((t = a.tableLayout) == null ? void 0 : t.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light",
|
|
172
|
+
((n = a.tableLayout) == null ? void 0 : n.cellBorder) && "[&_>:last-child]:border-e-0",
|
|
173
|
+
((d = a.tableLayout) == null ? void 0 : d.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
|
|
174
174
|
e.options.enableRowSelection && "[&_>:first-child]:relative",
|
|
175
|
-
(
|
|
175
|
+
(i = a.tableClassNames) == null ? void 0 : i.bodyRow
|
|
176
176
|
),
|
|
177
177
|
children: l
|
|
178
178
|
}
|
|
@@ -182,26 +182,26 @@ function H({
|
|
|
182
182
|
children: l,
|
|
183
183
|
column: e
|
|
184
184
|
}) {
|
|
185
|
-
var n, d, s,
|
|
186
|
-
const { props:
|
|
187
|
-
size: (n =
|
|
185
|
+
var n, d, i, s, c, u, g;
|
|
186
|
+
const { props: a, table: r } = b(), t = S({
|
|
187
|
+
size: (n = a.tableLayout) != null && n.dense ? "dense" : "default"
|
|
188
188
|
});
|
|
189
189
|
return /* @__PURE__ */ o(
|
|
190
190
|
"td",
|
|
191
191
|
{
|
|
192
192
|
style: {
|
|
193
|
-
...((d =
|
|
193
|
+
...((d = a.tableLayout) == null ? void 0 : d.width) === "fixed" && {
|
|
194
194
|
width: `${e.getSize()}px`
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
className: p(
|
|
198
198
|
"align-middle",
|
|
199
|
-
|
|
200
|
-
((
|
|
201
|
-
((
|
|
202
|
-
(
|
|
203
|
-
((
|
|
204
|
-
e.getIndex() === 0 || e.getIndex() === r.getVisibleFlatColumns().length - 1 ? (
|
|
199
|
+
t,
|
|
200
|
+
((i = a.tableLayout) == null ? void 0 : i.cellBorder) && "border-e border-stroke-solid-light",
|
|
201
|
+
((s = a.tableLayout) == null ? void 0 : s.columnsResizable) && e.getCanResize() && "truncate",
|
|
202
|
+
(c = e.columnDef.meta) == null ? void 0 : c.cellClassName,
|
|
203
|
+
((u = a.tableLayout) == null ? void 0 : u.columnsPinnable) && e.getCanPin() && '[&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-stroke-solid-light data-pinned:bg-background/90 data-pinned:backdrop-blur-xs"',
|
|
204
|
+
e.getIndex() === 0 || e.getIndex() === r.getVisibleFlatColumns().length - 1 ? (g = a.tableClassNames) == null ? void 0 : g.edgeCell : ""
|
|
205
205
|
),
|
|
206
206
|
children: l
|
|
207
207
|
}
|
|
@@ -210,79 +210,79 @@ function H({
|
|
|
210
210
|
function E({
|
|
211
211
|
children: l,
|
|
212
212
|
row: e,
|
|
213
|
-
dndRef:
|
|
213
|
+
dndRef: a,
|
|
214
214
|
dndStyle: r
|
|
215
215
|
}) {
|
|
216
|
-
var d, s,
|
|
217
|
-
const { props:
|
|
216
|
+
var d, i, s, c, u;
|
|
217
|
+
const { props: t, table: n } = b();
|
|
218
218
|
return /* @__PURE__ */ o(
|
|
219
219
|
"tr",
|
|
220
220
|
{
|
|
221
|
-
ref:
|
|
221
|
+
ref: a,
|
|
222
222
|
style: { ...r || null },
|
|
223
223
|
"data-state": n.options.enableRowSelection && e.getIsSelected() ? "selected" : void 0,
|
|
224
|
-
onClick: () =>
|
|
224
|
+
onClick: () => t.onRowClick && t.onRowClick(e.original),
|
|
225
225
|
className: p(
|
|
226
226
|
"hover:bg-background-neutral-medium data-[state=selected]:bg-muted/50 leading-none-medium-sm text-neutral-primary dark:text-inverted-primary",
|
|
227
|
-
|
|
228
|
-
!((d =
|
|
229
|
-
((
|
|
230
|
-
((
|
|
227
|
+
t.onRowClick && "cursor-pointer",
|
|
228
|
+
!((d = t.tableLayout) != null && d.stripped) && ((i = t.tableLayout) == null ? void 0 : i.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light",
|
|
229
|
+
((s = t.tableLayout) == null ? void 0 : s.cellBorder) && "[&_>:last-child]:border-e-0",
|
|
230
|
+
((c = t.tableLayout) == null ? void 0 : c.stripped) && "odd:bg-background-neutral-medium hover:bg-transparent odd:hover:bg-background-neutral-medium",
|
|
231
231
|
n.options.enableRowSelection && "[&_>:first-child]:relative",
|
|
232
|
-
(
|
|
232
|
+
(u = t.tableClassNames) == null ? void 0 : u.bodyRow
|
|
233
233
|
),
|
|
234
234
|
children: l
|
|
235
235
|
}
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
function j({ row: l }) {
|
|
239
|
-
var
|
|
240
|
-
const { props: e, table:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
239
|
+
var d, i;
|
|
240
|
+
const { props: e, table: a } = b(), r = a.getAllColumns().find((s) => {
|
|
241
|
+
var c;
|
|
242
|
+
return (c = s.columnDef.meta) == null ? void 0 : c.expandedContent;
|
|
243
|
+
}), t = (d = r == null ? void 0 : r.columnDef.meta) == null ? void 0 : d.expandedContent;
|
|
244
|
+
if (!t)
|
|
245
|
+
return null;
|
|
246
|
+
let n;
|
|
247
|
+
return typeof t == "function" ? n = t(l.original) : n = t, n == null ? null : /* @__PURE__ */ o(
|
|
245
248
|
"tr",
|
|
246
249
|
{
|
|
247
250
|
className: p(
|
|
248
|
-
((
|
|
251
|
+
((i = e.tableLayout) == null ? void 0 : i.rowBorder) && "[&:not(:last-child)>td]:border-b [&:not(:last-child)>td]:border-stroke-solid-light"
|
|
249
252
|
),
|
|
250
|
-
children: /* @__PURE__ */ o("td", { colSpan: l.getVisibleCells().length, children:
|
|
251
|
-
var b;
|
|
252
|
-
return (b = c.columnDef.meta) == null ? void 0 : b.expandedContent;
|
|
253
|
-
})) == null ? void 0 : s.columnDef.meta) == null ? void 0 : i.expandedContent) == null ? void 0 : u.call(i, l.original) })
|
|
253
|
+
children: /* @__PURE__ */ o("td", { colSpan: l.getVisibleCells().length, children: n })
|
|
254
254
|
}
|
|
255
|
-
)
|
|
255
|
+
);
|
|
256
256
|
}
|
|
257
257
|
function $({
|
|
258
258
|
children: l,
|
|
259
259
|
cell: e,
|
|
260
|
-
dndRef:
|
|
260
|
+
dndRef: a,
|
|
261
261
|
dndStyle: r
|
|
262
262
|
}) {
|
|
263
|
-
var
|
|
264
|
-
const { props:
|
|
265
|
-
size: (
|
|
263
|
+
var g, m, h, f, C, y, x, L;
|
|
264
|
+
const { props: t } = b(), { column: n, row: d } = e, i = n.getIsPinned(), s = i === "left" && n.getIsLastColumn("left"), c = i === "right" && n.getIsFirstColumn("right"), u = S({
|
|
265
|
+
size: (g = t.tableLayout) != null && g.dense ? "dense" : "default"
|
|
266
266
|
});
|
|
267
267
|
return /* @__PURE__ */ o(
|
|
268
268
|
"td",
|
|
269
269
|
{
|
|
270
|
-
ref:
|
|
271
|
-
...(m =
|
|
270
|
+
ref: a,
|
|
271
|
+
...(m = t.tableLayout) != null && m.columnsDraggable && !i ? { cell: e } : {},
|
|
272
272
|
style: {
|
|
273
|
-
...((h =
|
|
273
|
+
...((h = t.tableLayout) == null ? void 0 : h.columnsPinnable) && n.getCanPin() && N(n),
|
|
274
274
|
...r || null
|
|
275
275
|
},
|
|
276
|
-
"data-pinned":
|
|
277
|
-
"data-last-col":
|
|
276
|
+
"data-pinned": i || void 0,
|
|
277
|
+
"data-last-col": s ? "left" : c ? "right" : void 0,
|
|
278
278
|
className: p(
|
|
279
279
|
"align-middle",
|
|
280
|
-
|
|
281
|
-
((f =
|
|
282
|
-
((C =
|
|
280
|
+
u,
|
|
281
|
+
((f = t.tableLayout) == null ? void 0 : f.cellBorder) && "border-e border-stroke-solid-light",
|
|
282
|
+
((C = t.tableLayout) == null ? void 0 : C.columnsResizable) && n.getCanResize() && "truncate",
|
|
283
283
|
(y = e.column.columnDef.meta) == null ? void 0 : y.cellClassName,
|
|
284
|
-
((x =
|
|
285
|
-
n.getIndex() === 0 || n.getIndex() === d.getVisibleCells().length - 1 ? (L =
|
|
284
|
+
((x = t.tableLayout) == null ? void 0 : x.columnsPinnable) && n.getCanPin() && '[&[data-pinned=left][data-last-col=left]]:border-e! [&[data-pinned=right][data-last-col=right]]:border-s! [&[data-pinned][data-last-col]]:border-border data-pinned:bg-background/90 data-pinned:backdrop-blur-xs"',
|
|
285
|
+
n.getIndex() === 0 || n.getIndex() === d.getVisibleCells().length - 1 ? (L = t.tableClassNames) == null ? void 0 : L.edgeCell : ""
|
|
286
286
|
),
|
|
287
287
|
children: l
|
|
288
288
|
},
|
|
@@ -290,12 +290,12 @@ function $({
|
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
function G() {
|
|
293
|
-
const { table: l, props: e } =
|
|
294
|
-
return /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan:
|
|
293
|
+
const { table: l, props: e } = b(), a = l.getAllColumns().length;
|
|
294
|
+
return /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { colSpan: a, className: "text-center text-muted-foreground py-6", children: e.emptyMessage || "No data available" }) });
|
|
295
295
|
}
|
|
296
296
|
function O() {
|
|
297
|
-
const { table: l, props: e } =
|
|
298
|
-
return /* @__PURE__ */ o("tr", { style: { height: l.getState().pagination.pageSize * 43 }, children: /* @__PURE__ */ o("td", { colSpan:
|
|
297
|
+
const { table: l, props: e } = b(), a = l.getAllColumns().length;
|
|
298
|
+
return /* @__PURE__ */ o("tr", { style: { height: l.getState().pagination.pageSize * 43 }, children: /* @__PURE__ */ o("td", { colSpan: a, className: "text-center text-muted-foreground py-6", children: /* @__PURE__ */ R("div", { className: "text-neutral-muted flex items-center gap-2 px-4 py-2 leading-none-medium-sm justify-center", children: [
|
|
299
299
|
/* @__PURE__ */ R(
|
|
300
300
|
"svg",
|
|
301
301
|
{
|
|
@@ -368,43 +368,43 @@ function ee({
|
|
|
368
368
|
) });
|
|
369
369
|
}
|
|
370
370
|
function te(l) {
|
|
371
|
-
const { table: e, recordCount:
|
|
371
|
+
const { table: e, recordCount: a, isLoading: r } = b();
|
|
372
372
|
return /* @__PURE__ */ o(
|
|
373
373
|
k,
|
|
374
374
|
{
|
|
375
375
|
checked: e.getIsAllPageRowsSelected() || e.getIsSomePageRowsSelected() && "indeterminate",
|
|
376
|
-
disabled: r ||
|
|
377
|
-
onCheckedChange: (
|
|
376
|
+
disabled: r || a === 0,
|
|
377
|
+
onCheckedChange: (t) => e.toggleAllPageRowsSelected(!!t),
|
|
378
378
|
"aria-label": "Select all",
|
|
379
379
|
className: "align-[inherit]"
|
|
380
380
|
}
|
|
381
381
|
);
|
|
382
382
|
}
|
|
383
383
|
function ae() {
|
|
384
|
-
var
|
|
385
|
-
const { table: l, isLoading: e, props:
|
|
386
|
-
return /* @__PURE__ */ R(
|
|
387
|
-
(((
|
|
388
|
-
/* @__PURE__ */ o(V, { children: e && (r != null && r.pageSize) ?
|
|
389
|
-
var
|
|
390
|
-
return /* @__PURE__ */ o(H, { column:
|
|
391
|
-
}) },
|
|
392
|
-
/* @__PURE__ */ o(E, { row: d, children: d.getVisibleCells().map((
|
|
384
|
+
var t, n;
|
|
385
|
+
const { table: l, isLoading: e, props: a } = b(), r = l.getState().pagination;
|
|
386
|
+
return /* @__PURE__ */ R(B, { children: [
|
|
387
|
+
(((t = a.tableLayout) == null ? void 0 : t.stripped) || !((n = a.tableLayout) != null && n.rowBorder)) && /* @__PURE__ */ o(A, {}),
|
|
388
|
+
/* @__PURE__ */ o(V, { children: e && (r != null && r.pageSize) ? a.loadingMode === "skeleton" ? Array.from({ length: r.pageSize }).map((d, i) => /* @__PURE__ */ o(F, { children: l.getVisibleFlatColumns().map((s, c) => {
|
|
389
|
+
var u;
|
|
390
|
+
return /* @__PURE__ */ o(H, { column: s, children: ((u = s.columnDef.meta) == null ? void 0 : u.skeleton) || /* @__PURE__ */ o(Z, { className: "h-4 w-full" }) }, c);
|
|
391
|
+
}) }, i)) : /* @__PURE__ */ o(O, {}) : l.getRowModel().rows.length ? l.getRowModel().rows.map((d, i) => /* @__PURE__ */ R(P, { children: [
|
|
392
|
+
/* @__PURE__ */ o(E, { row: d, children: d.getVisibleCells().map((s, c) => /* @__PURE__ */ o($, { cell: s, children: w(s.column.columnDef.cell, s.getContext()) }, c)) }, i),
|
|
393
393
|
d.getIsExpanded() && /* @__PURE__ */ o(j, { row: d })
|
|
394
394
|
] }, d.id)) : /* @__PURE__ */ o(G, {}) }),
|
|
395
|
-
/* @__PURE__ */ o(I, { children: l.getHeaderGroups().map((d,
|
|
396
|
-
var
|
|
397
|
-
const { column:
|
|
398
|
-
return /* @__PURE__ */ R(D, { header:
|
|
399
|
-
|
|
400
|
-
((
|
|
401
|
-
] },
|
|
402
|
-
}) },
|
|
395
|
+
/* @__PURE__ */ o(I, { children: l.getHeaderGroups().map((d, i) => /* @__PURE__ */ o(T, { headerGroup: d, children: d.headers.map((s, c) => {
|
|
396
|
+
var g;
|
|
397
|
+
const { column: u } = s;
|
|
398
|
+
return /* @__PURE__ */ R(D, { header: s, children: [
|
|
399
|
+
s.isPlaceholder ? null : w(s.column.columnDef.header, s.getContext()),
|
|
400
|
+
((g = a.tableLayout) == null ? void 0 : g.columnsResizable) && u.getCanResize() && /* @__PURE__ */ o(M, { header: s })
|
|
401
|
+
] }, c);
|
|
402
|
+
}) }, i)) })
|
|
403
403
|
] });
|
|
404
404
|
}
|
|
405
405
|
export {
|
|
406
406
|
ae as Z2Table,
|
|
407
|
-
|
|
407
|
+
B as Z2TableBase,
|
|
408
408
|
V as Z2TableBody,
|
|
409
409
|
E as Z2TableBodyRow,
|
|
410
410
|
$ as Z2TableBodyRowCell,
|
|
@@ -415,9 +415,9 @@ export {
|
|
|
415
415
|
I as Z2TableHead,
|
|
416
416
|
T as Z2TableHeadRow,
|
|
417
417
|
D as Z2TableHeadRowCell,
|
|
418
|
-
|
|
418
|
+
M as Z2TableHeadRowCellResize,
|
|
419
419
|
O as Z2TableLoader,
|
|
420
420
|
ee as Z2TableRowSelect,
|
|
421
421
|
te as Z2TableRowSelectAll,
|
|
422
|
-
|
|
422
|
+
A as Z2TableRowSpacer
|
|
423
423
|
};
|