@burdenoff/microfe-notification 2026.1124.1 → 2026.1125.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/AdminNotificationRoutes.js +59 -51
  2. package/dist/AdminNotificationRoutes.js.map +1 -1
  3. package/dist/NotificationRoutes.js +76 -68
  4. package/dist/NotificationRoutes.js.map +1 -1
  5. package/dist/UserNotificationRoutes.js +39 -31
  6. package/dist/UserNotificationRoutes.js.map +1 -1
  7. package/dist/components/NotificationListFooter.js +1 -1
  8. package/dist/components/NotificationListFooter.js.map +1 -1
  9. package/dist/components/loadingSystem.d.ts +64 -0
  10. package/dist/components/loadingSystem.js +34 -0
  11. package/dist/components/loadingSystem.js.map +1 -0
  12. package/dist/navigation-v2/AdminPageV2.js +23 -16
  13. package/dist/navigation-v2/AdminPageV2.js.map +1 -1
  14. package/dist/navigation-v2/NotificationArchivedV2.js +100 -93
  15. package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -1
  16. package/dist/navigation-v2/NotificationInboxV2.js +130 -123
  17. package/dist/navigation-v2/NotificationInboxV2.js.map +1 -1
  18. package/dist/navigation-v2/NotificationSettingsV2.js +91 -84
  19. package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -1
  20. package/dist/navigation-v2/NotificationsV2Landing.js +31 -23
  21. package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -1
  22. package/dist/pages/CreateNotificationPage.js +442 -432
  23. package/dist/pages/CreateNotificationPage.js.map +1 -1
  24. package/dist/pages/NotificationCenterPage.js +91 -84
  25. package/dist/pages/NotificationCenterPage.js.map +1 -1
  26. package/dist/pages/NotificationHistoryAdminPage.js +226 -219
  27. package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
  28. package/dist/pages/NotificationHistoryPage.js +69 -62
  29. package/dist/pages/NotificationHistoryPage.js.map +1 -1
  30. package/dist/pages/NotificationLandingPage.js +42 -34
  31. package/dist/pages/NotificationLandingPage.js.map +1 -1
  32. package/dist/pages/NotificationPreferencesPage.js +80 -70
  33. package/dist/pages/NotificationPreferencesPage.js.map +1 -1
  34. package/dist/pages/NotificationTemplatesPage.js +192 -181
  35. package/dist/pages/NotificationTemplatesPage.js.map +1 -1
  36. package/dist/pages/NotificationTopicsPage.js +124 -117
  37. package/dist/pages/NotificationTopicsPage.js.map +1 -1
  38. package/dist/pages/TemplateEditorPage.js +248 -233
  39. package/dist/pages/TemplateEditorPage.js.map +1 -1
  40. package/package.json +2 -2
@@ -4,105 +4,113 @@ import { useNotification as n } from "./providers/NotificationProvider.js";
4
4
  import { useTr as r } from "./shared/hooks/useTr.js";
5
5
  import { NotificationCenterPage as i } from "./pages/NotificationCenterPage.js";
6
6
  import { NotificationLandingPage as a } from "./pages/NotificationLandingPage.js";
7
- import { Suspense as o, lazy as s, useEffect as c } from "react";
8
- import { PermissionGate as l } from "@burdenoff/fe-libs/shared/components";
9
- import { useFeatureFlagDetails as u } from "@burdenoff/fe-libs/shared/feature-flags";
10
- import { useGlobalUi as d } from "@burdenoff/fe-libs/shared/providers/shell";
11
- import { Navigate as f, Route as p, Routes as m, useNavigate as h } from "react-router";
12
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
7
+ import { CompactMarkOr as o, SectionLoaderOr as s } from "./components/loadingSystem.js";
8
+ import { Suspense as c, lazy as l, useEffect as u } from "react";
9
+ import { PermissionGate as d } from "@burdenoff/fe-libs/shared/components";
10
+ import { useFeatureFlagDetails as f } from "@burdenoff/fe-libs/shared/feature-flags";
11
+ import { useGlobalUi as p } from "@burdenoff/fe-libs/shared/providers/shell";
12
+ import { Navigate as m, Route as h, Routes as g, useNavigate as _ } from "react-router";
13
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
13
14
  // src/AdminNotificationRoutes.tsx
14
- var v = s(() => import("./pages/NotificationHistoryAdminPage.js").then((e) => ({ default: e.NotificationHistoryAdminPage }))), y = s(() => import("./pages/NotificationTemplatesPage.js").then((e) => ({ default: e.NotificationTemplatesPage }))), b = s(() => import("./pages/TemplateEditorPage.js").then((e) => ({ default: e.TemplateEditorPage }))), x = s(() => import("./pages/CreateNotificationPage.js").then((e) => ({ default: e.CreateNotificationPage }))), S = s(() => import("./pages/NotificationTopicsPage.js").then((e) => ({ default: e.NotificationTopicsPage })));
15
- function C() {
16
- return /* @__PURE__ */ g("div", {
17
- className: "flex h-64 items-center justify-center",
18
- children: /* @__PURE__ */ g("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
15
+ var b = l(() => import("./pages/NotificationHistoryAdminPage.js").then((e) => ({ default: e.NotificationHistoryAdminPage }))), x = l(() => import("./pages/NotificationTemplatesPage.js").then((e) => ({ default: e.NotificationTemplatesPage }))), S = l(() => import("./pages/TemplateEditorPage.js").then((e) => ({ default: e.TemplateEditorPage }))), C = l(() => import("./pages/CreateNotificationPage.js").then((e) => ({ default: e.CreateNotificationPage }))), w = l(() => import("./pages/NotificationTopicsPage.js").then((e) => ({ default: e.NotificationTopicsPage })));
16
+ function T() {
17
+ return /* @__PURE__ */ v(s, {
18
+ route: !0,
19
+ minHeight: "16rem",
20
+ today: /* @__PURE__ */ v("div", {
21
+ className: "flex h-64 items-center justify-center",
22
+ children: /* @__PURE__ */ v(o, {
23
+ className: "h-8 w-8",
24
+ today: /* @__PURE__ */ v("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
25
+ })
26
+ })
19
27
  });
20
28
  }
21
- function w() {
22
- let { showToast: e } = d(), t = h(), { basePath: i } = n(), a = r();
23
- return c(() => {
29
+ function E() {
30
+ let { showToast: e } = p(), t = _(), { basePath: i } = n(), a = r();
31
+ return u(() => {
24
32
  e(a("notification.error.accessDeniedRedirect", "You do not have permission to access that notification page."), "warning"), t(`${i}/center`, { replace: !0 });
25
33
  }, []), null;
26
34
  }
27
- function T(e) {
35
+ function D(e) {
28
36
  let { children: t, ...n } = e;
29
- return /* @__PURE__ */ g(l, {
37
+ return /* @__PURE__ */ v(d, {
30
38
  permission: n.permission,
31
39
  permissions: n.permissions,
32
40
  requireAll: n.requireAll,
33
- loading: /* @__PURE__ */ g(C, {}),
34
- fallback: /* @__PURE__ */ g(w, {}),
41
+ loading: /* @__PURE__ */ v(T, {}),
42
+ fallback: /* @__PURE__ */ v(E, {}),
35
43
  children: t
36
44
  });
37
45
  }
38
- function E() {
39
- let { basePath: s = "/" } = n(), c = r(), l = `${s.endsWith("/") ? s.slice(0, -1) : s}/center`, d = u("notification.templates"), h = u("notification.create"), w = u("notification.history"), E = d ? !!d.value : !1, D = h ? !!h.value : !1, O = w ? !!w.value : !1;
40
- return /* @__PURE__ */ g(o, {
41
- fallback: /* @__PURE__ */ g(C, {}),
42
- children: /* @__PURE__ */ _(m, { children: [
43
- /* @__PURE__ */ g(p, {
46
+ function O() {
47
+ let { basePath: o = "/" } = n(), s = r(), l = `${o.endsWith("/") ? o.slice(0, -1) : o}/center`, u = f("notification.templates"), d = f("notification.create"), p = f("notification.history"), _ = u ? !!u.value : !1, E = d ? !!d.value : !1, O = p ? !!p.value : !1;
48
+ return /* @__PURE__ */ v(c, {
49
+ fallback: /* @__PURE__ */ v(T, {}),
50
+ children: /* @__PURE__ */ y(g, { children: [
51
+ /* @__PURE__ */ v(h, {
44
52
  index: !0,
45
- element: /* @__PURE__ */ g(a, {})
53
+ element: /* @__PURE__ */ v(a, {})
46
54
  }),
47
- /* @__PURE__ */ g(p, {
55
+ /* @__PURE__ */ v(h, {
48
56
  path: "list",
49
- element: /* @__PURE__ */ g(i, {})
57
+ element: /* @__PURE__ */ v(i, {})
50
58
  }),
51
- /* @__PURE__ */ g(p, {
59
+ /* @__PURE__ */ v(h, {
52
60
  path: "center",
53
- element: /* @__PURE__ */ g(i, {})
61
+ element: /* @__PURE__ */ v(i, {})
54
62
  }),
55
- /* @__PURE__ */ g(p, {
63
+ /* @__PURE__ */ v(h, {
56
64
  path: "history",
57
- element: O ? /* @__PURE__ */ g(v, {}) : /* @__PURE__ */ g(e, {
58
- title: c("notification.featureDisabled.historyTitle", "Notification history is not enabled"),
59
- description: c("notification.featureDisabled.historyAdminDescription", "This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history.")
65
+ element: O ? /* @__PURE__ */ v(b, {}) : /* @__PURE__ */ v(e, {
66
+ title: s("notification.featureDisabled.historyTitle", "Notification history is not enabled"),
67
+ description: s("notification.featureDisabled.historyAdminDescription", "This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history.")
60
68
  })
61
69
  }),
62
- E && /* @__PURE__ */ g(p, {
70
+ _ && /* @__PURE__ */ v(h, {
63
71
  path: "templates",
64
- element: /* @__PURE__ */ g(T, {
72
+ element: /* @__PURE__ */ v(D, {
65
73
  permissions: [
66
74
  t.TEMPLATE_LIST,
67
75
  t.TEMPLATE_CREATE,
68
76
  t.TEMPLATE_UPDATE,
69
77
  t.TEMPLATE_DELETE
70
78
  ],
71
- children: /* @__PURE__ */ g(y, {})
79
+ children: /* @__PURE__ */ v(x, {})
72
80
  })
73
81
  }),
74
- E && /* @__PURE__ */ g(p, {
82
+ _ && /* @__PURE__ */ v(h, {
75
83
  path: "templates/new",
76
- element: /* @__PURE__ */ g(T, {
84
+ element: /* @__PURE__ */ v(D, {
77
85
  permission: t.TEMPLATE_CREATE,
78
- children: /* @__PURE__ */ g(b, {})
86
+ children: /* @__PURE__ */ v(S, {})
79
87
  })
80
88
  }),
81
- E && /* @__PURE__ */ g(p, {
89
+ _ && /* @__PURE__ */ v(h, {
82
90
  path: "templates/:templateId",
83
- element: /* @__PURE__ */ g(T, {
91
+ element: /* @__PURE__ */ v(D, {
84
92
  permission: t.TEMPLATE_UPDATE,
85
- children: /* @__PURE__ */ g(b, {})
93
+ children: /* @__PURE__ */ v(S, {})
86
94
  })
87
95
  }),
88
- D && /* @__PURE__ */ g(p, {
96
+ E && /* @__PURE__ */ v(h, {
89
97
  path: "create",
90
- element: /* @__PURE__ */ g(T, {
98
+ element: /* @__PURE__ */ v(D, {
91
99
  permissions: [t.NOTIFICATION_CREATE, t.NOTIFICATION_SEND],
92
100
  requireAll: !0,
93
- children: /* @__PURE__ */ g(x, {})
101
+ children: /* @__PURE__ */ v(C, {})
94
102
  })
95
103
  }),
96
- D && /* @__PURE__ */ g(p, {
104
+ E && /* @__PURE__ */ v(h, {
97
105
  path: "topics",
98
- element: /* @__PURE__ */ g(T, {
106
+ element: /* @__PURE__ */ v(D, {
99
107
  permission: t.NOTIFICATION_CREATE,
100
- children: /* @__PURE__ */ g(S, {})
108
+ children: /* @__PURE__ */ v(w, {})
101
109
  })
102
110
  }),
103
- /* @__PURE__ */ g(p, {
111
+ /* @__PURE__ */ v(h, {
104
112
  path: "*",
105
- element: /* @__PURE__ */ g(f, {
113
+ element: /* @__PURE__ */ v(m, {
106
114
  to: l,
107
115
  replace: !0
108
116
  })
@@ -110,6 +118,6 @@ function E() {
110
118
  ] })
111
119
  });
112
120
  }
113
- export { E as AdminNotificationRoutes };
121
+ export { O as AdminNotificationRoutes };
114
122
 
115
123
  //# sourceMappingURL=AdminNotificationRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdminNotificationRoutes.js","names":["NotificationHistoryAdminPage","lazy","m","NotificationTemplatesPage","TemplateEditorPage","CreateNotificationPage","NotificationTopicsPage","PageLoader","AccessDeniedRedirect","useGlobalUi","navigate","useNavigate","useNotification","tr","useTr","useEffect","showToast","basePath","AdminRouteGate","gateProps","props","PermissionGate","AdminNotificationRoutes","centerPath","templatesDetails","useFeatureFlagDetails","createDetails","historyDetails","templatesEnabled","createEnabled","historyEnabled","Suspense","Routes","Route","NotificationLandingPage","NotificationCenterPage","FeatureDisabledPage","NOTIFICATION_PERMISSIONS","Navigate"],"sources":["../src/AdminNotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useEffect, type ReactNode } from 'react';\nimport { Navigate, Route, Routes, useNavigate } from 'react-router';\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';\nimport { useTr } from './shared/hooks/useTr';\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 const tr = useTr();\n useEffect(() => {\n showToast(\n tr(\n 'notification.error.accessDeniedRedirect',\n 'You do not have permission to access that notification page.'\n ),\n 'warning'\n );\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 const { basePath = '/' } = useNotification();\n const tr = useTr();\n const centerPath = `${basePath.endsWith('/') ? basePath.slice(0, -1) : basePath}/center`;\n\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 {/* Canonical list alias used by product-shell nav homePath */}\n <Route path=\"list\" element={<NotificationCenterPage />} />\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={tr(\n 'notification.featureDisabled.historyTitle',\n 'Notification history is not enabled'\n )}\n description={tr(\n 'notification.featureDisabled.historyAdminDescription',\n 'This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history.'\n )}\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 - absolute redirect so an unmatched path like /list\n cannot recursively append /center (e.g. /list/center/center/...) */}\n <Route path=\"*\" element={<Navigate to={centerPath} replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAeA,IAAMA,IAA+BC,QACnC,OAAO,0CAAuC,CAAC,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;GAEnB,CAAA;GAIFyB,KACC,kBAACI,GAAD;IACE,MAAK;IACL,SACE,kBAACf,GAAD;KACE,aAAa,CACXmB,EAAyB,qBACzBA,EAAyB,iBAC3B;KACA,YAAA;KAEA,UAAA,kBAAChC,GAAD,CAAyB,CAAA;IACX,CAAA;GAEnB,CAAA;GAGFwB,KACC,kBAACI,GAAD;IACE,MAAK;IACL,SACE,kBAACf,GAAD;KAAgB,YAAYmB,EAAyB;KACnD,UAAA,kBAAC/B,GAAD,CAAyB,CAAA;IACX,CAAA;GAEnB,CAAA;GAKH,kBAAC2B,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACK,GAAD;KAAU,IAAIf;KAAY,SAAA;IAAS,CAAA;GAAI,CAAA;EAC1D,EAAA,CAAA;CACA,CAAA;AAEd"}
1
+ {"version":3,"file":"AdminNotificationRoutes.js","names":["NotificationHistoryAdminPage","lazy","m","NotificationTemplatesPage","TemplateEditorPage","CreateNotificationPage","NotificationTopicsPage","PageLoader","SectionLoaderOr","CompactMarkOr","AccessDeniedRedirect","useGlobalUi","navigate","useNavigate","useNotification","tr","useTr","useEffect","showToast","basePath","AdminRouteGate","gateProps","props","PermissionGate","AdminNotificationRoutes","centerPath","templatesDetails","useFeatureFlagDetails","createDetails","historyDetails","templatesEnabled","createEnabled","historyEnabled","Suspense","Routes","Route","NotificationLandingPage","NotificationCenterPage","FeatureDisabledPage","NOTIFICATION_PERMISSIONS","Navigate"],"sources":["../src/AdminNotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, useEffect, type ReactNode } from 'react';\nimport { Navigate, Route, Routes, useNavigate } from 'react-router';\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';\nimport { useTr } from './shared/hooks/useTr';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\nimport { NotificationLandingPage } from './pages/NotificationLandingPage';\nimport { CompactMarkOr, SectionLoaderOr } from './components/loadingSystem';\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 <SectionLoaderOr\n route\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// 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 const tr = useTr();\n useEffect(() => {\n showToast(\n tr(\n 'notification.error.accessDeniedRedirect',\n 'You do not have permission to access that notification page.'\n ),\n 'warning'\n );\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 const { basePath = '/' } = useNotification();\n const tr = useTr();\n const centerPath = `${basePath.endsWith('/') ? basePath.slice(0, -1) : basePath}/center`;\n\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 {/* Canonical list alias used by product-shell nav homePath */}\n <Route path=\"list\" element={<NotificationCenterPage />} />\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={tr(\n 'notification.featureDisabled.historyTitle',\n 'Notification history is not enabled'\n )}\n description={tr(\n 'notification.featureDisabled.historyAdminDescription',\n 'This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history.'\n )}\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 - absolute redirect so an unmatched path like /list\n cannot recursively append /center (e.g. /list/center/center/...) */}\n <Route path=\"*\" element={<Navigate to={centerPath} replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,IAAMA,IAA+BC,QACnC,OAAO,0CAAuC,CAAC,MAAM,OAAO,EAC1D,S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f,GAAD;KAAgB,YAAYmB,EAAyB;KACnD,UAAA,kBAACnC,GAAD,CAAqB,CAAA;IACP,CAAA;GAEnB,CAAA;GAIF2B,KACC,kBAACI,GAAD;IACE,MAAK;IACL,SACE,kBAACf,GAAD;KACE,aAAa,CACXmB,EAAyB,qBACzBA,EAAyB,iBAC3B;KACA,YAAA;KAEA,UAAA,kBAAClC,GAAD,CAAyB,CAAA;IACX,CAAA;GAEnB,CAAA;GAGF0B,KACC,kBAACI,GAAD;IACE,MAAK;IACL,SACE,kBAACf,GAAD;KAAgB,YAAYmB,EAAyB;KACnD,UAAA,kBAACjC,GAAD,CAAyB,CAAA;IACX,CAAA;GAEnB,CAAA;GAKH,kBAAC6B,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACK,GAAD;KAAU,IAAIf;KAAY,SAAA;IAAS,CAAA;GAAI,CAAA;EAC1D,EAAA,CAAA;CACA,CAAA;AAEd"}
@@ -3,65 +3,73 @@ import { NotificationCenterPage as t } from "./pages/NotificationCenterPage.js";
3
3
  import { NotificationLandingPage as n } from "./pages/NotificationLandingPage.js";
4
4
  import { AdminPageV2 as r } from "./navigation-v2/AdminPageV2.js";
5
5
  import { DeliveryLogV2 as i, NotificationsV2Landing as a } from "./navigation-v2/NotificationsV2Landing.js";
6
- import { Suspense as o, lazy as s } from "react";
7
- import { Navigate as c, Route as l, Routes as u } from "react-router";
8
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
6
+ import { CompactMarkOr as o, SectionLoaderOr as s } from "./components/loadingSystem.js";
7
+ import { Suspense as c, lazy as l } from "react";
8
+ import { Navigate as u, Route as d, Routes as f } from "react-router";
9
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
9
10
  // src/NotificationRoutes.tsx
10
- var p = s(() => import("./pages/NotificationHistoryPage.js").then((e) => ({ default: e.NotificationHistoryPage }))), m = s(() => import("./pages/NotificationTemplatesPage.js").then((e) => ({ default: e.NotificationTemplatesPage }))), h = s(() => import("./pages/TemplateEditorPage.js").then((e) => ({ default: e.TemplateEditorPage }))), g = s(() => import("./pages/CreateNotificationPage.js").then((e) => ({ default: e.CreateNotificationPage }))), _ = s(() => import("./pages/NotificationTopicsPage.js").then((e) => ({ default: e.NotificationTopicsPage }))), v = s(() => import("./pages/NotificationPreferencesPage.js").then((e) => ({ default: e.NotificationPreferencesPage })));
11
- function y() {
12
- return /* @__PURE__ */ d("div", {
13
- className: "flex h-64 items-center justify-center",
14
- children: /* @__PURE__ */ d("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
11
+ var h = l(() => import("./pages/NotificationHistoryPage.js").then((e) => ({ default: e.NotificationHistoryPage }))), g = l(() => import("./pages/NotificationTemplatesPage.js").then((e) => ({ default: e.NotificationTemplatesPage }))), _ = l(() => import("./pages/TemplateEditorPage.js").then((e) => ({ default: e.TemplateEditorPage }))), v = l(() => import("./pages/CreateNotificationPage.js").then((e) => ({ default: e.CreateNotificationPage }))), y = l(() => import("./pages/NotificationTopicsPage.js").then((e) => ({ default: e.NotificationTopicsPage }))), b = l(() => import("./pages/NotificationPreferencesPage.js").then((e) => ({ default: e.NotificationPreferencesPage })));
12
+ function x() {
13
+ return /* @__PURE__ */ p(s, {
14
+ route: !0,
15
+ minHeight: "16rem",
16
+ today: /* @__PURE__ */ p("div", {
17
+ className: "flex h-64 items-center justify-center",
18
+ children: /* @__PURE__ */ p(o, {
19
+ className: "h-8 w-8",
20
+ today: /* @__PURE__ */ p("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
21
+ })
22
+ })
15
23
  });
16
24
  }
17
- function b() {
25
+ function S() {
18
26
  let { basePath: r = "/", navigationV2: i } = e(), a = `${r.endsWith("/") ? r.slice(0, -1) : r}/center`;
19
- return i ? /* @__PURE__ */ d(x, { centerPath: a }) : /* @__PURE__ */ d(o, {
20
- fallback: /* @__PURE__ */ d(y, {}),
21
- children: /* @__PURE__ */ f(u, { children: [
22
- /* @__PURE__ */ d(l, {
27
+ return i ? /* @__PURE__ */ p(C, { centerPath: a }) : /* @__PURE__ */ p(c, {
28
+ fallback: /* @__PURE__ */ p(x, {}),
29
+ children: /* @__PURE__ */ m(f, { children: [
30
+ /* @__PURE__ */ p(d, {
23
31
  index: !0,
24
- element: /* @__PURE__ */ d(n, {})
32
+ element: /* @__PURE__ */ p(n, {})
25
33
  }),
26
- /* @__PURE__ */ d(l, {
34
+ /* @__PURE__ */ p(d, {
27
35
  path: "list",
28
- element: /* @__PURE__ */ d(t, {})
36
+ element: /* @__PURE__ */ p(t, {})
29
37
  }),
30
- /* @__PURE__ */ d(l, {
38
+ /* @__PURE__ */ p(d, {
31
39
  path: "center",
32
- element: /* @__PURE__ */ d(t, {})
40
+ element: /* @__PURE__ */ p(t, {})
33
41
  }),
34
- /* @__PURE__ */ d(l, {
42
+ /* @__PURE__ */ p(d, {
35
43
  path: "history",
36
- element: /* @__PURE__ */ d(p, {})
44
+ element: /* @__PURE__ */ p(h, {})
37
45
  }),
38
- /* @__PURE__ */ d(l, {
46
+ /* @__PURE__ */ p(d, {
39
47
  path: "templates",
40
- element: /* @__PURE__ */ d(m, {})
48
+ element: /* @__PURE__ */ p(g, {})
41
49
  }),
42
- /* @__PURE__ */ d(l, {
50
+ /* @__PURE__ */ p(d, {
43
51
  path: "templates/new",
44
- element: /* @__PURE__ */ d(h, {})
52
+ element: /* @__PURE__ */ p(_, {})
45
53
  }),
46
- /* @__PURE__ */ d(l, {
54
+ /* @__PURE__ */ p(d, {
47
55
  path: "templates/:templateId",
48
- element: /* @__PURE__ */ d(h, {})
56
+ element: /* @__PURE__ */ p(_, {})
49
57
  }),
50
- /* @__PURE__ */ d(l, {
58
+ /* @__PURE__ */ p(d, {
51
59
  path: "create",
52
- element: /* @__PURE__ */ d(g, {})
60
+ element: /* @__PURE__ */ p(v, {})
53
61
  }),
54
- /* @__PURE__ */ d(l, {
62
+ /* @__PURE__ */ p(d, {
55
63
  path: "topics",
56
- element: /* @__PURE__ */ d(_, {})
64
+ element: /* @__PURE__ */ p(y, {})
57
65
  }),
58
- /* @__PURE__ */ d(l, {
66
+ /* @__PURE__ */ p(d, {
59
67
  path: "preferences",
60
- element: /* @__PURE__ */ d(v, {})
68
+ element: /* @__PURE__ */ p(b, {})
61
69
  }),
62
- /* @__PURE__ */ d(l, {
70
+ /* @__PURE__ */ p(d, {
63
71
  path: "*",
64
- element: /* @__PURE__ */ d(c, {
72
+ element: /* @__PURE__ */ p(u, {
65
73
  to: a,
66
74
  replace: !0
67
75
  })
@@ -69,73 +77,73 @@ function b() {
69
77
  ] })
70
78
  });
71
79
  }
72
- function x({ centerPath: e }) {
73
- return /* @__PURE__ */ d(o, {
74
- fallback: /* @__PURE__ */ d(y, {}),
75
- children: /* @__PURE__ */ f(u, { children: [
76
- /* @__PURE__ */ d(l, {
80
+ function C({ centerPath: e }) {
81
+ return /* @__PURE__ */ p(c, {
82
+ fallback: /* @__PURE__ */ p(x, {}),
83
+ children: /* @__PURE__ */ m(f, { children: [
84
+ /* @__PURE__ */ p(d, {
77
85
  index: !0,
78
- element: /* @__PURE__ */ d(a, {})
86
+ element: /* @__PURE__ */ p(a, {})
79
87
  }),
80
- /* @__PURE__ */ d(l, {
88
+ /* @__PURE__ */ p(d, {
81
89
  path: "list",
82
- element: /* @__PURE__ */ d(t, {})
90
+ element: /* @__PURE__ */ p(t, {})
83
91
  }),
84
- /* @__PURE__ */ d(l, {
92
+ /* @__PURE__ */ p(d, {
85
93
  path: "center",
86
- element: /* @__PURE__ */ d(t, {})
94
+ element: /* @__PURE__ */ p(t, {})
87
95
  }),
88
- /* @__PURE__ */ d(l, {
96
+ /* @__PURE__ */ p(d, {
89
97
  path: "history",
90
- element: /* @__PURE__ */ d(p, {})
98
+ element: /* @__PURE__ */ p(h, {})
91
99
  }),
92
- /* @__PURE__ */ d(l, {
100
+ /* @__PURE__ */ p(d, {
93
101
  path: "preferences",
94
- element: /* @__PURE__ */ d(v, {})
102
+ element: /* @__PURE__ */ p(b, {})
95
103
  }),
96
- /* @__PURE__ */ d(l, {
104
+ /* @__PURE__ */ p(d, {
97
105
  path: "templates",
98
- element: /* @__PURE__ */ d(r, {
106
+ element: /* @__PURE__ */ p(r, {
99
107
  tool: "templates",
100
- children: /* @__PURE__ */ d(m, {})
108
+ children: /* @__PURE__ */ p(g, {})
101
109
  })
102
110
  }),
103
- /* @__PURE__ */ d(l, {
111
+ /* @__PURE__ */ p(d, {
104
112
  path: "templates/new",
105
- element: /* @__PURE__ */ d(r, {
113
+ element: /* @__PURE__ */ p(r, {
106
114
  tool: "templates",
107
- children: /* @__PURE__ */ d(h, {})
115
+ children: /* @__PURE__ */ p(_, {})
108
116
  })
109
117
  }),
110
- /* @__PURE__ */ d(l, {
118
+ /* @__PURE__ */ p(d, {
111
119
  path: "templates/:templateId",
112
- element: /* @__PURE__ */ d(r, {
120
+ element: /* @__PURE__ */ p(r, {
113
121
  tool: "templates",
114
- children: /* @__PURE__ */ d(h, {})
122
+ children: /* @__PURE__ */ p(_, {})
115
123
  })
116
124
  }),
117
- /* @__PURE__ */ d(l, {
125
+ /* @__PURE__ */ p(d, {
118
126
  path: "create",
119
- element: /* @__PURE__ */ d(r, {
127
+ element: /* @__PURE__ */ p(r, {
120
128
  tool: "send",
121
129
  back: !1,
122
- children: /* @__PURE__ */ d(g, {})
130
+ children: /* @__PURE__ */ p(v, {})
123
131
  })
124
132
  }),
125
- /* @__PURE__ */ d(l, {
133
+ /* @__PURE__ */ p(d, {
126
134
  path: "topics",
127
- element: /* @__PURE__ */ d(r, {
135
+ element: /* @__PURE__ */ p(r, {
128
136
  tool: "topics",
129
- children: /* @__PURE__ */ d(_, {})
137
+ children: /* @__PURE__ */ p(y, {})
130
138
  })
131
139
  }),
132
- /* @__PURE__ */ d(l, {
140
+ /* @__PURE__ */ p(d, {
133
141
  path: "delivery-log",
134
- element: /* @__PURE__ */ d(i, {})
142
+ element: /* @__PURE__ */ p(i, {})
135
143
  }),
136
- /* @__PURE__ */ d(l, {
144
+ /* @__PURE__ */ p(d, {
137
145
  path: "*",
138
- element: /* @__PURE__ */ d(c, {
146
+ element: /* @__PURE__ */ p(u, {
139
147
  to: e,
140
148
  replace: !0
141
149
  })
@@ -143,6 +151,6 @@ function x({ centerPath: e }) {
143
151
  ] })
144
152
  });
145
153
  }
146
- export { b as NotificationRoutes };
154
+ export { S as NotificationRoutes };
147
155
 
148
156
  //# sourceMappingURL=NotificationRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationRoutes.js","names":["NotificationHistoryPage","lazy","m","NotificationTemplatesPage","TemplateEditorPage","CreateNotificationPage","NotificationTopicsPage","NotificationPreferencesPage","PageLoader","NotificationRoutes","useNotification","centerPath","basePath","navigationV2","NavigationV2Routes","Suspense","Routes","Route","NotificationLandingPage","NotificationCenterPage","Navigate","NotificationsV2Landing","AdminPageV2","DeliveryLogV2"],"sources":["../src/NotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Navigate, Route, Routes } from 'react-router';\nimport { useNotification } from './providers/NotificationProvider';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\nimport { NotificationLandingPage } from './pages/NotificationLandingPage';\nimport { AdminPageV2 } from './navigation-v2/AdminPageV2';\nimport { DeliveryLogV2, NotificationsV2Landing } from './navigation-v2/NotificationsV2Landing';\n\n// Lazy load - Secondary pages\nconst NotificationHistoryPage = lazy(() =>\n import('./pages/NotificationHistoryPage').then((m) => ({\n default: m.NotificationHistoryPage,\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);\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 Notification microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes:\n * - / → Notification landing page\n * - /list → Notification center (canonical list alias used by shell nav homePath)\n * - /center → Notification center (in-app notifications)\n * - /history → Notification history and archive\n * - /templates → Notification templates list (admin)\n * - /templates/new → Create new template (admin)\n * - /templates/:templateId → Edit template (admin)\n * - /create → Create and send notification (admin)\n * - /topics → Manage topics (admin)\n * - /preferences → User topic preferences\n * - unmatched → Absolute redirect to /{basePath}/center (avoids relative redirect loops)\n */\nexport function NotificationRoutes() {\n const { basePath = '/', navigationV2 } = useNotification();\n const centerPath = `${basePath.endsWith('/') ? basePath.slice(0, -1) : basePath}/center`;\n\n if (navigationV2) return <NavigationV2Routes centerPath={centerPath} />;\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route */}\n <Route index element={<NotificationLandingPage />} />\n\n {/* Canonical list alias used by product-shell nav homePath */}\n <Route path=\"list\" element={<NotificationCenterPage />} />\n\n {/* User-facing routes (all users) */}\n <Route path=\"center\" element={<NotificationCenterPage />} />\n <Route path=\"history\" element={<NotificationHistoryPage />} />\n\n {/* Admin routes - Templates */}\n <Route path=\"templates\" element={<NotificationTemplatesPage />} />\n <Route path=\"templates/new\" element={<TemplateEditorPage />} />\n <Route path=\"templates/:templateId\" element={<TemplateEditorPage />} />\n\n {/* Admin routes - Create/Send Notification */}\n <Route path=\"create\" element={<CreateNotificationPage />} />\n <Route path=\"topics\" element={<NotificationTopicsPage />} />\n <Route path=\"preferences\" element={<NotificationPreferencesPage />} />\n\n {/* Catch-all route - absolute redirect so an unmatched path like /list\n cannot recursively append /center (e.g. /list/center/center/...) */}\n <Route path=\"*\" element={<Navigate to={centerPath} replace />} />\n </Routes>\n </Suspense>\n );\n}\n\n/**\n * FluidGrids' Navigation v2 routes (BOFF-11872). Every URL of the classic\n * routes keeps working: `/` opens straight on the inbox (old `?tab=` values\n * still open their page), and the admin pages get a route-level permission\n * gate and a way back to the inbox.\n */\nfunction NavigationV2Routes({ centerPath }: { centerPath: string }) {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<NotificationsV2Landing />} />\n <Route path=\"list\" element={<NotificationCenterPage />} />\n <Route path=\"center\" element={<NotificationCenterPage />} />\n <Route path=\"history\" element={<NotificationHistoryPage />} />\n <Route path=\"preferences\" element={<NotificationPreferencesPage />} />\n <Route\n path=\"templates\"\n element={\n <AdminPageV2 tool=\"templates\">\n <NotificationTemplatesPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"templates/new\"\n element={\n <AdminPageV2 tool=\"templates\">\n <TemplateEditorPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"templates/:templateId\"\n element={\n <AdminPageV2 tool=\"templates\">\n <TemplateEditorPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"create\"\n element={\n <AdminPageV2 tool=\"send\" back={false}>\n <CreateNotificationPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"topics\"\n element={\n <AdminPageV2 tool=\"topics\">\n <NotificationTopicsPage />\n </AdminPageV2>\n }\n />\n <Route path=\"delivery-log\" element={<DeliveryLogV2 />} />\n <Route path=\"*\" element={<Navigate to={centerPath} replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;AAWA,IAAMA,IAA0BC,QAC9B,OAAO,qCAAkC,CAAC,MAAM,OAAO,EACrD,SAASC,EAAE,wBACb,EAAE,CACJ,GACMC,IAA4BF,QAChC,OAAO,uCAAoC,CAAC,MAAM,OAAO,EACvD,SAASC,EAAE,0BACb,EAAE,C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ACc,GAAD;IACE,MAAK;IACL,SACE,kBAACK,GAAD;KAAa,MAAK;KAChB,UAAA,kBAAClB,GAAD,CAAqB,CAAA;IACV,CAAA;GAEhB,CAAA;GACD,kBAACa,GAAD;IACE,MAAK;IACL,SACE,kBAACK,GAAD;KAAa,MAAK;KAChB,UAAA,kBAAClB,GAAD,CAAqB,CAAA;IACV,CAAA;GAEhB,CAAA;GACD,kBAACa,GAAD;IACE,MAAK;IACL,SACE,kBAACK,GAAD;KAAa,MAAK;KAAO,MAAM;KAC7B,UAAA,kBAACjB,GAAD,CAAyB,CAAA;IACd,CAAA;GAEhB,CAAA;GACD,kBAACY,GAAD;IACE,MAAK;IACL,SACE,kBAACK,GAAD;KAAa,MAAK;KAChB,UAAA,kBAAChB,GAAD,CAAyB,CAAA;IACd,CAAA;GAEhB,CAAA;GACD,kBAACW,GAAD;IAAO,MAAK;IAAe,SAAS,kBAACM,GAAD,CAAgB,CAAA;GAAI,CAAA;GACxD,kBAACN,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACG,GAAD;KAAU,IAAIT;KAAY,SAAA;IAAS,CAAA;GAAI,CAAA;EAC1D,EAAA,CAAA;CACA,CAAA;AAEd"}
1
+ {"version":3,"file":"NotificationRoutes.js","names":["NotificationHistoryPage","lazy","m","NotificationTemplatesPage","TemplateEditorPage","CreateNotificationPage","NotificationTopicsPage","NotificationPreferencesPage","PageLoader","SectionLoaderOr","CompactMarkOr","NotificationRoutes","useNotification","centerPath","basePath","navigationV2","NavigationV2Routes","Suspense","Routes","Route","NotificationLandingPage","NotificationCenterPage","Navigate","NotificationsV2Landing","AdminPageV2","DeliveryLogV2"],"sources":["../src/NotificationRoutes.tsx"],"sourcesContent":["import { lazy, Suspense } from 'react';\nimport { Navigate, Route, Routes } from 'react-router';\nimport { useNotification } from './providers/NotificationProvider';\n\n// Eager load - Primary landing page\nimport { NotificationCenterPage } from './pages/NotificationCenterPage';\nimport { NotificationLandingPage } from './pages/NotificationLandingPage';\nimport { AdminPageV2 } from './navigation-v2/AdminPageV2';\nimport { DeliveryLogV2, NotificationsV2Landing } from './navigation-v2/NotificationsV2Landing';\nimport { CompactMarkOr, SectionLoaderOr } from './components/loadingSystem';\n\n// Lazy load - Secondary pages\nconst NotificationHistoryPage = lazy(() =>\n import('./pages/NotificationHistoryPage').then((m) => ({\n default: m.NotificationHistoryPage,\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);\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 <SectionLoaderOr\n route\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/**\n * Internal router for the Notification microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes:\n * - / → Notification landing page\n * - /list → Notification center (canonical list alias used by shell nav homePath)\n * - /center → Notification center (in-app notifications)\n * - /history → Notification history and archive\n * - /templates → Notification templates list (admin)\n * - /templates/new → Create new template (admin)\n * - /templates/:templateId → Edit template (admin)\n * - /create → Create and send notification (admin)\n * - /topics → Manage topics (admin)\n * - /preferences → User topic preferences\n * - unmatched → Absolute redirect to /{basePath}/center (avoids relative redirect loops)\n */\nexport function NotificationRoutes() {\n const { basePath = '/', navigationV2 } = useNotification();\n const centerPath = `${basePath.endsWith('/') ? basePath.slice(0, -1) : basePath}/center`;\n\n if (navigationV2) return <NavigationV2Routes centerPath={centerPath} />;\n\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route */}\n <Route index element={<NotificationLandingPage />} />\n\n {/* Canonical list alias used by product-shell nav homePath */}\n <Route path=\"list\" element={<NotificationCenterPage />} />\n\n {/* User-facing routes (all users) */}\n <Route path=\"center\" element={<NotificationCenterPage />} />\n <Route path=\"history\" element={<NotificationHistoryPage />} />\n\n {/* Admin routes - Templates */}\n <Route path=\"templates\" element={<NotificationTemplatesPage />} />\n <Route path=\"templates/new\" element={<TemplateEditorPage />} />\n <Route path=\"templates/:templateId\" element={<TemplateEditorPage />} />\n\n {/* Admin routes - Create/Send Notification */}\n <Route path=\"create\" element={<CreateNotificationPage />} />\n <Route path=\"topics\" element={<NotificationTopicsPage />} />\n <Route path=\"preferences\" element={<NotificationPreferencesPage />} />\n\n {/* Catch-all route - absolute redirect so an unmatched path like /list\n cannot recursively append /center (e.g. /list/center/center/...) */}\n <Route path=\"*\" element={<Navigate to={centerPath} replace />} />\n </Routes>\n </Suspense>\n );\n}\n\n/**\n * FluidGrids' Navigation v2 routes (BOFF-11872). Every URL of the classic\n * routes keeps working: `/` opens straight on the inbox (old `?tab=` values\n * still open their page), and the admin pages get a route-level permission\n * gate and a way back to the inbox.\n */\nfunction NavigationV2Routes({ centerPath }: { centerPath: string }) {\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n <Route index element={<NotificationsV2Landing />} />\n <Route path=\"list\" element={<NotificationCenterPage />} />\n <Route path=\"center\" element={<NotificationCenterPage />} />\n <Route path=\"history\" element={<NotificationHistoryPage />} />\n <Route path=\"preferences\" element={<NotificationPreferencesPage />} />\n <Route\n path=\"templates\"\n element={\n <AdminPageV2 tool=\"templates\">\n <NotificationTemplatesPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"templates/new\"\n element={\n <AdminPageV2 tool=\"templates\">\n <TemplateEditorPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"templates/:templateId\"\n element={\n <AdminPageV2 tool=\"templates\">\n <TemplateEditorPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"create\"\n element={\n <AdminPageV2 tool=\"send\" back={false}>\n <CreateNotificationPage />\n </AdminPageV2>\n }\n />\n <Route\n path=\"topics\"\n element={\n <AdminPageV2 tool=\"topics\">\n <NotificationTopicsPage />\n </AdminPageV2>\n }\n />\n <Route path=\"delivery-log\" element={<DeliveryLogV2 />} />\n <Route path=\"*\" element={<Navigate to={centerPath} replace />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAYA,IAAMA,IAA0BC,QAC9B,OAAO,qCAAkC,CAAC,MAAM,OAAO,EACrD,SAASC,EAAE,wBACb,EAAE,CACJ,GACMC,IAA4BF,QAChC,OAAO,uCAAoC,CAAC,MAAM,OAAO,EACvD,SAASC,EAAE,0BACb,EAAE,CACJ,GACME,IAAqBH,QACzB,OAAO,gCAA6B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,mBAAmB,EAAE,CACtF,GACMG,IAAyBJ,QAC7B,OAAO,oCAAiC,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,uBAAuB,EAAE,CAC9F,GACMI,IAAyBL,QAC7B,OAAO,oCAAiC,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,uBAAuB,EAAE,CAC9F,GACMK,IAA8BN,QAClC,OAAO,yCAAsC,CAAC,MAAM,OAAO,EACzD,SAASC,EAAE,4BACb,EAAE,CACJ;AAGA,SAASM,IAAa;CACpB,OACE,kBAACC,GAAD;EACE,OAAA;EACA,WAAU;EACV,OACE,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAACC,GAAD;IACE,WAAU;IACV,OACE,kBAAC,OAAD,EAAK,WAAU,iFAAkF,CAAA;GAEpG,CAAA;EACE,CAAA;CAER,CAAA;AAEL;AAmBA,SAA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EhB,CAAA;GACD,kBAACa,GAAD;IAAO,MAAK;IAAe,SAAS,kBAACM,GAAD,CAAgB,CAAA;GAAI,CAAA;GACxD,kBAACN,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACG,GAAD;KAAU,IAAIT;KAAY,SAAA;IAAS,CAAA;GAAI,CAAA;EAC1D,EAAA,CAAA;CACA,CAAA;AAEd"}
@@ -2,59 +2,67 @@ import { FeatureDisabledPage as e } from "./components/FeatureDisabledPage.js";
2
2
  import { useNotification as t } from "./providers/NotificationProvider.js";
3
3
  import { useTr as n } from "./shared/hooks/useTr.js";
4
4
  import { NotificationCenterPage as r } from "./pages/NotificationCenterPage.js";
5
- import { Suspense as i, lazy as a } from "react";
6
- import { useFeatureFlagDetails as o } from "@burdenoff/fe-libs/shared/feature-flags";
7
- import { Navigate as s, Route as c, Routes as l } from "react-router";
8
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { CompactMarkOr as i, SectionLoaderOr as a } from "./components/loadingSystem.js";
6
+ import { Suspense as o, lazy as s } from "react";
7
+ import { useFeatureFlagDetails as c } from "@burdenoff/fe-libs/shared/feature-flags";
8
+ import { Navigate as l, Route as u, Routes as d } from "react-router";
9
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
10
  // src/UserNotificationRoutes.tsx
10
- var f = a(() => import("./pages/NotificationHistoryPage.js").then((e) => ({ default: e.NotificationHistoryPage }))), p = a(() => import("./pages/NotificationPreferencesPage.js").then((e) => ({ default: e.NotificationPreferencesPage })));
11
- function m() {
12
- return /* @__PURE__ */ u("div", {
13
- className: "flex h-64 items-center justify-center",
14
- children: /* @__PURE__ */ u("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
11
+ var m = s(() => import("./pages/NotificationHistoryPage.js").then((e) => ({ default: e.NotificationHistoryPage }))), h = s(() => import("./pages/NotificationPreferencesPage.js").then((e) => ({ default: e.NotificationPreferencesPage })));
12
+ function g() {
13
+ return /* @__PURE__ */ f(a, {
14
+ route: !0,
15
+ minHeight: "16rem",
16
+ today: /* @__PURE__ */ f("div", {
17
+ className: "flex h-64 items-center justify-center",
18
+ children: /* @__PURE__ */ f(i, {
19
+ className: "h-8 w-8",
20
+ today: /* @__PURE__ */ f("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
21
+ })
22
+ })
15
23
  });
16
24
  }
17
- function h() {
18
- let { basePath: a = "/" } = t(), h = n(), g = `${a.endsWith("/") ? a.slice(0, -1) : a}/center`, _ = o("notification.history"), v = _ ? !!_.value : !1;
19
- return /* @__PURE__ */ u(i, {
20
- fallback: /* @__PURE__ */ u(m, {}),
21
- children: /* @__PURE__ */ d(l, { children: [
22
- /* @__PURE__ */ u(c, {
25
+ function _() {
26
+ let { basePath: i = "/" } = t(), a = n(), s = `${i.endsWith("/") ? i.slice(0, -1) : i}/center`, _ = c("notification.history"), v = _ ? !!_.value : !1;
27
+ return /* @__PURE__ */ f(o, {
28
+ fallback: /* @__PURE__ */ f(g, {}),
29
+ children: /* @__PURE__ */ p(d, { children: [
30
+ /* @__PURE__ */ f(u, {
23
31
  index: !0,
24
- element: /* @__PURE__ */ u(s, {
25
- to: g,
32
+ element: /* @__PURE__ */ f(l, {
33
+ to: s,
26
34
  replace: !0
27
35
  })
28
36
  }),
29
- /* @__PURE__ */ u(c, {
37
+ /* @__PURE__ */ f(u, {
30
38
  path: "list",
31
- element: /* @__PURE__ */ u(r, {})
39
+ element: /* @__PURE__ */ f(r, {})
32
40
  }),
33
- /* @__PURE__ */ u(c, {
41
+ /* @__PURE__ */ f(u, {
34
42
  path: "center",
35
- element: /* @__PURE__ */ u(r, {})
43
+ element: /* @__PURE__ */ f(r, {})
36
44
  }),
37
- /* @__PURE__ */ u(c, {
45
+ /* @__PURE__ */ f(u, {
38
46
  path: "history",
39
- element: v ? /* @__PURE__ */ u(f, {}) : /* @__PURE__ */ u(e, {
40
- title: h("notification.featureDisabled.historyTitle", "Notification history is not enabled"),
41
- description: h("notification.featureDisabled.historyUserDescription", "This page is controlled by the notification.history feature flag. Ask an administrator to enable it for this tenant if history should be available.")
47
+ element: v ? /* @__PURE__ */ f(m, {}) : /* @__PURE__ */ f(e, {
48
+ title: a("notification.featureDisabled.historyTitle", "Notification history is not enabled"),
49
+ description: a("notification.featureDisabled.historyUserDescription", "This page is controlled by the notification.history feature flag. Ask an administrator to enable it for this tenant if history should be available.")
42
50
  })
43
51
  }),
44
- /* @__PURE__ */ u(c, {
52
+ /* @__PURE__ */ f(u, {
45
53
  path: "preferences",
46
- element: /* @__PURE__ */ u(p, {})
54
+ element: /* @__PURE__ */ f(h, {})
47
55
  }),
48
- /* @__PURE__ */ u(c, {
56
+ /* @__PURE__ */ f(u, {
49
57
  path: "*",
50
- element: /* @__PURE__ */ u(s, {
51
- to: g,
58
+ element: /* @__PURE__ */ f(l, {
59
+ to: s,
52
60
  replace: !0
53
61
  })
54
62
  })
55
63
  ] })
56
64
  });
57
65
  }
58
- export { h as UserNotificationRoutes };
66
+ export { _ as UserNotificationRoutes };
59
67
 
60
68
  //# sourceMappingURL=UserNotificationRoutes.js.map