@nivaro/react 0.3.117 → 0.3.119
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 +136 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3757 -3695
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4451 -4385
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +135 -94
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +88 -85
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +245 -141
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +15 -16
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/addendum-view.js +6 -0
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +151 -130
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +7 -2
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,249 +1,257 @@
|
|
|
1
|
-
import { jsx as e, jsxs as u, Fragment as
|
|
2
|
-
import { useQueryClient as fe, useQuery as
|
|
3
|
-
import { CheckCheck as
|
|
4
|
-
import { useEffect as
|
|
1
|
+
import { jsx as e, jsxs as u, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as fe, useQuery as I } from "@tanstack/react-query";
|
|
3
|
+
import { CheckCheck as ae, Minus as Se, X as Ce, Users as te, Plus as $e, ChevronLeft as De, ChevronRight as be, Binoculars as Te, AtSign as ge, ArrowDownUp as Le, Check as Me, Pin as Re, Hourglass as _e, CircleCheck as We, Undo2 as qe, MoreHorizontal as Ke, UserCheck as Ae, Pencil as Ee, LogOut as Oe, Trash2 as Pe } from "lucide-react";
|
|
4
|
+
import { useEffect as S, useMemo as T, useRef as y, useState as R } from "react";
|
|
5
5
|
import { useOptionalNivaroClient as V } from "../../context.js";
|
|
6
|
-
import { get as
|
|
7
|
-
import { describeError as
|
|
8
|
-
import { useLiveCollection as
|
|
9
|
-
import { usePeekOrOpen as
|
|
10
|
-
import { desktopPermission as
|
|
11
|
-
import { useWatchUi as
|
|
12
|
-
import { ConfirmButton as
|
|
13
|
-
import { Popover as
|
|
14
|
-
import { Sheet as
|
|
6
|
+
import { get as K, post as oe } from "../../lib/commands.js";
|
|
7
|
+
import { describeError as Ie } from "../../lib/error-message.js";
|
|
8
|
+
import { useLiveCollection as ee, useLiveEvent as le } from "../../lib/live.js";
|
|
9
|
+
import { usePeekOrOpen as xe } from "../../lib/record-peek.js";
|
|
10
|
+
import { desktopPermission as Ue, pageOutOfSight as je, keysToNotify as ze, claimBurst as Fe, showDesktop as Qe, desktopText as Be } from "../../lib/watch-desktop.js";
|
|
11
|
+
import { useWatchUi as we, useWatchActions as He, useWatchPrefs as Ye, watchUi as D, withLocalSeen as ke, changedKeys as Ve, pinsSignature as ce, watchKeys as $, typingTarget as Xe, WATCH_WIDTH_MAX as de, WATCH_WIDTH_MIN as ue, sortWatchRows as Ge, withCompleted as ye } from "../../lib/watch-list.js";
|
|
12
|
+
import { ConfirmButton as he } from "../profile/primitives.js";
|
|
13
|
+
import { Popover as Je, PopoverTrigger as Ze, PopoverContent as et } from "../ui/popover.js";
|
|
14
|
+
import { Sheet as tt, SheetContent as nt, SheetTitle as at, SheetDescription as rt } from "../ui/sheet.js";
|
|
15
15
|
import { Skeleton as me } from "../ui/skeleton.js";
|
|
16
|
-
import { WatchSettingsMenu as
|
|
17
|
-
import { WatchRowList as
|
|
18
|
-
const
|
|
16
|
+
import { WatchSettingsMenu as st, TeamEditor as it, AutoPinMark as ot, AlertMark as lt, AlertButton as ct } from "./WatchExtras.js";
|
|
17
|
+
import { WatchRowList as ve, StepChip as dt, agoText as re } from "./WatchRows.js";
|
|
18
|
+
const P = {
|
|
19
19
|
mine: "My order",
|
|
20
20
|
changed: "Last change",
|
|
21
21
|
due: "Due soonest"
|
|
22
|
-
},
|
|
23
|
-
function
|
|
22
|
+
}, ut = /* @__PURE__ */ new Set(["$lock", "$sla"]);
|
|
23
|
+
function ht(t, n, i) {
|
|
24
24
|
var g;
|
|
25
|
-
const
|
|
26
|
-
queryKey:
|
|
27
|
-
queryFn: () =>
|
|
28
|
-
enabled: !!
|
|
25
|
+
const o = V(), a = ce(t.pins), s = t.pins.length > 0, c = I({
|
|
26
|
+
queryKey: $.rows(a),
|
|
27
|
+
queryFn: () => o.request(K("/watch-list")).then((b) => b.data),
|
|
28
|
+
enabled: !!o && s && n,
|
|
29
29
|
staleTime: 6e4,
|
|
30
|
-
placeholderData: (
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
if (!
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
const
|
|
38
|
-
queryKey:
|
|
39
|
-
queryFn: () =>
|
|
40
|
-
enabled: !!
|
|
30
|
+
placeholderData: (b) => b
|
|
31
|
+
}), r = (g = c.data) != null && g.pins ? ce(c.data.pins) : null, m = y("");
|
|
32
|
+
S(() => {
|
|
33
|
+
if (!r || r === a || c.isFetching || c.isPlaceholderData) return;
|
|
34
|
+
const b = `${a}#${c.dataUpdatedAt}`;
|
|
35
|
+
m.current !== b && (m.current = b, c.refetch());
|
|
36
|
+
}, [r, a, c.isFetching, c.isPlaceholderData, c.dataUpdatedAt, c.refetch]);
|
|
37
|
+
const p = I({
|
|
38
|
+
queryKey: $.summary(a),
|
|
39
|
+
queryFn: () => o.request(K("/watch-list", { summary: "1" })).then((b) => b.data),
|
|
40
|
+
enabled: !!o && s && !n,
|
|
41
41
|
staleTime: Number.POSITIVE_INFINITY
|
|
42
|
-
}),
|
|
43
|
-
queryKey:
|
|
44
|
-
queryFn: () =>
|
|
45
|
-
enabled: !!
|
|
42
|
+
}), f = I({
|
|
43
|
+
queryKey: $.waiting,
|
|
44
|
+
queryFn: () => o.request(K("/watch-list/waiting")).then((b) => b.data.rows),
|
|
45
|
+
enabled: !!o && n,
|
|
46
46
|
staleTime: 3e4
|
|
47
|
-
}), h =
|
|
48
|
-
queryKey:
|
|
49
|
-
queryFn: () =>
|
|
50
|
-
|
|
51
|
-
).then((
|
|
52
|
-
enabled: !!
|
|
47
|
+
}), h = I({
|
|
48
|
+
queryKey: $.mentions,
|
|
49
|
+
queryFn: () => o.request(
|
|
50
|
+
K("/watch-list/mentions")
|
|
51
|
+
).then((b) => b.data),
|
|
52
|
+
enabled: !!o,
|
|
53
53
|
staleTime: 6e4
|
|
54
54
|
});
|
|
55
|
-
return { rows:
|
|
55
|
+
return { rows: c, summary: p, waiting: f, mentions: h, tab: i };
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
function
|
|
57
|
+
const Ne = "nvr-watch-dock-state";
|
|
58
|
+
function mt() {
|
|
59
59
|
try {
|
|
60
|
-
const t = localStorage.getItem(
|
|
60
|
+
const t = localStorage.getItem(Ne);
|
|
61
61
|
return t === "open" || t === "minimized" ? t : "closed";
|
|
62
62
|
} catch {
|
|
63
63
|
return "closed";
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function pt(t) {
|
|
67
67
|
try {
|
|
68
|
-
localStorage.setItem(
|
|
68
|
+
localStorage.setItem(Ne, t);
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function jt() {
|
|
73
73
|
var se, ie;
|
|
74
|
-
const t =
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
const h =
|
|
81
|
-
|
|
74
|
+
const t = we(), n = fe(), i = V(), o = He(), { prefs: a } = o, { ready: s } = Ye(), c = a.dock;
|
|
75
|
+
S(() => {
|
|
76
|
+
s && pt(c.state);
|
|
77
|
+
}, [s, c.state]);
|
|
78
|
+
const r = s ? c.state : mt(), m = t.wide ? r : t.sheet ? "sheet" : "hidden", p = m === "open" || m === "sheet", f = ht(a, p, c.tab);
|
|
79
|
+
S(() => (D.setMounted(!0), () => D.setMounted(!1)), []);
|
|
80
|
+
const h = T(() => new Set(a.pins.map((l) => l.key)), [a.pins]), g = T(() => [...new Set(a.pins.map((l) => l.collection))], [a.pins]), b = y(p);
|
|
81
|
+
b.current = p;
|
|
82
82
|
const _ = y(/* @__PURE__ */ new Map()), z = y(a.settings.desktop);
|
|
83
83
|
z.current = a.settings.desktop;
|
|
84
|
-
const
|
|
85
|
-
!
|
|
86
|
-
var
|
|
87
|
-
const w =
|
|
88
|
-
if (w.length === 0 || !
|
|
89
|
-
for (const
|
|
90
|
-
const
|
|
91
|
-
for (const [,
|
|
92
|
-
for (const
|
|
93
|
-
|
|
94
|
-
|
|
84
|
+
const F = (l) => {
|
|
85
|
+
!i || !z.current || l.length === 0 || Ue() !== "granted" || !je() || i.request(K("/watch-list", { summary: "1" })).then((x) => {
|
|
86
|
+
var L;
|
|
87
|
+
const w = ze(l, x.data.others ?? {}, _.current, Date.now());
|
|
88
|
+
if (w.length === 0 || !Fe(w)) return;
|
|
89
|
+
for (const N of w) _.current.set(N, ((L = x.data.others) == null ? void 0 : L[N]) ?? "");
|
|
90
|
+
const C = {};
|
|
91
|
+
for (const [, N] of n.getQueriesData({ queryKey: ["watch-list", "rows"] }))
|
|
92
|
+
for (const Z of (N == null ? void 0 : N.rows) ?? []) Z.title && (C[Z.key] = Z.title);
|
|
93
|
+
Qe(Be(w, C), () => {
|
|
94
|
+
D.openSheet(), o.setDock({ state: "open", tab: "watching" });
|
|
95
95
|
});
|
|
96
96
|
}).catch(() => {
|
|
97
97
|
});
|
|
98
|
-
},
|
|
99
|
-
|
|
98
|
+
}, Q = y(F);
|
|
99
|
+
Q.current = F, ee(
|
|
100
100
|
g,
|
|
101
|
-
(
|
|
101
|
+
(l) => {
|
|
102
102
|
const x = /* @__PURE__ */ new Set();
|
|
103
|
-
for (const w of
|
|
103
|
+
for (const w of l.events) {
|
|
104
104
|
if (w.item === "*") {
|
|
105
|
-
for (const
|
|
105
|
+
for (const N of a.pins) N.collection === w.collection && x.add(N.key);
|
|
106
106
|
continue;
|
|
107
107
|
}
|
|
108
|
-
const
|
|
109
|
-
if (!h.has(
|
|
110
|
-
const
|
|
111
|
-
if (
|
|
112
|
-
|
|
108
|
+
const C = `${w.collection}:${w.item}`;
|
|
109
|
+
if (!h.has(C)) continue;
|
|
110
|
+
const L = w.changed_fields;
|
|
111
|
+
if (L && L.length > 0 && L.every((N) => ut.has(N))) {
|
|
112
|
+
b.current && x.add(`~${C}`);
|
|
113
113
|
continue;
|
|
114
114
|
}
|
|
115
|
-
x.add(
|
|
115
|
+
x.add(C);
|
|
116
116
|
}
|
|
117
|
-
x.size !== 0 && (
|
|
117
|
+
x.size !== 0 && (Q.current([...x].filter((w) => !w.startsWith("~"))), b.current ? (n.invalidateQueries({ queryKey: ["watch-list", "rows"] }), n.invalidateQueries({ queryKey: $.waiting })) : D.markLocal([...x].filter((w) => !w.startsWith("~"))));
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
debounceMs: 1e3,
|
|
121
|
-
match: (
|
|
121
|
+
match: (l) => l.item === "*" || h.has(`${l.collection}:${l.item}`)
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
|
-
const
|
|
125
|
-
() => [...new Set((
|
|
126
|
-
[
|
|
127
|
-
),
|
|
128
|
-
() => new Set((
|
|
129
|
-
[
|
|
124
|
+
const W = T(
|
|
125
|
+
() => [...new Set((f.waiting.data ?? []).map((l) => l.collection))],
|
|
126
|
+
[f.waiting.data]
|
|
127
|
+
), B = T(
|
|
128
|
+
() => new Set((f.waiting.data ?? []).map((l) => l.key)),
|
|
129
|
+
[f.waiting.data]
|
|
130
130
|
);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
() => void n.invalidateQueries({ queryKey:
|
|
131
|
+
ee(
|
|
132
|
+
p ? W : null,
|
|
133
|
+
() => void n.invalidateQueries({ queryKey: $.waiting }),
|
|
134
134
|
{
|
|
135
135
|
debounceMs: 1500,
|
|
136
|
-
match: (
|
|
136
|
+
match: (l) => B.has(`${l.collection}:${l.item}`)
|
|
137
137
|
}
|
|
138
138
|
);
|
|
139
|
-
const
|
|
140
|
-
() => new Set(a.teams.flatMap((
|
|
139
|
+
const G = T(
|
|
140
|
+
() => new Set(a.teams.flatMap((l) => l.pins.map((x) => x.key))),
|
|
141
141
|
[a.teams]
|
|
142
|
-
),
|
|
143
|
-
() => [...new Set(a.teams.flatMap((
|
|
142
|
+
), J = T(
|
|
143
|
+
() => [...new Set(a.teams.flatMap((l) => l.pins.map((x) => x.collection)))],
|
|
144
144
|
[a.teams]
|
|
145
145
|
);
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
ee(
|
|
147
|
+
p ? J : null,
|
|
148
148
|
() => void n.invalidateQueries({ queryKey: ["watch-list", "team"] }),
|
|
149
149
|
{
|
|
150
150
|
debounceMs: 1e3,
|
|
151
|
-
match: (
|
|
151
|
+
match: (l) => l.item === "*" || G.has(`${l.collection}:${l.item}`)
|
|
152
152
|
}
|
|
153
153
|
), le(
|
|
154
154
|
["notification:new", "read:changed"],
|
|
155
|
-
() => void n.invalidateQueries({ queryKey:
|
|
155
|
+
() => void n.invalidateQueries({ queryKey: $.mentions }),
|
|
156
156
|
{ debounceMs: 1500, includeOwn: !0 }
|
|
157
157
|
), le(
|
|
158
158
|
"prefs:changed",
|
|
159
|
-
(
|
|
160
|
-
const x = Array.isArray(
|
|
161
|
-
(!x || x.includes("watch_list")) && n.invalidateQueries({ queryKey:
|
|
159
|
+
(l) => {
|
|
160
|
+
const x = Array.isArray(l == null ? void 0 : l.keys) ? l.keys : null;
|
|
161
|
+
(!x || x.includes("watch_list")) && n.invalidateQueries({ queryKey: $.prefs });
|
|
162
162
|
},
|
|
163
163
|
{ includeOwn: !0, debounceMs: 300 }
|
|
164
164
|
);
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
if (
|
|
168
|
-
for (const
|
|
169
|
-
}, [
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
const w = [...
|
|
174
|
-
|
|
165
|
+
const q = y(/* @__PURE__ */ new Set());
|
|
166
|
+
S(() => {
|
|
167
|
+
if (p)
|
|
168
|
+
for (const l of a.pins) l.done_at && q.current.add(l.key);
|
|
169
|
+
}, [p, a.pins]);
|
|
170
|
+
const E = y(p), O = y(o.markSeen);
|
|
171
|
+
O.current = o.markSeen, S(() => {
|
|
172
|
+
const l = () => {
|
|
173
|
+
const w = [...q.current].filter((C) => a.pins.some((L) => L.key === C));
|
|
174
|
+
q.current.clear(), w.length > 0 && O.current(w);
|
|
175
175
|
};
|
|
176
|
-
|
|
177
|
-
const x = () => document.visibilityState === "hidden" &&
|
|
176
|
+
E.current && !p && l(), E.current = p;
|
|
177
|
+
const x = () => document.visibilityState === "hidden" && l();
|
|
178
178
|
return document.addEventListener("visibilitychange", x), () => document.removeEventListener("visibilitychange", x);
|
|
179
|
-
}, [
|
|
180
|
-
const
|
|
179
|
+
}, [p, a.pins]);
|
|
180
|
+
const H = T(
|
|
181
181
|
() => {
|
|
182
|
-
var
|
|
183
|
-
return
|
|
182
|
+
var l;
|
|
183
|
+
return ke(((l = f.rows.data) == null ? void 0 : l.rows) ?? [], t.seenLocal);
|
|
184
184
|
},
|
|
185
|
-
[
|
|
186
|
-
),
|
|
185
|
+
[f.rows.data, t.seenLocal]
|
|
186
|
+
), d = p ? f.rows.data ? H.filter((l) => {
|
|
187
187
|
var x;
|
|
188
|
-
return (x =
|
|
189
|
-
}).map((
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
}, [
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}, [
|
|
197
|
-
const
|
|
198
|
-
return
|
|
199
|
-
const
|
|
200
|
-
if (!x.shiftKey || x.metaKey || x.ctrlKey || x.altKey || x.key.toLowerCase() !== "w" ||
|
|
188
|
+
return (x = l.change) == null ? void 0 : x.changed;
|
|
189
|
+
}).map((l) => l.key) : void 0 : (se = f.summary.data) == null ? void 0 : se.changed.filter((l) => !t.seenLocal.has(l));
|
|
190
|
+
S(() => {
|
|
191
|
+
p && f.rows.isSuccess && !f.rows.isFetching && D.clearLocal();
|
|
192
|
+
}, [p, f.rows.isSuccess, f.rows.isFetching]);
|
|
193
|
+
const k = Ve(d, p ? /* @__PURE__ */ new Set() : t.localChanged, h), v = ((ie = f.mentions.data) == null ? void 0 : ie.unread) ?? 0;
|
|
194
|
+
S(() => {
|
|
195
|
+
D.publish({ changed: k.length, unreadMentions: v });
|
|
196
|
+
}, [k.length, v]);
|
|
197
|
+
const M = y({ mode: m, setDock: o.setDock });
|
|
198
|
+
return M.current = { mode: m, setDock: o.setDock }, S(() => {
|
|
199
|
+
const l = (x) => {
|
|
200
|
+
if (!x.shiftKey || x.metaKey || x.ctrlKey || x.altKey || x.key.toLowerCase() !== "w" || Xe(x.target)) return;
|
|
201
201
|
x.preventDefault();
|
|
202
|
-
const { mode: w, setDock:
|
|
203
|
-
w === "sheet" ?
|
|
202
|
+
const { mode: w, setDock: C } = M.current;
|
|
203
|
+
w === "sheet" ? D.closeSheet() : w === "hidden" ? D.openSheet() : C({ state: w === "open" ? "closed" : "open" });
|
|
204
204
|
};
|
|
205
|
-
return window.addEventListener("keydown",
|
|
206
|
-
}, []),
|
|
207
|
-
|
|
205
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
206
|
+
}, []), i ? m === "sheet" || m === "hidden" ? /* @__PURE__ */ e(tt, { open: m === "sheet", onOpenChange: (l) => !l && D.closeSheet(), children: /* @__PURE__ */ u(
|
|
207
|
+
nt,
|
|
208
208
|
{
|
|
209
209
|
side: "right",
|
|
210
|
-
className: "flex w-full flex-col gap-0 p-0 sm:max-w-[400px]",
|
|
210
|
+
className: "flex w-full flex-col gap-0 p-0 sm:max-w-[400px] [&>button:last-of-type]:right-2 [&>button:last-of-type]:top-2 [&>button:last-of-type]:flex [&>button:last-of-type]:h-7 [&>button:last-of-type]:w-7 [&>button:last-of-type]:items-center [&>button:last-of-type]:justify-center [&>button:last-of-type]:rounded-md [&>button:last-of-type]:text-slate-500 [&>button:last-of-type]:bg-transparent [&>button:last-of-type]:opacity-100 [&>button:last-of-type]:hover:bg-slate-100 dark:[&>button:last-of-type]:text-slate-400 dark:[&>button:last-of-type]:hover:bg-white/[0.06]",
|
|
211
211
|
"data-watch-dock": "sheet",
|
|
212
|
+
onOpenAutoFocus: (l) => {
|
|
213
|
+
var w;
|
|
214
|
+
l.preventDefault();
|
|
215
|
+
const x = (w = l.currentTarget) == null ? void 0 : w.querySelector(
|
|
216
|
+
"[data-watch-title]"
|
|
217
|
+
);
|
|
218
|
+
x == null || x.focus({ preventScroll: !0 });
|
|
219
|
+
},
|
|
212
220
|
children: [
|
|
213
|
-
/* @__PURE__ */ e(
|
|
214
|
-
/* @__PURE__ */ e(
|
|
221
|
+
/* @__PURE__ */ e(at, { className: "sr-only", children: "Watch list" }),
|
|
222
|
+
/* @__PURE__ */ e(rt, { className: "sr-only", children: "Records you pinned, records waiting on others, and mentions of you." }),
|
|
215
223
|
/* @__PURE__ */ e(
|
|
216
224
|
pe,
|
|
217
225
|
{
|
|
218
|
-
actions:
|
|
219
|
-
data:
|
|
220
|
-
changed:
|
|
221
|
-
unreadMentions:
|
|
226
|
+
actions: o,
|
|
227
|
+
data: f,
|
|
228
|
+
changed: k,
|
|
229
|
+
unreadMentions: v,
|
|
222
230
|
inSheet: !0
|
|
223
231
|
}
|
|
224
232
|
)
|
|
225
233
|
]
|
|
226
234
|
}
|
|
227
|
-
) }) :
|
|
228
|
-
|
|
235
|
+
) }) : m === "closed" ? null : m === "minimized" ? /* @__PURE__ */ e(
|
|
236
|
+
ft,
|
|
229
237
|
{
|
|
230
238
|
count: a.pins.length,
|
|
231
|
-
changed:
|
|
232
|
-
mentions:
|
|
233
|
-
onOpen: () =>
|
|
239
|
+
changed: k.length,
|
|
240
|
+
mentions: v,
|
|
241
|
+
onOpen: () => o.setDock({ state: "open" })
|
|
234
242
|
}
|
|
235
|
-
) : /* @__PURE__ */ e(
|
|
243
|
+
) : /* @__PURE__ */ e(bt, { width: c.width, onWidth: (l) => o.setDock({ width: l }), children: /* @__PURE__ */ e(pe, { actions: o, data: f, changed: k, unreadMentions: v }) }) : null;
|
|
236
244
|
}
|
|
237
|
-
function
|
|
245
|
+
function ft({
|
|
238
246
|
count: t,
|
|
239
247
|
changed: n,
|
|
240
|
-
mentions:
|
|
241
|
-
onOpen:
|
|
248
|
+
mentions: i,
|
|
249
|
+
onOpen: o
|
|
242
250
|
}) {
|
|
243
251
|
const a = [
|
|
244
252
|
`${t} pinned`,
|
|
245
253
|
n > 0 ? `${n} changed` : "",
|
|
246
|
-
|
|
254
|
+
i > 0 ? `${i} new mention${i === 1 ? "" : "s"}` : ""
|
|
247
255
|
].filter(Boolean).join(", ");
|
|
248
256
|
return /* @__PURE__ */ e(
|
|
249
257
|
"aside",
|
|
@@ -255,12 +263,12 @@ function ht({
|
|
|
255
263
|
"button",
|
|
256
264
|
{
|
|
257
265
|
type: "button",
|
|
258
|
-
onClick:
|
|
266
|
+
onClick: o,
|
|
259
267
|
"aria-label": `Show watch list: ${a}`,
|
|
260
268
|
"data-tip": `Watch list · ${a}`,
|
|
261
269
|
className: "group flex flex-1 flex-col items-center gap-2 pt-3 text-slate-500 transition-colors hover:bg-slate-50 hover:text-slate-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/60 dark:text-slate-400 dark:hover:bg-white/[0.03] dark:hover:text-slate-100",
|
|
262
270
|
children: [
|
|
263
|
-
/* @__PURE__ */ e(
|
|
271
|
+
/* @__PURE__ */ e(Te, { className: "h-4 w-4" }),
|
|
264
272
|
/* @__PURE__ */ u(
|
|
265
273
|
"span",
|
|
266
274
|
{
|
|
@@ -288,14 +296,14 @@ function ht({
|
|
|
288
296
|
]
|
|
289
297
|
}
|
|
290
298
|
),
|
|
291
|
-
|
|
299
|
+
i > 0 && /* @__PURE__ */ u(
|
|
292
300
|
"span",
|
|
293
301
|
{
|
|
294
302
|
className: "flex items-center gap-0.5 text-[10.5px] font-semibold tabular-nums text-slate-600 dark:text-slate-300",
|
|
295
|
-
"data-tip": `${
|
|
303
|
+
"data-tip": `${i} new mention${i === 1 ? "" : "s"}`,
|
|
296
304
|
children: [
|
|
297
305
|
/* @__PURE__ */ e(ge, { "aria-hidden": !0, className: "h-3 w-3" }),
|
|
298
|
-
|
|
306
|
+
i
|
|
299
307
|
]
|
|
300
308
|
}
|
|
301
309
|
),
|
|
@@ -313,23 +321,23 @@ function ht({
|
|
|
313
321
|
}
|
|
314
322
|
);
|
|
315
323
|
}
|
|
316
|
-
function
|
|
324
|
+
function bt({
|
|
317
325
|
width: t,
|
|
318
326
|
onWidth: n,
|
|
319
|
-
children:
|
|
327
|
+
children: i
|
|
320
328
|
}) {
|
|
321
|
-
const [
|
|
322
|
-
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
},
|
|
326
|
-
|
|
329
|
+
const [o, a] = R(null), s = y(null), c = o ?? t, r = (g) => Math.round(Math.min(de, Math.max(ue, g))), m = (g) => {
|
|
330
|
+
s.current = { x: g.clientX, w: c }, g.currentTarget.setPointerCapture(g.pointerId);
|
|
331
|
+
}, p = (g) => {
|
|
332
|
+
s.current && a(r(s.current.w + (s.current.x - g.clientX)));
|
|
333
|
+
}, f = () => {
|
|
334
|
+
s.current && (s.current = null, o != null && o !== t && n(o), a(null));
|
|
327
335
|
};
|
|
328
336
|
return /* @__PURE__ */ u(
|
|
329
337
|
"aside",
|
|
330
338
|
{
|
|
331
339
|
className: "relative flex shrink-0 flex-col border-l border-border bg-card",
|
|
332
|
-
style: { width:
|
|
340
|
+
style: { width: c },
|
|
333
341
|
"data-watch-dock": "open",
|
|
334
342
|
"aria-label": "Watch list",
|
|
335
343
|
children: [
|
|
@@ -339,21 +347,21 @@ function ut({
|
|
|
339
347
|
role: "separator",
|
|
340
348
|
"aria-orientation": "vertical",
|
|
341
349
|
"aria-label": "Resize watch list",
|
|
342
|
-
"aria-valuemin":
|
|
350
|
+
"aria-valuemin": ue,
|
|
343
351
|
"aria-valuemax": de,
|
|
344
|
-
"aria-valuenow":
|
|
352
|
+
"aria-valuenow": c,
|
|
345
353
|
tabIndex: 0,
|
|
346
|
-
onPointerDown:
|
|
347
|
-
onPointerMove:
|
|
348
|
-
onPointerUp:
|
|
349
|
-
onPointerCancel:
|
|
354
|
+
onPointerDown: m,
|
|
355
|
+
onPointerMove: p,
|
|
356
|
+
onPointerUp: f,
|
|
357
|
+
onPointerCancel: f,
|
|
350
358
|
onKeyDown: (g) => {
|
|
351
|
-
g.key !== "ArrowLeft" && g.key !== "ArrowRight" || (g.preventDefault(), n(
|
|
359
|
+
g.key !== "ArrowLeft" && g.key !== "ArrowRight" || (g.preventDefault(), n(r(t + (g.key === "ArrowLeft" ? 16 : -16))));
|
|
352
360
|
},
|
|
353
361
|
className: "absolute inset-y-0 -left-1 z-10 w-2 cursor-col-resize touch-none outline-none after:absolute after:inset-y-0 after:left-[3px] after:w-px after:bg-transparent after:transition-colors hover:after:bg-nvr-cyan/50 focus-visible:after:bg-nvr-cyan"
|
|
354
362
|
}
|
|
355
363
|
),
|
|
356
|
-
|
|
364
|
+
i
|
|
357
365
|
]
|
|
358
366
|
}
|
|
359
367
|
);
|
|
@@ -361,71 +369,71 @@ function ut({
|
|
|
361
369
|
function Y({
|
|
362
370
|
label: t,
|
|
363
371
|
onClick: n,
|
|
364
|
-
children:
|
|
365
|
-
pressed:
|
|
372
|
+
children: i,
|
|
373
|
+
pressed: o
|
|
366
374
|
}) {
|
|
367
375
|
return /* @__PURE__ */ e(
|
|
368
376
|
"button",
|
|
369
377
|
{
|
|
370
378
|
type: "button",
|
|
371
379
|
"aria-label": t,
|
|
372
|
-
"aria-pressed":
|
|
380
|
+
"aria-pressed": o,
|
|
373
381
|
"data-tip": t,
|
|
374
382
|
onClick: n,
|
|
375
383
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:text-slate-500 dark:hover:bg-white/[0.06] dark:hover:text-slate-200",
|
|
376
|
-
children:
|
|
384
|
+
children: i
|
|
377
385
|
}
|
|
378
386
|
);
|
|
379
387
|
}
|
|
380
|
-
function
|
|
381
|
-
const [
|
|
382
|
-
return
|
|
383
|
-
if (!
|
|
384
|
-
const
|
|
385
|
-
var
|
|
386
|
-
(
|
|
387
|
-
},
|
|
388
|
-
return document.addEventListener("pointerdown",
|
|
389
|
-
document.removeEventListener("pointerdown",
|
|
388
|
+
function gt({ sort: t, onSort: n }) {
|
|
389
|
+
const [i, o] = R(!1), a = y(null);
|
|
390
|
+
return S(() => {
|
|
391
|
+
if (!i) return;
|
|
392
|
+
const s = (r) => {
|
|
393
|
+
var m;
|
|
394
|
+
(m = a.current) != null && m.contains(r.target) || o(!1);
|
|
395
|
+
}, c = (r) => r.key === "Escape" && o(!1);
|
|
396
|
+
return document.addEventListener("pointerdown", s), document.addEventListener("keydown", c), () => {
|
|
397
|
+
document.removeEventListener("pointerdown", s), document.removeEventListener("keydown", c);
|
|
390
398
|
};
|
|
391
|
-
}, [
|
|
399
|
+
}, [i]), /* @__PURE__ */ u("div", { ref: a, className: "relative", children: [
|
|
392
400
|
/* @__PURE__ */ u(
|
|
393
401
|
"button",
|
|
394
402
|
{
|
|
395
403
|
type: "button",
|
|
396
404
|
"aria-haspopup": "menu",
|
|
397
|
-
"aria-expanded":
|
|
398
|
-
"aria-label": `Sort: ${
|
|
399
|
-
"data-tip": `Sort: ${
|
|
400
|
-
onClick: () =>
|
|
405
|
+
"aria-expanded": i,
|
|
406
|
+
"aria-label": `Sort: ${P[t]}`,
|
|
407
|
+
"data-tip": `Sort: ${P[t]}`,
|
|
408
|
+
onClick: () => o((s) => !s),
|
|
401
409
|
className: "flex h-7 items-center gap-1 rounded-md px-1.5 text-[11px] font-medium text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:text-slate-400 dark:hover:bg-white/[0.06] dark:hover:text-slate-200",
|
|
402
410
|
children: [
|
|
403
|
-
/* @__PURE__ */ e(
|
|
404
|
-
/* @__PURE__ */ e("span", { className: "hidden min-[340px]:inline", children:
|
|
411
|
+
/* @__PURE__ */ e(Le, { className: "h-3.5 w-3.5" }),
|
|
412
|
+
/* @__PURE__ */ e("span", { className: "hidden min-[340px]:inline", children: P[t] })
|
|
405
413
|
]
|
|
406
414
|
}
|
|
407
415
|
),
|
|
408
|
-
|
|
416
|
+
i && /* @__PURE__ */ e(
|
|
409
417
|
"div",
|
|
410
418
|
{
|
|
411
419
|
role: "menu",
|
|
412
420
|
className: "absolute right-0 top-8 z-20 w-40 rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",
|
|
413
|
-
children: Object.keys(
|
|
421
|
+
children: Object.keys(P).map((s) => /* @__PURE__ */ u(
|
|
414
422
|
"button",
|
|
415
423
|
{
|
|
416
424
|
type: "button",
|
|
417
425
|
role: "menuitemradio",
|
|
418
|
-
"aria-checked":
|
|
426
|
+
"aria-checked": s === t,
|
|
419
427
|
onClick: () => {
|
|
420
|
-
n(
|
|
428
|
+
n(s), o(!1);
|
|
421
429
|
},
|
|
422
430
|
className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-muted dark:text-slate-200",
|
|
423
431
|
children: [
|
|
424
|
-
/* @__PURE__ */ e(
|
|
425
|
-
|
|
432
|
+
/* @__PURE__ */ e(Me, { className: `h-3 w-3 ${s === t ? "opacity-100" : "opacity-0"}` }),
|
|
433
|
+
P[s]
|
|
426
434
|
]
|
|
427
435
|
},
|
|
428
|
-
|
|
436
|
+
s
|
|
429
437
|
))
|
|
430
438
|
}
|
|
431
439
|
)
|
|
@@ -434,61 +442,82 @@ function mt({ sort: t, onSort: n }) {
|
|
|
434
442
|
function pe({
|
|
435
443
|
actions: t,
|
|
436
444
|
data: n,
|
|
437
|
-
changed:
|
|
438
|
-
unreadMentions:
|
|
445
|
+
changed: i,
|
|
446
|
+
unreadMentions: o,
|
|
439
447
|
inSheet: a = !1
|
|
440
448
|
}) {
|
|
441
|
-
var
|
|
442
|
-
const { prefs:
|
|
443
|
-
{ key: "watching", label: "Watching", count:
|
|
444
|
-
...
|
|
449
|
+
var q, E, O, H;
|
|
450
|
+
const { prefs: s } = t, c = s.dock.tab.startsWith("team:") ? s.teams.find((d) => `team:${d.id}` === s.dock.tab) ?? null : null, r = s.dock.tab.startsWith("team:") && !c ? "watching" : s.dock.tab, m = s.dock.sort, p = (q = n.waiting.data) == null ? void 0 : q.length, [f, h] = R(null), g = [
|
|
451
|
+
{ key: "watching", label: "Watching", count: s.pins.length, dot: i.length > 0 },
|
|
452
|
+
...s.teams.map((d) => ({
|
|
445
453
|
key: `team:${d.id}`,
|
|
446
454
|
label: d.name,
|
|
447
|
-
count: d.pins.length
|
|
455
|
+
count: d.pins.length,
|
|
448
456
|
dot: !1,
|
|
449
457
|
team: !0
|
|
450
458
|
})),
|
|
451
|
-
{ key: "waiting", label: "Waiting", count:
|
|
452
|
-
{
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
459
|
+
{ key: "waiting", label: "Waiting", count: p ?? null, dot: !1 },
|
|
460
|
+
{
|
|
461
|
+
key: "mentions",
|
|
462
|
+
label: "Mentions",
|
|
463
|
+
// Unread mentions; a count once known, 0 included, like every other tab (rt6 review).
|
|
464
|
+
count: n.mentions.data ? o : null,
|
|
465
|
+
dot: o > 0
|
|
466
|
+
}
|
|
467
|
+
], b = y(null), [_, z] = R(!1), [F, Q] = R(!1), W = () => {
|
|
468
|
+
const d = b.current;
|
|
469
|
+
d && (z(d.scrollWidth - d.scrollLeft - d.clientWidth > 2), Q(d.scrollLeft > 2));
|
|
470
|
+
}, B = (d) => {
|
|
471
|
+
var k;
|
|
472
|
+
return (k = b.current) == null ? void 0 : k.scrollBy({ left: d * 140, behavior: "smooth" });
|
|
473
|
+
}, G = `${g.map((d) => `${d.key}:${d.count ?? ""}`).join("|")}${f === "new" ? "|new" : ""}`;
|
|
474
|
+
S(() => {
|
|
475
|
+
W();
|
|
476
|
+
const d = b.current;
|
|
460
477
|
if (!d || typeof ResizeObserver > "u") return;
|
|
461
|
-
const k = new ResizeObserver(
|
|
478
|
+
const k = new ResizeObserver(W);
|
|
462
479
|
return k.observe(d), () => k.disconnect();
|
|
463
|
-
}, [
|
|
464
|
-
var
|
|
465
|
-
const d = (
|
|
480
|
+
}, [G]), S(() => {
|
|
481
|
+
var v;
|
|
482
|
+
const d = (v = b.current) == null ? void 0 : v.querySelector(
|
|
483
|
+
f === "new" ? "[data-tab-new]" : `[data-tab="${CSS.escape(r)}"]`
|
|
484
|
+
);
|
|
466
485
|
d && typeof d.scrollIntoView == "function" && d.scrollIntoView({ block: "nearest", inline: "nearest" });
|
|
467
|
-
|
|
468
|
-
|
|
486
|
+
const k = b.current;
|
|
487
|
+
f === "new" && k && (k.scrollLeft = k.scrollWidth), W();
|
|
488
|
+
}, [r, f]);
|
|
489
|
+
const J = (d) => {
|
|
469
490
|
if (d.key !== "ArrowRight" && d.key !== "ArrowLeft") return;
|
|
470
|
-
const k = g.findIndex((M) => M.key ===
|
|
471
|
-
t.setDock({ tab:
|
|
491
|
+
const k = g.findIndex((M) => M.key === r), v = g[(k + (d.key === "ArrowRight" ? 1 : g.length - 1)) % g.length];
|
|
492
|
+
t.setDock({ tab: v.key }), requestAnimationFrame(
|
|
472
493
|
() => {
|
|
473
494
|
var M;
|
|
474
|
-
return (M = d.currentTarget.querySelector(`[data-tab="${
|
|
495
|
+
return (M = d.currentTarget.querySelector(`[data-tab="${v.key}"]`)) == null ? void 0 : M.focus();
|
|
475
496
|
}
|
|
476
497
|
);
|
|
477
498
|
};
|
|
478
499
|
return /* @__PURE__ */ u("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
479
500
|
/* @__PURE__ */ u("div", { className: `flex h-11 shrink-0 items-center gap-1 pl-4 ${a ? "pr-11" : "pr-2"}`, children: [
|
|
480
|
-
/* @__PURE__ */ e(
|
|
481
|
-
|
|
482
|
-
|
|
501
|
+
/* @__PURE__ */ e(
|
|
502
|
+
"h2",
|
|
503
|
+
{
|
|
504
|
+
tabIndex: -1,
|
|
505
|
+
"data-watch-title": !0,
|
|
506
|
+
className: "flex-1 truncate text-[13px] font-semibold text-slate-800 outline-none dark:text-slate-100",
|
|
507
|
+
children: "Watch list"
|
|
508
|
+
}
|
|
509
|
+
),
|
|
510
|
+
r === "watching" && s.pins.length > 1 && /* @__PURE__ */ e(gt, { sort: m, onSort: (d) => t.setDock({ sort: d }) }),
|
|
511
|
+
r === "watching" && s.pins.length > 0 && /* @__PURE__ */ e(
|
|
483
512
|
"span",
|
|
484
513
|
{
|
|
485
|
-
className:
|
|
486
|
-
"aria-hidden":
|
|
487
|
-
children: /* @__PURE__ */ e(Y, { label: "Mark all as seen", onClick: () => t.markSeen(), children: /* @__PURE__ */ e(
|
|
514
|
+
className: i.length > 0 ? "contents" : "invisible",
|
|
515
|
+
"aria-hidden": i.length === 0 || void 0,
|
|
516
|
+
children: /* @__PURE__ */ e(Y, { label: "Mark all as seen", onClick: () => t.markSeen(), children: /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }) })
|
|
488
517
|
}
|
|
489
518
|
),
|
|
490
519
|
/* @__PURE__ */ e(
|
|
491
|
-
|
|
520
|
+
st,
|
|
492
521
|
{
|
|
493
522
|
actions: t,
|
|
494
523
|
onOpenTeam: (d) => {
|
|
@@ -497,126 +526,165 @@ function pe({
|
|
|
497
526
|
onNewTeam: () => h("new")
|
|
498
527
|
}
|
|
499
528
|
),
|
|
500
|
-
!a && /* @__PURE__ */ u(
|
|
501
|
-
/* @__PURE__ */ e(Y, { label: "Minimize", onClick: () => t.setDock({ state: "minimized" }), children: /* @__PURE__ */ e(
|
|
529
|
+
!a && /* @__PURE__ */ u(U, { children: [
|
|
530
|
+
/* @__PURE__ */ e(Y, { label: "Minimize", onClick: () => t.setDock({ state: "minimized" }), children: /* @__PURE__ */ e(Se, { className: "h-3.5 w-3.5" }) }),
|
|
502
531
|
/* @__PURE__ */ e(
|
|
503
532
|
Y,
|
|
504
533
|
{
|
|
505
534
|
label: "Close (the icon reopens it)",
|
|
506
535
|
onClick: () => t.setDock({ state: "closed" }),
|
|
507
|
-
children: /* @__PURE__ */ e(
|
|
536
|
+
children: /* @__PURE__ */ e(Ce, { className: "h-3.5 w-3.5" })
|
|
508
537
|
}
|
|
509
538
|
)
|
|
510
539
|
] })
|
|
511
540
|
] }),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
541
|
+
/* @__PURE__ */ u("div", { className: "relative shrink-0 border-b border-border", children: [
|
|
542
|
+
/* @__PURE__ */ u(
|
|
543
|
+
"div",
|
|
544
|
+
{
|
|
545
|
+
role: "tablist",
|
|
546
|
+
"aria-label": "Watch list views",
|
|
547
|
+
onKeyDown: J,
|
|
548
|
+
ref: b,
|
|
549
|
+
onScroll: W,
|
|
550
|
+
className: `-mb-px flex scroll-px-10 overflow-x-auto px-4 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden ${s.teams.length > 0 || f === "new" ? "gap-3" : "gap-4"}`,
|
|
551
|
+
children: [
|
|
552
|
+
g.map((d) => {
|
|
553
|
+
const k = d.key === r && f !== "new";
|
|
554
|
+
return /* @__PURE__ */ u(
|
|
555
|
+
"button",
|
|
556
|
+
{
|
|
557
|
+
type: "button",
|
|
558
|
+
role: "tab",
|
|
559
|
+
"data-tab": d.key,
|
|
560
|
+
"aria-selected": k,
|
|
561
|
+
tabIndex: k ? 0 : -1,
|
|
562
|
+
onClick: () => {
|
|
563
|
+
h(null), t.setDock({ tab: d.key });
|
|
564
|
+
},
|
|
565
|
+
"data-tip": d.team ? `Shared list · ${d.label}` : void 0,
|
|
566
|
+
className: `relative flex shrink-0 items-center gap-1.5 border-b-2 pb-2 pt-0.5 text-[12px] font-medium transition-colors rounded-t-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 ${k ? "border-nvr-cyan text-slate-900 dark:text-slate-50" : "border-transparent text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-200"}`,
|
|
567
|
+
children: [
|
|
568
|
+
d.team && /* @__PURE__ */ e(te, { "aria-hidden": !0, className: "h-3 w-3 shrink-0 opacity-70" }),
|
|
569
|
+
/* @__PURE__ */ e("span", { className: d.team ? "max-w-[96px] truncate" : void 0, children: d.label }),
|
|
570
|
+
d.count != null && /* @__PURE__ */ e(
|
|
571
|
+
"span",
|
|
572
|
+
{
|
|
573
|
+
className: `rounded-full px-1.5 text-[10.5px] font-semibold tabular-nums ${d.dot ? "bg-sky-100 text-sky-800 dark:bg-nvr-cyan/15 dark:text-nvr-cyan" : d.count === 0 ? "bg-slate-100/70 text-slate-400 dark:bg-white/[0.04] dark:text-slate-500" : "bg-slate-100 text-slate-500 dark:bg-white/[0.07] dark:text-slate-400"}`,
|
|
574
|
+
children: d.count
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
d.dot && d.key === "watching" && /* @__PURE__ */ u("span", { className: "sr-only", children: [
|
|
578
|
+
", ",
|
|
579
|
+
i.length,
|
|
580
|
+
" changed"
|
|
581
|
+
] })
|
|
582
|
+
]
|
|
583
|
+
},
|
|
584
|
+
d.key
|
|
585
|
+
);
|
|
586
|
+
}),
|
|
587
|
+
f === "new" && /* @__PURE__ */ u(
|
|
588
|
+
"span",
|
|
589
|
+
{
|
|
590
|
+
"aria-current": "page",
|
|
591
|
+
className: "relative flex shrink-0 items-center gap-1.5 border-b-2 border-nvr-cyan pb-2 pt-0.5 text-[12px] font-medium text-slate-900 dark:text-slate-50",
|
|
592
|
+
"data-tab-new": !0,
|
|
593
|
+
children: [
|
|
594
|
+
/* @__PURE__ */ e($e, { "aria-hidden": !0, className: "h-3 w-3 shrink-0 opacity-70" }),
|
|
595
|
+
"New list"
|
|
596
|
+
]
|
|
597
|
+
}
|
|
598
|
+
)
|
|
599
|
+
]
|
|
600
|
+
}
|
|
601
|
+
),
|
|
602
|
+
F && /* @__PURE__ */ e(
|
|
603
|
+
"button",
|
|
604
|
+
{
|
|
605
|
+
type: "button",
|
|
606
|
+
tabIndex: -1,
|
|
607
|
+
"aria-hidden": !0,
|
|
608
|
+
onClick: () => B(-1),
|
|
609
|
+
className: "absolute inset-y-0 left-0 flex w-8 items-start justify-start bg-[linear-gradient(to_right,hsl(var(--card))_70%,transparent)] pl-1 pt-0.5 text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
|
|
610
|
+
children: /* @__PURE__ */ e(De, { className: "h-4 w-4" })
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
_ && /* @__PURE__ */ e(
|
|
614
|
+
"button",
|
|
615
|
+
{
|
|
616
|
+
type: "button",
|
|
617
|
+
tabIndex: -1,
|
|
618
|
+
"aria-hidden": !0,
|
|
619
|
+
onClick: () => B(1),
|
|
620
|
+
"data-tab-more": !0,
|
|
621
|
+
className: "absolute inset-y-0 right-0 flex w-9 items-start justify-end bg-[linear-gradient(to_left,hsl(var(--card))_70%,transparent)] pr-1 pt-0.5 text-slate-500 hover:text-slate-800 dark:text-slate-400 dark:hover:text-slate-100",
|
|
622
|
+
children: /* @__PURE__ */ e(be, { className: "h-4 w-4" })
|
|
623
|
+
}
|
|
624
|
+
)
|
|
625
|
+
] }),
|
|
558
626
|
/* @__PURE__ */ e(
|
|
559
627
|
"div",
|
|
560
628
|
{
|
|
561
629
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
562
630
|
role: "tabpanel",
|
|
563
|
-
"aria-label":
|
|
564
|
-
children:
|
|
565
|
-
|
|
631
|
+
"aria-label": c ? c.name : r,
|
|
632
|
+
children: f ? /* @__PURE__ */ e(
|
|
633
|
+
it,
|
|
566
634
|
{
|
|
567
635
|
actions: t,
|
|
568
|
-
team:
|
|
569
|
-
meId: ((
|
|
570
|
-
meName: ((
|
|
636
|
+
team: f === "new" ? null : f,
|
|
637
|
+
meId: ((E = s.me) == null ? void 0 : E.id) ?? null,
|
|
638
|
+
meName: ((O = s.me) == null ? void 0 : O.name) ?? "",
|
|
571
639
|
onClose: () => h(null),
|
|
572
640
|
onCreated: (d) => {
|
|
573
641
|
h(null), t.setDock({ tab: `team:${d}` });
|
|
574
642
|
}
|
|
575
643
|
},
|
|
576
|
-
|
|
577
|
-
) : /* @__PURE__ */ u(
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
644
|
+
f === "new" ? "new" : f.id
|
|
645
|
+
) : /* @__PURE__ */ u(U, { children: [
|
|
646
|
+
r === "watching" && /* @__PURE__ */ e(wt, { actions: t, data: n }),
|
|
647
|
+
c && /* @__PURE__ */ e(
|
|
648
|
+
vt,
|
|
581
649
|
{
|
|
582
650
|
actions: t,
|
|
583
|
-
team:
|
|
584
|
-
meId: ((
|
|
585
|
-
onEdit: () => h(
|
|
651
|
+
team: c,
|
|
652
|
+
meId: ((H = s.me) == null ? void 0 : H.id) ?? null,
|
|
653
|
+
onEdit: () => h(c)
|
|
586
654
|
}
|
|
587
655
|
),
|
|
588
|
-
|
|
589
|
-
|
|
656
|
+
r === "waiting" && /* @__PURE__ */ e(Nt, { data: n }),
|
|
657
|
+
r === "mentions" && /* @__PURE__ */ e(St, { data: n })
|
|
590
658
|
] })
|
|
591
659
|
}
|
|
592
660
|
)
|
|
593
661
|
] });
|
|
594
662
|
}
|
|
595
|
-
function
|
|
596
|
-
return /* @__PURE__ */ e("div", { className: "space-y-4 px-4 py-3", "aria-busy": !0, children: Array.from({ length: t }, (n,
|
|
663
|
+
function A({ n: t = 4 }) {
|
|
664
|
+
return /* @__PURE__ */ e("div", { className: "space-y-4 px-4 py-3", "aria-busy": !0, children: Array.from({ length: t }, (n, i) => (
|
|
597
665
|
// biome-ignore lint/suspicious/noArrayIndexKey: placeholders
|
|
598
666
|
/* @__PURE__ */ u("div", { className: "space-y-1.5", children: [
|
|
599
667
|
/* @__PURE__ */ e(me, { className: "h-3.5 w-3/4" }),
|
|
600
668
|
/* @__PURE__ */ e(me, { className: "h-3 w-1/2" })
|
|
601
|
-
] },
|
|
669
|
+
] }, i)
|
|
602
670
|
)) });
|
|
603
671
|
}
|
|
604
|
-
function
|
|
672
|
+
function j({
|
|
605
673
|
icon: t,
|
|
606
674
|
title: n,
|
|
607
|
-
children:
|
|
675
|
+
children: i
|
|
608
676
|
}) {
|
|
609
677
|
return /* @__PURE__ */ u("div", { className: "flex flex-col items-start gap-2 px-4 py-6", "data-watch-empty": !0, children: [
|
|
610
678
|
/* @__PURE__ */ e("span", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-slate-100 text-slate-500 dark:bg-white/[0.06] dark:text-slate-400", children: t }),
|
|
611
679
|
/* @__PURE__ */ e("p", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: n }),
|
|
612
|
-
|
|
680
|
+
i && /* @__PURE__ */ e("div", { className: "text-[12px] leading-relaxed text-slate-500 dark:text-slate-400", children: i })
|
|
613
681
|
] });
|
|
614
682
|
}
|
|
615
683
|
function X({ error: t, onRetry: n }) {
|
|
616
|
-
const
|
|
684
|
+
const i = Ie(t, "The list could not load");
|
|
617
685
|
return /* @__PURE__ */ u("div", { className: "px-4 py-5", children: [
|
|
618
|
-
/* @__PURE__ */ e("p", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children:
|
|
619
|
-
|
|
686
|
+
/* @__PURE__ */ e("p", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: i.title }),
|
|
687
|
+
i.hint && /* @__PURE__ */ e("p", { className: "mt-1 text-[12px] text-slate-500 dark:text-slate-400", children: i.hint }),
|
|
620
688
|
/* @__PURE__ */ e(
|
|
621
689
|
"button",
|
|
622
690
|
{
|
|
@@ -628,83 +696,88 @@ function X({ error: t, onRetry: n }) {
|
|
|
628
696
|
)
|
|
629
697
|
] });
|
|
630
698
|
}
|
|
631
|
-
function
|
|
699
|
+
function xt({ children: t }) {
|
|
632
700
|
return /* @__PURE__ */ e("kbd", { className: "rounded border border-slate-200 bg-slate-50 px-1 font-sans text-[10.5px] font-medium text-slate-600 dark:border-white/10 dark:bg-white/[0.06] dark:text-slate-300", children: t });
|
|
633
701
|
}
|
|
634
|
-
function
|
|
702
|
+
function wt({
|
|
635
703
|
actions: t,
|
|
636
704
|
data: n
|
|
637
705
|
}) {
|
|
638
|
-
const { prefs:
|
|
639
|
-
const
|
|
640
|
-
return
|
|
641
|
-
}, [
|
|
642
|
-
if (
|
|
643
|
-
|
|
644
|
-
|
|
706
|
+
const { prefs: i } = t, o = n.rows.data, { seenLocal: a } = we(), s = T(() => {
|
|
707
|
+
const r = new Map(ke((o == null ? void 0 : o.rows) ?? [], a).map((p) => [p.key, p])), m = i.pins.map((p) => r.get(p.key)).filter((p) => !!p);
|
|
708
|
+
return Ge(ye(m, i.pins), i.dock.sort);
|
|
709
|
+
}, [o, i.pins, i.dock.sort, a]);
|
|
710
|
+
if (!t.prefsReady) return /* @__PURE__ */ e(A, { n: 3 });
|
|
711
|
+
if (i.pins.length === 0)
|
|
712
|
+
return /* @__PURE__ */ u(U, { children: [
|
|
713
|
+
/* @__PURE__ */ e(j, { icon: /* @__PURE__ */ e(Re, { className: "h-4 w-4" }), title: "Nothing on your watch list yet", children: /* @__PURE__ */ u("p", { children: [
|
|
645
714
|
"Pin a record to follow it here, live, on every page: use the pin beside a record’s title, ",
|
|
646
715
|
/* @__PURE__ */ e("span", { className: "whitespace-nowrap", children: "a list row’s menu," }),
|
|
647
716
|
" or press",
|
|
648
717
|
" ",
|
|
649
|
-
/* @__PURE__ */ e(
|
|
718
|
+
/* @__PURE__ */ e(xt, { children: "W" }),
|
|
650
719
|
" on a record."
|
|
651
720
|
] }) }),
|
|
652
721
|
/* @__PURE__ */ e(
|
|
653
|
-
|
|
722
|
+
ne,
|
|
654
723
|
{
|
|
655
|
-
removed:
|
|
656
|
-
onUndo: (
|
|
724
|
+
removed: i.removed,
|
|
725
|
+
onUndo: (r) => void t.restoreRemoved(r.collection, r.id).catch(() => {
|
|
657
726
|
})
|
|
658
727
|
}
|
|
659
728
|
)
|
|
660
729
|
] });
|
|
661
|
-
if (n.rows.isError && !
|
|
730
|
+
if (n.rows.isError && !o)
|
|
662
731
|
return /* @__PURE__ */ e(X, { error: n.rows.error, onRetry: () => void n.rows.refetch() });
|
|
663
|
-
if (!
|
|
664
|
-
const
|
|
665
|
-
return /* @__PURE__ */ u(
|
|
732
|
+
if (!o) return /* @__PURE__ */ e(A, { n: Math.min(5, i.pins.length) });
|
|
733
|
+
const c = i.pins.length - s.length;
|
|
734
|
+
return /* @__PURE__ */ u(U, { children: [
|
|
666
735
|
/* @__PURE__ */ e(
|
|
667
|
-
|
|
736
|
+
ve,
|
|
668
737
|
{
|
|
669
|
-
rows:
|
|
670
|
-
sortable:
|
|
738
|
+
rows: s,
|
|
739
|
+
sortable: i.dock.sort === "mine" && s.length > 1,
|
|
671
740
|
onReorder: t.reorder,
|
|
672
|
-
onUnpin: (
|
|
741
|
+
onUnpin: (r) => void t.unpin(r.collection, r.id).catch(() => {
|
|
673
742
|
}),
|
|
674
|
-
onSeen: (
|
|
675
|
-
var
|
|
676
|
-
const
|
|
677
|
-
((
|
|
743
|
+
onSeen: (r) => {
|
|
744
|
+
var p;
|
|
745
|
+
const m = s.find((f) => f.key === r);
|
|
746
|
+
((p = m == null ? void 0 : m.change) != null && p.changed || m != null && m.completed_at) && t.markSeen([r]);
|
|
678
747
|
},
|
|
679
|
-
rowActions: (
|
|
748
|
+
rowActions: (r) => /* @__PURE__ */ e(ct, { row: r, actions: t }),
|
|
749
|
+
rowMark: (r) => i.pins.some((m) => m.key === r.key && m.auto) || i.alerts.some((m) => m.key === r.key) ? /* @__PURE__ */ u("span", { className: "flex items-center gap-1.5", children: [
|
|
750
|
+
/* @__PURE__ */ e(ot, { row: r, actions: t }),
|
|
751
|
+
/* @__PURE__ */ e("span", { className: "flex group-focus-within/row:hidden group-hover/row:hidden group-has-[[data-state=open]]/row:hidden", children: /* @__PURE__ */ e(lt, { row: r, actions: t }) })
|
|
752
|
+
] }) : null
|
|
680
753
|
}
|
|
681
754
|
),
|
|
682
|
-
|
|
755
|
+
c > 0 && /* @__PURE__ */ e(A, { n: Math.min(3, c) }),
|
|
683
756
|
/* @__PURE__ */ u("p", { className: "px-4 py-3 text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
684
|
-
|
|
757
|
+
i.pins.length,
|
|
685
758
|
" of ",
|
|
686
|
-
|
|
759
|
+
i.max,
|
|
687
760
|
" pinned"
|
|
688
761
|
] }),
|
|
689
762
|
/* @__PURE__ */ e(
|
|
690
|
-
|
|
763
|
+
ne,
|
|
691
764
|
{
|
|
692
|
-
removed:
|
|
693
|
-
onUndo: (
|
|
765
|
+
removed: i.removed,
|
|
766
|
+
onUndo: (r) => void t.restoreRemoved(r.collection, r.id).catch(() => {
|
|
694
767
|
})
|
|
695
768
|
}
|
|
696
769
|
)
|
|
697
770
|
] });
|
|
698
771
|
}
|
|
699
|
-
function
|
|
772
|
+
function kt({
|
|
700
773
|
actions: t,
|
|
701
774
|
team: n,
|
|
702
|
-
isOwner:
|
|
703
|
-
onEdit:
|
|
775
|
+
isOwner: i,
|
|
776
|
+
onEdit: o
|
|
704
777
|
}) {
|
|
705
|
-
const [a,
|
|
706
|
-
return !n.can_manage && !n.can_take_over && !
|
|
707
|
-
/* @__PURE__ */ e(
|
|
778
|
+
const [a, s] = R(!1), c = "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12.5px] text-slate-700 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:text-slate-200", r = n.can_manage || !!n.can_take_over, m = n.is_member && !i;
|
|
779
|
+
return !n.can_manage && !n.can_take_over && !r && !m ? null : /* @__PURE__ */ u(Je, { open: a, onOpenChange: s, children: [
|
|
780
|
+
/* @__PURE__ */ e(Ze, { asChild: !0, children: /* @__PURE__ */ e(
|
|
708
781
|
"button",
|
|
709
782
|
{
|
|
710
783
|
type: "button",
|
|
@@ -712,21 +785,21 @@ function gt({
|
|
|
712
785
|
"data-tip": "More",
|
|
713
786
|
"data-watch-team-menu": !0,
|
|
714
787
|
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-slate-500 transition-colors hover:bg-slate-100 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:text-slate-400 dark:hover:bg-white/[0.06] dark:hover:text-slate-200",
|
|
715
|
-
children: /* @__PURE__ */ e(
|
|
788
|
+
children: /* @__PURE__ */ e(Ke, { className: "h-4 w-4" })
|
|
716
789
|
}
|
|
717
790
|
) }),
|
|
718
|
-
/* @__PURE__ */ u(
|
|
791
|
+
/* @__PURE__ */ u(et, { align: "end", className: "w-52 p-1", children: [
|
|
719
792
|
n.can_take_over && /* @__PURE__ */ u(
|
|
720
793
|
"button",
|
|
721
794
|
{
|
|
722
795
|
type: "button",
|
|
723
|
-
className:
|
|
796
|
+
className: c,
|
|
724
797
|
onClick: () => {
|
|
725
|
-
|
|
798
|
+
s(!1), t.takeOverTeam(n.id).then((p) => p && t.setDock({ tab: `team:${p}` })).catch(() => {
|
|
726
799
|
});
|
|
727
800
|
},
|
|
728
801
|
children: [
|
|
729
|
-
/* @__PURE__ */ e(
|
|
802
|
+
/* @__PURE__ */ e(Ae, { "aria-hidden": !0, className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
730
803
|
"Take ownership"
|
|
731
804
|
]
|
|
732
805
|
}
|
|
@@ -735,46 +808,46 @@ function gt({
|
|
|
735
808
|
"button",
|
|
736
809
|
{
|
|
737
810
|
type: "button",
|
|
738
|
-
className:
|
|
811
|
+
className: c,
|
|
739
812
|
onClick: () => {
|
|
740
|
-
|
|
813
|
+
s(!1), o();
|
|
741
814
|
},
|
|
742
815
|
children: [
|
|
743
|
-
/* @__PURE__ */ e(
|
|
816
|
+
/* @__PURE__ */ e(Ee, { "aria-hidden": !0, className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
744
817
|
"Rename or change people"
|
|
745
818
|
]
|
|
746
819
|
}
|
|
747
820
|
),
|
|
748
|
-
|
|
749
|
-
|
|
821
|
+
m && /* @__PURE__ */ u(
|
|
822
|
+
he,
|
|
750
823
|
{
|
|
751
824
|
onConfirm: () => {
|
|
752
|
-
|
|
825
|
+
s(!1), t.setDock({ tab: "watching" }), t.leaveTeam(n.id).catch(() => {
|
|
753
826
|
});
|
|
754
827
|
},
|
|
755
828
|
title: "Leave this shared list",
|
|
756
829
|
confirmLabel: "Leave the list?",
|
|
757
|
-
className:
|
|
758
|
-
armedClassName: `${
|
|
830
|
+
className: c,
|
|
831
|
+
armedClassName: `${c} bg-amber-50 font-semibold text-amber-800 dark:bg-amber-500/15 dark:text-amber-200`,
|
|
759
832
|
children: [
|
|
760
|
-
/* @__PURE__ */ e(
|
|
833
|
+
/* @__PURE__ */ e(Oe, { "aria-hidden": !0, className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
761
834
|
"Leave"
|
|
762
835
|
]
|
|
763
836
|
}
|
|
764
837
|
),
|
|
765
|
-
|
|
766
|
-
|
|
838
|
+
r && /* @__PURE__ */ u(
|
|
839
|
+
he,
|
|
767
840
|
{
|
|
768
841
|
onConfirm: () => {
|
|
769
|
-
|
|
842
|
+
s(!1), t.setDock({ tab: "watching" }), t.deleteTeam(n.id).catch(() => {
|
|
770
843
|
});
|
|
771
844
|
},
|
|
772
845
|
title: "Delete this shared list",
|
|
773
846
|
confirmLabel: "Delete it for everyone?",
|
|
774
|
-
className:
|
|
775
|
-
armedClassName: `${
|
|
847
|
+
className: c,
|
|
848
|
+
armedClassName: `${c} bg-red-50 font-semibold text-red-700 dark:bg-red-500/15 dark:text-red-300`,
|
|
776
849
|
children: [
|
|
777
|
-
/* @__PURE__ */ e(
|
|
850
|
+
/* @__PURE__ */ e(Pe, { "aria-hidden": !0, className: "h-3.5 w-3.5 shrink-0 text-slate-400" }),
|
|
778
851
|
"Delete"
|
|
779
852
|
]
|
|
780
853
|
}
|
|
@@ -782,42 +855,42 @@ function gt({
|
|
|
782
855
|
] })
|
|
783
856
|
] });
|
|
784
857
|
}
|
|
785
|
-
function
|
|
786
|
-
const
|
|
787
|
-
return
|
|
858
|
+
function yt(t, n) {
|
|
859
|
+
const i = n == null ? void 0 : n.toLowerCase(), o = t.members.map((a) => a.id.toLowerCase() === i ? "you" : a.name);
|
|
860
|
+
return o.sort((a, s) => a === "you" ? -1 : s === "you" ? 1 : 0), o.length === 0 ? "Nobody else is on it yet" : o.length === 1 ? o[0] === "you" ? "Only you" : `${o[0]}` : o.length <= 3 ? `${o.slice(0, -1).join(", ")} and ${o[o.length - 1]}`.replace(/^you/, "You") : `${o.slice(0, 2).join(", ")} and ${o.length - 2} others`.replace(/^you/, "You");
|
|
788
861
|
}
|
|
789
|
-
function
|
|
862
|
+
function vt({
|
|
790
863
|
actions: t,
|
|
791
864
|
team: n,
|
|
792
|
-
meId:
|
|
793
|
-
onEdit:
|
|
865
|
+
meId: i,
|
|
866
|
+
onEdit: o
|
|
794
867
|
}) {
|
|
795
|
-
const a = V(),
|
|
796
|
-
queryKey:
|
|
797
|
-
queryFn: () => a.request(
|
|
868
|
+
const a = V(), s = n.pins.map((h) => h.key).join("|"), c = I({
|
|
869
|
+
queryKey: $.team(n.id, s),
|
|
870
|
+
queryFn: () => a.request(K(`/watch-list/teams/${encodeURIComponent(n.id)}/rows`)).then((h) => h.data),
|
|
798
871
|
enabled: !!a && n.pins.length > 0,
|
|
799
872
|
staleTime: 6e4,
|
|
800
873
|
placeholderData: (h) => h
|
|
801
|
-
}),
|
|
874
|
+
}), r = !!i && n.owner.id.toLowerCase() === i.toLowerCase(), m = n.is_member || n.can_manage, p = T(() => {
|
|
802
875
|
var g;
|
|
803
|
-
const h = new Map((((g =
|
|
804
|
-
return
|
|
805
|
-
n.pins.map((
|
|
876
|
+
const h = new Map((((g = c.data) == null ? void 0 : g.rows) ?? []).map((b) => [b.key, b]));
|
|
877
|
+
return ye(
|
|
878
|
+
n.pins.map((b) => h.get(b.key)).filter((b) => !!b),
|
|
806
879
|
n.pins
|
|
807
880
|
);
|
|
808
|
-
}, [
|
|
881
|
+
}, [c.data, n.pins]), f = p.filter((h) => {
|
|
809
882
|
var g;
|
|
810
883
|
return (g = h.change) == null ? void 0 : g.changed;
|
|
811
884
|
}).map((h) => h.key);
|
|
812
885
|
return /* @__PURE__ */ u("div", { "data-watch-team": n.id, children: [
|
|
813
886
|
/* @__PURE__ */ u("div", { className: "flex items-start gap-2 border-b border-slate-100 px-4 py-2.5 dark:border-white/[0.05]", children: [
|
|
814
887
|
/* @__PURE__ */ u("div", { className: "min-w-0 flex-1", children: [
|
|
815
|
-
/* @__PURE__ */ e("p", { className: "truncate text-[11.5px] text-slate-600 dark:text-slate-300", children:
|
|
816
|
-
/* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children:
|
|
888
|
+
/* @__PURE__ */ e("p", { className: "truncate text-[11.5px] text-slate-600 dark:text-slate-300", children: yt(n, i) }),
|
|
889
|
+
/* @__PURE__ */ e("p", { className: "truncate text-[11px] text-slate-500 dark:text-slate-400", children: r && !n.owner_gone ? "Your shared list" : `Made by ${n.owner.name}` })
|
|
817
890
|
] }),
|
|
818
891
|
/* @__PURE__ */ u("div", { className: "flex shrink-0 items-center gap-0.5", children: [
|
|
819
|
-
|
|
820
|
-
/* @__PURE__ */ e(
|
|
892
|
+
f.length > 0 && /* @__PURE__ */ e(Y, { label: "Mark all as seen", onClick: () => t.teamSeen(n.id), children: /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }) }),
|
|
893
|
+
/* @__PURE__ */ e(kt, { actions: t, team: n, isOwner: r, onEdit: o })
|
|
821
894
|
] })
|
|
822
895
|
] }),
|
|
823
896
|
n.owner_gone && /* @__PURE__ */ u(
|
|
@@ -833,55 +906,55 @@ function xt({
|
|
|
833
906
|
]
|
|
834
907
|
}
|
|
835
908
|
),
|
|
836
|
-
n.pins.length === 0 ? /* @__PURE__ */ e(
|
|
837
|
-
|
|
909
|
+
n.pins.length === 0 ? /* @__PURE__ */ e(j, { icon: /* @__PURE__ */ e(te, { className: "h-4 w-4" }), title: "No records on this list yet", children: /* @__PURE__ */ e("p", { children: n.owner_gone ? "Records can be added again once the list has a new owner." : "Add a record from its page: the people icon beside the pin puts it on a shared list. Everyone here sees it, each as far as they can open it." }) }) : c.isError && !c.data ? /* @__PURE__ */ e(X, { error: c.error, onRetry: () => void c.refetch() }) : c.data ? p.length === 0 ? /* @__PURE__ */ e(j, { icon: /* @__PURE__ */ e(te, { className: "h-4 w-4" }), title: "Nothing here you can open", children: /* @__PURE__ */ e("p", { children: "The records on this list are outside what you can see." }) }) : /* @__PURE__ */ e(
|
|
910
|
+
ve,
|
|
838
911
|
{
|
|
839
|
-
rows:
|
|
912
|
+
rows: p,
|
|
840
913
|
sortable: !1,
|
|
841
914
|
label: `Records on ${n.name}`,
|
|
842
915
|
onReorder: () => {
|
|
843
916
|
},
|
|
844
917
|
unpinLabel: "Take off this list",
|
|
845
|
-
canRemove:
|
|
846
|
-
onUnpin: (h) =>
|
|
918
|
+
canRemove: m && !n.owner_gone,
|
|
919
|
+
onUnpin: (h) => m && void t.teamUnpin(n.id, h.collection, h.id).catch(() => {
|
|
847
920
|
}),
|
|
848
921
|
onSeen: (h) => {
|
|
849
|
-
var g,
|
|
850
|
-
(
|
|
922
|
+
var g, b;
|
|
923
|
+
(b = (g = p.find((_) => _.key === h)) == null ? void 0 : g.change) != null && b.changed && t.teamSeen(n.id, [h]);
|
|
851
924
|
}
|
|
852
925
|
}
|
|
853
|
-
) : /* @__PURE__ */ e(
|
|
926
|
+
) : /* @__PURE__ */ e(A, { n: Math.min(5, n.pins.length) }),
|
|
854
927
|
/* @__PURE__ */ e(
|
|
855
|
-
|
|
928
|
+
ne,
|
|
856
929
|
{
|
|
857
930
|
removed: n.removed ?? [],
|
|
858
|
-
canUndo:
|
|
931
|
+
canUndo: m && !n.owner_gone,
|
|
859
932
|
onUndo: (h) => void t.restoreRemoved(h.collection, h.id, n.id).catch(() => {
|
|
860
933
|
})
|
|
861
934
|
}
|
|
862
935
|
)
|
|
863
936
|
] });
|
|
864
937
|
}
|
|
865
|
-
function
|
|
938
|
+
function ne({
|
|
866
939
|
removed: t,
|
|
867
940
|
onUndo: n,
|
|
868
|
-
canUndo:
|
|
941
|
+
canUndo: i = !0
|
|
869
942
|
}) {
|
|
870
|
-
const [
|
|
943
|
+
const [o, a] = R(!1);
|
|
871
944
|
return t.length === 0 ? null : /* @__PURE__ */ u("section", { className: "border-t border-slate-100 dark:border-white/[0.05]", "data-watch-removed": !0, children: [
|
|
872
945
|
/* @__PURE__ */ u(
|
|
873
946
|
"button",
|
|
874
947
|
{
|
|
875
948
|
type: "button",
|
|
876
|
-
"aria-expanded":
|
|
877
|
-
onClick: () => a((
|
|
949
|
+
"aria-expanded": o,
|
|
950
|
+
onClick: () => a((s) => !s),
|
|
878
951
|
className: "flex w-full items-center gap-1.5 px-4 py-2.5 text-left text-[11.5px] font-medium text-slate-600 transition-colors hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/60 dark:text-slate-300 dark:hover:bg-white/[0.03]",
|
|
879
952
|
children: [
|
|
880
953
|
/* @__PURE__ */ e(
|
|
881
|
-
|
|
954
|
+
be,
|
|
882
955
|
{
|
|
883
956
|
"aria-hidden": !0,
|
|
884
|
-
className: `h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform motion-reduce:transition-none ${
|
|
957
|
+
className: `h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform motion-reduce:transition-none ${o ? "rotate-90" : ""}`
|
|
885
958
|
}
|
|
886
959
|
),
|
|
887
960
|
"Recently removed",
|
|
@@ -890,78 +963,78 @@ function te({
|
|
|
890
963
|
]
|
|
891
964
|
}
|
|
892
965
|
),
|
|
893
|
-
|
|
966
|
+
o && /* @__PURE__ */ e("ul", { className: "pb-2", "aria-label": "Recently removed", children: t.map((s) => /* @__PURE__ */ u(
|
|
894
967
|
"li",
|
|
895
968
|
{
|
|
896
969
|
className: "flex items-center gap-2 py-1.5 pl-9 pr-3",
|
|
897
970
|
"data-watch-removed-row": !0,
|
|
898
971
|
children: [
|
|
899
972
|
/* @__PURE__ */ u("div", { className: "min-w-0 flex-1", children: [
|
|
900
|
-
/* @__PURE__ */ e("p", { className: "truncate text-[12px] text-slate-700 dark:text-slate-200", children:
|
|
973
|
+
/* @__PURE__ */ e("p", { className: "truncate text-[12px] text-slate-700 dark:text-slate-200", children: s.title ?? `${s.collection} ${s.id}` }),
|
|
901
974
|
/* @__PURE__ */ u("p", { className: "flex items-center gap-1 text-[11px] text-slate-500 dark:text-slate-400", children: [
|
|
902
975
|
/* @__PURE__ */ e(
|
|
903
|
-
|
|
976
|
+
We,
|
|
904
977
|
{
|
|
905
978
|
"aria-hidden": !0,
|
|
906
979
|
className: "h-3 w-3 shrink-0 text-emerald-600 dark:text-emerald-400"
|
|
907
980
|
}
|
|
908
981
|
),
|
|
909
982
|
"Completed · removed ",
|
|
910
|
-
|
|
983
|
+
re(s.removed_at)
|
|
911
984
|
] })
|
|
912
985
|
] }),
|
|
913
|
-
|
|
986
|
+
i && /* @__PURE__ */ u(
|
|
914
987
|
"button",
|
|
915
988
|
{
|
|
916
989
|
type: "button",
|
|
917
|
-
onClick: () => n(
|
|
918
|
-
"aria-label": `Put ${
|
|
990
|
+
onClick: () => n(s),
|
|
991
|
+
"aria-label": `Put ${s.title ?? "this record"} back on the list`,
|
|
919
992
|
className: "inline-flex shrink-0 items-center gap-1 rounded-md border border-slate-200 px-2 py-1 text-[11.5px] font-medium text-slate-700 transition-colors hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:border-white/[0.12] dark:text-slate-200 dark:hover:bg-white/[0.05]",
|
|
920
993
|
children: [
|
|
921
|
-
/* @__PURE__ */ e(
|
|
994
|
+
/* @__PURE__ */ e(qe, { "aria-hidden": !0, className: "h-3 w-3" }),
|
|
922
995
|
"Undo"
|
|
923
996
|
]
|
|
924
997
|
}
|
|
925
998
|
)
|
|
926
999
|
]
|
|
927
1000
|
},
|
|
928
|
-
|
|
1001
|
+
s.key
|
|
929
1002
|
)) })
|
|
930
1003
|
] });
|
|
931
1004
|
}
|
|
932
|
-
function
|
|
933
|
-
const n =
|
|
1005
|
+
function Nt({ data: t }) {
|
|
1006
|
+
const n = xe();
|
|
934
1007
|
if (t.waiting.isError && !t.waiting.data)
|
|
935
1008
|
return /* @__PURE__ */ e(X, { error: t.waiting.error, onRetry: () => void t.waiting.refetch() });
|
|
936
|
-
if (!t.waiting.data) return /* @__PURE__ */ e(
|
|
937
|
-
const
|
|
938
|
-
if (
|
|
939
|
-
return /* @__PURE__ */ e(
|
|
940
|
-
const
|
|
1009
|
+
if (!t.waiting.data) return /* @__PURE__ */ e(A, {});
|
|
1010
|
+
const i = t.waiting.data;
|
|
1011
|
+
if (i.length === 0)
|
|
1012
|
+
return /* @__PURE__ */ e(j, { icon: /* @__PURE__ */ e(_e, { className: "h-4 w-4" }), title: "Nothing is waiting on others", children: /* @__PURE__ */ e("p", { children: "Records you raised show here while they sit on someone else’s step." }) });
|
|
1013
|
+
const o = i.map((a) => ({ collection: a.collection, itemId: a.id, title: a.title }));
|
|
941
1014
|
return /* @__PURE__ */ e(
|
|
942
1015
|
"ul",
|
|
943
1016
|
{
|
|
944
1017
|
className: "divide-y divide-slate-100 dark:divide-white/[0.05]",
|
|
945
1018
|
"aria-label": "Waiting on others",
|
|
946
|
-
children:
|
|
947
|
-
const
|
|
1019
|
+
children: i.map((a) => {
|
|
1020
|
+
const s = a.waiting_on.length === 0 ? null : a.waiting_on.length <= 2 ? a.waiting_on.map((c) => c.name).join(" and ") : `${a.waiting_on[0].name} and ${a.waiting_on.length - 1} others`;
|
|
948
1021
|
return /* @__PURE__ */ e("li", { "data-waiting-row": !0, children: /* @__PURE__ */ u(
|
|
949
1022
|
"button",
|
|
950
1023
|
{
|
|
951
1024
|
type: "button",
|
|
952
|
-
onClick: (
|
|
1025
|
+
onClick: (c) => n({ collection: a.collection, itemId: a.id, title: a.title }, c, { list: o }),
|
|
953
1026
|
className: "block w-full px-4 py-2.5 text-left transition-colors hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/60 dark:hover:bg-white/[0.03]",
|
|
954
1027
|
children: [
|
|
955
1028
|
/* @__PURE__ */ e("span", { className: "block truncate text-[12.5px] font-medium text-slate-800 dark:text-slate-100", children: a.title }),
|
|
956
1029
|
/* @__PURE__ */ u("span", { className: "mt-1 flex min-w-0 items-center gap-2", children: [
|
|
957
|
-
/* @__PURE__ */ e(
|
|
958
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[11px] text-slate-500 dark:text-slate-400", children:
|
|
1030
|
+
/* @__PURE__ */ e(dt, { state: a.state }),
|
|
1031
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-[11px] text-slate-500 dark:text-slate-400", children: s ? `With ${s}` : "" }),
|
|
959
1032
|
a.since && /* @__PURE__ */ e(
|
|
960
1033
|
"span",
|
|
961
1034
|
{
|
|
962
1035
|
className: "shrink-0 text-[10.5px] tabular-nums text-slate-500 dark:text-slate-400",
|
|
963
1036
|
"data-tip": `Waiting since ${new Date(a.since).toLocaleString()}`,
|
|
964
|
-
children:
|
|
1037
|
+
children: re(a.since)
|
|
965
1038
|
}
|
|
966
1039
|
)
|
|
967
1040
|
] })
|
|
@@ -972,33 +1045,33 @@ function wt({ data: t }) {
|
|
|
972
1045
|
}
|
|
973
1046
|
);
|
|
974
1047
|
}
|
|
975
|
-
function
|
|
976
|
-
const n = V(),
|
|
1048
|
+
function St({ data: t }) {
|
|
1049
|
+
const n = V(), i = fe(), o = xe(), a = t.mentions.data;
|
|
977
1050
|
if (t.mentions.isError && !a)
|
|
978
1051
|
return /* @__PURE__ */ e(X, { error: t.mentions.error, onRetry: () => void t.mentions.refetch() });
|
|
979
|
-
if (!a) return /* @__PURE__ */ e(
|
|
1052
|
+
if (!a) return /* @__PURE__ */ e(A, {});
|
|
980
1053
|
if (a.items.length === 0)
|
|
981
|
-
return /* @__PURE__ */ e(
|
|
982
|
-
const
|
|
1054
|
+
return /* @__PURE__ */ e(j, { icon: /* @__PURE__ */ e(ge, { className: "h-4 w-4" }), title: "No mentions or replies", children: /* @__PURE__ */ e("p", { children: "When someone mentions you, or answers a comment of yours, it shows here for 30 days." }) });
|
|
1055
|
+
const s = (r) => {
|
|
983
1056
|
if (!n) return;
|
|
984
|
-
const
|
|
985
|
-
|
|
1057
|
+
const m = r.filter((h) => h.kind === "mention" && h.unread).map((h) => h.notification_id), p = r.some((h) => h.kind === "reply" && h.unread), f = new Set(r.map((h) => h.key));
|
|
1058
|
+
i.setQueryData($.mentions, (h) => {
|
|
986
1059
|
if (!h) return h;
|
|
987
|
-
const g = h.items.map((
|
|
988
|
-
return { items: g, unread: g.filter((
|
|
989
|
-
}),
|
|
990
|
-
}),
|
|
1060
|
+
const g = h.items.map((b) => f.has(b.key) ? { ...b, unread: !1 } : b);
|
|
1061
|
+
return { items: g, unread: g.filter((b) => b.unread).length };
|
|
1062
|
+
}), m.length > 0 && n.request(oe("/notifications/mark-read", { ids: m })).catch(() => {
|
|
1063
|
+
}), p && n.request(oe("/watch-list/replies-seen", {})).catch(() => {
|
|
991
1064
|
});
|
|
992
|
-
},
|
|
993
|
-
return /* @__PURE__ */ u(
|
|
994
|
-
|
|
1065
|
+
}, c = a.items.filter((r) => r.unread);
|
|
1066
|
+
return /* @__PURE__ */ u(U, { children: [
|
|
1067
|
+
c.length > 0 && /* @__PURE__ */ e("div", { className: "flex justify-end px-3 pt-2", children: /* @__PURE__ */ u(
|
|
995
1068
|
"button",
|
|
996
1069
|
{
|
|
997
1070
|
type: "button",
|
|
998
|
-
onClick: () =>
|
|
999
|
-
className: "inline-flex items-center gap-1 rounded-md
|
|
1071
|
+
onClick: () => s(c),
|
|
1072
|
+
className: "inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11.5px] font-medium text-slate-600 transition-colors hover:bg-slate-100 hover:text-slate-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/60 dark:text-slate-300 dark:hover:bg-white/[0.06] dark:hover:text-slate-100",
|
|
1000
1073
|
children: [
|
|
1001
|
-
/* @__PURE__ */ e(
|
|
1074
|
+
/* @__PURE__ */ e(ae, { "aria-hidden": !0, className: "h-3 w-3" }),
|
|
1002
1075
|
"Mark all read"
|
|
1003
1076
|
]
|
|
1004
1077
|
}
|
|
@@ -1008,37 +1081,37 @@ function kt({ data: t }) {
|
|
|
1008
1081
|
{
|
|
1009
1082
|
className: "divide-y divide-slate-100 dark:divide-white/[0.05]",
|
|
1010
1083
|
"aria-label": "Mentions and replies",
|
|
1011
|
-
children: a.items.map((
|
|
1012
|
-
var
|
|
1013
|
-
return /* @__PURE__ */ e("li", { "data-mention-row":
|
|
1084
|
+
children: a.items.map((r) => {
|
|
1085
|
+
var m;
|
|
1086
|
+
return /* @__PURE__ */ e("li", { "data-mention-row": r.unread ? "unread" : "read", children: /* @__PURE__ */ u(
|
|
1014
1087
|
"button",
|
|
1015
1088
|
{
|
|
1016
1089
|
type: "button",
|
|
1017
|
-
onClick: (
|
|
1018
|
-
|
|
1090
|
+
onClick: (p) => {
|
|
1091
|
+
s([r]), r.collection && r.item && o({ collection: r.collection, itemId: r.item, title: r.title }, p);
|
|
1019
1092
|
},
|
|
1020
|
-
className: `block w-full px-4 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/60 ${
|
|
1093
|
+
className: `block w-full px-4 py-2.5 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/60 ${r.unread ? "bg-sky-50 hover:bg-sky-100/70 dark:bg-nvr-cyan/[0.07] dark:hover:bg-nvr-cyan/[0.1]" : "hover:bg-slate-50 dark:hover:bg-white/[0.03]"}`,
|
|
1021
1094
|
children: [
|
|
1022
1095
|
/* @__PURE__ */ u("span", { className: "flex items-center gap-1.5 text-[11.5px]", children: [
|
|
1023
|
-
|
|
1096
|
+
r.unread && /* @__PURE__ */ e("span", { "aria-hidden": !0, className: "h-1.5 w-1.5 shrink-0 rounded-full bg-nvr-cyan" }),
|
|
1024
1097
|
/* @__PURE__ */ u("span", { className: "min-w-0 flex-1 truncate text-slate-600 dark:text-slate-300", children: [
|
|
1025
|
-
/* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: ((
|
|
1098
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: ((m = r.by) == null ? void 0 : m.name) ?? "Someone" }),
|
|
1026
1099
|
" ",
|
|
1027
|
-
|
|
1028
|
-
|
|
1100
|
+
r.kind === "mention" ? "mentioned you" : "replied",
|
|
1101
|
+
r.unread && /* @__PURE__ */ e("span", { className: "sr-only", children: " (new)" })
|
|
1029
1102
|
] }),
|
|
1030
|
-
/* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-slate-400 dark:text-slate-500", children:
|
|
1103
|
+
/* @__PURE__ */ e("span", { className: "shrink-0 tabular-nums text-slate-400 dark:text-slate-500", children: re(r.at) })
|
|
1031
1104
|
] }),
|
|
1032
|
-
|
|
1033
|
-
|
|
1105
|
+
r.title && /* @__PURE__ */ e("span", { className: "mt-0.5 block truncate text-[12px] font-medium text-slate-700 dark:text-slate-200", children: r.title }),
|
|
1106
|
+
r.text && /* @__PURE__ */ e("span", { className: "mt-0.5 line-clamp-2 text-[12px] leading-snug text-slate-500 dark:text-slate-400", children: r.text })
|
|
1034
1107
|
]
|
|
1035
1108
|
}
|
|
1036
|
-
) },
|
|
1109
|
+
) }, r.key);
|
|
1037
1110
|
})
|
|
1038
1111
|
}
|
|
1039
1112
|
)
|
|
1040
1113
|
] });
|
|
1041
1114
|
}
|
|
1042
1115
|
export {
|
|
1043
|
-
|
|
1116
|
+
jt as WatchDock
|
|
1044
1117
|
};
|