@dmsi/wedgekit-react 3.0.1 → 3.0.2

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