@dmsi/wedgekit-react 2.1.2 → 3.0.1
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/components/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs.js +21 -17
- package/dist/components/DataGrid/index.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +340 -325
- package/dist/components/Link.d.ts +1 -2
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +23 -24
- package/dist/components/ModalButtons.d.ts.map +1 -1
- package/dist/components/ModalButtons.js +19 -18
- package/dist/components/PDFViewer/PDFElement.js +1 -1
- package/dist/components/PDFViewer/PDFPage.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +12 -2
- package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +0 -83
- package/dist/node_modules/pdfjs-dist/build/pdf.js +0 -17649
|
@@ -1,175 +1,175 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as n, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { useInfiniteScroll as
|
|
5
|
-
import { useTableLayout as
|
|
6
|
-
import { componentGap as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Checkbox as
|
|
9
|
-
import { DraggableCellHeader as
|
|
10
|
-
import { Icon as
|
|
11
|
-
import { Label as
|
|
12
|
-
import { Menu as
|
|
13
|
-
import { MenuOption as
|
|
14
|
-
import { Paragraph as
|
|
15
|
-
import { Select as
|
|
16
|
-
import { Subheader as
|
|
17
|
-
import { useReactTable as
|
|
18
|
-
import { useSensors as
|
|
19
|
-
import { SortableContext as
|
|
20
|
-
import { restrictToHorizontalAxis as
|
|
21
|
-
import { Notification as
|
|
22
|
-
import { useVirtualizer as
|
|
2
|
+
import { jsx as n, jsxs as a, Fragment as Lt } from "react/jsx-runtime";
|
|
3
|
+
import kt, { useImperativeHandle as Dt, useState as h, useCallback as $, useEffect as K, useRef as Z, useId as Tt, useLayoutEffect as Et } from "react";
|
|
4
|
+
import { useInfiniteScroll as Mt } from "../../hooks/useInfiniteScroll.js";
|
|
5
|
+
import { useTableLayout as Wt } from "../../hooks/useTableLayout/useTableLayout.js";
|
|
6
|
+
import { componentGap as We, componentPadding as je } from "../../classNames.js";
|
|
7
|
+
import { Button as Fe } from "../Button.js";
|
|
8
|
+
import { Checkbox as jt } from "../Checkbox.js";
|
|
9
|
+
import { DraggableCellHeader as Ft, DataGridCell as _t } from "../DataGridCell.js";
|
|
10
|
+
import { Icon as _e } from "../Icon.js";
|
|
11
|
+
import { Label as At } from "../Label.js";
|
|
12
|
+
import { Menu as Gt } from "../Menu.js";
|
|
13
|
+
import { MenuOption as Ot } from "../MenuOption.js";
|
|
14
|
+
import { Paragraph as x } from "../Paragraph.js";
|
|
15
|
+
import { Select as Ht } from "../Select.js";
|
|
16
|
+
import { Subheader as P } from "../Subheader.js";
|
|
17
|
+
import { useReactTable as Vt, flexRender as qt } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
18
|
+
import { useSensors as Kt, useSensor as fe, DndContext as Zt, closestCenter as Bt, KeyboardSensor as Jt, TouchSensor as Qt, MouseSensor as Xt } from "../../node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
19
|
+
import { SortableContext as Yt, horizontalListSortingStrategy as Ut, arrayMove as eo } from "../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
20
|
+
import { restrictToHorizontalAxis as to } from "../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js";
|
|
21
|
+
import { Notification as oo } from "../Notification.js";
|
|
22
|
+
import { useVirtualizer as no } from "../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
23
23
|
import { clsx as v } from "../../node_modules/clsx/dist/clsx.js";
|
|
24
|
-
import { PinnedColumns as
|
|
25
|
-
import { getSortIcon as
|
|
26
|
-
import { TableBody as
|
|
27
|
-
import { SummaryRow as
|
|
28
|
-
import { Spinner as
|
|
29
|
-
import { Tooltip as
|
|
30
|
-
import
|
|
31
|
-
import { getExpandedRowModel as
|
|
32
|
-
const
|
|
33
|
-
function
|
|
24
|
+
import { PinnedColumns as Ae } from "./PinnedColumns.js";
|
|
25
|
+
import { getSortIcon as Ge } from "./utils.js";
|
|
26
|
+
import { TableBody as ro } from "./TableBody/index.js";
|
|
27
|
+
import { SummaryRow as lo } from "./SummaryRow/index.js";
|
|
28
|
+
import { Spinner as he } from "../Spinner.js";
|
|
29
|
+
import { Tooltip as Oe } from "../Tooltip.js";
|
|
30
|
+
import He from "../../static/no-results-image.png.js";
|
|
31
|
+
import { getExpandedRowModel as so, getGroupedRowModel as io, getFilteredRowModel as co, getSortedRowModel as ao, getCoreRowModel as mo } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
32
|
+
const uo = [5, 10, 15, 20, 25, 30, 35], Ve = "h-[185px]";
|
|
33
|
+
function Ho({
|
|
34
34
|
id: s,
|
|
35
35
|
rowIdAccessor: b,
|
|
36
36
|
testid: l,
|
|
37
37
|
data: k,
|
|
38
|
-
columns:
|
|
38
|
+
columns: qe,
|
|
39
39
|
status: D,
|
|
40
|
-
isLoadingMore:
|
|
41
|
-
onLoadMore:
|
|
40
|
+
isLoadingMore: T = !1,
|
|
41
|
+
onLoadMore: Ke,
|
|
42
42
|
pagination: r,
|
|
43
|
-
showFilterRow:
|
|
44
|
-
hasMore:
|
|
45
|
-
sorting:
|
|
46
|
-
onSortingChange:
|
|
47
|
-
columnFilters:
|
|
48
|
-
onColumnFiltersChange:
|
|
49
|
-
rowSelection:
|
|
43
|
+
showFilterRow: B = !1,
|
|
44
|
+
hasMore: J = !1,
|
|
45
|
+
sorting: ge,
|
|
46
|
+
onSortingChange: Ze,
|
|
47
|
+
columnFilters: pe,
|
|
48
|
+
onColumnFiltersChange: Be,
|
|
49
|
+
rowSelection: Q,
|
|
50
50
|
onRowSelectionChange: E,
|
|
51
|
-
filteredSortedData:
|
|
51
|
+
filteredSortedData: Se,
|
|
52
52
|
totalRowCount: M,
|
|
53
|
-
hideStatusBar:
|
|
54
|
-
centerHeader:
|
|
55
|
-
enableColumnSelector:
|
|
56
|
-
predeterminedLeftPins:
|
|
57
|
-
predeterminedRightPins:
|
|
58
|
-
useMenuDefaultMinWidth:
|
|
59
|
-
rowDisabled:
|
|
60
|
-
rowDisabledAccessor:
|
|
61
|
-
isLoading:
|
|
62
|
-
loadingMessage:
|
|
63
|
-
loadingDescription:
|
|
64
|
-
maxHeight:
|
|
65
|
-
fillHeight:
|
|
66
|
-
manualFiltering:
|
|
67
|
-
notifications:
|
|
68
|
-
summaryRow:
|
|
53
|
+
hideStatusBar: Je,
|
|
54
|
+
centerHeader: Qe,
|
|
55
|
+
enableColumnSelector: ve,
|
|
56
|
+
predeterminedLeftPins: Xe = [],
|
|
57
|
+
predeterminedRightPins: Ye = [],
|
|
58
|
+
useMenuDefaultMinWidth: Ue,
|
|
59
|
+
rowDisabled: et,
|
|
60
|
+
rowDisabledAccessor: tt,
|
|
61
|
+
isLoading: g = !1,
|
|
62
|
+
loadingMessage: ot = "Loading Results",
|
|
63
|
+
loadingDescription: be,
|
|
64
|
+
maxHeight: W,
|
|
65
|
+
fillHeight: y = !1,
|
|
66
|
+
manualFiltering: X = !1,
|
|
67
|
+
notifications: Y,
|
|
68
|
+
summaryRow: we,
|
|
69
69
|
groupBy: j,
|
|
70
|
-
groupRowMode:
|
|
71
|
-
groupDefaultExpand:
|
|
72
|
-
allowUserGrouping:
|
|
73
|
-
groupSelectionMode:
|
|
74
|
-
hideGroupedColumns:
|
|
70
|
+
groupRowMode: U = "spanning",
|
|
71
|
+
groupDefaultExpand: Ce = "none",
|
|
72
|
+
allowUserGrouping: ee,
|
|
73
|
+
groupSelectionMode: te = "row",
|
|
74
|
+
hideGroupedColumns: nt,
|
|
75
75
|
grouping: R,
|
|
76
|
-
onGroupingChange:
|
|
77
|
-
expanded:
|
|
78
|
-
onExpandedChange:
|
|
79
|
-
ref:
|
|
76
|
+
onGroupingChange: rt,
|
|
77
|
+
expanded: F,
|
|
78
|
+
onExpandedChange: lt,
|
|
79
|
+
ref: st
|
|
80
80
|
}) {
|
|
81
|
-
|
|
82
|
-
getSavedLayout: () =>
|
|
81
|
+
Dt(st, () => ({
|
|
82
|
+
getSavedLayout: () => ct()
|
|
83
83
|
}));
|
|
84
|
-
const [
|
|
85
|
-
columns:
|
|
86
|
-
setColumns:
|
|
87
|
-
getSavedLayout:
|
|
88
|
-
resetToDefaults:
|
|
89
|
-
} =
|
|
90
|
-
|
|
91
|
-
), [
|
|
84
|
+
const [xe, ye] = h([]), [Re, ze] = h([]), [it, Ie] = h({}), [oe, ne] = h(null), {
|
|
85
|
+
columns: w,
|
|
86
|
+
setColumns: re,
|
|
87
|
+
getSavedLayout: ct,
|
|
88
|
+
resetToDefaults: Ne
|
|
89
|
+
} = Wt(qe, s ?? l), [$e, le] = h(
|
|
90
|
+
w.map((e) => e.id)
|
|
91
|
+
), [Pe, dt] = h(
|
|
92
92
|
Object.fromEntries(
|
|
93
|
-
|
|
93
|
+
w.filter((e) => !!e.id).map((e) => [e.id, e.meta?.visible ?? !0])
|
|
94
94
|
)
|
|
95
|
-
),
|
|
95
|
+
), Le = $(
|
|
96
96
|
(e) => {
|
|
97
|
-
|
|
97
|
+
dt(
|
|
98
98
|
Object.fromEntries(
|
|
99
|
-
|
|
99
|
+
w.filter((o) => !!o.id).map((o) => [o.id, o.meta?.visible ?? !0])
|
|
100
100
|
)
|
|
101
|
-
), e &&
|
|
101
|
+
), e && le(w.map((o) => o.id));
|
|
102
102
|
},
|
|
103
|
-
[
|
|
104
|
-
),
|
|
105
|
-
|
|
106
|
-
}, [Re]);
|
|
107
|
-
ce(() => {
|
|
108
|
-
Ne(!0);
|
|
103
|
+
[w]
|
|
104
|
+
), at = $(() => {
|
|
105
|
+
Ne();
|
|
109
106
|
}, [Ne]);
|
|
110
|
-
|
|
107
|
+
K(() => {
|
|
108
|
+
Le(!0);
|
|
109
|
+
}, [Le]);
|
|
110
|
+
const mt = r ? ge ?? xe : xe, ut = r ? (e) => {
|
|
111
111
|
const o = typeof e == "function" ? e(
|
|
112
|
-
|
|
112
|
+
ge ?? []
|
|
113
113
|
) : e;
|
|
114
|
-
(
|
|
115
|
-
} :
|
|
116
|
-
const o = typeof e == "function" ? e(
|
|
117
|
-
(
|
|
118
|
-
} :
|
|
114
|
+
(Ze ?? ye)(o);
|
|
115
|
+
} : ye, ke = r != null || X, ft = ke ? pe ?? Re : Re, ht = ke ? (e) => {
|
|
116
|
+
const o = typeof e == "function" ? e(pe ?? []) : e;
|
|
117
|
+
(Be ?? ze)(o);
|
|
118
|
+
} : ze, z = Q ?? it, I = Z(z);
|
|
119
119
|
I.current = z;
|
|
120
|
-
const
|
|
120
|
+
const De = $(
|
|
121
121
|
(e) => {
|
|
122
122
|
if (r) {
|
|
123
123
|
const o = typeof e == "function" ? e(I.current) : e;
|
|
124
|
-
I.current = o, (E ??
|
|
125
|
-
} else if (
|
|
124
|
+
I.current = o, (E ?? Ie)(o);
|
|
125
|
+
} else if (Q && E) {
|
|
126
126
|
const o = typeof e == "function" ? e(I.current) : e;
|
|
127
127
|
I.current = o, E(o);
|
|
128
128
|
} else
|
|
129
|
-
|
|
129
|
+
Ie(e);
|
|
130
130
|
},
|
|
131
|
-
[
|
|
132
|
-
), [
|
|
131
|
+
[Q, E, r]
|
|
132
|
+
), [gt, Te] = h(
|
|
133
133
|
j ?? []
|
|
134
134
|
);
|
|
135
|
-
|
|
136
|
-
R === void 0 && j !== void 0 &&
|
|
135
|
+
K(() => {
|
|
136
|
+
R === void 0 && j !== void 0 && Te(j);
|
|
137
137
|
}, [j, R]);
|
|
138
|
-
const
|
|
138
|
+
const se = R ?? gt, pt = R !== void 0 ? (e) => {
|
|
139
139
|
const o = typeof e == "function" ? e(
|
|
140
140
|
R
|
|
141
141
|
) : e;
|
|
142
|
-
|
|
143
|
-
} :
|
|
144
|
-
() =>
|
|
145
|
-
),
|
|
142
|
+
rt?.(o);
|
|
143
|
+
} : Te, [St, Ee] = h(
|
|
144
|
+
() => Ce === "all" ? !0 : {}
|
|
145
|
+
), vt = F ?? St, bt = F !== void 0 ? (e) => {
|
|
146
146
|
const o = typeof e == "function" ? e(
|
|
147
|
-
|
|
147
|
+
F
|
|
148
148
|
) : e;
|
|
149
|
-
|
|
150
|
-
} :
|
|
151
|
-
...
|
|
152
|
-
...Object.fromEntries(
|
|
153
|
-
} :
|
|
149
|
+
lt?.(o);
|
|
150
|
+
} : Ee, wt = nt ? {
|
|
151
|
+
...Pe,
|
|
152
|
+
...Object.fromEntries(se.map((e) => [e, !1]))
|
|
153
|
+
} : Pe, Ct = Tt(), f = Z(null), Me = Z(null), ie = Z(null), xt = $(
|
|
154
154
|
(e, o) => {
|
|
155
|
-
|
|
156
|
-
...
|
|
155
|
+
re((t) => t.map((d) => d.id === e ? {
|
|
156
|
+
...d,
|
|
157
157
|
meta: {
|
|
158
|
-
...
|
|
158
|
+
...d.meta,
|
|
159
159
|
visible: o
|
|
160
160
|
}
|
|
161
|
-
} :
|
|
161
|
+
} : d));
|
|
162
162
|
},
|
|
163
|
-
[
|
|
164
|
-
),
|
|
165
|
-
columns:
|
|
163
|
+
[re]
|
|
164
|
+
), i = Vt({
|
|
165
|
+
columns: w,
|
|
166
166
|
data: k,
|
|
167
167
|
defaultColumn: { minSize: 50 },
|
|
168
|
-
getCoreRowModel:
|
|
169
|
-
getSortedRowModel:
|
|
170
|
-
getFilteredRowModel:
|
|
171
|
-
getGroupedRowModel:
|
|
172
|
-
getExpandedRowModel:
|
|
168
|
+
getCoreRowModel: mo(),
|
|
169
|
+
getSortedRowModel: ao(),
|
|
170
|
+
getFilteredRowModel: X ? void 0 : co(),
|
|
171
|
+
getGroupedRowModel: io(),
|
|
172
|
+
getExpandedRowModel: so(),
|
|
173
173
|
// Grouping only ever happens client-side in this grid — there is no
|
|
174
174
|
// server-side/manual grouping mode, unlike filtering.
|
|
175
175
|
groupedColumnMode: !1,
|
|
@@ -182,194 +182,209 @@ function Fo({
|
|
|
182
182
|
// internal state update on every grouping change.
|
|
183
183
|
autoResetPageIndex: !1,
|
|
184
184
|
autoResetExpanded: !1,
|
|
185
|
-
manualFiltering:
|
|
185
|
+
manualFiltering: X,
|
|
186
186
|
columnResizeMode: "onChange",
|
|
187
187
|
getRowId: b ? (e) => String(e[b]) : (e, o) => String(e.id ?? o + 1),
|
|
188
188
|
state: {
|
|
189
|
-
columnOrder:
|
|
190
|
-
sorting:
|
|
191
|
-
columnFilters:
|
|
189
|
+
columnOrder: $e,
|
|
190
|
+
sorting: mt,
|
|
191
|
+
columnFilters: ft,
|
|
192
192
|
rowSelection: z,
|
|
193
|
-
columnVisibility:
|
|
194
|
-
grouping:
|
|
195
|
-
expanded:
|
|
193
|
+
columnVisibility: wt,
|
|
194
|
+
grouping: se,
|
|
195
|
+
expanded: vt
|
|
196
196
|
},
|
|
197
197
|
initialState: {
|
|
198
198
|
columnPinning: {
|
|
199
|
-
left:
|
|
200
|
-
right:
|
|
199
|
+
left: Xe,
|
|
200
|
+
right: Ye
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
enableColumnPinning: !0,
|
|
204
|
-
onColumnOrderChange:
|
|
205
|
-
onSortingChange:
|
|
206
|
-
onColumnFiltersChange:
|
|
207
|
-
onRowSelectionChange:
|
|
208
|
-
onGroupingChange:
|
|
209
|
-
onExpandedChange:
|
|
204
|
+
onColumnOrderChange: le,
|
|
205
|
+
onSortingChange: L(ut),
|
|
206
|
+
onColumnFiltersChange: L(ht),
|
|
207
|
+
onRowSelectionChange: L(De),
|
|
208
|
+
onGroupingChange: L(pt),
|
|
209
|
+
onExpandedChange: L(bt),
|
|
210
210
|
filterFns: {
|
|
211
211
|
startsWith: (e, o, t) => {
|
|
212
|
-
const
|
|
213
|
-
return !
|
|
212
|
+
const c = e?.getValue(o);
|
|
213
|
+
return !c || !t ? !0 : String(c).toLowerCase().startsWith(String(t).toLowerCase());
|
|
214
214
|
},
|
|
215
215
|
endsWith: (e, o, t) => {
|
|
216
|
-
const
|
|
217
|
-
return !
|
|
216
|
+
const c = e?.getValue(o);
|
|
217
|
+
return !c || !t ? !0 : String(c).toLowerCase().endsWith(String(t).toLowerCase());
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
|
-
|
|
222
|
-
if (
|
|
221
|
+
K(() => {
|
|
222
|
+
if (Ce !== "first" || F !== void 0)
|
|
223
223
|
return;
|
|
224
224
|
const e = {};
|
|
225
|
-
let o =
|
|
225
|
+
let o = i.getGroupedRowModel().rows.find((t) => t.depth === 0 && t.getIsGrouped());
|
|
226
226
|
for (; o; )
|
|
227
227
|
e[o.id] = !0, o = o.subRows.find((t) => t.getIsGrouped());
|
|
228
|
-
Object.keys(e).length > 0 &&
|
|
229
|
-
}, [
|
|
230
|
-
const _ = r ?
|
|
228
|
+
Object.keys(e).length > 0 && Ee(e);
|
|
229
|
+
}, [se]);
|
|
230
|
+
const _ = r ? Se?.map((e) => String(e.id)) ?? [] : Array.from(
|
|
231
231
|
{ length: M ?? k.length },
|
|
232
232
|
(e, o) => String(o + 1)
|
|
233
|
-
),
|
|
233
|
+
), ce = _.every(
|
|
234
234
|
(e) => z[e]
|
|
235
|
-
),
|
|
236
|
-
|
|
237
|
-
if (!
|
|
235
|
+
), yt = !ce && _.some((e) => z[e]), Rt = () => {
|
|
236
|
+
De((e) => {
|
|
237
|
+
if (!ce) {
|
|
238
238
|
const t = {};
|
|
239
|
-
for (const
|
|
240
|
-
t[
|
|
239
|
+
for (const c of _)
|
|
240
|
+
t[c] = !0;
|
|
241
241
|
return { ...e, ...t };
|
|
242
242
|
} else {
|
|
243
243
|
const t = { ...e };
|
|
244
|
-
for (const
|
|
245
|
-
delete t[
|
|
244
|
+
for (const c of _)
|
|
245
|
+
delete t[c];
|
|
246
246
|
return t;
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
|
-
|
|
250
|
+
Mt({
|
|
251
251
|
containerRef: f,
|
|
252
|
-
onLoadMore:
|
|
252
|
+
onLoadMore: Ke ?? (() => {
|
|
253
253
|
}),
|
|
254
|
-
isLoading:
|
|
254
|
+
isLoading: T,
|
|
255
255
|
enabled: !r
|
|
256
|
-
})
|
|
257
|
-
|
|
256
|
+
});
|
|
257
|
+
const de = i.getCenterVisibleLeafColumns().map((e) => e.id).join(","), A = $(() => {
|
|
258
|
+
if (!f.current) return null;
|
|
258
259
|
const e = f.current.offsetWidth;
|
|
259
|
-
if (e === 0) return;
|
|
260
|
-
const o =
|
|
261
|
-
if (
|
|
262
|
-
const m =
|
|
260
|
+
if (e === 0) return null;
|
|
261
|
+
const o = i.getLeftLeafColumns().reduce((u, S) => u + S.getSize(), 0), t = i.getRightLeafColumns().reduce((u, S) => u + S.getSize(), 0), c = e - o - t, d = i.getCenterVisibleLeafColumns();
|
|
262
|
+
if (d.length === 0) return null;
|
|
263
|
+
const m = d.reduce(
|
|
263
264
|
(u, S) => u + S.getSize(),
|
|
264
265
|
0
|
|
265
|
-
),
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}),
|
|
269
|
-
}, []);
|
|
270
|
-
|
|
266
|
+
), V = m > 0 ? c / m : 1, q = {};
|
|
267
|
+
return d.forEach((u) => {
|
|
268
|
+
q[u.id] = Math.max(Math.floor(u.getSize() * V), 50);
|
|
269
|
+
}), i.setColumnSizing((u) => ({ ...u, ...q })), e;
|
|
270
|
+
}, [i]);
|
|
271
|
+
Et(() => {
|
|
272
|
+
if (!f.current || Me.current === de) return;
|
|
273
|
+
const e = A();
|
|
274
|
+
e !== null && (Me.current = de, ie.current = e);
|
|
275
|
+
}, [de, A]), K(() => {
|
|
276
|
+
const e = f.current;
|
|
277
|
+
if (!e) return;
|
|
278
|
+
const o = new ResizeObserver(() => {
|
|
279
|
+
if (e.offsetWidth === ie.current) return;
|
|
280
|
+
const t = A();
|
|
281
|
+
t !== null && (ie.current = t);
|
|
282
|
+
});
|
|
283
|
+
return o.observe(e), () => o.disconnect();
|
|
284
|
+
}, [A]);
|
|
285
|
+
const zt = (e) => {
|
|
271
286
|
const { active: o, over: t } = e;
|
|
272
|
-
o && t && o.id !== t.id &&
|
|
273
|
-
const
|
|
274
|
-
return
|
|
287
|
+
o && t && o.id !== t.id && le((c) => {
|
|
288
|
+
const d = c.indexOf(o.id), m = c.indexOf(t.id), V = eo(c, d, m);
|
|
289
|
+
return re((q) => V.map((S) => q.find((Pt) => Pt.id === S)).filter(Boolean)), V;
|
|
275
290
|
});
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
),
|
|
281
|
-
(e) =>
|
|
282
|
-
),
|
|
283
|
-
count:
|
|
284
|
-
estimateSize: (e) =>
|
|
291
|
+
}, It = Kt(
|
|
292
|
+
fe(Xt),
|
|
293
|
+
fe(Qt),
|
|
294
|
+
fe(Jt)
|
|
295
|
+
), ae = i.getCenterLeafColumns(), Nt = ae.map((e) => e.id), $t = $e.filter(
|
|
296
|
+
(e) => Nt.includes(e)
|
|
297
|
+
), G = no({
|
|
298
|
+
count: ae.length,
|
|
299
|
+
estimateSize: (e) => ae[e].getSize(),
|
|
285
300
|
getScrollElement: () => f.current,
|
|
286
301
|
horizontal: !0,
|
|
287
302
|
overscan: 8
|
|
288
|
-
}), p =
|
|
289
|
-
let
|
|
290
|
-
|
|
291
|
-
const
|
|
303
|
+
}), p = G.getVirtualItems();
|
|
304
|
+
let O, N;
|
|
305
|
+
G && p?.length && (O = p[0]?.start ?? 0, N = G.getTotalSize() - (p[p.length - 1]?.end ?? 0));
|
|
306
|
+
const H = i.getRowModel().rows.length === 0, C = we && !H ? we : void 0, me = C ? i.getFilteredRowModel().rows.map((e) => e.original) : [], ue = C ? r ? Se ?? k : k : [];
|
|
292
307
|
return /* @__PURE__ */ n(
|
|
293
|
-
|
|
308
|
+
Zt,
|
|
294
309
|
{
|
|
295
|
-
id:
|
|
296
|
-
collisionDetection:
|
|
297
|
-
modifiers: [
|
|
298
|
-
onDragEnd:
|
|
299
|
-
sensors:
|
|
310
|
+
id: Ct,
|
|
311
|
+
collisionDetection: Bt,
|
|
312
|
+
modifiers: [to],
|
|
313
|
+
onDragEnd: zt,
|
|
314
|
+
sensors: It,
|
|
300
315
|
children: /* @__PURE__ */ n(
|
|
301
|
-
|
|
316
|
+
Yt,
|
|
302
317
|
{
|
|
303
|
-
items:
|
|
304
|
-
strategy:
|
|
305
|
-
children: /* @__PURE__ */
|
|
318
|
+
items: $t,
|
|
319
|
+
strategy: Ut,
|
|
320
|
+
children: /* @__PURE__ */ a(
|
|
306
321
|
"div",
|
|
307
322
|
{
|
|
308
323
|
className: v(
|
|
309
324
|
"flex flex-col gap-2 w-full",
|
|
310
|
-
|
|
325
|
+
y ? "grow min-h-0" : "grow-0 h-fit"
|
|
311
326
|
),
|
|
312
327
|
children: [
|
|
313
|
-
|
|
314
|
-
/* @__PURE__ */
|
|
328
|
+
Y && Y.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-2 shrink-0 [color:initial]", children: Y.map((e, o) => /* @__PURE__ */ n(oo, { ...e }, e.id ?? o)) }),
|
|
329
|
+
/* @__PURE__ */ a(
|
|
315
330
|
"div",
|
|
316
331
|
{
|
|
317
332
|
id: s,
|
|
318
333
|
"data-testid": l,
|
|
319
334
|
className: v(
|
|
320
335
|
"flex flex-col rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
|
|
321
|
-
|
|
336
|
+
y ? "flex-1 min-h-0" : "grow-0 h-fit"
|
|
322
337
|
),
|
|
323
338
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ a(
|
|
325
340
|
"div",
|
|
326
341
|
{
|
|
327
342
|
className: v(
|
|
328
343
|
"flex overflow-auto scrollbar-thin relative contain-paint will-change-transform",
|
|
329
|
-
|
|
330
|
-
|
|
344
|
+
H ? "overflow-y-hidden" : !y && "min-h-[120px]",
|
|
345
|
+
y && "flex-1 min-h-0"
|
|
331
346
|
),
|
|
332
|
-
style:
|
|
347
|
+
style: W !== void 0 ? { maxHeight: typeof W == "number" ? `${W}px` : W } : void 0,
|
|
333
348
|
ref: f,
|
|
334
|
-
inert:
|
|
335
|
-
"aria-busy":
|
|
349
|
+
inert: g || void 0,
|
|
350
|
+
"aria-busy": g || void 0,
|
|
336
351
|
children: [
|
|
337
352
|
/* @__PURE__ */ n(
|
|
338
|
-
|
|
353
|
+
Ae,
|
|
339
354
|
{
|
|
340
355
|
testid: l,
|
|
341
356
|
pinDirection: "left",
|
|
342
|
-
table:
|
|
357
|
+
table: i,
|
|
343
358
|
tableContainerRef: f,
|
|
344
359
|
pagination: r,
|
|
345
|
-
isLoadingMore:
|
|
346
|
-
hasMore:
|
|
347
|
-
showFilterRow:
|
|
348
|
-
groupRowMode:
|
|
349
|
-
groupSelectionMode:
|
|
350
|
-
allowUserGrouping:
|
|
351
|
-
hoveredRowId:
|
|
352
|
-
setHoveredRowId:
|
|
353
|
-
summaryRow:
|
|
354
|
-
filteredRows:
|
|
355
|
-
allRows:
|
|
360
|
+
isLoadingMore: T,
|
|
361
|
+
hasMore: J,
|
|
362
|
+
showFilterRow: B,
|
|
363
|
+
groupRowMode: U,
|
|
364
|
+
groupSelectionMode: te,
|
|
365
|
+
allowUserGrouping: ee,
|
|
366
|
+
hoveredRowId: oe,
|
|
367
|
+
setHoveredRowId: ne,
|
|
368
|
+
summaryRow: C,
|
|
369
|
+
filteredRows: me,
|
|
370
|
+
allRows: ue,
|
|
356
371
|
totalRowCount: M
|
|
357
372
|
}
|
|
358
373
|
),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
/* @__PURE__ */ n("thead", { className: "sticky top-0 z-10 grid", children:
|
|
374
|
+
/* @__PURE__ */ a("table", { className: "flex-1 flex flex-col min-h-min", children: [
|
|
375
|
+
/* @__PURE__ */ n("thead", { className: "sticky top-0 z-10 grid", children: i.getCenterHeaderGroups().map((e) => /* @__PURE__ */ a(
|
|
361
376
|
"tr",
|
|
362
377
|
{
|
|
363
378
|
"data-testid": l ? `${l}-header-row-${e.id}` : void 0,
|
|
364
379
|
className: "flex w-full bg-background-primary-normal",
|
|
365
380
|
"data-theme": "brand",
|
|
366
381
|
children: [
|
|
367
|
-
|
|
382
|
+
O ? (
|
|
368
383
|
// fake empty column to the left for virtualization scroll padding
|
|
369
384
|
/* @__PURE__ */ n(
|
|
370
385
|
"th",
|
|
371
386
|
{
|
|
372
|
-
style: { display: "flex", width:
|
|
387
|
+
style: { display: "flex", width: O }
|
|
373
388
|
}
|
|
374
389
|
)
|
|
375
390
|
) : null,
|
|
@@ -377,50 +392,50 @@ function Fo({
|
|
|
377
392
|
const t = e.headers[o.index];
|
|
378
393
|
if (t) {
|
|
379
394
|
if (typeof t.column.columnDef.header == "string") {
|
|
380
|
-
const
|
|
381
|
-
return /* @__PURE__ */
|
|
382
|
-
|
|
395
|
+
const c = i.getRowModel().rows[0]?.getValue(t.column.id), d = t.column.columnDef.meta?.align ?? (typeof c == "number" ? "right" : "left");
|
|
396
|
+
return /* @__PURE__ */ a(
|
|
397
|
+
Ft,
|
|
383
398
|
{
|
|
384
399
|
width: `${t.column.getSize()}px`,
|
|
385
400
|
id: s ? `${s}-header-${t.id}` : void 0,
|
|
386
401
|
testid: l ? `${l}-header-${t.id}` : void 0,
|
|
387
402
|
header: t,
|
|
388
403
|
locked: t.column.columnDef.meta?.locked,
|
|
389
|
-
center:
|
|
390
|
-
allowUserGrouping:
|
|
404
|
+
center: Qe,
|
|
405
|
+
allowUserGrouping: ee,
|
|
391
406
|
isLast: !N && o.index === p[p.length - 1]?.index,
|
|
392
407
|
className: v(
|
|
393
408
|
t.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
394
409
|
"group",
|
|
395
410
|
{
|
|
396
|
-
"justify-start":
|
|
397
|
-
"justify-end":
|
|
411
|
+
"justify-start": d === "left",
|
|
412
|
+
"justify-end": d === "right"
|
|
398
413
|
}
|
|
399
414
|
),
|
|
400
|
-
useMenuDefaultMinWidth:
|
|
415
|
+
useMenuDefaultMinWidth: Ue,
|
|
401
416
|
children: [
|
|
402
|
-
|
|
403
|
-
|
|
417
|
+
d === "left" && /* @__PURE__ */ n(
|
|
418
|
+
Oe,
|
|
404
419
|
{
|
|
405
420
|
showOnTruncation: !0,
|
|
406
421
|
message: t.column.columnDef.header,
|
|
407
422
|
position: "bottom",
|
|
408
|
-
children: /* @__PURE__ */ n(
|
|
423
|
+
children: /* @__PURE__ */ n(P, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
409
424
|
}
|
|
410
425
|
),
|
|
411
|
-
|
|
412
|
-
!t.column.getIsSorted() && t.column.getCanSort() && !
|
|
426
|
+
Ge(t.column.getIsSorted()),
|
|
427
|
+
!t.column.getIsSorted() && t.column.getCanSort() && !i.getState().columnSizingInfo.isResizingColumn && Ge(
|
|
413
428
|
t.column.getNextSortingOrder(),
|
|
414
429
|
!0
|
|
415
430
|
),
|
|
416
|
-
t.column.getSortIndex() !== -1 &&
|
|
417
|
-
|
|
418
|
-
|
|
431
|
+
t.column.getSortIndex() !== -1 && i.getState().sorting.length > 1 && /* @__PURE__ */ n(P, { tall: !0, children: t.column.getSortIndex() + 1 }),
|
|
432
|
+
d === "right" && /* @__PURE__ */ n(
|
|
433
|
+
Oe,
|
|
419
434
|
{
|
|
420
435
|
showOnTruncation: !0,
|
|
421
436
|
message: t.column.columnDef.header,
|
|
422
437
|
position: "bottom",
|
|
423
|
-
children: /* @__PURE__ */ n(
|
|
438
|
+
children: /* @__PURE__ */ n(P, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
424
439
|
}
|
|
425
440
|
),
|
|
426
441
|
/* @__PURE__ */ n(
|
|
@@ -444,25 +459,25 @@ function Fo({
|
|
|
444
459
|
t.id
|
|
445
460
|
);
|
|
446
461
|
}
|
|
447
|
-
return /* @__PURE__ */ n(
|
|
448
|
-
|
|
462
|
+
return /* @__PURE__ */ n(kt.Fragment, { children: t.column.columnDef.meta?.checkbox ? /* @__PURE__ */ n(
|
|
463
|
+
_t,
|
|
449
464
|
{
|
|
450
465
|
id: s ? `${s}-header-${t.id}` : void 0,
|
|
451
466
|
testid: l ? `${l}-header-${t.id}` : void 0,
|
|
452
467
|
type: "header",
|
|
453
468
|
component: "checkbox",
|
|
454
469
|
children: /* @__PURE__ */ n(
|
|
455
|
-
|
|
470
|
+
jt,
|
|
456
471
|
{
|
|
457
472
|
id: s ? `${s}-select-all-checkbox` : void 0,
|
|
458
473
|
testid: l ? `${l}-select-all-checkbox` : void 0,
|
|
459
|
-
checked:
|
|
460
|
-
indeterminate:
|
|
461
|
-
onChange:
|
|
474
|
+
checked: ce,
|
|
475
|
+
indeterminate: yt,
|
|
476
|
+
onChange: Rt
|
|
462
477
|
}
|
|
463
478
|
)
|
|
464
479
|
}
|
|
465
|
-
) :
|
|
480
|
+
) : qt(
|
|
466
481
|
t.column.columnDef.header,
|
|
467
482
|
t.getContext()
|
|
468
483
|
) }, t.id);
|
|
@@ -482,121 +497,121 @@ function Fo({
|
|
|
482
497
|
e.id
|
|
483
498
|
)) }),
|
|
484
499
|
/* @__PURE__ */ n(
|
|
485
|
-
|
|
500
|
+
ro,
|
|
486
501
|
{
|
|
487
502
|
id: s,
|
|
488
503
|
testid: l,
|
|
489
|
-
columnVirtualizer:
|
|
490
|
-
table:
|
|
504
|
+
columnVirtualizer: G,
|
|
505
|
+
table: i,
|
|
491
506
|
tableContainerRef: f,
|
|
492
|
-
virtualPaddingLeft:
|
|
507
|
+
virtualPaddingLeft: O,
|
|
493
508
|
virtualPaddingRight: N,
|
|
494
509
|
pagination: r,
|
|
495
|
-
isLoadingMore:
|
|
496
|
-
hasMore:
|
|
497
|
-
showFilterRow:
|
|
498
|
-
enableColumnSelector:
|
|
499
|
-
groupRowMode:
|
|
500
|
-
groupSelectionMode:
|
|
501
|
-
rowDisabled:
|
|
502
|
-
rowDisabledAccessor:
|
|
503
|
-
hoveredRowId:
|
|
504
|
-
setHoveredRowId:
|
|
510
|
+
isLoadingMore: T,
|
|
511
|
+
hasMore: J,
|
|
512
|
+
showFilterRow: B,
|
|
513
|
+
enableColumnSelector: ve,
|
|
514
|
+
groupRowMode: U,
|
|
515
|
+
groupSelectionMode: te,
|
|
516
|
+
rowDisabled: et,
|
|
517
|
+
rowDisabledAccessor: tt,
|
|
518
|
+
hoveredRowId: oe,
|
|
519
|
+
setHoveredRowId: ne
|
|
505
520
|
}
|
|
506
521
|
),
|
|
507
|
-
|
|
508
|
-
|
|
522
|
+
C && /* @__PURE__ */ n(
|
|
523
|
+
lo,
|
|
509
524
|
{
|
|
510
525
|
id: s,
|
|
511
526
|
testid: l,
|
|
512
|
-
table:
|
|
513
|
-
summaryConfig:
|
|
514
|
-
filteredRows:
|
|
515
|
-
allRows:
|
|
527
|
+
table: i,
|
|
528
|
+
summaryConfig: C,
|
|
529
|
+
filteredRows: me,
|
|
530
|
+
allRows: ue,
|
|
516
531
|
totalRowCount: M,
|
|
517
532
|
locked: !1
|
|
518
533
|
}
|
|
519
534
|
)
|
|
520
535
|
] }),
|
|
521
536
|
/* @__PURE__ */ n(
|
|
522
|
-
|
|
537
|
+
Ae,
|
|
523
538
|
{
|
|
524
539
|
id: s,
|
|
525
|
-
enableColumnSelector:
|
|
526
|
-
toggleColumnVisibility:
|
|
527
|
-
resetColumnVisibility:
|
|
540
|
+
enableColumnSelector: ve,
|
|
541
|
+
toggleColumnVisibility: xt,
|
|
542
|
+
resetColumnVisibility: at,
|
|
528
543
|
testid: l,
|
|
529
544
|
pinDirection: "right",
|
|
530
|
-
table:
|
|
545
|
+
table: i,
|
|
531
546
|
tableContainerRef: f,
|
|
532
547
|
pagination: r,
|
|
533
|
-
isLoadingMore:
|
|
534
|
-
hasMore:
|
|
535
|
-
showFilterRow:
|
|
536
|
-
groupRowMode:
|
|
537
|
-
groupSelectionMode:
|
|
538
|
-
allowUserGrouping:
|
|
539
|
-
hoveredRowId:
|
|
540
|
-
setHoveredRowId:
|
|
541
|
-
summaryRow:
|
|
542
|
-
filteredRows:
|
|
543
|
-
allRows:
|
|
548
|
+
isLoadingMore: T,
|
|
549
|
+
hasMore: J,
|
|
550
|
+
showFilterRow: B,
|
|
551
|
+
groupRowMode: U,
|
|
552
|
+
groupSelectionMode: te,
|
|
553
|
+
allowUserGrouping: ee,
|
|
554
|
+
hoveredRowId: oe,
|
|
555
|
+
setHoveredRowId: ne,
|
|
556
|
+
summaryRow: C,
|
|
557
|
+
filteredRows: me,
|
|
558
|
+
allRows: ue,
|
|
544
559
|
totalRowCount: M
|
|
545
560
|
}
|
|
546
561
|
)
|
|
547
562
|
]
|
|
548
563
|
}
|
|
549
564
|
),
|
|
550
|
-
|
|
565
|
+
g && H && /* @__PURE__ */ a(
|
|
551
566
|
"div",
|
|
552
567
|
{
|
|
553
568
|
className: v(
|
|
554
|
-
|
|
569
|
+
Ve,
|
|
555
570
|
"flex flex-col items-center justify-center",
|
|
556
|
-
|
|
557
|
-
|
|
571
|
+
We,
|
|
572
|
+
je
|
|
558
573
|
),
|
|
559
574
|
children: [
|
|
560
|
-
/* @__PURE__ */ n(
|
|
561
|
-
/* @__PURE__ */ n(
|
|
562
|
-
|
|
575
|
+
/* @__PURE__ */ n(he, { size: "large" }),
|
|
576
|
+
/* @__PURE__ */ n(P, { color: "text-secondary-normal", children: ot }),
|
|
577
|
+
be && /* @__PURE__ */ n(x, { color: "text-secondary-normal", children: be })
|
|
563
578
|
]
|
|
564
579
|
}
|
|
565
580
|
),
|
|
566
|
-
!
|
|
581
|
+
!g && H && /* @__PURE__ */ a(
|
|
567
582
|
"div",
|
|
568
583
|
{
|
|
569
584
|
className: v(
|
|
570
|
-
|
|
585
|
+
Ve,
|
|
571
586
|
"flex flex-col items-center justify-center",
|
|
572
|
-
|
|
573
|
-
|
|
587
|
+
We,
|
|
588
|
+
je
|
|
574
589
|
),
|
|
575
590
|
"data-testid": l ? `${l}-no-results` : void 0,
|
|
576
591
|
children: [
|
|
577
592
|
/* @__PURE__ */ n(
|
|
578
593
|
"img",
|
|
579
594
|
{
|
|
580
|
-
src:
|
|
595
|
+
src: He?.src ?? He,
|
|
581
596
|
alt: "No Results",
|
|
582
597
|
className: "h-30 opacity-20",
|
|
583
598
|
width: 120,
|
|
584
599
|
height: 120
|
|
585
600
|
}
|
|
586
601
|
),
|
|
587
|
-
/* @__PURE__ */ n(
|
|
588
|
-
/* @__PURE__ */ n(
|
|
602
|
+
/* @__PURE__ */ n(P, { color: "text-secondary-normal", children: "No Results" }),
|
|
603
|
+
/* @__PURE__ */ n(x, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
|
|
589
604
|
]
|
|
590
605
|
}
|
|
591
606
|
),
|
|
592
|
-
!
|
|
593
|
-
r && /* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 w-min", children:
|
|
595
|
-
/* @__PURE__ */ n(
|
|
596
|
-
/* @__PURE__ */ n(
|
|
597
|
-
] }) : /* @__PURE__ */
|
|
607
|
+
!Je && /* @__PURE__ */ a("div", { className: v("p-2 pt-[7px] border-t border-border-primary-normal min-h-[34px]", !y && "h-full"), children: [
|
|
608
|
+
r && /* @__PURE__ */ a("div", { className: "flex justify-between items-center", children: [
|
|
609
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 w-min", children: g ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [
|
|
610
|
+
/* @__PURE__ */ n(he, { size: "small" }),
|
|
611
|
+
/* @__PURE__ */ n(x, { children: D || "Loading..." })
|
|
612
|
+
] }) : /* @__PURE__ */ a(Lt, { children: [
|
|
598
613
|
/* @__PURE__ */ n(
|
|
599
|
-
|
|
614
|
+
Ht,
|
|
600
615
|
{
|
|
601
616
|
id: s ? `${s}-pagesize-select` : void 0,
|
|
602
617
|
testid: l ? `${l}-pagesize-select` : void 0,
|
|
@@ -604,13 +619,13 @@ function Fo({
|
|
|
604
619
|
value: r.pageSize.toString(),
|
|
605
620
|
onChange: (e) => r.onPageSizeChange?.(Number(e.target.value)),
|
|
606
621
|
renderMenu: (e) => /* @__PURE__ */ n(
|
|
607
|
-
|
|
622
|
+
Gt,
|
|
608
623
|
{
|
|
609
624
|
...e,
|
|
610
625
|
id: s ? `${s}-pagesize-menu` : void 0,
|
|
611
626
|
testid: l ? `${l}-pagesize-menu` : void 0,
|
|
612
|
-
children:
|
|
613
|
-
|
|
627
|
+
children: uo.map((o) => /* @__PURE__ */ n(
|
|
628
|
+
Ot,
|
|
614
629
|
{
|
|
615
630
|
id: s ? `${s}-pagesize-option-${o}` : void 0,
|
|
616
631
|
selected: r.pageSize === o,
|
|
@@ -623,22 +638,22 @@ function Fo({
|
|
|
623
638
|
)
|
|
624
639
|
}
|
|
625
640
|
),
|
|
626
|
-
/* @__PURE__ */ n(
|
|
641
|
+
/* @__PURE__ */ n(At, { children: "Per Page" })
|
|
627
642
|
] }) }),
|
|
628
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
629
644
|
/* @__PURE__ */ n(
|
|
630
|
-
|
|
645
|
+
Fe,
|
|
631
646
|
{
|
|
632
647
|
id: s ? `${s}-prev-page-button` : void 0,
|
|
633
648
|
testid: l ? `${l}-prev-page-button` : void 0,
|
|
634
649
|
iconOnly: !0,
|
|
635
|
-
leftIcon: /* @__PURE__ */ n(
|
|
650
|
+
leftIcon: /* @__PURE__ */ n(_e, { name: "chevron_left" }),
|
|
636
651
|
onClick: () => r.onPageChange(r.pageIndex - 1),
|
|
637
652
|
variant: "tertiary",
|
|
638
653
|
disabled: r.pageIndex === 0
|
|
639
654
|
}
|
|
640
655
|
),
|
|
641
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ a(x, { children: [
|
|
642
657
|
r.pageIndex * r.pageSize + 1,
|
|
643
658
|
" -",
|
|
644
659
|
" ",
|
|
@@ -651,12 +666,12 @@ function Fo({
|
|
|
651
666
|
r.total
|
|
652
667
|
] }),
|
|
653
668
|
/* @__PURE__ */ n(
|
|
654
|
-
|
|
669
|
+
Fe,
|
|
655
670
|
{
|
|
656
671
|
id: s ? `${s}-next-page-button` : void 0,
|
|
657
672
|
testid: l ? `${l}-next-page-button` : void 0,
|
|
658
673
|
iconOnly: !0,
|
|
659
|
-
leftIcon: /* @__PURE__ */ n(
|
|
674
|
+
leftIcon: /* @__PURE__ */ n(_e, { name: "chevron_right" }),
|
|
660
675
|
onClick: () => r.onPageChange(r.pageIndex + 1),
|
|
661
676
|
variant: "tertiary",
|
|
662
677
|
disabled: (r.pageIndex + 1) * r.pageSize >= r.total
|
|
@@ -664,12 +679,12 @@ function Fo({
|
|
|
664
679
|
)
|
|
665
680
|
] })
|
|
666
681
|
] }),
|
|
667
|
-
!r &&
|
|
668
|
-
/* @__PURE__ */ n(
|
|
669
|
-
/* @__PURE__ */ n(
|
|
682
|
+
!r && g && /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
|
|
683
|
+
/* @__PURE__ */ n(he, { size: "small" }),
|
|
684
|
+
/* @__PURE__ */ n(x, { testid: l ? `${l}-status-text` : void 0, children: D || "Loading..." })
|
|
670
685
|
] }),
|
|
671
|
-
!r && !
|
|
672
|
-
|
|
686
|
+
!r && !g && D && /* @__PURE__ */ n(
|
|
687
|
+
x,
|
|
673
688
|
{
|
|
674
689
|
testid: l ? `${l}-status-text` : void 0,
|
|
675
690
|
children: D
|
|
@@ -687,7 +702,7 @@ function Fo({
|
|
|
687
702
|
}
|
|
688
703
|
);
|
|
689
704
|
}
|
|
690
|
-
function
|
|
705
|
+
function L(s) {
|
|
691
706
|
return (b) => {
|
|
692
707
|
s(
|
|
693
708
|
(l) => typeof b == "function" ? b(l) : b
|
|
@@ -695,5 +710,5 @@ function P(s) {
|
|
|
695
710
|
};
|
|
696
711
|
}
|
|
697
712
|
export {
|
|
698
|
-
|
|
713
|
+
Ho as DataGrid
|
|
699
714
|
};
|