@nivaro/react 0.3.57 → 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 (50) hide show
  1. package/dist/full.css +1 -1
  2. package/dist/hooks/useSessionRecorder.js +1 -1
  3. package/dist/index.d.ts +5 -1
  4. package/dist/shared/components/CollectionBrowserView.js +2633 -2590
  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/QueueQuickFilters.js +48 -48
  40. package/dist/shared/components/queue/QueueWorklist.js +357 -358
  41. package/dist/shared/components/queue/group-sums.js +27 -0
  42. package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
  43. package/dist/shared/lib/back-closes.js +25 -0
  44. package/dist/shared/lib/form-usage-beacon.js +7 -7
  45. package/dist/shared/lib/list-page-memory.js +41 -0
  46. package/dist/shared/lib/live.js +44 -44
  47. package/dist/shared/lib/own-writes.js +76 -28
  48. package/dist/shared/lib/request-gate.js +110 -109
  49. package/dist/shared/lib/validation-rules.js +34 -19
  50. package/package.json +1 -1
@@ -1,218 +1,240 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { useQuery as p } from "@tanstack/react-query";
3
- import { Loader2 as Z, AlertTriangle as me, ChevronDown as M, Search as ue, X as fe, Check as F, ChevronRight as he } from "lucide-react";
4
- import { useState as B, useRef as ee, useEffect as Q, useMemo as z } from "react";
5
- import { useNivaroClient as be } from "../../context.js";
6
- import { get as y } from "../../lib/commands.js";
7
- import { matchesAllTokens as pe, cn as L } from "../../lib/utils.js";
8
- import { applyDisplayTemplate as x } from "./helpers.js";
9
- import { useStaleTip as ye } from "./RelationCombobox.js";
10
- function Te({
1
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
+ import { useQuery as g } from "@tanstack/react-query";
3
+ import { Loader2 as F, AlertTriangle as ue, ChevronDown as ee, Search as fe, X as pe, Check as te, ChevronRight as be } from "lucide-react";
4
+ import { useState as P, useRef as Q, useEffect as C, useMemo as z } from "react";
5
+ import { useNivaroClient as he } from "../../context.js";
6
+ import { get as x } from "../../lib/commands.js";
7
+ import { matchesAllTokens as ye, cn as j } from "../../lib/utils.js";
8
+ import { applyDisplayTemplate as w } from "./helpers.js";
9
+ import { NAMELESS_LABEL as ge } from "./option-disambiguate.js";
10
+ import { useStaleTip as xe } from "./RelationCombobox.js";
11
+ function Ee({
11
12
  collection: m,
12
- value: s,
13
- onChange: j,
14
- groupField: o,
13
+ value: o,
14
+ onChange: K,
15
+ groupField: i,
15
16
  optionField: l,
16
- disabled: P,
17
- placeholder: te,
18
- extraFilter: $,
19
- pinned: i
17
+ disabled: X,
18
+ placeholder: ne,
19
+ extraFilter: _,
20
+ pinned: c
20
21
  }) {
21
- const h = be(), [b, g] = B(!1), [w, X] = B(""), [ne, K] = B(/* @__PURE__ */ new Set()), H = ee(null), R = ee(null);
22
- Q(() => {
23
- b ? setTimeout(() => {
24
- var e;
25
- return (e = H.current) == null ? void 0 : e.focus();
26
- }, 30) : (X(""), K(/* @__PURE__ */ new Set()));
27
- }, [b]), Q(() => {
28
- if (!b) return;
22
+ const h = he(), [u, y] = P(!1), [N, H] = P(""), [re, R] = P(/* @__PURE__ */ new Set()), U = Q(null), v = Q(null), V = Q(null);
23
+ C(() => {
24
+ if (!u) return;
29
25
  const e = (t) => {
30
- R.current && !R.current.contains(t.target) && g(!1);
26
+ var a, b;
27
+ if (t.key !== "Escape") return;
28
+ const r = document.activeElement;
29
+ r !== document.body && !(r && ((a = v.current) != null && a.contains(r))) || (t.preventDefault(), t.stopPropagation(), y(!1), (b = V.current) == null || b.focus());
30
+ }, n = (t) => {
31
+ var a;
32
+ const r = t.target;
33
+ r && r !== document.body && !((a = v.current) != null && a.contains(r)) && y(!1);
34
+ };
35
+ return window.addEventListener("keydown", e, !0), document.addEventListener("focusin", n), () => {
36
+ window.removeEventListener("keydown", e, !0), document.removeEventListener("focusin", n);
37
+ };
38
+ }, [u]), C(() => {
39
+ u ? setTimeout(() => {
40
+ var e;
41
+ return (e = U.current) == null ? void 0 : e.focus();
42
+ }, 30) : (H(""), R(/* @__PURE__ */ new Set()));
43
+ }, [u]), C(() => {
44
+ if (!u) return;
45
+ const e = (n) => {
46
+ v.current && !v.current.contains(n.target) && y(!1);
31
47
  };
32
48
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
33
- }, [b]);
34
- const { data: f } = p({
49
+ }, [u]);
50
+ const { data: p } = g({
35
51
  queryKey: ["col-meta", m],
36
- queryFn: () => h.request(y(`/collections/${m}`)).then((e) => e.data),
52
+ queryFn: () => h.request(x(`/collections/${m}`)).then((e) => e.data),
37
53
  staleTime: 3e5,
38
54
  retry: !1
39
- }), O = z(
55
+ }), D = z(
40
56
  () => {
41
57
  var e;
42
- return ((e = ((f == null ? void 0 : f.relations) ?? []).find((t) => t.many_field === o && !t.junction_field)) == null ? void 0 : e.one_collection) ?? null;
58
+ return ((e = ((p == null ? void 0 : p.relations) ?? []).find((n) => n.many_field === i && !n.junction_field)) == null ? void 0 : e.one_collection) ?? null;
43
59
  },
44
- [f, o]
45
- ), D = z(
60
+ [p, i]
61
+ ), O = z(
46
62
  () => {
47
63
  var e;
48
- return ((e = ((f == null ? void 0 : f.relations) ?? []).find((t) => t.many_field === l && !t.junction_field)) == null ? void 0 : e.one_collection) ?? null;
64
+ return ((e = ((p == null ? void 0 : p.relations) ?? []).find((n) => n.many_field === l && !n.junction_field)) == null ? void 0 : e.one_collection) ?? null;
49
65
  },
50
- [f, l]
51
- ), { data: E } = p({
52
- queryKey: ["col-meta", O],
66
+ [p, l]
67
+ ), { data: A } = g({
68
+ queryKey: ["col-meta", D],
53
69
  queryFn: () => h.request(
54
- y(`/collections/${O}`)
70
+ x(`/collections/${D}`)
55
71
  ).then((e) => e.data),
56
- enabled: !!O,
72
+ enabled: !!D,
57
73
  staleTime: 3e5,
58
74
  retry: !1
59
- }), { data: G } = p({
60
- queryKey: ["col-meta", D],
75
+ }), { data: G } = g({
76
+ queryKey: ["col-meta", O],
61
77
  queryFn: () => h.request(
62
- y(`/collections/${D}`)
78
+ x(`/collections/${O}`)
63
79
  ).then((e) => e.data),
64
- enabled: !!D,
80
+ enabled: !!O,
65
81
  staleTime: 3e5,
66
82
  retry: !1
67
- }), U = `id,${o}.*,${l}.*`, N = $ ? JSON.stringify($) : void 0, { data: T, isFetching: re } = p({
68
- queryKey: ["relation-grouped-opts", m, o, l, N],
83
+ }), W = `id,${i}.*,${l}.*`, k = _ ? JSON.stringify(_) : void 0, { data: T, isFetching: se } = g({
84
+ queryKey: ["relation-grouped-opts", m, i, l, k],
69
85
  queryFn: () => h.request(
70
- y(`/items/${m}`, {
86
+ x(`/items/${m}`, {
71
87
  limit: 1e3,
72
88
  picker: "1",
73
- fields: U,
74
- ...N ? { filter: N } : {}
89
+ fields: W,
90
+ ...k ? { filter: k } : {}
75
91
  })
76
92
  ).then((e) => e.data ?? []),
77
- enabled: b,
78
- staleTime: N ? 0 : 3e4
79
- }), { data: S, isLoading: se } = p({
80
- queryKey: ["relation-grouped-single", m, String(s), o, l],
81
- queryFn: () => h.request(y(`/items/${m}/${s}`, { fields: U })).then((e) => e.data),
82
- enabled: !!s,
93
+ enabled: u,
94
+ staleTime: k ? 0 : 3e4
95
+ }), { data: S, isLoading: ae } = g({
96
+ queryKey: ["relation-grouped-single", m, String(o), i, l],
97
+ queryFn: () => h.request(x(`/items/${m}/${o}`, { fields: W })).then((e) => e.data),
98
+ enabled: !!o,
83
99
  staleTime: 6e4
84
- }), ae = JSON.stringify($ ? { _and: [{ id: { _eq: s } }, $] } : { id: { _eq: s } }), { data: V } = p({
85
- queryKey: ["relation-avail", m, String(s), N],
100
+ }), oe = JSON.stringify(_ ? { _and: [{ id: { _eq: o } }, _] } : { id: { _eq: o } }), { data: Y } = g({
101
+ queryKey: ["relation-avail", m, String(o), k],
86
102
  queryFn: () => h.request(
87
- y(`/items/${m}`, {
88
- filter: ae,
103
+ x(`/items/${m}`, {
104
+ filter: oe,
89
105
  picker: "1",
90
106
  limit: 1,
91
107
  fields: "id"
92
108
  })
93
109
  ).then((e) => e.data ?? []),
94
- enabled: !!s && !!S,
110
+ enabled: !!o && !!S,
95
111
  staleTime: 3e4
96
- }), I = !!s && V !== void 0 && V.length === 0, _ = E == null ? void 0 : E.display_template, k = G == null ? void 0 : G.display_template, C = z(() => {
97
- const e = T ?? [], t = w.toLowerCase(), n = /* @__PURE__ */ new Map();
98
- for (const a of e) {
99
- const c = a[o], v = a[l], A = c ? String(c.id ?? "") : "__none__", Y = c ? x(_, c) : "—", de = v ? x(k, v) : String(a.id ?? "");
100
- t && !pe(`${Y} ${de}`, t) || (n.has(A) || n.set(A, { label: Y, items: [] }), n.get(A).items.push(a));
112
+ }), I = !!o && Y !== void 0 && Y.length === 0, $ = A == null ? void 0 : A.display_template, q = G == null ? void 0 : G.display_template, E = z(() => {
113
+ const e = T ?? [], n = N.toLowerCase(), t = /* @__PURE__ */ new Map();
114
+ for (const r of e) {
115
+ const a = r[i], b = r[l], J = a ? String(a.id ?? "") : "__none__", M = a ? w($, a) : "—", me = b ? w(q, b) : String(r.id ?? "");
116
+ n && !ye(`${M} ${me}`, n) || (t.has(J) || t.set(J, { label: M, items: [] }), t.get(J).items.push(r));
101
117
  }
102
- return [...n.entries()].map(([a, c]) => ({ id: a, label: c.label, items: c.items }));
103
- }, [T, w, o, l, _, k]);
104
- Q(() => {
105
- w && K(new Set(C.map((e) => e.id)));
106
- }, [w, C]);
118
+ return [...t.entries()].map(([r, a]) => ({ id: r, label: a.label, items: a.items }));
119
+ }, [T, N, i, l, $, q]);
120
+ C(() => {
121
+ N && R(new Set(E.map((e) => e.id)));
122
+ }, [N, E]);
107
123
  function le(e) {
108
- K((t) => {
109
- const n = new Set(t);
110
- return n.has(e) ? n.delete(e) : n.add(e), n;
124
+ R((n) => {
125
+ const t = new Set(n);
126
+ return t.has(e) ? t.delete(e) : t.add(e), t;
111
127
  });
112
128
  }
113
- const u = (i == null ? void 0 : i.id) != null && i.id !== "" ? String(i.id) : null, { data: oe } = p({
114
- queryKey: ["relation-grouped-single", m, u ?? "", o, l],
129
+ const f = (c == null ? void 0 : c.id) != null && c.id !== "" ? String(c.id) : null, { data: ie } = g({
130
+ queryKey: ["relation-grouped-single", m, f ?? "", i, l],
115
131
  queryFn: () => h.request(
116
- y(`/items/${m}/${u}`, { fields: `id,${o}.*,${l}.*` })
132
+ x(`/items/${m}/${f}`, { fields: `id,${i}.*,${l}.*` })
117
133
  ).then((e) => e.data).catch(() => null),
118
- enabled: !!u && b && !(T ?? []).some((e) => String(e.id) === u),
134
+ enabled: !!f && u && !(T ?? []).some((e) => String(e.id) === f),
119
135
  staleTime: 6e4
120
- }), q = u ? (T ?? []).find((e) => String(e.id) === u) ?? oe ?? null : null, ie = (e) => {
121
- const t = e[o], n = e[l], a = t ? x(_, t) : null, c = n ? x(k, n) : null;
122
- return [a, c].filter(Boolean).join(" — ") || `#${String(e.id)}`;
136
+ }), L = f ? (T ?? []).find((e) => String(e.id) === f) ?? ie ?? null : null, ce = (e) => {
137
+ const n = e[i], t = e[l], r = n ? w($, n) : null, a = t ? w(q, t) : null;
138
+ return [r, a].filter(Boolean).join(" — ") || ge;
123
139
  };
124
- let J = null;
140
+ let B = null;
125
141
  if (S) {
126
- const e = S[o], t = S[l], n = e ? x(_, e) : null, a = t ? x(k, t) : null;
127
- J = [n, a].filter(Boolean).join(" — ") || null;
142
+ const e = S[i], n = S[l], t = e ? w($, e) : null, r = n ? w(q, n) : null;
143
+ B = [t, r].filter(Boolean).join(" — ") || null;
128
144
  }
129
- const ce = !!s && se && !S, W = ye(I);
130
- return /* @__PURE__ */ d("div", { ref: R, className: "relative", ...W.bind, children: [
145
+ const de = !!o && ae && !S, Z = xe(I);
146
+ return /* @__PURE__ */ d("div", { ref: v, className: "relative", ...Z.bind, children: [
131
147
  /* @__PURE__ */ d(
132
148
  "button",
133
149
  {
150
+ ref: V,
134
151
  type: "button",
135
- disabled: P,
136
- onClick: () => g((e) => !e),
137
- className: L(
152
+ disabled: X,
153
+ "aria-haspopup": "listbox",
154
+ "aria-expanded": u,
155
+ onClick: () => y((e) => !e),
156
+ className: j(
138
157
  "flex h-9 w-full items-center justify-between gap-2 rounded-md border bg-background px-3 text-sm text-left hover:bg-muted disabled:pointer-events-none disabled:opacity-50",
139
158
  I ? "border-amber-300 dark:border-amber-600" : "border-input"
140
159
  ),
141
160
  children: [
142
- ce ? /* @__PURE__ */ r(Z, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }) : /* @__PURE__ */ d(
161
+ de ? /* @__PURE__ */ s(F, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }) : /* @__PURE__ */ d(
143
162
  "span",
144
163
  {
145
- className: L(
164
+ className: j(
146
165
  "flex items-center gap-1.5 truncate min-w-0",
147
- !J && "text-muted-foreground"
166
+ !B && "text-muted-foreground"
148
167
  ),
149
168
  children: [
150
- I && /* @__PURE__ */ r(me, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" }),
151
- /* @__PURE__ */ r("span", { className: "truncate", children: J ?? te ?? "Select…" })
169
+ I && /* @__PURE__ */ s(ue, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" }),
170
+ /* @__PURE__ */ s("span", { className: "truncate", children: B ?? ne ?? "Select…" })
152
171
  ]
153
172
  }
154
173
  ),
155
- /* @__PURE__ */ r(M, { className: "h-4 w-4 shrink-0 opacity-50" })
174
+ /* @__PURE__ */ s(ee, { className: "h-4 w-4 shrink-0 opacity-50" })
156
175
  ]
157
176
  }
158
177
  ),
159
- W.tip,
160
- b && /* @__PURE__ */ d("div", { className: "absolute z-50 mt-1 min-w-[280px] w-max max-w-[420px] rounded-md border border-border bg-popover shadow-md", children: [
178
+ Z.tip,
179
+ u && /* @__PURE__ */ d("div", { className: "absolute z-50 mt-1 min-w-[280px] w-max max-w-[420px] rounded-md border border-border bg-popover shadow-md", children: [
161
180
  /* @__PURE__ */ d("div", { className: "flex items-center border-b px-3", children: [
162
- /* @__PURE__ */ r(ue, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
163
- /* @__PURE__ */ r(
181
+ /* @__PURE__ */ s(fe, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
182
+ /* @__PURE__ */ s(
164
183
  "input",
165
184
  {
166
- ref: H,
167
- value: w,
168
- onChange: (e) => X(e.target.value),
185
+ ref: U,
186
+ value: N,
187
+ onChange: (e) => H(e.target.value),
188
+ onKeyDown: (e) => {
189
+ e.key === "Enter" && e.preventDefault();
190
+ },
169
191
  placeholder: "Search…",
170
192
  className: "flex h-9 w-full bg-transparent py-3 text-[13px] outline-none placeholder:text-muted-foreground"
171
193
  }
172
194
  )
173
195
  ] }),
174
196
  /* @__PURE__ */ d("div", { className: "max-h-64 overflow-y-auto py-1", children: [
175
- !!s && !P && /* @__PURE__ */ d(
197
+ !!o && !X && /* @__PURE__ */ d(
176
198
  "button",
177
199
  {
178
200
  type: "button",
179
201
  onClick: () => {
180
- j(null), g(!1);
202
+ K(null), y(!1);
181
203
  },
182
204
  className: "flex w-full items-center gap-2 px-3 py-1.5 text-[13px] text-slate-500 hover:bg-muted border-b border-slate-100 dark:text-slate-400 dark:border-border",
183
205
  children: [
184
- /* @__PURE__ */ r(fe, { className: "h-3.5 w-3.5 text-slate-400" }),
206
+ /* @__PURE__ */ s(pe, { className: "h-3.5 w-3.5 text-slate-400" }),
185
207
  "Clear selection"
186
208
  ]
187
209
  }
188
210
  ),
189
- u && /* @__PURE__ */ d(
211
+ f && /* @__PURE__ */ d(
190
212
  "button",
191
213
  {
192
214
  type: "button",
193
215
  "data-nvr-pinned-option": !0,
194
216
  onClick: () => {
195
- j((q == null ? void 0 : q.id) ?? (i == null ? void 0 : i.id)), g(!1);
217
+ K((L == null ? void 0 : L.id) ?? (c == null ? void 0 : c.id)), y(!1);
196
218
  },
197
219
  className: "flex w-full items-center gap-2 border-b border-slate-100 bg-nvr-cyan/5 px-3 py-1.5 text-left text-[13px] hover:bg-nvr-cyan/10 dark:border-border",
198
220
  children: [
199
- /* @__PURE__ */ r(
221
+ /* @__PURE__ */ s(
200
222
  "div",
201
223
  {
202
- className: L(
224
+ className: j(
203
225
  "flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
204
- String(s) === u ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
226
+ String(o) === f ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
205
227
  ),
206
- children: String(s) === u && /* @__PURE__ */ r(F, { className: "h-2.5 w-2.5 text-white" })
228
+ children: String(o) === f && /* @__PURE__ */ s(te, { className: "h-2.5 w-2.5 text-white" })
207
229
  }
208
230
  ),
209
- /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate", children: q ? ie(q) : `#${u}` }),
210
- /* @__PURE__ */ r("span", { className: "shrink-0 rounded bg-nvr-cyan/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-700 dark:text-foreground", children: (i == null ? void 0 : i.tag) ?? "Default" })
231
+ /* @__PURE__ */ s("span", { className: "min-w-0 flex-1 truncate", children: L ? ce(L) : "Loading…" }),
232
+ /* @__PURE__ */ s("span", { className: "shrink-0 rounded bg-nvr-cyan/15 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-slate-700 dark:text-foreground", children: (c == null ? void 0 : c.tag) ?? "Default" })
211
233
  ]
212
234
  }
213
235
  ),
214
- re ? /* @__PURE__ */ r("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ r(Z, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : C.length === 0 ? /* @__PURE__ */ r("p", { className: "px-3 py-2 text-[13px] text-muted-foreground", children: "No results" }) : C.map((e) => {
215
- const t = ne.has(e.id);
236
+ se ? /* @__PURE__ */ s("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ s(F, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : E.length === 0 ? /* @__PURE__ */ s("p", { className: "px-3 py-2 text-[13px] text-muted-foreground", children: "No results" }) : E.map((e) => {
237
+ const n = re.has(e.id);
216
238
  return /* @__PURE__ */ d("div", { children: [
217
239
  /* @__PURE__ */ d(
218
240
  "button",
@@ -221,37 +243,37 @@ function Te({
221
243
  onClick: () => le(e.id),
222
244
  className: "flex w-full items-center gap-1.5 px-3 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400 hover:bg-muted",
223
245
  children: [
224
- t ? /* @__PURE__ */ r(M, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ r(he, { className: "h-3 w-3 shrink-0" }),
246
+ n ? /* @__PURE__ */ s(ee, { className: "h-3 w-3 shrink-0" }) : /* @__PURE__ */ s(be, { className: "h-3 w-3 shrink-0" }),
225
247
  e.label,
226
- /* @__PURE__ */ r("span", { className: "ml-auto font-normal normal-case tracking-normal text-slate-400", children: e.items.length })
248
+ /* @__PURE__ */ s("span", { className: "ml-auto font-normal normal-case tracking-normal text-slate-400", children: e.items.length })
227
249
  ]
228
250
  }
229
251
  ),
230
- t && e.items.map((n) => {
231
- const a = n[l], c = a ? x(k, a) : String(n.id ?? ""), v = String(n.id) === String(s);
252
+ n && e.items.map((t) => {
253
+ const r = t[l], a = r ? w(q, r) : String(t.id ?? ""), b = String(t.id) === String(o);
232
254
  return /* @__PURE__ */ d(
233
255
  "button",
234
256
  {
235
257
  type: "button",
236
258
  onClick: () => {
237
- j(n.id), g(!1);
259
+ K(t.id), y(!1);
238
260
  },
239
261
  className: "flex w-full items-center gap-2 pl-8 pr-3 py-1.5 text-[13px] text-left hover:bg-muted",
240
262
  children: [
241
- /* @__PURE__ */ r(
263
+ /* @__PURE__ */ s(
242
264
  "div",
243
265
  {
244
- className: L(
266
+ className: j(
245
267
  "flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
246
- v ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
268
+ b ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
247
269
  ),
248
- children: v && /* @__PURE__ */ r(F, { className: "h-2.5 w-2.5 text-white" })
270
+ children: b && /* @__PURE__ */ s(te, { className: "h-2.5 w-2.5 text-white" })
249
271
  }
250
272
  ),
251
- c
273
+ a
252
274
  ]
253
275
  },
254
- String(n.id)
276
+ String(t.id)
255
277
  );
256
278
  })
257
279
  ] }, e.id);
@@ -261,5 +283,5 @@ function Te({
261
283
  ] });
262
284
  }
263
285
  export {
264
- Te as RelationGroupedCombobox
286
+ Ee as RelationGroupedCombobox
265
287
  };