@nivaro/react 0.3.56 → 0.3.58

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.
Files changed (55) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +9 -2
  4. package/dist/shared/components/CollectionBrowserView.js +2827 -2750
  5. package/dist/shared/components/DataTable.js +247 -236
  6. package/dist/shared/components/ItemEditForm.js +1693 -1668
  7. package/dist/shared/components/ProfileView.js +716 -715
  8. package/dist/shared/components/RecordReadView.js +367 -364
  9. package/dist/shared/components/ReportView.js +64 -39
  10. package/dist/shared/components/alerts/AlertManagerView.js +284 -271
  11. package/dist/shared/components/cbv/row-focus.js +19 -0
  12. package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
  13. package/dist/shared/components/integrations/console/SignalCard.js +59 -59
  14. package/dist/shared/components/integrations/console/tone.js +52 -30
  15. package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
  16. package/dist/shared/components/item-edit/FieldRow.js +175 -173
  17. package/dist/shared/components/item-edit/InlineTableField.js +407 -402
  18. package/dist/shared/components/item-edit/M2MCombobox.js +313 -291
  19. package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
  20. package/dist/shared/components/item-edit/PlanGrid.js +826 -803
  21. package/dist/shared/components/item-edit/QuickCreateButton.js +115 -79
  22. package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
  23. package/dist/shared/components/item-edit/RelationCombobox.js +412 -328
  24. package/dist/shared/components/item-edit/RelationGroupedCombobox.js +147 -125
  25. package/dist/shared/components/item-edit/SummaryPanel.js +406 -392
  26. package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
  27. package/dist/shared/components/item-edit/related-missing.js +45 -0
  28. package/dist/shared/components/item-edit/save-outcome.js +5 -5
  29. package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
  30. package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
  31. package/dist/shared/components/panels/ItemLockBanner.js +2 -3
  32. package/dist/shared/components/panels/PipelinePanel.js +1027 -978
  33. package/dist/shared/components/panels/RevisionsPanel.js +4 -1
  34. package/dist/shared/components/panels/TaskPanel.js +265 -249
  35. package/dist/shared/components/panels/landing-state.js +27 -0
  36. package/dist/shared/components/pipeline/PipelineEditorView.js +86 -78
  37. package/dist/shared/components/profile/AiMemoryCard.js +12 -10
  38. package/dist/shared/components/queue/OwnerAvatars.js +80 -41
  39. package/dist/shared/components/queue/QueueItemSheet.js +111 -111
  40. package/dist/shared/components/queue/QueueQuickFilters.js +48 -48
  41. package/dist/shared/components/queue/QueueWorklist.js +975 -964
  42. package/dist/shared/components/queue/group-sums.js +27 -0
  43. package/dist/shared/components/queue/live-state-aspect.js +7 -3
  44. package/dist/shared/components/queue/path-label.js +14 -0
  45. package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
  46. package/dist/shared/lib/back-closes.js +25 -0
  47. package/dist/shared/lib/cbv-page-warm.js +36 -0
  48. package/dist/shared/lib/form-usage-beacon.js +7 -7
  49. package/dist/shared/lib/list-page-memory.js +41 -0
  50. package/dist/shared/lib/live.js +44 -44
  51. package/dist/shared/lib/own-writes.js +76 -28
  52. package/dist/shared/lib/record-ref.js +78 -53
  53. package/dist/shared/lib/request-gate.js +110 -109
  54. package/dist/shared/lib/validation-rules.js +34 -19
  55. package/package.json +1 -1
@@ -1,36 +1,46 @@
1
1
  import { jsxs as s, Fragment as Q, jsx as e } from "react/jsx-runtime";
2
- import { Search as Ge, Pin as Pe, ChevronDown as et, Inbox as tt, ChevronsUpDown as I, ChevronUp as rt, X as G, Check as at, CalendarDays as lt } from "lucide-react";
3
- import nt, { useMemo as Oe, useRef as K, useState as O, useEffect as Y, useLayoutEffect as st } from "react";
4
- import { parseDateFilter as Se, describeDateFilter as it, DATE_FILTER_OPS as dt, formatDateFilter as ot } from "../lib/date-filter.js";
5
- import { parseNumberFilter as $e, describeNumberFilter as ct, NUMBER_FILTER_OPS as pt, formatNumberFilter as bt } from "../lib/number-filter.js";
6
- import { fitPins as ht } from "../lib/table-pins.js";
2
+ import { Search as Pe, Pin as et, ChevronDown as tt, Inbox as rt, ChevronsUpDown as I, ChevronUp as at, X as G, Check as lt, CalendarDays as nt } from "lucide-react";
3
+ import st, { useMemo as Se, useRef as K, useState as O, useEffect as Y, useLayoutEffect as it } from "react";
4
+ import { parseDateFilter as $e, describeDateFilter as ot, DATE_FILTER_OPS as dt, formatDateFilter as ct } from "../lib/date-filter.js";
5
+ import { parseNumberFilter as Ce, describeNumberFilter as pt, NUMBER_FILTER_OPS as bt, formatNumberFilter as ht } from "../lib/number-filter.js";
6
+ import { fitPins as mt } from "../lib/table-pins.js";
7
7
  import { cn as b, formatNumber as be } from "../lib/utils.js";
8
- import { CellCopyLayer as mt } from "./CellCopyLayer.js";
9
- import { EmptyState as ut } from "./EmptyState.js";
10
- import { HScrollProxy as xt } from "./HScrollProxy.js";
11
- import { TableSkeletonRows as ft } from "./Skeletons.js";
12
- import { Button as Ce } from "./ui/button.js";
13
- import { Checkbox as ze } from "./ui/checkbox.js";
14
- import { Command as yt, CommandInput as gt, CommandList as kt, CommandEmpty as vt, CommandItem as Nt } from "./ui/command.js";
15
- import { Input as j } from "./ui/input.js";
8
+ import { CellCopyLayer as ut } from "./CellCopyLayer.js";
9
+ import { EmptyState as xt } from "./EmptyState.js";
10
+ import { HScrollProxy as ft } from "./HScrollProxy.js";
11
+ import { TableSkeletonRows as yt } from "./Skeletons.js";
12
+ import { Button as ze } from "./ui/button.js";
13
+ import { Checkbox as Me } from "./ui/checkbox.js";
14
+ import { Command as gt, CommandInput as kt, CommandList as vt, CommandEmpty as Nt, CommandItem as wt } from "./ui/command.js";
15
+ import { Input as F } from "./ui/input.js";
16
16
  import { Popover as P, PopoverTrigger as ee, PopoverContent as te } from "./ui/popover.js";
17
- import { Select as wt, SelectTrigger as _t, SelectValue as Ot, SelectContent as St, SelectItem as Me } from "./ui/select.js";
18
- import { Table as Re, TableHeader as Ee, TableRow as U, TableHead as J, TableBody as Te, TableCell as D } from "./ui/table.js";
19
- const $t = [1, 2, 3, 4, 5, 6, 7, 8];
20
- function Ve(a) {
21
- return a.startsWith("-") ? a.slice(1) : a;
17
+ import { Select as _t, SelectTrigger as Ot, SelectValue as St, SelectContent as $t, SelectItem as Re } from "./ui/select.js";
18
+ import { Table as Ee, TableHeader as Te, TableRow as B, TableHead as J, TableBody as je, TableCell as D } from "./ui/table.js";
19
+ const Ct = [1, 2, 3, 4, 5, 6, 7, 8];
20
+ function he(r) {
21
+ var i;
22
+ return r == null || typeof r == "boolean" ? "" : typeof r == "string" || typeof r == "number" ? String(r) : Array.isArray(r) ? r.map(he).join("") : typeof r == "object" && "props" in r ? he((i = r.props) == null ? void 0 : i.children) : "";
22
23
  }
23
- function je(a) {
24
- return a ? a.startsWith("-") ? "desc" : "asc" : null;
24
+ function zt(r) {
25
+ const i = he(r.header).replace(/\s+/g, " ").trim();
26
+ if (i) return i;
27
+ const o = (r.key.split(".").pop() ?? r.key).replace(/_/g, " ").trim();
28
+ return o ? o[0].toUpperCase() + o.slice(1) : r.key;
25
29
  }
26
- function Ct(a, i) {
27
- const c = Ve(a), o = je(a);
28
- return c !== i || !a ? i : o === "asc" ? `-${i}` : "";
30
+ function Fe(r) {
31
+ return r.startsWith("-") ? r.slice(1) : r;
29
32
  }
30
- function zt({ field: a, sort: i }) {
31
- const c = Ve(i), o = je(i);
32
- return c !== a || !i ? /* @__PURE__ */ e(I, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ e(
33
- rt,
33
+ function Ve(r) {
34
+ return r ? r.startsWith("-") ? "desc" : "asc" : null;
35
+ }
36
+ function Mt(r, i) {
37
+ const c = Fe(r), o = Ve(r);
38
+ return c !== i || !r ? i : o === "asc" ? `-${i}` : "";
39
+ }
40
+ function Rt({ field: r, sort: i }) {
41
+ const c = Fe(i), o = Ve(i);
42
+ return c !== r || !i ? /* @__PURE__ */ e(I, { className: "ml-1 inline h-3 w-3 shrink-0 text-slate-300" }) : /* @__PURE__ */ e(
43
+ at,
34
44
  {
35
45
  className: b(
36
46
  "ml-1 inline h-3 w-3 shrink-0 text-nvr-cyan transition-transform duration-200",
@@ -39,34 +49,34 @@ function zt({ field: a, sort: i }) {
39
49
  }
40
50
  );
41
51
  }
42
- function Mt({
43
- def: a,
52
+ function Et({
53
+ def: r,
44
54
  value: i,
45
55
  onChange: c
46
56
  }) {
47
- const [o, m] = O(!1), [l, d] = O(""), [y, g] = O([]), [k, u] = O(!1), [p, w] = O({}), r = K(0), S = !!a.loadOptions, v = Array.isArray(i) ? i : i === "" ? [] : [i];
57
+ const [o, m] = O(!1), [l, d] = O(""), [y, g] = O([]), [k, u] = O(!1), [p, w] = O({}), a = K(0), S = !!r.loadOptions, v = Array.isArray(i) ? i : i === "" ? [] : [i];
48
58
  Y(() => {
49
59
  if (!S || !o) return;
50
- const x = ++r.current;
60
+ const x = ++a.current;
51
61
  u(!0);
52
62
  const C = setTimeout(
53
63
  () => {
54
64
  var E;
55
- (E = a.loadOptions) == null || E.call(a, l).then((F) => {
56
- r.current === x && g(F);
65
+ (E = r.loadOptions) == null || E.call(r, l).then((j) => {
66
+ a.current === x && g(j);
57
67
  }).catch(() => {
58
- r.current === x && g([]);
68
+ a.current === x && g([]);
59
69
  }).finally(() => {
60
- r.current === x && u(!1);
70
+ a.current === x && u(!1);
61
71
  });
62
72
  },
63
73
  l ? 250 : 0
64
74
  );
65
75
  return () => clearTimeout(C);
66
76
  }, [l, o, S]);
67
- const X = S ? y : a.options ?? [], Z = (x) => {
77
+ const X = S ? y : r.options ?? [], Z = (x) => {
68
78
  var C, E;
69
- return ((C = X.find((F) => F.value === x)) == null ? void 0 : C.label) ?? ((E = (a.options ?? []).find((F) => F.value === x)) == null ? void 0 : E.label) ?? p[x] ?? x;
79
+ return ((C = X.find((j) => j.value === x)) == null ? void 0 : C.label) ?? ((E = (r.options ?? []).find((j) => j.value === x)) == null ? void 0 : E.label) ?? p[x] ?? x;
70
80
  }, R = v.length === 0 ? null : v.length === 1 ? Z(v[0]) : `${Z(v[0])} +${v.length - 1}`;
71
81
  return /* @__PURE__ */ s(
72
82
  P,
@@ -85,7 +95,7 @@ function Mt({
85
95
  R ? "text-slate-800 dark:text-foreground" : "text-slate-500"
86
96
  ),
87
97
  children: [
88
- /* @__PURE__ */ e("span", { className: "truncate", children: R ?? a.placeholder }),
98
+ /* @__PURE__ */ e("span", { className: "truncate", children: R ?? r.placeholder }),
89
99
  /* @__PURE__ */ s("span", { className: "ml-1 flex shrink-0 items-center gap-0.5", children: [
90
100
  v.length > 0 && // biome-ignore lint/a11y/useKeyWithClickEvents: auxiliary clear affordance; Esc + reselect cover keyboard
91
101
  /* @__PURE__ */ e(
@@ -95,7 +105,7 @@ function Mt({
95
105
  tabIndex: -1,
96
106
  "aria-label": "Clear filter",
97
107
  onClick: (x) => {
98
- x.stopPropagation(), c(a.multi ? [] : "");
108
+ x.stopPropagation(), c(r.multi ? [] : "");
99
109
  },
100
110
  className: "rounded p-0.5 text-slate-400 hover:text-slate-600",
101
111
  children: /* @__PURE__ */ e(G, { className: "h-3 w-3" })
@@ -106,9 +116,9 @@ function Mt({
106
116
  ]
107
117
  }
108
118
  ) }),
109
- /* @__PURE__ */ e(te, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(yt, { shouldFilter: !S, children: [
119
+ /* @__PURE__ */ e(te, { className: "w-[240px] p-0", align: "start", children: /* @__PURE__ */ s(gt, { shouldFilter: !S, children: [
110
120
  /* @__PURE__ */ e(
111
- gt,
121
+ kt,
112
122
  {
113
123
  placeholder: "Search…",
114
124
  className: "h-8 text-[12px]",
@@ -116,22 +126,22 @@ function Mt({
116
126
  onValueChange: d
117
127
  }
118
128
  ),
119
- /* @__PURE__ */ s(kt, { children: [
120
- /* @__PURE__ */ e(vt, { className: "py-3 text-center text-[12px] text-slate-400", children: k ? "Searching…" : "No results" }),
129
+ /* @__PURE__ */ s(vt, { children: [
130
+ /* @__PURE__ */ e(Nt, { className: "py-3 text-center text-[12px] text-slate-400", children: k ? "Searching…" : "No results" }),
121
131
  X.map((x) => {
122
132
  const C = v.includes(x.value);
123
133
  return /* @__PURE__ */ s(
124
- Nt,
134
+ wt,
125
135
  {
126
136
  value: S ? x.value : x.label,
127
137
  onSelect: () => {
128
- w((E) => ({ ...E, [x.value]: x.label })), a.multi ? c(
138
+ w((E) => ({ ...E, [x.value]: x.label })), r.multi ? c(
129
139
  C ? v.filter((E) => E !== x.value) : [...v, x.value]
130
140
  ) : (c(C ? "" : x.value), m(!1));
131
141
  },
132
142
  className: "text-[12px]",
133
143
  children: [
134
- /* @__PURE__ */ e(at, { className: b("mr-2 h-3 w-3", C ? "opacity-100" : "opacity-0") }),
144
+ /* @__PURE__ */ e(lt, { className: b("mr-2 h-3 w-3", C ? "opacity-100" : "opacity-0") }),
135
145
  x.label
136
146
  ]
137
147
  },
@@ -144,19 +154,19 @@ function Mt({
144
154
  }
145
155
  );
146
156
  }
147
- function Rt({
148
- value: a,
157
+ function Tt({
158
+ value: r,
149
159
  placeholder: i,
150
160
  onChange: c
151
161
  }) {
152
- const [o, m] = O(!1), l = Se(a), [d, y] = O((l == null ? void 0 : l.op) ?? "on"), [g, k] = O((l == null ? void 0 : l.from) ?? ""), [u, p] = O((l == null ? void 0 : l.to) ?? "");
162
+ const [o, m] = O(!1), l = $e(r), [d, y] = O((l == null ? void 0 : l.op) ?? "on"), [g, k] = O((l == null ? void 0 : l.from) ?? ""), [u, p] = O((l == null ? void 0 : l.to) ?? "");
153
163
  Y(() => {
154
164
  if (!o) return;
155
- const r = Se(a);
156
- y((r == null ? void 0 : r.op) ?? "on"), k((r == null ? void 0 : r.from) ?? ""), p((r == null ? void 0 : r.to) ?? "");
157
- }, [o, a]);
158
- const w = (r, S, v) => {
159
- S && (c(ot({ op: r, from: S, to: v || S })), (r !== "between" || v) && m(!1));
165
+ const a = $e(r);
166
+ y((a == null ? void 0 : a.op) ?? "on"), k((a == null ? void 0 : a.from) ?? ""), p((a == null ? void 0 : a.to) ?? "");
167
+ }, [o, r]);
168
+ const w = (a, S, v) => {
169
+ S && (c(ct({ op: a, from: S, to: v || S })), (a !== "between" || v) && m(!1));
160
170
  };
161
171
  return /* @__PURE__ */ s(P, { open: o, onOpenChange: m, children: [
162
172
  /* @__PURE__ */ e(ee, { asChild: !0, children: /* @__PURE__ */ s(
@@ -166,36 +176,36 @@ function Rt({
166
176
  "data-date-filter": !0,
167
177
  className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
168
178
  children: [
169
- /* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? it(l) : i }),
179
+ /* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? ot(l) : i }),
170
180
  l ? /* @__PURE__ */ e(
171
181
  G,
172
182
  {
173
183
  className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
174
- onClick: (r) => {
175
- r.stopPropagation(), c(null);
184
+ onClick: (a) => {
185
+ a.stopPropagation(), c(null);
176
186
  }
177
187
  }
178
- ) : /* @__PURE__ */ e(lt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
188
+ ) : /* @__PURE__ */ e(nt, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
179
189
  ]
180
190
  }
181
191
  ) }),
182
192
  /* @__PURE__ */ s(te, { align: "start", className: "w-[248px] space-y-2 p-2", children: [
183
- /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: dt.map((r) => /* @__PURE__ */ e(
193
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-3 gap-1", children: dt.map((a) => /* @__PURE__ */ e(
184
194
  "button",
185
195
  {
186
196
  type: "button",
187
- "data-date-op": r.op,
188
- "aria-pressed": d === r.op,
197
+ "data-date-op": a.op,
198
+ "aria-pressed": d === a.op,
189
199
  onClick: () => {
190
- y(r.op), g && w(r.op, g, u);
200
+ y(a.op), g && w(a.op, g, u);
191
201
  },
192
202
  className: b(
193
203
  "rounded border px-1 py-1 text-[11px] leading-tight transition-colors",
194
- d === r.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
204
+ d === a.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
195
205
  ),
196
- children: r.label
206
+ children: a.label
197
207
  },
198
- r.op
208
+ a.op
199
209
  )) }),
200
210
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
201
211
  /* @__PURE__ */ e(
@@ -203,8 +213,8 @@ function Rt({
203
213
  {
204
214
  type: "date",
205
215
  value: g,
206
- onChange: (r) => {
207
- k(r.target.value), d !== "between" && w(d, r.target.value, "");
216
+ onChange: (a) => {
217
+ k(a.target.value), d !== "between" && w(d, a.target.value, "");
208
218
  },
209
219
  className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
210
220
  }
@@ -216,8 +226,8 @@ function Rt({
216
226
  {
217
227
  type: "date",
218
228
  value: u,
219
- onChange: (r) => {
220
- p(r.target.value), w("between", g, r.target.value);
229
+ onChange: (a) => {
230
+ p(a.target.value), w("between", g, a.target.value);
221
231
  },
222
232
  className: "h-7 flex-1 rounded border border-slate-200 bg-background px-1 text-[12px] dark:border-border"
223
233
  }
@@ -227,13 +237,13 @@ function Rt({
227
237
  ] })
228
238
  ] });
229
239
  }
230
- function Et({
231
- value: a,
240
+ function jt({
241
+ value: r,
232
242
  placeholder: i,
233
243
  unit: c,
234
244
  onChange: o
235
245
  }) {
236
- const [m, l] = O(!1), [d, y] = a.split(":"), g = c ?? "", k = d && y ? `${d}–${y}${g}` : d ? `${d}${g}+` : y ? `≤ ${y}${g}` : i, u = (p, w) => o(p === "" && w === "" ? null : `${p}:${w}`);
246
+ const [m, l] = O(!1), [d, y] = r.split(":"), g = c ?? "", k = d && y ? `${d}–${y}${g}` : d ? `${d}${g}+` : y ? `≤ ${y}${g}` : i, u = (p, w) => o(p === "" && w === "" ? null : `${p}:${w}`);
237
247
  return /* @__PURE__ */ s(P, { open: m, onOpenChange: l, children: [
238
248
  /* @__PURE__ */ e(ee, { asChild: !0, children: /* @__PURE__ */ s(
239
249
  "button",
@@ -265,7 +275,7 @@ function Et({
265
275
  /* @__PURE__ */ e("p", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400", children: i }),
266
276
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
267
277
  /* @__PURE__ */ e(
268
- j,
278
+ F,
269
279
  {
270
280
  type: "number",
271
281
  "aria-label": `Minimum ${i}`,
@@ -277,7 +287,7 @@ function Et({
277
287
  ),
278
288
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "–" }),
279
289
  /* @__PURE__ */ e(
280
- j,
290
+ F,
281
291
  {
282
292
  type: "number",
283
293
  "aria-label": `Maximum ${i}`,
@@ -291,19 +301,19 @@ function Et({
291
301
  ] })
292
302
  ] });
293
303
  }
294
- function Tt({
295
- value: a,
304
+ function At({
305
+ value: r,
296
306
  placeholder: i,
297
307
  onChange: c
298
308
  }) {
299
- const [o, m] = O(!1), l = $e(a), [d, y] = O((l == null ? void 0 : l.op) ?? "eq"), [g, k] = O(l ? String(l.a) : ""), [u, p] = O((l == null ? void 0 : l.b) != null ? String(l.b) : "");
309
+ const [o, m] = O(!1), l = Ce(r), [d, y] = O((l == null ? void 0 : l.op) ?? "eq"), [g, k] = O(l ? String(l.a) : ""), [u, p] = O((l == null ? void 0 : l.b) != null ? String(l.b) : "");
300
310
  Y(() => {
301
311
  if (!o) return;
302
- const r = $e(a);
303
- y((r == null ? void 0 : r.op) ?? "eq"), k(r ? String(r.a) : ""), p((r == null ? void 0 : r.b) != null ? String(r.b) : "");
304
- }, [o, a]);
305
- const w = (r, S, v) => {
306
- S === "" || Number.isNaN(Number(S)) || r === "between" && (v === "" || Number.isNaN(Number(v))) || c(bt({ op: r, a: Number(S), b: v === "" ? void 0 : Number(v) }));
312
+ const a = Ce(r);
313
+ y((a == null ? void 0 : a.op) ?? "eq"), k(a ? String(a.a) : ""), p((a == null ? void 0 : a.b) != null ? String(a.b) : "");
314
+ }, [o, r]);
315
+ const w = (a, S, v) => {
316
+ S === "" || Number.isNaN(Number(S)) || a === "between" && (v === "" || Number.isNaN(Number(v))) || c(ht({ op: a, a: Number(S), b: v === "" ? void 0 : Number(v) }));
307
317
  };
308
318
  return /* @__PURE__ */ s(P, { open: o, onOpenChange: m, children: [
309
319
  /* @__PURE__ */ e(ee, { asChild: !0, children: /* @__PURE__ */ s(
@@ -313,13 +323,13 @@ function Tt({
313
323
  "data-number-filter": !0,
314
324
  className: "flex h-8 w-full items-center justify-between gap-1 rounded-md border border-slate-200 bg-slate-50 px-2 text-left text-[12px] dark:border-border dark:bg-muted",
315
325
  children: [
316
- /* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? ct(l) : i }),
326
+ /* @__PURE__ */ e("span", { className: b("truncate", !l && "text-slate-500 dark:text-muted-foreground"), children: l ? pt(l) : i }),
317
327
  l ? /* @__PURE__ */ e(
318
328
  G,
319
329
  {
320
330
  className: "h-3 w-3 shrink-0 text-slate-400 hover:text-slate-700",
321
- onClick: (r) => {
322
- r.stopPropagation(), c(null);
331
+ onClick: (a) => {
332
+ a.stopPropagation(), c(null);
323
333
  }
324
334
  }
325
335
  ) : /* @__PURE__ */ e(I, { className: "h-3.5 w-3.5 shrink-0 text-slate-400" })
@@ -327,31 +337,31 @@ function Tt({
327
337
  }
328
338
  ) }),
329
339
  /* @__PURE__ */ s(te, { align: "start", className: "w-[220px] space-y-2 p-2", children: [
330
- /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-1", children: pt.map((r) => /* @__PURE__ */ e(
340
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-4 gap-1", children: bt.map((a) => /* @__PURE__ */ e(
331
341
  "button",
332
342
  {
333
343
  type: "button",
334
- "data-number-op": r.op,
335
- "aria-pressed": d === r.op,
344
+ "data-number-op": a.op,
345
+ "aria-pressed": d === a.op,
336
346
  onClick: () => {
337
- y(r.op), w(r.op, g, u);
347
+ y(a.op), w(a.op, g, u);
338
348
  },
339
349
  className: b(
340
350
  "rounded border px-1 py-1 text-[11px] transition-colors",
341
- d === r.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
351
+ d === a.op ? "border-nvr-cyan/40 bg-nvr-cyan/10 font-medium" : "border-slate-200 text-slate-600 hover:bg-muted dark:border-border dark:text-muted-foreground"
342
352
  ),
343
- children: r.symbol
353
+ children: a.symbol
344
354
  },
345
- r.op
355
+ a.op
346
356
  )) }),
347
357
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
348
358
  /* @__PURE__ */ e(
349
- j,
359
+ F,
350
360
  {
351
361
  type: "number",
352
362
  value: g,
353
- onChange: (r) => {
354
- k(r.target.value), w(d, r.target.value, u);
363
+ onChange: (a) => {
364
+ k(a.target.value), w(d, a.target.value, u);
355
365
  },
356
366
  className: "h-7 text-[12px]"
357
367
  }
@@ -359,12 +369,12 @@ function Tt({
359
369
  d === "between" && /* @__PURE__ */ s(Q, { children: [
360
370
  /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "–" }),
361
371
  /* @__PURE__ */ e(
362
- j,
372
+ F,
363
373
  {
364
374
  type: "number",
365
375
  value: u,
366
- onChange: (r) => {
367
- p(r.target.value), w(d, g, r.target.value);
376
+ onChange: (a) => {
377
+ p(a.target.value), w(d, g, a.target.value);
368
378
  },
369
379
  className: "h-7 text-[12px]"
370
380
  }
@@ -374,25 +384,25 @@ function Tt({
374
384
  ] })
375
385
  ] });
376
386
  }
377
- function Fe({
378
- def: a,
387
+ function Ae({
388
+ def: r,
379
389
  value: i,
380
390
  onChange: c,
381
391
  layout: o = "inline"
382
392
  }) {
383
393
  const m = o === "stacked", l = o === "cell", d = typeof i == "string" ? i : "", y = m || l ? "w-full" : "w-40", g = l ? "h-7 text-[12px]" : "text-[13px]";
384
394
  let k;
385
- if (a.type === "text")
395
+ if (r.type === "text")
386
396
  k = /* @__PURE__ */ e(
387
- j,
397
+ F,
388
398
  {
389
399
  className: b("h-8 border-slate-200 bg-slate-50", g, y),
390
- placeholder: a.placeholder,
400
+ placeholder: r.placeholder,
391
401
  value: d,
392
402
  onChange: (u) => c(u.target.value)
393
403
  }
394
404
  );
395
- else if (a.type === "combobox")
405
+ else if (r.type === "combobox")
396
406
  k = /* @__PURE__ */ e(
397
407
  "div",
398
408
  {
@@ -400,42 +410,42 @@ function Fe({
400
410
  (m || l) && "[&>button]:w-full",
401
411
  l && "[&>button]:h-7 [&>button]:min-w-[88px] [&>button]:px-1.5 [&>button]:text-[12px]"
402
412
  ),
403
- children: /* @__PURE__ */ e(Mt, { def: a, value: i, onChange: c })
413
+ children: /* @__PURE__ */ e(Et, { def: r, value: i, onChange: c })
404
414
  }
405
415
  );
406
- else if (a.type === "date")
416
+ else if (r.type === "date")
407
417
  k = /* @__PURE__ */ e("div", { className: b(l && "[&>div>button]:h-7 [&>div>button]:text-[12px]", y), children: /* @__PURE__ */ e(
408
- Rt,
418
+ Tt,
409
419
  {
410
420
  value: d,
411
- placeholder: a.placeholder,
421
+ placeholder: r.placeholder,
412
422
  onChange: (u) => c(u ?? "")
413
423
  }
414
424
  ) });
415
- else if (a.type === "number")
425
+ else if (r.type === "number")
416
426
  k = /* @__PURE__ */ e("div", { className: b(l && "[&>div>button]:h-7 [&>div>button]:text-[12px]", y), children: /* @__PURE__ */ e(
417
- Tt,
427
+ At,
418
428
  {
419
429
  value: d,
420
- placeholder: a.placeholder,
430
+ placeholder: r.placeholder,
421
431
  onChange: (u) => c(u ?? "")
422
432
  }
423
433
  ) });
424
- else if (a.type === "range" && l)
434
+ else if (r.type === "range" && l)
425
435
  k = /* @__PURE__ */ e("div", { className: "[&>div>button]:h-7 [&>div>button]:text-[12px] w-full", children: /* @__PURE__ */ e(
426
- Et,
436
+ jt,
427
437
  {
428
438
  value: d,
429
- placeholder: a.placeholder,
430
- unit: a.range_unit,
439
+ placeholder: r.placeholder,
440
+ unit: r.range_unit,
431
441
  onChange: (u) => c(u ?? "")
432
442
  }
433
443
  ) });
434
- else if (a.type === "range") {
444
+ else if (r.type === "range") {
435
445
  const [u, p] = d.split(":");
436
446
  k = /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
437
447
  /* @__PURE__ */ e(
438
- j,
448
+ F,
439
449
  {
440
450
  type: "number",
441
451
  className: b(
@@ -450,7 +460,7 @@ function Fe({
450
460
  ),
451
461
  /* @__PURE__ */ e("span", { className: "text-[12px] text-slate-400", children: "–" }),
452
462
  /* @__PURE__ */ e(
453
- j,
463
+ F,
454
464
  {
455
465
  type: "number",
456
466
  className: b(
@@ -465,17 +475,17 @@ function Fe({
465
475
  )
466
476
  ] });
467
477
  } else
468
- k = /* @__PURE__ */ s(wt, { value: d === "" ? "__all__" : d, onValueChange: (p) => c(p === "__all__" ? "" : p), children: [
469
- /* @__PURE__ */ e(_t, { className: b("h-8 border-slate-200 bg-slate-50", g, y), children: /* @__PURE__ */ e(Ot, { placeholder: a.placeholder }) }),
470
- /* @__PURE__ */ s(St, { children: [
471
- /* @__PURE__ */ e(Me, { value: "__all__", children: a.placeholder }),
472
- (a.options ?? []).filter((p) => p.value !== "").map((p) => /* @__PURE__ */ e(Me, { value: p.value, children: p.label }, p.value))
478
+ k = /* @__PURE__ */ s(_t, { value: d === "" ? "__all__" : d, onValueChange: (p) => c(p === "__all__" ? "" : p), children: [
479
+ /* @__PURE__ */ e(Ot, { className: b("h-8 border-slate-200 bg-slate-50", g, y), children: /* @__PURE__ */ e(St, { placeholder: r.placeholder }) }),
480
+ /* @__PURE__ */ s($t, { children: [
481
+ /* @__PURE__ */ e(Re, { value: "__all__", children: r.placeholder }),
482
+ (r.options ?? []).filter((p) => p.value !== "").map((p) => /* @__PURE__ */ e(Re, { value: p.value, children: p.label }, p.value))
473
483
  ] })
474
484
  ] });
475
485
  return m ? /* @__PURE__ */ s("div", { className: "space-y-1", children: [
476
486
  /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
477
- Ft(a),
478
- a.restricted && /* @__PURE__ */ e(
487
+ Ft(r),
488
+ r.restricted && /* @__PURE__ */ e(
479
489
  "span",
480
490
  {
481
491
  title: "Options limited to your restricted scope",
@@ -485,7 +495,7 @@ function Fe({
485
495
  )
486
496
  ] }),
487
497
  k
488
- ] }) : a.restricted ? /* @__PURE__ */ e(
498
+ ] }) : r.restricted ? /* @__PURE__ */ e(
489
499
  "div",
490
500
  {
491
501
  title: "Options limited to your restricted scope",
@@ -494,26 +504,26 @@ function Fe({
494
504
  }
495
505
  ) : /* @__PURE__ */ e(Q, { children: k });
496
506
  }
497
- function Ft(a) {
498
- return a.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
507
+ function Ft(r) {
508
+ return r.placeholder.replace(/^Search\s+/i, "").replace(/[…]|\.{3}$/g, "");
499
509
  }
500
- function Pt(a, i) {
510
+ function tr(r, i) {
501
511
  const c = (o) => {
502
512
  var m, l;
503
- return ((l = (m = a.options) == null ? void 0 : m.find((d) => d.value === o)) == null ? void 0 : l.label) ?? o;
513
+ return ((l = (m = r.options) == null ? void 0 : m.find((d) => d.value === o)) == null ? void 0 : l.label) ?? o;
504
514
  };
505
515
  if (Array.isArray(i)) {
506
516
  const o = i.map(c);
507
517
  return o.slice(0, 2).join(", ") + (o.length > 2 ? ` +${o.length - 2}` : "");
508
518
  }
509
- if (a.type === "range") {
519
+ if (r.type === "range") {
510
520
  const [o, m] = i.split(":");
511
521
  return [o && `≥${o}`, m && `≤${m}`].filter(Boolean).join(" ");
512
522
  }
513
523
  return c(i);
514
524
  }
515
- function er({
516
- columns: a,
525
+ function rr({
526
+ columns: r,
517
527
  rows: i,
518
528
  rowKey: c,
519
529
  total: o,
@@ -526,7 +536,7 @@ function er({
526
536
  sort: u = "",
527
537
  onSortChange: p,
528
538
  onPageChange: w,
529
- onRowClick: r,
539
+ onRowClick: a,
530
540
  onRowContextMenu: S,
531
541
  searchValue: v,
532
542
  onSearchChange: X,
@@ -535,79 +545,79 @@ function er({
535
545
  filterValues: x = {},
536
546
  onFilterChange: C,
537
547
  toolbarRight: E,
538
- emptyMessage: F = "No records found.",
548
+ emptyMessage: j = "No records found.",
539
549
  minBodyHeight: q,
540
550
  fillHeight: re = !1,
541
- footer: Ae,
542
- hideFilterRow: Le = !1,
543
- nowrapCells: We = !1,
551
+ footer: Le,
552
+ hideFilterRow: We = !1,
553
+ nowrapCells: qe = !1,
544
554
  density: ae = "comfortable",
545
- pinFirstColumn: V = !1,
555
+ pinFirstColumn: A = !1,
546
556
  columnPins: f,
547
557
  onColumnPinChange: le,
548
- columnFilterRow: qe = !1,
549
- hScrollProxy: he = !1,
558
+ columnFilterRow: Ue = !1,
559
+ hScrollProxy: me = !1,
550
560
  selectedIds: T,
551
561
  onSelectionChange: z,
552
562
  rowClassName: ne,
553
563
  rowDragProps: se,
554
564
  rowTitle: ie,
555
565
  enterKey: Be,
556
- rowGroups: A,
557
- collapsedGroups: de,
558
- onToggleGroup: oe
566
+ rowGroups: V,
567
+ collapsedGroups: oe,
568
+ onToggleGroup: de
559
569
  }) {
560
- const me = Math.ceil(o / l), Ue = (m - 1) * l + 1, Je = Math.min(m * l, o), ue = !Le && R && R.length > 0, Xe = v !== void 0 || ue || E !== void 0, He = (t) => {
561
- !t.sortable || !p || p(Ct(u, t.key));
562
- }, _ = f !== void 0, L = Oe(() => {
563
- if (!_ || !f) return a;
564
- const t = a.filter((M) => f[M.key] === "left"), n = a.filter((M) => f[M.key] === "right"), h = a.filter((M) => !f[M.key]);
570
+ const ue = Math.ceil(o / l), Je = (m - 1) * l + 1, Xe = Math.min(m * l, o), xe = !We && R && R.length > 0, He = v !== void 0 || xe || E !== void 0, Qe = (t) => {
571
+ !t.sortable || !p || p(Mt(u, t.key));
572
+ }, _ = f !== void 0, L = Se(() => {
573
+ if (!_ || !f) return r;
574
+ const t = r.filter((M) => f[M.key] === "left"), n = r.filter((M) => f[M.key] === "right"), h = r.filter((M) => !f[M.key]);
565
575
  return [...t, ...h, ...n];
566
- }, [a, f, _]), xe = K({}), H = K(null), fe = K(null), ye = !d && (A ? A.length === 0 : i.length === 0), [ge, Qe] = O(null);
576
+ }, [r, f, _]), fe = K({}), H = K(null), ye = K(null), ge = !d && (V ? V.length === 0 : i.length === 0), [ke, Ye] = O(null);
567
577
  Y(() => {
568
578
  const t = H.current;
569
- if (!ye || !t) return;
570
- const n = () => Qe(t.clientWidth);
579
+ if (!ge || !t) return;
580
+ const n = () => Ye(t.clientWidth);
571
581
  if (n(), typeof ResizeObserver > "u") return;
572
582
  const h = new ResizeObserver(n);
573
583
  return h.observe(t), () => h.disconnect();
574
- }, [ye]);
575
- const [ke, Ye] = O({}), [, Ze] = O(0);
584
+ }, [ge]);
585
+ const [ve, Ze] = O({}), [, De] = O(0);
576
586
  Y(() => {
577
587
  const t = H.current;
578
588
  if (!_ || !t || typeof ResizeObserver > "u") return;
579
- const n = new ResizeObserver(() => Ze(t.clientWidth));
589
+ const n = new ResizeObserver(() => De(t.clientWidth));
580
590
  return n.observe(t), () => n.disconnect();
581
- }, [_, d]), st(() => {
582
- var we, _e;
591
+ }, [_, d]), it(() => {
592
+ var _e, Oe;
583
593
  if (!_ || !f) return;
584
594
  const t = (N) => {
585
595
  var W;
586
- return ((W = xe.current[N]) == null ? void 0 : W.getBoundingClientRect().width) ?? 120;
587
- }, n = z ? ((we = fe.current) == null ? void 0 : we.getBoundingClientRect().width) ?? 40 : 0, { left: h, right: M } = ht(
596
+ return ((W = fe.current[N]) == null ? void 0 : W.getBoundingClientRect().width) ?? 120;
597
+ }, n = z ? ((_e = ye.current) == null ? void 0 : _e.getBoundingClientRect().width) ?? 40 : 0, { left: h, right: M } = mt(
588
598
  L.filter((N) => f[N.key] === "left").map((N) => N.key),
589
599
  L.filter((N) => f[N.key] === "right").map((N) => N.key),
590
600
  t,
591
601
  n,
592
- ((_e = H.current) == null ? void 0 : _e.clientWidth) ?? 0
602
+ ((Oe = H.current) == null ? void 0 : Oe.clientWidth) ?? 0
593
603
  ), $ = {};
594
- let B = n;
604
+ let U = n;
595
605
  h.forEach((N, W) => {
596
- $[N] = { side: "left", offset: Math.floor(B), seam: W === h.length - 1 }, B += t(N);
606
+ $[N] = { side: "left", offset: Math.floor(U), seam: W === h.length - 1 }, U += t(N);
597
607
  });
598
- let Ne = 0;
608
+ let we = 0;
599
609
  for (let N = M.length - 1; N >= 0; N--) {
600
610
  const W = M[N];
601
- $[W] = { side: "right", offset: Math.floor(Ne), seam: N === 0 }, Ne += t(W);
611
+ $[W] = { side: "right", offset: Math.floor(we), seam: N === 0 }, we += t(W);
602
612
  }
603
- Ye((N) => JSON.stringify(N) === JSON.stringify($) ? N : $);
613
+ Ze((N) => JSON.stringify(N) === JSON.stringify($) ? N : $);
604
614
  });
605
615
  const ce = (t) => {
606
- const n = ke[t];
616
+ const n = ve[t];
607
617
  if (!(!_ || !n))
608
618
  return n.side === "left" ? { left: n.offset } : { right: n.offset };
609
619
  }, pe = (t, n) => {
610
- const h = ke[t];
620
+ const h = ve[t];
611
621
  if (!(!_ || !h))
612
622
  return b(
613
623
  // dt-pinned: pinned headers offset via inline style (not left-0), so the
@@ -618,18 +628,18 @@ function er({
618
628
  h.side === "left" && h.seam && "border-r border-slate-200 dark:border-border",
619
629
  h.side === "right" && h.seam && "border-l border-slate-200 dark:border-border"
620
630
  );
621
- }, De = (t) => {
631
+ }, Ke = (t) => {
622
632
  if (!le) return;
623
633
  const n = (f == null ? void 0 : f[t]) ?? null;
624
634
  le(t, n === null ? "left" : n === "left" ? "right" : null);
625
- }, Ke = Oe(() => {
635
+ }, Ie = Se(() => {
626
636
  const t = /* @__PURE__ */ new Map();
627
637
  for (const n of R ?? []) t.set(n.key, n);
628
638
  return t;
629
- }, [R]), Ie = qe && ((R == null ? void 0 : R.length) ?? 0) > 0, ve = (t, n) => {
639
+ }, [R]), Ge = Ue && ((R == null ? void 0 : R.length) ?? 0) > 0, Ne = (t, n) => {
630
640
  const h = c ? c(t, n) : String(n), M = (T == null ? void 0 : T.includes(h)) ?? !1;
631
641
  return /* @__PURE__ */ s(
632
- U,
642
+ B,
633
643
  {
634
644
  ...se == null ? void 0 : se(t),
635
645
  className: b(
@@ -637,19 +647,19 @@ function er({
637
647
  // their own local group, and claiming the unnamed one here would
638
648
  // make those reveal on row hover instead.
639
649
  "group/row nvr-row-enter border-slate-100 transition-colors duration-150",
640
- (V || _) && "bg-white dark:bg-card",
641
- r && (V || _ ? "cursor-pointer hover:bg-slate-50 dark:hover:bg-muted" : "cursor-pointer hover:bg-slate-50/80"),
650
+ (A || _) && "bg-white dark:bg-card",
651
+ a && (A || _ ? "cursor-pointer hover:bg-slate-50 dark:hover:bg-muted" : "cursor-pointer hover:bg-slate-50/80"),
642
652
  ne == null ? void 0 : ne(t),
643
653
  // Pinned sticky cells use bg-inherit, so a selected row's bg must be
644
654
  // OPAQUE or horizontally-scrolled content bleeds through the pinned
645
655
  // column. bg-nvr-cyan/5 is semi-transparent — use an opaque equivalent
646
656
  // (5% nvr-cyan #00ceff over white / card) when pinning.
647
- M && (V || _ ? "bg-[#f2fdff] dark:bg-[#20303a]" : "bg-nvr-cyan/5")
657
+ M && (A || _ ? "bg-[#f2fdff] dark:bg-[#20303a]" : "bg-nvr-cyan/5")
648
658
  ),
649
659
  style: { animationDelay: `${Math.min(n, 14) * 16}ms` },
650
660
  "data-row-key": h,
651
661
  title: ie == null ? void 0 : ie(t),
652
- onClick: () => r == null ? void 0 : r(t),
662
+ onClick: () => a == null ? void 0 : a(t),
653
663
  onContextMenu: S ? ($) => S(t, $) : void 0,
654
664
  children: [
655
665
  z && /* @__PURE__ */ e(
@@ -658,23 +668,23 @@ function er({
658
668
  className: b(
659
669
  "w-9 px-3",
660
670
  ae === "compact" ? "py-1" : "py-2",
661
- (V || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
671
+ (A || _) && "sticky left-0 z-[1] min-w-[40px] bg-inherit"
662
672
  ),
663
673
  onClick: ($) => {
664
- $.stopPropagation(), z(M ? (T == null ? void 0 : T.filter((B) => B !== h)) ?? [] : [...T ?? [], h]);
674
+ $.stopPropagation(), z(M ? (T == null ? void 0 : T.filter((U) => U !== h)) ?? [] : [...T ?? [], h]);
665
675
  },
666
- children: /* @__PURE__ */ e(ze, { checked: M, "aria-label": "Select row" })
676
+ children: /* @__PURE__ */ e(Me, { checked: M, "aria-label": "Select row" })
667
677
  }
668
678
  ),
669
- L.map(($, B) => /* @__PURE__ */ e(
679
+ L.map(($, U) => /* @__PURE__ */ e(
670
680
  D,
671
681
  {
672
682
  style: ce($.key),
673
683
  className: b(
674
684
  "px-3",
675
685
  ae === "compact" ? "py-1" : "py-2",
676
- We && "whitespace-nowrap",
677
- !_ && V && B === 0 && b(
686
+ qe && "whitespace-nowrap",
687
+ !_ && A && U === 0 && b(
678
688
  "sticky z-[1] border-r border-slate-100 bg-inherit dark:border-border",
679
689
  z ? "left-[39px]" : "left-0"
680
690
  ),
@@ -691,7 +701,7 @@ function er({
691
701
  );
692
702
  };
693
703
  return /* @__PURE__ */ s(Q, { children: [
694
- /* @__PURE__ */ e(mt, {}),
704
+ /* @__PURE__ */ e(ut, {}),
695
705
  y && g && /* @__PURE__ */ s(
696
706
  "div",
697
707
  {
@@ -722,11 +732,11 @@ function er({
722
732
  re && "flex h-full min-h-0 flex-col"
723
733
  ),
724
734
  children: [
725
- Xe && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
735
+ He && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2 border-b border-slate-100 px-3 py-2.5", children: [
726
736
  X !== void 0 && /* @__PURE__ */ s("div", { className: "relative min-w-0 max-w-full", children: [
727
- /* @__PURE__ */ e(Ge, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
737
+ /* @__PURE__ */ e(Pe, { className: "absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400" }),
728
738
  /* @__PURE__ */ e(
729
- j,
739
+ F,
730
740
  {
731
741
  className: "h-8 w-56 max-w-full border-slate-200 bg-slate-50 pl-8 text-[13px]",
732
742
  placeholder: Z,
@@ -735,8 +745,8 @@ function er({
735
745
  }
736
746
  )
737
747
  ] }),
738
- ue && (R == null ? void 0 : R.map((t) => /* @__PURE__ */ e(
739
- Fe,
748
+ xe && (R == null ? void 0 : R.map((t) => /* @__PURE__ */ e(
749
+ Ae,
740
750
  {
741
751
  def: t,
742
752
  value: x[t.key] ?? "",
@@ -758,8 +768,8 @@ function er({
758
768
  "aria-busy": "true",
759
769
  className: b(re && "min-h-0 flex-1 overflow-hidden"),
760
770
  style: q ? { minHeight: q } : void 0,
761
- children: /* @__PURE__ */ s(Re, { className: "border-separate border-spacing-0", children: [
762
- /* @__PURE__ */ e(Ee, { children: /* @__PURE__ */ s(U, { className: "border-b border-slate-200 hover:bg-transparent", children: [
771
+ children: /* @__PURE__ */ s(Ee, { className: "border-separate border-spacing-0", children: [
772
+ /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ s(B, { className: "border-b border-slate-200 hover:bg-transparent", children: [
763
773
  z && /* @__PURE__ */ e(J, { className: "h-9 w-9 border-b border-slate-200 bg-slate-50 px-3 py-0 dark:border-border dark:bg-muted" }),
764
774
  L.map((t) => /* @__PURE__ */ e(
765
775
  J,
@@ -773,11 +783,11 @@ function er({
773
783
  t.key
774
784
  ))
775
785
  ] }) }),
776
- /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(
777
- ft,
786
+ /* @__PURE__ */ e(je, { children: /* @__PURE__ */ e(
787
+ yt,
778
788
  {
779
789
  columns: L.map((t) => ({ key: t.key })),
780
- rows: Math.min(Math.max(l ?? $t.length, 1), 15),
790
+ rows: Math.min(Math.max(l ?? Ct.length, 1), 15),
781
791
  rowClassName: "",
782
792
  cellClassName: b("px-3", ae === "compact" ? "py-1" : "py-2"),
783
793
  leadingCells: z ? 1 : 0
@@ -792,7 +802,7 @@ function er({
792
802
  {
793
803
  ref: H,
794
804
  className: b(
795
- he && "overflow-x-hidden [&>div]:overflow-visible",
805
+ me && "overflow-x-hidden [&>div]:overflow-visible",
796
806
  // Bounded mode: rows scroll here under a sticky header. Header
797
807
  // cells sit above pinned body cells (z-[1/2]); the pinned
798
808
  // header corner (left-0) tops the other header cells so
@@ -801,23 +811,23 @@ function er({
801
811
  ),
802
812
  style: q ? { minHeight: q } : void 0,
803
813
  children: /* @__PURE__ */ s(
804
- Re,
814
+ Ee,
805
815
  {
806
816
  "data-copy-cells": "",
807
817
  className: "border-separate border-spacing-0 [&>tbody>tr.border-b:not(:last-child)>td]:border-b [&>tbody>tr.border-b:not(:last-child)>td]:[border-bottom-color:inherit] [&>thead>tr.border-b>th]:border-b [&>thead>tr.border-b>th]:[border-bottom-color:inherit]",
808
818
  children: [
809
- /* @__PURE__ */ s(Ee, { children: [
810
- /* @__PURE__ */ s(U, { className: "border-b border-slate-200 hover:bg-transparent", children: [
819
+ /* @__PURE__ */ s(Te, { children: [
820
+ /* @__PURE__ */ s(B, { className: "border-b border-slate-200 hover:bg-transparent", children: [
811
821
  z && /* @__PURE__ */ e(
812
822
  J,
813
823
  {
814
- ref: fe,
824
+ ref: ye,
815
825
  className: b(
816
826
  "h-9 w-9 bg-slate-50 px-3 py-0",
817
- (V || _) && "sticky left-0 z-[2] min-w-[40px]"
827
+ (A || _) && "sticky left-0 z-[2] min-w-[40px]"
818
828
  ),
819
829
  children: /* @__PURE__ */ e(
820
- ze,
830
+ Me,
821
831
  {
822
832
  checked: i.length > 0 && i.every((t, n) => {
823
833
  const h = c ? c(t, n) : String(n);
@@ -837,13 +847,13 @@ function er({
837
847
  J,
838
848
  {
839
849
  ref: (h) => {
840
- xe.current[t.key] = h;
850
+ fe.current[t.key] = h;
841
851
  },
842
852
  style: ce(t.key),
843
853
  className: b(
844
854
  "group/th h-9 whitespace-nowrap bg-slate-50 px-3 py-0 text-[11px] font-medium text-slate-500",
845
855
  t.sortable && p && "cursor-pointer select-none hover:text-slate-600",
846
- !_ && V && n === 0 && b(
856
+ !_ && A && n === 0 && b(
847
857
  "sticky z-[2] border-r border-slate-200 dark:border-border",
848
858
  z ? "left-[39px]" : "left-0"
849
859
  ),
@@ -851,25 +861,25 @@ function er({
851
861
  pe(t.key, !0),
852
862
  t.headerClassName
853
863
  ),
854
- onClick: () => He(t),
864
+ onClick: () => Qe(t),
855
865
  children: /* @__PURE__ */ s("span", { className: "inline-flex items-center", children: [
856
866
  t.header,
857
- t.sortable && p && /* @__PURE__ */ e(zt, { field: t.key, sort: u }),
867
+ t.sortable && p && /* @__PURE__ */ e(Rt, { field: t.key, sort: u }),
858
868
  _ && le && t.key !== "claim" && /* @__PURE__ */ e(
859
869
  "button",
860
870
  {
861
871
  type: "button",
862
872
  onClick: (h) => {
863
- h.stopPropagation(), De(t.key);
873
+ h.stopPropagation(), Ke(t.key);
864
874
  },
865
- "aria-label": `Pin column ${t.key}`,
875
+ "aria-label": `Pin column ${zt(t)}`,
866
876
  title: (f == null ? void 0 : f[t.key]) === "left" ? "Pinned left — click to pin right" : (f == null ? void 0 : f[t.key]) === "right" ? "Pinned right — click to unpin" : "Pin column",
867
877
  className: b(
868
878
  "ml-1 rounded p-0.5 transition-opacity",
869
879
  f != null && f[t.key] ? "text-nvr-cyan opacity-100" : "text-slate-300 opacity-0 hover:text-slate-500 group-hover/th:opacity-100"
870
880
  ),
871
881
  children: /* @__PURE__ */ e(
872
- Pe,
882
+ et,
873
883
  {
874
884
  className: b(
875
885
  "h-3 w-3",
@@ -884,18 +894,18 @@ function er({
884
894
  t.key
885
895
  ))
886
896
  ] }),
887
- Ie && /* @__PURE__ */ s(U, { className: "border-b border-slate-200 hover:bg-transparent", children: [
897
+ Ge && /* @__PURE__ */ s(B, { className: "border-b border-slate-200 hover:bg-transparent", children: [
888
898
  z && /* @__PURE__ */ e(
889
899
  J,
890
900
  {
891
901
  className: b(
892
902
  "h-9 w-9 bg-slate-50 px-3 py-1",
893
- (V || _) && "sticky left-0 z-[2] min-w-[40px]"
903
+ (A || _) && "sticky left-0 z-[2] min-w-[40px]"
894
904
  )
895
905
  }
896
906
  ),
897
907
  L.map((t) => {
898
- const n = Ke.get(t.key);
908
+ const n = Ie.get(t.key);
899
909
  return /* @__PURE__ */ e(
900
910
  J,
901
911
  {
@@ -906,7 +916,7 @@ function er({
906
916
  pe(t.key, !0)
907
917
  ),
908
918
  children: n && C ? /* @__PURE__ */ e(
909
- Fe,
919
+ Ae,
910
920
  {
911
921
  def: n,
912
922
  value: x[n.key] ?? "",
@@ -920,23 +930,23 @@ function er({
920
930
  })
921
931
  ] })
922
932
  ] }),
923
- /* @__PURE__ */ s(Te, { className: "tabular-nums", children: [
924
- A ? A.map((t) => {
925
- const n = (de == null ? void 0 : de.has(t.key)) ?? !1;
926
- return /* @__PURE__ */ s(nt.Fragment, { children: [
933
+ /* @__PURE__ */ s(je, { className: "tabular-nums", children: [
934
+ V ? V.map((t) => {
935
+ const n = (oe == null ? void 0 : oe.has(t.key)) ?? !1;
936
+ return /* @__PURE__ */ s(st.Fragment, { children: [
927
937
  /* @__PURE__ */ e(
928
- U,
938
+ B,
929
939
  {
930
940
  className: "nvr-row-enter cursor-pointer border-slate-200 bg-slate-50/80 transition-colors hover:bg-slate-100/80 dark:bg-muted/40",
931
- onClick: () => oe == null ? void 0 : oe(t.key),
941
+ onClick: () => de == null ? void 0 : de(t.key),
932
942
  children: /* @__PURE__ */ e(
933
943
  D,
934
944
  {
935
- colSpan: a.length + (z ? 1 : 0),
945
+ colSpan: r.length + (z ? 1 : 0),
936
946
  className: "px-3 py-1.5",
937
947
  children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5 text-[12px] font-medium text-slate-600 dark:text-foreground", children: [
938
948
  /* @__PURE__ */ e(
939
- et,
949
+ tt,
940
950
  {
941
951
  className: b(
942
952
  "h-3.5 w-3.5 text-slate-400 transition-transform duration-200",
@@ -950,22 +960,22 @@ function er({
950
960
  )
951
961
  }
952
962
  ),
953
- !n && t.rows.map((h, M) => ve(h, M))
963
+ !n && t.rows.map((h, M) => Ne(h, M))
954
964
  ] }, t.key);
955
- }) : i.map((t, n) => ve(t, n)),
956
- (A ? A.length === 0 : i.length === 0) && /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
965
+ }) : i.map((t, n) => Ne(t, n)),
966
+ (V ? V.length === 0 : i.length === 0) && /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
957
967
  D,
958
968
  {
959
- colSpan: a.length + (z ? 1 : 0),
969
+ colSpan: r.length + (z ? 1 : 0),
960
970
  className: "nvr-fade-in p-0 text-center align-middle text-[13px] text-slate-400",
961
971
  style: q ? { height: Math.max(96, q - 56) } : void 0,
962
972
  children: /* @__PURE__ */ e(
963
973
  "div",
964
974
  {
965
975
  className: "sticky left-0 py-12",
966
- style: ge ? { width: ge } : void 0,
976
+ style: ke ? { width: ke } : void 0,
967
977
  "data-table-empty": !0,
968
- children: typeof F == "string" ? /* @__PURE__ */ e(ut, { icon: tt, title: F }) : F
978
+ children: typeof j == "string" ? /* @__PURE__ */ e(xt, { icon: rt, title: j }) : j
969
979
  }
970
980
  )
971
981
  }
@@ -976,20 +986,20 @@ function er({
976
986
  )
977
987
  }
978
988
  ),
979
- he && /* @__PURE__ */ e(xt, { scrollerRef: H }),
980
- Ae,
981
- !A && o > l && /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-t border-slate-100 px-4 py-2.5", children: [
989
+ me && /* @__PURE__ */ e(ft, { scrollerRef: H }),
990
+ Le,
991
+ !V && o > l && /* @__PURE__ */ s("div", { className: "flex items-center justify-between border-t border-slate-100 px-4 py-2.5", children: [
982
992
  /* @__PURE__ */ s("p", { className: "text-[12px] text-slate-400", children: [
983
- be(Ue),
984
- "–",
985
993
  be(Je),
994
+ "–",
995
+ be(Xe),
986
996
  " of ",
987
997
  be(o),
988
998
  " records"
989
999
  ] }),
990
1000
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
991
1001
  /* @__PURE__ */ e(
992
- Ce,
1002
+ ze,
993
1003
  {
994
1004
  variant: "ghost",
995
1005
  size: "sm",
@@ -1002,15 +1012,15 @@ function er({
1002
1012
  /* @__PURE__ */ s("span", { className: "px-2 text-[12px] text-slate-400", children: [
1003
1013
  m,
1004
1014
  " / ",
1005
- me
1015
+ ue
1006
1016
  ] }),
1007
1017
  /* @__PURE__ */ e(
1008
- Ce,
1018
+ ze,
1009
1019
  {
1010
1020
  variant: "ghost",
1011
1021
  size: "sm",
1012
1022
  className: "h-7 px-2.5 text-[12px] text-slate-600",
1013
- disabled: m >= me,
1023
+ disabled: m >= ue,
1014
1024
  onClick: () => w(m + 1),
1015
1025
  children: "Next →"
1016
1026
  }
@@ -1024,8 +1034,9 @@ function er({
1024
1034
  ] });
1025
1035
  }
1026
1036
  export {
1027
- er as DataTable,
1028
- Fe as FilterControl,
1037
+ rr as DataTable,
1038
+ Ae as FilterControl,
1029
1039
  Ft as filterDefLabel,
1030
- Pt as filterValueDisplay
1040
+ tr as filterValueDisplay,
1041
+ zt as pinColumnName
1031
1042
  };