@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.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/shared/components/CollectionBrowserView.js +2633 -2590
- package/dist/shared/components/DataTable.js +247 -236
- package/dist/shared/components/ItemEditForm.js +1693 -1668
- package/dist/shared/components/ProfileView.js +716 -715
- package/dist/shared/components/RecordReadView.js +367 -364
- package/dist/shared/components/ReportView.js +64 -39
- package/dist/shared/components/alerts/AlertManagerView.js +284 -271
- package/dist/shared/components/cbv/row-focus.js +19 -0
- package/dist/shared/components/help-videos/HelpVideoPlayer.js +152 -147
- package/dist/shared/components/integrations/console/SignalCard.js +59 -59
- package/dist/shared/components/integrations/console/tone.js +52 -30
- package/dist/shared/components/item-edit/CatalogPickerField.js +525 -505
- package/dist/shared/components/item-edit/FieldRow.js +175 -173
- package/dist/shared/components/item-edit/InlineTableField.js +407 -402
- package/dist/shared/components/item-edit/M2MCombobox.js +313 -291
- package/dist/shared/components/item-edit/MidairCollisionDialog.js +1 -1
- package/dist/shared/components/item-edit/PlanGrid.js +826 -803
- package/dist/shared/components/item-edit/QuickCreateButton.js +115 -79
- package/dist/shared/components/item-edit/RecordLiveSync.js +77 -75
- package/dist/shared/components/item-edit/RelationCombobox.js +412 -328
- package/dist/shared/components/item-edit/RelationGroupedCombobox.js +147 -125
- package/dist/shared/components/item-edit/SummaryPanel.js +406 -392
- package/dist/shared/components/item-edit/option-disambiguate.js +44 -32
- package/dist/shared/components/item-edit/related-missing.js +45 -0
- package/dist/shared/components/item-edit/save-outcome.js +5 -5
- package/dist/shared/components/notifications/NotificationRulesEditor.js +130 -123
- package/dist/shared/components/panels/AccessDeniedPanel.js +52 -48
- package/dist/shared/components/panels/ItemLockBanner.js +2 -3
- package/dist/shared/components/panels/PipelinePanel.js +1027 -978
- package/dist/shared/components/panels/RevisionsPanel.js +4 -1
- package/dist/shared/components/panels/TaskPanel.js +265 -249
- package/dist/shared/components/panels/landing-state.js +27 -0
- package/dist/shared/components/pipeline/PipelineEditorView.js +86 -78
- package/dist/shared/components/profile/AiMemoryCard.js +12 -10
- package/dist/shared/components/queue/OwnerAvatars.js +80 -41
- package/dist/shared/components/queue/QueueQuickFilters.js +48 -48
- package/dist/shared/components/queue/QueueWorklist.js +357 -358
- package/dist/shared/components/queue/group-sums.js +27 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
- package/dist/shared/lib/back-closes.js +25 -0
- package/dist/shared/lib/form-usage-beacon.js +7 -7
- package/dist/shared/lib/list-page-memory.js +41 -0
- package/dist/shared/lib/live.js +44 -44
- package/dist/shared/lib/own-writes.js +76 -28
- package/dist/shared/lib/request-gate.js +110 -109
- package/dist/shared/lib/validation-rules.js +34 -19
- package/package.json +1 -1
|
@@ -1,218 +1,240 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { Loader2 as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { matchesAllTokens as
|
|
8
|
-
import { applyDisplayTemplate as
|
|
9
|
-
import {
|
|
10
|
-
|
|
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:
|
|
13
|
-
onChange:
|
|
14
|
-
groupField:
|
|
13
|
+
value: o,
|
|
14
|
+
onChange: K,
|
|
15
|
+
groupField: i,
|
|
15
16
|
optionField: l,
|
|
16
|
-
disabled:
|
|
17
|
-
placeholder:
|
|
18
|
-
extraFilter:
|
|
19
|
-
pinned:
|
|
17
|
+
disabled: X,
|
|
18
|
+
placeholder: ne,
|
|
19
|
+
extraFilter: _,
|
|
20
|
+
pinned: c
|
|
20
21
|
}) {
|
|
21
|
-
const h =
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
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
|
-
}, [
|
|
34
|
-
const { data:
|
|
49
|
+
}, [u]);
|
|
50
|
+
const { data: p } = g({
|
|
35
51
|
queryKey: ["col-meta", m],
|
|
36
|
-
queryFn: () => h.request(
|
|
52
|
+
queryFn: () => h.request(x(`/collections/${m}`)).then((e) => e.data),
|
|
37
53
|
staleTime: 3e5,
|
|
38
54
|
retry: !1
|
|
39
|
-
}),
|
|
55
|
+
}), D = z(
|
|
40
56
|
() => {
|
|
41
57
|
var e;
|
|
42
|
-
return ((e = ((
|
|
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
|
-
[
|
|
45
|
-
),
|
|
60
|
+
[p, i]
|
|
61
|
+
), O = z(
|
|
46
62
|
() => {
|
|
47
63
|
var e;
|
|
48
|
-
return ((e = ((
|
|
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
|
-
[
|
|
51
|
-
), { data:
|
|
52
|
-
queryKey: ["col-meta",
|
|
66
|
+
[p, l]
|
|
67
|
+
), { data: A } = g({
|
|
68
|
+
queryKey: ["col-meta", D],
|
|
53
69
|
queryFn: () => h.request(
|
|
54
|
-
|
|
70
|
+
x(`/collections/${D}`)
|
|
55
71
|
).then((e) => e.data),
|
|
56
|
-
enabled: !!
|
|
72
|
+
enabled: !!D,
|
|
57
73
|
staleTime: 3e5,
|
|
58
74
|
retry: !1
|
|
59
|
-
}), { data: G } =
|
|
60
|
-
queryKey: ["col-meta",
|
|
75
|
+
}), { data: G } = g({
|
|
76
|
+
queryKey: ["col-meta", O],
|
|
61
77
|
queryFn: () => h.request(
|
|
62
|
-
|
|
78
|
+
x(`/collections/${O}`)
|
|
63
79
|
).then((e) => e.data),
|
|
64
|
-
enabled: !!
|
|
80
|
+
enabled: !!O,
|
|
65
81
|
staleTime: 3e5,
|
|
66
82
|
retry: !1
|
|
67
|
-
}),
|
|
68
|
-
queryKey: ["relation-grouped-opts", m,
|
|
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
|
-
|
|
86
|
+
x(`/items/${m}`, {
|
|
71
87
|
limit: 1e3,
|
|
72
88
|
picker: "1",
|
|
73
|
-
fields:
|
|
74
|
-
...
|
|
89
|
+
fields: W,
|
|
90
|
+
...k ? { filter: k } : {}
|
|
75
91
|
})
|
|
76
92
|
).then((e) => e.data ?? []),
|
|
77
|
-
enabled:
|
|
78
|
-
staleTime:
|
|
79
|
-
}), { data: S, isLoading:
|
|
80
|
-
queryKey: ["relation-grouped-single", m, String(
|
|
81
|
-
queryFn: () => h.request(
|
|
82
|
-
enabled: !!
|
|
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
|
-
}),
|
|
85
|
-
queryKey: ["relation-avail", m, String(
|
|
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
|
-
|
|
88
|
-
filter:
|
|
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: !!
|
|
110
|
+
enabled: !!o && !!S,
|
|
95
111
|
staleTime: 3e4
|
|
96
|
-
}), I = !!
|
|
97
|
-
const e = T ?? [],
|
|
98
|
-
for (const
|
|
99
|
-
const
|
|
100
|
-
|
|
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 [...
|
|
103
|
-
}, [T,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}, [
|
|
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
|
-
|
|
109
|
-
const
|
|
110
|
-
return
|
|
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
|
|
114
|
-
queryKey: ["relation-grouped-single", m,
|
|
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
|
-
|
|
132
|
+
x(`/items/${m}/${f}`, { fields: `id,${i}.*,${l}.*` })
|
|
117
133
|
).then((e) => e.data).catch(() => null),
|
|
118
|
-
enabled: !!
|
|
134
|
+
enabled: !!f && u && !(T ?? []).some((e) => String(e.id) === f),
|
|
119
135
|
staleTime: 6e4
|
|
120
|
-
}),
|
|
121
|
-
const
|
|
122
|
-
return [
|
|
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
|
|
140
|
+
let B = null;
|
|
125
141
|
if (S) {
|
|
126
|
-
const e = S[
|
|
127
|
-
|
|
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
|
|
130
|
-
return /* @__PURE__ */ d("div", { ref:
|
|
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:
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
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:
|
|
164
|
+
className: j(
|
|
146
165
|
"flex items-center gap-1.5 truncate min-w-0",
|
|
147
|
-
!
|
|
166
|
+
!B && "text-muted-foreground"
|
|
148
167
|
),
|
|
149
168
|
children: [
|
|
150
|
-
I && /* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
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__ */
|
|
174
|
+
/* @__PURE__ */ s(ee, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
156
175
|
]
|
|
157
176
|
}
|
|
158
177
|
),
|
|
159
|
-
|
|
160
|
-
|
|
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__ */
|
|
163
|
-
/* @__PURE__ */
|
|
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:
|
|
167
|
-
value:
|
|
168
|
-
onChange: (e) =>
|
|
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
|
-
!!
|
|
197
|
+
!!o && !X && /* @__PURE__ */ d(
|
|
176
198
|
"button",
|
|
177
199
|
{
|
|
178
200
|
type: "button",
|
|
179
201
|
onClick: () => {
|
|
180
|
-
|
|
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__ */
|
|
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
|
-
|
|
211
|
+
f && /* @__PURE__ */ d(
|
|
190
212
|
"button",
|
|
191
213
|
{
|
|
192
214
|
type: "button",
|
|
193
215
|
"data-nvr-pinned-option": !0,
|
|
194
216
|
onClick: () => {
|
|
195
|
-
|
|
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__ */
|
|
221
|
+
/* @__PURE__ */ s(
|
|
200
222
|
"div",
|
|
201
223
|
{
|
|
202
|
-
className:
|
|
224
|
+
className: j(
|
|
203
225
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
204
|
-
String(
|
|
226
|
+
String(o) === f ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
|
|
205
227
|
),
|
|
206
|
-
children: String(
|
|
228
|
+
children: String(o) === f && /* @__PURE__ */ s(te, { className: "h-2.5 w-2.5 text-white" })
|
|
207
229
|
}
|
|
208
230
|
),
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
215
|
-
const
|
|
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
|
-
|
|
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__ */
|
|
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
|
-
|
|
231
|
-
const
|
|
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
|
-
|
|
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__ */
|
|
263
|
+
/* @__PURE__ */ s(
|
|
242
264
|
"div",
|
|
243
265
|
{
|
|
244
|
-
className:
|
|
266
|
+
className: j(
|
|
245
267
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
246
|
-
|
|
268
|
+
b ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300"
|
|
247
269
|
),
|
|
248
|
-
children:
|
|
270
|
+
children: b && /* @__PURE__ */ s(te, { className: "h-2.5 w-2.5 text-white" })
|
|
249
271
|
}
|
|
250
272
|
),
|
|
251
|
-
|
|
273
|
+
a
|
|
252
274
|
]
|
|
253
275
|
},
|
|
254
|
-
String(
|
|
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
|
-
|
|
286
|
+
Ee as RelationGroupedCombobox
|
|
265
287
|
};
|