@burdenoff/microfe-channel 2026.731.1 → 2026.801.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/ChannelRoutes.js +1 -1
- package/dist/channel/ChannelRoutes.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/dist/channel/pages/ChannelLandingPage.js +1 -1
- package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
- package/dist/channel/providers/ChannelProvider.js +1 -1
- package/dist/channel/providers/ChannelProvider.js.map +1 -1
- package/package.json +3 -3
|
@@ -8,7 +8,7 @@ import { ChannelSettingsPage as o } from "../modules/channels/pages/ChannelSetti
|
|
|
8
8
|
import { FeatureNotEnabled as s } from "../components/FeatureNotEnabled.js";
|
|
9
9
|
import { useCallback as c, useMemo as l } from "react";
|
|
10
10
|
import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
-
import { useSearchParams as d } from "react-router
|
|
11
|
+
import { useSearchParams as d } from "react-router";
|
|
12
12
|
import { usePermissions as f } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
13
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
14
|
import { FeatureGate as h } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelLandingPage.js","names":[],"sources":["../../../src/channel/pages/ChannelLandingPage.tsx"],"sourcesContent":["import { useMemo, useCallback } from 'react';\nimport { useSearchParams } from 'react-router
|
|
1
|
+
{"version":3,"file":"ChannelLandingPage.js","names":[],"sources":["../../../src/channel/pages/ChannelLandingPage.tsx"],"sourcesContent":["import { useMemo, useCallback } from 'react';\nimport { useSearchParams } from 'react-router';\nimport type { ReactNode } from 'react';\nimport { Tabs, type TabItem } from '@burdenoff/fe-libs/chrome';\nimport { FeatureGate } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\n\nimport { ChannelDashboardPage } from '../modules/channels/pages/ChannelDashboardPage';\nimport { ChannelsListPage } from '../modules/channels/pages/ChannelsListPage';\nimport { ConnectionsListPage } from '../modules/channels/pages/ConnectionsListPage';\nimport { SendMessagePage } from '../modules/channels/pages/SendMessagePage';\nimport { ChannelSettingsPage } from '../modules/channels/pages/ChannelSettingsPage';\nimport { PermissionGuard } from '../components/PermissionGuard';\nimport { FeatureNotEnabled } from '../components/FeatureNotEnabled';\nimport { CHANNEL_PERMISSIONS } from '../constants/permissions';\n\n/**\n * Gate a landing tab's content by the SAME `channels.*` flag its standalone route\n * uses (see ChannelRoutes), so an explicit kill-switch flag is honoured here too.\n * defaultValue=true matches the route gates + the backend's default-on seeding.\n */\nfunction gatedTab(flag: string, element: ReactNode): ReactNode {\n return (\n <FeatureGate flag={flag} defaultValue={true} fallback={<FeatureNotEnabled flag={flag} />}>\n {element}\n </FeatureGate>\n );\n}\n\n/**\n * Tabbed landing page for the Channel microfrontend.\n *\n * The first tab (\"dashboard\") uses a clean URL with no `tab` query param.\n * Detail routes (e.g. /:channelId, /:channelId/edit) remain registered in\n * ChannelRoutes so existing deep links continue to work.\n */\nexport function ChannelLandingPage() {\n const [params, setParams] = useSearchParams();\n const { t } = useI18n();\n const { hasPermission } = usePermissions();\n // Send Message and Settings are write/admin surfaces; only surface their tabs\n // to users who can use them (otherwise a viewer clicks through to AccessDenied).\n const canSend = hasPermission(CHANNEL_PERMISSIONS.CHANNEL_DELIVERY_SEND);\n const canSettings = hasPermission(CHANNEL_PERMISSIONS.CHANNEL_UPDATE);\n const tr = useCallback(\n (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n },\n [t]\n );\n\n const tabs: TabItem[] = useMemo(\n () => [\n { id: 'dashboard', label: tr('channel.dashboard', 'Dashboard') },\n { id: 'all', label: tr('channel.allChannels', 'All Channels') },\n { id: 'connections', label: tr('channel.connections', 'Connections') },\n ...(canSend ? [{ id: 'send', label: tr('channel.sendMessage', 'Send Message') }] : []),\n ...(canSettings ? [{ id: 'settings', label: tr('channel.settings', 'Settings') }] : []),\n ],\n [tr, canSend, canSettings]\n );\n\n // Clamp the URL tab to the permission-filtered `tabs` list so a user cannot\n // deep-link to a hidden tab (e.g. ?tab=send without channel-delivery:send) and\n // have its content render. Unknown/hidden tabs fall back to the default tab.\n const requestedId = params.get('tab') ?? tabs[0].id;\n const activeId = tabs.some((tab) => tab.id === requestedId) ? requestedId : tabs[0].id;\n\n const handleTabChange = (id: string) => {\n const next = new URLSearchParams(params);\n if (id === tabs[0].id) {\n next.delete('tab');\n } else {\n next.set('tab', id);\n }\n setParams(next, { replace: true });\n };\n\n return (\n <PermissionGuard permission={CHANNEL_PERMISSIONS.CHANNEL_READ}>\n <div className=\"flex flex-col h-full\">\n <div className=\"border-b border-border-subtle px-4 pt-3\" data-tour=\"channels-landing-tabs\">\n <Tabs\n items={tabs}\n activeTabId={activeId}\n onTabChange={handleTabChange}\n variant=\"underline\"\n />\n </div>\n <div className=\"flex-1 min-h-0 overflow-auto\">\n {activeId === 'dashboard' && gatedTab('channels.dashboard', <ChannelDashboardPage />)}\n {activeId === 'all' && gatedTab('channels.list', <ChannelsListPage />)}\n {activeId === 'connections' &&\n gatedTab('channels.connections.list', <ConnectionsListPage />)}\n {activeId === 'send' && gatedTab('channels.send', <SendMessagePage />)}\n {activeId === 'settings' && gatedTab('channels.settings', <ChannelSettingsPage />)}\n </div>\n </div>\n </PermissionGuard>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsBA,SAAS,EAAS,GAAc,GAA+B;AAC7D,QACE,kBAAC,GAAD;EAAmB;EAAM,cAAc;EAAM,UAAU,kBAAC,GAAD,EAAyB,SAAQ,CAAA;YACrF;EACW,CAAA;;AAWlB,SAAgB,IAAqB;CACnC,IAAM,CAAC,GAAQ,KAAa,GAAiB,EACvC,EAAE,SAAM,GAAS,EACjB,EAAE,qBAAkB,GAAgB,EAGpC,IAAU,EAAc,EAAoB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D,EAAoB,CAAA,CAAC;KACrE,MAAa,iBACZ,EAAS,6BAA6B,kBAAC,GAAD,EAAuB,CAAA,CAAC;KAC/D,MAAa,UAAU,EAAS,iBAAiB,kBAAC,GAAD,EAAmB,CAAA,CAAC;KACrE,MAAa,cAAc,EAAS,qBAAqB,kBAAC,GAAD,EAAuB,CAAA,CAAC;KAC9E;MACF;;EACU,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createContext as e, use as t } from "react";
|
|
2
|
-
import { MemoryRouter as n } from "react-router
|
|
2
|
+
import { MemoryRouter as n } from "react-router";
|
|
3
3
|
import { PermissionProvider as r } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
4
4
|
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/channel/providers/ChannelProvider.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelProvider.js","names":[],"sources":["../../../src/channel/providers/ChannelProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport { createContext, use } from 'react';\nimport { MemoryRouter } from 'react-router
|
|
1
|
+
{"version":3,"file":"ChannelProvider.js","names":[],"sources":["../../../src/channel/providers/ChannelProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from 'react';\nimport { createContext, use } from 'react';\nimport { MemoryRouter } from 'react-router';\nimport { PermissionProvider } from '@burdenoff/fe-libs/shared/providers/shell';\nimport type { ChannelRootProps } from '../types';\n\n/**\n * Context value for Channel microfrontend\n */\ntype ChannelContextValue = ChannelRootProps;\n\nconst ChannelContext = createContext<ChannelContextValue | null>(null);\n\n/**\n * Hook to access Channel context\n */\nexport const useChannel = () => {\n const context = use(ChannelContext);\n if (!context) {\n throw new Error('useChannel must be used within ChannelProvider');\n }\n return context;\n};\n\n/**\n * Provider component for Channel microfrontend\n * Sets up routing and context\n *\n * When integrated into a shell (basePath provided), the shell already has a router\n * so we don't create another one. When standalone (no basePath), use MemoryRouter.\n */\nexport const ChannelProvider: FC<PropsWithChildren<ChannelRootProps>> = ({\n children,\n basePath,\n navigate,\n currentUser,\n workspaceId,\n organizationId,\n tenantId,\n apiGatewayUrl,\n authToken,\n registerNavItems,\n registerFooterItems,\n}) => {\n const contextValue: ChannelContextValue = {\n basePath,\n navigate,\n currentUser,\n workspaceId,\n organizationId,\n tenantId,\n apiGatewayUrl,\n authToken,\n registerNavItems,\n registerFooterItems,\n };\n\n // PermissionProvider requires the shell's AuthProvider — only mount it in integrated mode.\n // In standalone/dev mode (MemoryRouter path), there's no AuthProvider, so we skip it.\n const isIntegrated = !!basePath;\n\n const content = (\n <ChannelContext.Provider value={contextValue}>\n {isIntegrated ? (\n <PermissionProvider scopeId={organizationId ?? null} gateway=\"global\">\n {children}\n </PermissionProvider>\n ) : (\n children\n )}\n </ChannelContext.Provider>\n );\n\n // When integrated into a shell (basePath provided), the shell already has a router\n // so we don't create another one. When standalone (no basePath), use MemoryRouter.\n if (isIntegrated) {\n return content;\n }\n\n // Standalone mode: create MemoryRouter for independent operation\n return <MemoryRouter>{content}</MemoryRouter>;\n};\n"],"mappings":";;;;;AAWA,IAAM,IAAiB,EAA0C,KAAK,EAKzD,UAAmB;CAC9B,IAAM,IAAU,EAAI,EAAe;AACnC,KAAI,CAAC,EACH,OAAU,MAAM,iDAAiD;AAEnE,QAAO;GAUI,KAA4D,EACvE,aACA,aACA,aACA,gBACA,gBACA,mBACA,aACA,kBACA,cACA,qBACA,6BACI;CACJ,IAAM,IAAoC;EACxC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EAIK,IAAe,CAAC,CAAC,GAEjB,IACJ,kBAAC,EAAe,UAAhB;EAAyB,OAAO;YAC7B,IACC,kBAAC,GAAD;GAAoB,SAAS,KAAkB;GAAM,SAAQ;GAC1D;GACkB,CAAA,GAErB;EAEsB,CAAA;AAU5B,QALI,IACK,IAIF,kBAAC,GAAD,EAAA,UAAe,GAAuB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-channel",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.801.1",
|
|
4
4
|
"description": "Channel microfrontend for multi-channel communication management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@apollo/client": "^4.0.11",
|
|
40
|
-
"@burdenoff/fe-libs": "2026.
|
|
40
|
+
"@burdenoff/fe-libs": "2026.801.1",
|
|
41
41
|
"graphql": "^16.10.0",
|
|
42
42
|
"lucide-react": "^0.468.0",
|
|
43
43
|
"react": "^19.0.0",
|
|
44
44
|
"react-dom": "^19.0.0",
|
|
45
|
-
"react-router
|
|
45
|
+
"react-router": "^8.3.0",
|
|
46
46
|
"zustand": "^5.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|