@burdenoff/microfe-integrations 2026.1109.3 → 2026.1113.2

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 (50) hide show
  1. package/dist/generated/wspace-operations.d.ts +4 -0
  2. package/dist/generated/wspace-operations.js +1 -0
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/integrations/IntegrationsUserRoutes.d.ts +7 -0
  5. package/dist/integrations/IntegrationsUserRoutes.js +57 -47
  6. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  7. package/dist/integrations/components/AddConnectionDialog.d.ts +8 -2
  8. package/dist/integrations/components/AddConnectionDialog.js +17 -15
  9. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  10. package/dist/integrations/components/ConnectedAppsMoreMenu.d.ts +12 -0
  11. package/dist/integrations/components/ConnectedAppsMoreMenu.js +60 -0
  12. package/dist/integrations/components/ConnectedAppsMoreMenu.js.map +1 -0
  13. package/dist/integrations/components/ConnectionCard.d.ts +7 -1
  14. package/dist/integrations/components/ConnectionCard.js +40 -26
  15. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  16. package/dist/integrations/components/PopularAppTiles.d.ts +7 -0
  17. package/dist/integrations/components/PopularAppTiles.js +33 -0
  18. package/dist/integrations/components/PopularAppTiles.js.map +1 -0
  19. package/dist/integrations/components/ProviderCard.d.ts +6 -0
  20. package/dist/integrations/components/ProviderCard.js +67 -61
  21. package/dist/integrations/components/ProviderCard.js.map +1 -1
  22. package/dist/integrations/components/RecentActivity.d.ts +7 -0
  23. package/dist/integrations/components/RecentActivity.js +74 -0
  24. package/dist/integrations/components/RecentActivity.js.map +1 -0
  25. package/dist/integrations/hooks/useLogs.d.ts +2 -0
  26. package/dist/integrations/hooks/useLogs.js +2 -1
  27. package/dist/integrations/hooks/useLogs.js.map +1 -1
  28. package/dist/integrations/hooks/useVaultName.d.ts +1 -0
  29. package/dist/integrations/hooks/useVaultName.js +27 -0
  30. package/dist/integrations/hooks/useVaultName.js.map +1 -0
  31. package/dist/integrations/pages/ConnectionDetail.js +561 -283
  32. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  33. package/dist/integrations/pages/ConnectionLogs.d.ts +3 -0
  34. package/dist/integrations/pages/ConnectionLogs.js +178 -142
  35. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  36. package/dist/integrations/pages/ConnectionsList.js +376 -243
  37. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  38. package/dist/integrations/pages/ProviderCatalog.js +199 -179
  39. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  40. package/dist/integrations/pages/ProviderDetail.js +284 -265
  41. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  42. package/dist/integrations/providers/IntegrationsProvider.js +22 -21
  43. package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
  44. package/dist/integrations/types/index.d.ts +12 -0
  45. package/dist/integrations/utils/connectedApps.d.ts +26 -0
  46. package/dist/integrations/utils/connectedApps.js +46 -0
  47. package/dist/integrations/utils/connectedApps.js.map +1 -0
  48. package/dist/integrations/utils/mappers.js +1 -0
  49. package/dist/integrations/utils/mappers.js.map +1 -1
  50. package/package.json +2 -2
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Navigation v2's Connected apps landing (BOFF-11875): the list itself, no tab
3
+ * strip. Every old `?tab=` link still opens its page: Providers is "All apps"
4
+ * and Activity Logs is "Activity logs", one click deeper; Overview and
5
+ * Connections are this list.
6
+ */
7
+ export declare function ConnectedAppsLanding(): import('react').JSX.Element;
1
8
  /**
2
9
  * User-facing routes for the Integrations microfrontend.
3
10
  *
@@ -4,30 +4,40 @@ import { joinPath as n } from "./utils/navigation.js";
4
4
  import { IntegrationsUserLandingPage as r } from "./pages/IntegrationsUserLandingPage.js";
5
5
  import { Component as i, Suspense as a, lazy as o } from "react";
6
6
  import { AlertTriangle as s, Loader2 as c, RefreshCw as l } from "lucide-react";
7
- import { Navigate as u, Route as d, Routes as f, useLocation as p, useNavigate as m, useParams as h } from "react-router";
8
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
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
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
9
9
  // src/integrations/IntegrationsUserRoutes.tsx
10
- var v = o(() => import("./pages/ProviderCatalog.js").then((e) => ({ default: e.ProviderCatalog }))), y = o(() => import("./pages/ProviderDetail.js").then((e) => ({ default: e.ProviderDetail }))), b = o(() => import("./pages/ConnectionsList.js").then((e) => ({ default: e.ConnectionsList }))), x = o(() => import("./pages/AddConnectionWizard.js").then((e) => ({ default: e.AddConnectionWizard }))), S = o(() => import("./pages/ConnectionDetail.js").then((e) => ({ default: e.ConnectionDetail }))), C = o(() => import("./pages/ConnectorSubmissionsPage.js").then((e) => ({ default: e.ConnectorSubmissionsPage }))), w = o(() => import("./pages/MailboxInbox.js").then((e) => ({ default: e.MailboxInbox }))), T = o(() => import("./pages/ConnectionLogs.js").then((e) => ({ default: e.ConnectionLogs }))), E = /* @__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 = /* @__PURE__ */ new Set([
11
11
  "slack-user",
12
12
  "teams-user",
13
13
  "discord-user"
14
14
  ]);
15
- function D() {
15
+ function O() {
16
16
  let { basePath: r } = t(), { providerId: i } = h(), { search: a } = p(), o = m(), s = new URLSearchParams(a), c = s.get("providerKey");
17
- return s.get("returnTo") && s.get("channelId") && c && E.has(c) ? /* @__PURE__ */ g(x, {}) : /* @__PURE__ */ g(e, {
17
+ return s.get("returnTo") && s.get("channelId") && c && D.has(c) ? /* @__PURE__ */ _(S, {}) : /* @__PURE__ */ _(e, {
18
18
  open: !0,
19
19
  onClose: () => o(n(r ?? "/", "connections")),
20
20
  preselectedProviderId: i,
21
21
  preselectedProviderKey: c
22
22
  });
23
23
  }
24
- function O() {
25
- return /* @__PURE__ */ g("div", {
24
+ function k() {
25
+ let [e] = g(), t = e.get("tab");
26
+ return t === "providers" ? /* @__PURE__ */ _(u, {
27
+ to: "providers",
28
+ replace: !0
29
+ }) : t === "logs" ? /* @__PURE__ */ _(u, {
30
+ to: "logs",
31
+ replace: !0
32
+ }) : /* @__PURE__ */ _(x, {});
33
+ }
34
+ function A() {
35
+ return /* @__PURE__ */ _("div", {
26
36
  className: "flex items-center justify-center min-h-[400px]",
27
- children: /* @__PURE__ */ g(c, { className: "size-8 animate-spin text-primary" })
37
+ children: /* @__PURE__ */ _(c, { className: "size-8 animate-spin text-primary" })
28
38
  });
29
39
  }
30
- var k = class extends i {
40
+ var j = class extends i {
31
41
  constructor(e) {
32
42
  super(e), this.state = {
33
43
  hasError: !1,
@@ -52,88 +62,88 @@ var k = class extends i {
52
62
  }));
53
63
  };
54
64
  render() {
55
- return this.state.hasError ? /* @__PURE__ */ _("div", {
65
+ return this.state.hasError ? /* @__PURE__ */ v("div", {
56
66
  className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
57
67
  children: [
58
- /* @__PURE__ */ g("div", {
68
+ /* @__PURE__ */ _("div", {
59
69
  className: "p-3 rounded-full bg-status-error-bg/10",
60
- children: /* @__PURE__ */ g(s, { className: "size-8 text-status-error-text" })
70
+ children: /* @__PURE__ */ _(s, { className: "size-8 text-status-error-text" })
61
71
  }),
62
- /* @__PURE__ */ _("div", {
72
+ /* @__PURE__ */ v("div", {
63
73
  className: "space-y-2",
64
- children: [/* @__PURE__ */ g("h3", {
74
+ children: [/* @__PURE__ */ _("h3", {
65
75
  className: "text-lg font-semibold text-text-primary",
66
76
  children: "Failed to load page"
67
- }), /* @__PURE__ */ g("p", {
77
+ }), /* @__PURE__ */ _("p", {
68
78
  className: "text-sm text-text-secondary max-w-md",
69
79
  children: this.state.error?.message || "The page chunk could not be loaded. This may be due to a network issue."
70
80
  })]
71
81
  }),
72
- /* @__PURE__ */ _("button", {
82
+ /* @__PURE__ */ v("button", {
73
83
  type: "button",
74
84
  onClick: this.handleRetry,
75
85
  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",
76
- children: [/* @__PURE__ */ g(l, { className: "size-4" }), "Try Again"]
86
+ children: [/* @__PURE__ */ _(l, { className: "size-4" }), "Try Again"]
77
87
  })
78
88
  ]
79
- }) : /* @__PURE__ */ g("div", { children: this.props.children }, this.state.retryKey);
89
+ }) : /* @__PURE__ */ _("div", { children: this.props.children }, this.state.retryKey);
80
90
  }
81
91
  };
82
- function A() {
83
- let { basePath: e } = t(), n = p(), i = e && e !== "/" ? e.endsWith("/") ? e.slice(0, -1) : e : "";
84
- return i && !(n.pathname === i || n.pathname.startsWith(i + "/")) ? null : /* @__PURE__ */ g(k, { children: /* @__PURE__ */ g(a, {
85
- fallback: /* @__PURE__ */ g(O, {}),
86
- children: /* @__PURE__ */ _(f, { children: [
87
- /* @__PURE__ */ g(d, {
92
+ function M() {
93
+ let { basePath: e, navigationV2: n } = t(), i = p(), o = e && e !== "/" ? e.endsWith("/") ? e.slice(0, -1) : e : "";
94
+ return o && !(i.pathname === o || i.pathname.startsWith(o + "/")) ? null : /* @__PURE__ */ _(j, { children: /* @__PURE__ */ _(a, {
95
+ fallback: /* @__PURE__ */ _(A, {}),
96
+ children: /* @__PURE__ */ v(f, { children: [
97
+ /* @__PURE__ */ _(d, {
88
98
  index: !0,
89
- element: /* @__PURE__ */ g(r, {})
99
+ element: _(n ? k : r, {})
90
100
  }),
91
- /* @__PURE__ */ g(d, {
101
+ /* @__PURE__ */ _(d, {
92
102
  path: "providers",
93
- element: /* @__PURE__ */ g(v, {})
103
+ element: /* @__PURE__ */ _(y, {})
94
104
  }),
95
- /* @__PURE__ */ g(d, {
105
+ /* @__PURE__ */ _(d, {
96
106
  path: "providers/:providerId",
97
- element: /* @__PURE__ */ g(y, {})
107
+ element: /* @__PURE__ */ _(b, {})
98
108
  }),
99
- /* @__PURE__ */ g(d, {
109
+ /* @__PURE__ */ _(d, {
100
110
  path: "connections",
101
- element: /* @__PURE__ */ g(b, {})
111
+ element: /* @__PURE__ */ _(x, {})
102
112
  }),
103
- /* @__PURE__ */ g(d, {
113
+ /* @__PURE__ */ _(d, {
104
114
  path: "connections/add",
105
- element: /* @__PURE__ */ g(D, {})
115
+ element: /* @__PURE__ */ _(O, {})
106
116
  }),
107
- /* @__PURE__ */ g(d, {
117
+ /* @__PURE__ */ _(d, {
108
118
  path: "connections/add/:providerId",
109
- element: /* @__PURE__ */ g(D, {})
119
+ element: /* @__PURE__ */ _(O, {})
110
120
  }),
111
- /* @__PURE__ */ g(d, {
121
+ /* @__PURE__ */ _(d, {
112
122
  path: "connections/:connectionId",
113
- element: /* @__PURE__ */ g(S, {})
123
+ element: /* @__PURE__ */ _(C, {})
114
124
  }),
115
- /* @__PURE__ */ g(d, {
125
+ /* @__PURE__ */ _(d, {
116
126
  path: "developer/connectors",
117
- element: /* @__PURE__ */ g(C, {})
127
+ element: /* @__PURE__ */ _(w, {})
118
128
  }),
119
- /* @__PURE__ */ g(d, {
129
+ /* @__PURE__ */ _(d, {
120
130
  path: "inbox",
121
- element: /* @__PURE__ */ g(w, {})
131
+ element: /* @__PURE__ */ _(T, {})
122
132
  }),
123
- /* @__PURE__ */ g(d, {
133
+ /* @__PURE__ */ _(d, {
124
134
  path: "logs",
125
- element: /* @__PURE__ */ g(T, {})
135
+ element: /* @__PURE__ */ _(E, {})
126
136
  }),
127
- /* @__PURE__ */ g(d, {
137
+ /* @__PURE__ */ _(d, {
128
138
  path: "*",
129
- element: /* @__PURE__ */ g(u, {
130
- to: "",
139
+ element: /* @__PURE__ */ _(u, {
140
+ to: "..",
131
141
  replace: !0
132
142
  })
133
143
  })
134
144
  ] })
135
145
  }) });
136
146
  }
137
- export { A as IntegrationsUserRoutes };
147
+ export { k as ConnectedAppsLanding, M as IntegrationsUserRoutes };
138
148
 
139
149
  //# 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","PageLoader","Loader2","LazyErrorBoundary","Component","props","error","errorInfo","prev","AlertTriangle","RefreshCw","IntegrationsUserRoutes","location","normalizedBasePath","Suspense","Routes","Route","IntegrationsUserLandingPage","Navigate"],"sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, Component, type ReactNode, type ErrorInfo } from 'react';\nimport { Navigate, Route, Routes, useLocation, useNavigate, useParams } 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 * 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 } = 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 index element={<IntegrationsUserLandingPage />} />\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 route - redirect to overview */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;AAWA,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,CAA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kB,CAAA;GAAI,CAAA;GACvD,kBAACuC,GAAD;IAAO,MAAK;IAAwB,SAAS,kBAACpC,GAAD,CAAiB,CAAA;GAAI,CAAA;GAGlE,kBAACoC,GAAD;IAAO,MAAK;IAAc,SAAS,kBAACnC,GAAD,CAAkB,CAAA;GAAI,CAAA;GACzD,kBAACmC,GAAD;IAAO,MAAK;IAAkB,SAAS,kBAAC5B,GAAD,CAAqB,CAAA;GAAI,CAAA;GAChE,kBAAC4B,GAAD;IAAO,MAAK;IAA8B,SAAS,kBAAC5B,GAAD,CAAqB,CAAA;GAAI,CAAA;GAC5E,kBAAC4B,GAAD;IAAO,MAAK;IAA4B,SAAS,kBAACjC,GAAD,CAAmB,CAAA;GAAI,CAAA;GAGxE,kBAACiC,GAAD;IAAO,MAAK;IAAuB,SAAS,kBAAChC,GAAD,CAA2B,CAAA;GAAI,CAAA;GAG3E,kBAACgC,GAAD;IAAO,MAAK;IAAQ,SAAS,kBAAC/B,GAAD,CAAe,CAAA;GAAI,CAAA;GAGhD,kBAAC+B,GAAD;IAAO,MAAK;IAAO,SAAS,kBAAC9B,GAAD,CAAiB,CAAA;GAAI,CAAA;GAGjD,kBAAC8B,GAAD;IAAO,MAAK;IAAI,SAAS,kBAACE,GAAD;KAAU,IAAG;KAAG,SAAA;IAAS,CAAA;GAAI,CAAA;EAChD,EAAA,CAAA;CACA,CAAA,EACO,CAAA;AAEvB"}
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,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,EAAE,eAAe,EAAE,CAC9E,GAEMQ,oBA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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,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { ConnectionDialogPresentation, CreatedConnection } from '@burdenoff/fe-libs/connections';
2
+ import { ConnectionDialogPresentation, ConnectionReconnectTarget, CreatedConnection } from '@burdenoff/fe-libs/connections';
3
3
  export interface AddConnectionDialogProps {
4
4
  /** Whether the dialog is open */
5
5
  open: boolean;
@@ -25,7 +25,13 @@ export interface AddConnectionDialogProps {
25
25
  extraConfig?: Record<string, unknown>;
26
26
  /** Replaces the success panel's button, e.g. "Link to bot channel". */
27
27
  renderSuccessAction?: (connection: CreatedConnection) => ReactNode;
28
+ /**
29
+ * Reconnect (Navigation v2): sign in again on this existing connection
30
+ * instead of creating one, so its id and every workflow step that uses it
31
+ * are kept.
32
+ */
33
+ reconnect?: ConnectionReconnectTarget | null;
28
34
  }
29
35
  /** The OAuth callback the gateway serves; providers compare it exactly. */
30
36
  export declare function oauthCallbackUrl(apiGatewayUrl: string | null | undefined): string;
31
- export declare function AddConnectionDialog({ open, onClose, preselectedProviderId, preselectedProviderKey, onConnectionCreated, presentation, pickerTitle, extraConfig, renderSuccessAction, }: AddConnectionDialogProps): import('react').JSX.Element;
37
+ export declare function AddConnectionDialog({ open, onClose, preselectedProviderId, preselectedProviderKey, onConnectionCreated, presentation, pickerTitle, extraConfig, renderSuccessAction, reconnect, }: AddConnectionDialogProps): import('react').JSX.Element;
@@ -11,49 +11,51 @@ import { ConnectionDialog as c } from "@burdenoff/fe-libs/connections";
11
11
  function l(e) {
12
12
  return e ? `${e}/integrations/oauth/callback` : "/integrations/oauth/callback";
13
13
  }
14
- function u({ open: u, onClose: d, preselectedProviderId: f, preselectedProviderKey: p, onConnectionCreated: m, presentation: h = "dialog", pickerTitle: g, extraConfig: _, renderSuccessAction: v }) {
15
- let y = n(), b = a(), { apiGatewayUrl: x, defaultConnectionVisibility: S } = r(), { hasPermission: C, isLoading: w } = o(), T = t((e) => e.emit), E = w || C(e.CONNECTION_CREATE), D = !w && C(e.VAULT_CREATE), O = i((e) => {
14
+ function u({ open: u, onClose: d, preselectedProviderId: f, preselectedProviderKey: p, onConnectionCreated: m, presentation: h = "dialog", pickerTitle: g, extraConfig: _, renderSuccessAction: v, reconnect: y }) {
15
+ let b = n(), x = a(), { apiGatewayUrl: S, defaultConnectionVisibility: C, navigationV2: w } = r(), { hasPermission: T, isLoading: E } = o(), D = t((e) => e.emit), O = E || T(e.CONNECTION_CREATE), k = !E && T(e.VAULT_CREATE), A = i((e) => {
16
16
  switch (e.type) {
17
17
  case "connection-created":
18
- T("integrations:connection-created", {
18
+ D("integrations:connection-created", {
19
19
  connectionId: e.connectionId,
20
20
  providerKey: e.providerKey
21
21
  });
22
22
  break;
23
23
  case "oauth-started":
24
- T("integrations:oauth-started", {
24
+ D("integrations:oauth-started", {
25
25
  connectionId: e.connectionId,
26
26
  providerKey: e.providerKey
27
27
  });
28
28
  break;
29
- case "oauth-failed": T("integrations:oauth-failed", {
29
+ case "oauth-failed": D("integrations:oauth-failed", {
30
30
  connectionId: e.connectionId,
31
31
  providerKey: e.providerKey,
32
32
  error: e.error
33
33
  });
34
34
  }
35
- }, [T]), k = i((e) => m?.(e.id), [m]);
35
+ }, [D]), j = i((e) => m?.(e.id), [m]);
36
36
  return /* @__PURE__ */ s(c, {
37
37
  open: u,
38
38
  onClose: d,
39
- client: b,
40
- callbackUrl: l(x),
41
- translate: y,
39
+ client: x,
40
+ callbackUrl: l(S),
41
+ translate: b,
42
42
  providerId: f ?? null,
43
43
  providerKey: p ?? null,
44
44
  providerSource: "installed",
45
45
  requireVault: !0,
46
- canCreate: E,
47
- canCreateVault: D,
46
+ canCreate: O,
47
+ canCreateVault: k,
48
48
  extraConfig: _,
49
- showSharingTab: !!S,
50
- defaultVisibility: S,
49
+ showSharingTab: !!C,
50
+ defaultVisibility: C,
51
51
  refetchQueriesOnCreate: ["GetConnections"],
52
52
  presentation: h,
53
53
  pickerTitle: g,
54
54
  renderSuccessAction: v,
55
- onConnectionCreated: k,
56
- onEvent: O
55
+ onConnectionCreated: j,
56
+ onEvent: A,
57
+ navigationV2: !!w,
58
+ reconnect: y ?? null
57
59
  });
58
60
  }
59
61
  export { u as AddConnectionDialog, l as oauthCallbackUrl };
@@ -1 +1 @@
1
- {"version":3,"file":"AddConnectionDialog.js","names":["oauthCallbackUrl","apiGatewayUrl","AddConnectionDialog","tr","useTr","client","useApolloClient","useIntegrations","permissionsLoading","usePermissions","emit","useIntegrationsEventBus","state","canCreate","hasPermission","INTEGRATION_PERMISSIONS","canCreateVault","handleEvent","useCallback","event","handleCreated","onConnectionCreated","connection","ConnectionDialog","preselectedProviderId","preselectedProviderKey","defaultConnectionVisibility"],"sources":["../../../src/integrations/components/AddConnectionDialog.tsx"],"sourcesContent":["/**\n * AddConnectionDialog — \"Add a connection\" for the integrations screens.\n *\n * The dialog is `@burdenoff/fe-libs/connections`' ConnectionDialog, the same\n * one the workflow builder uses for a node's \"New connection\" (BOFF-8174). The\n * two used to be separate implementations and drifted: provider icons\n * (BOFF-8135), Custom OAuth 2.0 credentials and the redirect URL to register\n * (BOFF-8170). This component only supplies what the integrations screens know\n * and the shared dialog cannot: the shell's Apollo client, the gateway's OAuth\n * callback, the translator, this user's permissions, and this module's event\n * bus.\n *\n * Integrations-specific choices:\n * - the picker lists the workspace's installed, enabled providers;\n * - a vault is required, and the dialog offers to create one when allowed;\n * - the host's connection lists refresh after a create.\n */\nimport { useCallback, type ReactNode } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport {\n ConnectionDialog,\n type ConnectionDialogEvent,\n type ConnectionDialogPresentation,\n type CreatedConnection,\n} from '@burdenoff/fe-libs/connections';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\n\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsEventBus } from '../events/useIntegrationsEventBus';\nimport { useTr } from '../hooks/useTr';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\n\nexport interface AddConnectionDialogProps {\n /** Whether the dialog is open */\n open: boolean;\n /** Callback to close the dialog */\n onClose: () => void;\n /** Pre-selected provider ID (skips provider picker step) */\n preselectedProviderId?: string | null;\n /** Pre-selected provider key, for links that know a provider by key. */\n preselectedProviderKey?: string | null;\n /** Callback when a connection is successfully created */\n onConnectionCreated?: (connectionId: string) => void;\n /**\n * `dialog` (default): a centred dialog from `sm`. `sheet`: a bottom sheet\n * below `md`, centred from `md` — what `ConnectSourceDialog` uses.\n */\n presentation?: ConnectionDialogPresentation;\n /** Heading while the provider picker shows. Defaults to \"Add new credential\". */\n pickerTitle?: string;\n /**\n * Settings stored on the new connection, e.g. the Botlit channel to return\n * to once OAuth completes.\n */\n extraConfig?: Record<string, unknown>;\n /** Replaces the success panel's button, e.g. \"Link to bot channel\". */\n renderSuccessAction?: (connection: CreatedConnection) => ReactNode;\n}\n\n/** The OAuth callback the gateway serves; providers compare it exactly. */\nexport function oauthCallbackUrl(apiGatewayUrl: string | null | undefined): string {\n return apiGatewayUrl\n ? `${apiGatewayUrl}/integrations/oauth/callback`\n : '/integrations/oauth/callback';\n}\n\nexport function AddConnectionDialog({\n open,\n onClose,\n preselectedProviderId,\n preselectedProviderKey,\n onConnectionCreated,\n presentation = 'dialog',\n pickerTitle,\n extraConfig,\n renderSuccessAction,\n}: AddConnectionDialogProps) {\n const tr = useTr();\n const client = useApolloClient();\n const { apiGatewayUrl, defaultConnectionVisibility } = useIntegrations();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const emit = useIntegrationsEventBus((state) => state.emit);\n\n // While permissions load, show the form rather than flashing \"denied\"; the\n // gateway still enforces the grant on create.\n const canCreate = permissionsLoading || hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n // Vaults belong to the security module: creating a connection does not imply\n // being allowed to create one, and offering it would be a button that fails.\n const canCreateVault = !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.VAULT_CREATE);\n\n const handleEvent = useCallback(\n (event: ConnectionDialogEvent) => {\n switch (event.type) {\n case 'connection-created':\n emit('integrations:connection-created', {\n connectionId: event.connectionId,\n providerKey: event.providerKey,\n });\n break;\n case 'oauth-started':\n emit('integrations:oauth-started', {\n connectionId: event.connectionId,\n providerKey: event.providerKey,\n });\n break;\n case 'oauth-failed':\n emit('integrations:oauth-failed', {\n connectionId: event.connectionId,\n providerKey: event.providerKey,\n error: event.error,\n });\n break;\n }\n },\n [emit]\n );\n\n const handleCreated = useCallback(\n (connection: CreatedConnection) => onConnectionCreated?.(connection.id),\n [onConnectionCreated]\n );\n\n return (\n <ConnectionDialog\n open={open}\n onClose={onClose}\n client={client}\n callbackUrl={oauthCallbackUrl(apiGatewayUrl)}\n translate={tr}\n providerId={preselectedProviderId ?? null}\n providerKey={preselectedProviderKey ?? null}\n providerSource=\"installed\"\n requireVault\n canCreate={canCreate}\n canCreateVault={canCreateVault}\n extraConfig={extraConfig}\n showSharingTab={Boolean(defaultConnectionVisibility)}\n defaultVisibility={defaultConnectionVisibility}\n refetchQueriesOnCreate={['GetConnections']}\n presentation={presentation}\n pickerTitle={pickerTitle}\n renderSuccessAction={renderSuccessAction}\n onConnectionCreated={handleCreated}\n onEvent={handleEvent}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AA4DA,SAAgBA,EAAiB,GAAkD;CACjF,OAAOC,IACH,GAAGA,EAAc,gCACjB;AACN;AAEA,SAAgBC,EAAoB,EAClC,SACA,YACA,0BACA,2BACA,wBACA,kBAAe,UACf,gBACA,gBACA,0BAC2B;CAC3B,IAAMC,IAAKC,EAAM,GACXC,IAASC,EAAgB,GACzB,EAAE,kBAAe,mCAAgCC,EAAgB,GACjE,EAAE,kBAAe,WAAWC,MAAuBC,EAAe,GAClEC,IAAOC,GAAyB,MAAUC,EAAM,IAAI,GAIpDC,IAAYL,KAAsBM,EAAcC,EAAwB,iBAAiB,GAGzFC,IAAiB,CAACR,KAAsBM,EAAcC,EAAwB,YAAY,GAE1FE,IAAcC,GACjB,MAAiC;EAChC,QAAQC,EAAM,MAAd;GACE,KAAK;IACH,EAAK,mCAAmC;KACtC,cAAcA,EAAM;KACpB,aAAaA,EAAM;IACrB,CAAC;IACD;GACF,KAAK;IACH,EAAK,8BAA8B;KACjC,cAAcA,EAAM;KACpB,aAAaA,EAAM;IACrB,CAAC;IACD;GACF,KAAK,gBACH,EAAK,6BAA6B;IAChC,cAAcA,EAAM;IACpB,aAAaA,EAAM;IACnB,OAAOA,EAAM;GACf,CAAC;EAEL;CACF,GACA,CAACT,CAAI,CACP,GAEMU,IAAgBF,GACnB,MAAkCG,IAAsBC,EAAW,EAAE,GACtE,CAACD,CAAmB,CACtB;CAEA,OACE,kBAACE,GAAD;EACQ;EACG;EACD;EACR,aAAavB,EAAiBC,CAAa;EAC3C,WAAWE;EACX,YAAYqB,KAAyB;EACrC,aAAaC,KAA0B;EACvC,gBAAe;EACf,cAAA;EACW;EACK;EACH;EACb,gBAAgB,EAAQC;EACxB,mBAAmBA;EACnB,wBAAwB,CAAC,gBAAgB;EAC3B;EACD;EACQ;EACrB,qBAAqBN;EACrB,SAASH;CACV,CAAA;AAEL"}
1
+ {"version":3,"file":"AddConnectionDialog.js","names":["oauthCallbackUrl","apiGatewayUrl","AddConnectionDialog","tr","useTr","client","useApolloClient","useIntegrations","permissionsLoading","usePermissions","emit","useIntegrationsEventBus","state","canCreate","hasPermission","INTEGRATION_PERMISSIONS","canCreateVault","handleEvent","useCallback","event","handleCreated","onConnectionCreated","connection","ConnectionDialog","preselectedProviderId","preselectedProviderKey","defaultConnectionVisibility","navigationV2","reconnect"],"sources":["../../../src/integrations/components/AddConnectionDialog.tsx"],"sourcesContent":["/**\n * AddConnectionDialog — \"Add a connection\" for the integrations screens.\n *\n * The dialog is `@burdenoff/fe-libs/connections`' ConnectionDialog, the same\n * one the workflow builder uses for a node's \"New connection\" (BOFF-8174). The\n * two used to be separate implementations and drifted: provider icons\n * (BOFF-8135), Custom OAuth 2.0 credentials and the redirect URL to register\n * (BOFF-8170). This component only supplies what the integrations screens know\n * and the shared dialog cannot: the shell's Apollo client, the gateway's OAuth\n * callback, the translator, this user's permissions, and this module's event\n * bus.\n *\n * Integrations-specific choices:\n * - the picker lists the workspace's installed, enabled providers;\n * - a vault is required, and the dialog offers to create one when allowed;\n * - the host's connection lists refresh after a create.\n */\nimport { useCallback, type ReactNode } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport {\n ConnectionDialog,\n type ConnectionDialogEvent,\n type ConnectionDialogPresentation,\n type ConnectionReconnectTarget,\n type CreatedConnection,\n} from '@burdenoff/fe-libs/connections';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\n\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsEventBus } from '../events/useIntegrationsEventBus';\nimport { useTr } from '../hooks/useTr';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\n\nexport interface AddConnectionDialogProps {\n /** Whether the dialog is open */\n open: boolean;\n /** Callback to close the dialog */\n onClose: () => void;\n /** Pre-selected provider ID (skips provider picker step) */\n preselectedProviderId?: string | null;\n /** Pre-selected provider key, for links that know a provider by key. */\n preselectedProviderKey?: string | null;\n /** Callback when a connection is successfully created */\n onConnectionCreated?: (connectionId: string) => void;\n /**\n * `dialog` (default): a centred dialog from `sm`. `sheet`: a bottom sheet\n * below `md`, centred from `md` — what `ConnectSourceDialog` uses.\n */\n presentation?: ConnectionDialogPresentation;\n /** Heading while the provider picker shows. Defaults to \"Add new credential\". */\n pickerTitle?: string;\n /**\n * Settings stored on the new connection, e.g. the Botlit channel to return\n * to once OAuth completes.\n */\n extraConfig?: Record<string, unknown>;\n /** Replaces the success panel's button, e.g. \"Link to bot channel\". */\n renderSuccessAction?: (connection: CreatedConnection) => ReactNode;\n /**\n * Reconnect (Navigation v2): sign in again on this existing connection\n * instead of creating one, so its id and every workflow step that uses it\n * are kept.\n */\n reconnect?: ConnectionReconnectTarget | null;\n}\n\n/** The OAuth callback the gateway serves; providers compare it exactly. */\nexport function oauthCallbackUrl(apiGatewayUrl: string | null | undefined): string {\n return apiGatewayUrl\n ? `${apiGatewayUrl}/integrations/oauth/callback`\n : '/integrations/oauth/callback';\n}\n\nexport function AddConnectionDialog({\n open,\n onClose,\n preselectedProviderId,\n preselectedProviderKey,\n onConnectionCreated,\n presentation = 'dialog',\n pickerTitle,\n extraConfig,\n renderSuccessAction,\n reconnect,\n}: AddConnectionDialogProps) {\n const tr = useTr();\n const client = useApolloClient();\n const { apiGatewayUrl, defaultConnectionVisibility, navigationV2 } = useIntegrations();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const emit = useIntegrationsEventBus((state) => state.emit);\n\n // While permissions load, show the form rather than flashing \"denied\"; the\n // gateway still enforces the grant on create.\n const canCreate = permissionsLoading || hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n // Vaults belong to the security module: creating a connection does not imply\n // being allowed to create one, and offering it would be a button that fails.\n const canCreateVault = !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.VAULT_CREATE);\n\n const handleEvent = useCallback(\n (event: ConnectionDialogEvent) => {\n switch (event.type) {\n case 'connection-created':\n emit('integrations:connection-created', {\n connectionId: event.connectionId,\n providerKey: event.providerKey,\n });\n break;\n case 'oauth-started':\n emit('integrations:oauth-started', {\n connectionId: event.connectionId,\n providerKey: event.providerKey,\n });\n break;\n case 'oauth-failed':\n emit('integrations:oauth-failed', {\n connectionId: event.connectionId,\n providerKey: event.providerKey,\n error: event.error,\n });\n break;\n }\n },\n [emit]\n );\n\n const handleCreated = useCallback(\n (connection: CreatedConnection) => onConnectionCreated?.(connection.id),\n [onConnectionCreated]\n );\n\n return (\n <ConnectionDialog\n open={open}\n onClose={onClose}\n client={client}\n callbackUrl={oauthCallbackUrl(apiGatewayUrl)}\n translate={tr}\n providerId={preselectedProviderId ?? null}\n providerKey={preselectedProviderKey ?? null}\n providerSource=\"installed\"\n requireVault\n canCreate={canCreate}\n canCreateVault={canCreateVault}\n extraConfig={extraConfig}\n showSharingTab={Boolean(defaultConnectionVisibility)}\n defaultVisibility={defaultConnectionVisibility}\n refetchQueriesOnCreate={['GetConnections']}\n presentation={presentation}\n pickerTitle={pickerTitle}\n renderSuccessAction={renderSuccessAction}\n onConnectionCreated={handleCreated}\n onEvent={handleEvent}\n navigationV2={Boolean(navigationV2)}\n reconnect={reconnect ?? null}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AAmEA,SAAgBA,EAAiB,GAAkD;CACjF,OAAOC,IACH,GAAGA,EAAc,gCACjB;AACN;AAEA,SAAgBC,EAAoB,EAClC,SACA,YACA,0BACA,2BACA,wBACA,kBAAe,UACf,gBACA,gBACA,wBACA,gBAC2B;CAC3B,IAAMC,IAAKC,EAAM,GACXC,IAASC,EAAgB,GACzB,EAAE,kBAAe,gCAA6B,oBAAiBC,EAAgB,GAC/E,EAAE,kBAAe,WAAWC,MAAuBC,EAAe,GAClEC,IAAOC,GAAyB,MAAUC,EAAM,IAAI,GAIpDC,IAAYL,KAAsBM,EAAcC,EAAwB,iBAAiB,GAGzFC,IAAiB,CAACR,KAAsBM,EAAcC,EAAwB,YAAY,GAE1FE,IAAcC,GACjB,MAAiC;EAChC,QAAQC,EAAM,MAAd;GACE,KAAK;IACH,EAAK,mCAAmC;KACtC,cAAcA,EAAM;KACpB,aAAaA,EAAM;IACrB,CAAC;IACD;GACF,KAAK;IACH,EAAK,8BAA8B;KACjC,cAAcA,EAAM;KACpB,aAAaA,EAAM;IACrB,CAAC;IACD;GACF,KAAK,gBACH,EAAK,6BAA6B;IAChC,cAAcA,EAAM;IACpB,aAAaA,EAAM;IACnB,OAAOA,EAAM;GACf,CAAC;EAEL;CACF,GACA,CAACT,CAAI,CACP,GAEMU,IAAgBF,GACnB,MAAkCG,IAAsBC,EAAW,EAAE,GACtE,CAACD,CAAmB,CACtB;CAEA,OACE,kBAACE,GAAD;EACQ;EACG;EACD;EACR,aAAavB,EAAiBC,CAAa;EAC3C,WAAWE;EACX,YAAYqB,KAAyB;EACrC,aAAaC,KAA0B;EACvC,gBAAe;EACf,cAAA;EACW;EACK;EACH;EACb,gBAAgB,EAAQC;EACxB,mBAAmBA;EACnB,wBAAwB,CAAC,gBAAgB;EAC3B;EACD;EACQ;EACrB,qBAAqBN;EACrB,SAASH;EACT,cAAc,EAAQU;EACtB,WAAWC,KAAa;CACzB,CAAA;AAEL"}
@@ -0,0 +1,12 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export interface MoreMenuExtra {
3
+ id: string;
4
+ label: string;
5
+ icon?: ReactNode;
6
+ onSelect: () => void;
7
+ }
8
+ interface ConnectedAppsMoreMenuProps {
9
+ extras?: MoreMenuExtra[];
10
+ }
11
+ export declare const ConnectedAppsMoreMenu: FC<ConnectedAppsMoreMenuProps>;
12
+ export {};
@@ -0,0 +1,60 @@
1
+ import { useTr as e } from "../hooks/useTr.js";
2
+ import { useIntegrations as t } from "../providers/IntegrationsProvider.js";
3
+ import { joinPath as n } from "../utils/navigation.js";
4
+ import { ChevronDown as r, FileText as i, Store as a } from "lucide-react";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { Button as c, DropdownMenu as l, DropdownMenuContent as u, DropdownMenuItem as d, DropdownMenuSeparator as f, DropdownMenuTrigger as p } from "@burdenoff/fe-libs/ui";
7
+ // src/integrations/components/ConnectedAppsMoreMenu.tsx
8
+ var m = ({ extras: m = [] }) => {
9
+ let h = e(), { basePath: g = "/", navigate: _ } = t();
10
+ return /* @__PURE__ */ s(l, { children: [/* @__PURE__ */ o(p, {
11
+ asChild: !0,
12
+ children: /* @__PURE__ */ s(c, {
13
+ variant: "outline",
14
+ "data-testid": "connected-apps-more",
15
+ children: [h("integrations.connectedApps.more", "More"), /* @__PURE__ */ o(r, {
16
+ size: 16,
17
+ "aria-hidden": "true"
18
+ })]
19
+ })
20
+ }), /* @__PURE__ */ s(u, {
21
+ align: "end",
22
+ className: "min-w-56",
23
+ children: [
24
+ /* @__PURE__ */ s(d, {
25
+ onSelect: () => _?.(n(g, "providers")),
26
+ children: [/* @__PURE__ */ o(a, {
27
+ size: 16,
28
+ "aria-hidden": "true"
29
+ }), /* @__PURE__ */ s("span", {
30
+ className: "flex flex-col",
31
+ children: [/* @__PURE__ */ o("span", { children: h("integrations.connectedApps.allApps", "All apps") }), /* @__PURE__ */ o("span", {
32
+ className: "text-xs text-text-secondary",
33
+ children: h("integrations.connectedApps.allAppsHint", "Every app you can connect")
34
+ })]
35
+ })]
36
+ }),
37
+ /* @__PURE__ */ s(d, {
38
+ onSelect: () => _?.(n(g, "logs")),
39
+ children: [/* @__PURE__ */ o(i, {
40
+ size: 16,
41
+ "aria-hidden": "true"
42
+ }), /* @__PURE__ */ s("span", {
43
+ className: "flex flex-col",
44
+ children: [/* @__PURE__ */ o("span", { children: h("integrations.connectedApps.activityLogs", "Activity logs") }), /* @__PURE__ */ o("span", {
45
+ className: "text-xs text-text-secondary",
46
+ children: h("integrations.connectedApps.activityLogsHint", "Every request your connected apps made")
47
+ })]
48
+ })]
49
+ }),
50
+ m.length > 0 && /* @__PURE__ */ o(f, {}),
51
+ m.map((e) => /* @__PURE__ */ s(d, {
52
+ onSelect: e.onSelect,
53
+ children: [e.icon, e.label]
54
+ }, e.id))
55
+ ]
56
+ })] });
57
+ };
58
+ export { m as ConnectedAppsMoreMenu };
59
+
60
+ //# sourceMappingURL=ConnectedAppsMoreMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConnectedAppsMoreMenu.js","names":["ConnectedAppsMoreMenu","tr","useTr","useIntegrations","DropdownMenu","DropdownMenuTrigger","Button","ChevronDown","DropdownMenuContent","DropdownMenuItem","navigate","joinPath","basePath","Store","FileText","extras","DropdownMenuSeparator","extra"],"sources":["../../../src/integrations/components/ConnectedAppsMoreMenu.tsx"],"sourcesContent":["/**\n * \"More ▾\" on the Connected apps list (Navigation v2, BOFF-11875): the pages\n * that used to be tabs of the Integrations landing — All apps (the provider\n * catalog) and Activity logs — one click away, plus any page-level extras the\n * list passes in (Filter and view).\n */\nimport type { FC, ReactNode } from 'react';\nimport { ChevronDown, FileText, Store } from 'lucide-react';\nimport {\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@burdenoff/fe-libs/ui';\n\nimport { useTr } from '../hooks/useTr';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { joinPath } from '../utils/navigation';\n\nexport interface MoreMenuExtra {\n id: string;\n label: string;\n icon?: ReactNode;\n onSelect: () => void;\n}\n\ninterface ConnectedAppsMoreMenuProps {\n extras?: MoreMenuExtra[];\n}\n\nexport const ConnectedAppsMoreMenu: FC<ConnectedAppsMoreMenuProps> = ({ extras = [] }) => {\n const tr = useTr();\n const { basePath = '/', navigate } = useIntegrations();\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" data-testid=\"connected-apps-more\">\n {tr('integrations.connectedApps.more', 'More')}\n <ChevronDown size={16} aria-hidden=\"true\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"min-w-56\">\n <DropdownMenuItem onSelect={() => navigate?.(joinPath(basePath, 'providers'))}>\n <Store size={16} aria-hidden=\"true\" />\n <span className=\"flex flex-col\">\n <span>{tr('integrations.connectedApps.allApps', 'All apps')}</span>\n <span className=\"text-xs text-text-secondary\">\n {tr('integrations.connectedApps.allAppsHint', 'Every app you can connect')}\n </span>\n </span>\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={() => navigate?.(joinPath(basePath, 'logs'))}>\n <FileText size={16} aria-hidden=\"true\" />\n <span className=\"flex flex-col\">\n <span>{tr('integrations.connectedApps.activityLogs', 'Activity logs')}</span>\n <span className=\"text-xs text-text-secondary\">\n {tr(\n 'integrations.connectedApps.activityLogsHint',\n 'Every request your connected apps made'\n )}\n </span>\n </span>\n </DropdownMenuItem>\n {extras.length > 0 && <DropdownMenuSeparator />}\n {extras.map((extra) => (\n <DropdownMenuItem key={extra.id} onSelect={extra.onSelect}>\n {extra.icon}\n {extra.label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n};\n"],"mappings":";;;;;;;AAgCA,IAAaA,KAAyD,EAAE,YAAS,CAAC,QAAQ;CACxF,IAAMC,IAAKC,EAAM,GACX,EAAE,cAAW,KAAK,gBAAaC,EAAgB;CACrD,OACE,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD;EAAqB,SAAA;EACnB,UAAA,kBAACC,GAAD;GAAQ,SAAQ;GAAU,eAAY;GAAtC,UAAA,CACGL,EAAG,mCAAmC,MAAM,GAC7C,kBAACM,GAAD;IAAa,MAAM;IAAI,eAAY;GAAQ,CAAA,CACrC;;CACW,CAAA,GACrB,kBAACC,GAAD;EAAqB,OAAM;EAAM,WAAU;EAA3C,UAAA;GACE,kBAACC,GAAD;IAAkB,gBAAgBC,IAAWC,EAASC,GAAU,WAAW,CAAC;IAA5E,UAAA,CACE,kBAACC,GAAD;KAAO,MAAM;KAAI,eAAY;IAAQ,CAAA,GACrC,kBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA,CACE,kBAAC,QAAD,EAAA,UAAOZ,EAAG,sCAAsC,UAAU,EAAQ,CAAA,GAClE,kBAAC,QAAD;MAAM,WAAU;MACb,UAAAA,EAAG,0CAA0C,2BAA2B;KACrE,CAAA,CACF;IACU,CAAA,CAAA;;GAClB,kBAACQ,GAAD;IAAkB,gBAAgBC,IAAWC,EAASC,GAAU,MAAM,CAAC;IAAvE,UAAA,CACE,kBAACE,GAAD;KAAU,MAAM;KAAI,eAAY;IAAQ,CAAA,GACxC,kBAAC,QAAD;KAAM,WAAU;KAAhB,UAAA,CACE,kBAAC,QAAD,EAAA,UAAOb,EAAG,2CAA2C,eAAe,EAAQ,CAAA,GAC5E,kBAAC,QAAD;MAAM,WAAU;MACb,UAAAA,EACC,+CACA,wCACF;KACI,CAAA,CACF;IACU,CAAA,CAAA;;GACjBc,EAAO,SAAS,KAAK,kBAACC,GAAD,CAAwB,CAAA;GAC7CD,EAAO,KAAK,MACX,kBAACN,GAAD;IAAiC,UAAUQ,EAAM;IAAjD,UAAA,CACGA,EAAM,MACNA,EAAM,KACS;GAHK,GAAAA,EAAM,EAGX,CACnB;EACkB;CACT,CAAA,CAAA,EAAA,CAAA;AAElB"}
@@ -1,9 +1,15 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import { IntegrationConnection } from '../types';
3
3
  interface ConnectionCardProps {
4
4
  connection: IntegrationConnection;
5
5
  displayMode?: 'grid' | 'list';
6
6
  onClick?: (connection: IntegrationConnection) => void;
7
+ /**
8
+ * A button on the card itself, e.g. Navigation v2's "Reconnect" on a broken
9
+ * connection. The button stops its own click and key events, so using it
10
+ * does not also open the connection.
11
+ */
12
+ action?: ReactNode;
7
13
  }
8
14
  /**
9
15
  * Card showing connection info (provider icon, connection name, account email, status badge, last used).
@@ -6,8 +6,9 @@ import { ChevronRight as i, Lock as a } from "lucide-react";
6
6
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  import { ProviderIcon as l } from "@burdenoff/fe-libs/connections";
8
8
  import { GlassCard as u } from "@burdenoff/fe-libs/ui";
9
+ import { suggestAnchorProps as d } from "@burdenoff/fe-libs/shared/proactive";
9
10
  // src/integrations/components/ConnectionCard.tsx
10
- var d = ({ connection: e }) => {
11
+ var f = ({ connection: e }) => {
11
12
  let n = t();
12
13
  if (e.visibility !== "RESTRICTED") return null;
13
14
  let r = n("integrations.connectionCard.private", "Private: only the people it is shared with");
@@ -23,15 +24,19 @@ var d = ({ connection: e }) => {
23
24
  children: r
24
25
  })]
25
26
  });
26
- }, f = ({ connection: a, displayMode: f = "grid", onClick: p }) => {
27
- let m = t(), h = n();
28
- return f === "list" ? /* @__PURE__ */ c(u, {
27
+ }, p = ({ connection: a, displayMode: p = "grid", onClick: m, action: h }) => {
28
+ let g = t(), _ = n(), v = d({
29
+ entityType: "connection",
30
+ entityId: a.id
31
+ });
32
+ return p === "list" ? /* @__PURE__ */ c(u, {
33
+ ...v,
29
34
  className: e("group flex items-center gap-4 p-4 border-border-seam", "cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "animate-in fade-in-0"),
30
- onClick: () => p?.(a),
35
+ onClick: () => m?.(a),
31
36
  role: "button",
32
37
  tabIndex: 0,
33
38
  onKeyDown: (e) => {
34
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p?.(a));
39
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m?.(a));
35
40
  },
36
41
  children: [
37
42
  /* @__PURE__ */ s(l, {
@@ -47,7 +52,7 @@ var d = ({ connection: e }) => {
47
52
  className: "font-semibold text-text-primary truncate",
48
53
  children: a.name
49
54
  }),
50
- /* @__PURE__ */ s(d, { connection: a }),
55
+ /* @__PURE__ */ s(f, { connection: a }),
51
56
  /* @__PURE__ */ s(r, { status: a.status })
52
57
  ]
53
58
  }), /* @__PURE__ */ c("div", {
@@ -66,22 +71,27 @@ var d = ({ connection: e }) => {
66
71
  }),
67
72
  /* @__PURE__ */ c("div", {
68
73
  className: "flex items-center gap-3 flex-shrink-0",
69
- children: [/* @__PURE__ */ s("span", {
70
- className: "text-xs text-text-secondary",
71
- children: m("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: h(a.lastUsedAt) })
72
- }), /* @__PURE__ */ s(i, {
73
- size: 18,
74
- className: "text-text-secondary group-hover:text-primary transition-colors"
75
- })]
74
+ children: [
75
+ h,
76
+ /* @__PURE__ */ s("span", {
77
+ className: "text-xs text-text-secondary",
78
+ children: g("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: _(a.lastUsedAt) })
79
+ }),
80
+ /* @__PURE__ */ s(i, {
81
+ size: 18,
82
+ className: "text-text-secondary group-hover:text-primary transition-colors"
83
+ })
84
+ ]
76
85
  })
77
86
  ]
78
87
  }) : /* @__PURE__ */ c(u, {
88
+ ...v,
79
89
  className: e("group relative flex flex-col p-5 border-border-seam", "cursor-pointer hover:shadow-[var(--shadow-pop)] hover:border-border-strong", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "animate-in fade-in-0"),
80
- onClick: () => p?.(a),
90
+ onClick: () => m?.(a),
81
91
  role: "button",
82
92
  tabIndex: 0,
83
93
  onKeyDown: (e) => {
84
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), p?.(a));
94
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m?.(a));
85
95
  },
86
96
  children: [
87
97
  /* @__PURE__ */ c("div", {
@@ -96,7 +106,7 @@ var d = ({ connection: e }) => {
96
106
  children: [/* @__PURE__ */ s("h3", {
97
107
  className: "font-semibold text-text-primary truncate",
98
108
  children: a.name
99
- }), /* @__PURE__ */ s(d, { connection: a })]
109
+ }), /* @__PURE__ */ s(f, { connection: a })]
100
110
  }),
101
111
  /* @__PURE__ */ s("p", {
102
112
  className: "text-sm text-text-secondary truncate",
@@ -111,18 +121,22 @@ var d = ({ connection: e }) => {
111
121
  children: a.description
112
122
  }),
113
123
  /* @__PURE__ */ c("div", {
114
- className: "flex items-center justify-between mt-auto pt-3 border-t border-border-seam",
115
- children: [/* @__PURE__ */ s("span", {
116
- className: "text-xs text-text-secondary",
117
- children: m("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: h(a.lastUsedAt) })
118
- }), /* @__PURE__ */ s(i, {
119
- size: 16,
120
- className: "text-text-secondary group-hover:text-primary transition-colors"
121
- })]
124
+ className: e("flex items-center justify-between mt-auto pt-3 border-t border-border-seam", h && "gap-2"),
125
+ children: [
126
+ /* @__PURE__ */ s("span", {
127
+ className: "text-xs text-text-secondary",
128
+ children: g("integrations.connectionCard.lastUsed", "Last used {{time}}", { time: _(a.lastUsedAt) })
129
+ }),
130
+ h,
131
+ /* @__PURE__ */ s(i, {
132
+ size: 16,
133
+ className: "text-text-secondary group-hover:text-primary transition-colors"
134
+ })
135
+ ]
122
136
  })
123
137
  ]
124
138
  });
125
139
  };
126
- export { f as ConnectionCard };
140
+ export { p as ConnectionCard };
127
141
 
128
142
  //# sourceMappingURL=ConnectionCard.js.map