@burdenoff/microfe-notification 2026.1109.1 → 2026.1113.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 (70) hide show
  1. package/dist/NotificationRoutes.js +108 -36
  2. package/dist/NotificationRoutes.js.map +1 -1
  3. package/dist/components/ConfirmDeleteDialog.d.ts +17 -0
  4. package/dist/components/ConfirmDeleteDialog.js +22 -0
  5. package/dist/components/ConfirmDeleteDialog.js.map +1 -0
  6. package/dist/components/NotificationCard.d.ts +10 -1
  7. package/dist/components/NotificationCard.js +103 -72
  8. package/dist/components/NotificationCard.js.map +1 -1
  9. package/dist/hooks/index.js +5 -5
  10. package/dist/hooks/usePreferenceToggles.d.ts +27 -0
  11. package/dist/hooks/usePreferenceToggles.js +84 -0
  12. package/dist/hooks/usePreferenceToggles.js.map +1 -0
  13. package/dist/navigation-v2/AdminPageV2.d.ts +14 -0
  14. package/dist/navigation-v2/AdminPageV2.js +51 -0
  15. package/dist/navigation-v2/AdminPageV2.js.map +1 -0
  16. package/dist/navigation-v2/AdminToolsMenu.d.ts +6 -0
  17. package/dist/navigation-v2/AdminToolsMenu.js +32 -0
  18. package/dist/navigation-v2/AdminToolsMenu.js.map +1 -0
  19. package/dist/navigation-v2/BackToNotifications.d.ts +2 -0
  20. package/dist/navigation-v2/BackToNotifications.js +20 -0
  21. package/dist/navigation-v2/BackToNotifications.js.map +1 -0
  22. package/dist/navigation-v2/FilterControls.d.ts +25 -0
  23. package/dist/navigation-v2/FilterControls.js +64 -0
  24. package/dist/navigation-v2/FilterControls.js.map +1 -0
  25. package/dist/navigation-v2/NotificationArchivedV2.d.ts +9 -0
  26. package/dist/navigation-v2/NotificationArchivedV2.js +174 -0
  27. package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -0
  28. package/dist/navigation-v2/NotificationInboxV2.d.ts +9 -0
  29. package/dist/navigation-v2/NotificationInboxV2.js +309 -0
  30. package/dist/navigation-v2/NotificationInboxV2.js.map +1 -0
  31. package/dist/navigation-v2/NotificationSettingsV2.d.ts +9 -0
  32. package/dist/navigation-v2/NotificationSettingsV2.js +203 -0
  33. package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -0
  34. package/dist/navigation-v2/NotificationsV2Landing.d.ts +9 -0
  35. package/dist/navigation-v2/NotificationsV2Landing.js +37 -0
  36. package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -0
  37. package/dist/navigation-v2/__tests__/uiMocks.d.ts +71 -0
  38. package/dist/navigation-v2/inboxFilters.d.ts +8 -0
  39. package/dist/navigation-v2/inboxFilters.js +10 -0
  40. package/dist/navigation-v2/inboxFilters.js.map +1 -0
  41. package/dist/navigation-v2/paths.d.ts +24 -0
  42. package/dist/navigation-v2/paths.js +31 -0
  43. package/dist/navigation-v2/paths.js.map +1 -0
  44. package/dist/navigation-v2/settingsOptions.d.ts +12 -0
  45. package/dist/navigation-v2/settingsOptions.js +58 -0
  46. package/dist/navigation-v2/settingsOptions.js.map +1 -0
  47. package/dist/navigation-v2/useAdminTools.d.ts +22 -0
  48. package/dist/navigation-v2/useAdminTools.js +76 -0
  49. package/dist/navigation-v2/useAdminTools.js.map +1 -0
  50. package/dist/pages/CreateNotificationPage.js +577 -558
  51. package/dist/pages/CreateNotificationPage.js.map +1 -1
  52. package/dist/pages/NotificationCenterPage.d.ts +3 -1
  53. package/dist/pages/NotificationCenterPage.js +79 -74
  54. package/dist/pages/NotificationCenterPage.js.map +1 -1
  55. package/dist/pages/NotificationHistoryPage.d.ts +5 -1
  56. package/dist/pages/NotificationHistoryPage.js +52 -47
  57. package/dist/pages/NotificationHistoryPage.js.map +1 -1
  58. package/dist/pages/NotificationPreferencesPage.d.ts +4 -0
  59. package/dist/pages/NotificationPreferencesPage.js +97 -158
  60. package/dist/pages/NotificationPreferencesPage.js.map +1 -1
  61. package/dist/pages/NotificationTemplatesPage.js +184 -166
  62. package/dist/pages/NotificationTemplatesPage.js.map +1 -1
  63. package/dist/pages/NotificationTopicsPage.js +123 -108
  64. package/dist/pages/NotificationTopicsPage.js.map +1 -1
  65. package/dist/pages/TemplateEditorPage.js +339 -308
  66. package/dist/pages/TemplateEditorPage.js.map +1 -1
  67. package/dist/providers/NotificationProvider.js +6 -5
  68. package/dist/providers/NotificationProvider.js.map +1 -1
  69. package/dist/types/index.d.ts +8 -0
  70. package/package.json +2 -2
@@ -0,0 +1,309 @@
1
+ import { NotificationCard as e } from "../components/NotificationCard.js";
2
+ import { useNotifications as t } from "../hooks/useNotifications.js";
3
+ import { NOTIFICATION_PERMISSIONS as n } from "../constants/permissions.js";
4
+ import { useNotificationTopics as r } from "../hooks/useNotificationTopics.js";
5
+ import "../hooks/index.js";
6
+ import { useNotification as i } from "../providers/NotificationProvider.js";
7
+ import { useTr as a } from "../shared/hooks/useTr.js";
8
+ import { needsAction as o } from "./inboxFilters.js";
9
+ import { filterNotifications as s, groupNotificationsByDate as c } from "../utils/index.js";
10
+ import { AdminToolsMenu as l } from "./AdminToolsMenu.js";
11
+ import { MoreFiltersButton as u, SearchField as d, ViewChips as f } from "./FilterControls.js";
12
+ import { useNotificationPaths as p } from "./paths.js";
13
+ import { useMemo as m, useState as h } from "react";
14
+ import { usePermissions as g } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ import { Archive as _, CheckCheck as v, Settings as y } from "lucide-react";
16
+ import { Link as b } from "react-router";
17
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
18
+ import { PushOptInToggle as C } from "@burdenoff/fe-libs/chrome";
19
+ import { Button as w, IllustratedEmptyState as T, NativeSelect as E, useRememberedOpen as D } from "@burdenoff/fe-libs/ui";
20
+ // src/navigation-v2/NotificationInboxV2.tsx
21
+ var O = {
22
+ archived: !1,
23
+ channel: "IN_APP"
24
+ }, k = { channel: "IN_APP" }, A = "ALL";
25
+ function j() {
26
+ let l = a(), _ = p(), { hasPermission: v, isLoading: y } = g(), { currentUser: j } = i(), { notifications: N, unreadCount: P, notificationFilter: F, markAsRead: I, markAllAsRead: L, archiveNotification: R, recordAction: z, updateFilter: B, resetFilter: V } = t({
27
+ baseFilter: O,
28
+ unreadFilter: k
29
+ }), { topics: H } = r({ isActive: !0 }), [U, W] = h(!1), [G, K] = D("notifications.inbox.moreFilters", !1), q = U ? "action" : F.isRead === !1 ? "unread" : F.isRead === null ? "all" : null, J = m(() => {
30
+ let e = s(N, F);
31
+ return U ? e.filter(o) : e;
32
+ }, [
33
+ N,
34
+ F,
35
+ U
36
+ ]), Y = m(() => c(J, l), [J, l]), X = F.type !== A || F.priority !== A || !!F.topicId || F.isRead === !0, Z = !!F.search || X || q !== "all", Q = (e) => {
37
+ W(e === "action"), B({ isRead: e !== "unread" && null });
38
+ }, $ = () => {
39
+ W(!1), V();
40
+ };
41
+ if (y) return /* @__PURE__ */ x("div", {
42
+ className: "flex h-64 items-center justify-center",
43
+ children: /* @__PURE__ */ x("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
44
+ });
45
+ if (!v(n.NOTIFICATION_LIST) && !j?.id) return /* @__PURE__ */ x("div", {
46
+ className: "p-8 text-center text-text-secondary",
47
+ children: l("notifications.noPermissionView", "You don't have permission to view notifications.")
48
+ });
49
+ let ee = [
50
+ {
51
+ id: "all",
52
+ label: l("notifications.filterAll", "All")
53
+ },
54
+ {
55
+ id: "unread",
56
+ label: l("notifications.filterUnread", "Unread")
57
+ },
58
+ {
59
+ id: "action",
60
+ label: l("notifications.v2.needsAction", "Needs action")
61
+ }
62
+ ], te = [
63
+ {
64
+ value: A,
65
+ label: l("notifications.allTypes", "All Types")
66
+ },
67
+ {
68
+ value: "SYSTEM",
69
+ label: l("notifications.typeSystem", "System")
70
+ },
71
+ {
72
+ value: "ALERT",
73
+ label: l("notifications.typeAlert", "Alert")
74
+ },
75
+ {
76
+ value: "TRANSACTIONAL",
77
+ label: l("notifications.typeTransactional", "Transactional")
78
+ },
79
+ {
80
+ value: "MARKETING",
81
+ label: l("notifications.typeMarketing", "Marketing")
82
+ }
83
+ ], ne = [
84
+ {
85
+ value: A,
86
+ label: l("notifications.allPriorities", "All Priorities")
87
+ },
88
+ {
89
+ value: "URGENT",
90
+ label: l("notifications.priorityUrgent", "Urgent")
91
+ },
92
+ {
93
+ value: "HIGH",
94
+ label: l("notifications.priorityHigh", "High")
95
+ },
96
+ {
97
+ value: "NORMAL",
98
+ label: l("notifications.priorityNormal", "Normal")
99
+ },
100
+ {
101
+ value: "LOW",
102
+ label: l("notifications.priorityLow", "Low")
103
+ }
104
+ ], re = [{
105
+ value: A,
106
+ label: l("notifications.allTopics", "All Topics")
107
+ }, ...H.map((e) => ({
108
+ value: e.id,
109
+ label: e.name
110
+ }))], ie = [
111
+ {
112
+ value: "ALL",
113
+ label: l("notifications.filterAll", "All")
114
+ },
115
+ {
116
+ value: "UNREAD",
117
+ label: l("notifications.filterUnread", "Unread")
118
+ },
119
+ {
120
+ value: "READ",
121
+ label: l("notifications.filterRead", "Read")
122
+ }
123
+ ], ae = F.isRead === null ? "ALL" : F.isRead ? "READ" : "UNREAD";
124
+ return /* @__PURE__ */ S("div", {
125
+ className: "mx-auto w-full max-w-5xl space-y-4 p-3 animate-in fade-in duration-200 sm:space-y-5 sm:p-6",
126
+ children: [
127
+ /* @__PURE__ */ x(M, {
128
+ unreadCount: P,
129
+ onMarkAllAsRead: L
130
+ }),
131
+ /* @__PURE__ */ x(C, {}),
132
+ /* @__PURE__ */ S("section", {
133
+ "data-tour": "notification-center-filters",
134
+ "aria-label": l("notifications.v2.filters", "Filters"),
135
+ className: "space-y-3",
136
+ children: [
137
+ /* @__PURE__ */ S("div", {
138
+ className: "flex flex-col gap-3 sm:flex-row sm:items-center",
139
+ children: [/* @__PURE__ */ x(d, {
140
+ label: l("notifications.searchPlaceholder", "Search notifications..."),
141
+ value: F.search,
142
+ onChange: (e) => B({ search: e }),
143
+ tour: "notification-center-search"
144
+ }), /* @__PURE__ */ S("div", {
145
+ className: "flex flex-wrap items-center gap-2",
146
+ children: [/* @__PURE__ */ x(f, {
147
+ chips: ee,
148
+ value: q,
149
+ onChange: Q,
150
+ testIdPrefix: "notifications-view"
151
+ }), /* @__PURE__ */ x(u, {
152
+ open: G,
153
+ active: X,
154
+ controls: "notifications-more-filters",
155
+ onToggle: () => K(!G)
156
+ })]
157
+ })]
158
+ }),
159
+ /* @__PURE__ */ S("div", {
160
+ id: "notifications-more-filters",
161
+ hidden: !G,
162
+ className: "grid gap-3 rounded-lg border border-border-seam bg-bg-surface p-3 sm:grid-cols-2 lg:grid-cols-4",
163
+ children: [
164
+ /* @__PURE__ */ x(E, {
165
+ "aria-label": l("notifications.v2.typeFilter", "Type"),
166
+ options: te,
167
+ value: F.type,
168
+ onValueChange: (e) => B({ type: e })
169
+ }),
170
+ /* @__PURE__ */ x(E, {
171
+ "aria-label": l("notifications.v2.priorityFilter", "Priority"),
172
+ options: ne,
173
+ value: F.priority,
174
+ onValueChange: (e) => B({ priority: e })
175
+ }),
176
+ /* @__PURE__ */ x(E, {
177
+ "aria-label": l("notifications.v2.topicFilter", "Topic"),
178
+ options: re,
179
+ value: F.topicId || A,
180
+ onValueChange: (e) => B({ topicId: e === A ? void 0 : e })
181
+ }),
182
+ /* @__PURE__ */ x(E, {
183
+ "aria-label": l("notifications.v2.readFilter", "Read state"),
184
+ options: ie,
185
+ value: ae,
186
+ onValueChange: (e) => {
187
+ W(!1), B({ isRead: e === "ALL" ? null : e === "READ" });
188
+ }
189
+ })
190
+ ]
191
+ }),
192
+ Z && /* @__PURE__ */ x("button", {
193
+ type: "button",
194
+ onClick: $,
195
+ className: "text-sm text-text-tertiary transition-colors hover:text-text-primary",
196
+ children: l("notifications.v2.clearFilters", "Clear filters")
197
+ })
198
+ ]
199
+ }),
200
+ /* @__PURE__ */ x("div", {
201
+ "data-tour": "notification-center-list",
202
+ className: "space-y-6",
203
+ children: J.length > 0 ? Object.entries(Y).map(([t, n]) => /* @__PURE__ */ S("section", {
204
+ "aria-label": t,
205
+ children: [/* @__PURE__ */ x("h2", {
206
+ className: "mb-3 text-sm font-semibold text-text-tertiary",
207
+ children: t
208
+ }), /* @__PURE__ */ x("div", {
209
+ className: "space-y-2",
210
+ children: n.map((t) => /* @__PURE__ */ x(e, {
211
+ notification: t,
212
+ onMarkAsRead: I,
213
+ onArchive: R,
214
+ onAction: z,
215
+ analyticsSource: "center",
216
+ navigationV2: !0,
217
+ showTopic: G
218
+ }, t.id))
219
+ })]
220
+ }, t)) : /* @__PURE__ */ x(T, {
221
+ illustration: N.length === 0 ? "empty-notifications" : "empty-search",
222
+ title: N.length === 0 ? l("notifications.v2.emptyTitle", "You're all caught up") : l("notifications.noNotificationsFound", "No notifications found"),
223
+ description: N.length === 0 ? l("notifications.v2.emptyDescription", "Nothing here yet. We'll let you know when something needs you.") : l("notifications.adjustFilters", "Try adjusting your filters to see more notifications."),
224
+ action: N.length === 0 ? /* @__PURE__ */ x(w, {
225
+ asChild: !0,
226
+ variant: "outline",
227
+ children: /* @__PURE__ */ x(b, {
228
+ to: _.preferences,
229
+ children: l("notifications.v2.chooseHow", "Choose how we reach you")
230
+ })
231
+ }) : /* @__PURE__ */ x(w, {
232
+ type: "button",
233
+ variant: "outline",
234
+ onClick: $,
235
+ children: l("notifications.v2.clearFilters", "Clear filters")
236
+ })
237
+ })
238
+ })
239
+ ]
240
+ });
241
+ }
242
+ function M({ unreadCount: e, onMarkAllAsRead: t }) {
243
+ let n = a(), r = p();
244
+ return /* @__PURE__ */ S("header", {
245
+ "data-tour": "notification-center-header",
246
+ className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
247
+ children: [/* @__PURE__ */ S("div", {
248
+ className: "min-w-0",
249
+ children: [/* @__PURE__ */ S("h1", {
250
+ className: "flex flex-wrap items-center gap-2 text-xl font-semibold text-text-primary sm:text-2xl",
251
+ children: [n("notifications.v2.title", "Notifications"), e > 0 && /* @__PURE__ */ S("span", {
252
+ "data-tour": "notification-center-unread-count",
253
+ className: "inline-flex items-center gap-1.5 rounded-full bg-accent-primary/10 px-2.5 py-0.5 text-sm font-medium text-accent-primary",
254
+ children: [/* @__PURE__ */ x("span", {
255
+ className: "inline-block h-2 w-2 rounded-full bg-accent-primary",
256
+ "aria-hidden": "true"
257
+ }), n("notifications.v2.unreadCount", "{{count}} unread", { count: e })]
258
+ })]
259
+ }), /* @__PURE__ */ x("p", {
260
+ className: "mt-1 text-sm text-text-secondary",
261
+ children: n("notifications.v2.subtitle", "Everything the platform told you, in one place.")
262
+ })]
263
+ }), /* @__PURE__ */ S("div", {
264
+ className: "flex flex-wrap items-center gap-2",
265
+ children: [
266
+ e > 0 && /* @__PURE__ */ S(w, {
267
+ "data-tour": "notification-center-mark-all-read",
268
+ variant: "outline",
269
+ onClick: t,
270
+ className: "gap-2",
271
+ children: [/* @__PURE__ */ x(v, {
272
+ size: 16,
273
+ "aria-hidden": "true"
274
+ }), n("notifications.v2.markAllAsRead", "Mark all as read")]
275
+ }),
276
+ /* @__PURE__ */ x(w, {
277
+ asChild: !0,
278
+ variant: "outline",
279
+ className: "gap-2",
280
+ children: /* @__PURE__ */ S(b, {
281
+ to: r.preferences,
282
+ "data-testid": "notifications-settings-link",
283
+ children: [/* @__PURE__ */ x(y, {
284
+ size: 16,
285
+ "aria-hidden": "true"
286
+ }), n("notifications.v2.settings", "Notification settings")]
287
+ })
288
+ }),
289
+ /* @__PURE__ */ x(w, {
290
+ asChild: !0,
291
+ variant: "ghost",
292
+ className: "gap-2",
293
+ children: /* @__PURE__ */ S(b, {
294
+ to: r.archived,
295
+ "data-testid": "notifications-archived-link",
296
+ children: [/* @__PURE__ */ x(_, {
297
+ size: 16,
298
+ "aria-hidden": "true"
299
+ }), n("notifications.v2.archived", "Archived")]
300
+ })
301
+ }),
302
+ /* @__PURE__ */ x(l, {})
303
+ ]
304
+ })]
305
+ });
306
+ }
307
+ export { j as NotificationInboxV2 };
308
+
309
+ //# sourceMappingURL=NotificationInboxV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationInboxV2.js","names":["CENTER_FILTER","CENTER_UNREAD_FILTER","ALL","NotificationInboxV2","tr","useTr","paths","useNotificationPaths","permissionsLoading","usePermissions","useNotification","useNotifications","useNotificationTopics","onlyNeedsAction","setOnlyNeedsAction","useState","moreFiltersOpen","setMoreFiltersOpen","useRememberedOpen","view","notificationFilter","visible","useMemo","filtered","filterNotifications","notifications","needsAction","grouped","groupNotificationsByDate","moreFiltersActive","anyFilterActive","chooseView","next","updateFilter","clearFilters","resetFilter","hasPermission","NOTIFICATION_PERMISSIONS","currentUser","chips","typeOptions","priorityOptions","topicOptions","topics","topic","readOptions","readValue","InboxHeader","markAllAsRead","PushOptInToggle","SearchField","ViewChips","MoreFiltersButton","NativeSelect","value","group","items","NotificationCard","markAsRead","archiveNotification","recordAction","notification","IllustratedEmptyState","Button","Link","unreadCount","onMarkAllAsRead","CheckCheck","Settings","Archive","AdminToolsMenu"],"sources":["../../src/navigation-v2/NotificationInboxV2.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\nimport { Archive, CheckCheck, Settings } from 'lucide-react';\nimport { Link } from 'react-router';\nimport { PushOptInToggle } from '@burdenoff/fe-libs/chrome';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n Button,\n IllustratedEmptyState,\n NativeSelect,\n useRememberedOpen,\n} from '@burdenoff/fe-libs/ui';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport type { NotificationPriority, NotificationType } from '../types';\nimport { needsAction, type InboxView } from './inboxFilters';\nimport { filterNotifications, groupNotificationsByDate } from '../utils';\nimport { AdminToolsMenu } from './AdminToolsMenu';\nimport { MoreFiltersButton, SearchField, ViewChips } from './FilterControls';\nimport { useNotificationPaths } from './paths';\n\nconst CENTER_FILTER = { archived: false, channel: 'IN_APP' as const };\nconst CENTER_UNREAD_FILTER = { channel: 'IN_APP' };\nconst ALL = 'ALL';\n\n/**\n * Notifications, Navigation v2 (BOFF-11872, mockup 41). Level 1: the title\n * with the unread count, \"Mark all as read\", \"Notification settings\",\n * \"Archived\", search and the All · Unread · Needs action chips. Level 2: the\n * admin tools under \"More\", and Type, Priority, Topic and the full read state\n * under \"More filters\" (remembered per profile). Same queries as the classic\n * Notification Center.\n */\nexport function NotificationInboxV2() {\n const tr = useTr();\n const paths = useNotificationPaths();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const {\n notifications,\n unreadCount,\n notificationFilter,\n markAsRead,\n markAllAsRead,\n archiveNotification,\n recordAction,\n updateFilter,\n resetFilter,\n } = useNotifications({ baseFilter: CENTER_FILTER, unreadFilter: CENTER_UNREAD_FILTER });\n const { topics } = useNotificationTopics({ isActive: true });\n const [onlyNeedsAction, setOnlyNeedsAction] = useState(false);\n const [moreFiltersOpen, setMoreFiltersOpen] = useRememberedOpen(\n 'notifications.inbox.moreFilters',\n false\n );\n\n const view: InboxView | null = onlyNeedsAction\n ? 'action'\n : notificationFilter.isRead === false\n ? 'unread'\n : notificationFilter.isRead === null\n ? 'all'\n : null;\n\n const visible = useMemo(() => {\n const filtered = filterNotifications(notifications, notificationFilter);\n return onlyNeedsAction ? filtered.filter(needsAction) : filtered;\n }, [notifications, notificationFilter, onlyNeedsAction]);\n const grouped = useMemo(() => groupNotificationsByDate(visible, tr), [visible, tr]);\n\n const moreFiltersActive =\n notificationFilter.type !== ALL ||\n notificationFilter.priority !== ALL ||\n Boolean(notificationFilter.topicId) ||\n notificationFilter.isRead === true;\n const anyFilterActive = Boolean(notificationFilter.search) || moreFiltersActive || view !== 'all';\n\n const chooseView = (next: InboxView) => {\n setOnlyNeedsAction(next === 'action');\n updateFilter({ isRead: next === 'unread' ? false : null });\n };\n\n const clearFilters = () => {\n setOnlyNeedsAction(false);\n resetFilter();\n };\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n // The permission-fallback state (NOTIF-CTR-15), unchanged.\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST) && !currentUser?.id) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr('notifications.noPermissionView', \"You don't have permission to view notifications.\")}\n </div>\n );\n }\n\n const chips: Array<{ id: InboxView; label: string }> = [\n { id: 'all', label: tr('notifications.filterAll', 'All') },\n { id: 'unread', label: tr('notifications.filterUnread', 'Unread') },\n { id: 'action', label: tr('notifications.v2.needsAction', 'Needs action') },\n ];\n\n const typeOptions = [\n { value: ALL, label: tr('notifications.allTypes', 'All Types') },\n { value: 'SYSTEM', label: tr('notifications.typeSystem', 'System') },\n { value: 'ALERT', label: tr('notifications.typeAlert', 'Alert') },\n { value: 'TRANSACTIONAL', label: tr('notifications.typeTransactional', 'Transactional') },\n { value: 'MARKETING', label: tr('notifications.typeMarketing', 'Marketing') },\n ];\n const priorityOptions = [\n { value: ALL, label: tr('notifications.allPriorities', 'All Priorities') },\n { value: 'URGENT', label: tr('notifications.priorityUrgent', 'Urgent') },\n { value: 'HIGH', label: tr('notifications.priorityHigh', 'High') },\n { value: 'NORMAL', label: tr('notifications.priorityNormal', 'Normal') },\n { value: 'LOW', label: tr('notifications.priorityLow', 'Low') },\n ];\n const topicOptions = [\n { value: ALL, label: tr('notifications.allTopics', 'All Topics') },\n ...topics.map((topic) => ({ value: topic.id, label: topic.name })),\n ];\n const readOptions = [\n { value: 'ALL', label: tr('notifications.filterAll', 'All') },\n { value: 'UNREAD', label: tr('notifications.filterUnread', 'Unread') },\n { value: 'READ', label: tr('notifications.filterRead', 'Read') },\n ];\n const readValue =\n notificationFilter.isRead === null ? 'ALL' : notificationFilter.isRead ? 'READ' : 'UNREAD';\n\n return (\n <div className=\"mx-auto w-full max-w-5xl space-y-4 p-3 animate-in fade-in duration-200 sm:space-y-5 sm:p-6\">\n <InboxHeader unreadCount={unreadCount} onMarkAllAsRead={markAllAsRead} />\n\n <PushOptInToggle />\n\n <section\n data-tour=\"notification-center-filters\"\n aria-label={tr('notifications.v2.filters', 'Filters')}\n className=\"space-y-3\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-center\">\n <SearchField\n label={tr('notifications.searchPlaceholder', 'Search notifications...')}\n value={notificationFilter.search}\n onChange={(search) => updateFilter({ search })}\n tour=\"notification-center-search\"\n />\n <div className=\"flex flex-wrap items-center gap-2\">\n <ViewChips\n chips={chips}\n value={view}\n onChange={chooseView}\n testIdPrefix=\"notifications-view\"\n />\n <MoreFiltersButton\n open={moreFiltersOpen}\n active={moreFiltersActive}\n controls=\"notifications-more-filters\"\n onToggle={() => setMoreFiltersOpen(!moreFiltersOpen)}\n />\n </div>\n </div>\n\n <div\n id=\"notifications-more-filters\"\n hidden={!moreFiltersOpen}\n className=\"grid gap-3 rounded-lg border border-border-seam bg-bg-surface p-3 sm:grid-cols-2 lg:grid-cols-4\"\n >\n <NativeSelect\n aria-label={tr('notifications.v2.typeFilter', 'Type')}\n options={typeOptions}\n value={notificationFilter.type}\n // The options above are exactly ALL plus the NotificationType values.\n onValueChange={(value) => updateFilter({ type: value as NotificationType | 'ALL' })}\n />\n <NativeSelect\n aria-label={tr('notifications.v2.priorityFilter', 'Priority')}\n options={priorityOptions}\n value={notificationFilter.priority}\n // The options above are exactly ALL plus the NotificationPriority values.\n onValueChange={(value) =>\n updateFilter({ priority: value as NotificationPriority | 'ALL' })\n }\n />\n <NativeSelect\n aria-label={tr('notifications.v2.topicFilter', 'Topic')}\n options={topicOptions}\n value={notificationFilter.topicId || ALL}\n onValueChange={(value) => updateFilter({ topicId: value === ALL ? undefined : value })}\n />\n <NativeSelect\n aria-label={tr('notifications.v2.readFilter', 'Read state')}\n options={readOptions}\n value={readValue}\n onValueChange={(value) => {\n setOnlyNeedsAction(false);\n updateFilter({ isRead: value === 'ALL' ? null : value === 'READ' });\n }}\n />\n </div>\n\n {anyFilterActive && (\n <button\n type=\"button\"\n onClick={clearFilters}\n className=\"text-sm text-text-tertiary transition-colors hover:text-text-primary\"\n >\n {tr('notifications.v2.clearFilters', 'Clear filters')}\n </button>\n )}\n </section>\n\n <div data-tour=\"notification-center-list\" className=\"space-y-6\">\n {visible.length > 0 ? (\n Object.entries(grouped).map(([group, items]) => (\n <section key={group} aria-label={group}>\n <h2 className=\"mb-3 text-sm font-semibold text-text-tertiary\">{group}</h2>\n <div className=\"space-y-2\">\n {items.map((notification) => (\n <NotificationCard\n key={notification.id}\n notification={notification}\n onMarkAsRead={markAsRead}\n onArchive={archiveNotification}\n onAction={recordAction}\n analyticsSource=\"center\"\n navigationV2\n showTopic={moreFiltersOpen}\n />\n ))}\n </div>\n </section>\n ))\n ) : (\n <IllustratedEmptyState\n illustration={notifications.length === 0 ? 'empty-notifications' : 'empty-search'}\n title={\n notifications.length === 0\n ? tr('notifications.v2.emptyTitle', \"You're all caught up\")\n : tr('notifications.noNotificationsFound', 'No notifications found')\n }\n description={\n notifications.length === 0\n ? tr(\n 'notifications.v2.emptyDescription',\n \"Nothing here yet. We'll let you know when something needs you.\"\n )\n : tr(\n 'notifications.adjustFilters',\n 'Try adjusting your filters to see more notifications.'\n )\n }\n action={\n notifications.length === 0 ? (\n <Button asChild variant=\"outline\">\n <Link to={paths.preferences}>\n {tr('notifications.v2.chooseHow', 'Choose how we reach you')}\n </Link>\n </Button>\n ) : (\n <Button type=\"button\" variant=\"outline\" onClick={clearFilters}>\n {tr('notifications.v2.clearFilters', 'Clear filters')}\n </Button>\n )\n }\n />\n )}\n </div>\n </div>\n );\n}\n\n/** The inbox header: title with the unread count and the level-1 actions. */\nfunction InboxHeader({\n unreadCount,\n onMarkAllAsRead,\n}: {\n unreadCount: number;\n onMarkAllAsRead: () => void;\n}) {\n const tr = useTr();\n const paths = useNotificationPaths();\n return (\n <header\n data-tour=\"notification-center-header\"\n className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\"\n >\n <div className=\"min-w-0\">\n <h1 className=\"flex flex-wrap items-center gap-2 text-xl font-semibold text-text-primary sm:text-2xl\">\n {tr('notifications.v2.title', 'Notifications')}\n {unreadCount > 0 && (\n <span\n data-tour=\"notification-center-unread-count\"\n className=\"inline-flex items-center gap-1.5 rounded-full bg-accent-primary/10 px-2.5 py-0.5 text-sm font-medium text-accent-primary\"\n >\n <span\n className=\"inline-block h-2 w-2 rounded-full bg-accent-primary\"\n aria-hidden=\"true\"\n />\n {tr('notifications.v2.unreadCount', '{{count}} unread', { count: unreadCount })}\n </span>\n )}\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {tr('notifications.v2.subtitle', 'Everything the platform told you, in one place.')}\n </p>\n </div>\n <div className=\"flex flex-wrap items-center gap-2\">\n {unreadCount > 0 && (\n <Button\n data-tour=\"notification-center-mark-all-read\"\n variant=\"outline\"\n onClick={onMarkAllAsRead}\n className=\"gap-2\"\n >\n <CheckCheck size={16} aria-hidden=\"true\" />\n {tr('notifications.v2.markAllAsRead', 'Mark all as read')}\n </Button>\n )}\n <Button asChild variant=\"outline\" className=\"gap-2\">\n <Link to={paths.preferences} data-testid=\"notifications-settings-link\">\n <Settings size={16} aria-hidden=\"true\" />\n {tr('notifications.v2.settings', 'Notification settings')}\n </Link>\n </Button>\n <Button asChild variant=\"ghost\" className=\"gap-2\">\n <Link to={paths.archived} data-testid=\"notifications-archived-link\">\n <Archive size={16} aria-hidden=\"true\" />\n {tr('notifications.v2.archived', 'Archived')}\n </Link>\n </Button>\n <AdminToolsMenu />\n </div>\n </header>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,IAAMA,IAAgB;CAAE,UAAU;CAAO,SAAS;AAAkB,GAC9DC,IAAuB,EAAE,SAAS,SAAS,GAC3CC,IAAM;AAUZ,SAAgBC,IAAsB;CACpC,IAAMC,IAAKC,EAAM,GACXC,IAAQC,EAAqB,GAC7B,EAAE,kBAAe,WAAWC,MAAuBC,EAAe,GAClE,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ACE,kBAAC+D,GAAD;OAAS,MAAM;OAAI,eAAY;MAAQ,CAAA,GACtCjE,EAAG,6BAA6B,UAAU,CACvC;;IACA,CAAA;IACR,kBAACkE,GAAD,CAAiB,CAAA;GACd;EACC,CAAA,CAAA;;AAEZ"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Notification settings, Navigation v2 (BOFF-11872, mockup 48): "how to reach
3
+ * you" first. "Pause all notifications" and the In-app, Email and Push
4
+ * switches lead; SMS, WhatsApp, Slack and the type toggles sit under one
5
+ * "More options"; the opt-in topics show only when there are any. "Reset" is
6
+ * "Use default" in each row's "⋯". Every switch makes the same calls as the
7
+ * classic Preferences page.
8
+ */
9
+ export declare function NotificationSettingsV2(): import('react').JSX.Element;
@@ -0,0 +1,203 @@
1
+ import { NOTIFICATION_PERMISSIONS as e } from "../constants/permissions.js";
2
+ import { useNotificationTopics as t } from "../hooks/useNotificationTopics.js";
3
+ import "../hooks/index.js";
4
+ import { preferenceKey as n, usePreferenceToggles as r } from "../hooks/usePreferenceToggles.js";
5
+ import { useNotification as i } from "../providers/NotificationProvider.js";
6
+ import { useTr as a } from "../shared/hooks/useTr.js";
7
+ import { BackToNotifications as o } from "./BackToNotifications.js";
8
+ import { EVERYDAY_CHANNELS as s, MORE_CHANNELS as c, TYPES as l } from "./settingsOptions.js";
9
+ import { useId as u, useMemo as d, useState as f } from "react";
10
+ import { usePermissions as p } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { MoreHorizontal as m, Search as h } from "lucide-react";
12
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
+ import { Button as v, DropdownMenu as y, DropdownMenuContent as b, DropdownMenuItem as x, DropdownMenuTrigger as S, Input as C, OptionalFields as w, Switch as T } from "@burdenoff/fe-libs/ui";
14
+ // src/navigation-v2/NotificationSettingsV2.tsx
15
+ function E({ title: e, description: t, checked: n, saving: r, feedback: i, onToggle: o, onUseDefault: s, testId: c }) {
16
+ let l = a(), d = u();
17
+ return /* @__PURE__ */ _("div", {
18
+ className: "py-3",
19
+ "data-testid": c,
20
+ children: [/* @__PURE__ */ _("div", {
21
+ className: "flex items-center justify-between gap-3",
22
+ children: [/* @__PURE__ */ _("div", {
23
+ className: "min-w-0",
24
+ children: [/* @__PURE__ */ g("label", {
25
+ htmlFor: d,
26
+ className: "text-sm font-medium text-text-primary",
27
+ children: e
28
+ }), t && /* @__PURE__ */ g("p", {
29
+ className: "text-sm text-text-secondary",
30
+ children: t
31
+ })]
32
+ }), /* @__PURE__ */ _("div", {
33
+ className: "flex shrink-0 items-center gap-2",
34
+ children: [
35
+ /* @__PURE__ */ g("span", {
36
+ className: "w-8 text-right text-sm text-text-secondary",
37
+ "aria-hidden": "true",
38
+ children: r ? "…" : n ? l("notifications.v2.on", "On") : l("notifications.v2.off", "Off")
39
+ }),
40
+ /* @__PURE__ */ g(T, {
41
+ id: d,
42
+ checked: n,
43
+ disabled: r,
44
+ onCheckedChange: o
45
+ }),
46
+ s && /* @__PURE__ */ _(y, { children: [/* @__PURE__ */ g(S, {
47
+ asChild: !0,
48
+ children: /* @__PURE__ */ g(v, {
49
+ variant: "ghost",
50
+ size: "icon-sm",
51
+ "aria-label": l("notifications.v2.rowActions", "More for {{name}}", { name: e }),
52
+ children: /* @__PURE__ */ g(m, {
53
+ size: 16,
54
+ "aria-hidden": "true"
55
+ })
56
+ })
57
+ }), /* @__PURE__ */ g(b, {
58
+ align: "end",
59
+ children: /* @__PURE__ */ g(x, {
60
+ disabled: r,
61
+ onSelect: s,
62
+ children: l("notifications.v2.useDefault", "Use default")
63
+ })
64
+ })] })
65
+ ]
66
+ })]
67
+ }), /* @__PURE__ */ g("div", {
68
+ className: "min-h-5",
69
+ "aria-live": "polite",
70
+ children: i && /* @__PURE__ */ g("p", {
71
+ className: `text-xs ${i.type === "success" ? "text-status-success-text" : "text-status-error-text"}`,
72
+ children: i.message
73
+ })
74
+ })]
75
+ });
76
+ }
77
+ function D({ title: e, description: t, children: n, testId: r }) {
78
+ return /* @__PURE__ */ _("section", {
79
+ "data-tour": r,
80
+ className: "rounded-lg border border-border-seam bg-bg-surface px-4 py-2",
81
+ children: [
82
+ e && /* @__PURE__ */ g("h2", {
83
+ className: "pt-2 text-base font-semibold text-text-primary",
84
+ children: e
85
+ }),
86
+ t && /* @__PURE__ */ g("p", {
87
+ className: "text-sm text-text-secondary",
88
+ children: t
89
+ }),
90
+ /* @__PURE__ */ g("div", {
91
+ className: "divide-y divide-border-seam",
92
+ children: n
93
+ })
94
+ ]
95
+ });
96
+ }
97
+ function O() {
98
+ let u = a(), { hasPermission: m, isLoading: v } = p(), { currentUser: y } = i(), { topics: b, isLoading: x, isForbidden: S } = t({
99
+ type: "MARKETING",
100
+ isActive: !0
101
+ }), { preferencesByKey: T, savingKey: O, saveFeedback: k, togglePreference: A, resetPreference: j } = r(), [M, N] = f(""), P = d(() => {
102
+ let e = M.trim().toLowerCase();
103
+ return e ? b.filter((t) => t.name.toLowerCase().includes(e) || t.slug.toLowerCase().includes(e) || t.description?.toLowerCase().includes(e)) : b;
104
+ }, [M, b]);
105
+ if (v) return /* @__PURE__ */ g("div", {
106
+ className: "flex h-64 items-center justify-center",
107
+ children: /* @__PURE__ */ g("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
108
+ });
109
+ if (!m(e.NOTIFICATION_LIST) && !y?.id) return /* @__PURE__ */ g("div", {
110
+ className: "p-8 text-center text-text-secondary",
111
+ children: u("notifications.noPermissionPreferences", "You don't have permission to manage notification preferences.")
112
+ });
113
+ let F = (e, t, r = {}) => {
114
+ let i = n(e), a = T.get(i), o = a?.enabled ?? !0;
115
+ return /* @__PURE__ */ g(E, {
116
+ testId: `notification-setting-${i}`,
117
+ title: t,
118
+ description: r.description,
119
+ checked: r.inverted ? !o : o,
120
+ saving: O === i,
121
+ feedback: k?.key === i ? k : null,
122
+ onToggle: () => void A(e),
123
+ onUseDefault: a ? () => void j(i) : void 0
124
+ }, i);
125
+ }, I = !x && !S && b.length > 0;
126
+ return /* @__PURE__ */ _("div", {
127
+ "data-tour": "notification-preferences-page",
128
+ className: "mx-auto w-full max-w-3xl space-y-4 p-3 sm:space-y-5 sm:p-6",
129
+ children: [
130
+ /* @__PURE__ */ g(o, {}),
131
+ /* @__PURE__ */ _("header", { children: [/* @__PURE__ */ g("h1", {
132
+ className: "text-xl font-semibold text-text-primary sm:text-2xl",
133
+ children: u("notifications.v2.settingsTitle", "Notification settings")
134
+ }), /* @__PURE__ */ g("p", {
135
+ className: "mt-1 text-sm text-text-secondary",
136
+ children: u("notifications.v2.settingsSubtitle", "How and when we reach you.")
137
+ })] }),
138
+ /* @__PURE__ */ g(D, {
139
+ testId: "notification-preferences-global",
140
+ children: F({ scope: "GLOBAL" }, u("notifications.v2.pauseAll", "Pause all notifications"), {
141
+ description: u("notifications.v2.pauseAllDescription", "Stop every notification on every channel until you turn this off."),
142
+ inverted: !0
143
+ })
144
+ }),
145
+ /* @__PURE__ */ g(D, {
146
+ testId: "notification-preferences-channels",
147
+ title: u("notifications.v2.howToReachYou", "How to reach you"),
148
+ children: s.map((e) => F({
149
+ scope: "CHANNEL",
150
+ channel: e.value
151
+ }, u(e.labelKey, e.label)))
152
+ }),
153
+ /* @__PURE__ */ g(w, {
154
+ storageKey: "notifications.settings.more",
155
+ children: /* @__PURE__ */ _("div", {
156
+ className: "space-y-4",
157
+ children: [/* @__PURE__ */ g(D, {
158
+ title: u("notifications.v2.moreChannels", "Other ways to reach you"),
159
+ children: c.map((e) => F({
160
+ scope: "CHANNEL",
161
+ channel: e.value
162
+ }, u(e.labelKey, e.label)))
163
+ }), /* @__PURE__ */ g(D, {
164
+ testId: "notification-preferences-types",
165
+ title: u("notifications.v2.whatWeSend", "What we send you"),
166
+ children: l.map((e) => F({
167
+ scope: "TYPE",
168
+ type: e.value
169
+ }, u(e.labelKey, e.label)))
170
+ })]
171
+ })
172
+ }),
173
+ I && /* @__PURE__ */ _(D, {
174
+ testId: "notification-preferences-topics",
175
+ title: u("notifications.v2.optInTopics", "Updates you can opt into"),
176
+ children: [b.length > 5 && /* @__PURE__ */ _("div", {
177
+ className: "relative py-3",
178
+ children: [/* @__PURE__ */ g(h, {
179
+ size: 16,
180
+ className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary",
181
+ "aria-hidden": "true"
182
+ }), /* @__PURE__ */ g(C, {
183
+ type: "search",
184
+ value: M,
185
+ onChange: (e) => N(e.target.value),
186
+ "aria-label": u("notifications.searchTopics", "Search topics..."),
187
+ placeholder: u("notifications.searchTopics", "Search topics..."),
188
+ className: "pl-9"
189
+ })]
190
+ }), P.length === 0 ? /* @__PURE__ */ g("p", {
191
+ className: "py-3 text-sm text-text-secondary",
192
+ children: u("notifications.noTopicsFound", "No topics match your search")
193
+ }) : P.map((e) => F({
194
+ scope: "TOPIC",
195
+ topicId: e.id
196
+ }, e.name, { description: e.description || void 0 }))]
197
+ })
198
+ ]
199
+ });
200
+ }
201
+ export { O as NotificationSettingsV2 };
202
+
203
+ //# sourceMappingURL=NotificationSettingsV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationSettingsV2.js","names":["SwitchRow","tr","useTr","id","useId","testId","title","description","saving","checked","Switch","onToggle","onUseDefault","DropdownMenu","DropdownMenuTrigger","Button","MoreHorizontal","DropdownMenuContent","DropdownMenuItem","feedback","Section","NotificationSettingsV2","permissionsLoading","usePermissions","useNotification","topicsLoading","topicsForbidden","useNotificationTopics","usePreferenceToggles","search","setSearch","useState","filteredTopics","useMemo","query","topics","topic","hasPermission","NOTIFICATION_PERMISSIONS","currentUser","row","key","preferenceKey","target","existing","preferencesByKey","enabled","options","savingKey","saveFeedback","togglePreference","resetPreference","showTopics","BackToNotifications","EVERYDAY_CHANNELS","channel","OptionalFields","MORE_CHANNELS","TYPES","type","Search","Input","event"],"sources":["../../src/navigation-v2/NotificationSettingsV2.tsx"],"sourcesContent":["import { useId, useMemo, useState } from 'react';\nimport { MoreHorizontal, Search } from 'lucide-react';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n Input,\n OptionalFields,\n Switch,\n} from '@burdenoff/fe-libs/ui';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotificationTopics } from '../hooks';\nimport {\n preferenceKey,\n usePreferenceToggles,\n type PreferenceFeedback,\n type PreferenceTarget,\n} from '../hooks/usePreferenceToggles';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport { BackToNotifications } from './BackToNotifications';\nimport { EVERYDAY_CHANNELS, MORE_CHANNELS, TYPES } from './settingsOptions';\n\ninterface SwitchRowProps {\n title: string;\n description?: string;\n checked: boolean;\n saving: boolean;\n feedback: PreferenceFeedback | null;\n onToggle: () => void;\n /** Present when the person changed this one: \"Use default\" removes their choice. */\n onUseDefault?: () => void;\n testId?: string;\n}\n\nfunction SwitchRow({\n title,\n description,\n checked,\n saving,\n feedback,\n onToggle,\n onUseDefault,\n testId,\n}: SwitchRowProps) {\n const tr = useTr();\n const id = useId();\n return (\n <div className=\"py-3\" data-testid={testId}>\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"min-w-0\">\n <label htmlFor={id} className=\"text-sm font-medium text-text-primary\">\n {title}\n </label>\n {description && <p className=\"text-sm text-text-secondary\">{description}</p>}\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <span className=\"w-8 text-right text-sm text-text-secondary\" aria-hidden=\"true\">\n {saving\n ? '…'\n : checked\n ? tr('notifications.v2.on', 'On')\n : tr('notifications.v2.off', 'Off')}\n </span>\n <Switch id={id} checked={checked} disabled={saving} onCheckedChange={onToggle} />\n {onUseDefault && (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={tr('notifications.v2.rowActions', 'More for {{name}}', {\n name: title,\n })}\n >\n <MoreHorizontal size={16} aria-hidden=\"true\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem disabled={saving} onSelect={onUseDefault}>\n {tr('notifications.v2.useDefault', 'Use default')}\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n )}\n </div>\n </div>\n <div className=\"min-h-5\" aria-live=\"polite\">\n {feedback && (\n <p\n className={`text-xs ${feedback.type === 'success' ? 'text-status-success-text' : 'text-status-error-text'}`}\n >\n {feedback.message}\n </p>\n )}\n </div>\n </div>\n );\n}\n\nfunction Section({\n title,\n description,\n children,\n testId,\n}: {\n title?: string;\n description?: string;\n children: React.ReactNode;\n testId?: string;\n}) {\n return (\n <section\n data-tour={testId}\n className=\"rounded-lg border border-border-seam bg-bg-surface px-4 py-2\"\n >\n {title && <h2 className=\"pt-2 text-base font-semibold text-text-primary\">{title}</h2>}\n {description && <p className=\"text-sm text-text-secondary\">{description}</p>}\n <div className=\"divide-y divide-border-seam\">{children}</div>\n </section>\n );\n}\n\n/**\n * Notification settings, Navigation v2 (BOFF-11872, mockup 48): \"how to reach\n * you\" first. \"Pause all notifications\" and the In-app, Email and Push\n * switches lead; SMS, WhatsApp, Slack and the type toggles sit under one\n * \"More options\"; the opt-in topics show only when there are any. \"Reset\" is\n * \"Use default\" in each row's \"⋯\". Every switch makes the same calls as the\n * classic Preferences page.\n */\nexport function NotificationSettingsV2() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const {\n topics,\n isLoading: topicsLoading,\n isForbidden: topicsForbidden,\n } = useNotificationTopics({ type: 'MARKETING', isActive: true });\n const { preferencesByKey, savingKey, saveFeedback, togglePreference, resetPreference } =\n usePreferenceToggles();\n const [search, setSearch] = useState('');\n\n const filteredTopics = useMemo(() => {\n const query = search.trim().toLowerCase();\n if (!query) return topics;\n return topics.filter(\n (topic) =>\n topic.name.toLowerCase().includes(query) ||\n topic.slug.toLowerCase().includes(query) ||\n topic.description?.toLowerCase().includes(query)\n );\n }, [search, topics]);\n\n if (permissionsLoading) {\n return (\n <div className=\"flex h-64 items-center justify-center\">\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n </div>\n );\n }\n\n if (!hasPermission(NOTIFICATION_PERMISSIONS.NOTIFICATION_LIST) && !currentUser?.id) {\n return (\n <div className=\"p-8 text-center text-text-secondary\">\n {tr(\n 'notifications.noPermissionPreferences',\n \"You don't have permission to manage notification preferences.\"\n )}\n </div>\n );\n }\n\n const row = (\n target: PreferenceTarget,\n title: string,\n options: { description?: string; inverted?: boolean } = {}\n ) => {\n const key = preferenceKey(target);\n const existing = preferencesByKey.get(key);\n const enabled = existing?.enabled ?? true;\n return (\n <SwitchRow\n key={key}\n testId={`notification-setting-${key}`}\n title={title}\n description={options.description}\n // \"Pause all\" reads the other way round: on means delivery is off.\n checked={options.inverted ? !enabled : enabled}\n saving={savingKey === key}\n feedback={saveFeedback?.key === key ? saveFeedback : null}\n onToggle={() => void togglePreference(target)}\n onUseDefault={existing ? () => void resetPreference(key) : undefined}\n />\n );\n };\n\n const showTopics = !topicsLoading && !topicsForbidden && topics.length > 0;\n\n return (\n <div\n data-tour=\"notification-preferences-page\"\n className=\"mx-auto w-full max-w-3xl space-y-4 p-3 sm:space-y-5 sm:p-6\"\n >\n <BackToNotifications />\n <header>\n <h1 className=\"text-xl font-semibold text-text-primary sm:text-2xl\">\n {tr('notifications.v2.settingsTitle', 'Notification settings')}\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {tr('notifications.v2.settingsSubtitle', 'How and when we reach you.')}\n </p>\n </header>\n\n <Section testId=\"notification-preferences-global\">\n {row({ scope: 'GLOBAL' }, tr('notifications.v2.pauseAll', 'Pause all notifications'), {\n description: tr(\n 'notifications.v2.pauseAllDescription',\n 'Stop every notification on every channel until you turn this off.'\n ),\n inverted: true,\n })}\n </Section>\n\n <Section\n testId=\"notification-preferences-channels\"\n title={tr('notifications.v2.howToReachYou', 'How to reach you')}\n >\n {EVERYDAY_CHANNELS.map((channel) =>\n row({ scope: 'CHANNEL', channel: channel.value }, tr(channel.labelKey, channel.label))\n )}\n </Section>\n\n <OptionalFields storageKey=\"notifications.settings.more\">\n <div className=\"space-y-4\">\n <Section title={tr('notifications.v2.moreChannels', 'Other ways to reach you')}>\n {MORE_CHANNELS.map((channel) =>\n row({ scope: 'CHANNEL', channel: channel.value }, tr(channel.labelKey, channel.label))\n )}\n </Section>\n <Section\n testId=\"notification-preferences-types\"\n title={tr('notifications.v2.whatWeSend', 'What we send you')}\n >\n {TYPES.map((type) =>\n row({ scope: 'TYPE', type: type.value }, tr(type.labelKey, type.label))\n )}\n </Section>\n </div>\n </OptionalFields>\n\n {showTopics && (\n <Section\n testId=\"notification-preferences-topics\"\n title={tr('notifications.v2.optInTopics', 'Updates you can opt into')}\n >\n {topics.length > 5 && (\n <div className=\"relative py-3\">\n <Search\n size={16}\n className=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary\"\n aria-hidden=\"true\"\n />\n <Input\n type=\"search\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n aria-label={tr('notifications.searchTopics', 'Search topics...')}\n placeholder={tr('notifications.searchTopics', 'Search topics...')}\n className=\"pl-9\"\n />\n </div>\n )}\n {filteredTopics.length === 0 ? (\n <p className=\"py-3 text-sm text-text-secondary\">\n {tr('notifications.noTopicsFound', 'No topics match your search')}\n </p>\n ) : (\n filteredTopics.map((topic) =>\n row({ scope: 'TOPIC', topicId: topic.id }, topic.name, {\n description: topic.description || undefined,\n })\n )\n )}\n </Section>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAsCA,SAASA,EAAU,EACjB,UACA,gBACA,YACA,WACA,aACA,aACA,iBACA,aACiB;CACjB,IAAMC,IAAKC,EAAM,GACXC,IAAKC,EAAM;CACjB,OACE,kBAAC,OAAD;EAAK,WAAU;EAAO,eAAaC;EAAnC,UAAA,CACE,kBAAC,OAA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F;KACO,CAAA,GACT,kBAACnC,GAAD;MACE,QAAO;MACP,OAAOnB,EAAG,+BAA+B,kBAAkB;MAE1D,UAAAyD,EAAM,KAAK,MACVlB,EAAI;OAAE,OAAO;OAAQ,MAAMmB,EAAK;MAAM,GAAG1D,EAAG0D,EAAK,UAAUA,EAAK,KAAK,CAAC,CACxE;KACO,CAAA,CACN;;GACS,CAAA;GAEfP,KACC,kBAAChC,GAAD;IACE,QAAO;IACP,OAAOnB,EAAG,gCAAgC,0BAA0B;IAFtE,UAAA,CAIGkC,EAAO,SAAS,KACf,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAACyB,GAAD;MACE,MAAM;MACN,WAAU;MACV,eAAY;KACb,CAAA,GACD,kBAACC,GAAD;MACE,MAAK;MACL,OAAOhC;MACP,WAAW,MAAUC,EAAUgC,EAAM,OAAO,KAAK;MACjD,cAAY7D,EAAG,8BAA8B,kBAAkB;MAC/D,aAAaA,EAAG,8BAA8B,kBAAkB;MAChE,WAAU;KACX,CAAA,CACE;IAEN,CAAA,GAAA+B,EAAe,WAAW,IACzB,kBAAC,KAAD;KAAG,WAAU;KACV,UAAA/B,EAAG,+BAA+B,6BAA6B;IAC/D,CAAA,IAEH+B,EAAe,KAAK,MAClBQ,EAAI;KAAE,OAAO;KAAS,SAASJ,EAAM;IAAG,GAAGA,EAAM,MAAM,EACrD,aAAaA,EAAM,eAAe,KAAA,EACpC,CAAC,CACH,CAEK;;EAER;;AAET"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * `/notifications` under Navigation v2 (BOFF-11872): straight on the inbox,
3
+ * no tab strip. Every old `?tab=` value still opens its page: `send`,
4
+ * `templates` and `topics` go to their own routes, `history` is the Delivery
5
+ * log (which has no route of its own, and, as on the old landing, opens only
6
+ * while `notification.history` is on), and `inbox` or anything unknown is the
7
+ * inbox.
8
+ */
9
+ export declare function NotificationsV2Landing(): import('react').JSX.Element;