@burdenoff/microfe-notification 2026.519.1 → 2026.522.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/AdminNotificationRoutes.d.ts.map +1 -1
  2. package/dist/AdminNotificationRoutes.js +50 -46
  3. package/dist/AdminNotificationRoutes.js.map +1 -1
  4. package/dist/UserNotificationRoutes.d.ts.map +1 -1
  5. package/dist/UserNotificationRoutes.js +28 -24
  6. package/dist/UserNotificationRoutes.js.map +1 -1
  7. package/dist/components/FeatureDisabledPage.d.ts +7 -0
  8. package/dist/components/FeatureDisabledPage.d.ts.map +1 -0
  9. package/dist/components/FeatureDisabledPage.js +32 -0
  10. package/dist/components/FeatureDisabledPage.js.map +1 -0
  11. package/dist/components/NotificationBell.d.ts.map +1 -1
  12. package/dist/components/NotificationBell.js +43 -22
  13. package/dist/components/NotificationBell.js.map +1 -1
  14. package/dist/components/NotificationCard.d.ts +2 -1
  15. package/dist/components/NotificationCard.d.ts.map +1 -1
  16. package/dist/components/NotificationCard.js +64 -63
  17. package/dist/components/NotificationCard.js.map +1 -1
  18. package/dist/components/NotificationPanel.d.ts.map +1 -1
  19. package/dist/components/NotificationPanel.js +2 -1
  20. package/dist/components/NotificationPanel.js.map +1 -1
  21. package/dist/graphql/global-client.js +1 -1
  22. package/dist/graphql/global-client.js.map +1 -1
  23. package/dist/hooks/index.d.ts +1 -0
  24. package/dist/hooks/index.d.ts.map +1 -1
  25. package/dist/hooks/index.js +1 -0
  26. package/dist/hooks/useNotificationAdmin.d.ts.map +1 -1
  27. package/dist/hooks/useNotificationAdmin.js +67 -64
  28. package/dist/hooks/useNotificationAdmin.js.map +1 -1
  29. package/dist/hooks/useNotificationAnalytics.d.ts +67 -0
  30. package/dist/hooks/useNotificationAnalytics.d.ts.map +1 -0
  31. package/dist/hooks/useNotificationAnalytics.js +64 -0
  32. package/dist/hooks/useNotificationAnalytics.js.map +1 -0
  33. package/dist/hooks/useNotificationPreferences.js +1 -1
  34. package/dist/hooks/useNotificationPreferences.js.map +1 -1
  35. package/dist/hooks/useNotificationTemplates.js +3 -3
  36. package/dist/hooks/useNotificationTemplates.js.map +1 -1
  37. package/dist/hooks/useNotificationTopics.js +1 -1
  38. package/dist/hooks/useNotificationTopics.js.map +1 -1
  39. package/dist/hooks/useNotifications.d.ts.map +1 -1
  40. package/dist/hooks/useNotifications.js +47 -40
  41. package/dist/hooks/useNotifications.js.map +1 -1
  42. package/dist/pages/CreateNotificationPage.d.ts.map +1 -1
  43. package/dist/pages/CreateNotificationPage.js +407 -391
  44. package/dist/pages/CreateNotificationPage.js.map +1 -1
  45. package/dist/pages/NotificationCenterPage.d.ts.map +1 -1
  46. package/dist/pages/NotificationCenterPage.js +80 -81
  47. package/dist/pages/NotificationCenterPage.js.map +1 -1
  48. package/dist/pages/NotificationHistoryAdminPage.d.ts.map +1 -1
  49. package/dist/pages/NotificationHistoryAdminPage.js +2 -1
  50. package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
  51. package/dist/pages/NotificationHistoryPage.d.ts.map +1 -1
  52. package/dist/pages/NotificationHistoryPage.js +2 -1
  53. package/dist/pages/NotificationHistoryPage.js.map +1 -1
  54. package/dist/pages/NotificationPreferencesPage.d.ts.map +1 -1
  55. package/dist/pages/NotificationPreferencesPage.js +140 -95
  56. package/dist/pages/NotificationPreferencesPage.js.map +1 -1
  57. package/dist/pages/TemplateEditorPage.d.ts.map +1 -1
  58. package/dist/pages/TemplateEditorPage.js +326 -313
  59. package/dist/pages/TemplateEditorPage.js.map +1 -1
  60. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AdminNotificationRoutes.d.ts","sourceRoot":"","sources":["../src/AdminNotificationRoutes.tsx"],"names":[],"mappings":"AAqFA,wBAAgB,uBAAuB,4CA4FtC"}
1
+ {"version":3,"file":"AdminNotificationRoutes.d.ts","sourceRoot":"","sources":["../src/AdminNotificationRoutes.tsx"],"names":[],"mappings":"AAsFA,wBAAgB,uBAAuB,4CAwGtC"}
@@ -2,98 +2,102 @@ import { useNotification as e } from "./providers/NotificationProvider.js";
2
2
  import { NOTIFICATION_PERMISSIONS as t } from "./constants/permissions.js";
3
3
  import { NotificationCenterPage as n } from "./pages/NotificationCenterPage.js";
4
4
  import { NotificationLandingPage as r } from "./pages/NotificationLandingPage.js";
5
- import { Suspense as i, lazy as a, useEffect as o } from "react";
6
- import { PermissionGate as s } from "@burdenoff/fe-libs/shared/components";
7
- import { useFeatureFlagDetails as c } from "@burdenoff/fe-libs/shared/feature-flags";
8
- import { Navigate as l, Route as u, Routes as d, useNavigate as f } from "react-router-dom";
9
- import { useGlobalUi as p } from "@burdenoff/fe-libs/shared/providers/shell";
10
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
+ import { FeatureDisabledPage as i } from "./components/FeatureDisabledPage.js";
6
+ import { Suspense as a, lazy as o, useEffect as s } from "react";
7
+ import { PermissionGate as c } from "@burdenoff/fe-libs/shared/components";
8
+ import { useFeatureFlagDetails as l } from "@burdenoff/fe-libs/shared/feature-flags";
9
+ import { Navigate as u, Route as d, Routes as f, useNavigate as p } from "react-router-dom";
10
+ import { useGlobalUi as m } from "@burdenoff/fe-libs/shared/providers/shell";
11
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
12
  //#region src/AdminNotificationRoutes.tsx
12
- var g = a(() => import("./pages/NotificationHistoryAdminPage.js").then((e) => ({ default: e.NotificationHistoryAdminPage }))), _ = a(() => import("./pages/NotificationTemplatesPage.js").then((e) => ({ default: e.NotificationTemplatesPage }))), v = a(() => import("./pages/TemplateEditorPage.js").then((e) => ({ default: e.TemplateEditorPage }))), y = a(() => import("./pages/CreateNotificationPage.js").then((e) => ({ default: e.CreateNotificationPage }))), b = a(() => import("./pages/NotificationTopicsPage.js").then((e) => ({ default: e.NotificationTopicsPage })));
13
- function x() {
14
- return /* @__PURE__ */ m("div", {
13
+ var _ = o(() => import("./pages/NotificationHistoryAdminPage.js").then((e) => ({ default: e.NotificationHistoryAdminPage }))), v = o(() => import("./pages/NotificationTemplatesPage.js").then((e) => ({ default: e.NotificationTemplatesPage }))), y = o(() => import("./pages/TemplateEditorPage.js").then((e) => ({ default: e.TemplateEditorPage }))), b = o(() => import("./pages/CreateNotificationPage.js").then((e) => ({ default: e.CreateNotificationPage }))), x = o(() => import("./pages/NotificationTopicsPage.js").then((e) => ({ default: e.NotificationTopicsPage })));
14
+ function S() {
15
+ return /* @__PURE__ */ h("div", {
15
16
  className: "flex h-64 items-center justify-center",
16
- children: /* @__PURE__ */ m("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
17
+ children: /* @__PURE__ */ h("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
17
18
  });
18
19
  }
19
- function S() {
20
- let { showToast: t } = p(), n = f(), { basePath: r } = e();
21
- return o(() => {
20
+ function C() {
21
+ let { showToast: t } = m(), n = p(), { basePath: r } = e();
22
+ return s(() => {
22
23
  t("You do not have permission to access that notification page.", "warning"), n(`${r}/center`, { replace: !0 });
23
24
  }, []), null;
24
25
  }
25
- function C(e) {
26
+ function w(e) {
26
27
  let { children: t, ...n } = e;
27
- return /* @__PURE__ */ m(s, {
28
+ return /* @__PURE__ */ h(c, {
28
29
  permission: n.permission,
29
30
  permissions: n.permissions,
30
31
  requireAll: n.requireAll,
31
- loading: /* @__PURE__ */ m(x, {}),
32
- fallback: /* @__PURE__ */ m(S, {}),
32
+ loading: /* @__PURE__ */ h(S, {}),
33
+ fallback: /* @__PURE__ */ h(C, {}),
33
34
  children: t
34
35
  });
35
36
  }
36
- function w() {
37
- let e = c("notification.templates"), a = c("notification.create"), o = c("notification.history"), s = e ? !!e.value : !1, f = a ? !!a.value : !1, p = o ? !!o.value : !1;
38
- return /* @__PURE__ */ m(i, {
39
- fallback: /* @__PURE__ */ m(x, {}),
40
- children: /* @__PURE__ */ h(d, { children: [
41
- /* @__PURE__ */ m(u, {
37
+ function T() {
38
+ let e = l("notification.templates"), o = l("notification.create"), s = l("notification.history"), c = e ? !!e.value : !1, p = o ? !!o.value : !1, m = s ? !!s.value : !1;
39
+ return /* @__PURE__ */ h(a, {
40
+ fallback: /* @__PURE__ */ h(S, {}),
41
+ children: /* @__PURE__ */ g(f, { children: [
42
+ /* @__PURE__ */ h(d, {
42
43
  index: !0,
43
- element: /* @__PURE__ */ m(r, {})
44
+ element: /* @__PURE__ */ h(r, {})
44
45
  }),
45
- /* @__PURE__ */ m(u, {
46
+ /* @__PURE__ */ h(d, {
46
47
  path: "center",
47
- element: /* @__PURE__ */ m(n, {})
48
+ element: /* @__PURE__ */ h(n, {})
48
49
  }),
49
- p && /* @__PURE__ */ m(u, {
50
+ /* @__PURE__ */ h(d, {
50
51
  path: "history",
51
- element: /* @__PURE__ */ m(g, {})
52
+ element: m ? /* @__PURE__ */ h(_, {}) : /* @__PURE__ */ h(i, {
53
+ title: "Notification history is not enabled",
54
+ description: "This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history."
55
+ })
52
56
  }),
53
- s && /* @__PURE__ */ m(u, {
57
+ c && /* @__PURE__ */ h(d, {
54
58
  path: "templates",
55
- element: /* @__PURE__ */ m(C, {
59
+ element: /* @__PURE__ */ h(w, {
56
60
  permissions: [
57
61
  t.TEMPLATE_LIST,
58
62
  t.TEMPLATE_CREATE,
59
63
  t.TEMPLATE_UPDATE,
60
64
  t.TEMPLATE_DELETE
61
65
  ],
62
- children: /* @__PURE__ */ m(_, {})
66
+ children: /* @__PURE__ */ h(v, {})
63
67
  })
64
68
  }),
65
- s && /* @__PURE__ */ m(u, {
69
+ c && /* @__PURE__ */ h(d, {
66
70
  path: "templates/new",
67
- element: /* @__PURE__ */ m(C, {
71
+ element: /* @__PURE__ */ h(w, {
68
72
  permission: t.TEMPLATE_CREATE,
69
- children: /* @__PURE__ */ m(v, {})
73
+ children: /* @__PURE__ */ h(y, {})
70
74
  })
71
75
  }),
72
- s && /* @__PURE__ */ m(u, {
76
+ c && /* @__PURE__ */ h(d, {
73
77
  path: "templates/:templateId",
74
- element: /* @__PURE__ */ m(C, {
78
+ element: /* @__PURE__ */ h(w, {
75
79
  permission: t.TEMPLATE_UPDATE,
76
- children: /* @__PURE__ */ m(v, {})
80
+ children: /* @__PURE__ */ h(y, {})
77
81
  })
78
82
  }),
79
- f && /* @__PURE__ */ m(u, {
83
+ p && /* @__PURE__ */ h(d, {
80
84
  path: "create",
81
- element: /* @__PURE__ */ m(C, {
85
+ element: /* @__PURE__ */ h(w, {
82
86
  permissions: [t.NOTIFICATION_CREATE, t.NOTIFICATION_SEND],
83
87
  requireAll: !0,
84
- children: /* @__PURE__ */ m(y, {})
88
+ children: /* @__PURE__ */ h(b, {})
85
89
  })
86
90
  }),
87
- f && /* @__PURE__ */ m(u, {
91
+ p && /* @__PURE__ */ h(d, {
88
92
  path: "topics",
89
- element: /* @__PURE__ */ m(C, {
93
+ element: /* @__PURE__ */ h(w, {
90
94
  permission: t.NOTIFICATION_CREATE,
91
- children: /* @__PURE__ */ m(b, {})
95
+ children: /* @__PURE__ */ h(x, {})
92
96
  })
93
97
  }),
94
- /* @__PURE__ */ m(u, {
98
+ /* @__PURE__ */ h(d, {
95
99
  path: "*",
96
- element: /* @__PURE__ */ m(l, {
100
+ element: /* @__PURE__ */ h(u, {
97
101
  to: "..",
98
102
  replace: !0,
99
103
  relative: "path"
@@ -103,6 +107,6 @@ function w() {
103
107
  });
104
108
  }
105
109
  //#endregion
106
- export { w as AdminNotificationRoutes };
110
+ export { T as AdminNotificationRoutes };
107
111
 
108
112
  //# sourceMappingURL=AdminNotificationRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdminNotificationRoutes.js","names":[],"sources":["../src/AdminNotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useEffect, type ReactNode } from 'react';\nimport { Navigate, Route, Routes, useNavigate } from 'react-router-dom';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { NOTIFICATION_PERMISSIONS, type NotificationPermission } from './constants/permissions';\nimport { useNotification } from './providers/NotificationProvider';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\nimport { NotificationLandingPage } from './pages/NotificationLandingPage';\n\n// Lazy load - Secondary pages\nconst NotificationHistoryAdminPage = lazy(() =>\n import('./pages/NotificationHistoryAdminPage').then((m) => ({\n default: m.NotificationHistoryAdminPage,\n }))\n);\nconst NotificationTemplatesPage = lazy(() =>\n import('./pages/NotificationTemplatesPage').then((m) => ({\n default: m.NotificationTemplatesPage,\n }))\n);\nconst TemplateEditorPage = lazy(() =>\n import('./pages/TemplateEditorPage').then((m) => ({ default: m.TemplateEditorPage }))\n);\nconst CreateNotificationPage = lazy(() =>\n import('./pages/CreateNotificationPage').then((m) => ({ default: m.CreateNotificationPage }))\n);\nconst NotificationTopicsPage = lazy(() =>\n import('./pages/NotificationTopicsPage').then((m) => ({ default: m.NotificationTopicsPage }))\n);\n\n// Loading fallback component\nfunction PageLoader() {\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// Pair toast + programmatic navigation in one effect to avoid <Navigate> unmounting before the toast fires.\n// Uses absolute `${basePath}/center` because relative `../center` resolves wrong from nested paths like `/templates/new`.\nfunction AccessDeniedRedirect() {\n const { showToast } = useGlobalUi();\n const navigate = useNavigate();\n const { basePath } = useNotification();\n useEffect(() => {\n showToast('You do not have permission to access that notification page.', 'warning');\n navigate(`${basePath}/center`, { replace: true });\n // Run once per access-denied mount; re-running on hook identity changes would duplicate the toast.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return null;\n}\n\n// Discriminated union: callers must pass exactly one of `permission` / `permissions`.\ntype AdminRouteGateProps = {\n children: ReactNode;\n} & (\n | { permission: NotificationPermission; permissions?: never; requireAll?: never }\n | {\n permission?: never;\n permissions: NotificationPermission[];\n requireAll?: boolean;\n }\n);\n\nfunction AdminRouteGate(props: AdminRouteGateProps) {\n const { children, ...gateProps } = props;\n return (\n <PermissionGate\n permission={gateProps.permission}\n permissions={gateProps.permissions}\n requireAll={gateProps.requireAll}\n loading={<PageLoader />}\n fallback={<AccessDeniedRedirect />}\n >\n {children}\n </PermissionGate>\n );\n}\n\n// Admin-app router for the notification MFE. Admin routes are wrapped in PermissionGate.\nexport function AdminNotificationRoutes() {\n // Explicit `false` fallback prevents provider's default-allow from leaking unseeded flags.\n const templatesDetails = useFeatureFlagDetails('notification.templates');\n const createDetails = useFeatureFlagDetails('notification.create');\n const historyDetails = useFeatureFlagDetails('notification.history');\n const templatesEnabled = templatesDetails ? Boolean(templatesDetails.value) : false;\n const createEnabled = createDetails ? Boolean(createDetails.value) : false;\n const historyEnabled = historyDetails ? Boolean(historyDetails.value) : false;\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route */}\n <Route index element={<NotificationLandingPage />} />\n\n {/* User-facing routes (all users) */}\n <Route path=\"center\" element={<NotificationCenterPage />} />\n {historyEnabled && <Route path=\"history\" element={<NotificationHistoryAdminPage />} />}\n\n {/* Gate admits any actor with read or any write permission; page disables write actions for read-only. */}\n {templatesEnabled && (\n <Route\n path=\"templates\"\n element={\n <AdminRouteGate\n permissions={[\n NOTIFICATION_PERMISSIONS.TEMPLATE_LIST,\n NOTIFICATION_PERMISSIONS.TEMPLATE_CREATE,\n NOTIFICATION_PERMISSIONS.TEMPLATE_UPDATE,\n NOTIFICATION_PERMISSIONS.TEMPLATE_DELETE,\n ]}\n >\n <NotificationTemplatesPage />\n </AdminRouteGate>\n }\n />\n )}\n {templatesEnabled && (\n <Route\n path=\"templates/new\"\n element={\n <AdminRouteGate permission={NOTIFICATION_PERMISSIONS.TEMPLATE_CREATE}>\n <TemplateEditorPage />\n </AdminRouteGate>\n }\n />\n )}\n {templatesEnabled && (\n <Route\n path=\"templates/:templateId\"\n element={\n <AdminRouteGate permission={NOTIFICATION_PERMISSIONS.TEMPLATE_UPDATE}>\n <TemplateEditorPage />\n </AdminRouteGate>\n }\n />\n )}\n\n {/* Admin routes - Create/Send Notification (wrapped in PermissionGate) */}\n {createEnabled && (\n <Route\n path=\"create\"\n element={\n <AdminRouteGate\n permissions={[\n NOTIFICATION_PERMISSIONS.NOTIFICATION_CREATE,\n NOTIFICATION_PERMISSIONS.NOTIFICATION_SEND,\n ]}\n requireAll\n >\n <CreateNotificationPage />\n </AdminRouteGate>\n }\n />\n )}\n {/* Topics CRUD maps to `notification:create` per backend @rbac — tracked in BOFF-2386. */}\n {createEnabled && (\n <Route\n path=\"topics\"\n element={\n <AdminRouteGate permission={NOTIFICATION_PERMISSIONS.NOTIFICATION_CREATE}>\n <NotificationTopicsPage />\n </AdminRouteGate>\n }\n />\n )}\n\n {/* Catch-all route - redirect to index using path-relative navigation */}\n <Route path=\"*\" element={<Navigate to=\"..\" replace relative=\"path\" />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAM,IAA+B,QACnC,OAAO,2CAAwC,MAAM,OAAO,EAC1D,SAAS,EAAE,8BACZ,EAAE,CACJ,EACK,IAA4B,QAChC,OAAO,wCAAqC,MAAM,OAAO,EACvD,SAAS,EAAE,2BACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CACtF,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F;AAGD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EA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EnB,CAAA;GAEH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KAAgB,YAAY,EAAyB;eACnD,kBAAC,GAAD,EAAsB,CAAA;KACP,CAAA;IAEnB,CAAA;GAEH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KAAgB,YAAY,EAAyB;eACnD,kBAAC,GAAD,EAAsB,CAAA;KACP,CAAA;IAEnB,CAAA;GAIH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KACE,aAAa,CACX,EAAyB,qBACzB,EAAyB,kBAC1B;KACD,YAAA;eAEA,kBAAC,GAAD,EAA0B,CAAA;KACX,CAAA;IAEnB,CAAA;GAGH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KAAgB,YAAY,EAAyB;eACnD,kBAAC,GAAD,EAA0B,CAAA;KACX,CAAA;IAEnB,CAAA;GAIJ,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAK,SAAA;KAAQ,UAAS;KAAS,CAAA;IAAI,CAAA;GAClE,EAAA,CAAA;EACA,CAAA"}
1
+ {"version":3,"file":"AdminNotificationRoutes.js","names":[],"sources":["../src/AdminNotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useEffect, type ReactNode } from 'react';\nimport { Navigate, Route, Routes, useNavigate } from 'react-router-dom';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { PermissionGate } from '@burdenoff/fe-libs/shared/components';\nimport { useGlobalUi } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { FeatureDisabledPage } from './components/FeatureDisabledPage';\nimport { NOTIFICATION_PERMISSIONS, type NotificationPermission } from './constants/permissions';\nimport { useNotification } from './providers/NotificationProvider';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\nimport { NotificationLandingPage } from './pages/NotificationLandingPage';\n\n// Lazy load - Secondary pages\nconst NotificationHistoryAdminPage = lazy(() =>\n import('./pages/NotificationHistoryAdminPage').then((m) => ({\n default: m.NotificationHistoryAdminPage,\n }))\n);\nconst NotificationTemplatesPage = lazy(() =>\n import('./pages/NotificationTemplatesPage').then((m) => ({\n default: m.NotificationTemplatesPage,\n }))\n);\nconst TemplateEditorPage = lazy(() =>\n import('./pages/TemplateEditorPage').then((m) => ({ default: m.TemplateEditorPage }))\n);\nconst CreateNotificationPage = lazy(() =>\n import('./pages/CreateNotificationPage').then((m) => ({ default: m.CreateNotificationPage }))\n);\nconst NotificationTopicsPage = lazy(() =>\n import('./pages/NotificationTopicsPage').then((m) => ({ default: m.NotificationTopicsPage }))\n);\n\n// Loading fallback component\nfunction PageLoader() {\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// Pair toast + programmatic navigation in one effect to avoid <Navigate> unmounting before the toast fires.\n// Uses absolute `${basePath}/center` because relative `../center` resolves wrong from nested paths like `/templates/new`.\nfunction AccessDeniedRedirect() {\n const { showToast } = useGlobalUi();\n const navigate = useNavigate();\n const { basePath } = useNotification();\n useEffect(() => {\n showToast('You do not have permission to access that notification page.', 'warning');\n navigate(`${basePath}/center`, { replace: true });\n // Run once per access-denied mount; re-running on hook identity changes would duplicate the toast.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return null;\n}\n\n// Discriminated union: callers must pass exactly one of `permission` / `permissions`.\ntype AdminRouteGateProps = {\n children: ReactNode;\n} & (\n | { permission: NotificationPermission; permissions?: never; requireAll?: never }\n | {\n permission?: never;\n permissions: NotificationPermission[];\n requireAll?: boolean;\n }\n);\n\nfunction AdminRouteGate(props: AdminRouteGateProps) {\n const { children, ...gateProps } = props;\n return (\n <PermissionGate\n permission={gateProps.permission}\n permissions={gateProps.permissions}\n requireAll={gateProps.requireAll}\n loading={<PageLoader />}\n fallback={<AccessDeniedRedirect />}\n >\n {children}\n </PermissionGate>\n );\n}\n\n// Admin-app router for the notification MFE. Admin routes are wrapped in PermissionGate.\nexport function AdminNotificationRoutes() {\n // Explicit `false` fallback prevents provider's default-allow from leaking unseeded flags.\n const templatesDetails = useFeatureFlagDetails('notification.templates');\n const createDetails = useFeatureFlagDetails('notification.create');\n const historyDetails = useFeatureFlagDetails('notification.history');\n const templatesEnabled = templatesDetails ? Boolean(templatesDetails.value) : false;\n const createEnabled = createDetails ? Boolean(createDetails.value) : false;\n const historyEnabled = historyDetails ? Boolean(historyDetails.value) : false;\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route */}\n <Route index element={<NotificationLandingPage />} />\n\n {/* User-facing routes (all users) */}\n <Route path=\"center\" element={<NotificationCenterPage />} />\n <Route\n path=\"history\"\n element={\n historyEnabled ? (\n <NotificationHistoryAdminPage />\n ) : (\n <FeatureDisabledPage\n title=\"Notification history is not enabled\"\n description=\"This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history.\"\n />\n )\n }\n />\n\n {/* Gate admits any actor with read or any write permission; page disables write actions for read-only. */}\n {templatesEnabled && (\n <Route\n path=\"templates\"\n element={\n <AdminRouteGate\n permissions={[\n NOTIFICATION_PERMISSIONS.TEMPLATE_LIST,\n NOTIFICATION_PERMISSIONS.TEMPLATE_CREATE,\n NOTIFICATION_PERMISSIONS.TEMPLATE_UPDATE,\n NOTIFICATION_PERMISSIONS.TEMPLATE_DELETE,\n ]}\n >\n <NotificationTemplatesPage />\n </AdminRouteGate>\n }\n />\n )}\n {templatesEnabled && (\n <Route\n path=\"templates/new\"\n element={\n <AdminRouteGate permission={NOTIFICATION_PERMISSIONS.TEMPLATE_CREATE}>\n <TemplateEditorPage />\n </AdminRouteGate>\n }\n />\n )}\n {templatesEnabled && (\n <Route\n path=\"templates/:templateId\"\n element={\n <AdminRouteGate permission={NOTIFICATION_PERMISSIONS.TEMPLATE_UPDATE}>\n <TemplateEditorPage />\n </AdminRouteGate>\n }\n />\n )}\n\n {/* Admin routes - Create/Send Notification (wrapped in PermissionGate) */}\n {createEnabled && (\n <Route\n path=\"create\"\n element={\n <AdminRouteGate\n permissions={[\n NOTIFICATION_PERMISSIONS.NOTIFICATION_CREATE,\n NOTIFICATION_PERMISSIONS.NOTIFICATION_SEND,\n ]}\n requireAll\n >\n <CreateNotificationPage />\n </AdminRouteGate>\n }\n />\n )}\n {/* Topics CRUD maps to `notification:create` per backend @rbac — tracked in BOFF-2386. */}\n {createEnabled && (\n <Route\n path=\"topics\"\n element={\n <AdminRouteGate permission={NOTIFICATION_PERMISSIONS.NOTIFICATION_CREATE}>\n <NotificationTopicsPage />\n </AdminRouteGate>\n }\n />\n )}\n\n {/* Catch-all route - redirect to index using path-relative navigation */}\n <Route path=\"*\" element={<Navigate to=\"..\" replace relative=\"path\" />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAcA,IAAM,IAA+B,QACnC,OAAO,2CAAwC,MAAM,OAAO,EAC1D,SAAS,EAAE,8BACZ,EAAE,CACJ,EACK,IAA4B,QAChC,OAAO,wCAAqC,MAAM,OAAO,EACvD,SAAS,EAAE,2BACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CACtF,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F,EACK,IAAyB,QAC7B,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAC9F;AAGD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA;;AAMV,SAAS,IAAuB;CAC9B,IAAM,EAAE,iBAAc,GAAa,EAC7B,IAAW,GAAa,EACxB,EAAE,gBAAa,GAAiB;AAOtC,QANA,QAA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AY,EAAyB;eACnD,kBAAC,GAAD,EAAsB,CAAA;KACP,CAAA;IAEnB,CAAA;GAEH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KAAgB,YAAY,EAAyB;eACnD,kBAAC,GAAD,EAAsB,CAAA;KACP,CAAA;IAEnB,CAAA;GAIH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KACE,aAAa,CACX,EAAyB,qBACzB,EAAyB,kBAC1B;KACD,YAAA;eAEA,kBAAC,GAAD,EAA0B,CAAA;KACX,CAAA;IAEnB,CAAA;GAGH,KACC,kBAAC,GAAD;IACE,MAAK;IACL,SACE,kBAAC,GAAD;KAAgB,YAAY,EAAyB;eACnD,kBAAC,GAAD,EAA0B,CAAA;KACX,CAAA;IAEnB,CAAA;GAIJ,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAK,SAAA;KAAQ,UAAS;KAAS,CAAA;IAAI,CAAA;GAClE,EAAA,CAAA;EACA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserNotificationRoutes.d.ts","sourceRoot":"","sources":["../src/UserNotificationRoutes.tsx"],"names":[],"mappings":"AA4BA;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,4CA0BrC"}
1
+ {"version":3,"file":"UserNotificationRoutes.d.ts","sourceRoot":"","sources":["../src/UserNotificationRoutes.tsx"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,4CAsCrC"}
@@ -1,43 +1,47 @@
1
1
  import { NotificationCenterPage as e } from "./pages/NotificationCenterPage.js";
2
- import { Suspense as t, lazy as n } from "react";
3
- import { useFeatureFlagDetails as r } from "@burdenoff/fe-libs/shared/feature-flags";
4
- import { Navigate as i, Route as a, Routes as o } from "react-router-dom";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
2
+ import { FeatureDisabledPage as t } from "./components/FeatureDisabledPage.js";
3
+ import { Suspense as n, lazy as r } from "react";
4
+ import { useFeatureFlagDetails as i } from "@burdenoff/fe-libs/shared/feature-flags";
5
+ import { Navigate as a, Route as o, Routes as s } from "react-router-dom";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
7
  //#region src/UserNotificationRoutes.tsx
7
- var l = n(() => import("./pages/NotificationHistoryPage.js").then((e) => ({ default: e.NotificationHistoryPage }))), u = n(() => import("./pages/NotificationPreferencesPage.js").then((e) => ({ default: e.NotificationPreferencesPage })));
8
- function d() {
9
- return /* @__PURE__ */ s("div", {
8
+ var u = r(() => import("./pages/NotificationHistoryPage.js").then((e) => ({ default: e.NotificationHistoryPage }))), d = r(() => import("./pages/NotificationPreferencesPage.js").then((e) => ({ default: e.NotificationPreferencesPage })));
9
+ function f() {
10
+ return /* @__PURE__ */ c("div", {
10
11
  className: "flex h-64 items-center justify-center",
11
- children: /* @__PURE__ */ s("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
12
+ children: /* @__PURE__ */ c("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
12
13
  });
13
14
  }
14
- function f() {
15
- let n = r("notification.history"), f = n ? !!n.value : !1;
16
- return /* @__PURE__ */ s(t, {
17
- fallback: /* @__PURE__ */ s(d, {}),
18
- children: /* @__PURE__ */ c(o, { children: [
19
- /* @__PURE__ */ s(a, {
15
+ function p() {
16
+ let r = i("notification.history"), p = r ? !!r.value : !1;
17
+ return /* @__PURE__ */ c(n, {
18
+ fallback: /* @__PURE__ */ c(f, {}),
19
+ children: /* @__PURE__ */ l(s, { children: [
20
+ /* @__PURE__ */ c(o, {
20
21
  index: !0,
21
- element: /* @__PURE__ */ s(i, {
22
+ element: /* @__PURE__ */ c(a, {
22
23
  to: "center",
23
24
  replace: !0
24
25
  })
25
26
  }),
26
- /* @__PURE__ */ s(a, {
27
+ /* @__PURE__ */ c(o, {
27
28
  path: "center",
28
- element: /* @__PURE__ */ s(e, {})
29
+ element: /* @__PURE__ */ c(e, {})
29
30
  }),
30
- f && /* @__PURE__ */ s(a, {
31
+ /* @__PURE__ */ c(o, {
31
32
  path: "history",
32
- element: /* @__PURE__ */ s(l, {})
33
+ element: p ? /* @__PURE__ */ c(u, {}) : /* @__PURE__ */ c(t, {
34
+ title: "Notification history is not enabled",
35
+ description: "This page is controlled by the notification.history feature flag. Ask an administrator to enable it for this tenant if history should be available."
36
+ })
33
37
  }),
34
- /* @__PURE__ */ s(a, {
38
+ /* @__PURE__ */ c(o, {
35
39
  path: "preferences",
36
- element: /* @__PURE__ */ s(u, {})
40
+ element: /* @__PURE__ */ c(d, {})
37
41
  }),
38
- /* @__PURE__ */ s(a, {
42
+ /* @__PURE__ */ c(o, {
39
43
  path: "*",
40
- element: /* @__PURE__ */ s(i, {
44
+ element: /* @__PURE__ */ c(a, {
41
45
  to: "..",
42
46
  replace: !0,
43
47
  relative: "path"
@@ -47,6 +51,6 @@ function f() {
47
51
  });
48
52
  }
49
53
  //#endregion
50
- export { f as UserNotificationRoutes };
54
+ export { p as UserNotificationRoutes };
51
55
 
52
56
  //# sourceMappingURL=UserNotificationRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserNotificationRoutes.js","names":[],"sources":["../src/UserNotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Navigate, Route, Routes } from 'react-router-dom';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\n\n// Lazy load - Secondary pages\nconst NotificationHistoryPage = lazy(() =>\n import('./pages/NotificationHistoryPage').then((m) => ({\n default: m.NotificationHistoryPage,\n }))\n);\nconst NotificationPreferencesPage = lazy(() =>\n import('./pages/NotificationPreferencesPage').then((m) => ({\n default: m.NotificationPreferencesPage,\n }))\n);\n\n// Loading fallback component\nfunction PageLoader() {\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/**\n * Internal router for the User-facing Notification microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Only exposes user-facing routes intended for product shells. RBAC permissions\n * still gate in-page actions via usePermissions checks.\n *\n * Routes:\n * - / → Redirect to notification center\n * - /center → Notification center (in-app notifications)\n * - /history → Notification history and archive\n * - /preferences → Topic subscriptions and preferences\n */\nexport function UserNotificationRoutes() {\n // Component-level feature gate. `notification.history` is declared as\n // unreleased (defaultValue=false). We use `useFeatureFlagDetails` and\n // explicitly fall back to `false` when the flag is absent from the cache,\n // because the provider's global default-allow would otherwise return `true`\n // for unseeded flags — which would defeat the whole point of the unreleased\n // pattern.\n const historyDetails = useFeatureFlagDetails('notification.history');\n const historyEnabled = historyDetails ? Boolean(historyDetails.value) : false;\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect to notification center */}\n <Route index element={<Navigate to=\"center\" replace />} />\n\n {/* User-facing routes (all users) */}\n <Route path=\"center\" element={<NotificationCenterPage />} />\n {historyEnabled && <Route path=\"history\" element={<NotificationHistoryPage />} />}\n <Route path=\"preferences\" element={<NotificationPreferencesPage />} />\n\n {/* Catch-all route - redirect to index using path-relative navigation */}\n <Route path=\"*\" element={<Navigate to=\"..\" replace relative=\"path\" />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;AAQA,IAAM,IAA0B,QAC9B,OAAO,sCAAmC,MAAM,OAAO,EACrD,SAAS,EAAE,yBACZ,EAAE,CACJ,EACK,IAA8B,QAClC,OAAO,0CAAuC,MAAM,OAAO,EACzD,SAAS,EAAE,6BACZ,EAAE,CACJ;AAGD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA;;AAiBV,SAAgB,IAAyB;CAOvC,IAAM,IAAiB,EAAsB,uBAAuB,EAC9D,IAAiB,IAAiB,EAAQ,EAAe,QAAS;AAExE,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;YAChC,kBAAC,GAAD,EAAA,UAAA;GAEE,kBAAC,GAAD;IAAO,OAAA;IAAM,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAS,SAAA;KAAU,CAAA;IAAI,CAAA;GAG1D,kBAAC,GAAD;IAAO,MAAK;IAAS,SAAS,kBAAC,GAAD,EAA0B,CAAA;IAAI,CAAA;GAC3D,KAAkB,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAA2B,CAAA;IAAI,CAAA;GACjF,kBAAC,GAAD;IAAO,MAAK;IAAc,SAAS,kBAAC,GAAD,EAA+B,CAAA;IAAI,CAAA;GAGtE,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAK,SAAA;KAAQ,UAAS;KAAS,CAAA;IAAI,CAAA;GAClE,EAAA,CAAA;EACA,CAAA"}
1
+ {"version":3,"file":"UserNotificationRoutes.js","names":[],"sources":["../src/UserNotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Navigate, Route, Routes } from 'react-router-dom';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { FeatureDisabledPage } from './components/FeatureDisabledPage';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\n\n// Lazy load - Secondary pages\nconst NotificationHistoryPage = lazy(() =>\n import('./pages/NotificationHistoryPage').then((m) => ({\n default: m.NotificationHistoryPage,\n }))\n);\nconst NotificationPreferencesPage = lazy(() =>\n import('./pages/NotificationPreferencesPage').then((m) => ({\n default: m.NotificationPreferencesPage,\n }))\n);\n\n// Loading fallback component\nfunction PageLoader() {\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/**\n * Internal router for the User-facing Notification microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Only exposes user-facing routes intended for product shells. RBAC permissions\n * still gate in-page actions via usePermissions checks.\n *\n * Routes:\n * - / → Redirect to notification center\n * - /center → Notification center (in-app notifications)\n * - /history → Notification history and archive\n * - /preferences → Topic subscriptions and preferences\n */\nexport function UserNotificationRoutes() {\n // Component-level feature gate. `notification.history` is declared as\n // unreleased (defaultValue=false). We use `useFeatureFlagDetails` and\n // explicitly fall back to `false` when the flag is absent from the cache,\n // because the provider's global default-allow would otherwise return `true`\n // for unseeded flags — which would defeat the whole point of the unreleased\n // pattern.\n const historyDetails = useFeatureFlagDetails('notification.history');\n const historyEnabled = historyDetails ? Boolean(historyDetails.value) : false;\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Default redirect to notification center */}\n <Route index element={<Navigate to=\"center\" replace />} />\n\n {/* User-facing routes (all users) */}\n <Route path=\"center\" element={<NotificationCenterPage />} />\n <Route\n path=\"history\"\n element={\n historyEnabled ? (\n <NotificationHistoryPage />\n ) : (\n <FeatureDisabledPage\n title=\"Notification history is not enabled\"\n description=\"This page is controlled by the notification.history feature flag. Ask an administrator to enable it for this tenant if history should be available.\"\n />\n )\n }\n />\n <Route path=\"preferences\" element={<NotificationPreferencesPage />} />\n\n {/* Catch-all route - redirect to index using path-relative navigation */}\n <Route path=\"*\" element={<Navigate to=\"..\" replace relative=\"path\" />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;AASA,IAAM,IAA0B,QAC9B,OAAO,sCAAmC,MAAM,OAAO,EACrD,SAAS,EAAE,yBACZ,EAAE,CACJ,EACK,IAA8B,QAClC,OAAO,0CAAuC,MAAM,OAAO,EACzD,SAAS,EAAE,6BACZ,EAAE,CACJ;AAGD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA;;AAiBV,SAAgB,IAAyB;CAOvC,IAAM,IAAiB,EAAsB,uBAAuB,EAC9D,IAAiB,IAAiB,EAAQ,EAAe,QAAS;AAExE,QACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;YAChC,kBAAC,GAAD,EAAA,UAAA;GAEE,kBAAC,GAAD;IAAO,OAAA;IAAM,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAS,SAAA;KAAU,CAAA;IAAI,CAAA;GAG1D,kBAAC,GAAD;IAAO,MAAK;IAAS,SAAS,kBAAC,GAAD,EAA0B,CAAA;IAAI,CAAA;GAC5D,kBAAC,GAAD;IACE,MAAK;IACL,SACE,IACE,kBAAC,GAAD,EAA2B,CAAA,GAE3B,kBAAC,GAAD;KACE,OAAM;KACN,aAAY;KACZ,CAAA;IAGN,CAAA;GACF,kBAAC,GAAD;IAAO,MAAK;IAAc,SAAS,kBAAC,GAAD,EAA+B,CAAA;IAAI,CAAA;GAGtE,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAK,SAAA;KAAQ,UAAS;KAAS,CAAA;IAAI,CAAA;GAClE,EAAA,CAAA;EACA,CAAA"}
@@ -0,0 +1,7 @@
1
+ interface FeatureDisabledPageProps {
2
+ title: string;
3
+ description: string;
4
+ }
5
+ export declare function FeatureDisabledPage({ title, description }: FeatureDisabledPageProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=FeatureDisabledPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureDisabledPage.d.ts","sourceRoot":"","sources":["../../src/components/FeatureDisabledPage.tsx"],"names":[],"mappings":"AAEA,UAAU,wBAAwB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CAYnF"}
@@ -0,0 +1,32 @@
1
+ import { Lock as e } from "lucide-react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/components/FeatureDisabledPage.tsx
4
+ function r({ title: r, description: i }) {
5
+ return /* @__PURE__ */ t("div", {
6
+ className: "flex min-h-64 items-center justify-center p-6",
7
+ children: /* @__PURE__ */ n("div", {
8
+ className: "max-w-md rounded-xl border border-default bg-surface p-6 text-center shadow-sm",
9
+ children: [
10
+ /* @__PURE__ */ t("div", {
11
+ className: "mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted text-secondary",
12
+ children: /* @__PURE__ */ t(e, {
13
+ size: 22,
14
+ "aria-hidden": "true"
15
+ })
16
+ }),
17
+ /* @__PURE__ */ t("h1", {
18
+ className: "text-lg font-semibold text-primary",
19
+ children: r
20
+ }),
21
+ /* @__PURE__ */ t("p", {
22
+ className: "mt-2 text-sm leading-6 text-secondary",
23
+ children: i
24
+ })
25
+ ]
26
+ })
27
+ });
28
+ }
29
+ //#endregion
30
+ export { r as FeatureDisabledPage };
31
+
32
+ //# sourceMappingURL=FeatureDisabledPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureDisabledPage.js","names":[],"sources":["../../src/components/FeatureDisabledPage.tsx"],"sourcesContent":["import { Lock } from 'lucide-react';\n\ninterface FeatureDisabledPageProps {\n title: string;\n description: string;\n}\n\nexport function FeatureDisabledPage({ title, description }: FeatureDisabledPageProps) {\n return (\n <div className=\"flex min-h-64 items-center justify-center p-6\">\n <div className=\"max-w-md rounded-xl border border-default bg-surface p-6 text-center shadow-sm\">\n <div className=\"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted text-secondary\">\n <Lock size={22} aria-hidden=\"true\" />\n </div>\n <h1 className=\"text-lg font-semibold text-primary\">{title}</h1>\n <p className=\"mt-2 text-sm leading-6 text-secondary\">{description}</p>\n </div>\n </div>\n );\n}\n"],"mappings":";;;AAOA,SAAgB,EAAoB,EAAE,UAAO,kBAAyC;AACpF,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MAAM,MAAM;MAAI,eAAY;MAAS,CAAA;KACjC,CAAA;IACN,kBAAC,MAAD;KAAI,WAAU;eAAsC;KAAW,CAAA;IAC/D,kBAAC,KAAD;KAAG,WAAU;eAAyC;KAAgB,CAAA;IAClE;;EACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBell.d.ts","sourceRoot":"","sources":["../../src/components/NotificationBell.tsx"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,2CAqDrE"}
1
+ {"version":3,"file":"NotificationBell.d.ts","sourceRoot":"","sources":["../../src/components/NotificationBell.tsx"],"names":[],"mappings":"AAeA;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,2CAsFrE"}
@@ -1,47 +1,68 @@
1
1
  import { useNotification as e } from "../providers/NotificationProvider.js";
2
2
  import { getGlobalNotificationClient as t } from "../graphql/global-client.js";
3
3
  import { useNotificationStore as n } from "../store/notificationStore.js";
4
- import { GetMyUnreadNotificationCountDocument as r } from "../generated/global-operations.js";
5
- import { useTr as i } from "../shared/hooks/useTr.js";
6
- import { useCallback as a, useEffect as o } from "react";
7
- import { Bell as s } from "lucide-react";
8
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ import { GetMyUnreadNotificationCountDocument as r, UnreadCountUpdatedDocument as i } from "../generated/global-operations.js";
5
+ import { useTr as a } from "../shared/hooks/useTr.js";
6
+ import { useCallback as o, useEffect as s } from "react";
7
+ import { Bell as c } from "lucide-react";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
9
  //#region src/components/NotificationBell.tsx
10
- function u({ onClick: u }) {
11
- let d = i(), { authToken: f, apiGatewayUrl: p } = e(), { unreadCount: m, togglePanel: h, setUnreadCount: g } = n(), _ = a(async () => {
10
+ function d({ onClick: d }) {
11
+ let f = a(), { authToken: p, apiGatewayUrl: m, currentUser: h } = e(), { unreadCount: g, togglePanel: _, setUnreadCount: v } = n(), y = o(async () => {
12
12
  try {
13
- let e = await t(p ?? void 0, f ?? void 0).query({
13
+ let e = await t(m ?? void 0, p ?? void 0).query({
14
14
  query: r,
15
15
  variables: { filter: { channel: "IN_APP" } },
16
16
  fetchPolicy: "network-only"
17
17
  });
18
- typeof e.data?.myUnreadNotificationCount == "number" && g(e.data.myUnreadNotificationCount);
18
+ typeof e.data?.myUnreadNotificationCount == "number" && v(e.data.myUnreadNotificationCount);
19
19
  } catch {}
20
20
  }, [
21
+ m,
21
22
  p,
22
- f,
23
- g
23
+ v
24
24
  ]);
25
- return o(() => {
26
- _();
27
- let e = window.setInterval(_, 5e3);
28
- return () => window.clearInterval(e);
29
- }, [_]), /* @__PURE__ */ l("button", {
25
+ return s(() => {
26
+ y();
27
+ }, [y]), s(() => {
28
+ if (!h?.id) return;
29
+ let e = t(m ?? void 0, p ?? void 0).subscribe({
30
+ query: i,
31
+ variables: { userId: h.id }
32
+ }).subscribe({
33
+ next: (e) => {
34
+ let t = e.data?.unreadCountUpdated;
35
+ typeof t == "number" && v(t);
36
+ },
37
+ error: () => {}
38
+ });
39
+ return () => e.unsubscribe();
40
+ }, [
41
+ m,
42
+ p,
43
+ h?.id,
44
+ v
45
+ ]), s(() => {
46
+ let e = () => {
47
+ document.visibilityState === "visible" && y();
48
+ };
49
+ return document.addEventListener("visibilitychange", e), () => document.removeEventListener("visibilitychange", e);
50
+ }, [y]), /* @__PURE__ */ u("button", {
30
51
  onClick: () => {
31
- u ? u() : h();
52
+ d ? d() : _();
32
53
  },
33
54
  className: "relative inline-flex items-center justify-center p-2 rounded-md hover:bg-muted transition-all duration-150 hover:scale-105",
34
- "aria-label": `${d("notifCommon.notifications", "Notifications")}${m > 0 ? ` (${m} ${d("notifCommon.unread", "unread")})` : ""}`,
35
- children: [/* @__PURE__ */ c(s, {
55
+ "aria-label": `${f("notifCommon.notifications", "Notifications")}${g > 0 ? ` (${g} ${f("notifCommon.unread", "unread")})` : ""}`,
56
+ children: [/* @__PURE__ */ l(c, {
36
57
  size: 20,
37
58
  className: "text-primary"
38
- }), m > 0 && /* @__PURE__ */ c("span", {
59
+ }), g > 0 && /* @__PURE__ */ l("span", {
39
60
  className: "absolute top-1 right-1 flex items-center justify-center min-w-[18px] h-[18px] px-1 text-xs font-semibold text-white bg-error rounded-full animate-pulse",
40
- children: m > 99 ? "99+" : m
61
+ children: g > 99 ? "99+" : g
41
62
  })]
42
63
  });
43
64
  }
44
65
  //#endregion
45
- export { u as NotificationBell };
66
+ export { d as NotificationBell };
46
67
 
47
68
  //# sourceMappingURL=NotificationBell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationBell.js","names":[],"sources":["../../src/components/NotificationBell.tsx"],"sourcesContent":["import { useCallback, useEffect } from 'react';\nimport { Bell } from 'lucide-react';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { getGlobalNotificationClient } from '../graphql/global-client';\nimport { GetMyUnreadNotificationCountDocument } from '../generated/global-operations';\nimport type { GetMyUnreadNotificationCountQuery } 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 } = 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 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 const interval = window.setInterval(refreshUnreadCount, 5000);\n return () => window.clearInterval(interval);\n }, [refreshUnreadCount]);\n\n const handleClick = () => {\n if (onClick) {\n onClick();\n } else {\n togglePanel();\n }\n };\n\n return (\n <button\n onClick={handleClick}\n className=\"relative inline-flex items-center justify-center p-2 rounded-md hover:bg-muted transition-all duration-150 hover:scale-105\"\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 right-1 flex items-center justify-center min-w-[18px] h-[18px] px-1 text-xs font-semibold text-white bg-error rounded-full animate-pulse\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,SAAgB,EAAiB,EAAE,cAAqC;CACtE,IAAM,IAAK,GAAO,EACZ,EAAE,cAAW,qBAAkB,GAAiB,EAChD,EAAE,gBAAa,gBAAa,sBAAmB,GAAsB,EAErE,IAAqB,EAAY,YAAY;AACjD,MAAI;GAKF,IAAM,IAAS,MAJA,EACb,KAAiB,KAAA,GACjB,KAAa,KAAA,EACd,CAC2B,MAAyC;IACnE,OAAO;IACP,WAAW,EAAE,QAAQ,EAAE,SAAS,UAAU,EAAE;IAC5C,aAAa;IACd,CAAC;AAEF,GAAI,OAAO,EAAO,MAAM,6BAA8B,YACpD,EAAe,EAAO,KAAK,0BAA0B;UAEjD;IAGP;EAAC;EAAe;EAAW;EAAe,CAAC;AAgB9C,QAdA,QAAgB;AACd,KAAoB;EACpB,IAAM,IAAW,OAAO,YAAY,GAAoB,IAAK;AAC7D,eAAa,OAAO,cAAc,EAAS;IAC1C,CAAC,EAAmB,CAAC,EAWtB,kBAAC,UAAD;EACE,eAVsB;AACxB,GAAI,IACF,GAAS,GAET,GAAa;;EAOb,WAAU;EACV,cAAY,GAAG,EAAG,6BAA6B,gBAAgB,GAAG,IAAc,IAAI,KAAK,EAAY,GAAG,EAAG,sBAAsB,SAAS,CAAC,KAAK;YAHlJ,CAKE,kBAAC,GAAD;GAAM,MAAM;GAAI,WAAU;GAAiB,CAAA,EAC1C,IAAc,KACb,kBAAC,QAAD;GAAM,WAAU;aACb,IAAc,KAAK,QAAQ;GACvB,CAAA,CAEF"}
1
+ {"version":3,"file":"NotificationBell.js","names":[],"sources":["../../src/components/NotificationBell.tsx"],"sourcesContent":["import { useCallback, useEffect } from 'react';\nimport { Bell } from 'lucide-react';\nimport { useNotification } from '../providers/NotificationProvider';\nimport { getGlobalNotificationClient } 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 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 onClick={handleClick}\n className=\"relative inline-flex items-center justify-center p-2 rounded-md hover:bg-muted transition-all duration-150 hover:scale-105\"\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 right-1 flex items-center justify-center min-w-[18px] h-[18px] px-1 text-xs font-semibold text-white bg-error rounded-full animate-pulse\">\n {unreadCount > 99 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,EAAG,6BAA6B,gBAAgB,GAAG,IAAc,IAAI,KAAK,EAAY,GAAG,EAAG,sBAAsB,SAAS,CAAC,KAAK;YAHlJ,CAKE,kBAAC,GAAD;GAAM,MAAM;GAAI,WAAU;GAAiB,CAAA,EAC1C,IAAc,KACb,kBAAC,QAAD;GAAM,WAAU;aACb,IAAc,KAAK,QAAQ;GACvB,CAAA,CAEF"}
@@ -8,12 +8,13 @@ interface NotificationCardProps {
8
8
  onClick?: (notification: Notification) => void;
9
9
  showArchivedState?: boolean;
10
10
  compact?: boolean;
11
+ analyticsSource?: 'center' | 'panel' | 'history' | 'admin_history';
11
12
  }
12
13
  /**
13
14
  * Notification card component
14
15
  *
15
16
  * Displays notification information with action buttons
16
17
  */
17
- export declare function NotificationCard({ notification, onMarkAsRead, onArchive, onAction, onClick, showArchivedState, compact, }: NotificationCardProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function NotificationCard({ notification, onMarkAsRead, onArchive, onAction, onClick, showArchivedState, compact, analyticsSource, }: NotificationCardProps): import("react/jsx-runtime").JSX.Element;
18
19
  export {};
19
20
  //# sourceMappingURL=NotificationCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationCard.d.ts","sourceRoot":"","sources":["../../src/components/NotificationCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAW7C,UAAU,qBAAqB;IAC7B,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAC/C,iBAAiB,CAAC,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