@nivaro/react 0.3.117 → 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 +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 +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/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 +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/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,116 +1,133 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useQuery as
|
|
3
|
-
import { Loader2 as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useNivaroClient as
|
|
6
|
-
import { get as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { ErrorNotice as
|
|
9
|
-
import { SimpleSelectXs as
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as j } from "@tanstack/react-query";
|
|
3
|
+
import { Loader2 as w, RefreshCw as E, CheckCircle2 as _, TriangleAlert as q } from "lucide-react";
|
|
4
|
+
import { useState as A, useMemo as S } from "react";
|
|
5
|
+
import { useNivaroClient as C } from "../context.js";
|
|
6
|
+
import { get as R } from "../lib/commands.js";
|
|
7
|
+
import { cn as T } from "../lib/utils.js";
|
|
8
|
+
import { ErrorNotice as W } from "./ErrorNotice.js";
|
|
9
|
+
import { SimpleSelectXs as F } from "./ui/SimpleSelect.js";
|
|
10
|
+
const D = /* @__PURE__ */ new Set(["changed", "updated_at", "date_updated", "user_updated"]), O = {
|
|
11
|
+
$state: "step",
|
|
12
|
+
$related: "linked records",
|
|
13
|
+
$comments: "comments",
|
|
14
|
+
$tasks: "tasks",
|
|
15
|
+
$files: "files"
|
|
16
|
+
};
|
|
17
|
+
function P(l) {
|
|
18
|
+
const s = [], d = [];
|
|
19
|
+
for (const h of l)
|
|
20
|
+
if (!D.has(h))
|
|
21
|
+
if (h.startsWith("$")) {
|
|
22
|
+
const p = O[h] ?? h.slice(1).replace(/_/g, " ");
|
|
23
|
+
d.includes(p) || d.push(p);
|
|
24
|
+
} else s.push(h);
|
|
25
|
+
return { names: s, aspects: d };
|
|
26
|
+
}
|
|
27
|
+
const B = [
|
|
11
28
|
{ value: "15", label: "Last 15 minutes", minutes: 15 },
|
|
12
29
|
{ value: "60", label: "Last hour", minutes: 60 },
|
|
13
30
|
{ value: "360", label: "Last 6 hours", minutes: 360 },
|
|
14
31
|
{ value: "1440", label: "Last 24 hours", minutes: 1440 }
|
|
15
|
-
],
|
|
32
|
+
], I = {
|
|
16
33
|
activity: "Saved through the app",
|
|
17
34
|
"raw-pending": "Waiting to be announced",
|
|
18
35
|
"row-timestamp": "Row changed, no activity entry"
|
|
19
36
|
};
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
return Number.isNaN(
|
|
37
|
+
function k(l) {
|
|
38
|
+
const s = new Date(l);
|
|
39
|
+
return Number.isNaN(s.getTime()) ? l : s.toLocaleTimeString(void 0, { hour: "numeric", minute: "2-digit", second: "2-digit" });
|
|
23
40
|
}
|
|
24
|
-
function n({ children:
|
|
25
|
-
return /* @__PURE__ */ e("th", { className: "px-
|
|
41
|
+
function n({ children: l }) {
|
|
42
|
+
return /* @__PURE__ */ e("th", { className: "whitespace-nowrap px-3 py-1 text-left text-[10.5px] font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400", children: l });
|
|
26
43
|
}
|
|
27
|
-
function
|
|
28
|
-
title:
|
|
29
|
-
count:
|
|
30
|
-
children:
|
|
44
|
+
function m({
|
|
45
|
+
title: l,
|
|
46
|
+
count: s,
|
|
47
|
+
children: d
|
|
31
48
|
}) {
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ e("h4", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children:
|
|
35
|
-
|
|
49
|
+
return /* @__PURE__ */ a("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
|
|
50
|
+
/* @__PURE__ */ a("header", { className: "flex items-center gap-2 border-b border-slate-100 px-3 py-2 dark:border-border/60", children: [
|
|
51
|
+
/* @__PURE__ */ e("h4", { className: "text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: l }),
|
|
52
|
+
s != null && /* @__PURE__ */ e("span", { className: "rounded-full bg-slate-100 px-1.5 text-[10.5px] tabular-nums text-slate-600 dark:bg-slate-800 dark:text-slate-300", children: s })
|
|
36
53
|
] }),
|
|
37
|
-
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children:
|
|
54
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto", children: d })
|
|
38
55
|
] });
|
|
39
56
|
}
|
|
40
|
-
function
|
|
41
|
-
collection:
|
|
42
|
-
item:
|
|
43
|
-
userId:
|
|
44
|
-
className:
|
|
57
|
+
function J({
|
|
58
|
+
collection: l,
|
|
59
|
+
item: s,
|
|
60
|
+
userId: d,
|
|
61
|
+
className: h
|
|
45
62
|
}) {
|
|
46
|
-
var
|
|
47
|
-
const
|
|
63
|
+
var v;
|
|
64
|
+
const p = C(), [u, L] = A("60"), y = !!l && s != null && String(s) !== "", $ = [
|
|
48
65
|
"nvr-live-trace",
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
],
|
|
54
|
-
queryKey:
|
|
66
|
+
l ?? null,
|
|
67
|
+
s == null ? null : String(s),
|
|
68
|
+
d ?? null,
|
|
69
|
+
u
|
|
70
|
+
], c = j({
|
|
71
|
+
queryKey: $,
|
|
55
72
|
queryFn: () => {
|
|
56
|
-
const t = /* @__PURE__ */ new Date(),
|
|
57
|
-
return
|
|
73
|
+
const t = /* @__PURE__ */ new Date(), i = new Date(t.getTime() - Number(u) * 6e4), o = new URLSearchParams({ from: i.toISOString(), to: t.toISOString() });
|
|
74
|
+
return y ? (o.set("collection", String(l)), o.set("item", String(s))) : d && o.set("user", d), p.request(R(`/realtime/trace?${o.toString()}`)).then((x) => x.data);
|
|
58
75
|
},
|
|
59
|
-
enabled:
|
|
76
|
+
enabled: y || !!d,
|
|
60
77
|
staleTime: 0,
|
|
61
78
|
retry: !1
|
|
62
|
-
}),
|
|
63
|
-
() => [...(
|
|
64
|
-
[
|
|
65
|
-
),
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
79
|
+
}), r = c.data, b = S(
|
|
80
|
+
() => [...(r == null ? void 0 : r.writes) ?? []].sort((t, i) => i.at.localeCompare(t.at)),
|
|
81
|
+
[r == null ? void 0 : r.writes]
|
|
82
|
+
), g = S(() => [...(r == null ? void 0 : r.events) ?? []].sort((t, i) => i.seq - t.seq), [r == null ? void 0 : r.events]);
|
|
83
|
+
return /* @__PURE__ */ a("div", { className: T("space-y-3", h), "data-live-trace": !0, children: [
|
|
84
|
+
/* @__PURE__ */ a("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
68
85
|
/* @__PURE__ */ e(
|
|
69
|
-
|
|
86
|
+
F,
|
|
70
87
|
{
|
|
71
|
-
value:
|
|
72
|
-
onChange:
|
|
88
|
+
value: u,
|
|
89
|
+
onChange: L,
|
|
73
90
|
ariaLabel: "Time window",
|
|
74
|
-
options:
|
|
91
|
+
options: B.map((t) => ({ value: t.value, label: t.label }))
|
|
75
92
|
}
|
|
76
93
|
),
|
|
77
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ a(
|
|
78
95
|
"button",
|
|
79
96
|
{
|
|
80
97
|
type: "button",
|
|
81
|
-
onClick: () => void
|
|
82
|
-
disabled:
|
|
98
|
+
onClick: () => void c.refetch(),
|
|
99
|
+
disabled: c.isFetching,
|
|
83
100
|
className: "inline-flex h-6 items-center gap-1 rounded border border-slate-200 bg-white px-2 text-[11px] text-slate-600 hover:bg-muted disabled:opacity-60 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200",
|
|
84
101
|
children: [
|
|
85
|
-
|
|
102
|
+
c.isFetching ? /* @__PURE__ */ e(w, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(E, { className: "h-3 w-3" }),
|
|
86
103
|
"Run again"
|
|
87
104
|
]
|
|
88
105
|
}
|
|
89
106
|
),
|
|
90
|
-
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "Read-only. Shows ids, field names and times, never values." })
|
|
107
|
+
/* @__PURE__ */ e("span", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: "Read-only. Shows ids, field names and times, never values." })
|
|
91
108
|
] }),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/* @__PURE__ */ e(
|
|
109
|
+
c.isError && /* @__PURE__ */ e(W, { error: c.error, what: "the trace", onRetry: () => void c.refetch() }),
|
|
110
|
+
c.isLoading && /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-[12px] text-slate-500", "aria-busy": "true", children: [
|
|
111
|
+
/* @__PURE__ */ e(w, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
95
112
|
" Tracing…"
|
|
96
113
|
] }),
|
|
97
|
-
|
|
98
|
-
/* @__PURE__ */
|
|
114
|
+
r && /* @__PURE__ */ a(N, { children: [
|
|
115
|
+
/* @__PURE__ */ a(
|
|
99
116
|
"section",
|
|
100
117
|
{
|
|
101
118
|
"data-live-trace-findings": !0,
|
|
102
119
|
className: "rounded-lg border border-slate-200 bg-slate-50 p-3 dark:border-border dark:bg-slate-900/40",
|
|
103
120
|
children: [
|
|
104
121
|
/* @__PURE__ */ e("h4", { className: "mb-1.5 text-[12.5px] font-semibold text-slate-800 dark:text-slate-100", children: "What this says" }),
|
|
105
|
-
|
|
106
|
-
/* @__PURE__ */ e(
|
|
122
|
+
r.findings.length === 0 ? /* @__PURE__ */ a("p", { className: "flex items-center gap-1.5 text-[12px] text-emerald-700 dark:text-emerald-400", children: [
|
|
123
|
+
/* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" }),
|
|
107
124
|
" Every write in this window has a live event and nothing is waiting."
|
|
108
|
-
] }) : /* @__PURE__ */ e("ul", { className: "space-y-1", children:
|
|
125
|
+
] }) : /* @__PURE__ */ e("ul", { className: "space-y-1", children: r.findings.map((t) => /* @__PURE__ */ a(
|
|
109
126
|
"li",
|
|
110
127
|
{
|
|
111
128
|
className: "flex gap-1.5 text-[12px] text-slate-700 dark:text-slate-200",
|
|
112
129
|
children: [
|
|
113
|
-
/* @__PURE__ */ e(
|
|
130
|
+
/* @__PURE__ */ e(q, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-400" }),
|
|
114
131
|
/* @__PURE__ */ e("span", { children: t })
|
|
115
132
|
]
|
|
116
133
|
},
|
|
@@ -119,26 +136,26 @@ function X({
|
|
|
119
136
|
]
|
|
120
137
|
}
|
|
121
138
|
),
|
|
122
|
-
|
|
123
|
-
/* @__PURE__ */ e(
|
|
124
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
139
|
+
r.mode === "record" ? /* @__PURE__ */ a(N, { children: [
|
|
140
|
+
/* @__PURE__ */ e(m, { title: "Writes", count: b.length, children: b.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No writes in this window." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-writes": !0, children: [
|
|
141
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
125
142
|
/* @__PURE__ */ e(n, { children: "Time" }),
|
|
126
143
|
/* @__PURE__ */ e(n, { children: "How" }),
|
|
127
144
|
/* @__PURE__ */ e(n, { children: "Action" }),
|
|
128
145
|
/* @__PURE__ */ e(n, { children: "Live event" })
|
|
129
146
|
] }) }),
|
|
130
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
147
|
+
/* @__PURE__ */ e("tbody", { children: b.map((t) => /* @__PURE__ */ a(
|
|
131
148
|
"tr",
|
|
132
149
|
{
|
|
133
150
|
className: "border-t border-slate-100 dark:border-border/60",
|
|
134
151
|
children: [
|
|
135
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
|
|
152
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: k(t.at) }),
|
|
153
|
+
/* @__PURE__ */ a("td", { className: "px-3 py-1", children: [
|
|
154
|
+
I[t.kind],
|
|
138
155
|
t.kind === "raw-pending" && t.by ? ` (${t.by})` : ""
|
|
139
156
|
] }),
|
|
140
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
141
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
157
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.action ?? "—" }),
|
|
158
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.kind === "raw-pending" ? /* @__PURE__ */ e("span", { className: "text-amber-700 dark:text-amber-400", children: "not sent yet" }) : t.announced ? /* @__PURE__ */ a("span", { className: "text-emerald-700 dark:text-emerald-400", children: [
|
|
142
159
|
"sent (#",
|
|
143
160
|
t.matched_seq,
|
|
144
161
|
")"
|
|
@@ -148,110 +165,132 @@ function X({
|
|
|
148
165
|
`${t.kind}-${t.at}-${t.matched_seq ?? ""}-${t.by ?? ""}`
|
|
149
166
|
)) })
|
|
150
167
|
] }) }),
|
|
151
|
-
/* @__PURE__ */ e(
|
|
152
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ e(m, { title: "Who is subscribed now", count: r.subscribers.length, children: r.subscribers.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "Nobody is in this record's live room right now." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-subscribers": !0, children: [
|
|
169
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
153
170
|
/* @__PURE__ */ e(n, { children: "Person" }),
|
|
154
171
|
/* @__PURE__ */ e(n, { children: "Connections" }),
|
|
155
172
|
/* @__PURE__ */ e(n, { children: "Listening to" }),
|
|
156
173
|
/* @__PURE__ */ e(n, { children: "Acknowledged" })
|
|
157
174
|
] }) }),
|
|
158
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
175
|
+
/* @__PURE__ */ e("tbody", { children: r.subscribers.map((t) => /* @__PURE__ */ a(
|
|
159
176
|
"tr",
|
|
160
177
|
{
|
|
161
178
|
className: "border-t border-slate-100 dark:border-border/60",
|
|
162
179
|
children: [
|
|
163
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
164
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.name }),
|
|
181
|
+
/* @__PURE__ */ a("td", { className: "px-3 py-1 tabular-nums", children: [
|
|
165
182
|
t.sockets,
|
|
166
183
|
t.apps.length ? ` (${t.apps.join(", ")})` : ""
|
|
167
184
|
] }),
|
|
168
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
169
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
170
|
-
/* @__PURE__ */ e(
|
|
185
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.via.map((i) => i === "record" ? "this record" : "the whole list").join(" + ") }),
|
|
186
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.acked ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1 text-emerald-700 dark:text-emerald-400", children: [
|
|
187
|
+
/* @__PURE__ */ e(_, { className: "h-3 w-3" }),
|
|
171
188
|
" ",
|
|
172
189
|
t.acked_events,
|
|
173
190
|
" event",
|
|
174
191
|
t.acked_events === 1 ? "" : "s"
|
|
175
|
-
] }) :
|
|
176
|
-
|
|
177
|
-
"
|
|
178
|
-
|
|
192
|
+
] }) : (
|
|
193
|
+
// Plain text, not a dashed-circle glyph (it read as "still checking").
|
|
194
|
+
/* @__PURE__ */ e("span", { className: "text-slate-500 dark:text-slate-400", children: "Not acknowledged" })
|
|
195
|
+
) })
|
|
179
196
|
]
|
|
180
197
|
},
|
|
181
198
|
t.user_id ?? t.name
|
|
182
199
|
)) })
|
|
183
200
|
] }) })
|
|
184
|
-
] }) : /* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */ e(
|
|
186
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
201
|
+
] }) : /* @__PURE__ */ a(N, { children: [
|
|
202
|
+
/* @__PURE__ */ e(m, { title: "Live connections", count: ((v = r.person) == null ? void 0 : v.sockets.length) ?? 0, children: !r.person || r.person.sockets.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "No live connection from this person right now." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-sockets": !0, children: [
|
|
203
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
187
204
|
/* @__PURE__ */ e(n, { children: "Connection" }),
|
|
188
205
|
/* @__PURE__ */ e(n, { children: "App" }),
|
|
189
206
|
/* @__PURE__ */ e(n, { children: "Transport" }),
|
|
190
207
|
/* @__PURE__ */ e(n, { children: "Since" }),
|
|
191
208
|
/* @__PURE__ */ e(n, { children: "Rooms" })
|
|
192
209
|
] }) }),
|
|
193
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
194
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
195
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
196
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
197
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
198
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
210
|
+
/* @__PURE__ */ e("tbody", { children: r.person.sockets.map((t) => /* @__PURE__ */ a("tr", { className: "border-t border-slate-100 dark:border-border/60", children: [
|
|
211
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1 font-mono", children: t.id }),
|
|
212
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.app ?? "—" }),
|
|
213
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.transport ?? "—" }),
|
|
214
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: t.connected_at ? k(t.connected_at) : "—" }),
|
|
215
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1", children: t.rooms_total })
|
|
199
216
|
] }, t.id)) })
|
|
200
217
|
] }) }),
|
|
201
|
-
/* @__PURE__ */ e(
|
|
202
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ e(m, { title: "Events sent to their rooms", count: r.rooms.length, children: r.rooms.length === 0 ? /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "Nothing was emitted to the rooms they are in during this window." }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", children: [
|
|
219
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
203
220
|
/* @__PURE__ */ e(n, { children: "Room" }),
|
|
204
221
|
/* @__PURE__ */ e(n, { children: "Events" })
|
|
205
222
|
] }) }),
|
|
206
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
223
|
+
/* @__PURE__ */ e("tbody", { children: r.rooms.slice(0, 40).map((t) => /* @__PURE__ */ a(
|
|
207
224
|
"tr",
|
|
208
225
|
{
|
|
209
226
|
className: "border-t border-slate-100 dark:border-border/60",
|
|
210
227
|
children: [
|
|
211
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
212
|
-
/* @__PURE__ */ e("td", { className: "px-
|
|
228
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1 font-mono", children: t.room }),
|
|
229
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums", children: t.events })
|
|
213
230
|
]
|
|
214
231
|
},
|
|
215
232
|
t.room
|
|
216
233
|
)) })
|
|
217
234
|
] }) })
|
|
218
235
|
] }),
|
|
219
|
-
/* @__PURE__ */ e(
|
|
236
|
+
/* @__PURE__ */ e(m, { title: "Live events sent", count: g.length, children: r.journal.available ? g.length === 0 ? /* @__PURE__ */ a("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: [
|
|
220
237
|
"No event in this window (the journal keeps ",
|
|
221
|
-
|
|
238
|
+
r.journal.retention_hours,
|
|
222
239
|
" hours)."
|
|
223
|
-
] }) : /* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */
|
|
240
|
+
] }) : /* @__PURE__ */ a("table", { className: "w-full text-[12px]", "data-live-trace-events": !0, children: [
|
|
241
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ a("tr", { children: [
|
|
225
242
|
/* @__PURE__ */ e(n, { children: "#" }),
|
|
226
243
|
/* @__PURE__ */ e(n, { children: "Time" }),
|
|
227
244
|
/* @__PURE__ */ e(n, { children: "Action" }),
|
|
228
245
|
/* @__PURE__ */ e(n, { children: "Fields" }),
|
|
229
246
|
/* @__PURE__ */ e(n, { children: "Acknowledged by" })
|
|
230
247
|
] }) }),
|
|
231
|
-
/* @__PURE__ */ e("tbody", { children:
|
|
232
|
-
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
248
|
+
/* @__PURE__ */ e("tbody", { children: g.slice(0, 100).map((t) => {
|
|
249
|
+
const { names: i, aspects: o } = P(t.fields), x = [...i, ...o].join(", "), f = t.acked_by.length > 0;
|
|
250
|
+
return /* @__PURE__ */ a(
|
|
251
|
+
"tr",
|
|
252
|
+
{
|
|
253
|
+
className: T(
|
|
254
|
+
"border-t border-slate-100 dark:border-border/60",
|
|
255
|
+
f && "bg-emerald-50/70 dark:bg-emerald-500/[0.07]"
|
|
256
|
+
),
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ e("td", { className: "px-3 py-1 tabular-nums text-slate-500", children: t.seq }),
|
|
259
|
+
/* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-1 tabular-nums", children: k(t.at) }),
|
|
260
|
+
/* @__PURE__ */ a("td", { className: "px-3 py-1", children: [
|
|
261
|
+
t.action ?? t.event,
|
|
262
|
+
t.item === "*" ? ` (${t.bulk ?? "many"} records)` : "",
|
|
263
|
+
t.source ? ` · ${t.source}` : ""
|
|
264
|
+
] }),
|
|
265
|
+
/* @__PURE__ */ a("td", { className: "max-w-[200px] truncate px-3 py-1", title: x, children: [
|
|
266
|
+
i.join(", "),
|
|
267
|
+
o.length > 0 && /* @__PURE__ */ a("span", { className: "italic text-slate-500 dark:text-slate-400", children: [
|
|
268
|
+
i.length ? ", " : "",
|
|
269
|
+
o.join(", ")
|
|
270
|
+
] }),
|
|
271
|
+
!x && "—"
|
|
272
|
+
] }),
|
|
273
|
+
/* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-1", children: f ? /* @__PURE__ */ a("span", { className: "font-medium text-emerald-800 dark:text-emerald-300", children: [
|
|
274
|
+
t.acked_by.length,
|
|
275
|
+
" ",
|
|
276
|
+
t.acked_by.length === 1 ? "person" : "people"
|
|
277
|
+
] }) : /* @__PURE__ */ e("span", { className: "text-slate-400 dark:text-slate-500", children: "—" }) })
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
t.seq
|
|
281
|
+
);
|
|
282
|
+
}) })
|
|
242
283
|
] }) : /* @__PURE__ */ e("p", { className: "px-3 py-3 text-[12px] text-slate-500", children: "The event journal is not on this instance." }) }),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
|
|
245
|
-
" Acknowledged events: ",
|
|
246
|
-
a.ack.acked_events,
|
|
247
|
-
"; about 1 in",
|
|
284
|
+
/* @__PURE__ */ a("p", { className: "text-[11.5px] leading-relaxed text-slate-500 dark:text-slate-400", children: [
|
|
285
|
+
"This shows who is connected right now, not earlier.",
|
|
248
286
|
" ",
|
|
249
|
-
|
|
250
|
-
|
|
287
|
+
r.ack.sampled_about_one_in ? `The server checks delivery on about 1 in ${r.ack.sampled_about_one_in} events` : "The server is not checking delivery here",
|
|
288
|
+
r.ack.sampled_about_one_in ? ` (${r.ack.acked_events} confirmed in this window). A dash under Acknowledged by means the event was not checked, or nobody confirmed it.` : "."
|
|
251
289
|
] })
|
|
252
290
|
] })
|
|
253
291
|
] });
|
|
254
292
|
}
|
|
255
293
|
export {
|
|
256
|
-
|
|
294
|
+
J as LiveTraceView,
|
|
295
|
+
P as traceFields
|
|
257
296
|
};
|