laif-ds 0.2.42 → 0.2.43
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/components/ui/tables/data-table/components/data-table-actions.js +30 -22
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +92 -89
- package/dist/components/ui/tables/data-table/components/data-table-body.js +216 -169
- package/dist/components/ui/tables/data-table/components/data-table-column-visibility.js +38 -38
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +3 -3
- package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +4 -1
- package/dist/components/ui/tables/data-table/components/data-table-sorting.js +30 -30
- package/dist/components/ui/tables/data-table/data-table.js +136 -129
- package/dist/components/ui/tables/data-table/data-table.service.js +11 -9
- package/dist/components/ui/tables/data-table/data-table.utils.js +302 -0
- package/dist/index.d.ts +387 -1
- package/dist/index.js +191 -164
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,78 +1,91 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n, jsxs as i } from "react/jsx-runtime";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { flexRender as
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Popover as
|
|
9
|
-
import { ScrollArea as
|
|
10
|
-
import { Skeleton as
|
|
11
|
-
import { Table as
|
|
12
|
-
function
|
|
3
|
+
import { cn as u } from "../../../../../lib/utils.js";
|
|
4
|
+
import { flexRender as B } from "../../../../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
5
|
+
import { useRef as Z, useState as E, useMemo as T, useLayoutEffect as ee, useEffect as L } from "react";
|
|
6
|
+
import { Button as S } from "../../../button.js";
|
|
7
|
+
import { Icon as z } from "../../../icon.js";
|
|
8
|
+
import { Popover as te, PopoverTrigger as oe, PopoverContent as ne } from "../../../popover.js";
|
|
9
|
+
import { ScrollArea as re, ScrollBar as q } from "../../../scroll-area.js";
|
|
10
|
+
import { Skeleton as F } from "../../../skeleton.js";
|
|
11
|
+
import { Table as se, TableHeader as le, TableRow as y, TableHead as ce, TableBody as ie, TableCell as R } from "../../../table.js";
|
|
12
|
+
function xe({
|
|
13
13
|
table: s,
|
|
14
|
-
tableContainerRef:
|
|
15
|
-
loading:
|
|
16
|
-
data:
|
|
17
|
-
emptyComponent:
|
|
18
|
-
notFoundMessage:
|
|
19
|
-
onAddFilter:
|
|
20
|
-
maxSortedColumns:
|
|
21
|
-
i18n:
|
|
22
|
-
isServerSide:
|
|
14
|
+
tableContainerRef: d,
|
|
15
|
+
loading: v,
|
|
16
|
+
data: W,
|
|
17
|
+
emptyComponent: U,
|
|
18
|
+
notFoundMessage: M,
|
|
19
|
+
onAddFilter: V,
|
|
20
|
+
maxSortedColumns: h = 3,
|
|
21
|
+
i18n: w,
|
|
22
|
+
isServerSide: A = !1,
|
|
23
|
+
filterBadges: X = [],
|
|
24
|
+
advancedFilterBadge: D,
|
|
25
|
+
searchbarGlobalFilter: J
|
|
23
26
|
}) {
|
|
24
|
-
const
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
const K = (o) => {
|
|
28
|
+
if (X.some((l) => l.columnId === o)) return !0;
|
|
29
|
+
const t = (l) => l.some((c) => c.columnId === o), r = (l) => l ? l.some((c) => t(c.conditions) ? !0 : c.groups ? r(c.groups) : !1) : !1;
|
|
30
|
+
if (D?.rootGroup) {
|
|
31
|
+
if (t(D.rootGroup.conditions))
|
|
32
|
+
return !0;
|
|
33
|
+
if (D.rootGroup.groups)
|
|
34
|
+
return r(D.rootGroup.groups);
|
|
35
|
+
}
|
|
36
|
+
return !1;
|
|
37
|
+
}, I = Z({}), [Q, Y] = E({}), [H, $] = E(8), O = s.getHeaderGroups()[0], G = O ? O.headers : [], x = T(
|
|
38
|
+
() => G.filter((o) => o.column.getIsVisible()),
|
|
39
|
+
[G]
|
|
40
|
+
), P = T(
|
|
41
|
+
() => x.filter((o) => o.column.columnDef.meta?.pinned === "left"),
|
|
42
|
+
[x]
|
|
43
|
+
), _ = T(
|
|
44
|
+
() => x.filter((o) => o.column.columnDef.meta?.pinned === "right"),
|
|
45
|
+
[x]
|
|
46
|
+
), j = () => {
|
|
47
|
+
const o = d.current;
|
|
35
48
|
if (!o) return 8;
|
|
36
|
-
const e = o.querySelector("thead tr"), t = o.querySelector("tbody tr"), r = e?.getBoundingClientRect().height ?? 40,
|
|
37
|
-
return
|
|
49
|
+
const e = o.querySelector("thead tr"), t = o.querySelector("tbody tr"), r = e?.getBoundingClientRect().height ?? 40, l = t?.getBoundingClientRect().height ?? 32.5, N = o.offsetHeight - r, a = Math.floor(N / l);
|
|
50
|
+
return a > 1 ? a : 8;
|
|
38
51
|
}, b = (o = 0) => {
|
|
39
52
|
const e = {};
|
|
40
53
|
let t = !1;
|
|
41
|
-
if (!
|
|
54
|
+
if (!d.current) {
|
|
42
55
|
o < 5 && setTimeout(() => b(o + 1), 100);
|
|
43
56
|
return;
|
|
44
57
|
}
|
|
45
|
-
const r =
|
|
58
|
+
const r = d.current.querySelector(
|
|
46
59
|
"tbody tr:first-child"
|
|
47
60
|
);
|
|
48
|
-
let
|
|
49
|
-
for (const
|
|
50
|
-
const
|
|
51
|
-
e[
|
|
52
|
-
let
|
|
53
|
-
const
|
|
54
|
-
`[data-column-id="${
|
|
55
|
-
),
|
|
56
|
-
|
|
61
|
+
let l = 0;
|
|
62
|
+
for (const a of P) {
|
|
63
|
+
const f = a.column.id;
|
|
64
|
+
e[f] = { side: "left", offset: l };
|
|
65
|
+
let m = 0;
|
|
66
|
+
const g = r?.querySelector(
|
|
67
|
+
`[data-column-id="${f}"]`
|
|
68
|
+
), p = I.current[f];
|
|
69
|
+
g && g.offsetWidth > 0 ? m = g.getBoundingClientRect().width : p && p.offsetWidth > 0 ? m = p.getBoundingClientRect().width : (t = !0, m = 150), l += m;
|
|
57
70
|
}
|
|
58
|
-
let
|
|
59
|
-
for (const
|
|
60
|
-
const
|
|
61
|
-
e[
|
|
62
|
-
let
|
|
63
|
-
const
|
|
64
|
-
`[data-column-id="${
|
|
65
|
-
),
|
|
66
|
-
|
|
71
|
+
let c = 0;
|
|
72
|
+
for (const a of [..._].reverse()) {
|
|
73
|
+
const f = a.column.id;
|
|
74
|
+
e[f] = { side: "right", offset: c };
|
|
75
|
+
let m = 0;
|
|
76
|
+
const g = r?.querySelector(
|
|
77
|
+
`[data-column-id="${f}"]`
|
|
78
|
+
), p = I.current[f];
|
|
79
|
+
g && g.offsetWidth > 0 ? m = g.getBoundingClientRect().width : p && p.offsetWidth > 0 ? m = p.getBoundingClientRect().width : (t = !0, m = 150), c += m;
|
|
67
80
|
}
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
|
|
81
|
+
Y(e);
|
|
82
|
+
const N = j();
|
|
83
|
+
$(N), t && o < 5 && setTimeout(
|
|
71
84
|
() => b(o + 1),
|
|
72
85
|
100 * (o + 1)
|
|
73
86
|
);
|
|
74
87
|
};
|
|
75
|
-
|
|
88
|
+
ee(() => {
|
|
76
89
|
(() => {
|
|
77
90
|
requestAnimationFrame(() => {
|
|
78
91
|
requestAnimationFrame(() => {
|
|
@@ -83,32 +96,32 @@ function pe({
|
|
|
83
96
|
});
|
|
84
97
|
})();
|
|
85
98
|
}, [
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
99
|
+
P,
|
|
100
|
+
_,
|
|
101
|
+
x.map((o) => o.id).join("|"),
|
|
102
|
+
v,
|
|
103
|
+
W,
|
|
91
104
|
s.getState().pagination
|
|
92
|
-
]),
|
|
105
|
+
]), L(() => {
|
|
93
106
|
const o = () => {
|
|
94
107
|
clearTimeout(o.timeout), o.timeout = setTimeout(() => b(), 100);
|
|
95
108
|
};
|
|
96
109
|
window.addEventListener("resize", o);
|
|
97
|
-
const e =
|
|
110
|
+
const e = d.current;
|
|
98
111
|
let t = null;
|
|
99
112
|
return e && typeof ResizeObserver < "u" && (t = new ResizeObserver(() => {
|
|
100
113
|
b();
|
|
101
114
|
}), t.observe(e)), () => {
|
|
102
115
|
window.removeEventListener("resize", o), clearTimeout(o.timeout), t && t.disconnect();
|
|
103
116
|
};
|
|
104
|
-
}, []),
|
|
105
|
-
if (
|
|
117
|
+
}, []), L(() => {
|
|
118
|
+
if (v) {
|
|
106
119
|
const o = () => {
|
|
107
|
-
const r =
|
|
108
|
-
|
|
120
|
+
const r = j();
|
|
121
|
+
$(r);
|
|
109
122
|
};
|
|
110
123
|
o();
|
|
111
|
-
const e =
|
|
124
|
+
const e = d.current;
|
|
112
125
|
let t = null;
|
|
113
126
|
return e && typeof ResizeObserver < "u" && (t = new ResizeObserver(() => {
|
|
114
127
|
o();
|
|
@@ -116,15 +129,15 @@ function pe({
|
|
|
116
129
|
t && t.disconnect();
|
|
117
130
|
};
|
|
118
131
|
}
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
const r =
|
|
132
|
+
}, [v, d]);
|
|
133
|
+
const k = (o, e, t) => {
|
|
134
|
+
const r = Q[o];
|
|
122
135
|
if (!r || !e || r.side !== e) return;
|
|
123
|
-
const
|
|
136
|
+
const l = r.side === "left" ? `${r.offset}px` : void 0, c = r.side === "right" ? `${r.offset}px` : void 0;
|
|
124
137
|
return {
|
|
125
138
|
position: "sticky",
|
|
126
|
-
left:
|
|
127
|
-
right:
|
|
139
|
+
left: l,
|
|
140
|
+
right: c,
|
|
128
141
|
zIndex: t ? 49 : 48,
|
|
129
142
|
background: "var(--d-background)",
|
|
130
143
|
// Use separate shadow for pinned columns to avoid conflicts
|
|
@@ -135,29 +148,29 @@ function pe({
|
|
|
135
148
|
"div",
|
|
136
149
|
{
|
|
137
150
|
className: "flex max-h-full min-h-0 max-w-full min-w-0 flex-1",
|
|
138
|
-
ref:
|
|
139
|
-
children: /* @__PURE__ */ i(
|
|
151
|
+
ref: d,
|
|
152
|
+
children: /* @__PURE__ */ i(re, { className: "border-d-border h-full min-h-0 w-full rounded-md border", children: [
|
|
140
153
|
/* @__PURE__ */ n(q, { orientation: "horizontal" }),
|
|
141
154
|
/* @__PURE__ */ n(q, { orientation: "vertical" }),
|
|
142
|
-
/* @__PURE__ */ i(
|
|
143
|
-
/* @__PURE__ */ n(
|
|
144
|
-
|
|
155
|
+
/* @__PURE__ */ i(se, { className: "w-full", style: { minWidth: "max-content" }, children: [
|
|
156
|
+
/* @__PURE__ */ n(le, { children: s.getHeaderGroups().map((o) => /* @__PURE__ */ n(y, { children: o.headers.map((e) => /* @__PURE__ */ n(
|
|
157
|
+
ce,
|
|
145
158
|
{
|
|
146
159
|
ref: (t) => {
|
|
147
|
-
|
|
160
|
+
I.current[e.column.id] = t;
|
|
148
161
|
},
|
|
149
|
-
className:
|
|
162
|
+
className: u(
|
|
150
163
|
"bg-d-background sticky top-0 h-8 px-0",
|
|
151
164
|
e.column.columnDef.meta?.pinned ? "z-[49]" : "z-10"
|
|
152
165
|
),
|
|
153
|
-
style:
|
|
166
|
+
style: k(
|
|
154
167
|
e.column.id,
|
|
155
168
|
e.column.columnDef.meta?.pinned,
|
|
156
169
|
!0
|
|
157
170
|
),
|
|
158
|
-
children: e.isPlaceholder ? null : /* @__PURE__ */ i(
|
|
171
|
+
children: e.isPlaceholder ? null : /* @__PURE__ */ i(te, { children: [
|
|
159
172
|
/* @__PURE__ */ n(
|
|
160
|
-
|
|
173
|
+
oe,
|
|
161
174
|
{
|
|
162
175
|
asChild: !0,
|
|
163
176
|
onClick: (t) => {
|
|
@@ -166,96 +179,134 @@ function pe({
|
|
|
166
179
|
children: /* @__PURE__ */ i(
|
|
167
180
|
"div",
|
|
168
181
|
{
|
|
169
|
-
className:
|
|
182
|
+
className: u(
|
|
170
183
|
"flex h-full items-center justify-between gap-2 px-2",
|
|
171
184
|
e.column.columnDef.meta?.sortable || e.column.columnDef.meta?.filterable ? "hover:bg-d-secondary-foreground/10 cursor-pointer" : "cursor-not-allowed"
|
|
172
185
|
),
|
|
173
186
|
children: [
|
|
174
|
-
|
|
187
|
+
B(
|
|
175
188
|
e.column.columnDef.header,
|
|
176
189
|
e.getContext()
|
|
177
190
|
),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
191
|
+
/* @__PURE__ */ i("div", { className: "flex flex-row items-center gap-1", children: [
|
|
192
|
+
e.column.columnDef.meta?.searchable && /* @__PURE__ */ n(
|
|
193
|
+
z,
|
|
194
|
+
{
|
|
195
|
+
name: "Search",
|
|
196
|
+
className: u(
|
|
197
|
+
"text-d-foreground/30 max-h-3.5 max-w-3.5",
|
|
198
|
+
!!J && "text-d-primary"
|
|
199
|
+
)
|
|
187
200
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
onClick: (t) => {
|
|
198
|
-
e.column.toggleSorting(!0, !0), t.stopPropagation(), t.preventDefault();
|
|
201
|
+
),
|
|
202
|
+
e.column.columnDef.meta?.filterable && /* @__PURE__ */ n(
|
|
203
|
+
z,
|
|
204
|
+
{
|
|
205
|
+
name: "Filter",
|
|
206
|
+
className: u(
|
|
207
|
+
"text-d-foreground/30 max-h-3.5 max-w-3.5",
|
|
208
|
+
K(e.column.id) && "text-d-primary"
|
|
209
|
+
)
|
|
199
210
|
}
|
|
200
|
-
|
|
201
|
-
|
|
211
|
+
),
|
|
212
|
+
e.column.columnDef.meta?.sortable && /* @__PURE__ */ i("div", { className: "flex flex-col py-1", children: [
|
|
213
|
+
/* @__PURE__ */ n(
|
|
214
|
+
S,
|
|
215
|
+
{
|
|
216
|
+
iconLeft: "ChevronUp",
|
|
217
|
+
size: "icon",
|
|
218
|
+
className: u(
|
|
219
|
+
"hover:bg-d-foreground/10 max-h-4 max-w-6",
|
|
220
|
+
e.column.getIsSorted() === "asc" && "hover:text-d-destructive hover:bg-d-destructive/20"
|
|
221
|
+
),
|
|
222
|
+
variant: e.column.getIsSorted() === "asc" ? "ghost-accent" : "ghost",
|
|
223
|
+
onClick: (t) => {
|
|
224
|
+
e.column.getIsSorted() === "asc" ? e.column.clearSorting() : e.column.toggleSorting(
|
|
225
|
+
!1,
|
|
226
|
+
!0
|
|
227
|
+
), t.stopPropagation(), t.preventDefault();
|
|
228
|
+
},
|
|
229
|
+
disabled: s.getState().sorting.length >= h && !e.column.getIsSorted()
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ n(
|
|
233
|
+
S,
|
|
234
|
+
{
|
|
235
|
+
iconLeft: "ChevronDown",
|
|
236
|
+
size: "icon",
|
|
237
|
+
className: u(
|
|
238
|
+
"hover:bg-d-foreground/10 max-h-4 max-w-6",
|
|
239
|
+
e.column.getIsSorted() === "desc" && "hover:text-d-destructive hover:bg-d-destructive/20"
|
|
240
|
+
),
|
|
241
|
+
variant: e.column.getIsSorted() === "desc" ? "ghost-accent" : "ghost",
|
|
242
|
+
onClick: (t) => {
|
|
243
|
+
e.column.getIsSorted() === "desc" ? e.column.clearSorting() : e.column.toggleSorting(
|
|
244
|
+
!0,
|
|
245
|
+
!0
|
|
246
|
+
), t.stopPropagation(), t.preventDefault();
|
|
247
|
+
},
|
|
248
|
+
disabled: s.getState().sorting.length >= h && !e.column.getIsSorted()
|
|
249
|
+
}
|
|
250
|
+
)
|
|
251
|
+
] })
|
|
252
|
+
] })
|
|
202
253
|
]
|
|
203
254
|
}
|
|
204
255
|
)
|
|
205
256
|
}
|
|
206
257
|
),
|
|
207
|
-
/* @__PURE__ */ n(
|
|
258
|
+
/* @__PURE__ */ n(ne, { className: "w-40 p-0", children: /* @__PURE__ */ i("div", { className: "flex flex-col text-sm", children: [
|
|
208
259
|
e.column.columnDef.meta?.sortable && /* @__PURE__ */ i(
|
|
209
260
|
"div",
|
|
210
261
|
{
|
|
211
|
-
className:
|
|
262
|
+
className: u(
|
|
212
263
|
"group hover:bg-d-secondary-foreground/5 relative flex cursor-pointer items-center justify-between rounded px-2 py-1.5",
|
|
213
264
|
e.column.getIsSorted() && "bg-d-secondary-foreground/5",
|
|
214
|
-
s.getState().sorting.length >=
|
|
265
|
+
s.getState().sorting.length >= h && !e.column.getIsSorted() && "pointer-events-none cursor-not-allowed opacity-60"
|
|
215
266
|
),
|
|
216
|
-
"aria-disabled": s.getState().sorting.length >=
|
|
267
|
+
"aria-disabled": s.getState().sorting.length >= h && !e.column.getIsSorted(),
|
|
217
268
|
children: [
|
|
218
|
-
/* @__PURE__ */ n("span", { className: "text-md", children:
|
|
219
|
-
/* @__PURE__ */ n(
|
|
269
|
+
/* @__PURE__ */ n("span", { className: "text-md", children: w.sorting.sort }),
|
|
270
|
+
/* @__PURE__ */ n(z, { name: "ChevronRight", size: "xs" }),
|
|
220
271
|
/* @__PURE__ */ i("div", { className: "bg-d-background border-d-border absolute top-0 left-full ml-0 hidden w-48 flex-col rounded-md border p-1 shadow-md group-hover:flex", children: [
|
|
221
272
|
/* @__PURE__ */ n(
|
|
222
|
-
|
|
273
|
+
S,
|
|
223
274
|
{
|
|
224
275
|
className: "justify-start",
|
|
225
276
|
variant: "ghost",
|
|
226
277
|
size: "sm",
|
|
227
278
|
iconLeft: e.column.columnDef.meta?.type === "number" ? "ArrowDown01" : e.column.columnDef.meta?.type === "string" ? "ArrowDownAz" : "ArrowDownNarrowWide",
|
|
228
279
|
onClick: () => {
|
|
229
|
-
!e.column.getIsSorted() && s.getState().sorting.length >=
|
|
280
|
+
!e.column.getIsSorted() && s.getState().sorting.length >= h || e.column.toggleSorting(
|
|
230
281
|
!1,
|
|
231
282
|
!0
|
|
232
283
|
);
|
|
233
284
|
},
|
|
234
|
-
children:
|
|
285
|
+
children: w.sorting.ascending
|
|
235
286
|
}
|
|
236
287
|
),
|
|
237
288
|
/* @__PURE__ */ n(
|
|
238
|
-
|
|
289
|
+
S,
|
|
239
290
|
{
|
|
240
291
|
className: "justify-start",
|
|
241
292
|
variant: "ghost",
|
|
242
293
|
size: "sm",
|
|
243
294
|
iconLeft: e.column.columnDef.meta?.type === "number" ? "ArrowUp01" : e.column.columnDef.meta?.type === "string" ? "ArrowUpAz" : "ArrowUpNarrowWide",
|
|
244
295
|
onClick: () => {
|
|
245
|
-
!e.column.getIsSorted() && s.getState().sorting.length >=
|
|
296
|
+
!e.column.getIsSorted() && s.getState().sorting.length >= h || e.column.toggleSorting(!0, !0);
|
|
246
297
|
},
|
|
247
|
-
children:
|
|
298
|
+
children: w.sorting.descending
|
|
248
299
|
}
|
|
249
300
|
),
|
|
250
301
|
e.column.getIsSorted() && /* @__PURE__ */ n(
|
|
251
|
-
|
|
302
|
+
S,
|
|
252
303
|
{
|
|
253
304
|
className: "text-d-destructive/80 hover:text-d-destructive justify-start",
|
|
254
305
|
variant: "ghost",
|
|
255
306
|
size: "sm",
|
|
256
307
|
iconLeft: "CircleX",
|
|
257
308
|
onClick: () => e.column.clearSorting(),
|
|
258
|
-
children:
|
|
309
|
+
children: w.sorting.clearSort
|
|
259
310
|
}
|
|
260
311
|
)
|
|
261
312
|
] })
|
|
@@ -266,10 +317,10 @@ function pe({
|
|
|
266
317
|
"div",
|
|
267
318
|
{
|
|
268
319
|
className: "hover:bg-d-secondary-foreground/5 relative flex cursor-pointer items-center justify-between rounded px-2 py-1.5",
|
|
269
|
-
onClick: () =>
|
|
320
|
+
onClick: () => V(e),
|
|
270
321
|
children: [
|
|
271
|
-
/* @__PURE__ */ n("span", { className: "text-md", children:
|
|
272
|
-
/* @__PURE__ */ n(
|
|
322
|
+
/* @__PURE__ */ n("span", { className: "text-md", children: w.filters.filter }),
|
|
323
|
+
/* @__PURE__ */ n(z, { name: "Filter", size: "xs" })
|
|
273
324
|
]
|
|
274
325
|
}
|
|
275
326
|
)
|
|
@@ -278,61 +329,57 @@ function pe({
|
|
|
278
329
|
},
|
|
279
330
|
e.id
|
|
280
331
|
)) }, o.id)) }),
|
|
281
|
-
/* @__PURE__ */ n(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
"
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
},
|
|
315
|
-
`skeleton-cell-${e}-${r}`
|
|
316
|
-
)) }, `skeleton-row-${e}`)
|
|
317
|
-
) : s.getRowModel().rows?.length ? s.getRowModel().rows.map((o) => /* @__PURE__ */ n(
|
|
332
|
+
/* @__PURE__ */ n(ie, { children: v && A ? Array.from({ length: H }).map((o, e) => /* @__PURE__ */ n(y, { children: s.getHeaderGroups()[0].headers.map((t, r) => /* @__PURE__ */ n(
|
|
333
|
+
R,
|
|
334
|
+
{
|
|
335
|
+
"data-column-id": t.column.id,
|
|
336
|
+
className: u(
|
|
337
|
+
"border-0",
|
|
338
|
+
t.column.columnDef.meta?.pinned && "bg-d-background z-[50]"
|
|
339
|
+
),
|
|
340
|
+
style: k(
|
|
341
|
+
t.column.id,
|
|
342
|
+
t.column.columnDef.meta?.pinned,
|
|
343
|
+
!1
|
|
344
|
+
),
|
|
345
|
+
children: /* @__PURE__ */ n(F, { className: "h-6 w-full" })
|
|
346
|
+
},
|
|
347
|
+
`skeleton-cell-${e}-${r}`
|
|
348
|
+
)) }, `skeleton-row-${e}`)) : v && !A ? Array.from({ length: H }).map((o, e) => /* @__PURE__ */ n(y, { children: s.getHeaderGroups()[0].headers.map((t, r) => /* @__PURE__ */ n(
|
|
349
|
+
R,
|
|
350
|
+
{
|
|
351
|
+
"data-column-id": t.column.id,
|
|
352
|
+
className: u(
|
|
353
|
+
"border-0",
|
|
354
|
+
t.column.columnDef.meta?.pinned && "bg-d-background z-[50]"
|
|
355
|
+
),
|
|
356
|
+
style: k(
|
|
357
|
+
t.column.id,
|
|
358
|
+
t.column.columnDef.meta?.pinned,
|
|
359
|
+
!1
|
|
360
|
+
),
|
|
361
|
+
children: /* @__PURE__ */ n(F, { className: "h-6 w-full" })
|
|
362
|
+
},
|
|
363
|
+
`skeleton-cell-${e}-${r}`
|
|
364
|
+
)) }, `skeleton-row-${e}`)) : s.getRowModel().rows?.length ? s.getRowModel().rows.map((o) => /* @__PURE__ */ n(
|
|
318
365
|
y,
|
|
319
366
|
{
|
|
320
367
|
"data-state": o.getIsSelected() && "selected",
|
|
321
368
|
className: "border-0 shadow-[inset_0_-1px_0_var(--d-border)]",
|
|
322
369
|
children: o.getVisibleCells().map((e) => /* @__PURE__ */ n(
|
|
323
|
-
|
|
370
|
+
R,
|
|
324
371
|
{
|
|
325
372
|
"data-column-id": e.column.id,
|
|
326
|
-
className:
|
|
373
|
+
className: u(
|
|
327
374
|
"border-0",
|
|
328
375
|
e.column.columnDef.meta?.pinned ? "bg-d-background z-[50]" : "shadow-[inset_-1px_0_0_var(--d-border)]"
|
|
329
376
|
),
|
|
330
|
-
style:
|
|
377
|
+
style: k(
|
|
331
378
|
e.column.id,
|
|
332
379
|
e.column.columnDef.meta?.pinned,
|
|
333
380
|
!1
|
|
334
381
|
),
|
|
335
|
-
children:
|
|
382
|
+
children: B(
|
|
336
383
|
e.column.columnDef.cell,
|
|
337
384
|
e.getContext()
|
|
338
385
|
)
|
|
@@ -342,11 +389,11 @@ function pe({
|
|
|
342
389
|
},
|
|
343
390
|
o.id
|
|
344
391
|
)) : /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n(
|
|
345
|
-
|
|
392
|
+
R,
|
|
346
393
|
{
|
|
347
394
|
colSpan: s?.getHeaderGroups()?.[0]?.headers?.length ?? 1,
|
|
348
395
|
className: "pt-4 text-center",
|
|
349
|
-
children:
|
|
396
|
+
children: U || M
|
|
350
397
|
}
|
|
351
398
|
) }) })
|
|
352
399
|
] })
|
|
@@ -355,5 +402,5 @@ function pe({
|
|
|
355
402
|
);
|
|
356
403
|
}
|
|
357
404
|
export {
|
|
358
|
-
|
|
405
|
+
xe as DataTableBody
|
|
359
406
|
};
|