@burdenoff/microfe-notification 2026.1029.2 → 2026.1113.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/AdminNotificationRoot.d.ts +33 -0
  2. package/dist/AdminNotificationRoot.js +9 -6
  3. package/dist/AdminNotificationRoot.js.map +1 -1
  4. package/dist/AdminNotificationRoutes.d.ts +1 -0
  5. package/dist/AdminNotificationRoutes.js +22 -23
  6. package/dist/AdminNotificationRoutes.js.map +1 -1
  7. package/dist/NotificationRoot.d.ts +29 -0
  8. package/dist/NotificationRoot.js +9 -6
  9. package/dist/NotificationRoot.js.map +1 -1
  10. package/dist/NotificationRoutes.d.ts +18 -0
  11. package/dist/NotificationRoutes.js +109 -38
  12. package/dist/NotificationRoutes.js.map +1 -1
  13. package/dist/UserNotificationRoot.d.ts +32 -0
  14. package/dist/UserNotificationRoot.js +9 -6
  15. package/dist/UserNotificationRoot.js.map +1 -1
  16. package/dist/UserNotificationRoutes.d.ts +16 -0
  17. package/dist/UserNotificationRoutes.js +9 -10
  18. package/dist/UserNotificationRoutes.js.map +1 -1
  19. package/dist/components/ConfirmDeleteDialog.d.ts +17 -0
  20. package/dist/components/ConfirmDeleteDialog.js +22 -0
  21. package/dist/components/ConfirmDeleteDialog.js.map +1 -0
  22. package/dist/components/FeatureDisabledPage.d.ts +6 -0
  23. package/dist/components/FeatureDisabledPage.js +1 -2
  24. package/dist/components/FeatureDisabledPage.js.map +1 -1
  25. package/dist/components/NotificationBell.d.ts +13 -0
  26. package/dist/components/NotificationBell.js +6 -7
  27. package/dist/components/NotificationBell.js.map +1 -1
  28. package/dist/components/NotificationCard.d.ts +27 -0
  29. package/dist/components/NotificationCard.js +106 -76
  30. package/dist/components/NotificationCard.js.map +1 -1
  31. package/dist/components/NotificationPanel.d.ts +10 -0
  32. package/dist/components/NotificationPanel.js +5 -6
  33. package/dist/components/NotificationPanel.js.map +1 -1
  34. package/dist/components/RecipientSelector.d.ts +32 -0
  35. package/dist/components/RecipientSelector.js +2 -3
  36. package/dist/components/RecipientSelector.js.map +1 -1
  37. package/dist/components/TemplatePreview.d.ts +21 -0
  38. package/dist/components/TemplatePreview.js +3 -4
  39. package/dist/components/TemplatePreview.js.map +1 -1
  40. package/dist/components/VariableInserter.d.ts +11 -0
  41. package/dist/components/index.d.ts +3 -0
  42. package/dist/components/index.js +4 -3
  43. package/dist/constants/permissions.d.ts +23 -0
  44. package/dist/constants/permissions.js +1 -2
  45. package/dist/constants/permissions.js.map +1 -1
  46. package/dist/dev/main.d.ts +0 -0
  47. package/dist/generated/global-operations.d.ts +2119 -0
  48. package/dist/generated/global-operations.js +80 -69
  49. package/dist/generated/global-operations.js.map +1 -1
  50. package/dist/generated/global-types.d.ts +23507 -0
  51. package/dist/generated/wspace-operations.d.ts +4 -0
  52. package/dist/generated/wspace-types.d.ts +57831 -0
  53. package/dist/graphql/global-client.d.ts +32 -0
  54. package/dist/graphql/global-client.js +23 -30
  55. package/dist/graphql/global-client.js.map +1 -1
  56. package/dist/hooks/index.d.ts +7 -0
  57. package/dist/hooks/index.js +7 -6
  58. package/dist/hooks/useNotificationAdmin.d.ts +46 -0
  59. package/dist/hooks/useNotificationAdmin.js +18 -17
  60. package/dist/hooks/useNotificationAdmin.js.map +1 -1
  61. package/dist/hooks/useNotificationAnalytics.d.ts +65 -0
  62. package/dist/hooks/useNotificationAnalytics.js +1 -2
  63. package/dist/hooks/useNotificationAnalytics.js.map +1 -1
  64. package/dist/hooks/useNotificationPreferences.d.ts +10 -0
  65. package/dist/hooks/useNotificationPreferences.js +7 -7
  66. package/dist/hooks/useNotificationPreferences.js.map +1 -1
  67. package/dist/hooks/useNotificationTemplates.d.ts +131 -0
  68. package/dist/hooks/useNotificationTemplates.js +1 -2
  69. package/dist/hooks/useNotificationTemplates.js.map +1 -1
  70. package/dist/hooks/useNotificationTopics.d.ts +35 -0
  71. package/dist/hooks/useNotificationTopics.js +22 -22
  72. package/dist/hooks/useNotificationTopics.js.map +1 -1
  73. package/dist/hooks/useNotifications.d.ts +39 -0
  74. package/dist/hooks/useNotifications.js +6 -4
  75. package/dist/hooks/useNotifications.js.map +1 -1
  76. package/dist/hooks/usePreferenceToggles.d.ts +27 -0
  77. package/dist/hooks/usePreferenceToggles.js +84 -0
  78. package/dist/hooks/usePreferenceToggles.js.map +1 -0
  79. package/dist/hooks/useSendNotification.d.ts +158 -0
  80. package/dist/hooks/useSendNotification.js +12 -10
  81. package/dist/hooks/useSendNotification.js.map +1 -1
  82. package/dist/hooks/useUserSearch.d.ts +26 -0
  83. package/dist/hooks/useUserSearch.js +8 -10
  84. package/dist/hooks/useUserSearch.js.map +1 -1
  85. package/dist/index.d.ts +36 -0
  86. package/dist/index.js +8 -8
  87. package/dist/navigation-v2/AdminPageV2.d.ts +14 -0
  88. package/dist/navigation-v2/AdminPageV2.js +51 -0
  89. package/dist/navigation-v2/AdminPageV2.js.map +1 -0
  90. package/dist/navigation-v2/AdminToolsMenu.d.ts +6 -0
  91. package/dist/navigation-v2/AdminToolsMenu.js +32 -0
  92. package/dist/navigation-v2/AdminToolsMenu.js.map +1 -0
  93. package/dist/navigation-v2/BackToNotifications.d.ts +2 -0
  94. package/dist/navigation-v2/BackToNotifications.js +20 -0
  95. package/dist/navigation-v2/BackToNotifications.js.map +1 -0
  96. package/dist/navigation-v2/FilterControls.d.ts +25 -0
  97. package/dist/navigation-v2/FilterControls.js +64 -0
  98. package/dist/navigation-v2/FilterControls.js.map +1 -0
  99. package/dist/navigation-v2/NotificationArchivedV2.d.ts +9 -0
  100. package/dist/navigation-v2/NotificationArchivedV2.js +174 -0
  101. package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -0
  102. package/dist/navigation-v2/NotificationInboxV2.d.ts +9 -0
  103. package/dist/navigation-v2/NotificationInboxV2.js +309 -0
  104. package/dist/navigation-v2/NotificationInboxV2.js.map +1 -0
  105. package/dist/navigation-v2/NotificationSettingsV2.d.ts +9 -0
  106. package/dist/navigation-v2/NotificationSettingsV2.js +203 -0
  107. package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -0
  108. package/dist/navigation-v2/NotificationsV2Landing.d.ts +9 -0
  109. package/dist/navigation-v2/NotificationsV2Landing.js +37 -0
  110. package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -0
  111. package/dist/navigation-v2/__tests__/uiMocks.d.ts +71 -0
  112. package/dist/navigation-v2/inboxFilters.d.ts +8 -0
  113. package/dist/navigation-v2/inboxFilters.js +10 -0
  114. package/dist/navigation-v2/inboxFilters.js.map +1 -0
  115. package/dist/navigation-v2/paths.d.ts +24 -0
  116. package/dist/navigation-v2/paths.js +31 -0
  117. package/dist/navigation-v2/paths.js.map +1 -0
  118. package/dist/navigation-v2/settingsOptions.d.ts +12 -0
  119. package/dist/navigation-v2/settingsOptions.js +58 -0
  120. package/dist/navigation-v2/settingsOptions.js.map +1 -0
  121. package/dist/navigation-v2/useAdminTools.d.ts +22 -0
  122. package/dist/navigation-v2/useAdminTools.js +76 -0
  123. package/dist/navigation-v2/useAdminTools.js.map +1 -0
  124. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
  125. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
  126. package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
  127. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
  128. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
  129. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
  130. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +9 -10
  131. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
  132. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
  133. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
  134. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
  135. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
  136. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
  137. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
  138. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
  139. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
  140. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
  141. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
  142. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
  143. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
  144. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
  145. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
  146. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
  147. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
  148. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
  149. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
  150. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
  151. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
  152. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
  153. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
  154. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
  155. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
  156. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
  157. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
  158. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
  159. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
  160. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
  161. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
  162. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
  163. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
  164. package/dist/node_modules/@apollo/client/version.js +2 -3
  165. package/dist/node_modules/@apollo/client/version.js.map +1 -1
  166. package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
  167. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
  168. package/dist/node_modules/@wry/trie/lib/index.js +2 -3
  169. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
  170. package/dist/node_modules/graphql-ws/dist/client.js +76 -69
  171. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
  172. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
  173. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
  174. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
  175. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
  176. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
  177. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
  178. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
  179. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
  180. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
  181. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
  182. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
  183. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
  184. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
  185. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
  186. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
  187. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
  188. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
  189. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
  190. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
  191. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
  192. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
  193. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
  194. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
  195. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
  196. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
  197. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
  198. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
  199. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
  200. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
  201. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
  202. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
  203. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
  204. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
  205. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
  206. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
  207. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
  208. package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
  209. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  210. package/dist/pages/CreateNotificationPage.d.ts +5 -0
  211. package/dist/pages/CreateNotificationPage.js +591 -573
  212. package/dist/pages/CreateNotificationPage.js.map +1 -1
  213. package/dist/pages/NotificationCenterPage.d.ts +8 -0
  214. package/dist/pages/NotificationCenterPage.js +87 -83
  215. package/dist/pages/NotificationCenterPage.js.map +1 -1
  216. package/dist/pages/NotificationHistoryAdminPage.d.ts +2 -0
  217. package/dist/pages/NotificationHistoryAdminPage.js +7 -8
  218. package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
  219. package/dist/pages/NotificationHistoryPage.d.ts +6 -0
  220. package/dist/pages/NotificationHistoryPage.js +59 -55
  221. package/dist/pages/NotificationHistoryPage.js.map +1 -1
  222. package/dist/pages/NotificationLandingPage.d.ts +10 -0
  223. package/dist/pages/NotificationLandingPage.js +5 -6
  224. package/dist/pages/NotificationLandingPage.js.map +1 -1
  225. package/dist/pages/NotificationPreferencesPage.d.ts +5 -0
  226. package/dist/pages/NotificationPreferencesPage.js +97 -159
  227. package/dist/pages/NotificationPreferencesPage.js.map +1 -1
  228. package/dist/pages/NotificationTemplatesPage.d.ts +7 -0
  229. package/dist/pages/NotificationTemplatesPage.js +192 -172
  230. package/dist/pages/NotificationTemplatesPage.js.map +1 -1
  231. package/dist/pages/NotificationTopicsPage.d.ts +1 -0
  232. package/dist/pages/NotificationTopicsPage.js +126 -112
  233. package/dist/pages/NotificationTopicsPage.js.map +1 -1
  234. package/dist/pages/TemplateEditorPage.d.ts +12 -0
  235. package/dist/pages/TemplateEditorPage.js +381 -341
  236. package/dist/pages/TemplateEditorPage.js.map +1 -1
  237. package/dist/providers/NotificationProvider.d.ts +11 -0
  238. package/dist/providers/NotificationProvider.js +7 -7
  239. package/dist/providers/NotificationProvider.js.map +1 -1
  240. package/dist/shared/hooks/useTr.d.ts +13 -0
  241. package/dist/shared/hooks/useTr.js +1 -2
  242. package/dist/shared/hooks/useTr.js.map +1 -1
  243. package/dist/store/notificationStore.d.ts +30 -0
  244. package/dist/store/notificationStore.js +1 -2
  245. package/dist/store/notificationStore.js.map +1 -1
  246. package/dist/test/happydom.d.ts +1 -0
  247. package/dist/translations/en.d.ts +468 -0
  248. package/dist/types/index.d.ts +257 -0
  249. package/dist/utils/inAppNavigation.d.ts +37 -0
  250. package/dist/utils/inAppNavigation.js +2 -3
  251. package/dist/utils/inAppNavigation.js.map +1 -1
  252. package/dist/utils/index.d.ts +68 -0
  253. package/dist/utils/index.js +1 -2
  254. package/dist/utils/index.js.map +1 -1
  255. package/dist/utils/nativeBridge.d.ts +2 -0
  256. package/dist/utils/nativeBridge.js +1 -2
  257. package/dist/utils/notificationHistoryExport.d.ts +12 -0
  258. package/dist/utils/notificationHistoryExport.js +1 -2
  259. package/dist/utils/notificationHistoryExport.js.map +1 -1
  260. package/package.json +67 -49
  261. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ import { NotificationRootProps } from './types';
2
+ /**
3
+ * Admin Root component for the Notification microfrontend.
4
+ *
5
+ * This is the full admin entry point intended for `admin-app`. It exposes all
6
+ * notification surfaces (Notification Center, History, Templates, Create &
7
+ * Send) and sets up the required provider stack. In-page actions remain gated
8
+ * by RBAC via `usePermissions` checks.
9
+ *
10
+ * For product shells that only need user-facing surfaces, use
11
+ * `UserNotificationRoot` instead.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * import { AdminNotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';
16
+ *
17
+ * function App() {
18
+ * const props: NotificationRootProps = {
19
+ * basePath: '/notifications',
20
+ * navigate: (path) => router.push(path),
21
+ * currentUser: { id: '1', email: 'user@example.com' },
22
+ * workspaceId: 'ws-123',
23
+ * apiGatewayUrl: 'https://api.example.com',
24
+ * authToken: 'token',
25
+ * registerNavItems: (items) => { return () => {}; },
26
+ * onNotificationClick: (notification) => console.log('Clicked:', notification),
27
+ * };
28
+ *
29
+ * return <AdminNotificationRoot {...props} />;
30
+ * }
31
+ * ```
32
+ */
33
+ export declare function AdminNotificationRoot(props: NotificationRootProps): import('react').JSX.Element;
@@ -6,11 +6,12 @@ import { ErrorBoundary as i } from "@burdenoff/fe-libs/shared/components";
6
6
  import { useFeatureFlagDetails as a } from "@burdenoff/fe-libs/shared/feature-flags";
7
7
  import { Archive as o, Bell as s, FileText as c, Send as l, Tag as u } from "lucide-react";
8
8
  import { jsx as d } from "react/jsx-runtime";
9
- //#region src/AdminNotificationRoot.tsx
9
+ // src/AdminNotificationRoot.tsx
10
10
  function f(f) {
11
11
  let { registerNavItems: p, registerFooterItems: m, basePath: h = "/" } = f, g = t(), _ = a("notification.templates"), v = a("notification.create"), y = a("notification.history"), b = _ ? !!_.value : !1, x = v ? !!v.value : !1, S = y ? !!y.value : !1, C = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
12
12
  return r(() => {
13
- if (p) return p([
13
+ if (!p) return;
14
+ let e = [
14
15
  {
15
16
  id: "admin-notification-center",
16
17
  label: g("notification.nav.center", "Notification Center"),
@@ -50,7 +51,8 @@ function f(f) {
50
51
  order: 50,
51
52
  group: "notifications"
52
53
  }] : []
53
- ]);
54
+ ];
55
+ return p(e);
54
56
  }, [
55
57
  p,
56
58
  h,
@@ -59,13 +61,15 @@ function f(f) {
59
61
  x,
60
62
  g
61
63
  ]), r(() => {
62
- if (m) return m([{
64
+ if (!m) return;
65
+ let e = [{
63
66
  id: "admin-notification-status",
64
67
  label: g("notification.footer.ready", "Notifications Ready"),
65
68
  type: "status",
66
69
  order: 10,
67
70
  section: "left"
68
- }]);
71
+ }];
72
+ return m(e);
69
73
  }, [m, g]), /* @__PURE__ */ d(i, {
70
74
  fallback: /* @__PURE__ */ d("div", {
71
75
  className: "p-6 text-center text-text-secondary",
@@ -77,7 +81,6 @@ function f(f) {
77
81
  })
78
82
  });
79
83
  }
80
- //#endregion
81
84
  export { f as AdminNotificationRoot };
82
85
 
83
86
  //# sourceMappingURL=AdminNotificationRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdminNotificationRoot.js","names":[],"sources":["../src/AdminNotificationRoot.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { Bell, Archive, FileText, Send, Tag } from 'lucide-react';\nimport { NotificationProvider } from './providers/NotificationProvider';\nimport { useTr } from './shared/hooks/useTr';\nimport type { NavItem, FooterItem, NotificationRootProps } from './types';\nimport { AdminNotificationRoutes } from './AdminNotificationRoutes';\n\n/**\n * Admin Root component for the Notification microfrontend.\n *\n * This is the full admin entry point intended for `admin-app`. It exposes all\n * notification surfaces (Notification Center, History, Templates, Create &\n * Send) and sets up the required provider stack. In-page actions remain gated\n * by RBAC via `usePermissions` checks.\n *\n * For product shells that only need user-facing surfaces, use\n * `UserNotificationRoot` instead.\n *\n * @example\n * ```tsx\n * import { AdminNotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';\n *\n * function App() {\n * const props: NotificationRootProps = {\n * basePath: '/notifications',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com' },\n * workspaceId: 'ws-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * onNotificationClick: (notification) => console.log('Clicked:', notification),\n * };\n *\n * return <AdminNotificationRoot {...props} />;\n * }\n * ```\n */\nexport function AdminNotificationRoot(props: NotificationRootProps) {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const tr = useTr();\n\n // Component-level feature gates. `notification.*` flags are 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 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 // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell (admin - full surface)\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'admin-notification-center',\n label: tr('notification.nav.center', 'Notification Center'),\n path: joinPath(basePath, 'center'),\n icon: <Bell size={20} />,\n order: 10,\n group: 'notifications',\n },\n ...(historyEnabled\n ? [\n {\n id: 'admin-notification-history',\n label: tr('notification.nav.history', 'History'),\n path: joinPath(basePath, 'history'),\n icon: <Archive size={20} />,\n order: 20,\n group: 'notifications',\n },\n ]\n : []),\n ...(templatesEnabled\n ? [\n {\n id: 'admin-notification-templates',\n label: tr('notification.nav.templates', 'Templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileText size={20} />,\n order: 30,\n group: 'notifications',\n },\n ]\n : []),\n ...(createEnabled\n ? [\n {\n id: 'admin-notification-create',\n label: tr('notification.nav.send', 'Send Notification'),\n path: joinPath(basePath, 'create'),\n icon: <Send size={20} />,\n order: 40,\n group: 'notifications',\n },\n {\n id: 'admin-notification-topics',\n label: tr('notification.nav.topics', 'Topics'),\n path: joinPath(basePath, 'topics'),\n icon: <Tag size={20} />,\n order: 50,\n group: 'notifications',\n },\n ]\n : []),\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n }, [registerNavItems, basePath, historyEnabled, templatesEnabled, createEnabled, tr]);\n\n // Register footer items (status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems: FooterItem[] = [\n {\n id: 'admin-notification-status',\n label: tr('notification.footer.ready', 'Notifications Ready'),\n type: 'status',\n order: 10,\n section: 'left',\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'notification.error.moduleLoad',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <NotificationProvider {...props}>\n <AdminNotificationRoutes />\n </NotificationProvider>\n </ErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAwCA,SAAgB,EAAsB,GAA8B;CAClE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,IAAK,GAAO,EAQZ,IAAmB,EAAsB,yBAAyB,EAClE,IAAgB,EAAsB,sBAAsB,EAC5D,IAAiB,EAAsB,uBAAuB,EAC9D,IAAmB,IAAmB,EAAQ,EAAiB,QAAS,IACxE,IAAgB,IAAgB,EAAQ,EAAc,QAAS,IAC/D,IAAiB,IAAiB,EAAQ,EAAe,QAAS,IAGlE,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAwFtD,QAnFA,QAAgB;AACT,QA6DL,QAHgB,EAxDY;GAC1B;IACE,IAAI;IACJ,OAAO,EAAG,2BAA2B,sBAAsB;IAC3D,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GACD,GAAI,IACA,CACE;IACE,IAAI;IACJ,OAAO,EAAG,4BAA4B,UAAU;IAChD,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;IAC3B,OAAO;IACP,OAAO;IACR,CACF,GACD,EAAE;GACN,GAAI,IACA,CACE;IACE,IAAI;IACJ,OAAO,EAAG,8BAA8B,YAAY;IACpD,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IACR,CACF,GACD,EAAE;GACN,GAAI,IACA,CACE;IACE,IAAI;IACJ,OAAO,EAAG,yBAAyB,oBAAoB;IACvD,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR,EACD;IACE,IAAI;IACJ,OAAO,EAAG,2BAA2B,SAAS;IAC9C,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;IACvB,OAAO;IACP,OAAO;IACR,CACF,GACD,EAAE;GACP,CAGyC;IAIzC;EAAC;EAAkB;EAAU;EAAgB;EAAkB;EAAe;EAAG,CAAC,EAGrF,QAAgB;AACT,QAaL,QADgB,EAVkB,CAChC;GACE,IAAI;GACJ,OAAO,EAAG,6BAA6B,sBAAsB;GAC7D,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,GAAqB,EAAG,CAAC,EAG3B,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aACZ,EACC,iCACA,qEACD;GACG,CAAA;YAGR,kBAAC,GAAD;GAAsB,GAAI;aACxB,kBAAC,GAAD,EAA2B,CAAA;GACN,CAAA;EACT,CAAA"}
1
+ {"version":3,"file":"AdminNotificationRoot.js","names":["AdminNotificationRoot","props","tr","useTr","templatesDetails","useFeatureFlagDetails","createDetails","historyDetails","templatesEnabled","createEnabled","historyEnabled","joinPath","base","path","useEffect","registerNavItems","navItems","basePath","Bell","Archive","FileText","Send","Tag","registerFooterItems","footerItems","ErrorBoundary","NotificationProvider","AdminNotificationRoutes"],"sources":["../src/AdminNotificationRoot.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { useFeatureFlagDetails } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { Bell, Archive, FileText, Send, Tag } from 'lucide-react';\nimport { NotificationProvider } from './providers/NotificationProvider';\nimport { useTr } from './shared/hooks/useTr';\nimport type { NavItem, FooterItem, NotificationRootProps } from './types';\nimport { AdminNotificationRoutes } from './AdminNotificationRoutes';\n\n/**\n * Admin Root component for the Notification microfrontend.\n *\n * This is the full admin entry point intended for `admin-app`. It exposes all\n * notification surfaces (Notification Center, History, Templates, Create &\n * Send) and sets up the required provider stack. In-page actions remain gated\n * by RBAC via `usePermissions` checks.\n *\n * For product shells that only need user-facing surfaces, use\n * `UserNotificationRoot` instead.\n *\n * @example\n * ```tsx\n * import { AdminNotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';\n *\n * function App() {\n * const props: NotificationRootProps = {\n * basePath: '/notifications',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com' },\n * workspaceId: 'ws-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * onNotificationClick: (notification) => console.log('Clicked:', notification),\n * };\n *\n * return <AdminNotificationRoot {...props} />;\n * }\n * ```\n */\nexport function AdminNotificationRoot(props: NotificationRootProps) {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const tr = useTr();\n\n // Component-level feature gates. `notification.*` flags are 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 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 // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell (admin - full surface)\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'admin-notification-center',\n label: tr('notification.nav.center', 'Notification Center'),\n path: joinPath(basePath, 'center'),\n icon: <Bell size={20} />,\n order: 10,\n group: 'notifications',\n },\n ...(historyEnabled\n ? [\n {\n id: 'admin-notification-history',\n label: tr('notification.nav.history', 'History'),\n path: joinPath(basePath, 'history'),\n icon: <Archive size={20} />,\n order: 20,\n group: 'notifications',\n },\n ]\n : []),\n ...(templatesEnabled\n ? [\n {\n id: 'admin-notification-templates',\n label: tr('notification.nav.templates', 'Templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileText size={20} />,\n order: 30,\n group: 'notifications',\n },\n ]\n : []),\n ...(createEnabled\n ? [\n {\n id: 'admin-notification-create',\n label: tr('notification.nav.send', 'Send Notification'),\n path: joinPath(basePath, 'create'),\n icon: <Send size={20} />,\n order: 40,\n group: 'notifications',\n },\n {\n id: 'admin-notification-topics',\n label: tr('notification.nav.topics', 'Topics'),\n path: joinPath(basePath, 'topics'),\n icon: <Tag size={20} />,\n order: 50,\n group: 'notifications',\n },\n ]\n : []),\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n }, [registerNavItems, basePath, historyEnabled, templatesEnabled, createEnabled, tr]);\n\n // Register footer items (status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems: FooterItem[] = [\n {\n id: 'admin-notification-status',\n label: tr('notification.footer.ready', 'Notifications Ready'),\n type: 'status',\n order: 10,\n section: 'left',\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems, tr]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'notification.error.moduleLoad',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <NotificationProvider {...props}>\n <AdminNotificationRoutes />\n </NotificationProvider>\n </ErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAwCA,SAAgBA,EAAsB,GAA8B;CAClE,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQC,GAC5DC,IAAKC,EAAM,GAQXC,IAAmBC,EAAsB,wBAAwB,GACjEC,IAAgBD,EAAsB,qBAAqB,GAC3DE,IAAiBF,EAAsB,sBAAsB,GAC7DG,IAAmBJ,IAAmB,EAAQA,EAAiB,QAAS,IACxEK,IAAgBH,IAAgB,EAAQA,EAAc,QAAS,IAC/DI,IAAiBH,IAAiB,EAAQA,EAAe,QAAS,IAGlEI,KAAY,GAAc,OACZC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;CAwFtD,OAnFAC,QAAgB;EACd,IAAI,CAACC,GAAkB;EAEvB,IAAMC,IAAsB;GAC1B;IACE,IAAI;IACJ,OAAOd,EAAG,2BAA2B,qBAAqB;IAC1D,MAAMS,EAASM,GAAU,QAAQ;IACjC,MAAM,kBAACC,GAAD,EAAM,MAAM,GAAK,CAAA;IACvB,OAAO;IACP,OAAO;GACT;GACA,GAAIR,IACA,CACE;IACE,IAAI;IACJ,OAAOR,EAAG,4BAA4B,SAAS;IAC/C,MAAMS,EAASM,GAAU,SAAS;IAClC,MAAM,kBAACE,GAAD,EAAS,MAAM,GAAK,CAAA;IAC1B,OAAO;IACP,OAAO;GACT,CACF,IACA,CAAC;GACL,GAAIX,IACA,CACE;IACE,IAAI;IACJ,OAAON,EAAG,8BAA8B,WAAW;IACnD,MAAMS,EAASM,GAAU,WAAW;IACpC,MAAM,kBAACG,GAAD,EAAU,MAAM,GAAK,CAAA;IAC3B,OAAO;IACP,OAAO;GACT,CACF,IACA,CAAC;GACL,GAAIX,IACA,CACE;IACE,IAAI;IACJ,OAAOP,EAAG,yBAAyB,mBAAmB;IACtD,MAAMS,EAASM,GAAU,QAAQ;IACjC,MAAM,kBAACI,GAAD,EAAM,MAAM,GAAK,CAAA;IACvB,OAAO;IACP,OAAO;GACT,GACA;IACE,IAAI;IACJ,OAAOnB,EAAG,2BAA2B,QAAQ;IAC7C,MAAMS,EAASM,GAAU,QAAQ;IACjC,MAAM,kBAACK,GAAD,EAAK,MAAM,GAAK,CAAA;IACtB,OAAO;IACP,OAAO;GACT,CACF,IACA,CAAC;EACP;EAMA,OAHgBP,EAAiBC,CAG1B;CACT,GAAG;EAACD;EAAkBE;EAAUP;EAAgBF;EAAkBC;EAAeP;CAAE,CAAC,GAGpFY,QAAgB;EACd,IAAI,CAACS,GAAqB;EAE1B,IAAMC,IAA4B,CAChC;GACE,IAAI;GACJ,OAAOtB,EAAG,6BAA6B,qBAAqB;GAC5D,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAGA,OADgBqB,EAAoBC,CAC7B;CACT,GAAG,CAACD,GAAqBrB,CAAE,CAAC,GAG1B,kBAACuB,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAAvB,EACC,iCACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAACwB,GAAD;GAAsB,GAAIzB;GACxB,UAAA,kBAAC0B,GAAD,CAA0B,CAAA;EACN,CAAA;CACT,CAAA;AAEnB"}
@@ -0,0 +1 @@
1
+ export declare function AdminNotificationRoutes(): import('react').JSX.Element;
@@ -1,16 +1,16 @@
1
- import { useNotification as e } from "./providers/NotificationProvider.js";
2
- import { useTr as t } from "./shared/hooks/useTr.js";
3
- import { NOTIFICATION_PERMISSIONS as n } from "./constants/permissions.js";
4
- import { NotificationCenterPage as r } from "./pages/NotificationCenterPage.js";
5
- import { NotificationLandingPage as i } from "./pages/NotificationLandingPage.js";
6
- import { FeatureDisabledPage as a } from "./components/FeatureDisabledPage.js";
1
+ import { FeatureDisabledPage as e } from "./components/FeatureDisabledPage.js";
2
+ import { NOTIFICATION_PERMISSIONS as t } from "./constants/permissions.js";
3
+ import { useNotification as n } from "./providers/NotificationProvider.js";
4
+ import { useTr as r } from "./shared/hooks/useTr.js";
5
+ import { NotificationCenterPage as i } from "./pages/NotificationCenterPage.js";
6
+ import { NotificationLandingPage as a } from "./pages/NotificationLandingPage.js";
7
7
  import { Suspense as o, lazy as s, useEffect as c } from "react";
8
8
  import { PermissionGate as l } from "@burdenoff/fe-libs/shared/components";
9
9
  import { useFeatureFlagDetails as u } from "@burdenoff/fe-libs/shared/feature-flags";
10
10
  import { useGlobalUi as d } from "@burdenoff/fe-libs/shared/providers/shell";
11
11
  import { Navigate as f, Route as p, Routes as m, useNavigate as h } from "react-router";
12
12
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
- //#region src/AdminNotificationRoutes.tsx
13
+ // src/AdminNotificationRoutes.tsx
14
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
15
  function C() {
16
16
  return /* @__PURE__ */ g("div", {
@@ -19,9 +19,9 @@ function C() {
19
19
  });
20
20
  }
21
21
  function w() {
22
- let { showToast: n } = d(), r = h(), { basePath: i } = e(), a = t();
22
+ let { showToast: e } = d(), t = h(), { basePath: i } = n(), a = r();
23
23
  return c(() => {
24
- n(a("notification.error.accessDeniedRedirect", "You do not have permission to access that notification page."), "warning"), r(`${i}/center`, { replace: !0 });
24
+ e(a("notification.error.accessDeniedRedirect", "You do not have permission to access that notification page."), "warning"), t(`${i}/center`, { replace: !0 });
25
25
  }, []), null;
26
26
  }
27
27
  function T(e) {
@@ -36,25 +36,25 @@ function T(e) {
36
36
  });
37
37
  }
38
38
  function E() {
39
- let { basePath: s = "/" } = e(), c = t(), 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;
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
40
  return /* @__PURE__ */ g(o, {
41
41
  fallback: /* @__PURE__ */ g(C, {}),
42
42
  children: /* @__PURE__ */ _(m, { children: [
43
43
  /* @__PURE__ */ g(p, {
44
44
  index: !0,
45
- element: /* @__PURE__ */ g(i, {})
45
+ element: /* @__PURE__ */ g(a, {})
46
46
  }),
47
47
  /* @__PURE__ */ g(p, {
48
48
  path: "list",
49
- element: /* @__PURE__ */ g(r, {})
49
+ element: /* @__PURE__ */ g(i, {})
50
50
  }),
51
51
  /* @__PURE__ */ g(p, {
52
52
  path: "center",
53
- element: /* @__PURE__ */ g(r, {})
53
+ element: /* @__PURE__ */ g(i, {})
54
54
  }),
55
55
  /* @__PURE__ */ g(p, {
56
56
  path: "history",
57
- element: O ? /* @__PURE__ */ g(v, {}) : /* @__PURE__ */ g(a, {
57
+ element: O ? /* @__PURE__ */ g(v, {}) : /* @__PURE__ */ g(e, {
58
58
  title: c("notification.featureDisabled.historyTitle", "Notification history is not enabled"),
59
59
  description: c("notification.featureDisabled.historyAdminDescription", "This admin page is controlled by the notification.history feature flag. Enable the flag before validating delivery history.")
60
60
  })
@@ -63,10 +63,10 @@ function E() {
63
63
  path: "templates",
64
64
  element: /* @__PURE__ */ g(T, {
65
65
  permissions: [
66
- n.TEMPLATE_LIST,
67
- n.TEMPLATE_CREATE,
68
- n.TEMPLATE_UPDATE,
69
- n.TEMPLATE_DELETE
66
+ t.TEMPLATE_LIST,
67
+ t.TEMPLATE_CREATE,
68
+ t.TEMPLATE_UPDATE,
69
+ t.TEMPLATE_DELETE
70
70
  ],
71
71
  children: /* @__PURE__ */ g(y, {})
72
72
  })
@@ -74,21 +74,21 @@ function E() {
74
74
  E && /* @__PURE__ */ g(p, {
75
75
  path: "templates/new",
76
76
  element: /* @__PURE__ */ g(T, {
77
- permission: n.TEMPLATE_CREATE,
77
+ permission: t.TEMPLATE_CREATE,
78
78
  children: /* @__PURE__ */ g(b, {})
79
79
  })
80
80
  }),
81
81
  E && /* @__PURE__ */ g(p, {
82
82
  path: "templates/:templateId",
83
83
  element: /* @__PURE__ */ g(T, {
84
- permission: n.TEMPLATE_UPDATE,
84
+ permission: t.TEMPLATE_UPDATE,
85
85
  children: /* @__PURE__ */ g(b, {})
86
86
  })
87
87
  }),
88
88
  D && /* @__PURE__ */ g(p, {
89
89
  path: "create",
90
90
  element: /* @__PURE__ */ g(T, {
91
- permissions: [n.NOTIFICATION_CREATE, n.NOTIFICATION_SEND],
91
+ permissions: [t.NOTIFICATION_CREATE, t.NOTIFICATION_SEND],
92
92
  requireAll: !0,
93
93
  children: /* @__PURE__ */ g(x, {})
94
94
  })
@@ -96,7 +96,7 @@ function E() {
96
96
  D && /* @__PURE__ */ g(p, {
97
97
  path: "topics",
98
98
  element: /* @__PURE__ */ g(T, {
99
- permission: n.NOTIFICATION_CREATE,
99
+ permission: t.NOTIFICATION_CREATE,
100
100
  children: /* @__PURE__ */ g(S, {})
101
101
  })
102
102
  }),
@@ -110,7 +110,6 @@ function E() {
110
110
  ] })
111
111
  });
112
112
  }
113
- //#endregion
114
113
  export { E as AdminNotificationRoutes };
115
114
 
116
115
  //# 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';\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":"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"}
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":"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"}
@@ -0,0 +1,29 @@
1
+ import { NotificationRootProps } from './types';
2
+ /**
3
+ * Root component for the Notification microfrontend.
4
+ *
5
+ * This is the main entry point that host applications import and render.
6
+ * It sets up the necessary providers and renders the internal routing.
7
+ * Automatically registers navigation items with the shell if registration functions are provided.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { NotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';
12
+ *
13
+ * function App() {
14
+ * const props: NotificationRootProps = {
15
+ * basePath: '/notifications',
16
+ * navigate: (path) => router.push(path),
17
+ * currentUser: { id: '1', email: 'user@example.com' },
18
+ * workspaceId: 'ws-123',
19
+ * apiGatewayUrl: 'https://api.example.com',
20
+ * authToken: 'token',
21
+ * registerNavItems: (items) => { return () => {}; },
22
+ * onNotificationClick: (notification) => console.log('Clicked:', notification),
23
+ * };
24
+ *
25
+ * return <NotificationRoot {...props} />;
26
+ * }
27
+ * ```
28
+ */
29
+ export declare function NotificationRoot(props: NotificationRootProps): import('react').JSX.Element;
@@ -6,14 +6,15 @@ import { FeatureFlagProvider as i } from "@burdenoff/fe-libs/shared/feature-flag
6
6
  import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell";
7
7
  import { Archive as o, Bell as s, FileText as c, Settings2 as l, Tag as u } from "lucide-react";
8
8
  import { jsx as d } from "react/jsx-runtime";
9
- //#region src/NotificationRoot.tsx
9
+ // src/NotificationRoot.tsx
10
10
  function f(f) {
11
11
  let { registerNavItems: p, registerFooterItems: m, basePath: h = "/" } = f, { t: g } = a(), _ = (e, t) => {
12
12
  let n = g(e);
13
13
  return n === e ? t : n;
14
14
  }, v = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
15
15
  return n(() => {
16
- if (p) return p([
16
+ if (!p) return;
17
+ let e = [
17
18
  {
18
19
  id: "notification-center",
19
20
  label: _("notification.nav.center", "Notification Center"),
@@ -54,19 +55,22 @@ function f(f) {
54
55
  order: 50,
55
56
  group: "notifications"
56
57
  }
57
- ]);
58
+ ];
59
+ return p(e);
58
60
  }, [
59
61
  p,
60
62
  h,
61
63
  g
62
64
  ]), n(() => {
63
- if (m) return m([{
65
+ if (!m) return;
66
+ let e = [{
64
67
  id: "notification-status",
65
68
  label: _("notification.footer.ready", "Notifications Ready"),
66
69
  type: "status",
67
70
  order: 10,
68
71
  section: "left"
69
- }]);
72
+ }];
73
+ return m(e);
70
74
  }, [m, g]), /* @__PURE__ */ d(r, {
71
75
  fallback: /* @__PURE__ */ d("div", {
72
76
  className: "p-6 text-center text-text-secondary",
@@ -83,7 +87,6 @@ function f(f) {
83
87
  })
84
88
  });
85
89
  }
86
- //#endregion
87
90
  export { f as NotificationRoot };
88
91
 
89
92
  //# sourceMappingURL=NotificationRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationRoot.js","names":[],"sources":["../src/NotificationRoot.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Bell, Archive, FileText, Settings2, Tag } from 'lucide-react';\nimport { NotificationProvider } from './providers/NotificationProvider';\nimport type { NavItem, FooterItem, NotificationRootProps } from './types';\nimport { NotificationRoutes } from './NotificationRoutes';\n\n/**\n * Root component for the Notification microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { NotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';\n *\n * function App() {\n * const props: NotificationRootProps = {\n * basePath: '/notifications',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com' },\n * workspaceId: 'ws-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * onNotificationClick: (notification) => console.log('Clicked:', notification),\n * };\n *\n * return <NotificationRoot {...props} />;\n * }\n * ```\n */\nexport function NotificationRoot(props: NotificationRootProps) {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'notification-center',\n label: tr('notification.nav.center', 'Notification Center'),\n path: joinPath(basePath, 'center'),\n icon: <Bell size={20} />,\n order: 10,\n group: 'notifications',\n },\n {\n id: 'notification-history',\n label: tr('notification.nav.history', 'History'),\n path: joinPath(basePath, 'history'),\n icon: <Archive size={20} />,\n order: 20,\n group: 'notifications',\n },\n {\n id: 'notification-templates',\n label: tr('notification.nav.templates', 'Templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileText size={20} />,\n order: 30,\n group: 'notifications',\n // Admin only - host should filter based on permissions\n },\n {\n id: 'notification-topics',\n label: tr('notification.nav.topics', 'Topics'),\n path: joinPath(basePath, 'topics'),\n icon: <Tag size={20} />,\n order: 40,\n group: 'notifications',\n },\n {\n id: 'notification-preferences',\n label: tr('notification.nav.preferences', 'Preferences'),\n path: joinPath(basePath, 'preferences'),\n icon: <Settings2 size={20} />,\n order: 50,\n group: 'notifications',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerNavItems, basePath, t]);\n\n // Register footer items (status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems: FooterItem[] = [\n {\n id: 'notification-status',\n label: tr('notification.footer.ready', 'Notifications Ready'),\n type: 'status',\n order: 10,\n section: 'left',\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerFooterItems, t]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'notification.error.moduleLoad',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <NotificationProvider {...props}>\n <NotificationRoutes />\n </NotificationProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,SAAgB,EAAiB,GAA8B;CAC7D,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQ,GAC5D,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,EAAI;AACzB,SAAO,MAAe,IAAM,IAAW;IAInC,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AA+EtD,QA1EA,QAAgB;AACT,QAkDL,QAHgB,EA7CY;GAC1B;IACE,IAAI;IACJ,OAAO,EAAG,2BAA2B,sBAAsB;IAC3D,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;IACxB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAG,4BAA4B,UAAU;IAChD,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;IAC3B,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAG,8BAA8B,YAAY;IACpD,MAAM,EAAS,GAAU,YAAY;IACrC,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;IAC5B,OAAO;IACP,OAAO;IAER;GACD;IACE,IAAI;IACJ,OAAO,EAAG,2BAA2B,SAAS;IAC9C,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAK,MAAM,IAAM,CAAA;IACvB,OAAO;IACP,OAAO;IACR;GACD;IACE,IAAI;IACJ,OAAO,EAAG,gCAAgC,cAAc;IACxD,MAAM,EAAS,GAAU,cAAc;IACvC,MAAM,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAC7B,OAAO;IACP,OAAO;IACR;GACF,CAGyC;IAKzC;EAAC;EAAkB;EAAU;EAAE,CAAC,EAGnC,QAAgB;AACT,QAaL,QADgB,EAVkB,CAChC;GACE,IAAI;GACJ,OAAO,EAAG,6BAA6B,sBAAsB;GAC7D,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAG/C,CAAC,GAAqB,EAAE,CAAC,EAG1B,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;aACZ,EACC,iCACA,qEACD;GACG,CAAA;YAGR,kBAAC,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;aACvE,kBAAC,GAAD;IAAsB,GAAI;cACxB,kBAAC,GAAD,EAAsB,CAAA;IACD,CAAA;GACH,CAAA;EACR,CAAA"}
1
+ {"version":3,"file":"NotificationRoot.js","names":["NotificationRoot","props","useI18n","tr","translated","t","key","fallback","joinPath","base","path","useEffect","registerNavItems","navItems","basePath","Bell","Archive","FileText","Tag","Settings2","registerFooterItems","footerItems","ErrorBoundary","FeatureFlagProvider","NotificationProvider","NotificationRoutes"],"sources":["../src/NotificationRoot.tsx"],"sourcesContent":["import { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { FeatureFlagProvider } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { Bell, Archive, FileText, Settings2, Tag } from 'lucide-react';\nimport { NotificationProvider } from './providers/NotificationProvider';\nimport type { NavItem, FooterItem, NotificationRootProps } from './types';\nimport { NotificationRoutes } from './NotificationRoutes';\n\n/**\n * Root component for the Notification microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { NotificationRoot, type NotificationRootProps } from '@burdenoff/micro-fe/notification';\n *\n * function App() {\n * const props: NotificationRootProps = {\n * basePath: '/notifications',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com' },\n * workspaceId: 'ws-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * onNotificationClick: (notification) => console.log('Clicked:', notification),\n * };\n *\n * return <NotificationRoot {...props} />;\n * }\n * ```\n */\nexport function NotificationRoot(props: NotificationRootProps) {\n const { registerNavItems, registerFooterItems, basePath = '/' } = props;\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n\n // Helper to join paths correctly, avoiding double slashes\n const joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith('/') ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith('/') ? path : `/${path}`;\n return cleanBase + cleanPath;\n };\n\n // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'notification-center',\n label: tr('notification.nav.center', 'Notification Center'),\n path: joinPath(basePath, 'center'),\n icon: <Bell size={20} />,\n order: 10,\n group: 'notifications',\n },\n {\n id: 'notification-history',\n label: tr('notification.nav.history', 'History'),\n path: joinPath(basePath, 'history'),\n icon: <Archive size={20} />,\n order: 20,\n group: 'notifications',\n },\n {\n id: 'notification-templates',\n label: tr('notification.nav.templates', 'Templates'),\n path: joinPath(basePath, 'templates'),\n icon: <FileText size={20} />,\n order: 30,\n group: 'notifications',\n // Admin only - host should filter based on permissions\n },\n {\n id: 'notification-topics',\n label: tr('notification.nav.topics', 'Topics'),\n path: joinPath(basePath, 'topics'),\n icon: <Tag size={20} />,\n order: 40,\n group: 'notifications',\n },\n {\n id: 'notification-preferences',\n label: tr('notification.nav.preferences', 'Preferences'),\n path: joinPath(basePath, 'preferences'),\n icon: <Settings2 size={20} />,\n order: 50,\n group: 'notifications',\n },\n ];\n\n // Register and get cleanup function\n const cleanup = registerNavItems(navItems);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerNavItems, basePath, t]);\n\n // Register footer items (status indicator in left section)\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems: FooterItem[] = [\n {\n id: 'notification-status',\n label: tr('notification.footer.ready', 'Notifications Ready'),\n type: 'status',\n order: 10,\n section: 'left',\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [registerFooterItems, t]);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'notification.error.moduleLoad',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <FeatureFlagProvider workspaceId={null} gateway=\"global\" defaultEnabled={true}>\n <NotificationProvider {...props}>\n <NotificationRoutes />\n </NotificationProvider>\n </FeatureFlagProvider>\n </ErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAoCA,SAAgBA,EAAiB,GAA8B;CAC7D,IAAM,EAAE,qBAAkB,wBAAqB,cAAW,QAAQC,GAC5D,EAAE,SAAMC,EAAQ,GAChBC,KAAM,GAAa,MAA6B;EACpD,IAAMC,IAAaC,EAAEC,CAAG;EACxB,OAAOF,MAAeE,IAAMC,IAAWH;CACzC,GAGMI,KAAY,GAAc,OACZC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;CA+EtD,OA1EAC,QAAgB;EACd,IAAI,CAACC,GAAkB;EAEvB,IAAMC,IAAsB;GAC1B;IACE,IAAI;IACJ,OAAOV,EAAG,2BAA2B,qBAAqB;IAC1D,MAAMK,EAASM,GAAU,QAAQ;IACjC,MAAM,kBAACC,GAAD,EAAM,MAAM,GAAK,CAAA;IACvB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOZ,EAAG,4BAA4B,SAAS;IAC/C,MAAMK,EAASM,GAAU,SAAS;IAClC,MAAM,kBAACE,GAAD,EAAS,MAAM,GAAK,CAAA;IAC1B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOb,EAAG,8BAA8B,WAAW;IACnD,MAAMK,EAASM,GAAU,WAAW;IACpC,MAAM,kBAACG,GAAD,EAAU,MAAM,GAAK,CAAA;IAC3B,OAAO;IACP,OAAO;GAET;GACA;IACE,IAAI;IACJ,OAAOd,EAAG,2BAA2B,QAAQ;IAC7C,MAAMK,EAASM,GAAU,QAAQ;IACjC,MAAM,kBAACI,GAAD,EAAK,MAAM,GAAK,CAAA;IACtB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAOf,EAAG,gCAAgC,aAAa;IACvD,MAAMK,EAASM,GAAU,aAAa;IACtC,MAAM,kBAACK,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;EACF;EAMA,OAHgBP,EAAiBC,CAG1B;CAET,GAAG;EAACD;EAAkBE;EAAUT;CAAC,CAAC,GAGlCM,QAAgB;EACd,IAAI,CAACS,GAAqB;EAE1B,IAAMC,IAA4B,CAChC;GACE,IAAI;GACJ,OAAOlB,EAAG,6BAA6B,qBAAqB;GAC5D,MAAM;GACN,OAAO;GACP,SAAS;EACX,CACF;EAGA,OADgBiB,EAAoBC,CAC7B;CAET,GAAG,CAACD,GAAqBf,CAAC,CAAC,GAGzB,kBAACiB,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAAnB,EACC,iCACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAACoB,GAAD;GAAqB,aAAa;GAAM,SAAQ;GAAS,gBAAgB;GACvE,UAAA,kBAACC,GAAD;IAAsB,GAAIvB;IACxB,UAAA,kBAACwB,GAAD,CAAqB,CAAA;GACD,CAAA;EACH,CAAA;CACR,CAAA;AAEnB"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Internal router for the Notification microfrontend.
3
+ * This component handles routing within the microfrontend using React Router v7.
4
+ *
5
+ * Routes:
6
+ * - / → Notification landing page
7
+ * - /list → Notification center (canonical list alias used by shell nav homePath)
8
+ * - /center → Notification center (in-app notifications)
9
+ * - /history → Notification history and archive
10
+ * - /templates → Notification templates list (admin)
11
+ * - /templates/new → Create new template (admin)
12
+ * - /templates/:templateId → Edit template (admin)
13
+ * - /create → Create and send notification (admin)
14
+ * - /topics → Manage topics (admin)
15
+ * - /preferences → User topic preferences
16
+ * - unmatched → Absolute redirect to /{basePath}/center (avoids relative redirect loops)
17
+ */
18
+ export declare function NotificationRoutes(): import('react').JSX.Element;