@nivaro/react 0.3.139 → 0.3.141
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2702 -2671
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3475 -3458
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/RowPresence.js +83 -76
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/UnseenDot.js +183 -22
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/delivery-analytics/drill.js +32 -32
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +884 -872
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +123 -123
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +251 -229
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/layout-resolve.js +64 -48
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -6,11 +6,11 @@ import { useState as _ } from "react";
|
|
|
6
6
|
import { useNivaroClient as D, useItemEditAuth as Q, useNavigation as U } from "../../context.js";
|
|
7
7
|
import { get as S, post as z } from "../../lib/commands.js";
|
|
8
8
|
import { useLiveOps as F } from "../../lib/live-ops.js";
|
|
9
|
-
import { cn as m } from "../../lib/utils.js";
|
|
10
|
-
import { RelationCombobox as
|
|
9
|
+
import { cn as m, formatNumber as R } from "../../lib/utils.js";
|
|
10
|
+
import { RelationCombobox as W } from "../item-edit/RelationCombobox.js";
|
|
11
11
|
import { UserChip as y } from "../item-edit/UserChip.js";
|
|
12
|
-
import { DelegationCard as
|
|
13
|
-
const N = (n) => n ? new Date(n).toLocaleDateString(void 0, { month: "short", day: "numeric" }) : "—",
|
|
12
|
+
import { DelegationCard as M } from "../profile/DelegationCard.js";
|
|
13
|
+
const N = (n) => n ? new Date(n).toLocaleDateString(void 0, { month: "short", day: "numeric" }) : "—", B = {
|
|
14
14
|
none: "no delegate",
|
|
15
15
|
expired: "delegation expired",
|
|
16
16
|
suspended: "delegate is suspended",
|
|
@@ -60,7 +60,7 @@ function f({
|
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function G({ e: n }) {
|
|
64
64
|
return n.delegate ? /* @__PURE__ */ a("span", { className: "inline-flex flex-wrap items-center gap-1.5", children: [
|
|
65
65
|
/* @__PURE__ */ e(y, { userId: n.delegate.id, size: "compact" }),
|
|
66
66
|
n.delegate_ok ? /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-0.5 text-[10.5px] text-emerald-700 dark:text-emerald-400", children: [
|
|
@@ -70,16 +70,16 @@ function B({ e: n }) {
|
|
|
70
70
|
] }) : /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-0.5 rounded-full bg-amber-500/10 px-1.5 py-px text-[10.5px] font-semibold text-amber-700 dark:text-amber-400", children: [
|
|
71
71
|
/* @__PURE__ */ e(O, { className: "h-3 w-3" }),
|
|
72
72
|
" ",
|
|
73
|
-
|
|
73
|
+
B[n.delegate_problem ?? "none"]
|
|
74
74
|
] })
|
|
75
75
|
] }) : /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1 rounded-full bg-red-500/10 px-2 py-0.5 text-[10.5px] font-semibold text-red-600 dark:text-red-400", children: [
|
|
76
76
|
/* @__PURE__ */ e(O, { className: "h-3 w-3" }),
|
|
77
77
|
" No delegate"
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function V({ entry: n, onDone: s }) {
|
|
81
81
|
var l, k, w, i;
|
|
82
|
-
const d = D(), [o, r] = _(!1), [g, b] = _(((l = n.delegate) == null ? void 0 : l.id) ?? null), [c, p] = _(((k = n.delegate_expires_at) == null ? void 0 : k.slice(0, 10)) ?? ""),
|
|
82
|
+
const d = D(), [o, r] = _(!1), [g, b] = _(((l = n.delegate) == null ? void 0 : l.id) ?? null), [c, p] = _(((k = n.delegate_expires_at) == null ? void 0 : k.slice(0, 10)) ?? ""), u = K({
|
|
83
83
|
mutationFn: () => d.request(
|
|
84
84
|
z(`/delegation/${n.user.id}/delegate`, {
|
|
85
85
|
delegate_id: g,
|
|
@@ -92,7 +92,7 @@ function G({ entry: n, onDone: s }) {
|
|
|
92
92
|
});
|
|
93
93
|
return o ? /* @__PURE__ */ a("div", { className: "flex flex-wrap items-end gap-2", "data-nvr-assign-delegate": !0, children: [
|
|
94
94
|
/* @__PURE__ */ e("div", { className: "w-[220px]", children: /* @__PURE__ */ e(
|
|
95
|
-
|
|
95
|
+
W,
|
|
96
96
|
{
|
|
97
97
|
collection: "nivaro_users",
|
|
98
98
|
value: g,
|
|
@@ -114,10 +114,10 @@ function G({ entry: n, onDone: s }) {
|
|
|
114
114
|
"button",
|
|
115
115
|
{
|
|
116
116
|
type: "button",
|
|
117
|
-
disabled:
|
|
118
|
-
onClick: () =>
|
|
117
|
+
disabled: u.isPending,
|
|
118
|
+
onClick: () => u.mutate(),
|
|
119
119
|
className: "h-9 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
|
|
120
|
-
children:
|
|
120
|
+
children: u.isPending ? "Saving…" : "Save"
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
123
|
/* @__PURE__ */ e(
|
|
@@ -129,7 +129,7 @@ function G({ entry: n, onDone: s }) {
|
|
|
129
129
|
children: "Cancel"
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
|
|
132
|
+
u.isError && /* @__PURE__ */ e("span", { className: "text-[11.5px] text-red-600", children: ((i = (w = u.error) == null ? void 0 : w.response) == null ? void 0 : i.error) ?? "Save failed" })
|
|
133
133
|
] }) : /* @__PURE__ */ e(
|
|
134
134
|
"button",
|
|
135
135
|
{
|
|
@@ -158,7 +158,7 @@ function q({
|
|
|
158
158
|
/* @__PURE__ */ e("tbody", { children: n.map((r) => /* @__PURE__ */ a("tr", { className: "border-t border-slate-100 align-top dark:border-border", children: [
|
|
159
159
|
/* @__PURE__ */ e("td", { className: "px-4 py-2", children: /* @__PURE__ */ e(y, { userId: r.user.id, size: "compact" }) }),
|
|
160
160
|
o && /* @__PURE__ */ e("td", { className: "px-2 py-2 whitespace-nowrap text-slate-600 dark:text-muted-foreground", children: r.ooo_start || r.ooo_end ? `${N(r.ooo_start)} → ${r.ooo_end ? N(r.ooo_end) : "open"}` : r.currently_out ? "until switched off" : "—" }),
|
|
161
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(
|
|
161
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(G, { e: r }) }),
|
|
162
162
|
/* @__PURE__ */ e("td", { className: "px-2 py-2 text-slate-500", children: r.group_seats > 0 ? /* @__PURE__ */ a("span", { title: r.states.join(", "), "data-tip": r.states.join(", "), children: [
|
|
163
163
|
r.group_seats,
|
|
164
164
|
" seat",
|
|
@@ -176,19 +176,19 @@ function q({
|
|
|
176
176
|
"px-2 py-2 text-right tabular-nums",
|
|
177
177
|
r.pending_estimate > 0 && !r.delegate_ok ? "font-semibold text-red-600 dark:text-red-400" : "text-slate-600 dark:text-muted-foreground"
|
|
178
178
|
),
|
|
179
|
-
children: r.pending_estimate
|
|
179
|
+
children: R(r.pending_estimate)
|
|
180
180
|
}
|
|
181
181
|
),
|
|
182
|
-
s && /* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(
|
|
182
|
+
s && /* @__PURE__ */ e("td", { className: "px-2 py-2", children: /* @__PURE__ */ e(V, { entry: r, onDone: d }) })
|
|
183
183
|
] }, r.user.id)) })
|
|
184
184
|
] });
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function de({
|
|
187
187
|
className: n,
|
|
188
188
|
onNotice: s,
|
|
189
189
|
compactHeader: d = !1
|
|
190
190
|
}) {
|
|
191
|
-
const o = D(), r = I(), g = Q(), b = U(), c = !!(g != null && g.isAdmin), [p,
|
|
191
|
+
const o = D(), r = I(), g = Q(), b = U(), c = !!(g != null && g.isAdmin), [p, u] = _(14), { data: l, isLoading: k } = $({
|
|
192
192
|
queryKey: ["delegation-overview", p],
|
|
193
193
|
queryFn: () => o.request(S("/delegation/overview", { days: p })).then((t) => t.data)
|
|
194
194
|
}), { data: w } = $({
|
|
@@ -236,7 +236,7 @@ function se({
|
|
|
236
236
|
"button",
|
|
237
237
|
{
|
|
238
238
|
type: "button",
|
|
239
|
-
onClick: () =>
|
|
239
|
+
onClick: () => u(t),
|
|
240
240
|
className: m(
|
|
241
241
|
"rounded px-2.5 py-1 text-[12px] font-medium",
|
|
242
242
|
p === t ? "bg-slate-900 text-white dark:bg-nvr-cyan dark:text-[#172940]" : "text-slate-600 hover:bg-slate-100 dark:text-muted-foreground dark:hover:bg-muted"
|
|
@@ -331,7 +331,7 @@ function se({
|
|
|
331
331
|
)
|
|
332
332
|
] }),
|
|
333
333
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
334
|
-
w && /* @__PURE__ */ e(
|
|
334
|
+
w && /* @__PURE__ */ e(M, { user: w, onSaved: x }),
|
|
335
335
|
/* @__PURE__ */ e(
|
|
336
336
|
f,
|
|
337
337
|
{
|
|
@@ -344,13 +344,13 @@ function se({
|
|
|
344
344
|
children: [
|
|
345
345
|
/* @__PURE__ */ e(y, { userId: t.delegate.id, size: "compact" }),
|
|
346
346
|
/* @__PURE__ */ e("span", { className: "mt-1 text-slate-400", children: "covers" }),
|
|
347
|
-
/* @__PURE__ */ e("span", { className: "flex flex-wrap gap-1", children: t.covers.map((
|
|
348
|
-
/* @__PURE__ */ e(y, { userId:
|
|
349
|
-
|
|
347
|
+
/* @__PURE__ */ e("span", { className: "flex flex-wrap gap-1", children: t.covers.map((h) => /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-1", children: [
|
|
348
|
+
/* @__PURE__ */ e(y, { userId: h.id, size: "compact" }),
|
|
349
|
+
h.expires_at && /* @__PURE__ */ a("span", { className: "text-[10.5px] text-slate-400", children: [
|
|
350
350
|
"until ",
|
|
351
|
-
N(
|
|
351
|
+
N(h.expires_at)
|
|
352
352
|
] })
|
|
353
|
-
] },
|
|
353
|
+
] }, h.id)) })
|
|
354
354
|
]
|
|
355
355
|
},
|
|
356
356
|
t.delegate.id
|
|
@@ -430,7 +430,7 @@ function se({
|
|
|
430
430
|
/* @__PURE__ */ e("span", { className: "ml-1 text-[10.5px] text-slate-400", children: t.collection.replace(/_/g, " ") })
|
|
431
431
|
] }),
|
|
432
432
|
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.state ?? "—" }),
|
|
433
|
-
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.owners.map((
|
|
433
|
+
/* @__PURE__ */ e("td", { className: "px-2 py-1.5 text-slate-600 dark:text-muted-foreground", children: t.owners.map((h) => `${h.name} (${h.reason.replace(/_/g, " ")})`).join(", ") })
|
|
434
434
|
]
|
|
435
435
|
},
|
|
436
436
|
`${t.collection}:${t.item}`
|
|
@@ -462,5 +462,5 @@ function se({
|
|
|
462
462
|
] });
|
|
463
463
|
}
|
|
464
464
|
export {
|
|
465
|
-
|
|
465
|
+
de as DelegationConsoleView
|
|
466
466
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as S } from "react/jsx-runtime";
|
|
2
2
|
import { useInfiniteQuery as ce, useQuery as P } from "@tanstack/react-query";
|
|
3
|
-
import { X as me, Download as he, ExternalLink as M, Mail as ue, ListFilter as pe, ChevronRight as G, ArrowLeft as
|
|
4
|
-
import { useState as V, useMemo as
|
|
3
|
+
import { X as me, Download as he, ExternalLink as M, Mail as ue, ListFilter as pe, ChevronRight as G, ArrowLeft as xe } from "lucide-react";
|
|
4
|
+
import { useState as V, useMemo as be } from "react";
|
|
5
5
|
import { useNivaroClient as A, useApiFetchConfig as fe, useNavigation as ge, useItemNavigation as Ne } from "../../context.js";
|
|
6
6
|
import { get as F } from "../../lib/commands.js";
|
|
7
|
-
import { cn as
|
|
7
|
+
import { cn as b } from "../../lib/utils.js";
|
|
8
8
|
import { ErrorDetails as Z } from "../ErrorNotice.js";
|
|
9
9
|
import { QueryErrorState as K } from "../QueryErrorState.js";
|
|
10
10
|
import { Sheet as we, SheetContent as ve, SheetTitle as j, SheetDescription as ee } from "../ui/sheet.js";
|
|
@@ -105,12 +105,12 @@ function De({
|
|
|
105
105
|
labels: s
|
|
106
106
|
}) {
|
|
107
107
|
var Y, H, X;
|
|
108
|
-
const n = A(), d = fe(), t = (Y = Ee().data) == null ? void 0 : Y[a.source], y = { ...o.window, asof: o.asof, acted_hours: o.acted_hours }, f = $e(m, a, y),
|
|
109
|
-
queryKey: ["delivery-analytics", "rows", R,
|
|
108
|
+
const n = A(), d = fe(), t = (Y = Ee().data) == null ? void 0 : Y[a.source], y = { ...o.window, asof: o.asof, acted_hours: o.acted_hours }, f = $e(m, a, y), x = a.sort, R = f.toString(), p = ce({
|
|
109
|
+
queryKey: ["delivery-analytics", "rows", R, x],
|
|
110
110
|
initialPageParam: "0",
|
|
111
111
|
queryFn: ({ pageParam: l }) => {
|
|
112
112
|
const i = new URLSearchParams(f);
|
|
113
|
-
return i.set("cursor", String(l)), i.set("limit", "50"),
|
|
113
|
+
return i.set("cursor", String(l)), i.set("limit", "50"), x === "ttr" && i.set("sort", "ttr"), x === "time-asc" && i.set("dir", "asc"), n.request(F(`/delivery-analytics/rows?${i.toString()}`)).then((g) => g.data);
|
|
114
114
|
},
|
|
115
115
|
getNextPageParam: (l) => l.next_cursor ?? void 0,
|
|
116
116
|
staleTime: 6e4
|
|
@@ -122,7 +122,7 @@ function De({
|
|
|
122
122
|
return l.set("by", String(a.splitBy)), n.request(F(`/delivery-analytics/split?${l.toString()}`)).then((i) => i.data);
|
|
123
123
|
},
|
|
124
124
|
staleTime: 6e4
|
|
125
|
-
}), [h, L] = V(!1), [z, Q] = V(!1), q = (X = (H = p.data) == null ? void 0 : H.pages[0]) == null ? void 0 : X.total, B =
|
|
125
|
+
}), [h, L] = V(!1), [z, Q] = V(!1), q = (X = (H = p.data) == null ? void 0 : H.pages[0]) == null ? void 0 : X.total, B = be(() => {
|
|
126
126
|
var l;
|
|
127
127
|
return ((l = p.data) == null ? void 0 : l.pages.flatMap((i) => i.rows)) ?? [];
|
|
128
128
|
}, [p.data]), O = Le[a.source], oe = a.prev ? `previous period, ${J(o.window.prev_from, o.window.prev_to)}` : a.source === "x" ? "standing mutes" : J(o.window.from, o.window.to), se = (l) => c((i) => {
|
|
@@ -143,7 +143,7 @@ function De({
|
|
|
143
143
|
L(!0), Q(!1);
|
|
144
144
|
try {
|
|
145
145
|
const l = new URLSearchParams(f);
|
|
146
|
-
l.set("format", "csv"),
|
|
146
|
+
l.set("format", "csv"), x === "ttr" && l.set("sort", "ttr"), x === "time-asc" && l.set("dir", "asc");
|
|
147
147
|
const i = await fetch(`${d.apiBase}/delivery-analytics/rows?${l}`, {
|
|
148
148
|
headers: d.authHeaders,
|
|
149
149
|
credentials: d.credentials
|
|
@@ -220,11 +220,11 @@ function De({
|
|
|
220
220
|
"button",
|
|
221
221
|
{
|
|
222
222
|
type: "button",
|
|
223
|
-
"aria-pressed":
|
|
223
|
+
"aria-pressed": x === l,
|
|
224
224
|
onClick: () => ie(l),
|
|
225
|
-
className:
|
|
225
|
+
className: b(
|
|
226
226
|
"rounded px-2 py-0.5 font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50",
|
|
227
|
-
|
|
227
|
+
x === l ? "bg-[#0f172a] text-white dark:bg-nvr-cyan dark:text-[#172940]" : "text-slate-600 hover:bg-slate-100 dark:text-muted-foreground dark:hover:bg-muted"
|
|
228
228
|
),
|
|
229
229
|
children: i
|
|
230
230
|
},
|
|
@@ -379,14 +379,14 @@ function Ie({
|
|
|
379
379
|
return /* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-lg border border-slate-200 dark:border-border", children: /* @__PURE__ */ r("table", { className: "w-full text-[12.5px]", children: [
|
|
380
380
|
/* @__PURE__ */ e("thead", { className: "border-b border-slate-200 bg-slate-50 dark:border-border dark:bg-muted/40", children: a === "n" ? /* @__PURE__ */ r("tr", { children: [
|
|
381
381
|
/* @__PURE__ */ e("th", { className: N, children: "Sent" }),
|
|
382
|
-
/* @__PURE__ */ e("th", { className:
|
|
382
|
+
/* @__PURE__ */ e("th", { className: b(N, "max-sm:hidden"), children: "To" }),
|
|
383
383
|
/* @__PURE__ */ e("th", { className: N, children: "Subject" }),
|
|
384
|
-
/* @__PURE__ */ e("th", { className:
|
|
385
|
-
/* @__PURE__ */ e("th", { className:
|
|
384
|
+
/* @__PURE__ */ e("th", { className: b(N, "max-md:hidden"), children: "Channels" }),
|
|
385
|
+
/* @__PURE__ */ e("th", { className: b(N, "text-right"), children: "Read" }),
|
|
386
386
|
/* @__PURE__ */ e("th", { className: "w-6" })
|
|
387
387
|
] }) : a === "m" ? /* @__PURE__ */ r("tr", { children: [
|
|
388
388
|
/* @__PURE__ */ e("th", { className: N, children: "When" }),
|
|
389
|
-
/* @__PURE__ */ e("th", { className:
|
|
389
|
+
/* @__PURE__ */ e("th", { className: b(N, "max-sm:hidden"), children: "To" }),
|
|
390
390
|
/* @__PURE__ */ e("th", { className: N, children: "Subject" }),
|
|
391
391
|
/* @__PURE__ */ e("th", { className: N, children: "Outcome" }),
|
|
392
392
|
/* @__PURE__ */ e("th", { className: "w-6" })
|
|
@@ -400,15 +400,15 @@ function Ie({
|
|
|
400
400
|
/* @__PURE__ */ e(
|
|
401
401
|
"td",
|
|
402
402
|
{
|
|
403
|
-
className:
|
|
403
|
+
className: b(
|
|
404
404
|
w,
|
|
405
405
|
"whitespace-nowrap tabular-nums text-slate-500 dark:text-muted-foreground"
|
|
406
406
|
),
|
|
407
407
|
children: k(n.timestamp)
|
|
408
408
|
}
|
|
409
409
|
),
|
|
410
|
-
/* @__PURE__ */ e("td", { className:
|
|
411
|
-
/* @__PURE__ */ r("td", { className:
|
|
410
|
+
/* @__PURE__ */ e("td", { className: b(w, "hidden max-w-[150px] truncate sm:table-cell"), children: n.recipient_name ?? "–" }),
|
|
411
|
+
/* @__PURE__ */ r("td", { className: b(w, "min-w-[160px]"), children: [
|
|
412
412
|
/* @__PURE__ */ e("span", { className: "line-clamp-2 [overflow-wrap:anywhere]", children: n.subject ?? "(no subject)" }),
|
|
413
413
|
/* @__PURE__ */ r("span", { className: "text-[11px] text-slate-500 dark:text-muted-foreground", children: [
|
|
414
414
|
/* @__PURE__ */ r("span", { className: "sm:hidden", children: [
|
|
@@ -420,12 +420,12 @@ function Ie({
|
|
|
420
420
|
n.reason_label
|
|
421
421
|
] })
|
|
422
422
|
] }),
|
|
423
|
-
/* @__PURE__ */ e("td", { className:
|
|
423
|
+
/* @__PURE__ */ e("td", { className: b(w, "max-md:hidden"), children: /* @__PURE__ */ e("span", { className: "flex flex-wrap gap-1", children: n.channels.length === 0 ? /* @__PURE__ */ e("span", { className: "text-[11px] text-slate-400", children: "not recorded" }) : n.channels.map((d) => /* @__PURE__ */ e(E, { outcome: d.outcome, children: /* @__PURE__ */ r("span", { "data-tip": d.label, children: [
|
|
424
424
|
d.channel === "inapp" ? "in-app" : d.channel === "sms" ? "SMS" : d.channel,
|
|
425
425
|
" ",
|
|
426
426
|
d.status.replace(/_/g, " ")
|
|
427
427
|
] }) }, d.channel)) }) }),
|
|
428
|
-
/* @__PURE__ */ e("td", { className:
|
|
428
|
+
/* @__PURE__ */ e("td", { className: b(w, "whitespace-nowrap text-right tabular-nums"), children: n.status === "inbox" ? /* @__PURE__ */ e("span", { className: "text-amber-700 dark:text-[#d4936a]", children: "Unread" }) : n.ttr_min != null ? te(n.ttr_min) : /* @__PURE__ */ e("span", { className: "text-slate-500 dark:text-muted-foreground", children: "Read" }) }),
|
|
429
429
|
/* @__PURE__ */ e("td", { className: "w-6 pr-2 pt-2.5 align-top", children: /* @__PURE__ */ e(
|
|
430
430
|
G,
|
|
431
431
|
{
|
|
@@ -438,15 +438,15 @@ function Ie({
|
|
|
438
438
|
/* @__PURE__ */ e(
|
|
439
439
|
"td",
|
|
440
440
|
{
|
|
441
|
-
className:
|
|
441
|
+
className: b(
|
|
442
442
|
w,
|
|
443
443
|
"whitespace-nowrap tabular-nums text-slate-500 dark:text-muted-foreground"
|
|
444
444
|
),
|
|
445
445
|
children: k(n.created_at)
|
|
446
446
|
}
|
|
447
447
|
),
|
|
448
|
-
/* @__PURE__ */ e("td", { className:
|
|
449
|
-
/* @__PURE__ */ r("td", { className:
|
|
448
|
+
/* @__PURE__ */ e("td", { className: b(w, "hidden max-w-[180px] truncate sm:table-cell"), children: n.to ?? "–" }),
|
|
449
|
+
/* @__PURE__ */ r("td", { className: b(w, "min-w-[160px]"), children: [
|
|
450
450
|
/* @__PURE__ */ e("span", { className: "line-clamp-2 [overflow-wrap:anywhere]", children: n.subject ?? "(no subject)" }),
|
|
451
451
|
/* @__PURE__ */ r("span", { className: "block text-[11px] text-slate-500 dark:text-muted-foreground", children: [
|
|
452
452
|
/* @__PURE__ */ r("span", { className: "sm:hidden", children: [
|
|
@@ -473,7 +473,7 @@ function Ie({
|
|
|
473
473
|
/* @__PURE__ */ e(
|
|
474
474
|
"td",
|
|
475
475
|
{
|
|
476
|
-
className:
|
|
476
|
+
className: b(
|
|
477
477
|
w,
|
|
478
478
|
"whitespace-nowrap tabular-nums text-slate-500 dark:text-muted-foreground"
|
|
479
479
|
),
|
|
@@ -518,7 +518,7 @@ function ae({
|
|
|
518
518
|
onClick: c,
|
|
519
519
|
className: "mb-1.5 inline-flex items-center gap-1 rounded px-1 py-0.5 text-[11.5px] font-medium text-sky-700 hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:text-nvr-cyan",
|
|
520
520
|
children: [
|
|
521
|
-
/* @__PURE__ */ e(
|
|
521
|
+
/* @__PURE__ */ e(xe, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
522
522
|
o
|
|
523
523
|
]
|
|
524
524
|
}
|
|
@@ -596,7 +596,7 @@ function Oe({
|
|
|
596
596
|
}
|
|
597
597
|
)
|
|
598
598
|
] });
|
|
599
|
-
const t = u.data, y = d.record(t.collection, t.item), f = d.person((p = t.recipient) == null ? void 0 : p.id),
|
|
599
|
+
const t = u.data, y = d.record(t.collection, t.item), f = d.person((p = t.recipient) == null ? void 0 : p.id), x = d.person((I = t.sender) == null ? void 0 : I.id), R = t.read_at && t.timestamp ? (new Date(t.read_at).getTime() - new Date(t.timestamp).getTime()) / 6e4 : null;
|
|
600
600
|
return /* @__PURE__ */ r(S, { children: [
|
|
601
601
|
/* @__PURE__ */ e(
|
|
602
602
|
ae,
|
|
@@ -629,7 +629,7 @@ function Oe({
|
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
631
|
k: "From",
|
|
632
|
-
v: t.sender ? /* @__PURE__ */ e(_, { href:
|
|
632
|
+
v: t.sender ? /* @__PURE__ */ e(_, { href: x, onClick: x ? d.go(x) : void 0, children: t.sender.name }) : "The system"
|
|
633
633
|
},
|
|
634
634
|
{ k: "Category", v: v(t.category ?? "none") },
|
|
635
635
|
{ k: "Lane", v: v(t.lane ?? "fyi") },
|
|
@@ -753,7 +753,7 @@ function Ue({
|
|
|
753
753
|
queryKey: ["delivery-analytics", "leaf", "m", a, n],
|
|
754
754
|
queryFn: () => o.request(
|
|
755
755
|
F(`/delivery-analytics/mail/${a}`, n ? { reveal: 1 } : void 0)
|
|
756
|
-
).then((
|
|
756
|
+
).then((x) => x.data),
|
|
757
757
|
staleTime: Number.POSITIVE_INFINITY,
|
|
758
758
|
gcTime: 0,
|
|
759
759
|
refetchOnWindowFocus: !1,
|
|
@@ -806,12 +806,12 @@ function Ue({
|
|
|
806
806
|
k: "To",
|
|
807
807
|
v: /* @__PURE__ */ r(S, { children: [
|
|
808
808
|
t.to ?? "–",
|
|
809
|
-
t.recipients.length > 0 && /* @__PURE__ */ e("span", { className: "block text-[12px]", children: t.recipients.map((
|
|
810
|
-
const p = s.person(
|
|
809
|
+
t.recipients.length > 0 && /* @__PURE__ */ e("span", { className: "block text-[12px]", children: t.recipients.map((x, R) => {
|
|
810
|
+
const p = s.person(x.id);
|
|
811
811
|
return /* @__PURE__ */ r("span", { children: [
|
|
812
812
|
R > 0 && ", ",
|
|
813
|
-
/* @__PURE__ */ e(_, { href: p, onClick: p ? s.go(p) : void 0, children:
|
|
814
|
-
] },
|
|
813
|
+
/* @__PURE__ */ e(_, { href: p, onClick: p ? s.go(p) : void 0, children: x.name })
|
|
814
|
+
] }, x.id);
|
|
815
815
|
}) })
|
|
816
816
|
] })
|
|
817
817
|
},
|