@nivaro/react 0.3.13 → 0.3.15

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