@nivaro/react 0.3.137 → 0.3.139
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 +95 -4
- package/dist/index.js +748 -743
- package/dist/shared/components/CollectionBrowserView.js +392 -389
- package/dist/shared/components/DelegateCoverLine.js +80 -87
- package/dist/shared/components/ItemEditForm.js +589 -588
- package/dist/shared/components/MyWorkView.js +284 -286
- package/dist/shared/components/NotificationBell.js +251 -205
- package/dist/shared/components/ai/AiAnalyticsView.js +878 -417
- package/dist/shared/components/ai/AiPlanCard.js +164 -122
- package/dist/shared/components/ai/AiPlanUndo.js +291 -0
- package/dist/shared/components/ai/call-log/CallDrawer.js +357 -0
- package/dist/shared/components/ai/call-log/RawJson.js +126 -0
- package/dist/shared/components/ai/call-log/ThreadView.js +223 -0
- package/dist/shared/components/ai/call-log/TranscriptView.js +227 -0
- package/dist/shared/components/ai/call-log/controls.js +364 -0
- package/dist/shared/components/ai/call-log/format.js +46 -0
- package/dist/shared/components/ai/call-log/url.js +105 -0
- package/dist/shared/components/chat/chat-core.js +422 -346
- package/dist/shared/components/integrations/IntegrationObligationsView.js +98 -98
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +102 -93
- package/dist/shared/components/integrations/console/api.js +11 -1
- package/dist/shared/components/item-edit/HeaderRollupExplainer.js +5 -1
- package/dist/shared/components/item-edit/RecordLiveSync.js +241 -229
- package/dist/shared/components/item-edit/RecordRecapChanges.js +166 -0
- package/dist/shared/components/item-edit/RecordRecapStrip.js +254 -84
- package/dist/shared/components/item-edit/live-related.js +34 -18
- package/dist/shared/components/panels/RevisionsPanel.js +735 -683
- package/dist/shared/components/queue/QueueWorklist.js +323 -316
- package/dist/shared/components/support/SupportRequestDialog.js +198 -181
- package/dist/shared/components/trackers/use-tracker-link.js +74 -65
- package/dist/shared/lib/activity-sentence.js +167 -151
- package/dist/shared/lib/config-update-refresh.js +34 -0
- package/dist/shared/lib/config-watch.js +17 -17
- package/dist/shared/lib/gap-refresh.js +49 -0
- package/dist/shared/lib/integration-dots.js +8 -8
- package/dist/shared/lib/live-ops.js +26 -23
- package/dist/shared/lib/live-pickers.js +1 -1
- package/dist/shared/lib/live-queries.js +223 -195
- package/dist/shared/lib/live.js +56 -51
- package/dist/shared/lib/obligation-banner.js +11 -10
- package/dist/shared/lib/obligation-filters.js +22 -18
- package/dist/shared/lib/obligation-reason-text.js +18 -8
- package/dist/shared/lib/presence-hooks.js +133 -132
- package/dist/shared/lib/reconnect-resync.js +90 -0
- package/dist/shared/lib/record-room-holds.js +43 -0
- package/dist/shared/lib/socket-realtime.js +116 -105
- package/dist/shared/lib/user-sync.js +1 -6
- package/package.json +1 -1
|
@@ -1,122 +1,130 @@
|
|
|
1
|
-
import { jsxs as n, jsx as t, Fragment as
|
|
2
|
-
import { readUnreadNotificationCount as
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { Bell as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import { useNivaroClient as
|
|
8
|
-
import { get as
|
|
9
|
-
import { createCoalescer as
|
|
10
|
-
import { useLiveRefetchInterval as
|
|
11
|
-
import { useTopInserts as
|
|
12
|
-
import { resolveNotificationTargetFor as
|
|
13
|
-
import { useRecordPeek as
|
|
14
|
-
import { cn as
|
|
15
|
-
import { AgentBadge as
|
|
16
|
-
import { LiveCount as
|
|
17
|
-
import { AsItWasSheet as
|
|
18
|
-
import { bundleLocally as
|
|
19
|
-
import { DeliveryChips as
|
|
20
|
-
import { NotificationActions as
|
|
21
|
-
import { ResolvedLine as
|
|
22
|
-
import { RelativeTime as
|
|
23
|
-
import { SkeletonBar as
|
|
24
|
-
function
|
|
25
|
-
var
|
|
1
|
+
import { jsxs as n, jsx as t, Fragment as je } from "react/jsx-runtime";
|
|
2
|
+
import { readUnreadNotificationCount as ze, markNotificationRead as Qe, markNotificationsRead as He, markAllNotificationsRead as Ge } from "@nivaro/sdk";
|
|
3
|
+
import { useQueryClient as Ue, useQuery as ve, keepPreviousData as Ye, useMutation as K } from "@tanstack/react-query";
|
|
4
|
+
import { Bell as Ve, CheckCheck as We, Search as Xe, X as Je, ExternalLink as ye, Check as B, History as Ze, ShieldCheck as et, ChevronDown as tt } from "lucide-react";
|
|
5
|
+
import { useState as N, useEffect as F, useRef as J, useCallback as at, useMemo as we, Fragment as Ne } from "react";
|
|
6
|
+
import { createPortal as rt } from "react-dom";
|
|
7
|
+
import { useNivaroClient as nt } from "../context.js";
|
|
8
|
+
import { get as ot, post as lt } from "../lib/commands.js";
|
|
9
|
+
import { createCoalescer as it } from "../lib/live-counts.js";
|
|
10
|
+
import { useLiveRefetchInterval as st } from "../lib/live-queries.js";
|
|
11
|
+
import { useTopInserts as Ce } from "../lib/live-screen.js";
|
|
12
|
+
import { resolveNotificationTargetFor as q, runNotificationTarget as P } from "../lib/notification-target.js";
|
|
13
|
+
import { useRecordPeek as dt, notificationPeekTarget as ct, isNewTabClick as ut } from "../lib/record-peek.js";
|
|
14
|
+
import { cn as $e, formatRelative as pt } from "../lib/utils.js";
|
|
15
|
+
import { AgentBadge as mt } from "./AgentBadge.js";
|
|
16
|
+
import { LiveCount as Re } from "./LiveCount.js";
|
|
17
|
+
import { AsItWasSheet as ht } from "./notifications/AsItWasSheet.js";
|
|
18
|
+
import { bundleLocally as ft, laneTone as bt, bundleAsNotification as xt, bundleHeadline as gt, categoryChipLabel as kt } from "./notifications/bundles.js";
|
|
19
|
+
import { DeliveryChips as vt } from "./notifications/DeliveryChips.js";
|
|
20
|
+
import { NotificationActions as yt } from "./notifications/NotificationActions.js";
|
|
21
|
+
import { ResolvedLine as wt, NotificationDetailBits as Nt } from "./notifications/NotificationDetailBits.js";
|
|
22
|
+
import { RelativeTime as Ct } from "./RelativeTime.js";
|
|
23
|
+
import { SkeletonBar as Se } from "./Skeletons.js";
|
|
24
|
+
function $t(r) {
|
|
25
|
+
var h, v;
|
|
26
26
|
if (!r) return null;
|
|
27
27
|
if (r.target_label && r.kind !== "record") return r.target_label;
|
|
28
28
|
if (String(r.collection ?? "") === "__chat__") return "Chat";
|
|
29
29
|
if (!r.collection) return null;
|
|
30
|
-
const c = ((
|
|
31
|
-
const
|
|
32
|
-
return
|
|
30
|
+
const c = ((h = r.record_collection_label) == null ? void 0 : h.trim()) || (() => {
|
|
31
|
+
const g = String(r.collection).replace(/_/g, " ").trim();
|
|
32
|
+
return g ? g.charAt(0).toUpperCase() + g.slice(1) : null;
|
|
33
33
|
})(), u = (v = r.record_label) == null ? void 0 : v.trim();
|
|
34
34
|
return c && u ? `${c} ${u}` : u || c || null;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function Rt(r) {
|
|
37
37
|
var c, u;
|
|
38
|
-
return
|
|
38
|
+
return _e(r) ? r.revision_id != null || (((u = (c = r.detail) == null ? void 0 : c.changes) == null ? void 0 : u.length) ?? 0) > 0 || r.category === "watch" || r.category === "workflow" : !1;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
var v,
|
|
40
|
+
function _e(r) {
|
|
41
|
+
var v, g, E;
|
|
42
42
|
if ((((v = r.target) == null ? void 0 : v.kind) ?? r.kind ?? (r.collection && r.item ? "record" : null)) !== "record") return !1;
|
|
43
|
-
const u = ((
|
|
44
|
-
return !!u &&
|
|
43
|
+
const u = ((g = r.target) == null ? void 0 : g.collection) ?? r.collection, h = ((E = r.target) == null ? void 0 : E.id) ?? r.item;
|
|
44
|
+
return !!u && h != null && h !== "" && !/^(nivaro|directus)_|^__/i.test(u);
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
function
|
|
46
|
+
const St = (r) => `n:${r.id}`, _t = (r) => `b:${r.collection}:${r.item}`;
|
|
47
|
+
function Jt({
|
|
48
48
|
routes: r,
|
|
49
49
|
onNavigate: c,
|
|
50
50
|
app: u,
|
|
51
|
-
subscribe:
|
|
51
|
+
subscribe: h,
|
|
52
52
|
buttonClassName: v,
|
|
53
|
-
panelClassName:
|
|
54
|
-
beforeList:
|
|
55
|
-
extraBadge:
|
|
56
|
-
mailLogUrl:
|
|
57
|
-
renderTrigger:
|
|
58
|
-
allPath:
|
|
59
|
-
subscriptionsPath:
|
|
60
|
-
rulesPath:
|
|
61
|
-
onActionError:
|
|
62
|
-
panelPlacement:
|
|
53
|
+
panelClassName: g,
|
|
54
|
+
beforeList: E,
|
|
55
|
+
extraBadge: Me = 0,
|
|
56
|
+
mailLogUrl: Fe,
|
|
57
|
+
renderTrigger: Z,
|
|
58
|
+
allPath: ee,
|
|
59
|
+
subscriptionsPath: qe,
|
|
60
|
+
rulesPath: Ee,
|
|
61
|
+
onActionError: Ie,
|
|
62
|
+
panelPlacement: M = "below"
|
|
63
63
|
}) {
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
const C = nt(), O = dt(), [f, m] = N(!1), [b, j] = N("attention"), [$, I] = N(""), [y, te] = N("");
|
|
65
|
+
F(() => {
|
|
66
|
+
const e = setTimeout(() => te($.trim()), 250);
|
|
67
|
+
return () => clearTimeout(e);
|
|
68
|
+
}, [$]), F(() => {
|
|
69
|
+
f || (I(""), te(""));
|
|
70
|
+
}, [f]);
|
|
71
|
+
const z = J(null), ae = J(null), [Q, Le] = N(null), re = Ue(), R = () => {
|
|
72
|
+
re.invalidateQueries({ queryKey: ["notification-count"] }), re.invalidateQueries({ queryKey: ["notifications"] });
|
|
73
|
+
}, Ae = st(6e4, { enabled: !!h, safetyMs: 12e4 }), { data: x } = ve({
|
|
67
74
|
queryKey: ["notification-count"],
|
|
68
|
-
queryFn: () =>
|
|
69
|
-
refetchInterval:
|
|
70
|
-
}),
|
|
71
|
-
queryKey: ["notifications", "bell", u ?? null,
|
|
72
|
-
queryFn: () =>
|
|
73
|
-
|
|
75
|
+
queryFn: () => C.request(ze()),
|
|
76
|
+
refetchInterval: Ae
|
|
77
|
+
}), H = (x == null ? void 0 : x.unread) ?? 0, ne = (x == null ? void 0 : x.attention) ?? H, L = (x == null ? void 0 : x.lanes) ?? { critical: 0, fyi: 0 }, S = H + Me, { data: p, isPlaceholderData: G } = ve({
|
|
78
|
+
queryKey: ["notifications", "bell", u ?? null, b, y],
|
|
79
|
+
queryFn: () => C.request(
|
|
80
|
+
ot("/notifications", {
|
|
74
81
|
limit: 60,
|
|
75
82
|
app: u,
|
|
76
83
|
bundle: "record",
|
|
77
|
-
...
|
|
78
|
-
...
|
|
84
|
+
...y ? { search: y } : {},
|
|
85
|
+
...b === "attention" ? { lane: "attention", status: "inbox" } : {},
|
|
86
|
+
...b === "fyi" ? { lane: "fyi", status: "inbox" } : {}
|
|
79
87
|
})
|
|
80
88
|
).then((e) => {
|
|
81
89
|
const a = e.pinned ?? [], o = new Set(a.map((s) => s.id)), i = (e.data ?? []).filter((s) => !o.has(s.id));
|
|
82
|
-
return e.bundles ? { rows: i, bundles: e.bundles, pinned: a } : { ...
|
|
90
|
+
return e.bundles ? { rows: i, bundles: e.bundles, pinned: a } : { ...ft(i), pinned: a };
|
|
83
91
|
}),
|
|
84
|
-
enabled:
|
|
92
|
+
enabled: f,
|
|
85
93
|
// R8: a lane switch keeps the last list (dimmed) until the new lane answers — no
|
|
86
94
|
// "Nothing needs you" flash between them.
|
|
87
|
-
placeholderData:
|
|
88
|
-
}),
|
|
89
|
-
enabled:
|
|
90
|
-
resetKey: `${
|
|
91
|
-
}),
|
|
92
|
-
enabled:
|
|
93
|
-
resetKey: `${
|
|
94
|
-
}),
|
|
95
|
+
placeholderData: Ye
|
|
96
|
+
}), oe = f && !!p && !G, A = Ce(p ? p.rows : void 0, St, {
|
|
97
|
+
enabled: oe,
|
|
98
|
+
resetKey: `${b}|${u ?? ""}|${y}`
|
|
99
|
+
}), T = Ce(p ? p.bundles : void 0, _t, {
|
|
100
|
+
enabled: oe,
|
|
101
|
+
resetKey: `${b}|${u ?? ""}|${y}`
|
|
102
|
+
}), le = p ? A.rows : [], U = (p == null ? void 0 : p.pinned) ?? [], ie = p ? T.rows : [], Y = A.held + T.held, se = A.rootRef, de = T.rootRef, Te = at(
|
|
95
103
|
(e) => {
|
|
96
|
-
|
|
104
|
+
se(e), de(e);
|
|
97
105
|
},
|
|
98
|
-
[
|
|
99
|
-
), [
|
|
100
|
-
|
|
101
|
-
if (!
|
|
102
|
-
const e =
|
|
106
|
+
[se, de]
|
|
107
|
+
), [De, ce] = N(() => /* @__PURE__ */ new Set()), [_, V] = N(null), ue = J(R);
|
|
108
|
+
ue.current = R, F(() => {
|
|
109
|
+
if (!h) return;
|
|
110
|
+
const e = it(() => ue.current()), a = h(() => e.poke());
|
|
103
111
|
return () => {
|
|
104
112
|
a(), e.cancel();
|
|
105
113
|
};
|
|
106
|
-
}, [
|
|
107
|
-
if (!
|
|
114
|
+
}, [h]), F(() => {
|
|
115
|
+
if (!f) return;
|
|
108
116
|
const e = (a) => {
|
|
109
117
|
var i, s;
|
|
110
118
|
const o = a.target;
|
|
111
|
-
(i =
|
|
119
|
+
(i = z.current) != null && i.contains(o) || (s = ae.current) != null && s.contains(o) || m(!1);
|
|
112
120
|
};
|
|
113
121
|
return window.addEventListener("mousedown", e), () => window.removeEventListener("mousedown", e);
|
|
114
|
-
}, [
|
|
115
|
-
if (!
|
|
122
|
+
}, [f]), F(() => {
|
|
123
|
+
if (!f || M !== "right") return;
|
|
116
124
|
const e = () => {
|
|
117
125
|
var o;
|
|
118
|
-
const a = (o =
|
|
119
|
-
a &&
|
|
126
|
+
const a = (o = z.current) == null ? void 0 : o.getBoundingClientRect();
|
|
127
|
+
a && Le({
|
|
120
128
|
left: Math.round(a.right + 12),
|
|
121
129
|
bottom: Math.max(8, Math.round(window.innerHeight - a.bottom))
|
|
122
130
|
});
|
|
@@ -124,22 +132,22 @@ function Gt({
|
|
|
124
132
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
125
133
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
126
134
|
};
|
|
127
|
-
}, [
|
|
128
|
-
const
|
|
129
|
-
mutationFn: (e) =>
|
|
130
|
-
onSuccess:
|
|
131
|
-
}),
|
|
132
|
-
mutationFn: (e) =>
|
|
133
|
-
onSuccess:
|
|
134
|
-
}),
|
|
135
|
-
mutationFn: (e) =>
|
|
136
|
-
onSuccess:
|
|
137
|
-
}),
|
|
138
|
-
mutationFn: () =>
|
|
139
|
-
onSuccess:
|
|
140
|
-
}),
|
|
135
|
+
}, [f, M]);
|
|
136
|
+
const pe = K({
|
|
137
|
+
mutationFn: (e) => C.request(lt(`/notifications/${e}/acknowledge`)),
|
|
138
|
+
onSuccess: R
|
|
139
|
+
}), D = K({
|
|
140
|
+
mutationFn: (e) => C.request(Qe(e)),
|
|
141
|
+
onSuccess: R
|
|
142
|
+
}), W = K({
|
|
143
|
+
mutationFn: (e) => C.request(He(e)),
|
|
144
|
+
onSuccess: R
|
|
145
|
+
}), Ke = K({
|
|
146
|
+
mutationFn: () => C.request(Ge()),
|
|
147
|
+
onSuccess: R
|
|
148
|
+
}), me = we(() => le.slice(0, 40), [le]), he = we(() => {
|
|
141
149
|
const e = /* @__PURE__ */ new Map();
|
|
142
|
-
for (const a of
|
|
150
|
+
for (const a of me) {
|
|
143
151
|
const o = a.collection && a.item ? `${a.collection}:${a.item}` : `single:${a.id}`, i = e.get(o) ?? {
|
|
144
152
|
key: o,
|
|
145
153
|
collection: a.collection ?? null,
|
|
@@ -149,19 +157,19 @@ function Gt({
|
|
|
149
157
|
i.rows.push(a), e.set(o, i);
|
|
150
158
|
}
|
|
151
159
|
return [...e.values()];
|
|
152
|
-
}, [
|
|
153
|
-
const o =
|
|
154
|
-
if (o &&
|
|
155
|
-
m(!1),
|
|
160
|
+
}, [me]), Be = (e, a) => {
|
|
161
|
+
const o = O ? ct(e) : null;
|
|
162
|
+
if (o && O && !ut(a)) {
|
|
163
|
+
m(!1), O.open(o);
|
|
156
164
|
return;
|
|
157
165
|
}
|
|
158
|
-
const i =
|
|
159
|
-
i && (m(!1),
|
|
160
|
-
},
|
|
166
|
+
const i = q(e, r);
|
|
167
|
+
i && (m(!1), P(i, c));
|
|
168
|
+
}, fe = (e) => {
|
|
161
169
|
m(!1), c(e);
|
|
162
|
-
},
|
|
163
|
-
var w,
|
|
164
|
-
const i =
|
|
170
|
+
}, X = (e, a, o = !1) => {
|
|
171
|
+
var w, xe, ge, ke;
|
|
172
|
+
const i = q(e, r) != null, s = `py-2 pr-3 ${o ? "pl-7" : "pl-3"}`, k = /* @__PURE__ */ n(je, { children: [
|
|
165
173
|
/* @__PURE__ */ t(
|
|
166
174
|
"span",
|
|
167
175
|
{
|
|
@@ -180,19 +188,19 @@ function Gt({
|
|
|
180
188
|
}
|
|
181
189
|
),
|
|
182
190
|
e.message && /* @__PURE__ */ t("span", { className: "mt-0.5 line-clamp-2 whitespace-pre-line text-[11px] leading-snug text-slate-500", children: e.message.replace(/<[^>]+>/g, "") }),
|
|
183
|
-
/* @__PURE__ */ t(
|
|
191
|
+
/* @__PURE__ */ t(wt, { resolved: (w = e.detail) == null ? void 0 : w.resolved }),
|
|
184
192
|
/* @__PURE__ */ n("span", { className: "mt-0.5 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-[10.5px] text-slate-400", children: [
|
|
185
|
-
/* @__PURE__ */ t(
|
|
186
|
-
/* @__PURE__ */ t(
|
|
193
|
+
/* @__PURE__ */ t(Ct, { value: e.created_at }),
|
|
194
|
+
/* @__PURE__ */ t(mt, { label: (xe = e.detail) == null ? void 0 : xe.via_agent }),
|
|
187
195
|
/* @__PURE__ */ t(
|
|
188
|
-
|
|
196
|
+
vt,
|
|
189
197
|
{
|
|
190
198
|
delivery: e.delivery,
|
|
191
|
-
mailLogUrl:
|
|
192
|
-
onNavigate:
|
|
199
|
+
mailLogUrl: Fe,
|
|
200
|
+
onNavigate: fe
|
|
193
201
|
}
|
|
194
202
|
),
|
|
195
|
-
|
|
203
|
+
_e(e) && // biome-ignore lint/a11y/useSemanticElements: nested inside the row's <button> — a real <button> is invalid there
|
|
196
204
|
/* @__PURE__ */ n(
|
|
197
205
|
"span",
|
|
198
206
|
{
|
|
@@ -201,14 +209,14 @@ function Gt({
|
|
|
201
209
|
"data-notification-as-it-was": e.id,
|
|
202
210
|
"data-tip": "The record as it was when you were told",
|
|
203
211
|
onClick: (d) => {
|
|
204
|
-
d.stopPropagation(), m(!1),
|
|
212
|
+
d.stopPropagation(), m(!1), V(e);
|
|
205
213
|
},
|
|
206
214
|
onKeyDown: (d) => {
|
|
207
|
-
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), m(!1),
|
|
215
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), m(!1), V(e));
|
|
208
216
|
},
|
|
209
217
|
className: "inline-flex items-center gap-0.5 rounded px-1 text-[10.5px] text-slate-400 transition-colors hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
210
218
|
children: [
|
|
211
|
-
/* @__PURE__ */ t(
|
|
219
|
+
/* @__PURE__ */ t(Ze, { className: "h-3 w-3" }),
|
|
212
220
|
"Record when sent"
|
|
213
221
|
]
|
|
214
222
|
}
|
|
@@ -216,13 +224,13 @@ function Gt({
|
|
|
216
224
|
] })
|
|
217
225
|
] })
|
|
218
226
|
] }), l = "mt-0.5 rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200";
|
|
219
|
-
return /* @__PURE__ */ n(
|
|
227
|
+
return /* @__PURE__ */ n(Ne, { children: [
|
|
220
228
|
i ? /* @__PURE__ */ n(
|
|
221
229
|
"button",
|
|
222
230
|
{
|
|
223
231
|
type: "button",
|
|
224
232
|
onClick: (d) => {
|
|
225
|
-
e.read ||
|
|
233
|
+
e.read || D.mutate(e.id), Be(e, d);
|
|
226
234
|
},
|
|
227
235
|
className: `flex w-full items-start gap-2.5 text-left transition-colors hover:bg-slate-50 dark:hover:bg-muted ${s}`,
|
|
228
236
|
"data-notification-row": e.id,
|
|
@@ -237,13 +245,13 @@ function Gt({
|
|
|
237
245
|
"aria-label": "Mark read",
|
|
238
246
|
"data-tip": "Mark read",
|
|
239
247
|
onClick: (d) => {
|
|
240
|
-
d.stopPropagation(),
|
|
248
|
+
d.stopPropagation(), D.mutate(e.id);
|
|
241
249
|
},
|
|
242
250
|
onKeyDown: (d) => {
|
|
243
|
-
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(),
|
|
251
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), d.stopPropagation(), D.mutate(e.id));
|
|
244
252
|
},
|
|
245
253
|
className: l,
|
|
246
|
-
children: /* @__PURE__ */ t(
|
|
254
|
+
children: /* @__PURE__ */ t(B, { className: "h-3 w-3" })
|
|
247
255
|
}
|
|
248
256
|
)
|
|
249
257
|
]
|
|
@@ -263,54 +271,54 @@ function Gt({
|
|
|
263
271
|
"aria-label": "Mark read",
|
|
264
272
|
"data-tip": "Mark read",
|
|
265
273
|
tabIndex: e.read ? -1 : void 0,
|
|
266
|
-
onClick: () =>
|
|
267
|
-
className:
|
|
268
|
-
children: /* @__PURE__ */ t(
|
|
274
|
+
onClick: () => D.mutate(e.id),
|
|
275
|
+
className: $e(l, "shrink-0", e.read && "invisible"),
|
|
276
|
+
children: /* @__PURE__ */ t(B, { className: "h-3 w-3" })
|
|
269
277
|
}
|
|
270
278
|
)
|
|
271
279
|
]
|
|
272
280
|
}
|
|
273
281
|
),
|
|
274
|
-
((
|
|
282
|
+
((ge = e.ack) == null ? void 0 : ge.required) && !e.ack.at && /* @__PURE__ */ t("div", { className: `pb-2 pr-3 ${o ? "pl-[46px]" : "pl-[30px]"}`, children: /* @__PURE__ */ n(
|
|
275
283
|
"button",
|
|
276
284
|
{
|
|
277
285
|
type: "button",
|
|
278
|
-
disabled:
|
|
279
|
-
onClick: () =>
|
|
286
|
+
disabled: pe.isPending,
|
|
287
|
+
onClick: () => pe.mutate(e.id),
|
|
280
288
|
"data-notification-acknowledge": e.id,
|
|
281
289
|
className: "inline-flex items-center gap-1 rounded-md bg-nvr-cyan px-2 py-1 text-[11px] font-medium text-white hover:opacity-90 disabled:opacity-50",
|
|
282
290
|
children: [
|
|
283
|
-
/* @__PURE__ */ t(
|
|
291
|
+
/* @__PURE__ */ t(et, { className: "h-3 w-3" }),
|
|
284
292
|
"Acknowledge"
|
|
285
293
|
]
|
|
286
294
|
}
|
|
287
295
|
) }),
|
|
288
|
-
e.actions && e.actions.length > 0 && !e.read && !((
|
|
289
|
-
|
|
296
|
+
e.actions && e.actions.length > 0 && !e.read && !((ke = e.detail) != null && ke.resolved) && /* @__PURE__ */ t(
|
|
297
|
+
yt,
|
|
290
298
|
{
|
|
291
299
|
actions: e.actions,
|
|
292
300
|
notificationId: e.id,
|
|
293
|
-
onError:
|
|
301
|
+
onError: Ie,
|
|
294
302
|
className: `pb-2 pr-3 ${o ? "pl-[46px]" : "pl-[30px]"}`
|
|
295
303
|
}
|
|
296
304
|
),
|
|
297
305
|
/* @__PURE__ */ t(
|
|
298
|
-
|
|
306
|
+
Nt,
|
|
299
307
|
{
|
|
300
308
|
detail: e.detail,
|
|
301
309
|
why: e.why,
|
|
302
310
|
delivery: e.delivery,
|
|
303
311
|
notificationId: e.id,
|
|
304
|
-
recordChanges:
|
|
305
|
-
subscriptionsPath:
|
|
306
|
-
rulesPath:
|
|
307
|
-
onNavigate:
|
|
312
|
+
recordChanges: Rt(e),
|
|
313
|
+
subscriptionsPath: qe,
|
|
314
|
+
rulesPath: Ee,
|
|
315
|
+
onNavigate: fe,
|
|
308
316
|
className: `pb-3 pr-3 ${o ? "pl-[46px]" : "pl-[30px]"}`
|
|
309
317
|
}
|
|
310
318
|
)
|
|
311
319
|
] }, e.id);
|
|
312
|
-
},
|
|
313
|
-
const a = `${e.collection}:${e.item}`, o =
|
|
320
|
+
}, Pe = (e) => {
|
|
321
|
+
const a = `${e.collection}:${e.item}`, o = De.has(a), i = bt(e.lane), s = e.deleted ? null : q(xt(e), r), k = e.rows.filter((l) => !l.read).map((l) => l.id);
|
|
314
322
|
return /* @__PURE__ */ n(
|
|
315
323
|
"div",
|
|
316
324
|
{
|
|
@@ -328,13 +336,13 @@ function Gt({
|
|
|
328
336
|
"aria-expanded": o,
|
|
329
337
|
"aria-label": o ? "Collapse" : "Expand",
|
|
330
338
|
"data-notification-bundle-expand": a,
|
|
331
|
-
onClick: () =>
|
|
339
|
+
onClick: () => ce((l) => {
|
|
332
340
|
const w = new Set(l);
|
|
333
341
|
return w.has(a) ? w.delete(a) : w.add(a), w;
|
|
334
342
|
}),
|
|
335
343
|
className: "mt-0.5 rounded p-0.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
336
344
|
children: /* @__PURE__ */ t(
|
|
337
|
-
|
|
345
|
+
tt,
|
|
338
346
|
{
|
|
339
347
|
className: `h-3.5 w-3.5 transition-transform ${o ? "" : "-rotate-90"}`
|
|
340
348
|
}
|
|
@@ -346,7 +354,7 @@ function Gt({
|
|
|
346
354
|
{
|
|
347
355
|
type: "button",
|
|
348
356
|
onClick: () => {
|
|
349
|
-
s ? (m(!1),
|
|
357
|
+
s ? (m(!1), P(s, c)) : ce((l) => new Set(l).add(a));
|
|
350
358
|
},
|
|
351
359
|
className: "min-w-0 flex-1 text-left",
|
|
352
360
|
children: [
|
|
@@ -361,7 +369,7 @@ function Gt({
|
|
|
361
369
|
"span",
|
|
362
370
|
{
|
|
363
371
|
className: `truncate text-[12.5px] ${e.unread > 0 ? `font-medium ${i.text}` : "font-normal text-slate-600 dark:text-slate-400"}`,
|
|
364
|
-
children:
|
|
372
|
+
children: gt(e)
|
|
365
373
|
}
|
|
366
374
|
)
|
|
367
375
|
] }),
|
|
@@ -395,11 +403,11 @@ function Gt({
|
|
|
395
403
|
{
|
|
396
404
|
className: "rounded bg-slate-100 px-1 py-px text-[9.5px] font-medium text-slate-600 dark:bg-muted dark:text-slate-300",
|
|
397
405
|
"data-notification-bundle-category": l,
|
|
398
|
-
children:
|
|
406
|
+
children: kt(l)
|
|
399
407
|
},
|
|
400
408
|
l
|
|
401
409
|
)),
|
|
402
|
-
/* @__PURE__ */ t("span", { children: e.newest ?
|
|
410
|
+
/* @__PURE__ */ t("span", { children: e.newest ? pt(e.newest) : "" }),
|
|
403
411
|
e.unread > 0 && e.unread < e.count && /* @__PURE__ */ n("span", { children: [
|
|
404
412
|
"· ",
|
|
405
413
|
e.unread,
|
|
@@ -418,10 +426,10 @@ function Gt({
|
|
|
418
426
|
"data-tip": "Open record",
|
|
419
427
|
"data-notification-open-record": !0,
|
|
420
428
|
onClick: () => {
|
|
421
|
-
m(!1),
|
|
429
|
+
m(!1), P(s, c);
|
|
422
430
|
},
|
|
423
431
|
className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
424
|
-
children: /* @__PURE__ */ t(
|
|
432
|
+
children: /* @__PURE__ */ t(ye, { className: "h-3 w-3" })
|
|
425
433
|
}
|
|
426
434
|
),
|
|
427
435
|
k.length > 0 && /* @__PURE__ */ t(
|
|
@@ -431,9 +439,9 @@ function Gt({
|
|
|
431
439
|
"aria-label": "Mark read",
|
|
432
440
|
"data-tip": "Mark read",
|
|
433
441
|
"data-notification-bundle-read": a,
|
|
434
|
-
onClick: () =>
|
|
442
|
+
onClick: () => W.mutate(k),
|
|
435
443
|
className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
436
|
-
children: /* @__PURE__ */ t(
|
|
444
|
+
children: /* @__PURE__ */ t(B, { className: "h-3 w-3" })
|
|
437
445
|
}
|
|
438
446
|
)
|
|
439
447
|
] })
|
|
@@ -443,116 +451,154 @@ function Gt({
|
|
|
443
451
|
{
|
|
444
452
|
className: "border-t border-slate-50 bg-slate-50/50 dark:border-border/50 dark:bg-muted/30",
|
|
445
453
|
"data-notification-bundle-rows": a,
|
|
446
|
-
children: e.rows.map((l) =>
|
|
454
|
+
children: e.rows.map((l) => X(l, !0, !0))
|
|
447
455
|
}
|
|
448
456
|
)
|
|
449
457
|
]
|
|
450
458
|
},
|
|
451
459
|
`bundle:${a}`
|
|
452
460
|
);
|
|
453
|
-
},
|
|
454
|
-
{ key: "attention", label: "Needs you", count:
|
|
455
|
-
{ key: "fyi", label: "FYI", count:
|
|
461
|
+
}, Oe = [
|
|
462
|
+
{ key: "attention", label: "Needs you", count: ne },
|
|
463
|
+
{ key: "fyi", label: "FYI", count: L.fyi },
|
|
456
464
|
{ key: "all", label: "All", count: null }
|
|
457
|
-
],
|
|
458
|
-
return /* @__PURE__ */ n("div", { ref:
|
|
459
|
-
|
|
465
|
+
], be = () => m((e) => (!e && b === "attention" && ne === 0 && L.fyi > 0 && j("fyi"), !e));
|
|
466
|
+
return /* @__PURE__ */ n("div", { ref: z, className: "relative", "data-nvr-notification-bell": !0, children: [
|
|
467
|
+
Z ? Z({ open: f, badge: S, toggle: be }) : /* @__PURE__ */ n(
|
|
460
468
|
"button",
|
|
461
469
|
{
|
|
462
470
|
type: "button",
|
|
463
|
-
onClick:
|
|
471
|
+
onClick: be,
|
|
464
472
|
className: v ?? "relative rounded-md p-1.5 text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-muted",
|
|
465
|
-
"aria-label":
|
|
473
|
+
"aria-label": S ? `Notifications (${S} unread)` : "Notifications",
|
|
466
474
|
children: [
|
|
467
|
-
/* @__PURE__ */ t(
|
|
468
|
-
|
|
475
|
+
/* @__PURE__ */ t(Ve, { className: "h-4 w-4", strokeWidth: 1.8 }),
|
|
476
|
+
S > 0 && /* @__PURE__ */ t(
|
|
469
477
|
"span",
|
|
470
478
|
{
|
|
471
479
|
"data-nvr-recording-hide": !0,
|
|
472
|
-
className: `absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9.5px] font-bold ${
|
|
473
|
-
children: /* @__PURE__ */ t(
|
|
480
|
+
className: `absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9.5px] font-bold ${L.critical > 0 ? "bg-red-500 text-white" : "bg-nvr-cyan text-nvr-navy"}`,
|
|
481
|
+
children: /* @__PURE__ */ t(Re, { value: S > 99 ? "99+" : S })
|
|
474
482
|
}
|
|
475
483
|
)
|
|
476
484
|
]
|
|
477
485
|
}
|
|
478
486
|
),
|
|
479
|
-
|
|
487
|
+
f && (M === "right" ? rt : (e) => e)(
|
|
480
488
|
/* @__PURE__ */ n(
|
|
481
489
|
"div",
|
|
482
490
|
{
|
|
483
|
-
ref:
|
|
484
|
-
className: `${
|
|
485
|
-
style:
|
|
491
|
+
ref: ae,
|
|
492
|
+
className: `${M === "right" ? "fixed z-[110]" : "absolute right-0 top-10 z-40"} w-[360px] overflow-hidden rounded-xl border border-slate-200 bg-white shadow-xl dark:border-border dark:bg-card ${g ?? ""}`,
|
|
493
|
+
style: M === "right" && Q ? { left: Q.left, bottom: Q.bottom } : void 0,
|
|
486
494
|
"data-nvr-notification-panel": !0,
|
|
487
495
|
children: [
|
|
488
|
-
|
|
496
|
+
E,
|
|
489
497
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b border-slate-100 px-3 py-2 dark:border-border/60", children: [
|
|
490
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 rounded-md bg-slate-100 p-0.5 dark:bg-muted", children:
|
|
498
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-1 rounded-md bg-slate-100 p-0.5 dark:bg-muted", children: Oe.map((e) => /* @__PURE__ */ n(
|
|
491
499
|
"button",
|
|
492
500
|
{
|
|
493
501
|
type: "button",
|
|
494
|
-
onClick: () =>
|
|
502
|
+
onClick: () => j(e.key),
|
|
495
503
|
"data-nvr-lane-tab": e.key,
|
|
496
|
-
className:
|
|
504
|
+
className: b === e.key ? "rounded bg-white px-2 py-0.5 text-[11px] font-medium text-slate-900 shadow-sm dark:bg-card dark:text-slate-100" : "rounded px-2 py-0.5 text-[11px] font-medium text-slate-500 hover:text-slate-700 dark:text-slate-400",
|
|
497
505
|
children: [
|
|
498
506
|
e.label,
|
|
499
507
|
e.count != null && e.count > 0 && /* @__PURE__ */ t(
|
|
500
508
|
"span",
|
|
501
509
|
{
|
|
502
|
-
className: `ml-1 rounded-full px-1 text-[9.5px] font-bold ${e.key === "attention" &&
|
|
503
|
-
children: /* @__PURE__ */ t(
|
|
510
|
+
className: `ml-1 rounded-full px-1 text-[9.5px] font-bold ${e.key === "attention" && L.critical > 0 ? "bg-red-500/15 text-red-600 dark:text-red-400" : "bg-slate-200 text-slate-600 dark:bg-slate-700 dark:text-slate-300"}`,
|
|
511
|
+
children: /* @__PURE__ */ t(Re, { value: e.count })
|
|
504
512
|
}
|
|
505
513
|
)
|
|
506
514
|
]
|
|
507
515
|
},
|
|
508
516
|
e.key
|
|
509
517
|
)) }),
|
|
510
|
-
|
|
518
|
+
H > 0 && /* @__PURE__ */ n(
|
|
511
519
|
"button",
|
|
512
520
|
{
|
|
513
521
|
type: "button",
|
|
514
|
-
onClick: () =>
|
|
522
|
+
onClick: () => Ke.mutate(),
|
|
515
523
|
className: "inline-flex items-center gap-1 text-[11px] font-medium text-slate-400 transition-colors hover:text-nvr-cyan",
|
|
516
524
|
children: [
|
|
517
|
-
/* @__PURE__ */ t(
|
|
525
|
+
/* @__PURE__ */ t(We, { className: "h-3.5 w-3.5", strokeWidth: 2 }),
|
|
518
526
|
"Mark all read"
|
|
519
527
|
]
|
|
520
528
|
}
|
|
521
529
|
)
|
|
522
530
|
] }),
|
|
531
|
+
/* @__PURE__ */ t("div", { className: "border-b border-slate-100 px-3 py-1.5 dark:border-border/60", children: /* @__PURE__ */ n("div", { className: "relative", children: [
|
|
532
|
+
/* @__PURE__ */ t(
|
|
533
|
+
Xe,
|
|
534
|
+
{
|
|
535
|
+
className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-slate-400",
|
|
536
|
+
"aria-hidden": "true"
|
|
537
|
+
}
|
|
538
|
+
),
|
|
539
|
+
/* @__PURE__ */ t(
|
|
540
|
+
"input",
|
|
541
|
+
{
|
|
542
|
+
type: "search",
|
|
543
|
+
value: $,
|
|
544
|
+
onChange: (e) => {
|
|
545
|
+
const a = e.target.value;
|
|
546
|
+
a.trim() && !$.trim() && b !== "all" && j("all"), I(a);
|
|
547
|
+
},
|
|
548
|
+
onKeyDown: (e) => {
|
|
549
|
+
e.key === "Escape" && $ && (e.stopPropagation(), I(""));
|
|
550
|
+
},
|
|
551
|
+
placeholder: "Search notifications",
|
|
552
|
+
"aria-label": "Search notifications",
|
|
553
|
+
"data-nvr-notification-search": !0,
|
|
554
|
+
className: "h-7 w-full rounded-md border border-slate-200 bg-background pl-7 pr-7 text-[12px] placeholder:text-slate-400 focus:border-nvr-cyan focus:outline-none dark:border-border [&::-webkit-search-cancel-button]:hidden"
|
|
555
|
+
}
|
|
556
|
+
),
|
|
557
|
+
$ && /* @__PURE__ */ t(
|
|
558
|
+
"button",
|
|
559
|
+
{
|
|
560
|
+
type: "button",
|
|
561
|
+
"aria-label": "Clear search",
|
|
562
|
+
"data-tip": "Clear search",
|
|
563
|
+
onClick: () => I(""),
|
|
564
|
+
className: "absolute right-1 top-1/2 -translate-y-1/2 rounded p-0.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
565
|
+
children: /* @__PURE__ */ t(Je, { className: "h-3 w-3" })
|
|
566
|
+
}
|
|
567
|
+
)
|
|
568
|
+
] }) }),
|
|
523
569
|
/* @__PURE__ */ n(
|
|
524
570
|
"div",
|
|
525
571
|
{
|
|
526
|
-
ref:
|
|
527
|
-
className:
|
|
572
|
+
ref: Te,
|
|
573
|
+
className: $e(
|
|
528
574
|
"max-h-96 overflow-y-auto transition-opacity",
|
|
529
|
-
|
|
575
|
+
G && "opacity-60"
|
|
530
576
|
),
|
|
531
|
-
"aria-busy": !p ||
|
|
577
|
+
"aria-busy": !p || G || void 0,
|
|
532
578
|
children: [
|
|
533
|
-
|
|
579
|
+
Y > 0 && /* @__PURE__ */ t("div", { className: "sticky top-0 z-[1] flex justify-center py-1", children: /* @__PURE__ */ n(
|
|
534
580
|
"button",
|
|
535
581
|
{
|
|
536
582
|
type: "button",
|
|
537
|
-
"data-notification-new-pill":
|
|
583
|
+
"data-notification-new-pill": Y,
|
|
538
584
|
onClick: () => {
|
|
539
|
-
|
|
585
|
+
A.reveal(), T.reveal();
|
|
540
586
|
},
|
|
541
587
|
className: "rounded-full border border-nvr-cyan/40 bg-white px-2.5 py-0.5 text-[11px] font-medium text-nvr-navy shadow-sm hover:bg-nvr-cyan/10 dark:bg-card dark:text-nvr-cyan",
|
|
542
588
|
children: [
|
|
543
|
-
|
|
589
|
+
Y,
|
|
544
590
|
" new"
|
|
545
591
|
]
|
|
546
592
|
}
|
|
547
593
|
) }),
|
|
548
|
-
|
|
594
|
+
U.length > 0 && /* @__PURE__ */ n("div", { "data-notification-pinned": !0, children: [
|
|
549
595
|
/* @__PURE__ */ t("div", { className: "bg-amber-50 px-3 py-1 text-[10px] font-semibold uppercase tracking-wide text-amber-700 dark:bg-amber-400/10 dark:text-amber-300", children: "Needs your acknowledgement" }),
|
|
550
|
-
|
|
596
|
+
U.map((e) => /* @__PURE__ */ t(Ne, { children: X(e, !!q(e, r)) }, e.id))
|
|
551
597
|
] }),
|
|
552
|
-
p ?
|
|
553
|
-
...
|
|
554
|
-
...
|
|
555
|
-
const a = e.rows.filter((l) => !l.read).map((l) => l.id), o =
|
|
598
|
+
p ? he.length === 0 && ie.length === 0 && U.length === 0 ? /* @__PURE__ */ t("p", { className: "px-3 py-6 text-center text-[12px] text-slate-400", children: y ? `No notifications match “${y}”.` : b === "attention" ? "Nothing needs you right now." : b === "fyi" ? "No FYI notifications." : "No notifications" }) : [
|
|
599
|
+
...ie.map(Pe),
|
|
600
|
+
...he.map((e) => {
|
|
601
|
+
const a = e.rows.filter((l) => !l.read).map((l) => l.id), o = q(e.rows[0], r), i = !!o, s = e.rows.find((l) => l.record_label) ?? e.rows[0], k = $t(s);
|
|
556
602
|
return /* @__PURE__ */ n(
|
|
557
603
|
"div",
|
|
558
604
|
{
|
|
@@ -572,10 +618,10 @@ function Gt({
|
|
|
572
618
|
"data-tip": "Open record",
|
|
573
619
|
"data-notification-open-record": !0,
|
|
574
620
|
onClick: () => {
|
|
575
|
-
a.length &&
|
|
621
|
+
a.length && W.mutate(a), m(!1), P(o, c);
|
|
576
622
|
},
|
|
577
623
|
className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
578
|
-
children: /* @__PURE__ */ t(
|
|
624
|
+
children: /* @__PURE__ */ t(ye, { className: "h-3 w-3" })
|
|
579
625
|
}
|
|
580
626
|
),
|
|
581
627
|
a.length > 0 && /* @__PURE__ */ t(
|
|
@@ -584,32 +630,32 @@ function Gt({
|
|
|
584
630
|
type: "button",
|
|
585
631
|
"aria-label": "Mark read",
|
|
586
632
|
"data-tip": "Mark read",
|
|
587
|
-
onClick: () =>
|
|
633
|
+
onClick: () => W.mutate(a),
|
|
588
634
|
className: "rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
589
|
-
children: /* @__PURE__ */ t(
|
|
635
|
+
children: /* @__PURE__ */ t(B, { className: "h-3 w-3" })
|
|
590
636
|
}
|
|
591
637
|
)
|
|
592
638
|
] })
|
|
593
639
|
] }),
|
|
594
|
-
e.rows.map((l) =>
|
|
640
|
+
e.rows.map((l) => X(l, i))
|
|
595
641
|
]
|
|
596
642
|
},
|
|
597
643
|
e.key
|
|
598
644
|
);
|
|
599
645
|
})
|
|
600
646
|
] : /* @__PURE__ */ t("div", { className: "space-y-3 px-3 py-4", "data-notification-loading": !0, children: [72, 88, 64].map((e) => /* @__PURE__ */ n("div", { className: "space-y-1.5", children: [
|
|
601
|
-
/* @__PURE__ */ t(
|
|
602
|
-
/* @__PURE__ */ t(
|
|
647
|
+
/* @__PURE__ */ t(Se, { width: `${e}%` }),
|
|
648
|
+
/* @__PURE__ */ t(Se, { width: "40%", className: "h-2.5" })
|
|
603
649
|
] }, e)) })
|
|
604
650
|
]
|
|
605
651
|
}
|
|
606
652
|
),
|
|
607
|
-
|
|
653
|
+
ee && /* @__PURE__ */ t(
|
|
608
654
|
"button",
|
|
609
655
|
{
|
|
610
656
|
type: "button",
|
|
611
657
|
onClick: () => {
|
|
612
|
-
m(!1), c(
|
|
658
|
+
m(!1), c(ee);
|
|
613
659
|
},
|
|
614
660
|
className: "block w-full border-t border-slate-100 px-3 py-1.5 text-center text-[11px] font-medium text-slate-500 hover:text-nvr-cyan dark:border-border/60",
|
|
615
661
|
children: "See all notifications"
|
|
@@ -621,18 +667,18 @@ function Gt({
|
|
|
621
667
|
document.body
|
|
622
668
|
),
|
|
623
669
|
/* @__PURE__ */ t(
|
|
624
|
-
|
|
670
|
+
ht,
|
|
625
671
|
{
|
|
626
|
-
notificationId: (
|
|
627
|
-
title: (
|
|
628
|
-
onClose: () =>
|
|
672
|
+
notificationId: (_ == null ? void 0 : _.id) ?? null,
|
|
673
|
+
title: (_ == null ? void 0 : _.title) ?? null,
|
|
674
|
+
onClose: () => V(null)
|
|
629
675
|
}
|
|
630
676
|
)
|
|
631
677
|
] });
|
|
632
678
|
}
|
|
633
679
|
export {
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
680
|
+
Jt as NotificationBell,
|
|
681
|
+
$t as bellGroupLabel,
|
|
682
|
+
_e as hasSnapshotView,
|
|
683
|
+
Rt as offersChanges
|
|
638
684
|
};
|