@burdenoff/microfe-notification 2026.1118.1 → 2026.1119.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/pages/CreateNotificationPage.js +108 -108
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +48 -48
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +122 -122
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +34 -34
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.js +140 -140
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +74 -74
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +361 -361
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,12 +13,12 @@ import { usePermissions as d } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
|
13
13
|
import { BellRing as f, CheckCheck as p, Search as m } from "lucide-react";
|
|
14
14
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
15
|
import { PushOptInToggle as v } from "@burdenoff/fe-libs/chrome";
|
|
16
|
-
import { AuroraBackground as y, Button as b, EmphasisPanel as x, GlassCard as S, GradientText as C, IllustratedEmptyState as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { AuroraBackground as y, Button as b, EmphasisPanel as x, GlassCard as S, GradientText as C, IllustratedEmptyState as w, PagePurpose as T, ThemedSelect as E } from "@burdenoff/fe-libs/ui";
|
|
17
17
|
// src/pages/NotificationCenterPage.tsx
|
|
18
|
-
var
|
|
18
|
+
var D = {
|
|
19
19
|
archived: !1,
|
|
20
20
|
channel: "IN_APP"
|
|
21
|
-
},
|
|
21
|
+
}, O = { channel: "IN_APP" }, k = [
|
|
22
22
|
{
|
|
23
23
|
value: "SYSTEM",
|
|
24
24
|
labelKey: "notifications.typeSystem",
|
|
@@ -39,7 +39,7 @@ var E = {
|
|
|
39
39
|
labelKey: "notifications.typeMarketing",
|
|
40
40
|
label: "Marketing"
|
|
41
41
|
}
|
|
42
|
-
],
|
|
42
|
+
], A = [
|
|
43
43
|
{
|
|
44
44
|
value: "URGENT",
|
|
45
45
|
labelKey: "notifications.priorityUrgent",
|
|
@@ -61,19 +61,19 @@ var E = {
|
|
|
61
61
|
label: "Low"
|
|
62
62
|
}
|
|
63
63
|
];
|
|
64
|
-
function
|
|
64
|
+
function j() {
|
|
65
65
|
let { navigationV2: e } = s();
|
|
66
|
-
return g(e ? l :
|
|
66
|
+
return g(e ? l : M, {});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
let l = c(), { hasPermission:
|
|
70
|
-
baseFilter:
|
|
71
|
-
unreadFilter:
|
|
72
|
-
}), { topics:
|
|
73
|
-
return
|
|
68
|
+
function M() {
|
|
69
|
+
let l = c(), { hasPermission: j, isLoading: M } = d(), { currentUser: N } = s(), { notifications: P, hasMore: F, isLoadingMore: I, loadMore: L, unreadCount: R, notificationFilter: z, markAsRead: B, markAllAsRead: V, archiveNotification: H, recordAction: U, updateFilter: W, resetFilter: G } = e({
|
|
70
|
+
baseFilter: D,
|
|
71
|
+
unreadFilter: O
|
|
72
|
+
}), { topics: K } = n({ isActive: !0 }), q = u(() => i(P, z), [P, z]), J = u(() => a(q, l), [q, l]);
|
|
73
|
+
return M ? /* @__PURE__ */ g("div", {
|
|
74
74
|
className: "flex h-64 items-center justify-center",
|
|
75
75
|
children: /* @__PURE__ */ g("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
76
|
-
}) : !
|
|
76
|
+
}) : !j(o.NOTIFICATION_LIST) && !N?.id ? /* @__PURE__ */ g("div", {
|
|
77
77
|
className: "p-8 text-center text-text-secondary",
|
|
78
78
|
children: l("notifications.noPermissionView", "You don't have permission to view notifications.")
|
|
79
79
|
}) : /* @__PURE__ */ _("div", {
|
|
@@ -93,21 +93,21 @@ function j() {
|
|
|
93
93
|
children: /* @__PURE__ */ g(C, { children: l("notifications.centerTitle", "Notification Center") })
|
|
94
94
|
}), /* @__PURE__ */ g("p", {
|
|
95
95
|
className: "text-sm text-text-secondary mt-1",
|
|
96
|
-
children:
|
|
96
|
+
children: R > 0 ? /* @__PURE__ */ _(h, { children: [
|
|
97
97
|
l("notifications.youHave", "You have"),
|
|
98
98
|
" ",
|
|
99
99
|
/* @__PURE__ */ _("span", {
|
|
100
100
|
className: "inline-flex items-center gap-1.5 font-semibold text-primary",
|
|
101
101
|
"data-tour": "notification-center-unread-count",
|
|
102
|
-
children: [/* @__PURE__ */ g("span", { className: "inline-block h-2 w-2 rounded-full bg-accent-primary motion-safe:animate-vc-glow-pulse" }),
|
|
102
|
+
children: [/* @__PURE__ */ g("span", { className: "inline-block h-2 w-2 rounded-full bg-accent-primary motion-safe:animate-vc-glow-pulse" }), R]
|
|
103
103
|
}),
|
|
104
104
|
" ",
|
|
105
|
-
l(
|
|
105
|
+
l(R === 1 ? "notifications.unreadNotification" : "notifications.unreadNotifications", R === 1 ? "unread notification" : "unread notifications")
|
|
106
106
|
] }) : l("notifications.allCaughtUp", "All caught up!")
|
|
107
|
-
})] }),
|
|
107
|
+
})] }), R > 0 && /* @__PURE__ */ _(b, {
|
|
108
108
|
"data-tour": "notification-center-mark-all-read",
|
|
109
109
|
variant: "outline",
|
|
110
|
-
onClick:
|
|
110
|
+
onClick: V,
|
|
111
111
|
className: "gap-2",
|
|
112
112
|
children: [/* @__PURE__ */ g(p, { size: 16 }), l("notifications.markAllAsRead", "Mark All as Read")]
|
|
113
113
|
})]
|
|
@@ -128,50 +128,50 @@ function j() {
|
|
|
128
128
|
"data-tour": "notification-center-search",
|
|
129
129
|
type: "text",
|
|
130
130
|
placeholder: l("notifications.searchPlaceholder", "Search notifications..."),
|
|
131
|
-
value:
|
|
132
|
-
onChange: (e) =>
|
|
131
|
+
value: z.search,
|
|
132
|
+
onChange: (e) => W({ search: e.target.value }),
|
|
133
133
|
className: "w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150"
|
|
134
134
|
})]
|
|
135
135
|
}),
|
|
136
|
-
/* @__PURE__ */ _(
|
|
137
|
-
value:
|
|
138
|
-
onChange: (e) =>
|
|
136
|
+
/* @__PURE__ */ _(E, {
|
|
137
|
+
value: z.type,
|
|
138
|
+
onChange: (e) => W({ type: e.target.value }),
|
|
139
139
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
140
140
|
children: [/* @__PURE__ */ g("option", {
|
|
141
141
|
value: "ALL",
|
|
142
142
|
children: l("notifications.allTypes", "All Types")
|
|
143
|
-
}),
|
|
143
|
+
}), k.map((e) => /* @__PURE__ */ g("option", {
|
|
144
144
|
value: e.value,
|
|
145
145
|
children: l(e.labelKey, e.label)
|
|
146
146
|
}, e.value))]
|
|
147
147
|
}),
|
|
148
|
-
/* @__PURE__ */ _(
|
|
149
|
-
value:
|
|
150
|
-
onChange: (e) =>
|
|
148
|
+
/* @__PURE__ */ _(E, {
|
|
149
|
+
value: z.priority,
|
|
150
|
+
onChange: (e) => W({ priority: e.target.value }),
|
|
151
151
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
152
152
|
children: [/* @__PURE__ */ g("option", {
|
|
153
153
|
value: "ALL",
|
|
154
154
|
children: l("notifications.allPriorities", "All Priorities")
|
|
155
|
-
}),
|
|
155
|
+
}), A.map((e) => /* @__PURE__ */ g("option", {
|
|
156
156
|
value: e.value,
|
|
157
157
|
children: l(e.labelKey, e.label)
|
|
158
158
|
}, e.value))]
|
|
159
159
|
}),
|
|
160
|
-
/* @__PURE__ */ _(
|
|
161
|
-
value:
|
|
162
|
-
onChange: (e) =>
|
|
160
|
+
/* @__PURE__ */ _(E, {
|
|
161
|
+
value: z.topicId || "",
|
|
162
|
+
onChange: (e) => W({ topicId: e.target.value || void 0 }),
|
|
163
163
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
164
164
|
children: [/* @__PURE__ */ g("option", {
|
|
165
165
|
value: "",
|
|
166
166
|
children: l("notifications.allTopics", "All Topics")
|
|
167
|
-
}),
|
|
167
|
+
}), K.map((e) => /* @__PURE__ */ g("option", {
|
|
168
168
|
value: e.id,
|
|
169
169
|
children: e.name
|
|
170
170
|
}, e.id))]
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */ _(
|
|
173
|
-
value:
|
|
174
|
-
onChange: (e) =>
|
|
172
|
+
/* @__PURE__ */ _(E, {
|
|
173
|
+
value: z.isRead === null ? "ALL" : z.isRead ? "READ" : "UNREAD",
|
|
174
|
+
onChange: (e) => W({ isRead: e.target.value === "ALL" ? null : e.target.value === "READ" }),
|
|
175
175
|
className: "px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
176
176
|
children: [
|
|
177
177
|
/* @__PURE__ */ g("option", {
|
|
@@ -188,8 +188,8 @@ function j() {
|
|
|
188
188
|
})
|
|
189
189
|
]
|
|
190
190
|
}),
|
|
191
|
-
(
|
|
192
|
-
onClick:
|
|
191
|
+
(z.search || z.type !== "ALL" || z.priority !== "ALL" || z.isRead !== null || !!z.topicId) && /* @__PURE__ */ g("button", {
|
|
192
|
+
onClick: G,
|
|
193
193
|
className: "px-3 py-2 text-sm text-tertiary hover:text-primary transition-colors duration-150",
|
|
194
194
|
children: l("notifications.resetFilters", "Reset")
|
|
195
195
|
})
|
|
@@ -198,7 +198,7 @@ function j() {
|
|
|
198
198
|
/* @__PURE__ */ g("div", {
|
|
199
199
|
"data-tour": "notification-center-list",
|
|
200
200
|
className: "space-y-6",
|
|
201
|
-
children:
|
|
201
|
+
children: q.length > 0 ? Object.entries(J).map(([e, n]) => /* @__PURE__ */ _("div", {
|
|
202
202
|
className: "animate-in fade-in slide-in-from-bottom-2 duration-200",
|
|
203
203
|
children: [/* @__PURE__ */ g("h2", {
|
|
204
204
|
className: "text-sm font-semibold text-tertiary mb-3",
|
|
@@ -207,30 +207,30 @@ function j() {
|
|
|
207
207
|
className: "space-y-2",
|
|
208
208
|
children: n.map((e) => /* @__PURE__ */ g(t, {
|
|
209
209
|
notification: e,
|
|
210
|
-
onMarkAsRead:
|
|
211
|
-
onArchive:
|
|
212
|
-
onAction:
|
|
210
|
+
onMarkAsRead: B,
|
|
211
|
+
onArchive: H,
|
|
212
|
+
onAction: U,
|
|
213
213
|
analyticsSource: "center"
|
|
214
214
|
}, e.id))
|
|
215
215
|
})]
|
|
216
216
|
}, e)) : /* @__PURE__ */ g("div", {
|
|
217
217
|
className: "animate-in fade-in duration-200",
|
|
218
218
|
children: /* @__PURE__ */ g(w, {
|
|
219
|
-
illustration:
|
|
219
|
+
illustration: P.length === 0 ? "empty-notifications" : "empty-search",
|
|
220
220
|
title: l("notifications.noNotificationsFound", "No notifications found"),
|
|
221
|
-
description:
|
|
221
|
+
description: P.length === 0 ? l("notifications.noNotificationsYet", "You don't have any notifications yet. We'll notify you when something important happens.") : l("notifications.adjustFilters", "Try adjusting your filters to see more notifications.")
|
|
222
222
|
})
|
|
223
223
|
})
|
|
224
224
|
}),
|
|
225
225
|
/* @__PURE__ */ g(r, {
|
|
226
|
-
hasMore:
|
|
227
|
-
isLoadingMore:
|
|
228
|
-
onLoadMore:
|
|
229
|
-
shownCount:
|
|
226
|
+
hasMore: F,
|
|
227
|
+
isLoadingMore: I,
|
|
228
|
+
onLoadMore: L,
|
|
229
|
+
shownCount: q.length
|
|
230
230
|
})
|
|
231
231
|
]
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
-
export {
|
|
234
|
+
export { j as NotificationCenterPage };
|
|
235
235
|
|
|
236
236
|
//# sourceMappingURL=NotificationCenterPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCenterPage.js","names":["_Fragment","CENTER_FILTER","CENTER_UNREAD_FILTER","TYPE_OPTIONS","PRIORITY_OPTIONS","NotificationCenterPage","useNotification","jsx","navigationV2","NotificationInboxV2","ClassicNotificationCenterPage","tr","useTr","permissionsLoading","usePermissions","useNotifications","useNotificationTopics","filteredNotifications","useMemo","filterNotifications","notifications","notificationFilter","groupedNotifications","groupNotificationsByDate","hasPermission","NOTIFICATION_PERMISSIONS","currentUser","PagePurpose","BellRing","AuroraBackground","EmphasisPanel","GradientText","unreadCount","Fragment","Button","markAllAsRead","CheckCheck","PushOptInToggle","GlassCard","Search","updateFilter","option","topics","topic","resetFilter","group","groupNotifications","NotificationCard","markAsRead","archiveNotification","recordAction","notification","IllustratedEmptyState","NotificationListFooter","loadMore"],"sources":["../../src/pages/NotificationCenterPage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Search, CheckCheck, BellRing } from 'lucide-react';\nimport { PushOptInToggle } from '@burdenoff/fe-libs/chrome';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n AuroraBackground,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { NotificationListFooter } from '../components/NotificationListFooter';\nimport { filterNotifications, groupNotificationsByDate } from '../utils';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport type { NotificationPriority, NotificationType } from '../types';\nimport { NotificationInboxV2 } from '../navigation-v2/NotificationInboxV2';\n\nconst CENTER_FILTER = { archived: false, channel: 'IN_APP' as const };\nconst CENTER_UNREAD_FILTER = { channel: 'IN_APP' };\nconst TYPE_OPTIONS: Array<{ value: NotificationType; labelKey: string; label: string }> = [\n { value: 'SYSTEM', labelKey: 'notifications.typeSystem', label: 'System' },\n { value: 'ALERT', labelKey: 'notifications.typeAlert', label: 'Alert' },\n { value: 'TRANSACTIONAL', labelKey: 'notifications.typeTransactional', label: 'Transactional' },\n { value: 'MARKETING', labelKey: 'notifications.typeMarketing', label: 'Marketing' },\n];\nconst PRIORITY_OPTIONS: Array<{ value: NotificationPriority; labelKey: string; label: string }> = [\n { value: 'URGENT', labelKey: 'notifications.priorityUrgent', label: 'Urgent' },\n { value: 'HIGH', labelKey: 'notifications.priorityHigh', label: 'High' },\n { value: 'NORMAL', labelKey: 'notifications.priorityNormal', label: 'Normal' },\n { value: 'LOW', labelKey: 'notifications.priorityLow', label: 'Low' },\n];\n\n/**\n * Notification Center Page\n *\n * Main page for viewing and managing in-app notifications. Under FluidGrids'\n * Navigation v2 (BOFF-11872) it is the inbox layout instead; every other app\n * keeps the classic page.\n */\nexport function NotificationCenterPage() {\n const { navigationV2 } = useNotification();\n return navigationV2 ? <NotificationInboxV2 /> : <ClassicNotificationCenterPage />;\n}\n\nfunction ClassicNotificationCenterPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const {\n notifications,\n hasMore,\n isLoadingMore,\n loadMore,\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\n // Filter and group notifications\n const filteredNotifications = useMemo(\n () => filterNotifications(notifications, notificationFilter),\n [notifications, notificationFilter]\n );\n const groupedNotifications = useMemo(\n () => groupNotificationsByDate(filteredNotifications, tr),\n [filteredNotifications, tr]\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 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 return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-200\">\n <PagePurpose icon={<BellRing size={16} />}>\n {tr(\n 'notifications.centerPurpose',\n 'Your in-app inbox. Everything the platform needs you to see — task assignments, mentions, alerts and system updates — lands here. Filter by type, priority or topic, mark items as read, and archive what you no longer need.'\n )}\n </PagePurpose>\n\n {/* Header — the page's single emphasis zone (unread summary + the one CTA).\n Wrapped in a relative overflow-hidden container so the AuroraBackground\n can sit behind it (at -z-10) without ever moving content. This is the\n MFE's single aurora hero. */}\n <div className=\"relative overflow-hidden rounded-2xl\">\n <AuroraBackground intensity=\"subtle\" />\n <EmphasisPanel\n data-tour=\"notification-center-header\"\n className=\"flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between sm:p-6\"\n >\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n <GradientText>{tr('notifications.centerTitle', 'Notification Center')}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {unreadCount > 0 ? (\n <>\n {tr('notifications.youHave', 'You have')}{' '}\n <span\n className=\"inline-flex items-center gap-1.5 font-semibold text-primary\"\n data-tour=\"notification-center-unread-count\"\n >\n <span className=\"inline-block h-2 w-2 rounded-full bg-accent-primary motion-safe:animate-vc-glow-pulse\" />\n {unreadCount}\n </span>{' '}\n {tr(\n unreadCount === 1\n ? 'notifications.unreadNotification'\n : 'notifications.unreadNotifications',\n unreadCount === 1 ? 'unread notification' : 'unread notifications'\n )}\n </>\n ) : (\n tr('notifications.allCaughtUp', 'All caught up!')\n )}\n </p>\n </div>\n\n {unreadCount > 0 && (\n <Button\n data-tour=\"notification-center-mark-all-read\"\n variant=\"outline\"\n onClick={markAllAsRead}\n className=\"gap-2\"\n >\n <CheckCheck size={16} />\n {tr('notifications.markAllAsRead', 'Mark All as Read')}\n </Button>\n )}\n </EmphasisPanel>\n </div>\n\n {/* Push opt-in — renders nothing when the surface has no push support\n (web without a service worker, or a shell that never registered a\n controller), so no wrapper card here to avoid an empty box in that\n case. Placed here too since this page, not just the bell dropdown,\n can be the first notification surface a user reaches. */}\n <PushOptInToggle />\n\n {/* Filters */}\n <GlassCard\n treatment=\"plain\"\n data-tour=\"notification-center-filters\"\n className=\"flex flex-col gap-3 border-border-seam p-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-4 sm:p-4\"\n >\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n data-tour=\"notification-center-search\"\n type=\"text\"\n placeholder={tr('notifications.searchPlaceholder', 'Search notifications...')}\n value={notificationFilter.search}\n onChange={(e) => updateFilter({ search: e.target.value })}\n className=\"w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n />\n </div>\n\n {/* Type filter */}\n <select\n value={notificationFilter.type}\n onChange={(e) => updateFilter({ type: e.target.value as NotificationType | 'ALL' })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"ALL\">{tr('notifications.allTypes', 'All Types')}</option>\n {TYPE_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </select>\n\n {/* Priority filter */}\n <select\n value={notificationFilter.priority}\n onChange={(e) =>\n updateFilter({ priority: e.target.value as NotificationPriority | 'ALL' })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"ALL\">{tr('notifications.allPriorities', 'All Priorities')}</option>\n {PRIORITY_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </select>\n\n <select\n value={notificationFilter.topicId || ''}\n onChange={(e) => updateFilter({ topicId: e.target.value || undefined })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </select>\n\n {/* Read/Unread filter */}\n <select\n value={\n notificationFilter.isRead === null\n ? 'ALL'\n : notificationFilter.isRead\n ? 'READ'\n : 'UNREAD'\n }\n onChange={(e) =>\n updateFilter({\n isRead: e.target.value === 'ALL' ? null : e.target.value === 'READ',\n })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"ALL\">{tr('notifications.filterAll', 'All')}</option>\n <option value=\"UNREAD\">{tr('notifications.filterUnread', 'Unread')}</option>\n <option value=\"READ\">{tr('notifications.filterRead', 'Read')}</option>\n </select>\n\n {/* Reset filters */}\n {(notificationFilter.search ||\n notificationFilter.type !== 'ALL' ||\n notificationFilter.priority !== 'ALL' ||\n notificationFilter.isRead !== null ||\n Boolean(notificationFilter.topicId)) && (\n <button\n onClick={resetFilter}\n className=\"px-3 py-2 text-sm text-tertiary hover:text-primary transition-colors duration-150\"\n >\n {tr('notifications.resetFilters', 'Reset')}\n </button>\n )}\n </GlassCard>\n\n {/* Notifications list */}\n <div data-tour=\"notification-center-list\" className=\"space-y-6\">\n {filteredNotifications.length > 0 ? (\n Object.entries(groupedNotifications).map(([group, groupNotifications]) => (\n <div key={group} className=\"animate-in fade-in slide-in-from-bottom-2 duration-200\">\n <h2 className=\"text-sm font-semibold text-tertiary mb-3\">{group}</h2>\n <div className=\"space-y-2\">\n {groupNotifications.map((notification) => (\n <NotificationCard\n key={notification.id}\n notification={notification}\n onMarkAsRead={markAsRead}\n onArchive={archiveNotification}\n onAction={recordAction}\n analyticsSource=\"center\"\n />\n ))}\n </div>\n </div>\n ))\n ) : (\n <div className=\"animate-in fade-in duration-200\">\n <IllustratedEmptyState\n illustration={notifications.length === 0 ? 'empty-notifications' : 'empty-search'}\n title={tr('notifications.noNotificationsFound', 'No notifications found')}\n description={\n notifications.length === 0\n ? tr(\n 'notifications.noNotificationsYet',\n \"You don't have any notifications yet. We'll notify you when something important happens.\"\n )\n : tr(\n 'notifications.adjustFilters',\n 'Try adjusting your filters to see more notifications.'\n )\n }\n />\n </div>\n )}\n </div>\n\n <NotificationListFooter\n hasMore={hasMore}\n isLoadingMore={isLoadingMore}\n onLoadMore={loadMore}\n shownCount={filteredNotifications.length}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,IAAMC,IAAgB;CAAE,UAAU;CAAO,SAAS;AAAkB,GAC9DC,IAAuB,EAAE,SAAS,SAAS,GAC3CC,IAAoF;CACxF;EAAE,OAAO;EAAU,UAAU;EAA4B,OAAO;CAAS;C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F,IACAA,EACE,+BACA,uDACF;KAEP,CAAA;IACE,CAAA;GAEJ,CAAA;GAEL,kBAAC0C,GAAD;IACW;IACM;IACf,YAAYC;IACZ,YAAYrC,EAAsB;GACnC,CAAA;EACE;;AAET"}
|
|
1
|
+
{"version":3,"file":"NotificationCenterPage.js","names":["_Fragment","CENTER_FILTER","CENTER_UNREAD_FILTER","TYPE_OPTIONS","PRIORITY_OPTIONS","NotificationCenterPage","useNotification","jsx","navigationV2","NotificationInboxV2","ClassicNotificationCenterPage","tr","useTr","permissionsLoading","usePermissions","useNotifications","useNotificationTopics","filteredNotifications","useMemo","filterNotifications","notifications","notificationFilter","groupedNotifications","groupNotificationsByDate","hasPermission","NOTIFICATION_PERMISSIONS","currentUser","PagePurpose","BellRing","AuroraBackground","EmphasisPanel","GradientText","unreadCount","Fragment","Button","markAllAsRead","CheckCheck","PushOptInToggle","GlassCard","Search","updateFilter","ThemedSelect","option","topics","topic","resetFilter","group","groupNotifications","NotificationCard","markAsRead","archiveNotification","recordAction","notification","IllustratedEmptyState","NotificationListFooter","loadMore"],"sources":["../../src/pages/NotificationCenterPage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { Search, CheckCheck, BellRing } from 'lucide-react';\nimport { PushOptInToggle } from '@burdenoff/fe-libs/chrome';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n AuroraBackground,\n Button,\n EmphasisPanel,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n ThemedSelect,\n} from '@burdenoff/fe-libs/ui';\nimport { useNotifications, useNotificationTopics } from '../hooks';\nimport { NotificationCard } from '../components/NotificationCard';\nimport { NotificationListFooter } from '../components/NotificationListFooter';\nimport { filterNotifications, groupNotificationsByDate } from '../utils';\nimport { NOTIFICATION_PERMISSIONS } from '../constants/permissions';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { useTr } from '../shared/hooks/useTr';\nimport type { NotificationPriority, NotificationType } from '../types';\nimport { NotificationInboxV2 } from '../navigation-v2/NotificationInboxV2';\n\nconst CENTER_FILTER = { archived: false, channel: 'IN_APP' as const };\nconst CENTER_UNREAD_FILTER = { channel: 'IN_APP' };\nconst TYPE_OPTIONS: Array<{ value: NotificationType; labelKey: string; label: string }> = [\n { value: 'SYSTEM', labelKey: 'notifications.typeSystem', label: 'System' },\n { value: 'ALERT', labelKey: 'notifications.typeAlert', label: 'Alert' },\n { value: 'TRANSACTIONAL', labelKey: 'notifications.typeTransactional', label: 'Transactional' },\n { value: 'MARKETING', labelKey: 'notifications.typeMarketing', label: 'Marketing' },\n];\nconst PRIORITY_OPTIONS: Array<{ value: NotificationPriority; labelKey: string; label: string }> = [\n { value: 'URGENT', labelKey: 'notifications.priorityUrgent', label: 'Urgent' },\n { value: 'HIGH', labelKey: 'notifications.priorityHigh', label: 'High' },\n { value: 'NORMAL', labelKey: 'notifications.priorityNormal', label: 'Normal' },\n { value: 'LOW', labelKey: 'notifications.priorityLow', label: 'Low' },\n];\n\n/**\n * Notification Center Page\n *\n * Main page for viewing and managing in-app notifications. Under FluidGrids'\n * Navigation v2 (BOFF-11872) it is the inbox layout instead; every other app\n * keeps the classic page.\n */\nexport function NotificationCenterPage() {\n const { navigationV2 } = useNotification();\n return navigationV2 ? <NotificationInboxV2 /> : <ClassicNotificationCenterPage />;\n}\n\nfunction ClassicNotificationCenterPage() {\n const tr = useTr();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const { currentUser } = useNotification();\n const {\n notifications,\n hasMore,\n isLoadingMore,\n loadMore,\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\n // Filter and group notifications\n const filteredNotifications = useMemo(\n () => filterNotifications(notifications, notificationFilter),\n [notifications, notificationFilter]\n );\n const groupedNotifications = useMemo(\n () => groupNotificationsByDate(filteredNotifications, tr),\n [filteredNotifications, tr]\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 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 return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6 animate-in fade-in duration-200\">\n <PagePurpose icon={<BellRing size={16} />}>\n {tr(\n 'notifications.centerPurpose',\n 'Your in-app inbox. Everything the platform needs you to see — task assignments, mentions, alerts and system updates — lands here. Filter by type, priority or topic, mark items as read, and archive what you no longer need.'\n )}\n </PagePurpose>\n\n {/* Header — the page's single emphasis zone (unread summary + the one CTA).\n Wrapped in a relative overflow-hidden container so the AuroraBackground\n can sit behind it (at -z-10) without ever moving content. This is the\n MFE's single aurora hero. */}\n <div className=\"relative overflow-hidden rounded-2xl\">\n <AuroraBackground intensity=\"subtle\" />\n <EmphasisPanel\n data-tour=\"notification-center-header\"\n className=\"flex flex-col gap-4 p-5 sm:flex-row sm:items-center sm:justify-between sm:p-6\"\n >\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-primary\">\n <GradientText>{tr('notifications.centerTitle', 'Notification Center')}</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary mt-1\">\n {unreadCount > 0 ? (\n <>\n {tr('notifications.youHave', 'You have')}{' '}\n <span\n className=\"inline-flex items-center gap-1.5 font-semibold text-primary\"\n data-tour=\"notification-center-unread-count\"\n >\n <span className=\"inline-block h-2 w-2 rounded-full bg-accent-primary motion-safe:animate-vc-glow-pulse\" />\n {unreadCount}\n </span>{' '}\n {tr(\n unreadCount === 1\n ? 'notifications.unreadNotification'\n : 'notifications.unreadNotifications',\n unreadCount === 1 ? 'unread notification' : 'unread notifications'\n )}\n </>\n ) : (\n tr('notifications.allCaughtUp', 'All caught up!')\n )}\n </p>\n </div>\n\n {unreadCount > 0 && (\n <Button\n data-tour=\"notification-center-mark-all-read\"\n variant=\"outline\"\n onClick={markAllAsRead}\n className=\"gap-2\"\n >\n <CheckCheck size={16} />\n {tr('notifications.markAllAsRead', 'Mark All as Read')}\n </Button>\n )}\n </EmphasisPanel>\n </div>\n\n {/* Push opt-in — renders nothing when the surface has no push support\n (web without a service worker, or a shell that never registered a\n controller), so no wrapper card here to avoid an empty box in that\n case. Placed here too since this page, not just the bell dropdown,\n can be the first notification surface a user reaches. */}\n <PushOptInToggle />\n\n {/* Filters */}\n <GlassCard\n treatment=\"plain\"\n data-tour=\"notification-center-filters\"\n className=\"flex flex-col gap-3 border-border-seam p-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-4 sm:p-4\"\n >\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search size={16} className=\"absolute left-3 top-1/2 -translate-y-1/2 text-tertiary\" />\n <input\n data-tour=\"notification-center-search\"\n type=\"text\"\n placeholder={tr('notifications.searchPlaceholder', 'Search notifications...')}\n value={notificationFilter.search}\n onChange={(e) => updateFilter({ search: e.target.value })}\n className=\"w-full pl-9 pr-4 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150\"\n />\n </div>\n\n {/* Type filter */}\n <ThemedSelect\n value={notificationFilter.type}\n onChange={(e) => updateFilter({ type: e.target.value as NotificationType | 'ALL' })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"ALL\">{tr('notifications.allTypes', 'All Types')}</option>\n {TYPE_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </ThemedSelect>\n\n {/* Priority filter */}\n <ThemedSelect\n value={notificationFilter.priority}\n onChange={(e) =>\n updateFilter({ priority: e.target.value as NotificationPriority | 'ALL' })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"ALL\">{tr('notifications.allPriorities', 'All Priorities')}</option>\n {PRIORITY_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {tr(option.labelKey, option.label)}\n </option>\n ))}\n </ThemedSelect>\n\n <ThemedSelect\n value={notificationFilter.topicId || ''}\n onChange={(e) => updateFilter({ topicId: e.target.value || undefined })}\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"\">{tr('notifications.allTopics', 'All Topics')}</option>\n {topics.map((topic) => (\n <option key={topic.id} value={topic.id}>\n {topic.name}\n </option>\n ))}\n </ThemedSelect>\n\n {/* Read/Unread filter */}\n <ThemedSelect\n value={\n notificationFilter.isRead === null\n ? 'ALL'\n : notificationFilter.isRead\n ? 'READ'\n : 'UNREAD'\n }\n onChange={(e) =>\n updateFilter({\n isRead: e.target.value === 'ALL' ? null : e.target.value === 'READ',\n })\n }\n className=\"px-3 py-2 text-sm text-primary bg-surface border border-default rounded-lg focus:outline-none focus:ring-2 focus:ring-accent transition-shadow duration-150 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"ALL\">{tr('notifications.filterAll', 'All')}</option>\n <option value=\"UNREAD\">{tr('notifications.filterUnread', 'Unread')}</option>\n <option value=\"READ\">{tr('notifications.filterRead', 'Read')}</option>\n </ThemedSelect>\n\n {/* Reset filters */}\n {(notificationFilter.search ||\n notificationFilter.type !== 'ALL' ||\n notificationFilter.priority !== 'ALL' ||\n notificationFilter.isRead !== null ||\n Boolean(notificationFilter.topicId)) && (\n <button\n onClick={resetFilter}\n className=\"px-3 py-2 text-sm text-tertiary hover:text-primary transition-colors duration-150\"\n >\n {tr('notifications.resetFilters', 'Reset')}\n </button>\n )}\n </GlassCard>\n\n {/* Notifications list */}\n <div data-tour=\"notification-center-list\" className=\"space-y-6\">\n {filteredNotifications.length > 0 ? (\n Object.entries(groupedNotifications).map(([group, groupNotifications]) => (\n <div key={group} className=\"animate-in fade-in slide-in-from-bottom-2 duration-200\">\n <h2 className=\"text-sm font-semibold text-tertiary mb-3\">{group}</h2>\n <div className=\"space-y-2\">\n {groupNotifications.map((notification) => (\n <NotificationCard\n key={notification.id}\n notification={notification}\n onMarkAsRead={markAsRead}\n onArchive={archiveNotification}\n onAction={recordAction}\n analyticsSource=\"center\"\n />\n ))}\n </div>\n </div>\n ))\n ) : (\n <div className=\"animate-in fade-in duration-200\">\n <IllustratedEmptyState\n illustration={notifications.length === 0 ? 'empty-notifications' : 'empty-search'}\n title={tr('notifications.noNotificationsFound', 'No notifications found')}\n description={\n notifications.length === 0\n ? tr(\n 'notifications.noNotificationsYet',\n \"You don't have any notifications yet. We'll notify you when something important happens.\"\n )\n : tr(\n 'notifications.adjustFilters',\n 'Try adjusting your filters to see more notifications.'\n )\n }\n />\n </div>\n )}\n </div>\n\n <NotificationListFooter\n hasMore={hasMore}\n isLoadingMore={isLoadingMore}\n onLoadMore={loadMore}\n shownCount={filteredNotifications.length}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwBA,IAAMC,IAAgB;CAAE,UAAU;CAAO,SAAS;AAAkB,GAC9DC,IAAuB,EAAE,SAAS,SAAS,GAC3CC,IAAoF;CACxF;EAAE,OAAO;EAAU,UAAU;EAA4B,OAAO;CAAS;CACzE;EAAE,OAAO;EAAS,UAAU;EAA2B,OAAO;CAAQ;CACtE;EAAE,OAAO;EAAiB,UAAU;EAAmC,OAAO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