@rafal.lemieszewski/tide-ui 0.87.7 → 0.87.8
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/cjs/components/fundamental/alert-dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/alert.cjs +1 -1
- package/dist/cjs/components/fundamental/avatar.cjs +1 -1
- package/dist/cjs/components/fundamental/badge.cjs +1 -1
- package/dist/cjs/components/fundamental/breadcrumb.cjs +1 -1
- package/dist/cjs/components/fundamental/button-group.cjs +1 -1
- package/dist/cjs/components/fundamental/button.cjs +1 -1
- package/dist/cjs/components/fundamental/calendar.cjs +1 -1
- package/dist/cjs/components/fundamental/card.cjs +1 -1
- package/dist/cjs/components/fundamental/chart.cjs +1 -1
- package/dist/cjs/components/fundamental/checkbox.cjs +1 -1
- package/dist/cjs/components/fundamental/command.cjs +1 -1
- package/dist/cjs/components/fundamental/dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/drawer.cjs +1 -1
- package/dist/cjs/components/fundamental/dropdown-menu.cjs +1 -1
- package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
- package/dist/cjs/components/fundamental/hover-card.cjs +1 -1
- package/dist/cjs/components/fundamental/input-group.cjs +1 -1
- package/dist/cjs/components/fundamental/input.cjs +1 -1
- package/dist/cjs/components/fundamental/kbd.cjs +1 -1
- package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
- package/dist/cjs/components/fundamental/popover.cjs +1 -1
- package/dist/cjs/components/fundamental/resizable.cjs +1 -1
- package/dist/cjs/components/fundamental/select.cjs +1 -1
- package/dist/cjs/components/fundamental/sheet.cjs +1 -1
- package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
- package/dist/cjs/components/fundamental/skeleton.cjs +1 -1
- package/dist/cjs/components/fundamental/slider.cjs +1 -1
- package/dist/cjs/components/fundamental/spinner.cjs +1 -1
- package/dist/cjs/components/fundamental/switch.cjs +1 -1
- package/dist/cjs/components/fundamental/tabs.cjs +1 -1
- package/dist/cjs/components/fundamental/tag.cjs +3 -3
- package/dist/cjs/components/fundamental/textarea.cjs +1 -1
- package/dist/cjs/components/fundamental/toast.cjs +1 -1
- package/dist/cjs/components/fundamental/toggle.cjs +1 -1
- package/dist/cjs/components/fundamental/tooltip.cjs +1 -1
- package/dist/cjs/components/fundamental/tree.cjs +1 -1
- package/dist/cjs/components/product/activity-log.cjs +1 -1
- package/dist/cjs/components/product/app-frame.cjs +1 -1
- package/dist/cjs/components/product/attributes-list.cjs +1 -1
- package/dist/cjs/components/product/bookmarks.cjs +1 -1
- package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -1
- package/dist/cjs/components/product/data-table.cjs +1 -1
- package/dist/cjs/components/product/filters.cjs +1 -1
- package/dist/cjs/components/product/linked-chart.cjs +1 -1
- package/dist/es/components/fundamental/alert-dialog.js +10 -10
- package/dist/es/components/fundamental/alert.js +1 -1
- package/dist/es/components/fundamental/avatar.js +23 -23
- package/dist/es/components/fundamental/badge.js +1 -1
- package/dist/es/components/fundamental/breadcrumb.js +23 -23
- package/dist/es/components/fundamental/button-group.js +14 -14
- package/dist/es/components/fundamental/button.js +28 -28
- package/dist/es/components/fundamental/calendar.js +20 -20
- package/dist/es/components/fundamental/card.js +26 -26
- package/dist/es/components/fundamental/chart.js +1 -1
- package/dist/es/components/fundamental/checkbox.js +3 -3
- package/dist/es/components/fundamental/command.js +36 -36
- package/dist/es/components/fundamental/dialog.js +7 -7
- package/dist/es/components/fundamental/drawer.js +1 -1
- package/dist/es/components/fundamental/dropdown-menu.js +111 -111
- package/dist/es/components/fundamental/file-upload.js +2 -2
- package/dist/es/components/fundamental/hover-card.js +6 -6
- package/dist/es/components/fundamental/input-group.js +2 -2
- package/dist/es/components/fundamental/input.js +1 -1
- package/dist/es/components/fundamental/kbd.js +5 -5
- package/dist/es/components/fundamental/month-picker.js +21 -21
- package/dist/es/components/fundamental/popover.js +7 -7
- package/dist/es/components/fundamental/resizable.js +1 -1
- package/dist/es/components/fundamental/select.js +21 -21
- package/dist/es/components/fundamental/sheet.js +40 -40
- package/dist/es/components/fundamental/sidebar.js +45 -45
- package/dist/es/components/fundamental/skeleton.js +19 -19
- package/dist/es/components/fundamental/slider.js +1 -1
- package/dist/es/components/fundamental/spinner.js +11 -11
- package/dist/es/components/fundamental/switch.js +7 -7
- package/dist/es/components/fundamental/tabs.js +30 -30
- package/dist/es/components/fundamental/tag.js +28 -28
- package/dist/es/components/fundamental/textarea.js +9 -9
- package/dist/es/components/fundamental/toast.js +11 -11
- package/dist/es/components/fundamental/toggle.js +7 -7
- package/dist/es/components/fundamental/tooltip.js +4 -4
- package/dist/es/components/fundamental/tree.js +17 -17
- package/dist/es/components/product/activity-log.js +41 -41
- package/dist/es/components/product/app-frame.js +3 -3
- package/dist/es/components/product/attributes-list.js +68 -68
- package/dist/es/components/product/bookmarks.js +148 -148
- package/dist/es/components/product/data-table-settings-menu.js +45 -45
- package/dist/es/components/product/data-table.js +375 -375
- package/dist/es/components/product/filters.js +5 -5
- package/dist/es/components/product/linked-chart.js +24 -24
- package/dist/es/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { jsx as t, Fragment as ee, jsxs as b } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import { useReactTable as
|
|
3
|
+
import { useReactTable as ln, getFacetedMinMaxValues as cn, getFacetedUniqueValues as dn, getFacetedRowModel as un, getGroupedRowModel as fn, getExpandedRowModel as gn, getSortedRowModel as mn, getPaginationRowModel as hn, getFilteredRowModel as pn, getCoreRowModel as vn, flexRender as be } from "@tanstack/react-table";
|
|
4
4
|
import { useReactTable as Lo } from "@tanstack/react-table";
|
|
5
|
-
import { useSensors as
|
|
6
|
-
import { SortableContext as
|
|
7
|
-
import { CSS as
|
|
5
|
+
import { useSensors as bn, useSensor as Sr, MouseSensor as xn, TouchSensor as yn, DndContext as Cn, closestCenter as wn } from "@dnd-kit/core";
|
|
6
|
+
import { SortableContext as Sn, horizontalListSortingStrategy as Nn, arrayMove as Rn, useSortable as In } from "@dnd-kit/sortable";
|
|
7
|
+
import { CSS as En } from "@dnd-kit/utilities";
|
|
8
8
|
import { cn as V } from "../../lib/utils.js";
|
|
9
9
|
import { Button as Pe } from "../fundamental/button.js";
|
|
10
10
|
import { Input as ft } from "../fundamental/input.js";
|
|
11
|
-
import { AutocompleteSearch as
|
|
12
|
-
import { Table as
|
|
13
|
-
import { Select as
|
|
11
|
+
import { AutocompleteSearch as Dn } from "../fundamental/autocomplete-search.js";
|
|
12
|
+
import { Table as kn, TableHeader as zn, TableRow as G, TableHead as ut, TableBody as Bn, TableCell as le } from "../fundamental/table.js";
|
|
13
|
+
import { Select as Tn, SelectTrigger as Pn, SelectValue as Mn, SelectContent as Vn, SelectItem as Nr } from "../fundamental/select.js";
|
|
14
14
|
import { Checkbox as gt } from "../fundamental/checkbox.js";
|
|
15
15
|
import { Icon as W } from "../fundamental/icon.js";
|
|
16
|
-
import { PlusCircle as
|
|
16
|
+
import { PlusCircle as Fn, X as Vt, GripVertical as $n, ArrowUpToLine as Rr, ArrowDownToLine as Ir, AlertCircle as jn, Filter as An } from "lucide-react";
|
|
17
17
|
import { Badge as xe } from "../fundamental/badge.js";
|
|
18
18
|
import { Popover as $r, PopoverTrigger as jr, PopoverContent as Ar } from "../fundamental/popover.js";
|
|
19
19
|
import { Command as Lr, CommandInput as Or, CommandList as Hr, CommandEmpty as Wr, CommandGroup as Gr, CommandItem as _r } from "../fundamental/command.js";
|
|
20
|
-
import { Pagination as
|
|
20
|
+
import { Pagination as Ln } from "../fundamental/pagination.js";
|
|
21
21
|
import { Skeleton as Er } from "../fundamental/skeleton.js";
|
|
22
22
|
import { Spinner as qe } from "../fundamental/spinner.js";
|
|
23
|
-
import { DataTableSettingsMenu as
|
|
24
|
-
import { TooltipProvider as
|
|
25
|
-
function
|
|
23
|
+
import { DataTableSettingsMenu as On } from "./data-table-settings-menu.js";
|
|
24
|
+
import { TooltipProvider as Hn, Tooltip as Wn, TooltipTrigger as Gn, TooltipContent as _n } from "../fundamental/tooltip.js";
|
|
25
|
+
function qn(c, n) {
|
|
26
26
|
const [i, a] = l.useState(c);
|
|
27
27
|
return l.useEffect(() => {
|
|
28
28
|
const f = setTimeout(() => {
|
|
29
29
|
a(c);
|
|
30
|
-
},
|
|
30
|
+
}, n);
|
|
31
31
|
return () => {
|
|
32
32
|
clearTimeout(f);
|
|
33
33
|
};
|
|
34
|
-
}, [c,
|
|
34
|
+
}, [c, n]), i;
|
|
35
35
|
}
|
|
36
|
-
const Te = /* @__PURE__ */ l.memo(function({ children:
|
|
36
|
+
const Te = /* @__PURE__ */ l.memo(function({ children: n, align: i = "left" }) {
|
|
37
37
|
const a = l.useRef(null), [f, x] = l.useState(!1), [y, h] = l.useState("");
|
|
38
38
|
return l.useEffect(() => {
|
|
39
39
|
const p = a.current;
|
|
@@ -55,34 +55,34 @@ const Te = /* @__PURE__ */ l.memo(function({ children: s, align: i = "left" }) {
|
|
|
55
55
|
return D.observe(p), () => {
|
|
56
56
|
clearTimeout(v), D.disconnect();
|
|
57
57
|
};
|
|
58
|
-
}, [
|
|
58
|
+
}, [n]), l.useEffect(() => {
|
|
59
59
|
a.current && h(a.current.textContent || "");
|
|
60
|
-
}, [
|
|
61
|
-
/* @__PURE__ */ t(
|
|
60
|
+
}, [n]), f ? /* @__PURE__ */ b(Wn, { children: [
|
|
61
|
+
/* @__PURE__ */ t(Gn, { asChild: !0, children: /* @__PURE__ */ t(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
64
|
ref: a,
|
|
65
65
|
className: V("min-w-0 overflow-hidden truncate [&>*]:truncate", i === "right" && "text-right"),
|
|
66
|
-
children:
|
|
66
|
+
children: n
|
|
67
67
|
}
|
|
68
68
|
) }),
|
|
69
|
-
/* @__PURE__ */ t(
|
|
69
|
+
/* @__PURE__ */ t(_n, { side: "top", className: "max-w-xs", children: y })
|
|
70
70
|
] }) : /* @__PURE__ */ t(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
73
|
ref: a,
|
|
74
74
|
className: V("min-w-0 overflow-hidden truncate [&>*]:truncate", i === "right" && "text-right"),
|
|
75
|
-
children:
|
|
75
|
+
children: n
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
}), Dr = (c,
|
|
79
|
-
const f = c.getValue(
|
|
78
|
+
}), Dr = (c, n, i, a) => {
|
|
79
|
+
const f = c.getValue(n), x = f != null ? String(f) : "", y = i.toLowerCase();
|
|
80
80
|
return x.toLowerCase().includes(y) ? !0 : x.toLowerCase().split(" ").some((p) => p.startsWith(y));
|
|
81
|
-
},
|
|
81
|
+
}, Un = (c, n, i) => {
|
|
82
82
|
if (!i || i.length === 0) return !0;
|
|
83
|
-
const a = c.getValue(
|
|
83
|
+
const a = c.getValue(n);
|
|
84
84
|
return i.includes(a);
|
|
85
|
-
}, Vo = (c,
|
|
85
|
+
}, Vo = (c, n, i, a) => {
|
|
86
86
|
if (!i || i.trim() === "") return !0;
|
|
87
87
|
const f = String(i).toLowerCase(), x = (h) => {
|
|
88
88
|
const p = h.getAllCells().map((v) => v.column.id);
|
|
@@ -97,9 +97,9 @@ const Te = /* @__PURE__ */ l.memo(function({ children: s, align: i = "left" }) {
|
|
|
97
97
|
const y = x(c);
|
|
98
98
|
return a && y && a({ itemRank: 1 }), y;
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function Jn(c, n) {
|
|
101
101
|
for (const i of c) {
|
|
102
|
-
const a = typeof
|
|
102
|
+
const a = typeof n == "function" ? n(i.original) : i.original?.[n];
|
|
103
103
|
if (a != null) {
|
|
104
104
|
if (typeof a == "number") return "number";
|
|
105
105
|
if (a instanceof Date) return "date";
|
|
@@ -114,29 +114,29 @@ function Js(c, s) {
|
|
|
114
114
|
}
|
|
115
115
|
function kr(c) {
|
|
116
116
|
if (c.length === 0) return "";
|
|
117
|
-
const
|
|
118
|
-
return
|
|
117
|
+
const n = Math.min(...c), i = Math.max(...c);
|
|
118
|
+
return n === i ? String(n) : `${n} – ${i}`;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Kn(c) {
|
|
121
121
|
return c.length === 0 ? "" : `Avg: ${(c.reduce((a, f) => a + f, 0) / c.length).toFixed(2)}`;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Xn(c) {
|
|
124
124
|
return c.length === 0 ? "" : `Total: ${c.reduce((i, a) => i + a, 0)}`;
|
|
125
125
|
}
|
|
126
126
|
function zr(c) {
|
|
127
127
|
return `${c} ${c === 1 ? "item" : "items"}`;
|
|
128
128
|
}
|
|
129
|
-
function Br(c,
|
|
129
|
+
function Br(c, n) {
|
|
130
130
|
if (c.length === 0) return "";
|
|
131
|
-
const a = new Set(c).size, f = a === 1 ||
|
|
131
|
+
const a = new Set(c).size, f = a === 1 || n.endsWith("s") ? n : n.endsWith("y") ? n.slice(0, -1) + "ies" : n + "s";
|
|
132
132
|
return `${a} ${f.toLowerCase()}`;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Qn(c) {
|
|
135
135
|
if (c.length === 0) return "";
|
|
136
|
-
const
|
|
137
|
-
c.forEach((f) =>
|
|
136
|
+
const n = /* @__PURE__ */ new Map();
|
|
137
|
+
c.forEach((f) => n.set(f, (n.get(f) || 0) + 1));
|
|
138
138
|
let i = 0, a = "";
|
|
139
|
-
return
|
|
139
|
+
return n.forEach((f, x) => {
|
|
140
140
|
f > i && (i = f, a = x);
|
|
141
141
|
}), `${a} (${i})`;
|
|
142
142
|
}
|
|
@@ -147,16 +147,16 @@ function Tr(c) {
|
|
|
147
147
|
const a = new Date(Math.min(...i.map((y) => y.getTime()))), f = new Date(Math.max(...i.map((y) => y.getTime()))), x = (y) => y.toISOString().split("T")[0];
|
|
148
148
|
return a.getTime() === f.getTime() ? x(a) : `${x(a)} – ${x(f)}`;
|
|
149
149
|
}
|
|
150
|
-
function Pr(c,
|
|
150
|
+
function Pr(c, n, i) {
|
|
151
151
|
const a = c.columnDef;
|
|
152
152
|
if (c.id === i || a?.meta?.renderInGroupedRows || a?.meta?.aggregation === !1) return null;
|
|
153
153
|
if (typeof a?.meta?.aggregation == "function") {
|
|
154
154
|
const R = "accessorKey" in a ? a.accessorKey : void 0;
|
|
155
|
-
return a.meta.aggregation(
|
|
155
|
+
return a.meta.aggregation(n, R);
|
|
156
156
|
}
|
|
157
157
|
const f = "accessorKey" in a ? a.accessorKey : void 0, x = "accessorFn" in a ? a.accessorFn : void 0, y = f || x;
|
|
158
158
|
if (!y) return null;
|
|
159
|
-
const h =
|
|
159
|
+
const h = n.map((R) => typeof y == "function" ? y(R.original, R.index) : R.original?.[y]).filter((R) => R != null);
|
|
160
160
|
if (h.length === 0) return null;
|
|
161
161
|
const p = a?.meta?.aggregation;
|
|
162
162
|
if (p && typeof p == "string")
|
|
@@ -164,9 +164,9 @@ function Pr(c, s, i) {
|
|
|
164
164
|
case "range":
|
|
165
165
|
return kr(h);
|
|
166
166
|
case "average":
|
|
167
|
-
return
|
|
167
|
+
return Kn(h);
|
|
168
168
|
case "sum":
|
|
169
|
-
return
|
|
169
|
+
return Xn(h);
|
|
170
170
|
case "count":
|
|
171
171
|
return zr(h.length);
|
|
172
172
|
case "uniqueCount":
|
|
@@ -175,13 +175,13 @@ function Pr(c, s, i) {
|
|
|
175
175
|
a?.meta?.label || String(c.id)
|
|
176
176
|
);
|
|
177
177
|
case "mostCommon":
|
|
178
|
-
return
|
|
178
|
+
return Qn(h.map(String));
|
|
179
179
|
case "dateRange":
|
|
180
180
|
return Tr(h);
|
|
181
181
|
default:
|
|
182
182
|
return null;
|
|
183
183
|
}
|
|
184
|
-
switch (
|
|
184
|
+
switch (Jn(n, y)) {
|
|
185
185
|
case "number":
|
|
186
186
|
return kr(h);
|
|
187
187
|
case "string":
|
|
@@ -195,11 +195,11 @@ function Pr(c, s, i) {
|
|
|
195
195
|
return zr(h.length);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
function Mr({ columns: c, rows:
|
|
198
|
+
function Mr({ columns: c, rows: n, showRowBorder: i = !0, showCellBorder: a = !0, skipHeader: f = !1, enableResponsiveWrapper: x = !0 }) {
|
|
199
199
|
const y = x ? "h-4 w-full max-w-full" : "h-4 w-[120px]", h = x ? "h-4 w-full max-w-full" : "h-4 w-[100px]";
|
|
200
200
|
return /* @__PURE__ */ b(ee, { children: [
|
|
201
201
|
!f && /* @__PURE__ */ t(G, { showBorder: i, children: Array.from({ length: c }).map((p, v) => /* @__PURE__ */ t(ut, { showBorder: a, className: "overflow-hidden", children: /* @__PURE__ */ t(Er, { className: y }) }, v)) }),
|
|
202
|
-
Array.from({ length:
|
|
202
|
+
Array.from({ length: n }).map((p, v) => /* @__PURE__ */ t(G, { showBorder: i, children: Array.from({ length: c }).map((R, D) => /* @__PURE__ */ t(
|
|
203
203
|
le,
|
|
204
204
|
{
|
|
205
205
|
showBorder: a,
|
|
@@ -211,14 +211,14 @@ function Mr({ columns: c, rows: s, showRowBorder: i = !0, showCellBorder: a = !0
|
|
|
211
211
|
)) }, v))
|
|
212
212
|
] });
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
title:
|
|
214
|
+
const Yn = /* @__PURE__ */ l.memo(function({
|
|
215
|
+
title: n = "No data",
|
|
216
216
|
description: i = "No items to display",
|
|
217
217
|
action: a,
|
|
218
218
|
customContent: f
|
|
219
219
|
}) {
|
|
220
220
|
return f ? /* @__PURE__ */ t(ee, { children: f }) : /* @__PURE__ */ b("div", { className: "flex flex-col items-center justify-center py-[var(--space-2xl)] text-center", children: [
|
|
221
|
-
/* @__PURE__ */ t("p", { className: "text-body-medium-md text-[var(--color-text-primary)]", children:
|
|
221
|
+
/* @__PURE__ */ t("p", { className: "text-body-medium-md text-[var(--color-text-primary)]", children: n }),
|
|
222
222
|
i && /* @__PURE__ */ t("p", { className: "text-body-sm text-[var(--color-text-secondary)] mt-[var(--space-xs)]", children: i }),
|
|
223
223
|
a && /* @__PURE__ */ t(
|
|
224
224
|
Pe,
|
|
@@ -231,14 +231,14 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
231
231
|
}
|
|
232
232
|
)
|
|
233
233
|
] });
|
|
234
|
-
}),
|
|
235
|
-
title:
|
|
234
|
+
}), Zn = /* @__PURE__ */ l.memo(function({
|
|
235
|
+
title: n = "No results found",
|
|
236
236
|
description: i = "Try adjusting your search or filters",
|
|
237
237
|
action: a,
|
|
238
238
|
customContent: f
|
|
239
239
|
}) {
|
|
240
240
|
return f ? /* @__PURE__ */ t(ee, { children: f }) : /* @__PURE__ */ b("div", { className: "flex flex-col items-center justify-center py-[var(--space-2xl)] text-center", children: [
|
|
241
|
-
/* @__PURE__ */ t("p", { className: "text-body-medium-md text-[var(--color-text-primary)]", children:
|
|
241
|
+
/* @__PURE__ */ t("p", { className: "text-body-medium-md text-[var(--color-text-primary)]", children: n }),
|
|
242
242
|
i && /* @__PURE__ */ t("p", { className: "text-body-sm text-[var(--color-text-secondary)] mt-[var(--space-xs)]", children: i }),
|
|
243
243
|
a && /* @__PURE__ */ t(
|
|
244
244
|
Pe,
|
|
@@ -252,13 +252,13 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
252
252
|
)
|
|
253
253
|
] });
|
|
254
254
|
}), eo = /* @__PURE__ */ l.memo(function({
|
|
255
|
-
error:
|
|
255
|
+
error: n,
|
|
256
256
|
onRetry: i,
|
|
257
257
|
customContent: a
|
|
258
258
|
}) {
|
|
259
259
|
return a ? /* @__PURE__ */ t(ee, { children: a }) : /* @__PURE__ */ b("div", { className: "flex flex-col items-center justify-center py-[var(--space-2xl)] text-center", children: [
|
|
260
260
|
/* @__PURE__ */ t("p", { className: "text-body-medium-md text-[var(--color-text-primary)]", children: "Something went wrong" }),
|
|
261
|
-
/* @__PURE__ */ t("p", { className: "text-body-sm text-[var(--color-text-secondary)] mt-[var(--space-xs)]", children:
|
|
261
|
+
/* @__PURE__ */ t("p", { className: "text-body-sm text-[var(--color-text-secondary)] mt-[var(--space-xs)]", children: n?.message || "An error occurred while loading data" }),
|
|
262
262
|
i && /* @__PURE__ */ t(
|
|
263
263
|
Pe,
|
|
264
264
|
{
|
|
@@ -273,7 +273,7 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
273
273
|
}), to = /* @__PURE__ */ l.memo(function() {
|
|
274
274
|
return /* @__PURE__ */ t("div", { className: "absolute top-0 left-0 right-0 h-[2px] overflow-hidden", children: /* @__PURE__ */ t("div", { className: "h-full w-full bg-[var(--color-background-brand)] animate-pulse" }) });
|
|
275
275
|
}), ro = /* @__PURE__ */ l.memo(function({
|
|
276
|
-
table:
|
|
276
|
+
table: n,
|
|
277
277
|
searchKey: i,
|
|
278
278
|
searchPlaceholder: a = "Search...",
|
|
279
279
|
enableGlobalSearch: f = !1,
|
|
@@ -287,11 +287,11 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
287
287
|
autocompleteSuggestions: T = [],
|
|
288
288
|
autocompleteMinCharacters: C = 2
|
|
289
289
|
}) {
|
|
290
|
-
const A =
|
|
290
|
+
const A = n.getState().columnFilters.length > 0 || f && y.length > 0;
|
|
291
291
|
return /* @__PURE__ */ b("div", { className: "flex items-center justify-between", children: [
|
|
292
292
|
/* @__PURE__ */ b("div", { className: "flex flex-1 items-center space-x-2", children: [
|
|
293
293
|
f && h && /* @__PURE__ */ t(ee, { children: D && T.length > 0 ? /* @__PURE__ */ t(
|
|
294
|
-
|
|
294
|
+
Dn,
|
|
295
295
|
{
|
|
296
296
|
value: y,
|
|
297
297
|
onValueChange: h,
|
|
@@ -314,19 +314,19 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
314
314
|
ft,
|
|
315
315
|
{
|
|
316
316
|
placeholder: a,
|
|
317
|
-
value:
|
|
318
|
-
onChange: (M) =>
|
|
317
|
+
value: n.getColumn(i)?.getFilterValue() ?? "",
|
|
318
|
+
onChange: (M) => n.getColumn(i)?.setFilterValue(M.target.value),
|
|
319
319
|
className: "h-8 w-[150px] lg:w-[250px]"
|
|
320
320
|
}
|
|
321
321
|
),
|
|
322
|
-
|
|
323
|
-
p && /* @__PURE__ */ t(
|
|
322
|
+
n.getAllColumns().filter((M) => M.getCanFilter() && M.columnDef.meta?.filterVariant).map((M) => /* @__PURE__ */ t(no, { column: M }, M.id)),
|
|
323
|
+
p && /* @__PURE__ */ t(so, { table: n }),
|
|
324
324
|
A && /* @__PURE__ */ b(
|
|
325
325
|
Pe,
|
|
326
326
|
{
|
|
327
327
|
variant: "ghost",
|
|
328
328
|
onClick: () => {
|
|
329
|
-
|
|
329
|
+
n.resetColumnFilters(), f && h && h("");
|
|
330
330
|
},
|
|
331
331
|
className: "h-8 px-2 lg:px-3",
|
|
332
332
|
children: [
|
|
@@ -336,10 +336,10 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
336
336
|
}
|
|
337
337
|
)
|
|
338
338
|
] }),
|
|
339
|
-
R && /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ t(qr, { table:
|
|
339
|
+
R && /* @__PURE__ */ t("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ t(qr, { table: n, enableGrouping: v }) })
|
|
340
340
|
] });
|
|
341
|
-
}),
|
|
342
|
-
const [i, a] = l.useState([]), f =
|
|
341
|
+
}), so = /* @__PURE__ */ l.memo(function({ table: n }) {
|
|
342
|
+
const [i, a] = l.useState([]), f = n.getAllColumns().filter(
|
|
343
343
|
(h) => h.columnDef.meta?.filterOptions && h.getCanFilter()
|
|
344
344
|
), x = l.useMemo(() => {
|
|
345
345
|
const h = /* @__PURE__ */ new Map();
|
|
@@ -372,11 +372,11 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
372
372
|
};
|
|
373
373
|
return x.length === 0 ? null : /* @__PURE__ */ b($r, { children: [
|
|
374
374
|
/* @__PURE__ */ t(jr, { asChild: !0, children: /* @__PURE__ */ b(Pe, { variant: "ghost", size: "s", className: "h-8 border-dashed", children: [
|
|
375
|
-
/* @__PURE__ */ t(W, { name:
|
|
375
|
+
/* @__PURE__ */ t(W, { name: An, className: "mr-2 h-4 w-4" }),
|
|
376
376
|
"Global Faceting",
|
|
377
377
|
i.length > 0 && /* @__PURE__ */ b(ee, { children: [
|
|
378
378
|
/* @__PURE__ */ t("div", { className: "mx-2 h-4 w-px bg-[var(--color-border-primary)]" }),
|
|
379
|
-
/* @__PURE__ */ b(xe, { className: "rounded-s px-1 font-normal", children: [
|
|
379
|
+
/* @__PURE__ */ b(xe, { className: "rounded-[var(--border-radius-s)] px-1 font-normal", children: [
|
|
380
380
|
i.length,
|
|
381
381
|
" selected"
|
|
382
382
|
] })
|
|
@@ -412,17 +412,17 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
412
412
|
] })
|
|
413
413
|
] }) })
|
|
414
414
|
] });
|
|
415
|
-
}),
|
|
416
|
-
const { filterVariant: i, filterOptions: a, label: f, placeholder: x } =
|
|
415
|
+
}), no = /* @__PURE__ */ l.memo(function({ column: n }) {
|
|
416
|
+
const { filterVariant: i, filterOptions: a, label: f, placeholder: x } = n.columnDef.meta || {}, y = n.getFilterValue(), h = n.getFacetedUniqueValues();
|
|
417
417
|
if (i === "select" && a)
|
|
418
418
|
return /* @__PURE__ */ b(
|
|
419
|
-
|
|
419
|
+
Tn,
|
|
420
420
|
{
|
|
421
421
|
value: y || "all",
|
|
422
|
-
onValueChange: (p) =>
|
|
422
|
+
onValueChange: (p) => n.setFilterValue(p === "all" ? "" : p),
|
|
423
423
|
children: [
|
|
424
|
-
/* @__PURE__ */ t(
|
|
425
|
-
/* @__PURE__ */ b(
|
|
424
|
+
/* @__PURE__ */ t(Pn, { className: "h-8 w-[150px]", children: /* @__PURE__ */ t(Mn, { placeholder: x || `Filter ${f}` }) }),
|
|
425
|
+
/* @__PURE__ */ b(Vn, { children: [
|
|
426
426
|
/* @__PURE__ */ b(Nr, { value: "all", children: [
|
|
427
427
|
"All ",
|
|
428
428
|
f
|
|
@@ -445,15 +445,15 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
445
445
|
const p = y || [];
|
|
446
446
|
return /* @__PURE__ */ b($r, { children: [
|
|
447
447
|
/* @__PURE__ */ t(jr, { asChild: !0, children: /* @__PURE__ */ b(Pe, { variant: "ghost", size: "s", className: "h-8 border-dashed", children: [
|
|
448
|
-
/* @__PURE__ */ t(W, { name:
|
|
448
|
+
/* @__PURE__ */ t(W, { name: Fn, className: "mr-2 h-4 w-4" }),
|
|
449
449
|
f,
|
|
450
450
|
p.length > 0 && /* @__PURE__ */ b(ee, { children: [
|
|
451
451
|
/* @__PURE__ */ t("div", { className: "mx-2 h-4 w-px bg-[var(--color-border-primary)]" }),
|
|
452
|
-
/* @__PURE__ */ t(xe, { className: "rounded-s px-1 font-normal lg:hidden", children: p.length }),
|
|
453
|
-
/* @__PURE__ */ t("div", { className: "hidden space-x-1 lg:flex", children: p.length > 2 ? /* @__PURE__ */ b(xe, { className: "rounded-s px-1 font-normal", children: [
|
|
452
|
+
/* @__PURE__ */ t(xe, { className: "rounded-[var(--border-radius-s)] px-1 font-normal lg:hidden", children: p.length }),
|
|
453
|
+
/* @__PURE__ */ t("div", { className: "hidden space-x-1 lg:flex", children: p.length > 2 ? /* @__PURE__ */ b(xe, { className: "rounded-[var(--border-radius-s)] px-1 font-normal", children: [
|
|
454
454
|
p.length,
|
|
455
455
|
" selected"
|
|
456
|
-
] }) : a.filter((v) => p.includes(v.value)).map((v) => /* @__PURE__ */ t(xe, { className: "rounded-s px-1 font-normal", children: v.label }, v.value)) })
|
|
456
|
+
] }) : a.filter((v) => p.includes(v.value)).map((v) => /* @__PURE__ */ t(xe, { className: "rounded-[var(--border-radius-s)] px-1 font-normal", children: v.label }, v.value)) })
|
|
457
457
|
] })
|
|
458
458
|
] }) }),
|
|
459
459
|
/* @__PURE__ */ t(Ar, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ b(Lr, { children: [
|
|
@@ -467,7 +467,7 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
467
467
|
{
|
|
468
468
|
onSelect: () => {
|
|
469
469
|
const T = R ? p.filter((C) => C !== v.value) : [...p, v.value];
|
|
470
|
-
|
|
470
|
+
n.setFilterValue(T.length ? T : void 0);
|
|
471
471
|
},
|
|
472
472
|
children: /* @__PURE__ */ b("div", { className: "flex items-center justify-between flex-1", children: [
|
|
473
473
|
/* @__PURE__ */ b("div", { className: "flex items-center gap-2", children: [
|
|
@@ -490,7 +490,7 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
490
490
|
{
|
|
491
491
|
placeholder: x || `Filter ${f}...`,
|
|
492
492
|
value: y || "",
|
|
493
|
-
onChange: (p) =>
|
|
493
|
+
onChange: (p) => n.setFilterValue(p.target.value),
|
|
494
494
|
className: "h-8 w-[150px]",
|
|
495
495
|
type: "number"
|
|
496
496
|
}
|
|
@@ -499,11 +499,11 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
499
499
|
{
|
|
500
500
|
placeholder: x || `Filter ${f}...`,
|
|
501
501
|
value: y || "",
|
|
502
|
-
onChange: (p) =>
|
|
502
|
+
onChange: (p) => n.setFilterValue(p.target.value),
|
|
503
503
|
className: "h-8 w-[150px]"
|
|
504
504
|
}
|
|
505
505
|
);
|
|
506
|
-
}), oo = /* @__PURE__ */ l.memo(function({ header:
|
|
506
|
+
}), oo = /* @__PURE__ */ l.memo(function({ header: n, enableColumnOrdering: i, children: a }) {
|
|
507
507
|
const {
|
|
508
508
|
attributes: f,
|
|
509
509
|
listeners: x,
|
|
@@ -511,11 +511,11 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
511
511
|
transform: h,
|
|
512
512
|
transition: p,
|
|
513
513
|
isDragging: v
|
|
514
|
-
} =
|
|
515
|
-
id:
|
|
514
|
+
} = In({
|
|
515
|
+
id: n.id,
|
|
516
516
|
disabled: !i
|
|
517
517
|
}), R = {
|
|
518
|
-
transform:
|
|
518
|
+
transform: En.Translate.toString(h),
|
|
519
519
|
// Only translate, no scale
|
|
520
520
|
transition: p,
|
|
521
521
|
opacity: v ? 0.5 : 1
|
|
@@ -534,13 +534,13 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
534
534
|
i && /* @__PURE__ */ t(
|
|
535
535
|
"div",
|
|
536
536
|
{
|
|
537
|
-
className: "ml-2 p-1 !cursor-grab active:!cursor-grabbing hover:bg-[var(--color-background-neutral-subtlest-hovered)] rounded-s transition-colors",
|
|
537
|
+
className: "ml-2 p-1 !cursor-grab active:!cursor-grabbing hover:bg-[var(--color-background-neutral-subtlest-hovered)] rounded-[var(--border-radius-s)] transition-colors",
|
|
538
538
|
...f,
|
|
539
539
|
...x,
|
|
540
540
|
children: /* @__PURE__ */ t(
|
|
541
541
|
W,
|
|
542
542
|
{
|
|
543
|
-
name: $
|
|
543
|
+
name: $n,
|
|
544
544
|
className: "h-3 w-3 text-[var(--color-text-tertiary)]"
|
|
545
545
|
}
|
|
546
546
|
)
|
|
@@ -549,48 +549,48 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
549
549
|
]
|
|
550
550
|
}
|
|
551
551
|
) : /* @__PURE__ */ t(ee, { children: a });
|
|
552
|
-
}), qr = /* @__PURE__ */ l.memo(function({ table:
|
|
553
|
-
const a =
|
|
552
|
+
}), qr = /* @__PURE__ */ l.memo(function({ table: n, enableGrouping: i = !1 }) {
|
|
553
|
+
const a = n.getAllColumns().filter((N) => N.getCanSort()).map((N) => ({
|
|
554
554
|
id: N.id,
|
|
555
555
|
label: N.columnDef.meta?.label || N.columnDef.header || N.id
|
|
556
|
-
})), f =
|
|
556
|
+
})), f = n.getAllColumns().filter((N) => N.getCanGroup?.() || N.columnDef.enableGrouping).map((N) => ({
|
|
557
557
|
id: N.id,
|
|
558
558
|
label: N.columnDef.meta?.label || N.columnDef.header || N.id
|
|
559
|
-
})), x =
|
|
559
|
+
})), x = n.getAllColumns().filter((N) => typeof N.accessorFn < "u" && N.getCanHide()).map((N) => ({
|
|
560
560
|
id: N.id,
|
|
561
561
|
label: N.columnDef.meta?.label || N.columnDef.header || N.id
|
|
562
|
-
})), y = x.filter((N) =>
|
|
562
|
+
})), y = x.filter((N) => n.getColumn(N.id)?.getIsVisible()).map((N) => N.id), h = n.getState().sorting[0], p = h?.id, v = h?.desc ? "desc" : "asc", D = n.getState().grouping[0] || "";
|
|
563
563
|
return /* @__PURE__ */ t(
|
|
564
|
-
|
|
564
|
+
On,
|
|
565
565
|
{
|
|
566
566
|
sortableColumns: a,
|
|
567
567
|
selectedSortColumn: p,
|
|
568
568
|
sortDirection: v,
|
|
569
569
|
onSortChange: (N) => {
|
|
570
|
-
|
|
570
|
+
n.setSorting([{ id: N, desc: v === "desc" }]);
|
|
571
571
|
},
|
|
572
572
|
onSortDirectionChange: (N) => {
|
|
573
|
-
h &&
|
|
573
|
+
h && n.setSorting([{ id: h.id, desc: N === "desc" }]);
|
|
574
574
|
},
|
|
575
575
|
groupableColumns: i ? f : [],
|
|
576
576
|
selectedGroupColumn: D,
|
|
577
577
|
onGroupChange: (N) => {
|
|
578
|
-
!N || N === "none" ?
|
|
578
|
+
!N || N === "none" ? n.setGrouping([]) : n.setGrouping([N]);
|
|
579
579
|
},
|
|
580
580
|
columns: x,
|
|
581
581
|
visibleColumns: y,
|
|
582
582
|
onColumnVisibilityChange: (N, Ue) => {
|
|
583
|
-
|
|
583
|
+
n.getColumn(N)?.toggleVisibility(Ue);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
);
|
|
587
587
|
}), Fo = /* @__PURE__ */ l.memo(function({
|
|
588
|
-
column:
|
|
588
|
+
column: n,
|
|
589
589
|
title: i,
|
|
590
590
|
className: a
|
|
591
591
|
}) {
|
|
592
|
-
const f =
|
|
593
|
-
return
|
|
592
|
+
const f = n.columnDef.meta?.align || "left", x = n.columnDef.meta?.truncate !== !1, y = n.getIsSorted();
|
|
593
|
+
return n.getCanSort() ? /* @__PURE__ */ b(
|
|
594
594
|
"div",
|
|
595
595
|
{
|
|
596
596
|
className: V(
|
|
@@ -612,7 +612,7 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
612
612
|
}
|
|
613
613
|
) : x ? /* @__PURE__ */ t(Te, { align: f, children: /* @__PURE__ */ t("div", { className: V(f === "right" ? "text-right" : "text-left", a), children: i }) }) : /* @__PURE__ */ t("div", { className: V(f === "right" ? "text-right" : "text-left", a), children: i });
|
|
614
614
|
}), ao = /* @__PURE__ */ l.memo(function({
|
|
615
|
-
table:
|
|
615
|
+
table: n,
|
|
616
616
|
enableGrouping: i = !1,
|
|
617
617
|
hideChildrenForSingleItemGroups: a = {},
|
|
618
618
|
footerLabel: f,
|
|
@@ -621,10 +621,10 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
621
621
|
paginationVariant: h = "full",
|
|
622
622
|
pageSizeOptions: p = [10, 25, 50, 100]
|
|
623
623
|
}) {
|
|
624
|
-
const v =
|
|
625
|
-
|
|
624
|
+
const v = n.getState().pagination.pageIndex + 1, R = n.getState().pagination.pageSize, D = i && !n.options.manualPagination ? n.getPrePaginationRowModel().rows.filter((M) => M.depth === 0).length : n.getRowCount(), T = n.getFilteredSelectedRowModel().rows.length, C = (M) => {
|
|
625
|
+
n.setPageIndex(M - 1);
|
|
626
626
|
}, A = (M) => {
|
|
627
|
-
|
|
627
|
+
n.setPageSize(M);
|
|
628
628
|
};
|
|
629
629
|
return /* @__PURE__ */ b("div", { className: "flex items-center justify-between", children: [
|
|
630
630
|
/* @__PURE__ */ t("div", { className: "flex-1 text-body-sm text-[var(--color-text-secondary)]", children: f ? /* @__PURE__ */ b("div", { className: "flex items-center gap-[var(--space-m)]", children: [
|
|
@@ -643,7 +643,7 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
643
643
|
" row(s) selected."
|
|
644
644
|
] }) }),
|
|
645
645
|
/* @__PURE__ */ t(
|
|
646
|
-
|
|
646
|
+
Ln,
|
|
647
647
|
{
|
|
648
648
|
variant: h,
|
|
649
649
|
currentPage: v,
|
|
@@ -658,7 +658,7 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
658
658
|
)
|
|
659
659
|
] });
|
|
660
660
|
}), lo = /* @__PURE__ */ l.memo(function({
|
|
661
|
-
onLoadMore:
|
|
661
|
+
onLoadMore: n,
|
|
662
662
|
isLoading: i
|
|
663
663
|
}) {
|
|
664
664
|
const a = l.useRef(null);
|
|
@@ -667,12 +667,12 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
667
667
|
if (!f || i) return;
|
|
668
668
|
const x = new IntersectionObserver(
|
|
669
669
|
(y) => {
|
|
670
|
-
y[0].isIntersecting &&
|
|
670
|
+
y[0].isIntersecting && n();
|
|
671
671
|
},
|
|
672
672
|
{ threshold: 0.1 }
|
|
673
673
|
);
|
|
674
674
|
return x.observe(f), () => x.disconnect();
|
|
675
|
-
}, [
|
|
675
|
+
}, [n, i]), /* @__PURE__ */ t(
|
|
676
676
|
"div",
|
|
677
677
|
{
|
|
678
678
|
ref: a,
|
|
@@ -682,16 +682,16 @@ const Ys = /* @__PURE__ */ l.memo(function({
|
|
|
682
682
|
);
|
|
683
683
|
});
|
|
684
684
|
function io(c) {
|
|
685
|
-
let
|
|
685
|
+
let n = 0;
|
|
686
686
|
const i = (a, f) => {
|
|
687
687
|
a.forEach((x) => {
|
|
688
|
-
x.depth >
|
|
688
|
+
x.depth > n && (n = x.depth), x.subRows && x.subRows.length > 0 && i(x.subRows);
|
|
689
689
|
});
|
|
690
690
|
};
|
|
691
|
-
return i(c),
|
|
691
|
+
return i(c), n;
|
|
692
692
|
}
|
|
693
|
-
function Vr(c,
|
|
694
|
-
const { enableGrouping: i, enableExpanding: a, nestedRowStyling: f, expandingRowColors: x, maxDepth: y } =
|
|
693
|
+
function Vr(c, n) {
|
|
694
|
+
const { enableGrouping: i, enableExpanding: a, nestedRowStyling: f, expandingRowColors: x, maxDepth: y } = n, h = c.depth, p = c.getIsGrouped?.(), v = c.getIsExpanded(), R = c.subRows && c.subRows.length > 0, D = R ? v ? "expanded" : "collapsed" : "leaf", T = () => {
|
|
695
695
|
let C = c;
|
|
696
696
|
for (; C; ) {
|
|
697
697
|
if (C.getIsExpanded()) return !0;
|
|
@@ -727,21 +727,21 @@ function Vr(c, s) {
|
|
|
727
727
|
}
|
|
728
728
|
return p ? v ? "var(--blue-50)" : "var(--color-background-neutral-subtlest)" : i && h === 1 ? "var(--blue-25)" : a && !p ? h === 0 && (!R || !T()) ? "" : (y - h) % 2 === 0 ? "var(--blue-25)" : "var(--blue-50)" : "";
|
|
729
729
|
}
|
|
730
|
-
function co(c,
|
|
731
|
-
if (
|
|
732
|
-
if (
|
|
733
|
-
return
|
|
734
|
-
if (
|
|
735
|
-
return
|
|
730
|
+
function co(c, n) {
|
|
731
|
+
if (n) {
|
|
732
|
+
if (n.heights && n.heights[c] !== void 0)
|
|
733
|
+
return n.heights[c];
|
|
734
|
+
if (n.defaultHeight)
|
|
735
|
+
return n.defaultHeight;
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
function Fr(c,
|
|
738
|
+
function Fr(c, n, i, a, f, x) {
|
|
739
739
|
const y = c.groupingColumnId, h = f[y] ?? !1, p = x[y] ?? !1, R = h && p && c.subRows.length <= 1 ? null : c.subRows.length > 1 ? /* @__PURE__ */ t(
|
|
740
740
|
"button",
|
|
741
741
|
{
|
|
742
742
|
tabIndex: -1,
|
|
743
743
|
onClick: c.getToggleExpandedHandler(),
|
|
744
|
-
className: "flex h-[var(--size-s)] w-[var(--size-s)] cursor-pointer items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
744
|
+
className: "flex h-[var(--size-s)] w-[var(--size-s)] cursor-pointer items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
745
745
|
children: /* @__PURE__ */ t(
|
|
746
746
|
W,
|
|
747
747
|
{
|
|
@@ -755,7 +755,7 @@ function Fr(c, s, i, a, f, x) {
|
|
|
755
755
|
/* @__PURE__ */ t("div", { className: "h-[var(--size-s)] w-[var(--size-s)]" })
|
|
756
756
|
), D = c.subRows.length > 1 ? /* @__PURE__ */ t(xe, { appearance: "subtle", size: "s", truncate: !1, children: c.subRows.length }) : null;
|
|
757
757
|
if (i) {
|
|
758
|
-
const T =
|
|
758
|
+
const T = n.getAllColumns().find((C) => C.id === i);
|
|
759
759
|
if (T) {
|
|
760
760
|
const C = T.columnDef;
|
|
761
761
|
if (C.aggregatedCell) {
|
|
@@ -789,7 +789,7 @@ function Fr(c, s, i, a, f, x) {
|
|
|
789
789
|
}
|
|
790
790
|
function $o({
|
|
791
791
|
columns: c,
|
|
792
|
-
data:
|
|
792
|
+
data: n,
|
|
793
793
|
searchKey: i,
|
|
794
794
|
searchPlaceholder: a,
|
|
795
795
|
title: f,
|
|
@@ -830,39 +830,39 @@ function $o({
|
|
|
830
830
|
hideExpanderForSingleItemGroups: Ft = {},
|
|
831
831
|
enableRowPinning: Ee = !1,
|
|
832
832
|
keepPinnedRows: $t = !0,
|
|
833
|
-
enableVirtualization:
|
|
833
|
+
enableVirtualization: es = !1,
|
|
834
834
|
// virtualContainerHeight = 600,
|
|
835
835
|
// virtualRowHeight = 40,
|
|
836
836
|
// virtualOverscan = 10,
|
|
837
837
|
nestedHeaders: Qe = [],
|
|
838
|
-
enableNestedHeaders:
|
|
838
|
+
enableNestedHeaders: ts = !1,
|
|
839
839
|
enableColumnOrdering: Ye = !1,
|
|
840
840
|
enableRowSelection: fe = !1,
|
|
841
841
|
showHeader: Me = !0,
|
|
842
842
|
showPagination: vt = !0,
|
|
843
|
-
paginationVariant:
|
|
844
|
-
pageSizeOptions:
|
|
845
|
-
footerLabel:
|
|
843
|
+
paginationVariant: rs = "full",
|
|
844
|
+
pageSizeOptions: ss = [10, 25, 50, 100],
|
|
845
|
+
footerLabel: ns,
|
|
846
846
|
onTableReady: bt,
|
|
847
847
|
initialState: Ve,
|
|
848
848
|
// Controlled state props
|
|
849
849
|
sorting: jt,
|
|
850
|
-
onSortingChange:
|
|
850
|
+
onSortingChange: os,
|
|
851
851
|
columnVisibility: At,
|
|
852
|
-
onColumnVisibilityChange:
|
|
852
|
+
onColumnVisibilityChange: as,
|
|
853
853
|
grouping: Lt,
|
|
854
|
-
onGroupingChange:
|
|
854
|
+
onGroupingChange: ls,
|
|
855
855
|
columnOrder: Ot,
|
|
856
|
-
onColumnOrderChange:
|
|
856
|
+
onColumnOrderChange: is,
|
|
857
857
|
columnSizing: xt,
|
|
858
|
-
onColumnSizingChange:
|
|
858
|
+
onColumnSizingChange: cs,
|
|
859
859
|
pagination: Ht,
|
|
860
|
-
onPaginationChange:
|
|
860
|
+
onPaginationChange: ds,
|
|
861
861
|
expanded: Ce,
|
|
862
862
|
onExpandedChange: yt,
|
|
863
863
|
renderSectionHeaderRow: Wt,
|
|
864
864
|
renderSubComponent: J,
|
|
865
|
-
getRowCanExpand:
|
|
865
|
+
getRowCanExpand: us,
|
|
866
866
|
autoExpandChildren: Gt = !1,
|
|
867
867
|
// Row click props
|
|
868
868
|
onRowClick: K,
|
|
@@ -876,49 +876,49 @@ function $o({
|
|
|
876
876
|
onActiveRowChange: Ut,
|
|
877
877
|
// Callback props
|
|
878
878
|
onRowSelectionChange: wt,
|
|
879
|
-
onNextPageHover:
|
|
880
|
-
onPreviousPageHover:
|
|
879
|
+
onNextPageHover: fs,
|
|
880
|
+
onPreviousPageHover: gs,
|
|
881
881
|
onRowUpdate: uo,
|
|
882
882
|
// Infinite scroll props
|
|
883
883
|
onLoadMore: Jt,
|
|
884
|
-
hasMoreData:
|
|
885
|
-
isLoadingMore:
|
|
884
|
+
hasMoreData: ms,
|
|
885
|
+
isLoadingMore: hs,
|
|
886
886
|
// Error handling props
|
|
887
887
|
error: Kt,
|
|
888
|
-
onRetry:
|
|
889
|
-
errorComponent:
|
|
888
|
+
onRetry: ps,
|
|
889
|
+
errorComponent: vs,
|
|
890
890
|
// Empty state props
|
|
891
|
-
emptyState:
|
|
892
|
-
emptyStateTitle:
|
|
893
|
-
emptyStateDescription:
|
|
894
|
-
emptyStateAction:
|
|
891
|
+
emptyState: bs,
|
|
892
|
+
emptyStateTitle: xs = "No data",
|
|
893
|
+
emptyStateDescription: ys = "No items to display",
|
|
894
|
+
emptyStateAction: Cs,
|
|
895
895
|
// No results state props
|
|
896
|
-
noResultsState:
|
|
897
|
-
noResultsTitle:
|
|
898
|
-
noResultsDescription:
|
|
899
|
-
noResultsAction:
|
|
896
|
+
noResultsState: ws,
|
|
897
|
+
noResultsTitle: Ss = "No results found",
|
|
898
|
+
noResultsDescription: Ns = "Try adjusting your search or filters",
|
|
899
|
+
noResultsAction: Rs,
|
|
900
900
|
// Refetching props
|
|
901
|
-
isRefetching:
|
|
901
|
+
isRefetching: Is = !1,
|
|
902
902
|
// Server-side mode props
|
|
903
903
|
manualSorting: Xt = !1,
|
|
904
904
|
manualFiltering: Qt = !1,
|
|
905
905
|
manualPagination: et = !1,
|
|
906
|
-
rowCount:
|
|
906
|
+
rowCount: Es,
|
|
907
907
|
// Server-side expansion props
|
|
908
908
|
manualExpanding: Yt = !1,
|
|
909
909
|
onLoadChildren: tt,
|
|
910
910
|
expandingRowsLoading: rt,
|
|
911
|
-
subComponentLoading:
|
|
911
|
+
subComponentLoading: st,
|
|
912
912
|
onSubComponentLoad: De,
|
|
913
913
|
// Server-side error handling props
|
|
914
914
|
expandingRowsError: fo,
|
|
915
915
|
subComponentError: Zt,
|
|
916
916
|
onExpandError: $e
|
|
917
917
|
}) {
|
|
918
|
-
const
|
|
918
|
+
const nt = D || !!(v && v > 0) || !!(R && R > 0), [Ds, ks] = l.useState([]), [zs, Bs] = l.useState({}), [Ts, Ps] = l.useState(Ve?.grouping || []), [Ms, Vs] = l.useState(() => {
|
|
919
919
|
const e = c.map((r) => r.id || r.accessorKey || `column-${Math.random()}`);
|
|
920
920
|
return fe ? ["select", ...e] : e;
|
|
921
|
-
}), [
|
|
921
|
+
}), [Fs, $s] = l.useState(xt || Ve?.columnSizing || {}), [js, As] = l.useState(() => {
|
|
922
922
|
if (ht && Y) {
|
|
923
923
|
const e = localStorage.getItem(`${Y}-pagination`);
|
|
924
924
|
if (e)
|
|
@@ -931,7 +931,7 @@ function $o({
|
|
|
931
931
|
}
|
|
932
932
|
}
|
|
933
933
|
return Ve?.pagination || { pageIndex: 0, pageSize: 10 };
|
|
934
|
-
}), [er,
|
|
934
|
+
}), [er, Ls] = l.useState([]), [ke, Os] = l.useState({}), [St, tr] = l.useState(""), [Hs, rr] = l.useState(Ve?.expanded || {}), [Ws, Gs] = l.useState(Ve?.rowPinning || { top: [], bottom: [] }), [_s, ot] = l.useState(""), [X, Nt] = l.useState([-1, 0]), Rt = l.useRef(null), je = l.useRef(/* @__PURE__ */ new Map()), Ae = l.useRef(/* @__PURE__ */ new Map());
|
|
935
935
|
l.useEffect(() => () => {
|
|
936
936
|
je.current.forEach((e) => e.abort()), Ae.current.forEach((e) => e.abort());
|
|
937
937
|
}, []), l.useEffect(() => {
|
|
@@ -939,7 +939,7 @@ function $o({
|
|
|
939
939
|
}, [ke, wt]), l.useEffect(() => {
|
|
940
940
|
Ut?.(Fe);
|
|
941
941
|
}, [Fe, Ut]);
|
|
942
|
-
const
|
|
942
|
+
const sr = jt !== void 0, nr = At !== void 0, or = Lt !== void 0, ar = Ot !== void 0, lr = xt !== void 0, ir = Ht !== void 0, It = Ce !== void 0, ge = sr ? jt : Ds, qs = nr ? At : zs, me = or ? Lt : Ts, Le = ar ? Ot : Ms, at = lr ? xt : Fs, re = ir ? Ht : js, Q = It ? Ce : Hs, Us = sr ? os : ks, Js = nr ? as : Bs, Ks = or ? ls : Ps, cr = ar ? is : Vs, dr = lr ? cs : $s, Xs = ir ? ds : As, Et = l.useCallback(
|
|
943
943
|
(e) => {
|
|
944
944
|
const r = typeof e == "object" && e !== null && !(e instanceof Function) && Object.keys(e).length === 0;
|
|
945
945
|
if (It && yt) {
|
|
@@ -947,26 +947,26 @@ function $o({
|
|
|
947
947
|
return;
|
|
948
948
|
yt(e);
|
|
949
949
|
} else
|
|
950
|
-
rr(r ? (
|
|
950
|
+
rr(r ? (s) => s === !0 || typeof s == "object" && s !== null && Object.keys(s).length > 0 ? s : e : e);
|
|
951
951
|
},
|
|
952
952
|
[It, yt, Ce]
|
|
953
|
-
),
|
|
953
|
+
), Qs = l.useMemo(() => N !== void 0 && N !== 10 ? N : re.pageSize, [N, re.pageSize]), L = qn(St, 300), Ys = l.useMemo(() => {
|
|
954
954
|
if (!mt || !ie)
|
|
955
955
|
return [];
|
|
956
956
|
const e = /* @__PURE__ */ new Set();
|
|
957
|
-
return
|
|
958
|
-
Je && Je.length > 0 ? Je.forEach((
|
|
959
|
-
const u = r[
|
|
957
|
+
return n.forEach((r) => {
|
|
958
|
+
Je && Je.length > 0 ? Je.forEach((s) => {
|
|
959
|
+
const u = r[s];
|
|
960
960
|
u != null && String(u).trim() !== "" && e.add(String(u));
|
|
961
|
-
}) : Object.values(r).forEach((
|
|
962
|
-
|
|
961
|
+
}) : Object.values(r).forEach((s) => {
|
|
962
|
+
s != null && String(s).trim() !== "" && e.add(String(s));
|
|
963
963
|
});
|
|
964
964
|
}), Array.from(e).sort();
|
|
965
|
-
}, [
|
|
965
|
+
}, [n, Je, mt, ie]), ur = l.useCallback((e, r, s) => {
|
|
966
966
|
if (!e || !r || r.length === 0)
|
|
967
967
|
return () => !0;
|
|
968
968
|
const u = e.toLowerCase(), g = /* @__PURE__ */ new Set();
|
|
969
|
-
return
|
|
969
|
+
return s.forEach((m) => {
|
|
970
970
|
let S = !1;
|
|
971
971
|
for (const B in m) {
|
|
972
972
|
const F = m[B];
|
|
@@ -1018,8 +1018,8 @@ function $o({
|
|
|
1018
1018
|
}
|
|
1019
1019
|
}, [Ue]), Dt = l.useCallback((e, r) => {
|
|
1020
1020
|
if (!K) return;
|
|
1021
|
-
const
|
|
1022
|
-
if (!(
|
|
1021
|
+
const s = r.target;
|
|
1022
|
+
if (!(s.tagName === "BUTTON" || s.tagName === "A" || s.tagName === "INPUT" || s.closest("button") || s.closest("a") || s.closest("input")) && !(we && !we(e))) {
|
|
1023
1023
|
if (!we && e.getIsGrouped()) {
|
|
1024
1024
|
const g = e.groupingColumnId;
|
|
1025
1025
|
if (!((ye[g] ?? !1) && e.subRows && e.subRows.length === 1)) return;
|
|
@@ -1030,8 +1030,8 @@ function $o({
|
|
|
1030
1030
|
if (!K) return !1;
|
|
1031
1031
|
if (we) return we(e);
|
|
1032
1032
|
if (!e.getIsGrouped()) return !0;
|
|
1033
|
-
const
|
|
1034
|
-
return (ye[
|
|
1033
|
+
const s = e.groupingColumnId;
|
|
1034
|
+
return (ye[s] ?? !1) && e.subRows && e.subRows.length === 1;
|
|
1035
1035
|
}, [K, we, ye]), fr = (e) => e ? "![box-shadow:inset_3px_0_0_0_var(--color-border-brand-bold),inset_0_-1px_0_0_var(--color-border-primary-medium)]" : "![box-shadow:inset_3px_0_0_0_var(--color-border-brand-bold)]", ze = l.useCallback((e) => {
|
|
1036
1036
|
if (!Fe) return !1;
|
|
1037
1037
|
const r = Ct ? e.id : e.original?.id !== void 0 ? e.original.id : e.id;
|
|
@@ -1040,25 +1040,25 @@ function $o({
|
|
|
1040
1040
|
const e = /* @__PURE__ */ new Set();
|
|
1041
1041
|
return c.forEach((r) => {
|
|
1042
1042
|
if (r.cell) {
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1043
|
+
const s = r.id || r.accessorKey;
|
|
1044
|
+
s && e.add(String(s));
|
|
1045
1045
|
}
|
|
1046
1046
|
}), e;
|
|
1047
1047
|
}, [c]), kt = l.useMemo(() => {
|
|
1048
1048
|
const e = c.map((r) => {
|
|
1049
|
-
let
|
|
1049
|
+
let s = {
|
|
1050
1050
|
...r,
|
|
1051
1051
|
// Set default minimum column width when resizing is enabled
|
|
1052
1052
|
...te && !r.minSize ? { minSize: 80 } : {}
|
|
1053
1053
|
};
|
|
1054
1054
|
return r.enableGrouping || r.meta?.enableGrouping ? {
|
|
1055
|
-
...
|
|
1055
|
+
...s,
|
|
1056
1056
|
enableGrouping: !0,
|
|
1057
1057
|
getGroupingValue: (u) => {
|
|
1058
1058
|
const g = r.accessorKey || r.accessorFn;
|
|
1059
1059
|
return typeof g == "string" && u.original ? u.original[g] : typeof g == "function" && u.original ? g(u.original) : u.getValue?.(r.id) || u[g] || "";
|
|
1060
1060
|
}
|
|
1061
|
-
} :
|
|
1061
|
+
} : s;
|
|
1062
1062
|
});
|
|
1063
1063
|
return fe ? [{
|
|
1064
1064
|
id: "select",
|
|
@@ -1066,21 +1066,21 @@ function $o({
|
|
|
1066
1066
|
minSize: 48,
|
|
1067
1067
|
maxSize: 48,
|
|
1068
1068
|
enableResizing: !1,
|
|
1069
|
-
header: ({ table:
|
|
1069
|
+
header: ({ table: s }) => /* @__PURE__ */ t(
|
|
1070
1070
|
gt,
|
|
1071
1071
|
{
|
|
1072
1072
|
tabIndex: -1,
|
|
1073
|
-
checked:
|
|
1074
|
-
onCheckedChange: (u) =>
|
|
1073
|
+
checked: s.getIsAllPageRowsSelected() || s.getIsSomePageRowsSelected() && "indeterminate",
|
|
1074
|
+
onCheckedChange: (u) => s.toggleAllPageRowsSelected(!!u),
|
|
1075
1075
|
"aria-label": "Select all"
|
|
1076
1076
|
}
|
|
1077
1077
|
),
|
|
1078
|
-
cell: ({ row:
|
|
1078
|
+
cell: ({ row: s }) => /* @__PURE__ */ t(
|
|
1079
1079
|
gt,
|
|
1080
1080
|
{
|
|
1081
1081
|
tabIndex: -1,
|
|
1082
|
-
checked:
|
|
1083
|
-
onCheckedChange: (u) =>
|
|
1082
|
+
checked: s.getIsSelected(),
|
|
1083
|
+
onCheckedChange: (u) => s.toggleSelected(!!u),
|
|
1084
1084
|
"aria-label": "Select row"
|
|
1085
1085
|
}
|
|
1086
1086
|
),
|
|
@@ -1091,24 +1091,24 @@ function $o({
|
|
|
1091
1091
|
label: "Select"
|
|
1092
1092
|
}
|
|
1093
1093
|
}, ...e] : e;
|
|
1094
|
-
}, [c, fe]), zt = l.useMemo(() =>
|
|
1094
|
+
}, [c, fe]), zt = l.useMemo(() => n, [n]), Zs = l.useMemo(() => !Ze || !L ? Dr : ur(L, me, zt), [Ze, L, me, zt, ur]), w = ln({
|
|
1095
1095
|
data: zt,
|
|
1096
1096
|
columns: kt,
|
|
1097
1097
|
getRowId: Ct,
|
|
1098
1098
|
filterFns: {
|
|
1099
1099
|
fuzzy: Dr,
|
|
1100
|
-
multiSelect:
|
|
1100
|
+
multiSelect: Un
|
|
1101
1101
|
},
|
|
1102
1102
|
state: {
|
|
1103
1103
|
sorting: ge,
|
|
1104
1104
|
columnFilters: er,
|
|
1105
|
-
columnVisibility:
|
|
1105
|
+
columnVisibility: qs,
|
|
1106
1106
|
rowSelection: ke,
|
|
1107
1107
|
globalFilter: L,
|
|
1108
1108
|
columnSizing: at,
|
|
1109
1109
|
expanded: Q,
|
|
1110
1110
|
grouping: me,
|
|
1111
|
-
rowPinning:
|
|
1111
|
+
rowPinning: Ws,
|
|
1112
1112
|
columnOrder: Le,
|
|
1113
1113
|
pagination: re
|
|
1114
1114
|
},
|
|
@@ -1116,20 +1116,20 @@ function $o({
|
|
|
1116
1116
|
manualSorting: Xt,
|
|
1117
1117
|
manualFiltering: Qt,
|
|
1118
1118
|
manualPagination: et,
|
|
1119
|
-
rowCount:
|
|
1119
|
+
rowCount: Es,
|
|
1120
1120
|
// Required for server-side pagination
|
|
1121
1121
|
enableRowSelection: fe,
|
|
1122
1122
|
enableColumnPinning: !1,
|
|
1123
1123
|
// Disable TanStack Table pinning - using CSS approach
|
|
1124
1124
|
enableGlobalFilter: ie,
|
|
1125
1125
|
// Enable global filtering
|
|
1126
|
-
globalFilterFn:
|
|
1126
|
+
globalFilterFn: Zs,
|
|
1127
1127
|
// Use group-preserving filter when enabled
|
|
1128
1128
|
enableColumnResizing: te,
|
|
1129
1129
|
columnResizeMode: Xr,
|
|
1130
1130
|
enableExpanding: _,
|
|
1131
1131
|
getSubRows: Qr,
|
|
1132
|
-
getRowCanExpand:
|
|
1132
|
+
getRowCanExpand: us,
|
|
1133
1133
|
paginateExpandedRows: !1,
|
|
1134
1134
|
// Only paginate top-level rows, not expanded children
|
|
1135
1135
|
autoResetPageIndex: !1,
|
|
@@ -1139,46 +1139,46 @@ function $o({
|
|
|
1139
1139
|
manualGrouping: Zr,
|
|
1140
1140
|
enableRowPinning: Ee,
|
|
1141
1141
|
keepPinnedRows: $t,
|
|
1142
|
-
onRowSelectionChange:
|
|
1143
|
-
onSortingChange:
|
|
1144
|
-
onColumnFiltersChange:
|
|
1145
|
-
onColumnVisibilityChange:
|
|
1142
|
+
onRowSelectionChange: Os,
|
|
1143
|
+
onSortingChange: Us,
|
|
1144
|
+
onColumnFiltersChange: Ls,
|
|
1145
|
+
onColumnVisibilityChange: Js,
|
|
1146
1146
|
onGlobalFilterChange: tr,
|
|
1147
1147
|
onColumnSizingChange: dr,
|
|
1148
1148
|
onExpandedChange: Et,
|
|
1149
|
-
onGroupingChange:
|
|
1150
|
-
onRowPinningChange:
|
|
1149
|
+
onGroupingChange: Ks,
|
|
1150
|
+
onRowPinningChange: Gs,
|
|
1151
1151
|
onColumnOrderChange: cr,
|
|
1152
|
-
onPaginationChange:
|
|
1153
|
-
getCoreRowModel:
|
|
1152
|
+
onPaginationChange: Xs,
|
|
1153
|
+
getCoreRowModel: vn(),
|
|
1154
1154
|
// Conditionally include row models based on manual mode
|
|
1155
|
-
getFilteredRowModel: Qt ? void 0 :
|
|
1156
|
-
getPaginationRowModel: et ||
|
|
1157
|
-
getSortedRowModel: Xt ? void 0 :
|
|
1158
|
-
getExpandedRowModel: _ ?
|
|
1159
|
-
getGroupedRowModel: z ?
|
|
1160
|
-
getFacetedRowModel:
|
|
1161
|
-
getFacetedUniqueValues:
|
|
1162
|
-
getFacetedMinMaxValues:
|
|
1155
|
+
getFilteredRowModel: Qt ? void 0 : pn(),
|
|
1156
|
+
getPaginationRowModel: et || es ? void 0 : hn(),
|
|
1157
|
+
getSortedRowModel: Xt ? void 0 : mn(),
|
|
1158
|
+
getExpandedRowModel: _ ? gn() : void 0,
|
|
1159
|
+
getGroupedRowModel: z ? fn() : void 0,
|
|
1160
|
+
getFacetedRowModel: un(),
|
|
1161
|
+
getFacetedUniqueValues: dn(),
|
|
1162
|
+
getFacetedMinMaxValues: cn()
|
|
1163
1163
|
}), lt = l.useMemo(
|
|
1164
1164
|
() => io(w.getRowModel().rows),
|
|
1165
1165
|
[w.getRowModel().rows]
|
|
1166
1166
|
), it = l.useMemo(() => {
|
|
1167
1167
|
if (!z) return null;
|
|
1168
1168
|
const e = /* @__PURE__ */ new Map();
|
|
1169
|
-
return w.getGroupedRowModel?.()?.rows?.forEach((
|
|
1170
|
-
|
|
1169
|
+
return w.getGroupedRowModel?.()?.rows?.forEach((s) => {
|
|
1170
|
+
s.subRows && s.subRows.length > 0 && e.set(s.id, s.subRows);
|
|
1171
1171
|
}), e;
|
|
1172
1172
|
}, [z, w]), { flatVisibleRows: ct, rowIdToFlatIndex: mr } = l.useMemo(() => {
|
|
1173
|
-
const e = [], r = /* @__PURE__ */ new Map(),
|
|
1173
|
+
const e = [], r = /* @__PURE__ */ new Map(), s = (g) => {
|
|
1174
1174
|
const m = e.length;
|
|
1175
|
-
e.push(g), r.set(g.id, m), g.getIsExpanded() && (g.subRows && g.subRows.length > 0 ? g.subRows : it?.get(g.id) || []).forEach(
|
|
1175
|
+
e.push(g), r.set(g.id, m), g.getIsExpanded() && (g.subRows && g.subRows.length > 0 ? g.subRows : it?.get(g.id) || []).forEach(s);
|
|
1176
1176
|
};
|
|
1177
|
-
return w.getRowModel().rows.filter((g) => J || g.depth === 0).forEach(
|
|
1177
|
+
return w.getRowModel().rows.filter((g) => J || g.depth === 0).forEach(s), { flatVisibleRows: e, rowIdToFlatIndex: r };
|
|
1178
1178
|
}, [w, Q, it, J]), hr = l.useRef(void 0);
|
|
1179
1179
|
l.useEffect(() => {
|
|
1180
1180
|
if (!z) return;
|
|
1181
|
-
const r = w.getPrePaginationRowModel().rows.filter((g) => g.depth === 0).length,
|
|
1181
|
+
const r = w.getPrePaginationRowModel().rows.filter((g) => g.depth === 0).length, s = re.pageSize, u = Math.max(1, Math.ceil(r / s));
|
|
1182
1182
|
hr.current !== u && (hr.current = u, w.setPageCount(u));
|
|
1183
1183
|
}, [
|
|
1184
1184
|
z,
|
|
@@ -1193,14 +1193,14 @@ function $o({
|
|
|
1193
1193
|
const pr = l.useRef({});
|
|
1194
1194
|
l.useEffect(() => {
|
|
1195
1195
|
if (!Gt) return;
|
|
1196
|
-
const e = w.getState().expanded, r = pr.current,
|
|
1196
|
+
const e = w.getState().expanded, r = pr.current, s = { ...e };
|
|
1197
1197
|
let u = !1;
|
|
1198
1198
|
w.getRowModel().rows.forEach((g) => {
|
|
1199
1199
|
const m = g.id, S = e[m] === !0, B = r[m] === !0;
|
|
1200
1200
|
S && !B && g.subRows && g.subRows.length > 0 && g.subRows.forEach((F) => {
|
|
1201
|
-
e[F.id] !== !0 && (
|
|
1201
|
+
e[F.id] !== !0 && (s[F.id] = !0, u = !0);
|
|
1202
1202
|
});
|
|
1203
|
-
}), pr.current = e, u && Et(
|
|
1203
|
+
}), pr.current = e, u && Et(s);
|
|
1204
1204
|
}, [
|
|
1205
1205
|
Q,
|
|
1206
1206
|
Gt
|
|
@@ -1210,36 +1210,36 @@ function $o({
|
|
|
1210
1210
|
l.useEffect(() => {
|
|
1211
1211
|
if (!tt && !De) return;
|
|
1212
1212
|
const e = w.getState().expanded, r = vr.current;
|
|
1213
|
-
Object.keys(r).forEach((
|
|
1214
|
-
const u = r[
|
|
1213
|
+
Object.keys(r).forEach((s) => {
|
|
1214
|
+
const u = r[s], g = e[s];
|
|
1215
1215
|
if (u && !g) {
|
|
1216
|
-
const m = je.current.get(
|
|
1217
|
-
m && (m.abort(), je.current.delete(
|
|
1218
|
-
const S = Ae.current.get(
|
|
1219
|
-
S && (S.abort(), Ae.current.delete(
|
|
1216
|
+
const m = je.current.get(s);
|
|
1217
|
+
m && (m.abort(), je.current.delete(s));
|
|
1218
|
+
const S = Ae.current.get(s);
|
|
1219
|
+
S && (S.abort(), Ae.current.delete(s));
|
|
1220
1220
|
}
|
|
1221
|
-
}), Object.keys(e).forEach((
|
|
1222
|
-
const u = e[
|
|
1221
|
+
}), Object.keys(e).forEach((s) => {
|
|
1222
|
+
const u = e[s], g = r[s];
|
|
1223
1223
|
if (u && !g) {
|
|
1224
|
-
const m = w.getRow(
|
|
1224
|
+
const m = w.getRow(s);
|
|
1225
1225
|
if (!m) return;
|
|
1226
1226
|
if (tt && Yt) {
|
|
1227
|
-
const S = m.getIsGrouped() || m.subRows && m.subRows.length === 0 && m.getCanExpand(), B = rt?.[
|
|
1227
|
+
const S = m.getIsGrouped() || m.subRows && m.subRows.length === 0 && m.getCanExpand(), B = rt?.[s] === !0, F = m.subRows && m.subRows.length > 0;
|
|
1228
1228
|
if (S && !B && !F) {
|
|
1229
1229
|
const o = new AbortController();
|
|
1230
|
-
je.current.set(
|
|
1230
|
+
je.current.set(s, o), Promise.resolve(tt(m)).catch((P) => {
|
|
1231
1231
|
P?.name !== "AbortError" && $e && $e(m, P, "children");
|
|
1232
1232
|
}).finally(() => {
|
|
1233
|
-
je.current.delete(
|
|
1233
|
+
je.current.delete(s);
|
|
1234
1234
|
});
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
|
-
if (De && J && !m.getIsGrouped() && m.depth === 0 && !(
|
|
1237
|
+
if (De && J && !m.getIsGrouped() && m.depth === 0 && !(st?.[s] === !0)) {
|
|
1238
1238
|
const B = new AbortController();
|
|
1239
|
-
Ae.current.set(
|
|
1239
|
+
Ae.current.set(s, B), Promise.resolve(De(m)).catch((F) => {
|
|
1240
1240
|
F?.name !== "AbortError" && $e && $e(m, F, "subComponent");
|
|
1241
1241
|
}).finally(() => {
|
|
1242
|
-
Ae.current.delete(
|
|
1242
|
+
Ae.current.delete(s);
|
|
1243
1243
|
});
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
@@ -1251,18 +1251,18 @@ function $o({
|
|
|
1251
1251
|
Yt,
|
|
1252
1252
|
J,
|
|
1253
1253
|
rt,
|
|
1254
|
-
|
|
1254
|
+
st,
|
|
1255
1255
|
$e
|
|
1256
1256
|
// NOTE: Deliberately NOT including 'table' to avoid re-running on every render
|
|
1257
1257
|
]), l.useEffect(() => {
|
|
1258
1258
|
if (!Ze || !L || !z)
|
|
1259
1259
|
return;
|
|
1260
1260
|
const e = {};
|
|
1261
|
-
w.getFilteredRowModel().rows.forEach((
|
|
1262
|
-
|
|
1263
|
-
}), Et((
|
|
1264
|
-
const u = Object.keys(
|
|
1265
|
-
return u === g ?
|
|
1261
|
+
w.getFilteredRowModel().rows.forEach((s) => {
|
|
1262
|
+
s.getIsGrouped() && s.subRows && s.subRows.length > 0 && (e[s.id] = !0);
|
|
1263
|
+
}), Et((s) => {
|
|
1264
|
+
const u = Object.keys(s).sort().join(","), g = Object.keys(e).sort().join(",");
|
|
1265
|
+
return u === g ? s : e;
|
|
1266
1266
|
});
|
|
1267
1267
|
}, [L, Ze, z]);
|
|
1268
1268
|
const br = l.useRef(me), xr = l.useRef(ge);
|
|
@@ -1276,8 +1276,8 @@ function $o({
|
|
|
1276
1276
|
if (ge.length > 0) {
|
|
1277
1277
|
const e = ge[0], r = c.find(
|
|
1278
1278
|
(g) => g.id === e.id || g.accessorKey === e.id
|
|
1279
|
-
),
|
|
1280
|
-
ot(`Table sorted by ${
|
|
1279
|
+
), s = r?.meta?.label || r?.header || e.id, u = e.desc ? "descending" : "ascending";
|
|
1280
|
+
ot(`Table sorted by ${s}, ${u}`);
|
|
1281
1281
|
}
|
|
1282
1282
|
}, [ge, c]), l.useEffect(() => {
|
|
1283
1283
|
if (L) {
|
|
@@ -1288,17 +1288,17 @@ function $o({
|
|
|
1288
1288
|
const e = Object.keys(ke).filter((r) => ke[r]).length;
|
|
1289
1289
|
e > 0 && ot(`${e} row${e !== 1 ? "s" : ""} selected`);
|
|
1290
1290
|
}, [ke]), l.useEffect(() => {
|
|
1291
|
-
const [e, r] = X,
|
|
1291
|
+
const [e, r] = X, s = ct.length, u = w.getVisibleLeafColumns();
|
|
1292
1292
|
let g = e, m = r;
|
|
1293
|
-
e >= 0 && e >=
|
|
1294
|
-
}, [
|
|
1293
|
+
e >= 0 && e >= s && (g = Math.max(s - 1, -1)), r >= u.length && (m = Math.max(u.length - 1, 0)), (g !== e || m !== r) && Nt([g, m]);
|
|
1294
|
+
}, [n.length, w, X, ct.length]), l.useEffect(() => {
|
|
1295
1295
|
const e = w.getPageCount();
|
|
1296
1296
|
e > 1 && ot(`Page ${re.pageIndex + 1} of ${e}`);
|
|
1297
1297
|
}, [re.pageIndex, w]);
|
|
1298
1298
|
const He = l.useCallback((e, r) => {
|
|
1299
1299
|
if (!r || !e) return e;
|
|
1300
|
-
const
|
|
1301
|
-
let m = 0, S =
|
|
1300
|
+
const s = e.toLowerCase(), u = r.toLowerCase(), g = [];
|
|
1301
|
+
let m = 0, S = s.indexOf(u);
|
|
1302
1302
|
for (; S !== -1; )
|
|
1303
1303
|
S > m && g.push(e.substring(m, S)), g.push(
|
|
1304
1304
|
/* @__PURE__ */ t(
|
|
@@ -1314,7 +1314,7 @@ function $o({
|
|
|
1314
1314
|
},
|
|
1315
1315
|
`highlight-${m}-${S}`
|
|
1316
1316
|
)
|
|
1317
|
-
), m = S + r.length, S =
|
|
1317
|
+
), m = S + r.length, S = s.indexOf(u, m);
|
|
1318
1318
|
return m < e.length && g.push(e.substring(m)), /* @__PURE__ */ t(ee, { children: g });
|
|
1319
1319
|
}, []), he = l.useCallback((e) => {
|
|
1320
1320
|
if (e == null) return "";
|
|
@@ -1341,30 +1341,30 @@ function $o({
|
|
|
1341
1341
|
if (typeof e == "number")
|
|
1342
1342
|
return He(String(e), r);
|
|
1343
1343
|
if (Array.isArray(e))
|
|
1344
|
-
return e.map((
|
|
1344
|
+
return e.map((s, u) => /* @__PURE__ */ t(l.Fragment, { children: ce(s, r) }, u));
|
|
1345
1345
|
if (l.isValidElement(e)) {
|
|
1346
|
-
const
|
|
1347
|
-
if (typeof
|
|
1346
|
+
const s = e;
|
|
1347
|
+
if (typeof s.type == "function")
|
|
1348
1348
|
try {
|
|
1349
|
-
if (
|
|
1350
|
-
const B =
|
|
1351
|
-
return l.cloneElement(
|
|
1349
|
+
if (s.type.prototype?.isReactComponent) {
|
|
1350
|
+
const B = s.props.children;
|
|
1351
|
+
return l.cloneElement(s, {}, ce(B, r));
|
|
1352
1352
|
}
|
|
1353
|
-
const S =
|
|
1353
|
+
const S = s.type(s.props);
|
|
1354
1354
|
return ce(S, r);
|
|
1355
1355
|
} catch {
|
|
1356
|
-
const { children: S, ...B } =
|
|
1357
|
-
return S == null ?
|
|
1358
|
-
|
|
1356
|
+
const { children: S, ...B } = s.props;
|
|
1357
|
+
return S == null ? s : l.cloneElement(
|
|
1358
|
+
s,
|
|
1359
1359
|
B,
|
|
1360
1360
|
ce(S, r)
|
|
1361
1361
|
);
|
|
1362
1362
|
}
|
|
1363
|
-
if (
|
|
1364
|
-
return
|
|
1365
|
-
const { children: u, ...g } =
|
|
1363
|
+
if (s.props.children === void 0 || s.props.children === null)
|
|
1364
|
+
return s;
|
|
1365
|
+
const { children: u, ...g } = s.props;
|
|
1366
1366
|
return l.cloneElement(
|
|
1367
|
-
|
|
1367
|
+
s,
|
|
1368
1368
|
g,
|
|
1369
1369
|
ce(u, r)
|
|
1370
1370
|
);
|
|
@@ -1377,9 +1377,9 @@ function $o({
|
|
|
1377
1377
|
const u = be(e.column.columnDef.cell, e.getContext());
|
|
1378
1378
|
return u == null || !dt(u, L) ? u : ce(u, L);
|
|
1379
1379
|
}
|
|
1380
|
-
const
|
|
1381
|
-
if (typeof
|
|
1382
|
-
const u = String(
|
|
1380
|
+
const s = e.getValue();
|
|
1381
|
+
if (typeof s == "string" || typeof s == "number") {
|
|
1382
|
+
const u = String(s);
|
|
1383
1383
|
return He(u, L);
|
|
1384
1384
|
}
|
|
1385
1385
|
return be(e.column.columnDef.cell, e.getContext());
|
|
@@ -1388,30 +1388,30 @@ function $o({
|
|
|
1388
1388
|
return be(e.column.columnDef.aggregatedCell, e.getContext());
|
|
1389
1389
|
const r = be(e.column.columnDef.aggregatedCell, e.getContext());
|
|
1390
1390
|
return r == null || !dt(r, L) ? r : ce(r, L);
|
|
1391
|
-
}, [ie, L, dt, ce, he]),
|
|
1392
|
-
Sr(
|
|
1391
|
+
}, [ie, L, dt, ce, he]), en = l.useRef(null), tn = bn(
|
|
1392
|
+
Sr(xn, {
|
|
1393
1393
|
activationConstraint: {
|
|
1394
1394
|
distance: 8
|
|
1395
1395
|
}
|
|
1396
1396
|
}),
|
|
1397
|
-
Sr(
|
|
1397
|
+
Sr(yn, {
|
|
1398
1398
|
activationConstraint: {
|
|
1399
1399
|
delay: 200,
|
|
1400
1400
|
tolerance: 8
|
|
1401
1401
|
}
|
|
1402
1402
|
})
|
|
1403
|
-
), [, Cr] = l.useState(null),
|
|
1403
|
+
), [, Cr] = l.useState(null), rn = (e) => {
|
|
1404
1404
|
Ye && Cr(e.active.id);
|
|
1405
|
-
},
|
|
1405
|
+
}, sn = (e) => {
|
|
1406
1406
|
if (!Ye) return;
|
|
1407
|
-
const { active: r, over:
|
|
1408
|
-
if (Cr(null), r.id !==
|
|
1409
|
-
const u = Le.findIndex((m) => m === r.id), g = Le.findIndex((m) => m ===
|
|
1407
|
+
const { active: r, over: s } = e;
|
|
1408
|
+
if (Cr(null), r.id !== s?.id && s?.id) {
|
|
1409
|
+
const u = Le.findIndex((m) => m === r.id), g = Le.findIndex((m) => m === s?.id);
|
|
1410
1410
|
if (u !== -1 && g !== -1) {
|
|
1411
|
-
const m =
|
|
1411
|
+
const m = Rn(Le, u, g);
|
|
1412
1412
|
console.log("Column reorder:", {
|
|
1413
1413
|
activeId: r.id,
|
|
1414
|
-
overId:
|
|
1414
|
+
overId: s.id,
|
|
1415
1415
|
oldIndex: u,
|
|
1416
1416
|
newIndex: g,
|
|
1417
1417
|
oldOrder: Le,
|
|
@@ -1419,15 +1419,15 @@ function $o({
|
|
|
1419
1419
|
}), cr(m);
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
|
-
},
|
|
1423
|
-
const [r,
|
|
1424
|
-
let o = r, P =
|
|
1422
|
+
}, nn = l.useCallback((e) => {
|
|
1423
|
+
const [r, s] = X, u = w.getVisibleLeafColumns(), g = ct, m = u.length, S = g.length, B = -1, F = S - 1;
|
|
1424
|
+
let o = r, P = s, $ = !1;
|
|
1425
1425
|
switch (e.key) {
|
|
1426
1426
|
case "ArrowRight":
|
|
1427
|
-
|
|
1427
|
+
s < m - 1 && (P = s + 1, $ = !0);
|
|
1428
1428
|
break;
|
|
1429
1429
|
case "ArrowLeft":
|
|
1430
|
-
|
|
1430
|
+
s > 0 && (P = s - 1, $ = !0);
|
|
1431
1431
|
break;
|
|
1432
1432
|
case "ArrowDown":
|
|
1433
1433
|
r < F && (o = r + 1, $ = !0);
|
|
@@ -1450,7 +1450,7 @@ function $o({
|
|
|
1450
1450
|
case "Enter":
|
|
1451
1451
|
case " ":
|
|
1452
1452
|
if (r === -1) {
|
|
1453
|
-
const d = u[
|
|
1453
|
+
const d = u[s];
|
|
1454
1454
|
d?.id === "select" && fe && e.key === " " ? (w.toggleAllPageRowsSelected(), $ = !0) : d?.getCanSort() && (d.toggleSorting(), $ = !0);
|
|
1455
1455
|
} else {
|
|
1456
1456
|
const d = g[r];
|
|
@@ -1461,28 +1461,28 @@ function $o({
|
|
|
1461
1461
|
document.activeElement instanceof HTMLElement && document.activeElement.blur(), $ = !0;
|
|
1462
1462
|
break;
|
|
1463
1463
|
}
|
|
1464
|
-
if ($ && (e.preventDefault(), e.stopPropagation(), o !== r || P !==
|
|
1464
|
+
if ($ && (e.preventDefault(), e.stopPropagation(), o !== r || P !== s)) {
|
|
1465
1465
|
Nt([o, P]);
|
|
1466
1466
|
const d = o === -1 ? `[data-header-col="${P}"]` : `[data-row="${o}"][data-col="${P}"]`, k = Rt.current?.querySelector(d);
|
|
1467
1467
|
k && k.focus();
|
|
1468
1468
|
}
|
|
1469
|
-
}, [X, w, ct, _, z, fe]),
|
|
1469
|
+
}, [X, w, ct, _, z, fe]), on = l.useCallback((e) => {
|
|
1470
1470
|
Rt.current?.contains(e.relatedTarget) || Nt([-1, 0]);
|
|
1471
1471
|
}, []), We = l.useMemo(() => {
|
|
1472
1472
|
const e = w.getVisibleFlatColumns(), r = /* @__PURE__ */ new Map();
|
|
1473
|
-
let
|
|
1473
|
+
let s = 0;
|
|
1474
1474
|
e.forEach((g, m) => {
|
|
1475
1475
|
const S = m < Oe, B = m >= e.length - Ne, F = S && m === Oe - 1, o = B && m === e.length - Ne;
|
|
1476
1476
|
r.set(g.id, {
|
|
1477
1477
|
isLeftSticky: S,
|
|
1478
1478
|
isRightSticky: B,
|
|
1479
|
-
leftPosition:
|
|
1479
|
+
leftPosition: s,
|
|
1480
1480
|
rightPosition: 0,
|
|
1481
1481
|
// Will be calculated below
|
|
1482
1482
|
isRightmostLeftSticky: F,
|
|
1483
1483
|
isLeftmostRightSticky: o,
|
|
1484
1484
|
columnIndex: m
|
|
1485
|
-
}),
|
|
1485
|
+
}), s += g.getSize();
|
|
1486
1486
|
});
|
|
1487
1487
|
let u = 0;
|
|
1488
1488
|
for (let g = e.length - 1; g >= 0; g--) {
|
|
@@ -1490,7 +1490,7 @@ function $o({
|
|
|
1490
1490
|
S && (S.rightPosition = u), u += m.getSize();
|
|
1491
1491
|
}
|
|
1492
1492
|
return { data: r, allColumns: e };
|
|
1493
|
-
}, [w.getVisibleFlatColumns(), Oe, Ne]), Ge = (e, r = !1,
|
|
1493
|
+
}, [w.getVisibleFlatColumns(), Oe, Ne]), Ge = (e, r = !1, s = !0) => {
|
|
1494
1494
|
if (!e || typeof e.getSize != "function")
|
|
1495
1495
|
return {};
|
|
1496
1496
|
const u = We.data.get(e.id);
|
|
@@ -1528,7 +1528,7 @@ function $o({
|
|
|
1528
1528
|
} : P;
|
|
1529
1529
|
}
|
|
1530
1530
|
return {};
|
|
1531
|
-
},
|
|
1531
|
+
}, an = (e) => {
|
|
1532
1532
|
if (!e || typeof e.getSize != "function")
|
|
1533
1533
|
return "";
|
|
1534
1534
|
const r = We.data.get(e.id);
|
|
@@ -1559,15 +1559,15 @@ function $o({
|
|
|
1559
1559
|
"before:opacity-0 hover:before:opacity-100",
|
|
1560
1560
|
"before:transition-opacity before:pointer-events-none before:z-10"
|
|
1561
1561
|
);
|
|
1562
|
-
return /* @__PURE__ */ t(
|
|
1563
|
-
|
|
1562
|
+
return /* @__PURE__ */ t(Hn, { children: /* @__PURE__ */ t(
|
|
1563
|
+
Cn,
|
|
1564
1564
|
{
|
|
1565
|
-
sensors:
|
|
1566
|
-
collisionDetection:
|
|
1567
|
-
onDragStart:
|
|
1568
|
-
onDragEnd:
|
|
1565
|
+
sensors: tn,
|
|
1566
|
+
collisionDetection: wn,
|
|
1567
|
+
onDragStart: rn,
|
|
1568
|
+
onDragEnd: sn,
|
|
1569
1569
|
children: /* @__PURE__ */ b("div", { className: V(
|
|
1570
|
-
"border border-[var(--color-border-primary-medium)] bg-[var(--color-surface-primary)] overflow-hidden rounded-l",
|
|
1570
|
+
"border border-[var(--color-border-primary-medium)] bg-[var(--color-surface-primary)] overflow-hidden rounded-[var(--border-radius-l)]",
|
|
1571
1571
|
// Remove bottom border when no pagination to avoid double border with last row
|
|
1572
1572
|
!vt && "border-b-0",
|
|
1573
1573
|
y
|
|
@@ -1591,7 +1591,7 @@ function $o({
|
|
|
1591
1591
|
enableGlobalFaceting: Kr,
|
|
1592
1592
|
enableGrouping: z,
|
|
1593
1593
|
enableAutocomplete: mt,
|
|
1594
|
-
autocompleteSuggestions:
|
|
1594
|
+
autocompleteSuggestions: Ys,
|
|
1595
1595
|
autocompleteMinCharacters: Jr
|
|
1596
1596
|
}
|
|
1597
1597
|
)
|
|
@@ -1600,11 +1600,11 @@ function $o({
|
|
|
1600
1600
|
"div",
|
|
1601
1601
|
{
|
|
1602
1602
|
ref: Rt,
|
|
1603
|
-
onKeyDown:
|
|
1604
|
-
onFocus:
|
|
1603
|
+
onKeyDown: nn,
|
|
1604
|
+
onFocus: on,
|
|
1605
1605
|
className: V(
|
|
1606
1606
|
"relative",
|
|
1607
|
-
|
|
1607
|
+
nt && [
|
|
1608
1608
|
"overflow-x-auto",
|
|
1609
1609
|
"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-[var(--color-border-primary-subtle)]",
|
|
1610
1610
|
"hover:scrollbar-thumb-[var(--color-border-primary)]",
|
|
@@ -1624,16 +1624,16 @@ function $o({
|
|
|
1624
1624
|
"aria-live": "polite",
|
|
1625
1625
|
"aria-atomic": "true",
|
|
1626
1626
|
className: "sr-only",
|
|
1627
|
-
children:
|
|
1627
|
+
children: _s
|
|
1628
1628
|
}
|
|
1629
1629
|
),
|
|
1630
1630
|
/* @__PURE__ */ b(
|
|
1631
|
-
|
|
1631
|
+
kn,
|
|
1632
1632
|
{
|
|
1633
|
-
ref:
|
|
1633
|
+
ref: en,
|
|
1634
1634
|
role: "grid",
|
|
1635
1635
|
"aria-label": x || f,
|
|
1636
|
-
"aria-rowcount":
|
|
1636
|
+
"aria-rowcount": n.length,
|
|
1637
1637
|
"aria-colcount": w.getVisibleLeafColumns().length,
|
|
1638
1638
|
className: V(
|
|
1639
1639
|
"border-separate border-spacing-0",
|
|
@@ -1642,7 +1642,7 @@ function $o({
|
|
|
1642
1642
|
// Fixed layout for column resizing
|
|
1643
1643
|
),
|
|
1644
1644
|
style: {
|
|
1645
|
-
...
|
|
1645
|
+
...nt && { minWidth: C }
|
|
1646
1646
|
},
|
|
1647
1647
|
children: [
|
|
1648
1648
|
/* @__PURE__ */ t("colgroup", { children: w.getVisibleLeafColumns().map((e) => /* @__PURE__ */ t(
|
|
@@ -1654,7 +1654,7 @@ function $o({
|
|
|
1654
1654
|
},
|
|
1655
1655
|
e.id
|
|
1656
1656
|
)) }),
|
|
1657
|
-
/* @__PURE__ */ t(
|
|
1657
|
+
/* @__PURE__ */ t(zn, { className: V(
|
|
1658
1658
|
h && [
|
|
1659
1659
|
"sticky top-0 z-20",
|
|
1660
1660
|
"after:absolute after:bottom-0 after:left-0 after:right-0 after:h-px after:bg-[var(--color-border-primary-medium)]"
|
|
@@ -1668,23 +1668,23 @@ function $o({
|
|
|
1668
1668
|
rows: 0,
|
|
1669
1669
|
showRowBorder: E.showRowBorder,
|
|
1670
1670
|
showCellBorder: E.showCellBorder,
|
|
1671
|
-
enableResponsiveWrapper:
|
|
1671
|
+
enableResponsiveWrapper: nt
|
|
1672
1672
|
}
|
|
1673
|
-
) :
|
|
1673
|
+
) : ts && Qe && Qe.length > 0 ? (
|
|
1674
1674
|
// Nested headers rendering
|
|
1675
1675
|
/* @__PURE__ */ b(ee, { children: [
|
|
1676
1676
|
/* @__PURE__ */ t(G, { showBorder: E.showRowBorder, children: Qe.map((e, r) => {
|
|
1677
|
-
const
|
|
1677
|
+
const s = e.columns.length, u = Ge(e, !0, E.showRowBorder);
|
|
1678
1678
|
return /* @__PURE__ */ t(
|
|
1679
1679
|
ut,
|
|
1680
1680
|
{
|
|
1681
|
-
colSpan:
|
|
1681
|
+
colSpan: s,
|
|
1682
1682
|
showBorder: E.showCellBorder,
|
|
1683
1683
|
className: V(
|
|
1684
1684
|
"text-center bg-[var(--color-background-neutral-subtlest)] font-medium border-b border-[var(--color-border-primary-medium)]",
|
|
1685
1685
|
h && "z-20",
|
|
1686
|
-
!Me && r === 0 && "rounded-tl-l",
|
|
1687
|
-
!Me && r === Qe.length - 1 && "rounded-tr-l",
|
|
1686
|
+
!Me && r === 0 && "rounded-tl-[var(--border-radius-l)]",
|
|
1687
|
+
!Me && r === Qe.length - 1 && "rounded-tr-[var(--border-radius-l)]",
|
|
1688
1688
|
e.className
|
|
1689
1689
|
),
|
|
1690
1690
|
style: {
|
|
@@ -1697,7 +1697,7 @@ function $o({
|
|
|
1697
1697
|
);
|
|
1698
1698
|
}) }),
|
|
1699
1699
|
/* @__PURE__ */ t(G, { showBorder: E.showRowBorder, children: w.getHeaderGroups()[0]?.headers.map((e, r) => {
|
|
1700
|
-
const
|
|
1700
|
+
const s = Ge(e.column, !0, E.showRowBorder), u = e.column.columnDef.meta?.align || "left", g = r === w.getHeaderGroups()[0].headers.length - 1, m = Bt(e.column);
|
|
1701
1701
|
return /* @__PURE__ */ t(
|
|
1702
1702
|
ut,
|
|
1703
1703
|
{
|
|
@@ -1716,9 +1716,9 @@ function $o({
|
|
|
1716
1716
|
"focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[var(--color-border-brand-bold)]"
|
|
1717
1717
|
),
|
|
1718
1718
|
style: {
|
|
1719
|
-
...
|
|
1719
|
+
...s,
|
|
1720
1720
|
// For table-fixed layout, all columns need explicit width
|
|
1721
|
-
...te && !
|
|
1721
|
+
...te && !s.width ? { width: e.column.getSize() } : {}
|
|
1722
1722
|
},
|
|
1723
1723
|
children: /* @__PURE__ */ b("div", { className: V(
|
|
1724
1724
|
u === "right" ? "text-right" : "text-left"
|
|
@@ -1754,28 +1754,28 @@ function $o({
|
|
|
1754
1754
|
) : (
|
|
1755
1755
|
// Standard single-level headers
|
|
1756
1756
|
w.getHeaderGroups().map((e) => /* @__PURE__ */ t(
|
|
1757
|
-
|
|
1757
|
+
Sn,
|
|
1758
1758
|
{
|
|
1759
1759
|
items: e.headers.map((r) => r.id),
|
|
1760
|
-
strategy:
|
|
1761
|
-
children: /* @__PURE__ */ t(G, { showBorder: E.showRowBorder, children: e.headers.map((r,
|
|
1762
|
-
const u = Ge(r.column, !0, E.showRowBorder), g = r.column.columnDef.meta?.align || "left", m =
|
|
1760
|
+
strategy: Nn,
|
|
1761
|
+
children: /* @__PURE__ */ t(G, { showBorder: E.showRowBorder, children: e.headers.map((r, s) => {
|
|
1762
|
+
const u = Ge(r.column, !0, E.showRowBorder), g = r.column.columnDef.meta?.align || "left", m = s === e.headers.length - 1, S = Bt(r.column);
|
|
1763
1763
|
return /* @__PURE__ */ t(
|
|
1764
1764
|
ut,
|
|
1765
1765
|
{
|
|
1766
1766
|
scope: "col",
|
|
1767
1767
|
"aria-sort": r.column.getCanSort() ? r.column.getIsSorted() ? r.column.getIsSorted() === "desc" ? "descending" : "ascending" : "none" : void 0,
|
|
1768
|
-
"aria-colindex":
|
|
1769
|
-
"data-header-col":
|
|
1770
|
-
tabIndex: X[0] === -1 && X[1] ===
|
|
1768
|
+
"aria-colindex": s + 1,
|
|
1769
|
+
"data-header-col": s,
|
|
1770
|
+
tabIndex: X[0] === -1 && X[1] === s ? 0 : -1,
|
|
1771
1771
|
showBorder: m || S || Tt(r.column) ? !1 : E.showCellBorder,
|
|
1772
1772
|
className: V(
|
|
1773
1773
|
h && "z-20",
|
|
1774
1774
|
(Oe > 0 || Ne > 0) && "z-30",
|
|
1775
1775
|
te && "relative overflow-visible group",
|
|
1776
1776
|
Ye && "group",
|
|
1777
|
-
!Me &&
|
|
1778
|
-
!Me &&
|
|
1777
|
+
!Me && s === 0 && "rounded-tl-[var(--border-radius-l)]",
|
|
1778
|
+
!Me && s === e.headers.length - 1 && "rounded-tr-[var(--border-radius-l)]",
|
|
1779
1779
|
wr(r.column, m),
|
|
1780
1780
|
// Focus ring for keyboard navigation
|
|
1781
1781
|
"focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[var(--color-border-brand-bold)]"
|
|
@@ -1819,8 +1819,8 @@ function $o({
|
|
|
1819
1819
|
e.id
|
|
1820
1820
|
))
|
|
1821
1821
|
) }),
|
|
1822
|
-
/* @__PURE__ */ b(
|
|
1823
|
-
|
|
1822
|
+
/* @__PURE__ */ b(Bn, { children: [
|
|
1823
|
+
Is && !A && n.length > 0 && /* @__PURE__ */ t("tr", { className: "absolute top-0 left-0 right-0 z-50 h-0", children: /* @__PURE__ */ t("td", { colSpan: w.getVisibleLeafColumns().length, className: "p-0", children: /* @__PURE__ */ t(to, {}) }) }),
|
|
1824
1824
|
Kt ? /* @__PURE__ */ t(G, { showBorder: !1, className: "h-[300px]", children: /* @__PURE__ */ t(
|
|
1825
1825
|
le,
|
|
1826
1826
|
{
|
|
@@ -1829,23 +1829,23 @@ function $o({
|
|
|
1829
1829
|
showBorder: !1,
|
|
1830
1830
|
showRowBorder: !1,
|
|
1831
1831
|
verticalAlign: "middle",
|
|
1832
|
-
children:
|
|
1832
|
+
children: vs || /* @__PURE__ */ t(
|
|
1833
1833
|
eo,
|
|
1834
1834
|
{
|
|
1835
1835
|
error: Kt,
|
|
1836
|
-
onRetry:
|
|
1836
|
+
onRetry: ps
|
|
1837
1837
|
}
|
|
1838
1838
|
)
|
|
1839
1839
|
}
|
|
1840
|
-
) }) : A && (M === "replace" ||
|
|
1840
|
+
) }) : A && (M === "replace" || n.length === 0) ? /* @__PURE__ */ t(
|
|
1841
1841
|
Mr,
|
|
1842
1842
|
{
|
|
1843
1843
|
columns: w.getVisibleLeafColumns().length,
|
|
1844
|
-
rows:
|
|
1844
|
+
rows: Qs,
|
|
1845
1845
|
showRowBorder: E.showRowBorder,
|
|
1846
1846
|
showCellBorder: E.showCellBorder,
|
|
1847
1847
|
skipHeader: !0,
|
|
1848
|
-
enableResponsiveWrapper:
|
|
1848
|
+
enableResponsiveWrapper: nt
|
|
1849
1849
|
}
|
|
1850
1850
|
) : (
|
|
1851
1851
|
// DISABLED: Virtualization temporarily disabled to fix React hooks error
|
|
@@ -1878,14 +1878,14 @@ function $o({
|
|
|
1878
1878
|
d.getIsPinned() === "bottom" && "!bg-[var(--color-background-neutral-selected)] !border-t-2 !border-[var(--color-border-primary-medium)]",
|
|
1879
1879
|
// Nested row background colors (grouped and expanding)
|
|
1880
1880
|
(() => {
|
|
1881
|
-
const j = d.getIsGrouped?.() ? "font-medium" : "",
|
|
1881
|
+
const j = d.getIsGrouped?.() ? "font-medium" : "", se = Vr(d, {
|
|
1882
1882
|
enableGrouping: z,
|
|
1883
1883
|
enableExpanding: _,
|
|
1884
1884
|
nestedRowStyling: pt,
|
|
1885
1885
|
expandingRowColors: O,
|
|
1886
1886
|
maxDepth: lt
|
|
1887
1887
|
});
|
|
1888
|
-
return V(
|
|
1888
|
+
return V(se ? `bg-[${se}]` : "", j);
|
|
1889
1889
|
})(),
|
|
1890
1890
|
// Row click styling with smart hover
|
|
1891
1891
|
K && Se(d) && (_t || "cursor-pointer hover:[background-image:linear-gradient(rgba(0,0,0,0.02),rgba(0,0,0,0.02))]")
|
|
@@ -1898,7 +1898,7 @@ function $o({
|
|
|
1898
1898
|
"aria-label": K && Se(d) ? `View details for row ${d.id}` : void 0,
|
|
1899
1899
|
"aria-current": ze(d) ? "true" : void 0,
|
|
1900
1900
|
children: d.getVisibleCells().map((I, j) => {
|
|
1901
|
-
const
|
|
1901
|
+
const se = Ge(I.column, !1, E.showRowBorder), U = j === 0, _e = _ && d.getCanExpand() || z && d.getIsGrouped(), de = d.getIsExpanded(), ue = d.depth, Pt = z && d.getIsGrouped();
|
|
1902
1902
|
let Re = Wt?.(d);
|
|
1903
1903
|
if (Re == null)
|
|
1904
1904
|
for (const oe of d.getVisibleCells()) {
|
|
@@ -1911,8 +1911,8 @@ function $o({
|
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
1913
|
}
|
|
1914
|
-
const
|
|
1915
|
-
if (
|
|
1914
|
+
const ne = Re != null;
|
|
1915
|
+
if (ne && !U)
|
|
1916
1916
|
return null;
|
|
1917
1917
|
const Z = z && d.depth > 0 && j === 0 && !H;
|
|
1918
1918
|
return /* @__PURE__ */ t(
|
|
@@ -1926,15 +1926,15 @@ function $o({
|
|
|
1926
1926
|
showBorder: Bt(I.column) || Tt(I.column) ? !1 : E.showCellBorder,
|
|
1927
1927
|
showRowBorder: E.showRowBorder,
|
|
1928
1928
|
verticalAlign: I.column.columnDef.meta?.verticalAlign || Ie,
|
|
1929
|
-
colSpan:
|
|
1930
|
-
"data-section-header":
|
|
1929
|
+
colSpan: ne ? d.getVisibleCells().length : void 0,
|
|
1930
|
+
"data-section-header": ne ? !0 : void 0,
|
|
1931
1931
|
className: V(
|
|
1932
1932
|
// Active row indicator on first cell
|
|
1933
1933
|
U && ze(d) && (qt || fr(Z ? !1 : E.showRowBorder)),
|
|
1934
1934
|
// Add sticky border classes for body cells (skip for section headers)
|
|
1935
|
-
!
|
|
1935
|
+
!ne && an(I.column),
|
|
1936
1936
|
// Sticky columns need higher z-index and explicit backgrounds
|
|
1937
|
-
Object.keys(
|
|
1937
|
+
Object.keys(se).length > 0 && [
|
|
1938
1938
|
"z-10",
|
|
1939
1939
|
// Match row backgrounds for sticky cells to prevent transparency
|
|
1940
1940
|
(() => {
|
|
@@ -1949,18 +1949,18 @@ function $o({
|
|
|
1949
1949
|
})()
|
|
1950
1950
|
],
|
|
1951
1951
|
// Section header background
|
|
1952
|
-
|
|
1952
|
+
ne && "bg-[var(--blue-50)]",
|
|
1953
1953
|
// Remove bottom border from first column child rows (except last), but not when row is active
|
|
1954
1954
|
Z && !ze(d) && "![box-shadow:none]",
|
|
1955
1955
|
// Focus ring for keyboard navigation
|
|
1956
1956
|
"focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[var(--color-border-brand-bold)]"
|
|
1957
1957
|
),
|
|
1958
1958
|
style: {
|
|
1959
|
-
...
|
|
1959
|
+
...se,
|
|
1960
1960
|
// Add left padding for nested rows
|
|
1961
|
-
paddingLeft: U && ue > 0 && !
|
|
1961
|
+
paddingLeft: U && ue > 0 && !ne ? `calc(var(--space-m) + ${ue * 20}px)` : void 0
|
|
1962
1962
|
},
|
|
1963
|
-
children:
|
|
1963
|
+
children: ne ? (
|
|
1964
1964
|
// Section header row - render custom content
|
|
1965
1965
|
Re
|
|
1966
1966
|
) : Pt ? (
|
|
@@ -1995,7 +1995,7 @@ function $o({
|
|
|
1995
1995
|
{
|
|
1996
1996
|
tabIndex: -1,
|
|
1997
1997
|
onClick: d.getToggleExpandedHandler(),
|
|
1998
|
-
className: "flex h-[var(--size-s)] w-[var(--size-s)] cursor-pointer items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
1998
|
+
className: "flex h-[var(--size-s)] w-[var(--size-s)] cursor-pointer items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
1999
1999
|
children: /* @__PURE__ */ t(
|
|
2000
2000
|
W,
|
|
2001
2001
|
{
|
|
@@ -2011,7 +2011,7 @@ function $o({
|
|
|
2011
2011
|
{
|
|
2012
2012
|
tabIndex: -1,
|
|
2013
2013
|
onClick: () => d.pin("top"),
|
|
2014
|
-
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2014
|
+
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2015
2015
|
title: "Pin to top",
|
|
2016
2016
|
children: /* @__PURE__ */ t(W, { name: Rr, className: "h-3 w-3" })
|
|
2017
2017
|
}
|
|
@@ -2021,7 +2021,7 @@ function $o({
|
|
|
2021
2021
|
{
|
|
2022
2022
|
tabIndex: -1,
|
|
2023
2023
|
onClick: () => d.pin("bottom"),
|
|
2024
|
-
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2024
|
+
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2025
2025
|
title: "Pin to bottom",
|
|
2026
2026
|
children: /* @__PURE__ */ t(W, { name: Ir, className: "h-3 w-3" })
|
|
2027
2027
|
}
|
|
@@ -2031,7 +2031,7 @@ function $o({
|
|
|
2031
2031
|
{
|
|
2032
2032
|
tabIndex: -1,
|
|
2033
2033
|
onClick: () => d.pin(!1),
|
|
2034
|
-
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2034
|
+
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2035
2035
|
title: "Unpin row",
|
|
2036
2036
|
children: /* @__PURE__ */ t(W, { name: Vt, className: "h-3 w-3" })
|
|
2037
2037
|
}
|
|
@@ -2081,7 +2081,7 @@ function $o({
|
|
|
2081
2081
|
"data-section-header": !0,
|
|
2082
2082
|
children: Zt?.[d.id] ? /* @__PURE__ */ b("div", { className: "flex flex-col items-center justify-center py-[var(--space-l)] gap-[var(--space-s)]", children: [
|
|
2083
2083
|
/* @__PURE__ */ b("div", { className: "flex items-center gap-[var(--space-s)] text-[var(--color-text-danger)]", children: [
|
|
2084
|
-
/* @__PURE__ */ t(W, { name:
|
|
2084
|
+
/* @__PURE__ */ t(W, { name: jn, className: "h-4 w-4" }),
|
|
2085
2085
|
/* @__PURE__ */ t("span", { className: "text-body-sm", children: Zt[d.id]?.message || "Failed to load details" })
|
|
2086
2086
|
] }),
|
|
2087
2087
|
De && /* @__PURE__ */ t(
|
|
@@ -2092,7 +2092,7 @@ function $o({
|
|
|
2092
2092
|
children: "Try again"
|
|
2093
2093
|
}
|
|
2094
2094
|
)
|
|
2095
|
-
] }) :
|
|
2095
|
+
] }) : st?.[d.id] ? /* @__PURE__ */ b("div", { className: "flex items-center justify-center py-[var(--space-l)]", children: [
|
|
2096
2096
|
/* @__PURE__ */ t(qe, { size: "s" }),
|
|
2097
2097
|
/* @__PURE__ */ t("span", { className: "ml-[var(--space-s)] text-body-sm text-[var(--color-text-secondary)]", children: "Loading details..." })
|
|
2098
2098
|
] }) : J(d)
|
|
@@ -2104,7 +2104,7 @@ function $o({
|
|
|
2104
2104
|
if (I.length === 0) return null;
|
|
2105
2105
|
let j = d.getIsExpanded();
|
|
2106
2106
|
return !j && Q === !0 && d.getCanExpand() && (j = !0), !j && typeof Q == "object" && Q !== null && Q[d.id] && (j = !0), j ? I.map(
|
|
2107
|
-
(
|
|
2107
|
+
(se, U) => $(se, U, U === I.length - 1)
|
|
2108
2108
|
) : null;
|
|
2109
2109
|
})()
|
|
2110
2110
|
] }, d.id);
|
|
@@ -2113,8 +2113,8 @@ function $o({
|
|
|
2113
2113
|
(d, k) => $(d, k, k === P.length - 1)
|
|
2114
2114
|
);
|
|
2115
2115
|
}
|
|
2116
|
-
const e = w.getCoreRowModel().rows, r = w.getRowModel().rows,
|
|
2117
|
-
...
|
|
2116
|
+
const e = w.getCoreRowModel().rows, r = w.getRowModel().rows, s = e.filter((o) => o.getIsPinned() === "top"), u = e.filter((o) => o.getIsPinned() === "bottom"), g = r.filter((o) => !o.getIsPinned()), m = [
|
|
2117
|
+
...s,
|
|
2118
2118
|
...g,
|
|
2119
2119
|
...u
|
|
2120
2120
|
], S = /* @__PURE__ */ new Set(), B = m.filter((o) => J || o.depth === 0), F = (o, P, $) => {
|
|
@@ -2171,7 +2171,7 @@ function $o({
|
|
|
2171
2171
|
"aria-label": K && Se(o) ? `View details for row ${o.id}` : void 0,
|
|
2172
2172
|
"aria-current": ze(o) ? "true" : void 0,
|
|
2173
2173
|
children: o.getVisibleCells().map((k, H) => {
|
|
2174
|
-
const q = Ge(k.column, !1, E.showRowBorder), I = H === 0, j = _ && o.getCanExpand() || z && o.getIsGrouped(),
|
|
2174
|
+
const q = Ge(k.column, !1, E.showRowBorder), I = H === 0, j = _ && o.getCanExpand() || z && o.getIsGrouped(), se = o.getIsExpanded(), U = o.depth, _e = z && o.getIsGrouped();
|
|
2175
2175
|
let de = Wt?.(o);
|
|
2176
2176
|
if (de == null)
|
|
2177
2177
|
for (const pe of o.getVisibleCells()) {
|
|
@@ -2187,7 +2187,7 @@ function $o({
|
|
|
2187
2187
|
const ue = de != null;
|
|
2188
2188
|
if (ue && !I)
|
|
2189
2189
|
return null;
|
|
2190
|
-
const
|
|
2190
|
+
const ne = z && o.depth > 0 && H === 0 && !$;
|
|
2191
2191
|
return /* @__PURE__ */ t(
|
|
2192
2192
|
le,
|
|
2193
2193
|
{
|
|
@@ -2202,7 +2202,7 @@ function $o({
|
|
|
2202
2202
|
colSpan: ue ? o.getVisibleCells().length : void 0,
|
|
2203
2203
|
className: V(
|
|
2204
2204
|
// Active row indicator on first cell
|
|
2205
|
-
I && ze(o) && (qt || fr(
|
|
2205
|
+
I && ze(o) && (qt || fr(ne ? !1 : E.showRowBorder)),
|
|
2206
2206
|
// Focus ring for keyboard navigation
|
|
2207
2207
|
"focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-[var(--color-border-brand-bold)]",
|
|
2208
2208
|
// Sticky columns need higher z-index and explicit backgrounds
|
|
@@ -2244,7 +2244,7 @@ function $o({
|
|
|
2244
2244
|
// Section header background
|
|
2245
2245
|
ue && "bg-[var(--blue-50)]",
|
|
2246
2246
|
// Remove bottom border from first column child rows (except last), but not when row is active
|
|
2247
|
-
|
|
2247
|
+
ne && !ze(o) && "![box-shadow:none]"
|
|
2248
2248
|
),
|
|
2249
2249
|
style: {
|
|
2250
2250
|
...q,
|
|
@@ -2259,7 +2259,7 @@ function $o({
|
|
|
2259
2259
|
de
|
|
2260
2260
|
) : _e ? (
|
|
2261
2261
|
// Grouped row rendering - only show content in first cell
|
|
2262
|
-
I ? Fr(o, w, Xe,
|
|
2262
|
+
I ? Fr(o, w, Xe, se, ye, Ft) : k.column.columnDef.meta?.renderInGroupedRows ? (
|
|
2263
2263
|
// Render custom cell content for columns with renderInGroupedRows flag
|
|
2264
2264
|
Be(k)
|
|
2265
2265
|
) : k.column.columnDef.aggregatedCell ? (
|
|
@@ -2288,11 +2288,11 @@ function $o({
|
|
|
2288
2288
|
"button",
|
|
2289
2289
|
{
|
|
2290
2290
|
onClick: o.getToggleExpandedHandler(),
|
|
2291
|
-
className: "flex h-[var(--size-s)] w-[var(--size-s)] cursor-pointer items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2291
|
+
className: "flex h-[var(--size-s)] w-[var(--size-s)] cursor-pointer items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2292
2292
|
children: /* @__PURE__ */ t(
|
|
2293
2293
|
W,
|
|
2294
2294
|
{
|
|
2295
|
-
name:
|
|
2295
|
+
name: se ? "chevron-down" : "chevron-right",
|
|
2296
2296
|
className: "h-3 w-3"
|
|
2297
2297
|
}
|
|
2298
2298
|
)
|
|
@@ -2303,7 +2303,7 @@ function $o({
|
|
|
2303
2303
|
"button",
|
|
2304
2304
|
{
|
|
2305
2305
|
onClick: () => o.pin("top"),
|
|
2306
|
-
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2306
|
+
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2307
2307
|
title: "Pin to top",
|
|
2308
2308
|
children: /* @__PURE__ */ t(W, { name: Rr, className: "h-3 w-3" })
|
|
2309
2309
|
}
|
|
@@ -2312,7 +2312,7 @@ function $o({
|
|
|
2312
2312
|
"button",
|
|
2313
2313
|
{
|
|
2314
2314
|
onClick: () => o.pin("bottom"),
|
|
2315
|
-
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2315
|
+
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2316
2316
|
title: "Pin to bottom",
|
|
2317
2317
|
children: /* @__PURE__ */ t(W, { name: Ir, className: "h-3 w-3" })
|
|
2318
2318
|
}
|
|
@@ -2321,7 +2321,7 @@ function $o({
|
|
|
2321
2321
|
"button",
|
|
2322
2322
|
{
|
|
2323
2323
|
onClick: () => o.pin(!1),
|
|
2324
|
-
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-s text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2324
|
+
className: "opacity-0 group-hover:opacity-100 flex h-[var(--size-s)] w-[var(--size-s)] items-center justify-center rounded-[var(--border-radius-s)] text-[var(--color-text-secondary)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
2325
2325
|
title: "Unpin row",
|
|
2326
2326
|
children: /* @__PURE__ */ t(W, { name: Vt, className: "h-3 w-3" })
|
|
2327
2327
|
}
|
|
@@ -2369,7 +2369,7 @@ function $o({
|
|
|
2369
2369
|
verticalAlign: Ie,
|
|
2370
2370
|
className: "p-0",
|
|
2371
2371
|
"data-section-header": !0,
|
|
2372
|
-
children:
|
|
2372
|
+
children: st?.[o.id] ? /* @__PURE__ */ b("div", { className: "flex items-center justify-center py-[var(--space-l)]", children: [
|
|
2373
2373
|
/* @__PURE__ */ t(qe, { size: "s" }),
|
|
2374
2374
|
/* @__PURE__ */ t("span", { className: "ml-[var(--space-s)] text-body-sm text-[var(--color-text-secondary)]", children: "Loading details..." })
|
|
2375
2375
|
] }) : J(o)
|
|
@@ -2400,12 +2400,12 @@ function $o({
|
|
|
2400
2400
|
showBorder: !1,
|
|
2401
2401
|
showRowBorder: !1,
|
|
2402
2402
|
verticalAlign: "middle",
|
|
2403
|
-
children:
|
|
2404
|
-
|
|
2403
|
+
children: ws || /* @__PURE__ */ t(
|
|
2404
|
+
Zn,
|
|
2405
2405
|
{
|
|
2406
|
-
title:
|
|
2407
|
-
description:
|
|
2408
|
-
action:
|
|
2406
|
+
title: Ss,
|
|
2407
|
+
description: Ns,
|
|
2408
|
+
action: Rs
|
|
2409
2409
|
}
|
|
2410
2410
|
)
|
|
2411
2411
|
}
|
|
@@ -2417,12 +2417,12 @@ function $o({
|
|
|
2417
2417
|
showBorder: !1,
|
|
2418
2418
|
showRowBorder: !1,
|
|
2419
2419
|
verticalAlign: "middle",
|
|
2420
|
-
children:
|
|
2421
|
-
|
|
2420
|
+
children: bs || /* @__PURE__ */ t(
|
|
2421
|
+
Yn,
|
|
2422
2422
|
{
|
|
2423
|
-
title:
|
|
2424
|
-
description:
|
|
2425
|
-
action:
|
|
2423
|
+
title: xs,
|
|
2424
|
+
description: ys,
|
|
2425
|
+
action: Cs
|
|
2426
2426
|
}
|
|
2427
2427
|
)
|
|
2428
2428
|
}
|
|
@@ -2442,18 +2442,18 @@ function $o({
|
|
|
2442
2442
|
table: w,
|
|
2443
2443
|
enableGrouping: z,
|
|
2444
2444
|
hideChildrenForSingleItemGroups: ye,
|
|
2445
|
-
footerLabel:
|
|
2446
|
-
onNextPageHover:
|
|
2447
|
-
onPreviousPageHover:
|
|
2448
|
-
paginationVariant:
|
|
2449
|
-
pageSizeOptions:
|
|
2445
|
+
footerLabel: ns,
|
|
2446
|
+
onNextPageHover: fs,
|
|
2447
|
+
onPreviousPageHover: gs,
|
|
2448
|
+
paginationVariant: rs,
|
|
2449
|
+
pageSizeOptions: ss
|
|
2450
2450
|
}
|
|
2451
2451
|
) }),
|
|
2452
|
-
Jt &&
|
|
2452
|
+
Jt && ms && /* @__PURE__ */ t(
|
|
2453
2453
|
lo,
|
|
2454
2454
|
{
|
|
2455
2455
|
onLoadMore: () => Jt(re.pageIndex),
|
|
2456
|
-
isLoading:
|
|
2456
|
+
isLoading: hs
|
|
2457
2457
|
}
|
|
2458
2458
|
)
|
|
2459
2459
|
] })
|
|
@@ -2463,12 +2463,12 @@ function $o({
|
|
|
2463
2463
|
export {
|
|
2464
2464
|
$o as DataTable,
|
|
2465
2465
|
Fo as DataTableColumnHeader,
|
|
2466
|
-
|
|
2466
|
+
no as DataTableFilter,
|
|
2467
2467
|
ao as DataTablePagination,
|
|
2468
2468
|
Mr as DataTableSkeleton,
|
|
2469
2469
|
ro as DataTableToolbar,
|
|
2470
2470
|
Dr as fuzzyFilter,
|
|
2471
2471
|
Vo as groupPreservingGlobalFilter,
|
|
2472
|
-
|
|
2472
|
+
Un as multiSelectFilter,
|
|
2473
2473
|
Lo as useReactTable
|
|
2474
2474
|
};
|