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