@nivaro/react 0.3.138 → 0.3.140
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/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +36 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2677 -2658
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3038 -3027
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1167 -1153
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +671 -670
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +121 -121
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +316 -278
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { jsxs as t, jsx as e, Fragment as
|
|
2
|
-
import { readUser as
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as te } from "react/jsx-runtime";
|
|
2
|
+
import { readUser as ve, readUserCard as ke, updateUser as me, readMyScopes as Ne, saveMyScopeDefaults as we, readItems as re } from "@nivaro/sdk";
|
|
3
3
|
import { useQueryClient as M, useQuery as v, useMutation as _ } from "@tanstack/react-query";
|
|
4
|
-
import { Loader2 as
|
|
5
|
-
import { useRef as
|
|
6
|
-
import { useNivaroClient as F, useItemEditAuth as
|
|
7
|
-
import { get as A, patch as
|
|
8
|
-
import { parseLiveMode as
|
|
9
|
-
import { playNotificationSound as
|
|
10
|
-
import { restrictedScopeSelections as
|
|
11
|
-
import { BRAND_ACCENT as
|
|
12
|
-
import { playUrgentChime as
|
|
13
|
-
import { announceLocalPrefs as
|
|
14
|
-
import { cn as z, setDisplayTimezone as
|
|
15
|
-
import { CustomStatusEditor as
|
|
16
|
-
import { mergeNotifyRulesClient as
|
|
17
|
-
import { TestMyRules as
|
|
18
|
-
import { AgentsPanel as
|
|
19
|
-
import { AiMemoryCard as
|
|
20
|
-
import { BrowserPushCard as
|
|
21
|
-
import { DelegationCard as
|
|
22
|
-
import { MailSuppressedPill as
|
|
23
|
-
import { PersonDidPanel as
|
|
24
|
-
import { TeamLoadCard as
|
|
25
|
-
import { TeamsConnect as
|
|
26
|
-
import { CopyValueButton as
|
|
27
|
-
import { NotificationSourcesCard as
|
|
28
|
-
import { MyDefaultsCard as
|
|
29
|
-
import { UserScopesCard as
|
|
30
|
-
import { PersonProfile as
|
|
31
|
-
import { Toggle as
|
|
32
|
-
import { SignedInDevices as
|
|
33
|
-
import { SupportEmailSwitch as
|
|
4
|
+
import { Loader2 as ue, Camera as _e, Building2 as Se, Mail as Ce, Phone as qe, Clock as Pe, Undo2 as Te, Check as Ae, UserRound as Fe, Filter as Le, LogOut as Oe, ShieldCheck as Me } from "lucide-react";
|
|
5
|
+
import { useRef as ge, useEffect as De, useState as q, useMemo as Ke } from "react";
|
|
6
|
+
import { useNivaroClient as F, useItemEditAuth as le } from "../context.js";
|
|
7
|
+
import { get as A, patch as Z, post as ae, put as Ee, del as Re } from "../lib/commands.js";
|
|
8
|
+
import { parseLiveMode as pe, LIVE_MODE_LABELS as Ie, LIVE_MODE_HINTS as J, useLivePreference as je } from "../lib/live-preference.js";
|
|
9
|
+
import { playNotificationSound as he } from "../lib/notification-sound.js";
|
|
10
|
+
import { restrictedScopeSelections as Ue, cascadeFilter as Qe, fetchCascadeRelations as $e } from "../lib/quick-filter-cascade.js";
|
|
11
|
+
import { BRAND_ACCENT as ne, parseThemeAccents as ze, DEFAULT_THEME_ACCENTS as be } from "../lib/theme-accents.js";
|
|
12
|
+
import { playUrgentChime as fe } from "../lib/urgent-chime.js";
|
|
13
|
+
import { announceLocalPrefs as se } from "../lib/user-sync.js";
|
|
14
|
+
import { cn as z, formatNumber as H, setDisplayTimezone as Be } from "../lib/utils.js";
|
|
15
|
+
import { CustomStatusEditor as He, activeCustomStatus as Ye } from "./CustomStatusEditor.js";
|
|
16
|
+
import { mergeNotifyRulesClient as Ve, NOTIFY_RULE_CATS as We, NotificationRulesEditor as Ge } from "./notifications/NotificationRulesEditor.js";
|
|
17
|
+
import { TestMyRules as Je } from "./notifications/TestMyRules.js";
|
|
18
|
+
import { AgentsPanel as Ze } from "./profile/AgentsPanel.js";
|
|
19
|
+
import { AiMemoryCard as Xe, AiHistoryCard as et } from "./profile/AiMemoryCard.js";
|
|
20
|
+
import { BrowserPushCard as tt } from "./profile/BrowserPushCard.js";
|
|
21
|
+
import { DelegationCard as at } from "./profile/DelegationCard.js";
|
|
22
|
+
import { MailSuppressedPill as rt } from "./profile/MailSuppressedPill.js";
|
|
23
|
+
import { PersonDidPanel as nt } from "./profile/PersonDidPanel.js";
|
|
24
|
+
import { TeamLoadCard as st } from "./profile/PersonExtras.js";
|
|
25
|
+
import { TeamsConnect as lt } from "./profile/TeamsConnect.js";
|
|
26
|
+
import { CopyValueButton as ot } from "./CopyValueButton.js";
|
|
27
|
+
import { NotificationSourcesCard as it } from "./NotificationSourcesCard.js";
|
|
28
|
+
import { MyDefaultsCard as dt } from "./profile/MyDefaultsCard.js";
|
|
29
|
+
import { UserScopesCard as ct } from "./profile/PersonAccess.js";
|
|
30
|
+
import { PersonProfile as mt } from "./profile/PersonProfile.js";
|
|
31
|
+
import { Toggle as ye, SectionCard as oe, Field as W, ConfirmButton as xe } from "./profile/primitives.js";
|
|
32
|
+
import { SignedInDevices as ut } from "./profile/SignedInDevices.js";
|
|
33
|
+
import { SupportEmailSwitch as pt } from "./support/SupportEmailSwitch.js";
|
|
34
34
|
import { SimpleSelectXs as R } from "./ui/SimpleSelect.js";
|
|
35
|
-
const
|
|
35
|
+
const ht = (s) => [s.first_name, s.last_name].filter(Boolean).join(" ") || (s.email ?? "Unknown"), bt = (s) => {
|
|
36
36
|
var m, r;
|
|
37
37
|
return (`${((m = s.first_name) == null ? void 0 : m[0]) ?? ""}${((r = s.last_name) == null ? void 0 : r[0]) ?? ""}` || (s.email ?? "?").slice(0, 2)).toUpperCase();
|
|
38
|
-
},
|
|
39
|
-
function
|
|
38
|
+
}, xt = We;
|
|
39
|
+
function gt() {
|
|
40
40
|
const s = F(), m = M(), { data: r = [] } = v({
|
|
41
41
|
queryKey: ["nvr-profile-fields"],
|
|
42
42
|
queryFn: () => s.request(A("/profile-fields/mine")).then((a) => a.data ?? []).catch(() => [])
|
|
43
43
|
}), [n, o] = q(null), d = _({
|
|
44
|
-
mutationFn: (a) => s.request(
|
|
44
|
+
mutationFn: (a) => s.request(Ee("/profile-fields/mine", { values: a })),
|
|
45
45
|
onSuccess: () => {
|
|
46
46
|
o(null), m.invalidateQueries({ queryKey: ["nvr-profile-fields"] });
|
|
47
47
|
}
|
|
@@ -113,9 +113,9 @@ function xt() {
|
|
|
113
113
|
] })
|
|
114
114
|
] });
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
var
|
|
118
|
-
const s = F(), m =
|
|
116
|
+
function ft() {
|
|
117
|
+
var G, ie, de;
|
|
118
|
+
const s = F(), m = le(), r = M(), { data: n } = v({
|
|
119
119
|
queryKey: ["nvr-profile-prefs"],
|
|
120
120
|
queryFn: () => s.request(A("/users/me")).then((l) => {
|
|
121
121
|
var b;
|
|
@@ -130,8 +130,8 @@ function gt() {
|
|
|
130
130
|
link: ((w = l.data) == null ? void 0 : w.teams_link) ?? null
|
|
131
131
|
};
|
|
132
132
|
})
|
|
133
|
-
}), d = (o == null ? void 0 : o.available) === !0, c = ((
|
|
134
|
-
|
|
133
|
+
}), d = (o == null ? void 0 : o.available) === !0, c = ((G = o == null ? void 0 : o.link) == null ? void 0 : G.status) === "active", i = ge(null), a = n != null;
|
|
134
|
+
De(() => {
|
|
135
135
|
var l;
|
|
136
136
|
!a || typeof window > "u" || window.location.hash === "#notification-rules" && ((l = i.current) == null || l.scrollIntoView({ block: "start", behavior: "smooth" }));
|
|
137
137
|
}, [a]);
|
|
@@ -139,21 +139,21 @@ function gt() {
|
|
|
139
139
|
queryKey: ["nvr-my-rule-defaults"],
|
|
140
140
|
queryFn: () => s.request(A("/notifications/my-rule-defaults")).then((l) => l.data).catch(() => null),
|
|
141
141
|
staleTime: 6e4
|
|
142
|
-
}), P = (n == null ? void 0 : n.email_digest) === "daily" ? "daily" : "instant", C =
|
|
143
|
-
var b, w,
|
|
144
|
-
return ((w = (b = h.matrix) == null ? void 0 : b[l]) == null ? void 0 : w.email) ?? (P === "daily" ? "daily" : ((
|
|
142
|
+
}), P = (n == null ? void 0 : n.email_digest) === "daily" ? "daily" : "instant", C = Ve(h, u != null && u.role ? u.rules : null), D = (l) => {
|
|
143
|
+
var b, w, V, ce;
|
|
144
|
+
return ((w = (b = h.matrix) == null ? void 0 : b[l]) == null ? void 0 : w.email) ?? (P === "daily" ? "daily" : ((ce = (V = C.matrix) == null ? void 0 : V[l]) == null ? void 0 : ce.email) ?? P);
|
|
145
145
|
}, y = _({
|
|
146
|
-
mutationFn: (l) => s.request(
|
|
146
|
+
mutationFn: (l) => s.request(Z("/users/me/preferences", { notification_prefs: l })),
|
|
147
147
|
onSuccess: () => {
|
|
148
|
-
r.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }),
|
|
148
|
+
r.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), se(["notification_prefs"]);
|
|
149
149
|
}
|
|
150
150
|
}), S = _({
|
|
151
|
-
mutationFn: (l) => s.request(
|
|
151
|
+
mutationFn: (l) => s.request(Z("/users/me/preferences", l)),
|
|
152
152
|
onSuccess: (l, b) => {
|
|
153
|
-
r.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }),
|
|
153
|
+
r.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), se(Object.keys(b));
|
|
154
154
|
}
|
|
155
155
|
}), [k, L] = q(null), f = _({
|
|
156
|
-
mutationFn: (l) => s.request(
|
|
156
|
+
mutationFn: (l) => s.request(ae("/notifications/rules-preview", { notification_prefs: l })),
|
|
157
157
|
onSuccess: (l) => L({
|
|
158
158
|
total: l.data.total_notifications,
|
|
159
159
|
current: l.data.current,
|
|
@@ -168,8 +168,8 @@ function gt() {
|
|
|
168
168
|
f.mutate(b), y.mutate(b);
|
|
169
169
|
}, $ = (l) => I({ ...h, ...l }), x = (n == null ? void 0 : n.notification_sounds) ?? {}, K = (l, b) => {
|
|
170
170
|
const w = { ...x };
|
|
171
|
-
b === "default" ? delete w[l] : w[l] = b, b !== "default" &&
|
|
172
|
-
}, { data:
|
|
171
|
+
b === "default" ? delete w[l] : w[l] = b, b !== "default" && he(b, { preview: !0 }), S.mutate({ notification_sounds: Object.keys(w).length ? w : null });
|
|
172
|
+
}, { data: Y } = v({
|
|
173
173
|
queryKey: ["nvr-noise-suggestions"],
|
|
174
174
|
queryFn: () => s.request(A("/notifications/noise-suggestions")).then((l) => l.data ?? []),
|
|
175
175
|
staleTime: 6e5
|
|
@@ -188,10 +188,10 @@ function gt() {
|
|
|
188
188
|
} catch {
|
|
189
189
|
}
|
|
190
190
|
}, p = Number.isInteger(Number(n == null ? void 0 : n.digest_hour)) ? Number(n == null ? void 0 : n.digest_hour) : 7, N = (l) => `${l % 12 === 0 ? 12 : l % 12}:45 ${l < 12 ? "AM" : "PM"}`, [T, E] = q(null), O = _({
|
|
191
|
-
mutationFn: () => s.request(
|
|
191
|
+
mutationFn: () => s.request(ae("/users/me/digest-test", {})),
|
|
192
192
|
onSuccess: (l) => E(l.data.note),
|
|
193
193
|
onError: () => E("Test send failed — try again.")
|
|
194
|
-
}),
|
|
194
|
+
}), X = xt.some((l) => D(l.key) === "daily"), ee = ({ text: l }) => /* @__PURE__ */ e(
|
|
195
195
|
"span",
|
|
196
196
|
{
|
|
197
197
|
className: "ml-1 inline-flex h-3.5 w-3.5 cursor-help items-center justify-center rounded-full border border-slate-300 text-[9px] font-semibold normal-case tracking-normal text-slate-400 dark:border-border",
|
|
@@ -215,7 +215,7 @@ function gt() {
|
|
|
215
215
|
/* @__PURE__ */ e("p", { className: "mt-0.5 text-[11px] text-slate-400", children: "Per category: whether it lands in your in-app inbox, whether your browser pushes it, and how it reaches your email — each one as it happens, folded into the daily action summary, or not at all. Quiet hours pause pushes and hold emails until morning unless a category is let through them; critical alerts (SLA escalations, maintenance, monitor failures) always get through." })
|
|
216
216
|
] }),
|
|
217
217
|
/* @__PURE__ */ t("div", { className: "space-y-3 p-4", children: [
|
|
218
|
-
(
|
|
218
|
+
(Y ?? []).filter((l) => !U.includes(l.category)).map((l) => /* @__PURE__ */ t(
|
|
219
219
|
"div",
|
|
220
220
|
{
|
|
221
221
|
"data-noise-suggestion": l.category,
|
|
@@ -240,7 +240,7 @@ function gt() {
|
|
|
240
240
|
},
|
|
241
241
|
children: "Muted — undo"
|
|
242
242
|
}
|
|
243
|
-
) : /* @__PURE__ */ t(
|
|
243
|
+
) : /* @__PURE__ */ t(te, { children: [
|
|
244
244
|
/* @__PURE__ */ e(
|
|
245
245
|
"button",
|
|
246
246
|
{
|
|
@@ -249,7 +249,7 @@ function gt() {
|
|
|
249
249
|
onClick: () => {
|
|
250
250
|
var w;
|
|
251
251
|
const b = ((w = h.matrix) == null ? void 0 : w[l.category]) ?? { inapp: !0, push: !0 };
|
|
252
|
-
g((
|
|
252
|
+
g((V) => ({ ...V, [l.category]: b })), $({
|
|
253
253
|
matrix: {
|
|
254
254
|
...h.matrix ?? {},
|
|
255
255
|
[l.category]: { ...b, inapp: !1, push: !1 }
|
|
@@ -276,16 +276,16 @@ function gt() {
|
|
|
276
276
|
k.proposed.inapp,
|
|
277
277
|
" in-app instead of",
|
|
278
278
|
" ",
|
|
279
|
-
k.current.inapp,
|
|
279
|
+
H(k.current.inapp),
|
|
280
280
|
", ",
|
|
281
|
-
k.proposed.email_sent,
|
|
282
|
-
" emails instead of",
|
|
281
|
+
H(k.proposed.email_sent),
|
|
283
282
|
" ",
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
" pushes instead of",
|
|
283
|
+
"emails instead of ",
|
|
284
|
+
H(k.current.email_sent),
|
|
285
|
+
",",
|
|
288
286
|
" ",
|
|
287
|
+
H(k.proposed.push),
|
|
288
|
+
" pushes instead of ",
|
|
289
289
|
k.current.push,
|
|
290
290
|
"."
|
|
291
291
|
] }),
|
|
@@ -305,16 +305,16 @@ function gt() {
|
|
|
305
305
|
{ value: "chime", label: "Chime" }
|
|
306
306
|
],
|
|
307
307
|
onChange: (l) => {
|
|
308
|
-
|
|
308
|
+
he(l, { preview: !0 }), S.mutate({ notification_sound: l });
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
),
|
|
312
312
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "plays when a notification or a direct message arrives" }),
|
|
313
|
-
/* @__PURE__ */ e("span", { className: "ml-auto", children: /* @__PURE__ */ e(
|
|
313
|
+
/* @__PURE__ */ e("span", { className: "ml-auto", children: /* @__PURE__ */ e(Je, {}) })
|
|
314
314
|
] }),
|
|
315
315
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2 text-[12.5px] text-slate-600 dark:text-muted-foreground", children: [
|
|
316
316
|
/* @__PURE__ */ e(
|
|
317
|
-
|
|
317
|
+
ye,
|
|
318
318
|
{
|
|
319
319
|
on: (n == null ? void 0 : n.huddle_hold_notifications) !== !1,
|
|
320
320
|
onChange: () => S.mutate({
|
|
@@ -326,24 +326,24 @@ function gt() {
|
|
|
326
326
|
"Hold notifications during huddles",
|
|
327
327
|
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "toasts and sounds wait while you talk; you get one summary when you leave" })
|
|
328
328
|
] }),
|
|
329
|
-
/* @__PURE__ */ e(
|
|
329
|
+
/* @__PURE__ */ e(pt, {}),
|
|
330
330
|
/* @__PURE__ */ e(
|
|
331
|
-
|
|
331
|
+
Mt,
|
|
332
332
|
{
|
|
333
333
|
on: (n == null ? void 0 : n.urgent_sound) === !0,
|
|
334
334
|
onChange: (l) => {
|
|
335
|
-
l &&
|
|
335
|
+
l && fe({ preview: !0 }), S.mutate({ urgent_sound: l ? !0 : null });
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
),
|
|
339
339
|
/* @__PURE__ */ e(
|
|
340
|
-
|
|
340
|
+
Ge,
|
|
341
341
|
{
|
|
342
342
|
subject: "person",
|
|
343
343
|
isAdmin: m.isAdmin,
|
|
344
344
|
value: h,
|
|
345
345
|
inherited: u != null && u.role ? u.rules : null,
|
|
346
|
-
inheritedName: ((
|
|
346
|
+
inheritedName: ((ie = u == null ? void 0 : u.role) == null ? void 0 : ie.name) ?? null,
|
|
347
347
|
legacyEmail: P,
|
|
348
348
|
saving: y.isPending,
|
|
349
349
|
onCommit: (l) => I(l),
|
|
@@ -351,12 +351,12 @@ function gt() {
|
|
|
351
351
|
teams: d ? {
|
|
352
352
|
available: !0,
|
|
353
353
|
linked: c,
|
|
354
|
-
header: /* @__PURE__ */ e("div", { className: "mt-0.5", children: /* @__PURE__ */ e(
|
|
354
|
+
header: /* @__PURE__ */ e("div", { className: "mt-0.5", children: /* @__PURE__ */ e(lt, { linked: c, linkedAt: (de = o == null ? void 0 : o.link) == null ? void 0 : de.linked_at }) })
|
|
355
355
|
} : null,
|
|
356
356
|
extraColumn: {
|
|
357
|
-
header: /* @__PURE__ */ t(
|
|
357
|
+
header: /* @__PURE__ */ t(te, { children: [
|
|
358
358
|
"Sound",
|
|
359
|
-
/* @__PURE__ */ e(
|
|
359
|
+
/* @__PURE__ */ e(ee, { text: "A different sound for this category, or none. Default follows the Sound setting above." })
|
|
360
360
|
] }),
|
|
361
361
|
cell: (l, b) => /* @__PURE__ */ e("div", { className: "inline-block", children: /* @__PURE__ */ e(
|
|
362
362
|
R,
|
|
@@ -380,7 +380,7 @@ function gt() {
|
|
|
380
380
|
"Daily action summary",
|
|
381
381
|
/* @__PURE__ */ t("span", { className: "ml-1.5 text-[11px] font-normal text-slate-400", children: [
|
|
382
382
|
"one morning email — every category set to Daily summary, plus items assigned to you and invoices awaiting your review",
|
|
383
|
-
!
|
|
383
|
+
!X && " · nothing is set to Daily summary yet"
|
|
384
384
|
] })
|
|
385
385
|
] }),
|
|
386
386
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-x-4 gap-y-2 text-[12px] text-slate-600 dark:text-muted-foreground", children: [
|
|
@@ -439,10 +439,10 @@ function gt() {
|
|
|
439
439
|
{
|
|
440
440
|
type: "checkbox",
|
|
441
441
|
checked: ((w = n == null ? void 0 : n.auto_watch) == null ? void 0 : w[l]) === !0,
|
|
442
|
-
onChange: (
|
|
442
|
+
onChange: (V) => S.mutate({
|
|
443
443
|
auto_watch: {
|
|
444
444
|
...(n == null ? void 0 : n.auto_watch) ?? {},
|
|
445
|
-
[l]:
|
|
445
|
+
[l]: V.target.checked
|
|
446
446
|
}
|
|
447
447
|
}),
|
|
448
448
|
className: "rounded"
|
|
@@ -457,7 +457,7 @@ function gt() {
|
|
|
457
457
|
}
|
|
458
458
|
);
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function yt() {
|
|
461
461
|
const s = F(), m = M(), { data: r } = v({
|
|
462
462
|
queryKey: ["nvr-profile-prefs"],
|
|
463
463
|
queryFn: () => s.request(A("/users/me")).then((c) => {
|
|
@@ -465,7 +465,7 @@ function ft() {
|
|
|
465
465
|
return ((i = c.data) == null ? void 0 : i.preferences) ?? {};
|
|
466
466
|
})
|
|
467
467
|
}), n = (r == null ? void 0 : r.link_app) === "portal" || (r == null ? void 0 : r.link_app) === "admin" ? r.link_app : "auto", o = _({
|
|
468
|
-
mutationFn: (c) => s.request(
|
|
468
|
+
mutationFn: (c) => s.request(Z("/users/me/preferences", { link_app: c })),
|
|
469
469
|
onSuccess: () => void m.invalidateQueries({ queryKey: ["nvr-profile-prefs"] })
|
|
470
470
|
});
|
|
471
471
|
return /* @__PURE__ */ t(
|
|
@@ -495,7 +495,7 @@ function ft() {
|
|
|
495
495
|
}
|
|
496
496
|
);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function vt() {
|
|
499
499
|
const s = F(), m = M(), [r, n] = q(""), o = (() => {
|
|
500
500
|
try {
|
|
501
501
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -519,9 +519,9 @@ function yt() {
|
|
|
519
519
|
return ((P = u.data) == null ? void 0 : P.preferences) ?? {};
|
|
520
520
|
})
|
|
521
521
|
}), i = typeof (c == null ? void 0 : c.timezone) == "string" ? c.timezone : null, a = _({
|
|
522
|
-
mutationFn: (u) => s.request(
|
|
522
|
+
mutationFn: (u) => s.request(Z("/users/me/preferences", { timezone: u })),
|
|
523
523
|
onSuccess: (u, P) => {
|
|
524
|
-
|
|
524
|
+
Be(P), n(""), m.invalidateQueries({ queryKey: ["nvr-profile-prefs"] });
|
|
525
525
|
}
|
|
526
526
|
}), h = r.length > 1 ? d.filter((u) => u.toLowerCase().includes(r.toLowerCase())).slice(0, 8) : [];
|
|
527
527
|
return /* @__PURE__ */ t(
|
|
@@ -574,23 +574,23 @@ function yt() {
|
|
|
574
574
|
}
|
|
575
575
|
);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function kt() {
|
|
578
578
|
const s = F(), m = M(), { data: r } = v({
|
|
579
579
|
queryKey: ["nvr-profile-scopes"],
|
|
580
|
-
queryFn: () => s.request(
|
|
580
|
+
queryFn: () => s.request(Ne()).then((o) => o.data)
|
|
581
581
|
}), n = _({
|
|
582
|
-
mutationFn: ({ dimension: o, values: d }) => s.request(
|
|
582
|
+
mutationFn: ({ dimension: o, values: d }) => s.request(we(o, d)),
|
|
583
583
|
onSuccess: () => void m.invalidateQueries({ queryKey: ["nvr-profile-scopes"] })
|
|
584
584
|
});
|
|
585
585
|
return !r || r.dimensions.length === 0 ? null : /* @__PURE__ */ e(
|
|
586
|
-
|
|
586
|
+
oe,
|
|
587
587
|
{
|
|
588
588
|
testId: "scopes",
|
|
589
|
-
icon: /* @__PURE__ */ e(
|
|
589
|
+
icon: /* @__PURE__ */ e(Le, { className: "h-4 w-4" }),
|
|
590
590
|
title: "Default filters",
|
|
591
591
|
hint: "Pre-selected in browsers and reports — clear anytime",
|
|
592
592
|
children: /* @__PURE__ */ e("div", { className: "space-y-3", children: r.dimensions.map((o) => /* @__PURE__ */ e(
|
|
593
|
-
|
|
593
|
+
Nt,
|
|
594
594
|
{
|
|
595
595
|
dimension: o,
|
|
596
596
|
selected: r.defaults[o.name] ?? [],
|
|
@@ -603,23 +603,23 @@ function vt() {
|
|
|
603
603
|
}
|
|
604
604
|
);
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Nt({
|
|
607
607
|
dimension: s,
|
|
608
608
|
selected: m,
|
|
609
609
|
restricted: r,
|
|
610
610
|
scopes: n,
|
|
611
611
|
onSave: o
|
|
612
612
|
}) {
|
|
613
|
-
const d = F(), c = M(), i = s.display_field ?? "name", [a, h] = q(""), [u, P] = q(!1), C =
|
|
613
|
+
const d = F(), c = M(), i = s.display_field ?? "name", [a, h] = q(""), [u, P] = q(!1), C = Ue(s.target_collection, n), D = async () => C.length ? Qe(
|
|
614
614
|
s.target_collection,
|
|
615
|
-
await
|
|
615
|
+
await $e(d, c, s.target_collection),
|
|
616
616
|
C
|
|
617
617
|
) : null, { data: y = [] } = v({
|
|
618
618
|
queryKey: ["nvr-scope-options", s.name, C],
|
|
619
619
|
queryFn: async () => {
|
|
620
620
|
const p = await D();
|
|
621
621
|
return ((await d.request(
|
|
622
|
-
|
|
622
|
+
re(s.target_collection, {
|
|
623
623
|
fields: ["id", i],
|
|
624
624
|
...p ? { filter: p } : {},
|
|
625
625
|
sort: s.options_sort ? [s.options_sort] : void 0,
|
|
@@ -634,7 +634,7 @@ function kt({
|
|
|
634
634
|
queryKey: ["nvr-scope-search", s.name, a, C],
|
|
635
635
|
queryFn: async () => {
|
|
636
636
|
const p = await D(), N = { [i]: { _contains: a } }, E = ((await d.request(
|
|
637
|
-
|
|
637
|
+
re(s.target_collection, {
|
|
638
638
|
fields: ["id", i],
|
|
639
639
|
filter: p ? { _and: [N, p] } : N,
|
|
640
640
|
sort: s.options_sort ? [s.options_sort] : void 0,
|
|
@@ -650,10 +650,10 @@ function kt({
|
|
|
650
650
|
placeholderData: (p) => p
|
|
651
651
|
}), x = new Map(y.map((p) => [String(p.id), p.label]));
|
|
652
652
|
for (const p of I) x.set(String(p.id), p.label);
|
|
653
|
-
const K = m.filter((p) => !x.has(String(p))), { data:
|
|
653
|
+
const K = m.filter((p) => !x.has(String(p))), { data: Y = [] } = v({
|
|
654
654
|
queryKey: ["nvr-scope-selected-labels", s.name, K.map(String).sort().join(",")],
|
|
655
655
|
queryFn: async () => ((await d.request(
|
|
656
|
-
|
|
656
|
+
re(s.target_collection, {
|
|
657
657
|
fields: ["id", i],
|
|
658
658
|
filter: { id: { _in: K } },
|
|
659
659
|
limit: 100
|
|
@@ -664,7 +664,7 @@ function kt({
|
|
|
664
664
|
})),
|
|
665
665
|
enabled: K.length > 0
|
|
666
666
|
});
|
|
667
|
-
for (const p of
|
|
667
|
+
for (const p of Y) x.set(String(p.id), p.label);
|
|
668
668
|
const j = (p) => {
|
|
669
669
|
const N = L.has(String(p));
|
|
670
670
|
o(N ? m.filter((T) => String(T) !== String(p)) : [...m, p]);
|
|
@@ -770,7 +770,7 @@ function kt({
|
|
|
770
770
|
] })
|
|
771
771
|
] });
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function wt() {
|
|
774
774
|
const { data: s } = v({
|
|
775
775
|
queryKey: ["nvr-settings-2fa"],
|
|
776
776
|
queryFn: () => r.request({ _method: "GET", _path: "/settings/" }).then((f) => (f == null ? void 0 : f.data) ?? null).catch(() => null),
|
|
@@ -810,9 +810,9 @@ function Nt() {
|
|
|
810
810
|
onSuccess: () => window.location.assign("/login")
|
|
811
811
|
});
|
|
812
812
|
return /* @__PURE__ */ e(
|
|
813
|
-
|
|
813
|
+
oe,
|
|
814
814
|
{
|
|
815
|
-
icon: /* @__PURE__ */ e(
|
|
815
|
+
icon: /* @__PURE__ */ e(Me, { className: "h-4 w-4" }),
|
|
816
816
|
title: "Security",
|
|
817
817
|
hint: m ? "Two-factor sign-in and API access" : "API access",
|
|
818
818
|
children: /* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
@@ -906,7 +906,7 @@ function Nt() {
|
|
|
906
906
|
/* @__PURE__ */ e("p", { className: "mt-0.5 text-[11.5px] text-slate-400", children: "Personal Bearer token for scripts and integrations. Shown once — creating a new one replaces the old." }),
|
|
907
907
|
a && /* @__PURE__ */ t("div", { className: "mt-2 flex items-center gap-2", children: [
|
|
908
908
|
/* @__PURE__ */ e("code", { className: "min-w-0 flex-1 select-all break-all rounded-md bg-slate-50 px-2.5 py-2 font-mono text-[11.5px] text-nvr-navy dark:bg-muted dark:text-nvr-cyan", children: a }),
|
|
909
|
-
/* @__PURE__ */ e(
|
|
909
|
+
/* @__PURE__ */ e(ot, { value: a, label: "Copy token", testId: "copy-own-api-token" })
|
|
910
910
|
] }),
|
|
911
911
|
/* @__PURE__ */ t("div", { className: "mt-2 flex gap-1.5", children: [
|
|
912
912
|
/* @__PURE__ */ e(
|
|
@@ -919,7 +919,7 @@ function Nt() {
|
|
|
919
919
|
}
|
|
920
920
|
),
|
|
921
921
|
/* @__PURE__ */ e(
|
|
922
|
-
|
|
922
|
+
xe,
|
|
923
923
|
{
|
|
924
924
|
title: "Revoke API token",
|
|
925
925
|
onConfirm: () => k.mutate(),
|
|
@@ -937,7 +937,7 @@ function Nt() {
|
|
|
937
937
|
/* @__PURE__ */ e("p", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: "Sessions" }),
|
|
938
938
|
/* @__PURE__ */ e("p", { className: "mt-0.5 text-[11.5px] text-slate-400", children: "Signs you out on every device and browser, including this one." }),
|
|
939
939
|
/* @__PURE__ */ t(
|
|
940
|
-
|
|
940
|
+
xe,
|
|
941
941
|
{
|
|
942
942
|
title: "Sign out everywhere",
|
|
943
943
|
onConfirm: () => L.mutate(),
|
|
@@ -945,7 +945,7 @@ function Nt() {
|
|
|
945
945
|
className: "mt-2 inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 px-3 text-[12px] font-medium text-slate-600 transition-colors hover:border-red-300 hover:text-red-500 dark:border-border dark:text-slate-300 dark:hover:border-red-500/40 dark:hover:text-red-400",
|
|
946
946
|
armedClassName: "border-red-300 font-semibold text-red-500 dark:border-red-500/40 dark:text-red-400",
|
|
947
947
|
children: [
|
|
948
|
-
/* @__PURE__ */ e(
|
|
948
|
+
/* @__PURE__ */ e(Oe, { className: "h-3.5 w-3.5" }),
|
|
949
949
|
L.isPending ? "Signing out…" : "Sign out everywhere"
|
|
950
950
|
]
|
|
951
951
|
}
|
|
@@ -955,31 +955,31 @@ function Nt() {
|
|
|
955
955
|
}
|
|
956
956
|
);
|
|
957
957
|
}
|
|
958
|
-
function
|
|
958
|
+
function ba({
|
|
959
959
|
userId: s,
|
|
960
960
|
className: m,
|
|
961
961
|
initialTab: r,
|
|
962
962
|
extra: n,
|
|
963
963
|
pushServiceWorker: o = "/sw.js"
|
|
964
964
|
}) {
|
|
965
|
-
const d =
|
|
966
|
-
return !s || (d == null ? void 0 : d.userId) != null && String(d.userId) === String(s) ? /* @__PURE__ */ e(
|
|
965
|
+
const d = le();
|
|
966
|
+
return !s || (d == null ? void 0 : d.userId) != null && String(d.userId) === String(s) ? /* @__PURE__ */ e(_t, { className: m, extra: n, pushServiceWorker: o }) : /* @__PURE__ */ e(mt, { userId: s, className: m, initialTab: r });
|
|
967
967
|
}
|
|
968
|
-
function
|
|
968
|
+
function _t({
|
|
969
969
|
className: s,
|
|
970
970
|
extra: m,
|
|
971
971
|
pushServiceWorker: r
|
|
972
972
|
}) {
|
|
973
973
|
var j;
|
|
974
|
-
const n = F(), o = M(), d =
|
|
974
|
+
const n = F(), o = M(), d = le(), c = !0, i = "me", { data: a } = v({
|
|
975
975
|
queryKey: ["nvr-profile-user", i],
|
|
976
|
-
queryFn: () => n.request(
|
|
976
|
+
queryFn: () => n.request(ve(i)).then((g) => g.data),
|
|
977
977
|
enabled: c
|
|
978
978
|
}), h = (a == null ? void 0 : a.id) ?? null, { data: u } = v({
|
|
979
979
|
queryKey: ["nvr-profile-card", h],
|
|
980
|
-
queryFn: () => n.request(
|
|
980
|
+
queryFn: () => n.request(ke(h)).then((g) => g.data),
|
|
981
981
|
enabled: !!h
|
|
982
|
-
}), [P, C] = q(null), D =
|
|
982
|
+
}), [P, C] = q(null), D = Ke(
|
|
983
983
|
() => ({
|
|
984
984
|
first_name: (a == null ? void 0 : a.first_name) ?? "",
|
|
985
985
|
last_name: (a == null ? void 0 : a.last_name) ?? "",
|
|
@@ -989,11 +989,11 @@ function wt({
|
|
|
989
989
|
}),
|
|
990
990
|
[a]
|
|
991
991
|
), y = P ?? D, S = JSON.stringify(y) !== JSON.stringify(D), k = _({
|
|
992
|
-
mutationFn: () => n.request(
|
|
992
|
+
mutationFn: () => n.request(me(a.id, y)),
|
|
993
993
|
onSuccess: () => {
|
|
994
994
|
C(null), o.invalidateQueries({ queryKey: ["nvr-profile-user"] }), o.invalidateQueries({ queryKey: ["nvr-profile-card"] });
|
|
995
995
|
}
|
|
996
|
-
}), [L, f] = q(
|
|
996
|
+
}), [L, f] = q(St), I = ge(null), $ = _({
|
|
997
997
|
mutationFn: async (g) => {
|
|
998
998
|
const U = await new Promise((Q, B) => {
|
|
999
999
|
const p = new Image(), N = URL.createObjectURL(g);
|
|
@@ -1003,13 +1003,13 @@ function wt({
|
|
|
1003
1003
|
E.width = T, E.height = T;
|
|
1004
1004
|
const O = E.getContext("2d");
|
|
1005
1005
|
if (!O) return B(new Error("canvas unavailable"));
|
|
1006
|
-
const
|
|
1007
|
-
O.drawImage(p, (T -
|
|
1006
|
+
const X = Math.max(T / p.width, T / p.height), ee = p.width * X, G = p.height * X;
|
|
1007
|
+
O.drawImage(p, (T - ee) / 2, (T - G) / 2, ee, G), Q(E.toDataURL("image/jpeg", 0.85));
|
|
1008
1008
|
}, p.onerror = () => {
|
|
1009
1009
|
URL.revokeObjectURL(N), B(new Error("not an image"));
|
|
1010
1010
|
}, p.src = N;
|
|
1011
1011
|
});
|
|
1012
|
-
await n.request(
|
|
1012
|
+
await n.request(me(a.id, { avatar: U }));
|
|
1013
1013
|
},
|
|
1014
1014
|
onSuccess: () => {
|
|
1015
1015
|
o.invalidateQueries({ queryKey: ["nvr-profile-user"] }), o.invalidateQueries({ queryKey: ["nvr-profile-card"] }), o.invalidateQueries({ queryKey: ["user-card"] }), o.invalidateQueries({ queryKey: ["user-avatar"] });
|
|
@@ -1030,7 +1030,7 @@ function wt({
|
|
|
1030
1030
|
/* @__PURE__ */ e("div", { className: "h-64 rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card" })
|
|
1031
1031
|
] })
|
|
1032
1032
|
] });
|
|
1033
|
-
const K = (a == null ? void 0 : a.avatar) ?? null,
|
|
1033
|
+
const K = (a == null ? void 0 : a.avatar) ?? null, Y = x.status === "active";
|
|
1034
1034
|
return /* @__PURE__ */ t("div", { className: z("flex flex-col gap-4", s), "data-nvr-profile": !0, children: [
|
|
1035
1035
|
/* @__PURE__ */ e("div", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-x-5 gap-y-4 p-5", children: [
|
|
1036
1036
|
/* @__PURE__ */ t("div", { className: "relative", children: [
|
|
@@ -1041,18 +1041,18 @@ function wt({
|
|
|
1041
1041
|
alt: "",
|
|
1042
1042
|
className: "h-[76px] w-[76px] rounded-full border border-slate-200 object-cover dark:border-border"
|
|
1043
1043
|
}
|
|
1044
|
-
) : /* @__PURE__ */ e("span", { className: "flex h-[76px] w-[76px] items-center justify-center rounded-full bg-[#c7f0fb] text-[24px] font-semibold text-[#04516b] dark:bg-nvr-cyan/15 dark:text-nvr-cyan", children:
|
|
1044
|
+
) : /* @__PURE__ */ e("span", { className: "flex h-[76px] w-[76px] items-center justify-center rounded-full bg-[#c7f0fb] text-[24px] font-semibold text-[#04516b] dark:bg-nvr-cyan/15 dark:text-nvr-cyan", children: bt(x) }),
|
|
1045
1045
|
/* @__PURE__ */ e(
|
|
1046
1046
|
"span",
|
|
1047
1047
|
{
|
|
1048
1048
|
className: z(
|
|
1049
1049
|
"absolute bottom-0.5 right-0.5 h-3 w-3 rounded-full border-2 border-white dark:border-card",
|
|
1050
|
-
|
|
1050
|
+
Y ? "bg-emerald-500" : "bg-slate-300 dark:bg-slate-600"
|
|
1051
1051
|
),
|
|
1052
|
-
title:
|
|
1052
|
+
title: Y ? "Active" : x.status
|
|
1053
1053
|
}
|
|
1054
1054
|
),
|
|
1055
|
-
/* @__PURE__ */ t(
|
|
1055
|
+
/* @__PURE__ */ t(te, { children: [
|
|
1056
1056
|
/* @__PURE__ */ e(
|
|
1057
1057
|
"button",
|
|
1058
1058
|
{
|
|
@@ -1064,7 +1064,7 @@ function wt({
|
|
|
1064
1064
|
return (g = I.current) == null ? void 0 : g.click();
|
|
1065
1065
|
},
|
|
1066
1066
|
className: "absolute -right-1 -top-1 flex h-7 w-7 items-center justify-center rounded-full border border-slate-200 bg-white text-slate-500 shadow-sm transition-colors hover:border-nvr-cyan hover:text-nvr-navy dark:border-border dark:bg-background dark:text-slate-300 dark:hover:text-nvr-cyan",
|
|
1067
|
-
children: $.isPending ? /* @__PURE__ */ e(
|
|
1067
|
+
children: $.isPending ? /* @__PURE__ */ e(ue, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5" })
|
|
1068
1068
|
}
|
|
1069
1069
|
),
|
|
1070
1070
|
/* @__PURE__ */ e(
|
|
@@ -1085,17 +1085,17 @@ function wt({
|
|
|
1085
1085
|
] }),
|
|
1086
1086
|
/* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: [
|
|
1087
1087
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1088
|
-
/* @__PURE__ */ e("h1", { className: "text-[21px] font-semibold tracking-[-0.015em] text-slate-900 dark:text-white", children:
|
|
1088
|
+
/* @__PURE__ */ e("h1", { className: "text-[21px] font-semibold tracking-[-0.015em] text-slate-900 dark:text-white", children: ht(x) }),
|
|
1089
1089
|
x.role_name && /* @__PURE__ */ e("span", { className: "rounded-full bg-nvr-cyan/10 px-2 py-px text-[10.5px] font-semibold text-nvr-navy dark:text-nvr-cyan", children: x.role_name }),
|
|
1090
1090
|
x.is_out_of_office && /* @__PURE__ */ e("span", { className: "rounded-full bg-amber-50 px-2 py-px text-[10.5px] font-semibold text-amber-600 dark:bg-amber-500/10 dark:text-amber-400", children: "Out of office" }),
|
|
1091
|
-
/* @__PURE__ */ e(
|
|
1091
|
+
/* @__PURE__ */ e(rt, { email: x.email, canClear: d.isAdmin })
|
|
1092
1092
|
] }),
|
|
1093
1093
|
a && // The same status the chat panel's Online tab sets — one editor,
|
|
1094
1094
|
// one preference, so the profile always agrees with the top bar.
|
|
1095
1095
|
/* @__PURE__ */ e(
|
|
1096
|
-
|
|
1096
|
+
He,
|
|
1097
1097
|
{
|
|
1098
|
-
status:
|
|
1098
|
+
status: Ye(
|
|
1099
1099
|
(j = a.preferences) == null ? void 0 : j.custom_status
|
|
1100
1100
|
),
|
|
1101
1101
|
showExpiry: !0,
|
|
@@ -1105,7 +1105,7 @@ function wt({
|
|
|
1105
1105
|
(x.title || x.department) && /* @__PURE__ */ e("p", { className: "mt-0.5 truncate text-[13px] text-slate-500 dark:text-slate-400", children: [x.title, x.department].filter(Boolean).join(" · ") }),
|
|
1106
1106
|
/* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-[12.5px] text-slate-500 dark:text-slate-400", children: [
|
|
1107
1107
|
x.company && /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
1108
|
-
/* @__PURE__ */ e(
|
|
1108
|
+
/* @__PURE__ */ e(Se, { className: "h-3.5 w-3.5" }),
|
|
1109
1109
|
" ",
|
|
1110
1110
|
x.company
|
|
1111
1111
|
] }),
|
|
@@ -1115,7 +1115,7 @@ function wt({
|
|
|
1115
1115
|
href: `mailto:${x.email}`,
|
|
1116
1116
|
className: "inline-flex min-w-0 max-w-full items-center gap-1.5 transition-colors hover:text-nvr-navy dark:hover:text-nvr-cyan",
|
|
1117
1117
|
children: [
|
|
1118
|
-
/* @__PURE__ */ e(
|
|
1118
|
+
/* @__PURE__ */ e(Ce, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
1119
1119
|
" ",
|
|
1120
1120
|
/* @__PURE__ */ e("span", { className: "min-w-0 break-all", children: x.email })
|
|
1121
1121
|
]
|
|
@@ -1127,14 +1127,14 @@ function wt({
|
|
|
1127
1127
|
href: `tel:${x.phone}`,
|
|
1128
1128
|
className: "inline-flex items-center gap-1.5 transition-colors hover:text-nvr-navy dark:hover:text-nvr-cyan",
|
|
1129
1129
|
children: [
|
|
1130
|
-
/* @__PURE__ */ e(
|
|
1130
|
+
/* @__PURE__ */ e(qe, { className: "h-3.5 w-3.5" }),
|
|
1131
1131
|
" ",
|
|
1132
1132
|
x.phone
|
|
1133
1133
|
]
|
|
1134
1134
|
}
|
|
1135
1135
|
),
|
|
1136
1136
|
x.last_access && /* @__PURE__ */ t("span", { className: "inline-flex items-center gap-1.5", title: "Last active", children: [
|
|
1137
|
-
/* @__PURE__ */ e(
|
|
1137
|
+
/* @__PURE__ */ e(Pe, { className: "h-3.5 w-3.5" }),
|
|
1138
1138
|
new Date(x.last_access).toLocaleDateString(void 0, {
|
|
1139
1139
|
month: "short",
|
|
1140
1140
|
day: "numeric"
|
|
@@ -1143,10 +1143,10 @@ function wt({
|
|
|
1143
1143
|
] })
|
|
1144
1144
|
] })
|
|
1145
1145
|
] }) }),
|
|
1146
|
-
/* @__PURE__ */ e(
|
|
1147
|
-
L === "agents" ? /* @__PURE__ */ e(
|
|
1146
|
+
/* @__PURE__ */ e(Ct, { tab: L, onChange: f }),
|
|
1147
|
+
L === "agents" ? /* @__PURE__ */ e(Ze, {}) : L === "did" && a ? (
|
|
1148
1148
|
// #13 — your own audit trail, by day and collection.
|
|
1149
|
-
/* @__PURE__ */ e(
|
|
1149
|
+
/* @__PURE__ */ e(nt, { userId: String(a.id), name: null })
|
|
1150
1150
|
) : a ? (
|
|
1151
1151
|
// One list in reading order — you, then notifications, then access
|
|
1152
1152
|
// and security — flowing into two balanced columns. Two fixed stacks
|
|
@@ -1159,9 +1159,9 @@ function wt({
|
|
|
1159
1159
|
"data-profile-columns": !0,
|
|
1160
1160
|
children: [
|
|
1161
1161
|
/* @__PURE__ */ e(
|
|
1162
|
-
|
|
1162
|
+
oe,
|
|
1163
1163
|
{
|
|
1164
|
-
icon: /* @__PURE__ */ e(
|
|
1164
|
+
icon: /* @__PURE__ */ e(Fe, { className: "h-4 w-4" }),
|
|
1165
1165
|
title: "About you",
|
|
1166
1166
|
hint: "Shown on your contact card across the app",
|
|
1167
1167
|
actions: S && /* @__PURE__ */ t("span", { className: "flex items-center gap-1.5", children: [
|
|
@@ -1173,7 +1173,7 @@ function wt({
|
|
|
1173
1173
|
onClick: () => C(null),
|
|
1174
1174
|
className: "inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11.5px] font-medium text-slate-400 transition-colors hover:text-slate-600 dark:hover:text-slate-200",
|
|
1175
1175
|
children: [
|
|
1176
|
-
/* @__PURE__ */ e(
|
|
1176
|
+
/* @__PURE__ */ e(Te, { className: "h-3 w-3" }),
|
|
1177
1177
|
" Reset"
|
|
1178
1178
|
]
|
|
1179
1179
|
}
|
|
@@ -1186,7 +1186,7 @@ function wt({
|
|
|
1186
1186
|
onClick: () => k.mutate(),
|
|
1187
1187
|
className: "inline-flex h-7 items-center gap-1 rounded-md bg-nvr-cyan px-2.5 text-[11.5px] font-semibold text-white transition-opacity disabled:opacity-50",
|
|
1188
1188
|
children: [
|
|
1189
|
-
k.isPending ? /* @__PURE__ */ e(
|
|
1189
|
+
k.isPending ? /* @__PURE__ */ e(ue, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Ae, { className: "h-3 w-3" }),
|
|
1190
1190
|
" ",
|
|
1191
1191
|
"Save"
|
|
1192
1192
|
]
|
|
@@ -1195,7 +1195,7 @@ function wt({
|
|
|
1195
1195
|
] }),
|
|
1196
1196
|
children: /* @__PURE__ */ t("div", { className: "grid gap-3 sm:grid-cols-2", children: [
|
|
1197
1197
|
/* @__PURE__ */ e(
|
|
1198
|
-
|
|
1198
|
+
W,
|
|
1199
1199
|
{
|
|
1200
1200
|
label: "First name",
|
|
1201
1201
|
value: y.first_name,
|
|
@@ -1203,7 +1203,7 @@ function wt({
|
|
|
1203
1203
|
}
|
|
1204
1204
|
),
|
|
1205
1205
|
/* @__PURE__ */ e(
|
|
1206
|
-
|
|
1206
|
+
W,
|
|
1207
1207
|
{
|
|
1208
1208
|
label: "Last name",
|
|
1209
1209
|
value: y.last_name,
|
|
@@ -1211,7 +1211,7 @@ function wt({
|
|
|
1211
1211
|
}
|
|
1212
1212
|
),
|
|
1213
1213
|
/* @__PURE__ */ e(
|
|
1214
|
-
|
|
1214
|
+
W,
|
|
1215
1215
|
{
|
|
1216
1216
|
label: "Title",
|
|
1217
1217
|
value: y.title,
|
|
@@ -1220,7 +1220,7 @@ function wt({
|
|
|
1220
1220
|
}
|
|
1221
1221
|
),
|
|
1222
1222
|
/* @__PURE__ */ e(
|
|
1223
|
-
|
|
1223
|
+
W,
|
|
1224
1224
|
{
|
|
1225
1225
|
label: "Department",
|
|
1226
1226
|
value: y.department,
|
|
@@ -1228,7 +1228,7 @@ function wt({
|
|
|
1228
1228
|
}
|
|
1229
1229
|
),
|
|
1230
1230
|
/* @__PURE__ */ e(
|
|
1231
|
-
|
|
1231
|
+
W,
|
|
1232
1232
|
{
|
|
1233
1233
|
label: "Phone",
|
|
1234
1234
|
value: y.phone,
|
|
@@ -1237,12 +1237,12 @@ function wt({
|
|
|
1237
1237
|
type: "tel"
|
|
1238
1238
|
}
|
|
1239
1239
|
),
|
|
1240
|
-
/* @__PURE__ */ e(
|
|
1240
|
+
/* @__PURE__ */ e(W, { label: "Email", value: a.email ?? "", disabled: !0, hint: "managed by admin" })
|
|
1241
1241
|
] })
|
|
1242
1242
|
}
|
|
1243
1243
|
),
|
|
1244
1244
|
/* @__PURE__ */ e(
|
|
1245
|
-
|
|
1245
|
+
at,
|
|
1246
1246
|
{
|
|
1247
1247
|
user: a,
|
|
1248
1248
|
onSaved: () => {
|
|
@@ -1250,25 +1250,25 @@ function wt({
|
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
1252
|
),
|
|
1253
|
-
/* @__PURE__ */ e(
|
|
1253
|
+
/* @__PURE__ */ e(gt, {}),
|
|
1254
|
+
/* @__PURE__ */ e(vt, {}),
|
|
1255
|
+
/* @__PURE__ */ e(Ot, {}),
|
|
1256
|
+
/* @__PURE__ */ e(dt, {}),
|
|
1254
1257
|
/* @__PURE__ */ e(yt, {}),
|
|
1255
|
-
/* @__PURE__ */ e(Lt, {}),
|
|
1256
|
-
/* @__PURE__ */ e(it, {}),
|
|
1257
|
-
/* @__PURE__ */ e(ft, {}),
|
|
1258
|
-
/* @__PURE__ */ e(Ze, {}),
|
|
1259
1258
|
/* @__PURE__ */ e(Xe, {}),
|
|
1260
|
-
|
|
1261
|
-
/* @__PURE__ */ e(
|
|
1262
|
-
/* @__PURE__ */ e(nt, { userId: "me" }),
|
|
1259
|
+
/* @__PURE__ */ e(et, {}),
|
|
1260
|
+
d.isAdmin && (a != null && a.id) ? /* @__PURE__ */ e(ct, { userId: String(a.id) }) : /* @__PURE__ */ e(kt, {}),
|
|
1263
1261
|
/* @__PURE__ */ e(Pt, {}),
|
|
1264
|
-
/* @__PURE__ */ e(
|
|
1265
|
-
/* @__PURE__ */ e(ot, {}),
|
|
1266
|
-
r !== !1 && /* @__PURE__ */ e(et, { serviceWorkerPath: r }),
|
|
1262
|
+
/* @__PURE__ */ e(st, { userId: "me" }),
|
|
1267
1263
|
/* @__PURE__ */ e(Tt, {}),
|
|
1268
|
-
/* @__PURE__ */ e(
|
|
1269
|
-
/* @__PURE__ */ e(
|
|
1264
|
+
/* @__PURE__ */ e(ft, {}),
|
|
1265
|
+
/* @__PURE__ */ e(it, {}),
|
|
1266
|
+
r !== !1 && /* @__PURE__ */ e(tt, { serviceWorkerPath: r }),
|
|
1270
1267
|
/* @__PURE__ */ e(At, {}),
|
|
1271
|
-
/* @__PURE__ */ e(
|
|
1268
|
+
/* @__PURE__ */ e(ut, {}),
|
|
1269
|
+
/* @__PURE__ */ e(wt, {}),
|
|
1270
|
+
/* @__PURE__ */ e(Ft, {}),
|
|
1271
|
+
/* @__PURE__ */ e(qt, {}),
|
|
1272
1272
|
m
|
|
1273
1273
|
]
|
|
1274
1274
|
}
|
|
@@ -1276,7 +1276,7 @@ function wt({
|
|
|
1276
1276
|
) : null
|
|
1277
1277
|
] });
|
|
1278
1278
|
}
|
|
1279
|
-
function
|
|
1279
|
+
function St() {
|
|
1280
1280
|
try {
|
|
1281
1281
|
const s = new URLSearchParams(window.location.search).get("tab");
|
|
1282
1282
|
return s === "agents" || s === "did" ? s : "profile";
|
|
@@ -1284,7 +1284,7 @@ function _t() {
|
|
|
1284
1284
|
return "profile";
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Ct({
|
|
1288
1288
|
tab: s,
|
|
1289
1289
|
onChange: m
|
|
1290
1290
|
}) {
|
|
@@ -1324,7 +1324,7 @@ function St({
|
|
|
1324
1324
|
}
|
|
1325
1325
|
);
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function qt() {
|
|
1328
1328
|
const s = F(), [m, r] = q(!1), { data: n = [], isLoading: o } = v({
|
|
1329
1329
|
queryKey: ["my-matrix-seats"],
|
|
1330
1330
|
queryFn: () => s.request(A("/pipelines/my-seats")).then((c) => c.data ?? []).catch(() => []),
|
|
@@ -1388,18 +1388,18 @@ function Ct() {
|
|
|
1388
1388
|
] }, c)) }))
|
|
1389
1389
|
] });
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1391
|
+
function Pt() {
|
|
1392
1392
|
const s = F(), m = M(), { data: r = [] } = v({
|
|
1393
1393
|
queryKey: ["my-reminders"],
|
|
1394
1394
|
queryFn: () => s.request(A("/reminders")).then((u) => u.data).catch(() => []),
|
|
1395
1395
|
staleTime: 3e4
|
|
1396
1396
|
}), [n, o] = q(""), [d, c] = q(""), i = () => void m.invalidateQueries({ queryKey: ["my-reminders"] }), a = _({
|
|
1397
|
-
mutationFn: () => s.request(
|
|
1397
|
+
mutationFn: () => s.request(ae("/reminders", { note: n, remind_at: new Date(d).toISOString() })),
|
|
1398
1398
|
onSuccess: () => {
|
|
1399
1399
|
o(""), c(""), i();
|
|
1400
1400
|
}
|
|
1401
1401
|
}), h = _({
|
|
1402
|
-
mutationFn: (u) => s.request(
|
|
1402
|
+
mutationFn: (u) => s.request(Re(`/reminders/${u}`)),
|
|
1403
1403
|
onSuccess: i
|
|
1404
1404
|
});
|
|
1405
1405
|
return /* @__PURE__ */ t("div", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
|
|
@@ -1465,7 +1465,7 @@ function qt() {
|
|
|
1465
1465
|
] })
|
|
1466
1466
|
] });
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function Tt() {
|
|
1469
1469
|
const s = F(), { data: m } = v({
|
|
1470
1470
|
queryKey: ["my-stats"],
|
|
1471
1471
|
queryFn: () => s.request(A("/users/me/stats")).then((n) => n.data).catch(() => null),
|
|
@@ -1503,17 +1503,17 @@ function Pt() {
|
|
|
1503
1503
|
] }),
|
|
1504
1504
|
/* @__PURE__ */ t("div", { className: "mt-2 flex flex-wrap gap-x-4 gap-y-1 text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
1505
1505
|
/* @__PURE__ */ t("span", { children: [
|
|
1506
|
-
/* @__PURE__ */ e("b", { className: "tabular-nums text-slate-700 dark:text-slate-200", children: m.totals.transitions }),
|
|
1506
|
+
/* @__PURE__ */ e("b", { className: "tabular-nums text-slate-700 dark:text-slate-200", children: H(m.totals.transitions) }),
|
|
1507
1507
|
" ",
|
|
1508
1508
|
"transitions"
|
|
1509
1509
|
] }),
|
|
1510
1510
|
/* @__PURE__ */ t("span", { children: [
|
|
1511
|
-
/* @__PURE__ */ e("b", { className: "tabular-nums text-slate-700 dark:text-slate-200", children: m.totals.tasks_done }),
|
|
1511
|
+
/* @__PURE__ */ e("b", { className: "tabular-nums text-slate-700 dark:text-slate-200", children: H(m.totals.tasks_done) }),
|
|
1512
1512
|
" ",
|
|
1513
1513
|
"tasks done"
|
|
1514
1514
|
] }),
|
|
1515
1515
|
/* @__PURE__ */ t("span", { children: [
|
|
1516
|
-
/* @__PURE__ */ e("b", { className: "tabular-nums text-slate-700 dark:text-slate-200", children: m.totals.created }),
|
|
1516
|
+
/* @__PURE__ */ e("b", { className: "tabular-nums text-slate-700 dark:text-slate-200", children: H(m.totals.created) }),
|
|
1517
1517
|
" ",
|
|
1518
1518
|
"records created"
|
|
1519
1519
|
] })
|
|
@@ -1521,13 +1521,13 @@ function Pt() {
|
|
|
1521
1521
|
] })
|
|
1522
1522
|
] });
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function At() {
|
|
1525
1525
|
const s = F(), m = M(), { data: r } = v({
|
|
1526
1526
|
queryKey: ["my-security"],
|
|
1527
1527
|
queryFn: () => s.request(A("/security/my/sessions")).then((d) => d.data).catch(() => ({ sessions: [], logins: [] })),
|
|
1528
1528
|
staleTime: 3e4
|
|
1529
1529
|
}), n = _({
|
|
1530
|
-
mutationFn: () => s.request(
|
|
1530
|
+
mutationFn: () => s.request(ae("/security/my/sessions/sign-out-others", {})).then((d) => d.data),
|
|
1531
1531
|
onSuccess: (d) => {
|
|
1532
1532
|
m.invalidateQueries({ queryKey: ["my-security"] }), o(`Signed out ${(d == null ? void 0 : d.revoked) ?? 0} other session(s)`);
|
|
1533
1533
|
},
|
|
@@ -1585,7 +1585,7 @@ function Tt() {
|
|
|
1585
1585
|
},
|
|
1586
1586
|
d.sid_prefix
|
|
1587
1587
|
)),
|
|
1588
|
-
((r == null ? void 0 : r.logins) ?? []).length > 0 && /* @__PURE__ */ t(
|
|
1588
|
+
((r == null ? void 0 : r.logins) ?? []).length > 0 && /* @__PURE__ */ t(te, { children: [
|
|
1589
1589
|
/* @__PURE__ */ e("p", { className: "pt-1 text-[11px] font-semibold uppercase tracking-wide text-slate-400", children: "Recent sign-ins" }),
|
|
1590
1590
|
((r == null ? void 0 : r.logins) ?? []).slice(0, 8).map((d, c) => (
|
|
1591
1591
|
// biome-ignore lint/suspicious/noArrayIndexKey: log rows
|
|
@@ -1599,7 +1599,7 @@ function Tt() {
|
|
|
1599
1599
|
] })
|
|
1600
1600
|
] });
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function Ft() {
|
|
1603
1603
|
const s = F(), [m, r] = q(!1), { data: n } = v({
|
|
1604
1604
|
queryKey: ["my-permissions"],
|
|
1605
1605
|
queryFn: () => s.request(A("/security/my/permissions")).then((o) => o.data),
|
|
@@ -1655,7 +1655,7 @@ function At() {
|
|
|
1655
1655
|
] })
|
|
1656
1656
|
] });
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function Lt({
|
|
1659
1659
|
value: s,
|
|
1660
1660
|
onChange: m
|
|
1661
1661
|
}) {
|
|
@@ -1663,10 +1663,10 @@ function Ft({
|
|
|
1663
1663
|
queryKey: ["live-preference-default"],
|
|
1664
1664
|
queryFn: () => r.request(A("/live-preference/default")).then((i) => {
|
|
1665
1665
|
var a;
|
|
1666
|
-
return
|
|
1666
|
+
return pe((a = i.data) == null ? void 0 : a.mode);
|
|
1667
1667
|
}).catch(() => null),
|
|
1668
1668
|
staleTime: 5 * 6e4
|
|
1669
|
-
}), o =
|
|
1669
|
+
}), o = pe(s), d = Ie[n ?? "normal"], c = J[o ?? n ?? "normal"];
|
|
1670
1670
|
return /* @__PURE__ */ t("div", { className: "flex items-center gap-1.5", "data-pref": "live-mode", "data-tip": c, children: [
|
|
1671
1671
|
"Live updates",
|
|
1672
1672
|
/* @__PURE__ */ e(
|
|
@@ -1679,17 +1679,17 @@ function Ft({
|
|
|
1679
1679
|
{
|
|
1680
1680
|
value: "auto",
|
|
1681
1681
|
label: `Role default (${d})`,
|
|
1682
|
-
description:
|
|
1682
|
+
description: J[n ?? "normal"]
|
|
1683
1683
|
},
|
|
1684
|
-
{ value: "normal", label: "Normal", description:
|
|
1685
|
-
{ value: "calm", label: "Calm", description:
|
|
1686
|
-
{ value: "off", label: "Off", description:
|
|
1684
|
+
{ value: "normal", label: "Normal", description: J.normal },
|
|
1685
|
+
{ value: "calm", label: "Calm", description: J.calm },
|
|
1686
|
+
{ value: "off", label: "Off", description: J.off }
|
|
1687
1687
|
]
|
|
1688
1688
|
}
|
|
1689
1689
|
)
|
|
1690
1690
|
] });
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1692
|
+
function Ot() {
|
|
1693
1693
|
const s = F(), m = M(), { data: r } = v({
|
|
1694
1694
|
queryKey: ["nvr-profile-prefs"],
|
|
1695
1695
|
queryFn: () => s.request(A("/users/me")).then((i) => {
|
|
@@ -1697,23 +1697,23 @@ function Lt() {
|
|
|
1697
1697
|
return ((a = i.data) == null ? void 0 : a.preferences) ?? {};
|
|
1698
1698
|
})
|
|
1699
1699
|
}), n = _({
|
|
1700
|
-
mutationFn: (i) => s.request(
|
|
1700
|
+
mutationFn: (i) => s.request(Z("/users/me/preferences", i)),
|
|
1701
1701
|
onSuccess: (i, a) => {
|
|
1702
|
-
m.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }),
|
|
1702
|
+
m.invalidateQueries({ queryKey: ["nvr-profile-prefs"] }), se(Object.keys(a)), import("sonner").then(
|
|
1703
1703
|
({ toast: h }) => h.success("Saved — applied on all your open tabs and devices")
|
|
1704
1704
|
);
|
|
1705
1705
|
}
|
|
1706
|
-
}), o = (r == null ? void 0 : r.number_format) ?? {}, { data: d = [
|
|
1706
|
+
}), o = (r == null ? void 0 : r.number_format) ?? {}, { data: d = [ne, ...be] } = v({
|
|
1707
1707
|
queryKey: ["nvr-theme-accents"],
|
|
1708
1708
|
queryFn: () => s.request(
|
|
1709
1709
|
A("/settings")
|
|
1710
1710
|
).then((i) => {
|
|
1711
1711
|
var a, h;
|
|
1712
1712
|
return [
|
|
1713
|
-
{ ...
|
|
1714
|
-
|
|
1713
|
+
{ ...ne, color: ((a = i.data) == null ? void 0 : a.project_color) ?? null },
|
|
1714
|
+
...ze((h = i.data) == null ? void 0 : h.theme_accents)
|
|
1715
1715
|
];
|
|
1716
|
-
}).catch(() => [
|
|
1716
|
+
}).catch(() => [ne, ...be]),
|
|
1717
1717
|
staleTime: 5 * 6e4
|
|
1718
1718
|
}), c = typeof (r == null ? void 0 : r.theme_accent) == "string" ? r.theme_accent : "brand";
|
|
1719
1719
|
return /* @__PURE__ */ t(
|
|
@@ -1819,7 +1819,7 @@ function Lt() {
|
|
|
1819
1819
|
"Count in the browser tab"
|
|
1820
1820
|
] }),
|
|
1821
1821
|
/* @__PURE__ */ e(
|
|
1822
|
-
|
|
1822
|
+
Lt,
|
|
1823
1823
|
{
|
|
1824
1824
|
value: r == null ? void 0 : r.live_mode,
|
|
1825
1825
|
onChange: (i) => n.mutate({ live_mode: i === "auto" ? null : i })
|
|
@@ -1860,18 +1860,18 @@ function Lt() {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
);
|
|
1862
1862
|
}
|
|
1863
|
-
function
|
|
1863
|
+
function Mt({
|
|
1864
1864
|
on: s,
|
|
1865
1865
|
onChange: m
|
|
1866
1866
|
}) {
|
|
1867
|
-
const r =
|
|
1867
|
+
const r = je();
|
|
1868
1868
|
return /* @__PURE__ */ t(
|
|
1869
1869
|
"div",
|
|
1870
1870
|
{
|
|
1871
1871
|
"data-urgent-sound": !0,
|
|
1872
1872
|
className: "flex items-start gap-2 text-[12.5px] text-slate-600 dark:text-muted-foreground",
|
|
1873
1873
|
children: [
|
|
1874
|
-
/* @__PURE__ */ e("span", { className: "pt-px", children: /* @__PURE__ */ e(
|
|
1874
|
+
/* @__PURE__ */ e("span", { className: "pt-px", children: /* @__PURE__ */ e(ye, { on: s, onChange: () => m(!s), label: "Play a sound for urgent items" }) }),
|
|
1875
1875
|
/* @__PURE__ */ t("div", { className: "min-w-0", children: [
|
|
1876
1876
|
/* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-x-2", children: [
|
|
1877
1877
|
/* @__PURE__ */ e("span", { children: "Play a sound for urgent items" }),
|
|
@@ -1879,7 +1879,7 @@ function Ot({
|
|
|
1879
1879
|
"button",
|
|
1880
1880
|
{
|
|
1881
1881
|
type: "button",
|
|
1882
|
-
onClick: () =>
|
|
1882
|
+
onClick: () => fe({ preview: !0 }),
|
|
1883
1883
|
className: "rounded px-1 py-0.5 text-[11.5px] font-medium text-[#007a99] underline decoration-dotted underline-offset-2 hover:bg-nvr-cyan/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/40 dark:text-nvr-cyan",
|
|
1884
1884
|
children: "Hear it"
|
|
1885
1885
|
}
|
|
@@ -1900,12 +1900,12 @@ function Ot({
|
|
|
1900
1900
|
);
|
|
1901
1901
|
}
|
|
1902
1902
|
export {
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1903
|
+
at as DelegationCard,
|
|
1904
|
+
Ot as DisplayPrefsCard,
|
|
1905
|
+
yt as LinkAppCard,
|
|
1906
|
+
ft as NotificationRulesCard,
|
|
1907
|
+
gt as ProfileFieldsCard,
|
|
1908
|
+
ba as ProfileView,
|
|
1909
|
+
vt as TimezoneCard,
|
|
1910
|
+
Mt as UrgentSoundRow
|
|
1911
1911
|
};
|