@nivaro/react 0.3.134 → 0.3.135
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/shared/components/delivery-analytics/DeliveryAnalyticsView.js +13 -13
- package/dist/shared/components/delivery-analytics/charts.js +23 -23
- package/dist/shared/components/delivery-analytics/drill.js +358 -315
- package/dist/shared/components/delivery-analytics/ui.js +83 -75
- package/package.json +1 -1
|
@@ -1,25 +1,34 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
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
|
|
4
|
-
import { useState as
|
|
3
|
+
import { X as me, Download as he, ExternalLink as M, Mail as ue, ListFilter as pe, ChevronRight as G, ArrowLeft as be } from "lucide-react";
|
|
4
|
+
import { useState as V, useMemo as xe } from "react";
|
|
5
5
|
import { useNivaroClient as A, useApiFetchConfig as fe, useNavigation as ge, useItemNavigation as Ne } from "../../context.js";
|
|
6
|
-
import { get as
|
|
7
|
-
import { cn as
|
|
6
|
+
import { get as F } from "../../lib/commands.js";
|
|
7
|
+
import { cn as x } from "../../lib/utils.js";
|
|
8
8
|
import { ErrorDetails as Z } from "../ErrorNotice.js";
|
|
9
|
-
import { QueryErrorState as
|
|
10
|
-
import { Sheet as we, SheetContent as
|
|
9
|
+
import { QueryErrorState as K } from "../QueryErrorState.js";
|
|
10
|
+
import { Sheet as we, SheetContent as ve, SheetTitle as j, SheetDescription as ee } from "../ui/sheet.js";
|
|
11
11
|
import { Skeleton as $ } from "../ui/skeleton.js";
|
|
12
|
-
import { FilterPicker as
|
|
13
|
-
import { readDrill as _e, drillQuery as $e, fmtRange as J, titleize as
|
|
14
|
-
const Le = { n: "notifications", m: "emails", x: "mutes" }
|
|
12
|
+
import { FilterPicker as ke, OutcomeChip as E, ShareBar as ye } from "./ui.js";
|
|
13
|
+
import { readDrill as _e, drillQuery as $e, fmtRange as J, titleize as v, fmtInt as U, clearDrill as Ce, fmtWhen as k, mins as te, encodeCond as Se } from "./url.js";
|
|
14
|
+
const Le = { n: "notifications", m: "emails", x: "mutes" }, Te = {
|
|
15
|
+
acted: "Acted on it.",
|
|
16
|
+
read_no_action: "Read it, then did nothing on the record in that time.",
|
|
17
|
+
unread_no_action: "Neither read it nor did anything on the record in that time.",
|
|
18
|
+
window_open: "Not counted yet.",
|
|
19
|
+
not_record: "Not about a record they could act on, so it does not count either way."
|
|
20
|
+
}, Re = `<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data: cid:; style-src 'unsafe-inline'">`;
|
|
21
|
+
function qe(a) {
|
|
22
|
+
return `${Re}${a}`;
|
|
23
|
+
}
|
|
15
24
|
function W() {
|
|
16
25
|
const a = ge(), m = Ne();
|
|
17
26
|
return {
|
|
18
|
-
record: (o,
|
|
27
|
+
record: (o, s) => o && s && !/^(nivaro|directus)_/i.test(o) && !o.startsWith("__") ? m.urlFor({ collection: o, itemId: s }) : null,
|
|
19
28
|
person: (o) => o ? a.userUrl ? a.userUrl(o) : `/users/${o.toLowerCase()}` : null,
|
|
20
29
|
mailLog: (o) => a.consoleUrl ? a.consoleUrl(`/delivery?id=${o}`) : `/delivery?id=${o}`,
|
|
21
|
-
go: (o) => (
|
|
22
|
-
|
|
30
|
+
go: (o) => (s) => {
|
|
31
|
+
s.metaKey || s.ctrlKey || s.shiftKey || s.button !== 0 || (s.preventDefault(), a.navigate(o));
|
|
23
32
|
}
|
|
24
33
|
};
|
|
25
34
|
}
|
|
@@ -38,31 +47,31 @@ function _({
|
|
|
38
47
|
}
|
|
39
48
|
) : /* @__PURE__ */ e(S, { children: m });
|
|
40
49
|
}
|
|
41
|
-
function
|
|
50
|
+
function Ze({
|
|
42
51
|
params: a,
|
|
43
52
|
setParams: m,
|
|
44
53
|
summary: c,
|
|
45
54
|
labels: o
|
|
46
55
|
}) {
|
|
47
|
-
const
|
|
48
|
-
return /* @__PURE__ */ e(we, { open:
|
|
49
|
-
|
|
56
|
+
const s = _e(a), n = !!s, d = () => m(Ce);
|
|
57
|
+
return /* @__PURE__ */ e(we, { open: n, onOpenChange: (u) => !u && d(), children: /* @__PURE__ */ r(
|
|
58
|
+
ve,
|
|
50
59
|
{
|
|
51
60
|
side: "right",
|
|
52
61
|
"data-da-drill": "",
|
|
53
62
|
"aria-describedby": void 0,
|
|
54
63
|
className: "flex w-[96vw] flex-col gap-0 p-0 sm:max-w-[860px]",
|
|
55
64
|
children: [
|
|
56
|
-
|
|
57
|
-
/* @__PURE__ */ e(
|
|
65
|
+
s && !c && /* @__PURE__ */ r("div", { className: "space-y-2 p-5", "aria-busy": "true", children: [
|
|
66
|
+
/* @__PURE__ */ e(j, { className: "sr-only", children: "Loading" }),
|
|
58
67
|
/* @__PURE__ */ e($, { className: "h-5 w-1/2" }),
|
|
59
68
|
/* @__PURE__ */ e($, { className: "h-40 w-full" })
|
|
60
69
|
] }),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
s && c && s.leaf && /* @__PURE__ */ e(Be, { drill: s, setParams: m, summary: c }),
|
|
71
|
+
s && c && !s.leaf && /* @__PURE__ */ e(
|
|
72
|
+
De,
|
|
64
73
|
{
|
|
65
|
-
drill:
|
|
74
|
+
drill: s,
|
|
66
75
|
params: a,
|
|
67
76
|
setParams: m,
|
|
68
77
|
summary: c,
|
|
@@ -73,125 +82,125 @@ function Xe({
|
|
|
73
82
|
}
|
|
74
83
|
) });
|
|
75
84
|
}
|
|
76
|
-
function
|
|
85
|
+
function Ee() {
|
|
77
86
|
const a = A();
|
|
78
87
|
return P({
|
|
79
88
|
queryKey: ["delivery-analytics", "dimensions"],
|
|
80
89
|
queryFn: () => a.request(
|
|
81
|
-
|
|
90
|
+
F("/delivery-analytics/dimensions")
|
|
82
91
|
).then((m) => m.data),
|
|
83
92
|
staleTime: Number.POSITIVE_INFINITY
|
|
84
93
|
});
|
|
85
94
|
}
|
|
86
|
-
function
|
|
87
|
-
var
|
|
88
|
-
const
|
|
89
|
-
return `${
|
|
95
|
+
function je([a, m], c, o) {
|
|
96
|
+
var d;
|
|
97
|
+
const s = ((d = c == null ? void 0 : c.find((u) => u.key === a)) == null ? void 0 : d.label) ?? v(a.replace(/^ch[._]/, "")), n = m.map((u) => o.get(`${a}=${u}`) ?? o.get(u) ?? v(u));
|
|
98
|
+
return `${s}: ${n.length > 2 ? `${n.slice(0, 2).join(", ")} +${n.length - 2}` : n.join(", ")}`;
|
|
90
99
|
}
|
|
91
|
-
function
|
|
100
|
+
function De({
|
|
92
101
|
drill: a,
|
|
93
102
|
params: m,
|
|
94
103
|
setParams: c,
|
|
95
104
|
summary: o,
|
|
96
|
-
labels:
|
|
105
|
+
labels: s
|
|
97
106
|
}) {
|
|
98
|
-
var
|
|
99
|
-
const
|
|
100
|
-
queryKey: ["delivery-analytics", "rows",
|
|
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), b = a.sort, R = f.toString(), p = ce({
|
|
109
|
+
queryKey: ["delivery-analytics", "rows", R, b],
|
|
101
110
|
initialPageParam: "0",
|
|
102
|
-
queryFn: ({ pageParam:
|
|
103
|
-
const
|
|
104
|
-
return
|
|
111
|
+
queryFn: ({ pageParam: l }) => {
|
|
112
|
+
const i = new URLSearchParams(f);
|
|
113
|
+
return i.set("cursor", String(l)), i.set("limit", "50"), b === "ttr" && i.set("sort", "ttr"), b === "time-asc" && i.set("dir", "asc"), n.request(F(`/delivery-analytics/rows?${i.toString()}`)).then((g) => g.data);
|
|
105
114
|
},
|
|
106
|
-
getNextPageParam: (
|
|
115
|
+
getNextPageParam: (l) => l.next_cursor ?? void 0,
|
|
107
116
|
staleTime: 6e4
|
|
108
|
-
}),
|
|
109
|
-
queryKey: ["delivery-analytics", "split",
|
|
117
|
+
}), I = P({
|
|
118
|
+
queryKey: ["delivery-analytics", "split", R, a.splitBy],
|
|
110
119
|
enabled: !!a.splitBy,
|
|
111
120
|
queryFn: () => {
|
|
112
|
-
const
|
|
113
|
-
return
|
|
121
|
+
const l = new URLSearchParams(f);
|
|
122
|
+
return l.set("by", String(a.splitBy)), n.request(F(`/delivery-analytics/split?${l.toString()}`)).then((i) => i.data);
|
|
114
123
|
},
|
|
115
124
|
staleTime: 6e4
|
|
116
|
-
}), [
|
|
117
|
-
var
|
|
118
|
-
return ((
|
|
119
|
-
}, [
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
for (const C of
|
|
123
|
-
|
|
124
|
-
}),
|
|
125
|
-
|
|
126
|
-
const C =
|
|
127
|
-
|
|
128
|
-
}), ie = (
|
|
129
|
-
(
|
|
130
|
-
|
|
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 = xe(() => {
|
|
126
|
+
var l;
|
|
127
|
+
return ((l = p.data) == null ? void 0 : l.pages.flatMap((i) => i.rows)) ?? [];
|
|
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) => {
|
|
129
|
+
const g = i.getAll("dw").filter((C, T) => T !== l);
|
|
130
|
+
i.delete("dw");
|
|
131
|
+
for (const C of g) i.append("dw", C);
|
|
132
|
+
i.delete("dby");
|
|
133
|
+
}), le = (l, i) => c((g) => {
|
|
134
|
+
g.append("dw", Se(l)), g.delete("dby");
|
|
135
|
+
const C = g.get("dl");
|
|
136
|
+
g.set("dl", C ? `${C} · ${i}` : i);
|
|
137
|
+
}), ie = (l) => c(
|
|
138
|
+
(i) => {
|
|
139
|
+
l === "time" ? i.delete("ds") : i.set("ds", l);
|
|
131
140
|
},
|
|
132
141
|
{ replace: !0 }
|
|
133
142
|
), de = async () => {
|
|
134
|
-
|
|
143
|
+
L(!0), Q(!1);
|
|
135
144
|
try {
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
const
|
|
139
|
-
headers:
|
|
140
|
-
credentials:
|
|
145
|
+
const l = new URLSearchParams(f);
|
|
146
|
+
l.set("format", "csv"), b === "ttr" && l.set("sort", "ttr"), b === "time-asc" && l.set("dir", "asc");
|
|
147
|
+
const i = await fetch(`${d.apiBase}/delivery-analytics/rows?${l}`, {
|
|
148
|
+
headers: d.authHeaders,
|
|
149
|
+
credentials: d.credentials
|
|
141
150
|
});
|
|
142
|
-
if (!
|
|
143
|
-
const
|
|
144
|
-
T.href = C, T.download = `delivery-${
|
|
151
|
+
if (!i.ok) throw new Error(String(i.status));
|
|
152
|
+
const g = await i.blob(), C = URL.createObjectURL(g), T = document.createElement("a");
|
|
153
|
+
T.href = C, T.download = `delivery-${O}.csv`, document.body.appendChild(T), T.click(), T.remove(), setTimeout(() => URL.revokeObjectURL(C), 3e4);
|
|
145
154
|
} catch {
|
|
146
|
-
|
|
155
|
+
Q(!0);
|
|
147
156
|
} finally {
|
|
148
|
-
|
|
157
|
+
L(!1);
|
|
149
158
|
}
|
|
150
159
|
};
|
|
151
|
-
return /* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */ e(
|
|
154
|
-
/* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ r(S, { children: [
|
|
161
|
+
/* @__PURE__ */ r("div", { className: "shrink-0 border-b border-slate-200 px-5 pb-3 pt-4 pr-12 dark:border-border", children: [
|
|
162
|
+
/* @__PURE__ */ e(j, { className: "truncate text-[16px] font-semibold tracking-[-0.01em] text-slate-900 dark:text-foreground", children: a.label ?? `${v(O)}` }),
|
|
163
|
+
/* @__PURE__ */ r(ee, { className: "mt-0.5 text-[12px] text-slate-500 dark:text-muted-foreground", children: [
|
|
155
164
|
/* @__PURE__ */ e(
|
|
156
165
|
"span",
|
|
157
166
|
{
|
|
158
|
-
"data-da-drill-total":
|
|
167
|
+
"data-da-drill-total": q ?? "",
|
|
159
168
|
className: "font-medium tabular-nums text-slate-800 dark:text-foreground",
|
|
160
|
-
children:
|
|
169
|
+
children: q == null ? "…" : U(q)
|
|
161
170
|
}
|
|
162
171
|
),
|
|
163
172
|
" ",
|
|
164
|
-
|
|
173
|
+
q === 1 ? O.replace(/s$/, "") : O,
|
|
165
174
|
" · ",
|
|
166
|
-
|
|
175
|
+
oe
|
|
167
176
|
] }),
|
|
168
|
-
a.where.length > 0 && /* @__PURE__ */ e("ul", { className: "mt-2 flex flex-wrap gap-1.5", "aria-label": "Conditions", children: a.where.map((
|
|
177
|
+
a.where.length > 0 && /* @__PURE__ */ e("ul", { className: "mt-2 flex flex-wrap gap-1.5", "aria-label": "Conditions", children: a.where.map((l, i) => (
|
|
169
178
|
// biome-ignore lint/suspicious/noArrayIndexKey: the same condition may repeat; position is its identity
|
|
170
|
-
/* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
179
|
+
/* @__PURE__ */ e("li", { children: /* @__PURE__ */ r("span", { className: "inline-flex max-w-[320px] items-center gap-1 rounded-full border border-slate-200 bg-slate-50 py-0.5 pl-2 pr-1 text-[11.5px] text-slate-700 dark:border-border dark:bg-muted dark:text-foreground", children: [
|
|
180
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: je(l, t, s) }),
|
|
172
181
|
/* @__PURE__ */ e(
|
|
173
182
|
"button",
|
|
174
183
|
{
|
|
175
184
|
type: "button",
|
|
176
185
|
"aria-label": "Remove this condition",
|
|
177
186
|
"data-tip": "Remove this condition",
|
|
178
|
-
onClick: () =>
|
|
187
|
+
onClick: () => se(i),
|
|
179
188
|
className: "rounded-full p-0.5 text-slate-400 hover:bg-slate-200 hover:text-slate-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:hover:bg-border dark:hover:text-foreground",
|
|
180
189
|
children: /* @__PURE__ */ e(me, { className: "h-3 w-3" })
|
|
181
190
|
}
|
|
182
191
|
)
|
|
183
|
-
] }) }, `${
|
|
192
|
+
] }) }, `${l[0]}:${i}`)
|
|
184
193
|
)) }),
|
|
185
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ r("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [
|
|
186
195
|
t && /* @__PURE__ */ e(
|
|
187
|
-
|
|
196
|
+
ke,
|
|
188
197
|
{
|
|
189
198
|
label: "Break down by",
|
|
190
199
|
allLabel: "Nothing",
|
|
191
200
|
value: a.splitBy,
|
|
192
|
-
options: t.filter((
|
|
193
|
-
onChange: (
|
|
194
|
-
|
|
201
|
+
options: t.filter((l) => !a.where.some(([i]) => i === l.key)).map((l) => ({ value: l.key, label: l.label })),
|
|
202
|
+
onChange: (l) => c((i) => {
|
|
203
|
+
l ? i.set("dby", l) : i.delete("dby");
|
|
195
204
|
})
|
|
196
205
|
}
|
|
197
206
|
),
|
|
@@ -207,85 +216,85 @@ function qe({
|
|
|
207
216
|
["time", "Newest"],
|
|
208
217
|
["time-asc", "Oldest"],
|
|
209
218
|
...a.source === "n" ? [["ttr", "Slowest read"]] : []
|
|
210
|
-
].map(([
|
|
219
|
+
].map(([l, i]) => /* @__PURE__ */ e(
|
|
211
220
|
"button",
|
|
212
221
|
{
|
|
213
222
|
type: "button",
|
|
214
|
-
"aria-pressed":
|
|
215
|
-
onClick: () => ie(
|
|
216
|
-
className:
|
|
223
|
+
"aria-pressed": b === l,
|
|
224
|
+
onClick: () => ie(l),
|
|
225
|
+
className: x(
|
|
217
226
|
"rounded px-2 py-0.5 font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50",
|
|
218
|
-
|
|
227
|
+
b === 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"
|
|
219
228
|
),
|
|
220
|
-
children:
|
|
229
|
+
children: i
|
|
221
230
|
},
|
|
222
|
-
|
|
231
|
+
l
|
|
223
232
|
))
|
|
224
233
|
}
|
|
225
234
|
),
|
|
226
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ r(
|
|
227
236
|
"button",
|
|
228
237
|
{
|
|
229
238
|
type: "button",
|
|
230
239
|
onClick: () => void de(),
|
|
231
|
-
disabled:
|
|
232
|
-
"data-tip":
|
|
240
|
+
disabled: h || !q,
|
|
241
|
+
"data-tip": z ? "The file could not be made — try again" : "Download these rows as CSV",
|
|
233
242
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:border-border dark:text-foreground dark:hover:bg-muted",
|
|
234
243
|
children: [
|
|
235
244
|
/* @__PURE__ */ e(he, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
|
|
236
|
-
|
|
245
|
+
h ? "Preparing…" : z ? "Try CSV again" : "CSV"
|
|
237
246
|
]
|
|
238
247
|
}
|
|
239
248
|
)
|
|
240
249
|
] })
|
|
241
250
|
] }),
|
|
242
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 overflow-y-auto bg-white dark:bg-background", children: [
|
|
243
252
|
a.splitBy && /* @__PURE__ */ e(
|
|
244
|
-
|
|
253
|
+
Fe,
|
|
245
254
|
{
|
|
246
|
-
split:
|
|
247
|
-
onPick: (
|
|
248
|
-
const
|
|
249
|
-
|
|
255
|
+
split: I,
|
|
256
|
+
onPick: (l, i) => {
|
|
257
|
+
const g = String(a.splitBy);
|
|
258
|
+
le([g, [l]], i);
|
|
250
259
|
}
|
|
251
260
|
}
|
|
252
261
|
),
|
|
253
|
-
|
|
262
|
+
p.isLoading ? /* @__PURE__ */ e("div", { className: "space-y-2 p-5", "aria-busy": "true", children: Array.from({ length: 6 }, (l, i) => (
|
|
254
263
|
// biome-ignore lint/suspicious/noArrayIndexKey: skeleton rows
|
|
255
|
-
/* @__PURE__ */ e($, { className: "h-9 w-full" },
|
|
256
|
-
)) }) :
|
|
257
|
-
|
|
264
|
+
/* @__PURE__ */ e($, { className: "h-9 w-full" }, i)
|
|
265
|
+
)) }) : p.isError ? /* @__PURE__ */ e("div", { className: "p-5", children: /* @__PURE__ */ e(
|
|
266
|
+
K,
|
|
258
267
|
{
|
|
259
|
-
error:
|
|
268
|
+
error: p.error,
|
|
260
269
|
what: "these rows",
|
|
261
|
-
onRetry: () => void
|
|
270
|
+
onRetry: () => void p.refetch()
|
|
262
271
|
}
|
|
263
|
-
) }) :
|
|
272
|
+
) }) : B.length === 0 ? /* @__PURE__ */ e("p", { className: "px-5 py-10 text-center text-[12.5px] text-slate-500 dark:text-muted-foreground", children: "Nothing here now. The rows may have changed since the figure was read — reload the page to recount." }) : /* @__PURE__ */ r("div", { className: "px-5 py-4", children: [
|
|
264
273
|
/* @__PURE__ */ e(
|
|
265
|
-
|
|
274
|
+
Ie,
|
|
266
275
|
{
|
|
267
276
|
source: a.source,
|
|
268
|
-
rows:
|
|
269
|
-
onOpen: (
|
|
270
|
-
|
|
277
|
+
rows: B,
|
|
278
|
+
onOpen: (l) => c((i) => {
|
|
279
|
+
i.set("leaf", `${a.source}:${l}`);
|
|
271
280
|
})
|
|
272
281
|
}
|
|
273
282
|
),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ r("div", { className: "mt-3 flex items-center justify-between text-[11.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
284
|
+
/* @__PURE__ */ r("span", { className: "tabular-nums", children: [
|
|
276
285
|
"Showing ",
|
|
277
|
-
|
|
286
|
+
U(B.length),
|
|
278
287
|
" of ",
|
|
279
|
-
|
|
288
|
+
U(q ?? B.length)
|
|
280
289
|
] }),
|
|
281
|
-
|
|
290
|
+
p.hasNextPage && /* @__PURE__ */ e(
|
|
282
291
|
"button",
|
|
283
292
|
{
|
|
284
293
|
type: "button",
|
|
285
|
-
onClick: () => void
|
|
286
|
-
disabled:
|
|
294
|
+
onClick: () => void p.fetchNextPage(),
|
|
295
|
+
disabled: p.isFetchingNextPage,
|
|
287
296
|
className: "rounded-md border border-slate-200 px-3 py-1 font-medium text-slate-700 hover:bg-slate-50 disabled:opacity-50 dark:border-border dark:text-foreground dark:hover:bg-muted",
|
|
288
|
-
children:
|
|
297
|
+
children: p.isFetchingNextPage ? "Loading…" : "Load 50 more"
|
|
289
298
|
}
|
|
290
299
|
)
|
|
291
300
|
] })
|
|
@@ -293,12 +302,12 @@ function qe({
|
|
|
293
302
|
] })
|
|
294
303
|
] });
|
|
295
304
|
}
|
|
296
|
-
function
|
|
305
|
+
function Fe({
|
|
297
306
|
split: a,
|
|
298
307
|
onPick: m
|
|
299
308
|
}) {
|
|
300
309
|
if (a.isLoading)
|
|
301
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ r(
|
|
302
311
|
"div",
|
|
303
312
|
{
|
|
304
313
|
className: "space-y-1.5 border-b border-slate-100 px-5 py-4 dark:border-border",
|
|
@@ -312,151 +321,151 @@ function De({
|
|
|
312
321
|
);
|
|
313
322
|
if (a.isError || !a.data)
|
|
314
323
|
return /* @__PURE__ */ e("div", { className: "border-b border-slate-100 px-5 py-4 dark:border-border", children: /* @__PURE__ */ e(
|
|
315
|
-
|
|
324
|
+
K,
|
|
316
325
|
{
|
|
317
326
|
error: a.error,
|
|
318
327
|
what: "this breakdown",
|
|
319
328
|
onRetry: () => void a.refetch()
|
|
320
329
|
}
|
|
321
330
|
) });
|
|
322
|
-
const c = a.data, o = Math.max(1, ...c.rows.map((
|
|
323
|
-
return /* @__PURE__ */
|
|
331
|
+
const c = a.data, o = Math.max(1, ...c.rows.map((s) => s.cell.n));
|
|
332
|
+
return /* @__PURE__ */ r(
|
|
324
333
|
"section",
|
|
325
334
|
{
|
|
326
335
|
"aria-label": `By ${c.label}`,
|
|
327
336
|
className: "border-b border-slate-100 bg-slate-50/60 px-5 py-3 dark:border-border dark:bg-muted/20",
|
|
328
337
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ r("h4", { className: "mb-1.5 flex items-center gap-1.5 text-[12px] font-semibold text-slate-700 dark:text-foreground", children: [
|
|
330
339
|
/* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5 text-slate-400", "aria-hidden": !0 }),
|
|
331
340
|
"By ",
|
|
332
341
|
c.label.toLowerCase(),
|
|
333
342
|
/* @__PURE__ */ e("span", { className: "font-normal text-slate-500 dark:text-muted-foreground", children: "— pick one to narrow the list" })
|
|
334
343
|
] }),
|
|
335
|
-
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: c.rows.map((
|
|
344
|
+
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: c.rows.map((s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ r(
|
|
336
345
|
"button",
|
|
337
346
|
{
|
|
338
347
|
type: "button",
|
|
339
|
-
"data-da-split-row":
|
|
340
|
-
onClick: () => m(
|
|
348
|
+
"data-da-split-row": s.cell.n,
|
|
349
|
+
onClick: () => m(s.key, s.label),
|
|
341
350
|
className: "grid w-full grid-cols-[minmax(0,1fr)_120px_64px] items-center gap-3 rounded px-1 py-1.5 text-left text-[12.5px] hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:hover:bg-muted",
|
|
342
351
|
children: [
|
|
343
|
-
/* @__PURE__ */ e("span", { className: "truncate text-slate-800 dark:text-foreground", children:
|
|
344
|
-
/* @__PURE__ */ e(
|
|
345
|
-
/* @__PURE__ */ e("span", { className: "text-right tabular-nums text-slate-700 dark:text-foreground", children:
|
|
352
|
+
/* @__PURE__ */ e("span", { className: "truncate text-slate-800 dark:text-foreground", children: s.label }),
|
|
353
|
+
/* @__PURE__ */ e(ye, { value: s.cell.n, max: o }),
|
|
354
|
+
/* @__PURE__ */ e("span", { className: "text-right tabular-nums text-slate-700 dark:text-foreground", children: U(s.cell.n) })
|
|
346
355
|
]
|
|
347
356
|
}
|
|
348
|
-
) },
|
|
357
|
+
) }, s.key)) }),
|
|
349
358
|
c.more && /* @__PURE__ */ e("p", { className: "mt-1 text-[11px] text-slate-500 dark:text-muted-foreground", children: "The 50 largest are shown." })
|
|
350
359
|
]
|
|
351
360
|
}
|
|
352
361
|
);
|
|
353
362
|
}
|
|
354
|
-
const
|
|
355
|
-
function
|
|
363
|
+
const N = "whitespace-nowrap px-3 py-2 text-left text-[10.5px] font-medium uppercase tracking-wide text-slate-500 dark:text-muted-foreground", w = "px-3 py-2 align-top";
|
|
364
|
+
function Ie({
|
|
356
365
|
source: a,
|
|
357
366
|
rows: m,
|
|
358
367
|
onOpen: c
|
|
359
368
|
}) {
|
|
360
|
-
const o = W(),
|
|
369
|
+
const o = W(), s = (n) => a === "x" ? {} : {
|
|
361
370
|
tabIndex: 0,
|
|
362
371
|
role: "link",
|
|
363
372
|
"aria-label": "Open this row",
|
|
364
|
-
onClick: () => c(
|
|
365
|
-
onKeyDown: (
|
|
366
|
-
(
|
|
373
|
+
onClick: () => c(n),
|
|
374
|
+
onKeyDown: (d) => {
|
|
375
|
+
(d.key === "Enter" || d.key === " ") && (d.preventDefault(), c(n));
|
|
367
376
|
},
|
|
368
377
|
className: "group cursor-pointer border-b border-slate-100 last:border-0 hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-nvr-cyan/50 dark:border-border/60 dark:hover:bg-muted/60"
|
|
369
378
|
};
|
|
370
|
-
return /* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-lg border border-slate-200 dark:border-border", children: /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */ e("thead", { className: "border-b border-slate-200 bg-slate-50 dark:border-border dark:bg-muted/40", children: a === "n" ? /* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */ e("th", { className:
|
|
373
|
-
/* @__PURE__ */ e("th", { className:
|
|
374
|
-
/* @__PURE__ */ e("th", { className:
|
|
375
|
-
/* @__PURE__ */ e("th", { className:
|
|
376
|
-
/* @__PURE__ */ e("th", { className:
|
|
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
|
+
/* @__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
|
+
/* @__PURE__ */ e("th", { className: N, children: "Sent" }),
|
|
382
|
+
/* @__PURE__ */ e("th", { className: x(N, "hidden sm:table-cell"), children: "To" }),
|
|
383
|
+
/* @__PURE__ */ e("th", { className: N, children: "Subject" }),
|
|
384
|
+
/* @__PURE__ */ e("th", { className: x(N, "hidden md:table-cell"), children: "Channels" }),
|
|
385
|
+
/* @__PURE__ */ e("th", { className: x(N, "text-right"), children: "Read" }),
|
|
377
386
|
/* @__PURE__ */ e("th", { className: "w-6" })
|
|
378
|
-
] }) : a === "m" ? /* @__PURE__ */
|
|
379
|
-
/* @__PURE__ */ e("th", { className:
|
|
380
|
-
/* @__PURE__ */ e("th", { className:
|
|
381
|
-
/* @__PURE__ */ e("th", { className:
|
|
382
|
-
/* @__PURE__ */ e("th", { className:
|
|
387
|
+
] }) : a === "m" ? /* @__PURE__ */ r("tr", { children: [
|
|
388
|
+
/* @__PURE__ */ e("th", { className: N, children: "When" }),
|
|
389
|
+
/* @__PURE__ */ e("th", { className: x(N, "hidden sm:table-cell"), children: "To" }),
|
|
390
|
+
/* @__PURE__ */ e("th", { className: N, children: "Subject" }),
|
|
391
|
+
/* @__PURE__ */ e("th", { className: N, children: "Outcome" }),
|
|
383
392
|
/* @__PURE__ */ e("th", { className: "w-6" })
|
|
384
|
-
] }) : /* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */ e("th", { className:
|
|
386
|
-
/* @__PURE__ */ e("th", { className:
|
|
387
|
-
/* @__PURE__ */ e("th", { className:
|
|
393
|
+
] }) : /* @__PURE__ */ r("tr", { children: [
|
|
394
|
+
/* @__PURE__ */ e("th", { className: N, children: "Muted" }),
|
|
395
|
+
/* @__PURE__ */ e("th", { className: N, children: "Person" }),
|
|
396
|
+
/* @__PURE__ */ e("th", { className: N, children: "Record" })
|
|
388
397
|
] }) }),
|
|
389
|
-
/* @__PURE__ */
|
|
390
|
-
a === "n" && m.map((
|
|
398
|
+
/* @__PURE__ */ r("tbody", { className: "text-slate-700 dark:text-foreground", children: [
|
|
399
|
+
a === "n" && m.map((n) => /* @__PURE__ */ r("tr", { "data-da-row": n.id, ...s(n.id), children: [
|
|
391
400
|
/* @__PURE__ */ e(
|
|
392
401
|
"td",
|
|
393
402
|
{
|
|
394
|
-
className:
|
|
395
|
-
|
|
403
|
+
className: x(
|
|
404
|
+
w,
|
|
396
405
|
"whitespace-nowrap tabular-nums text-slate-500 dark:text-muted-foreground"
|
|
397
406
|
),
|
|
398
|
-
children:
|
|
407
|
+
children: k(n.timestamp)
|
|
399
408
|
}
|
|
400
409
|
),
|
|
401
|
-
/* @__PURE__ */ e("td", { className:
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */ e("span", { className: "line-clamp-2 [overflow-wrap:anywhere]", children:
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ e("td", { className: x(w, "hidden max-w-[150px] truncate sm:table-cell"), children: n.recipient_name ?? "–" }),
|
|
411
|
+
/* @__PURE__ */ r("td", { className: x(w, "min-w-[160px]"), children: [
|
|
412
|
+
/* @__PURE__ */ e("span", { className: "line-clamp-2 [overflow-wrap:anywhere]", children: n.subject ?? "(no subject)" }),
|
|
413
|
+
/* @__PURE__ */ r("span", { className: "text-[11px] text-slate-500 dark:text-muted-foreground", children: [
|
|
414
|
+
/* @__PURE__ */ r("span", { className: "sm:hidden", children: [
|
|
406
415
|
"To ",
|
|
407
|
-
|
|
416
|
+
n.recipient_name ?? "nobody",
|
|
408
417
|
" · "
|
|
409
418
|
] }),
|
|
410
|
-
|
|
411
|
-
|
|
419
|
+
n.sender_name ? `from ${n.sender_name} · ` : "",
|
|
420
|
+
n.reason_label
|
|
412
421
|
] })
|
|
413
422
|
] }),
|
|
414
|
-
/* @__PURE__ */ e("td", { className:
|
|
415
|
-
|
|
423
|
+
/* @__PURE__ */ e("td", { className: x(w, "hidden md:table-cell"), 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
|
+
d.channel === "inapp" ? "in-app" : d.channel === "sms" ? "SMS" : d.channel,
|
|
416
425
|
" ",
|
|
417
|
-
|
|
418
|
-
] }) },
|
|
419
|
-
/* @__PURE__ */ e("td", { className:
|
|
426
|
+
d.status.replace(/_/g, " ")
|
|
427
|
+
] }) }, d.channel)) }) }),
|
|
428
|
+
/* @__PURE__ */ e("td", { className: x(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" }) }),
|
|
420
429
|
/* @__PURE__ */ e("td", { className: "w-6 pr-2 pt-2.5 align-top", children: /* @__PURE__ */ e(
|
|
421
|
-
|
|
430
|
+
G,
|
|
422
431
|
{
|
|
423
432
|
className: "h-3.5 w-3.5 text-slate-300 group-hover:text-slate-500 dark:text-muted-foreground/50",
|
|
424
433
|
"aria-hidden": !0
|
|
425
434
|
}
|
|
426
435
|
) })
|
|
427
|
-
] },
|
|
428
|
-
a === "m" && m.map((
|
|
436
|
+
] }, n.id)),
|
|
437
|
+
a === "m" && m.map((n) => /* @__PURE__ */ r("tr", { "data-da-row": n.id, ...s(n.id), children: [
|
|
429
438
|
/* @__PURE__ */ e(
|
|
430
439
|
"td",
|
|
431
440
|
{
|
|
432
|
-
className:
|
|
433
|
-
|
|
441
|
+
className: x(
|
|
442
|
+
w,
|
|
434
443
|
"whitespace-nowrap tabular-nums text-slate-500 dark:text-muted-foreground"
|
|
435
444
|
),
|
|
436
|
-
children:
|
|
445
|
+
children: k(n.created_at)
|
|
437
446
|
}
|
|
438
447
|
),
|
|
439
|
-
/* @__PURE__ */ e("td", { className:
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */ e("span", { className: "line-clamp-2 [overflow-wrap:anywhere]", children:
|
|
442
|
-
/* @__PURE__ */
|
|
443
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ e("td", { className: x(w, "hidden max-w-[180px] truncate sm:table-cell"), children: n.to ?? "–" }),
|
|
449
|
+
/* @__PURE__ */ r("td", { className: x(w, "min-w-[160px]"), children: [
|
|
450
|
+
/* @__PURE__ */ e("span", { className: "line-clamp-2 [overflow-wrap:anywhere]", children: n.subject ?? "(no subject)" }),
|
|
451
|
+
/* @__PURE__ */ r("span", { className: "block text-[11px] text-slate-500 dark:text-muted-foreground", children: [
|
|
452
|
+
/* @__PURE__ */ r("span", { className: "sm:hidden", children: [
|
|
444
453
|
"To ",
|
|
445
|
-
|
|
454
|
+
n.to ?? "nobody"
|
|
446
455
|
] }),
|
|
447
|
-
|
|
456
|
+
n.template && /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: n.template })
|
|
448
457
|
] })
|
|
449
458
|
] }),
|
|
450
|
-
/* @__PURE__ */ e("td", { className:
|
|
459
|
+
/* @__PURE__ */ e("td", { className: w, children: /* @__PURE__ */ e(E, { outcome: n.outcome, children: n.reason_label }) }),
|
|
451
460
|
/* @__PURE__ */ e("td", { className: "w-6 pr-2 pt-2.5 align-top", children: /* @__PURE__ */ e(
|
|
452
|
-
|
|
461
|
+
G,
|
|
453
462
|
{
|
|
454
463
|
className: "h-3.5 w-3.5 text-slate-300 group-hover:text-slate-500 dark:text-muted-foreground/50",
|
|
455
464
|
"aria-hidden": !0
|
|
456
465
|
}
|
|
457
466
|
) })
|
|
458
|
-
] },
|
|
459
|
-
a === "x" && m.map((
|
|
467
|
+
] }, n.id)),
|
|
468
|
+
a === "x" && m.map((n) => /* @__PURE__ */ r(
|
|
460
469
|
"tr",
|
|
461
470
|
{
|
|
462
471
|
className: "border-b border-slate-100 last:border-0 dark:border-border/60",
|
|
@@ -464,32 +473,32 @@ function je({
|
|
|
464
473
|
/* @__PURE__ */ e(
|
|
465
474
|
"td",
|
|
466
475
|
{
|
|
467
|
-
className:
|
|
468
|
-
|
|
476
|
+
className: x(
|
|
477
|
+
w,
|
|
469
478
|
"whitespace-nowrap tabular-nums text-slate-500 dark:text-muted-foreground"
|
|
470
479
|
),
|
|
471
|
-
children:
|
|
480
|
+
children: k(n.created_at)
|
|
472
481
|
}
|
|
473
482
|
),
|
|
474
|
-
/* @__PURE__ */ e("td", { className:
|
|
483
|
+
/* @__PURE__ */ e("td", { className: w, children: /* @__PURE__ */ e(
|
|
475
484
|
_,
|
|
476
485
|
{
|
|
477
|
-
href: o.person(
|
|
478
|
-
onClick: o.person(
|
|
479
|
-
children:
|
|
486
|
+
href: o.person(n.user),
|
|
487
|
+
onClick: o.person(n.user) ? o.go(String(o.person(n.user))) : void 0,
|
|
488
|
+
children: n.user_name ?? "Unknown person"
|
|
480
489
|
}
|
|
481
490
|
) }),
|
|
482
|
-
/* @__PURE__ */ e("td", { className:
|
|
483
|
-
const
|
|
484
|
-
return /* @__PURE__ */
|
|
485
|
-
|
|
491
|
+
/* @__PURE__ */ e("td", { className: w, children: (() => {
|
|
492
|
+
const d = o.record(n.collection, n.item);
|
|
493
|
+
return /* @__PURE__ */ r(_, { href: d, onClick: d ? o.go(d) : void 0, children: [
|
|
494
|
+
v(n.collection ?? ""),
|
|
486
495
|
" #",
|
|
487
|
-
|
|
496
|
+
n.item
|
|
488
497
|
] });
|
|
489
498
|
})() })
|
|
490
499
|
]
|
|
491
500
|
},
|
|
492
|
-
|
|
501
|
+
n.id
|
|
493
502
|
))
|
|
494
503
|
] })
|
|
495
504
|
] }) });
|
|
@@ -500,8 +509,8 @@ function ae({
|
|
|
500
509
|
onBack: c,
|
|
501
510
|
backLabel: o
|
|
502
511
|
}) {
|
|
503
|
-
return /* @__PURE__ */
|
|
504
|
-
c && /* @__PURE__ */
|
|
512
|
+
return /* @__PURE__ */ r("div", { className: "shrink-0 border-b border-slate-200 px-5 pb-3.5 pt-4 pr-12 dark:border-border", children: [
|
|
513
|
+
c && /* @__PURE__ */ r(
|
|
505
514
|
"button",
|
|
506
515
|
{
|
|
507
516
|
type: "button",
|
|
@@ -514,68 +523,72 @@ function ae({
|
|
|
514
523
|
]
|
|
515
524
|
}
|
|
516
525
|
),
|
|
517
|
-
/* @__PURE__ */ e(
|
|
526
|
+
/* @__PURE__ */ e(j, { className: "line-clamp-2 text-[16px] font-semibold tracking-[-0.01em] text-slate-900 dark:text-foreground", children: a }),
|
|
518
527
|
/* @__PURE__ */ e(ee, { className: "mt-0.5 text-[12px] text-slate-500 dark:text-muted-foreground", children: m })
|
|
519
528
|
] });
|
|
520
529
|
}
|
|
521
530
|
function re({ items: a }) {
|
|
522
|
-
return /* @__PURE__ */ e("dl", { className: "grid grid-cols-[minmax(110px,max-content)_1fr] gap-x-6 gap-y-1.5 text-[12.5px]", children: a.map(({ k: m, v: c }) => /* @__PURE__ */
|
|
531
|
+
return /* @__PURE__ */ e("dl", { className: "grid grid-cols-[minmax(110px,max-content)_1fr] gap-x-6 gap-y-1.5 text-[12.5px]", children: a.map(({ k: m, v: c }) => /* @__PURE__ */ r("div", { className: "contents", children: [
|
|
523
532
|
/* @__PURE__ */ e("dt", { className: "text-slate-500 dark:text-muted-foreground", children: m }),
|
|
524
533
|
/* @__PURE__ */ e("dd", { className: "min-w-0 break-words text-slate-900 dark:text-foreground", children: c })
|
|
525
534
|
] }, m)) });
|
|
526
535
|
}
|
|
527
|
-
function
|
|
528
|
-
return /* @__PURE__ */
|
|
536
|
+
function D({ title: a, children: m }) {
|
|
537
|
+
return /* @__PURE__ */ r("section", { children: [
|
|
529
538
|
/* @__PURE__ */ e("h4", { className: "mb-1.5 text-[12px] font-semibold text-slate-800 dark:text-foreground", children: a }),
|
|
530
539
|
m
|
|
531
540
|
] });
|
|
532
541
|
}
|
|
533
|
-
function
|
|
542
|
+
function Be({
|
|
534
543
|
drill: a,
|
|
535
544
|
setParams: m,
|
|
536
545
|
summary: c
|
|
537
546
|
}) {
|
|
538
|
-
const o = a.leaf,
|
|
547
|
+
const o = a.leaf, s = a.where.length > 0 || a.label ? () => m((d) => d.delete("leaf")) : null, n = a.label ? `Back to ${a.label}` : "Back";
|
|
539
548
|
return o.source === "n" ? /* @__PURE__ */ e(
|
|
540
|
-
|
|
549
|
+
Oe,
|
|
541
550
|
{
|
|
542
551
|
id: o.id,
|
|
543
|
-
onBack:
|
|
544
|
-
backLabel:
|
|
552
|
+
onBack: s,
|
|
553
|
+
backLabel: n,
|
|
545
554
|
summary: c,
|
|
546
555
|
setParams: m
|
|
547
556
|
}
|
|
548
|
-
) : /* @__PURE__ */ e(
|
|
557
|
+
) : /* @__PURE__ */ e(Ue, { id: o.id, onBack: s, backLabel: n });
|
|
549
558
|
}
|
|
550
559
|
function ne() {
|
|
551
|
-
return /* @__PURE__ */
|
|
552
|
-
/* @__PURE__ */ e(
|
|
560
|
+
return /* @__PURE__ */ r("div", { className: "space-y-3 p-5", "aria-busy": "true", children: [
|
|
561
|
+
/* @__PURE__ */ e(j, { className: "sr-only", children: "Loading" }),
|
|
553
562
|
/* @__PURE__ */ e($, { className: "h-5 w-2/3" }),
|
|
554
563
|
/* @__PURE__ */ e($, { className: "h-24 w-full" }),
|
|
555
564
|
/* @__PURE__ */ e($, { className: "h-40 w-full" })
|
|
556
565
|
] });
|
|
557
566
|
}
|
|
558
|
-
function
|
|
567
|
+
function Oe({
|
|
559
568
|
id: a,
|
|
560
569
|
onBack: m,
|
|
561
570
|
backLabel: c,
|
|
562
571
|
summary: o,
|
|
563
|
-
setParams:
|
|
572
|
+
setParams: s
|
|
564
573
|
}) {
|
|
565
|
-
var
|
|
566
|
-
const
|
|
567
|
-
queryKey: ["delivery-analytics", "leaf", "n", a, o.acted_hours],
|
|
568
|
-
queryFn: () =>
|
|
569
|
-
|
|
574
|
+
var p, I;
|
|
575
|
+
const n = A(), d = W(), u = P({
|
|
576
|
+
queryKey: ["delivery-analytics", "leaf", "n", a, o.acted_hours, o.asof],
|
|
577
|
+
queryFn: () => n.request(
|
|
578
|
+
// The figures' asof: the leaf's acted verdict is the one they counted.
|
|
579
|
+
F(`/delivery-analytics/notifications/${a}`, {
|
|
580
|
+
acted_hours: o.acted_hours,
|
|
581
|
+
asof: o.asof
|
|
582
|
+
})
|
|
570
583
|
).then((h) => h.data),
|
|
571
584
|
staleTime: 6e4
|
|
572
585
|
});
|
|
573
586
|
if (u.isLoading) return /* @__PURE__ */ e(ne, {});
|
|
574
587
|
if (u.isError || !u.data)
|
|
575
|
-
return /* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */ e(
|
|
588
|
+
return /* @__PURE__ */ r("div", { className: "p-5", children: [
|
|
589
|
+
/* @__PURE__ */ e(j, { className: "sr-only", children: "Notification" }),
|
|
577
590
|
/* @__PURE__ */ e(
|
|
578
|
-
|
|
591
|
+
K,
|
|
579
592
|
{
|
|
580
593
|
error: u.error,
|
|
581
594
|
what: "this notification",
|
|
@@ -583,31 +596,31 @@ function Be({
|
|
|
583
596
|
}
|
|
584
597
|
)
|
|
585
598
|
] });
|
|
586
|
-
const t = u.data,
|
|
587
|
-
return /* @__PURE__ */
|
|
599
|
+
const t = u.data, y = d.record(t.collection, t.item), f = d.person((p = t.recipient) == null ? void 0 : p.id), b = 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
|
+
return /* @__PURE__ */ r(S, { children: [
|
|
588
601
|
/* @__PURE__ */ e(
|
|
589
602
|
ae,
|
|
590
603
|
{
|
|
591
604
|
title: t.subject ?? "(no subject)",
|
|
592
|
-
sub: /* @__PURE__ */
|
|
605
|
+
sub: /* @__PURE__ */ r(S, { children: [
|
|
593
606
|
"Notification #",
|
|
594
607
|
t.id,
|
|
595
608
|
" · sent ",
|
|
596
|
-
|
|
609
|
+
k(t.timestamp)
|
|
597
610
|
] }),
|
|
598
611
|
onBack: m,
|
|
599
612
|
backLabel: c
|
|
600
613
|
}
|
|
601
614
|
),
|
|
602
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 space-y-5 overflow-y-auto bg-white p-5 dark:bg-background", children: [
|
|
603
616
|
/* @__PURE__ */ e(
|
|
604
617
|
re,
|
|
605
618
|
{
|
|
606
619
|
items: [
|
|
607
620
|
{
|
|
608
621
|
k: "To",
|
|
609
|
-
v: t.recipient ? /* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */ e(_, { href:
|
|
622
|
+
v: t.recipient ? /* @__PURE__ */ r(S, { children: [
|
|
623
|
+
/* @__PURE__ */ e(_, { href: f, onClick: f ? d.go(f) : void 0, children: t.recipient.name }),
|
|
611
624
|
/* @__PURE__ */ e("span", { className: "text-slate-500 dark:text-muted-foreground", children: [
|
|
612
625
|
t.recipient.role,
|
|
613
626
|
t.recipient.status && t.recipient.status !== "active" ? t.recipient.status : null
|
|
@@ -616,37 +629,37 @@ function Be({
|
|
|
616
629
|
},
|
|
617
630
|
{
|
|
618
631
|
k: "From",
|
|
619
|
-
v: t.sender ? /* @__PURE__ */ e(_, { href:
|
|
632
|
+
v: t.sender ? /* @__PURE__ */ e(_, { href: b, onClick: b ? d.go(b) : void 0, children: t.sender.name }) : "The system"
|
|
620
633
|
},
|
|
621
|
-
{ k: "Category", v:
|
|
622
|
-
{ k: "Lane", v:
|
|
634
|
+
{ k: "Category", v: v(t.category ?? "none") },
|
|
635
|
+
{ k: "Lane", v: v(t.lane ?? "fyi") },
|
|
623
636
|
{
|
|
624
637
|
k: "Record",
|
|
625
|
-
v:
|
|
626
|
-
|
|
638
|
+
v: y ? /* @__PURE__ */ r(_, { href: y, onClick: d.go(y), children: [
|
|
639
|
+
v(t.collection ?? ""),
|
|
627
640
|
" #",
|
|
628
641
|
t.item,
|
|
629
|
-
/* @__PURE__ */ e(
|
|
630
|
-
] }) : t.collection ? `${
|
|
642
|
+
/* @__PURE__ */ e(M, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
643
|
+
] }) : t.collection ? `${v(t.collection)}${t.item ? ` #${t.item}` : ""}` : "None"
|
|
631
644
|
},
|
|
632
645
|
{
|
|
633
646
|
k: "Read",
|
|
634
|
-
v: t.status === "inbox" ? t.snoozed_until ? `Snoozed until ${
|
|
647
|
+
v: t.status === "inbox" ? t.snoozed_until ? `Snoozed until ${k(t.snoozed_until)}` : "Not yet" : t.read_at ? `${k(t.read_at)} · ${te(R)} after it was sent` : `Yes (${t.status}) — no read time recorded`
|
|
635
648
|
}
|
|
636
649
|
]
|
|
637
650
|
}
|
|
638
651
|
),
|
|
639
|
-
/* @__PURE__ */ e(
|
|
640
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ e(D, { title: "Why they got it", children: t.reason ? /* @__PURE__ */ r("div", { className: "rounded-lg border border-slate-200 px-3.5 py-3 text-[12.5px] dark:border-border", children: [
|
|
653
|
+
/* @__PURE__ */ r("p", { className: "font-medium text-slate-900 dark:text-foreground", children: [
|
|
641
654
|
t.reason.kind_label,
|
|
642
|
-
t.reason.critical && /* @__PURE__ */ e("span", { className: "ml-2", children: /* @__PURE__ */ e(
|
|
655
|
+
t.reason.critical && /* @__PURE__ */ e("span", { className: "ml-2", children: /* @__PURE__ */ e(E, { outcome: "failed", children: "Critical" }) })
|
|
643
656
|
] }),
|
|
644
657
|
/* @__PURE__ */ e("p", { className: "mt-0.5 text-slate-600 dark:text-muted-foreground", children: t.reason.text }),
|
|
645
658
|
t.reason.rules.length > 0 && /* @__PURE__ */ e("ul", { className: "mt-2 space-y-0.5 text-[12px] text-slate-600 dark:text-muted-foreground", children: t.reason.rules.map((h, L) => (
|
|
646
659
|
// biome-ignore lint/suspicious/noArrayIndexKey: rules have no id
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
649
|
-
h.channel === "all" ? "All channels" :
|
|
660
|
+
/* @__PURE__ */ r("li", { children: [
|
|
661
|
+
/* @__PURE__ */ r("span", { className: "text-slate-400", children: [
|
|
662
|
+
h.channel === "all" ? "All channels" : v(h.channel),
|
|
650
663
|
" ·",
|
|
651
664
|
" "
|
|
652
665
|
] }),
|
|
@@ -654,31 +667,31 @@ function Be({
|
|
|
654
667
|
] }, L)
|
|
655
668
|
)) })
|
|
656
669
|
] }) : /* @__PURE__ */ e("p", { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: "Not recorded — this notification was sent before the reason was stored." }) }),
|
|
657
|
-
/* @__PURE__ */
|
|
658
|
-
/* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-lg border border-slate-200 dark:border-border", children: /* @__PURE__ */ e("table", { className: "w-full text-[12.5px]", children: /* @__PURE__ */ e("tbody", { children: t.channels.map((h) => /* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ r(D, { title: "Where it went", children: [
|
|
671
|
+
/* @__PURE__ */ e("div", { className: "overflow-x-auto rounded-lg border border-slate-200 dark:border-border", children: /* @__PURE__ */ e("table", { className: "w-full text-[12.5px]", children: /* @__PURE__ */ e("tbody", { children: t.channels.map((h) => /* @__PURE__ */ r(
|
|
659
672
|
"tr",
|
|
660
673
|
{
|
|
661
674
|
className: "border-b border-slate-100 last:border-0 dark:border-border/60",
|
|
662
675
|
children: [
|
|
663
|
-
/* @__PURE__ */ e("td", { className: "w-[110px] px-3 py-2 align-top font-medium text-slate-800 dark:text-foreground", children: h.channel === "inapp" ? "In-app" : h.channel === "sms" ? "SMS" :
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
/* @__PURE__ */ e(
|
|
676
|
+
/* @__PURE__ */ e("td", { className: "w-[110px] px-3 py-2 align-top font-medium text-slate-800 dark:text-foreground", children: h.channel === "inapp" ? "In-app" : h.channel === "sms" ? "SMS" : v(h.channel) }),
|
|
677
|
+
/* @__PURE__ */ r("td", { className: "px-3 py-2 align-top", children: [
|
|
678
|
+
/* @__PURE__ */ e(E, { outcome: h.outcome, children: h.label }),
|
|
666
679
|
h.reason && h.reason.replace(/\.$/, "") !== h.label.replace(/\.$/, "") && !h.reason.startsWith(h.label) && /* @__PURE__ */ e("p", { className: "mt-1 text-[12px] text-slate-600 dark:text-muted-foreground", children: h.reason })
|
|
667
680
|
] }),
|
|
668
|
-
/* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-2 text-right align-top text-[11.5px] tabular-nums text-slate-500 dark:text-muted-foreground", children: h.at ?
|
|
681
|
+
/* @__PURE__ */ e("td", { className: "whitespace-nowrap px-3 py-2 text-right align-top text-[11.5px] tabular-nums text-slate-500 dark:text-muted-foreground", children: h.at ? k(h.at) : "" })
|
|
669
682
|
]
|
|
670
683
|
},
|
|
671
684
|
h.channel
|
|
672
685
|
)) }) }) }),
|
|
673
|
-
t.mail && /* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
686
|
+
t.mail && /* @__PURE__ */ r("div", { className: "mt-2 rounded-lg border border-slate-200 px-3.5 py-3 text-[12.5px] dark:border-border", children: [
|
|
687
|
+
/* @__PURE__ */ r("p", { className: "flex flex-wrap items-center gap-2", children: [
|
|
675
688
|
/* @__PURE__ */ e(ue, { className: "h-3.5 w-3.5 text-slate-400", "aria-hidden": !0 }),
|
|
676
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ r("span", { className: "font-medium text-slate-900 dark:text-foreground", children: [
|
|
677
690
|
"Email log #",
|
|
678
691
|
t.mail.id
|
|
679
692
|
] }),
|
|
680
693
|
/* @__PURE__ */ e(
|
|
681
|
-
|
|
694
|
+
E,
|
|
682
695
|
{
|
|
683
696
|
outcome: t.mail.status === "sent" ? "delivered" : t.mail.status ?? "other",
|
|
684
697
|
children: t.mail.reason_label
|
|
@@ -689,7 +702,7 @@ function Be({
|
|
|
689
702
|
"button",
|
|
690
703
|
{
|
|
691
704
|
type: "button",
|
|
692
|
-
onClick: () =>
|
|
705
|
+
onClick: () => s((h) => {
|
|
693
706
|
var L;
|
|
694
707
|
return h.set("leaf", `m:${(L = t.mail) == null ? void 0 : L.id}`);
|
|
695
708
|
}),
|
|
@@ -697,14 +710,14 @@ function Be({
|
|
|
697
710
|
children: "Open this email"
|
|
698
711
|
}
|
|
699
712
|
),
|
|
700
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ r(
|
|
701
714
|
_,
|
|
702
715
|
{
|
|
703
|
-
href:
|
|
704
|
-
onClick:
|
|
716
|
+
href: d.mailLog(t.mail.id),
|
|
717
|
+
onClick: d.mailLog(t.mail.id) ? d.go(String(d.mailLog(t.mail.id))) : void 0,
|
|
705
718
|
children: [
|
|
706
719
|
"Mail log ",
|
|
707
|
-
/* @__PURE__ */ e(
|
|
720
|
+
/* @__PURE__ */ e(M, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
708
721
|
]
|
|
709
722
|
}
|
|
710
723
|
)
|
|
@@ -720,57 +733,67 @@ function Be({
|
|
|
720
733
|
)
|
|
721
734
|
] })
|
|
722
735
|
] }),
|
|
723
|
-
/* @__PURE__ */ e(
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
736
|
+
/* @__PURE__ */ e(D, { title: `Acted within ${t.acted.hours} hours`, children: /* @__PURE__ */ r("p", { className: "text-[12.5px] text-slate-700 dark:text-foreground", children: [
|
|
737
|
+
/* @__PURE__ */ e("span", { "data-da-acted": t.acted.verdict, className: "font-medium", children: Te[t.acted.verdict] ?? t.acted.verdict }),
|
|
738
|
+
t.acted.verdict === "window_open" && ` The window stays open until ${k(t.acted.window_ends)}.`,
|
|
739
|
+
t.acted.actions.length > 0 && /* @__PURE__ */ e("span", { className: "block text-slate-600 dark:text-muted-foreground", children: t.acted.actions.map(
|
|
740
|
+
(h) => `${h.kind === "transition" ? "Moved the record" : h.kind === "comment" ? "Commented" : "Completed a task"} ${k(h.at)}`
|
|
741
|
+
).join(" · ") })
|
|
742
|
+
] }) }),
|
|
743
|
+
/* @__PURE__ */ e(D, { title: "Message", children: t.message_hidden ? /* @__PURE__ */ e("p", { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: "Not shown: this notification can quote a private conversation." }) : t.message ? /* @__PURE__ */ e("p", { className: "whitespace-pre-wrap rounded-lg bg-slate-50 px-3.5 py-3 text-[12.5px] text-slate-800 dark:bg-muted/40 dark:text-foreground", children: t.message }) : /* @__PURE__ */ e("p", { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: "No message text." }) })
|
|
727
744
|
] })
|
|
728
745
|
] });
|
|
729
746
|
}
|
|
730
|
-
function
|
|
747
|
+
function Ue({
|
|
731
748
|
id: a,
|
|
732
749
|
onBack: m,
|
|
733
750
|
backLabel: c
|
|
734
751
|
}) {
|
|
735
|
-
const o = A(),
|
|
736
|
-
queryKey: ["delivery-analytics", "leaf", "m", a],
|
|
737
|
-
queryFn: () => o.request(
|
|
738
|
-
|
|
752
|
+
const o = A(), s = W(), [n, d] = V(!1), u = P({
|
|
753
|
+
queryKey: ["delivery-analytics", "leaf", "m", a, n],
|
|
754
|
+
queryFn: () => o.request(
|
|
755
|
+
F(`/delivery-analytics/mail/${a}`, n ? { reveal: 1 } : void 0)
|
|
756
|
+
).then((b) => b.data),
|
|
757
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
758
|
+
gcTime: 0,
|
|
759
|
+
refetchOnWindowFocus: !1,
|
|
760
|
+
refetchOnReconnect: !1,
|
|
761
|
+
retry: !1
|
|
739
762
|
});
|
|
740
|
-
if (
|
|
741
|
-
if (
|
|
742
|
-
return /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */ e(
|
|
744
|
-
/* @__PURE__ */ e(
|
|
763
|
+
if (u.isLoading) return /* @__PURE__ */ e(ne, {});
|
|
764
|
+
if (u.isError || !u.data)
|
|
765
|
+
return /* @__PURE__ */ r("div", { className: "p-5", children: [
|
|
766
|
+
/* @__PURE__ */ e(j, { className: "sr-only", children: "Email" }),
|
|
767
|
+
/* @__PURE__ */ e(K, { error: u.error, what: "this email", onRetry: () => void u.refetch() })
|
|
745
768
|
] });
|
|
746
|
-
const
|
|
747
|
-
return /* @__PURE__ */
|
|
769
|
+
const t = u.data, y = s.record(t.collection, t.item), f = s.mailLog(t.id);
|
|
770
|
+
return /* @__PURE__ */ r(S, { children: [
|
|
748
771
|
/* @__PURE__ */ e(
|
|
749
772
|
ae,
|
|
750
773
|
{
|
|
751
|
-
title:
|
|
752
|
-
sub: /* @__PURE__ */
|
|
774
|
+
title: t.subject ?? "(no subject)",
|
|
775
|
+
sub: /* @__PURE__ */ r(S, { children: [
|
|
753
776
|
"Email log #",
|
|
754
|
-
|
|
777
|
+
t.id,
|
|
755
778
|
" · ",
|
|
756
|
-
|
|
779
|
+
k(t.created_at)
|
|
757
780
|
] }),
|
|
758
781
|
onBack: m,
|
|
759
782
|
backLabel: c
|
|
760
783
|
}
|
|
761
784
|
),
|
|
762
|
-
/* @__PURE__ */
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
765
|
-
/* @__PURE__ */ e(
|
|
766
|
-
|
|
785
|
+
/* @__PURE__ */ r("div", { className: "min-h-0 flex-1 space-y-5 overflow-y-auto bg-white p-5 dark:bg-background", children: [
|
|
786
|
+
/* @__PURE__ */ r("div", { className: "rounded-lg border border-slate-200 px-3.5 py-3 text-[12.5px] dark:border-border", children: [
|
|
787
|
+
/* @__PURE__ */ r("p", { className: "flex flex-wrap items-center gap-2", children: [
|
|
788
|
+
/* @__PURE__ */ e(E, { outcome: t.outcome, children: t.outcome_label }),
|
|
789
|
+
t.reason_label !== t.outcome_label && /* @__PURE__ */ e("span", { className: "font-medium text-slate-900 dark:text-foreground", children: t.reason_label })
|
|
767
790
|
] }),
|
|
768
|
-
|
|
769
|
-
|
|
791
|
+
t.hint && /* @__PURE__ */ e("p", { className: "mt-1 text-slate-600 dark:text-muted-foreground", children: t.hint }),
|
|
792
|
+
t.error && /* @__PURE__ */ e(
|
|
770
793
|
Z,
|
|
771
794
|
{
|
|
772
795
|
className: "mt-1.5",
|
|
773
|
-
description: { title:
|
|
796
|
+
description: { title: t.reason_label, technical: t.error },
|
|
774
797
|
action: "Send an email"
|
|
775
798
|
}
|
|
776
799
|
)
|
|
@@ -781,53 +804,73 @@ function Ee({
|
|
|
781
804
|
items: [
|
|
782
805
|
{
|
|
783
806
|
k: "To",
|
|
784
|
-
v: /* @__PURE__ */
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
const p =
|
|
788
|
-
return /* @__PURE__ */
|
|
789
|
-
|
|
790
|
-
/* @__PURE__ */ e(_, { href: p, onClick: p ?
|
|
791
|
-
] },
|
|
807
|
+
v: /* @__PURE__ */ r(S, { children: [
|
|
808
|
+
t.to ?? "–",
|
|
809
|
+
t.recipients.length > 0 && /* @__PURE__ */ e("span", { className: "block text-[12px]", children: t.recipients.map((b, R) => {
|
|
810
|
+
const p = s.person(b.id);
|
|
811
|
+
return /* @__PURE__ */ r("span", { children: [
|
|
812
|
+
R > 0 && ", ",
|
|
813
|
+
/* @__PURE__ */ e(_, { href: p, onClick: p ? s.go(p) : void 0, children: b.name })
|
|
814
|
+
] }, b.id);
|
|
792
815
|
}) })
|
|
793
816
|
] })
|
|
794
817
|
},
|
|
795
|
-
{ k: "Template", v:
|
|
818
|
+
{ k: "Template", v: t.template ?? "None" },
|
|
796
819
|
{
|
|
797
820
|
k: "Record",
|
|
798
|
-
v:
|
|
799
|
-
|
|
821
|
+
v: y ? /* @__PURE__ */ r(_, { href: y, onClick: s.go(y), children: [
|
|
822
|
+
v(t.collection ?? ""),
|
|
800
823
|
" #",
|
|
801
|
-
|
|
802
|
-
/* @__PURE__ */ e(
|
|
803
|
-
] }) :
|
|
824
|
+
t.item,
|
|
825
|
+
/* @__PURE__ */ e(M, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
826
|
+
] }) : t.collection ? `${v(t.collection)}${t.item ? ` #${t.item}` : ""}` : "None"
|
|
804
827
|
},
|
|
805
|
-
...
|
|
828
|
+
...t.resend_of ? [{ k: "Resend of", v: `Email log #${t.resend_of}` }] : [],
|
|
806
829
|
{
|
|
807
830
|
k: "Mail log",
|
|
808
|
-
v: /* @__PURE__ */
|
|
831
|
+
v: /* @__PURE__ */ r(_, { href: f, onClick: f ? s.go(f) : void 0, children: [
|
|
809
832
|
"Open this row in the Mail log ",
|
|
810
|
-
/* @__PURE__ */ e(
|
|
833
|
+
/* @__PURE__ */ e(M, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
811
834
|
] })
|
|
812
835
|
}
|
|
813
836
|
]
|
|
814
837
|
}
|
|
815
838
|
),
|
|
816
|
-
/* @__PURE__ */ e(
|
|
839
|
+
/* @__PURE__ */ e(D, { title: "The email as sent", children: t.body_withheld ? /* @__PURE__ */ r(
|
|
840
|
+
"div",
|
|
841
|
+
{
|
|
842
|
+
"data-da-withheld": "",
|
|
843
|
+
className: "rounded-lg border border-slate-200 px-3.5 py-3 text-[12.5px] dark:border-border",
|
|
844
|
+
children: [
|
|
845
|
+
/* @__PURE__ */ e("p", { className: "text-slate-700 dark:text-foreground", children: "This email quotes a private chat, so its text is not shown here." }),
|
|
846
|
+
/* @__PURE__ */ e(
|
|
847
|
+
"button",
|
|
848
|
+
{
|
|
849
|
+
type: "button",
|
|
850
|
+
onClick: () => d(!0),
|
|
851
|
+
className: "mt-2 inline-flex h-7 items-center rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-nvr-cyan/50 dark:border-border dark:text-foreground dark:hover:bg-muted",
|
|
852
|
+
children: "Show (logged compliance view)"
|
|
853
|
+
}
|
|
854
|
+
)
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
) : t.body ? /* @__PURE__ */ e(
|
|
817
858
|
"iframe",
|
|
818
859
|
{
|
|
819
860
|
title: "Rendered email",
|
|
820
861
|
sandbox: "",
|
|
821
|
-
srcDoc:
|
|
862
|
+
srcDoc: qe(t.body),
|
|
822
863
|
className: "h-[520px] w-full rounded-md border border-slate-200 bg-white dark:border-border"
|
|
823
864
|
}
|
|
824
|
-
) : /* @__PURE__ */
|
|
865
|
+
) : /* @__PURE__ */ r("p", { className: "text-[12.5px] text-slate-500 dark:text-muted-foreground", children: [
|
|
825
866
|
"No stored body for this row",
|
|
826
|
-
|
|
867
|
+
t.status === "dropped" || t.status === "deferred" ? " — it was never sent." : "."
|
|
827
868
|
] }) })
|
|
828
869
|
] })
|
|
829
870
|
] });
|
|
830
871
|
}
|
|
831
872
|
export {
|
|
832
|
-
|
|
873
|
+
Ze as DrillSheet,
|
|
874
|
+
Re as EMAIL_CSP,
|
|
875
|
+
qe as sandboxedEmail
|
|
833
876
|
};
|