@adapttable/mantine 0.2.1 → 0.2.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.
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
+ import { c } from "react-compiler-runtime";
1
2
  import { ACTIONS_COLUMN_KEY, EyeIcon, GripIcon, PIN_Z, PinIcon, RANGE_OPS, RANGE_OP_LABEL_KEYS, RANGE_SUFFIXES, columnMenuRows, columnReorderKeyProps, columnResizeHandleProps, createHistoryAdapter, createMemoryAdapter, defaultConfirm, defaultLabels, deriveSortByOptions, edgePinStyle, filterLabel, getHistoryAdapter, headerGroupRow, isDeclarativeFilters, nextPinSide, pageSizeOptions, pinActionLabel, pinnedCellStyle, pinnedColumnWidth, readRangeWidget, resolveDisabledReason, resolveLabels, rowClickProps, runRowAction, tableMinWidth, tableRenderModel, useBackendData, useBulkActionRunner, useChromeBodyData, useChromeScrollReset, useColumnDragState, useDataTable, useFilterOptions, useFilterTriggerToggle, useFrontendData, useHorizontalOverflow, usePrefersReducedMotion, useSavedViews, useSavedViews as useSavedViews$1, useTableChrome, useTableData, useTableUrlState, writeRangeWidget } from "@adapttable/core";
2
3
  import { ActionIcon, Alert, Anchor, Badge, Box, Button, Card, Checkbox, Drawer, Group, Input, Loader, Menu, NativeSelect, NumberInput, Pagination, Paper, Pill, Popover, Progress, Select, Skeleton, Stack, Table, Text, TextInput, Tooltip, VisuallyHidden } from "@mantine/core";
3
4
  import { useElementSize } from "@mantine/hooks";
4
5
  import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
5
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
7
  //#region src/animation/useMountStagger.ts
8
+ /** Tuning for the mount stagger. */
7
9
  /**
8
10
  * Dependency-free entrance stagger using the Web Animations API. Animates
9
11
  * descendants marked with `data-stagger` once on mount (and whenever
@@ -15,68 +17,136 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
15
17
  * @param options - See {@link MountStaggerOptions}.
16
18
  */
17
19
  function useMountStagger(ref, deps, options) {
20
+ const $ = c(15);
18
21
  const reduced = usePrefersReducedMotion();
19
- const { enabled, step = 40, duration = 320 } = options;
20
- useEffect(() => {
21
- if (!enabled || reduced) return;
22
- const root = ref.current;
23
- if (!root) return;
24
- root.querySelectorAll("[data-stagger]").forEach((el, index) => {
25
- if (typeof el.animate !== "function") return;
26
- el.animate([{
27
- opacity: 0,
28
- transform: "translateY(8px)"
29
- }, {
30
- opacity: 1,
31
- transform: "translateY(0)"
32
- }], {
33
- duration,
34
- delay: index * step,
35
- easing: "cubic-bezier(0.16, 1, 0.3, 1)",
36
- fill: "both"
22
+ const { enabled, step: t0, duration: t1 } = options;
23
+ const step = t0 === void 0 ? 40 : t0;
24
+ const duration = t1 === void 0 ? 320 : t1;
25
+ let t2;
26
+ if ($[0] !== deps) {
27
+ t2 = deps.map(String).join("|");
28
+ $[0] = deps;
29
+ $[1] = t2;
30
+ } else t2 = $[1];
31
+ const depsKey = t2;
32
+ let t3;
33
+ if ($[2] !== duration || $[3] !== enabled || $[4] !== reduced || $[5] !== ref || $[6] !== step) {
34
+ t3 = () => {
35
+ if (!enabled || reduced) return;
36
+ const root = ref.current;
37
+ if (!root) return;
38
+ root.querySelectorAll("[data-stagger]").forEach((el, index) => {
39
+ if (typeof el.animate !== "function") return;
40
+ el.animate([{
41
+ opacity: 0,
42
+ transform: "translateY(8px)"
43
+ }, {
44
+ opacity: 1,
45
+ transform: "translateY(0)"
46
+ }], {
47
+ duration,
48
+ delay: index * step,
49
+ easing: "cubic-bezier(0.16, 1, 0.3, 1)",
50
+ fill: "both"
51
+ });
37
52
  });
38
- });
39
- }, [
40
- enabled,
41
- reduced,
42
- step,
43
- duration,
44
- ref,
45
- deps.map(String).join("|")
46
- ]);
53
+ };
54
+ $[2] = duration;
55
+ $[3] = enabled;
56
+ $[4] = reduced;
57
+ $[5] = ref;
58
+ $[6] = step;
59
+ $[7] = t3;
60
+ } else t3 = $[7];
61
+ let t4;
62
+ if ($[8] !== depsKey || $[9] !== duration || $[10] !== enabled || $[11] !== reduced || $[12] !== ref || $[13] !== step) {
63
+ t4 = [
64
+ enabled,
65
+ reduced,
66
+ step,
67
+ duration,
68
+ ref,
69
+ depsKey
70
+ ];
71
+ $[8] = depsKey;
72
+ $[9] = duration;
73
+ $[10] = enabled;
74
+ $[11] = reduced;
75
+ $[12] = ref;
76
+ $[13] = step;
77
+ $[14] = t4;
78
+ } else t4 = $[14];
79
+ useEffect(t3, t4);
47
80
  }
48
81
  //#endregion
49
82
  //#region src/components/ActiveFilterChips.tsx
83
+ /** Props for {@link ActiveFilterChips}. */
50
84
  /** A wrapping strip of removable filter chips. Renders nothing when empty. */
51
- function ActiveFilterChips({ chips, onClearAll, label, clearAllLabel }) {
85
+ function ActiveFilterChips(t0) {
86
+ const $ = c(13);
87
+ const { chips, onClearAll, label, clearAllLabel } = t0;
52
88
  if (chips.length === 0) return null;
53
- return /* @__PURE__ */ jsxs(Group, {
54
- gap: 6,
55
- "aria-label": label,
56
- component: "ul",
57
- style: {
89
+ let t1;
90
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
91
+ t1 = {
58
92
  listStyle: "none",
59
93
  padding: 0,
60
94
  margin: 0
61
- },
62
- children: [chips.map((chip) => /* @__PURE__ */ jsx(Pill, {
63
- component: "li",
64
- withRemoveButton: true,
65
- onRemove: chip.onRemove,
66
- removeButtonProps: { "aria-label": `${clearAllLabel}: ${chip.label}` },
67
- children: chip.label
68
- }, chip.key)), onClearAll && /* @__PURE__ */ jsx(Anchor, {
95
+ };
96
+ $[0] = t1;
97
+ } else t1 = $[0];
98
+ let t2;
99
+ if ($[1] !== chips || $[2] !== clearAllLabel) {
100
+ let t3;
101
+ if ($[4] !== clearAllLabel) {
102
+ t3 = (chip) => /* @__PURE__ */ jsx(Pill, {
103
+ component: "li",
104
+ withRemoveButton: true,
105
+ onRemove: chip.onRemove,
106
+ removeButtonProps: { "aria-label": `${clearAllLabel}: ${chip.label}` },
107
+ children: chip.label
108
+ }, chip.key);
109
+ $[4] = clearAllLabel;
110
+ $[5] = t3;
111
+ } else t3 = $[5];
112
+ t2 = chips.map(t3);
113
+ $[1] = chips;
114
+ $[2] = clearAllLabel;
115
+ $[3] = t2;
116
+ } else t2 = $[3];
117
+ let t3;
118
+ if ($[6] !== clearAllLabel || $[7] !== onClearAll) {
119
+ t3 = onClearAll && /* @__PURE__ */ jsx(Anchor, {
69
120
  component: "button",
70
121
  type: "button",
71
122
  fz: "xs",
72
123
  fw: 600,
73
124
  onClick: onClearAll,
74
125
  children: clearAllLabel
75
- })]
76
- });
126
+ });
127
+ $[6] = clearAllLabel;
128
+ $[7] = onClearAll;
129
+ $[8] = t3;
130
+ } else t3 = $[8];
131
+ let t4;
132
+ if ($[9] !== label || $[10] !== t2 || $[11] !== t3) {
133
+ t4 = /* @__PURE__ */ jsxs(Group, {
134
+ gap: 6,
135
+ "aria-label": label,
136
+ component: "ul",
137
+ style: t1,
138
+ children: [t2, t3]
139
+ });
140
+ $[9] = label;
141
+ $[10] = t2;
142
+ $[11] = t3;
143
+ $[12] = t4;
144
+ } else t4 = $[12];
145
+ return t4;
77
146
  }
78
147
  //#endregion
79
148
  //#region src/components/AutoFilterForm.tsx
149
+ /** Props for {@link AutoFilterForm}. */
80
150
  /** A scalar filter value as input text (`""` when unset). */
81
151
  const asText = (value) => value == null ? "" : String(value);
82
152
  /** A multi-select value as an array, tolerating a scalar from the URL. */
@@ -98,151 +168,405 @@ const RANGE_FLAVOUR = {
98
168
  * `Min`/`Max` (`From`/`To`) pair via {@link readRangeWidget} /
99
169
  * {@link writeRangeWidget}, so URLs, chips and predicates are unchanged.
100
170
  */
101
- function RangeField({ def, source, kind, labels }) {
102
- const label = filterLabel(def);
171
+ function RangeField(t0) {
172
+ const $ = c(45);
173
+ const { def, source, kind, labels } = t0;
174
+ let t1;
175
+ if ($[0] !== def) {
176
+ t1 = filterLabel(def);
177
+ $[0] = def;
178
+ $[1] = t1;
179
+ } else t1 = $[1];
180
+ const label = t1;
103
181
  const lowKey = def.key + RANGE_SUFFIXES[kind].start;
104
182
  const highKey = def.key + RANGE_SUFFIXES[kind].end;
105
- const derived = readRangeWidget(source.extra, lowKey, highKey);
183
+ let t2;
184
+ if ($[2] !== highKey || $[3] !== lowKey || $[4] !== source.extra) {
185
+ t2 = readRangeWidget(source.extra, lowKey, highKey);
186
+ $[2] = highKey;
187
+ $[3] = lowKey;
188
+ $[4] = source.extra;
189
+ $[5] = t2;
190
+ } else t2 = $[5];
191
+ const derived = t2;
106
192
  const [chosen, setChosen] = useState(null);
107
193
  const op = chosen ?? derived.op ?? null;
108
- const low = asText(source.extra[lowKey]);
109
- const high = asText(source.extra[highKey]);
110
- /** The one visible value outside "Between" (`lte` stores the upper bound). */
111
- const single = op === "lte" ? high : low;
112
- const write = (nextOp, a, b) => source.setExtras(writeRangeWidget(nextOp, a, b, lowKey, highKey));
113
- const handleOp = (value) => {
114
- const next = asOp(value);
115
- setChosen(next ?? null);
116
- write(next, single, "");
117
- };
118
- const flavour = RANGE_FLAVOUR[kind];
119
- const opLabelKeys = RANGE_OP_LABEL_KEYS[flavour];
120
- const data = RANGE_OPS.map((value) => ({
121
- value,
122
- label: labels[opLabelKeys[value]]
123
- }));
124
- const valueInput = (text, value, commit) => flavour === "number" ? /* @__PURE__ */ jsx(NumberInput, {
125
- size: "sm",
126
- hideControls: true,
127
- style: {
128
- flex: "1 1 6rem",
129
- minWidth: "6rem"
130
- },
131
- "aria-label": `${label} ${text}`,
132
- placeholder: text,
133
- value,
134
- onChange: (next) => commit(String(next))
135
- }) : /* @__PURE__ */ jsx(TextInput, {
136
- type: "date",
137
- size: "sm",
138
- style: {
139
- flex: "1 1 8.5rem",
140
- minWidth: "8.5rem"
141
- },
142
- "aria-label": `${label} ${text}`,
143
- placeholder: text,
144
- value,
145
- onChange: (e) => commit(e.currentTarget.value)
146
- });
147
- let values = null;
148
- if (op === "between") values = /* @__PURE__ */ jsxs(Fragment, { children: [valueInput(labels.from, low, (next) => write("between", next, high)), valueInput(labels.to, high, (next) => write("between", low, next))] });
149
- else if (op) values = valueInput(labels.value, single, (next) => write(op, next, ""));
150
- return /* @__PURE__ */ jsxs(Stack, {
151
- gap: 4,
152
- children: [/* @__PURE__ */ jsx(Input.Label, {
194
+ let data;
195
+ let handleOp;
196
+ let values;
197
+ if ($[6] !== highKey || $[7] !== kind || $[8] !== label || $[9] !== labels || $[10] !== lowKey || $[11] !== op || $[12] !== source) {
198
+ const low = asText(source.extra[lowKey]);
199
+ const high = asText(source.extra[highKey]);
200
+ const single = op === "lte" ? high : low;
201
+ let t3;
202
+ if ($[16] !== highKey || $[17] !== lowKey || $[18] !== source) {
203
+ t3 = (nextOp, a, b) => source.setExtras(writeRangeWidget(nextOp, a, b, lowKey, highKey));
204
+ $[16] = highKey;
205
+ $[17] = lowKey;
206
+ $[18] = source;
207
+ $[19] = t3;
208
+ } else t3 = $[19];
209
+ const write = t3;
210
+ handleOp = (value) => {
211
+ const next = asOp(value);
212
+ setChosen(next ?? null);
213
+ write(next, single, "");
214
+ };
215
+ const flavour = RANGE_FLAVOUR[kind];
216
+ const opLabelKeys = RANGE_OP_LABEL_KEYS[flavour];
217
+ let t4;
218
+ if ($[20] !== labels || $[21] !== opLabelKeys) {
219
+ t4 = RANGE_OPS.map((value_0) => ({
220
+ value: value_0,
221
+ label: labels[opLabelKeys[value_0]]
222
+ }));
223
+ $[20] = labels;
224
+ $[21] = opLabelKeys;
225
+ $[22] = t4;
226
+ } else t4 = $[22];
227
+ data = t4;
228
+ let t5;
229
+ if ($[23] !== flavour || $[24] !== label) {
230
+ t5 = (text, value_1, commit) => flavour === "number" ? /* @__PURE__ */ jsx(NumberInput, {
231
+ size: "sm",
232
+ hideControls: true,
233
+ style: {
234
+ flex: "1 1 6rem",
235
+ minWidth: "6rem"
236
+ },
237
+ "aria-label": `${label} ${text}`,
238
+ placeholder: text,
239
+ value: value_1,
240
+ onChange: (next_0) => commit(String(next_0))
241
+ }) : /* @__PURE__ */ jsx(TextInput, {
242
+ type: "date",
243
+ size: "sm",
244
+ style: {
245
+ flex: "1 1 8.5rem",
246
+ minWidth: "8.5rem"
247
+ },
248
+ "aria-label": `${label} ${text}`,
249
+ placeholder: text,
250
+ value: value_1,
251
+ onChange: (e) => commit(e.currentTarget.value)
252
+ });
253
+ $[23] = flavour;
254
+ $[24] = label;
255
+ $[25] = t5;
256
+ } else t5 = $[25];
257
+ const valueInput = t5;
258
+ values = null;
259
+ if (op === "between") values = /* @__PURE__ */ jsxs(Fragment, { children: [valueInput(labels.from, low, (next_1) => write("between", next_1, high)), valueInput(labels.to, high, (next_2) => write("between", low, next_2))] });
260
+ else if (op) {
261
+ let t6;
262
+ if ($[26] !== op || $[27] !== write) {
263
+ t6 = (next_3) => write(op, next_3, "");
264
+ $[26] = op;
265
+ $[27] = write;
266
+ $[28] = t6;
267
+ } else t6 = $[28];
268
+ values = valueInput(labels.value, single, t6);
269
+ }
270
+ $[6] = highKey;
271
+ $[7] = kind;
272
+ $[8] = label;
273
+ $[9] = labels;
274
+ $[10] = lowKey;
275
+ $[11] = op;
276
+ $[12] = source;
277
+ $[13] = data;
278
+ $[14] = handleOp;
279
+ $[15] = values;
280
+ } else {
281
+ data = $[13];
282
+ handleOp = $[14];
283
+ values = $[15];
284
+ }
285
+ let t3;
286
+ if ($[29] !== label) {
287
+ t3 = /* @__PURE__ */ jsx(Input.Label, {
153
288
  size: "sm",
154
289
  children: label
155
- }), /* @__PURE__ */ jsxs(Group, {
290
+ });
291
+ $[29] = label;
292
+ $[30] = t3;
293
+ } else t3 = $[30];
294
+ let t4;
295
+ if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
296
+ t4 = {
297
+ flex: "0 0 8.5rem",
298
+ width: "8.5rem"
299
+ };
300
+ $[31] = t4;
301
+ } else t4 = $[31];
302
+ const t5 = `${label} ${labels.operator}`;
303
+ let t6;
304
+ if ($[32] === Symbol.for("react.memo_cache_sentinel")) {
305
+ t6 = { withinPortal: false };
306
+ $[32] = t6;
307
+ } else t6 = $[32];
308
+ let t7;
309
+ if ($[33] !== data || $[34] !== handleOp || $[35] !== labels.operator || $[36] !== op || $[37] !== t5) {
310
+ t7 = /* @__PURE__ */ jsx(Select, {
311
+ size: "sm",
312
+ clearable: true,
313
+ style: t4,
314
+ "aria-label": t5,
315
+ placeholder: labels.operator,
316
+ data,
317
+ value: op,
318
+ onChange: handleOp,
319
+ comboboxProps: t6
320
+ });
321
+ $[33] = data;
322
+ $[34] = handleOp;
323
+ $[35] = labels.operator;
324
+ $[36] = op;
325
+ $[37] = t5;
326
+ $[38] = t7;
327
+ } else t7 = $[38];
328
+ let t8;
329
+ if ($[39] !== t7 || $[40] !== values) {
330
+ t8 = /* @__PURE__ */ jsxs(Group, {
156
331
  gap: "xs",
157
332
  align: "flex-start",
158
- children: [/* @__PURE__ */ jsx(Select, {
159
- size: "sm",
160
- clearable: true,
161
- style: {
162
- flex: "0 0 8.5rem",
163
- width: "8.5rem"
164
- },
165
- "aria-label": `${label} ${labels.operator}`,
166
- placeholder: labels.operator,
167
- data,
168
- value: op,
169
- onChange: handleOp,
170
- comboboxProps: { withinPortal: false }
171
- }), values]
172
- })]
173
- });
333
+ children: [t7, values]
334
+ });
335
+ $[39] = t7;
336
+ $[40] = values;
337
+ $[41] = t8;
338
+ } else t8 = $[41];
339
+ let t9;
340
+ if ($[42] !== t3 || $[43] !== t8) {
341
+ t9 = /* @__PURE__ */ jsxs(Stack, {
342
+ gap: 4,
343
+ children: [t3, t8]
344
+ });
345
+ $[42] = t3;
346
+ $[43] = t8;
347
+ $[44] = t9;
348
+ } else t9 = $[44];
349
+ return t9;
174
350
  }
175
351
  /**
176
352
  * Single-choice control. Options resolve through {@link useFilterOptions}
177
353
  * (static array, async loader, or none); while a loader is in flight the
178
354
  * select shows one disabled placeholder option.
179
355
  */
180
- function SelectControl({ def, source }) {
181
- const label = filterLabel(def);
356
+ function SelectControl(t0) {
357
+ const $ = c(15);
358
+ const { def, source } = t0;
359
+ let t1;
360
+ if ($[0] !== def) {
361
+ t1 = filterLabel(def);
362
+ $[0] = def;
363
+ $[1] = t1;
364
+ } else t1 = $[1];
365
+ const label = t1;
182
366
  const { options, loading } = useFilterOptions(def);
183
- return /* @__PURE__ */ jsx(NativeSelect, {
184
- size: "sm",
185
- label,
186
- data: loading ? [{
367
+ let t2;
368
+ if ($[2] !== loading || $[3] !== options) {
369
+ t2 = loading ? [{
187
370
  value: "",
188
371
  label: "…",
189
372
  disabled: true
190
373
  }] : [{
191
374
  value: "",
192
375
  label: "All"
193
- }, ...options],
194
- value: asText(source.extra[def.key]),
195
- onChange: (e) => source.setExtra(def.key, e.currentTarget.value)
196
- });
376
+ }, ...options];
377
+ $[2] = loading;
378
+ $[3] = options;
379
+ $[4] = t2;
380
+ } else t2 = $[4];
381
+ const data = t2;
382
+ const t3 = source.extra[def.key];
383
+ let t4;
384
+ if ($[5] !== t3) {
385
+ t4 = asText(t3);
386
+ $[5] = t3;
387
+ $[6] = t4;
388
+ } else t4 = $[6];
389
+ let t5;
390
+ if ($[7] !== def.key || $[8] !== source) {
391
+ t5 = (e) => source.setExtra(def.key, e.currentTarget.value);
392
+ $[7] = def.key;
393
+ $[8] = source;
394
+ $[9] = t5;
395
+ } else t5 = $[9];
396
+ let t6;
397
+ if ($[10] !== data || $[11] !== label || $[12] !== t4 || $[13] !== t5) {
398
+ t6 = /* @__PURE__ */ jsx(NativeSelect, {
399
+ size: "sm",
400
+ label,
401
+ data,
402
+ value: t4,
403
+ onChange: t5
404
+ });
405
+ $[10] = data;
406
+ $[11] = label;
407
+ $[12] = t4;
408
+ $[13] = t5;
409
+ $[14] = t6;
410
+ } else t6 = $[14];
411
+ return t6;
197
412
  }
198
413
  /**
199
414
  * Multi-choice control. Options resolve through {@link useFilterOptions};
200
415
  * while a loader is in flight the group shows a small spinner instead of
201
416
  * checkboxes.
202
417
  */
203
- function MultiSelectControl({ def, source }) {
204
- const label = filterLabel(def);
418
+ function MultiSelectControl(t0) {
419
+ const $ = c(17);
420
+ const { def, source } = t0;
421
+ let t1;
422
+ if ($[0] !== def) {
423
+ t1 = filterLabel(def);
424
+ $[0] = def;
425
+ $[1] = t1;
426
+ } else t1 = $[1];
427
+ const label = t1;
205
428
  const { options, loading } = useFilterOptions(def);
206
- return /* @__PURE__ */ jsx(Checkbox.Group, {
207
- label,
208
- value: asList(source.extra[def.key]),
209
- onChange: (values) => source.setExtra(def.key, values),
210
- children: /* @__PURE__ */ jsx(Group, {
429
+ const t2 = source.extra[def.key];
430
+ let t3;
431
+ if ($[2] !== t2) {
432
+ t3 = asList(t2);
433
+ $[2] = t2;
434
+ $[3] = t3;
435
+ } else t3 = $[3];
436
+ let t4;
437
+ if ($[4] !== def.key || $[5] !== source) {
438
+ t4 = (values) => source.setExtra(def.key, values);
439
+ $[4] = def.key;
440
+ $[5] = source;
441
+ $[6] = t4;
442
+ } else t4 = $[6];
443
+ let t5;
444
+ if ($[7] !== loading || $[8] !== options) {
445
+ t5 = loading ? /* @__PURE__ */ jsx(Loader, { size: "xs" }) : options.map(_temp$3);
446
+ $[7] = loading;
447
+ $[8] = options;
448
+ $[9] = t5;
449
+ } else t5 = $[9];
450
+ let t6;
451
+ if ($[10] !== t5) {
452
+ t6 = /* @__PURE__ */ jsx(Group, {
211
453
  gap: "sm",
212
454
  mt: 4,
213
- children: loading ? /* @__PURE__ */ jsx(Loader, { size: "xs" }) : options.map((option) => /* @__PURE__ */ jsx(Checkbox, {
214
- size: "sm",
215
- value: option.value,
216
- label: option.label
217
- }, option.value))
218
- })
219
- });
455
+ children: t5
456
+ });
457
+ $[10] = t5;
458
+ $[11] = t6;
459
+ } else t6 = $[11];
460
+ let t7;
461
+ if ($[12] !== label || $[13] !== t3 || $[14] !== t4 || $[15] !== t6) {
462
+ t7 = /* @__PURE__ */ jsx(Checkbox.Group, {
463
+ label,
464
+ value: t3,
465
+ onChange: t4,
466
+ children: t6
467
+ });
468
+ $[12] = label;
469
+ $[13] = t3;
470
+ $[14] = t4;
471
+ $[15] = t6;
472
+ $[16] = t7;
473
+ } else t7 = $[16];
474
+ return t7;
220
475
  }
221
476
  /** One labeled, kit-native control for a single filter definition. */
222
- function FilterControl({ def, source, labels }) {
477
+ function _temp$3(option) {
478
+ return /* @__PURE__ */ jsx(Checkbox, {
479
+ size: "sm",
480
+ value: option.value,
481
+ label: option.label
482
+ }, option.value);
483
+ }
484
+ function FilterControl(t0) {
485
+ const $ = c(22);
486
+ const { def, source, labels } = t0;
223
487
  switch (def.type) {
224
- case "text": return /* @__PURE__ */ jsx(TextInput, {
225
- size: "sm",
226
- label: filterLabel(def),
227
- placeholder: def.placeholder,
228
- value: asText(source.extra[def.key]),
229
- onChange: (e) => source.setExtra(def.key, e.currentTarget.value)
230
- });
231
- case "select": return /* @__PURE__ */ jsx(SelectControl, {
232
- def,
233
- source
234
- });
235
- case "multiSelect": return /* @__PURE__ */ jsx(MultiSelectControl, {
236
- def,
237
- source
238
- });
488
+ case "text": {
489
+ let t1;
490
+ if ($[0] !== def) {
491
+ t1 = filterLabel(def);
492
+ $[0] = def;
493
+ $[1] = t1;
494
+ } else t1 = $[1];
495
+ const t2 = def.placeholder;
496
+ const t3 = source.extra[def.key];
497
+ let t4;
498
+ if ($[2] !== t3) {
499
+ t4 = asText(t3);
500
+ $[2] = t3;
501
+ $[3] = t4;
502
+ } else t4 = $[3];
503
+ let t5;
504
+ if ($[4] !== def.key || $[5] !== source) {
505
+ t5 = (e) => source.setExtra(def.key, e.currentTarget.value);
506
+ $[4] = def.key;
507
+ $[5] = source;
508
+ $[6] = t5;
509
+ } else t5 = $[6];
510
+ let t6;
511
+ if ($[7] !== def.placeholder || $[8] !== t1 || $[9] !== t4 || $[10] !== t5) {
512
+ t6 = /* @__PURE__ */ jsx(TextInput, {
513
+ size: "sm",
514
+ label: t1,
515
+ placeholder: t2,
516
+ value: t4,
517
+ onChange: t5
518
+ });
519
+ $[7] = def.placeholder;
520
+ $[8] = t1;
521
+ $[9] = t4;
522
+ $[10] = t5;
523
+ $[11] = t6;
524
+ } else t6 = $[11];
525
+ return t6;
526
+ }
527
+ case "select": {
528
+ let t1;
529
+ if ($[12] !== def || $[13] !== source) {
530
+ t1 = /* @__PURE__ */ jsx(SelectControl, {
531
+ def,
532
+ source
533
+ });
534
+ $[12] = def;
535
+ $[13] = source;
536
+ $[14] = t1;
537
+ } else t1 = $[14];
538
+ return t1;
539
+ }
540
+ case "multiSelect": {
541
+ let t1;
542
+ if ($[15] !== def || $[16] !== source) {
543
+ t1 = /* @__PURE__ */ jsx(MultiSelectControl, {
544
+ def,
545
+ source
546
+ });
547
+ $[15] = def;
548
+ $[16] = source;
549
+ $[17] = t1;
550
+ } else t1 = $[17];
551
+ return t1;
552
+ }
239
553
  case "dateRange":
240
- case "numberRange": return /* @__PURE__ */ jsx(RangeField, {
241
- def,
242
- source,
243
- kind: def.type,
244
- labels
245
- });
554
+ case "numberRange": {
555
+ let t1;
556
+ if ($[18] !== def || $[19] !== labels || $[20] !== source) {
557
+ t1 = /* @__PURE__ */ jsx(RangeField, {
558
+ def,
559
+ source,
560
+ kind: def.type,
561
+ labels
562
+ });
563
+ $[18] = def;
564
+ $[19] = labels;
565
+ $[20] = source;
566
+ $[21] = t1;
567
+ } else t1 = $[21];
568
+ return t1;
569
+ }
246
570
  }
247
571
  }
248
572
  /**
@@ -255,264 +579,664 @@ function FilterControl({ def, source, labels }) {
255
579
  *
256
580
  * @typeParam TRow - The row type.
257
581
  */
258
- function AutoFilterForm({ defs, source, labels }) {
259
- return /* @__PURE__ */ jsx(Stack, {
260
- gap: "sm",
261
- children: defs.map((def) => /* @__PURE__ */ jsx(FilterControl, {
262
- def,
263
- source,
264
- labels
265
- }, def.key))
266
- });
582
+ function AutoFilterForm(t0) {
583
+ const $ = c(9);
584
+ const { defs, source, labels } = t0;
585
+ let t1;
586
+ if ($[0] !== defs || $[1] !== labels || $[2] !== source) {
587
+ let t2;
588
+ if ($[4] !== labels || $[5] !== source) {
589
+ t2 = (def) => /* @__PURE__ */ jsx(FilterControl, {
590
+ def,
591
+ source,
592
+ labels
593
+ }, def.key);
594
+ $[4] = labels;
595
+ $[5] = source;
596
+ $[6] = t2;
597
+ } else t2 = $[6];
598
+ t1 = defs.map(t2);
599
+ $[0] = defs;
600
+ $[1] = labels;
601
+ $[2] = source;
602
+ $[3] = t1;
603
+ } else t1 = $[3];
604
+ let t2;
605
+ if ($[7] !== t1) {
606
+ t2 = /* @__PURE__ */ jsx(Stack, {
607
+ gap: "sm",
608
+ children: t1
609
+ });
610
+ $[7] = t1;
611
+ $[8] = t2;
612
+ } else t2 = $[8];
613
+ return t2;
267
614
  }
268
615
  //#endregion
269
616
  //#region src/components/BulkActionBar.tsx
270
617
  /** Selection toolbar: count, clear, and the configured bulk-action buttons. */
271
- function BulkActionBar({ selection, total, bulkActions, confirm, labels }) {
618
+ function BulkActionBar(t0) {
619
+ const $ = c(56);
620
+ const { selection, total, bulkActions, confirm, labels } = t0;
272
621
  const { selectedIds, selectedCount, clear, allMatching } = selection;
273
- const { pending, run } = useBulkActionRunner({
274
- confirm,
275
- cancelLabel: labels.cancel,
276
- onComplete: clear
277
- });
622
+ let t1;
623
+ if ($[0] !== clear || $[1] !== confirm || $[2] !== labels.cancel) {
624
+ t1 = {
625
+ confirm,
626
+ cancelLabel: labels.cancel,
627
+ onComplete: clear
628
+ };
629
+ $[0] = clear;
630
+ $[1] = confirm;
631
+ $[2] = labels.cancel;
632
+ $[3] = t1;
633
+ } else t1 = $[3];
634
+ const { pending, run } = useBulkActionRunner(t1);
278
635
  if (selectedCount === 0) return null;
279
- const ids = [...selectedIds];
280
- return /* @__PURE__ */ jsxs(Stack, {
281
- gap: "xs",
282
- children: [/* @__PURE__ */ jsxs(Group, {
283
- justify: "space-between",
284
- wrap: "wrap",
285
- gap: "sm",
286
- children: [/* @__PURE__ */ jsx(Text, {
636
+ let T0;
637
+ let T1;
638
+ let T2;
639
+ let t10;
640
+ let t2;
641
+ let t3;
642
+ let t4;
643
+ let t5;
644
+ let t6;
645
+ let t7;
646
+ let t8;
647
+ let t9;
648
+ if ($[4] !== allMatching || $[5] !== bulkActions || $[6] !== clear || $[7] !== labels || $[8] !== pending || $[9] !== run || $[10] !== selectedCount || $[11] !== selectedIds || $[12] !== total) {
649
+ const ids = [...selectedIds];
650
+ T2 = Stack;
651
+ t10 = "xs";
652
+ T1 = Group;
653
+ t6 = "space-between";
654
+ t7 = "wrap";
655
+ t8 = "sm";
656
+ let t11;
657
+ if ($[25] !== labels || $[26] !== selectedCount) {
658
+ t11 = labels.selectedCount(selectedCount);
659
+ $[25] = labels;
660
+ $[26] = selectedCount;
661
+ $[27] = t11;
662
+ } else t11 = $[27];
663
+ if ($[28] !== t11) {
664
+ t9 = /* @__PURE__ */ jsx(Text, {
287
665
  fz: "sm",
288
- children: labels.selectedCount(selectedCount)
289
- }), /* @__PURE__ */ jsxs(Group, {
290
- gap: "xs",
291
- wrap: "wrap",
292
- children: [/* @__PURE__ */ jsx(Button, {
293
- size: "xs",
294
- variant: "subtle",
295
- onClick: clear,
296
- disabled: pending !== null,
297
- children: labels.clearAll
298
- }), bulkActions.map((action) => /* @__PURE__ */ jsx(BulkButton, {
299
- action,
300
- ids,
301
- pending,
302
- onRun: (a) => {
303
- if (allMatching) run(a, ids, {
304
- allMatching: true,
305
- total
306
- });
307
- else run(a, ids);
308
- }
309
- }, action.key))]
310
- })]
311
- }), /* @__PURE__ */ jsx(ScopeBanner, {
666
+ children: t11
667
+ });
668
+ $[28] = t11;
669
+ $[29] = t9;
670
+ } else t9 = $[29];
671
+ T0 = Group;
672
+ t2 = "xs";
673
+ t3 = "wrap";
674
+ const t12 = pending !== null;
675
+ if ($[30] !== clear || $[31] !== labels.clearAll || $[32] !== t12) {
676
+ t4 = /* @__PURE__ */ jsx(Button, {
677
+ size: "xs",
678
+ variant: "subtle",
679
+ onClick: clear,
680
+ disabled: t12,
681
+ children: labels.clearAll
682
+ });
683
+ $[30] = clear;
684
+ $[31] = labels.clearAll;
685
+ $[32] = t12;
686
+ $[33] = t4;
687
+ } else t4 = $[33];
688
+ t5 = bulkActions.map((action) => /* @__PURE__ */ jsx(BulkButton, {
689
+ action,
690
+ ids,
691
+ pending,
692
+ onRun: (a) => {
693
+ if (allMatching) run(a, ids, {
694
+ allMatching: true,
695
+ total
696
+ });
697
+ else run(a, ids);
698
+ }
699
+ }, action.key));
700
+ $[4] = allMatching;
701
+ $[5] = bulkActions;
702
+ $[6] = clear;
703
+ $[7] = labels;
704
+ $[8] = pending;
705
+ $[9] = run;
706
+ $[10] = selectedCount;
707
+ $[11] = selectedIds;
708
+ $[12] = total;
709
+ $[13] = T0;
710
+ $[14] = T1;
711
+ $[15] = T2;
712
+ $[16] = t10;
713
+ $[17] = t2;
714
+ $[18] = t3;
715
+ $[19] = t4;
716
+ $[20] = t5;
717
+ $[21] = t6;
718
+ $[22] = t7;
719
+ $[23] = t8;
720
+ $[24] = t9;
721
+ } else {
722
+ T0 = $[13];
723
+ T1 = $[14];
724
+ T2 = $[15];
725
+ t10 = $[16];
726
+ t2 = $[17];
727
+ t3 = $[18];
728
+ t4 = $[19];
729
+ t5 = $[20];
730
+ t6 = $[21];
731
+ t7 = $[22];
732
+ t8 = $[23];
733
+ t9 = $[24];
734
+ }
735
+ let t11;
736
+ if ($[34] !== T0 || $[35] !== t2 || $[36] !== t3 || $[37] !== t4 || $[38] !== t5) {
737
+ t11 = /* @__PURE__ */ jsxs(T0, {
738
+ gap: t2,
739
+ wrap: t3,
740
+ children: [t4, t5]
741
+ });
742
+ $[34] = T0;
743
+ $[35] = t2;
744
+ $[36] = t3;
745
+ $[37] = t4;
746
+ $[38] = t5;
747
+ $[39] = t11;
748
+ } else t11 = $[39];
749
+ let t12;
750
+ if ($[40] !== T1 || $[41] !== t11 || $[42] !== t6 || $[43] !== t7 || $[44] !== t8 || $[45] !== t9) {
751
+ t12 = /* @__PURE__ */ jsxs(T1, {
752
+ justify: t6,
753
+ wrap: t7,
754
+ gap: t8,
755
+ children: [t9, t11]
756
+ });
757
+ $[40] = T1;
758
+ $[41] = t11;
759
+ $[42] = t6;
760
+ $[43] = t7;
761
+ $[44] = t8;
762
+ $[45] = t9;
763
+ $[46] = t12;
764
+ } else t12 = $[46];
765
+ let t13;
766
+ if ($[47] !== labels || $[48] !== selection || $[49] !== total) {
767
+ t13 = /* @__PURE__ */ jsx(ScopeBanner, {
312
768
  selection,
313
769
  total,
314
770
  labels
315
- })]
316
- });
771
+ });
772
+ $[47] = labels;
773
+ $[48] = selection;
774
+ $[49] = total;
775
+ $[50] = t13;
776
+ } else t13 = $[50];
777
+ let t14;
778
+ if ($[51] !== T2 || $[52] !== t10 || $[53] !== t12 || $[54] !== t13) {
779
+ t14 = /* @__PURE__ */ jsxs(T2, {
780
+ gap: t10,
781
+ children: [t12, t13]
782
+ });
783
+ $[51] = T2;
784
+ $[52] = t10;
785
+ $[53] = t12;
786
+ $[54] = t13;
787
+ $[55] = t14;
788
+ } else t14 = $[55];
789
+ return t14;
317
790
  }
318
791
  /**
319
792
  * Gmail-style scope banner. When every row on the page is selected but more
320
793
  * rows match elsewhere, offer to widen the selection to all matching rows;
321
794
  * once widened, announce the scope and offer to clear it.
322
795
  */
323
- function ScopeBanner({ selection, total, labels }) {
796
+ function ScopeBanner(t0) {
797
+ const $ = c(7);
798
+ const { selection, total, labels } = t0;
324
799
  if (selection.headerState !== "all" || total <= selection.visibleIds.length) return null;
325
- return /* @__PURE__ */ jsx(Group, {
326
- role: "status",
327
- gap: "xs",
328
- wrap: "wrap",
329
- children: selection.allMatching ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
330
- fz: "sm",
331
- children: labels.allMatchingSelected(total)
332
- }), /* @__PURE__ */ jsx(Button, {
333
- size: "xs",
334
- variant: "subtle",
335
- onClick: selection.clear,
336
- children: labels.clearAll
337
- })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
338
- fz: "sm",
339
- children: labels.pageSelected(selection.selectedCount)
340
- }), /* @__PURE__ */ jsx(Button, {
341
- size: "xs",
342
- variant: "light",
343
- onClick: selection.selectAllMatching,
344
- children: labels.selectAllMatching(total)
345
- })] })
346
- });
800
+ let t1;
801
+ if ($[0] !== labels || $[1] !== selection.allMatching || $[2] !== selection.clear || $[3] !== selection.selectAllMatching || $[4] !== selection.selectedCount || $[5] !== total) {
802
+ t1 = /* @__PURE__ */ jsx(Group, {
803
+ role: "status",
804
+ gap: "xs",
805
+ wrap: "wrap",
806
+ children: selection.allMatching ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
807
+ fz: "sm",
808
+ children: labels.allMatchingSelected(total)
809
+ }), /* @__PURE__ */ jsx(Button, {
810
+ size: "xs",
811
+ variant: "subtle",
812
+ onClick: selection.clear,
813
+ children: labels.clearAll
814
+ })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Text, {
815
+ fz: "sm",
816
+ children: labels.pageSelected(selection.selectedCount)
817
+ }), /* @__PURE__ */ jsx(Button, {
818
+ size: "xs",
819
+ variant: "light",
820
+ onClick: selection.selectAllMatching,
821
+ children: labels.selectAllMatching(total)
822
+ })] })
823
+ });
824
+ $[0] = labels;
825
+ $[1] = selection.allMatching;
826
+ $[2] = selection.clear;
827
+ $[3] = selection.selectAllMatching;
828
+ $[4] = selection.selectedCount;
829
+ $[5] = total;
830
+ $[6] = t1;
831
+ } else t1 = $[6];
832
+ return t1;
347
833
  }
348
- function BulkButton({ action, ids, pending, onRun }) {
349
- const reason = resolveDisabledReason(action.disabledReason?.(ids));
834
+ function BulkButton(t0) {
835
+ const $ = c(18);
836
+ const { action, ids, pending, onRun } = t0;
837
+ let t1;
838
+ if ($[0] !== action || $[1] !== ids) {
839
+ t1 = resolveDisabledReason(action.disabledReason?.(ids));
840
+ $[0] = action;
841
+ $[1] = ids;
842
+ $[2] = t1;
843
+ } else t1 = $[2];
844
+ const reason = t1;
350
845
  const ineligible = reason !== void 0;
351
- const button = /* @__PURE__ */ jsx(Button, {
352
- size: "xs",
353
- color: action.color,
354
- leftSection: action.icon,
355
- onClick: () => onRun(action),
356
- loading: pending === action.key,
357
- disabled: ineligible || pending !== null && pending !== action.key,
358
- children: action.label
359
- });
360
- if (reason !== void 0) return /* @__PURE__ */ jsx(Tooltip, {
361
- label: reason,
362
- withArrow: true,
363
- openDelay: 150,
364
- children: /* @__PURE__ */ jsx("div", { children: button })
365
- });
846
+ let t2;
847
+ if ($[3] !== action || $[4] !== onRun) {
848
+ t2 = () => onRun(action);
849
+ $[3] = action;
850
+ $[4] = onRun;
851
+ $[5] = t2;
852
+ } else t2 = $[5];
853
+ const t3 = pending === action.key;
854
+ const t4 = ineligible || pending !== null && pending !== action.key;
855
+ let t5;
856
+ if ($[6] !== action.color || $[7] !== action.icon || $[8] !== action.label || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
857
+ t5 = /* @__PURE__ */ jsx(Button, {
858
+ size: "xs",
859
+ color: action.color,
860
+ leftSection: action.icon,
861
+ onClick: t2,
862
+ loading: t3,
863
+ disabled: t4,
864
+ children: action.label
865
+ });
866
+ $[6] = action.color;
867
+ $[7] = action.icon;
868
+ $[8] = action.label;
869
+ $[9] = t2;
870
+ $[10] = t3;
871
+ $[11] = t4;
872
+ $[12] = t5;
873
+ } else t5 = $[12];
874
+ const button = t5;
875
+ if (reason !== void 0) {
876
+ let t6;
877
+ if ($[13] !== button) {
878
+ t6 = /* @__PURE__ */ jsx("div", { children: button });
879
+ $[13] = button;
880
+ $[14] = t6;
881
+ } else t6 = $[14];
882
+ let t7;
883
+ if ($[15] !== reason || $[16] !== t6) {
884
+ t7 = /* @__PURE__ */ jsx(Tooltip, {
885
+ label: reason,
886
+ withArrow: true,
887
+ openDelay: 150,
888
+ children: t6
889
+ });
890
+ $[15] = reason;
891
+ $[16] = t6;
892
+ $[17] = t7;
893
+ } else t7 = $[17];
894
+ return t7;
895
+ }
366
896
  return button;
367
897
  }
368
898
  //#endregion
369
899
  //#region src/components/ColumnMenu.tsx
900
+ /**
901
+ * Props for the column menu — the shared core contract, plus the injected
902
+ * actions column: when the table has row actions, the menu lists it too
903
+ * (named by `labels.actions`) with an eye toggle and a one-click end-pin.
904
+ */
370
905
  /** The eye toggle + struck-through name shared by data and actions rows. */
371
- function RowVisibility({ hidden, name, labels, onToggle }) {
372
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ActionIcon, {
373
- variant: hidden ? "subtle" : "light",
374
- color: hidden ? "gray" : "blue",
375
- size: "sm",
376
- "aria-label": `${hidden ? labels.showColumn : labels.hideColumn}: ${name}`,
377
- "aria-pressed": !hidden,
378
- onClick: onToggle,
379
- children: /* @__PURE__ */ jsx(EyeIcon, { off: hidden })
380
- }), /* @__PURE__ */ jsx(Text, {
381
- size: "sm",
382
- style: { flex: 1 },
383
- c: hidden ? "dimmed" : void 0,
384
- td: hidden ? "line-through" : void 0,
385
- children: name
386
- })] });
906
+ function RowVisibility(t0) {
907
+ const $ = c(17);
908
+ const { hidden, name, labels, onToggle } = t0;
909
+ const t1 = hidden ? "subtle" : "light";
910
+ const t2 = hidden ? "gray" : "blue";
911
+ const t3 = `${hidden ? labels.showColumn : labels.hideColumn}: ${name}`;
912
+ const t4 = !hidden;
913
+ let t5;
914
+ if ($[0] !== hidden) {
915
+ t5 = /* @__PURE__ */ jsx(EyeIcon, { off: hidden });
916
+ $[0] = hidden;
917
+ $[1] = t5;
918
+ } else t5 = $[1];
919
+ let t6;
920
+ if ($[2] !== onToggle || $[3] !== t1 || $[4] !== t2 || $[5] !== t3 || $[6] !== t4 || $[7] !== t5) {
921
+ t6 = /* @__PURE__ */ jsx(ActionIcon, {
922
+ variant: t1,
923
+ color: t2,
924
+ size: "sm",
925
+ "aria-label": t3,
926
+ "aria-pressed": t4,
927
+ onClick: onToggle,
928
+ children: t5
929
+ });
930
+ $[2] = onToggle;
931
+ $[3] = t1;
932
+ $[4] = t2;
933
+ $[5] = t3;
934
+ $[6] = t4;
935
+ $[7] = t5;
936
+ $[8] = t6;
937
+ } else t6 = $[8];
938
+ let t7;
939
+ if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
940
+ t7 = { flex: 1 };
941
+ $[9] = t7;
942
+ } else t7 = $[9];
943
+ const t8 = hidden ? "dimmed" : void 0;
944
+ const t9 = hidden ? "line-through" : void 0;
945
+ let t10;
946
+ if ($[10] !== name || $[11] !== t8 || $[12] !== t9) {
947
+ t10 = /* @__PURE__ */ jsx(Text, {
948
+ size: "sm",
949
+ style: t7,
950
+ c: t8,
951
+ td: t9,
952
+ children: name
953
+ });
954
+ $[10] = name;
955
+ $[11] = t8;
956
+ $[12] = t9;
957
+ $[13] = t10;
958
+ } else t10 = $[13];
959
+ let t11;
960
+ if ($[14] !== t10 || $[15] !== t6) {
961
+ t11 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, t10] });
962
+ $[14] = t10;
963
+ $[15] = t6;
964
+ $[16] = t11;
965
+ } else t11 = $[16];
966
+ return t11;
387
967
  }
388
968
  /** The pin control shared by data and actions rows. */
389
- function PinToggle({ pinned, label, onClick }) {
390
- return /* @__PURE__ */ jsx(ActionIcon, {
391
- variant: pinned ? "filled" : "subtle",
392
- color: pinned ? "blue" : "gray",
393
- size: "sm",
394
- "aria-label": label,
395
- onClick,
396
- children: /* @__PURE__ */ jsx(PinIcon, {})
397
- });
969
+ function PinToggle(t0) {
970
+ const $ = c(6);
971
+ const { pinned, label, onClick } = t0;
972
+ const t1 = pinned ? "filled" : "subtle";
973
+ const t2 = pinned ? "blue" : "gray";
974
+ let t3;
975
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
976
+ t3 = /* @__PURE__ */ jsx(PinIcon, {});
977
+ $[0] = t3;
978
+ } else t3 = $[0];
979
+ let t4;
980
+ if ($[1] !== label || $[2] !== onClick || $[3] !== t1 || $[4] !== t2) {
981
+ t4 = /* @__PURE__ */ jsx(ActionIcon, {
982
+ variant: t1,
983
+ color: t2,
984
+ size: "sm",
985
+ "aria-label": label,
986
+ onClick,
987
+ children: t3
988
+ });
989
+ $[1] = label;
990
+ $[2] = onClick;
991
+ $[3] = t1;
992
+ $[4] = t2;
993
+ $[5] = t4;
994
+ } else t4 = $[5];
995
+ return t4;
398
996
  }
399
997
  /**
400
998
  * The injected actions column's menu row: the same eye toggle as data
401
999
  * columns plus a pin toggle that flips right ↔ unpinned in one click. No
402
1000
  * drag grip (the column always trails) and no left pin.
403
1001
  */
404
- function ActionsRow({ layout, labels }) {
405
- const hidden = layout.isHidden(ACTIONS_COLUMN_KEY);
1002
+ function ActionsRow(t0) {
1003
+ const $ = c(19);
1004
+ const { layout, labels } = t0;
1005
+ let t1;
1006
+ if ($[0] !== layout) {
1007
+ t1 = layout.isHidden(ACTIONS_COLUMN_KEY);
1008
+ $[0] = layout;
1009
+ $[1] = t1;
1010
+ } else t1 = $[1];
1011
+ const hidden = t1;
406
1012
  const pinned = layout.state.pinned[ACTIONS_COLUMN_KEY] === "right";
407
- return /* @__PURE__ */ jsxs(Group, {
408
- justify: "flex-start",
409
- wrap: "nowrap",
410
- gap: 6,
411
- px: 4,
412
- py: 2,
413
- children: [
414
- /* @__PURE__ */ jsx(Box, { w: 22 }),
415
- /* @__PURE__ */ jsx(RowVisibility, {
416
- hidden,
417
- name: labels.actions,
418
- labels,
419
- onToggle: () => layout.toggleVisible(ACTIONS_COLUMN_KEY)
420
- }),
421
- /* @__PURE__ */ jsx(PinToggle, {
422
- pinned,
423
- label: `${pinned ? labels.unpin : labels.pinRight}: ${labels.actions}`,
424
- onClick: () => layout.setPinned(ACTIONS_COLUMN_KEY, pinned ? void 0 : "right")
425
- })
426
- ]
427
- });
1013
+ let t2;
1014
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
1015
+ t2 = /* @__PURE__ */ jsx(Box, { w: 22 });
1016
+ $[2] = t2;
1017
+ } else t2 = $[2];
1018
+ let t3;
1019
+ if ($[3] !== layout) {
1020
+ t3 = () => layout.toggleVisible(ACTIONS_COLUMN_KEY);
1021
+ $[3] = layout;
1022
+ $[4] = t3;
1023
+ } else t3 = $[4];
1024
+ let t4;
1025
+ if ($[5] !== hidden || $[6] !== labels || $[7] !== t3) {
1026
+ t4 = /* @__PURE__ */ jsx(RowVisibility, {
1027
+ hidden,
1028
+ name: labels.actions,
1029
+ labels,
1030
+ onToggle: t3
1031
+ });
1032
+ $[5] = hidden;
1033
+ $[6] = labels;
1034
+ $[7] = t3;
1035
+ $[8] = t4;
1036
+ } else t4 = $[8];
1037
+ const t5 = `${pinned ? labels.unpin : labels.pinRight}: ${labels.actions}`;
1038
+ let t6;
1039
+ if ($[9] !== layout || $[10] !== pinned) {
1040
+ t6 = () => layout.setPinned(ACTIONS_COLUMN_KEY, pinned ? void 0 : "right");
1041
+ $[9] = layout;
1042
+ $[10] = pinned;
1043
+ $[11] = t6;
1044
+ } else t6 = $[11];
1045
+ let t7;
1046
+ if ($[12] !== pinned || $[13] !== t5 || $[14] !== t6) {
1047
+ t7 = /* @__PURE__ */ jsx(PinToggle, {
1048
+ pinned,
1049
+ label: t5,
1050
+ onClick: t6
1051
+ });
1052
+ $[12] = pinned;
1053
+ $[13] = t5;
1054
+ $[14] = t6;
1055
+ $[15] = t7;
1056
+ } else t7 = $[15];
1057
+ let t8;
1058
+ if ($[16] !== t4 || $[17] !== t7) {
1059
+ t8 = /* @__PURE__ */ jsxs(Group, {
1060
+ justify: "flex-start",
1061
+ wrap: "nowrap",
1062
+ gap: 6,
1063
+ px: 4,
1064
+ py: 2,
1065
+ children: [
1066
+ t2,
1067
+ t4,
1068
+ t7
1069
+ ]
1070
+ });
1071
+ $[16] = t4;
1072
+ $[17] = t7;
1073
+ $[18] = t8;
1074
+ } else t8 = $[18];
1075
+ return t8;
428
1076
  }
429
1077
  /**
430
1078
  * Column-management popover: per-column drag grip (reorder), eye (show/hide),
431
1079
  * and pin toggle. Keyboard users focus a grip and use arrow keys.
432
1080
  */
433
- function ColumnMenu({ allColumns, layout, labels, hasRowActions = false }) {
1081
+ function ColumnMenu(t0) {
1082
+ const $ = c(31);
1083
+ const { allColumns, layout, labels, hasRowActions: t1 } = t0;
1084
+ const hasRowActions = t1 === void 0 ? false : t1;
434
1085
  const drag = useColumnDragState();
435
- return /* @__PURE__ */ jsxs(Menu, {
436
- closeOnItemClick: false,
437
- position: "bottom-end",
438
- withinPortal: true,
439
- children: [/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, {
1086
+ let t2;
1087
+ if ($[0] !== labels.columns) {
1088
+ t2 = /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, {
440
1089
  variant: "default",
441
1090
  size: "sm",
442
1091
  children: labels.columns
443
- }) }), /* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsxs(Box, {
1092
+ }) });
1093
+ $[0] = labels.columns;
1094
+ $[1] = t2;
1095
+ } else t2 = $[1];
1096
+ let t3;
1097
+ if ($[2] !== labels.columns) {
1098
+ t3 = /* @__PURE__ */ jsx(Text, {
1099
+ size: "xs",
1100
+ c: "dimmed",
1101
+ fw: 600,
1102
+ tt: "uppercase",
1103
+ px: 4,
1104
+ pb: 6,
1105
+ children: labels.columns
1106
+ });
1107
+ $[2] = labels.columns;
1108
+ $[3] = t3;
1109
+ } else t3 = $[3];
1110
+ let t4;
1111
+ if ($[4] !== allColumns || $[5] !== drag || $[6] !== labels || $[7] !== layout) {
1112
+ let t5;
1113
+ if ($[9] !== drag || $[10] !== labels || $[11] !== layout) {
1114
+ t5 = (r) => {
1115
+ const indicator = drag.rowAttrs(r.key, r.index);
1116
+ const edge = indicator["data-drop"];
1117
+ const edgeOffset = edge === "before" ? "2px" : "-2px";
1118
+ return /* @__PURE__ */ jsxs(Group, {
1119
+ justify: "flex-start",
1120
+ wrap: "nowrap",
1121
+ gap: 6,
1122
+ px: 4,
1123
+ py: 2,
1124
+ style: {
1125
+ cursor: "grab",
1126
+ opacity: "data-dragging" in indicator ? .4 : void 0,
1127
+ boxShadow: edge ? `inset 0 ${edgeOffset} 0 0 var(--mantine-primary-color-filled)` : void 0
1128
+ },
1129
+ ...drag.rowDragProps(r.key, r.index),
1130
+ ...drag.dropProps(r.index, layout.move),
1131
+ ...indicator,
1132
+ children: [
1133
+ /* @__PURE__ */ jsx(ActionIcon, {
1134
+ variant: "subtle",
1135
+ color: "gray",
1136
+ size: "sm",
1137
+ style: { cursor: "grab" },
1138
+ ...columnReorderKeyProps(r.key, r.index, layout.move, `${labels.moveLeft} / ${labels.moveRight}: ${r.name}`),
1139
+ children: /* @__PURE__ */ jsx(GripIcon, {})
1140
+ }),
1141
+ /* @__PURE__ */ jsx(RowVisibility, {
1142
+ hidden: r.hidden,
1143
+ name: r.name,
1144
+ labels,
1145
+ onToggle: () => layout.toggleVisible(r.key)
1146
+ }),
1147
+ /* @__PURE__ */ jsx(PinToggle, {
1148
+ pinned: r.pinned !== void 0,
1149
+ label: `${pinActionLabel(r.pinned, labels)}: ${r.name}`,
1150
+ onClick: () => layout.setPinned(r.key, nextPinSide(r.pinned))
1151
+ })
1152
+ ]
1153
+ }, r.key);
1154
+ };
1155
+ $[9] = drag;
1156
+ $[10] = labels;
1157
+ $[11] = layout;
1158
+ $[12] = t5;
1159
+ } else t5 = $[12];
1160
+ t4 = columnMenuRows(allColumns, layout).map(t5);
1161
+ $[4] = allColumns;
1162
+ $[5] = drag;
1163
+ $[6] = labels;
1164
+ $[7] = layout;
1165
+ $[8] = t4;
1166
+ } else t4 = $[8];
1167
+ let t5;
1168
+ if ($[13] !== hasRowActions || $[14] !== labels || $[15] !== layout) {
1169
+ t5 = hasRowActions && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Menu.Divider, {}), /* @__PURE__ */ jsx(ActionsRow, {
1170
+ layout,
1171
+ labels
1172
+ })] });
1173
+ $[13] = hasRowActions;
1174
+ $[14] = labels;
1175
+ $[15] = layout;
1176
+ $[16] = t5;
1177
+ } else t5 = $[16];
1178
+ let t6;
1179
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
1180
+ t6 = /* @__PURE__ */ jsx(Menu.Divider, {});
1181
+ $[17] = t6;
1182
+ } else t6 = $[17];
1183
+ let t7;
1184
+ if ($[18] !== layout) {
1185
+ t7 = () => layout.reset();
1186
+ $[18] = layout;
1187
+ $[19] = t7;
1188
+ } else t7 = $[19];
1189
+ let t8;
1190
+ if ($[20] !== labels.resetColumns || $[21] !== t7) {
1191
+ t8 = /* @__PURE__ */ jsx(Button, {
1192
+ variant: "subtle",
1193
+ size: "xs",
1194
+ fullWidth: true,
1195
+ justify: "flex-start",
1196
+ onClick: t7,
1197
+ children: labels.resetColumns
1198
+ });
1199
+ $[20] = labels.resetColumns;
1200
+ $[21] = t7;
1201
+ $[22] = t8;
1202
+ } else t8 = $[22];
1203
+ let t9;
1204
+ if ($[23] !== t3 || $[24] !== t4 || $[25] !== t5 || $[26] !== t8) {
1205
+ t9 = /* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsxs(Box, {
444
1206
  p: 4,
445
1207
  miw: 250,
446
1208
  children: [
447
- /* @__PURE__ */ jsx(Text, {
448
- size: "xs",
449
- c: "dimmed",
450
- fw: 600,
451
- tt: "uppercase",
452
- px: 4,
453
- pb: 6,
454
- children: labels.columns
455
- }),
456
- columnMenuRows(allColumns, layout).map((r) => {
457
- const indicator = drag.rowAttrs(r.key, r.index);
458
- const edge = indicator["data-drop"];
459
- const edgeOffset = edge === "before" ? "2px" : "-2px";
460
- return /* @__PURE__ */ jsxs(Group, {
461
- justify: "flex-start",
462
- wrap: "nowrap",
463
- gap: 6,
464
- px: 4,
465
- py: 2,
466
- style: {
467
- cursor: "grab",
468
- opacity: "data-dragging" in indicator ? .4 : void 0,
469
- boxShadow: edge ? `inset 0 ${edgeOffset} 0 0 var(--mantine-primary-color-filled)` : void 0
470
- },
471
- ...drag.rowDragProps(r.key, r.index),
472
- ...drag.dropProps(r.index, layout.move),
473
- ...indicator,
474
- children: [
475
- /* @__PURE__ */ jsx(ActionIcon, {
476
- variant: "subtle",
477
- color: "gray",
478
- size: "sm",
479
- style: { cursor: "grab" },
480
- ...columnReorderKeyProps(r.key, r.index, layout.move, `${labels.moveLeft} / ${labels.moveRight}: ${r.name}`),
481
- children: /* @__PURE__ */ jsx(GripIcon, {})
482
- }),
483
- /* @__PURE__ */ jsx(RowVisibility, {
484
- hidden: r.hidden,
485
- name: r.name,
486
- labels,
487
- onToggle: () => layout.toggleVisible(r.key)
488
- }),
489
- /* @__PURE__ */ jsx(PinToggle, {
490
- pinned: r.pinned !== void 0,
491
- label: `${pinActionLabel(r.pinned, labels)}: ${r.name}`,
492
- onClick: () => layout.setPinned(r.key, nextPinSide(r.pinned))
493
- })
494
- ]
495
- }, r.key);
496
- }),
497
- hasRowActions && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Menu.Divider, {}), /* @__PURE__ */ jsx(ActionsRow, {
498
- layout,
499
- labels
500
- })] }),
501
- /* @__PURE__ */ jsx(Menu.Divider, {}),
502
- /* @__PURE__ */ jsx(Button, {
503
- variant: "subtle",
504
- size: "xs",
505
- fullWidth: true,
506
- justify: "flex-start",
507
- onClick: () => layout.reset(),
508
- children: labels.resetColumns
509
- })
1209
+ t3,
1210
+ t4,
1211
+ t5,
1212
+ t6,
1213
+ t8
510
1214
  ]
511
- }) })]
512
- });
1215
+ }) });
1216
+ $[23] = t3;
1217
+ $[24] = t4;
1218
+ $[25] = t5;
1219
+ $[26] = t8;
1220
+ $[27] = t9;
1221
+ } else t9 = $[27];
1222
+ let t10;
1223
+ if ($[28] !== t2 || $[29] !== t9) {
1224
+ t10 = /* @__PURE__ */ jsxs(Menu, {
1225
+ closeOnItemClick: false,
1226
+ position: "bottom-end",
1227
+ withinPortal: true,
1228
+ children: [t2, t9]
1229
+ });
1230
+ $[28] = t2;
1231
+ $[29] = t9;
1232
+ $[30] = t10;
1233
+ } else t10 = $[30];
1234
+ return t10;
513
1235
  }
514
1236
  //#endregion
515
1237
  //#region src/density.ts
1238
+ /** Row density — independent of column pinning. */
1239
+ /** Mantine `<Table>` spacing props for a given density. */
516
1240
  /**
517
1241
  * Maps each {@link Density} to the Mantine `<Table>` spacing props.
518
1242
  * `comfortable` keeps the original `sm`/`md` rhythm; `compact` tightens
@@ -530,101 +1254,297 @@ const DENSITY_SPACING = {
530
1254
  };
531
1255
  //#endregion
532
1256
  //#region src/icons.tsx
533
- function Svg({ size = 16, className, style, children }) {
534
- return /* @__PURE__ */ jsx("svg", {
535
- width: size,
536
- height: size,
537
- viewBox: "0 0 24 24",
538
- fill: "none",
539
- stroke: "currentColor",
540
- strokeWidth: 2,
541
- strokeLinecap: "round",
542
- strokeLinejoin: "round",
543
- className,
544
- style,
545
- "aria-hidden": "true",
546
- focusable: "false",
547
- children
548
- });
1257
+ function Svg(t0) {
1258
+ const $ = c(5);
1259
+ const { size: t1, className, style, children } = t0;
1260
+ const size = t1 === void 0 ? 16 : t1;
1261
+ let t2;
1262
+ if ($[0] !== children || $[1] !== className || $[2] !== size || $[3] !== style) {
1263
+ t2 = /* @__PURE__ */ jsx("svg", {
1264
+ width: size,
1265
+ height: size,
1266
+ viewBox: "0 0 24 24",
1267
+ fill: "none",
1268
+ stroke: "currentColor",
1269
+ strokeWidth: 2,
1270
+ strokeLinecap: "round",
1271
+ strokeLinejoin: "round",
1272
+ className,
1273
+ style,
1274
+ "aria-hidden": "true",
1275
+ focusable: "false",
1276
+ children
1277
+ });
1278
+ $[0] = children;
1279
+ $[1] = className;
1280
+ $[2] = size;
1281
+ $[3] = style;
1282
+ $[4] = t2;
1283
+ } else t2 = $[4];
1284
+ return t2;
549
1285
  }
550
1286
  /** Magnifying-glass search icon. */
551
- const SearchIcon = (p) => /* @__PURE__ */ jsxs(Svg, {
552
- ...p,
553
- children: [/* @__PURE__ */ jsx("circle", {
554
- cx: "11",
555
- cy: "11",
556
- r: "7"
557
- }), /* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" })]
558
- });
1287
+ const SearchIcon = (p) => {
1288
+ const $ = c(4);
1289
+ let t0;
1290
+ let t1;
1291
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1292
+ t0 = /* @__PURE__ */ jsx("circle", {
1293
+ cx: "11",
1294
+ cy: "11",
1295
+ r: "7"
1296
+ });
1297
+ t1 = /* @__PURE__ */ jsx("path", { d: "m21 21-4.3-4.3" });
1298
+ $[0] = t0;
1299
+ $[1] = t1;
1300
+ } else {
1301
+ t0 = $[0];
1302
+ t1 = $[1];
1303
+ }
1304
+ let t2;
1305
+ if ($[2] !== p) {
1306
+ t2 = /* @__PURE__ */ jsxs(Svg, {
1307
+ ...p,
1308
+ children: [t0, t1]
1309
+ });
1310
+ $[2] = p;
1311
+ $[3] = t2;
1312
+ } else t2 = $[3];
1313
+ return t2;
1314
+ };
559
1315
  /** Up chevron (active ascending sort). */
560
- const ChevronUpIcon = (p) => /* @__PURE__ */ jsx(Svg, {
561
- ...p,
562
- children: /* @__PURE__ */ jsx("path", { d: "m6 15 6-6 6 6" })
563
- });
1316
+ const ChevronUpIcon = (p) => {
1317
+ const $ = c(3);
1318
+ let t0;
1319
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1320
+ t0 = /* @__PURE__ */ jsx("path", { d: "m6 15 6-6 6 6" });
1321
+ $[0] = t0;
1322
+ } else t0 = $[0];
1323
+ let t1;
1324
+ if ($[1] !== p) {
1325
+ t1 = /* @__PURE__ */ jsx(Svg, {
1326
+ ...p,
1327
+ children: t0
1328
+ });
1329
+ $[1] = p;
1330
+ $[2] = t1;
1331
+ } else t1 = $[2];
1332
+ return t1;
1333
+ };
564
1334
  /** Down chevron (active descending sort). */
565
- const ChevronDownIcon = (p) => /* @__PURE__ */ jsx(Svg, {
566
- ...p,
567
- children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
568
- });
1335
+ const ChevronDownIcon = (p) => {
1336
+ const $ = c(3);
1337
+ let t0;
1338
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1339
+ t0 = /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" });
1340
+ $[0] = t0;
1341
+ } else t0 = $[0];
1342
+ let t1;
1343
+ if ($[1] !== p) {
1344
+ t1 = /* @__PURE__ */ jsx(Svg, {
1345
+ ...p,
1346
+ children: t0
1347
+ });
1348
+ $[1] = p;
1349
+ $[2] = t1;
1350
+ } else t1 = $[2];
1351
+ return t1;
1352
+ };
569
1353
  /** Right chevron (collapsed row-detail toggle; rotates 90° when expanded). */
570
- const ChevronRightIcon = (p) => /* @__PURE__ */ jsx(Svg, {
571
- ...p,
572
- children: /* @__PURE__ */ jsx("path", { d: "m9 6 6 6-6 6" })
573
- });
1354
+ const ChevronRightIcon = (p) => {
1355
+ const $ = c(3);
1356
+ let t0;
1357
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1358
+ t0 = /* @__PURE__ */ jsx("path", { d: "m9 6 6 6-6 6" });
1359
+ $[0] = t0;
1360
+ } else t0 = $[0];
1361
+ let t1;
1362
+ if ($[1] !== p) {
1363
+ t1 = /* @__PURE__ */ jsx(Svg, {
1364
+ ...p,
1365
+ children: t0
1366
+ });
1367
+ $[1] = p;
1368
+ $[2] = t1;
1369
+ } else t1 = $[2];
1370
+ return t1;
1371
+ };
574
1372
  /** Up/down selector (inactive sortable column). */
575
- const SelectorIcon = (p) => /* @__PURE__ */ jsx(Svg, {
576
- ...p,
577
- children: /* @__PURE__ */ jsx("path", { d: "m8 9 4-4 4 4M8 15l4 4 4-4" })
578
- });
1373
+ const SelectorIcon = (p) => {
1374
+ const $ = c(3);
1375
+ let t0;
1376
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1377
+ t0 = /* @__PURE__ */ jsx("path", { d: "m8 9 4-4 4 4M8 15l4 4 4-4" });
1378
+ $[0] = t0;
1379
+ } else t0 = $[0];
1380
+ let t1;
1381
+ if ($[1] !== p) {
1382
+ t1 = /* @__PURE__ */ jsx(Svg, {
1383
+ ...p,
1384
+ children: t0
1385
+ });
1386
+ $[1] = p;
1387
+ $[2] = t1;
1388
+ } else t1 = $[2];
1389
+ return t1;
1390
+ };
579
1391
  /** Small ✕ used on chips. */
580
- const CloseIcon = (p) => /* @__PURE__ */ jsx(Svg, {
581
- ...p,
582
- children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" })
583
- });
1392
+ const CloseIcon = (p) => {
1393
+ const $ = c(3);
1394
+ let t0;
1395
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1396
+ t0 = /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" });
1397
+ $[0] = t0;
1398
+ } else t0 = $[0];
1399
+ let t1;
1400
+ if ($[1] !== p) {
1401
+ t1 = /* @__PURE__ */ jsx(Svg, {
1402
+ ...p,
1403
+ children: t0
1404
+ });
1405
+ $[1] = p;
1406
+ $[2] = t1;
1407
+ } else t1 = $[2];
1408
+ return t1;
1409
+ };
584
1410
  /** Sliders icon for the Filters button. */
585
- const FiltersIcon = (p) => /* @__PURE__ */ jsx(Svg, {
586
- ...p,
587
- children: /* @__PURE__ */ jsx("path", { d: "M4 6h16M7 12h10M10 18h4" })
588
- });
1411
+ const FiltersIcon = (p) => {
1412
+ const $ = c(3);
1413
+ let t0;
1414
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1415
+ t0 = /* @__PURE__ */ jsx("path", { d: "M4 6h16M7 12h10M10 18h4" });
1416
+ $[0] = t0;
1417
+ } else t0 = $[0];
1418
+ let t1;
1419
+ if ($[1] !== p) {
1420
+ t1 = /* @__PURE__ */ jsx(Svg, {
1421
+ ...p,
1422
+ children: t0
1423
+ });
1424
+ $[1] = p;
1425
+ $[2] = t1;
1426
+ } else t1 = $[2];
1427
+ return t1;
1428
+ };
589
1429
  /** Triangle alert icon for the error state. */
590
- const AlertIcon = (p) => /* @__PURE__ */ jsxs(Svg, {
591
- ...p,
592
- children: [/* @__PURE__ */ jsx("path", { d: "M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" }), /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01" })]
593
- });
1430
+ const AlertIcon = (p) => {
1431
+ const $ = c(4);
1432
+ let t0;
1433
+ let t1;
1434
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1435
+ t0 = /* @__PURE__ */ jsx("path", { d: "M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" });
1436
+ t1 = /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01" });
1437
+ $[0] = t0;
1438
+ $[1] = t1;
1439
+ } else {
1440
+ t0 = $[0];
1441
+ t1 = $[1];
1442
+ }
1443
+ let t2;
1444
+ if ($[2] !== p) {
1445
+ t2 = /* @__PURE__ */ jsxs(Svg, {
1446
+ ...p,
1447
+ children: [t0, t1]
1448
+ });
1449
+ $[2] = p;
1450
+ $[3] = t2;
1451
+ } else t2 = $[3];
1452
+ return t2;
1453
+ };
594
1454
  /** Refresh icon for retry. */
595
- const RefreshIcon = (p) => /* @__PURE__ */ jsxs(Svg, {
596
- ...p,
597
- children: [/* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-3-6.7L21 8" }), /* @__PURE__ */ jsx("path", { d: "M21 3v5h-5" })]
598
- });
1455
+ const RefreshIcon = (p) => {
1456
+ const $ = c(4);
1457
+ let t0;
1458
+ let t1;
1459
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1460
+ t0 = /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-3-6.7L21 8" });
1461
+ t1 = /* @__PURE__ */ jsx("path", { d: "M21 3v5h-5" });
1462
+ $[0] = t0;
1463
+ $[1] = t1;
1464
+ } else {
1465
+ t0 = $[0];
1466
+ t1 = $[1];
1467
+ }
1468
+ let t2;
1469
+ if ($[2] !== p) {
1470
+ t2 = /* @__PURE__ */ jsxs(Svg, {
1471
+ ...p,
1472
+ children: [t0, t1]
1473
+ });
1474
+ $[2] = p;
1475
+ $[3] = t2;
1476
+ } else t2 = $[3];
1477
+ return t2;
1478
+ };
599
1479
  /** Inbox icon for the empty state. */
600
- const InboxIcon = (p) => /* @__PURE__ */ jsxs(Svg, {
601
- ...p,
602
- children: [/* @__PURE__ */ jsx("path", { d: "M22 12h-6l-2 3h-4l-2-3H2" }), /* @__PURE__ */ jsx("path", { d: "M5.5 5.1 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.5-6.9A2 2 0 0 0 16.8 4H7.2a2 2 0 0 0-1.7 1.1Z" })]
603
- });
1480
+ const InboxIcon = (p) => {
1481
+ const $ = c(4);
1482
+ let t0;
1483
+ let t1;
1484
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1485
+ t0 = /* @__PURE__ */ jsx("path", { d: "M22 12h-6l-2 3h-4l-2-3H2" });
1486
+ t1 = /* @__PURE__ */ jsx("path", { d: "M5.5 5.1 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.5-6.9A2 2 0 0 0 16.8 4H7.2a2 2 0 0 0-1.7 1.1Z" });
1487
+ $[0] = t0;
1488
+ $[1] = t1;
1489
+ } else {
1490
+ t0 = $[0];
1491
+ t1 = $[1];
1492
+ }
1493
+ let t2;
1494
+ if ($[2] !== p) {
1495
+ t2 = /* @__PURE__ */ jsxs(Svg, {
1496
+ ...p,
1497
+ children: [t0, t1]
1498
+ });
1499
+ $[2] = p;
1500
+ $[3] = t2;
1501
+ } else t2 = $[3];
1502
+ return t2;
1503
+ };
604
1504
  //#endregion
605
1505
  //#region src/components/ExpandToggle.tsx
1506
+ /** Props for {@link ExpandToggle}. */
606
1507
  /**
607
1508
  * The chevron that toggles a row's detail panel — shared by the desktop
608
1509
  * table's leading cell and the mobile card. It is a real button, so the
609
1510
  * row-click interactive-child guard already keeps it from activating
610
1511
  * `onRowClick`.
611
1512
  */
612
- function ExpandToggle({ expanded, expandLabel, collapseLabel, onToggle }) {
613
- return /* @__PURE__ */ jsx(ActionIcon, {
614
- variant: "subtle",
615
- color: "gray",
616
- size: "sm",
617
- "aria-expanded": expanded,
618
- "aria-label": expanded ? collapseLabel : expandLabel,
619
- onClick: onToggle,
620
- children: /* @__PURE__ */ jsx(ChevronRightIcon, {
1513
+ function ExpandToggle(t0) {
1514
+ const $ = c(7);
1515
+ const { expanded, expandLabel, collapseLabel, onToggle } = t0;
1516
+ const t1 = expanded ? collapseLabel : expandLabel;
1517
+ const t2 = expanded ? "rotate(90deg)" : "rotate(0deg)";
1518
+ let t3;
1519
+ if ($[0] !== t2) {
1520
+ t3 = /* @__PURE__ */ jsx(ChevronRightIcon, {
621
1521
  size: 14,
622
1522
  style: {
623
- transform: expanded ? "rotate(90deg)" : "rotate(0deg)",
1523
+ transform: t2,
624
1524
  transition: "transform 150ms ease"
625
1525
  }
626
- })
627
- });
1526
+ });
1527
+ $[0] = t2;
1528
+ $[1] = t3;
1529
+ } else t3 = $[1];
1530
+ let t4;
1531
+ if ($[2] !== expanded || $[3] !== onToggle || $[4] !== t1 || $[5] !== t3) {
1532
+ t4 = /* @__PURE__ */ jsx(ActionIcon, {
1533
+ variant: "subtle",
1534
+ color: "gray",
1535
+ size: "sm",
1536
+ "aria-expanded": expanded,
1537
+ "aria-label": t1,
1538
+ onClick: onToggle,
1539
+ children: t3
1540
+ });
1541
+ $[2] = expanded;
1542
+ $[3] = onToggle;
1543
+ $[4] = t1;
1544
+ $[5] = t3;
1545
+ $[6] = t4;
1546
+ } else t4 = $[6];
1547
+ return t4;
628
1548
  }
629
1549
  //#endregion
630
1550
  //#region src/components/DesktopTable.tsx
@@ -639,95 +1559,246 @@ const RESIZE_HANDLE_STYLE = {
639
1559
  touchAction: "none",
640
1560
  userSelect: "none"
641
1561
  };
642
- function SortIcon({ active, dir }) {
643
- if (!active) return /* @__PURE__ */ jsx(SelectorIcon, { size: 12 });
644
- return dir === "asc" ? /* @__PURE__ */ jsx(ChevronUpIcon, { size: 12 }) : /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12 });
1562
+ /**
1563
+ * Props for {@link DesktopTable}: the shared render contract from core
1564
+ * (minus `stickyTop` the resolved `stickyHeaderOffset` replaces it) plus
1565
+ * the Mantine-specific extras.
1566
+ */
1567
+ function SortIcon(t0) {
1568
+ const $ = c(3);
1569
+ const { active, dir } = t0;
1570
+ if (!active) {
1571
+ let t1;
1572
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
1573
+ t1 = /* @__PURE__ */ jsx(SelectorIcon, { size: 12 });
1574
+ $[0] = t1;
1575
+ } else t1 = $[0];
1576
+ return t1;
1577
+ }
1578
+ let t1;
1579
+ if ($[1] !== dir) {
1580
+ t1 = dir === "asc" ? /* @__PURE__ */ jsx(ChevronUpIcon, { size: 12 }) : /* @__PURE__ */ jsx(ChevronDownIcon, { size: 12 });
1581
+ $[1] = dir;
1582
+ $[2] = t1;
1583
+ } else t1 = $[2];
1584
+ return t1;
645
1585
  }
646
- function HeaderCell({ table, column, stickyStyle, resizeHandle }) {
647
- const cellProps = table.getHeaderCellProps(column);
648
- const headerStyle = {
649
- ...cellProps.style,
650
- ...stickyStyle
651
- };
652
- if (!column.sortable) return /* @__PURE__ */ jsxs(Table.Th, {
653
- ...cellProps,
654
- style: headerStyle,
655
- children: [column.header, resizeHandle]
656
- });
657
- const buttonProps = table.getSortButtonProps(column);
1586
+ function HeaderCell(t0) {
1587
+ const $ = c(39);
1588
+ const { table, column, stickyStyle, resizeHandle } = t0;
1589
+ let t1;
1590
+ if ($[0] !== column || $[1] !== table) {
1591
+ t1 = table.getHeaderCellProps(column);
1592
+ $[0] = column;
1593
+ $[1] = table;
1594
+ $[2] = t1;
1595
+ } else t1 = $[2];
1596
+ const cellProps = t1;
1597
+ let t2;
1598
+ if ($[3] !== cellProps.style || $[4] !== stickyStyle) {
1599
+ t2 = {
1600
+ ...cellProps.style,
1601
+ ...stickyStyle
1602
+ };
1603
+ $[3] = cellProps.style;
1604
+ $[4] = stickyStyle;
1605
+ $[5] = t2;
1606
+ } else t2 = $[5];
1607
+ const headerStyle = t2;
1608
+ if (!column.sortable) {
1609
+ let t3;
1610
+ if ($[6] !== cellProps || $[7] !== column.header || $[8] !== headerStyle || $[9] !== resizeHandle) {
1611
+ t3 = /* @__PURE__ */ jsxs(Table.Th, {
1612
+ ...cellProps,
1613
+ style: headerStyle,
1614
+ children: [column.header, resizeHandle]
1615
+ });
1616
+ $[6] = cellProps;
1617
+ $[7] = column.header;
1618
+ $[8] = headerStyle;
1619
+ $[9] = resizeHandle;
1620
+ $[10] = t3;
1621
+ } else t3 = $[10];
1622
+ return t3;
1623
+ }
1624
+ let t3;
1625
+ if ($[11] !== column || $[12] !== table) {
1626
+ t3 = table.getSortButtonProps(column);
1627
+ $[11] = column;
1628
+ $[12] = table;
1629
+ $[13] = t3;
1630
+ } else t3 = $[13];
1631
+ const buttonProps = t3;
658
1632
  const sortIndex = buttonProps["data-sort-index"];
659
- const level = table.source.sortLevels.find((l) => l.key === column.key);
1633
+ let t4;
1634
+ if ($[14] !== column.key || $[15] !== table.source.sortLevels) {
1635
+ let t5;
1636
+ if ($[17] !== column.key) {
1637
+ t5 = (l) => l.key === column.key;
1638
+ $[17] = column.key;
1639
+ $[18] = t5;
1640
+ } else t5 = $[18];
1641
+ t4 = table.source.sortLevels.find(t5);
1642
+ $[14] = column.key;
1643
+ $[15] = table.source.sortLevels;
1644
+ $[16] = t4;
1645
+ } else t4 = $[16];
1646
+ const level = t4;
660
1647
  const active = level !== void 0 || table.sortBy === column.key;
661
- return /* @__PURE__ */ jsxs(Table.Th, {
662
- ...cellProps,
663
- style: headerStyle,
664
- children: [/* @__PURE__ */ jsxs(Group, {
1648
+ const t5 = active ? "var(--mantine-primary-color-filled)" : "inherit";
1649
+ let t6;
1650
+ if ($[19] !== t5) {
1651
+ t6 = {
1652
+ background: "none",
1653
+ border: 0,
1654
+ cursor: "pointer",
1655
+ font: "inherit",
1656
+ padding: 0,
1657
+ color: t5
1658
+ };
1659
+ $[19] = t5;
1660
+ $[20] = t6;
1661
+ } else t6 = $[20];
1662
+ let t7;
1663
+ if ($[21] !== column.header) {
1664
+ t7 = /* @__PURE__ */ jsx("span", { children: column.header });
1665
+ $[21] = column.header;
1666
+ $[22] = t7;
1667
+ } else t7 = $[22];
1668
+ const t8 = level?.dir ?? table.sortDir;
1669
+ let t9;
1670
+ if ($[23] !== active || $[24] !== t8) {
1671
+ t9 = /* @__PURE__ */ jsx(SortIcon, {
1672
+ active,
1673
+ dir: t8
1674
+ });
1675
+ $[23] = active;
1676
+ $[24] = t8;
1677
+ $[25] = t9;
1678
+ } else t9 = $[25];
1679
+ let t10;
1680
+ if ($[26] !== sortIndex) {
1681
+ t10 = typeof sortIndex === "number" && /* @__PURE__ */ jsx(Badge, {
1682
+ component: "span",
1683
+ size: "xs",
1684
+ variant: "light",
1685
+ children: sortIndex
1686
+ });
1687
+ $[26] = sortIndex;
1688
+ $[27] = t10;
1689
+ } else t10 = $[27];
1690
+ let t11;
1691
+ if ($[28] !== buttonProps || $[29] !== t10 || $[30] !== t6 || $[31] !== t7 || $[32] !== t9) {
1692
+ t11 = /* @__PURE__ */ jsxs(Group, {
665
1693
  component: "button",
666
1694
  gap: 6,
667
1695
  wrap: "nowrap",
668
1696
  display: "inline-flex",
669
- style: {
670
- background: "none",
671
- border: 0,
672
- cursor: "pointer",
673
- font: "inherit",
674
- padding: 0,
675
- color: active ? "var(--mantine-primary-color-filled)" : "inherit"
676
- },
1697
+ style: t6,
677
1698
  ...buttonProps,
678
1699
  children: [
679
- /* @__PURE__ */ jsx("span", { children: column.header }),
680
- /* @__PURE__ */ jsx(SortIcon, {
681
- active,
682
- dir: level?.dir ?? table.sortDir
683
- }),
684
- typeof sortIndex === "number" && /* @__PURE__ */ jsx(Badge, {
685
- component: "span",
686
- size: "xs",
687
- variant: "light",
688
- children: sortIndex
689
- })
1700
+ t7,
1701
+ t9,
1702
+ t10
690
1703
  ]
691
- }), resizeHandle]
692
- });
1704
+ });
1705
+ $[28] = buttonProps;
1706
+ $[29] = t10;
1707
+ $[30] = t6;
1708
+ $[31] = t7;
1709
+ $[32] = t9;
1710
+ $[33] = t11;
1711
+ } else t11 = $[33];
1712
+ let t12;
1713
+ if ($[34] !== cellProps || $[35] !== headerStyle || $[36] !== resizeHandle || $[37] !== t11) {
1714
+ t12 = /* @__PURE__ */ jsxs(Table.Th, {
1715
+ ...cellProps,
1716
+ style: headerStyle,
1717
+ children: [t11, resizeHandle]
1718
+ });
1719
+ $[34] = cellProps;
1720
+ $[35] = headerStyle;
1721
+ $[36] = resizeHandle;
1722
+ $[37] = t11;
1723
+ $[38] = t12;
1724
+ } else t12 = $[38];
1725
+ return t12;
693
1726
  }
694
- function RowActions({ row, actions, confirm, cancelLabel }) {
695
- return /* @__PURE__ */ jsx(Group, {
696
- gap: 4,
697
- justify: "flex-end",
698
- wrap: "nowrap",
699
- children: actions.map((action) => {
700
- if (action.isHidden?.(row)) return null;
701
- const reason = resolveDisabledReason(action.disabledReason?.(row));
702
- const disabled = reason !== void 0 || (action.isDisabled?.(row) ?? false);
703
- const handleClick = disabled ? void 0 : (e) => {
704
- e.stopPropagation();
705
- runRowAction(action, row, confirm, cancelLabel);
706
- };
707
- return action.icon ? /* @__PURE__ */ jsx(Tooltip, {
708
- label: reason ?? action.label,
709
- withArrow: true,
710
- openDelay: 200,
711
- children: /* @__PURE__ */ jsx(ActionIcon, {
1727
+ function RowActions(t0) {
1728
+ const $ = c(11);
1729
+ const { row, actions, confirm, cancelLabel } = t0;
1730
+ let t1;
1731
+ if ($[0] !== actions || $[1] !== cancelLabel || $[2] !== confirm || $[3] !== row) {
1732
+ let t2;
1733
+ if ($[5] !== cancelLabel || $[6] !== confirm || $[7] !== row) {
1734
+ t2 = (action) => {
1735
+ if (action.isHidden?.(row)) return null;
1736
+ const reason = resolveDisabledReason(action.disabledReason?.(row));
1737
+ const disabled = reason !== void 0 || (action.isDisabled?.(row) ?? false);
1738
+ const handleClick = disabled ? void 0 : (e) => {
1739
+ e.stopPropagation();
1740
+ runRowAction(action, row, confirm, cancelLabel);
1741
+ };
1742
+ return action.icon ? /* @__PURE__ */ jsx(Tooltip, {
1743
+ label: reason ?? action.label,
1744
+ withArrow: true,
1745
+ openDelay: 200,
1746
+ children: /* @__PURE__ */ jsx(ActionIcon, {
1747
+ variant: "subtle",
1748
+ color: action.color,
1749
+ size: "sm",
1750
+ disabled,
1751
+ "aria-label": action.label,
1752
+ onClick: handleClick,
1753
+ children: action.icon
1754
+ })
1755
+ }, action.key) : /* @__PURE__ */ jsx(Button, {
712
1756
  variant: "subtle",
713
1757
  color: action.color,
714
- size: "sm",
1758
+ size: "compact-sm",
715
1759
  disabled,
716
- "aria-label": action.label,
717
1760
  onClick: handleClick,
718
- children: action.icon
719
- })
720
- }, action.key) : /* @__PURE__ */ jsx(Button, {
721
- variant: "subtle",
722
- color: action.color,
723
- size: "compact-sm",
724
- disabled,
725
- onClick: handleClick,
726
- children: action.label
727
- }, action.key);
728
- })
729
- });
1761
+ children: action.label
1762
+ }, action.key);
1763
+ };
1764
+ $[5] = cancelLabel;
1765
+ $[6] = confirm;
1766
+ $[7] = row;
1767
+ $[8] = t2;
1768
+ } else t2 = $[8];
1769
+ t1 = actions.map(t2);
1770
+ $[0] = actions;
1771
+ $[1] = cancelLabel;
1772
+ $[2] = confirm;
1773
+ $[3] = row;
1774
+ $[4] = t1;
1775
+ } else t1 = $[4];
1776
+ let t2;
1777
+ if ($[9] !== t1) {
1778
+ t2 = /* @__PURE__ */ jsx(Group, {
1779
+ gap: 4,
1780
+ justify: "flex-end",
1781
+ wrap: "nowrap",
1782
+ children: t1
1783
+ });
1784
+ $[9] = t1;
1785
+ $[10] = t2;
1786
+ } else t2 = $[10];
1787
+ return t2;
730
1788
  }
1789
+ /**
1790
+ * Props for the memoized {@link DesktopRowBase}. Everything the row's visual
1791
+ * output depends on is a primitive, a stable identity, or is fingerprinted
1792
+ * by `pinSignature` — so {@link desktopRowPropsEqual} can hold the row
1793
+ * across unrelated table re-renders (search keystrokes, other rows'
1794
+ * selection) without ever capturing a stale event handler.
1795
+ */
1796
+ /**
1797
+ * The style-ish props the comparator deliberately skips: they are rebuilt
1798
+ * every parent render, and their visual output is exactly determined by
1799
+ * `pinSignature` (plus the compared inputs) — comparing their identities
1800
+ * would only defeat the memo.
1801
+ */
731
1802
  /** Every row prop the memo comparator checks with `Object.is`. */
732
1803
  const COMPARED_ROW_PROPS = [
733
1804
  "row",
@@ -796,60 +1867,158 @@ function pinLayoutSignature(columns, pinOffset, hasLeftPin, actionsEdgePinned) {
796
1867
  * be memoized: typing in the search box or toggling another row's checkbox
797
1868
  * re-renders the table chrome but leaves untouched rows alone.
798
1869
  */
799
- function DesktopRowBase({ row, index, id, columns, getCellProps, selected, selectLabel, onToggleSelect, expanded, expandLabel, collapseLabel, onToggleExpand, renderRowDetail, columnSpan, rowActions, confirm, cancelLabel, onRowClick, prefetch, className, measureElement, pinStyleFor, selectionCellStyle, expansionCellStyle, actionsCellStyle }) {
1870
+ function DesktopRowBase(t0) {
1871
+ const $ = c(56);
1872
+ const { row, index, id, columns, getCellProps, selected, selectLabel, onToggleSelect, expanded, expandLabel, collapseLabel, onToggleExpand, renderRowDetail, columnSpan, rowActions, confirm, cancelLabel, onRowClick, prefetch, className, measureElement, pinStyleFor, selectionCellStyle, expansionCellStyle, actionsCellStyle } = t0;
800
1873
  const showActions = (rowActions?.length ?? 0) > 0;
801
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Table.Tr, {
802
- role: "row",
803
- "data-index": index,
804
- "aria-selected": selected,
805
- ...rowClickProps(row, onRowClick),
806
- className,
807
- ref: measureElement,
808
- "data-stagger": "",
809
- onMouseEnter: prefetch ? () => prefetch(row) : void 0,
810
- children: [
811
- expanded !== void 0 && /* @__PURE__ */ jsx(Table.Td, {
812
- ta: "center",
813
- style: expansionCellStyle,
814
- children: /* @__PURE__ */ jsx(ExpandToggle, {
815
- expanded,
816
- expandLabel,
817
- collapseLabel,
818
- onToggle: () => onToggleExpand(id)
819
- })
820
- }),
821
- selected !== void 0 && /* @__PURE__ */ jsx(Table.Td, {
822
- ta: "center",
823
- style: selectionCellStyle,
824
- children: /* @__PURE__ */ jsx(Checkbox, {
825
- "aria-label": selectLabel,
826
- checked: selected,
827
- onChange: () => onToggleSelect(id)
828
- })
829
- }),
830
- columns.map((column) => /* @__PURE__ */ jsx(Table.Td, {
1874
+ let t1;
1875
+ if ($[0] !== onRowClick || $[1] !== row) {
1876
+ t1 = rowClickProps(row, onRowClick);
1877
+ $[0] = onRowClick;
1878
+ $[1] = row;
1879
+ $[2] = t1;
1880
+ } else t1 = $[2];
1881
+ let t2;
1882
+ if ($[3] !== prefetch || $[4] !== row) {
1883
+ t2 = prefetch ? () => prefetch(row) : void 0;
1884
+ $[3] = prefetch;
1885
+ $[4] = row;
1886
+ $[5] = t2;
1887
+ } else t2 = $[5];
1888
+ let t3;
1889
+ if ($[6] !== collapseLabel || $[7] !== expandLabel || $[8] !== expanded || $[9] !== expansionCellStyle || $[10] !== id || $[11] !== onToggleExpand) {
1890
+ t3 = expanded !== void 0 && /* @__PURE__ */ jsx(Table.Td, {
1891
+ ta: "center",
1892
+ style: expansionCellStyle,
1893
+ children: /* @__PURE__ */ jsx(ExpandToggle, {
1894
+ expanded,
1895
+ expandLabel,
1896
+ collapseLabel,
1897
+ onToggle: () => onToggleExpand(id)
1898
+ })
1899
+ });
1900
+ $[6] = collapseLabel;
1901
+ $[7] = expandLabel;
1902
+ $[8] = expanded;
1903
+ $[9] = expansionCellStyle;
1904
+ $[10] = id;
1905
+ $[11] = onToggleExpand;
1906
+ $[12] = t3;
1907
+ } else t3 = $[12];
1908
+ let t4;
1909
+ if ($[13] !== id || $[14] !== onToggleSelect || $[15] !== selectLabel || $[16] !== selected || $[17] !== selectionCellStyle) {
1910
+ t4 = selected !== void 0 && /* @__PURE__ */ jsx(Table.Td, {
1911
+ ta: "center",
1912
+ style: selectionCellStyle,
1913
+ children: /* @__PURE__ */ jsx(Checkbox, {
1914
+ "aria-label": selectLabel,
1915
+ checked: selected,
1916
+ onChange: () => onToggleSelect(id)
1917
+ })
1918
+ });
1919
+ $[13] = id;
1920
+ $[14] = onToggleSelect;
1921
+ $[15] = selectLabel;
1922
+ $[16] = selected;
1923
+ $[17] = selectionCellStyle;
1924
+ $[18] = t4;
1925
+ } else t4 = $[18];
1926
+ let t5;
1927
+ if ($[19] !== columns || $[20] !== getCellProps || $[21] !== index || $[22] !== pinStyleFor || $[23] !== row) {
1928
+ let t6;
1929
+ if ($[25] !== getCellProps || $[26] !== index || $[27] !== pinStyleFor || $[28] !== row) {
1930
+ t6 = (column) => /* @__PURE__ */ jsx(Table.Td, {
831
1931
  ...getCellProps(column),
832
1932
  style: pinStyleFor(column.key),
833
1933
  children: column.Cell ? /* @__PURE__ */ jsx(column.Cell, {
834
1934
  row,
835
1935
  rowIndex: index
836
1936
  }) : column.accessor?.(row)
837
- }, column.key)),
838
- showActions && /* @__PURE__ */ jsx(Table.Td, {
839
- ta: "end",
840
- style: actionsCellStyle,
841
- children: /* @__PURE__ */ jsx(RowActions, {
842
- row,
843
- actions: rowActions,
844
- confirm,
845
- cancelLabel
846
- })
1937
+ }, column.key);
1938
+ $[25] = getCellProps;
1939
+ $[26] = index;
1940
+ $[27] = pinStyleFor;
1941
+ $[28] = row;
1942
+ $[29] = t6;
1943
+ } else t6 = $[29];
1944
+ t5 = columns.map(t6);
1945
+ $[19] = columns;
1946
+ $[20] = getCellProps;
1947
+ $[21] = index;
1948
+ $[22] = pinStyleFor;
1949
+ $[23] = row;
1950
+ $[24] = t5;
1951
+ } else t5 = $[24];
1952
+ let t6;
1953
+ if ($[30] !== actionsCellStyle || $[31] !== cancelLabel || $[32] !== confirm || $[33] !== row || $[34] !== rowActions || $[35] !== showActions) {
1954
+ t6 = showActions && /* @__PURE__ */ jsx(Table.Td, {
1955
+ ta: "end",
1956
+ style: actionsCellStyle,
1957
+ children: /* @__PURE__ */ jsx(RowActions, {
1958
+ row,
1959
+ actions: rowActions,
1960
+ confirm,
1961
+ cancelLabel
847
1962
  })
848
- ]
849
- }), expanded === true && /* @__PURE__ */ jsx(Table.Tr, { children: /* @__PURE__ */ jsx(Table.Td, {
850
- colSpan: columnSpan,
851
- children: renderRowDetail(row)
852
- }) })] });
1963
+ });
1964
+ $[30] = actionsCellStyle;
1965
+ $[31] = cancelLabel;
1966
+ $[32] = confirm;
1967
+ $[33] = row;
1968
+ $[34] = rowActions;
1969
+ $[35] = showActions;
1970
+ $[36] = t6;
1971
+ } else t6 = $[36];
1972
+ let t7;
1973
+ if ($[37] !== className || $[38] !== index || $[39] !== measureElement || $[40] !== selected || $[41] !== t1 || $[42] !== t2 || $[43] !== t3 || $[44] !== t4 || $[45] !== t5 || $[46] !== t6) {
1974
+ t7 = /* @__PURE__ */ jsxs(Table.Tr, {
1975
+ role: "row",
1976
+ "data-index": index,
1977
+ "aria-selected": selected,
1978
+ ...t1,
1979
+ className,
1980
+ ref: measureElement,
1981
+ "data-stagger": "",
1982
+ onMouseEnter: t2,
1983
+ children: [
1984
+ t3,
1985
+ t4,
1986
+ t5,
1987
+ t6
1988
+ ]
1989
+ });
1990
+ $[37] = className;
1991
+ $[38] = index;
1992
+ $[39] = measureElement;
1993
+ $[40] = selected;
1994
+ $[41] = t1;
1995
+ $[42] = t2;
1996
+ $[43] = t3;
1997
+ $[44] = t4;
1998
+ $[45] = t5;
1999
+ $[46] = t6;
2000
+ $[47] = t7;
2001
+ } else t7 = $[47];
2002
+ let t8;
2003
+ if ($[48] !== columnSpan || $[49] !== expanded || $[50] !== renderRowDetail || $[51] !== row) {
2004
+ t8 = expanded === true && /* @__PURE__ */ jsx(Table.Tr, { children: /* @__PURE__ */ jsx(Table.Td, {
2005
+ colSpan: columnSpan,
2006
+ children: renderRowDetail(row)
2007
+ }) });
2008
+ $[48] = columnSpan;
2009
+ $[49] = expanded;
2010
+ $[50] = renderRowDetail;
2011
+ $[51] = row;
2012
+ $[52] = t8;
2013
+ } else t8 = $[52];
2014
+ let t9;
2015
+ if ($[53] !== t7 || $[54] !== t8) {
2016
+ t9 = /* @__PURE__ */ jsxs(Fragment, { children: [t7, t8] });
2017
+ $[53] = t7;
2018
+ $[54] = t8;
2019
+ $[55] = t9;
2020
+ } else t9 = $[55];
2021
+ return t9;
853
2022
  }
854
2023
  /** Desktop table rendering driven by core prop-getters. */
855
2024
  function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick, rowClassName, renderRowDetail, summaryRow, expansion, getRowId, bodyRef, className, rowEntries, paddingTop = 0, paddingBottom = 0, measureElement, stickyHeaderOffset = 0, stickyHeader = false, pinOffset, maxHeight, virtualScrollRef, setWidth, columnWidths, resizeLabel = "Resize column", actionsPinned = false, density = "comfortable" }) {
@@ -867,7 +2036,7 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
867
2036
  const summaryCells = summaryRow?.(rows);
868
2037
  const hasRightPin = table.columns.some((c) => pinOffset?.(c.key)?.side === "right");
869
2038
  const actionsEdgePinned = showActions && (hasRightPin || actionsPinned);
870
- const hasPinned = table.columns.some((c) => pinOffset?.(c.key) != null) || actionsEdgePinned;
2039
+ const hasPinned = table.columns.some((c_0) => pinOffset?.(c_0.key) != null) || actionsEdgePinned;
871
2040
  const { ref: wrapperRef, overflowing } = useHorizontalOverflow();
872
2041
  const headerCellStyle = stickyHeader ? {
873
2042
  position: "sticky",
@@ -884,7 +2053,7 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
884
2053
  left: expansionLead + (selection ? selectionWidth : 0),
885
2054
  right: showActions ? actionsWidth : 0
886
2055
  };
887
- const hasLeftPin = table.columns.some((c) => pinOffset?.(c.key)?.side === "left");
2056
+ const hasLeftPin = table.columns.some((c_1) => pinOffset?.(c_1.key)?.side === "left");
888
2057
  const pinBg = "var(--mantine-color-body)";
889
2058
  const headerStyleFor = (column) => {
890
2059
  const key = column.key;
@@ -910,24 +2079,24 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
910
2079
  ...edgePinStyle("right", actionsEdgePinned, PIN_Z.headerPinned)
911
2080
  };
912
2081
  const edgeBodyStyle = (side, active) => {
913
- const pin = edgePinStyle(side, active, PIN_Z.body);
914
- return pin ? {
915
- ...pin,
2082
+ const pin_0 = edgePinStyle(side, active, PIN_Z.body);
2083
+ return pin_0 ? {
2084
+ ...pin_0,
916
2085
  background: pinBg
917
2086
  } : void 0;
918
2087
  };
919
2088
  const expansionCellStyle = leadingPinStyle(hasLeftPin, 0, PIN_Z.body, pinBg);
920
2089
  const selectionCellStyle = leadingPinStyle(hasLeftPin, expansionLead, PIN_Z.body, pinBg);
921
2090
  const actionsCellStyle = edgeBodyStyle("right", actionsEdgePinned);
922
- const columnName = (column) => typeof column.header === "string" ? column.header : column.key;
923
- const resizeHandleFor = (column) => setWidth ? /* @__PURE__ */ jsx("span", {
924
- ...columnResizeHandleProps(column.key, setWidth, `${resizeLabel}: ${columnName(column)}`),
2091
+ const columnName = (column_0) => typeof column_0.header === "string" ? column_0.header : column_0.key;
2092
+ const resizeHandleFor = (column_1) => setWidth ? /* @__PURE__ */ jsx("span", {
2093
+ ...columnResizeHandleProps(column_1.key, setWidth, `${resizeLabel}: ${columnName(column_1)}`),
925
2094
  style: RESIZE_HANDLE_STYLE
926
2095
  }) : void 0;
927
- const bodyPinStyle = (key) => {
928
- const pin = pinnedCellStyle(pinOffset?.(key), PIN_Z.body, leads);
929
- return pin ? {
930
- ...pin,
2096
+ const bodyPinStyle = (key_0) => {
2097
+ const pin_1 = pinnedCellStyle(pinOffset?.(key_0), PIN_Z.body, leads);
2098
+ return pin_1 ? {
2099
+ ...pin_1,
931
2100
  background: pinBg
932
2101
  } : void 0;
933
2102
  };
@@ -999,12 +2168,12 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
999
2168
  onChange: selection.toggleAll
1000
2169
  })
1001
2170
  }),
1002
- columns.map((column) => /* @__PURE__ */ jsx(HeaderCell, {
2171
+ columns.map((column_2) => /* @__PURE__ */ jsx(HeaderCell, {
1003
2172
  table,
1004
- column,
1005
- stickyStyle: headerStyleFor(column),
1006
- resizeHandle: resizeHandleFor(column)
1007
- }, column.key)),
2173
+ column: column_2,
2174
+ stickyStyle: headerStyleFor(column_2),
2175
+ resizeHandle: resizeHandleFor(column_2)
2176
+ }, column_2.key)),
1008
2177
  showActions && /* @__PURE__ */ jsx(Table.Th, {
1009
2178
  ta: "end",
1010
2179
  w: actionsWidth,
@@ -1027,18 +2196,18 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
1027
2196
  }
1028
2197
  })
1029
2198
  }),
1030
- entries.map(({ row, index, key }) => {
1031
- const id = getRowId(row);
2199
+ entries.map(({ row, index, key: key_1 }) => {
2200
+ const id_0 = getRowId(row);
1032
2201
  return /* @__PURE__ */ jsx(Row, {
1033
2202
  row,
1034
2203
  index,
1035
- id,
2204
+ id: id_0,
1036
2205
  columns,
1037
2206
  getCellProps: table.getCellProps,
1038
- selected: selection?.isSelected(id),
2207
+ selected: selection?.isSelected(id_0),
1039
2208
  selectLabel: labels.selectRow,
1040
2209
  onToggleSelect: toggleSelect,
1041
- expanded: expansion?.isExpanded(id),
2210
+ expanded: expansion?.isExpanded(id_0),
1042
2211
  expandLabel: labels.expandRow,
1043
2212
  collapseLabel: labels.collapseRow,
1044
2213
  onToggleExpand: expansion?.toggle,
@@ -1056,7 +2225,7 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
1056
2225
  expansionCellStyle,
1057
2226
  actionsCellStyle,
1058
2227
  pinSignature
1059
- }, key);
2228
+ }, key_1);
1060
2229
  }),
1061
2230
  paddingBottom > 0 && /* @__PURE__ */ jsx(Table.Tr, {
1062
2231
  "aria-hidden": true,
@@ -1073,12 +2242,12 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
1073
2242
  summaryCells && /* @__PURE__ */ jsx(Table.Tfoot, { children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
1074
2243
  expandable && /* @__PURE__ */ jsx(Table.Td, {}),
1075
2244
  selection && /* @__PURE__ */ jsx(Table.Td, {}),
1076
- columns.map((column) => /* @__PURE__ */ jsx(Table.Td, {
1077
- ...table.getCellProps(column),
2245
+ columns.map((column_3) => /* @__PURE__ */ jsx(Table.Td, {
2246
+ ...table.getCellProps(column_3),
1078
2247
  fw: 600,
1079
2248
  c: "dimmed",
1080
- children: summaryCells[column.key]
1081
- }, column.key)),
2249
+ children: summaryCells[column_3.key]
2250
+ }, column_3.key)),
1082
2251
  showActions && /* @__PURE__ */ jsx(Table.Td, {})
1083
2252
  ] }) })
1084
2253
  ]
@@ -1087,315 +2256,674 @@ function DesktopTable({ table, rows, rowActions, confirm, prefetch, onRowClick,
1087
2256
  }
1088
2257
  //#endregion
1089
2258
  //#region src/components/EmptyState.tsx
2259
+ /** Props for {@link EmptyState}. */
1090
2260
  /** Centred "nothing to show" placeholder. */
1091
- function EmptyState({ title, description, icon, action }) {
1092
- return /* @__PURE__ */ jsxs(Stack, {
1093
- role: "status",
1094
- align: "center",
1095
- justify: "center",
1096
- gap: 6,
1097
- py: 48,
1098
- px: 16,
1099
- children: [
1100
- /* @__PURE__ */ jsx(Text, {
1101
- c: "dimmed",
1102
- "aria-hidden": true,
1103
- children: icon ?? /* @__PURE__ */ jsx(InboxIcon, { size: 40 })
1104
- }),
1105
- /* @__PURE__ */ jsx(Text, {
1106
- fw: 600,
1107
- fz: "md",
1108
- children: title
1109
- }),
1110
- description && /* @__PURE__ */ jsx(Text, {
1111
- c: "dimmed",
1112
- fz: "sm",
1113
- ta: "center",
1114
- maw: 360,
1115
- children: description
1116
- }),
1117
- action
1118
- ]
1119
- });
2261
+ function EmptyState(t0) {
2262
+ const $ = c(13);
2263
+ const { title, description, icon, action } = t0;
2264
+ let t1;
2265
+ if ($[0] !== icon) {
2266
+ t1 = icon ?? /* @__PURE__ */ jsx(InboxIcon, { size: 40 });
2267
+ $[0] = icon;
2268
+ $[1] = t1;
2269
+ } else t1 = $[1];
2270
+ let t2;
2271
+ if ($[2] !== t1) {
2272
+ t2 = /* @__PURE__ */ jsx(Text, {
2273
+ c: "dimmed",
2274
+ "aria-hidden": true,
2275
+ children: t1
2276
+ });
2277
+ $[2] = t1;
2278
+ $[3] = t2;
2279
+ } else t2 = $[3];
2280
+ let t3;
2281
+ if ($[4] !== title) {
2282
+ t3 = /* @__PURE__ */ jsx(Text, {
2283
+ fw: 600,
2284
+ fz: "md",
2285
+ children: title
2286
+ });
2287
+ $[4] = title;
2288
+ $[5] = t3;
2289
+ } else t3 = $[5];
2290
+ let t4;
2291
+ if ($[6] !== description) {
2292
+ t4 = description && /* @__PURE__ */ jsx(Text, {
2293
+ c: "dimmed",
2294
+ fz: "sm",
2295
+ ta: "center",
2296
+ maw: 360,
2297
+ children: description
2298
+ });
2299
+ $[6] = description;
2300
+ $[7] = t4;
2301
+ } else t4 = $[7];
2302
+ let t5;
2303
+ if ($[8] !== action || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
2304
+ t5 = /* @__PURE__ */ jsxs(Stack, {
2305
+ role: "status",
2306
+ align: "center",
2307
+ justify: "center",
2308
+ gap: 6,
2309
+ py: 48,
2310
+ px: 16,
2311
+ children: [
2312
+ t2,
2313
+ t3,
2314
+ t4,
2315
+ action
2316
+ ]
2317
+ });
2318
+ $[8] = action;
2319
+ $[9] = t2;
2320
+ $[10] = t3;
2321
+ $[11] = t4;
2322
+ $[12] = t5;
2323
+ } else t5 = $[12];
2324
+ return t5;
1120
2325
  }
1121
2326
  //#endregion
1122
2327
  //#region src/components/ErrorState.tsx
2328
+ /** Props for {@link ErrorState}. */
1123
2329
  /** Inline error alert with an optional retry button. */
1124
- function ErrorState({ error, title, message, retryLabel, onRetry, isRetrying }) {
1125
- return /* @__PURE__ */ jsx(Alert, {
1126
- icon: /* @__PURE__ */ jsx(AlertIcon, { size: 16 }),
1127
- color: "red",
1128
- variant: "light",
1129
- title,
1130
- children: /* @__PURE__ */ jsxs(Group, {
2330
+ function ErrorState(t0) {
2331
+ const $ = c(18);
2332
+ const { error, title, message, retryLabel, onRetry, isRetrying } = t0;
2333
+ let t1;
2334
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2335
+ t1 = /* @__PURE__ */ jsx(AlertIcon, { size: 16 });
2336
+ $[0] = t1;
2337
+ } else t1 = $[0];
2338
+ let t2;
2339
+ if ($[1] !== message) {
2340
+ t2 = /* @__PURE__ */ jsx(Text, {
2341
+ fz: "sm",
2342
+ children: message
2343
+ });
2344
+ $[1] = message;
2345
+ $[2] = t2;
2346
+ } else t2 = $[2];
2347
+ let t3;
2348
+ if ($[3] !== error.message) {
2349
+ t3 = /* @__PURE__ */ jsx(Text, {
2350
+ fz: "xs",
2351
+ c: "dimmed",
2352
+ mt: 2,
2353
+ children: error.message
2354
+ });
2355
+ $[3] = error.message;
2356
+ $[4] = t3;
2357
+ } else t3 = $[4];
2358
+ let t4;
2359
+ if ($[5] !== t2 || $[6] !== t3) {
2360
+ t4 = /* @__PURE__ */ jsxs("div", { children: [t2, t3] });
2361
+ $[5] = t2;
2362
+ $[6] = t3;
2363
+ $[7] = t4;
2364
+ } else t4 = $[7];
2365
+ let t5;
2366
+ if ($[8] !== isRetrying || $[9] !== onRetry || $[10] !== retryLabel) {
2367
+ t5 = onRetry && /* @__PURE__ */ jsx(Button, {
2368
+ size: "xs",
2369
+ variant: "light",
2370
+ color: "red",
2371
+ leftSection: /* @__PURE__ */ jsx(RefreshIcon, { size: 14 }),
2372
+ onClick: onRetry,
2373
+ loading: isRetrying,
2374
+ children: retryLabel
2375
+ });
2376
+ $[8] = isRetrying;
2377
+ $[9] = onRetry;
2378
+ $[10] = retryLabel;
2379
+ $[11] = t5;
2380
+ } else t5 = $[11];
2381
+ let t6;
2382
+ if ($[12] !== t4 || $[13] !== t5) {
2383
+ t6 = /* @__PURE__ */ jsxs(Group, {
1131
2384
  justify: "space-between",
1132
2385
  align: "center",
1133
2386
  wrap: "nowrap",
1134
2387
  gap: "md",
1135
- children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Text, {
1136
- fz: "sm",
1137
- children: message
1138
- }), /* @__PURE__ */ jsx(Text, {
1139
- fz: "xs",
1140
- c: "dimmed",
1141
- mt: 2,
1142
- children: error.message
1143
- })] }), onRetry && /* @__PURE__ */ jsx(Button, {
1144
- size: "xs",
1145
- variant: "light",
1146
- color: "red",
1147
- leftSection: /* @__PURE__ */ jsx(RefreshIcon, { size: 14 }),
1148
- onClick: onRetry,
1149
- loading: isRetrying,
1150
- children: retryLabel
1151
- })]
1152
- })
1153
- });
2388
+ children: [t4, t5]
2389
+ });
2390
+ $[12] = t4;
2391
+ $[13] = t5;
2392
+ $[14] = t6;
2393
+ } else t6 = $[14];
2394
+ let t7;
2395
+ if ($[15] !== t6 || $[16] !== title) {
2396
+ t7 = /* @__PURE__ */ jsx(Alert, {
2397
+ icon: t1,
2398
+ color: "red",
2399
+ variant: "light",
2400
+ title,
2401
+ children: t6
2402
+ });
2403
+ $[15] = t6;
2404
+ $[16] = title;
2405
+ $[17] = t7;
2406
+ } else t7 = $[17];
2407
+ return t7;
1154
2408
  }
1155
2409
  //#endregion
1156
2410
  //#region src/components/FilterDrawer.tsx
2411
+ /** Props for {@link FilterDrawer}. */
1157
2412
  /** Right-side drawer holding the caller's filter widgets + apply/clear. */
1158
- function FilterDrawer({ opened, onClose, filters, activeFilterCount, onClearFilters, labels, dir = "ltr" }) {
1159
- return /* @__PURE__ */ jsx(Drawer, {
1160
- opened,
1161
- onClose,
1162
- position: dir === "rtl" ? "left" : "right",
1163
- size: 380,
1164
- title: labels.filters,
1165
- overlayProps: {
2413
+ function FilterDrawer(t0) {
2414
+ const $ = c(25);
2415
+ const { opened, onClose, filters, activeFilterCount, onClearFilters, labels, dir: t1 } = t0;
2416
+ const t2 = (t1 === void 0 ? "ltr" : t1) === "rtl" ? "left" : "right";
2417
+ let t3;
2418
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
2419
+ t3 = {
1166
2420
  opacity: .4,
1167
2421
  blur: 2
1168
- },
1169
- closeButtonProps: { "aria-label": labels.cancel },
1170
- children: /* @__PURE__ */ jsxs(Stack, {
2422
+ };
2423
+ $[0] = t3;
2424
+ } else t3 = $[0];
2425
+ let t4;
2426
+ if ($[1] !== labels.cancel) {
2427
+ t4 = { "aria-label": labels.cancel };
2428
+ $[1] = labels.cancel;
2429
+ $[2] = t4;
2430
+ } else t4 = $[2];
2431
+ let t5;
2432
+ if ($[3] !== filters) {
2433
+ t5 = /* @__PURE__ */ jsx(Stack, {
2434
+ gap: "md",
2435
+ children: filters
2436
+ });
2437
+ $[3] = filters;
2438
+ $[4] = t5;
2439
+ } else t5 = $[4];
2440
+ const t6 = activeFilterCount === 0;
2441
+ let t7;
2442
+ if ($[5] !== labels.clearAll || $[6] !== onClearFilters || $[7] !== t6) {
2443
+ t7 = /* @__PURE__ */ jsx(Button, {
2444
+ variant: "subtle",
2445
+ onClick: onClearFilters,
2446
+ disabled: t6,
2447
+ children: labels.clearAll
2448
+ });
2449
+ $[5] = labels.clearAll;
2450
+ $[6] = onClearFilters;
2451
+ $[7] = t6;
2452
+ $[8] = t7;
2453
+ } else t7 = $[8];
2454
+ let t8;
2455
+ if ($[9] !== labels.applyFilters || $[10] !== onClose) {
2456
+ t8 = /* @__PURE__ */ jsx(Button, {
2457
+ onClick: onClose,
2458
+ children: labels.applyFilters
2459
+ });
2460
+ $[9] = labels.applyFilters;
2461
+ $[10] = onClose;
2462
+ $[11] = t8;
2463
+ } else t8 = $[11];
2464
+ let t9;
2465
+ if ($[12] !== t7 || $[13] !== t8) {
2466
+ t9 = /* @__PURE__ */ jsxs(Group, {
2467
+ justify: "space-between",
2468
+ pt: "md",
2469
+ children: [t7, t8]
2470
+ });
2471
+ $[12] = t7;
2472
+ $[13] = t8;
2473
+ $[14] = t9;
2474
+ } else t9 = $[14];
2475
+ let t10;
2476
+ if ($[15] !== t5 || $[16] !== t9) {
2477
+ t10 = /* @__PURE__ */ jsxs(Stack, {
1171
2478
  gap: "md",
1172
2479
  mih: "60vh",
1173
2480
  justify: "space-between",
1174
- children: [/* @__PURE__ */ jsx(Stack, {
1175
- gap: "md",
1176
- children: filters
1177
- }), /* @__PURE__ */ jsxs(Group, {
1178
- justify: "space-between",
1179
- pt: "md",
1180
- children: [/* @__PURE__ */ jsx(Button, {
1181
- variant: "subtle",
1182
- onClick: onClearFilters,
1183
- disabled: activeFilterCount === 0,
1184
- children: labels.clearAll
1185
- }), /* @__PURE__ */ jsx(Button, {
1186
- onClick: onClose,
1187
- children: labels.applyFilters
1188
- })]
1189
- })]
1190
- })
1191
- });
2481
+ children: [t5, t9]
2482
+ });
2483
+ $[15] = t5;
2484
+ $[16] = t9;
2485
+ $[17] = t10;
2486
+ } else t10 = $[17];
2487
+ let t11;
2488
+ if ($[18] !== labels.filters || $[19] !== onClose || $[20] !== opened || $[21] !== t10 || $[22] !== t2 || $[23] !== t4) {
2489
+ t11 = /* @__PURE__ */ jsx(Drawer, {
2490
+ opened,
2491
+ onClose,
2492
+ position: t2,
2493
+ size: 380,
2494
+ title: labels.filters,
2495
+ overlayProps: t3,
2496
+ closeButtonProps: t4,
2497
+ children: t10
2498
+ });
2499
+ $[18] = labels.filters;
2500
+ $[19] = onClose;
2501
+ $[20] = opened;
2502
+ $[21] = t10;
2503
+ $[22] = t2;
2504
+ $[23] = t4;
2505
+ $[24] = t11;
2506
+ } else t11 = $[24];
2507
+ return t11;
1192
2508
  }
1193
2509
  //#endregion
1194
2510
  //#region src/components/MobileCards.tsx
2511
+ /**
2512
+ * Props for {@link MobileCards}: the card-relevant slice of core's shared
2513
+ * render contract (no header/pinning/resize concerns on mobile) plus the
2514
+ * Mantine-specific extras.
2515
+ */
1195
2516
  function mobileLabel(column) {
1196
2517
  return column.mobileLabel ?? (typeof column.header === "string" ? column.header : column.key);
1197
2518
  }
1198
2519
  /** Mobile rendering: one Mantine Card per row with labelled key/value rows. */
1199
- function MobileCards({ table, rows, rowActions, confirm, getRowId, bodyRef, className, rowEntries, paddingTop = 0, paddingBottom = 0, measureElement, density = "comfortable", onRowClick, rowClassName, renderRowDetail, summaryRow, expansion }) {
2520
+ function MobileCards(t0) {
2521
+ const $ = c(53);
2522
+ const { table, rows, rowActions, confirm, getRowId, bodyRef, className, rowEntries, paddingTop: t1, paddingBottom: t2, measureElement, density: t3, onRowClick, rowClassName, renderRowDetail, summaryRow, expansion } = t0;
2523
+ const paddingTop = t1 === void 0 ? 0 : t1;
2524
+ const paddingBottom = t2 === void 0 ? 0 : t2;
2525
+ const density = t3 === void 0 ? "comfortable" : t3;
1200
2526
  const { columns, selection, labels } = table;
1201
2527
  const compact = density === "compact";
1202
2528
  const cardPadding = compact ? "sm" : "md";
1203
2529
  const cardGap = compact ? 4 : "xs";
1204
- const entries = rowEntries ?? rows.map((row, index) => ({
1205
- row,
1206
- index,
1207
- key: getRowId(row)
1208
- }));
1209
- const summaryCells = summaryRow?.(rows);
1210
- return /* @__PURE__ */ jsxs(Stack, {
1211
- gap: compact ? "xs" : "sm",
1212
- ref: bodyRef,
1213
- className,
1214
- ...table.getTableProps({ role: "list" }),
1215
- children: [
1216
- paddingTop > 0 && /* @__PURE__ */ jsx("div", {
2530
+ let T0;
2531
+ let summaryCells;
2532
+ let t4;
2533
+ let t5;
2534
+ let t6;
2535
+ let t7;
2536
+ let t8;
2537
+ let t9;
2538
+ if ($[0] !== bodyRef || $[1] !== cardGap || $[2] !== cardPadding || $[3] !== className || $[4] !== columns || $[5] !== compact || $[6] !== confirm || $[7] !== expansion || $[8] !== getRowId || $[9] !== labels || $[10] !== measureElement || $[11] !== onRowClick || $[12] !== paddingTop || $[13] !== renderRowDetail || $[14] !== rowActions || $[15] !== rowClassName || $[16] !== rowEntries || $[17] !== rows || $[18] !== selection || $[19] !== summaryRow || $[20] !== table) {
2539
+ const entries = rowEntries ?? rows.map((row, index) => ({
2540
+ row,
2541
+ index,
2542
+ key: getRowId(row)
2543
+ }));
2544
+ let t10;
2545
+ if ($[29] !== rows || $[30] !== summaryRow) {
2546
+ t10 = summaryRow?.(rows);
2547
+ $[29] = rows;
2548
+ $[30] = summaryRow;
2549
+ $[31] = t10;
2550
+ } else t10 = $[31];
2551
+ summaryCells = t10;
2552
+ T0 = Stack;
2553
+ t4 = compact ? "xs" : "sm";
2554
+ t5 = bodyRef;
2555
+ t6 = className;
2556
+ if ($[32] !== table) {
2557
+ t7 = table.getTableProps({ role: "list" });
2558
+ $[32] = table;
2559
+ $[33] = t7;
2560
+ } else t7 = $[33];
2561
+ if ($[34] !== paddingTop) {
2562
+ t8 = paddingTop > 0 && /* @__PURE__ */ jsx("div", {
1217
2563
  "aria-hidden": true,
1218
2564
  style: { height: paddingTop }
1219
- }),
1220
- entries.map(({ row, index, key }) => {
1221
- const id = getRowId(row);
1222
- return /* @__PURE__ */ jsx(Card, {
1223
- ...rowClickProps(row, onRowClick),
1224
- className: rowClassName?.(row, index),
1225
- ref: measureElement,
1226
- "data-index": index,
1227
- withBorder: true,
1228
- radius: "md",
1229
- padding: cardPadding,
1230
- role: "listitem",
1231
- "data-stagger": "",
1232
- children: /* @__PURE__ */ jsxs(Stack, {
1233
- gap: cardGap,
1234
- children: [
1235
- selection && /* @__PURE__ */ jsx(Checkbox, {
1236
- "aria-label": labels.selectRow,
1237
- checked: selection.isSelected(id),
1238
- onChange: () => selection.toggle(id)
1239
- }),
1240
- expansion && /* @__PURE__ */ jsx(Group, {
1241
- justify: "flex-end",
1242
- children: /* @__PURE__ */ jsx(ExpandToggle, {
1243
- expanded: expansion.isExpanded(id),
1244
- expandLabel: labels.expandRow,
1245
- collapseLabel: labels.collapseRow,
1246
- onToggle: () => expansion.toggle(id)
1247
- })
1248
- }),
1249
- columns.map((column) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Text, {
1250
- fz: "xs",
1251
- c: "dimmed",
1252
- tt: "uppercase",
1253
- fw: 500,
1254
- children: mobileLabel(column)
1255
- }), /* @__PURE__ */ jsx(Text, {
1256
- component: "div",
1257
- fz: "sm",
1258
- children: column.Cell ? /* @__PURE__ */ jsx(column.Cell, {
1259
- row,
1260
- rowIndex: index
1261
- }) : column.accessor?.(row)
1262
- })] }, column.key)),
1263
- expansion?.isExpanded(id) === true && /* @__PURE__ */ jsx("div", { children: renderRowDetail(row) }),
1264
- rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx(Group, {
1265
- gap: 4,
1266
- justify: "flex-end",
1267
- pt: 4,
1268
- children: rowActions.map((action) => {
1269
- if (action.isHidden?.(row)) return null;
1270
- const reason = resolveDisabledReason(action.disabledReason?.(row));
1271
- const disabled = reason !== void 0 || (action.isDisabled?.(row) ?? false);
1272
- const run = disabled ? void 0 : () => runRowAction(action, row, confirm, labels.cancel);
1273
- return action.icon ? /* @__PURE__ */ jsx(Tooltip, {
1274
- label: reason ?? action.label,
1275
- withArrow: true,
1276
- openDelay: 200,
1277
- children: /* @__PURE__ */ jsx(ActionIcon, {
1278
- variant: "subtle",
1279
- color: action.color,
1280
- size: "sm",
1281
- disabled,
1282
- "aria-label": action.label,
1283
- onClick: run,
1284
- children: action.icon
1285
- })
1286
- }, action.key) : /* @__PURE__ */ jsx(Button, {
1287
- variant: "subtle",
1288
- color: action.color,
1289
- size: "compact-sm",
1290
- disabled,
1291
- onClick: run,
1292
- children: action.label
1293
- }, action.key);
1294
- })
1295
- })
1296
- ]
1297
- })
1298
- }, key);
1299
- }),
1300
- paddingBottom > 0 && /* @__PURE__ */ jsx("div", {
1301
- "aria-hidden": true,
1302
- style: { height: paddingBottom }
1303
- }),
1304
- summaryCells && /* @__PURE__ */ jsx(Card, {
2565
+ });
2566
+ $[34] = paddingTop;
2567
+ $[35] = t8;
2568
+ } else t8 = $[35];
2569
+ t9 = entries.map((t11) => {
2570
+ const { row: row_0, index: index_0, key } = t11;
2571
+ const id = getRowId(row_0);
2572
+ return /* @__PURE__ */ jsx(Card, {
2573
+ ...rowClickProps(row_0, onRowClick),
2574
+ className: rowClassName?.(row_0, index_0),
2575
+ ref: measureElement,
2576
+ "data-index": index_0,
1305
2577
  withBorder: true,
1306
2578
  radius: "md",
1307
2579
  padding: cardPadding,
1308
2580
  role: "listitem",
1309
- children: /* @__PURE__ */ jsx(Stack, {
2581
+ "data-stagger": "",
2582
+ children: /* @__PURE__ */ jsxs(Stack, {
1310
2583
  gap: cardGap,
1311
- children: columns.filter((column) => summaryCells[column.key] !== void 0).map((column) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Text, {
1312
- fz: "xs",
1313
- c: "dimmed",
1314
- tt: "uppercase",
1315
- fw: 500,
1316
- children: mobileLabel(column)
1317
- }), /* @__PURE__ */ jsx(Text, {
1318
- component: "div",
1319
- fz: "sm",
1320
- fw: 600,
1321
- children: summaryCells[column.key]
1322
- })] }, column.key))
2584
+ children: [
2585
+ selection && /* @__PURE__ */ jsx(Checkbox, {
2586
+ "aria-label": labels.selectRow,
2587
+ checked: selection.isSelected(id),
2588
+ onChange: () => selection.toggle(id)
2589
+ }),
2590
+ expansion && /* @__PURE__ */ jsx(Group, {
2591
+ justify: "flex-end",
2592
+ children: /* @__PURE__ */ jsx(ExpandToggle, {
2593
+ expanded: expansion.isExpanded(id),
2594
+ expandLabel: labels.expandRow,
2595
+ collapseLabel: labels.collapseRow,
2596
+ onToggle: () => expansion.toggle(id)
2597
+ })
2598
+ }),
2599
+ columns.map((column) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Text, {
2600
+ fz: "xs",
2601
+ c: "dimmed",
2602
+ tt: "uppercase",
2603
+ fw: 500,
2604
+ children: mobileLabel(column)
2605
+ }), /* @__PURE__ */ jsx(Text, {
2606
+ component: "div",
2607
+ fz: "sm",
2608
+ children: column.Cell ? /* @__PURE__ */ jsx(column.Cell, {
2609
+ row: row_0,
2610
+ rowIndex: index_0
2611
+ }) : column.accessor?.(row_0)
2612
+ })] }, column.key)),
2613
+ expansion?.isExpanded(id) === true && /* @__PURE__ */ jsx("div", { children: renderRowDetail(row_0) }),
2614
+ rowActions && rowActions.length > 0 && /* @__PURE__ */ jsx(Group, {
2615
+ gap: 4,
2616
+ justify: "flex-end",
2617
+ pt: 4,
2618
+ children: rowActions.map((action) => {
2619
+ if (action.isHidden?.(row_0)) return null;
2620
+ const reason = resolveDisabledReason(action.disabledReason?.(row_0));
2621
+ const disabled = reason !== void 0 || (action.isDisabled?.(row_0) ?? false);
2622
+ const run = disabled ? void 0 : () => runRowAction(action, row_0, confirm, labels.cancel);
2623
+ return action.icon ? /* @__PURE__ */ jsx(Tooltip, {
2624
+ label: reason ?? action.label,
2625
+ withArrow: true,
2626
+ openDelay: 200,
2627
+ children: /* @__PURE__ */ jsx(ActionIcon, {
2628
+ variant: "subtle",
2629
+ color: action.color,
2630
+ size: "sm",
2631
+ disabled,
2632
+ "aria-label": action.label,
2633
+ onClick: run,
2634
+ children: action.icon
2635
+ })
2636
+ }, action.key) : /* @__PURE__ */ jsx(Button, {
2637
+ variant: "subtle",
2638
+ color: action.color,
2639
+ size: "compact-sm",
2640
+ disabled,
2641
+ onClick: run,
2642
+ children: action.label
2643
+ }, action.key);
2644
+ })
2645
+ })
2646
+ ]
1323
2647
  })
2648
+ }, key);
2649
+ });
2650
+ $[0] = bodyRef;
2651
+ $[1] = cardGap;
2652
+ $[2] = cardPadding;
2653
+ $[3] = className;
2654
+ $[4] = columns;
2655
+ $[5] = compact;
2656
+ $[6] = confirm;
2657
+ $[7] = expansion;
2658
+ $[8] = getRowId;
2659
+ $[9] = labels;
2660
+ $[10] = measureElement;
2661
+ $[11] = onRowClick;
2662
+ $[12] = paddingTop;
2663
+ $[13] = renderRowDetail;
2664
+ $[14] = rowActions;
2665
+ $[15] = rowClassName;
2666
+ $[16] = rowEntries;
2667
+ $[17] = rows;
2668
+ $[18] = selection;
2669
+ $[19] = summaryRow;
2670
+ $[20] = table;
2671
+ $[21] = T0;
2672
+ $[22] = summaryCells;
2673
+ $[23] = t4;
2674
+ $[24] = t5;
2675
+ $[25] = t6;
2676
+ $[26] = t7;
2677
+ $[27] = t8;
2678
+ $[28] = t9;
2679
+ } else {
2680
+ T0 = $[21];
2681
+ summaryCells = $[22];
2682
+ t4 = $[23];
2683
+ t5 = $[24];
2684
+ t6 = $[25];
2685
+ t7 = $[26];
2686
+ t8 = $[27];
2687
+ t9 = $[28];
2688
+ }
2689
+ let t10;
2690
+ if ($[36] !== paddingBottom) {
2691
+ t10 = paddingBottom > 0 && /* @__PURE__ */ jsx("div", {
2692
+ "aria-hidden": true,
2693
+ style: { height: paddingBottom }
2694
+ });
2695
+ $[36] = paddingBottom;
2696
+ $[37] = t10;
2697
+ } else t10 = $[37];
2698
+ let t11;
2699
+ if ($[38] !== cardGap || $[39] !== cardPadding || $[40] !== columns || $[41] !== summaryCells) {
2700
+ t11 = summaryCells && /* @__PURE__ */ jsx(Card, {
2701
+ withBorder: true,
2702
+ radius: "md",
2703
+ padding: cardPadding,
2704
+ role: "listitem",
2705
+ children: /* @__PURE__ */ jsx(Stack, {
2706
+ gap: cardGap,
2707
+ children: columns.filter((column_0) => summaryCells[column_0.key] !== void 0).map((column_1) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(Text, {
2708
+ fz: "xs",
2709
+ c: "dimmed",
2710
+ tt: "uppercase",
2711
+ fw: 500,
2712
+ children: mobileLabel(column_1)
2713
+ }), /* @__PURE__ */ jsx(Text, {
2714
+ component: "div",
2715
+ fz: "sm",
2716
+ fw: 600,
2717
+ children: summaryCells[column_1.key]
2718
+ })] }, column_1.key))
1324
2719
  })
1325
- ]
1326
- });
2720
+ });
2721
+ $[38] = cardGap;
2722
+ $[39] = cardPadding;
2723
+ $[40] = columns;
2724
+ $[41] = summaryCells;
2725
+ $[42] = t11;
2726
+ } else t11 = $[42];
2727
+ let t12;
2728
+ if ($[43] !== T0 || $[44] !== t10 || $[45] !== t11 || $[46] !== t4 || $[47] !== t5 || $[48] !== t6 || $[49] !== t7 || $[50] !== t8 || $[51] !== t9) {
2729
+ t12 = /* @__PURE__ */ jsxs(T0, {
2730
+ gap: t4,
2731
+ ref: t5,
2732
+ className: t6,
2733
+ ...t7,
2734
+ children: [
2735
+ t8,
2736
+ t9,
2737
+ t10,
2738
+ t11
2739
+ ]
2740
+ });
2741
+ $[43] = T0;
2742
+ $[44] = t10;
2743
+ $[45] = t11;
2744
+ $[46] = t4;
2745
+ $[47] = t5;
2746
+ $[48] = t6;
2747
+ $[49] = t7;
2748
+ $[50] = t8;
2749
+ $[51] = t9;
2750
+ $[52] = t12;
2751
+ } else t12 = $[52];
2752
+ return t12;
1327
2753
  }
1328
2754
  //#endregion
1329
2755
  //#region src/components/PaginationFooter.tsx
2756
+ /** Props for {@link PaginationFooter}. */
1330
2757
  /** Desktop pagination bar: page-size + range on the left, pager on the right. */
1331
- function PaginationFooter({ page, totalPages, limit, total, fromIndex, toIndex, onPageChange, onLimitChange, labels }) {
2758
+ function PaginationFooter(t0) {
2759
+ const $ = c(41);
2760
+ const { page, totalPages, limit, total, fromIndex, toIndex, onPageChange, onLimitChange, labels } = t0;
1332
2761
  const safeTotalPages = Math.max(totalPages, 1);
1333
2762
  const safePage = Math.min(Math.max(page, 1), safeTotalPages);
1334
- const options = pageSizeOptions(limit).map((n) => ({
1335
- value: String(n),
1336
- label: String(n)
1337
- }));
1338
- return /* @__PURE__ */ jsxs(Group, {
1339
- justify: "space-between",
1340
- align: "center",
1341
- wrap: "wrap",
1342
- gap: "md",
1343
- pt: "xs",
1344
- children: [/* @__PURE__ */ jsxs(Group, {
2763
+ let t1;
2764
+ if ($[0] !== limit) {
2765
+ t1 = pageSizeOptions(limit).map(_temp$2);
2766
+ $[0] = limit;
2767
+ $[1] = t1;
2768
+ } else t1 = $[1];
2769
+ const options = t1;
2770
+ let t2;
2771
+ if ($[2] !== labels.rowsPerPage) {
2772
+ t2 = /* @__PURE__ */ jsx(Text, {
2773
+ fz: "xs",
2774
+ c: "dimmed",
2775
+ children: labels.rowsPerPage
2776
+ });
2777
+ $[2] = labels.rowsPerPage;
2778
+ $[3] = t2;
2779
+ } else t2 = $[3];
2780
+ const t3 = labels.rowsPerPage;
2781
+ const t4 = String(limit);
2782
+ let t5;
2783
+ if ($[4] !== onLimitChange) {
2784
+ t5 = (v) => onLimitChange(Number(v));
2785
+ $[4] = onLimitChange;
2786
+ $[5] = t5;
2787
+ } else t5 = $[5];
2788
+ let t6;
2789
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
2790
+ t6 = { withinPortal: false };
2791
+ $[6] = t6;
2792
+ } else t6 = $[6];
2793
+ let t7;
2794
+ if ($[7] !== labels.rowsPerPage || $[8] !== options || $[9] !== t4 || $[10] !== t5) {
2795
+ t7 = /* @__PURE__ */ jsx(Select, {
2796
+ "aria-label": t3,
2797
+ data: options,
2798
+ value: t4,
2799
+ onChange: t5,
2800
+ size: "xs",
2801
+ w: 76,
2802
+ allowDeselect: false,
2803
+ comboboxProps: t6
2804
+ });
2805
+ $[7] = labels.rowsPerPage;
2806
+ $[8] = options;
2807
+ $[9] = t4;
2808
+ $[10] = t5;
2809
+ $[11] = t7;
2810
+ } else t7 = $[11];
2811
+ let t8;
2812
+ if ($[12] !== fromIndex || $[13] !== labels || $[14] !== toIndex || $[15] !== total) {
2813
+ t8 = total > 0 && /* @__PURE__ */ jsx(Text, {
2814
+ fz: "xs",
2815
+ c: "dimmed",
2816
+ children: labels.showing({
2817
+ from: fromIndex,
2818
+ to: toIndex,
2819
+ total
2820
+ })
2821
+ });
2822
+ $[12] = fromIndex;
2823
+ $[13] = labels;
2824
+ $[14] = toIndex;
2825
+ $[15] = total;
2826
+ $[16] = t8;
2827
+ } else t8 = $[16];
2828
+ let t9;
2829
+ if ($[17] !== t2 || $[18] !== t7 || $[19] !== t8) {
2830
+ t9 = /* @__PURE__ */ jsxs(Group, {
1345
2831
  gap: "xs",
1346
2832
  align: "center",
1347
2833
  wrap: "nowrap",
1348
2834
  children: [
1349
- /* @__PURE__ */ jsx(Text, {
1350
- fz: "xs",
1351
- c: "dimmed",
1352
- children: labels.rowsPerPage
1353
- }),
1354
- /* @__PURE__ */ jsx(Select, {
1355
- "aria-label": labels.rowsPerPage,
1356
- data: options,
1357
- value: String(limit),
1358
- onChange: (v) => onLimitChange(Number(v)),
1359
- size: "xs",
1360
- w: 76,
1361
- allowDeselect: false,
1362
- comboboxProps: { withinPortal: false }
1363
- }),
1364
- total > 0 && /* @__PURE__ */ jsx(Text, {
1365
- fz: "xs",
1366
- c: "dimmed",
1367
- children: labels.showing({
1368
- from: fromIndex,
1369
- to: toIndex,
1370
- total
1371
- })
1372
- })
2835
+ t2,
2836
+ t7,
2837
+ t8
1373
2838
  ]
1374
- }), /* @__PURE__ */ jsxs(Group, {
2839
+ });
2840
+ $[17] = t2;
2841
+ $[18] = t7;
2842
+ $[19] = t8;
2843
+ $[20] = t9;
2844
+ } else t9 = $[20];
2845
+ let t10;
2846
+ if ($[21] !== labels || $[22] !== safePage || $[23] !== safeTotalPages) {
2847
+ t10 = labels.pageOf({
2848
+ page: safePage,
2849
+ total: safeTotalPages
2850
+ });
2851
+ $[21] = labels;
2852
+ $[22] = safePage;
2853
+ $[23] = safeTotalPages;
2854
+ $[24] = t10;
2855
+ } else t10 = $[24];
2856
+ let t11;
2857
+ if ($[25] !== t10) {
2858
+ t11 = /* @__PURE__ */ jsx(Text, {
2859
+ fz: "xs",
2860
+ c: "dimmed",
2861
+ children: t10
2862
+ });
2863
+ $[25] = t10;
2864
+ $[26] = t11;
2865
+ } else t11 = $[26];
2866
+ let t12;
2867
+ if ($[27] !== labels.nextPage || $[28] !== labels.previousPage) {
2868
+ t12 = (control) => ({ "aria-label": control === "previous" ? labels.previousPage : labels.nextPage });
2869
+ $[27] = labels.nextPage;
2870
+ $[28] = labels.previousPage;
2871
+ $[29] = t12;
2872
+ } else t12 = $[29];
2873
+ let t13;
2874
+ if ($[30] !== onPageChange || $[31] !== safePage || $[32] !== safeTotalPages || $[33] !== t12) {
2875
+ t13 = /* @__PURE__ */ jsx(Pagination, {
2876
+ total: safeTotalPages,
2877
+ value: safePage,
2878
+ onChange: onPageChange,
2879
+ size: "sm",
2880
+ siblings: 1,
2881
+ boundaries: 1,
2882
+ getControlProps: t12
2883
+ });
2884
+ $[30] = onPageChange;
2885
+ $[31] = safePage;
2886
+ $[32] = safeTotalPages;
2887
+ $[33] = t12;
2888
+ $[34] = t13;
2889
+ } else t13 = $[34];
2890
+ let t14;
2891
+ if ($[35] !== t11 || $[36] !== t13) {
2892
+ t14 = /* @__PURE__ */ jsxs(Group, {
1375
2893
  gap: "sm",
1376
2894
  align: "center",
1377
2895
  wrap: "nowrap",
1378
- children: [/* @__PURE__ */ jsx(Text, {
1379
- fz: "xs",
1380
- c: "dimmed",
1381
- children: labels.pageOf({
1382
- page: safePage,
1383
- total: safeTotalPages
1384
- })
1385
- }), /* @__PURE__ */ jsx(Pagination, {
1386
- total: safeTotalPages,
1387
- value: safePage,
1388
- onChange: onPageChange,
1389
- size: "sm",
1390
- siblings: 1,
1391
- boundaries: 1,
1392
- getControlProps: (control) => ({ "aria-label": control === "previous" ? labels.previousPage : labels.nextPage })
1393
- })]
1394
- })]
1395
- });
2896
+ children: [t11, t13]
2897
+ });
2898
+ $[35] = t11;
2899
+ $[36] = t13;
2900
+ $[37] = t14;
2901
+ } else t14 = $[37];
2902
+ let t15;
2903
+ if ($[38] !== t14 || $[39] !== t9) {
2904
+ t15 = /* @__PURE__ */ jsxs(Group, {
2905
+ justify: "space-between",
2906
+ align: "center",
2907
+ wrap: "wrap",
2908
+ gap: "md",
2909
+ pt: "xs",
2910
+ children: [t9, t14]
2911
+ });
2912
+ $[38] = t14;
2913
+ $[39] = t9;
2914
+ $[40] = t15;
2915
+ } else t15 = $[40];
2916
+ return t15;
2917
+ }
2918
+ function _temp$2(n) {
2919
+ return {
2920
+ value: String(n),
2921
+ label: String(n)
2922
+ };
1396
2923
  }
1397
2924
  //#endregion
1398
2925
  //#region src/components/SavedViewsMenu.tsx
2926
+ /** Props for {@link SavedViewsMenu}. */
1399
2927
  /**
1400
2928
  * Saved-views menu: lists every captured view (click a name to apply it, the
1401
2929
  * trailing ✕ to delete it) above a save row that captures the table's
@@ -1403,164 +2931,401 @@ function PaginationFooter({ page, totalPages, limit, total, fromIndex, toIndex,
1403
2931
  * and composes into the `toolbar` slot — or let `<DataTable savedViews>`
1404
2932
  * mount it for you next to the Columns menu.
1405
2933
  */
1406
- function SavedViewsMenu({ views, labels }) {
2934
+ function SavedViewsMenu(t0) {
2935
+ const $ = c(32);
2936
+ const { views, labels } = t0;
1407
2937
  const [name, setName] = useState("");
1408
- const trimmed = name.trim();
1409
- const handleSave = () => {
1410
- views.save(trimmed);
1411
- setName("");
1412
- };
1413
- return /* @__PURE__ */ jsxs(Menu, {
1414
- closeOnItemClick: false,
1415
- position: "bottom-end",
1416
- withinPortal: true,
1417
- children: [/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, {
2938
+ let t1;
2939
+ if ($[0] !== name) {
2940
+ t1 = name.trim();
2941
+ $[0] = name;
2942
+ $[1] = t1;
2943
+ } else t1 = $[1];
2944
+ const trimmed = t1;
2945
+ let t2;
2946
+ if ($[2] !== trimmed || $[3] !== views) {
2947
+ t2 = () => {
2948
+ views.save(trimmed);
2949
+ setName("");
2950
+ };
2951
+ $[2] = trimmed;
2952
+ $[3] = views;
2953
+ $[4] = t2;
2954
+ } else t2 = $[4];
2955
+ const handleSave = t2;
2956
+ let t3;
2957
+ if ($[5] !== labels.savedViews) {
2958
+ t3 = /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, {
1418
2959
  variant: "default",
1419
2960
  size: "sm",
1420
2961
  children: labels.savedViews
1421
- }) }), /* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsxs(Box, {
2962
+ }) });
2963
+ $[5] = labels.savedViews;
2964
+ $[6] = t3;
2965
+ } else t3 = $[6];
2966
+ let t4;
2967
+ if ($[7] !== labels.savedViews) {
2968
+ t4 = /* @__PURE__ */ jsx(Text, {
2969
+ size: "xs",
2970
+ c: "dimmed",
2971
+ fw: 600,
2972
+ tt: "uppercase",
2973
+ px: 4,
2974
+ pb: 6,
2975
+ children: labels.savedViews
2976
+ });
2977
+ $[7] = labels.savedViews;
2978
+ $[8] = t4;
2979
+ } else t4 = $[8];
2980
+ let t5;
2981
+ if ($[9] !== labels.deleteView || $[10] !== views) {
2982
+ t5 = views.views.map((view) => /* @__PURE__ */ jsxs(Group, {
2983
+ gap: 6,
2984
+ px: 4,
2985
+ py: 2,
2986
+ wrap: "nowrap",
2987
+ children: [/* @__PURE__ */ jsx(Button, {
2988
+ variant: "subtle",
2989
+ size: "compact-sm",
2990
+ justify: "flex-start",
2991
+ style: { flex: 1 },
2992
+ onClick: () => views.apply(view.name),
2993
+ children: view.name
2994
+ }), /* @__PURE__ */ jsx(ActionIcon, {
2995
+ variant: "subtle",
2996
+ color: "gray",
2997
+ size: "sm",
2998
+ "aria-label": `${labels.deleteView}: ${view.name}`,
2999
+ onClick: () => views.remove(view.name),
3000
+ children: /* @__PURE__ */ jsx(CloseIcon, { size: 12 })
3001
+ })]
3002
+ }, view.name));
3003
+ $[9] = labels.deleteView;
3004
+ $[10] = views;
3005
+ $[11] = t5;
3006
+ } else t5 = $[11];
3007
+ let t6;
3008
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
3009
+ t6 = /* @__PURE__ */ jsx(Menu.Divider, {});
3010
+ $[12] = t6;
3011
+ } else t6 = $[12];
3012
+ let t7;
3013
+ if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
3014
+ t7 = { flex: 1 };
3015
+ $[13] = t7;
3016
+ } else t7 = $[13];
3017
+ let t8;
3018
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
3019
+ t8 = (e) => setName(e.currentTarget.value);
3020
+ $[14] = t8;
3021
+ } else t8 = $[14];
3022
+ let t9;
3023
+ if ($[15] !== labels.viewName || $[16] !== name) {
3024
+ t9 = /* @__PURE__ */ jsx(TextInput, {
3025
+ size: "xs",
3026
+ style: t7,
3027
+ placeholder: labels.viewName,
3028
+ value: name,
3029
+ onChange: t8
3030
+ });
3031
+ $[15] = labels.viewName;
3032
+ $[16] = name;
3033
+ $[17] = t9;
3034
+ } else t9 = $[17];
3035
+ const t10 = trimmed === "";
3036
+ let t11;
3037
+ if ($[18] !== handleSave || $[19] !== labels.saveView || $[20] !== t10) {
3038
+ t11 = /* @__PURE__ */ jsx(Button, {
3039
+ size: "xs",
3040
+ disabled: t10,
3041
+ onClick: handleSave,
3042
+ children: labels.saveView
3043
+ });
3044
+ $[18] = handleSave;
3045
+ $[19] = labels.saveView;
3046
+ $[20] = t10;
3047
+ $[21] = t11;
3048
+ } else t11 = $[21];
3049
+ let t12;
3050
+ if ($[22] !== t11 || $[23] !== t9) {
3051
+ t12 = /* @__PURE__ */ jsxs(Group, {
3052
+ gap: 6,
3053
+ p: 4,
3054
+ wrap: "nowrap",
3055
+ children: [t9, t11]
3056
+ });
3057
+ $[22] = t11;
3058
+ $[23] = t9;
3059
+ $[24] = t12;
3060
+ } else t12 = $[24];
3061
+ let t13;
3062
+ if ($[25] !== t12 || $[26] !== t4 || $[27] !== t5) {
3063
+ t13 = /* @__PURE__ */ jsx(Menu.Dropdown, { children: /* @__PURE__ */ jsxs(Box, {
1422
3064
  p: 4,
1423
3065
  miw: 220,
1424
3066
  children: [
1425
- /* @__PURE__ */ jsx(Text, {
1426
- size: "xs",
1427
- c: "dimmed",
1428
- fw: 600,
1429
- tt: "uppercase",
1430
- px: 4,
1431
- pb: 6,
1432
- children: labels.savedViews
1433
- }),
1434
- views.views.map((view) => /* @__PURE__ */ jsxs(Group, {
1435
- gap: 6,
1436
- px: 4,
1437
- py: 2,
1438
- wrap: "nowrap",
1439
- children: [/* @__PURE__ */ jsx(Button, {
1440
- variant: "subtle",
1441
- size: "compact-sm",
1442
- justify: "flex-start",
1443
- style: { flex: 1 },
1444
- onClick: () => views.apply(view.name),
1445
- children: view.name
1446
- }), /* @__PURE__ */ jsx(ActionIcon, {
1447
- variant: "subtle",
1448
- color: "gray",
1449
- size: "sm",
1450
- "aria-label": `${labels.deleteView}: ${view.name}`,
1451
- onClick: () => views.remove(view.name),
1452
- children: /* @__PURE__ */ jsx(CloseIcon, { size: 12 })
1453
- })]
1454
- }, view.name)),
1455
- /* @__PURE__ */ jsx(Menu.Divider, {}),
1456
- /* @__PURE__ */ jsxs(Group, {
1457
- gap: 6,
1458
- p: 4,
1459
- wrap: "nowrap",
1460
- children: [/* @__PURE__ */ jsx(TextInput, {
1461
- size: "xs",
1462
- style: { flex: 1 },
1463
- placeholder: labels.viewName,
1464
- value: name,
1465
- onChange: (e) => setName(e.currentTarget.value)
1466
- }), /* @__PURE__ */ jsx(Button, {
1467
- size: "xs",
1468
- disabled: trimmed === "",
1469
- onClick: handleSave,
1470
- children: labels.saveView
1471
- })]
1472
- })
3067
+ t4,
3068
+ t5,
3069
+ t6,
3070
+ t12
1473
3071
  ]
1474
- }) })]
1475
- });
3072
+ }) });
3073
+ $[25] = t12;
3074
+ $[26] = t4;
3075
+ $[27] = t5;
3076
+ $[28] = t13;
3077
+ } else t13 = $[28];
3078
+ let t14;
3079
+ if ($[29] !== t13 || $[30] !== t3) {
3080
+ t14 = /* @__PURE__ */ jsxs(Menu, {
3081
+ closeOnItemClick: false,
3082
+ position: "bottom-end",
3083
+ withinPortal: true,
3084
+ children: [t3, t13]
3085
+ });
3086
+ $[29] = t13;
3087
+ $[30] = t3;
3088
+ $[31] = t14;
3089
+ } else t14 = $[31];
3090
+ return t14;
1476
3091
  }
1477
3092
  //#endregion
1478
3093
  //#region src/components/TableSkeleton.tsx
3094
+ /** Props for {@link TableSkeleton}. */
1479
3095
  /** Loading placeholder that mirrors the table shape to avoid layout shift. */
1480
- function TableSkeleton({ columns, rows = 5, loadingLabel }) {
1481
- const colKeys = Array.from({ length: Math.max(columns, 1) }, (_, i) => i);
1482
- const rowKeys = Array.from({ length: rows }, (_, i) => i);
1483
- return /* @__PURE__ */ jsxs("div", {
1484
- role: "status",
1485
- "aria-busy": "true",
1486
- "aria-live": "polite",
1487
- children: [/* @__PURE__ */ jsxs(Table, { children: [/* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsx(Table.Tr, { children: colKeys.map((c) => /* @__PURE__ */ jsx(Table.Th, { children: /* @__PURE__ */ jsx(Skeleton, {
1488
- height: 12,
1489
- radius: "sm",
1490
- width: c === 0 ? "55%" : "40%"
1491
- }) }, c)) }) }), /* @__PURE__ */ jsx(Table.Tbody, { children: rowKeys.map((r) => /* @__PURE__ */ jsx(Table.Tr, { children: colKeys.map((c) => /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Skeleton, {
1492
- height: 14,
1493
- radius: "sm",
1494
- width: c === 0 ? "70%" : "55%"
1495
- }) }, c)) }, r)) })] }), loadingLabel ? /* @__PURE__ */ jsx(VisuallyHidden, { children: loadingLabel }) : null]
1496
- });
3096
+ function TableSkeleton(t0) {
3097
+ const $ = c(17);
3098
+ const { columns, rows: t1, loadingLabel } = t0;
3099
+ const rows = t1 === void 0 ? 5 : t1;
3100
+ let t2;
3101
+ if ($[0] !== columns) {
3102
+ t2 = Array.from({ length: Math.max(columns, 1) }, _temp$1);
3103
+ $[0] = columns;
3104
+ $[1] = t2;
3105
+ } else t2 = $[1];
3106
+ const colKeys = t2;
3107
+ let t3;
3108
+ if ($[2] !== rows) {
3109
+ t3 = Array.from({ length: rows }, _temp2);
3110
+ $[2] = rows;
3111
+ $[3] = t3;
3112
+ } else t3 = $[3];
3113
+ const rowKeys = t3;
3114
+ let t4;
3115
+ if ($[4] !== colKeys) {
3116
+ t4 = /* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsx(Table.Tr, { children: colKeys.map(_temp3) }) });
3117
+ $[4] = colKeys;
3118
+ $[5] = t4;
3119
+ } else t4 = $[5];
3120
+ let t5;
3121
+ if ($[6] !== colKeys || $[7] !== rowKeys) {
3122
+ t5 = /* @__PURE__ */ jsx(Table.Tbody, { children: rowKeys.map((r) => /* @__PURE__ */ jsx(Table.Tr, { children: colKeys.map(_temp4) }, r)) });
3123
+ $[6] = colKeys;
3124
+ $[7] = rowKeys;
3125
+ $[8] = t5;
3126
+ } else t5 = $[8];
3127
+ let t6;
3128
+ if ($[9] !== t4 || $[10] !== t5) {
3129
+ t6 = /* @__PURE__ */ jsxs(Table, { children: [t4, t5] });
3130
+ $[9] = t4;
3131
+ $[10] = t5;
3132
+ $[11] = t6;
3133
+ } else t6 = $[11];
3134
+ let t7;
3135
+ if ($[12] !== loadingLabel) {
3136
+ t7 = loadingLabel ? /* @__PURE__ */ jsx(VisuallyHidden, { children: loadingLabel }) : null;
3137
+ $[12] = loadingLabel;
3138
+ $[13] = t7;
3139
+ } else t7 = $[13];
3140
+ let t8;
3141
+ if ($[14] !== t6 || $[15] !== t7) {
3142
+ t8 = /* @__PURE__ */ jsxs("div", {
3143
+ role: "status",
3144
+ "aria-busy": "true",
3145
+ "aria-live": "polite",
3146
+ children: [t6, t7]
3147
+ });
3148
+ $[14] = t6;
3149
+ $[15] = t7;
3150
+ $[16] = t8;
3151
+ } else t8 = $[16];
3152
+ return t8;
3153
+ }
3154
+ function _temp4(c_0) {
3155
+ return /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Skeleton, {
3156
+ height: 14,
3157
+ radius: "sm",
3158
+ width: c_0 === 0 ? "70%" : "55%"
3159
+ }) }, c_0);
3160
+ }
3161
+ function _temp3(c) {
3162
+ return /* @__PURE__ */ jsx(Table.Th, { children: /* @__PURE__ */ jsx(Skeleton, {
3163
+ height: 12,
3164
+ radius: "sm",
3165
+ width: c === 0 ? "55%" : "40%"
3166
+ }) }, c);
3167
+ }
3168
+ function _temp2(__0, i_0) {
3169
+ return i_0;
3170
+ }
3171
+ function _temp$1(_, i) {
3172
+ return i;
1497
3173
  }
1498
3174
  //#endregion
1499
3175
  //#region src/components/FilterPopover.tsx
3176
+ /** Props for {@link FilterPopover}. */
1500
3177
  /**
1501
3178
  * Anchored filter card (the default filter container). Opens under the Filters
1502
3179
  * button and tracks it on scroll. No backdrop — the background stays visible
1503
3180
  * and interactive; clicking outside or pressing Escape closes it. Pair with
1504
3181
  * `filtersMode="drawer"` for the slide-in panel instead.
1505
3182
  */
1506
- function FilterPopover({ open, onClose, filters, activeFilterCount, onClearFilters, labels, dir = "ltr", children }) {
1507
- return /* @__PURE__ */ jsxs(Popover, {
1508
- opened: open,
1509
- onDismiss: onClose,
1510
- position: dir === "rtl" ? "bottom-start" : "bottom-end",
1511
- withinPortal: true,
1512
- shadow: "md",
1513
- radius: "md",
1514
- width: 340,
1515
- children: [/* @__PURE__ */ jsx(Popover.Target, { children }), /* @__PURE__ */ jsxs(Popover.Dropdown, { children: [/* @__PURE__ */ jsxs(Group, {
3183
+ function FilterPopover(t0) {
3184
+ const $ = c(22);
3185
+ const { open, onClose, filters, activeFilterCount, onClearFilters, labels, dir: t1, children } = t0;
3186
+ const t2 = (t1 === void 0 ? "ltr" : t1) === "rtl" ? "bottom-start" : "bottom-end";
3187
+ let t3;
3188
+ if ($[0] !== children) {
3189
+ t3 = /* @__PURE__ */ jsx(Popover.Target, { children });
3190
+ $[0] = children;
3191
+ $[1] = t3;
3192
+ } else t3 = $[1];
3193
+ let t4;
3194
+ if ($[2] !== labels.filters) {
3195
+ t4 = /* @__PURE__ */ jsx(Text, {
3196
+ fw: 600,
3197
+ fz: "sm",
3198
+ children: labels.filters
3199
+ });
3200
+ $[2] = labels.filters;
3201
+ $[3] = t4;
3202
+ } else t4 = $[3];
3203
+ const t5 = activeFilterCount === 0;
3204
+ let t6;
3205
+ if ($[4] !== labels.clearAll || $[5] !== onClearFilters || $[6] !== t5) {
3206
+ t6 = /* @__PURE__ */ jsx(Button, {
3207
+ variant: "subtle",
3208
+ size: "compact-xs",
3209
+ onClick: onClearFilters,
3210
+ disabled: t5,
3211
+ children: labels.clearAll
3212
+ });
3213
+ $[4] = labels.clearAll;
3214
+ $[5] = onClearFilters;
3215
+ $[6] = t5;
3216
+ $[7] = t6;
3217
+ } else t6 = $[7];
3218
+ let t7;
3219
+ if ($[8] !== t4 || $[9] !== t6) {
3220
+ t7 = /* @__PURE__ */ jsxs(Group, {
1516
3221
  justify: "space-between",
1517
3222
  align: "center",
1518
3223
  mb: "sm",
1519
- children: [/* @__PURE__ */ jsx(Text, {
1520
- fw: 600,
1521
- fz: "sm",
1522
- children: labels.filters
1523
- }), /* @__PURE__ */ jsx(Button, {
1524
- variant: "subtle",
1525
- size: "compact-xs",
1526
- onClick: onClearFilters,
1527
- disabled: activeFilterCount === 0,
1528
- children: labels.clearAll
1529
- })]
1530
- }), /* @__PURE__ */ jsx(Stack, {
3224
+ children: [t4, t6]
3225
+ });
3226
+ $[8] = t4;
3227
+ $[9] = t6;
3228
+ $[10] = t7;
3229
+ } else t7 = $[10];
3230
+ let t8;
3231
+ if ($[11] !== filters) {
3232
+ t8 = /* @__PURE__ */ jsx(Stack, {
1531
3233
  gap: "md",
1532
3234
  children: filters
1533
- })] })]
1534
- });
3235
+ });
3236
+ $[11] = filters;
3237
+ $[12] = t8;
3238
+ } else t8 = $[12];
3239
+ let t9;
3240
+ if ($[13] !== t7 || $[14] !== t8) {
3241
+ t9 = /* @__PURE__ */ jsxs(Popover.Dropdown, { children: [t7, t8] });
3242
+ $[13] = t7;
3243
+ $[14] = t8;
3244
+ $[15] = t9;
3245
+ } else t9 = $[15];
3246
+ let t10;
3247
+ if ($[16] !== onClose || $[17] !== open || $[18] !== t2 || $[19] !== t3 || $[20] !== t9) {
3248
+ t10 = /* @__PURE__ */ jsxs(Popover, {
3249
+ opened: open,
3250
+ onDismiss: onClose,
3251
+ position: t2,
3252
+ withinPortal: true,
3253
+ shadow: "md",
3254
+ radius: "md",
3255
+ width: 340,
3256
+ children: [t3, t9]
3257
+ });
3258
+ $[16] = onClose;
3259
+ $[17] = open;
3260
+ $[18] = t2;
3261
+ $[19] = t3;
3262
+ $[20] = t9;
3263
+ $[21] = t10;
3264
+ } else t10 = $[21];
3265
+ return t10;
1535
3266
  }
1536
3267
  //#endregion
1537
3268
  //#region src/components/Toolbar.tsx
3269
+ /**
3270
+ * Props for {@link Toolbar}: the shared chrome surface from core plus the
3271
+ * Mantine-specific filter-container wiring.
3272
+ */
1538
3273
  /** Sticky toolbar: search, optional sort select, custom slot, filters, size. */
1539
- function Toolbar({ table, hideSearch, searchPlaceholder, sortByOptions, customToolbar, hasFilters, activeFilterCount, onToggleFilters, onFiltersTriggerPointerDown, onCloseFilters, filtersOpen, filtersMode, filters, onClearFilters, dir, columnMenu, showRowsPerPage, className }) {
3274
+ function Toolbar(t0) {
3275
+ const $ = c(45);
3276
+ const { table, hideSearch, searchPlaceholder, sortByOptions, customToolbar, hasFilters, activeFilterCount, onToggleFilters, onFiltersTriggerPointerDown, onCloseFilters, filtersOpen, filtersMode, filters, onClearFilters, dir, columnMenu, showRowsPerPage, className } = t0;
1540
3277
  const { labels, source } = table;
1541
- const searchProps = table.getSearchInputProps(searchPlaceholder ? { placeholder: searchPlaceholder } : void 0);
3278
+ let t1;
3279
+ if ($[0] !== searchPlaceholder || $[1] !== table) {
3280
+ t1 = table.getSearchInputProps(searchPlaceholder ? { placeholder: searchPlaceholder } : void 0);
3281
+ $[0] = searchPlaceholder;
3282
+ $[1] = table;
3283
+ $[2] = t1;
3284
+ } else t1 = $[2];
3285
+ const searchProps = t1;
1542
3286
  const sortOptions = sortByOptions ?? (table.isMobile ? table.sortByOptions : void 0);
1543
- const filtersButton = /* @__PURE__ */ jsx(Button, {
1544
- variant: "default",
1545
- size: "sm",
1546
- "aria-expanded": filtersMode === "popover" ? filtersOpen : void 0,
1547
- "data-active": filtersOpen || void 0,
1548
- leftSection: /* @__PURE__ */ jsx(FiltersIcon, { size: 16 }),
1549
- rightSection: activeFilterCount > 0 ? /* @__PURE__ */ jsx(Badge, {
3287
+ const t2 = filtersMode === "popover" ? filtersOpen : void 0;
3288
+ const t3 = filtersOpen || void 0;
3289
+ let t4;
3290
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
3291
+ t4 = /* @__PURE__ */ jsx(FiltersIcon, { size: 16 });
3292
+ $[3] = t4;
3293
+ } else t4 = $[3];
3294
+ let t5;
3295
+ if ($[4] !== activeFilterCount) {
3296
+ t5 = activeFilterCount > 0 ? /* @__PURE__ */ jsx(Badge, {
1550
3297
  size: "sm",
1551
3298
  circle: true,
1552
3299
  children: activeFilterCount
1553
- }) : void 0,
1554
- onPointerDown: onFiltersTriggerPointerDown,
1555
- onClick: onToggleFilters,
1556
- children: labels.filters
1557
- });
1558
- return /* @__PURE__ */ jsxs(Group, {
1559
- gap: "sm",
1560
- justify: "space-between",
1561
- align: "center",
1562
- className,
1563
- children: [!hideSearch && /* @__PURE__ */ jsx(TextInput, {
3300
+ }) : void 0;
3301
+ $[4] = activeFilterCount;
3302
+ $[5] = t5;
3303
+ } else t5 = $[5];
3304
+ let t6;
3305
+ if ($[6] !== labels.filters || $[7] !== onFiltersTriggerPointerDown || $[8] !== onToggleFilters || $[9] !== t2 || $[10] !== t3 || $[11] !== t5) {
3306
+ t6 = /* @__PURE__ */ jsx(Button, {
3307
+ variant: "default",
3308
+ size: "sm",
3309
+ "aria-expanded": t2,
3310
+ "data-active": t3,
3311
+ leftSection: t4,
3312
+ rightSection: t5,
3313
+ onPointerDown: onFiltersTriggerPointerDown,
3314
+ onClick: onToggleFilters,
3315
+ children: labels.filters
3316
+ });
3317
+ $[6] = labels.filters;
3318
+ $[7] = onFiltersTriggerPointerDown;
3319
+ $[8] = onToggleFilters;
3320
+ $[9] = t2;
3321
+ $[10] = t3;
3322
+ $[11] = t5;
3323
+ $[12] = t6;
3324
+ } else t6 = $[12];
3325
+ const filtersButton = t6;
3326
+ let t7;
3327
+ if ($[13] !== hideSearch || $[14] !== searchProps) {
3328
+ t7 = !hideSearch && /* @__PURE__ */ jsx(TextInput, {
1564
3329
  ...searchProps,
1565
3330
  leftSection: /* @__PURE__ */ jsx(SearchIcon, { size: 14 }),
1566
3331
  size: "sm",
@@ -1569,57 +3334,119 @@ function Toolbar({ table, hideSearch, searchPlaceholder, sortByOptions, customTo
1569
3334
  minWidth: 160,
1570
3335
  maxWidth: 360
1571
3336
  }
1572
- }), /* @__PURE__ */ jsxs(Group, {
3337
+ });
3338
+ $[13] = hideSearch;
3339
+ $[14] = searchProps;
3340
+ $[15] = t7;
3341
+ } else t7 = $[15];
3342
+ let t8;
3343
+ if ($[16] !== labels.sortBy || $[17] !== sortOptions || $[18] !== source) {
3344
+ t8 = sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsx(Select, {
3345
+ "aria-label": labels.sortBy,
3346
+ placeholder: labels.sortBy,
3347
+ data: sortOptions,
3348
+ value: source.sortBy ?? null,
3349
+ onChange: (v) => source.setSort(v ?? void 0, source.sortDir ?? "asc"),
3350
+ clearable: true,
3351
+ size: "sm",
3352
+ w: 160,
3353
+ comboboxProps: { withinPortal: false }
3354
+ });
3355
+ $[16] = labels.sortBy;
3356
+ $[17] = sortOptions;
3357
+ $[18] = source;
3358
+ $[19] = t8;
3359
+ } else t8 = $[19];
3360
+ let t9;
3361
+ if ($[20] !== activeFilterCount || $[21] !== dir || $[22] !== filters || $[23] !== filtersButton || $[24] !== filtersMode || $[25] !== filtersOpen || $[26] !== hasFilters || $[27] !== labels || $[28] !== onClearFilters || $[29] !== onCloseFilters) {
3362
+ t9 = hasFilters && (filtersMode === "popover" ? /* @__PURE__ */ jsx(FilterPopover, {
3363
+ open: filtersOpen,
3364
+ onClose: onCloseFilters,
3365
+ filters,
3366
+ activeFilterCount,
3367
+ onClearFilters,
3368
+ labels,
3369
+ dir,
3370
+ children: filtersButton
3371
+ }) : filtersButton);
3372
+ $[20] = activeFilterCount;
3373
+ $[21] = dir;
3374
+ $[22] = filters;
3375
+ $[23] = filtersButton;
3376
+ $[24] = filtersMode;
3377
+ $[25] = filtersOpen;
3378
+ $[26] = hasFilters;
3379
+ $[27] = labels;
3380
+ $[28] = onClearFilters;
3381
+ $[29] = onCloseFilters;
3382
+ $[30] = t9;
3383
+ } else t9 = $[30];
3384
+ let t10;
3385
+ if ($[31] !== labels.rowsPerPage || $[32] !== showRowsPerPage || $[33] !== source) {
3386
+ t10 = showRowsPerPage && /* @__PURE__ */ jsxs(Group, {
3387
+ gap: "xs",
3388
+ align: "center",
3389
+ children: [/* @__PURE__ */ jsx(Text, {
3390
+ fz: "xs",
3391
+ c: "dimmed",
3392
+ children: labels.rowsPerPage
3393
+ }), /* @__PURE__ */ jsx(Select, {
3394
+ "aria-label": labels.rowsPerPage,
3395
+ data: pageSizeOptions(source.limit).map(_temp),
3396
+ value: String(source.limit),
3397
+ onChange: (v_0) => source.setLimit(Number(v_0)),
3398
+ size: "sm",
3399
+ w: 80,
3400
+ allowDeselect: false,
3401
+ comboboxProps: { withinPortal: false }
3402
+ })]
3403
+ });
3404
+ $[31] = labels.rowsPerPage;
3405
+ $[32] = showRowsPerPage;
3406
+ $[33] = source;
3407
+ $[34] = t10;
3408
+ } else t10 = $[34];
3409
+ let t11;
3410
+ if ($[35] !== columnMenu || $[36] !== customToolbar || $[37] !== t10 || $[38] !== t8 || $[39] !== t9) {
3411
+ t11 = /* @__PURE__ */ jsxs(Group, {
1573
3412
  gap: "xs",
1574
3413
  align: "center",
1575
3414
  children: [
1576
- sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsx(Select, {
1577
- "aria-label": labels.sortBy,
1578
- placeholder: labels.sortBy,
1579
- data: sortOptions,
1580
- value: source.sortBy ?? null,
1581
- onChange: (v) => source.setSort(v ?? void 0, source.sortDir ?? "asc"),
1582
- clearable: true,
1583
- size: "sm",
1584
- w: 160,
1585
- comboboxProps: { withinPortal: false }
1586
- }),
3415
+ t8,
1587
3416
  customToolbar,
1588
- hasFilters && (filtersMode === "popover" ? /* @__PURE__ */ jsx(FilterPopover, {
1589
- open: filtersOpen,
1590
- onClose: onCloseFilters,
1591
- filters,
1592
- activeFilterCount,
1593
- onClearFilters,
1594
- labels,
1595
- dir,
1596
- children: filtersButton
1597
- }) : filtersButton),
3417
+ t9,
1598
3418
  columnMenu,
1599
- showRowsPerPage && /* @__PURE__ */ jsxs(Group, {
1600
- gap: "xs",
1601
- align: "center",
1602
- children: [/* @__PURE__ */ jsx(Text, {
1603
- fz: "xs",
1604
- c: "dimmed",
1605
- children: labels.rowsPerPage
1606
- }), /* @__PURE__ */ jsx(Select, {
1607
- "aria-label": labels.rowsPerPage,
1608
- data: pageSizeOptions(source.limit).map((n) => ({
1609
- value: String(n),
1610
- label: String(n)
1611
- })),
1612
- value: String(source.limit),
1613
- onChange: (v) => source.setLimit(Number(v)),
1614
- size: "sm",
1615
- w: 80,
1616
- allowDeselect: false,
1617
- comboboxProps: { withinPortal: false }
1618
- })]
1619
- })
3419
+ t10
1620
3420
  ]
1621
- })]
1622
- });
3421
+ });
3422
+ $[35] = columnMenu;
3423
+ $[36] = customToolbar;
3424
+ $[37] = t10;
3425
+ $[38] = t8;
3426
+ $[39] = t9;
3427
+ $[40] = t11;
3428
+ } else t11 = $[40];
3429
+ let t12;
3430
+ if ($[41] !== className || $[42] !== t11 || $[43] !== t7) {
3431
+ t12 = /* @__PURE__ */ jsxs(Group, {
3432
+ gap: "sm",
3433
+ justify: "space-between",
3434
+ align: "center",
3435
+ className,
3436
+ children: [t7, t11]
3437
+ });
3438
+ $[41] = className;
3439
+ $[42] = t11;
3440
+ $[43] = t7;
3441
+ $[44] = t12;
3442
+ } else t12 = $[44];
3443
+ return t12;
3444
+ }
3445
+ function _temp(n) {
3446
+ return {
3447
+ value: String(n),
3448
+ label: String(n)
3449
+ };
1623
3450
  }
1624
3451
  //#endregion
1625
3452
  //#region src/DataTable.tsx
@@ -1631,19 +3458,47 @@ const stickyToolbarStyle = (top) => ({
1631
3458
  paddingBottom: "var(--mantine-spacing-xs)"
1632
3459
  });
1633
3460
  /** The Columns menu, rendered inline in the toolbar — or nothing when off. */
1634
- function ColumnMenuSlot({ enabled, ...props }) {
3461
+ function ColumnMenuSlot(t0) {
3462
+ const $ = c(5);
3463
+ let enabled;
3464
+ let props;
3465
+ if ($[0] !== t0) {
3466
+ ({enabled, ...props} = t0);
3467
+ $[0] = t0;
3468
+ $[1] = enabled;
3469
+ $[2] = props;
3470
+ } else {
3471
+ enabled = $[1];
3472
+ props = $[2];
3473
+ }
1635
3474
  if (!enabled) return null;
1636
- return /* @__PURE__ */ jsx(ColumnMenu, { ...props });
3475
+ let t1;
3476
+ if ($[3] !== props) {
3477
+ t1 = /* @__PURE__ */ jsx(ColumnMenu, { ...props });
3478
+ $[3] = props;
3479
+ $[4] = t1;
3480
+ } else t1 = $[4];
3481
+ return t1;
1637
3482
  }
1638
3483
  /**
1639
3484
  * The Saved-views menu in the toolbar. A component (not inline JSX) so
1640
3485
  * `useSavedViews` only runs when the `savedViews` prop is set.
1641
3486
  */
1642
- function SavedViewsSlot({ options, labels }) {
1643
- return /* @__PURE__ */ jsx(SavedViewsMenu, {
1644
- views: useSavedViews$1(options),
1645
- labels
1646
- });
3487
+ function SavedViewsSlot(t0) {
3488
+ const $ = c(3);
3489
+ const { options, labels } = t0;
3490
+ const views = useSavedViews$1(options);
3491
+ let t1;
3492
+ if ($[0] !== labels || $[1] !== views) {
3493
+ t1 = /* @__PURE__ */ jsx(SavedViewsMenu, {
3494
+ views,
3495
+ labels
3496
+ });
3497
+ $[0] = labels;
3498
+ $[1] = views;
3499
+ $[2] = t1;
3500
+ } else t1 = $[2];
3501
+ return t1;
1647
3502
  }
1648
3503
  /**
1649
3504
  * Resolve the data tier (source ▸ server ▸ frontend) and the declarative
@@ -1653,37 +3508,86 @@ function SavedViewsSlot({ options, labels }) {
1653
3508
  * per key). Everything downstream consumes these.
1654
3509
  */
1655
3510
  function useResolvedTableProps(props) {
1656
- const { source, runtime } = useTableData({
1657
- locale: props.locale,
1658
- source: props.source,
1659
- data: props.data,
1660
- total: props.total,
1661
- loading: props.loading,
1662
- onQueryChange: props.onQueryChange,
1663
- columns: props.columns,
1664
- filters: props.filters,
1665
- urlKey: props.urlKey,
1666
- adapter: props.urlSync === false ? void 0 : props.urlAdapter,
1667
- enabled: props.urlSync
1668
- });
1669
- const labels = useMemo(() => resolveLabels(props.labels), [props.labels]);
3511
+ const $ = c(26);
3512
+ const t0 = props.urlSync === false ? void 0 : props.urlAdapter;
3513
+ let t1;
3514
+ if ($[0] !== props.columns || $[1] !== props.data || $[2] !== props.filters || $[3] !== props.loading || $[4] !== props.locale || $[5] !== props.onQueryChange || $[6] !== props.source || $[7] !== props.total || $[8] !== props.urlKey || $[9] !== props.urlSync || $[10] !== t0) {
3515
+ t1 = {
3516
+ locale: props.locale,
3517
+ source: props.source,
3518
+ data: props.data,
3519
+ total: props.total,
3520
+ loading: props.loading,
3521
+ onQueryChange: props.onQueryChange,
3522
+ columns: props.columns,
3523
+ filters: props.filters,
3524
+ urlKey: props.urlKey,
3525
+ adapter: t0,
3526
+ enabled: props.urlSync
3527
+ };
3528
+ $[0] = props.columns;
3529
+ $[1] = props.data;
3530
+ $[2] = props.filters;
3531
+ $[3] = props.loading;
3532
+ $[4] = props.locale;
3533
+ $[5] = props.onQueryChange;
3534
+ $[6] = props.source;
3535
+ $[7] = props.total;
3536
+ $[8] = props.urlKey;
3537
+ $[9] = props.urlSync;
3538
+ $[10] = t0;
3539
+ $[11] = t1;
3540
+ } else t1 = $[11];
3541
+ const { source, runtime } = useTableData(t1);
3542
+ let t2;
3543
+ if ($[12] !== props.labels) {
3544
+ t2 = resolveLabels(props.labels);
3545
+ $[12] = props.labels;
3546
+ $[13] = t2;
3547
+ } else t2 = $[13];
3548
+ const labels = t2;
1670
3549
  let filters;
1671
- if (isDeclarativeFilters(props.filters) || props.filters === void 0) filters = runtime.defs.length > 0 ? /* @__PURE__ */ jsx(AutoFilterForm, {
1672
- defs: runtime.defs,
1673
- source,
1674
- labels
1675
- }) : void 0;
1676
- else filters = props.filters;
1677
- const filterLabels = useMemo(() => ({
1678
- ...runtime.filterLabels,
1679
- ...props.filterLabels
1680
- }), [runtime.filterLabels, props.filterLabels]);
1681
- return {
1682
- ...props,
1683
- source,
1684
- filters,
1685
- filterLabels
1686
- };
3550
+ if (isDeclarativeFilters(props.filters) || props.filters === void 0) {
3551
+ let t3;
3552
+ if ($[14] !== labels || $[15] !== runtime.defs || $[16] !== source) {
3553
+ t3 = runtime.defs.length > 0 ? /* @__PURE__ */ jsx(AutoFilterForm, {
3554
+ defs: runtime.defs,
3555
+ source,
3556
+ labels
3557
+ }) : void 0;
3558
+ $[14] = labels;
3559
+ $[15] = runtime.defs;
3560
+ $[16] = source;
3561
+ $[17] = t3;
3562
+ } else t3 = $[17];
3563
+ filters = t3;
3564
+ } else filters = props.filters;
3565
+ let t3;
3566
+ if ($[18] !== props.filterLabels || $[19] !== runtime.filterLabels) {
3567
+ t3 = {
3568
+ ...runtime.filterLabels,
3569
+ ...props.filterLabels
3570
+ };
3571
+ $[18] = props.filterLabels;
3572
+ $[19] = runtime.filterLabels;
3573
+ $[20] = t3;
3574
+ } else t3 = $[20];
3575
+ const filterLabels = t3;
3576
+ let t4;
3577
+ if ($[21] !== filterLabels || $[22] !== filters || $[23] !== props || $[24] !== source) {
3578
+ t4 = {
3579
+ ...props,
3580
+ source,
3581
+ filters,
3582
+ filterLabels
3583
+ };
3584
+ $[21] = filterLabels;
3585
+ $[22] = filters;
3586
+ $[23] = props;
3587
+ $[24] = source;
3588
+ $[25] = t4;
3589
+ } else t4 = $[25];
3590
+ return t4;
1687
3591
  }
1688
3592
  /**
1689
3593
  * Batteries-included Mantine data table. Drop in `columns`, a `rowKey`,
@@ -1695,13 +3599,26 @@ function useResolvedTableProps(props) {
1695
3599
  * @typeParam TRow - The row type.
1696
3600
  */
1697
3601
  function DataTable(props) {
3602
+ const $ = c(161);
1698
3603
  const chromeProps = useResolvedTableProps(props);
1699
- const { source, rowActions, searchPlaceholder, sortByOptions, dir, prefetch, hideSearch, filters, filtersMode = "popover", bulkActions, slots, classNames, toolbar: customToolbar, skeletonRows, stickyTop = 0, animate = false, stickyHeader = false, enableColumnMenu = false, savedViews } = chromeProps;
3604
+ const { source, rowActions, searchPlaceholder, sortByOptions, dir, prefetch, hideSearch, filters, filtersMode: t0, bulkActions, slots, classNames, toolbar: customToolbar, skeletonRows, stickyTop: t1, animate: t2, stickyHeader: t3, enableColumnMenu: t4, savedViews } = chromeProps;
3605
+ const filtersMode = t0 === void 0 ? "popover" : t0;
3606
+ const stickyTop = t1 === void 0 ? 0 : t1;
3607
+ const animate = t2 === void 0 ? false : t2;
3608
+ const stickyHeader = t3 === void 0 ? false : t3;
3609
+ const enableColumnMenu = t4 === void 0 ? false : t4;
1700
3610
  const density = chromeProps.density ?? "comfortable";
1701
3611
  const chrome = useTableChrome(chromeProps);
1702
3612
  const { table, isMobile, confirm, getRowId } = chrome;
1703
3613
  const hasRowActions = (rowActions?.length ?? 0) > 0;
1704
- const visibleRowActions = chrome.columnLayout.isHidden(ACTIONS_COLUMN_KEY) ? void 0 : rowActions;
3614
+ let t5;
3615
+ if ($[0] !== chrome.columnLayout || $[1] !== rowActions) {
3616
+ t5 = chrome.columnLayout.isHidden(ACTIONS_COLUMN_KEY) ? void 0 : rowActions;
3617
+ $[0] = chrome.columnLayout;
3618
+ $[1] = rowActions;
3619
+ $[2] = t5;
3620
+ } else t5 = $[2];
3621
+ const visibleRowActions = t5;
1705
3622
  const actionsPinned = chrome.columnLayout.state.pinned[ACTIONS_COLUMN_KEY] === "right";
1706
3623
  const { virtualization, loadMoreRef, canLoadMore, virtualScrollRef } = useChromeBodyData(chrome, chromeProps);
1707
3624
  const [drawerOpened, setDrawerOpened] = useState(false);
@@ -1711,179 +3628,420 @@ function DataTable(props) {
1711
3628
  const desktopBodyRef = useRef(null);
1712
3629
  const mobileBodyRef = useRef(null);
1713
3630
  useChromeScrollReset(rootRef, chrome, chromeProps);
1714
- useMountStagger(isMobile ? mobileBodyRef : desktopBodyRef, [virtualization.rows.length, isMobile], { enabled: animate });
3631
+ let t6;
3632
+ if ($[3] !== isMobile || $[4] !== virtualization.rows.length) {
3633
+ t6 = [virtualization.rows.length, isMobile];
3634
+ $[3] = isMobile;
3635
+ $[4] = virtualization.rows.length;
3636
+ $[5] = t6;
3637
+ } else t6 = $[5];
3638
+ let t7;
3639
+ if ($[6] !== animate) {
3640
+ t7 = { enabled: animate };
3641
+ $[6] = animate;
3642
+ $[7] = t7;
3643
+ } else t7 = $[7];
3644
+ useMountStagger(isMobile ? mobileBodyRef : desktopBodyRef, t6, t7);
1715
3645
  let body;
1716
- if (chrome.body === "skeleton") body = slots?.skeleton ?? /* @__PURE__ */ jsx(TableSkeleton, {
1717
- columns: table.columns.length || 1,
1718
- rows: skeletonRows ?? source.limit,
1719
- loadingLabel: table.labels.loading
1720
- });
1721
- else if (chrome.body === "empty") body = slots?.empty ?? (chrome.emptyVariant === "noResults" ? /* @__PURE__ */ jsx(EmptyState, {
1722
- title: table.labels.noResults,
1723
- action: /* @__PURE__ */ jsx(Button, {
1724
- variant: "light",
1725
- size: "sm",
1726
- onClick: chrome.clearFilters,
1727
- children: table.labels.clearAll
1728
- })
1729
- }) : /* @__PURE__ */ jsx(EmptyState, { title: table.labels.noData }));
1730
- else if (chrome.body === "mobile") body = /* @__PURE__ */ jsx(MobileCards, {
1731
- table,
1732
- rows: source.rows,
1733
- rowActions: visibleRowActions,
1734
- confirm,
1735
- getRowId,
1736
- onRowClick: props.onRowClick,
1737
- rowClassName: props.rowClassName,
1738
- renderRowDetail: props.renderRowDetail,
1739
- summaryRow: props.summaryRow,
1740
- expansion: chrome.detail?.expansion,
1741
- bodyRef: mobileBodyRef,
1742
- className: classNames?.card,
1743
- rowEntries: virtualization.enabled ? virtualization.rows : void 0,
1744
- paddingTop: virtualization.paddingTop,
1745
- paddingBottom: virtualization.paddingBottom,
1746
- measureElement: virtualization.measureElement,
1747
- density
1748
- });
1749
- else body = /* @__PURE__ */ jsx(DesktopTable, {
1750
- table,
1751
- rows: source.rows,
1752
- rowActions: visibleRowActions,
1753
- confirm,
1754
- prefetch,
1755
- onRowClick: props.onRowClick,
1756
- rowClassName: props.rowClassName,
1757
- renderRowDetail: props.renderRowDetail,
1758
- summaryRow: props.summaryRow,
1759
- expansion: chrome.detail?.expansion,
1760
- getRowId,
1761
- bodyRef: desktopBodyRef,
1762
- className: classNames?.table,
1763
- rowEntries: virtualization.enabled ? virtualization.rows : void 0,
1764
- paddingTop: virtualization.paddingTop,
1765
- paddingBottom: virtualization.paddingBottom,
1766
- measureElement: virtualization.measureElement,
1767
- stickyHeaderOffset: stickyTop + toolbarHeight,
1768
- stickyHeader,
1769
- pinOffset: chrome.columnLayout.pinOffset,
1770
- actionsPinned,
1771
- maxHeight: props.maxHeight,
1772
- virtualScrollRef,
1773
- setWidth: props.resizableColumns ? chrome.columnLayout.setWidth : void 0,
1774
- columnWidths: chrome.columnLayout.state.widths,
1775
- resizeLabel: table.labels.resizeColumn,
1776
- density
1777
- });
1778
- return /* @__PURE__ */ jsxs(Paper, {
1779
- ref: rootRef,
1780
- p: "xs",
1781
- radius: "md",
1782
- withBorder: true,
1783
- dir,
1784
- "aria-busy": chrome.isRefreshing || void 0,
1785
- className: classNames?.root,
1786
- children: [/* @__PURE__ */ jsxs(Stack, {
3646
+ if (chrome.body === "skeleton") {
3647
+ let t8;
3648
+ if ($[8] !== skeletonRows || $[9] !== slots?.skeleton || $[10] !== source.limit || $[11] !== table.columns || $[12] !== table.labels.loading) {
3649
+ t8 = slots?.skeleton ?? /* @__PURE__ */ jsx(TableSkeleton, {
3650
+ columns: table.columns.length || 1,
3651
+ rows: skeletonRows ?? source.limit,
3652
+ loadingLabel: table.labels.loading
3653
+ });
3654
+ $[8] = skeletonRows;
3655
+ $[9] = slots?.skeleton;
3656
+ $[10] = source.limit;
3657
+ $[11] = table.columns;
3658
+ $[12] = table.labels.loading;
3659
+ $[13] = t8;
3660
+ } else t8 = $[13];
3661
+ body = t8;
3662
+ } else if (chrome.body === "empty") {
3663
+ let t8;
3664
+ if ($[14] !== chrome.clearFilters || $[15] !== chrome.emptyVariant || $[16] !== slots?.empty || $[17] !== table.labels.clearAll || $[18] !== table.labels.noData || $[19] !== table.labels.noResults) {
3665
+ t8 = slots?.empty ?? (chrome.emptyVariant === "noResults" ? /* @__PURE__ */ jsx(EmptyState, {
3666
+ title: table.labels.noResults,
3667
+ action: /* @__PURE__ */ jsx(Button, {
3668
+ variant: "light",
3669
+ size: "sm",
3670
+ onClick: chrome.clearFilters,
3671
+ children: table.labels.clearAll
3672
+ })
3673
+ }) : /* @__PURE__ */ jsx(EmptyState, { title: table.labels.noData }));
3674
+ $[14] = chrome.clearFilters;
3675
+ $[15] = chrome.emptyVariant;
3676
+ $[16] = slots?.empty;
3677
+ $[17] = table.labels.clearAll;
3678
+ $[18] = table.labels.noData;
3679
+ $[19] = table.labels.noResults;
3680
+ $[20] = t8;
3681
+ } else t8 = $[20];
3682
+ body = t8;
3683
+ } else if (chrome.body === "mobile") {
3684
+ const t8 = chrome.detail?.expansion;
3685
+ const t9 = classNames?.card;
3686
+ const t10 = virtualization.enabled ? virtualization.rows : void 0;
3687
+ let t11;
3688
+ if ($[21] !== confirm || $[22] !== density || $[23] !== getRowId || $[24] !== props.onRowClick || $[25] !== props.renderRowDetail || $[26] !== props.rowClassName || $[27] !== props.summaryRow || $[28] !== source.rows || $[29] !== t10 || $[30] !== t8 || $[31] !== t9 || $[32] !== table || $[33] !== virtualization.measureElement || $[34] !== virtualization.paddingBottom || $[35] !== virtualization.paddingTop || $[36] !== visibleRowActions) {
3689
+ t11 = /* @__PURE__ */ jsx(MobileCards, {
3690
+ table,
3691
+ rows: source.rows,
3692
+ rowActions: visibleRowActions,
3693
+ confirm,
3694
+ getRowId,
3695
+ onRowClick: props.onRowClick,
3696
+ rowClassName: props.rowClassName,
3697
+ renderRowDetail: props.renderRowDetail,
3698
+ summaryRow: props.summaryRow,
3699
+ expansion: t8,
3700
+ bodyRef: mobileBodyRef,
3701
+ className: t9,
3702
+ rowEntries: t10,
3703
+ paddingTop: virtualization.paddingTop,
3704
+ paddingBottom: virtualization.paddingBottom,
3705
+ measureElement: virtualization.measureElement,
3706
+ density
3707
+ });
3708
+ $[21] = confirm;
3709
+ $[22] = density;
3710
+ $[23] = getRowId;
3711
+ $[24] = props.onRowClick;
3712
+ $[25] = props.renderRowDetail;
3713
+ $[26] = props.rowClassName;
3714
+ $[27] = props.summaryRow;
3715
+ $[28] = source.rows;
3716
+ $[29] = t10;
3717
+ $[30] = t8;
3718
+ $[31] = t9;
3719
+ $[32] = table;
3720
+ $[33] = virtualization.measureElement;
3721
+ $[34] = virtualization.paddingBottom;
3722
+ $[35] = virtualization.paddingTop;
3723
+ $[36] = visibleRowActions;
3724
+ $[37] = t11;
3725
+ } else t11 = $[37];
3726
+ body = t11;
3727
+ } else {
3728
+ const t8 = chrome.detail?.expansion;
3729
+ const t9 = classNames?.table;
3730
+ const t10 = virtualization.enabled ? virtualization.rows : void 0;
3731
+ const t11 = stickyTop + toolbarHeight;
3732
+ const t12 = props.resizableColumns ? chrome.columnLayout.setWidth : void 0;
3733
+ let t13;
3734
+ if ($[38] !== actionsPinned || $[39] !== chrome.columnLayout.pinOffset || $[40] !== chrome.columnLayout.state.widths || $[41] !== confirm || $[42] !== density || $[43] !== getRowId || $[44] !== prefetch || $[45] !== props.maxHeight || $[46] !== props.onRowClick || $[47] !== props.renderRowDetail || $[48] !== props.rowClassName || $[49] !== props.summaryRow || $[50] !== source.rows || $[51] !== stickyHeader || $[52] !== t10 || $[53] !== t11 || $[54] !== t12 || $[55] !== t8 || $[56] !== t9 || $[57] !== table || $[58] !== virtualScrollRef || $[59] !== virtualization.measureElement || $[60] !== virtualization.paddingBottom || $[61] !== virtualization.paddingTop || $[62] !== visibleRowActions) {
3735
+ t13 = /* @__PURE__ */ jsx(DesktopTable, {
3736
+ table,
3737
+ rows: source.rows,
3738
+ rowActions: visibleRowActions,
3739
+ confirm,
3740
+ prefetch,
3741
+ onRowClick: props.onRowClick,
3742
+ rowClassName: props.rowClassName,
3743
+ renderRowDetail: props.renderRowDetail,
3744
+ summaryRow: props.summaryRow,
3745
+ expansion: t8,
3746
+ getRowId,
3747
+ bodyRef: desktopBodyRef,
3748
+ className: t9,
3749
+ rowEntries: t10,
3750
+ paddingTop: virtualization.paddingTop,
3751
+ paddingBottom: virtualization.paddingBottom,
3752
+ measureElement: virtualization.measureElement,
3753
+ stickyHeaderOffset: t11,
3754
+ stickyHeader,
3755
+ pinOffset: chrome.columnLayout.pinOffset,
3756
+ actionsPinned,
3757
+ maxHeight: props.maxHeight,
3758
+ virtualScrollRef,
3759
+ setWidth: t12,
3760
+ columnWidths: chrome.columnLayout.state.widths,
3761
+ resizeLabel: table.labels.resizeColumn,
3762
+ density
3763
+ });
3764
+ $[38] = actionsPinned;
3765
+ $[39] = chrome.columnLayout.pinOffset;
3766
+ $[40] = chrome.columnLayout.state.widths;
3767
+ $[41] = confirm;
3768
+ $[42] = density;
3769
+ $[43] = getRowId;
3770
+ $[44] = prefetch;
3771
+ $[45] = props.maxHeight;
3772
+ $[46] = props.onRowClick;
3773
+ $[47] = props.renderRowDetail;
3774
+ $[48] = props.rowClassName;
3775
+ $[49] = props.summaryRow;
3776
+ $[50] = source.rows;
3777
+ $[51] = stickyHeader;
3778
+ $[52] = t10;
3779
+ $[53] = t11;
3780
+ $[54] = t12;
3781
+ $[55] = t8;
3782
+ $[56] = t9;
3783
+ $[57] = table;
3784
+ $[58] = virtualScrollRef;
3785
+ $[59] = virtualization.measureElement;
3786
+ $[60] = virtualization.paddingBottom;
3787
+ $[61] = virtualization.paddingTop;
3788
+ $[62] = visibleRowActions;
3789
+ $[63] = t13;
3790
+ } else t13 = $[63];
3791
+ body = t13;
3792
+ }
3793
+ const t8 = chrome.isRefreshing || void 0;
3794
+ const t9 = classNames?.root;
3795
+ let t10;
3796
+ if ($[64] !== stickyTop) {
3797
+ t10 = stickyToolbarStyle(stickyTop);
3798
+ $[64] = stickyTop;
3799
+ $[65] = t10;
3800
+ } else t10 = $[65];
3801
+ const t11 = classNames?.toolbar;
3802
+ const t12 = Boolean(filters);
3803
+ let t13;
3804
+ if ($[66] === Symbol.for("react.memo_cache_sentinel")) {
3805
+ t13 = () => setDrawerOpened(false);
3806
+ $[66] = t13;
3807
+ } else t13 = $[66];
3808
+ let t14;
3809
+ if ($[67] !== chromeProps.urlAdapter || $[68] !== chromeProps.urlKey || $[69] !== savedViews || $[70] !== table.labels) {
3810
+ t14 = savedViews && /* @__PURE__ */ jsx(SavedViewsSlot, {
3811
+ options: {
3812
+ adapter: chromeProps.urlAdapter,
3813
+ urlKey: chromeProps.urlKey,
3814
+ ...savedViews
3815
+ },
3816
+ labels: table.labels
3817
+ });
3818
+ $[67] = chromeProps.urlAdapter;
3819
+ $[68] = chromeProps.urlKey;
3820
+ $[69] = savedViews;
3821
+ $[70] = table.labels;
3822
+ $[71] = t14;
3823
+ } else t14 = $[71];
3824
+ const t15 = enableColumnMenu && !isMobile;
3825
+ let t16;
3826
+ if ($[72] !== chrome.allColumns || $[73] !== chrome.columnLayout || $[74] !== hasRowActions || $[75] !== t15 || $[76] !== table.labels) {
3827
+ t16 = /* @__PURE__ */ jsx(ColumnMenuSlot, {
3828
+ enabled: t15,
3829
+ allColumns: chrome.allColumns,
3830
+ layout: chrome.columnLayout,
3831
+ labels: table.labels,
3832
+ hasRowActions
3833
+ });
3834
+ $[72] = chrome.allColumns;
3835
+ $[73] = chrome.columnLayout;
3836
+ $[74] = hasRowActions;
3837
+ $[75] = t15;
3838
+ $[76] = table.labels;
3839
+ $[77] = t16;
3840
+ } else t16 = $[77];
3841
+ let t17;
3842
+ if ($[78] !== t14 || $[79] !== t16) {
3843
+ t17 = /* @__PURE__ */ jsxs(Fragment, { children: [t14, t16] });
3844
+ $[78] = t14;
3845
+ $[79] = t16;
3846
+ $[80] = t17;
3847
+ } else t17 = $[80];
3848
+ let t18;
3849
+ if ($[81] !== canLoadMore || $[82] !== chrome.activeFilterCount || $[83] !== chrome.clearFilters || $[84] !== customToolbar || $[85] !== dir || $[86] !== drawerOpened || $[87] !== filters || $[88] !== filtersMode || $[89] !== filtersTrigger.onClick || $[90] !== filtersTrigger.onPointerDown || $[91] !== hideSearch || $[92] !== searchPlaceholder || $[93] !== sortByOptions || $[94] !== t12 || $[95] !== t17 || $[96] !== table) {
3850
+ t18 = /* @__PURE__ */ jsx(Toolbar, {
3851
+ table,
3852
+ hideSearch,
3853
+ searchPlaceholder,
3854
+ sortByOptions,
3855
+ customToolbar,
3856
+ hasFilters: t12,
3857
+ activeFilterCount: chrome.activeFilterCount,
3858
+ filtersMode,
3859
+ filters,
3860
+ filtersOpen: drawerOpened,
3861
+ onToggleFilters: filtersTrigger.onClick,
3862
+ onFiltersTriggerPointerDown: filtersTrigger.onPointerDown,
3863
+ onCloseFilters: t13,
3864
+ onClearFilters: chrome.clearFilters,
3865
+ dir,
3866
+ columnMenu: t17,
3867
+ showRowsPerPage: canLoadMore
3868
+ });
3869
+ $[81] = canLoadMore;
3870
+ $[82] = chrome.activeFilterCount;
3871
+ $[83] = chrome.clearFilters;
3872
+ $[84] = customToolbar;
3873
+ $[85] = dir;
3874
+ $[86] = drawerOpened;
3875
+ $[87] = filters;
3876
+ $[88] = filtersMode;
3877
+ $[89] = filtersTrigger.onClick;
3878
+ $[90] = filtersTrigger.onPointerDown;
3879
+ $[91] = hideSearch;
3880
+ $[92] = searchPlaceholder;
3881
+ $[93] = sortByOptions;
3882
+ $[94] = t12;
3883
+ $[95] = t17;
3884
+ $[96] = table;
3885
+ $[97] = t18;
3886
+ } else t18 = $[97];
3887
+ let t19;
3888
+ if ($[98] !== chrome.clearFilters || $[99] !== chrome.mergedChips || $[100] !== table.labels.clearAll || $[101] !== table.labels.filters) {
3889
+ t19 = /* @__PURE__ */ jsx(ActiveFilterChips, {
3890
+ chips: chrome.mergedChips,
3891
+ onClearAll: chrome.clearFilters,
3892
+ label: table.labels.filters,
3893
+ clearAllLabel: table.labels.clearAll
3894
+ });
3895
+ $[98] = chrome.clearFilters;
3896
+ $[99] = chrome.mergedChips;
3897
+ $[100] = table.labels.clearAll;
3898
+ $[101] = table.labels.filters;
3899
+ $[102] = t19;
3900
+ } else t19 = $[102];
3901
+ let t20;
3902
+ if ($[103] !== bulkActions || $[104] !== confirm || $[105] !== source.total || $[106] !== table.labels || $[107] !== table.selection) {
3903
+ t20 = table.selection && bulkActions && /* @__PURE__ */ jsx(BulkActionBar, {
3904
+ selection: table.selection,
3905
+ total: source.total,
3906
+ bulkActions,
3907
+ confirm,
3908
+ labels: table.labels
3909
+ });
3910
+ $[103] = bulkActions;
3911
+ $[104] = confirm;
3912
+ $[105] = source.total;
3913
+ $[106] = table.labels;
3914
+ $[107] = table.selection;
3915
+ $[108] = t20;
3916
+ } else t20 = $[108];
3917
+ let t21;
3918
+ if ($[109] !== t18 || $[110] !== t19 || $[111] !== t20) {
3919
+ t21 = /* @__PURE__ */ jsxs(Stack, {
1787
3920
  gap: "xs",
1788
3921
  children: [
1789
- /* @__PURE__ */ jsx(Box, {
1790
- ref: toolbarRef,
1791
- style: stickyToolbarStyle(stickyTop),
1792
- className: classNames?.toolbar,
1793
- children: /* @__PURE__ */ jsxs(Stack, {
1794
- gap: "xs",
1795
- children: [
1796
- /* @__PURE__ */ jsx(Toolbar, {
1797
- table,
1798
- hideSearch,
1799
- searchPlaceholder,
1800
- sortByOptions,
1801
- customToolbar,
1802
- hasFilters: Boolean(filters),
1803
- activeFilterCount: chrome.activeFilterCount,
1804
- filtersMode,
1805
- filters,
1806
- filtersOpen: drawerOpened,
1807
- onToggleFilters: filtersTrigger.onClick,
1808
- onFiltersTriggerPointerDown: filtersTrigger.onPointerDown,
1809
- onCloseFilters: () => setDrawerOpened(false),
1810
- onClearFilters: chrome.clearFilters,
1811
- dir,
1812
- columnMenu: /* @__PURE__ */ jsxs(Fragment, { children: [savedViews && /* @__PURE__ */ jsx(SavedViewsSlot, {
1813
- options: {
1814
- adapter: chromeProps.urlAdapter,
1815
- urlKey: chromeProps.urlKey,
1816
- ...savedViews
1817
- },
1818
- labels: table.labels
1819
- }), /* @__PURE__ */ jsx(ColumnMenuSlot, {
1820
- enabled: enableColumnMenu && !isMobile,
1821
- allColumns: chrome.allColumns,
1822
- layout: chrome.columnLayout,
1823
- labels: table.labels,
1824
- hasRowActions
1825
- })] }),
1826
- showRowsPerPage: canLoadMore
1827
- }),
1828
- /* @__PURE__ */ jsx(ActiveFilterChips, {
1829
- chips: chrome.mergedChips,
1830
- onClearAll: chrome.clearFilters,
1831
- label: table.labels.filters,
1832
- clearAllLabel: table.labels.clearAll
1833
- }),
1834
- table.selection && bulkActions && /* @__PURE__ */ jsx(BulkActionBar, {
1835
- selection: table.selection,
1836
- total: source.total,
1837
- bulkActions,
1838
- confirm,
1839
- labels: table.labels
1840
- })
1841
- ]
1842
- })
1843
- }),
1844
- chrome.isRefreshing && /* @__PURE__ */ jsx(Progress, {
1845
- size: "xs",
1846
- animated: true,
1847
- value: 100,
1848
- "aria-label": table.labels.loading
1849
- }),
1850
- source.error && /* @__PURE__ */ jsx(ErrorState, {
1851
- error: source.error,
1852
- title: table.labels.errorTitle,
1853
- message: table.labels.errorMessage,
1854
- retryLabel: table.labels.retry,
1855
- onRetry: source.refetch ? () => void source.refetch?.() : void 0,
1856
- isRetrying: source.isFetching
1857
- }),
1858
- !source.error && body,
1859
- canLoadMore && source.hasNextPage && /* @__PURE__ */ jsx(Group, {
1860
- ref: loadMoreRef,
1861
- justify: "center",
1862
- py: "xs",
1863
- children: /* @__PURE__ */ jsx(Button, {
1864
- variant: "default",
1865
- size: "sm",
1866
- loading: source.isFetchingNextPage,
1867
- onClick: () => source.fetchNextPage(),
1868
- children: table.labels.loadMore
1869
- })
1870
- }),
1871
- chrome.showFooter && /* @__PURE__ */ jsx(Box, {
1872
- className: classNames?.footer,
1873
- children: /* @__PURE__ */ jsx(PaginationFooter, {
1874
- page: table.pagination.safePage,
1875
- totalPages: table.pagination.totalPages,
1876
- limit: source.limit,
1877
- total: source.total,
1878
- fromIndex: table.pagination.fromIndex,
1879
- toIndex: table.pagination.toIndex,
1880
- onPageChange: source.setPage,
1881
- onLimitChange: source.setLimit,
1882
- labels: table.labels
1883
- })
1884
- })
3922
+ t18,
3923
+ t19,
3924
+ t20
1885
3925
  ]
1886
- }), filters && filtersMode === "drawer" && /* @__PURE__ */ jsx(FilterDrawer, {
3926
+ });
3927
+ $[109] = t18;
3928
+ $[110] = t19;
3929
+ $[111] = t20;
3930
+ $[112] = t21;
3931
+ } else t21 = $[112];
3932
+ let t22;
3933
+ if ($[113] !== t10 || $[114] !== t11 || $[115] !== t21 || $[116] !== toolbarRef) {
3934
+ t22 = /* @__PURE__ */ jsx(Box, {
3935
+ ref: toolbarRef,
3936
+ style: t10,
3937
+ className: t11,
3938
+ children: t21
3939
+ });
3940
+ $[113] = t10;
3941
+ $[114] = t11;
3942
+ $[115] = t21;
3943
+ $[116] = toolbarRef;
3944
+ $[117] = t22;
3945
+ } else t22 = $[117];
3946
+ let t23;
3947
+ if ($[118] !== chrome.isRefreshing || $[119] !== table.labels.loading) {
3948
+ t23 = chrome.isRefreshing && /* @__PURE__ */ jsx(Progress, {
3949
+ size: "xs",
3950
+ animated: true,
3951
+ value: 100,
3952
+ "aria-label": table.labels.loading
3953
+ });
3954
+ $[118] = chrome.isRefreshing;
3955
+ $[119] = table.labels.loading;
3956
+ $[120] = t23;
3957
+ } else t23 = $[120];
3958
+ let t24;
3959
+ if ($[121] !== source || $[122] !== table.labels.errorMessage || $[123] !== table.labels.errorTitle || $[124] !== table.labels.retry) {
3960
+ t24 = source.error && /* @__PURE__ */ jsx(ErrorState, {
3961
+ error: source.error,
3962
+ title: table.labels.errorTitle,
3963
+ message: table.labels.errorMessage,
3964
+ retryLabel: table.labels.retry,
3965
+ onRetry: source.refetch ? () => void source.refetch?.() : void 0,
3966
+ isRetrying: source.isFetching
3967
+ });
3968
+ $[121] = source;
3969
+ $[122] = table.labels.errorMessage;
3970
+ $[123] = table.labels.errorTitle;
3971
+ $[124] = table.labels.retry;
3972
+ $[125] = t24;
3973
+ } else t24 = $[125];
3974
+ const t25 = !source.error && body;
3975
+ let t26;
3976
+ if ($[126] !== canLoadMore || $[127] !== loadMoreRef || $[128] !== source || $[129] !== table.labels.loadMore) {
3977
+ t26 = canLoadMore && source.hasNextPage && /* @__PURE__ */ jsx(Group, {
3978
+ ref: loadMoreRef,
3979
+ justify: "center",
3980
+ py: "xs",
3981
+ children: /* @__PURE__ */ jsx(Button, {
3982
+ variant: "default",
3983
+ size: "sm",
3984
+ loading: source.isFetchingNextPage,
3985
+ onClick: () => source.fetchNextPage(),
3986
+ children: table.labels.loadMore
3987
+ })
3988
+ });
3989
+ $[126] = canLoadMore;
3990
+ $[127] = loadMoreRef;
3991
+ $[128] = source;
3992
+ $[129] = table.labels.loadMore;
3993
+ $[130] = t26;
3994
+ } else t26 = $[130];
3995
+ let t27;
3996
+ if ($[131] !== chrome.showFooter || $[132] !== classNames?.footer || $[133] !== source.limit || $[134] !== source.setLimit || $[135] !== source.setPage || $[136] !== source.total || $[137] !== table.labels || $[138] !== table.pagination) {
3997
+ t27 = chrome.showFooter && /* @__PURE__ */ jsx(Box, {
3998
+ className: classNames?.footer,
3999
+ children: /* @__PURE__ */ jsx(PaginationFooter, {
4000
+ page: table.pagination.safePage,
4001
+ totalPages: table.pagination.totalPages,
4002
+ limit: source.limit,
4003
+ total: source.total,
4004
+ fromIndex: table.pagination.fromIndex,
4005
+ toIndex: table.pagination.toIndex,
4006
+ onPageChange: source.setPage,
4007
+ onLimitChange: source.setLimit,
4008
+ labels: table.labels
4009
+ })
4010
+ });
4011
+ $[131] = chrome.showFooter;
4012
+ $[132] = classNames?.footer;
4013
+ $[133] = source.limit;
4014
+ $[134] = source.setLimit;
4015
+ $[135] = source.setPage;
4016
+ $[136] = source.total;
4017
+ $[137] = table.labels;
4018
+ $[138] = table.pagination;
4019
+ $[139] = t27;
4020
+ } else t27 = $[139];
4021
+ let t28;
4022
+ if ($[140] !== t22 || $[141] !== t23 || $[142] !== t24 || $[143] !== t25 || $[144] !== t26 || $[145] !== t27) {
4023
+ t28 = /* @__PURE__ */ jsxs(Stack, {
4024
+ gap: "xs",
4025
+ children: [
4026
+ t22,
4027
+ t23,
4028
+ t24,
4029
+ t25,
4030
+ t26,
4031
+ t27
4032
+ ]
4033
+ });
4034
+ $[140] = t22;
4035
+ $[141] = t23;
4036
+ $[142] = t24;
4037
+ $[143] = t25;
4038
+ $[144] = t26;
4039
+ $[145] = t27;
4040
+ $[146] = t28;
4041
+ } else t28 = $[146];
4042
+ let t29;
4043
+ if ($[147] !== chrome.activeFilterCount || $[148] !== chrome.clearFilters || $[149] !== dir || $[150] !== drawerOpened || $[151] !== filters || $[152] !== filtersMode || $[153] !== table.labels) {
4044
+ t29 = filters && filtersMode === "drawer" && /* @__PURE__ */ jsx(FilterDrawer, {
1887
4045
  opened: drawerOpened,
1888
4046
  onClose: () => setDrawerOpened(false),
1889
4047
  filters,
@@ -1891,8 +4049,36 @@ function DataTable(props) {
1891
4049
  onClearFilters: chrome.clearFilters,
1892
4050
  labels: table.labels,
1893
4051
  dir
1894
- })]
1895
- });
4052
+ });
4053
+ $[147] = chrome.activeFilterCount;
4054
+ $[148] = chrome.clearFilters;
4055
+ $[149] = dir;
4056
+ $[150] = drawerOpened;
4057
+ $[151] = filters;
4058
+ $[152] = filtersMode;
4059
+ $[153] = table.labels;
4060
+ $[154] = t29;
4061
+ } else t29 = $[154];
4062
+ let t30;
4063
+ if ($[155] !== dir || $[156] !== t28 || $[157] !== t29 || $[158] !== t8 || $[159] !== t9) {
4064
+ t30 = /* @__PURE__ */ jsxs(Paper, {
4065
+ ref: rootRef,
4066
+ p: "xs",
4067
+ radius: "md",
4068
+ withBorder: true,
4069
+ dir,
4070
+ "aria-busy": t8,
4071
+ className: t9,
4072
+ children: [t28, t29]
4073
+ });
4074
+ $[155] = dir;
4075
+ $[156] = t28;
4076
+ $[157] = t29;
4077
+ $[158] = t8;
4078
+ $[159] = t9;
4079
+ $[160] = t30;
4080
+ } else t30 = $[160];
4081
+ return t30;
1896
4082
  }
1897
4083
  //#endregion
1898
4084
  export { ActiveFilterChips, AutoFilterForm, DataTable, EmptyState, ErrorState, PaginationFooter, SavedViewsMenu, TableSkeleton, createHistoryAdapter, createMemoryAdapter, defaultConfirm, defaultLabels, deriveSortByOptions, getHistoryAdapter, useBackendData, useDataTable, useFrontendData, useMountStagger, useSavedViews, useTableUrlState };