@burdenoff/microfe-integrations 2026.1117.2 → 2026.1118.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/generated/global-types.d.ts +398 -121
- package/dist/generated/wspace-operations.d.ts +727 -0
- package/dist/generated/wspace-operations.js +453 -174
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +3838 -130
- package/dist/generated/wspace-types.js +28 -10
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/integrations/ConnectSourceDialog.js +30 -21
- package/dist/integrations/ConnectSourceDialog.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +32 -27
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/connected-apps/components/ActivitySections.d.ts +31 -0
- package/dist/integrations/connected-apps/components/ActivitySections.js +147 -0
- package/dist/integrations/connected-apps/components/ActivitySections.js.map +1 -0
- package/dist/integrations/connected-apps/components/AppItems.d.ts +26 -0
- package/dist/integrations/connected-apps/components/AppItems.js +171 -0
- package/dist/integrations/connected-apps/components/AppItems.js.map +1 -0
- package/dist/integrations/connected-apps/components/AppPanels.d.ts +48 -0
- package/dist/integrations/connected-apps/components/AppPanels.js +244 -0
- package/dist/integrations/connected-apps/components/AppPanels.js.map +1 -0
- package/dist/integrations/connected-apps/components/AppsSections.d.ts +30 -0
- package/dist/integrations/connected-apps/components/AppsSections.js +133 -0
- package/dist/integrations/connected-apps/components/AppsSections.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionActionDialogs.d.ts +30 -0
- package/dist/integrations/connected-apps/components/ConnectionActionDialogs.js +200 -0
- package/dist/integrations/connected-apps/components/ConnectionActionDialogs.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionActions.d.ts +38 -0
- package/dist/integrations/connected-apps/components/ConnectionActions.js +162 -0
- package/dist/integrations/connected-apps/components/ConnectionActions.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionHealth.d.ts +19 -0
- package/dist/integrations/connected-apps/components/ConnectionHealth.js +136 -0
- package/dist/integrations/connected-apps/components/ConnectionHealth.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionItems.d.ts +38 -0
- package/dist/integrations/connected-apps/components/ConnectionItems.js +358 -0
- package/dist/integrations/connected-apps/components/ConnectionItems.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionPanels.d.ts +37 -0
- package/dist/integrations/connected-apps/components/ConnectionPanels.js +248 -0
- package/dist/integrations/connected-apps/components/ConnectionPanels.js.map +1 -0
- package/dist/integrations/connected-apps/components/ConnectionsSections.d.ts +44 -0
- package/dist/integrations/connected-apps/components/ConnectionsSections.js +222 -0
- package/dist/integrations/connected-apps/components/ConnectionsSections.js.map +1 -0
- package/dist/integrations/connected-apps/components/Explainer.d.ts +3 -0
- package/dist/integrations/connected-apps/components/Explainer.js +56 -0
- package/dist/integrations/connected-apps/components/Explainer.js.map +1 -0
- package/dist/integrations/connected-apps/components/ListOrigin.d.ts +21 -0
- package/dist/integrations/connected-apps/components/ListOrigin.js +35 -0
- package/dist/integrations/connected-apps/components/ListOrigin.js.map +1 -0
- package/dist/integrations/connected-apps/components/Notices.d.ts +9 -0
- package/dist/integrations/connected-apps/components/Notices.js +71 -0
- package/dist/integrations/connected-apps/components/Notices.js.map +1 -0
- package/dist/integrations/connected-apps/components/PageFrame.d.ts +27 -0
- package/dist/integrations/connected-apps/components/PageFrame.js +55 -0
- package/dist/integrations/connected-apps/components/PageFrame.js.map +1 -0
- package/dist/integrations/connected-apps/components/Panels.d.ts +28 -0
- package/dist/integrations/connected-apps/components/Panels.js +50 -0
- package/dist/integrations/connected-apps/components/Panels.js.map +1 -0
- package/dist/integrations/connected-apps/components/Results.d.ts +50 -0
- package/dist/integrations/connected-apps/components/Results.js +129 -0
- package/dist/integrations/connected-apps/components/Results.js.map +1 -0
- package/dist/integrations/connected-apps/components/SearchPicker.d.ts +20 -0
- package/dist/integrations/connected-apps/components/SearchPicker.js +139 -0
- package/dist/integrations/connected-apps/components/SearchPicker.js.map +1 -0
- package/dist/integrations/connected-apps/components/StatusChip.d.ts +11 -0
- package/dist/integrations/connected-apps/components/StatusChip.js +40 -0
- package/dist/integrations/connected-apps/components/StatusChip.js.map +1 -0
- package/dist/integrations/connected-apps/components/Toolbar.d.ts +74 -0
- package/dist/integrations/connected-apps/components/Toolbar.js +216 -0
- package/dist/integrations/connected-apps/components/Toolbar.js.map +1 -0
- package/dist/integrations/connected-apps/components/styles.d.ts +12 -0
- package/dist/integrations/connected-apps/components/styles.js +15 -0
- package/dist/integrations/connected-apps/components/styles.js.map +1 -0
- package/dist/integrations/connected-apps/connect/AppPicker.d.ts +7 -0
- package/dist/integrations/connected-apps/connect/AppPicker.js +257 -0
- package/dist/integrations/connected-apps/connect/AppPicker.js.map +1 -0
- package/dist/integrations/connected-apps/connect/ConnectAppDialog.d.ts +18 -0
- package/dist/integrations/connected-apps/connect/ConnectAppDialog.js +224 -0
- package/dist/integrations/connected-apps/connect/ConnectAppDialog.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/useCanCreateConnection.d.ts +1 -0
- package/dist/integrations/connected-apps/hooks/useCanCreateConnection.js +10 -0
- package/dist/integrations/connected-apps/hooks/useCanCreateConnection.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/useConnectedAppsData.d.ts +372 -0
- package/dist/integrations/connected-apps/hooks/useConnectedAppsData.js +311 -0
- package/dist/integrations/connected-apps/hooks/useConnectedAppsData.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/useListState.d.ts +21 -0
- package/dist/integrations/connected-apps/hooks/useListState.js +43 -0
- package/dist/integrations/connected-apps/hooks/useListState.js.map +1 -0
- package/dist/integrations/connected-apps/hooks/usePageChrome.d.ts +12 -0
- package/dist/integrations/connected-apps/hooks/usePageChrome.js +46 -0
- package/dist/integrations/connected-apps/hooks/usePageChrome.js.map +1 -0
- package/dist/integrations/connected-apps/model/activity.d.ts +26 -0
- package/dist/integrations/connected-apps/model/activity.js +79 -0
- package/dist/integrations/connected-apps/model/activity.js.map +1 -0
- package/dist/integrations/connected-apps/model/apps.d.ts +68 -0
- package/dist/integrations/connected-apps/model/apps.js +101 -0
- package/dist/integrations/connected-apps/model/apps.js.map +1 -0
- package/dist/integrations/connected-apps/model/connections.d.ts +58 -0
- package/dist/integrations/connected-apps/model/connections.js +55 -0
- package/dist/integrations/connected-apps/model/connections.js.map +1 -0
- package/dist/integrations/connected-apps/model/health.d.ts +30 -0
- package/dist/integrations/connected-apps/model/health.js +54 -0
- package/dist/integrations/connected-apps/model/health.js.map +1 -0
- package/dist/integrations/connected-apps/model/queries.d.ts +56 -0
- package/dist/integrations/connected-apps/model/queries.js +117 -0
- package/dist/integrations/connected-apps/model/queries.js.map +1 -0
- package/dist/integrations/connected-apps/model/status.d.ts +36 -0
- package/dist/integrations/connected-apps/model/status.js +73 -0
- package/dist/integrations/connected-apps/model/status.js.map +1 -0
- package/dist/integrations/connected-apps/model/translate.d.ts +2 -0
- package/dist/integrations/connected-apps/model/urlState.d.ts +52 -0
- package/dist/integrations/connected-apps/model/urlState.js +87 -0
- package/dist/integrations/connected-apps/model/urlState.js.map +1 -0
- package/dist/integrations/connected-apps/pages/ActivityPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/ActivityPage.js +261 -0
- package/dist/integrations/connected-apps/pages/ActivityPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/AppDetailsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/AppDetailsPage.js +163 -0
- package/dist/integrations/connected-apps/pages/AppDetailsPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/AppsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/AppsPage.js +209 -0
- package/dist/integrations/connected-apps/pages/AppsPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionDetailsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionDetailsPage.js +240 -0
- package/dist/integrations/connected-apps/pages/ConnectionDetailsPage.js.map +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionsPage.d.ts +1 -0
- package/dist/integrations/connected-apps/pages/ConnectionsPage.js +254 -0
- package/dist/integrations/connected-apps/pages/ConnectionsPage.js.map +1 -0
- package/dist/integrations/providers/IntegrationsProvider.js +22 -21
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +426 -0
- package/dist/integrations/types/index.d.ts +9 -0
- package/package.json +9 -9
|
@@ -2,30 +2,30 @@ import { IntegrationsProvider as e } from "./providers/IntegrationsProvider.js";
|
|
|
2
2
|
import { AddConnectionDialog as t } from "./components/AddConnectionDialog.js";
|
|
3
3
|
import { ConnectionModalFrame as n } from "./components/ConnectionModalFrame.js";
|
|
4
4
|
import { useTr as r } from "./hooks/useTr.js";
|
|
5
|
-
import {
|
|
6
|
-
import { ErrorBoundary as
|
|
7
|
-
import { jsx as
|
|
5
|
+
import { Suspense as i, lazy as a, useCallback as o } from "react";
|
|
6
|
+
import { ErrorBoundary as s } from "@burdenoff/fe-libs/shared/components";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
8
|
// src/integrations/ConnectSourceDialog.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
9
|
+
var u = "connect-source-error-title", d = a(() => import("./connected-apps/connect/ConnectAppDialog.js").then((e) => ({ default: e.ConnectAppDialog })));
|
|
10
|
+
function f({ onClose: e }) {
|
|
11
11
|
let t = r();
|
|
12
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ l(n, {
|
|
13
13
|
onClose: e,
|
|
14
|
-
labelledBy:
|
|
14
|
+
labelledBy: u,
|
|
15
15
|
presentation: "sheet",
|
|
16
16
|
size: "notice",
|
|
17
17
|
testId: "connect-source-error",
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
id:
|
|
19
|
+
/* @__PURE__ */ c("h2", {
|
|
20
|
+
id: u,
|
|
21
21
|
className: "text-lg font-semibold text-text-primary",
|
|
22
22
|
children: t("integrations.errorBoundary.title", "Something went wrong loading this module.")
|
|
23
23
|
}),
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ c("p", {
|
|
25
25
|
className: "text-sm text-text-secondary",
|
|
26
26
|
children: t("integrations.errorBoundary.refresh", "Please refresh the page.")
|
|
27
27
|
}),
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ c("button", {
|
|
29
29
|
type: "button",
|
|
30
30
|
onClick: e,
|
|
31
31
|
className: "px-4 py-2 text-sm font-medium rounded-md border border-border-subtle hover:bg-accent transition-colors",
|
|
@@ -34,22 +34,31 @@ function l({ onClose: e }) {
|
|
|
34
34
|
]
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
var
|
|
38
|
-
let
|
|
39
|
-
return n ? /* @__PURE__ */
|
|
40
|
-
fallback: /* @__PURE__ */
|
|
41
|
-
children: /* @__PURE__ */
|
|
37
|
+
var p = ({ open: n, onOpenChange: a, onConnectionCreated: l, ...u }) => {
|
|
38
|
+
let p = r(), m = o(() => a(!1), [a]);
|
|
39
|
+
return n ? /* @__PURE__ */ c(s, {
|
|
40
|
+
fallback: /* @__PURE__ */ c(f, { onClose: m }),
|
|
41
|
+
children: /* @__PURE__ */ c(e, {
|
|
42
42
|
...u,
|
|
43
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: u.connectedAppsRedesign ? /* @__PURE__ */ c(i, {
|
|
44
|
+
fallback: null,
|
|
45
|
+
children: /* @__PURE__ */ c(d, {
|
|
46
|
+
open: !0,
|
|
47
|
+
onClose: m,
|
|
48
|
+
presentation: "sheet",
|
|
49
|
+
pickerTitle: p("integrations.connectSource.title", "Connect a source"),
|
|
50
|
+
onConnectionCreated: l
|
|
51
|
+
})
|
|
52
|
+
}) : /* @__PURE__ */ c(t, {
|
|
44
53
|
open: !0,
|
|
45
|
-
onClose:
|
|
54
|
+
onClose: m,
|
|
46
55
|
presentation: "sheet",
|
|
47
|
-
pickerTitle:
|
|
48
|
-
onConnectionCreated:
|
|
56
|
+
pickerTitle: p("integrations.connectSource.title", "Connect a source"),
|
|
57
|
+
onConnectionCreated: l
|
|
49
58
|
})
|
|
50
59
|
})
|
|
51
60
|
}) : null;
|
|
52
61
|
};
|
|
53
|
-
export {
|
|
62
|
+
export { p as ConnectSourceDialog };
|
|
54
63
|
|
|
55
64
|
//# sourceMappingURL=ConnectSourceDialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectSourceDialog.js","names":["FALLBACK_TITLE_ID","ConnectSourceErrorFallback","tr","useTr","ConnectionModalFrame","onClose","ConnectSourceDialog","integrationsProps","close","useCallback","onOpenChange","open","ErrorBoundary","IntegrationsProvider","AddConnectionDialog"],"sources":["../../src/integrations/ConnectSourceDialog.tsx"],"sourcesContent":["/**\n * ConnectSourceDialog: \"Connect a source\" over whatever page the user is on.\n *\n * ★★ WHY (BOFF-8158). The assistant's attach menu offers \"Connect a source\".\n * Two hosts navigated to `/integrations/connections`, where the assistant panel\n * then covered the page's \"Add Connection\" button. The other two put the whole\n * Connections PAGE (`ConnectionsPanel`) into a 512 px Radix dialog, so \"Add\n * Connection\" opened a second dialog nested in the first, laid out against the\n * host's transformed box, with the form 0 px wide on phones.\n *\n * This is ONE modal: centred on desktop, a bottom sheet below `md`. It opens\n * straight on the provider picker, then the credential form, then Connect in an\n * always-visible footer. The content is `AddConnectionDialog`'s own, so it is\n * the same connection screen every product already uses, not a second one.\n *\n * ★ It never navigates. There is no `<Routes>` in here (an `IntegrationsRoot`\n * inside a dialog would match the host's URL and fall through to its\n * `<Navigate>`), and nothing calls `navigate` when it opens.\n *\n * ★ Hosts render THIS as the modal. Do not wrap it in another dialog: it\n * portals to `document.body`, and a host modal's focus trap would fight it.\n *\n * @example\n * ```tsx\n * const [open, setOpen] = useState(false);\n * useEffect(() => {\n * const onConnect = () => setOpen(true);\n * window.addEventListener(CONNECT_SOURCE_EVENT, onConnect);\n * return () => window.removeEventListener(CONNECT_SOURCE_EVENT, onConnect);\n * }, []);\n *\n * <ConnectSourceDialog\n * open={open}\n * onOpenChange={setOpen}\n * basePath=\"/integrations\"\n * {...protectedWorkspaceBaseProps}\n * navigate={navigate}\n * />\n * ```\n */\nimport { useCallback, type FC } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { IntegrationsProvider } from './providers/IntegrationsProvider';\nimport { AddConnectionDialog } from './components/AddConnectionDialog';\nimport { ConnectionModalFrame } from './components/ConnectionModalFrame';\nimport { useTr } from './hooks/useTr';\nimport type { ConnectionsPanelProps } from './ConnectionsPanel';\n\n/**\n * The base props hosts already pass `ConnectionsPanel` / `IntegrationsRoot`\n * (`basePath`, `navigate`, `workspaceId`, tokens, ...), plus the open state in\n * the same `open` / `onOpenChange` shape as the dialog it replaces.\n *\n * ★ Pass `basePath` as the routed mount does. Without it `IntegrationsProvider`\n * runs standalone and creates its own router, which throws inside a host router.\n */\nexport type ConnectSourceDialogProps = ConnectionsPanelProps & {\n /** Whether the dialog is showing. It renders nothing while closed. */\n open: boolean;\n /** Called with `false` when the user closes it (X, Cancel, Escape, backdrop). */\n onOpenChange: (open: boolean) => void;\n /** Called with the new connection's id once it is created and authenticated. */\n onConnectionCreated?: (connectionId: string) => void;\n};\n\nconst FALLBACK_TITLE_ID = 'connect-source-error-title';\n\n/**\n * Shown if the connection screen throws. Rendered inside the same frame so the\n * failure stays a dismissible modal instead of text dropped into the host page\n * wherever the dialog is mounted.\n */\nfunction ConnectSourceErrorFallback({ onClose }: { onClose: () => void }) {\n const tr = useTr();\n return (\n <ConnectionModalFrame\n onClose={onClose}\n labelledBy={FALLBACK_TITLE_ID}\n presentation=\"sheet\"\n size=\"notice\"\n testId=\"connect-source-error\"\n >\n <h2 id={FALLBACK_TITLE_ID} className=\"text-lg font-semibold text-text-primary\">\n {tr('integrations.errorBoundary.title', 'Something went wrong loading this module.')}\n </h2>\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.errorBoundary.refresh', 'Please refresh the page.')}\n </p>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"px-4 py-2 text-sm font-medium rounded-md border border-border-subtle hover:bg-accent transition-colors\"\n >\n {tr('integrations.common.close', 'Close')}\n </button>\n </ConnectionModalFrame>\n );\n}\n\nexport const ConnectSourceDialog: FC<ConnectSourceDialogProps> = ({\n open,\n onOpenChange,\n onConnectionCreated,\n ...integrationsProps\n}) => {\n const tr = useTr();\n const close = useCallback(() => onOpenChange(false), [onOpenChange]);\n\n // Unmounted while closed: nothing is fetched until the user asks, and every\n // open starts fresh on the picker (and with a reset error boundary).\n if (!open) return null;\n\n return (\n <ErrorBoundary fallback={<ConnectSourceErrorFallback onClose={close} />}>\n <IntegrationsProvider {...integrationsProps}>\n <AddConnectionDialog\n
|
|
1
|
+
{"version":3,"file":"ConnectSourceDialog.js","names":["FALLBACK_TITLE_ID","ConnectAppDialog","lazy","m","ConnectSourceErrorFallback","tr","useTr","ConnectionModalFrame","onClose","ConnectSourceDialog","integrationsProps","close","useCallback","onOpenChange","open","ErrorBoundary","IntegrationsProvider","Suspense","AddConnectionDialog"],"sources":["../../src/integrations/ConnectSourceDialog.tsx"],"sourcesContent":["/**\n * ConnectSourceDialog: \"Connect a source\" over whatever page the user is on.\n *\n * ★★ WHY (BOFF-8158). The assistant's attach menu offers \"Connect a source\".\n * Two hosts navigated to `/integrations/connections`, where the assistant panel\n * then covered the page's \"Add Connection\" button. The other two put the whole\n * Connections PAGE (`ConnectionsPanel`) into a 512 px Radix dialog, so \"Add\n * Connection\" opened a second dialog nested in the first, laid out against the\n * host's transformed box, with the form 0 px wide on phones.\n *\n * This is ONE modal: centred on desktop, a bottom sheet below `md`. It opens\n * straight on the provider picker, then the credential form, then Connect in an\n * always-visible footer. The content is `AddConnectionDialog`'s own, so it is\n * the same connection screen every product already uses, not a second one.\n *\n * ★ It never navigates. There is no `<Routes>` in here (an `IntegrationsRoot`\n * inside a dialog would match the host's URL and fall through to its\n * `<Navigate>`), and nothing calls `navigate` when it opens.\n *\n * ★ Hosts render THIS as the modal. Do not wrap it in another dialog: it\n * portals to `document.body`, and a host modal's focus trap would fight it.\n *\n * @example\n * ```tsx\n * const [open, setOpen] = useState(false);\n * useEffect(() => {\n * const onConnect = () => setOpen(true);\n * window.addEventListener(CONNECT_SOURCE_EVENT, onConnect);\n * return () => window.removeEventListener(CONNECT_SOURCE_EVENT, onConnect);\n * }, []);\n *\n * <ConnectSourceDialog\n * open={open}\n * onOpenChange={setOpen}\n * basePath=\"/integrations\"\n * {...protectedWorkspaceBaseProps}\n * navigate={navigate}\n * />\n * ```\n */\nimport { lazy, Suspense, useCallback, type FC } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { IntegrationsProvider } from './providers/IntegrationsProvider';\nimport { AddConnectionDialog } from './components/AddConnectionDialog';\nimport { ConnectionModalFrame } from './components/ConnectionModalFrame';\nimport { useTr } from './hooks/useTr';\nimport type { ConnectionsPanelProps } from './ConnectionsPanel';\n\n/**\n * The base props hosts already pass `ConnectionsPanel` / `IntegrationsRoot`\n * (`basePath`, `navigate`, `workspaceId`, tokens, ...), plus the open state in\n * the same `open` / `onOpenChange` shape as the dialog it replaces.\n *\n * ★ Pass `basePath` as the routed mount does. Without it `IntegrationsProvider`\n * runs standalone and creates its own router, which throws inside a host router.\n */\nexport type ConnectSourceDialogProps = ConnectionsPanelProps & {\n /** Whether the dialog is showing. It renders nothing while closed. */\n open: boolean;\n /** Called with `false` when the user closes it (X, Cancel, Escape, backdrop). */\n onOpenChange: (open: boolean) => void;\n /** Called with the new connection's id once it is created and authenticated. */\n onConnectionCreated?: (connectionId: string) => void;\n};\n\nconst FALLBACK_TITLE_ID = 'connect-source-error-title';\n\n/** Loaded only by hosts that opt into the redesigned Connected apps (BOFF-15373). */\nconst ConnectAppDialog = lazy(() =>\n import('./connected-apps/connect/ConnectAppDialog').then((m) => ({\n default: m.ConnectAppDialog,\n }))\n);\n\n/**\n * Shown if the connection screen throws. Rendered inside the same frame so the\n * failure stays a dismissible modal instead of text dropped into the host page\n * wherever the dialog is mounted.\n */\nfunction ConnectSourceErrorFallback({ onClose }: { onClose: () => void }) {\n const tr = useTr();\n return (\n <ConnectionModalFrame\n onClose={onClose}\n labelledBy={FALLBACK_TITLE_ID}\n presentation=\"sheet\"\n size=\"notice\"\n testId=\"connect-source-error\"\n >\n <h2 id={FALLBACK_TITLE_ID} className=\"text-lg font-semibold text-text-primary\">\n {tr('integrations.errorBoundary.title', 'Something went wrong loading this module.')}\n </h2>\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.errorBoundary.refresh', 'Please refresh the page.')}\n </p>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"px-4 py-2 text-sm font-medium rounded-md border border-border-subtle hover:bg-accent transition-colors\"\n >\n {tr('integrations.common.close', 'Close')}\n </button>\n </ConnectionModalFrame>\n );\n}\n\nexport const ConnectSourceDialog: FC<ConnectSourceDialogProps> = ({\n open,\n onOpenChange,\n onConnectionCreated,\n ...integrationsProps\n}) => {\n const tr = useTr();\n const close = useCallback(() => onOpenChange(false), [onOpenChange]);\n\n // Unmounted while closed: nothing is fetched until the user asks, and every\n // open starts fresh on the picker (and with a reset error boundary).\n if (!open) return null;\n\n return (\n <ErrorBoundary fallback={<ConnectSourceErrorFallback onClose={close} />}>\n <IntegrationsProvider {...integrationsProps}>\n {/* BOFF-15373: the redesigned picker (searched on the server, paged)\n for hosts that opt into the redesigned Connected apps. */}\n {integrationsProps.connectedAppsRedesign ? (\n <Suspense fallback={null}>\n <ConnectAppDialog\n open\n onClose={close}\n presentation=\"sheet\"\n pickerTitle={tr('integrations.connectSource.title', 'Connect a source')}\n onConnectionCreated={onConnectionCreated}\n />\n </Suspense>\n ) : (\n <AddConnectionDialog\n open\n onClose={close}\n presentation=\"sheet\"\n pickerTitle={tr('integrations.connectSource.title', 'Connect a source')}\n onConnectionCreated={onConnectionCreated}\n />\n )}\n </IntegrationsProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;AAiEA,IAAMA,IAAoB,8BAGpBC,IAAmBC,QACvB,OAAO,+CAA4C,CAAC,MAAM,OAAO,EAC/D,SAASC,EAAE,iBACb,EAAE,CACJ;AAOA,SAASC,EAA2B,EAAE,cAAoC;CACxE,IAAMC,IAAKC,EAAM;CACjB,OACE,kBAACC,GAAD;EACW;EACT,YAAYP;EACZ,cAAa;EACb,MAAK;EACL,QAAO;EALT,UAAA;GAOE,kBAAC,MAAD;IAAI,IAAIA;IAAmB,WAAU;IAClC,UAAAK,EAAG,oCAAoC,2CAA2C;GACjF,CAAA;GACJ,kBAAC,KAAD;IAAG,WAAU;IACV,UAAAA,EAAG,sCAAsC,0BAA0B;GACnE,CAAA;GACH,kBAAC,UAAD;IACE,MAAK;IACL,SAASG;IACT,WAAU;IAET,UAAAH,EAAG,6BAA6B,OAAO;GAClC,CAAA;EACY;;AAE1B;AAEA,IAAaI,KAAqD,EAChE,SACA,iBACA,wBACA,GAAGC,QACC;CACJ,IAAML,IAAKC,EAAM,GACXK,IAAQC,QAAkBC,EAAa,EAAK,GAAG,CAACA,CAAY,CAAC;CAMnE,OAFKC,IAGH,kBAACC,GAAD;EAAe,UAAU,kBAACX,GAAD,EAA4B,SAASO,EAAQ,CAAA;EACpE,UAAA,kBAACK,GAAD;GAAsB,GAAIN;GAGvB,UAAAA,EAAkB,wBACjB,kBAACO,GAAD;IAAU,UAAU;IAClB,UAAA,kBAAChB,GAAD;KACE,MAAA;KACA,SAASU;KACT,cAAa;KACb,aAAaN,EAAG,oCAAoC,kBAAkB;KACjD;IACtB,CAAA;GACO,CAAA,IAEV,kBAACa,GAAD;IACE,MAAA;IACA,SAASP;IACT,cAAa;IACb,aAAaN,EAAG,oCAAoC,kBAAkB;IACjD;GACtB,CAAA;EAEiB,CAAA;CACT,CAAA,IA3BC;AA6BpB"}
|
|
@@ -7,37 +7,42 @@ import { AlertTriangle as s, Loader2 as c, RefreshCw as l } from "lucide-react";
|
|
|
7
7
|
import { Navigate as u, Route as d, Routes as f, useLocation as p, useNavigate as m, useParams as h, useSearchParams as g } from "react-router";
|
|
8
8
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
9
|
// src/integrations/IntegrationsUserRoutes.tsx
|
|
10
|
-
var y = o(() => import("./pages/ProviderCatalog.js").then((e) => ({ default: e.ProviderCatalog }))), b = o(() => import("./pages/ProviderDetail.js").then((e) => ({ default: e.ProviderDetail }))), x = o(() => import("./pages/ConnectionsList.js").then((e) => ({ default: e.ConnectionsList }))), S = o(() => import("./pages/AddConnectionWizard.js").then((e) => ({ default: e.AddConnectionWizard }))), C = o(() => import("./pages/ConnectionDetail.js").then((e) => ({ default: e.ConnectionDetail }))), w = o(() => import("./pages/ConnectorSubmissionsPage.js").then((e) => ({ default: e.ConnectorSubmissionsPage }))), T = o(() => import("./pages/MailboxInbox.js").then((e) => ({ default: e.MailboxInbox }))), E = o(() => import("./pages/ConnectionLogs.js").then((e) => ({ default: e.ConnectionLogs }))), D = /* @__PURE__ */ new Set([
|
|
10
|
+
var y = o(() => import("./pages/ProviderCatalog.js").then((e) => ({ default: e.ProviderCatalog }))), b = o(() => import("./pages/ProviderDetail.js").then((e) => ({ default: e.ProviderDetail }))), x = o(() => import("./pages/ConnectionsList.js").then((e) => ({ default: e.ConnectionsList }))), S = o(() => import("./pages/AddConnectionWizard.js").then((e) => ({ default: e.AddConnectionWizard }))), C = o(() => import("./pages/ConnectionDetail.js").then((e) => ({ default: e.ConnectionDetail }))), w = o(() => import("./pages/ConnectorSubmissionsPage.js").then((e) => ({ default: e.ConnectorSubmissionsPage }))), T = o(() => import("./pages/MailboxInbox.js").then((e) => ({ default: e.MailboxInbox }))), E = o(() => import("./pages/ConnectionLogs.js").then((e) => ({ default: e.ConnectionLogs }))), D = o(() => import("./connected-apps/pages/ConnectionsPage.js").then((e) => ({ default: e.ConnectionsPage }))), O = o(() => import("./connected-apps/pages/AppsPage.js").then((e) => ({ default: e.AppsPage }))), k = o(() => import("./connected-apps/pages/AppDetailsPage.js").then((e) => ({ default: e.AppDetailsPage }))), A = o(() => import("./connected-apps/pages/ConnectionDetailsPage.js").then((e) => ({ default: e.ConnectionDetailsPage }))), j = o(() => import("./connected-apps/pages/ActivityPage.js").then((e) => ({ default: e.ActivityPage }))), M = o(() => import("./connected-apps/connect/ConnectAppDialog.js").then((e) => ({ default: e.ConnectAppDialog }))), N = /* @__PURE__ */ new Set([
|
|
11
11
|
"slack-user",
|
|
12
12
|
"teams-user",
|
|
13
13
|
"discord-user"
|
|
14
14
|
]);
|
|
15
|
-
function
|
|
16
|
-
let { basePath: r } = t(), { providerId:
|
|
17
|
-
return
|
|
15
|
+
function P() {
|
|
16
|
+
let { basePath: r, connectedAppsRedesign: i } = t(), { providerId: a } = h(), { search: o } = p(), s = m(), c = new URLSearchParams(o), l = c.get("providerKey");
|
|
17
|
+
return c.get("returnTo") && c.get("channelId") && l && N.has(l) ? /* @__PURE__ */ _(S, {}) : i ? /* @__PURE__ */ _(M, {
|
|
18
18
|
open: !0,
|
|
19
|
-
onClose: () =>
|
|
20
|
-
preselectedProviderId:
|
|
21
|
-
preselectedProviderKey:
|
|
19
|
+
onClose: () => s(n(r ?? "/", "connections")),
|
|
20
|
+
preselectedProviderId: a ?? null,
|
|
21
|
+
preselectedProviderKey: l
|
|
22
|
+
}) : /* @__PURE__ */ _(e, {
|
|
23
|
+
open: !0,
|
|
24
|
+
onClose: () => s(n(r ?? "/", "connections")),
|
|
25
|
+
preselectedProviderId: a,
|
|
26
|
+
preselectedProviderKey: l
|
|
22
27
|
});
|
|
23
28
|
}
|
|
24
|
-
function
|
|
25
|
-
let [
|
|
26
|
-
return
|
|
29
|
+
function F() {
|
|
30
|
+
let { connectedAppsRedesign: e } = t(), [n] = g(), r = n.get("tab");
|
|
31
|
+
return r === "providers" ? /* @__PURE__ */ _(u, {
|
|
27
32
|
to: "providers",
|
|
28
33
|
replace: !0
|
|
29
|
-
}) :
|
|
34
|
+
}) : r === "logs" ? /* @__PURE__ */ _(u, {
|
|
30
35
|
to: "logs",
|
|
31
36
|
replace: !0
|
|
32
|
-
}) :
|
|
37
|
+
}) : _(e ? D : x, {});
|
|
33
38
|
}
|
|
34
|
-
function
|
|
39
|
+
function I() {
|
|
35
40
|
return /* @__PURE__ */ _("div", {
|
|
36
41
|
className: "flex items-center justify-center min-h-[400px]",
|
|
37
42
|
children: /* @__PURE__ */ _(c, { className: "size-8 animate-spin text-primary" })
|
|
38
43
|
});
|
|
39
44
|
}
|
|
40
|
-
var
|
|
45
|
+
var L = class extends i {
|
|
41
46
|
constructor(e) {
|
|
42
47
|
super(e), this.state = {
|
|
43
48
|
hasError: !1,
|
|
@@ -89,38 +94,38 @@ var j = class extends i {
|
|
|
89
94
|
}) : /* @__PURE__ */ _("div", { children: this.props.children }, this.state.retryKey);
|
|
90
95
|
}
|
|
91
96
|
};
|
|
92
|
-
function
|
|
93
|
-
let { basePath: e, navigationV2: n } = t(),
|
|
94
|
-
return
|
|
95
|
-
fallback: /* @__PURE__ */ _(
|
|
97
|
+
function R() {
|
|
98
|
+
let { basePath: e, navigationV2: n, connectedAppsRedesign: i } = t(), o = p(), s = e && e !== "/" ? e.endsWith("/") ? e.slice(0, -1) : e : "";
|
|
99
|
+
return s && !(o.pathname === s || o.pathname.startsWith(s + "/")) ? null : /* @__PURE__ */ _(L, { children: /* @__PURE__ */ _(a, {
|
|
100
|
+
fallback: /* @__PURE__ */ _(I, {}),
|
|
96
101
|
children: /* @__PURE__ */ v(f, { children: [
|
|
97
102
|
/* @__PURE__ */ _(d, {
|
|
98
103
|
index: !0,
|
|
99
|
-
element: _(n ?
|
|
104
|
+
element: _(n || i ? F : r, {})
|
|
100
105
|
}),
|
|
101
106
|
/* @__PURE__ */ _(d, {
|
|
102
107
|
path: "providers",
|
|
103
|
-
element:
|
|
108
|
+
element: _(i ? O : y, {})
|
|
104
109
|
}),
|
|
105
110
|
/* @__PURE__ */ _(d, {
|
|
106
111
|
path: "providers/:providerId",
|
|
107
|
-
element:
|
|
112
|
+
element: _(i ? k : b, {})
|
|
108
113
|
}),
|
|
109
114
|
/* @__PURE__ */ _(d, {
|
|
110
115
|
path: "connections",
|
|
111
|
-
element:
|
|
116
|
+
element: _(i ? D : x, {})
|
|
112
117
|
}),
|
|
113
118
|
/* @__PURE__ */ _(d, {
|
|
114
119
|
path: "connections/add",
|
|
115
|
-
element: /* @__PURE__ */ _(
|
|
120
|
+
element: /* @__PURE__ */ _(P, {})
|
|
116
121
|
}),
|
|
117
122
|
/* @__PURE__ */ _(d, {
|
|
118
123
|
path: "connections/add/:providerId",
|
|
119
|
-
element: /* @__PURE__ */ _(
|
|
124
|
+
element: /* @__PURE__ */ _(P, {})
|
|
120
125
|
}),
|
|
121
126
|
/* @__PURE__ */ _(d, {
|
|
122
127
|
path: "connections/:connectionId",
|
|
123
|
-
element:
|
|
128
|
+
element: _(i ? A : C, {})
|
|
124
129
|
}),
|
|
125
130
|
/* @__PURE__ */ _(d, {
|
|
126
131
|
path: "developer/connectors",
|
|
@@ -132,7 +137,7 @@ function M() {
|
|
|
132
137
|
}),
|
|
133
138
|
/* @__PURE__ */ _(d, {
|
|
134
139
|
path: "logs",
|
|
135
|
-
element:
|
|
140
|
+
element: _(i ? j : E, {})
|
|
136
141
|
}),
|
|
137
142
|
/* @__PURE__ */ _(d, {
|
|
138
143
|
path: "*",
|
|
@@ -144,6 +149,6 @@ function M() {
|
|
|
144
149
|
] })
|
|
145
150
|
}) });
|
|
146
151
|
}
|
|
147
|
-
export {
|
|
152
|
+
export { F as ConnectedAppsLanding, R as IntegrationsUserRoutes };
|
|
148
153
|
|
|
149
154
|
//# sourceMappingURL=IntegrationsUserRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsUserRoutes.js","names":["ProviderCatalog","lazy","m","ProviderDetail","ConnectionsList","AddConnectionWizard","ConnectionDetail","ConnectorSubmissionsPage","MailboxInbox","ConnectionLogs","BOTLIT_CHANNEL_PROVIDER_KEYS","ConnectionAddRoute","useIntegrations","useParams","useLocation","navigate","useNavigate","params","search","providerKey","AddConnectionDialog","joinPath","basePath","providerId","ConnectedAppsLanding","useSearchParams","tab","Navigate","PageLoader","Loader2","LazyErrorBoundary","Component","props","error","errorInfo","prev","AlertTriangle","RefreshCw","IntegrationsUserRoutes","location","normalizedBasePath","Suspense","Routes","Route","jsx","navigationV2","IntegrationsUserLandingPage"],"sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, Component, type ReactNode, type ErrorInfo } from 'react';\nimport {\n Navigate,\n Route,\n Routes,\n useLocation,\n useNavigate,\n useParams,\n useSearchParams,\n} from 'react-router';\nimport { Loader2, AlertTriangle, RefreshCw } from 'lucide-react';\nimport { AddConnectionDialog } from './components/AddConnectionDialog';\nimport { useIntegrations } from './providers/IntegrationsProvider';\nimport { joinPath } from './utils/navigation';\n\n// Eager loaded - primary landing page\nimport { IntegrationsUserLandingPage } from './pages/IntegrationsUserLandingPage';\n\n// Lazy loaded pages\nconst ProviderCatalog = lazy(() =>\n import('./pages/ProviderCatalog').then((m) => ({ default: m.ProviderCatalog }))\n);\nconst ProviderDetail = lazy(() =>\n import('./pages/ProviderDetail').then((m) => ({ default: m.ProviderDetail }))\n);\nconst ConnectionsList = lazy(() =>\n import('./pages/ConnectionsList').then((m) => ({ default: m.ConnectionsList }))\n);\nconst AddConnectionWizard = lazy(() =>\n import('./pages/AddConnectionWizard').then((m) => ({ default: m.AddConnectionWizard }))\n);\nconst ConnectionDetail = lazy(() =>\n import('./pages/ConnectionDetail').then((m) => ({ default: m.ConnectionDetail }))\n);\nconst ConnectorSubmissionsPage = lazy(() =>\n import('./pages/ConnectorSubmissionsPage').then((m) => ({\n default: m.ConnectorSubmissionsPage,\n }))\n);\nconst MailboxInbox = lazy(() =>\n import('./pages/MailboxInbox').then((m) => ({ default: m.MailboxInbox }))\n);\nconst ConnectionLogs = lazy(() =>\n import('./pages/ConnectionLogs').then((m) => ({ default: m.ConnectionLogs }))\n);\n\nconst BOTLIT_CHANNEL_PROVIDER_KEYS = new Set(['slack-user', 'teams-user', 'discord-user']);\n\n/** Deep links use the same schema-driven dialog as the Connections and provider pages. */\nfunction ConnectionAddRoute() {\n const { basePath } = useIntegrations();\n const { providerId } = useParams<{ providerId: string }>();\n const { search } = useLocation();\n const navigate = useNavigate();\n const params = new URLSearchParams(search);\n const providerKey = params.get('providerKey');\n\n // Botlit's existing channel setup needs its full-page OAuth return redirect.\n // Other deep links (including the FluidGrids channel picker) must honor the\n // shared dialog's provider/method storage policy instead of the old wizard.\n if (\n params.get('returnTo') &&\n params.get('channelId') &&\n providerKey &&\n BOTLIT_CHANNEL_PROVIDER_KEYS.has(providerKey)\n ) {\n return <AddConnectionWizard />;\n }\n\n return (\n <AddConnectionDialog\n open\n onClose={() => navigate(joinPath(basePath ?? '/', 'connections'))}\n preselectedProviderId={providerId}\n preselectedProviderKey={providerKey}\n />\n );\n}\n\n/**\n * Navigation v2's Connected apps landing (BOFF-11875): the list itself, no tab\n * strip. Every old `?tab=` link still opens its page: Providers is \"All apps\"\n * and Activity Logs is \"Activity logs\", one click deeper; Overview and\n * Connections are this list.\n */\nexport function ConnectedAppsLanding() {\n const [params] = useSearchParams();\n const tab = params.get('tab');\n if (tab === 'providers') return <Navigate to=\"providers\" replace />;\n if (tab === 'logs') return <Navigate to=\"logs\" replace />;\n return <ConnectionsList />;\n}\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null; retryKey: number }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null, retryKey: 0 };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[Integrations] Lazy page load failed:', error, errorInfo);\n }\n\n handleRetry = () => {\n // Increment retryKey to force React to remount the lazy tree,\n // which triggers a fresh dynamic import instead of reusing the cached rejection.\n this.setState((prev) => ({ hasError: false, error: null, retryKey: prev.retryKey + 1 }));\n };\n\n override render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Failed to load page</h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {this.state.error?.message ||\n 'The page chunk could not be loaded. This may be due to a network issue.'}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return <div key={this.state.retryKey}>{this.props.children}</div>;\n }\n}\n\n/**\n * User-facing routes for the Integrations microfrontend.\n *\n * Includes: Overview, Providers, Connections, Activity Logs.\n * Excludes admin features: Settings.\n */\nexport function IntegrationsUserRoutes() {\n const { basePath, navigationV2 } = useIntegrations();\n const location = useLocation();\n\n const normalizedBasePath =\n basePath && basePath !== '/' ? (basePath.endsWith('/') ? basePath.slice(0, -1) : basePath) : '';\n\n if (normalizedBasePath) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <LazyErrorBoundary>\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route\n index\n element={navigationV2 ? <ConnectedAppsLanding /> : <IntegrationsUserLandingPage />}\n />\n\n {/* Providers (lazy loaded) */}\n <Route path=\"providers\" element={<ProviderCatalog />} />\n <Route path=\"providers/:providerId\" element={<ProviderDetail />} />\n\n {/* Connections (lazy loaded) */}\n <Route path=\"connections\" element={<ConnectionsList />} />\n <Route path=\"connections/add\" element={<ConnectionAddRoute />} />\n <Route path=\"connections/add/:providerId\" element={<ConnectionAddRoute />} />\n <Route path=\"connections/:connectionId\" element={<ConnectionDetail />} />\n\n {/* Third-party connector publishing (BOFF-4417) */}\n <Route path=\"developer/connectors\" element={<ConnectorSubmissionsPage />} />\n\n {/* Connected mailbox (lazy loaded, BOFF-4422) */}\n <Route path=\"inbox\" element={<MailboxInbox />} />\n\n {/* Logs (lazy loaded) */}\n <Route path=\"logs\" element={<ConnectionLogs />} />\n\n {/* Catch-all: a stale link lands on the module's first page. `to=\"\"`\n resolved to the current URL and rendered a blank page. */}\n <Route path=\"*\" element={<Navigate to=\"..\" replace />} />\n </Routes>\n </Suspense>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,IAAMA,IAAkBC,QACtB,OAAO,6BAA0B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,gBAAgB,EAAE,CAChF,GACMC,IAAiBF,QACrB,OAAO,4BAAyB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,eAAe,EAAE,CAC9E,GACME,IAAkBH,QACtB,OAAO,6BAA0B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,gBAAgB,EAAE,CAChF,GACMG,IAAsBJ,QAC1B,OAAO,iCAA8B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,oBAAoB,EAAE,CACxF,GACMI,IAAmBL,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,iBAAiB,EAAE,CAClF,GACMK,IAA2BN,QAC/B,OAAO,sCAAmC,CAAC,MA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AAa,CAAA;EAC/B,UAAA,kBAACc,GAAD,EAAA,UAAA;GAEE,kBAACC,GAAD;IACE,OAAA;IACA,SAAwBC,EAAfC,IAAgBrB,IAA2BsB,GAA5B,CAAuB,CAAkC;GAClF,CAAA;GAGD,kBAACH,GAAD;IAAO,MAAK;IAAY,SAAS,kBAAC3C,GAAD,CAAkB,CAAA;GAAI,CAAA;GACvD,kBAAC2C,GAAD;IAAO,MAAK;IAAwB,SAAS,kBAACxC,GAAD,CAAiB,CAAA;GAAI,CAAA;GAGlE,kBAACwC,GAAD;IAAO,MAAK;IAAc,SAAS,kBAACvC,GAAD,CAAkB,CAAA;GAAI,CAAA;GACzD,kBAACuC,GAAD;IAAO,MAAK;IAAkB,SAAS,kBAAChC,GAAD,CAAqB,CAAA;GAAI,CAAA;GAChE,kBAACgC,GAAD;IAAO,MAAK;IAA8B,SAAS,kBAAChC,GAAD,CAAqB,CAAA;GAAI,CAAA;GAC5E,kBAACgC,GAAD;IAAO,MAAK;IAA4B,SAAS,kBAACrC,GAAD,CAAmB,CAAA;GAAI,CAAA;GAGxE,kBAACqC,GAAD;IAAO,MAAK;IAAuB,SAAS,kBAACpC,GAAD,CAA2B,CAAA;GAAI,CAAA;GAG3E,kBAACoC,GAAD;IAAO,MAAK;IAAQ,SAAS,kBAACnC,GAAD,CAAe,CAAA;GAAI,CAAA;GAGhD,kBAACmC,GAAD;IAAO,MAAK;IAAO,SAAS,kBAAClC,GAAD,CAAiB,CAAA;GAAI,CAAA;GAIjD,kBAACkC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAChB,GAAD;KAAU,IAAG;KAAK,SAAA;IAAS,CAAA;GAAI,CAAA;EAClD,EAAA,CAAA;CACA,CAAA,EACO,CAAA;AAEvB"}
|
|
1
|
+
{"version":3,"file":"IntegrationsUserRoutes.js","names":["ProviderCatalog","lazy","m","ProviderDetail","ConnectionsList","AddConnectionWizard","ConnectionDetail","ConnectorSubmissionsPage","MailboxInbox","ConnectionLogs","ConnectionsPage","AppsPage","AppDetailsPage","ConnectionDetailsPage","ActivityPage","ConnectAppDialog","BOTLIT_CHANNEL_PROVIDER_KEYS","ConnectionAddRoute","useIntegrations","useParams","useLocation","navigate","useNavigate","params","search","providerKey","connectedAppsRedesign","joinPath","basePath","providerId","AddConnectionDialog","ConnectedAppsLanding","useSearchParams","tab","Navigate","jsx","PageLoader","Loader2","LazyErrorBoundary","Component","props","error","errorInfo","prev","AlertTriangle","RefreshCw","IntegrationsUserRoutes","location","normalizedBasePath","Suspense","Routes","Route","navigationV2","IntegrationsUserLandingPage"],"sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, Component, type ReactNode, type ErrorInfo } from 'react';\nimport {\n Navigate,\n Route,\n Routes,\n useLocation,\n useNavigate,\n useParams,\n useSearchParams,\n} from 'react-router';\nimport { Loader2, AlertTriangle, RefreshCw } from 'lucide-react';\nimport { AddConnectionDialog } from './components/AddConnectionDialog';\nimport { useIntegrations } from './providers/IntegrationsProvider';\nimport { joinPath } from './utils/navigation';\n\n// Eager loaded - primary landing page\nimport { IntegrationsUserLandingPage } from './pages/IntegrationsUserLandingPage';\n\n// Lazy loaded pages\nconst ProviderCatalog = lazy(() =>\n import('./pages/ProviderCatalog').then((m) => ({ default: m.ProviderCatalog }))\n);\nconst ProviderDetail = lazy(() =>\n import('./pages/ProviderDetail').then((m) => ({ default: m.ProviderDetail }))\n);\nconst ConnectionsList = lazy(() =>\n import('./pages/ConnectionsList').then((m) => ({ default: m.ConnectionsList }))\n);\nconst AddConnectionWizard = lazy(() =>\n import('./pages/AddConnectionWizard').then((m) => ({ default: m.AddConnectionWizard }))\n);\nconst ConnectionDetail = lazy(() =>\n import('./pages/ConnectionDetail').then((m) => ({ default: m.ConnectionDetail }))\n);\nconst ConnectorSubmissionsPage = lazy(() =>\n import('./pages/ConnectorSubmissionsPage').then((m) => ({\n default: m.ConnectorSubmissionsPage,\n }))\n);\nconst MailboxInbox = lazy(() =>\n import('./pages/MailboxInbox').then((m) => ({ default: m.MailboxInbox }))\n);\nconst ConnectionLogs = lazy(() =>\n import('./pages/ConnectionLogs').then((m) => ({ default: m.ConnectionLogs }))\n);\n\n// The redesigned Connected apps (BOFF-15373), behind `connectedAppsRedesign`.\nconst ConnectionsPage = lazy(() =>\n import('./connected-apps/pages/ConnectionsPage').then((m) => ({ default: m.ConnectionsPage }))\n);\nconst AppsPage = lazy(() =>\n import('./connected-apps/pages/AppsPage').then((m) => ({ default: m.AppsPage }))\n);\nconst AppDetailsPage = lazy(() =>\n import('./connected-apps/pages/AppDetailsPage').then((m) => ({ default: m.AppDetailsPage }))\n);\nconst ConnectionDetailsPage = lazy(() =>\n import('./connected-apps/pages/ConnectionDetailsPage').then((m) => ({\n default: m.ConnectionDetailsPage,\n }))\n);\nconst ActivityPage = lazy(() =>\n import('./connected-apps/pages/ActivityPage').then((m) => ({ default: m.ActivityPage }))\n);\nconst ConnectAppDialog = lazy(() =>\n import('./connected-apps/connect/ConnectAppDialog').then((m) => ({\n default: m.ConnectAppDialog,\n }))\n);\n\nconst BOTLIT_CHANNEL_PROVIDER_KEYS = new Set(['slack-user', 'teams-user', 'discord-user']);\n\n/** Deep links use the same schema-driven dialog as the Connections and provider pages. */\nfunction ConnectionAddRoute() {\n const { basePath, connectedAppsRedesign } = useIntegrations();\n const { providerId } = useParams<{ providerId: string }>();\n const { search } = useLocation();\n const navigate = useNavigate();\n const params = new URLSearchParams(search);\n const providerKey = params.get('providerKey');\n\n // Botlit's existing channel setup needs its full-page OAuth return redirect.\n // Other deep links (including the FluidGrids channel picker) must honor the\n // shared dialog's provider/method storage policy instead of the old wizard.\n if (\n params.get('returnTo') &&\n params.get('channelId') &&\n providerKey &&\n BOTLIT_CHANNEL_PROVIDER_KEYS.has(providerKey)\n ) {\n return <AddConnectionWizard />;\n }\n\n if (connectedAppsRedesign) {\n return (\n <ConnectAppDialog\n open\n onClose={() => navigate(joinPath(basePath ?? '/', 'connections'))}\n preselectedProviderId={providerId ?? null}\n preselectedProviderKey={providerKey}\n />\n );\n }\n\n return (\n <AddConnectionDialog\n open\n onClose={() => navigate(joinPath(basePath ?? '/', 'connections'))}\n preselectedProviderId={providerId}\n preselectedProviderKey={providerKey}\n />\n );\n}\n\n/**\n * Navigation v2's Connected apps landing (BOFF-11875): the list itself, no tab\n * strip. Every old `?tab=` link still opens its page: Providers is \"All apps\"\n * and Activity Logs is \"Activity logs\", one click deeper; Overview and\n * Connections are this list.\n */\nexport function ConnectedAppsLanding() {\n const { connectedAppsRedesign } = useIntegrations();\n const [params] = useSearchParams();\n const tab = params.get('tab');\n if (tab === 'providers') return <Navigate to=\"providers\" replace />;\n if (tab === 'logs') return <Navigate to=\"logs\" replace />;\n return connectedAppsRedesign ? <ConnectionsPage /> : <ConnectionsList />;\n}\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null; retryKey: number }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null, retryKey: 0 };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n override componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[Integrations] Lazy page load failed:', error, errorInfo);\n }\n\n handleRetry = () => {\n // Increment retryKey to force React to remount the lazy tree,\n // which triggers a fresh dynamic import instead of reusing the cached rejection.\n this.setState((prev) => ({ hasError: false, error: null, retryKey: prev.retryKey + 1 }));\n };\n\n override render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Failed to load page</h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {this.state.error?.message ||\n 'The page chunk could not be loaded. This may be due to a network issue.'}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return <div key={this.state.retryKey}>{this.props.children}</div>;\n }\n}\n\n/**\n * User-facing routes for the Integrations microfrontend.\n *\n * Includes: Overview, Providers, Connections, Activity Logs.\n * Excludes admin features: Settings.\n */\nexport function IntegrationsUserRoutes() {\n const { basePath, navigationV2, connectedAppsRedesign } = useIntegrations();\n const location = useLocation();\n\n const normalizedBasePath =\n basePath && basePath !== '/' ? (basePath.endsWith('/') ? basePath.slice(0, -1) : basePath) : '';\n\n if (normalizedBasePath) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <LazyErrorBoundary>\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route\n index\n element={\n navigationV2 || connectedAppsRedesign ? (\n <ConnectedAppsLanding />\n ) : (\n <IntegrationsUserLandingPage />\n )\n }\n />\n\n {/* Providers (lazy loaded) */}\n <Route\n path=\"providers\"\n element={connectedAppsRedesign ? <AppsPage /> : <ProviderCatalog />}\n />\n <Route\n path=\"providers/:providerId\"\n element={connectedAppsRedesign ? <AppDetailsPage /> : <ProviderDetail />}\n />\n\n {/* Connections (lazy loaded) */}\n <Route\n path=\"connections\"\n element={connectedAppsRedesign ? <ConnectionsPage /> : <ConnectionsList />}\n />\n <Route path=\"connections/add\" element={<ConnectionAddRoute />} />\n <Route path=\"connections/add/:providerId\" element={<ConnectionAddRoute />} />\n <Route\n path=\"connections/:connectionId\"\n element={connectedAppsRedesign ? <ConnectionDetailsPage /> : <ConnectionDetail />}\n />\n\n {/* Third-party connector publishing (BOFF-4417) */}\n <Route path=\"developer/connectors\" element={<ConnectorSubmissionsPage />} />\n\n {/* Connected mailbox (lazy loaded, BOFF-4422) */}\n <Route path=\"inbox\" element={<MailboxInbox />} />\n\n {/* Logs (lazy loaded) */}\n <Route\n path=\"logs\"\n element={connectedAppsRedesign ? <ActivityPage /> : <ConnectionLogs />}\n />\n\n {/* Catch-all: a stale link lands on the module's first page. `to=\"\"`\n resolved to the current URL and rendered a blank page. */}\n <Route path=\"*\" element={<Navigate to=\"..\" replace />} />\n </Routes>\n </Suspense>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAmBA,IAAMA,IAAkBC,QACtB,OAAO,6BAA0B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,gBAAgB,EAAE,CAChF,GACMC,IAAiBF,QACrB,OAAO,4BAAyB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,eAAe,EAAE,CAC9E,GACME,IAAkBH,QACtB,OAAO,6BAA0B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,gBAAgB,EAAE,CAChF,GACMG,IAAsBJ,QAC1B,OAAO,iCAA8B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,oBAAoB,EAAE,CACxF,GACMI,IAAmBL,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,iBAAiB,EAAE,CAClF,GACMK,IAA2BN,QAC/B,OAAO,sCAAmC,CAAC,MAAM,OAAO,EACtD,SAASC,EAAE,yBACb,EAAE,CACJ,GACMM,IAAeP,QACnB,OAAO,0BAAuB,CAAC,MAAM,OAAO,EAAE,SAASC,EAAE,aAAa,EAAE,CAC1E,GACMO,IAAiBR,QACrB,OAAO,4BAAyB,CAAC,MAAM,OAAO,EAAE,SAASC,EA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IAAyBb,IAA4BP,GAA7B,CAAwB,CAAuB;GACjF,CAAA;GAGD,kBAAC6C,GAAD;IAAO,MAAK;IAAuB,SAAS,kBAAC5C,GAAD,CAA2B,CAAA;GAAI,CAAA;GAG3E,kBAAC4C,GAAD;IAAO,MAAK;IAAQ,SAAS,kBAAC3C,GAAD,CAAe,CAAA;GAAI,CAAA;GAGhD,kBAAC2C,GAAD;IACE,MAAK;IACL,SAAiChB,EAAxBT,IAAyBZ,IAAmBL,GAApB,CAAe,CAAqB;GACtE,CAAA;GAID,kBAAC0C,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACjB,GAAD;KAAU,IAAG;KAAK,SAAA;IAAS,CAAA;GAAI,CAAA;EAClD,EAAA,CAAA;CACA,CAAA,EACO,CAAA;AAEvB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ConnectionNameRecord } from '../hooks/useConnectedAppsData';
|
|
2
|
+
import { ActivityEvent } from '../model/activity';
|
|
3
|
+
/** The page for someone whose role can't read the logs. */
|
|
4
|
+
export declare function ActivityDenied({ connectionsPath }: {
|
|
5
|
+
connectionsPath: string;
|
|
6
|
+
}): import('react').JSX.Element;
|
|
7
|
+
/** "Showing activity for <name>", with the way to its page and back to everything. */
|
|
8
|
+
export declare function ConnectionScopeBanner({ name, connectionPath, onShowAll, }: {
|
|
9
|
+
/** Undefined until the connection's name has loaded. */
|
|
10
|
+
name: string | undefined;
|
|
11
|
+
connectionPath: string;
|
|
12
|
+
onShowAll: () => void;
|
|
13
|
+
}): import('react').JSX.Element;
|
|
14
|
+
interface ActivityRowsProps {
|
|
15
|
+
events: ActivityEvent[];
|
|
16
|
+
/** Names the list for assistive tech (the results heading). */
|
|
17
|
+
label: string;
|
|
18
|
+
/** Each event's connection, once its name has loaded. */
|
|
19
|
+
connectionOf: (event: ActivityEvent) => ConnectionNameRecord | undefined;
|
|
20
|
+
/** False on a page scoped to one connection: every row would name it. */
|
|
21
|
+
showConnection: boolean;
|
|
22
|
+
connectionPath: (id: string) => string;
|
|
23
|
+
/** Where a connection's Back link returns: this page, as it is now. */
|
|
24
|
+
origin: {
|
|
25
|
+
from: string;
|
|
26
|
+
fromLabel: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** One page of events, newest first, errors in red. */
|
|
30
|
+
export declare function ActivityRows({ events, label, ...row }: ActivityRowsProps): import('react').JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { LogLevel as e } from "../../../generated/wspace-types.js";
|
|
2
|
+
import { useFormatDate as t } from "../../hooks/useFormatDate.js";
|
|
3
|
+
import { useFormatLastUsed as n } from "../../hooks/useFormatLastUsed.js";
|
|
4
|
+
import { useTr as r } from "../../hooks/useTr.js";
|
|
5
|
+
import { cn as i } from "../../utils/cn.js";
|
|
6
|
+
import { actionLabel as a, levelLabel as o, levelTone as s } from "../model/activity.js";
|
|
7
|
+
import { PageFrame as c, PageHeader as l } from "./PageFrame.js";
|
|
8
|
+
import { CONTROL_RING as u, TONE_PILL as d } from "./styles.js";
|
|
9
|
+
import { AlertCircle as f, AlertTriangle as p, Bug as m, Info as h, Lock as g, ScrollText as _ } from "lucide-react";
|
|
10
|
+
import { Link as v } from "react-router";
|
|
11
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
|
+
import { Button as S, GalleryPanel as C } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
// src/integrations/connected-apps/components/ActivitySections.tsx
|
|
14
|
+
var w = {
|
|
15
|
+
[e.Error]: f,
|
|
16
|
+
[e.Warning]: p,
|
|
17
|
+
[e.Info]: h,
|
|
18
|
+
[e.Debug]: m
|
|
19
|
+
};
|
|
20
|
+
function T({ connectionsPath: e }) {
|
|
21
|
+
let t = r();
|
|
22
|
+
return /* @__PURE__ */ x(c, {
|
|
23
|
+
testId: "connected-apps-activity",
|
|
24
|
+
children: [/* @__PURE__ */ b(l, { title: t("integrations.connectedApps.activityLogs", "Activity logs") }), /* @__PURE__ */ b(C, {
|
|
25
|
+
icon: /* @__PURE__ */ b(g, {
|
|
26
|
+
className: "size-5 text-text-secondary",
|
|
27
|
+
"aria-hidden": "true"
|
|
28
|
+
}),
|
|
29
|
+
title: t("integrations.connectedApps.activity.deniedTitle", "You don’t have access to activity logs"),
|
|
30
|
+
text: t("integrations.connectedApps.activity.deniedText", "Ask a workspace admin to add the permission to your role."),
|
|
31
|
+
children: /* @__PURE__ */ b(S, {
|
|
32
|
+
variant: "outline",
|
|
33
|
+
asChild: !0,
|
|
34
|
+
children: /* @__PURE__ */ b(v, {
|
|
35
|
+
to: e,
|
|
36
|
+
children: t("integrations.connectedApps.detail.backToList", "Back to your connections")
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function E({ name: e, connectionPath: t, onShowAll: n }) {
|
|
43
|
+
let a = r();
|
|
44
|
+
return /* @__PURE__ */ x("div", {
|
|
45
|
+
className: "mb-4 flex flex-col gap-2 rounded-xl border border-border-subtle bg-bg-sunken p-3 text-sm sm:flex-row sm:items-center",
|
|
46
|
+
"data-testid": "activity-connection-scope",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ b(_, {
|
|
49
|
+
className: "size-4 shrink-0 text-text-secondary",
|
|
50
|
+
"aria-hidden": "true"
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ b("span", {
|
|
53
|
+
className: "min-w-0 flex-1 text-text-primary",
|
|
54
|
+
children: e ? a("integrations.logs.scope.connection", "Showing activity for {{name}}", { name: e }) : a("integrations.connectedApps.activity.scopeOne", "Showing activity for one connection")
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ x("span", {
|
|
57
|
+
className: "flex flex-wrap items-center gap-3",
|
|
58
|
+
children: [/* @__PURE__ */ b(v, {
|
|
59
|
+
to: t,
|
|
60
|
+
className: i("rounded-md font-medium text-text-link hover:underline", u),
|
|
61
|
+
children: a("integrations.connectedApps.activity.openConnection", "Open the connection")
|
|
62
|
+
}), /* @__PURE__ */ b(S, {
|
|
63
|
+
size: "sm",
|
|
64
|
+
variant: "outline",
|
|
65
|
+
onClick: n,
|
|
66
|
+
children: a("integrations.connectedApps.activity.scopeAll", "Show every connection")
|
|
67
|
+
})]
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function D({ level: e }) {
|
|
73
|
+
let t = r(), n = w[e];
|
|
74
|
+
return /* @__PURE__ */ x("span", {
|
|
75
|
+
className: i("inline-flex w-[5.5rem] shrink-0 items-center gap-1 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold", d[s(e)]),
|
|
76
|
+
"data-testid": "activity-level",
|
|
77
|
+
"data-level": e,
|
|
78
|
+
children: [/* @__PURE__ */ b(n, {
|
|
79
|
+
className: "size-3.5",
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
}), o(t, e)]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function O() {
|
|
85
|
+
return /* @__PURE__ */ b("span", {
|
|
86
|
+
"aria-hidden": "true",
|
|
87
|
+
children: "·"
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function k({ events: e, label: t, ...n }) {
|
|
91
|
+
return /* @__PURE__ */ b("ul", {
|
|
92
|
+
className: "overflow-hidden rounded-xl border border-border-subtle bg-bg-elevated",
|
|
93
|
+
"aria-label": t,
|
|
94
|
+
"data-testid": "activity-rows",
|
|
95
|
+
children: e.map((e) => /* @__PURE__ */ b(A, {
|
|
96
|
+
event: e,
|
|
97
|
+
...n
|
|
98
|
+
}, e.id))
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
function A({ event: o, connectionOf: s, showConnection: c, connectionPath: l, origin: u }) {
|
|
102
|
+
let d = r(), f = t(), p = n(), m = c ? s(o) : void 0, h = o.level === e.Error;
|
|
103
|
+
return /* @__PURE__ */ x("li", {
|
|
104
|
+
className: i("flex flex-col gap-1.5 border-t border-border-subtle px-3.5 py-3 first:border-t-0 sm:flex-row sm:items-start sm:gap-3", h && "bg-status-error-bg-subtle/60"),
|
|
105
|
+
"data-testid": "activity-row",
|
|
106
|
+
"data-level": o.level,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ b(D, { level: o.level }),
|
|
109
|
+
/* @__PURE__ */ x("div", {
|
|
110
|
+
className: "min-w-0 flex-1",
|
|
111
|
+
children: [/* @__PURE__ */ b("p", {
|
|
112
|
+
className: i("break-words text-sm", h ? "text-status-error-text" : "text-text-primary"),
|
|
113
|
+
children: o.message
|
|
114
|
+
}), /* @__PURE__ */ x("div", {
|
|
115
|
+
className: "mt-0.5 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-text-muted",
|
|
116
|
+
children: [
|
|
117
|
+
/* @__PURE__ */ b("span", { children: a(d, o.action) }),
|
|
118
|
+
m && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(O, {}), /* @__PURE__ */ b(v, {
|
|
119
|
+
to: l(m.id),
|
|
120
|
+
state: u,
|
|
121
|
+
className: i("rounded-md text-text-secondary hover:underline", "outline-none focus-visible:ring-2 focus-visible:ring-accent-glow"),
|
|
122
|
+
"data-testid": "activity-connection",
|
|
123
|
+
children: m.name
|
|
124
|
+
})] }),
|
|
125
|
+
o.responseStatus !== null && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(O, {}), /* @__PURE__ */ b("span", {
|
|
126
|
+
className: i("font-mono", o.responseStatus >= 400 ? "text-status-error-text" : "text-text-secondary"),
|
|
127
|
+
children: o.responseStatus
|
|
128
|
+
})] }),
|
|
129
|
+
o.requestUrl && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(O, {}), /* @__PURE__ */ x("span", {
|
|
130
|
+
className: "min-w-0 max-w-full truncate font-mono",
|
|
131
|
+
children: [o.requestMethod ? `${o.requestMethod} ` : "", o.requestUrl]
|
|
132
|
+
})] })
|
|
133
|
+
]
|
|
134
|
+
})]
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ b("time", {
|
|
137
|
+
dateTime: o.createdAt,
|
|
138
|
+
title: f(o.createdAt),
|
|
139
|
+
className: "shrink-0 text-xs tabular-nums text-text-muted",
|
|
140
|
+
children: p(o.createdAt)
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
export { T as ActivityDenied, k as ActivityRows, E as ConnectionScopeBanner };
|
|
146
|
+
|
|
147
|
+
//# sourceMappingURL=ActivitySections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivitySections.js","names":["Link","_Fragment","Link$1","LEVEL_ICONS","LogLevel","AlertCircle","AlertTriangle","Info","Bug","ActivityDenied","tr","useTr","PageFrame","PageHeader","GalleryPanel","Lock","Button","connectionsPath","ConnectionScopeBanner","ScrollText","name","connectionPath","cn","CONTROL_RING","onShowAll","LevelChip","Icon","level","TONE_PILL","levelTone","levelLabel","Separator","ActivityRows","row","label","events","ActivityRow","event","formatDate","useFormatDate","formatWhen","useFormatLastUsed","connection","showConnection","connectionOf","error","actionLabel","Fragment","origin"],"sources":["../../../../src/integrations/connected-apps/components/ActivitySections.tsx"],"sourcesContent":["/**\n * The parts of Activity logs (BOFF-15373): the no-access state, the banner\n * of a page scoped to one connection, and the event rows (errors red,\n * warnings yellow).\n */\nimport { Link } from 'react-router';\nimport { AlertCircle, AlertTriangle, Bug, Info, Lock, ScrollText } from 'lucide-react';\nimport { Button, GalleryPanel } from '@burdenoff/fe-libs/ui';\n\nimport { LogLevel } from '../../../generated/wspace-types';\nimport { useFormatDate } from '../../hooks/useFormatDate';\nimport { useFormatLastUsed } from '../../hooks/useFormatLastUsed';\nimport { useTr } from '../../hooks/useTr';\nimport { cn } from '../../utils/cn';\nimport type { ConnectionNameRecord } from '../hooks/useConnectedAppsData';\nimport { actionLabel, levelLabel, levelTone, type ActivityEvent } from '../model/activity';\nimport { PageFrame, PageHeader } from './PageFrame';\nimport { CONTROL_RING, TONE_PILL } from './styles';\n\nconst LEVEL_ICONS: Record<LogLevel, typeof Info> = {\n [LogLevel.Error]: AlertCircle,\n [LogLevel.Warning]: AlertTriangle,\n [LogLevel.Info]: Info,\n [LogLevel.Debug]: Bug,\n};\n\n/** The page for someone whose role can't read the logs. */\nexport function ActivityDenied({ connectionsPath }: { connectionsPath: string }) {\n const tr = useTr();\n return (\n <PageFrame testId=\"connected-apps-activity\">\n <PageHeader title={tr('integrations.connectedApps.activityLogs', 'Activity logs')} />\n <GalleryPanel\n icon={<Lock className=\"size-5 text-text-secondary\" aria-hidden=\"true\" />}\n title={tr(\n 'integrations.connectedApps.activity.deniedTitle',\n 'You don’t have access to activity logs'\n )}\n text={tr(\n 'integrations.connectedApps.activity.deniedText',\n 'Ask a workspace admin to add the permission to your role.'\n )}\n >\n <Button variant=\"outline\" asChild>\n <Link to={connectionsPath}>\n {tr('integrations.connectedApps.detail.backToList', 'Back to your connections')}\n </Link>\n </Button>\n </GalleryPanel>\n </PageFrame>\n );\n}\n\n/** \"Showing activity for <name>\", with the way to its page and back to everything. */\nexport function ConnectionScopeBanner({\n name,\n connectionPath,\n onShowAll,\n}: {\n /** Undefined until the connection's name has loaded. */\n name: string | undefined;\n connectionPath: string;\n onShowAll: () => void;\n}) {\n const tr = useTr();\n return (\n <div\n className=\"mb-4 flex flex-col gap-2 rounded-xl border border-border-subtle bg-bg-sunken p-3 text-sm sm:flex-row sm:items-center\"\n data-testid=\"activity-connection-scope\"\n >\n <ScrollText className=\"size-4 shrink-0 text-text-secondary\" aria-hidden=\"true\" />\n <span className=\"min-w-0 flex-1 text-text-primary\">\n {name\n ? tr('integrations.logs.scope.connection', 'Showing activity for {{name}}', { name })\n : tr(\n 'integrations.connectedApps.activity.scopeOne',\n 'Showing activity for one connection'\n )}\n </span>\n <span className=\"flex flex-wrap items-center gap-3\">\n <Link\n to={connectionPath}\n className={cn('rounded-md font-medium text-text-link hover:underline', CONTROL_RING)}\n >\n {tr('integrations.connectedApps.activity.openConnection', 'Open the connection')}\n </Link>\n <Button size=\"sm\" variant=\"outline\" onClick={onShowAll}>\n {tr('integrations.connectedApps.activity.scopeAll', 'Show every connection')}\n </Button>\n </span>\n </div>\n );\n}\n\nfunction LevelChip({ level }: { level: LogLevel }) {\n const tr = useTr();\n const Icon = LEVEL_ICONS[level];\n return (\n <span\n className={cn(\n 'inline-flex w-[5.5rem] shrink-0 items-center gap-1 whitespace-nowrap rounded-full border px-2 py-0.5 text-xs font-semibold',\n TONE_PILL[levelTone(level)]\n )}\n data-testid=\"activity-level\"\n data-level={level}\n >\n <Icon className=\"size-3.5\" aria-hidden=\"true\" />\n {levelLabel(tr, level)}\n </span>\n );\n}\n\nfunction Separator() {\n return <span aria-hidden=\"true\">·</span>;\n}\n\ninterface ActivityRowsProps {\n events: ActivityEvent[];\n /** Names the list for assistive tech (the results heading). */\n label: string;\n /** Each event's connection, once its name has loaded. */\n connectionOf: (event: ActivityEvent) => ConnectionNameRecord | undefined;\n /** False on a page scoped to one connection: every row would name it. */\n showConnection: boolean;\n connectionPath: (id: string) => string;\n /** Where a connection's Back link returns: this page, as it is now. */\n origin: { from: string; fromLabel: string };\n}\n\n/** One page of events, newest first, errors in red. */\nexport function ActivityRows({ events, label, ...row }: ActivityRowsProps) {\n return (\n <ul\n className=\"overflow-hidden rounded-xl border border-border-subtle bg-bg-elevated\"\n aria-label={label}\n data-testid=\"activity-rows\"\n >\n {events.map((event) => (\n <ActivityRow key={event.id} event={event} {...row} />\n ))}\n </ul>\n );\n}\n\nfunction ActivityRow({\n event,\n connectionOf,\n showConnection,\n connectionPath,\n origin,\n}: Omit<ActivityRowsProps, 'events' | 'label'> & { event: ActivityEvent }) {\n const tr = useTr();\n const formatDate = useFormatDate();\n const formatWhen = useFormatLastUsed();\n const connection = showConnection ? connectionOf(event) : undefined;\n const error = event.level === LogLevel.Error;\n return (\n <li\n className={cn(\n 'flex flex-col gap-1.5 border-t border-border-subtle px-3.5 py-3 first:border-t-0 sm:flex-row sm:items-start sm:gap-3',\n error && 'bg-status-error-bg-subtle/60'\n )}\n data-testid=\"activity-row\"\n data-level={event.level}\n >\n <LevelChip level={event.level} />\n <div className=\"min-w-0 flex-1\">\n <p\n className={cn(\n 'break-words text-sm',\n error ? 'text-status-error-text' : 'text-text-primary'\n )}\n >\n {event.message}\n </p>\n <div className=\"mt-0.5 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-text-muted\">\n <span>{actionLabel(tr, event.action)}</span>\n {connection && (\n <>\n <Separator />\n <Link\n to={connectionPath(connection.id)}\n state={origin}\n className={cn('rounded-md text-text-secondary hover:underline', CONTROL_RING)}\n data-testid=\"activity-connection\"\n >\n {connection.name}\n </Link>\n </>\n )}\n {event.responseStatus !== null && (\n <>\n <Separator />\n <span\n className={cn(\n 'font-mono',\n event.responseStatus >= 400 ? 'text-status-error-text' : 'text-text-secondary'\n )}\n >\n {event.responseStatus}\n </span>\n </>\n )}\n {event.requestUrl && (\n <>\n <Separator />\n <span className=\"min-w-0 max-w-full truncate font-mono\">\n {event.requestMethod ? `${event.requestMethod} ` : ''}\n {event.requestUrl}\n </span>\n </>\n )}\n </div>\n </div>\n <time\n dateTime={event.createdAt}\n title={formatDate(event.createdAt)}\n className=\"shrink-0 text-xs tabular-nums text-text-muted\"\n >\n {formatWhen(event.createdAt)}\n </time>\n </li>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAmBA,IAAMG,IAA6C;EAChDC,EAAS,QAAQC;EACjBD,EAAS,UAAUE;EACnBF,EAAS,OAAOG;EAChBH,EAAS,QAAQI;AACpB;AAGA,SAAgBC,EAAe,EAAE,sBAAgD;CAC/E,IAAMC,IAAKC,EAAM;CACjB,OACE,kBAACC,GAAD;EAAW,QAAO;EAAlB,UAAA,CACE,kBAACC,GAAD,EAAY,OAAOH,EAAG,2CAA2C,eAAe,EAAI,CAAA,GACpF,kBAACI,GAAD;GACE,MAAM,kBAACC,GAAD;IAA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AM,kBAAkB,MAAM,2BAA2B,qBAC3D;OAEC,UAAAA,EAAM;MACH,CAAA,CACN,EAAA,CAAA;MAEHA,EAAM,cACL,kBAAApC,GAAA,EAAA,UAAA,CACE,kBAAC8B,GAAD,CAAY,CAAA,GACZ,kBAAC,QAAD;OAAM,WAAU;OAAhB,UAAA,CACGM,EAAM,gBAAgB,GAAGA,EAAM,cAAc,KAAK,IAClDA,EAAM,UACH;MACN,CAAA,CAAA,EAAA,CAAA;KAED;IACF,CAAA,CAAA;;GACL,kBAAC,QAAD;IACE,UAAUA,EAAM;IAChB,OAAOC,EAAWD,EAAM,SAAS;IACjC,WAAU;IAET,UAAAG,EAAWH,EAAM,SAAS;GACvB,CAAA;EACJ;;AAER"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ConnectedAppProviderFieldsFragment } from '../../../generated/wspace-operations';
|
|
2
|
+
export type AppItem = ConnectedAppProviderFieldsFragment;
|
|
3
|
+
interface AppItemProps {
|
|
4
|
+
app: AppItem;
|
|
5
|
+
/** The app's page. */
|
|
6
|
+
to: string;
|
|
7
|
+
/** Your connections filtered to this app. */
|
|
8
|
+
connectionsTo: string;
|
|
9
|
+
/** Null when the person may not create connections. */
|
|
10
|
+
onConnect: ((app: AppItem) => void) | null;
|
|
11
|
+
/** The host's `onProviderSelect`, told when the app is opened. */
|
|
12
|
+
onOpen?: () => void;
|
|
13
|
+
}
|
|
14
|
+
/** "Sign in or API key", or "Needs admin setup" in yellow. */
|
|
15
|
+
export declare function MethodHint({ app }: {
|
|
16
|
+
app: AppItem;
|
|
17
|
+
}): import('react').JSX.Element | null;
|
|
18
|
+
/** "✓ 12 connected", linking to those connections; nothing when there are none. */
|
|
19
|
+
export declare function ConnectedBadge({ app, to, short, }: {
|
|
20
|
+
app: AppItem;
|
|
21
|
+
to: string;
|
|
22
|
+
short?: boolean;
|
|
23
|
+
}): import('react').JSX.Element | null;
|
|
24
|
+
export declare function AppCard({ app, to, connectionsTo, onConnect, onOpen }: AppItemProps): import('react').JSX.Element;
|
|
25
|
+
export declare function AppRow({ app, to, connectionsTo, onConnect, onOpen }: AppItemProps): import('react').JSX.Element;
|
|
26
|
+
export {};
|