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