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