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