@nivaro/react 0.3.116 → 0.3.118
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 +140 -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 +3855 -3785
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- 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/ReportView.js +1086 -1091
- 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/cbv/column-totals.js +62 -57
- 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/charts/category-axis.js +93 -0
- 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 +131 -92
- 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 +54 -53
- 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 +94 -85
- 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 +21 -22
- 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/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 +112 -104
- 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/BindingStartStateSettings.js +163 -0
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
- 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/use-query-entry.js +17 -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,232 +1,223 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { Activity as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { createPortal as
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { groupActivity as
|
|
8
|
-
import { post as
|
|
9
|
-
import { useLiveCollection as
|
|
10
|
-
import { useTopInserts as
|
|
11
|
-
import { titleCase as
|
|
12
|
-
import {
|
|
13
|
-
import { ErrorNotice as
|
|
14
|
-
import { activityLinkable as
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const m = u.getBoundingClientRect();
|
|
24
|
-
m.top > 200 || m.bottom <= 0 || m.width < window.innerWidth * 0.5 || m.height > window.innerHeight * 0.5 || (i = Math.max(i, m.bottom));
|
|
25
|
-
}
|
|
26
|
-
return i;
|
|
27
|
-
}
|
|
28
|
-
const je = (n) => String(n.id);
|
|
29
|
-
function Ye({
|
|
30
|
-
sources: n,
|
|
31
|
-
records: i,
|
|
32
|
-
typeLabels: u,
|
|
33
|
-
live: f = !0,
|
|
34
|
-
empty: m,
|
|
35
|
-
className: ee,
|
|
1
|
+
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as Ee } from "@tanstack/react-query";
|
|
3
|
+
import { Activity as Ce, ChevronUp as te, ChevronDown as Re } from "lucide-react";
|
|
4
|
+
import { useMemo as h, useState as u, useCallback as A, useRef as m, useEffect as y } from "react";
|
|
5
|
+
import { createPortal as _e } from "react-dom";
|
|
6
|
+
import { useNivaroClient as Me, useItemNavigation as Te } from "../../context.js";
|
|
7
|
+
import { groupActivity as Ae, recordPhrase as Oe } from "../../lib/activity-sentence.js";
|
|
8
|
+
import { post as Fe } from "../../lib/commands.js";
|
|
9
|
+
import { useLiveCollection as Le } from "../../lib/live.js";
|
|
10
|
+
import { useTopInserts as Pe, slideIn as Ie, scrollParentOf as Be, stickyTopOffset as ze } from "../../lib/live-screen.js";
|
|
11
|
+
import { titleCase as $e, cn as O } from "../../lib/utils.js";
|
|
12
|
+
import { useActivityLabelsState as je, ActivityEntry as De } from "../ActivityEntry.js";
|
|
13
|
+
import { ErrorNotice as re } from "../ErrorNotice.js";
|
|
14
|
+
import { activityLinkable as Ke } from "../profile/ActivityFeedCard.js";
|
|
15
|
+
const qe = 2e3, He = 30, Ue = (s) => String(s.id);
|
|
16
|
+
function at({
|
|
17
|
+
sources: s,
|
|
18
|
+
records: c,
|
|
19
|
+
typeLabels: p,
|
|
20
|
+
live: g = !0,
|
|
21
|
+
empty: oe,
|
|
22
|
+
className: ie,
|
|
36
23
|
// On a phone the page scrolls and the list grows (no scroll box inside the scrolling page).
|
|
37
|
-
maxHeightClass:
|
|
38
|
-
onOpenRecord:
|
|
24
|
+
maxHeightClass: ae = "md:max-h-[30rem]",
|
|
25
|
+
onOpenRecord: F
|
|
39
26
|
}) {
|
|
40
|
-
var
|
|
41
|
-
const
|
|
42
|
-
() => JSON.stringify({ sources:
|
|
43
|
-
[
|
|
44
|
-
), [
|
|
45
|
-
(e) =>
|
|
46
|
-
|
|
47
|
-
sources:
|
|
48
|
-
records: (
|
|
49
|
-
collections:
|
|
50
|
-
limit:
|
|
27
|
+
var Y, Z, ee;
|
|
28
|
+
const L = Me(), le = Te(), se = h(
|
|
29
|
+
() => JSON.stringify({ sources: s, records: c ?? [] }),
|
|
30
|
+
[s, c]
|
|
31
|
+
), [v, P] = u([]), i = `${se}|${v.join(",")}`, I = A(
|
|
32
|
+
(e) => L.request(
|
|
33
|
+
Fe("/activity/feed", {
|
|
34
|
+
sources: s,
|
|
35
|
+
records: (c ?? []).map((t) => ({ collection: t.collection, id: String(t.id) })),
|
|
36
|
+
collections: v,
|
|
37
|
+
limit: He,
|
|
51
38
|
...e ? { before: e } : {}
|
|
52
39
|
})
|
|
53
40
|
).then((t) => t),
|
|
54
|
-
[
|
|
55
|
-
),
|
|
41
|
+
[L, s, c, v]
|
|
42
|
+
), ce = h(
|
|
56
43
|
() => [
|
|
57
|
-
.../* @__PURE__ */ new Set([...
|
|
44
|
+
.../* @__PURE__ */ new Set([...s.map((e) => e.collection), ...(c ?? []).map((e) => e.collection)])
|
|
58
45
|
],
|
|
59
|
-
[
|
|
60
|
-
),
|
|
61
|
-
queryKey: ["record-activity-feed",
|
|
46
|
+
[s, c]
|
|
47
|
+
), n = Ee({
|
|
48
|
+
queryKey: ["record-activity-feed", i],
|
|
62
49
|
queryFn: () => I(),
|
|
63
50
|
staleTime: 3e4,
|
|
64
51
|
placeholderData: (e) => e,
|
|
65
52
|
// Never on a timer or a window focus: only a live write to a followed record refetches it.
|
|
66
53
|
refetchInterval: !1,
|
|
67
54
|
refetchOnWindowFocus: !1
|
|
68
|
-
}),
|
|
69
|
-
(
|
|
70
|
-
const w =
|
|
55
|
+
}), B = m([]);
|
|
56
|
+
(Z = (Y = n.data) == null ? void 0 : Y.types) != null && Z.length && (B.current = n.data.types);
|
|
57
|
+
const w = B.current, de = h(() => {
|
|
71
58
|
const e = /* @__PURE__ */ new Map();
|
|
72
59
|
for (const t of w) e.set(t.collection, new Set(t.ids ?? []));
|
|
73
60
|
return e;
|
|
74
|
-
}, [w]),
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
}, [w]), k = m(!1), z = m(!1);
|
|
62
|
+
z.current = n.isFetching;
|
|
63
|
+
const N = n.refetch;
|
|
64
|
+
Le(
|
|
65
|
+
g ? ce : null,
|
|
79
66
|
() => {
|
|
80
|
-
|
|
67
|
+
z.current ? k.current = !0 : N();
|
|
81
68
|
},
|
|
82
69
|
{
|
|
83
|
-
debounceMs:
|
|
70
|
+
debounceMs: qe,
|
|
84
71
|
includeOwn: !0,
|
|
85
72
|
match: (e) => {
|
|
86
|
-
const t =
|
|
73
|
+
const t = de.get(String(e.collection));
|
|
87
74
|
return t ? e.item === "*" || e.action === "create" || t.has(String(e.item)) : !1;
|
|
88
75
|
}
|
|
89
76
|
}
|
|
90
|
-
),
|
|
91
|
-
!
|
|
92
|
-
}, [
|
|
93
|
-
const [
|
|
94
|
-
view:
|
|
77
|
+
), y(() => {
|
|
78
|
+
!n.isFetching && k.current && (k.current = !1, N());
|
|
79
|
+
}, [n.isFetching, N]);
|
|
80
|
+
const [S, $] = u({
|
|
81
|
+
view: i,
|
|
95
82
|
rows: /* @__PURE__ */ new Map()
|
|
96
|
-
}), [E,
|
|
97
|
-
view:
|
|
83
|
+
}), [E, ue] = u({
|
|
84
|
+
view: i,
|
|
98
85
|
next: void 0
|
|
99
|
-
}), [
|
|
100
|
-
|
|
101
|
-
const e =
|
|
102
|
-
!e ||
|
|
103
|
-
const
|
|
104
|
-
for (const
|
|
105
|
-
return { view:
|
|
86
|
+
}), [C, j] = u(!1), [R, D] = u(null);
|
|
87
|
+
y(() => {
|
|
88
|
+
const e = n.data;
|
|
89
|
+
!e || n.isPlaceholderData || $((t) => {
|
|
90
|
+
const o = t.view === i ? new Map(t.rows) : /* @__PURE__ */ new Map();
|
|
91
|
+
for (const l of e.data) o.set(Number(l.id), l);
|
|
92
|
+
return { view: i, rows: o };
|
|
106
93
|
});
|
|
107
|
-
}, [
|
|
108
|
-
const d =
|
|
109
|
-
if (
|
|
110
|
-
return [...
|
|
111
|
-
}, [
|
|
112
|
-
() => (
|
|
113
|
-
[
|
|
114
|
-
), [
|
|
115
|
-
|
|
116
|
-
if (
|
|
117
|
-
|
|
94
|
+
}, [n.data, n.isPlaceholderData, i]);
|
|
95
|
+
const d = h(() => {
|
|
96
|
+
if (S.view === i)
|
|
97
|
+
return [...S.rows.values()].sort((e, t) => Number(t.id) - Number(e.id));
|
|
98
|
+
}, [S, i]), a = Pe(d, Ue, { enabled: g, resetKey: i }), b = d ? a.rows : [], K = h(() => Ae(b), [b]), q = b.length > 0, { labels: _, settled: fe } = je(b, { enabled: q }), me = h(
|
|
99
|
+
() => (c ?? []).map((e) => Oe(e.collection, String(e.id), _)).filter((e) => !!e),
|
|
100
|
+
[c, _]
|
|
101
|
+
), [he, pe] = u(!1), H = m(null), U = m(null), [G, Q] = u(null), J = a.held;
|
|
102
|
+
y(() => {
|
|
103
|
+
if (J <= 0) {
|
|
104
|
+
Q(null);
|
|
118
105
|
return;
|
|
119
106
|
}
|
|
120
107
|
const e = () => {
|
|
121
|
-
const t =
|
|
122
|
-
if (!t || !
|
|
123
|
-
const
|
|
124
|
-
|
|
108
|
+
const t = U.current, o = H.current;
|
|
109
|
+
if (!t || !o) return;
|
|
110
|
+
const l = Be(o), x = l && l !== document.scrollingElement && l !== document.documentElement ? l.getBoundingClientRect().top : 0, T = Math.max(ze(o), x), Ne = t.getBoundingClientRect().bottom < T + 2, Se = o.getBoundingClientRect().bottom > T + 48;
|
|
111
|
+
Q(Ne && Se ? T : null);
|
|
125
112
|
};
|
|
126
113
|
return e(), window.addEventListener("scroll", e, { capture: !0, passive: !0 }), window.addEventListener("resize", e), () => {
|
|
127
114
|
window.removeEventListener("scroll", e, { capture: !0 }), window.removeEventListener("resize", e);
|
|
128
115
|
};
|
|
129
|
-
}, [
|
|
130
|
-
const
|
|
116
|
+
}, [J]);
|
|
117
|
+
const W = m(null), ve = A(
|
|
131
118
|
(e) => {
|
|
132
|
-
|
|
119
|
+
W.current = e, a.rootRef(e);
|
|
133
120
|
},
|
|
134
|
-
[
|
|
121
|
+
[a.rootRef]
|
|
135
122
|
);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}, [
|
|
139
|
-
const
|
|
140
|
-
if (!(!(d != null && d.length) ||
|
|
141
|
-
|
|
123
|
+
y(() => {
|
|
124
|
+
Ie(W.current, a.arrived);
|
|
125
|
+
}, [a.arrived]);
|
|
126
|
+
const be = E.view === i && E.next !== void 0 ? E.next !== null : ((ee = n.data) == null ? void 0 : ee.next) != null, X = async () => {
|
|
127
|
+
if (!(!(d != null && d.length) || C)) {
|
|
128
|
+
j(!0), D(null);
|
|
142
129
|
try {
|
|
143
|
-
const e = d.reduce((
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
for (const x of t.data)
|
|
147
|
-
return { view:
|
|
148
|
-
}),
|
|
130
|
+
const e = d.reduce((o, l) => Math.min(o, Number(l.id)), Number.MAX_SAFE_INTEGER), t = await I(e);
|
|
131
|
+
$((o) => {
|
|
132
|
+
const l = o.view === i ? new Map(o.rows) : /* @__PURE__ */ new Map();
|
|
133
|
+
for (const x of t.data) l.set(Number(x.id), x);
|
|
134
|
+
return { view: i, rows: l };
|
|
135
|
+
}), ue({ view: i, next: t.next });
|
|
149
136
|
} catch (e) {
|
|
150
|
-
|
|
137
|
+
D(e);
|
|
151
138
|
} finally {
|
|
152
|
-
|
|
139
|
+
j(!1);
|
|
153
140
|
}
|
|
154
141
|
}
|
|
155
|
-
},
|
|
156
|
-
if (!
|
|
142
|
+
}, ye = (e) => P((t) => t.includes(e) ? t.filter((o) => o !== e) : [...t, e]), ge = (e) => {
|
|
143
|
+
if (!Ke({
|
|
157
144
|
action: e.action ?? "",
|
|
158
145
|
collection: e.collection ?? null,
|
|
159
146
|
item: e.item == null ? null : String(e.item)
|
|
160
147
|
}))
|
|
161
148
|
return;
|
|
162
149
|
const t = { collection: String(e.collection), itemId: String(e.item) };
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
150
|
+
F ? F(t) : le.open(t);
|
|
151
|
+
}, we = d === void 0 && !n.isError || q && !fe, [xe, ke] = u(!1), V = m(null), M = A((e) => {
|
|
152
|
+
e && ke(e.scrollHeight - e.scrollTop - e.clientHeight > 2);
|
|
153
|
+
}, []);
|
|
154
|
+
return y(() => {
|
|
155
|
+
M(V.current);
|
|
156
|
+
}, [K, M]), /* @__PURE__ */ f(
|
|
166
157
|
"section",
|
|
167
158
|
{
|
|
168
|
-
ref:
|
|
159
|
+
ref: H,
|
|
169
160
|
"data-record-activity-stream": !0,
|
|
170
|
-
className:
|
|
161
|
+
className: O(
|
|
171
162
|
"rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
172
|
-
|
|
163
|
+
ie
|
|
173
164
|
),
|
|
174
165
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ f(
|
|
176
167
|
"header",
|
|
177
168
|
{
|
|
178
|
-
ref:
|
|
169
|
+
ref: U,
|
|
179
170
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1.5 border-b border-slate-100 px-4 py-2.5 dark:border-border/60",
|
|
180
171
|
children: [
|
|
181
|
-
/* @__PURE__ */ r(
|
|
182
|
-
/* @__PURE__ */ r("h3", { className: "text-[13px] font-semibold text-slate-800 dark:text-slate-100", children: "Activity" }),
|
|
183
|
-
|
|
184
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ r(Ce, { className: "h-4 w-4 shrink-0 text-nvr-navy dark:text-nvr-cyan", "aria-hidden": !0 }),
|
|
173
|
+
/* @__PURE__ */ r("h3", { className: "text-[13px] font-semibold leading-6 text-slate-800 dark:text-slate-100", children: "Activity" }),
|
|
174
|
+
a.held > 0 && // In the header, never over the rows: it takes no room from the list and covers no text.
|
|
175
|
+
/* @__PURE__ */ f(
|
|
185
176
|
"button",
|
|
186
177
|
{
|
|
187
178
|
type: "button",
|
|
188
|
-
"data-activity-new-pill":
|
|
189
|
-
onClick:
|
|
179
|
+
"data-activity-new-pill": a.held,
|
|
180
|
+
onClick: a.reveal,
|
|
190
181
|
className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 text-[11.5px] font-medium text-nvr-navy transition-colors hover:bg-nvr-cyan/20 focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan dark:text-nvr-cyan",
|
|
191
182
|
children: [
|
|
192
|
-
/* @__PURE__ */ r(
|
|
193
|
-
|
|
183
|
+
/* @__PURE__ */ r(te, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
184
|
+
a.held,
|
|
194
185
|
" new"
|
|
195
186
|
]
|
|
196
187
|
}
|
|
197
188
|
),
|
|
198
|
-
|
|
199
|
-
/* @__PURE__ */
|
|
189
|
+
G != null && typeof document < "u" && _e(
|
|
190
|
+
/* @__PURE__ */ f(
|
|
200
191
|
"button",
|
|
201
192
|
{
|
|
202
193
|
type: "button",
|
|
203
|
-
"data-activity-new-pill-float":
|
|
204
|
-
onClick:
|
|
205
|
-
style: { top:
|
|
206
|
-
className: "fixed left-1/2 z-[60] inline-flex h-7 -translate-x-1/2 items-center gap-1 rounded-full border border-nvr-cyan/
|
|
194
|
+
"data-activity-new-pill-float": a.held,
|
|
195
|
+
onClick: a.reveal,
|
|
196
|
+
style: { top: G + 10 },
|
|
197
|
+
className: "fixed left-1/2 z-[60] inline-flex h-7 -translate-x-1/2 items-center gap-1 rounded-full border border-nvr-cyan/50 bg-white px-3 text-[12px] font-medium text-nvr-navy shadow-[0_6px_18px_-4px_rgba(15,23,42,0.35),0_2px_4px_-1px_rgba(15,23,42,0.12)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan dark:bg-[#2a3140] dark:text-nvr-cyan dark:shadow-[0_8px_20px_-4px_rgba(0,0,0,0.6)]",
|
|
207
198
|
children: [
|
|
208
|
-
/* @__PURE__ */ r(
|
|
209
|
-
|
|
199
|
+
/* @__PURE__ */ r(te, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
200
|
+
a.held,
|
|
210
201
|
" new"
|
|
211
202
|
]
|
|
212
203
|
}
|
|
213
204
|
),
|
|
214
205
|
document.body
|
|
215
206
|
),
|
|
216
|
-
w.length > 1 && /* @__PURE__ */
|
|
207
|
+
w.length > 1 && /* @__PURE__ */ f(
|
|
217
208
|
"fieldset",
|
|
218
209
|
{
|
|
219
210
|
className: "m-0 ml-auto flex min-w-0 flex-wrap items-center gap-1 border-0 p-0",
|
|
220
211
|
"aria-label": "Filter by type",
|
|
221
212
|
children: [
|
|
222
|
-
/* @__PURE__ */ r(
|
|
213
|
+
/* @__PURE__ */ r(ne, { active: v.length === 0, onClick: () => P([]), children: "All" }),
|
|
223
214
|
w.map((e) => /* @__PURE__ */ r(
|
|
224
|
-
|
|
215
|
+
ne,
|
|
225
216
|
{
|
|
226
|
-
active:
|
|
227
|
-
onClick: () =>
|
|
217
|
+
active: v.includes(e.collection),
|
|
218
|
+
onClick: () => ye(e.collection),
|
|
228
219
|
title: `${e.records.toLocaleString("en-US")} ${e.records === 1 ? "record" : "records"}${e.truncated ? " (the newest are followed)" : ""}`,
|
|
229
|
-
children: (
|
|
220
|
+
children: (p == null ? void 0 : p[e.collection]) ?? $e(e.collection)
|
|
230
221
|
},
|
|
231
222
|
e.collection
|
|
232
223
|
))
|
|
@@ -236,13 +227,16 @@ function Ye({
|
|
|
236
227
|
]
|
|
237
228
|
}
|
|
238
229
|
),
|
|
239
|
-
|
|
230
|
+
we ? /* @__PURE__ */ r("div", { className: "space-y-3 p-4", "aria-hidden": !0, children: [0, 1, 2, 3].map((e) => /* @__PURE__ */ r("div", { className: "h-4 animate-pulse rounded bg-slate-100 dark:bg-white/[0.06]" }, e)) }) : n.isError && !(d != null && d.length) ? /* @__PURE__ */ r("div", { className: "p-4", children: /* @__PURE__ */ r(re, { error: n.error, what: "the activity", onRetry: () => n.refetch() }) }) : b.length === 0 ? /* @__PURE__ */ r("p", { className: "px-4 py-8 text-center text-[12.5px] text-slate-500 dark:text-slate-400", children: oe ?? "Nothing has changed here yet." }) : /* @__PURE__ */ f(
|
|
240
231
|
"div",
|
|
241
232
|
{
|
|
242
|
-
|
|
243
|
-
|
|
233
|
+
ref: V,
|
|
234
|
+
className: O("relative md:overflow-y-auto", ae),
|
|
235
|
+
onScroll: (e) => {
|
|
236
|
+
pe(e.currentTarget.scrollTop > 2), M(e.currentTarget);
|
|
237
|
+
},
|
|
244
238
|
children: [
|
|
245
|
-
|
|
239
|
+
he && /* @__PURE__ */ r(
|
|
246
240
|
"div",
|
|
247
241
|
{
|
|
248
242
|
"aria-hidden": !0,
|
|
@@ -253,32 +247,40 @@ function Ye({
|
|
|
253
247
|
/* @__PURE__ */ r(
|
|
254
248
|
"div",
|
|
255
249
|
{
|
|
256
|
-
ref:
|
|
250
|
+
ref: ve,
|
|
257
251
|
"data-activity-stream-list": !0,
|
|
258
252
|
className: "divide-y divide-slate-100 px-2 dark:divide-border",
|
|
259
|
-
children:
|
|
260
|
-
|
|
253
|
+
children: K.map((e) => /* @__PURE__ */ r("div", { "data-live-key": String(e.entries[0].id ?? e.key), children: /* @__PURE__ */ r(
|
|
254
|
+
De,
|
|
261
255
|
{
|
|
262
256
|
entry: e.entries[0],
|
|
263
257
|
group: e.entries.length > 1 ? e.entries : void 0,
|
|
264
|
-
labels:
|
|
265
|
-
onOpen:
|
|
266
|
-
omitPhrases:
|
|
258
|
+
labels: _,
|
|
259
|
+
onOpen: ge,
|
|
260
|
+
omitPhrases: me,
|
|
267
261
|
reserveChevron: !0
|
|
268
262
|
}
|
|
269
263
|
) }, e.key))
|
|
270
264
|
}
|
|
271
265
|
),
|
|
272
|
-
|
|
266
|
+
xe && /* @__PURE__ */ r(
|
|
267
|
+
"div",
|
|
268
|
+
{
|
|
269
|
+
"aria-hidden": !0,
|
|
270
|
+
"data-activity-scroll-fade-bottom": !0,
|
|
271
|
+
className: "pointer-events-none sticky bottom-0 z-10 -mt-6 h-6 bg-gradient-to-t from-white via-white/80 to-transparent dark:from-card dark:via-card/80"
|
|
272
|
+
}
|
|
273
|
+
),
|
|
274
|
+
(be || R != null) && /* @__PURE__ */ r("div", { className: "flex justify-center border-t border-slate-100 px-4 py-2.5 dark:border-border/60", children: R != null ? /* @__PURE__ */ r(re, { error: R, what: "earlier activity", onRetry: X }) : /* @__PURE__ */ f(
|
|
273
275
|
"button",
|
|
274
276
|
{
|
|
275
277
|
type: "button",
|
|
276
|
-
onClick:
|
|
277
|
-
disabled:
|
|
278
|
+
onClick: X,
|
|
279
|
+
disabled: C,
|
|
278
280
|
className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-slate-200 bg-white px-3.5 text-[12px] font-medium text-slate-700 transition-colors hover:border-nvr-cyan/50 hover:bg-nvr-cyan/5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan disabled:opacity-60 dark:border-border dark:bg-transparent dark:text-slate-200 dark:hover:bg-white/[0.05]",
|
|
279
281
|
children: [
|
|
280
|
-
/* @__PURE__ */ r(
|
|
281
|
-
|
|
282
|
+
/* @__PURE__ */ r(Re, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
283
|
+
C ? "Loading…" : "Show earlier"
|
|
282
284
|
]
|
|
283
285
|
}
|
|
284
286
|
) })
|
|
@@ -289,29 +291,29 @@ function Ye({
|
|
|
289
291
|
}
|
|
290
292
|
);
|
|
291
293
|
}
|
|
292
|
-
function
|
|
293
|
-
active:
|
|
294
|
-
onClick:
|
|
295
|
-
title:
|
|
296
|
-
children:
|
|
294
|
+
function ne({
|
|
295
|
+
active: s,
|
|
296
|
+
onClick: c,
|
|
297
|
+
title: p,
|
|
298
|
+
children: g
|
|
297
299
|
}) {
|
|
298
300
|
return /* @__PURE__ */ r(
|
|
299
301
|
"button",
|
|
300
302
|
{
|
|
301
303
|
type: "button",
|
|
302
|
-
"aria-pressed":
|
|
303
|
-
title:
|
|
304
|
-
onClick:
|
|
305
|
-
className:
|
|
304
|
+
"aria-pressed": s,
|
|
305
|
+
title: p,
|
|
306
|
+
onClick: c,
|
|
307
|
+
className: O(
|
|
306
308
|
"rounded-full border px-2.5 py-0.5 text-[11.5px] font-medium transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-nvr-cyan",
|
|
307
|
-
|
|
309
|
+
s ? "border-nvr-cyan/50 bg-nvr-cyan/10 text-nvr-navy dark:text-nvr-cyan" : "border-slate-200 bg-white text-slate-600 hover:bg-slate-50 dark:border-border dark:bg-transparent dark:text-slate-300 dark:hover:bg-white/[0.05]"
|
|
308
310
|
),
|
|
309
|
-
children:
|
|
311
|
+
children: g
|
|
310
312
|
}
|
|
311
313
|
);
|
|
312
314
|
}
|
|
313
315
|
export {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
316
|
+
at as RecordActivityStream,
|
|
317
|
+
qe as STREAM_QUIET_MS,
|
|
318
|
+
ze as stickyTopOffset
|
|
317
319
|
};
|