@nivaro/react 0.3.56 → 0.3.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/shared/components/CollectionBrowserView.js +2827 -2750
- 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/QueueItemSheet.js +111 -111
- package/dist/shared/components/queue/QueueQuickFilters.js +48 -48
- package/dist/shared/components/queue/QueueWorklist.js +975 -964
- package/dist/shared/components/queue/group-sums.js +27 -0
- package/dist/shared/components/queue/live-state-aspect.js +7 -3
- package/dist/shared/components/queue/path-label.js +14 -0
- package/dist/shared/components/widgets/ReviewListWidget.js +186 -168
- package/dist/shared/lib/back-closes.js +25 -0
- package/dist/shared/lib/cbv-page-warm.js +36 -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/record-ref.js +78 -53
- package/dist/shared/lib/request-gate.js +110 -109
- package/dist/shared/lib/validation-rules.js +34 -19
- package/package.json +1 -1
|
@@ -1,131 +1,121 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { ChevronDown as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { parseAllowedCollections as
|
|
7
|
-
import { get as
|
|
8
|
-
import { compareByMatch as
|
|
9
|
-
import { useRecordReader as
|
|
10
|
-
import { useOnlineUsers as
|
|
11
|
-
import { cn as Q, userOptionFilter as
|
|
12
|
-
import { UserAvatar as
|
|
13
|
-
import { Command as ve, CommandInput as
|
|
14
|
-
import { Popover as
|
|
15
|
-
import { applyDisplayTemplate as
|
|
16
|
-
import { useM2MStaging as
|
|
17
|
-
import { useStaleTip as
|
|
18
|
-
function
|
|
19
|
-
return
|
|
1
|
+
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as L } from "@tanstack/react-query";
|
|
3
|
+
import { ChevronDown as le, Loader2 as oe, AlertTriangle as de, X as ce, Check as ue } from "lucide-react";
|
|
4
|
+
import { useState as re, useRef as me, useEffect as fe } from "react";
|
|
5
|
+
import { useNivaroClient as pe, useItemEditAuth as he, useDrilldown as Je } from "../../context.js";
|
|
6
|
+
import { parseAllowedCollections as Pe } from "../../lib/allowed-collections.js";
|
|
7
|
+
import { get as U } from "../../lib/commands.js";
|
|
8
|
+
import { compareByMatch as be } from "../../lib/picker-rank.js";
|
|
9
|
+
import { useRecordReader as De } from "../../lib/record-loader.js";
|
|
10
|
+
import { useOnlineUsers as ye } from "../../lib/use-online-users.js";
|
|
11
|
+
import { cn as Q, userOptionFilter as xe, matchesAllTokens as Ee } from "../../lib/utils.js";
|
|
12
|
+
import { UserAvatar as ge } from "../UserAvatar.js";
|
|
13
|
+
import { Command as ve, CommandInput as ke, CommandList as Se, CommandEmpty as Ne, CommandGroup as we, CommandItem as _e } from "../ui/command.js";
|
|
14
|
+
import { Popover as Le, PopoverTrigger as qe, PopoverContent as Ce } from "../ui/popover.js";
|
|
15
|
+
import { applyDisplayTemplate as Oe } from "./helpers.js";
|
|
16
|
+
import { useM2MStaging as Fe } from "./M2MStagingContext.js";
|
|
17
|
+
import { useStaleTip as Re, RelatedItemLabel as ae } from "./RelationCombobox.js";
|
|
18
|
+
function je(n) {
|
|
19
|
+
return n.replace(/\(.*$/, "").trim().split(/\s+/).map((i) => i[0]).filter(Boolean).slice(0, 2).join("").toUpperCase() || "?";
|
|
20
20
|
}
|
|
21
|
-
function Te(
|
|
22
|
-
return
|
|
21
|
+
function Te(n) {
|
|
22
|
+
return Pe(n == null ? void 0 : n.one_allowed_collections);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
if (!
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
return
|
|
24
|
+
function Ie(n) {
|
|
25
|
+
if (!n) return null;
|
|
26
|
+
if (n.one_collection) return n.one_collection;
|
|
27
|
+
const i = Te(n);
|
|
28
|
+
return i.length === 0 ? null : i.some((p) => p === "directus_users" || p === "nivaro_users") ? "nivaro_users" : i[0];
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
if (!
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
return { field:
|
|
30
|
+
function at(n) {
|
|
31
|
+
if (!n || n.one_collection) return null;
|
|
32
|
+
const i = Te(n);
|
|
33
|
+
if (i.length === 0) return null;
|
|
34
|
+
const p = i.includes("directus_users") ? "directus_users" : i.includes("nivaro_users") ? "nivaro_users" : i[0];
|
|
35
|
+
return { field: n.one_collection_field ?? "collection", value: p };
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
relation:
|
|
39
|
-
parentId:
|
|
40
|
-
allRelations:
|
|
41
|
-
extraFilter:
|
|
42
|
-
optionSort:
|
|
43
|
-
requiredParent:
|
|
44
|
-
onCountChange:
|
|
45
|
-
drilldown:
|
|
37
|
+
function ot({
|
|
38
|
+
relation: n,
|
|
39
|
+
parentId: i,
|
|
40
|
+
allRelations: p,
|
|
41
|
+
extraFilter: d,
|
|
42
|
+
optionSort: h,
|
|
43
|
+
requiredParent: S,
|
|
44
|
+
onCountChange: N,
|
|
45
|
+
drilldown: q
|
|
46
46
|
}) {
|
|
47
|
-
const
|
|
48
|
-
(e) => e.many_collection ===
|
|
49
|
-
),
|
|
50
|
-
queryKey: ["col-meta",
|
|
51
|
-
queryFn: () =>
|
|
52
|
-
enabled: !!
|
|
47
|
+
const x = pe(), F = Je(), t = Fe(), [j, v] = re(!1), [y, C] = re(""), T = p.find(
|
|
48
|
+
(e) => e.many_collection === n.many_collection && e.many_field === n.junction_field && e.id !== n.id
|
|
49
|
+
), s = Ie(T), w = n.junction_field ?? "", P = n.many_field ?? "", u = n.one_field ?? `${n.many_collection}.${w}`, { data: o } = L({
|
|
50
|
+
queryKey: ["col-meta", s],
|
|
51
|
+
queryFn: () => x.request(U(`/collections/${s}`)).then((e) => e.data),
|
|
52
|
+
enabled: !!s,
|
|
53
53
|
staleTime: 3e5,
|
|
54
54
|
retry: !1
|
|
55
|
-
}), { data:
|
|
56
|
-
queryKey: ["m2m-items",
|
|
57
|
-
queryFn: () =>
|
|
58
|
-
|
|
59
|
-
filter: JSON.stringify({ [
|
|
55
|
+
}), { data: W = [] } = L({
|
|
56
|
+
queryKey: ["m2m-items", n.many_collection, P, i],
|
|
57
|
+
queryFn: () => x.request(
|
|
58
|
+
U(`/items/${n.many_collection}`, {
|
|
59
|
+
filter: JSON.stringify({ [P]: { _eq: i } }),
|
|
60
60
|
limit: 200,
|
|
61
|
-
fields: `id,${
|
|
61
|
+
fields: `id,${w}`
|
|
62
62
|
})
|
|
63
63
|
).then((e) => e.data ?? []),
|
|
64
64
|
staleTime: 3e4,
|
|
65
|
-
enabled: !!
|
|
66
|
-
}),
|
|
67
|
-
const e =
|
|
65
|
+
enabled: !!i && i !== "new"
|
|
66
|
+
}), ie = he().isAdmin, D = s === "nivaro_users" ? xe(ie) : null, E = ye(s === "nivaro_users"), X = d ? D ? { _and: [d, D] } : d : D, R = X ? JSON.stringify(X) : void 0, z = h && !/^-?label$/.test(h) ? h : void 0, H = (() => {
|
|
67
|
+
const e = o == null ? void 0 : o.display_template;
|
|
68
68
|
if (!e || !e.includes(".")) return null;
|
|
69
|
-
const
|
|
70
|
-
return
|
|
71
|
-
})(), {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
...g ? { sort: g } : {}
|
|
90
|
-
})
|
|
91
|
-
).then((e) => e.data ?? []),
|
|
92
|
-
enabled: P && !!r,
|
|
93
|
-
staleTime: L ? 0 : 3e4
|
|
94
|
-
}), V = (t == null ? void 0 : t.getStagedLinks(d)) ?? [], k = (t == null ? void 0 : t.getStagedUnlinks(d)) ?? /* @__PURE__ */ new Set(), U = X.filter((e) => !k.has(e.id)), f = new Set(U.map((e) => String(e[v]))), _ = [...f], Y = JSON.stringify(h ? { _and: [{ id: { _in: _ } }, h] } : { id: { _in: _ } }), { data: m } = w({
|
|
95
|
-
queryKey: ["m2m-avail", r, _.join(","), L],
|
|
96
|
-
queryFn: () => y.request(
|
|
97
|
-
q(`/items/${r}`, {
|
|
98
|
-
filter: Y,
|
|
69
|
+
const a = [...e.matchAll(/\{\{([^}]+)\}\}/g)].map((f) => f[1].trim());
|
|
70
|
+
return a.length === 0 ? null : ["id", ...a].join(",");
|
|
71
|
+
})(), {
|
|
72
|
+
options: Y,
|
|
73
|
+
isLoading: M,
|
|
74
|
+
localSearch: B
|
|
75
|
+
} = Ue({
|
|
76
|
+
client: x,
|
|
77
|
+
relatedCollection: s,
|
|
78
|
+
search: y,
|
|
79
|
+
filterParam: R,
|
|
80
|
+
serverSort: z,
|
|
81
|
+
templateNestedFields: H,
|
|
82
|
+
enabled: j && !!s,
|
|
83
|
+
labelOf: k
|
|
84
|
+
}), Z = (t == null ? void 0 : t.getStagedLinks(u)) ?? [], _ = (t == null ? void 0 : t.getStagedUnlinks(u)) ?? /* @__PURE__ */ new Set(), A = W.filter((e) => !_.has(e.id)), g = new Set(A.map((e) => String(e[w]))), O = [...g], ee = JSON.stringify(d ? { _and: [{ id: { _in: O } }, d] } : { id: { _in: O } }), { data: m } = L({
|
|
85
|
+
queryKey: ["m2m-avail", s, O.join(","), R],
|
|
86
|
+
queryFn: () => x.request(
|
|
87
|
+
U(`/items/${s}`, {
|
|
88
|
+
filter: ee,
|
|
99
89
|
picker: "1",
|
|
100
90
|
limit: 200,
|
|
101
91
|
fields: "id"
|
|
102
92
|
})
|
|
103
93
|
).then((e) => e.data ?? []),
|
|
104
|
-
enabled: !!
|
|
94
|
+
enabled: !!s && O.length > 0,
|
|
105
95
|
staleTime: 3e4
|
|
106
|
-
}),
|
|
107
|
-
|
|
96
|
+
}), te = new Set((m ?? []).map((e) => String(e.id))), $ = m !== void 0 ? new Set(O.filter((e) => !te.has(e))) : /* @__PURE__ */ new Set(), K = new Set(Z.map(String)), J = /* @__PURE__ */ new Set([...g, ...K]), I = me(N);
|
|
97
|
+
I.current = N, fe(() => {
|
|
108
98
|
var e;
|
|
109
|
-
(e =
|
|
110
|
-
}, [
|
|
99
|
+
(e = I.current) == null || e.call(I, J.size);
|
|
100
|
+
}, [J.size]);
|
|
111
101
|
function G(e) {
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
114
|
-
t == null || t.unstageLink(
|
|
102
|
+
const a = String(e);
|
|
103
|
+
if (K.has(a)) {
|
|
104
|
+
t == null || t.unstageLink(u, e);
|
|
115
105
|
return;
|
|
116
106
|
}
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
|
|
107
|
+
const f = W.find((V) => String(V[w]) === a);
|
|
108
|
+
if (f) {
|
|
109
|
+
_.has(f.id) ? t == null || t.unstageUnlink(u, f.id) : t == null || t.stageUnlink(u, f.id);
|
|
120
110
|
return;
|
|
121
111
|
}
|
|
122
|
-
t == null || t.stageLink(
|
|
112
|
+
t == null || t.stageLink(u, e);
|
|
123
113
|
}
|
|
124
|
-
function
|
|
125
|
-
const
|
|
126
|
-
return
|
|
114
|
+
function k(e) {
|
|
115
|
+
const a = (o == null ? void 0 : o.display_template) ?? null;
|
|
116
|
+
return a ? Oe(a, e) : String(e._display ?? e.id ?? "");
|
|
127
117
|
}
|
|
128
|
-
return
|
|
118
|
+
return S ? /* @__PURE__ */ c(
|
|
129
119
|
"button",
|
|
130
120
|
{
|
|
131
121
|
type: "button",
|
|
@@ -134,31 +124,31 @@ function lt({
|
|
|
134
124
|
children: [
|
|
135
125
|
/* @__PURE__ */ c("span", { className: "truncate", children: [
|
|
136
126
|
"Select ",
|
|
137
|
-
|
|
127
|
+
S,
|
|
138
128
|
" first"
|
|
139
129
|
] }),
|
|
140
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ l(le, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
141
131
|
]
|
|
142
132
|
}
|
|
143
|
-
) : /* @__PURE__ */
|
|
144
|
-
|
|
133
|
+
) : /* @__PURE__ */ l("div", { children: /* @__PURE__ */ c(
|
|
134
|
+
Le,
|
|
145
135
|
{
|
|
146
|
-
open:
|
|
136
|
+
open: j,
|
|
147
137
|
onOpenChange: (e) => {
|
|
148
|
-
|
|
138
|
+
v(e), e || C("");
|
|
149
139
|
},
|
|
150
140
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ l(qe, { asChild: !0, children: /* @__PURE__ */ c(
|
|
152
142
|
"div",
|
|
153
143
|
{
|
|
154
144
|
role: "button",
|
|
155
145
|
tabIndex: 0,
|
|
156
146
|
onKeyDown: (e) => {
|
|
157
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
147
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), v((a) => !a));
|
|
158
148
|
},
|
|
159
149
|
className: "flex min-h-9 w-full cursor-pointer items-center justify-between gap-2 rounded-md border border-input bg-background px-3 py-1 text-sm text-left font-normal hover:bg-muted",
|
|
160
150
|
children: [
|
|
161
|
-
|
|
151
|
+
J.size > 0 ? /* @__PURE__ */ c(
|
|
162
152
|
"span",
|
|
163
153
|
{
|
|
164
154
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-1",
|
|
@@ -166,55 +156,55 @@ function lt({
|
|
|
166
156
|
e.target.closest("button") && e.stopPropagation();
|
|
167
157
|
},
|
|
168
158
|
children: [
|
|
169
|
-
|
|
170
|
-
const
|
|
159
|
+
A.map((e) => {
|
|
160
|
+
const a = e[w], f = $.has(String(a));
|
|
171
161
|
return /* @__PURE__ */ c(
|
|
172
162
|
"span",
|
|
173
163
|
{
|
|
174
|
-
title:
|
|
164
|
+
title: f ? "This record is no longer an available option" : void 0,
|
|
175
165
|
className: Q(
|
|
176
166
|
"inline-flex items-center gap-1 rounded-full border pl-2.5 pr-1.5 py-0.5 text-[12px]",
|
|
177
|
-
|
|
167
|
+
f ? "border-amber-300 bg-amber-50 text-amber-700 dark:border-amber-600 dark:bg-amber-950/30 dark:text-amber-400" : "border-slate-200 bg-slate-50 text-slate-700 dark:border-border dark:bg-muted dark:text-slate-200"
|
|
178
168
|
),
|
|
179
169
|
children: [
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
f && /* @__PURE__ */ l(de, { className: "h-3 w-3 shrink-0 text-amber-500" }),
|
|
171
|
+
s && (q && F ? /* @__PURE__ */ l(
|
|
182
172
|
"button",
|
|
183
173
|
{
|
|
184
174
|
type: "button",
|
|
185
175
|
title: "Open detail panel",
|
|
186
|
-
onClick: () =>
|
|
187
|
-
collection:
|
|
188
|
-
itemId: String(
|
|
189
|
-
layoutId:
|
|
190
|
-
width:
|
|
176
|
+
onClick: () => F.open({
|
|
177
|
+
collection: s,
|
|
178
|
+
itemId: String(a),
|
|
179
|
+
layoutId: q.layout_id,
|
|
180
|
+
width: q.width
|
|
191
181
|
}),
|
|
192
182
|
className: "underline decoration-slate-300 decoration-dotted underline-offset-2 hover:text-[#172940] hover:decoration-nvr-cyan dark:hover:text-nvr-cyan",
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
-
|
|
183
|
+
children: /* @__PURE__ */ l(
|
|
184
|
+
ae,
|
|
195
185
|
{
|
|
196
|
-
collection:
|
|
197
|
-
id:
|
|
198
|
-
displayTemplate:
|
|
186
|
+
collection: s,
|
|
187
|
+
id: a,
|
|
188
|
+
displayTemplate: o == null ? void 0 : o.display_template
|
|
199
189
|
}
|
|
200
190
|
)
|
|
201
191
|
}
|
|
202
|
-
) : /* @__PURE__ */
|
|
203
|
-
|
|
192
|
+
) : /* @__PURE__ */ l(
|
|
193
|
+
ae,
|
|
204
194
|
{
|
|
205
|
-
collection:
|
|
206
|
-
id:
|
|
207
|
-
displayTemplate:
|
|
195
|
+
collection: s,
|
|
196
|
+
id: a,
|
|
197
|
+
displayTemplate: o == null ? void 0 : o.display_template
|
|
208
198
|
}
|
|
209
199
|
)),
|
|
210
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ l(
|
|
211
201
|
"button",
|
|
212
202
|
{
|
|
213
203
|
type: "button",
|
|
214
204
|
"aria-label": "Remove",
|
|
215
|
-
onClick: () => t == null ? void 0 : t.stageUnlink(
|
|
205
|
+
onClick: () => t == null ? void 0 : t.stageUnlink(u, e.id),
|
|
216
206
|
className: "rounded-full p-0.5 text-slate-400 hover:text-red-500",
|
|
217
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ l(ce, { className: "h-3 w-3" })
|
|
218
208
|
}
|
|
219
209
|
)
|
|
220
210
|
]
|
|
@@ -222,27 +212,27 @@ function lt({
|
|
|
222
212
|
String(e.id)
|
|
223
213
|
);
|
|
224
214
|
}),
|
|
225
|
-
|
|
215
|
+
Z.map((e) => /* @__PURE__ */ c(
|
|
226
216
|
"span",
|
|
227
217
|
{
|
|
228
218
|
className: "inline-flex items-center gap-1 rounded-full border border-dashed border-nvr-cyan/50 bg-nvr-cyan/5 pl-2.5 pr-1.5 py-0.5 text-[12px] text-slate-600 dark:text-slate-300",
|
|
229
219
|
children: [
|
|
230
|
-
|
|
231
|
-
|
|
220
|
+
s ? /* @__PURE__ */ l(
|
|
221
|
+
ae,
|
|
232
222
|
{
|
|
233
|
-
collection:
|
|
223
|
+
collection: s,
|
|
234
224
|
id: e,
|
|
235
|
-
displayTemplate:
|
|
225
|
+
displayTemplate: o == null ? void 0 : o.display_template
|
|
236
226
|
}
|
|
237
227
|
) : String(e),
|
|
238
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ l(
|
|
239
229
|
"button",
|
|
240
230
|
{
|
|
241
231
|
type: "button",
|
|
242
232
|
"aria-label": "Remove",
|
|
243
|
-
onClick: () => t == null ? void 0 : t.unstageLink(
|
|
233
|
+
onClick: () => t == null ? void 0 : t.unstageLink(u, e),
|
|
244
234
|
className: "rounded-full p-0.5 text-slate-400 hover:text-red-500",
|
|
245
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ l(ce, { className: "h-3 w-3" })
|
|
246
236
|
}
|
|
247
237
|
)
|
|
248
238
|
]
|
|
@@ -251,63 +241,63 @@ function lt({
|
|
|
251
241
|
))
|
|
252
242
|
]
|
|
253
243
|
}
|
|
254
|
-
) : /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
244
|
+
) : /* @__PURE__ */ l("span", { className: "truncate text-muted-foreground", children: "Select items…" }),
|
|
245
|
+
/* @__PURE__ */ l(le, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
256
246
|
]
|
|
257
247
|
}
|
|
258
248
|
) }),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */
|
|
261
|
-
|
|
249
|
+
/* @__PURE__ */ l(Ce, { className: "w-[320px] p-0", align: "start", children: /* @__PURE__ */ c(ve, { shouldFilter: !1, children: [
|
|
250
|
+
/* @__PURE__ */ l(
|
|
251
|
+
ke,
|
|
262
252
|
{
|
|
263
253
|
placeholder: "Search…",
|
|
264
|
-
value:
|
|
265
|
-
onValueChange:
|
|
254
|
+
value: y,
|
|
255
|
+
onValueChange: C,
|
|
266
256
|
className: "h-9 text-[13px]"
|
|
267
257
|
}
|
|
268
258
|
),
|
|
269
|
-
/* @__PURE__ */ c(
|
|
270
|
-
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
-
(e,
|
|
259
|
+
/* @__PURE__ */ c(Se, { children: [
|
|
260
|
+
M ? /* @__PURE__ */ l("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ l(oe, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : /* @__PURE__ */ l(Ne, { className: "py-3 text-left text-[12px] text-muted-foreground px-3", children: "No results" }),
|
|
261
|
+
/* @__PURE__ */ l(we, { children: !M && (z ? [...se(Y, y, B, k)] : [...se(Y, y, B, k)].sort(
|
|
262
|
+
(e, a) => be(k(e), k(a), y, h === "-label")
|
|
273
263
|
)).map((e) => {
|
|
274
|
-
const
|
|
264
|
+
const a = String(e.id), f = J.has(a);
|
|
275
265
|
return /* @__PURE__ */ c(
|
|
276
|
-
|
|
266
|
+
_e,
|
|
277
267
|
{
|
|
278
|
-
value:
|
|
268
|
+
value: a,
|
|
279
269
|
onSelect: () => G(e.id),
|
|
280
270
|
className: "flex items-center gap-2 text-[13px]",
|
|
281
271
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ l(
|
|
283
273
|
"div",
|
|
284
274
|
{
|
|
285
275
|
className: Q(
|
|
286
276
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded border",
|
|
287
|
-
|
|
277
|
+
f ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300 dark:border-slate-500"
|
|
288
278
|
),
|
|
289
|
-
children:
|
|
279
|
+
children: f && /* @__PURE__ */ l(ue, { className: "h-2.5 w-2.5 text-white" })
|
|
290
280
|
}
|
|
291
281
|
),
|
|
292
|
-
|
|
293
|
-
|
|
282
|
+
s === "nivaro_users" && /* @__PURE__ */ l(
|
|
283
|
+
ge,
|
|
294
284
|
{
|
|
295
|
-
userId:
|
|
285
|
+
userId: a,
|
|
296
286
|
className: "h-4 w-4",
|
|
297
|
-
fallback: /* @__PURE__ */
|
|
287
|
+
fallback: /* @__PURE__ */ l("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[8px] font-bold text-nvr-navy dark:text-nvr-cyan", children: je(k(e)) })
|
|
298
288
|
}
|
|
299
289
|
),
|
|
300
|
-
|
|
290
|
+
s === "nivaro_users" && E.has(a.toUpperCase()) && /* @__PURE__ */ l(
|
|
301
291
|
"span",
|
|
302
292
|
{
|
|
303
293
|
className: "h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",
|
|
304
294
|
"data-tip": "Online now"
|
|
305
295
|
}
|
|
306
296
|
),
|
|
307
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ l("span", { className: "truncate", children: k(e) })
|
|
308
298
|
]
|
|
309
299
|
},
|
|
310
|
-
|
|
300
|
+
a
|
|
311
301
|
);
|
|
312
302
|
}) })
|
|
313
303
|
] })
|
|
@@ -316,101 +306,131 @@ function lt({
|
|
|
316
306
|
}
|
|
317
307
|
) });
|
|
318
308
|
}
|
|
319
|
-
function
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
309
|
+
function Ue(n) {
|
|
310
|
+
const { client: i, relatedCollection: p, search: d, filterParam: h, serverSort: S, templateNestedFields: N } = n, q = (T) => i.request(
|
|
311
|
+
U(`/items/${p}`, {
|
|
312
|
+
limit: Ae,
|
|
313
|
+
search: T || void 0,
|
|
314
|
+
filter: h,
|
|
315
|
+
picker: "1",
|
|
316
|
+
// A dotted display template ({{core_category.name}}) needs the
|
|
317
|
+
// nested expansion — a bare row only carries the FK id.
|
|
318
|
+
...N ? { fields: N } : {},
|
|
319
|
+
...S ? { sort: S } : {}
|
|
320
|
+
})
|
|
321
|
+
).then((s) => s.data ?? []), x = (T) => [
|
|
322
|
+
"m2m-options",
|
|
323
|
+
p,
|
|
324
|
+
T,
|
|
325
|
+
h,
|
|
326
|
+
S ?? "",
|
|
327
|
+
N ?? ""
|
|
328
|
+
], F = h ? 0 : 3e4, { data: t, isFetching: j } = L({
|
|
329
|
+
queryKey: x(""),
|
|
330
|
+
queryFn: () => q(""),
|
|
331
|
+
enabled: n.enabled,
|
|
332
|
+
staleTime: F
|
|
333
|
+
}), v = ze(t, d, n.labelOf), { data: y, isFetching: C } = L({
|
|
334
|
+
queryKey: x(d),
|
|
335
|
+
queryFn: () => q(d),
|
|
336
|
+
enabled: n.enabled && v,
|
|
337
|
+
staleTime: F
|
|
338
|
+
});
|
|
339
|
+
return v ? { options: y ?? [], isLoading: !y && C, localSearch: !1 } : { options: t ?? [], isLoading: !t && j, localSearch: !!d };
|
|
340
|
+
}
|
|
341
|
+
const Ae = 200;
|
|
342
|
+
function ze(n, i, p) {
|
|
343
|
+
return i.trim() ? !n || n.length >= Ae ? !0 : se(n, i, !0, p).length === 0 : !1;
|
|
344
|
+
}
|
|
345
|
+
function se(n, i, p, d) {
|
|
346
|
+
return !p || !i.trim() ? n : n.filter((h) => Ee(d(h), i));
|
|
347
|
+
}
|
|
348
|
+
function ct({
|
|
349
|
+
relation: n,
|
|
350
|
+
parentId: i,
|
|
351
|
+
allRelations: p,
|
|
352
|
+
extraFilter: d,
|
|
353
|
+
optionSort: h,
|
|
354
|
+
requiredParent: S,
|
|
355
|
+
onCountChange: N,
|
|
356
|
+
readOnly: q
|
|
328
357
|
}) {
|
|
329
|
-
const
|
|
330
|
-
(
|
|
331
|
-
),
|
|
332
|
-
queryKey: ["col-meta",
|
|
333
|
-
queryFn: () =>
|
|
334
|
-
enabled: !!
|
|
358
|
+
const x = pe(), F = De(), t = Fe(), [j, v] = re(!1), [y, C] = re(""), T = p.find(
|
|
359
|
+
(r) => r.many_collection === n.many_collection && r.many_field === n.junction_field && r.id !== n.id
|
|
360
|
+
), s = Ie(T), w = n.junction_field ?? "", P = n.many_field ?? "", u = n.one_field ?? `${n.many_collection}.${w}`, { data: o } = L({
|
|
361
|
+
queryKey: ["col-meta", s],
|
|
362
|
+
queryFn: () => x.request(U(`/collections/${s}`)).then((r) => r.data),
|
|
363
|
+
enabled: !!s,
|
|
335
364
|
staleTime: 3e5,
|
|
336
365
|
retry: !1
|
|
337
|
-
}), { data:
|
|
338
|
-
queryKey: ["m2m-items",
|
|
339
|
-
queryFn: () =>
|
|
340
|
-
|
|
341
|
-
filter: JSON.stringify({ [
|
|
366
|
+
}), { data: W = [], isFetching: ie } = L({
|
|
367
|
+
queryKey: ["m2m-items", n.many_collection, P, i],
|
|
368
|
+
queryFn: () => x.request(
|
|
369
|
+
U(`/items/${n.many_collection}`, {
|
|
370
|
+
filter: JSON.stringify({ [P]: { _eq: i } }),
|
|
342
371
|
limit: 1,
|
|
343
|
-
fields: `id,${
|
|
372
|
+
fields: `id,${w}`
|
|
344
373
|
})
|
|
345
|
-
).then((
|
|
374
|
+
).then((r) => r.data ?? []),
|
|
346
375
|
staleTime: 3e4,
|
|
347
|
-
enabled: !!
|
|
348
|
-
}),
|
|
349
|
-
const
|
|
350
|
-
if (!
|
|
351
|
-
const
|
|
352
|
-
return
|
|
353
|
-
})(), {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
...O ? { fields: O } : {},
|
|
371
|
-
...S ? { sort: S } : {}
|
|
372
|
-
})
|
|
373
|
-
).then((l) => l.data ?? []),
|
|
374
|
-
enabled: P && !!r,
|
|
375
|
-
staleTime: g ? 0 : 3e4
|
|
376
|
-
}), k = (t == null ? void 0 : t.getStagedLinks(d)) ?? [], U = (t == null ? void 0 : t.getStagedUnlinks(d)) ?? /* @__PURE__ */ new Set(), f = X.find((l) => !U.has(l.id)) ?? null, _ = f ? f[v] : null, Y = k.length > 0 ? k[k.length - 1] : null, m = Y ?? _, Z = k.length > 0 || U.size > 0, $ = me(J);
|
|
377
|
-
$.current = J, ue(() => {
|
|
378
|
-
var l;
|
|
379
|
-
(l = $.current) == null || l.call($, m != null ? 1 : 0);
|
|
376
|
+
enabled: !!i && i !== "new"
|
|
377
|
+
}), D = he().isAdmin, E = s === "nivaro_users" ? xe(D) : null, X = ye(s === "nivaro_users"), R = d ? E ? { _and: [d, E] } : d : E, z = R ? JSON.stringify(R) : void 0, H = h && !/^-?label$/.test(h) ? h : void 0, Y = (() => {
|
|
378
|
+
const r = o == null ? void 0 : o.display_template;
|
|
379
|
+
if (!r || !r.includes(".")) return null;
|
|
380
|
+
const b = [...r.matchAll(/\{\{([^}]+)\}\}/g)].map((ne) => ne[1].trim());
|
|
381
|
+
return b.length === 0 ? null : ["id", ...b].join(",");
|
|
382
|
+
})(), {
|
|
383
|
+
options: M,
|
|
384
|
+
isLoading: B,
|
|
385
|
+
localSearch: Z
|
|
386
|
+
} = Ue({
|
|
387
|
+
client: x,
|
|
388
|
+
relatedCollection: s,
|
|
389
|
+
search: y,
|
|
390
|
+
filterParam: z,
|
|
391
|
+
serverSort: H,
|
|
392
|
+
templateNestedFields: Y,
|
|
393
|
+
enabled: j && !!s,
|
|
394
|
+
labelOf: e
|
|
395
|
+
}), _ = (t == null ? void 0 : t.getStagedLinks(u)) ?? [], A = (t == null ? void 0 : t.getStagedUnlinks(u)) ?? /* @__PURE__ */ new Set(), g = W.find((r) => !A.has(r.id)) ?? null, O = g ? g[w] : null, ee = _.length > 0 ? _[_.length - 1] : null, m = ee ?? O, te = _.length > 0 || A.size > 0, $ = me(N);
|
|
396
|
+
$.current = N, fe(() => {
|
|
397
|
+
var r;
|
|
398
|
+
(r = $.current) == null || r.call($, m != null ? 1 : 0);
|
|
380
399
|
}, [m]);
|
|
381
|
-
const { data:
|
|
382
|
-
queryKey: ["relation-single",
|
|
383
|
-
queryFn: () =>
|
|
384
|
-
enabled: !!
|
|
400
|
+
const { data: K } = L({
|
|
401
|
+
queryKey: ["relation-single", s, String(m)],
|
|
402
|
+
queryFn: () => F(s, m),
|
|
403
|
+
enabled: !!s && m != null,
|
|
385
404
|
staleTime: 6e4
|
|
386
|
-
}),
|
|
387
|
-
queryKey: ["relation-avail",
|
|
388
|
-
queryFn: () =>
|
|
389
|
-
|
|
390
|
-
filter:
|
|
405
|
+
}), J = JSON.stringify(d ? { _and: [{ id: { _eq: m } }, d] } : { id: { _eq: m } }), { data: I } = L({
|
|
406
|
+
queryKey: ["relation-avail", s, String(m), z],
|
|
407
|
+
queryFn: () => x.request(
|
|
408
|
+
U(`/items/${s}`, {
|
|
409
|
+
filter: J,
|
|
391
410
|
picker: "1",
|
|
392
411
|
limit: 1,
|
|
393
412
|
fields: "id"
|
|
394
413
|
})
|
|
395
|
-
).then((
|
|
396
|
-
enabled: !!
|
|
414
|
+
).then((r) => r.data ?? []),
|
|
415
|
+
enabled: !!s && m != null && !!K,
|
|
397
416
|
staleTime: 3e4
|
|
398
|
-
}), G =
|
|
399
|
-
function
|
|
400
|
-
|
|
417
|
+
}), G = I !== void 0 && I.length === 0, k = Re(G);
|
|
418
|
+
function e(r) {
|
|
419
|
+
const b = (o == null ? void 0 : o.display_template) ?? null;
|
|
420
|
+
return b ? Oe(b, r) : String(r.name ?? r.title ?? r.label ?? r.id ?? "");
|
|
401
421
|
}
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
404
|
-
return /* @__PURE__ */
|
|
405
|
-
function
|
|
406
|
-
for (const
|
|
407
|
-
|
|
422
|
+
const a = M.find((r) => String(r.id) === String(m)) ?? K, f = m != null && !K && !a, V = a ? e(a) : null;
|
|
423
|
+
if (q)
|
|
424
|
+
return /* @__PURE__ */ l("span", { className: "block truncate text-[12px] text-slate-700 dark:text-slate-200", children: f ? "…" : V ?? "—" });
|
|
425
|
+
function $e(r) {
|
|
426
|
+
for (const b of _) t == null || t.unstageLink(u, b);
|
|
427
|
+
g && !A.has(g.id) && (t == null || t.stageUnlink(u, g.id)), String(r) === String(O) && g ? t == null || t.unstageUnlink(u, g.id) : String(r) !== String(m) && (t == null || t.stageLink(u, r)), v(!1), C("");
|
|
408
428
|
}
|
|
409
|
-
function
|
|
410
|
-
for (const
|
|
411
|
-
|
|
429
|
+
function Ke() {
|
|
430
|
+
for (const r of _) t == null || t.unstageLink(u, r);
|
|
431
|
+
g && (t == null || t.stageUnlink(u, g.id)), v(!1);
|
|
412
432
|
}
|
|
413
|
-
return
|
|
433
|
+
return S ? /* @__PURE__ */ c(
|
|
414
434
|
"button",
|
|
415
435
|
{
|
|
416
436
|
type: "button",
|
|
@@ -419,54 +439,54 @@ function rt({
|
|
|
419
439
|
children: [
|
|
420
440
|
/* @__PURE__ */ c("span", { className: "truncate text-muted-foreground", children: [
|
|
421
441
|
"Select ",
|
|
422
|
-
|
|
442
|
+
S,
|
|
423
443
|
" first"
|
|
424
444
|
] }),
|
|
425
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ l(le, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
426
446
|
]
|
|
427
447
|
}
|
|
428
|
-
) : /* @__PURE__ */ c("div", { ...
|
|
448
|
+
) : /* @__PURE__ */ c("div", { ...k.bind, children: [
|
|
429
449
|
/* @__PURE__ */ c(
|
|
430
|
-
|
|
450
|
+
Le,
|
|
431
451
|
{
|
|
432
|
-
open:
|
|
433
|
-
onOpenChange: (
|
|
434
|
-
|
|
452
|
+
open: j,
|
|
453
|
+
onOpenChange: (r) => {
|
|
454
|
+
v(r), r || C("");
|
|
435
455
|
},
|
|
436
456
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ l(qe, { asChild: !0, children: /* @__PURE__ */ c(
|
|
438
458
|
"button",
|
|
439
459
|
{
|
|
440
460
|
type: "button",
|
|
441
461
|
className: Q(
|
|
442
462
|
"w-full h-9 px-3 text-[12px] border rounded-md bg-background text-left flex items-center justify-between hover:bg-muted cursor-pointer transition-colors disabled:pointer-events-none disabled:opacity-50",
|
|
443
|
-
G ? "border-amber-300 dark:border-amber-600" :
|
|
463
|
+
G ? "border-amber-300 dark:border-amber-600" : te ? "border-nvr-cyan/50" : "border-input"
|
|
444
464
|
),
|
|
445
465
|
children: [
|
|
446
|
-
|
|
466
|
+
f || ie && ee == null && i !== "new" ? /* @__PURE__ */ l(oe, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }) : /* @__PURE__ */ c(
|
|
447
467
|
"span",
|
|
448
468
|
{
|
|
449
469
|
className: Q(
|
|
450
470
|
"flex items-center gap-1.5 truncate min-w-0",
|
|
451
|
-
|
|
471
|
+
V ? te ? "text-nvr-cyan" : "text-slate-800 dark:text-slate-100" : "text-muted-foreground"
|
|
452
472
|
),
|
|
453
473
|
children: [
|
|
454
|
-
G && /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
474
|
+
G && /* @__PURE__ */ l(de, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" }),
|
|
475
|
+
/* @__PURE__ */ l("span", { className: "truncate", children: V ?? "Select…" })
|
|
456
476
|
]
|
|
457
477
|
}
|
|
458
478
|
),
|
|
459
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ l(le, { className: "h-4 w-4 shrink-0 opacity-50" })
|
|
460
480
|
]
|
|
461
481
|
}
|
|
462
482
|
) }),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
|
|
483
|
+
/* @__PURE__ */ l(Ce, { className: "w-[320px] p-0", align: "start", children: /* @__PURE__ */ c(ve, { shouldFilter: !1, children: [
|
|
484
|
+
/* @__PURE__ */ l(
|
|
485
|
+
ke,
|
|
466
486
|
{
|
|
467
487
|
placeholder: "Search…",
|
|
468
|
-
value:
|
|
469
|
-
onValueChange:
|
|
488
|
+
value: y,
|
|
489
|
+
onValueChange: C,
|
|
470
490
|
className: "h-9 text-[12px]"
|
|
471
491
|
}
|
|
472
492
|
),
|
|
@@ -475,57 +495,57 @@ function rt({
|
|
|
475
495
|
{
|
|
476
496
|
type: "button",
|
|
477
497
|
onClick: () => {
|
|
478
|
-
|
|
498
|
+
Ke(), v(!1);
|
|
479
499
|
},
|
|
480
500
|
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",
|
|
481
501
|
children: [
|
|
482
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ l(ce, { className: "h-3.5 w-3.5 text-slate-400" }),
|
|
483
503
|
"Clear selection"
|
|
484
504
|
]
|
|
485
505
|
}
|
|
486
506
|
),
|
|
487
|
-
/* @__PURE__ */ c(
|
|
488
|
-
|
|
489
|
-
!
|
|
490
|
-
(
|
|
491
|
-
).map((
|
|
492
|
-
const
|
|
507
|
+
/* @__PURE__ */ c(Se, { children: [
|
|
508
|
+
B ? /* @__PURE__ */ l("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ l(oe, { className: "h-4 w-4 animate-spin text-muted-foreground" }) }) : /* @__PURE__ */ l(Ne, { className: "py-3 text-left text-[12px] text-muted-foreground px-3", children: "No results" }),
|
|
509
|
+
!B && /* @__PURE__ */ l(we, { children: [...se(M, y, Z, e)].sort(
|
|
510
|
+
(r, b) => H ? 0 : be(e(r), e(b), y, h === "-label")
|
|
511
|
+
).map((r) => {
|
|
512
|
+
const b = String(r.id), ne = String(m) === b;
|
|
493
513
|
return /* @__PURE__ */ c(
|
|
494
|
-
|
|
514
|
+
_e,
|
|
495
515
|
{
|
|
496
|
-
value:
|
|
497
|
-
onSelect: () =>
|
|
516
|
+
value: b,
|
|
517
|
+
onSelect: () => $e(r.id),
|
|
498
518
|
className: "flex items-center gap-2 text-[12px]",
|
|
499
519
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ l(
|
|
501
521
|
"div",
|
|
502
522
|
{
|
|
503
523
|
className: Q(
|
|
504
524
|
"flex h-4 w-4 shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
505
|
-
|
|
525
|
+
ne ? "border-nvr-cyan bg-nvr-cyan" : "border-slate-300 dark:border-slate-500"
|
|
506
526
|
),
|
|
507
|
-
children:
|
|
527
|
+
children: ne && /* @__PURE__ */ l(ue, { className: "h-2.5 w-2.5 text-white" })
|
|
508
528
|
}
|
|
509
529
|
),
|
|
510
|
-
|
|
511
|
-
|
|
530
|
+
s === "nivaro_users" && /* @__PURE__ */ l(
|
|
531
|
+
ge,
|
|
512
532
|
{
|
|
513
|
-
userId:
|
|
533
|
+
userId: b,
|
|
514
534
|
className: "h-4 w-4",
|
|
515
|
-
fallback: /* @__PURE__ */
|
|
535
|
+
fallback: /* @__PURE__ */ l("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full bg-nvr-cyan/20 text-[8px] font-bold text-nvr-navy dark:text-nvr-cyan", children: je(e(r)) })
|
|
516
536
|
}
|
|
517
537
|
),
|
|
518
|
-
|
|
538
|
+
s === "nivaro_users" && X.has(b.toUpperCase()) && /* @__PURE__ */ l(
|
|
519
539
|
"span",
|
|
520
540
|
{
|
|
521
541
|
className: "h-1.5 w-1.5 shrink-0 rounded-full bg-emerald-500",
|
|
522
542
|
"data-tip": "Online now"
|
|
523
543
|
}
|
|
524
544
|
),
|
|
525
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ l("span", { className: "truncate", children: e(r) })
|
|
526
546
|
]
|
|
527
547
|
},
|
|
528
|
-
|
|
548
|
+
b
|
|
529
549
|
);
|
|
530
550
|
}) })
|
|
531
551
|
] })
|
|
@@ -533,12 +553,14 @@ function rt({
|
|
|
533
553
|
]
|
|
534
554
|
}
|
|
535
555
|
),
|
|
536
|
-
|
|
556
|
+
k.tip
|
|
537
557
|
] });
|
|
538
558
|
}
|
|
539
559
|
export {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
560
|
+
ot as M2MCombobox,
|
|
561
|
+
ct as M2MSingleSelectCombobox,
|
|
562
|
+
at as m2aWriteMeta,
|
|
563
|
+
ze as m2mAsksServer,
|
|
564
|
+
se as narrowM2MOptions,
|
|
565
|
+
Ie as resolveM2MRelatedCollection
|
|
544
566
|
};
|