@burdenoff/microfe-notification 2026.1203.1 → 2026.1203.2
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/components/NotificationBell.js +1 -1
- package/dist/components/NotificationBell.js.map +1 -1
- package/dist/components/NotificationCard.js +5 -5
- package/dist/components/NotificationCard.js.map +1 -1
- package/dist/components/NotificationPanel.js +1 -1
- package/dist/components/NotificationPanel.js.map +1 -1
- package/dist/navigation-v2/FilterControls.js +2 -2
- package/dist/navigation-v2/FilterControls.js.map +1 -1
- package/dist/navigation-v2/NotificationSettingsV2.js +3 -3
- package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -1
- package/dist/pages/CreateNotificationPage.js +9 -9
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +2 -2
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +3 -3
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +2 -2
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.js +2 -2
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.js +2 -2
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +2 -2
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +2 -2
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/dist/v2/InboxPage.js +2 -2
- package/dist/v2/InboxPage.js.map +1 -1
- package/dist/v2/InboxRows.js +1 -1
- package/dist/v2/InboxRows.js.map +1 -1
- package/dist/v2/PreferencesPage.js +2 -2
- package/dist/v2/PreferencesPage.js.map +1 -1
- package/dist/v2/admin/DeliveryLogPage.js +1 -1
- package/dist/v2/admin/DeliveryLogPage.js.map +1 -1
- package/dist/v2/admin/TemplatesPage.js +2 -2
- package/dist/v2/admin/TemplatesPage.js.map +1 -1
- package/package.json +6 -2
|
@@ -59,7 +59,7 @@ function f({ onClick: f }) {
|
|
|
59
59
|
size: 20,
|
|
60
60
|
className: "text-primary"
|
|
61
61
|
}), _ > 0 && /* @__PURE__ */ u("span", {
|
|
62
|
-
className: "absolute top-1
|
|
62
|
+
className: "absolute top-1 end-1 flex items-center justify-center min-w-[18px] h-[18px] px-1 text-xs font-semibold tabular-nums text-white bg-error rounded-full motion-safe:animate-vc-glow-pulse",
|
|
63
63
|
children: _ > 99 ? "99+" : _
|
|
64
64
|
})]
|
|
65
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationBell.js","names":["NotificationBell","tr","useTr","useNotification","useNotificationStore","refreshUnreadCount","useCallback","result","getGlobalNotificationClient","apiGatewayUrl","authToken","USER_NOTIFICATION_CONTEXT","GetMyUnreadNotificationCountDocument","setUnreadCount","useEffect","currentUser","subscription","UnreadCountUpdatedDocument","nextCount","handleVisibilityChange","onClick","togglePanel","unreadCount","Bell"],"sources":["../../src/components/NotificationBell.tsx"],"sourcesContent":["import { useCallback, useEffect } from 'react';\nimport { Bell } from 'lucide-react';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { getGlobalNotificationClient, USER_NOTIFICATION_CONTEXT } from '../graphql/global-client';\nimport {\n GetMyUnreadNotificationCountDocument,\n UnreadCountUpdatedDocument,\n} from '../generated/global-operations';\nimport type {\n GetMyUnreadNotificationCountQuery,\n UnreadCountUpdatedSubscription,\n} from '../generated/global-operations';\nimport { useNotificationStore } from '../store/notificationStore';\nimport { useTr } from '../shared/hooks/useTr';\n\n/**\n * Notification bell icon with unread count badge\n *\n * This component should be placed in the global header/navbar\n *\n * @example\n * ```tsx\n * <NotificationBell onClick={() => navigate('/notifications/center')} />\n * ```\n */\nexport function NotificationBell({ onClick }: { onClick?: () => void }) {\n const tr = useTr();\n const { authToken, apiGatewayUrl, currentUser } = useNotification();\n const { unreadCount, togglePanel, setUnreadCount } = useNotificationStore();\n\n const refreshUnreadCount = useCallback(async () => {\n try {\n const client = getGlobalNotificationClient(\n apiGatewayUrl ?? undefined,\n authToken ?? undefined\n );\n const result = await client.query<GetMyUnreadNotificationCountQuery>({\n context: USER_NOTIFICATION_CONTEXT,\n query: GetMyUnreadNotificationCountDocument,\n variables: { filter: { channel: 'IN_APP' } },\n fetchPolicy: 'network-only',\n });\n\n if (typeof result.data?.myUnreadNotificationCount === 'number') {\n setUnreadCount(result.data.myUnreadNotificationCount);\n }\n } catch {\n // Keep bell resilient; do not surface errors here.\n }\n }, [apiGatewayUrl, authToken, setUnreadCount]);\n\n useEffect(() => {\n refreshUnreadCount();\n }, [refreshUnreadCount]);\n\n useEffect(() => {\n if (!currentUser?.id) return undefined;\n\n const client = getGlobalNotificationClient(apiGatewayUrl ?? undefined, authToken ?? undefined);\n const subscription = client\n .subscribe<UnreadCountUpdatedSubscription>({\n query: UnreadCountUpdatedDocument,\n variables: { userId: currentUser.id },\n })\n .subscribe({\n next: (result) => {\n const nextCount = result.data?.unreadCountUpdated;\n if (typeof nextCount === 'number') {\n setUnreadCount(nextCount);\n }\n },\n error: () => {\n // Keep the header resilient; visibility refresh below handles recovery.\n },\n });\n\n return () => subscription.unsubscribe();\n }, [apiGatewayUrl, authToken, currentUser?.id, setUnreadCount]);\n\n useEffect(() => {\n const handleVisibilityChange = () => {\n if (document.visibilityState === 'visible') {\n refreshUnreadCount();\n }\n };\n\n document.addEventListener('visibilitychange', handleVisibilityChange);\n return () => document.removeEventListener('visibilitychange', handleVisibilityChange);\n }, [refreshUnreadCount]);\n\n const handleClick = () => {\n if (onClick) {\n onClick();\n } else {\n togglePanel();\n }\n };\n\n return (\n <button\n data-tour=\"notification-bell\"\n onClick={handleClick}\n className=\"relative inline-flex items-center justify-center p-2 rounded-md hover:bg-bg-sunken transition-all duration-150\"\n aria-label={`${tr('notifCommon.notifications', 'Notifications')}${unreadCount > 0 ? ` (${unreadCount} ${tr('notifCommon.unread', 'unread')})` : ''}`}\n >\n <Bell size={20} className=\"text-primary\" />\n {unreadCount > 0 && (\n <span className=\"absolute top-1
|
|
1
|
+
{"version":3,"file":"NotificationBell.js","names":["NotificationBell","tr","useTr","useNotification","useNotificationStore","refreshUnreadCount","useCallback","result","getGlobalNotificationClient","apiGatewayUrl","authToken","USER_NOTIFICATION_CONTEXT","GetMyUnreadNotificationCountDocument","setUnreadCount","useEffect","currentUser","subscription","UnreadCountUpdatedDocument","nextCount","handleVisibilityChange","onClick","togglePanel","unreadCount","Bell"],"sources":["../../src/components/NotificationBell.tsx"],"sourcesContent":["import { useCallback, useEffect } from 'react';\nimport { Bell } from 'lucide-react';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { getGlobalNotificationClient, USER_NOTIFICATION_CONTEXT } from '../graphql/global-client';\nimport {\n GetMyUnreadNotificationCountDocument,\n UnreadCountUpdatedDocument,\n} from '../generated/global-operations';\nimport type {\n GetMyUnreadNotificationCountQuery,\n UnreadCountUpdatedSubscription,\n} from '../generated/global-operations';\nimport { useNotificationStore } from '../store/notificationStore';\nimport { useTr } from '../shared/hooks/useTr';\n\n/**\n * Notification bell icon with unread count badge\n *\n * This component should be placed in the global header/navbar\n *\n * @example\n * ```tsx\n * <NotificationBell onClick={() => navigate('/notifications/center')} />\n * ```\n */\nexport function NotificationBell({ onClick }: { onClick?: () => void }) {\n const tr = useTr();\n const { authToken, apiGatewayUrl, currentUser } = useNotification();\n const { unreadCount, togglePanel, setUnreadCount } = useNotificationStore();\n\n const refreshUnreadCount = useCallback(async () => {\n try {\n const client = getGlobalNotificationClient(\n apiGatewayUrl ?? undefined,\n authToken ?? undefined\n );\n const result = await client.query<GetMyUnreadNotificationCountQuery>({\n context: USER_NOTIFICATION_CONTEXT,\n query: GetMyUnreadNotificationCountDocument,\n variables: { filter: { channel: 'IN_APP' } },\n fetchPolicy: 'network-only',\n });\n\n if (typeof result.data?.myUnreadNotificationCount === 'number') {\n setUnreadCount(result.data.myUnreadNotificationCount);\n }\n } catch {\n // Keep bell resilient; do not surface errors here.\n }\n }, [apiGatewayUrl, authToken, setUnreadCount]);\n\n useEffect(() => {\n refreshUnreadCount();\n }, [refreshUnreadCount]);\n\n useEffect(() => {\n if (!currentUser?.id) return undefined;\n\n const client = getGlobalNotificationClient(apiGatewayUrl ?? undefined, authToken ?? undefined);\n const subscription = client\n .subscribe<UnreadCountUpdatedSubscription>({\n query: UnreadCountUpdatedDocument,\n variables: { userId: currentUser.id },\n })\n .subscribe({\n next: (result) => {\n const nextCount = result.data?.unreadCountUpdated;\n if (typeof nextCount === 'number') {\n setUnreadCount(nextCount);\n }\n },\n error: () => {\n // Keep the header resilient; visibility refresh below handles recovery.\n },\n });\n\n return () => subscription.unsubscribe();\n }, [apiGatewayUrl, authToken, currentUser?.id, setUnreadCount]);\n\n useEffect(() => {\n const handleVisibilityChange = () => {\n if (document.visibilityState === 'visible') {\n refreshUnreadCount();\n }\n };\n\n document.addEventListener('visibilitychange', handleVisibilityChange);\n return () => document.removeEventListener('visibilitychange', handleVisibilityChange);\n }, [refreshUnreadCount]);\n\n const handleClick = () => {\n if (onClick) {\n onClick();\n } else {\n togglePanel();\n }\n };\n\n return (\n <button\n data-tour=\"notification-bell\"\n onClick={handleClick}\n className=\"relative inline-flex items-center justify-center p-2 rounded-md hover:bg-bg-sunken transition-all duration-150\"\n aria-label={`${tr('notifCommon.notifications', 'Notifications')}${unreadCount > 0 ? ` (${unreadCount} ${tr('notifCommon.unread', 'unread')})` : ''}`}\n >\n <Bell size={20} className=\"text-primary\" />\n {unreadCount > 0 && (\n <span className=\"absolute top-1 end-1 flex items-center justify-center min-w-[18px] h-[18px] px-1 text-xs font-semibold tabular-nums text-white bg-error rounded-full motion-safe:animate-vc-glow-pulse\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;AAyBA,SAAgBA,EAAiB,EAAE,cAAqC;CACtE,IAAMC,IAA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B;EAMI,WAAU;EACV,cAAY,GAAGpB,EAAG,6BAA6B,eAAe,IAAIqB,IAAc,IAAI,KAAKA,EAAY,GAAGrB,EAAG,sBAAsB,QAAQ,EAAE,KAAK;EAJlJ,UAAA,CAME,kBAACsB,GAAD;GAAM,MAAM;GAAI,WAAU;EAAgB,CAAA,GACzCD,IAAc,KACb,kBAAC,QAAD;GAAM,WAAU;GACb,UAAAA,IAAc,KAAK,QAAQA;EACxB,CAAA,CAEF;;AAEZ"}
|
|
@@ -41,9 +41,9 @@ function b({ notification: b, onMarkAsRead: x, onArchive: S, onAction: C, onClic
|
|
|
41
41
|
`,
|
|
42
42
|
onClick: F,
|
|
43
43
|
children: [
|
|
44
|
-
M && /* @__PURE__ */ m("div", { className: "absolute top-4
|
|
44
|
+
M && /* @__PURE__ */ m("div", { className: "absolute top-4 start-1.5 w-2.5 h-2.5 bg-accent-primary rounded-full shadow-sm shadow-accent-primary/50 motion-safe:animate-vc-glow-pulse" }),
|
|
45
45
|
/* @__PURE__ */ h("div", {
|
|
46
|
-
className: "flex items-start justify-between gap-2
|
|
46
|
+
className: "flex items-start justify-between gap-2 ms-3",
|
|
47
47
|
children: [
|
|
48
48
|
/* @__PURE__ */ h("div", {
|
|
49
49
|
className: "flex items-center gap-2 flex-1 min-w-0",
|
|
@@ -92,7 +92,7 @@ function b({ notification: b, onMarkAsRead: x, onArchive: S, onAction: C, onClic
|
|
|
92
92
|
]
|
|
93
93
|
}),
|
|
94
94
|
/* @__PURE__ */ h("div", {
|
|
95
|
-
className: "
|
|
95
|
+
className: "ms-3",
|
|
96
96
|
children: [
|
|
97
97
|
b.media[0]?.url && /* @__PURE__ */ m("img", {
|
|
98
98
|
src: b.media[0].thumbnailUrl || b.media[0].url,
|
|
@@ -110,7 +110,7 @@ function b({ notification: b, onMarkAsRead: x, onArchive: S, onAction: C, onClic
|
|
|
110
110
|
]
|
|
111
111
|
}),
|
|
112
112
|
b.actions.length > 0 && !E && /* @__PURE__ */ m("div", {
|
|
113
|
-
className: "
|
|
113
|
+
className: "ms-3 flex flex-wrap gap-2",
|
|
114
114
|
children: b.actions.map((e) => /* @__PURE__ */ m("button", {
|
|
115
115
|
onClick: (t) => z(t, e.id, e.url),
|
|
116
116
|
className: `rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${e.style === "secondary" ? "bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80" : e.style === "danger" ? "bg-status-error-bg-subtle text-status-error-text hover:opacity-80" : "bg-accent-primary text-white hover:opacity-90"}`,
|
|
@@ -118,7 +118,7 @@ function b({ notification: b, onMarkAsRead: x, onArchive: S, onAction: C, onClic
|
|
|
118
118
|
}, e.id))
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ h("div", {
|
|
121
|
-
className: "flex items-center justify-between gap-2
|
|
121
|
+
className: "flex items-center justify-between gap-2 ms-3",
|
|
122
122
|
children: [/* @__PURE__ */ h("div", {
|
|
123
123
|
className: "flex items-center gap-2 text-xs text-tertiary",
|
|
124
124
|
children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCard.js","names":["_Fragment","V2_PRIORITY_LABELS","NotificationCard","tr","useTr","useNotificationAnalytics","isUnread","notification","isArchived","v2Priority","handleClick","trackNotificationOpened","analyticsSource","onClick","onMarkAsRead","handleArchive","onArchive","openNotificationLink","navigateInApp","url","nativeOpenUrl","handleActionUrl","nativeImpact","onAction","handleActionClick","actionId","actionUrl","showArchivedState","getNotificationTypeIcon","compact","truncateText","getPriorityIcon","navigationV2","Tooltip","TooltipTrigger","Archive","TooltipContent","X","showTopic","e","action","Fragment","getPriorityColor","formatRelativeTime","ExternalLink"],"sources":["../../src/components/NotificationCard.tsx"],"sourcesContent":["import { Archive, X, ExternalLink } from 'lucide-react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@burdenoff/fe-libs/ui';\nimport type { Notification } from '../types';\nimport { useNotificationAnalytics } from '../hooks/useNotificationAnalytics';\nimport { useTr } from '../shared/hooks/useTr';\nimport {\n formatRelativeTime,\n getPriorityColor,\n getPriorityIcon,\n getNotificationTypeIcon,\n truncateText,\n} from '../utils';\nimport { nativeImpact, nativeOpenUrl } from '../utils/nativeBridge';\nimport { navigateInApp } from '../utils/inAppNavigation';\n\ninterface NotificationCardProps {\n notification: Notification;\n onMarkAsRead?: (id: string) => void;\n onArchive?: (id: string) => void;\n onAction?: (notificationId: string, actionId?: string) => void;\n onClick?: (notification: Notification) => void;\n showArchivedState?: boolean;\n compact?: boolean;\n analyticsSource?: 'center' | 'panel' | 'history' | 'admin_history';\n /**\n * FluidGrids' Navigation v2 card (BOFF-11872): an archive icon with an\n * \"Archive\" tooltip instead of \"X\", the priority footer only for Urgent or\n * High (sentence case), \"Open\" for the link, and the topic chip only when\n * `showTopic` is on. Other apps leave it off and keep today's card.\n */\n navigationV2?: boolean;\n /** Navigation v2 only: show the topic chip (a level-2 detail). */\n showTopic?: boolean;\n}\n\n/** Navigation v2's priority footer: only the two that need attention, in sentence case. */\nconst V2_PRIORITY_LABELS: Partial<\n Record<Notification['priority'], { key: string; label: string }>\n> = {\n URGENT: { key: 'notifications.priorityUrgent', label: 'Urgent' },\n HIGH: { key: 'notifications.priorityHigh', label: 'High' },\n};\n\n/**\n * Notification card component\n *\n * Displays notification information with action buttons\n */\nexport function NotificationCard({\n notification,\n onMarkAsRead,\n onArchive,\n onAction,\n onClick,\n showArchivedState = false,\n compact = false,\n analyticsSource = 'center',\n navigationV2 = false,\n showTopic = false,\n}: NotificationCardProps) {\n const tr = useTr();\n const { trackNotificationOpened } = useNotificationAnalytics();\n const isUnread = !notification.readAt;\n const isArchived = Boolean(notification.archivedAt);\n const v2Priority = V2_PRIORITY_LABELS[notification.priority];\n\n const handleClick = () => {\n trackNotificationOpened(notification, analyticsSource, 'card');\n if (onClick) {\n onClick(notification);\n }\n if (isUnread && onMarkAsRead) {\n onMarkAsRead(notification.id);\n }\n };\n\n const handleArchive = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (onArchive) {\n onArchive(notification.id);\n }\n };\n\n // A link into this app (an agent, a run, a vibe) opens in place, like the\n // shell's notification bell; only a link that leaves the app opens a new tab\n // (or the system browser on native).\n const openNotificationLink = (url: string) => {\n if (navigateInApp(url)) return;\n if (url.startsWith('https://')) {\n void nativeOpenUrl(url);\n } else {\n window.open(url, '_blank', 'noopener,noreferrer');\n }\n };\n\n const handleActionUrl = (e: React.MouseEvent) => {\n e.stopPropagation();\n nativeImpact('light');\n if (notification.actionUrl) {\n trackNotificationOpened(notification, analyticsSource, 'primary_action');\n onAction?.(notification.id);\n openNotificationLink(notification.actionUrl);\n }\n };\n\n const handleActionClick = (e: React.MouseEvent, actionId: string, actionUrl: string) => {\n e.stopPropagation();\n nativeImpact('light');\n trackNotificationOpened(notification, analyticsSource, 'custom_action');\n onAction?.(notification.id, actionId);\n openNotificationLink(actionUrl);\n };\n\n return (\n <div\n data-tour=\"notification-card\"\n className={`\n relative flex flex-col gap-2 p-4 rounded-lg border cursor-pointer\n transition-[box-shadow,border-color,opacity] duration-200 ease-in-out\n bg-gloss-card\n ${isUnread ? 'border-accent-primary/30 shadow-sm ring-1 ring-accent-primary/10' : 'border-border-seam opacity-75'}\n ${showArchivedState && isArchived ? 'border-dashed opacity-60' : ''}\n hover:shadow-[var(--shadow-pop)] hover:border-accent-primary/30 hover:opacity-100\n `}\n onClick={handleClick}\n >\n {/* Unread indicator */}\n {isUnread && (\n <div className=\"absolute top-4 left-1.5 w-2.5 h-2.5 bg-accent-primary rounded-full shadow-sm shadow-accent-primary/50 motion-safe:animate-vc-glow-pulse\" />\n )}\n\n {/* Header */}\n <div className=\"flex items-start justify-between gap-2 ml-3\">\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n <span className=\"text-base\" aria-hidden=\"true\">\n {getNotificationTypeIcon(notification.type)}\n </span>\n <h3\n className={`text-sm truncate ${isUnread ? 'font-bold text-primary' : 'font-medium text-text-secondary'}`}\n >\n {compact ? truncateText(notification.title, 60) : notification.title}\n </h3>\n <span className=\"text-xs\" aria-label={`Priority: ${notification.priority}`}>\n {getPriorityIcon(notification.priority)}\n </span>\n </div>\n\n {onArchive && navigationV2 && (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n data-tour=\"notification-archive-action\"\n onClick={handleArchive}\n className=\"flex-shrink-0 rounded p-1 transition-colors duration-150 hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n aria-label={tr('notifCommon.archiveNotification', 'Archive notification')}\n >\n <Archive\n size={16}\n className=\"text-tertiary hover:text-text-secondary\"\n aria-hidden=\"true\"\n />\n </button>\n </TooltipTrigger>\n <TooltipContent>{tr('notifications.v2.archive', 'Archive')}</TooltipContent>\n </Tooltip>\n )}\n {onArchive && !navigationV2 && (\n <button\n data-tour=\"notification-archive-action\"\n onClick={handleArchive}\n className=\"flex-shrink-0 p-1 hover:bg-bg-sunken rounded transition-colors duration-150\"\n aria-label={tr('notifCommon.archiveNotification', 'Archive notification')}\n >\n <X size={16} className=\"text-tertiary hover:text-text-secondary\" />\n </button>\n )}\n </div>\n\n {/* Body */}\n <div className=\"ml-3\">\n {notification.media[0]?.url && (\n <img\n src={notification.media[0].thumbnailUrl || notification.media[0].url}\n alt={notification.media[0].label || notification.title}\n className=\"mb-3 h-40 w-full rounded-md object-cover border border-default\"\n />\n )}\n <p className={`text-sm text-text-secondary ${compact ? 'line-clamp-2' : ''}`}>\n {compact ? truncateText(notification.body, 120) : notification.body}\n </p>\n {notification.topic && (!navigationV2 || showTopic) && (\n <div className=\"mt-2 inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary\">\n {notification.topic.name}\n </div>\n )}\n </div>\n\n {notification.actions.length > 0 && !compact && (\n <div className=\"ml-3 flex flex-wrap gap-2\">\n {notification.actions.map((action) => (\n <button\n key={action.id}\n onClick={(e) => handleActionClick(e, action.id, action.url)}\n className={`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${\n action.style === 'secondary'\n ? 'bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80'\n : action.style === 'danger'\n ? 'bg-status-error-bg-subtle text-status-error-text hover:opacity-80'\n : 'bg-accent-primary text-white hover:opacity-90'\n }`}\n >\n {action.label}\n </button>\n ))}\n </div>\n )}\n\n {/* Footer */}\n <div className=\"flex items-center justify-between gap-2 ml-3\">\n <div className=\"flex items-center gap-2 text-xs text-tertiary\">\n {navigationV2 ? (\n v2Priority && (\n <>\n <span className={getPriorityColor(notification.priority)}>\n {tr(v2Priority.key, v2Priority.label)}\n </span>\n <span>•</span>\n </>\n )\n ) : (\n <>\n <span className={getPriorityColor(notification.priority)}>\n {notification.priority}\n </span>\n <span>•</span>\n </>\n )}\n {showArchivedState && isArchived && (\n <>\n <span>{tr('notifCommon.archived', 'Archived')}</span>\n <span>•</span>\n </>\n )}\n <time dateTime={notification.createdAt}>\n {formatRelativeTime(notification.createdAt, tr)}\n </time>\n </div>\n\n {notification.actionUrl && (\n <button\n onClick={handleActionUrl}\n className=\"flex items-center gap-1 text-xs text-accent-primary hover:text-accent-primary/80 transition-colors duration-150\"\n aria-label={tr('notifCommon.openLink', 'Open link')}\n >\n <span>\n {navigationV2 ? tr('notifications.v2.open', 'Open') : tr('notifCommon.view', 'View')}\n </span>\n <ExternalLink size={12} />\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,IAAMC,IAEF;CACF,QAAQ;EAAE,KAAK;EAAgC,OAAO;CAAS;CAC/D,MAAM;EAAE,KAAK;EAA8B,OAAO;CAAO;AAC3D;AAOA,SAAgBC,EAAiB,EAC/B,iBACA,iBACA,cACA,aACA,YACA,uBAAoB,IACpB,aAAU,IACV,qBAAkB,UAClB,kBAAe,IACf,eAAY,MACY;CACxB,IAAMC,IAAKC,EAAM,GACX,EAAE,+BAA4BC,EAAyB,GACvDC,IAAW,CAACC,EAAa,QACzBC,IAAa,EAAQD,EAAa,YAClCE,IAAaR,EAAmBM,E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EAAc,MAAM,GAAK,CAAA,CACnB;IAEP,CAAA,CAAA;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"NotificationCard.js","names":["_Fragment","V2_PRIORITY_LABELS","NotificationCard","tr","useTr","useNotificationAnalytics","isUnread","notification","isArchived","v2Priority","handleClick","trackNotificationOpened","analyticsSource","onClick","onMarkAsRead","handleArchive","onArchive","openNotificationLink","navigateInApp","url","nativeOpenUrl","handleActionUrl","nativeImpact","onAction","handleActionClick","actionId","actionUrl","showArchivedState","getNotificationTypeIcon","compact","truncateText","getPriorityIcon","navigationV2","Tooltip","TooltipTrigger","Archive","TooltipContent","X","showTopic","e","action","Fragment","getPriorityColor","formatRelativeTime","ExternalLink"],"sources":["../../src/components/NotificationCard.tsx"],"sourcesContent":["import { Archive, X, ExternalLink } from 'lucide-react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@burdenoff/fe-libs/ui';\nimport type { Notification } from '../types';\nimport { useNotificationAnalytics } from '../hooks/useNotificationAnalytics';\nimport { useTr } from '../shared/hooks/useTr';\nimport {\n formatRelativeTime,\n getPriorityColor,\n getPriorityIcon,\n getNotificationTypeIcon,\n truncateText,\n} from '../utils';\nimport { nativeImpact, nativeOpenUrl } from '../utils/nativeBridge';\nimport { navigateInApp } from '../utils/inAppNavigation';\n\ninterface NotificationCardProps {\n notification: Notification;\n onMarkAsRead?: (id: string) => void;\n onArchive?: (id: string) => void;\n onAction?: (notificationId: string, actionId?: string) => void;\n onClick?: (notification: Notification) => void;\n showArchivedState?: boolean;\n compact?: boolean;\n analyticsSource?: 'center' | 'panel' | 'history' | 'admin_history';\n /**\n * FluidGrids' Navigation v2 card (BOFF-11872): an archive icon with an\n * \"Archive\" tooltip instead of \"X\", the priority footer only for Urgent or\n * High (sentence case), \"Open\" for the link, and the topic chip only when\n * `showTopic` is on. Other apps leave it off and keep today's card.\n */\n navigationV2?: boolean;\n /** Navigation v2 only: show the topic chip (a level-2 detail). */\n showTopic?: boolean;\n}\n\n/** Navigation v2's priority footer: only the two that need attention, in sentence case. */\nconst V2_PRIORITY_LABELS: Partial<\n Record<Notification['priority'], { key: string; label: string }>\n> = {\n URGENT: { key: 'notifications.priorityUrgent', label: 'Urgent' },\n HIGH: { key: 'notifications.priorityHigh', label: 'High' },\n};\n\n/**\n * Notification card component\n *\n * Displays notification information with action buttons\n */\nexport function NotificationCard({\n notification,\n onMarkAsRead,\n onArchive,\n onAction,\n onClick,\n showArchivedState = false,\n compact = false,\n analyticsSource = 'center',\n navigationV2 = false,\n showTopic = false,\n}: NotificationCardProps) {\n const tr = useTr();\n const { trackNotificationOpened } = useNotificationAnalytics();\n const isUnread = !notification.readAt;\n const isArchived = Boolean(notification.archivedAt);\n const v2Priority = V2_PRIORITY_LABELS[notification.priority];\n\n const handleClick = () => {\n trackNotificationOpened(notification, analyticsSource, 'card');\n if (onClick) {\n onClick(notification);\n }\n if (isUnread && onMarkAsRead) {\n onMarkAsRead(notification.id);\n }\n };\n\n const handleArchive = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (onArchive) {\n onArchive(notification.id);\n }\n };\n\n // A link into this app (an agent, a run, a vibe) opens in place, like the\n // shell's notification bell; only a link that leaves the app opens a new tab\n // (or the system browser on native).\n const openNotificationLink = (url: string) => {\n if (navigateInApp(url)) return;\n if (url.startsWith('https://')) {\n void nativeOpenUrl(url);\n } else {\n window.open(url, '_blank', 'noopener,noreferrer');\n }\n };\n\n const handleActionUrl = (e: React.MouseEvent) => {\n e.stopPropagation();\n nativeImpact('light');\n if (notification.actionUrl) {\n trackNotificationOpened(notification, analyticsSource, 'primary_action');\n onAction?.(notification.id);\n openNotificationLink(notification.actionUrl);\n }\n };\n\n const handleActionClick = (e: React.MouseEvent, actionId: string, actionUrl: string) => {\n e.stopPropagation();\n nativeImpact('light');\n trackNotificationOpened(notification, analyticsSource, 'custom_action');\n onAction?.(notification.id, actionId);\n openNotificationLink(actionUrl);\n };\n\n return (\n <div\n data-tour=\"notification-card\"\n className={`\n relative flex flex-col gap-2 p-4 rounded-lg border cursor-pointer\n transition-[box-shadow,border-color,opacity] duration-200 ease-in-out\n bg-gloss-card\n ${isUnread ? 'border-accent-primary/30 shadow-sm ring-1 ring-accent-primary/10' : 'border-border-seam opacity-75'}\n ${showArchivedState && isArchived ? 'border-dashed opacity-60' : ''}\n hover:shadow-[var(--shadow-pop)] hover:border-accent-primary/30 hover:opacity-100\n `}\n onClick={handleClick}\n >\n {/* Unread indicator */}\n {isUnread && (\n <div className=\"absolute top-4 start-1.5 w-2.5 h-2.5 bg-accent-primary rounded-full shadow-sm shadow-accent-primary/50 motion-safe:animate-vc-glow-pulse\" />\n )}\n\n {/* Header */}\n <div className=\"flex items-start justify-between gap-2 ms-3\">\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n <span className=\"text-base\" aria-hidden=\"true\">\n {getNotificationTypeIcon(notification.type)}\n </span>\n <h3\n className={`text-sm truncate ${isUnread ? 'font-bold text-primary' : 'font-medium text-text-secondary'}`}\n >\n {compact ? truncateText(notification.title, 60) : notification.title}\n </h3>\n <span className=\"text-xs\" aria-label={`Priority: ${notification.priority}`}>\n {getPriorityIcon(notification.priority)}\n </span>\n </div>\n\n {onArchive && navigationV2 && (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n data-tour=\"notification-archive-action\"\n onClick={handleArchive}\n className=\"flex-shrink-0 rounded p-1 transition-colors duration-150 hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n aria-label={tr('notifCommon.archiveNotification', 'Archive notification')}\n >\n <Archive\n size={16}\n className=\"text-tertiary hover:text-text-secondary\"\n aria-hidden=\"true\"\n />\n </button>\n </TooltipTrigger>\n <TooltipContent>{tr('notifications.v2.archive', 'Archive')}</TooltipContent>\n </Tooltip>\n )}\n {onArchive && !navigationV2 && (\n <button\n data-tour=\"notification-archive-action\"\n onClick={handleArchive}\n className=\"flex-shrink-0 p-1 hover:bg-bg-sunken rounded transition-colors duration-150\"\n aria-label={tr('notifCommon.archiveNotification', 'Archive notification')}\n >\n <X size={16} className=\"text-tertiary hover:text-text-secondary\" />\n </button>\n )}\n </div>\n\n {/* Body */}\n <div className=\"ms-3\">\n {notification.media[0]?.url && (\n <img\n src={notification.media[0].thumbnailUrl || notification.media[0].url}\n alt={notification.media[0].label || notification.title}\n className=\"mb-3 h-40 w-full rounded-md object-cover border border-default\"\n />\n )}\n <p className={`text-sm text-text-secondary ${compact ? 'line-clamp-2' : ''}`}>\n {compact ? truncateText(notification.body, 120) : notification.body}\n </p>\n {notification.topic && (!navigationV2 || showTopic) && (\n <div className=\"mt-2 inline-flex items-center rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary\">\n {notification.topic.name}\n </div>\n )}\n </div>\n\n {notification.actions.length > 0 && !compact && (\n <div className=\"ms-3 flex flex-wrap gap-2\">\n {notification.actions.map((action) => (\n <button\n key={action.id}\n onClick={(e) => handleActionClick(e, action.id, action.url)}\n className={`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${\n action.style === 'secondary'\n ? 'bg-bg-sunken text-text-secondary hover:bg-bg-sunken/80'\n : action.style === 'danger'\n ? 'bg-status-error-bg-subtle text-status-error-text hover:opacity-80'\n : 'bg-accent-primary text-white hover:opacity-90'\n }`}\n >\n {action.label}\n </button>\n ))}\n </div>\n )}\n\n {/* Footer */}\n <div className=\"flex items-center justify-between gap-2 ms-3\">\n <div className=\"flex items-center gap-2 text-xs text-tertiary\">\n {navigationV2 ? (\n v2Priority && (\n <>\n <span className={getPriorityColor(notification.priority)}>\n {tr(v2Priority.key, v2Priority.label)}\n </span>\n <span>•</span>\n </>\n )\n ) : (\n <>\n <span className={getPriorityColor(notification.priority)}>\n {notification.priority}\n </span>\n <span>•</span>\n </>\n )}\n {showArchivedState && isArchived && (\n <>\n <span>{tr('notifCommon.archived', 'Archived')}</span>\n <span>•</span>\n </>\n )}\n <time dateTime={notification.createdAt}>\n {formatRelativeTime(notification.createdAt, tr)}\n </time>\n </div>\n\n {notification.actionUrl && (\n <button\n onClick={handleActionUrl}\n className=\"flex items-center gap-1 text-xs text-accent-primary hover:text-accent-primary/80 transition-colors duration-150\"\n aria-label={tr('notifCommon.openLink', 'Open link')}\n >\n <span>\n {navigationV2 ? tr('notifications.v2.open', 'Open') : tr('notifCommon.view', 'View')}\n </span>\n <ExternalLink size={12} />\n </button>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,IAAMC,IAEF;CACF,QAAQ;EAAE,KAAK;EAAgC,OAAO;CAAS;CAC/D,MAAM;EAAE,KAAK;EAA8B,OAAO;CAAO;AAC3D;AAOA,SAAgBC,EAAiB,EAC/B,iBACA,iBACA,cACA,aACA,YACA,uBAAoB,IACpB,aAAU,IACV,qBAAkB,UAClB,kBAAe,IACf,eAAY,MACY;CACxB,IAAMC,IAAKC,EAAM,GACX,EAAE,+BAA4BC,EAAyB,GACvDC,IAAW,CAACC,EAAa,QACzBC,IAAa,EAAQD,EAAa,YAClCE,IAAaR,EAAmBM,EAAa,WAE7CG,UAAoB;EAKxB,AAJAC,EAAwBJ,GAAcK,GAAiB,MAAM,GACzDC,KACFA,EAAQN,CAAY,GAElBD,KAAYQ,KACdA,EAAaP,EAAa,EAAE;CAEhC,GAEMQ,KAAiB,MAAwB;EAE7C,AADA,EAAE,gBAAgB,GACdC,KACFA,EAAUT,EAAa,EAAE;CAE7B,GAKMU,KAAwB,MAAgB;EAC5C,AAAIC,EAAcC,CAAG,MACjBA,EAAI,WAAW,UAAU,IAC3BC,EAAmBD,CAAG,IAEtB,OAAO,KAAKA,GAAK,UAAU,qBAAqB;CAEpD,GAEME,KAAmB,MAAwB;EAG/C,AAFA,EAAE,gBAAgB,GAClBC,EAAa,OAAO,GAChBf,EAAa,cACfI,EAAwBJ,GAAcK,GAAiB,gBAAgB,GACvEW,IAAWhB,EAAa,EAAE,GAC1BU,EAAqBV,EAAa,SAAS;CAE/C,GAEMiB,KAAqB,GAAqB,GAAkB,M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AD;OAAM,WAAW0C,EAAiBnC,EAAa,QAAQ;OACpD,UAAAA,EAAa;MACV,CAAA,GACN,kBAAC,QAAD,EAAA,UAAM,IAAO,CAAA,CACb,EAAA,CAAA;MAEHoB,KAAqBnB,KACpB,kBAAAR,GAAA,EAAA,UAAA,CACE,kBAAC,QAAD,EAAA,UAAOG,EAAG,wBAAwB,UAAU,EAAQ,CAAA,GACpD,kBAAC,QAAD,EAAA,UAAM,IAAO,CAAA,CACb,EAAA,CAAA;MAEJ,kBAAC,QAAD;OAAM,UAAUI,EAAa;OAC1B,UAAAoC,EAAmBpC,EAAa,WAAWJ,CAAE;MAC1C,CAAA;KACH;IAEJ,CAAA,GAAAI,EAAa,aACZ,kBAAC,UAAD;KACE,SAASc;KACT,WAAU;KACV,cAAYlB,EAAG,wBAAwB,WAAW;KAHpD,UAAA,CAKE,kBAAC,QAAD,EAAA,UACG6B,IAAe7B,EAAG,yBAAyB,MAAM,IAAIA,EAAG,oBAAoB,MAAM,EAC/E,CAAA,GACN,kBAACyC,GAAD,EAAc,MAAM,GAAK,CAAA,CACnB;IAEP,CAAA,CAAA;;EACF;;AAET"}
|
|
@@ -16,7 +16,7 @@ function d({ onViewAll: d }) {
|
|
|
16
16
|
"aria-hidden": "true"
|
|
17
17
|
}), /* @__PURE__ */ c("div", {
|
|
18
18
|
"data-tour": "notification-panel",
|
|
19
|
-
className: "absolute
|
|
19
|
+
className: "absolute end-0 top-full mt-2 w-96 max-h-[600px] bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] z-50 overflow-hidden flex flex-col animate-in fade-in slide-in-from-top-2 duration-200",
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ c("div", {
|
|
22
22
|
className: "flex items-center justify-between p-4 border-b border-border-seam bg-accent-wash",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPanel.js","names":["_Fragment","NotificationPanel","tr","useTr","glass","useGlassEmptyStates","useNotificationStore","useNotifications","isPanelOpen","recentNotifications","notifications","Fragment","togglePanel","Bell","unreadCount","markAllAsRead","X","NotificationCard","markAsRead","archiveNotification","recordAction","notification","EmptyState","onViewAll"],"sources":["../../src/components/NotificationPanel.tsx"],"sourcesContent":["import { X, Bell } from 'lucide-react';\nimport { EmptyState, useGlassEmptyStates } from '@burdenoff/fe-libs/ui';\nimport { useNotificationStore } from '../store/notificationStore';\nimport { useNotifications } from '../hooks';\nimport { NotificationCard } from './NotificationCard';\nimport { useTr } from '../shared/hooks/useTr';\n\ninterface NotificationPanelProps {\n onViewAll?: () => void;\n}\n\n/**\n * Notification dropdown panel\n *\n * Quick view of recent notifications that appears when clicking the bell icon\n */\nexport function NotificationPanel({ onViewAll }: NotificationPanelProps) {\n const tr = useTr();\n const glass = useGlassEmptyStates();\n const { isPanelOpen, togglePanel } = useNotificationStore();\n const {\n notifications,\n unreadCount,\n markAsRead,\n markAllAsRead,\n archiveNotification,\n recordAction,\n } = useNotifications();\n\n if (!isPanelOpen) return null;\n\n // Show only the 5 most recent notifications\n const recentNotifications = notifications.slice(0, 5);\n\n return (\n <>\n {/* Backdrop */}\n <div className=\"fixed inset-0 z-40\" onClick={togglePanel} aria-hidden=\"true\" />\n\n {/* Panel */}\n <div\n data-tour=\"notification-panel\"\n className=\"absolute
|
|
1
|
+
{"version":3,"file":"NotificationPanel.js","names":["_Fragment","NotificationPanel","tr","useTr","glass","useGlassEmptyStates","useNotificationStore","useNotifications","isPanelOpen","recentNotifications","notifications","Fragment","togglePanel","Bell","unreadCount","markAllAsRead","X","NotificationCard","markAsRead","archiveNotification","recordAction","notification","EmptyState","onViewAll"],"sources":["../../src/components/NotificationPanel.tsx"],"sourcesContent":["import { X, Bell } from 'lucide-react';\nimport { EmptyState, useGlassEmptyStates } from '@burdenoff/fe-libs/ui';\nimport { useNotificationStore } from '../store/notificationStore';\nimport { useNotifications } from '../hooks';\nimport { NotificationCard } from './NotificationCard';\nimport { useTr } from '../shared/hooks/useTr';\n\ninterface NotificationPanelProps {\n onViewAll?: () => void;\n}\n\n/**\n * Notification dropdown panel\n *\n * Quick view of recent notifications that appears when clicking the bell icon\n */\nexport function NotificationPanel({ onViewAll }: NotificationPanelProps) {\n const tr = useTr();\n const glass = useGlassEmptyStates();\n const { isPanelOpen, togglePanel } = useNotificationStore();\n const {\n notifications,\n unreadCount,\n markAsRead,\n markAllAsRead,\n archiveNotification,\n recordAction,\n } = useNotifications();\n\n if (!isPanelOpen) return null;\n\n // Show only the 5 most recent notifications\n const recentNotifications = notifications.slice(0, 5);\n\n return (\n <>\n {/* Backdrop */}\n <div className=\"fixed inset-0 z-40\" onClick={togglePanel} aria-hidden=\"true\" />\n\n {/* Panel */}\n <div\n data-tour=\"notification-panel\"\n className=\"absolute end-0 top-full mt-2 w-96 max-h-[600px] bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] z-50 overflow-hidden flex flex-col animate-in fade-in slide-in-from-top-2 duration-200\"\n >\n {/* Header */}\n <div className=\"flex items-center justify-between p-4 border-b border-border-seam bg-accent-wash\">\n <div className=\"flex items-center gap-2\">\n <Bell size={20} className=\"text-primary\" />\n <h2 className=\"text-base font-semibold text-primary\">\n {tr('notifCommon.notifications', 'Notifications')}\n </h2>\n {unreadCount > 0 && (\n <span className=\"px-2 py-0.5 text-xs font-semibold tabular-nums text-white bg-primary-500 rounded-full\">\n {unreadCount}\n </span>\n )}\n </div>\n\n <div className=\"flex items-center gap-2\">\n {unreadCount > 0 && (\n <button\n data-tour=\"notification-panel-mark-all-read\"\n onClick={markAllAsRead}\n className=\"text-xs text-accent-primary hover:text-accent-primary/80 transition-colors duration-150\"\n >\n {tr('notifCommon.markAllRead', 'Mark all read')}\n </button>\n )}\n <button\n onClick={togglePanel}\n className=\"p-1 hover:bg-bg-sunken rounded transition-colors duration-150\"\n aria-label={tr('notifCommon.closePanel', 'Close panel')}\n >\n <X size={16} className=\"text-tertiary\" />\n </button>\n </div>\n </div>\n\n {/* Notifications list */}\n <div className=\"flex-1 overflow-y-auto\">\n {recentNotifications.length > 0 ? (\n <div className=\"flex flex-col gap-2 p-2\">\n {recentNotifications.map((notification) => (\n <NotificationCard\n key={notification.id}\n notification={notification}\n onMarkAsRead={markAsRead}\n onArchive={archiveNotification}\n onAction={recordAction}\n compact\n analyticsSource=\"panel\"\n />\n ))}\n </div>\n ) : glass ? (\n <EmptyState\n kind=\"all-done\"\n size=\"panel\"\n title={tr('notifCommon.noNotifications', 'No notifications')}\n description={tr('notifCommon.allCaughtUp', \"You're all caught up!\")}\n />\n ) : (\n // BOFF-15570: drop the legacy branch once every product opts in to glassEmptyStates.\n <div className=\"flex flex-col items-center justify-center p-8 text-center animate-in fade-in duration-200\">\n <Bell size={48} className=\"text-tertiary mb-4\" />\n <p className=\"text-sm text-text-secondary\">\n {tr('notifCommon.noNotifications', 'No notifications')}\n </p>\n <p className=\"text-xs text-tertiary mt-1\">\n {tr('notifCommon.allCaughtUp', \"You're all caught up!\")}\n </p>\n </div>\n )}\n </div>\n\n {/* Footer */}\n {recentNotifications.length > 0 && (\n <div className=\"p-3 border-t border-default\">\n <button\n data-tour=\"notification-panel-view-all\"\n onClick={() => {\n togglePanel();\n if (onViewAll) onViewAll();\n }}\n className=\"w-full py-2 text-sm text-accent-primary hover:text-accent-primary/80 font-medium transition-colors duration-150\"\n >\n {tr('notifCommon.viewAllNotifications', 'View All Notifications')}\n </button>\n </div>\n )}\n </div>\n </>\n );\n}\n"],"mappings":";;;;;;;;AAgBA,SAAgBC,EAAkB,EAAE,gBAAqC;CACvE,IAAMC,IAAKC,EAAM,GACXC,IAAQC,EAAoB,GAC5B,EAAE,gBAAa,mBAAgBC,EAAqB,GACpD,EACJ,kBACA,gBACA,eACA,kBACA,wBACA,oBACEC,EAAiB;CAErB,IAAI,CAACC,GAAa,OAAO;CAGzB,IAAMC,IAAsBC,EAAc,MAAM,GAAG,CAAC;CAEpD,OACE,kBAAAV,GAAA,EAAA,UAAA,CAEE,kBAAC,OAAD;EAAK,WAAU;EAAqB,S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EAAG,+BAA+B,kBAAkB;MACpD,CAAA;MACH,kBAAC,KAAD;OAAG,WAAU;OACV,UAAAA,EAAG,2BAA2B,uBAAuB;MACrD,CAAA;KACA;;GAEJ,CAAA;GAGJO,EAAoB,SAAS,KAC5B,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC,UAAD;KACE,aAAU;KACV,eAAe;MAEb,AADAG,EAAY,GACRW,KAAWA,EAAU;KAC3B;KACA,WAAU;KAET,UAAArB,EAAG,oCAAoC,wBAAwB;IAC1D,CAAA;GACL,CAAA;EAEJ;CACL,CAAA,CAAA,EAAA,CAAA;AAEN"}
|
|
@@ -8,7 +8,7 @@ function s({ value: e, label: n, onChange: a, tour: s }) {
|
|
|
8
8
|
className: "relative flex-1",
|
|
9
9
|
children: [/* @__PURE__ */ r(t, {
|
|
10
10
|
size: 16,
|
|
11
|
-
className: "pointer-events-none absolute
|
|
11
|
+
className: "pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-text-tertiary",
|
|
12
12
|
"aria-hidden": "true"
|
|
13
13
|
}), /* @__PURE__ */ r(o, {
|
|
14
14
|
"data-tour": s,
|
|
@@ -17,7 +17,7 @@ function s({ value: e, label: n, onChange: a, tour: s }) {
|
|
|
17
17
|
placeholder: n,
|
|
18
18
|
value: e,
|
|
19
19
|
onChange: (e) => a(e.target.value),
|
|
20
|
-
className: "
|
|
20
|
+
className: "ps-9"
|
|
21
21
|
})]
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterControls.js","names":["SearchField","Search","Input","tour","label","onChange","ViewChips","tr","useTr","chips","value","chip","testIdPrefix","MoreFiltersButton","Button","open","controls","onToggle","SlidersHorizontal","active"],"sources":["../../src/navigation-v2/FilterControls.tsx"],"sourcesContent":["import { Search, SlidersHorizontal } from 'lucide-react';\nimport { Button, Input } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../shared/hooks/useTr';\n\n/** The search box that leads a Navigation v2 list. */\nexport function SearchField({\n value,\n label,\n onChange,\n tour,\n}: {\n value: string;\n /** Already translated; also the placeholder. */\n label: string;\n onChange: (value: string) => void;\n tour?: string;\n}) {\n return (\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"pointer-events-none absolute
|
|
1
|
+
{"version":3,"file":"FilterControls.js","names":["SearchField","Search","Input","tour","label","onChange","ViewChips","tr","useTr","chips","value","chip","testIdPrefix","MoreFiltersButton","Button","open","controls","onToggle","SlidersHorizontal","active"],"sources":["../../src/navigation-v2/FilterControls.tsx"],"sourcesContent":["import { Search, SlidersHorizontal } from 'lucide-react';\nimport { Button, Input } from '@burdenoff/fe-libs/ui';\nimport { useTr } from '../shared/hooks/useTr';\n\n/** The search box that leads a Navigation v2 list. */\nexport function SearchField({\n value,\n label,\n onChange,\n tour,\n}: {\n value: string;\n /** Already translated; also the placeholder. */\n label: string;\n onChange: (value: string) => void;\n tour?: string;\n}) {\n return (\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-text-tertiary\"\n aria-hidden=\"true\"\n />\n <Input\n data-tour={tour}\n type=\"search\"\n aria-label={label}\n placeholder={label}\n value={value}\n onChange={(e) => onChange(e.target.value)}\n className=\"ps-9\"\n />\n </div>\n );\n}\n\n/** A level-1 chip group (\"All · Unread · Needs action\"). */\nexport function ViewChips<T extends string>({\n chips,\n value,\n onChange,\n testIdPrefix,\n}: {\n chips: Array<{ id: T; label: string }>;\n value: T | null;\n onChange: (id: T) => void;\n testIdPrefix: string;\n}) {\n const tr = useTr();\n return (\n <div\n role=\"group\"\n aria-label={tr('notifications.v2.show', 'Show')}\n className=\"inline-flex rounded-lg border border-border-default p-0.5\"\n >\n {chips.map((chip) => (\n <button\n key={chip.id}\n type=\"button\"\n aria-pressed={value === chip.id}\n data-testid={`${testIdPrefix}-${chip.id}`}\n onClick={() => onChange(chip.id)}\n className={`min-h-9 rounded-md px-3 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] ${\n value === chip.id\n ? 'bg-action-primary-bg text-text-inverse'\n : 'text-text-secondary hover:bg-bg-sunken hover:text-text-primary'\n }`}\n >\n {chip.label}\n </button>\n ))}\n </div>\n );\n}\n\n/** \"More filters\": opens the level-2 filter panel; a dot shows when any of them is set. */\nexport function MoreFiltersButton({\n open,\n active,\n controls,\n onToggle,\n}: {\n open: boolean;\n active: boolean;\n controls: string;\n onToggle: () => void;\n}) {\n const tr = useTr();\n return (\n <Button\n type=\"button\"\n variant=\"ghost\"\n aria-expanded={open}\n aria-controls={controls}\n onClick={onToggle}\n className=\"gap-2\"\n >\n <SlidersHorizontal size={16} aria-hidden=\"true\" />\n {tr('notifications.v2.moreFilters', 'More filters')}\n {active && <span className=\"h-2 w-2 rounded-full bg-accent-primary\" aria-hidden=\"true\" />}\n </Button>\n );\n}\n"],"mappings":";;;;;AAKA,SAAgBA,EAAY,EAC1B,UACA,UACA,aACA,WAOC;CACD,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACC,GAAD;GACE,MAAM;GACN,WAAU;GACV,eAAY;EACb,CAAA,GACD,kBAACC,GAAD;GACE,aAAWC;GACX,MAAK;GACL,cAAYC;GACZ,aAAaA;GACN;GACP,WAAW,MAAMC,EAAS,EAAE,OAAO,KAAK;GACxC,WAAU;EACX,CAAA,CACE;;AAET;AAGA,SAAgBC,EAA4B,EAC1C,UACA,UACA,aACA,mBAMC;CACD,IAAMC,IAAKC,EAAM;CACjB,OACE,kBAAC,OAAD;EACE,MAAK;EACL,cAAYD,EAAG,yBAAyB,MAAM;EAC9C,WAAU;EAET,UAAAE,EAAM,KAAK,MACV,kBAAC,UAAD;GAEE,MAAK;GACL,gBAAcC,MAAUC,EAAK;GAC7B,eAAa,GAAGC,EAAa,GAAGD,EAAK;GACrC,eAAeN,EAASM,EAAK,EAAE;GAC/B,WAAW,8JACTD,MAAUC,EAAK,KACX,2CACA;GAGL,UAAAA,EAAK;EACA,GAZDA,EAAK,EAYJ,CACT;CACE,CAAA;AAET;AAGA,SAAgBE,EAAkB,EAChC,SACA,WACA,aACA,eAMC;CACD,IAAMN,IAAKC,EAAM;CACjB,OACE,kBAACM,GAAD;EACE,MAAK;EACL,SAAQ;EACR,iBAAeC;EACf,iBAAeC;EACf,SAASC;EACT,WAAU;EANZ,UAAA;GAQE,kBAACC,GAAD;IAAmB,MAAM;IAAI,eAAY;GAAQ,CAAA;GAChDX,EAAG,gCAAgC,cAAc;GACjDY,KAAU,kBAAC,QAAD;IAAM,WAAU;IAAyC,eAAY;GAAQ,CAAA;EAClF;;AAEZ"}
|
|
@@ -33,7 +33,7 @@ function O({ title: e, description: t, checked: n, saving: r, feedback: i, onTog
|
|
|
33
33
|
className: "flex shrink-0 items-center gap-2",
|
|
34
34
|
children: [
|
|
35
35
|
/* @__PURE__ */ v("span", {
|
|
36
|
-
className: "w-8 text-
|
|
36
|
+
className: "w-8 text-end text-sm text-text-secondary",
|
|
37
37
|
"aria-hidden": "true",
|
|
38
38
|
children: r ? "…" : n ? l("notifications.v2.on", "On") : l("notifications.v2.off", "Off")
|
|
39
39
|
}),
|
|
@@ -183,7 +183,7 @@ function A() {
|
|
|
183
183
|
className: "relative py-3",
|
|
184
184
|
children: [/* @__PURE__ */ v(_, {
|
|
185
185
|
size: 16,
|
|
186
|
-
className: "pointer-events-none absolute
|
|
186
|
+
className: "pointer-events-none absolute start-3 top-1/2 -translate-y-1/2 text-text-tertiary",
|
|
187
187
|
"aria-hidden": "true"
|
|
188
188
|
}), /* @__PURE__ */ v(T, {
|
|
189
189
|
type: "search",
|
|
@@ -191,7 +191,7 @@ function A() {
|
|
|
191
191
|
onChange: (e) => F(e.target.value),
|
|
192
192
|
"aria-label": f("notifications.searchTopics", "Search topics..."),
|
|
193
193
|
placeholder: f("notifications.searchTopics", "Search topics..."),
|
|
194
|
-
className: "
|
|
194
|
+
className: "ps-9"
|
|
195
195
|
})]
|
|
196
196
|
}), I.length === 0 ? /* @__PURE__ */ v("p", {
|
|
197
197
|
className: "py-3 text-sm text-text-secondary",
|
|
@@ -1 +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","SectionLoaderOr","CompactMarkOr","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';\nimport { CompactMarkOr, SectionLoaderOr } from '../components/loadingSystem';\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 <SectionLoaderOr\n minHeight=\"16rem\"\n today={\n <div className=\"flex h-64 items-center justify-center\">\n <CompactMarkOr\n className=\"h-8 w-8\"\n today={\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n }\n />\n </div>\n }\n />\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":";;;;;;;;;;;;;;AAuCA,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,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,SAAD;KAAO,SAASF;KAAI,WAAU;KAC3B,UAAAG;IACI,CAAA,GACNC,KAAe,kBAAC,KAAD;KAAG,WAAU;KAA+B,UAAAA;IAAe,CAAA,CACxE;GACL,CAAA,GAAA,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,kBAAC,QAAD;MAAM,WAAU;MAA6C,eAAY;MACtE,UAAAC,IACG,MACAC,IACER,EAAG,uBAAuB,IAAI,IAC9BA,EAAG,wBAAwB,KAAK;KAClC,CAAA;KACN,k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BAA0B;IAFtE,UAAA,CAIGkC,EAAO,SAAS,KACf,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC2B,GAAD;MACE,MAAM;MACN,WAAU;MACV,eAAY;KACb,CAAA,GACD,kBAACC,GAAD;MACE,MAAK;MACL,OAAOlC;MACP,WAAW,MAAUC,EAAUkC,EAAM,OAAO,KAAK;MACjD,cAAY/D,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,MAClBU,EAAI;KAAE,OAAO;KAAS,SAASN,EAAM;IAAG,GAAGA,EAAM,MAAM,EACrD,aAAaA,EAAM,eAAe,KAAA,EACpC,CAAC,CACH,CAEK;;EAER;;AAET"}
|
|
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","SectionLoaderOr","CompactMarkOr","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';\nimport { CompactMarkOr, SectionLoaderOr } from '../components/loadingSystem';\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-end 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 <SectionLoaderOr\n minHeight=\"16rem\"\n today={\n <div className=\"flex h-64 items-center justify-center\">\n <CompactMarkOr\n className=\"h-8 w-8\"\n today={\n <div className=\"h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent\" />\n }\n />\n </div>\n }\n />\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 start-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=\"ps-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":";;;;;;;;;;;;;;AAuCA,SAASA,EAAU,EACjB,UACA,gBACA,YACA,WACA,aACA,aACA,iBACA,aACiB;CACjB,IAAMC,IAAKC,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AAA,CACE,kBAACtC,GAAD;MAAS,OAAOnB,EAAG,iCAAiC,yBAAyB;MAC1E,UAAA0D,EAAc,KAAK,MAClBjB,EAAI;OAAE,OAAO;OAAW,SAASe,EAAQ;MAAM,GAAGxD,EAAGwD,EAAQ,UAAUA,EAAQ,KAAK,CAAC,CACvF;KACO,CAAA,GACT,kBAACrC,GAAD;MACE,QAAO;MACP,OAAOnB,EAAG,+BAA+B,kBAAkB;MAE1D,UAAA2D,EAAM,KAAK,MACVlB,EAAI;OAAE,OAAO;OAAQ,MAAMmB,EAAK;MAAM,GAAG5D,EAAG4D,EAAK,UAAUA,EAAK,KAAK,CAAC,CACxE;KACO,CAAA,CACN;;GACS,CAAA;GAEfP,KACC,kBAAClC,GAAD;IACE,QAAO;IACP,OAAOnB,EAAG,gCAAgC,0BAA0B;IAFtE,UAAA,CAIGkC,EAAO,SAAS,KACf,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC2B,GAAD;MACE,MAAM;MACN,WAAU;MACV,eAAY;KACb,CAAA,GACD,kBAACC,GAAD;MACE,MAAK;MACL,OAAOlC;MACP,WAAW,MAAUC,EAAUkC,EAAM,OAAO,KAAK;MACjD,cAAY/D,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,MAClBU,EAAI;KAAE,OAAO;KAAS,SAASN,EAAM;IAAG,GAAGA,EAAM,MAAM,EACrD,aAAaA,EAAM,eAAe,KAAA,EACpC,CAAC,CACH,CAEK;;EAER;;AAET"}
|
|
@@ -396,7 +396,7 @@ function m() {
|
|
|
396
396
|
children: s("notifications.scheduleForLater", "Schedule for later")
|
|
397
397
|
})]
|
|
398
398
|
}), W && /* @__PURE__ */ f("div", {
|
|
399
|
-
className: "mt-3
|
|
399
|
+
className: "mt-3 ms-7",
|
|
400
400
|
children: [/* @__PURE__ */ d("input", {
|
|
401
401
|
type: "datetime-local",
|
|
402
402
|
"aria-label": s("notifications.scheduleDateTime", "Send date and time"),
|
|
@@ -788,7 +788,7 @@ function m() {
|
|
|
788
788
|
})]
|
|
789
789
|
})]
|
|
790
790
|
}), /* @__PURE__ */ d("p", {
|
|
791
|
-
className: "text-xs text-text-secondary
|
|
791
|
+
className: "text-xs text-text-secondary ms-7 mt-1",
|
|
792
792
|
children: s("notifications.inAppDescription", "Show this notification in the app's notification center alongside the selected channel")
|
|
793
793
|
})]
|
|
794
794
|
})
|
|
@@ -801,7 +801,7 @@ function m() {
|
|
|
801
801
|
/* @__PURE__ */ f("label", {
|
|
802
802
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
803
803
|
children: [s("notifications.topic", "Topic"), S === "MARKETING" && /* @__PURE__ */ d("span", {
|
|
804
|
-
className: "text-status-error-text
|
|
804
|
+
className: "text-status-error-text ms-1",
|
|
805
805
|
children: "*"
|
|
806
806
|
})]
|
|
807
807
|
}),
|
|
@@ -885,7 +885,7 @@ function m() {
|
|
|
885
885
|
placeholder: s("notifications.searchUsersPlaceholder", "Search users by email or name..."),
|
|
886
886
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
887
887
|
}), Qe && /* @__PURE__ */ d("div", {
|
|
888
|
-
className: "absolute
|
|
888
|
+
className: "absolute end-3 top-1/2 -translate-y-1/2",
|
|
889
889
|
children: /* @__PURE__ */ d(ue, {
|
|
890
890
|
size: 16,
|
|
891
891
|
className: "animate-spin text-text-tertiary"
|
|
@@ -941,7 +941,7 @@ function m() {
|
|
|
941
941
|
onClick: () => {
|
|
942
942
|
O(t ? (t) => t.filter((t) => t.id !== e.id) : (t) => [...t, e]);
|
|
943
943
|
},
|
|
944
|
-
className: `flex w-full items-center gap-3 p-3 text-
|
|
944
|
+
className: `flex w-full items-center gap-3 p-3 text-start transition-colors ${t ? "bg-primary-50 dark:bg-primary-900/30" : "hover:bg-bg-canvas"} ${n ? "" : "cursor-not-allowed opacity-50"}`,
|
|
945
945
|
children: [
|
|
946
946
|
/* @__PURE__ */ d(l, {
|
|
947
947
|
size: 16,
|
|
@@ -1050,7 +1050,7 @@ function m() {
|
|
|
1050
1050
|
placeholder: s("notifications.searchUsersPlaceholder", "Search users by email or name..."),
|
|
1051
1051
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
1052
1052
|
}), Qe && /* @__PURE__ */ d("div", {
|
|
1053
|
-
className: "absolute
|
|
1053
|
+
className: "absolute end-3 top-1/2 transform -translate-y-1/2",
|
|
1054
1054
|
children: /* @__PURE__ */ d(ue, {
|
|
1055
1055
|
size: 16,
|
|
1056
1056
|
className: "animate-spin text-text-tertiary"
|
|
@@ -1068,7 +1068,7 @@ function m() {
|
|
|
1068
1068
|
onClick: () => {
|
|
1069
1069
|
z(t ? (t) => t.filter((t) => t.id !== e.id) : (t) => [...t, e]);
|
|
1070
1070
|
},
|
|
1071
|
-
className: `w-full flex items-center gap-3 p-3 text-
|
|
1071
|
+
className: `w-full flex items-center gap-3 p-3 text-start hover:bg-bg-canvas transition-colors ${t ? "bg-primary-50 dark:bg-primary-900/30" : ""}`,
|
|
1072
1072
|
children: [
|
|
1073
1073
|
/* @__PURE__ */ d(l, {
|
|
1074
1074
|
size: 16,
|
|
@@ -1194,11 +1194,11 @@ function m() {
|
|
|
1194
1194
|
children: [
|
|
1195
1195
|
e.key,
|
|
1196
1196
|
e.required && /* @__PURE__ */ d("span", {
|
|
1197
|
-
className: "text-status-error-text
|
|
1197
|
+
className: "text-status-error-text ms-0.5",
|
|
1198
1198
|
children: "*"
|
|
1199
1199
|
}),
|
|
1200
1200
|
/* @__PURE__ */ f("span", {
|
|
1201
|
-
className: "text-text-tertiary
|
|
1201
|
+
className: "text-text-tertiary ms-1",
|
|
1202
1202
|
children: [
|
|
1203
1203
|
"(",
|
|
1204
1204
|
e.type,
|