@duro-app/ui 5.11.0 → 5.12.0
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/Table-ColfpgKV.js.map +1 -1
- package/dist/compiler-runtime-BuugS4D0.js.map +1 -1
- package/dist/components/Alert/Alert.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +2 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/styles.css.d.ts +1 -0
- package/dist/components/Button/styles.css.d.ts.map +1 -1
- package/dist/components/Callout/Callout.d.ts.map +1 -1
- package/dist/components/Callout/styles.css.d.ts +3 -0
- package/dist/components/Callout/styles.css.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/DetailPanel/DetailPanel.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -17
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +4 -0
- package/dist/components/Dialog/Dialog.stories.d.ts.map +1 -1
- package/dist/components/Dialog/native.css.d.ts +82 -0
- package/dist/components/Dialog/native.css.d.ts.map +1 -0
- package/dist/components/Dialog/parts.css.d.ts +82 -0
- package/dist/components/Dialog/parts.css.d.ts.map +1 -0
- package/dist/components/Dialog/parts.d.ts +35 -0
- package/dist/components/Dialog/parts.d.ts.map +1 -0
- package/dist/components/Dialog/styles.css.d.ts +1 -74
- package/dist/components/Dialog/styles.css.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/styles.css.d.ts +2 -0
- package/dist/components/Drawer/styles.css.d.ts.map +1 -1
- package/dist/components/Grid/styles.css.d.ts +1 -0
- package/dist/components/Grid/styles.css.d.ts.map +1 -1
- package/dist/components/Icon/Icon.d.ts +3 -9
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/geometry.d.ts +60 -0
- package/dist/components/Icon/geometry.d.ts.map +1 -0
- package/dist/components/Icon/types.d.ts +15 -0
- package/dist/components/Icon/types.d.ts.map +1 -0
- package/dist/components/Input/Input.d.ts +5 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/styles.css.d.ts +1 -0
- package/dist/components/Input/styles.css.d.ts.map +1 -1
- package/dist/components/LinkButton/styles.css.d.ts +1 -0
- package/dist/components/LinkButton/styles.css.d.ts.map +1 -1
- package/dist/components/Meter/styles.css.d.ts +1 -0
- package/dist/components/Meter/styles.css.d.ts.map +1 -1
- package/dist/components/PageShell/styles.css.d.ts +2 -0
- package/dist/components/PageShell/styles.css.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -17
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +3 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts.map +1 -1
- package/dist/components/RadioGroup/group.d.ts +31 -0
- package/dist/components/RadioGroup/group.d.ts.map +1 -0
- package/dist/components/RadioGroup/styles.css.d.ts +10 -0
- package/dist/components/RadioGroup/styles.css.d.ts.map +1 -1
- package/dist/components/ScrollArea/styles.css.d.ts +1 -0
- package/dist/components/ScrollArea/styles.css.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -6
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.types.d.ts +6 -0
- package/dist/components/Spinner/Spinner.types.d.ts.map +1 -0
- package/dist/components/Spinner/ring.css.d.ts +39 -0
- package/dist/components/Spinner/ring.css.d.ts.map +1 -0
- package/dist/components/Spinner/styles.css.d.ts +1 -28
- package/dist/components/Spinner/styles.css.d.ts.map +1 -1
- package/dist/components/StatusIcon/StatusIcon.d.ts.map +1 -1
- package/dist/components/StatusIcon/styles.css.d.ts +3 -0
- package/dist/components/StatusIcon/styles.css.d.ts.map +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -18
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.types.d.ts +18 -0
- package/dist/components/Switch/Switch.types.d.ts.map +1 -0
- package/dist/components/TableOfContents/styles.css.d.ts +1 -0
- package/dist/components/TableOfContents/styles.css.d.ts.map +1 -1
- package/dist/components/Textarea/styles.css.d.ts +1 -0
- package/dist/components/Textarea/styles.css.d.ts.map +1 -1
- package/dist/components/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/Toggle/styles.css.d.ts +11 -2
- package/dist/components/Toggle/styles.css.d.ts.map +1 -1
- package/dist/components/VirtualTable/styles.css.d.ts +6 -0
- package/dist/components/VirtualTable/styles.css.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +4299 -3566
- package/dist/index.js.map +1 -1
- package/dist/shared/portal/hostRegistry.d.ts +33 -0
- package/dist/shared/portal/hostRegistry.d.ts.map +1 -0
- package/dist/shared/useOverlayOpenState.d.ts +40 -0
- package/dist/shared/useOverlayOpenState.d.ts.map +1 -0
- package/dist/table.js +141 -135
- package/dist/table.js.map +1 -1
- package/package.json +34 -4
- package/src/components/Alert/Alert.tsx +14 -2
- package/src/components/Button/Button.tsx +3 -2
- package/src/components/Button/styles.css.ts +2 -0
- package/src/components/Callout/Callout.tsx +17 -3
- package/src/components/Callout/styles.css.ts +5 -0
- package/src/components/Checkbox/Checkbox.native.tsx +67 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -50
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +3 -0
- package/src/components/DetailPanel/DetailPanel.tsx +9 -45
- package/src/components/Dialog/Dialog.native.tsx +296 -0
- package/src/components/Dialog/Dialog.stories.tsx +71 -0
- package/src/components/Dialog/Dialog.tsx +41 -130
- package/src/components/Dialog/native.css.ts +78 -0
- package/src/components/Dialog/parts.css.ts +101 -0
- package/src/components/Dialog/parts.tsx +61 -0
- package/src/components/Dialog/styles.css.ts +2 -89
- package/src/components/Drawer/Drawer.tsx +20 -49
- package/src/components/Drawer/styles.css.ts +4 -0
- package/src/components/Grid/styles.css.ts +2 -0
- package/src/components/Icon/Icon.native.tsx +54 -0
- package/src/components/Icon/Icon.tsx +19 -430
- package/src/components/Icon/geometry.ts +456 -0
- package/src/components/Icon/types.ts +74 -0
- package/src/components/Input/Input.tsx +8 -0
- package/src/components/Input/styles.css.ts +2 -0
- package/src/components/LinkButton/styles.css.ts +2 -0
- package/src/components/Meter/styles.css.ts +2 -0
- package/src/components/PageShell/styles.css.ts +4 -0
- package/src/components/RadioGroup/RadioGroup.meta.ts +1 -1
- package/src/components/RadioGroup/RadioGroup.native.tsx +48 -0
- package/src/components/RadioGroup/RadioGroup.stories.tsx +64 -1
- package/src/components/RadioGroup/RadioGroup.tsx +8 -83
- package/src/components/RadioGroup/group.tsx +85 -0
- package/src/components/RadioGroup/styles.css.ts +13 -0
- package/src/components/ScrollArea/styles.css.ts +2 -0
- package/src/components/Spinner/Spinner.native.tsx +37 -0
- package/src/components/Spinner/Spinner.tsx +6 -15
- package/src/components/Spinner/Spinner.types.ts +6 -0
- package/src/components/Spinner/ring.css.ts +45 -0
- package/src/components/Spinner/styles.css.ts +2 -32
- package/src/components/StatusIcon/StatusIcon.tsx +13 -2
- package/src/components/StatusIcon/styles.css.ts +5 -0
- package/src/components/Switch/Switch.native.tsx +45 -0
- package/src/components/Switch/Switch.tsx +22 -44
- package/src/components/Switch/Switch.types.ts +18 -0
- package/src/components/TableOfContents/styles.css.ts +2 -0
- package/src/components/Textarea/styles.css.ts +2 -0
- package/src/components/ThemeProvider/ThemeProvider.native.tsx +70 -10
- package/src/components/Toggle/Toggle.tsx +2 -0
- package/src/components/Toggle/styles.css.ts +14 -2
- package/src/components/VirtualTable/styles.css.ts +12 -0
- package/src/index.native.ts +28 -1
- package/src/native-guard/globals.d.ts +10 -0
- package/src/native-guard/react-dom.d.ts +3 -0
- package/src/shared/accessibilityFocus.native.ts +23 -0
- package/src/shared/portal/OverlayModal.native.tsx +51 -0
- package/src/shared/portal/PortalHost.native.tsx +102 -0
- package/src/shared/portal/hostRegistry.ts +76 -0
- package/src/shared/portal/themeScope.native.ts +18 -0
- package/src/shared/safeArea.native.ts +22 -0
- package/src/shared/useOverlayOpenState.ts +128 -0
- package/dist/components/ThemeProvider/ThemeProvider.native.d.ts +0 -10
- package/dist/components/ThemeProvider/ThemeProvider.native.d.ts.map +0 -1
- package/dist/index.native.d.ts +0 -33
- package/dist/index.native.d.ts.map +0 -1
- package/dist/platform.native.d.ts +0 -2
- package/dist/platform.native.d.ts.map +0 -1
package/dist/table.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { M as F, m as
|
|
1
|
+
import { M as F, m as gt, R as it, H as kt, n as pt, o as bt, p as ft, q as mt, b as ht, t as yt, r as St, v as Tt } from "./Table-ColfpgKV.js";
|
|
2
2
|
import { jsx as u, jsxs as q } from "react/jsx-runtime";
|
|
3
3
|
import { c as H, m as p, d as b } from "./compiler-runtime-BuugS4D0.js";
|
|
4
|
-
import { flexRender as E, useReactTable as
|
|
5
|
-
import { useState as G, useCallback as wt, useRef as K, useEffect as Z, useLayoutEffect as
|
|
6
|
-
import { useVirtualizer as
|
|
4
|
+
import { flexRender as E, useReactTable as rt, getPaginationRowModel as Ct, getFilteredRowModel as vt, getSortedRowModel as at, getCoreRowModel as st } from "@tanstack/react-table";
|
|
5
|
+
import { useState as G, useCallback as wt, useRef as K, useEffect as Z, useLayoutEffect as zt } from "react";
|
|
6
|
+
import { useVirtualizer as Vt } from "@tanstack/react-virtual";
|
|
7
7
|
const A = {
|
|
8
8
|
root: {
|
|
9
9
|
"display-k1xSpc": "display-x78zum5",
|
|
@@ -54,22 +54,22 @@ function dt(o) {
|
|
|
54
54
|
t[0] !== e ? (n = e.getState(), t[0] = e, t[1] = n) : n = t[1];
|
|
55
55
|
const {
|
|
56
56
|
pageIndex: l,
|
|
57
|
-
pageSize:
|
|
57
|
+
pageSize: i
|
|
58
58
|
} = n.pagination;
|
|
59
|
-
let
|
|
60
|
-
t[2] !== e ? (
|
|
61
|
-
const s =
|
|
62
|
-
if (e.getFilteredRowModel().rows.length <=
|
|
59
|
+
let r;
|
|
60
|
+
t[2] !== e ? (r = e.getPageCount(), t[2] = e, t[3] = r) : r = t[3];
|
|
61
|
+
const s = r;
|
|
62
|
+
if (e.getFilteredRowModel().rows.length <= i)
|
|
63
63
|
return null;
|
|
64
64
|
let k;
|
|
65
65
|
t[4] !== e ? (k = !e.getCanPreviousPage() && A.buttonDisabled, t[4] = e, t[5] = k) : k = t[5];
|
|
66
66
|
let c;
|
|
67
67
|
t[6] !== k ? (c = [A.button, k], t[6] = k, t[7] = c) : c = t[7];
|
|
68
|
-
let
|
|
69
|
-
t[8] !== e ? (
|
|
68
|
+
let g, y;
|
|
69
|
+
t[8] !== e ? (g = () => e.previousPage(), y = e.getCanPreviousPage(), t[8] = e, t[9] = g, t[10] = y) : (g = t[9], y = t[10]);
|
|
70
70
|
const T = !y;
|
|
71
71
|
let f;
|
|
72
|
-
t[11] !== c || t[12] !==
|
|
72
|
+
t[11] !== c || t[12] !== g || t[13] !== T ? (f = /* @__PURE__ */ u("button", { "data-element-src": "Table/Pagination.tsx:65", ...p(b.button, c), onClick: g, disabled: T, type: "button", children: "Previous" }), t[11] = c, t[12] = g, t[13] = T, t[14] = f) : f = t[14];
|
|
73
73
|
const m = l + 1;
|
|
74
74
|
let S;
|
|
75
75
|
t[15] !== s || t[16] !== m ? (S = /* @__PURE__ */ q("span", { "data-element-src": "Table/Pagination.tsx:72", ...p(b.span, A.pageInfo), children: [
|
|
@@ -79,13 +79,13 @@ function dt(o) {
|
|
|
79
79
|
] }), t[15] = s, t[16] = m, t[17] = S) : S = t[17];
|
|
80
80
|
let h;
|
|
81
81
|
t[18] !== e ? (h = !e.getCanNextPage() && A.buttonDisabled, t[18] = e, t[19] = h) : h = t[19];
|
|
82
|
-
let
|
|
83
|
-
t[20] !== h ? (
|
|
82
|
+
let z;
|
|
83
|
+
t[20] !== h ? (z = [A.button, h], t[20] = h, t[21] = z) : z = t[21];
|
|
84
84
|
let v, M;
|
|
85
85
|
t[22] !== e ? (v = () => e.nextPage(), M = e.getCanNextPage(), t[22] = e, t[23] = v, t[24] = M) : (v = t[23], M = t[24]);
|
|
86
|
-
const
|
|
86
|
+
const V = !M;
|
|
87
87
|
let a;
|
|
88
|
-
t[25] !==
|
|
88
|
+
t[25] !== z || t[26] !== v || t[27] !== V ? (a = /* @__PURE__ */ u("button", { "data-element-src": "Table/Pagination.tsx:75", ...p(b.button, z), onClick: v, disabled: V, type: "button", children: "Next" }), t[25] = z, t[26] = v, t[27] = V, t[28] = a) : a = t[28];
|
|
89
89
|
let R;
|
|
90
90
|
return t[29] !== S || t[30] !== a || t[31] !== f ? (R = /* @__PURE__ */ q("div", { "data-element-src": "Table/Pagination.tsx:64", ...p(b.div, A.root), children: [
|
|
91
91
|
f,
|
|
@@ -115,18 +115,18 @@ const _ = {
|
|
|
115
115
|
$$css: "Table/SortIndicator.tsx:24"
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
-
function
|
|
118
|
+
function $t(o) {
|
|
119
119
|
const t = H.c(5), {
|
|
120
120
|
column: e
|
|
121
121
|
} = o;
|
|
122
122
|
if (!e.getCanSort())
|
|
123
123
|
return null;
|
|
124
124
|
const n = e.getIsSorted(), l = n ? _.active : _.inactive;
|
|
125
|
-
let
|
|
126
|
-
t[0] !== l ? (
|
|
127
|
-
const
|
|
125
|
+
let i;
|
|
126
|
+
t[0] !== l ? (i = [_.root, l], t[0] = l, t[1] = i) : i = t[1];
|
|
127
|
+
const r = n === "asc" ? "▲" : n === "desc" ? "▼" : "⇅";
|
|
128
128
|
let s;
|
|
129
|
-
return t[2] !==
|
|
129
|
+
return t[2] !== i || t[3] !== r ? (s = /* @__PURE__ */ u("span", { "data-element-src": "Table/SortIndicator.tsx:48", ...p(b.span, i), "data-sort-indicator": "", children: r }), t[2] = i, t[3] = r, t[4] = s) : s = t[4], s;
|
|
130
130
|
}
|
|
131
131
|
const Mt = {
|
|
132
132
|
input: {
|
|
@@ -156,49 +156,49 @@ function Rt(o) {
|
|
|
156
156
|
return null;
|
|
157
157
|
let l;
|
|
158
158
|
t[0] !== e ? (l = e.getFilterValue() ?? "", t[0] = e, t[1] = l) : l = t[1];
|
|
159
|
-
const
|
|
160
|
-
let
|
|
161
|
-
t[2] !== e ? (
|
|
159
|
+
const i = l;
|
|
160
|
+
let r;
|
|
161
|
+
t[2] !== e ? (r = (k) => e.setFilterValue(k.target.value || void 0), t[2] = e, t[3] = r) : r = t[3];
|
|
162
162
|
const s = n ?? "Filter...";
|
|
163
163
|
let C;
|
|
164
|
-
return t[4] !==
|
|
164
|
+
return t[4] !== i || t[5] !== r || t[6] !== s ? (C = /* @__PURE__ */ u("input", { "data-element-src": "Table/ColumnFilter.tsx:39", ...p(b.input, Mt.input), type: "text", value: i, onChange: r, placeholder: s, dir: "auto" }), t[4] = i, t[5] = r, t[6] = s, t[7] = C) : C = t[7], C;
|
|
165
165
|
}
|
|
166
166
|
function tt(o) {
|
|
167
167
|
const t = H.c(21), {
|
|
168
168
|
options: e,
|
|
169
169
|
value: n,
|
|
170
170
|
onChange: l,
|
|
171
|
-
label:
|
|
172
|
-
} = o,
|
|
171
|
+
label: i
|
|
172
|
+
} = o, r = i === void 0 ? "Sort by" : i;
|
|
173
173
|
let s;
|
|
174
174
|
t[0] !== e || t[1] !== n ? (s = n ? e.find((m) => m.id === n.id) : null, t[0] = e, t[1] = n, t[2] = s) : s = t[2];
|
|
175
|
-
const C = s, k = C ? `${
|
|
175
|
+
const C = s, k = C ? `${r}: ${C.label} ${n.desc ? "↓" : "↑"}` : r;
|
|
176
176
|
let c;
|
|
177
177
|
t[3] !== k ? (c = /* @__PURE__ */ u(F.Trigger, { children: k }), t[3] = k, t[4] = c) : c = t[4];
|
|
178
|
-
let
|
|
178
|
+
let g;
|
|
179
179
|
if (t[5] !== l || t[6] !== e || t[7] !== n) {
|
|
180
180
|
let m;
|
|
181
181
|
t[9] !== l || t[10] !== n ? (m = (S) => {
|
|
182
|
-
const h = n?.id === S.id,
|
|
182
|
+
const h = n?.id === S.id, z = h ? !n.desc : !1;
|
|
183
183
|
return /* @__PURE__ */ q(F.Item, { onClick: () => l({
|
|
184
184
|
id: S.id,
|
|
185
|
-
desc:
|
|
185
|
+
desc: z
|
|
186
186
|
}), children: [
|
|
187
187
|
S.label,
|
|
188
188
|
h ? ` ${n.desc ? "↓" : "↑"}` : ""
|
|
189
189
|
] }, S.id);
|
|
190
|
-
}, t[9] = l, t[10] = n, t[11] = m) : m = t[11],
|
|
190
|
+
}, t[9] = l, t[10] = n, t[11] = m) : m = t[11], g = e.map(m), t[5] = l, t[6] = e, t[7] = n, t[8] = g;
|
|
191
191
|
} else
|
|
192
|
-
|
|
192
|
+
g = t[8];
|
|
193
193
|
let y;
|
|
194
194
|
t[12] !== l || t[13] !== n ? (y = n !== null && /* @__PURE__ */ u(F.Item, { onClick: () => l(null), children: "Clear sort" }), t[12] = l, t[13] = n, t[14] = y) : y = t[14];
|
|
195
195
|
let T;
|
|
196
|
-
t[15] !==
|
|
197
|
-
|
|
196
|
+
t[15] !== g || t[16] !== y ? (T = /* @__PURE__ */ q(F.Popup, { children: [
|
|
197
|
+
g,
|
|
198
198
|
y
|
|
199
|
-
] }), t[15] =
|
|
199
|
+
] }), t[15] = g, t[16] = y, t[17] = T) : T = t[17];
|
|
200
200
|
let f;
|
|
201
|
-
return t[18] !== c || t[19] !== T ? (f = /* @__PURE__ */ u("div", { "data-element-src": "Table/SortChip.tsx:32", ...p(b.div,
|
|
201
|
+
return t[18] !== c || t[19] !== T ? (f = /* @__PURE__ */ u("div", { "data-element-src": "Table/SortChip.tsx:32", ...p(b.div, gt.sortChip), children: /* @__PURE__ */ q(F.Root, { children: [
|
|
202
202
|
c,
|
|
203
203
|
T
|
|
204
204
|
] }) }), t[18] = c, t[19] = T, t[20] = f) : f = t[20], f;
|
|
@@ -209,46 +209,46 @@ function ct(o) {
|
|
|
209
209
|
table: e,
|
|
210
210
|
variant: n,
|
|
211
211
|
size: l,
|
|
212
|
-
responsive:
|
|
213
|
-
minColumnWidth:
|
|
212
|
+
responsive: i,
|
|
213
|
+
minColumnWidth: r,
|
|
214
214
|
sortChip: s,
|
|
215
215
|
pagination: C,
|
|
216
216
|
rowKey: k,
|
|
217
217
|
onRowClick: c,
|
|
218
|
-
rowAriaLabel:
|
|
219
|
-
} = o, y = n === void 0 ? "default" : n, T = l === void 0 ? "md" : l, f =
|
|
218
|
+
rowAriaLabel: g
|
|
219
|
+
} = o, y = n === void 0 ? "default" : n, T = l === void 0 ? "md" : l, f = i === void 0 ? !0 : i;
|
|
220
220
|
let m;
|
|
221
221
|
t[0] !== s || t[1] !== e ? (m = s ? qt(e) : void 0, t[0] = s, t[1] = e, t[2] = m) : m = t[2];
|
|
222
222
|
const S = m;
|
|
223
223
|
let h;
|
|
224
224
|
t[3] !== C || t[4] !== e ? (h = C ? /* @__PURE__ */ u(dt, { table: e }) : void 0, t[3] = C, t[4] = e, t[5] = h) : h = t[5];
|
|
225
|
-
const
|
|
225
|
+
const z = h;
|
|
226
226
|
let v;
|
|
227
227
|
t[6] !== e ? (v = e.getHeaderGroups().map(jt), t[6] = e, t[7] = v) : v = t[7];
|
|
228
228
|
let M;
|
|
229
229
|
t[8] !== v ? (M = /* @__PURE__ */ u(pt, { children: v }), t[8] = v, t[9] = M) : M = t[9];
|
|
230
|
-
let
|
|
231
|
-
if (t[10] !== c || t[11] !==
|
|
230
|
+
let V;
|
|
231
|
+
if (t[10] !== c || t[11] !== g || t[12] !== k || t[13] !== e) {
|
|
232
232
|
let j;
|
|
233
|
-
t[15] !== c || t[16] !==
|
|
234
|
-
const O = k?.(
|
|
235
|
-
return /* @__PURE__ */ u(
|
|
236
|
-
}, t[15] = c, t[16] =
|
|
233
|
+
t[15] !== c || t[16] !== g || t[17] !== k ? (j = (B) => {
|
|
234
|
+
const O = k?.(B) ?? B.id;
|
|
235
|
+
return /* @__PURE__ */ u(it, { onClick: c ? () => c(B) : void 0, "aria-label": g?.(B), children: B.getVisibleCells().map(It) }, O);
|
|
236
|
+
}, t[15] = c, t[16] = g, t[17] = k, t[18] = j) : j = t[18], V = e.getRowModel().rows.map(j), t[10] = c, t[11] = g, t[12] = k, t[13] = e, t[14] = V;
|
|
237
237
|
} else
|
|
238
|
-
|
|
238
|
+
V = t[14];
|
|
239
239
|
let a;
|
|
240
|
-
t[19] !==
|
|
240
|
+
t[19] !== V ? (a = /* @__PURE__ */ u(bt, { children: V }), t[19] = V, t[20] = a) : a = t[20];
|
|
241
241
|
let R;
|
|
242
|
-
return t[21] !==
|
|
242
|
+
return t[21] !== r || t[22] !== z || t[23] !== f || t[24] !== T || t[25] !== S || t[26] !== M || t[27] !== a || t[28] !== y ? (R = /* @__PURE__ */ q(ft, { variant: y, size: T, responsive: f, minColumnWidth: r, sortChip: S, pagination: z, children: [
|
|
243
243
|
M,
|
|
244
244
|
a
|
|
245
|
-
] }), t[21] =
|
|
245
|
+
] }), t[21] = r, t[22] = z, t[23] = f, t[24] = T, t[25] = S, t[26] = M, t[27] = a, t[28] = y, t[29] = R) : R = t[29], R;
|
|
246
246
|
}
|
|
247
247
|
function It(o) {
|
|
248
248
|
return /* @__PURE__ */ u(mt, { isActions: o.column.columnDef.meta?.isActions === !0, children: E(o.column.columnDef.cell, o.getContext()) }, o.id);
|
|
249
249
|
}
|
|
250
250
|
function jt(o) {
|
|
251
|
-
return /* @__PURE__ */ u(
|
|
251
|
+
return /* @__PURE__ */ u(it, { children: o.headers.map(Wt) }, o.id);
|
|
252
252
|
}
|
|
253
253
|
function Wt(o) {
|
|
254
254
|
const t = o.column.columnDef, e = t.meta, n = typeof t.header == "string" ? t.header : void 0, l = e?.stackLabel ?? n ?? "";
|
|
@@ -257,10 +257,10 @@ function Wt(o) {
|
|
|
257
257
|
ct.displayName = "FromTanstack";
|
|
258
258
|
function qt(o) {
|
|
259
259
|
const t = o.getAllColumns().filter((l) => l.getCanSort()).map((l) => {
|
|
260
|
-
const
|
|
260
|
+
const i = typeof l.columnDef.header == "string" ? l.columnDef.header : l.id;
|
|
261
261
|
return {
|
|
262
262
|
id: l.id,
|
|
263
|
-
label: l.columnDef.meta?.stackLabel ??
|
|
263
|
+
label: l.columnDef.meta?.stackLabel ?? i
|
|
264
264
|
};
|
|
265
265
|
});
|
|
266
266
|
if (t.length === 0) return null;
|
|
@@ -277,18 +277,18 @@ function Yt(o, t, e = {}) {
|
|
|
277
277
|
const {
|
|
278
278
|
enableSorting: n = !1,
|
|
279
279
|
enableFiltering: l = !1,
|
|
280
|
-
enableRowSelection:
|
|
281
|
-
onRowSelectionChange:
|
|
282
|
-
} = e, s = e.pagination != null, [C, k] = G([]), [c,
|
|
280
|
+
enableRowSelection: i = !1,
|
|
281
|
+
onRowSelectionChange: r
|
|
282
|
+
} = e, s = e.pagination != null, [C, k] = G([]), [c, g] = G([]), [y, T] = G({
|
|
283
283
|
pageIndex: e.pagination?.pageIndex ?? 0,
|
|
284
284
|
pageSize: e.pagination?.pageSize ?? 10
|
|
285
285
|
}), [f, m] = G({}), S = wt((h) => {
|
|
286
|
-
m((
|
|
287
|
-
const v = typeof h == "function" ? h(
|
|
288
|
-
return
|
|
286
|
+
m((z) => {
|
|
287
|
+
const v = typeof h == "function" ? h(z) : h;
|
|
288
|
+
return r?.(v), v;
|
|
289
289
|
});
|
|
290
|
-
}, [
|
|
291
|
-
return
|
|
290
|
+
}, [r]);
|
|
291
|
+
return rt({
|
|
292
292
|
data: o,
|
|
293
293
|
columns: t,
|
|
294
294
|
state: {
|
|
@@ -302,10 +302,10 @@ function Yt(o, t, e = {}) {
|
|
|
302
302
|
getFilteredRowModel: vt(),
|
|
303
303
|
getPaginationRowModel: Ct(),
|
|
304
304
|
onSortingChange: k,
|
|
305
|
-
onColumnFiltersChange:
|
|
305
|
+
onColumnFiltersChange: g,
|
|
306
306
|
onPaginationChange: T,
|
|
307
307
|
enableSorting: n,
|
|
308
|
-
enableRowSelection: typeof
|
|
308
|
+
enableRowSelection: typeof i == "function" ? i : !!i,
|
|
309
309
|
onRowSelectionChange: S,
|
|
310
310
|
// When pagination is disabled, set a very large page size to show all rows
|
|
311
311
|
...!s && {
|
|
@@ -313,44 +313,47 @@ function Yt(o, t, e = {}) {
|
|
|
313
313
|
}
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const Bt = {
|
|
317
317
|
"overflowY-kORKVm": "overflowY-x1odjw0f",
|
|
318
318
|
"overscrollBehavior-kZeWKH": "overscrollBehavior-xish69e",
|
|
319
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
320
|
-
},
|
|
319
|
+
$$css: "VirtualTable/styles.css.ts:27"
|
|
320
|
+
}, Pt = {
|
|
321
321
|
"position-kVAEAm": "position-x1n2onr6",
|
|
322
322
|
"width-kzqmXN": "width-xh8yej3",
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
"boxSizing-kB7OPa": "boxSizing-x9f619",
|
|
324
|
+
$$css: "VirtualTable/styles.css.ts:70"
|
|
325
|
+
}, Dt = {
|
|
325
326
|
"position-kVAEAm": "position-x10l6tqk",
|
|
326
327
|
"top-k87sOh": "top-x13vifvy",
|
|
327
328
|
"left-kbCHJM": "left-xu96u03",
|
|
328
329
|
"transform-k3aq6I": "transform-xsqj5wx",
|
|
329
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
330
|
+
$$css: "VirtualTable/styles.css.ts:93"
|
|
330
331
|
}, At = {
|
|
331
332
|
"flexShrink-kmuXW": "flexShrink-xs83m0k",
|
|
332
333
|
"flexBasis-kCS8Yb": "flexBasis-x1r8uery",
|
|
333
334
|
"minWidth-k7Eaqz": "minWidth-xeuugli",
|
|
334
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
335
|
-
},
|
|
335
|
+
$$css: "VirtualTable/styles.css.ts:112"
|
|
336
|
+
}, x = {
|
|
336
337
|
wrap: {
|
|
337
338
|
"position-kVAEAm": "position-x1n2onr6",
|
|
338
339
|
"width-kzqmXN": "width-xh8yej3",
|
|
340
|
+
"boxSizing-kB7OPa": "boxSizing-x9f619",
|
|
339
341
|
$$css: "VirtualTable/styles.css.ts:9"
|
|
340
342
|
},
|
|
341
343
|
scroll: {
|
|
342
344
|
"position-kVAEAm": "position-x1n2onr6",
|
|
343
345
|
"width-kzqmXN": "width-xh8yej3",
|
|
346
|
+
"boxSizing-kB7OPa": "boxSizing-x9f619",
|
|
344
347
|
"borderWidth-kMzoRj": "borderWidth-x1qc3l2q",
|
|
345
348
|
"borderStyle-ksu8eU": "borderStyle-x1y0btm7",
|
|
346
349
|
"borderColor-kVAM5u": "borderColor-x15ykms2",
|
|
347
350
|
"borderRadius-kaIpWk": "borderRadius-xwbokb3",
|
|
348
351
|
"backgroundColor-kWkggS": "backgroundColor-xuw63hu",
|
|
349
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
352
|
+
$$css: "VirtualTable/styles.css.ts:15"
|
|
350
353
|
},
|
|
351
|
-
scrollMax: (o) => [
|
|
354
|
+
scrollMax: (o) => [Bt, {
|
|
352
355
|
"maxHeight-kskxy": o != null ? "maxHeight-x1jols5v" : o,
|
|
353
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
356
|
+
$$css: "VirtualTable/styles.css.ts:27"
|
|
354
357
|
}, {
|
|
355
358
|
"--x-maxHeight": ((t) => typeof t == "number" ? t + "px" : t ?? void 0)(o)
|
|
356
359
|
}],
|
|
@@ -359,7 +362,7 @@ const Dt = {
|
|
|
359
362
|
"top-k87sOh": "top-x13vifvy",
|
|
360
363
|
"zIndex-kY2c9j": "zIndex-xqft9t",
|
|
361
364
|
"backgroundColor-kWkggS": "backgroundColor-xuw63hu",
|
|
362
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
365
|
+
$$css: "VirtualTable/styles.css.ts:32"
|
|
363
366
|
},
|
|
364
367
|
headRow: {
|
|
365
368
|
"display-k1xSpc": "display-x78zum5",
|
|
@@ -367,7 +370,7 @@ const Dt = {
|
|
|
367
370
|
"borderBottomWidth-kt9PQ7": "borderBottomWidth-x12yxxv5",
|
|
368
371
|
"borderBottomStyle-kfdmCh": "borderBottomStyle-x1q0q8m5",
|
|
369
372
|
"borderBottomColor-kL6WhQ": "borderBottomColor-x19cyuh1",
|
|
370
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
373
|
+
$$css: "VirtualTable/styles.css.ts:38"
|
|
371
374
|
},
|
|
372
375
|
headCell: {
|
|
373
376
|
"display-k1xSpc": "display-x78zum5",
|
|
@@ -384,22 +387,22 @@ const Dt = {
|
|
|
384
387
|
"textTransform-kP9fke": "textTransform-xtvhhri",
|
|
385
388
|
"letterSpacing-kb6lSQ": "letterSpacing-x3gc2hl",
|
|
386
389
|
"color-kMwMTN": "color-x4opovt",
|
|
387
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
390
|
+
$$css: "VirtualTable/styles.css.ts:45"
|
|
388
391
|
},
|
|
389
392
|
headCellSortable: {
|
|
390
393
|
"cursor-kkrTdU": "cursor-x1ypdohk",
|
|
391
394
|
"userSelect-kfSwDN": "userSelect-x87ps6o",
|
|
392
395
|
"color-kMwMTN": "color-x4opovt color-xtolcfe",
|
|
393
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
396
|
+
$$css: "VirtualTable/styles.css.ts:61"
|
|
394
397
|
},
|
|
395
398
|
sortMark: {
|
|
396
399
|
"fontSize-kGuDYH": "fontSize-x1f81oxx",
|
|
397
400
|
"color-kMwMTN": "color-xf715ks",
|
|
398
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
401
|
+
$$css: "VirtualTable/styles.css.ts:66"
|
|
399
402
|
},
|
|
400
|
-
bodyTotal: (o) => [
|
|
403
|
+
bodyTotal: (o) => [Pt, {
|
|
401
404
|
"height-kZKoxP": o != null ? "height-x16ye13r" : o,
|
|
402
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
405
|
+
$$css: "VirtualTable/styles.css.ts:70"
|
|
403
406
|
}, {
|
|
404
407
|
"--x-height": ((t) => typeof t == "number" ? t + "px" : t ?? void 0)(o)
|
|
405
408
|
}],
|
|
@@ -408,17 +411,18 @@ const Dt = {
|
|
|
408
411
|
"flexDirection-kXwgrk": "flexDirection-x1q0g3np",
|
|
409
412
|
"alignItems-kGNEyG": "alignItems-x6s0dn4",
|
|
410
413
|
"width-kzqmXN": "width-xh8yej3",
|
|
414
|
+
"boxSizing-kB7OPa": "boxSizing-x9f619",
|
|
411
415
|
"borderBottomWidth-kt9PQ7": "borderBottomWidth-x12yxxv5",
|
|
412
416
|
"borderBottomStyle-kfdmCh": "borderBottomStyle-x1q0q8m5",
|
|
413
417
|
"borderBottomColor-kL6WhQ": "borderBottomColor-x19cyuh1",
|
|
414
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
418
|
+
$$css: "VirtualTable/styles.css.ts:77"
|
|
415
419
|
},
|
|
416
420
|
rowClickable: {
|
|
417
421
|
"cursor-kkrTdU": "cursor-x1ypdohk",
|
|
418
422
|
"backgroundColor-kWkggS": "backgroundColor-xjbqb8w backgroundColor-x14zl4n5",
|
|
419
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
423
|
+
$$css: "VirtualTable/styles.css.ts:88"
|
|
420
424
|
},
|
|
421
|
-
rowAbsolute: (o) => [
|
|
425
|
+
rowAbsolute: (o) => [Dt, {
|
|
422
426
|
"--x-transform": `translateY(${o}px)` != null ? `translateY(${o}px)` : void 0
|
|
423
427
|
}],
|
|
424
428
|
cell: {
|
|
@@ -432,38 +436,40 @@ const Dt = {
|
|
|
432
436
|
"overflow-kVQacm": "overflow-xb3r6kr",
|
|
433
437
|
"textOverflow-kg5iWk": "textOverflow-xlyipyv",
|
|
434
438
|
"whiteSpace-khDVqt": "whiteSpace-xuxw1ft",
|
|
435
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
439
|
+
$$css: "VirtualTable/styles.css.ts:99"
|
|
436
440
|
},
|
|
437
441
|
cellFlex: (o) => [At, {
|
|
438
442
|
"flexGrow-kzQI83": o != null ? "flexGrow-xw36f2b" : o,
|
|
439
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
443
|
+
$$css: "VirtualTable/styles.css.ts:112"
|
|
440
444
|
}, {
|
|
441
445
|
"--x-flexGrow": o ?? void 0
|
|
442
446
|
}],
|
|
443
447
|
stackScroll: {
|
|
444
448
|
"position-kVAEAm": "position-x1n2onr6",
|
|
445
449
|
"width-kzqmXN": "width-xh8yej3",
|
|
450
|
+
"boxSizing-kB7OPa": "boxSizing-x9f619",
|
|
446
451
|
"backgroundColor-kWkggS": "backgroundColor-xjbqb8w",
|
|
447
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
452
|
+
$$css: "VirtualTable/styles.css.ts:121"
|
|
448
453
|
},
|
|
449
454
|
stackBody: {
|
|
450
455
|
"display-k1xSpc": "display-x78zum5",
|
|
451
456
|
"flexDirection-kXwgrk": "flexDirection-xdt5ytf",
|
|
452
457
|
"gap-kOIVth": "gap-x175yhtj",
|
|
453
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
458
|
+
$$css: "VirtualTable/styles.css.ts:128"
|
|
454
459
|
},
|
|
455
460
|
stackRow: {
|
|
456
461
|
"display-k1xSpc": "display-x78zum5",
|
|
457
462
|
"flexDirection-kXwgrk": "flexDirection-xdt5ytf",
|
|
458
463
|
"gap-kOIVth": "gap-xl5ne8a",
|
|
459
464
|
"width-kzqmXN": "width-xh8yej3",
|
|
465
|
+
"boxSizing-kB7OPa": "boxSizing-x9f619",
|
|
460
466
|
"padding-kmVPX3": "padding-xlm5w08",
|
|
461
467
|
"borderWidth-kMzoRj": "borderWidth-x1qc3l2q",
|
|
462
468
|
"borderStyle-ksu8eU": "borderStyle-x1y0btm7",
|
|
463
469
|
"borderColor-kVAM5u": "borderColor-x15ykms2",
|
|
464
470
|
"borderRadius-kaIpWk": "borderRadius-x17rit4p",
|
|
465
471
|
"backgroundColor-kWkggS": "backgroundColor-xuw63hu",
|
|
466
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
472
|
+
$$css: "VirtualTable/styles.css.ts:133"
|
|
467
473
|
},
|
|
468
474
|
stackCell: {
|
|
469
475
|
"display-k1xSpc": "display-xrvj5dj",
|
|
@@ -473,18 +479,18 @@ const Dt = {
|
|
|
473
479
|
"fontFamily-kMv6JI": "fontFamily-xce2pww",
|
|
474
480
|
"fontSize-kGuDYH": "fontSize-x1tzajr0",
|
|
475
481
|
"color-kMwMTN": "color-x95150z",
|
|
476
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
482
|
+
$$css: "VirtualTable/styles.css.ts:147"
|
|
477
483
|
},
|
|
478
484
|
stackCellLabel: {
|
|
479
485
|
"color-kMwMTN": "color-x4opovt",
|
|
480
486
|
"fontWeight-k63SB2": "fontWeight-x120ksxs",
|
|
481
487
|
"fontSize-kGuDYH": "fontSize-x1f81oxx",
|
|
482
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
488
|
+
$$css: "VirtualTable/styles.css.ts:156"
|
|
483
489
|
},
|
|
484
490
|
stackCellValue: {
|
|
485
491
|
"minWidth-k7Eaqz": "minWidth-xeuugli",
|
|
486
492
|
"overflowWrap-kHjlTd": "overflowWrap-x1mzt3pk",
|
|
487
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
493
|
+
$$css: "VirtualTable/styles.css.ts:161"
|
|
488
494
|
},
|
|
489
495
|
empty: {
|
|
490
496
|
"paddingTop-kLKAdn": "paddingTop-x1v4wg84",
|
|
@@ -493,7 +499,7 @@ const Dt = {
|
|
|
493
499
|
"color-kMwMTN": "color-x4opovt",
|
|
494
500
|
"fontFamily-kMv6JI": "fontFamily-xce2pww",
|
|
495
501
|
"fontSize-kGuDYH": "fontSize-x1tzajr0",
|
|
496
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
502
|
+
$$css: "VirtualTable/styles.css.ts:165"
|
|
497
503
|
},
|
|
498
504
|
pos: {
|
|
499
505
|
"position-kVAEAm": "position-x10l6tqk",
|
|
@@ -512,66 +518,66 @@ const Dt = {
|
|
|
512
518
|
"fontFamily-kMv6JI": "fontFamily-xce2pww",
|
|
513
519
|
"fontSize-kGuDYH": "fontSize-x1f81oxx",
|
|
514
520
|
"pointerEvents-kfzvcC": "pointerEvents-x47corl",
|
|
515
|
-
$$css: "VirtualTable/styles.css.ts:
|
|
521
|
+
$$css: "VirtualTable/styles.css.ts:174"
|
|
516
522
|
}
|
|
517
|
-
}, Gt = typeof window < "u" ?
|
|
523
|
+
}, Gt = typeof window < "u" ? zt : Z;
|
|
518
524
|
function Xt({
|
|
519
525
|
data: o,
|
|
520
526
|
columns: t,
|
|
521
527
|
sorting: e,
|
|
522
528
|
onSortingChange: n,
|
|
523
529
|
getRowId: l,
|
|
524
|
-
onRowClick:
|
|
525
|
-
rowLabel:
|
|
530
|
+
onRowClick: i,
|
|
531
|
+
rowLabel: r,
|
|
526
532
|
initialPage: s,
|
|
527
533
|
onVisiblePageChange: C,
|
|
528
534
|
rangeLabel: k,
|
|
529
535
|
pageSize: c = 50,
|
|
530
|
-
estimateRowHeight:
|
|
536
|
+
estimateRowHeight: g = yt.touchTarget,
|
|
531
537
|
maxHeight: y = "70vh",
|
|
532
538
|
virtualizeThreshold: T = 150,
|
|
533
539
|
stackBelow: f = "sm",
|
|
534
540
|
responsive: m = !0,
|
|
535
541
|
emptyLabel: S
|
|
536
542
|
}) {
|
|
537
|
-
const [h,
|
|
543
|
+
const [h, z] = G([]), V = rt({
|
|
538
544
|
data: o,
|
|
539
545
|
columns: t,
|
|
540
546
|
state: {
|
|
541
547
|
sorting: e ?? h
|
|
542
548
|
},
|
|
543
|
-
onSortingChange: n ??
|
|
549
|
+
onSortingChange: n ?? z,
|
|
544
550
|
getRowId: l,
|
|
545
551
|
getCoreRowModel: st(),
|
|
546
552
|
getSortedRowModel: at()
|
|
547
|
-
}), a =
|
|
553
|
+
}), a = V.getRowModel().rows, R = K(null), [j, B] = G(!1), O = typeof f == "number" ? f : ht[f];
|
|
548
554
|
Gt(() => {
|
|
549
555
|
if (!m) {
|
|
550
|
-
|
|
556
|
+
B(!1);
|
|
551
557
|
return;
|
|
552
558
|
}
|
|
553
559
|
const d = R.current;
|
|
554
560
|
if (!d || typeof ResizeObserver > "u") return;
|
|
555
561
|
const w = (I) => {
|
|
556
|
-
I > 0 &&
|
|
562
|
+
I > 0 && B(I < O);
|
|
557
563
|
};
|
|
558
564
|
w(d.getBoundingClientRect().width);
|
|
559
565
|
const W = new ResizeObserver((I) => {
|
|
560
|
-
const
|
|
561
|
-
if (
|
|
562
|
-
const L =
|
|
563
|
-
w(L ? L.inlineSize :
|
|
566
|
+
const $ = I[0];
|
|
567
|
+
if (!$) return;
|
|
568
|
+
const L = $.contentBoxSize?.[0];
|
|
569
|
+
w(L ? L.inlineSize : $.contentRect.width);
|
|
564
570
|
});
|
|
565
571
|
return W.observe(d), () => W.disconnect();
|
|
566
572
|
}, [m, O]);
|
|
567
|
-
const
|
|
573
|
+
const P = a.length > T && !j, et = K(null), Y = Vt({
|
|
568
574
|
count: a.length,
|
|
569
575
|
getScrollElement: () => et.current,
|
|
570
|
-
estimateSize: () =>
|
|
576
|
+
estimateSize: () => g,
|
|
571
577
|
overscan: 12
|
|
572
578
|
}), Q = K(!0);
|
|
573
579
|
Z(() => {
|
|
574
|
-
if (!
|
|
580
|
+
if (!P) {
|
|
575
581
|
Q.current = !1;
|
|
576
582
|
return;
|
|
577
583
|
}
|
|
@@ -582,57 +588,57 @@ function Xt({
|
|
|
582
588
|
Q.current = !1;
|
|
583
589
|
}, 300);
|
|
584
590
|
return () => clearTimeout(d);
|
|
585
|
-
}, [
|
|
586
|
-
const N = Y.getVirtualItems(), U = N[0]?.index ?? 0, ot = N.length ? N[N.length - 1].index : 0, lt = Math.max(1, Math.ceil(a.length / c)),
|
|
591
|
+
}, [P]);
|
|
592
|
+
const N = Y.getVirtualItems(), U = N[0]?.index ?? 0, ot = N.length ? N[N.length - 1].index : 0, lt = Math.max(1, Math.ceil(a.length / c)), D = Math.floor(Math.max(0, U) / c) + 1, X = {
|
|
587
593
|
from: a.length ? U + 1 : 0,
|
|
588
594
|
to: a.length ? ot + 1 : 0,
|
|
589
595
|
total: a.length,
|
|
590
|
-
page:
|
|
596
|
+
page: D,
|
|
591
597
|
pages: lt
|
|
592
598
|
}, J = K(null);
|
|
593
599
|
Z(() => {
|
|
594
|
-
if (!(!
|
|
600
|
+
if (!(!P || !C)) {
|
|
595
601
|
if (Q.current) {
|
|
596
|
-
J.current =
|
|
602
|
+
J.current = D;
|
|
597
603
|
return;
|
|
598
604
|
}
|
|
599
|
-
J.current !==
|
|
605
|
+
J.current !== D && (J.current = D, C({
|
|
600
606
|
from: a.length ? U + 1 : 0,
|
|
601
607
|
to: a.length ? ot + 1 : 0,
|
|
602
608
|
total: a.length,
|
|
603
|
-
page:
|
|
609
|
+
page: D,
|
|
604
610
|
pages: lt
|
|
605
611
|
}));
|
|
606
612
|
}
|
|
607
|
-
}, [
|
|
613
|
+
}, [D, P]);
|
|
608
614
|
const ut = (d) => {
|
|
609
615
|
const w = d.meta;
|
|
610
616
|
return typeof w?.stackLabel == "string" ? w.stackLabel : typeof w?.label == "string" ? w.label : typeof d.header == "string" ? d.header : "";
|
|
611
|
-
}, nt = (d, w, W, I) => j ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:242", role: "row", "aria-label":
|
|
612
|
-
const L = ut(
|
|
613
|
-
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:252", role: "cell", ...p(b.div,
|
|
614
|
-
L ? /* @__PURE__ */ u("span", { "data-element-src": "VirtualTable/VirtualTable.tsx:253", ...p(b.span,
|
|
615
|
-
/* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:254", ...p(b.div,
|
|
616
|
-
] },
|
|
617
|
-
}) }, d.id) : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:262", ref: I, "data-index": w, role: "row", "aria-label":
|
|
618
|
-
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:287", ref: R, ...p(b.div,
|
|
619
|
-
/* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:288", ref: et, role: "table", ...p(b.div, j ?
|
|
620
|
-
j ? null : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:297", role: "rowgroup", ...p(b.div,
|
|
617
|
+
}, nt = (d, w, W, I) => j ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:242", role: "row", "aria-label": r?.(d.original), onClick: i ? () => i(d.original) : void 0, ...p(b.div, x.stackRow, !!i && x.rowClickable), children: d.getVisibleCells().map(($) => {
|
|
618
|
+
const L = ut($.column.columnDef);
|
|
619
|
+
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:252", role: "cell", ...p(b.div, x.stackCell), children: [
|
|
620
|
+
L ? /* @__PURE__ */ u("span", { "data-element-src": "VirtualTable/VirtualTable.tsx:253", ...p(b.span, x.stackCellLabel), children: L }) : null,
|
|
621
|
+
/* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:254", ...p(b.div, x.stackCellValue), children: E($.column.columnDef.cell, $.getContext()) })
|
|
622
|
+
] }, $.id);
|
|
623
|
+
}) }, d.id) : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:262", ref: I, "data-index": w, role: "row", "aria-label": r?.(d.original), onClick: i ? () => i(d.original) : void 0, ...p(b.div, x.row, !!i && x.rowClickable, W), children: d.getVisibleCells().map(($) => /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:272", role: "cell", ...p(b.div, x.cell, x.cellFlex($.column.getSize())), children: E($.column.columnDef.cell, $.getContext()) }, $.id)) }, d.id), xt = k?.(X) ?? (a.length ? `${X.from}–${X.to} / ${X.total}` : "");
|
|
624
|
+
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:287", ref: R, ...p(b.div, x.wrap), children: [
|
|
625
|
+
/* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:288", ref: et, role: "table", ...p(b.div, j ? x.stackScroll : x.scroll, P && x.scrollMax(St(y))), children: [
|
|
626
|
+
j ? null : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:297", role: "rowgroup", ...p(b.div, x.head), children: V.getHeaderGroups().map((d) => /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:299", role: "row", ...p(b.div, x.headRow), children: d.headers.map((w) => {
|
|
621
627
|
const W = w.column, I = W.getIsSorted();
|
|
622
|
-
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:304", role: "columnheader", "aria-sort": I === "asc" ? "ascending" : I === "desc" ? "descending" : void 0, onClick: W.getCanSort() ? W.getToggleSortingHandler() : void 0, ...p(b.div,
|
|
628
|
+
return /* @__PURE__ */ q("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:304", role: "columnheader", "aria-sort": I === "asc" ? "ascending" : I === "desc" ? "descending" : void 0, onClick: W.getCanSort() ? W.getToggleSortingHandler() : void 0, ...p(b.div, x.headCell, W.getCanSort() && x.headCellSortable, x.cellFlex(w.getSize())), children: [
|
|
623
629
|
w.isPlaceholder ? null : E(W.columnDef.header, w.getContext()),
|
|
624
|
-
I ? /* @__PURE__ */ u("span", { "data-element-src": "VirtualTable/VirtualTable.tsx:325", ...p(b.span,
|
|
630
|
+
I ? /* @__PURE__ */ u("span", { "data-element-src": "VirtualTable/VirtualTable.tsx:325", ...p(b.span, x.sortMark), children: I === "asc" ? "↑" : "↓" }) : null
|
|
625
631
|
] }, w.id);
|
|
626
632
|
}) }, d.id)) }),
|
|
627
|
-
a.length === 0 ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:338", ...p(b.div,
|
|
633
|
+
a.length === 0 ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:338", ...p(b.div, x.empty), children: S }) : /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:340", role: "rowgroup", ...p(b.div, j ? x.stackBody : P ? x.bodyTotal(Y.getTotalSize()) : void 0), children: P ? N.map((d) => nt(a[d.index], d.index, x.rowAbsolute(d.start), Y.measureElement)) : a.map((d, w) => nt(d, w)) })
|
|
628
634
|
] }),
|
|
629
|
-
|
|
635
|
+
P && a.length > 0 ? /* @__PURE__ */ u("div", { "data-element-src": "VirtualTable/VirtualTable.tsx:365", "aria-live": "polite", ...p(b.div, x.pos), children: xt }) : null
|
|
630
636
|
] });
|
|
631
637
|
}
|
|
632
638
|
const Kt = {
|
|
633
639
|
...Tt,
|
|
634
640
|
Pagination: dt,
|
|
635
|
-
SortIndicator:
|
|
641
|
+
SortIndicator: $t,
|
|
636
642
|
ColumnFilter: Rt,
|
|
637
643
|
SortChip: tt,
|
|
638
644
|
/** Renders a styled Table directly from a TanStack table instance. */
|