@burdenoff/microfe-notification 2026.1124.1 → 2026.1125.1
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/AdminNotificationRoutes.js +59 -51
- package/dist/AdminNotificationRoutes.js.map +1 -1
- package/dist/NotificationRoutes.js +76 -68
- package/dist/NotificationRoutes.js.map +1 -1
- package/dist/UserNotificationRoutes.js +39 -31
- package/dist/UserNotificationRoutes.js.map +1 -1
- package/dist/components/NotificationListFooter.js +1 -1
- package/dist/components/NotificationListFooter.js.map +1 -1
- package/dist/components/loadingSystem.d.ts +64 -0
- package/dist/components/loadingSystem.js +34 -0
- package/dist/components/loadingSystem.js.map +1 -0
- package/dist/navigation-v2/AdminPageV2.js +23 -16
- package/dist/navigation-v2/AdminPageV2.js.map +1 -1
- package/dist/navigation-v2/NotificationArchivedV2.js +100 -93
- package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -1
- package/dist/navigation-v2/NotificationInboxV2.js +130 -123
- package/dist/navigation-v2/NotificationInboxV2.js.map +1 -1
- package/dist/navigation-v2/NotificationSettingsV2.js +91 -84
- package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -1
- package/dist/navigation-v2/NotificationsV2Landing.js +31 -23
- package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -1
- package/dist/pages/CreateNotificationPage.js +442 -432
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +91 -84
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +226 -219
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +69 -62
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationLandingPage.js +42 -34
- package/dist/pages/NotificationLandingPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.js +80 -70
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.js +192 -181
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +124 -117
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +248 -233
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -5,269 +5,276 @@ import "../hooks/index.js";
|
|
|
5
5
|
import { NOTIFICATION_PERMISSIONS as r } from "../constants/permissions.js";
|
|
6
6
|
import { useTr as i } from "../shared/hooks/useTr.js";
|
|
7
7
|
import { exportNotificationsAsCsv as a } from "../utils/notificationHistoryExport.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
8
|
+
import { CompactMarkOr as o, SectionLoaderOr as s } from "../components/loadingSystem.js";
|
|
9
|
+
import { useState as c } from "react";
|
|
10
|
+
import { usePermissions as l } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { CalendarClock as u, Download as d, RefreshCw as f, Search as p } from "lucide-react";
|
|
12
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
|
+
import { Button as _, EmphasisPanel as v, GlassCard as y, IllustratedEmptyState as b, NextSteps as x, PagePurpose as S, ShowMore as C, ThemedSelect as w } from "@burdenoff/fe-libs/ui";
|
|
13
14
|
// src/pages/NotificationHistoryAdminPage.tsx
|
|
14
|
-
function
|
|
15
|
+
function T(e) {
|
|
15
16
|
return e ? new Date(e).toLocaleString() : "—";
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
function E() {
|
|
19
|
+
let E = i(), { hasPermission: D, isLoading: O } = l(), { topics: k } = t(), { filters: A, setFilters: j, notifications: M, scheduledNotifications: N, selectedNotification: P, events: F, isLoading: I, loadNotification: L, archiveNotification: R, unarchiveNotification: z, cancelScheduledNotification: B, rescheduleNotification: V, clearSelection: H } = e(), [U, W] = c("");
|
|
20
|
+
return O ? /* @__PURE__ */ h(s, {
|
|
21
|
+
minHeight: "16rem",
|
|
22
|
+
today: /* @__PURE__ */ h("div", {
|
|
23
|
+
className: "flex h-64 items-center justify-center",
|
|
24
|
+
children: /* @__PURE__ */ h(o, {
|
|
25
|
+
className: "h-8 w-8",
|
|
26
|
+
today: /* @__PURE__ */ h("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
}) : D(r.NOTIFICATION_LIST) ? /* @__PURE__ */ g("div", {
|
|
23
30
|
className: "space-y-4 sm:space-y-6",
|
|
24
31
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
icon: /* @__PURE__ */
|
|
27
|
-
children:
|
|
32
|
+
/* @__PURE__ */ h(S, {
|
|
33
|
+
icon: /* @__PURE__ */ h(u, { size: 16 }),
|
|
34
|
+
children: E("notifications.adminHistoryPurpose", "The operations console for everything your team has sent. Audit delivery outcomes (delivered, opened, clicked, failed, unsubscribed), inspect a single notification’s full event timeline, and manage the schedule — reschedule or cancel anything still pending. Use it to debug a campaign or prove a notification went out.")
|
|
28
35
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ h(x, {
|
|
30
37
|
storageKey: "notification-admin-history",
|
|
31
38
|
steps: [
|
|
32
39
|
{
|
|
33
40
|
id: "inspect",
|
|
34
|
-
label:
|
|
35
|
-
description:
|
|
41
|
+
label: E("notifications.nextInspectLabel", "Inspect a delivery"),
|
|
42
|
+
description: E("notifications.nextInspectDesc", "Click any notification to see its receipts, opens, clicks and full event timeline."),
|
|
36
43
|
onClick: () => {
|
|
37
|
-
|
|
44
|
+
M[0] && L(M[0].id);
|
|
38
45
|
}
|
|
39
46
|
},
|
|
40
47
|
{
|
|
41
48
|
id: "failed",
|
|
42
|
-
label:
|
|
43
|
-
description:
|
|
44
|
-
onClick: () =>
|
|
49
|
+
label: E("notifications.nextFailedLabel", "Find failed deliveries"),
|
|
50
|
+
description: E("notifications.nextFailedDesc", "Filter by a FAILED delivery state to triage what did not reach recipients."),
|
|
51
|
+
onClick: () => j((e) => ({
|
|
45
52
|
...e,
|
|
46
53
|
deliveryStatus: "FAILED"
|
|
47
54
|
}))
|
|
48
55
|
},
|
|
49
56
|
{
|
|
50
57
|
id: "export",
|
|
51
|
-
label:
|
|
52
|
-
description:
|
|
58
|
+
label: E("notifications.nextExportLabel", "Export the current view"),
|
|
59
|
+
description: E("notifications.nextExportDesc", "Download the filtered results as CSV for reporting or an external audit."),
|
|
53
60
|
onClick: () => {
|
|
54
|
-
|
|
61
|
+
M.length > 0 && a(E, M);
|
|
55
62
|
}
|
|
56
63
|
}
|
|
57
64
|
]
|
|
58
65
|
}),
|
|
59
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ g("div", {
|
|
60
67
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
68
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
62
69
|
className: "text-xl sm:text-2xl font-bold text-primary",
|
|
63
|
-
children:
|
|
64
|
-
}), /* @__PURE__ */
|
|
70
|
+
children: E("notifications.adminHistoryTitle", "Notification Operations")
|
|
71
|
+
}), /* @__PURE__ */ h("p", {
|
|
65
72
|
className: "text-sm text-text-secondary mt-1",
|
|
66
|
-
children:
|
|
67
|
-
})] }), /* @__PURE__ */
|
|
73
|
+
children: E("notifications.adminHistorySubtitle", "Review sent and scheduled notifications, delivery outcomes, opens, clicks, and user activity.")
|
|
74
|
+
})] }), /* @__PURE__ */ g(_, {
|
|
68
75
|
type: "button",
|
|
69
76
|
variant: "outline",
|
|
70
|
-
onClick: () => a(
|
|
71
|
-
disabled:
|
|
77
|
+
onClick: () => a(E, M),
|
|
78
|
+
disabled: M.length === 0,
|
|
72
79
|
className: "gap-2",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ h(d, { size: 16 }), E("notifications.export", "Export")]
|
|
74
81
|
})]
|
|
75
82
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ g(y, {
|
|
77
84
|
treatment: "plain",
|
|
78
85
|
className: "grid gap-3 border-border-seam p-4 lg:grid-cols-6",
|
|
79
86
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ g("label", {
|
|
81
88
|
className: "relative lg:col-span-2",
|
|
82
|
-
children: [/* @__PURE__ */ p
|
|
89
|
+
children: [/* @__PURE__ */ h(p, {
|
|
83
90
|
size: 16,
|
|
84
91
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-tertiary"
|
|
85
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ h("input", {
|
|
86
93
|
type: "text",
|
|
87
|
-
value:
|
|
88
|
-
onChange: (e) =>
|
|
94
|
+
value: A.search,
|
|
95
|
+
onChange: (e) => j((t) => ({
|
|
89
96
|
...t,
|
|
90
97
|
search: e.target.value
|
|
91
98
|
})),
|
|
92
|
-
placeholder:
|
|
99
|
+
placeholder: E("notifications.searchByTitleOrContent", "Search by title or content..."),
|
|
93
100
|
className: "w-full rounded-md border border-default bg-bg-canvas py-2 pl-9 pr-3 text-sm text-primary focus:outline-none focus:ring-2 focus:ring-accent"
|
|
94
101
|
})]
|
|
95
102
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
value:
|
|
98
|
-
onChange: (e) =>
|
|
103
|
+
/* @__PURE__ */ g(w, {
|
|
104
|
+
value: A.status,
|
|
105
|
+
onChange: (e) => j((t) => ({
|
|
99
106
|
...t,
|
|
100
107
|
status: e.target.value
|
|
101
108
|
})),
|
|
102
109
|
className: "rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
103
110
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ h("option", {
|
|
105
112
|
value: "all",
|
|
106
|
-
children:
|
|
113
|
+
children: E("notifications.allStatuses", "All Statuses")
|
|
107
114
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ h("option", {
|
|
109
116
|
value: "PENDING",
|
|
110
117
|
children: "PENDING"
|
|
111
118
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ h("option", {
|
|
113
120
|
value: "TRIGGERED",
|
|
114
121
|
children: "TRIGGERED"
|
|
115
122
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ h("option", {
|
|
117
124
|
value: "SENT",
|
|
118
125
|
children: "SENT"
|
|
119
126
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ h("option", {
|
|
121
128
|
value: "FAILED",
|
|
122
129
|
children: "FAILED"
|
|
123
130
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ h("option", {
|
|
125
132
|
value: "CANCELLED",
|
|
126
133
|
children: "CANCELLED"
|
|
127
134
|
})
|
|
128
135
|
]
|
|
129
136
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
value:
|
|
132
|
-
onChange: (e) =>
|
|
137
|
+
/* @__PURE__ */ g(w, {
|
|
138
|
+
value: A.channel,
|
|
139
|
+
onChange: (e) => j((t) => ({
|
|
133
140
|
...t,
|
|
134
141
|
channel: e.target.value
|
|
135
142
|
})),
|
|
136
143
|
className: "rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
137
144
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ h("option", {
|
|
139
146
|
value: "all",
|
|
140
|
-
children:
|
|
147
|
+
children: E("notifications.allChannels", "All Channels")
|
|
141
148
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ h("option", {
|
|
143
150
|
value: "EMAIL",
|
|
144
151
|
children: "EMAIL"
|
|
145
152
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ h("option", {
|
|
147
154
|
value: "SMS",
|
|
148
155
|
children: "SMS"
|
|
149
156
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ h("option", {
|
|
151
158
|
value: "PUSH",
|
|
152
159
|
children: "PUSH"
|
|
153
160
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ h("option", {
|
|
155
162
|
value: "WHATSAPP",
|
|
156
163
|
children: "WHATSAPP"
|
|
157
164
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ h("option", {
|
|
159
166
|
value: "IN_APP",
|
|
160
167
|
children: "IN_APP"
|
|
161
168
|
})
|
|
162
169
|
]
|
|
163
170
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
value:
|
|
166
|
-
onChange: (e) =>
|
|
171
|
+
/* @__PURE__ */ g(w, {
|
|
172
|
+
value: A.deliveryStatus,
|
|
173
|
+
onChange: (e) => j((t) => ({
|
|
167
174
|
...t,
|
|
168
175
|
deliveryStatus: e.target.value
|
|
169
176
|
})),
|
|
170
177
|
className: "rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
171
178
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ h("option", {
|
|
173
180
|
value: "all",
|
|
174
|
-
children:
|
|
181
|
+
children: E("notifications.allDeliveryStates", "All Delivery")
|
|
175
182
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ h("option", {
|
|
177
184
|
value: "DELIVERED",
|
|
178
185
|
children: "DELIVERED"
|
|
179
186
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ h("option", {
|
|
181
188
|
value: "OPENED",
|
|
182
189
|
children: "OPENED"
|
|
183
190
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ h("option", {
|
|
185
192
|
value: "CLICKED",
|
|
186
193
|
children: "CLICKED"
|
|
187
194
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ h("option", {
|
|
189
196
|
value: "FAILED",
|
|
190
197
|
children: "FAILED"
|
|
191
198
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ h("option", {
|
|
193
200
|
value: "UNSUBSCRIBED",
|
|
194
201
|
children: "UNSUBSCRIBED"
|
|
195
202
|
})
|
|
196
203
|
]
|
|
197
204
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
value:
|
|
200
|
-
onChange: (e) =>
|
|
205
|
+
/* @__PURE__ */ g(w, {
|
|
206
|
+
value: A.topicId,
|
|
207
|
+
onChange: (e) => j((t) => ({
|
|
201
208
|
...t,
|
|
202
209
|
topicId: e.target.value
|
|
203
210
|
})),
|
|
204
211
|
className: "rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ h("option", {
|
|
206
213
|
value: "",
|
|
207
|
-
children:
|
|
208
|
-
}),
|
|
214
|
+
children: E("notifications.allTopics", "All Topics")
|
|
215
|
+
}), k.map((e) => /* @__PURE__ */ h("option", {
|
|
209
216
|
value: e.id,
|
|
210
217
|
children: e.name
|
|
211
218
|
}, e.id))]
|
|
212
219
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
value:
|
|
215
|
-
onChange: (e) =>
|
|
220
|
+
/* @__PURE__ */ g(w, {
|
|
221
|
+
value: A.archived,
|
|
222
|
+
onChange: (e) => j((t) => ({
|
|
216
223
|
...t,
|
|
217
224
|
archived: e.target.value
|
|
218
225
|
})),
|
|
219
226
|
className: "rounded-md border border-default bg-bg-canvas px-3 py-2 text-sm text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
220
227
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ h("option", {
|
|
222
229
|
value: "all",
|
|
223
|
-
children:
|
|
230
|
+
children: E("notifications.activeAndArchived", "Active + Archived")
|
|
224
231
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ h("option", {
|
|
226
233
|
value: "active",
|
|
227
|
-
children:
|
|
234
|
+
children: E("notifications.activeOnly", "Active Only")
|
|
228
235
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ h("option", {
|
|
230
237
|
value: "archived",
|
|
231
|
-
children:
|
|
238
|
+
children: E("notifications.archivedOnly", "Archived Only")
|
|
232
239
|
})
|
|
233
240
|
]
|
|
234
241
|
})
|
|
235
242
|
]
|
|
236
243
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ g("div", {
|
|
238
245
|
className: "grid gap-6 xl:grid-cols-[minmax(0,1fr),420px]",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ g("div", {
|
|
240
247
|
className: "space-y-6",
|
|
241
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ g(v, {
|
|
242
249
|
className: "p-4",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ g("div", {
|
|
244
251
|
className: "mb-4 flex items-center justify-between",
|
|
245
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
246
253
|
className: "text-base font-semibold text-primary",
|
|
247
|
-
children:
|
|
248
|
-
}), /* @__PURE__ */
|
|
254
|
+
children: E("notifications.sentNotifications", "Notifications")
|
|
255
|
+
}), /* @__PURE__ */ g("p", {
|
|
249
256
|
className: "text-sm text-text-secondary",
|
|
250
257
|
children: [
|
|
251
|
-
|
|
258
|
+
M.length,
|
|
252
259
|
" ",
|
|
253
|
-
|
|
260
|
+
E("notifications.resultsFoundShort", "results")
|
|
254
261
|
]
|
|
255
|
-
})] }),
|
|
262
|
+
})] }), I && /* @__PURE__ */ h(o, { today: /* @__PURE__ */ h(f, {
|
|
256
263
|
size: 16,
|
|
257
264
|
className: "animate-spin text-tertiary"
|
|
258
|
-
})]
|
|
259
|
-
}), /* @__PURE__ */
|
|
265
|
+
}) })]
|
|
266
|
+
}), /* @__PURE__ */ h("div", {
|
|
260
267
|
className: "space-y-3",
|
|
261
|
-
children:
|
|
268
|
+
children: M.length === 0 ? /* @__PURE__ */ h(b, {
|
|
262
269
|
illustration: "empty-search",
|
|
263
|
-
title:
|
|
264
|
-
description:
|
|
270
|
+
title: E("notifications.noNotificationsFound", "No notifications found"),
|
|
271
|
+
description: E("notifications.adjustSearchOrDateRange", "Try adjusting your filters"),
|
|
265
272
|
kind: "filtered"
|
|
266
|
-
}) :
|
|
273
|
+
}) : M.map((e) => /* @__PURE__ */ h("button", {
|
|
267
274
|
type: "button",
|
|
268
|
-
onClick: () =>
|
|
275
|
+
onClick: () => L(e.id),
|
|
269
276
|
className: "block w-full text-left",
|
|
270
|
-
children: /* @__PURE__ */
|
|
277
|
+
children: /* @__PURE__ */ h(n, {
|
|
271
278
|
notification: e,
|
|
272
279
|
compact: !0,
|
|
273
280
|
showArchivedState: !0,
|
|
@@ -275,33 +282,33 @@ function w() {
|
|
|
275
282
|
})
|
|
276
283
|
}, e.id))
|
|
277
284
|
})]
|
|
278
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ g("section", {
|
|
279
286
|
className: "rounded-lg border border-border-seam bg-gloss-card p-4",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ g("div", {
|
|
281
288
|
className: "mb-4 flex items-center gap-2",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ h(u, {
|
|
283
290
|
size: 18,
|
|
284
291
|
className: "text-accent-primary"
|
|
285
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ h("h2", {
|
|
286
293
|
className: "text-base font-semibold text-primary",
|
|
287
|
-
children:
|
|
294
|
+
children: E("notifications.scheduledNotifications", "Scheduled Notifications")
|
|
288
295
|
})]
|
|
289
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ h("div", {
|
|
290
297
|
className: "space-y-3",
|
|
291
|
-
children:
|
|
298
|
+
children: N.length === 0 ? /* @__PURE__ */ h(b, {
|
|
292
299
|
illustration: "empty-data",
|
|
293
|
-
title:
|
|
294
|
-
description:
|
|
300
|
+
title: E("notifications.noScheduledNotifications", "No scheduled notifications"),
|
|
301
|
+
description: E("notifications.noScheduledDescription", "Notifications queued for a future send time will appear here, ready to reschedule or cancel."),
|
|
295
302
|
glassIllustration: "calendar",
|
|
296
303
|
size: "panel"
|
|
297
|
-
}) :
|
|
304
|
+
}) : N.map((e) => /* @__PURE__ */ h("div", {
|
|
298
305
|
className: "rounded-md border border-default bg-bg-canvas p-4",
|
|
299
|
-
children: /* @__PURE__ */
|
|
306
|
+
children: /* @__PURE__ */ g("div", {
|
|
300
307
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
302
309
|
className: "text-sm font-semibold text-primary",
|
|
303
310
|
children: e.notification.title
|
|
304
|
-
}), /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ g("p", {
|
|
305
312
|
className: "text-xs text-text-secondary",
|
|
306
313
|
children: [
|
|
307
314
|
e.notification.channel,
|
|
@@ -309,109 +316,109 @@ function w() {
|
|
|
309
316
|
e.notification.type,
|
|
310
317
|
" •",
|
|
311
318
|
" ",
|
|
312
|
-
|
|
319
|
+
T(e.scheduledFor)
|
|
313
320
|
]
|
|
314
|
-
})] }), /* @__PURE__ */
|
|
321
|
+
})] }), /* @__PURE__ */ g("div", {
|
|
315
322
|
className: "flex items-center gap-2",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ h("button", {
|
|
317
324
|
type: "button",
|
|
318
|
-
onClick: () =>
|
|
325
|
+
onClick: () => L(e.notification.id),
|
|
319
326
|
className: "rounded-md border border-default px-3 py-2 text-xs text-text-secondary hover:bg-bg-sunken",
|
|
320
|
-
children:
|
|
321
|
-
}), e.status === "PENDING" && /* @__PURE__ */
|
|
327
|
+
children: E("notifications.view", "View")
|
|
328
|
+
}), e.status === "PENDING" && /* @__PURE__ */ h("button", {
|
|
322
329
|
type: "button",
|
|
323
|
-
onClick: () =>
|
|
330
|
+
onClick: () => B(e.id),
|
|
324
331
|
className: "rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle",
|
|
325
|
-
children:
|
|
332
|
+
children: E("notifications.cancel", "Cancel")
|
|
326
333
|
})]
|
|
327
334
|
})]
|
|
328
335
|
})
|
|
329
336
|
}, e.id))
|
|
330
337
|
})]
|
|
331
338
|
})]
|
|
332
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ h("aside", {
|
|
333
340
|
className: "rounded-lg border border-border-seam bg-gloss-card p-4 xl:sticky xl:top-4 xl:max-h-[calc(100vh-2rem)] xl:self-start xl:overflow-y-auto",
|
|
334
|
-
children:
|
|
341
|
+
children: P ? /* @__PURE__ */ g("div", {
|
|
335
342
|
className: "space-y-4",
|
|
336
343
|
children: [
|
|
337
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ g("div", {
|
|
338
345
|
className: "flex items-start justify-between gap-3",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
340
347
|
className: "text-lg font-semibold text-primary",
|
|
341
|
-
children:
|
|
342
|
-
}), /* @__PURE__ */
|
|
348
|
+
children: P.title
|
|
349
|
+
}), /* @__PURE__ */ h("p", {
|
|
343
350
|
className: "text-sm text-text-secondary",
|
|
344
|
-
children:
|
|
345
|
-
})] }), /* @__PURE__ */
|
|
351
|
+
children: P.body
|
|
352
|
+
})] }), /* @__PURE__ */ h("button", {
|
|
346
353
|
type: "button",
|
|
347
|
-
onClick:
|
|
354
|
+
onClick: H,
|
|
348
355
|
className: "rounded-md border border-default px-3 py-2 text-xs text-text-secondary hover:bg-bg-sunken",
|
|
349
|
-
children:
|
|
356
|
+
children: E("notifications.close", "Close")
|
|
350
357
|
})]
|
|
351
358
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ g("div", {
|
|
353
360
|
className: "grid gap-2 rounded-md border border-default bg-bg-canvas p-3 text-sm text-text-secondary",
|
|
354
361
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ g("div", { children: [
|
|
363
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.status", "Status"), ":"] }),
|
|
357
364
|
" ",
|
|
358
|
-
|
|
365
|
+
P.status
|
|
359
366
|
] }),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ g("div", { children: [
|
|
368
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.delivery", "Delivery"), ":"] }),
|
|
362
369
|
" ",
|
|
363
|
-
|
|
370
|
+
P.deliveryStatus || "—"
|
|
364
371
|
] }),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ g("div", { children: [
|
|
373
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.topic", "Topic"), ":"] }),
|
|
367
374
|
" ",
|
|
368
|
-
|
|
375
|
+
P.topic?.name || "—"
|
|
369
376
|
] }),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ g("div", { children: [
|
|
378
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.created", "Created"), ":"] }),
|
|
372
379
|
" ",
|
|
373
|
-
|
|
380
|
+
T(P.createdAt)
|
|
374
381
|
] }),
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ g("div", { children: [
|
|
383
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.sent", "Sent"), ":"] }),
|
|
377
384
|
" ",
|
|
378
|
-
|
|
385
|
+
T(P.sentAt)
|
|
379
386
|
] }),
|
|
380
|
-
/* @__PURE__ */
|
|
381
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ g("div", { children: [
|
|
388
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.delivered", "Delivered"), ":"] }),
|
|
382
389
|
" ",
|
|
383
|
-
|
|
390
|
+
T(P.deliveredAt)
|
|
384
391
|
] }),
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ g("div", { children: [
|
|
393
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.opened", "Opened"), ":"] }),
|
|
387
394
|
" ",
|
|
388
|
-
|
|
395
|
+
T(P.openedAt)
|
|
389
396
|
] }),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ g("div", { children: [
|
|
398
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.clicked", "Clicked"), ":"] }),
|
|
392
399
|
" ",
|
|
393
|
-
|
|
400
|
+
T(P.clickedAt)
|
|
394
401
|
] }),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ g("div", { children: [
|
|
403
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.read", "Read"), ":"] }),
|
|
397
404
|
" ",
|
|
398
|
-
|
|
405
|
+
T(P.readAt)
|
|
399
406
|
] }),
|
|
400
|
-
/* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ g("div", { children: [
|
|
408
|
+
/* @__PURE__ */ g("strong", { children: [E("notifications.detail.recipient", "Recipient"), ":"] }),
|
|
402
409
|
" ",
|
|
403
|
-
|
|
410
|
+
P.recipientEmail || P.recipientPhone || P.id
|
|
404
411
|
] })
|
|
405
412
|
]
|
|
406
413
|
}),
|
|
407
|
-
|
|
414
|
+
P.media.length > 0 && /* @__PURE__ */ g("div", {
|
|
408
415
|
className: "space-y-2",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
410
417
|
className: "text-sm font-semibold text-primary",
|
|
411
|
-
children:
|
|
412
|
-
}), /* @__PURE__ */
|
|
418
|
+
children: E("notifications.media", "Media")
|
|
419
|
+
}), /* @__PURE__ */ h("div", {
|
|
413
420
|
className: "grid gap-3",
|
|
414
|
-
children:
|
|
421
|
+
children: P.media.map((e) => /* @__PURE__ */ h("a", {
|
|
415
422
|
href: e.url,
|
|
416
423
|
target: "_blank",
|
|
417
424
|
rel: "noreferrer",
|
|
@@ -420,93 +427,93 @@ function w() {
|
|
|
420
427
|
}, e.url))
|
|
421
428
|
})]
|
|
422
429
|
}),
|
|
423
|
-
|
|
430
|
+
P.actions.length > 0 && /* @__PURE__ */ g("div", {
|
|
424
431
|
className: "space-y-2",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
426
433
|
className: "text-sm font-semibold text-primary",
|
|
427
|
-
children:
|
|
428
|
-
}), /* @__PURE__ */
|
|
434
|
+
children: E("notifications.actions", "Actions")
|
|
435
|
+
}), /* @__PURE__ */ h("div", {
|
|
429
436
|
className: "grid gap-2",
|
|
430
|
-
children:
|
|
437
|
+
children: P.actions.map((e) => /* @__PURE__ */ g("div", {
|
|
431
438
|
className: "rounded-md border border-default bg-bg-canvas p-3 text-sm text-text-secondary",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ h("div", {
|
|
433
440
|
className: "font-medium text-primary",
|
|
434
441
|
children: e.label
|
|
435
|
-
}), /* @__PURE__ */
|
|
442
|
+
}), /* @__PURE__ */ h("div", {
|
|
436
443
|
className: "truncate text-xs",
|
|
437
444
|
children: e.url
|
|
438
445
|
})]
|
|
439
446
|
}, e.id))
|
|
440
447
|
})]
|
|
441
448
|
}),
|
|
442
|
-
|
|
449
|
+
P.scheduledNotification && /* @__PURE__ */ g("div", {
|
|
443
450
|
className: "space-y-3 rounded-md border border-default bg-bg-canvas p-3",
|
|
444
451
|
children: [
|
|
445
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ h("div", {
|
|
446
453
|
className: "text-sm font-semibold text-primary",
|
|
447
|
-
children:
|
|
454
|
+
children: E("notifications.scheduling", "Scheduling")
|
|
448
455
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ h("div", {
|
|
450
457
|
className: "text-sm text-text-secondary",
|
|
451
|
-
children:
|
|
458
|
+
children: T(P.scheduledNotification.scheduledFor)
|
|
452
459
|
}),
|
|
453
|
-
|
|
460
|
+
P.scheduledNotification.status === "PENDING" && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("input", {
|
|
454
461
|
type: "datetime-local",
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
462
|
+
value: U,
|
|
463
|
+
onChange: (e) => W(e.target.value),
|
|
457
464
|
className: "w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary"
|
|
458
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ g("div", {
|
|
459
466
|
className: "flex items-center gap-2",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
467
|
+
children: [/* @__PURE__ */ h("button", {
|
|
461
468
|
type: "button",
|
|
462
|
-
onClick: () =>
|
|
469
|
+
onClick: () => U && V(P.scheduledNotification.id, new Date(U).toISOString()),
|
|
463
470
|
className: "rounded-md bg-accent-primary px-3 py-2 text-xs font-medium text-text-inverse hover:opacity-90",
|
|
464
|
-
children:
|
|
465
|
-
}), /* @__PURE__ */
|
|
471
|
+
children: E("notifications.reschedule", "Reschedule")
|
|
472
|
+
}), /* @__PURE__ */ h("button", {
|
|
466
473
|
type: "button",
|
|
467
|
-
onClick: () =>
|
|
474
|
+
onClick: () => B(P.scheduledNotification.id),
|
|
468
475
|
className: "rounded-md border border-status-error-border px-3 py-2 text-xs text-status-error-text hover:bg-status-error-bg-subtle",
|
|
469
|
-
children:
|
|
476
|
+
children: E("notifications.cancel", "Cancel")
|
|
470
477
|
})]
|
|
471
478
|
})] })
|
|
472
479
|
]
|
|
473
480
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ h("div", {
|
|
475
482
|
className: "flex items-center gap-2",
|
|
476
|
-
children:
|
|
483
|
+
children: P.archivedAt ? /* @__PURE__ */ h("button", {
|
|
477
484
|
type: "button",
|
|
478
|
-
onClick: () =>
|
|
485
|
+
onClick: () => z(P.id),
|
|
479
486
|
className: "rounded-md border border-default px-3 py-2 text-xs text-text-secondary hover:bg-bg-sunken",
|
|
480
|
-
children:
|
|
481
|
-
}) : /* @__PURE__ */
|
|
487
|
+
children: E("notifications.restore", "Restore")
|
|
488
|
+
}) : /* @__PURE__ */ h("button", {
|
|
482
489
|
type: "button",
|
|
483
|
-
onClick: () =>
|
|
490
|
+
onClick: () => R(P.id),
|
|
484
491
|
className: "rounded-md border border-default px-3 py-2 text-xs text-text-secondary hover:bg-bg-sunken",
|
|
485
|
-
children:
|
|
492
|
+
children: E("notifications.archive", "Archive")
|
|
486
493
|
})
|
|
487
494
|
}),
|
|
488
|
-
/* @__PURE__ */
|
|
495
|
+
/* @__PURE__ */ g("div", {
|
|
489
496
|
className: "space-y-2",
|
|
490
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
491
498
|
className: "text-sm font-semibold text-primary",
|
|
492
|
-
children:
|
|
493
|
-
}),
|
|
499
|
+
children: E("notifications.eventTimeline", "Event Timeline")
|
|
500
|
+
}), F.length === 0 ? /* @__PURE__ */ h("div", {
|
|
494
501
|
className: "rounded-md border border-dashed border-border-seam p-4 text-sm text-text-secondary",
|
|
495
|
-
children:
|
|
496
|
-
}) : /* @__PURE__ */
|
|
502
|
+
children: E("notifications.noEvents", "No events recorded yet.")
|
|
503
|
+
}) : /* @__PURE__ */ h(C, {
|
|
497
504
|
collapsedHeight: 180,
|
|
498
|
-
children: /* @__PURE__ */
|
|
505
|
+
children: /* @__PURE__ */ h("div", {
|
|
499
506
|
className: "space-y-2",
|
|
500
|
-
children:
|
|
507
|
+
children: F.map((e) => /* @__PURE__ */ g("div", {
|
|
501
508
|
className: "rounded-md border border-border-seam bg-surface p-3 text-sm text-text-secondary",
|
|
502
509
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ h("div", {
|
|
504
511
|
className: "font-medium text-primary",
|
|
505
512
|
children: e.eventType
|
|
506
513
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
e.deliveryStatus && /* @__PURE__ */
|
|
509
|
-
|
|
514
|
+
/* @__PURE__ */ h("div", { children: T(e.timestamp) }),
|
|
515
|
+
e.deliveryStatus && /* @__PURE__ */ g("div", { children: [
|
|
516
|
+
E("notifications.detail.delivery", "Delivery"),
|
|
510
517
|
":",
|
|
511
518
|
" ",
|
|
512
519
|
e.deliveryStatus
|
|
@@ -517,12 +524,12 @@ function w() {
|
|
|
517
524
|
})]
|
|
518
525
|
})
|
|
519
526
|
]
|
|
520
|
-
}) : /* @__PURE__ */
|
|
527
|
+
}) : /* @__PURE__ */ h("div", {
|
|
521
528
|
className: "flex h-full min-h-[360px] items-center justify-center",
|
|
522
|
-
children: /* @__PURE__ */
|
|
529
|
+
children: /* @__PURE__ */ h(b, {
|
|
523
530
|
illustration: "empty-search",
|
|
524
|
-
title:
|
|
525
|
-
description:
|
|
531
|
+
title: E("notifications.selectNotificationTitle", "Nothing selected"),
|
|
532
|
+
description: E("notifications.selectNotificationForDetails", "Select a notification to inspect details, delivery receipts, and activity."),
|
|
526
533
|
glassIllustration: "notifications",
|
|
527
534
|
size: "panel"
|
|
528
535
|
})
|
|
@@ -530,11 +537,11 @@ function w() {
|
|
|
530
537
|
})]
|
|
531
538
|
})
|
|
532
539
|
]
|
|
533
|
-
}) : /* @__PURE__ */
|
|
540
|
+
}) : /* @__PURE__ */ h("div", {
|
|
534
541
|
className: "p-8 text-center text-text-secondary",
|
|
535
|
-
children:
|
|
542
|
+
children: E("notifications.noPermissionHistory", "You don't have permission to view notification history.")
|
|
536
543
|
});
|
|
537
544
|
}
|
|
538
|
-
export {
|
|
545
|
+
export { E as NotificationHistoryAdminPage };
|
|
539
546
|
|
|
540
547
|
//# sourceMappingURL=NotificationHistoryAdminPage.js.map
|