@pibit.ai/cure-design-system 0.3.20 → 0.3.23
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/README.md +1 -0
- package/dist/applications/schedule-calendar/schedule-calendar.d.ts.map +1 -1
- package/dist/applications/schedule-calendar/schedule-calendar.js +24 -22
- package/dist/applications/schedule-calendar/utils.d.ts +13 -3
- package/dist/applications/schedule-calendar/utils.d.ts.map +1 -1
- package/dist/applications/schedule-calendar/utils.js +136 -117
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +92 -88
- package/dist/patterns/table/TableWrapper.d.ts.map +1 -1
- package/dist/patterns/table/TableWrapper.js +784 -665
- package/dist/patterns/table/index.d.ts +1 -1
- package/dist/patterns/table/index.d.ts.map +1 -1
- package/dist/patterns/table/storyHelpers/useMockTableState.d.ts.map +1 -1
- package/dist/patterns/table/table.d.ts.map +1 -1
- package/dist/patterns/table/table.js +44 -43
- package/dist/patterns/table/toolbar/AlignDropdown.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/AlignDropdown.js +19 -25
- package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts +9 -0
- package/dist/patterns/table/toolbar/ColumnHeaderMenu.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/ColumnHeaderMenu.js +115 -81
- package/dist/patterns/table/toolbar/GroupByDropdown.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/GroupByDropdown.js +48 -43
- package/dist/patterns/table/toolbar/SummaryFooter.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/SummaryFooter.js +34 -27
- package/dist/patterns/table/toolbar/TableToolbar.d.ts +2 -0
- package/dist/patterns/table/toolbar/TableToolbar.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/TableToolbar.js +2 -1
- package/dist/patterns/table/toolbar/index.d.ts +2 -2
- package/dist/patterns/table/toolbar/index.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts +10 -1
- package/dist/patterns/table/toolbar/tableToolbarHelpers.d.ts.map +1 -1
- package/dist/patterns/table/toolbar/tableToolbarHelpers.js +117 -117
- package/dist/patterns/table/types.d.ts +1 -0
- package/dist/patterns/table/types.d.ts.map +1 -1
- package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts +20 -0
- package/dist/primitives/multi-chips-select/MultiChipsSelect.d.ts.map +1 -0
- package/dist/primitives/multi-chips-select/MultiChipsSelect.js +233 -0
- package/dist/primitives/multi-chips-select/index.d.ts +3 -0
- package/dist/primitives/multi-chips-select/index.d.ts.map +1 -0
- package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts +3 -0
- package/dist/primitives/multi-chips-select/tagKeyFromLabel.d.ts.map +1 -0
- package/dist/primitives/multi-chips-select/tagKeyFromLabel.js +6 -0
- package/dist/primitives/select/ExpandableSearchInput.d.ts +3 -1
- package/dist/primitives/select/ExpandableSearchInput.d.ts.map +1 -1
- package/dist/primitives/select/ExpandableSearchInput.js +100 -78
- package/dist/primitives/select/SearchInput.d.ts +5 -1
- package/dist/primitives/select/SearchInput.d.ts.map +1 -1
- package/dist/primitives/select/SearchInput.js +94 -74
- package/dist/primitives/select/searchable-select.d.ts +5 -3
- package/dist/primitives/select/searchable-select.d.ts.map +1 -1
- package/dist/primitives/select/searchable-select.js +196 -177
- package/dist/primitives/select/select-item.d.ts.map +1 -1
- package/dist/primitives/select/select-item.js +70 -54
- package/dist/primitives/select/select.d.ts +7 -2
- package/dist/primitives/select/select.d.ts.map +1 -1
- package/dist/primitives/select/select.js +161 -137
- package/dist/primitives/tooltip/ellipsis-content.d.ts.map +1 -1
- package/dist/primitives/tooltip/ellipsis-content.js +46 -43
- package/dist/styles/components.css +1 -1
- package/package.json +1 -1
|
@@ -1,736 +1,855 @@
|
|
|
1
1
|
import { jsx as i, jsxs as k } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { ChevronRight as
|
|
2
|
+
import { forwardRef as Bt, useState as J, useMemo as h, useCallback as V, useRef as Jt, useEffect as Vt, useLayoutEffect as Xt } from "react";
|
|
3
|
+
import { ChevronRight as Yt } from "@untitledui/icons";
|
|
4
4
|
import { cx as c } from "../../utils/cn.js";
|
|
5
|
-
import { TableCard as
|
|
6
|
-
import { TablePagination as
|
|
7
|
-
import { getEffectiveAlignment as ot, resolveColumnLabel as
|
|
8
|
-
import { findGridCell as
|
|
9
|
-
import { BulkActionBar as
|
|
10
|
-
import { TableToolbar as
|
|
11
|
-
import { Checkbox as
|
|
5
|
+
import { TableCard as Qt, Table as d } from "./table.js";
|
|
6
|
+
import { TablePagination as Zt } from "./TablePagination.js";
|
|
7
|
+
import { getEffectiveAlignment as ot, resolveColumnLabel as Ht, alignmentClass as Kt } from "./toolbar/tableToolbarHelpers.js";
|
|
8
|
+
import { findGridCell as er, isWithinCellEditor as tr, getGridNeighbor as rr, getGridTabNeighbor as nr, focusGridCell as ir, GridNavProvider as sr } from "./useGridKeyboardNavigation.js";
|
|
9
|
+
import { BulkActionBar as ar } from "./toolbar/BulkActionBar.js";
|
|
10
|
+
import { TableToolbar as lr } from "./toolbar/TableToolbar.js";
|
|
11
|
+
import { Checkbox as nt } from "../../primitives/checkbox/checkbox.js";
|
|
12
12
|
import { ColumnHeaderMenu as or } from "./toolbar/ColumnHeaderMenu.js";
|
|
13
|
-
import { Button as
|
|
14
|
-
import { SummaryFooterRow as
|
|
15
|
-
import { RowActionsMenu as
|
|
16
|
-
import { Icon as
|
|
17
|
-
import { ShimmerLine as
|
|
18
|
-
const
|
|
13
|
+
import { Button as dr } from "../../primitives/button/button.js";
|
|
14
|
+
import { SummaryFooterRow as cr } from "./toolbar/SummaryFooter.js";
|
|
15
|
+
import { RowActionsMenu as fr } from "./toolbar/RowActionsMenu.js";
|
|
16
|
+
import { Icon as hr } from "../../primitives/icon/icon.js";
|
|
17
|
+
import { ShimmerLine as ur } from "../../primitives/shimmer/shimmer.js";
|
|
18
|
+
const yr = 5, pr = "__all__", it = {
|
|
19
19
|
ArrowUp: "up",
|
|
20
20
|
ArrowDown: "down",
|
|
21
21
|
ArrowLeft: "left",
|
|
22
22
|
ArrowRight: "right"
|
|
23
|
-
},
|
|
24
|
-
function
|
|
23
|
+
}, X = (t) => t.__rowId ?? t.id ?? t.rule_id ?? String(t);
|
|
24
|
+
function st(t, a) {
|
|
25
25
|
return t === "all" ? new Set(a) : t ?? /* @__PURE__ */ new Set();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return t ? t === "all" ?
|
|
27
|
+
function wr(t, a, l) {
|
|
28
|
+
return t ? t === "all" ? l.includes(a) : t.has(a) : !1;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function xr(t, a) {
|
|
31
31
|
return t ? t === "all" ? a.length : t.size : 0;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return a.length === 0 ? !1 : t === "all" ? !0 : a.every((
|
|
33
|
+
function br(t, a) {
|
|
34
|
+
return a.length === 0 ? !1 : t === "all" ? !0 : a.every((l) => (t == null ? void 0 : t.has(l)) ?? !1);
|
|
35
35
|
}
|
|
36
36
|
function gr(t, a) {
|
|
37
|
-
return t === "all" ? a.length > 0 : a.some((
|
|
37
|
+
return t === "all" ? a.length > 0 : a.some((l) => (t == null ? void 0 : t.has(l)) ?? !1);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function mr(t) {
|
|
40
40
|
if (t)
|
|
41
41
|
return (a) => {
|
|
42
42
|
t(a === "all" ? "all" : new Set([...a].map(String)));
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function Nr(t) {
|
|
46
46
|
var a;
|
|
47
|
-
return t != null && t.length ? t.length > 1 ? !0 : ((a = t[0]) == null ? void 0 : a.key) !==
|
|
47
|
+
return t != null && t.length ? t.length > 1 ? !0 : ((a = t[0]) == null ? void 0 : a.key) !== pr : !1;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
49
|
+
function at(t, a, l) {
|
|
50
|
+
return l ? ot(l, a ?? /* @__PURE__ */ new Map()) : (a == null ? void 0 : a.get(t)) ?? "left";
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const Te = "300px", Pe = (t) => {
|
|
53
53
|
if (!t) return 0;
|
|
54
54
|
const a = t.match(/^(\d+(?:\.\d+)?)px$/);
|
|
55
55
|
return a ? Number(a[1]) : 0;
|
|
56
|
-
},
|
|
57
|
-
maxWidth: t.maxWidth,
|
|
58
|
-
minWidth: t.
|
|
59
|
-
|
|
60
|
-
}), at = (t) => G(t) && t.maxWidth ? {
|
|
56
|
+
}, A = (t) => !!(t.maxWidth && t.sticky === "right"), kr = (t) => ({
|
|
57
|
+
maxWidth: t.maxWidth ?? Te,
|
|
58
|
+
minWidth: t.minWidth
|
|
59
|
+
}), lt = (t) => A(t) && t.maxWidth ? {
|
|
61
60
|
minWidth: t.maxWidth,
|
|
62
61
|
width: t.maxWidth,
|
|
63
62
|
maxWidth: t.maxWidth
|
|
64
63
|
} : {
|
|
65
|
-
minWidth: t.minWidth
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
[
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
(r
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
) : null;
|
|
188
|
-
}, [
|
|
189
|
-
ue,
|
|
190
|
-
qe,
|
|
191
|
-
Q,
|
|
192
|
-
X,
|
|
193
|
-
H,
|
|
194
|
-
Z,
|
|
195
|
-
K,
|
|
196
|
-
ee,
|
|
197
|
-
Ne,
|
|
198
|
-
p,
|
|
199
|
-
Ae,
|
|
200
|
-
$e,
|
|
201
|
-
He,
|
|
202
|
-
je
|
|
203
|
-
]), Je = Be != null && yt !== !1, Ve = !!x && (x == null ? void 0 : x.showPagination) !== !1, Et = Je || Ve, Ye = !P && a.length === 0 && Fe != null, m = !!(pt && S), Ce = !!(S != null && S.showFooterRow), T = xt ?? (m || Ce || ge), _t = Ye && !(Ce && S), M = o.length + (R ? 1 : 0) + (m ? 1 : 0), Pt = !!(gt && we), u = Y ? "border-r border-secondary last:border-r-0" : void 0, I = h(() => {
|
|
204
|
-
if (!w) return null;
|
|
205
|
-
const e = o.reduce(
|
|
206
|
-
(s, f) => G(f) ? s + Pe(f.maxWidth) : s,
|
|
207
|
-
0
|
|
208
|
-
);
|
|
209
|
-
return { minTableWidth: o.filter((s) => !G(s)).reduce(
|
|
210
|
-
(s, f) => s + Pe(f.minWidth ?? de),
|
|
211
|
-
0
|
|
212
|
-
) + e };
|
|
213
|
-
}, [o, w]), Tt = h(() => {
|
|
214
|
-
const e = /* @__PURE__ */ new Map();
|
|
215
|
-
return te && o.forEach((r) => {
|
|
216
|
-
e.set(r.key, (n) => te(r.key, n));
|
|
217
|
-
}), e;
|
|
218
|
-
}, [o, te]), W = qt(null), [U, Qe] = q(null), ve = B((e, r, n) => {
|
|
219
|
-
var f;
|
|
220
|
-
let s = n ?? null;
|
|
221
|
-
if (s == null) {
|
|
222
|
-
const N = (f = Kt(W.current, e, r)) == null ? void 0 : f.getAttribute("data-grid-source-index"), E = N != null && N !== "" ? Number(N) : NaN;
|
|
223
|
-
s = Number.isNaN(E) ? null : E;
|
|
224
|
-
}
|
|
225
|
-
xe({ rowId: e, columnKey: r, sourceIndex: s });
|
|
226
|
-
}, []), Ot = B(
|
|
227
|
-
(e) => {
|
|
228
|
-
var ae, oe, le;
|
|
229
|
-
const r = e.key in nt;
|
|
230
|
-
if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && !r || er(e.target)) return;
|
|
231
|
-
if (e.key === "Escape") {
|
|
232
|
-
if (!b) return;
|
|
233
|
-
e.preventDefault(), e.stopPropagation(), xe(null), (ae = W.current) != null && ae.contains(document.activeElement) && document.activeElement.blur();
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
const n = (le = (oe = e.target).closest) == null ? void 0 : le.call(oe, "[data-grid-cell]"), s = n == null ? void 0 : n.getAttribute("data-grid-row-id"), f = n == null ? void 0 : n.getAttribute("data-grid-col-key"), N = n == null ? void 0 : n.getAttribute("data-grid-source-index"), E = N != null && N !== "" ? Number(N) : NaN, l = Number.isNaN(E) ? null : E, v = b ?? (s && f ? {
|
|
237
|
-
rowId: s,
|
|
238
|
-
columnKey: f,
|
|
239
|
-
sourceIndex: l
|
|
240
|
-
} : null);
|
|
241
|
-
if (!v) return;
|
|
242
|
-
if (e.key === "Enter") {
|
|
243
|
-
if (!pe) return;
|
|
244
|
-
e.preventDefault(), e.stopPropagation(), pe({
|
|
245
|
-
rowId: v.rowId,
|
|
246
|
-
columnKey: v.columnKey,
|
|
247
|
-
sourceIndex: v.sourceIndex
|
|
248
|
-
});
|
|
249
|
-
return;
|
|
64
|
+
minWidth: t.minWidth,
|
|
65
|
+
maxWidth: t.maxWidth ?? Te
|
|
66
|
+
}, Mr = Bt(
|
|
67
|
+
function({
|
|
68
|
+
data: a,
|
|
69
|
+
columns: l,
|
|
70
|
+
renderRowCell: Le,
|
|
71
|
+
onRowClick: Y,
|
|
72
|
+
onRowHover: L,
|
|
73
|
+
arialabel: dt,
|
|
74
|
+
size: Oe = "sm",
|
|
75
|
+
allowDefaultRowClass: ct = !1,
|
|
76
|
+
centeredHeaders: ft = [],
|
|
77
|
+
rootClassName: ht,
|
|
78
|
+
removeBorders: ze,
|
|
79
|
+
headerClassName: ut,
|
|
80
|
+
isRowExpandable: Ge,
|
|
81
|
+
renderExpandedContent: yt,
|
|
82
|
+
loading: P = !1,
|
|
83
|
+
loadingRowCount: Ae = yr,
|
|
84
|
+
renderHeaderCell: ce,
|
|
85
|
+
tableClassName: pt,
|
|
86
|
+
getRowClassName: fe,
|
|
87
|
+
selectionMode: $ = "none",
|
|
88
|
+
selectedKeys: C,
|
|
89
|
+
onSelectionChange: p,
|
|
90
|
+
inlineSelection: he = !1,
|
|
91
|
+
toolbar: w,
|
|
92
|
+
showToolbar: wt,
|
|
93
|
+
toolbarTitle: $e,
|
|
94
|
+
toolbarTrailing: je,
|
|
95
|
+
disableExtendedTools: Fe,
|
|
96
|
+
pagination: x,
|
|
97
|
+
showBorders: Q,
|
|
98
|
+
emptyState: Me,
|
|
99
|
+
editChrome: v,
|
|
100
|
+
showEditActions: xt = !1,
|
|
101
|
+
searchCollapsible: Ue,
|
|
102
|
+
isEditable: bt,
|
|
103
|
+
toolbarSlot: ue,
|
|
104
|
+
rowHeightClass: De,
|
|
105
|
+
groupedData: O,
|
|
106
|
+
showSummaryFooter: gt,
|
|
107
|
+
summaryFooterProps: ye,
|
|
108
|
+
bulkActionBar: Z,
|
|
109
|
+
renderBulkActionBar: H,
|
|
110
|
+
onBulkDuplicate: K,
|
|
111
|
+
onBulkDelete: ee,
|
|
112
|
+
bulkActionBusy: te,
|
|
113
|
+
columnAlignments: z,
|
|
114
|
+
onColumnHeaderAction: re,
|
|
115
|
+
showColumnHeaderMenu: mt,
|
|
116
|
+
columnMenuCapabilities: Nt,
|
|
117
|
+
renderGroupHeader: qe,
|
|
118
|
+
columnMenuSchema: j,
|
|
119
|
+
columnSchema: F,
|
|
120
|
+
labelMeta: kt,
|
|
121
|
+
renderColumnHeaderMenuExtraItems: Ct,
|
|
122
|
+
fillWidth: y = !1,
|
|
123
|
+
rowActions: pe,
|
|
124
|
+
onCellActivate: we
|
|
125
|
+
}, M) {
|
|
126
|
+
const [ne, St] = J(
|
|
127
|
+
() => /* @__PURE__ */ new Set()
|
|
128
|
+
), [vt, Wt] = J(
|
|
129
|
+
null
|
|
130
|
+
), [g, xe] = J(null), [G, Rt] = J(null), ie = $ === "single" || $ === "multiple", be = !!pe, W = ie && !he, ge = Nr(O), It = h(() => j != null && j.length ? new Map(j.map((e) => [e.key, e])) : /* @__PURE__ */ new Map(), [j]), Be = h(() => F != null && F.length ? new Map(F.map((e) => [e.value, e])) : /* @__PURE__ */ new Map(), [F]), se = h(
|
|
131
|
+
() => l.map((e) => e.key),
|
|
132
|
+
[l]
|
|
133
|
+
), Et = V((e) => {
|
|
134
|
+
St((r) => {
|
|
135
|
+
const n = new Set(r);
|
|
136
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
137
|
+
});
|
|
138
|
+
}, []), ae = h(() => P ? Array.from({ length: Ae }, (e, r) => ({
|
|
139
|
+
id: `loading-${r}`
|
|
140
|
+
})) : a.map((e) => {
|
|
141
|
+
const r = e;
|
|
142
|
+
if (r.__rowId != null)
|
|
143
|
+
return r;
|
|
144
|
+
const n = X(r);
|
|
145
|
+
return r.id != null && String(r.id) === n ? r : { ...r, id: n };
|
|
146
|
+
}), [P, a, Ae]), b = h(() => P ? [] : ge && O ? O.flatMap(
|
|
147
|
+
(e) => ne.has(e.key) ? [] : e.rows.map((r) => X(r))
|
|
148
|
+
) : ae.map((e) => X(e)), [P, ge, O, ne, ae]), me = h(
|
|
149
|
+
() => st(C, b),
|
|
150
|
+
[C, b]
|
|
151
|
+
), Ne = xr(C, b), ke = Ne > 0, Je = ke && !!(Z ?? H ?? K ?? ee), U = h(() => {
|
|
152
|
+
if (!ke) return;
|
|
153
|
+
const e = a.filter(
|
|
154
|
+
(r) => me.has(X(r))
|
|
155
|
+
);
|
|
156
|
+
return {
|
|
157
|
+
selectedKeys: me,
|
|
158
|
+
selectedRows: e,
|
|
159
|
+
clearSelection: () => p == null ? void 0 : p(/* @__PURE__ */ new Set()),
|
|
160
|
+
busy: te
|
|
161
|
+
};
|
|
162
|
+
}, [
|
|
163
|
+
ke,
|
|
164
|
+
me,
|
|
165
|
+
a,
|
|
166
|
+
p,
|
|
167
|
+
te
|
|
168
|
+
]), Ve = h(() => {
|
|
169
|
+
if (ue != null) return ue;
|
|
170
|
+
if (Je) {
|
|
171
|
+
if (Z != null) return Z;
|
|
172
|
+
if (H && U)
|
|
173
|
+
return H(U);
|
|
174
|
+
if (U && (K || ee))
|
|
175
|
+
return /* @__PURE__ */ i(
|
|
176
|
+
ar,
|
|
177
|
+
{
|
|
178
|
+
count: Ne,
|
|
179
|
+
onDuplicate: K,
|
|
180
|
+
onDelete: ee,
|
|
181
|
+
onClearSelection: U.clearSelection,
|
|
182
|
+
busy: te
|
|
183
|
+
}
|
|
184
|
+
);
|
|
250
185
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
186
|
+
return w ? /* @__PURE__ */ i(
|
|
187
|
+
lr,
|
|
188
|
+
{
|
|
189
|
+
sort: w.sort,
|
|
190
|
+
filter: w.filter,
|
|
191
|
+
search: w.search,
|
|
192
|
+
rowHeight: w.rowHeight,
|
|
193
|
+
hideFields: w.hideFields,
|
|
194
|
+
align: w.align,
|
|
195
|
+
groupBy: w.groupBy,
|
|
196
|
+
summary: w.summary,
|
|
197
|
+
sortContent: w.sortContent,
|
|
198
|
+
filterContent: w.filterContent,
|
|
199
|
+
fallbackTitle: $e,
|
|
200
|
+
trailing: je,
|
|
201
|
+
searchCollapsible: Ue,
|
|
202
|
+
disableExtendedTools: Fe
|
|
203
|
+
}
|
|
204
|
+
) : null;
|
|
205
|
+
}, [
|
|
206
|
+
ue,
|
|
207
|
+
Je,
|
|
208
|
+
Z,
|
|
209
|
+
H,
|
|
210
|
+
U,
|
|
211
|
+
K,
|
|
212
|
+
ee,
|
|
213
|
+
te,
|
|
214
|
+
Ne,
|
|
215
|
+
w,
|
|
216
|
+
$e,
|
|
217
|
+
je,
|
|
218
|
+
Ue,
|
|
219
|
+
Fe
|
|
220
|
+
]), Xe = Ve != null && wt !== !1, Ye = !!x && (x == null ? void 0 : x.showPagination) !== !1, _t = Xe || Ye, Qe = !P && a.length === 0 && Me != null, m = !!(xt && v), Ce = !!(v != null && v.showFooterRow), T = bt ?? (m || Ce || be), Pt = Qe && !(Ce && v), D = l.length + (W ? 1 : 0) + (m ? 1 : 0), Tt = !!(gt && ye), u = Q ? "border-r border-secondary last:border-r-0" : void 0, I = h(() => {
|
|
221
|
+
if (!y) return null;
|
|
222
|
+
const e = l.reduce(
|
|
223
|
+
(s, f) => A(f) ? s + Pe(f.maxWidth) : s,
|
|
224
|
+
0
|
|
265
225
|
);
|
|
266
|
-
|
|
267
|
-
|
|
226
|
+
return { minTableWidth: l.filter(
|
|
227
|
+
(s) => !A(s)
|
|
228
|
+
).reduce(
|
|
229
|
+
(s, f) => s + Pe(f.minWidth),
|
|
230
|
+
0
|
|
231
|
+
) + e };
|
|
232
|
+
}, [l, y]), Lt = h(() => {
|
|
233
|
+
const e = /* @__PURE__ */ new Map();
|
|
234
|
+
return re && l.forEach((r) => {
|
|
235
|
+
e.set(
|
|
236
|
+
r.key,
|
|
237
|
+
(n) => re(r.key, n)
|
|
238
|
+
);
|
|
239
|
+
}), e;
|
|
240
|
+
}, [l, re]), R = Jt(null), [q, Ze] = J(null), Se = V(
|
|
241
|
+
(e, r, n) => {
|
|
242
|
+
var f;
|
|
243
|
+
let s = n ?? null;
|
|
244
|
+
if (s == null) {
|
|
245
|
+
const N = (f = er(
|
|
246
|
+
R.current,
|
|
247
|
+
e,
|
|
248
|
+
r
|
|
249
|
+
)) == null ? void 0 : f.getAttribute("data-grid-source-index"), E = N != null && N !== "" ? Number(N) : NaN;
|
|
250
|
+
s = Number.isNaN(E) ? null : E;
|
|
251
|
+
}
|
|
252
|
+
xe({ rowId: e, columnKey: r, sourceIndex: s });
|
|
253
|
+
},
|
|
254
|
+
[]
|
|
255
|
+
), Ot = V(
|
|
256
|
+
(e) => {
|
|
257
|
+
var le, oe, de;
|
|
258
|
+
const r = e.key in it;
|
|
259
|
+
if (e.key !== "Enter" && e.key !== "Tab" && e.key !== "Escape" && !r || tr(e.target)) return;
|
|
260
|
+
if (e.key === "Escape") {
|
|
261
|
+
if (!g) return;
|
|
262
|
+
e.preventDefault(), e.stopPropagation(), xe(null), (le = R.current) != null && le.contains(document.activeElement) && document.activeElement.blur();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
const n = (de = (oe = e.target).closest) == null ? void 0 : de.call(
|
|
266
|
+
oe,
|
|
267
|
+
"[data-grid-cell]"
|
|
268
|
+
), s = n == null ? void 0 : n.getAttribute("data-grid-row-id"), f = n == null ? void 0 : n.getAttribute("data-grid-col-key"), N = n == null ? void 0 : n.getAttribute(
|
|
269
|
+
"data-grid-source-index"
|
|
270
|
+
), E = N != null && N !== "" ? Number(N) : NaN, o = Number.isNaN(E) ? null : E, S = g ?? (s && f ? {
|
|
271
|
+
rowId: s,
|
|
272
|
+
columnKey: f,
|
|
273
|
+
sourceIndex: o
|
|
274
|
+
} : null);
|
|
275
|
+
if (!S) return;
|
|
276
|
+
if (e.key === "Enter") {
|
|
277
|
+
if (!we) return;
|
|
278
|
+
e.preventDefault(), e.stopPropagation(), we({
|
|
279
|
+
rowId: S.rowId,
|
|
280
|
+
columnKey: S.columnKey,
|
|
281
|
+
sourceIndex: S.sourceIndex
|
|
282
|
+
});
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const _ = r ? rr(
|
|
286
|
+
R.current,
|
|
287
|
+
b,
|
|
288
|
+
se,
|
|
289
|
+
S.rowId,
|
|
290
|
+
S.columnKey,
|
|
291
|
+
it[e.key]
|
|
292
|
+
) : nr(
|
|
293
|
+
R.current,
|
|
294
|
+
b,
|
|
295
|
+
se,
|
|
296
|
+
S.rowId,
|
|
297
|
+
S.columnKey,
|
|
298
|
+
!e.shiftKey
|
|
299
|
+
);
|
|
300
|
+
if (!_) {
|
|
301
|
+
r && (e.preventDefault(), e.stopPropagation());
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
e.preventDefault(), e.stopPropagation(), Se(_.rowId, _.columnKey, _.sourceIndex), requestAnimationFrame(
|
|
305
|
+
() => ir(
|
|
306
|
+
R.current,
|
|
307
|
+
_.rowId,
|
|
308
|
+
_.columnKey
|
|
309
|
+
)
|
|
310
|
+
);
|
|
311
|
+
},
|
|
312
|
+
[g, b, se, we, Se]
|
|
313
|
+
);
|
|
314
|
+
Vt(() => {
|
|
315
|
+
if (!T || !g) return;
|
|
316
|
+
const e = (r) => {
|
|
317
|
+
const n = R.current;
|
|
318
|
+
n && !n.contains(r.target) && xe(null);
|
|
319
|
+
};
|
|
320
|
+
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
321
|
+
}, [T, g]);
|
|
322
|
+
const He = h(() => {
|
|
323
|
+
let e = 0;
|
|
324
|
+
return W && (e += 40), m && (e += 56), l.forEach((r) => {
|
|
325
|
+
A(r) && (e += Pe(r.maxWidth));
|
|
326
|
+
}), e;
|
|
327
|
+
}, [l, m, W]), ve = h(
|
|
328
|
+
() => l.filter((e) => !A(e)).length,
|
|
329
|
+
[l]
|
|
330
|
+
), We = h(() => {
|
|
331
|
+
if (!y || !I) return null;
|
|
332
|
+
const { minTableWidth: e } = I;
|
|
333
|
+
return q ? Math.max(q, e) : e;
|
|
334
|
+
}, [q, y, I]), Re = !!(y && I && q && q < I.minTableWidth), Ie = h(() => !We || ve === 0 ? null : Math.max(
|
|
335
|
+
0,
|
|
336
|
+
(We - He) / ve
|
|
337
|
+
), [We, He, ve]);
|
|
338
|
+
Xt(() => {
|
|
339
|
+
if (!y) {
|
|
340
|
+
Ze(null);
|
|
268
341
|
return;
|
|
269
342
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
const n =
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
|
|
281
|
-
}, [T, b]);
|
|
282
|
-
const Xe = h(() => {
|
|
283
|
-
let e = 0;
|
|
284
|
-
return R && (e += 40), m && (e += 56), o.forEach((r) => {
|
|
285
|
-
G(r) && (e += Pe(r.maxWidth));
|
|
286
|
-
}), e;
|
|
287
|
-
}, [o, m, R]), Se = h(
|
|
288
|
-
() => o.filter((e) => !G(e)).length,
|
|
289
|
-
[o]
|
|
290
|
-
), Re = h(() => {
|
|
291
|
-
if (!w || !I) return null;
|
|
292
|
-
const { minTableWidth: e } = I;
|
|
293
|
-
return U ? Math.max(U, e) : e;
|
|
294
|
-
}, [U, w, I]), We = !!(w && I && U && U < I.minTableWidth), Ie = h(() => !Re || Se === 0 ? null : Math.max(0, (Re - Xe) / Se), [Re, Xe, Se]);
|
|
295
|
-
Jt(() => {
|
|
296
|
-
if (!w) {
|
|
297
|
-
Qe(null);
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
const e = W.current;
|
|
301
|
-
if (!e) return;
|
|
302
|
-
const r = () => {
|
|
303
|
-
const s = e.clientWidth;
|
|
304
|
-
s > 0 && Qe((f) => f === s ? f : s);
|
|
305
|
-
};
|
|
306
|
-
r();
|
|
307
|
-
const n = new ResizeObserver(r);
|
|
308
|
-
return n.observe(e), () => {
|
|
309
|
-
n.disconnect();
|
|
310
|
-
};
|
|
311
|
-
}, [o.length, a.length, w, P, m, R]);
|
|
312
|
-
const Ee = B(
|
|
313
|
-
(e) => w ? G(e) && e.maxWidth ? at(e) : Ie != null ? {
|
|
314
|
-
width: `${Ie}px`,
|
|
315
|
-
minWidth: e.minWidth ?? de
|
|
316
|
-
} : at(e) : Nr(e),
|
|
317
|
-
[w, Ie]
|
|
318
|
-
), Lt = h(() => {
|
|
319
|
-
if (!(!w || !I))
|
|
320
|
-
return We ? {
|
|
321
|
-
width: `${I.minTableWidth}px`,
|
|
322
|
-
tableLayout: "fixed"
|
|
323
|
-
} : {
|
|
324
|
-
width: "100%",
|
|
325
|
-
tableLayout: "fixed"
|
|
343
|
+
const e = R.current;
|
|
344
|
+
if (!e) return;
|
|
345
|
+
const r = () => {
|
|
346
|
+
const s = e.clientWidth;
|
|
347
|
+
s > 0 && Ze((f) => f === s ? f : s);
|
|
348
|
+
};
|
|
349
|
+
r();
|
|
350
|
+
const n = new ResizeObserver(r);
|
|
351
|
+
return n.observe(e), () => {
|
|
352
|
+
n.disconnect();
|
|
326
353
|
};
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
354
|
+
}, [
|
|
355
|
+
l.length,
|
|
356
|
+
a.length,
|
|
357
|
+
y,
|
|
358
|
+
P,
|
|
359
|
+
m,
|
|
360
|
+
W
|
|
361
|
+
]);
|
|
362
|
+
const Ee = V(
|
|
363
|
+
(e) => y ? A(e) && e.maxWidth ? lt(e) : Ie != null ? {
|
|
364
|
+
width: `${Ie}px`,
|
|
365
|
+
minWidth: e.minWidth,
|
|
366
|
+
maxWidth: e.maxWidth ?? Te
|
|
367
|
+
} : lt(e) : kr(e),
|
|
368
|
+
[y, Ie]
|
|
369
|
+
), zt = h(() => {
|
|
370
|
+
if (!(!y || !I))
|
|
371
|
+
return Re ? {
|
|
372
|
+
width: `${I.minTableWidth}px`,
|
|
373
|
+
tableLayout: "fixed"
|
|
374
|
+
} : {
|
|
375
|
+
width: "100%",
|
|
376
|
+
tableLayout: "fixed"
|
|
377
|
+
};
|
|
378
|
+
}, [y, I, Re]), Gt = V(
|
|
379
|
+
(e) => {
|
|
380
|
+
R.current = e, typeof M == "function" ? M(e) : M && (M.current = e);
|
|
381
|
+
},
|
|
382
|
+
[M]
|
|
383
|
+
), At = ie ? {
|
|
384
|
+
selectionMode: $,
|
|
385
|
+
selectedKeys: C === "all" ? "all" : C,
|
|
386
|
+
onSelectionChange: mr(p)
|
|
387
|
+
} : {}, $t = (e) => {
|
|
388
|
+
const r = e.__sourceIndex;
|
|
389
|
+
return typeof r == "number" ? r : 0;
|
|
390
|
+
}, _e = ie && br(C, b), jt = ie && gr(C, b), Ft = () => {
|
|
391
|
+
if (p) {
|
|
392
|
+
if (_e) {
|
|
393
|
+
p(/* @__PURE__ */ new Set());
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
p("all");
|
|
397
|
+
}
|
|
398
|
+
}, Mt = (e, r) => {
|
|
399
|
+
if (!p) return;
|
|
400
|
+
if ($ === "single") {
|
|
401
|
+
p(r ? /* @__PURE__ */ new Set([e]) : /* @__PURE__ */ new Set());
|
|
343
402
|
return;
|
|
344
403
|
}
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
`group-${e.key}`
|
|
366
|
-
) : /* @__PURE__ */ i(
|
|
367
|
-
d.Row,
|
|
368
|
-
{
|
|
369
|
-
id: `group-${e.key}`,
|
|
370
|
-
highlightSelectedRow: !1,
|
|
371
|
-
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
372
|
-
children: /* @__PURE__ */ i(d.Cell, { colSpan: M, className: c("py-1.5", u), children: /* @__PURE__ */ k(
|
|
373
|
-
"button",
|
|
374
|
-
{
|
|
375
|
-
type: "button",
|
|
376
|
-
className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
|
|
377
|
-
onClick: () => It(e.key),
|
|
378
|
-
"aria-expanded": !r,
|
|
379
|
-
children: [
|
|
380
|
-
/* @__PURE__ */ i(
|
|
381
|
-
Vt,
|
|
382
|
-
{
|
|
383
|
-
className: c(
|
|
384
|
-
"size-4 shrink-0 text-fg-quaternary transition-transform",
|
|
385
|
-
!r && "rotate-90"
|
|
386
|
-
)
|
|
387
|
-
}
|
|
388
|
-
),
|
|
389
|
-
/* @__PURE__ */ i("span", { className: "truncate", children: e.label || "(Empty)" }),
|
|
390
|
-
/* @__PURE__ */ k("span", { className: "text-tertiary", children: [
|
|
391
|
-
"(",
|
|
392
|
-
e.rows.length,
|
|
393
|
-
")"
|
|
394
|
-
] })
|
|
395
|
-
]
|
|
396
|
-
}
|
|
397
|
-
) })
|
|
398
|
-
},
|
|
399
|
-
`group-${e.key}`
|
|
400
|
-
);
|
|
401
|
-
}, Ze = (e, r) => {
|
|
402
|
-
const n = ze ? ze(e) : !1, s = J(e), f = At(e), N = yr(C, s, g), E = vt === s;
|
|
403
|
-
return /* @__PURE__ */ k(
|
|
404
|
-
d.Row,
|
|
405
|
-
{
|
|
406
|
-
onAction: () => V == null ? void 0 : V(e),
|
|
407
|
-
id: s,
|
|
408
|
-
value: e,
|
|
409
|
-
columns: o,
|
|
410
|
-
expandedColSpan: M,
|
|
411
|
-
isExpandable: n,
|
|
412
|
-
highlightSelectedRow: !he,
|
|
413
|
-
renderExpandedContent: n ? ut : void 0,
|
|
414
|
-
className: c(
|
|
415
|
-
V && "cursor-pointer",
|
|
416
|
-
dt ? "prose" : "",
|
|
417
|
-
Le && "[&>td]:after:hidden",
|
|
418
|
-
ge && "group/rowactions",
|
|
419
|
-
E && "bg-utility-brand-25 hover:bg-utility-brand-25",
|
|
420
|
-
Me,
|
|
421
|
-
fe == null ? void 0 : fe(e)
|
|
422
|
-
),
|
|
423
|
-
children: [
|
|
424
|
-
R && /* @__PURE__ */ i(
|
|
404
|
+
const n = C === "all" ? new Set(b) : new Set(st(C, b));
|
|
405
|
+
r ? n.add(e) : n.delete(e), p(n);
|
|
406
|
+
}, Ut = (e) => {
|
|
407
|
+
const r = ne.has(e.key);
|
|
408
|
+
return qe ? /* @__PURE__ */ i(
|
|
409
|
+
d.Row,
|
|
410
|
+
{
|
|
411
|
+
id: `group-${e.key}`,
|
|
412
|
+
highlightSelectedRow: !1,
|
|
413
|
+
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
414
|
+
children: /* @__PURE__ */ i(d.Cell, { colSpan: D, className: c(u), children: qe(e) })
|
|
415
|
+
},
|
|
416
|
+
`group-${e.key}`
|
|
417
|
+
) : /* @__PURE__ */ i(
|
|
418
|
+
d.Row,
|
|
419
|
+
{
|
|
420
|
+
id: `group-${e.key}`,
|
|
421
|
+
highlightSelectedRow: !1,
|
|
422
|
+
className: "bg-secondary_subtle hover:bg-secondary_subtle",
|
|
423
|
+
children: /* @__PURE__ */ i(
|
|
425
424
|
d.Cell,
|
|
426
425
|
{
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
children: /* @__PURE__ */
|
|
430
|
-
"
|
|
426
|
+
colSpan: D,
|
|
427
|
+
className: c("py-1.5", u),
|
|
428
|
+
children: /* @__PURE__ */ k(
|
|
429
|
+
"button",
|
|
431
430
|
{
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
431
|
+
type: "button",
|
|
432
|
+
className: "flex w-full items-center gap-2 px-2 text-left text-xs font-medium text-secondary",
|
|
433
|
+
onClick: () => Et(e.key),
|
|
434
|
+
"aria-expanded": !r,
|
|
435
|
+
children: [
|
|
436
|
+
/* @__PURE__ */ i(
|
|
437
|
+
Yt,
|
|
438
|
+
{
|
|
439
|
+
className: c(
|
|
440
|
+
"size-4 shrink-0 text-fg-quaternary transition-transform",
|
|
441
|
+
!r && "rotate-90"
|
|
442
|
+
)
|
|
443
|
+
}
|
|
444
|
+
),
|
|
445
|
+
/* @__PURE__ */ i("span", { className: "truncate", children: e.label || "(Empty)" }),
|
|
446
|
+
/* @__PURE__ */ k("span", { className: "text-tertiary", children: [
|
|
447
|
+
"(",
|
|
448
|
+
e.rows.length,
|
|
449
|
+
")"
|
|
450
|
+
] })
|
|
451
|
+
]
|
|
444
452
|
}
|
|
445
453
|
)
|
|
446
454
|
}
|
|
455
|
+
)
|
|
456
|
+
},
|
|
457
|
+
`group-${e.key}`
|
|
458
|
+
);
|
|
459
|
+
}, Ke = (e, r) => {
|
|
460
|
+
const n = Ge ? Ge(e) : !1, s = X(e), f = $t(e), N = wr(C, s, b), E = vt === s;
|
|
461
|
+
return /* @__PURE__ */ k(
|
|
462
|
+
d.Row,
|
|
463
|
+
{
|
|
464
|
+
onAction: () => Y == null ? void 0 : Y(e),
|
|
465
|
+
onMouseEnter: () => L == null ? void 0 : L(e, !0),
|
|
466
|
+
onMouseLeave: () => L == null ? void 0 : L(e, !1),
|
|
467
|
+
id: s,
|
|
468
|
+
value: e,
|
|
469
|
+
columns: l,
|
|
470
|
+
expandedColSpan: D,
|
|
471
|
+
isExpandable: n,
|
|
472
|
+
highlightSelectedRow: !he,
|
|
473
|
+
renderExpandedContent: n ? yt : void 0,
|
|
474
|
+
className: c(
|
|
475
|
+
Y && "cursor-pointer",
|
|
476
|
+
ct ? "prose" : "",
|
|
477
|
+
ze && "[&>td]:after:hidden",
|
|
478
|
+
be && "group/rowactions",
|
|
479
|
+
E && "bg-utility-brand-25 hover:bg-utility-brand-25",
|
|
480
|
+
De,
|
|
481
|
+
fe == null ? void 0 : fe(e)
|
|
447
482
|
),
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return /* @__PURE__ */ i(
|
|
483
|
+
children: [
|
|
484
|
+
W && /* @__PURE__ */ i(
|
|
451
485
|
d.Cell,
|
|
452
486
|
{
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
487
|
+
className: c("relative w-10 text-center", u),
|
|
488
|
+
style: { minWidth: "40px", width: "40px" },
|
|
489
|
+
children: /* @__PURE__ */ i(
|
|
490
|
+
"div",
|
|
491
|
+
{
|
|
492
|
+
className: "flex items-center justify-center",
|
|
493
|
+
onClick: (o) => o.stopPropagation(),
|
|
494
|
+
onKeyDown: (o) => o.stopPropagation(),
|
|
495
|
+
children: /* @__PURE__ */ i(
|
|
496
|
+
nt,
|
|
497
|
+
{
|
|
498
|
+
checked: N,
|
|
499
|
+
onCheckedChange: (o) => Mt(s, o === !0),
|
|
500
|
+
"aria-label": `Select row ${s}`,
|
|
501
|
+
className: "items-center justify-center"
|
|
502
|
+
}
|
|
503
|
+
)
|
|
504
|
+
}
|
|
505
|
+
)
|
|
506
|
+
}
|
|
507
|
+
),
|
|
508
|
+
l.map((o, S) => {
|
|
509
|
+
const _ = Be.get(o.key), le = at(
|
|
510
|
+
o.key,
|
|
511
|
+
z,
|
|
512
|
+
_
|
|
513
|
+
), oe = (G == null ? void 0 : G.rowId) === s && (G == null ? void 0 : G.columnKey) === o.key, de = T && !oe && (g == null ? void 0 : g.rowId) === s && (g == null ? void 0 : g.columnKey) === o.key;
|
|
514
|
+
return /* @__PURE__ */ i(
|
|
515
|
+
d.Cell,
|
|
516
|
+
{
|
|
517
|
+
sticky: o.sticky,
|
|
518
|
+
stickyOffset: o.stickyOffset,
|
|
519
|
+
style: Ee(o),
|
|
520
|
+
"data-grid-cell": "",
|
|
521
|
+
"data-grid-row-id": s,
|
|
522
|
+
"data-grid-col-key": o.key,
|
|
523
|
+
"data-grid-source-index": f,
|
|
524
|
+
className: c(
|
|
525
|
+
"relative overflow-x-hidden",
|
|
526
|
+
// Excel-style selected-cell highlight: an inset brand border on the
|
|
527
|
+
// selected cell (state-driven). Inset so it sits at the cell edge
|
|
528
|
+
// without shifting layout. `after:opacity-0` hides the row's bottom-
|
|
529
|
+
// border pseudo-element so it doesn't overlap the ring's bottom edge.
|
|
530
|
+
de && "z-1 outline-hidden ring-2 ring-inset ring-brand after:opacity-0",
|
|
531
|
+
o.cellClassName,
|
|
532
|
+
Kt(le),
|
|
533
|
+
u
|
|
534
|
+
),
|
|
535
|
+
children: (() => {
|
|
536
|
+
const rt = S === 0 && (n || be) ? /* @__PURE__ */ k("div", { className: "flex items-center", children: [
|
|
537
|
+
pe && /* @__PURE__ */ i(
|
|
538
|
+
"div",
|
|
539
|
+
{
|
|
540
|
+
className: "flex items-center justify-center",
|
|
541
|
+
onClick: (B) => B.stopPropagation(),
|
|
542
|
+
onKeyDown: (B) => B.stopPropagation(),
|
|
543
|
+
children: /* @__PURE__ */ i(
|
|
544
|
+
fr,
|
|
545
|
+
{
|
|
546
|
+
config: pe,
|
|
547
|
+
sourceRowIndex: f,
|
|
548
|
+
item: e,
|
|
549
|
+
triggerClassName: c(
|
|
550
|
+
"transition-opacity group-hover/rowactions:opacity-100 focus-visible:opacity-100",
|
|
551
|
+
E ? "opacity-100" : "opacity-0"
|
|
552
|
+
),
|
|
553
|
+
onOpenChange: (B) => Wt(B ? s : null)
|
|
554
|
+
}
|
|
555
|
+
)
|
|
556
|
+
}
|
|
557
|
+
),
|
|
558
|
+
/* @__PURE__ */ i("div", { className: "flex-1 min-w-0", children: Le(o.key, e[o.key], e) })
|
|
559
|
+
] }) : Le(o.key, e[o.key], e);
|
|
560
|
+
return T ? /* @__PURE__ */ i(
|
|
474
561
|
"div",
|
|
475
562
|
{
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
children:
|
|
480
|
-
cr,
|
|
481
|
-
{
|
|
482
|
-
config: ye,
|
|
483
|
-
sourceRowIndex: f,
|
|
484
|
-
item: e,
|
|
485
|
-
triggerClassName: c(
|
|
486
|
-
"transition-opacity group-hover/rowactions:opacity-100 focus-visible:opacity-100",
|
|
487
|
-
E ? "opacity-100" : "opacity-0"
|
|
488
|
-
),
|
|
489
|
-
onOpenChange: (D) => St(D ? s : null)
|
|
490
|
-
}
|
|
491
|
-
)
|
|
563
|
+
"data-grid-focus": !0,
|
|
564
|
+
tabIndex: -1,
|
|
565
|
+
className: "outline-hidden",
|
|
566
|
+
children: rt
|
|
492
567
|
}
|
|
493
|
-
)
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
568
|
+
) : rt;
|
|
569
|
+
})()
|
|
570
|
+
},
|
|
571
|
+
o.key
|
|
572
|
+
);
|
|
573
|
+
}),
|
|
574
|
+
m && v && /* @__PURE__ */ i(
|
|
575
|
+
d.Cell,
|
|
576
|
+
{
|
|
577
|
+
className: c("relative w-14 text-center", u),
|
|
578
|
+
style: { minWidth: "56px", width: "56px" },
|
|
579
|
+
children: /* @__PURE__ */ i(
|
|
580
|
+
"button",
|
|
581
|
+
{
|
|
582
|
+
type: "button",
|
|
583
|
+
title: "Delete row",
|
|
584
|
+
"aria-label": "Delete row",
|
|
585
|
+
className: "inline-flex items-center justify-center rounded p-1 text-fg-quaternary hover:bg-secondary_subtle hover:text-fg-secondary",
|
|
586
|
+
onClick: (o) => {
|
|
587
|
+
o.stopPropagation(), v.onDeleteRow(f);
|
|
588
|
+
},
|
|
589
|
+
children: /* @__PURE__ */ i(hr, { name: "Trash02", className: "size-3" })
|
|
590
|
+
}
|
|
591
|
+
)
|
|
592
|
+
}
|
|
593
|
+
)
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
s
|
|
597
|
+
);
|
|
598
|
+
}, Dt = (e) => /* @__PURE__ */ k(
|
|
599
|
+
d.Row,
|
|
600
|
+
{
|
|
601
|
+
id: String(e.id),
|
|
602
|
+
isExpandable: !1,
|
|
603
|
+
className: c(ze && "[&>td]:after:hidden", De),
|
|
604
|
+
children: [
|
|
605
|
+
W && /* @__PURE__ */ i(
|
|
503
606
|
d.Cell,
|
|
504
607
|
{
|
|
505
|
-
className: c("relative w-
|
|
506
|
-
style: { minWidth: "
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
)
|
|
608
|
+
className: c("relative w-10", u),
|
|
609
|
+
style: { minWidth: "40px", width: "40px" }
|
|
610
|
+
}
|
|
611
|
+
),
|
|
612
|
+
l.map((r) => /* @__PURE__ */ i(
|
|
613
|
+
d.Cell,
|
|
614
|
+
{
|
|
615
|
+
sticky: r.sticky,
|
|
616
|
+
stickyOffset: r.stickyOffset,
|
|
617
|
+
style: Ee(r),
|
|
618
|
+
className: c(
|
|
619
|
+
"overflow-x-hidden text-left",
|
|
620
|
+
r.cellClassName,
|
|
621
|
+
u
|
|
622
|
+
),
|
|
623
|
+
children: /* @__PURE__ */ i(ur, { height: "14px", width: "75%", className: "rounded" })
|
|
624
|
+
},
|
|
625
|
+
r.key
|
|
626
|
+
)),
|
|
627
|
+
m && /* @__PURE__ */ i(
|
|
628
|
+
d.Cell,
|
|
629
|
+
{
|
|
630
|
+
className: c("w-14", u),
|
|
631
|
+
style: { minWidth: "56px", width: "56px" }
|
|
520
632
|
}
|
|
521
633
|
)
|
|
522
634
|
]
|
|
523
635
|
},
|
|
524
|
-
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
636
|
+
String(e.id)
|
|
637
|
+
), qt = () => P ? ae.map((e) => Dt(e)) : ge && O ? O.flatMap((e) => {
|
|
638
|
+
const r = ne.has(e.key);
|
|
639
|
+
return [
|
|
640
|
+
Ut(e),
|
|
641
|
+
...r ? [] : e.rows.map((n) => Ke(n))
|
|
642
|
+
];
|
|
643
|
+
}) : ae.map((e) => Ke(e)), et = /* @__PURE__ */ i(
|
|
644
|
+
Qt.Root,
|
|
645
|
+
{
|
|
646
|
+
ref: Gt,
|
|
647
|
+
onKeyDownCapture: T ? Ot : void 0,
|
|
648
|
+
className: c(
|
|
649
|
+
"w-full",
|
|
650
|
+
!y || Re ? "overflow-x-auto" : "overflow-x-hidden",
|
|
651
|
+
Q && "border border-secondary rounded-xl",
|
|
652
|
+
"[&_tr:hover>td]:!bg-secondary_subtle",
|
|
653
|
+
ht
|
|
539
654
|
),
|
|
540
|
-
|
|
541
|
-
|
|
655
|
+
size: Oe,
|
|
656
|
+
children: /* @__PURE__ */ k(
|
|
657
|
+
d,
|
|
542
658
|
{
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
Ht(e),
|
|
559
|
-
...r ? [] : e.rows.map((n) => Ze(n))
|
|
560
|
-
];
|
|
561
|
-
}) : se.map((e) => Ze(e)), Ke = /* @__PURE__ */ i(
|
|
562
|
-
Yt.Root,
|
|
563
|
-
{
|
|
564
|
-
ref: zt,
|
|
565
|
-
onKeyDownCapture: T ? Ot : void 0,
|
|
566
|
-
className: c(
|
|
567
|
-
"w-full",
|
|
568
|
-
!w || We ? "overflow-x-auto" : "overflow-x-hidden",
|
|
569
|
-
Y && "border border-secondary rounded-xl",
|
|
570
|
-
ft
|
|
571
|
-
),
|
|
572
|
-
size: Oe,
|
|
573
|
-
children: /* @__PURE__ */ k(
|
|
574
|
-
d,
|
|
575
|
-
{
|
|
576
|
-
"aria-label": lt,
|
|
577
|
-
size: Oe,
|
|
578
|
-
isEditable: T,
|
|
579
|
-
inlineSelection: he,
|
|
580
|
-
className: c(w && "min-w-full", wt),
|
|
581
|
-
style: Lt,
|
|
582
|
-
...Gt,
|
|
583
|
-
children: [
|
|
584
|
-
/* @__PURE__ */ k(
|
|
585
|
-
d.Header,
|
|
586
|
-
{
|
|
587
|
-
className: c(
|
|
588
|
-
"sticky top-0",
|
|
589
|
-
Y && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none z-1",
|
|
590
|
-
ht
|
|
591
|
-
),
|
|
592
|
-
children: [
|
|
593
|
-
R && /* @__PURE__ */ i(
|
|
594
|
-
d.Head,
|
|
595
|
-
{
|
|
596
|
-
label: "",
|
|
597
|
-
allowsSorting: !1,
|
|
598
|
-
isRowHeader: !1,
|
|
599
|
-
style: { minWidth: "40px", width: "40px" },
|
|
600
|
-
className: c(u),
|
|
601
|
-
headerCellClass: "justify-center",
|
|
602
|
-
children: A === "multiple" && y && /* @__PURE__ */ i("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ i(
|
|
603
|
-
rt,
|
|
604
|
-
{
|
|
605
|
-
checked: _e ? !0 : $t && !_e ? "indeterminate" : !1,
|
|
606
|
-
onCheckedChange: () => jt(),
|
|
607
|
-
"aria-label": "Select all rows",
|
|
608
|
-
className: "items-center justify-center"
|
|
609
|
-
}
|
|
610
|
-
) })
|
|
611
|
-
},
|
|
612
|
-
"selection"
|
|
659
|
+
"aria-label": dt,
|
|
660
|
+
size: Oe,
|
|
661
|
+
isEditable: T,
|
|
662
|
+
inlineSelection: he,
|
|
663
|
+
className: c(y && "min-w-full", pt),
|
|
664
|
+
style: zt,
|
|
665
|
+
...At,
|
|
666
|
+
children: [
|
|
667
|
+
/* @__PURE__ */ k(
|
|
668
|
+
d.Header,
|
|
669
|
+
{
|
|
670
|
+
className: c(
|
|
671
|
+
"sticky top-0",
|
|
672
|
+
Q && "[&>tr>th:first-child]:rounded-bl-none [&>tr>th:last-child]:rounded-br-none z-1",
|
|
673
|
+
ut
|
|
613
674
|
),
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
return /* @__PURE__ */ k(
|
|
675
|
+
children: [
|
|
676
|
+
W && /* @__PURE__ */ i(
|
|
617
677
|
d.Head,
|
|
618
678
|
{
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
679
|
+
label: "",
|
|
680
|
+
allowsSorting: !1,
|
|
681
|
+
isRowHeader: !1,
|
|
682
|
+
style: { minWidth: "40px", width: "40px" },
|
|
683
|
+
className: c(u),
|
|
684
|
+
headerCellClass: "justify-center",
|
|
685
|
+
children: $ === "multiple" && p && /* @__PURE__ */ i("div", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ i(
|
|
686
|
+
nt,
|
|
687
|
+
{
|
|
688
|
+
checked: _e ? !0 : jt && !_e ? "indeterminate" : !1,
|
|
689
|
+
onCheckedChange: () => Ft(),
|
|
690
|
+
"aria-label": "Select all rows",
|
|
691
|
+
className: "items-center justify-center"
|
|
692
|
+
}
|
|
693
|
+
) })
|
|
694
|
+
},
|
|
695
|
+
"selection"
|
|
696
|
+
),
|
|
697
|
+
l.map((e, r) => {
|
|
698
|
+
const n = mt ? It.get(e.key) : void 0, s = Be.get(e.key), f = at(
|
|
699
|
+
e.key,
|
|
700
|
+
z,
|
|
701
|
+
s
|
|
702
|
+
), N = ft.includes(e.key) || f === "center" ? "justify-center" : f === "right" ? "justify-end" : "";
|
|
703
|
+
return /* @__PURE__ */ k(
|
|
704
|
+
d.Head,
|
|
705
|
+
{
|
|
706
|
+
sticky: e.sticky,
|
|
707
|
+
stickyOffset: e.stickyOffset,
|
|
708
|
+
id: e.key,
|
|
709
|
+
label: e.label,
|
|
710
|
+
isRowHeader: r === 0 && !W,
|
|
711
|
+
allowsSorting: e.allowsSorting,
|
|
712
|
+
headerCellClass: `${e.headerCellClass} ${N}`,
|
|
713
|
+
style: Ee(e),
|
|
714
|
+
className: c(
|
|
715
|
+
"overflow-hidden",
|
|
716
|
+
e.headClassName,
|
|
717
|
+
u
|
|
639
718
|
),
|
|
640
|
-
|
|
641
|
-
|
|
719
|
+
children: [
|
|
720
|
+
n && re && /* @__PURE__ */ i(
|
|
721
|
+
or,
|
|
722
|
+
{
|
|
723
|
+
column: n,
|
|
724
|
+
columnLabel: n.label ?? (s ? Ht(s, kt) : e.label),
|
|
725
|
+
currentAlignment: s ? ot(
|
|
726
|
+
s,
|
|
727
|
+
z ?? /* @__PURE__ */ new Map()
|
|
728
|
+
) : (z == null ? void 0 : z.get(e.key)) ?? "left",
|
|
729
|
+
capabilities: Nt,
|
|
730
|
+
hideDisabled: l.length <= 1,
|
|
731
|
+
onAction: Lt.get(e.key),
|
|
732
|
+
renderExtraItems: Ct
|
|
733
|
+
}
|
|
734
|
+
),
|
|
735
|
+
(ce == null ? void 0 : ce(e.key)) ?? null
|
|
736
|
+
]
|
|
737
|
+
},
|
|
738
|
+
e.key
|
|
739
|
+
);
|
|
740
|
+
}),
|
|
741
|
+
m && /* @__PURE__ */ i(
|
|
742
|
+
d.Head,
|
|
743
|
+
{
|
|
744
|
+
label: "",
|
|
745
|
+
allowsSorting: !1,
|
|
746
|
+
isRowHeader: !1,
|
|
747
|
+
style: { minWidth: "56px", width: "56px" },
|
|
748
|
+
className: c(u)
|
|
642
749
|
},
|
|
643
|
-
|
|
644
|
-
)
|
|
645
|
-
|
|
646
|
-
m && /* @__PURE__ */ i(
|
|
647
|
-
d.Head,
|
|
648
|
-
{
|
|
649
|
-
label: "",
|
|
650
|
-
allowsSorting: !1,
|
|
651
|
-
isRowHeader: !1,
|
|
652
|
-
style: { minWidth: "56px", width: "56px" },
|
|
653
|
-
className: c(u)
|
|
654
|
-
},
|
|
655
|
-
"actions"
|
|
656
|
-
)
|
|
657
|
-
]
|
|
658
|
-
}
|
|
659
|
-
),
|
|
660
|
-
/* @__PURE__ */ k(d.Body, { children: [
|
|
661
|
-
!Ye && Ut(),
|
|
662
|
-
_t && /* @__PURE__ */ i(d.Row, { id: "empty-state", highlightSelectedRow: !1, children: /* @__PURE__ */ i(
|
|
663
|
-
d.Cell,
|
|
664
|
-
{
|
|
665
|
-
colSpan: M,
|
|
666
|
-
className: c(
|
|
667
|
-
"text-left text-placeholder_subtle border-b border-secondary py-3",
|
|
668
|
-
u
|
|
669
|
-
),
|
|
670
|
-
children: Fe
|
|
750
|
+
"actions"
|
|
751
|
+
)
|
|
752
|
+
]
|
|
671
753
|
}
|
|
672
|
-
)
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
754
|
+
),
|
|
755
|
+
/* @__PURE__ */ k(d.Body, { children: [
|
|
756
|
+
!Qe && qt(),
|
|
757
|
+
Pt && /* @__PURE__ */ i(
|
|
758
|
+
d.Row,
|
|
676
759
|
{
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
760
|
+
id: "empty-state",
|
|
761
|
+
highlightSelectedRow: !1,
|
|
762
|
+
children: /* @__PURE__ */ i(
|
|
763
|
+
d.Cell,
|
|
764
|
+
{
|
|
765
|
+
colSpan: D,
|
|
766
|
+
className: c(
|
|
767
|
+
"text-left text-placeholder_subtle border-b border-secondary py-3",
|
|
768
|
+
u
|
|
769
|
+
),
|
|
770
|
+
children: Me
|
|
771
|
+
}
|
|
772
|
+
)
|
|
773
|
+
},
|
|
774
|
+
"empty-state"
|
|
775
|
+
),
|
|
776
|
+
Ce && v && /* @__PURE__ */ k(
|
|
777
|
+
d.Row,
|
|
686
778
|
{
|
|
687
|
-
|
|
688
|
-
|
|
779
|
+
id: "add-row-footer",
|
|
780
|
+
highlightSelectedRow: !1,
|
|
781
|
+
children: [
|
|
782
|
+
/* @__PURE__ */ i(
|
|
783
|
+
d.Cell,
|
|
784
|
+
{
|
|
785
|
+
colSpan: D - (m ? 1 : 0),
|
|
786
|
+
className: c(u),
|
|
787
|
+
children: /* @__PURE__ */ i(
|
|
788
|
+
dr,
|
|
789
|
+
{
|
|
790
|
+
color: "tertiary",
|
|
791
|
+
className: "bg-secondary text-primary",
|
|
792
|
+
size: "xs",
|
|
793
|
+
onClick: v.onAddRow,
|
|
794
|
+
children: "+ Add Row"
|
|
795
|
+
}
|
|
796
|
+
)
|
|
797
|
+
}
|
|
798
|
+
),
|
|
799
|
+
m && /* @__PURE__ */ i(
|
|
800
|
+
d.Cell,
|
|
801
|
+
{
|
|
802
|
+
className: c("w-14", u),
|
|
803
|
+
style: { minWidth: "56px", width: "56px" }
|
|
804
|
+
}
|
|
805
|
+
)
|
|
806
|
+
]
|
|
807
|
+
},
|
|
808
|
+
"add-row-footer"
|
|
809
|
+
),
|
|
810
|
+
Tt && ye && /* @__PURE__ */ i(
|
|
811
|
+
cr,
|
|
812
|
+
{
|
|
813
|
+
...ye,
|
|
814
|
+
hasActionsColumn: m,
|
|
815
|
+
hasSelectionColumn: W,
|
|
816
|
+
showBorders: !!Q
|
|
689
817
|
}
|
|
690
818
|
)
|
|
691
|
-
] }
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
showBorders: !!Y
|
|
699
|
-
}
|
|
700
|
-
)
|
|
701
|
-
] })
|
|
702
|
-
]
|
|
703
|
-
}
|
|
704
|
-
)
|
|
705
|
-
}
|
|
706
|
-
), et = T ? /* @__PURE__ */ i(
|
|
707
|
-
ir,
|
|
708
|
-
{
|
|
709
|
-
rowIds: g,
|
|
710
|
-
columnKeys: ie,
|
|
711
|
-
containerRef: W,
|
|
712
|
-
onSelectCell: ve,
|
|
713
|
-
onEditingCellChange: Rt,
|
|
714
|
-
children: Ke
|
|
715
|
-
}
|
|
716
|
-
) : Ke;
|
|
717
|
-
return Et ? /* @__PURE__ */ k("div", { className: "flex flex-col gap-3", children: [
|
|
718
|
-
Je && Be,
|
|
719
|
-
et,
|
|
720
|
-
Ve && x && /* @__PURE__ */ i(
|
|
721
|
-
Qt,
|
|
819
|
+
] })
|
|
820
|
+
]
|
|
821
|
+
}
|
|
822
|
+
)
|
|
823
|
+
}
|
|
824
|
+
), tt = T ? /* @__PURE__ */ i(
|
|
825
|
+
sr,
|
|
722
826
|
{
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
showPagination: x.showPagination
|
|
827
|
+
rowIds: b,
|
|
828
|
+
columnKeys: se,
|
|
829
|
+
containerRef: R,
|
|
830
|
+
onSelectCell: Se,
|
|
831
|
+
onEditingCellChange: Rt,
|
|
832
|
+
children: et
|
|
730
833
|
}
|
|
731
|
-
)
|
|
732
|
-
|
|
733
|
-
|
|
834
|
+
) : et;
|
|
835
|
+
return _t ? /* @__PURE__ */ k("div", { className: "flex flex-col gap-3", children: [
|
|
836
|
+
Xe && Ve,
|
|
837
|
+
tt,
|
|
838
|
+
Ye && x && /* @__PURE__ */ i(
|
|
839
|
+
Zt,
|
|
840
|
+
{
|
|
841
|
+
currentPage: x.currentPage,
|
|
842
|
+
pageSize: x.pageSize,
|
|
843
|
+
totalPages: x.totalPages,
|
|
844
|
+
totalItems: x.totalItems,
|
|
845
|
+
onPageChange: x.onPageChange,
|
|
846
|
+
onPageSizeChange: x.onPageSizeChange,
|
|
847
|
+
showPagination: x.showPagination
|
|
848
|
+
}
|
|
849
|
+
)
|
|
850
|
+
] }) : tt;
|
|
851
|
+
}
|
|
852
|
+
);
|
|
734
853
|
export {
|
|
735
|
-
|
|
854
|
+
Mr as TableWrapper
|
|
736
855
|
};
|