@burdenoff/microfe-integrations 2026.1114.2 → 2026.1117.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/integrations/hooks/useTr.d.ts +18 -1
- package/dist/integrations/hooks/useTr.js +13 -7
- package/dist/integrations/hooks/useTr.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +3 -3
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +2 -1
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Substitute `{{name}}` and `{name}` placeholders in one left-to-right pass.
|
|
3
|
+
*
|
|
4
|
+
* `{{name}}` is the house style, but copy that reached a product dictionary
|
|
5
|
+
* (seeded translations, app-level overrides extracted from call-site
|
|
6
|
+
* fallbacks) sometimes carries the single-brace spelling. The old helper only
|
|
7
|
+
* replaced `{{name}}`, so a stored "Latency: {latency}ms" rendered the raw
|
|
8
|
+
* placeholder on the connection detail page (BOFF-11875). This mirrors the
|
|
9
|
+
* fe-libs I18nProvider `interpolate`, which accepts both spellings.
|
|
10
|
+
*
|
|
11
|
+
* One regex pass (not chained replaces) so a substituted VALUE that contains
|
|
12
|
+
* braces is never substituted again, and every repeated placeholder is
|
|
13
|
+
* replaced. An unknown name is left exactly as written, so a missing param
|
|
14
|
+
* stays visible in review instead of silently vanishing.
|
|
15
|
+
*/
|
|
16
|
+
export declare function interpolateParams(template: string, params: Record<string, string | number>): string;
|
|
1
17
|
/**
|
|
2
18
|
* useTr — translation hook with fallback semantics.
|
|
3
19
|
*
|
|
@@ -6,7 +22,8 @@
|
|
|
6
22
|
* instead. This keeps consumer call sites consistent and avoids leaking
|
|
7
23
|
* untranslated keys into the UI.
|
|
8
24
|
*
|
|
9
|
-
* Supports optional interpolation params using `{{key}}`
|
|
25
|
+
* Supports optional interpolation params using `{{key}}` (house style) or
|
|
26
|
+
* `{key}` placeholders.
|
|
10
27
|
*
|
|
11
28
|
* @example
|
|
12
29
|
* const tr = useTr();
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { useCallback as e } from "react";
|
|
2
2
|
import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
3
|
// src/integrations/hooks/useTr.ts
|
|
4
|
-
function n() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}, [n]);
|
|
4
|
+
function n(e, t) {
|
|
5
|
+
return e.replace(/\{\{(\w+)\}\}|\{(\w+)\}/g, (e, n, r) => {
|
|
6
|
+
let i = n ?? r;
|
|
7
|
+
return i === void 0 || !Object.prototype.hasOwnProperty.call(t, i) ? e : String(t[i]);
|
|
8
|
+
});
|
|
10
9
|
}
|
|
11
|
-
|
|
10
|
+
function r() {
|
|
11
|
+
let { t: r } = t();
|
|
12
|
+
return e((e, t, i) => {
|
|
13
|
+
let a = r(e), o = a === e ? t : a;
|
|
14
|
+
return i ? n(o, i) : o;
|
|
15
|
+
}, [r]);
|
|
16
|
+
}
|
|
17
|
+
export { n as interpolateParams, r as useTr };
|
|
12
18
|
|
|
13
19
|
//# sourceMappingURL=useTr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTr.js","names":["
|
|
1
|
+
{"version":3,"file":"useTr.js","names":["interpolateParams","template","name","doubleName","singleName","params","match","useTr","useI18n","useCallback","translated","t","key","raw","fallback"],"sources":["../../../src/integrations/hooks/useTr.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\n/**\n * Substitute `{{name}}` and `{name}` placeholders in one left-to-right pass.\n *\n * `{{name}}` is the house style, but copy that reached a product dictionary\n * (seeded translations, app-level overrides extracted from call-site\n * fallbacks) sometimes carries the single-brace spelling. The old helper only\n * replaced `{{name}}`, so a stored \"Latency: {latency}ms\" rendered the raw\n * placeholder on the connection detail page (BOFF-11875). This mirrors the\n * fe-libs I18nProvider `interpolate`, which accepts both spellings.\n *\n * One regex pass (not chained replaces) so a substituted VALUE that contains\n * braces is never substituted again, and every repeated placeholder is\n * replaced. An unknown name is left exactly as written, so a missing param\n * stays visible in review instead of silently vanishing.\n */\nexport function interpolateParams(\n template: string,\n params: Record<string, string | number>\n): string {\n return template.replace(\n /\\{\\{(\\w+)\\}\\}|\\{(\\w+)\\}/g,\n (match, doubleName?: string, singleName?: string) => {\n const name = doubleName ?? singleName;\n if (name === undefined || !Object.prototype.hasOwnProperty.call(params, name)) return match;\n return String(params[name]);\n }\n );\n}\n\n/**\n * useTr — translation hook with fallback semantics.\n *\n * Wraps `useI18n().t()` so that when a key has no translation (i.e. the\n * provider returns the key itself), the caller's English fallback is used\n * instead. This keeps consumer call sites consistent and avoids leaking\n * untranslated keys into the UI.\n *\n * Supports optional interpolation params using `{{key}}` (house style) or\n * `{key}` placeholders.\n *\n * @example\n * const tr = useTr();\n * return <h1>{tr('integrations.overview.title', 'Integrations')}</h1>;\n * return <p>{tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', { time: '2m ago' })}</p>;\n */\nexport function useTr(): (\n key: string,\n fallback: string,\n params?: Record<string, string | number>\n) => string {\n const { t } = useI18n();\n return useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string => {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n if (!params) return raw;\n return interpolateParams(raw, params);\n },\n [t]\n );\n}\n"],"mappings":";;;AAkBA,SAAgBA,EACd,GACA,GACQ;CACR,OAAOC,EAAS,QACd,6BACC,GAAO,GAAqB,MAAwB;EACnD,IAAMC,IAAOC,KAAcC;EAE3B,OADIF,MAAS,KAAA,KAAa,CAAC,OAAO,UAAU,eAAe,KAAKG,GAAQH,CAAI,IAAUI,IAC/E,OAAOD,EAAOH,EAAK;CAC5B,CACF;AACF;AAkBA,SAAgBK,IAIJ;CACV,IAAM,EAAE,SAAMC,EAAQ;CACtB,OAAOC,GACJ,GAAa,GAAkB,MAAqD;EACnF,IAAMC,IAAaC,EAAEC,CAAG,GAClBC,IAAMH,MAAeE,IAAME,IAAWJ;EAE5C,OADKL,IACEL,EAAkBa,GAAKR,CAAM,IADhBQ;CAEtB,GACA,CAACF,CAAC,CACJ;AACF"}
|
|
@@ -419,7 +419,7 @@ function w() {
|
|
|
419
419
|
...H ? [{
|
|
420
420
|
id: "latency",
|
|
421
421
|
label: O("integrations.connectedApps.testLatency", "Test latency"),
|
|
422
|
-
value: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
|
|
422
|
+
value: O("integrations.connectionDetail.testResult.latency", "Latency: {{latency}}ms", { latency: H.latencyMs })
|
|
423
423
|
}] : [],
|
|
424
424
|
...Q ? [{
|
|
425
425
|
id: "storage",
|
|
@@ -537,7 +537,7 @@ function w() {
|
|
|
537
537
|
}),
|
|
538
538
|
/* @__PURE__ */ h(We, {
|
|
539
539
|
icon: /* @__PURE__ */ h(o, { size: 16 }),
|
|
540
|
-
children: O("integrations.connectionDetail.purpose", "This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: M.provider.name })
|
|
540
|
+
children: O("integrations.connectionDetail.purpose", "This is a single live link to {{provider}}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.", { provider: M.provider.name })
|
|
541
541
|
}),
|
|
542
542
|
(z || B) && /* @__PURE__ */ h(x, {
|
|
543
543
|
storageKey: "integrations-connection-detail",
|
|
@@ -693,7 +693,7 @@ function w() {
|
|
|
693
693
|
}),
|
|
694
694
|
/* @__PURE__ */ h("p", {
|
|
695
695
|
className: "text-xs text-text-secondary mt-1",
|
|
696
|
-
children: O("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: H.latencyMs })
|
|
696
|
+
children: O("integrations.connectionDetail.testResult.latency", "Latency: {{latency}}ms", { latency: H.latencyMs })
|
|
697
697
|
})
|
|
698
698
|
]
|
|
699
699
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionDetail.js","names":["_Fragment","ConnectionDetail","useParams","useIntegrations","tr","useTr","getAuthTypeLabel","useAuthTypeLabel","formatLastUsed","useFormatLastUsed","formatDate","useFormatDate","useConnection","connectionId","testing","useTestConnection","refreshing","useRefreshToken","revoking","useRevokeConnection","deleting","useDeleteConnection","canRefreshToken","useFeatureFlag","INTEGRATION_FEATURE_FLAGS","permissionsLoading","usePermissions","canUpdate","hasPermission","INTEGRATION_PERMISSIONS","canDelete","canShareRole","canCreateConnection","shareOpen","setShareOpen","useState","testResult","setTestResult","notification","setNotification","deleteDialogOpen","setDeleteDialogOpen","deleteVaultSecret","setDeleteVaultSecret","revokeDialogOpen","setRevokeDialogOpen","reconnectOpen","setReconnectOpen","vaultName","useVaultName","connection","showNotification","loading","Loader2","error","AlertCircle","refetch","RefreshCw","navigate","joinPath","basePath","ArrowLeft","handleTest","result","testConnection","handleRefresh","refreshToken","isRefreshed","refreshError","handleRevoke","confirmRevoke","revokeConnection","handleDelete","nativeConfirm","confirmDelete","deleteConnection","nativeNotify","handleSelfHostedResult","outcome","actionLoading","canShare","canManageSharing","usesVaultCredentials","nextSteps","Zap","RotateCcw","Activity","overlays","Fragment","cn","CheckCircle2","XCircle","AlertDialog","next","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","navigationV2","event","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","Trash2","ConfirmDialog","Shield","ConnectionShareDialog","reconnectNow","canReconnect","signedInAs","reconnectButton","Button","AddConnectionDialog","ProviderIcon","suggestAnchorProps","ConnectionStatusBadge","PrivateConnectionBadge","CTAOverflowMenu","Share2","nativeImpact","OptionalFields","row","ShowMore","scope","SelfHostedReleaseSetting","NextSteps","ShowTechnicalDetails","RecentActivity","PagePurpose","EmphasisPanel","Mail","User","Clock","GlassCard","Key"],"sources":["../../../src/integrations/pages/ConnectionDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Clock,\n Activity,\n CheckCircle2,\n XCircle,\n Key,\n RotateCcw,\n Zap,\n Mail,\n User,\n Trash2,\n Share2,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useAuthTypeLabel } from '../hooks/useLabel';\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport { useFormatDate } from '../hooks/useFormatDate';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { INTEGRATION_FEATURE_FLAGS } from '../constants/featureFlags';\nimport { joinPath } from '../utils/navigation';\nimport {\n useConnection,\n useTestConnection,\n useRefreshToken,\n useRevokeConnection,\n useDeleteConnection,\n} from '../hooks/useConnections';\nimport { ProviderIcon, canManageSharing } from '@burdenoff/fe-libs/connections';\nimport { ConnectionStatusBadge } from '../components/ConnectionStatusBadge';\nimport { ConnectionShareDialog, PrivateConnectionBadge } from '../components/ConnectionSharing';\nimport { SelfHostedReleaseSetting } from '../components/SelfHostedReleaseSetting';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Button,\n GlassCard,\n EmphasisPanel,\n ShowMore,\n CTAOverflowMenu,\n PagePurpose,\n NextSteps,\n OptionalFields,\n ShowTechnicalDetails,\n type NextStep,\n type CTAAction,\n} from '@burdenoff/fe-libs/ui';\nimport { suggestAnchorProps } from '@burdenoff/fe-libs/shared/proactive';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { useVaultName } from '../hooks/useVaultName';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { RecentActivity } from '../components/RecentActivity';\nimport { canReconnect, isRefreshed } from '../utils/connectedApps';\n\n/**\n * Connection Detail — Single connection view with info, scopes, and action buttons.\n */\nexport function ConnectionDetail() {\n const { connectionId } = useParams<{ connectionId: string }>();\n const { basePath = '/', navigate, navigationV2 = false } = useIntegrations();\n const tr = useTr();\n const getAuthTypeLabel = useAuthTypeLabel();\n const formatLastUsed = useFormatLastUsed();\n const formatDate = useFormatDate();\n\n const { connection, loading, error, refetch } = useConnection(connectionId ?? '');\n const { testConnection, loading: testing } = useTestConnection();\n const { refreshToken, loading: refreshing } = useRefreshToken();\n const { revokeConnection, loading: revoking } = useRevokeConnection();\n const { deleteConnection, loading: deleting } = useDeleteConnection();\n const canRefreshToken = useFeatureFlag(INTEGRATION_FEATURE_FLAGS.OAUTH_REFRESH, true);\n\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canUpdate = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_UPDATE);\n const canDelete = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_DELETE);\n const canShareRole = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_SHARE);\n // Reconnect runs the same sign-in a new connection does.\n const canCreateConnection = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const [shareOpen, setShareOpen] = useState(false);\n\n const [testResult, setTestResult] = useState<{\n success: boolean;\n message: string;\n latencyMs: number;\n } | null>(null);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const [deleteVaultSecret, setDeleteVaultSecret] = useState(false);\n const [revokeDialogOpen, setRevokeDialogOpen] = useState(false);\n const [reconnectOpen, setReconnectOpen] = useState(false);\n const vaultName = useVaultName(connection?.vaultId);\n\n const showNotification = (type: 'success' | 'error', message: string) => {\n setNotification({ type, message });\n setTimeout(() => setNotification(null), 5000);\n };\n\n if (loading || permissionsLoading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">\n {tr('integrations.connectionDetail.loading', 'Loading connection details...')}\n </span>\n </div>\n );\n }\n\n if (error || !connection) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('integrations.connectionDetail.error.title', 'Connection not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {error?.message ||\n tr(\n 'integrations.connectionDetail.error.description',\n 'The requested connection could not be loaded.'\n )}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />{' '}\n {tr('integrations.connectionDetail.error.retry', 'Try Again')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />{' '}\n {tr('integrations.connectionDetail.error.back', 'Back to Connections')}\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleTest = async () => {\n const result = await testConnection(connection.id);\n if (result) {\n setTestResult(result);\n showNotification(result.success ? 'success' : 'error', result.message);\n }\n };\n\n // The service answers with the connection's status after the refresh; only\n // ACTIVE is a refreshed token. It used to report success whatever happened,\n // and a thrown error went unhandled.\n const handleRefresh = async () => {\n try {\n const result = await refreshToken(connection.id);\n if (isRefreshed(result)) {\n showNotification(\n 'success',\n tr(\n 'integrations.connectionDetail.notifications.refreshSuccess',\n 'Token refreshed successfully'\n )\n );\n } else {\n showNotification(\n 'error',\n tr(\n 'integrations.connectionDetail.notifications.refreshFailed',\n 'The token could not be refreshed. Reconnect to sign in again.'\n )\n );\n }\n } catch (refreshError) {\n showNotification(\n 'error',\n refreshError instanceof Error\n ? refreshError.message\n : tr(\n 'integrations.connectionDetail.notifications.refreshFailed',\n 'The token could not be refreshed. Reconnect to sign in again.'\n )\n );\n } finally {\n void refetch();\n }\n };\n\n const handleRevoke = async () => {\n setRevokeDialogOpen(true);\n };\n\n const confirmRevoke = async () => {\n await revokeConnection(connection.id);\n showNotification(\n 'success',\n tr('integrations.connectionDetail.notifications.revokeSuccess', 'Connection revoked')\n );\n setRevokeDialogOpen(false);\n refetch();\n };\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection'),\n message: tr(\n 'integrations.connectionDetail.deleteDialog.message',\n // One text on every confirm path; a literal, so i18n:extract reads it.\n 'Delete this connection? This cannot be undone.'\n ),\n okButtonTitle: tr('integrations.connectionDetail.deleteDialog.confirm', 'Delete'),\n cancelButtonTitle: tr('integrations.connectionDetail.deleteDialog.cancel', 'Cancel'),\n });\n if (result === null) {\n setDeleteDialogOpen(true);\n return;\n }\n if (result) {\n await confirmDelete();\n }\n };\n\n const confirmDelete = async () => {\n try {\n await deleteConnection(connection.id, deleteVaultSecret);\n showNotification(\n 'success',\n tr('integrations.connectionDetail.notifications.deleteSuccess', 'Connection deleted')\n );\n void nativeNotify('success');\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n navigate?.(joinPath(basePath, 'connections'));\n } catch (error) {\n showNotification(\n 'error',\n error instanceof Error ? error.message : 'Failed to delete connection'\n );\n void nativeNotify('error');\n }\n };\n\n const handleSelfHostedResult = (\n outcome: { ok: true; allow: boolean } | { ok: false; message: string }\n ) => {\n if (outcome.ok) {\n showNotification(\n 'success',\n outcome.allow\n ? tr(\n 'integrations.connectionDetail.selfHosted.allowed',\n 'Self-hosted workers may now receive this connection’s key.'\n )\n : tr(\n 'integrations.connectionDetail.selfHosted.stopped',\n 'Self-hosted workers no longer receive this connection’s key.'\n )\n );\n void nativeNotify('success');\n } else {\n showNotification('error', outcome.message);\n void nativeNotify('error');\n }\n };\n\n const actionLoading = testing || refreshing || revoking || deleting;\n // BOFF-9726: the owner, editors and workspace admins choose who can use it.\n const canShare = canShareRole && canManageSharing(connection.myAccess ?? null);\n const usesVaultCredentials = Boolean(connection.vaultId || connection.credentialSecretId);\n\n const nextSteps: NextStep[] = [\n {\n id: 'test',\n label: tr('integrations.connectionDetail.nextSteps.test.label', 'Test the connection'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.test.description',\n 'Run a live check to confirm credentials still work before relying on it.'\n ),\n icon: <Zap size={16} />,\n onClick: () => {\n void handleTest();\n },\n done: connection.status === 'active' && Boolean(testResult?.success),\n },\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n id: 'refresh',\n label: tr(\n 'integrations.connectionDetail.nextSteps.refresh.label',\n 'Refresh the access token'\n ),\n description: tr(\n 'integrations.connectionDetail.nextSteps.refresh.description',\n 'Renew OAuth credentials if requests start failing with an auth error.'\n ),\n icon: <RotateCcw size={16} />,\n onClick: () => {\n void handleRefresh();\n },\n } satisfies NextStep,\n ]\n : []),\n {\n id: 'logs',\n label: tr('integrations.connectionDetail.nextSteps.logs.label', 'Review activity logs'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.logs.description',\n 'See recent requests and errors for this connection to debug issues.'\n ),\n icon: <Activity size={16} />,\n onClick: () => navigate?.(joinPath(basePath, 'logs')),\n },\n ];\n\n const overlays = (\n <>\n {/* Notification */}\n {notification && (\n <div\n className={cn(\n 'fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200',\n notification.type === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text border-border-default'\n : 'bg-status-error-bg-subtle text-status-error-text border-border-default'\n )}\n >\n {notification.type === 'success' ? <CheckCircle2 size={20} /> : <XCircle size={20} />}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n <AlertDialog\n open={deleteDialogOpen}\n onOpenChange={(next) => {\n if (!next) {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }\n }}\n >\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {/* One message for both confirm paths: the native confirm used a\n different default text for the same key. */}\n {navigationV2\n ? tr(\n 'integrations.connectedApps.removeMessage',\n 'Remove {{name}}? Workflows that use it stop working until you connect {{provider}} again.',\n { name: connection.name, provider: connection.provider.name }\n )\n : tr(\n 'integrations.connectionDetail.deleteDialog.message',\n // One text on every confirm path; a literal, so i18n:extract reads it.\n 'Delete this connection? This cannot be undone.'\n )}\n {usesVaultCredentials &&\n ` ${tr(\n 'integrations.connectionDetail.deleteDialog.vaultHint',\n 'You can also remove the mapped vault secret if you no longer need it.'\n )}`}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n {usesVaultCredentials && (\n <label className=\"flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={deleteVaultSecret}\n onChange={(event) => setDeleteVaultSecret(event.target.checked)}\n className=\"mt-0.5\"\n aria-label={tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecretHint',\n 'Use this only if no other connections rely on the same secret.'\n )}\n </p>\n </div>\n </label>\n )}\n\n <AlertDialogFooter>\n <AlertDialogCancel\n onClick={() => {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }}\n >\n {tr('integrations.connectionDetail.deleteDialog.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n disabled={deleting}\n onClick={(event) => {\n event.preventDefault();\n confirmDelete();\n }}\n className=\"inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50\"\n >\n {deleting ? <Loader2 size={14} className=\"animate-spin\" /> : <Trash2 size={14} />}\n {tr(\n 'integrations.connectionDetail.deleteDialog.deleteConnection',\n 'Delete connection'\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n <ConfirmDialog\n open={revokeDialogOpen}\n title={tr('integrations.connectionDetail.confirm.revokeTitle', 'Revoke connection')}\n description={tr(\n 'integrations.connectionDetail.confirm.revoke',\n 'Are you sure you want to revoke this connection? This will disconnect the external service.'\n )}\n confirmLabel={tr('integrations.connectionDetail.actions.revoke', 'Revoke')}\n cancelLabel={tr('integrations.connectionDetail.actions.cancel', 'Cancel')}\n loading={revoking}\n destructive\n icon={<Shield size={20} />}\n onConfirm={confirmRevoke}\n onCancel={() => setRevokeDialogOpen(false)}\n />\n\n {canShare && (\n <ConnectionShareDialog\n connection={connection}\n open={shareOpen}\n onClose={() => setShareOpen(false)}\n onShared={() => {\n showNotification(\n 'success',\n tr('integrations.connectionDetail.notifications.shareSuccess', 'Sharing updated')\n );\n void refetch();\n }}\n />\n )}\n </>\n );\n\n const reconnectNow = canCreateConnection && canReconnect(connection.status);\n const signedInAs = connection.externalAccountEmail || connection.externalAccountName;\n const reconnectButton = reconnectNow ? (\n <Button onClick={() => setReconnectOpen(true)} data-testid=\"connection-detail-reconnect\">\n <RotateCcw size={14} aria-hidden=\"true\" />\n {tr('integrations.connectedApps.reconnect', 'Reconnect')}\n </Button>\n ) : null;\n\n if (navigationV2) {\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {overlays}\n <AddConnectionDialog\n open={reconnectOpen}\n onClose={() => setReconnectOpen(false)}\n reconnect={\n reconnectOpen\n ? {\n connectionId: connection.id,\n name: connection.name,\n providerId: connection.provider.id,\n authMethodKey: connection.authMethodKey ?? null,\n }\n : null\n }\n onConnectionCreated={() => {\n void refetch();\n }}\n />\n\n {/* Level 1: name, status, who it signs in as, last used, and what to do. */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center\">\n <div className=\"flex min-w-0 flex-1 items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"shrink-0\"\n onClick={() => navigate?.(basePath)}\n aria-label={tr('integrations.connectionDetail.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </Button>\n <ProviderIcon provider={connection.provider} size={56} />\n <div className=\"min-w-0 flex-1\">\n <div\n className=\"flex flex-wrap items-center gap-3\"\n {...suggestAnchorProps({ entityType: 'connection', entityId: connection.id })}\n >\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary break-words\">\n {connection.name}\n </h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n <PrivateConnectionBadge connection={connection} />\n </div>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {signedInAs\n ? tr('integrations.connectedApps.signedInAs', 'Signed in as {{account}}', {\n account: signedInAs,\n })\n : connection.provider.name}\n {' · '}\n {tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', {\n time: formatLastUsed(connection.lastUsedAt),\n })}\n </p>\n </div>\n </div>\n <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n {reconnectButton}\n {/* Test is a read: anyone who can see the connection may run it. */}\n <CTAOverflowMenu\n align=\"end\"\n primary={{\n label: tr('integrations.connectedApps.test', 'Test'),\n onSelect: () => {\n void handleTest();\n },\n disabled: actionLoading,\n icon: testing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Zap size={14} />\n ),\n }}\n actions={[\n ...(canShare\n ? [\n {\n label: tr('integrations.connectionDetail.actions.share', 'Share'),\n onSelect: () => setShareOpen(true),\n disabled: actionLoading,\n icon: <Share2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n label: tr(\n 'integrations.connectionDetail.actions.refreshToken',\n 'Refresh Token'\n ),\n onSelect: () => {\n void handleRefresh();\n },\n disabled: actionLoading,\n icon: <RotateCcw size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDelete\n ? [\n {\n label: tr('integrations.connectionDetail.actions.revoke', 'Revoke'),\n onSelect: () => {\n void handleRevoke();\n },\n disabled: actionLoading,\n icon: <Shield size={14} />,\n } satisfies CTAAction,\n {\n label: tr('integrations.connectedApps.remove', 'Remove'),\n onSelect: () => {\n void nativeImpact('medium');\n setDeleteDialogOpen(true);\n },\n intent: 'destructive',\n disabled: actionLoading,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </div>\n </div>\n </div>\n\n {connection.errorMessage && (\n <div\n role=\"alert\"\n className=\"flex flex-col gap-3 rounded-xl border border-border-default bg-status-error-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex items-start gap-3\">\n <AlertCircle size={20} className=\"mt-0.5 shrink-0 text-status-error-text\" />\n <div className=\"min-w-0\">\n <p className=\"font-semibold text-status-error-text\">\n {tr('integrations.connectedApps.brokenTitle', '{{provider}} stopped working', {\n provider: connection.provider.name,\n })}\n </p>\n <p className=\"text-sm text-status-error-text break-words\">\n {connection.errorMessage}\n </p>\n </div>\n </div>\n {reconnectButton}\n </div>\n )}\n\n {testResult && (\n <div\n role=\"status\"\n className={cn(\n 'rounded-xl border p-4',\n testResult.success\n ? 'border-border-default bg-status-success-bg-subtle'\n : 'border-border-default bg-status-error-bg-subtle'\n )}\n >\n <p\n className={cn(\n 'font-semibold flex items-center gap-2',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.success ? <CheckCircle2 size={18} /> : <XCircle size={18} />}\n {testResult.success\n ? tr('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tr('integrations.connectionDetail.testResult.failed', 'Connection Test Failed')}\n </p>\n <p\n className={cn(\n 'text-sm mt-1',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.message}\n </p>\n </div>\n )}\n\n {/* Level 2: one click away, remembered per person. */}\n <OptionalFields\n storageKey=\"integrations.connection-detail.more-details\"\n label={tr('integrations.connectedApps.moreDetails', 'More details')}\n >\n <div className=\"space-y-4\">\n <div className=\"space-y-3 text-sm\">\n {connection.description && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-text-secondary uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-text-primary mt-0.5\">{connection.description}</p>\n </div>\n )}\n {[\n {\n id: 'app',\n label: tr('integrations.connectionDetail.fields.provider', 'Provider'),\n value: `${connection.provider.name} · ${getAuthTypeLabel(connection.provider.authType)}`,\n },\n ...(connection.externalAccountName && connection.externalAccountEmail\n ? [\n {\n id: 'name',\n label: tr('integrations.connectionDetail.fields.name', 'Name'),\n value: connection.externalAccountName,\n },\n ]\n : []),\n {\n id: 'health',\n label: tr('integrations.connectionDetail.fields.healthCheck', 'Health Check'),\n value: formatDate(connection.lastHealthCheck),\n },\n {\n id: 'created',\n label: tr('integrations.connectionDetail.fields.created', 'Created'),\n value: formatDate(connection.createdAt),\n },\n ...(testResult\n ? [\n {\n id: 'latency',\n label: tr('integrations.connectedApps.testLatency', 'Test latency'),\n value: tr(\n 'integrations.connectionDetail.testResult.latency',\n 'Latency: {latency}ms',\n { latency: testResult.latencyMs }\n ),\n },\n ]\n : []),\n ...(usesVaultCredentials\n ? [\n {\n id: 'storage',\n label: tr(\n 'integrations.connectionDetail.sections.credentialStorage',\n 'Credential Storage'\n ),\n value: [vaultName ?? connection.vaultId, connection.credentialSecretName]\n .filter(Boolean)\n .join(' · '),\n },\n ]\n : []),\n ].map((row) => (\n <div\n key={row.id}\n className=\"flex items-center justify-between gap-3 py-2 border-b border-border-seam\"\n >\n <span className=\"text-text-secondary\">{row.label}</span>\n <span className=\"text-text-primary text-end break-all\">{row.value}</span>\n </div>\n ))}\n </div>\n <div>\n <h3 className=\"text-sm font-medium text-text-primary mb-2 flex items-center gap-2\">\n <Shield size={16} className=\"text-primary\" aria-hidden=\"true\" />\n {tr('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h3>\n {connection.grantedScopes.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all scopes\">\n <div className=\"flex flex-wrap gap-2\">\n {connection.grantedScopes.map((scope) => (\n <span\n key={scope}\n className=\"text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </div>\n <SelfHostedReleaseSetting connection={connection} onResult={handleSelfHostedResult} />\n {(canUpdate || canDelete) && (\n <NextSteps storageKey=\"integrations-connection-detail\" steps={nextSteps} />\n )}\n <ShowTechnicalDetails copyable>\n {[\n `connectionId: ${connection.id}`,\n `providerKey: ${connection.provider.key}`,\n `status: ${connection.status}`,\n ...(connection.vaultId ? [`vaultId: ${connection.vaultId}`] : []),\n ...(connection.credentialSecretId\n ? [`secretId: ${connection.credentialSecretId}`]\n : []),\n ].join('\\n')}\n </ShowTechnicalDetails>\n </div>\n </OptionalFields>\n\n <RecentActivity\n connectionId={connection.id}\n onShowAll={() =>\n navigate?.(joinPath(basePath, `logs?connectionId=${encodeURIComponent(connection.id)}`))\n }\n />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {overlays}\n\n {/* Header */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n aria-label={tr('integrations.connectionDetail.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </Button>\n <ProviderIcon provider={connection.provider} size={56} />\n <div className=\"flex-1\">\n {/* A proactive suggestion about this connection pins here (BOFF-13166). */}\n <div\n className=\"flex items-center gap-3\"\n {...suggestAnchorProps({ entityType: 'connection', entityId: connection.id })}\n >\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {connection.name}\n </h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n <PrivateConnectionBadge connection={connection} />\n </div>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {connection.provider.name} · {getAuthTypeLabel(connection.provider.authType)}\n </p>\n </div>\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Activity size={16} />}>\n {tr(\n 'integrations.connectionDetail.purpose',\n 'This is a single live link to {provider}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.',\n { provider: connection.provider.name }\n )}\n </PagePurpose>\n\n {/* Next steps — guidance for managing this connection */}\n {(canUpdate || canDelete) && (\n <NextSteps storageKey=\"integrations-connection-detail\" steps={nextSteps} />\n )}\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Connection Info — the page's primary emphasis zone */}\n <EmphasisPanel className=\"p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Activity size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.info', 'Connection Info')}\n </h2>\n <div className=\"space-y-3\">\n {connection.description && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-text-secondary uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-sm text-text-primary mt-0.5\">{connection.description}</p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.provider', 'Provider')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.provider.name}\n </span>\n </div>\n {connection.externalAccountEmail && (\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Mail size={14} /> {tr('integrations.connectionDetail.fields.account', 'Account')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.externalAccountEmail}\n </span>\n </div>\n )}\n {connection.externalAccountName && (\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <User size={14} /> {tr('integrations.connectionDetail.fields.name', 'Name')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.externalAccountName}\n </span>\n </div>\n )}\n {connection.errorMessage && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-status-error-text uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.error', 'Error')}\n </span>\n <p className=\"text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2\">\n {connection.errorMessage}\n </p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Clock size={14} />{' '}\n {tr('integrations.connectionDetail.fields.lastUsed', 'Last Used')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatLastUsed(connection.lastUsedAt)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.healthCheck', 'Health Check')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatDate(connection.lastHealthCheck)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.created', 'Created')}\n </span>\n <span className=\"text-sm text-text-primary\">{formatDate(connection.createdAt)}</span>\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Scopes & Actions */}\n <div className=\"space-y-4\">\n {/* Granted Scopes */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h2>\n {connection.grantedScopes.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all scopes\">\n <div className=\"flex flex-wrap gap-2\">\n {connection.grantedScopes.map((scope) => (\n <span\n key={scope}\n className=\"text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </GlassCard>\n\n <SelfHostedReleaseSetting connection={connection} onResult={handleSelfHostedResult} />\n\n {/* Test Result */}\n {testResult && (\n <div\n className={cn(\n 'rounded-xl border p-5',\n testResult.success\n ? 'border-border-default bg-status-success-bg-subtle'\n : 'border-border-default bg-status-error-bg-subtle'\n )}\n >\n <h2\n className={cn(\n 'font-semibold flex items-center gap-2 mb-2',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.success ? <CheckCircle2 size={18} /> : <XCircle size={18} />}\n {testResult.success\n ? tr('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tr('integrations.connectionDetail.testResult.failed', 'Connection Test Failed')}\n </h2>\n <p\n className={cn(\n 'text-sm',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.message}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr('integrations.connectionDetail.testResult.latency', 'Latency: {latency}ms', {\n latency: testResult.latencyMs,\n })}\n </p>\n </div>\n )}\n\n {usesVaultCredentials && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr(\n 'integrations.connectionDetail.sections.credentialStorage',\n 'Credential Storage'\n )}\n </h2>\n <div className=\"space-y-2 text-sm\">\n {connection.vaultId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-text-secondary\">\n {tr('integrations.connectionDetail.fields.vault', 'Vault')}\n </span>\n <span className=\"font-medium text-text-primary break-all\">\n {vaultName ?? connection.vaultId}\n </span>\n </div>\n )}\n {connection.credentialSecretName && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-text-secondary\">\n {tr('integrations.connectionDetail.fields.secret', 'Secret')}\n </span>\n <span className=\"font-medium text-text-primary break-all\">\n {connection.credentialSecretName}\n </span>\n </div>\n )}\n {connection.credentialSecretId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-text-secondary\">\n {tr('integrations.connectionDetail.fields.secretId', 'Secret ID')}\n </span>\n <span className=\"font-mono text-xs text-text-primary break-all\">\n {connection.credentialSecretId}\n </span>\n </div>\n )}\n </div>\n </GlassCard>\n )}\n\n {/* Actions — hidden entirely when user has no action permissions */}\n {(canUpdate || canDelete || canShare) && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.actions', 'Actions')}\n </h2>\n <CTAOverflowMenu\n align=\"start\"\n primary={{\n label: tr('integrations.connectionDetail.actions.test', 'Test Connection'),\n onSelect: () => {\n void handleTest();\n },\n disabled: actionLoading,\n icon: testing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Zap size={14} />\n ),\n }}\n actions={[\n ...(canShare\n ? [\n {\n label: tr('integrations.connectionDetail.actions.share', 'Share'),\n onSelect: () => setShareOpen(true),\n disabled: actionLoading,\n icon: <Share2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n label: tr(\n 'integrations.connectionDetail.actions.refreshToken',\n 'Refresh Token'\n ),\n onSelect: () => {\n void handleRefresh();\n },\n disabled: actionLoading,\n icon: <RotateCcw size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDelete\n ? [\n {\n label: tr('integrations.connectionDetail.actions.revoke', 'Revoke'),\n onSelect: () => {\n void handleRevoke();\n },\n disabled: actionLoading,\n icon: <Shield size={14} />,\n } satisfies CTAAction,\n {\n label: tr('integrations.connectionDetail.actions.delete', 'Delete'),\n onSelect: () => {\n void handleDelete();\n },\n intent: 'destructive',\n disabled: actionLoading,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </GlassCard>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,SAAgBC,IAAmB;CACjC,IAAM,EAAE,oBAAiBC,GAAoC,GACvD,EAAE,cAAW,KAAK,aAAU,kBAAe,OAAUC,GAAgB,GACrEC,IAAKC,EAAM,GACXC,IAAmBC,GAAiB,GACpCC,IAAiBC,GAAkB,GACnCC,IAAaC,GAAc,GAE3B,EAAE,eAAY,aAAS,UAAO,eAAYC,GAAcC,KAAgB,EAAE,GAC1E,EAAE,oBAAgB,SAASC,MAAYC,GAAkB,GACzD,EAAE,kBAAc,SAASC,OAAeC,GAAgB,GACxD,EAAE,sBAAkB,SAASC,OAAaC,GAAoB,GAC9D,EAAE,sBAAkB,SAASC,MAAaC,GAAoB,GAC9DC,IAAkBC,GAAeC,GAA0B,eAAe,EAAI,GAE9E,EAAE,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Q;UACR,UAAU2E;UACV,MAAM,kBAACwB,GAAD,EAAQ,MAAM,GAAK,CAAA;SAC3B,CACF,IACA,CAAC;QACP;OACD,CAAA,CACQ;;KAEV;IACF,CAAA,CAAA;;EACF;;AAET"}
|
|
1
|
+
{"version":3,"file":"ConnectionDetail.js","names":["_Fragment","ConnectionDetail","useParams","useIntegrations","tr","useTr","getAuthTypeLabel","useAuthTypeLabel","formatLastUsed","useFormatLastUsed","formatDate","useFormatDate","useConnection","connectionId","testing","useTestConnection","refreshing","useRefreshToken","revoking","useRevokeConnection","deleting","useDeleteConnection","canRefreshToken","useFeatureFlag","INTEGRATION_FEATURE_FLAGS","permissionsLoading","usePermissions","canUpdate","hasPermission","INTEGRATION_PERMISSIONS","canDelete","canShareRole","canCreateConnection","shareOpen","setShareOpen","useState","testResult","setTestResult","notification","setNotification","deleteDialogOpen","setDeleteDialogOpen","deleteVaultSecret","setDeleteVaultSecret","revokeDialogOpen","setRevokeDialogOpen","reconnectOpen","setReconnectOpen","vaultName","useVaultName","connection","showNotification","loading","Loader2","error","AlertCircle","refetch","RefreshCw","navigate","joinPath","basePath","ArrowLeft","handleTest","result","testConnection","handleRefresh","refreshToken","isRefreshed","refreshError","handleRevoke","confirmRevoke","revokeConnection","handleDelete","nativeConfirm","confirmDelete","deleteConnection","nativeNotify","handleSelfHostedResult","outcome","actionLoading","canShare","canManageSharing","usesVaultCredentials","nextSteps","Zap","RotateCcw","Activity","overlays","Fragment","cn","CheckCircle2","XCircle","AlertDialog","next","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","navigationV2","event","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","Trash2","ConfirmDialog","Shield","ConnectionShareDialog","reconnectNow","canReconnect","signedInAs","reconnectButton","Button","AddConnectionDialog","ProviderIcon","suggestAnchorProps","ConnectionStatusBadge","PrivateConnectionBadge","CTAOverflowMenu","Share2","nativeImpact","OptionalFields","row","ShowMore","scope","SelfHostedReleaseSetting","NextSteps","ShowTechnicalDetails","RecentActivity","PagePurpose","EmphasisPanel","Mail","User","Clock","GlassCard","Key"],"sources":["../../../src/integrations/pages/ConnectionDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Clock,\n Activity,\n CheckCircle2,\n XCircle,\n Key,\n RotateCcw,\n Zap,\n Mail,\n User,\n Trash2,\n Share2,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useAuthTypeLabel } from '../hooks/useLabel';\nimport { useFormatLastUsed } from '../hooks/useFormatLastUsed';\nimport { useFormatDate } from '../hooks/useFormatDate';\nimport { useFeatureFlag } from '@burdenoff/fe-libs/shared/feature-flags';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { INTEGRATION_FEATURE_FLAGS } from '../constants/featureFlags';\nimport { joinPath } from '../utils/navigation';\nimport {\n useConnection,\n useTestConnection,\n useRefreshToken,\n useRevokeConnection,\n useDeleteConnection,\n} from '../hooks/useConnections';\nimport { ProviderIcon, canManageSharing } from '@burdenoff/fe-libs/connections';\nimport { ConnectionStatusBadge } from '../components/ConnectionStatusBadge';\nimport { ConnectionShareDialog, PrivateConnectionBadge } from '../components/ConnectionSharing';\nimport { SelfHostedReleaseSetting } from '../components/SelfHostedReleaseSetting';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Button,\n GlassCard,\n EmphasisPanel,\n ShowMore,\n CTAOverflowMenu,\n PagePurpose,\n NextSteps,\n OptionalFields,\n ShowTechnicalDetails,\n type NextStep,\n type CTAAction,\n} from '@burdenoff/fe-libs/ui';\nimport { suggestAnchorProps } from '@burdenoff/fe-libs/shared/proactive';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\nimport { useVaultName } from '../hooks/useVaultName';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { RecentActivity } from '../components/RecentActivity';\nimport { canReconnect, isRefreshed } from '../utils/connectedApps';\n\n/**\n * Connection Detail — Single connection view with info, scopes, and action buttons.\n */\nexport function ConnectionDetail() {\n const { connectionId } = useParams<{ connectionId: string }>();\n const { basePath = '/', navigate, navigationV2 = false } = useIntegrations();\n const tr = useTr();\n const getAuthTypeLabel = useAuthTypeLabel();\n const formatLastUsed = useFormatLastUsed();\n const formatDate = useFormatDate();\n\n const { connection, loading, error, refetch } = useConnection(connectionId ?? '');\n const { testConnection, loading: testing } = useTestConnection();\n const { refreshToken, loading: refreshing } = useRefreshToken();\n const { revokeConnection, loading: revoking } = useRevokeConnection();\n const { deleteConnection, loading: deleting } = useDeleteConnection();\n const canRefreshToken = useFeatureFlag(INTEGRATION_FEATURE_FLAGS.OAUTH_REFRESH, true);\n\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canUpdate = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_UPDATE);\n const canDelete = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_DELETE);\n const canShareRole = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_SHARE);\n // Reconnect runs the same sign-in a new connection does.\n const canCreateConnection = hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const [shareOpen, setShareOpen] = useState(false);\n\n const [testResult, setTestResult] = useState<{\n success: boolean;\n message: string;\n latencyMs: number;\n } | null>(null);\n const [notification, setNotification] = useState<{\n type: 'success' | 'error';\n message: string;\n } | null>(null);\n const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);\n const [deleteVaultSecret, setDeleteVaultSecret] = useState(false);\n const [revokeDialogOpen, setRevokeDialogOpen] = useState(false);\n const [reconnectOpen, setReconnectOpen] = useState(false);\n const vaultName = useVaultName(connection?.vaultId);\n\n const showNotification = (type: 'success' | 'error', message: string) => {\n setNotification({ type, message });\n setTimeout(() => setNotification(null), 5000);\n };\n\n if (loading || permissionsLoading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">\n {tr('integrations.connectionDetail.loading', 'Loading connection details...')}\n </span>\n </div>\n );\n }\n\n if (error || !connection) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('integrations.connectionDetail.error.title', 'Connection not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {error?.message ||\n tr(\n 'integrations.connectionDetail.error.description',\n 'The requested connection could not be loaded.'\n )}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />{' '}\n {tr('integrations.connectionDetail.error.retry', 'Try Again')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />{' '}\n {tr('integrations.connectionDetail.error.back', 'Back to Connections')}\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleTest = async () => {\n const result = await testConnection(connection.id);\n if (result) {\n setTestResult(result);\n showNotification(result.success ? 'success' : 'error', result.message);\n }\n };\n\n // The service answers with the connection's status after the refresh; only\n // ACTIVE is a refreshed token. It used to report success whatever happened,\n // and a thrown error went unhandled.\n const handleRefresh = async () => {\n try {\n const result = await refreshToken(connection.id);\n if (isRefreshed(result)) {\n showNotification(\n 'success',\n tr(\n 'integrations.connectionDetail.notifications.refreshSuccess',\n 'Token refreshed successfully'\n )\n );\n } else {\n showNotification(\n 'error',\n tr(\n 'integrations.connectionDetail.notifications.refreshFailed',\n 'The token could not be refreshed. Reconnect to sign in again.'\n )\n );\n }\n } catch (refreshError) {\n showNotification(\n 'error',\n refreshError instanceof Error\n ? refreshError.message\n : tr(\n 'integrations.connectionDetail.notifications.refreshFailed',\n 'The token could not be refreshed. Reconnect to sign in again.'\n )\n );\n } finally {\n void refetch();\n }\n };\n\n const handleRevoke = async () => {\n setRevokeDialogOpen(true);\n };\n\n const confirmRevoke = async () => {\n await revokeConnection(connection.id);\n showNotification(\n 'success',\n tr('integrations.connectionDetail.notifications.revokeSuccess', 'Connection revoked')\n );\n setRevokeDialogOpen(false);\n refetch();\n };\n\n const handleDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection'),\n message: tr(\n 'integrations.connectionDetail.deleteDialog.message',\n // One text on every confirm path; a literal, so i18n:extract reads it.\n 'Delete this connection? This cannot be undone.'\n ),\n okButtonTitle: tr('integrations.connectionDetail.deleteDialog.confirm', 'Delete'),\n cancelButtonTitle: tr('integrations.connectionDetail.deleteDialog.cancel', 'Cancel'),\n });\n if (result === null) {\n setDeleteDialogOpen(true);\n return;\n }\n if (result) {\n await confirmDelete();\n }\n };\n\n const confirmDelete = async () => {\n try {\n await deleteConnection(connection.id, deleteVaultSecret);\n showNotification(\n 'success',\n tr('integrations.connectionDetail.notifications.deleteSuccess', 'Connection deleted')\n );\n void nativeNotify('success');\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n navigate?.(joinPath(basePath, 'connections'));\n } catch (error) {\n showNotification(\n 'error',\n error instanceof Error ? error.message : 'Failed to delete connection'\n );\n void nativeNotify('error');\n }\n };\n\n const handleSelfHostedResult = (\n outcome: { ok: true; allow: boolean } | { ok: false; message: string }\n ) => {\n if (outcome.ok) {\n showNotification(\n 'success',\n outcome.allow\n ? tr(\n 'integrations.connectionDetail.selfHosted.allowed',\n 'Self-hosted workers may now receive this connection’s key.'\n )\n : tr(\n 'integrations.connectionDetail.selfHosted.stopped',\n 'Self-hosted workers no longer receive this connection’s key.'\n )\n );\n void nativeNotify('success');\n } else {\n showNotification('error', outcome.message);\n void nativeNotify('error');\n }\n };\n\n const actionLoading = testing || refreshing || revoking || deleting;\n // BOFF-9726: the owner, editors and workspace admins choose who can use it.\n const canShare = canShareRole && canManageSharing(connection.myAccess ?? null);\n const usesVaultCredentials = Boolean(connection.vaultId || connection.credentialSecretId);\n\n const nextSteps: NextStep[] = [\n {\n id: 'test',\n label: tr('integrations.connectionDetail.nextSteps.test.label', 'Test the connection'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.test.description',\n 'Run a live check to confirm credentials still work before relying on it.'\n ),\n icon: <Zap size={16} />,\n onClick: () => {\n void handleTest();\n },\n done: connection.status === 'active' && Boolean(testResult?.success),\n },\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n id: 'refresh',\n label: tr(\n 'integrations.connectionDetail.nextSteps.refresh.label',\n 'Refresh the access token'\n ),\n description: tr(\n 'integrations.connectionDetail.nextSteps.refresh.description',\n 'Renew OAuth credentials if requests start failing with an auth error.'\n ),\n icon: <RotateCcw size={16} />,\n onClick: () => {\n void handleRefresh();\n },\n } satisfies NextStep,\n ]\n : []),\n {\n id: 'logs',\n label: tr('integrations.connectionDetail.nextSteps.logs.label', 'Review activity logs'),\n description: tr(\n 'integrations.connectionDetail.nextSteps.logs.description',\n 'See recent requests and errors for this connection to debug issues.'\n ),\n icon: <Activity size={16} />,\n onClick: () => navigate?.(joinPath(basePath, 'logs')),\n },\n ];\n\n const overlays = (\n <>\n {/* Notification */}\n {notification && (\n <div\n className={cn(\n 'fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200',\n notification.type === 'success'\n ? 'bg-status-success-bg-subtle text-status-success-text border-border-default'\n : 'bg-status-error-bg-subtle text-status-error-text border-border-default'\n )}\n >\n {notification.type === 'success' ? <CheckCircle2 size={20} /> : <XCircle size={20} />}\n <span className=\"font-medium\">{notification.message}</span>\n </div>\n )}\n\n <AlertDialog\n open={deleteDialogOpen}\n onOpenChange={(next) => {\n if (!next) {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }\n }}\n >\n <AlertDialogContent className=\"max-w-md\">\n <AlertDialogHeader>\n <AlertDialogTitle>\n {tr('integrations.connectionDetail.deleteDialog.title', 'Delete Connection')}\n </AlertDialogTitle>\n <AlertDialogDescription>\n {/* One message for both confirm paths: the native confirm used a\n different default text for the same key. */}\n {navigationV2\n ? tr(\n 'integrations.connectedApps.removeMessage',\n 'Remove {{name}}? Workflows that use it stop working until you connect {{provider}} again.',\n { name: connection.name, provider: connection.provider.name }\n )\n : tr(\n 'integrations.connectionDetail.deleteDialog.message',\n // One text on every confirm path; a literal, so i18n:extract reads it.\n 'Delete this connection? This cannot be undone.'\n )}\n {usesVaultCredentials &&\n ` ${tr(\n 'integrations.connectionDetail.deleteDialog.vaultHint',\n 'You can also remove the mapped vault secret if you no longer need it.'\n )}`}\n </AlertDialogDescription>\n </AlertDialogHeader>\n\n {usesVaultCredentials && (\n <label className=\"flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={deleteVaultSecret}\n onChange={(event) => setDeleteVaultSecret(event.target.checked)}\n className=\"mt-0.5\"\n aria-label={tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n />\n <div>\n <p className=\"text-sm font-medium text-text-primary\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecret',\n 'Also remove mapped vault secret'\n )}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr(\n 'integrations.connectionDetail.deleteDialog.removeVaultSecretHint',\n 'Use this only if no other connections rely on the same secret.'\n )}\n </p>\n </div>\n </label>\n )}\n\n <AlertDialogFooter>\n <AlertDialogCancel\n onClick={() => {\n setDeleteDialogOpen(false);\n setDeleteVaultSecret(false);\n }}\n >\n {tr('integrations.connectionDetail.deleteDialog.cancel', 'Cancel')}\n </AlertDialogCancel>\n <AlertDialogAction\n disabled={deleting}\n onClick={(event) => {\n event.preventDefault();\n confirmDelete();\n }}\n className=\"inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50\"\n >\n {deleting ? <Loader2 size={14} className=\"animate-spin\" /> : <Trash2 size={14} />}\n {tr(\n 'integrations.connectionDetail.deleteDialog.deleteConnection',\n 'Delete connection'\n )}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n\n <ConfirmDialog\n open={revokeDialogOpen}\n title={tr('integrations.connectionDetail.confirm.revokeTitle', 'Revoke connection')}\n description={tr(\n 'integrations.connectionDetail.confirm.revoke',\n 'Are you sure you want to revoke this connection? This will disconnect the external service.'\n )}\n confirmLabel={tr('integrations.connectionDetail.actions.revoke', 'Revoke')}\n cancelLabel={tr('integrations.connectionDetail.actions.cancel', 'Cancel')}\n loading={revoking}\n destructive\n icon={<Shield size={20} />}\n onConfirm={confirmRevoke}\n onCancel={() => setRevokeDialogOpen(false)}\n />\n\n {canShare && (\n <ConnectionShareDialog\n connection={connection}\n open={shareOpen}\n onClose={() => setShareOpen(false)}\n onShared={() => {\n showNotification(\n 'success',\n tr('integrations.connectionDetail.notifications.shareSuccess', 'Sharing updated')\n );\n void refetch();\n }}\n />\n )}\n </>\n );\n\n const reconnectNow = canCreateConnection && canReconnect(connection.status);\n const signedInAs = connection.externalAccountEmail || connection.externalAccountName;\n const reconnectButton = reconnectNow ? (\n <Button onClick={() => setReconnectOpen(true)} data-testid=\"connection-detail-reconnect\">\n <RotateCcw size={14} aria-hidden=\"true\" />\n {tr('integrations.connectedApps.reconnect', 'Reconnect')}\n </Button>\n ) : null;\n\n if (navigationV2) {\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {overlays}\n <AddConnectionDialog\n open={reconnectOpen}\n onClose={() => setReconnectOpen(false)}\n reconnect={\n reconnectOpen\n ? {\n connectionId: connection.id,\n name: connection.name,\n providerId: connection.provider.id,\n authMethodKey: connection.authMethodKey ?? null,\n }\n : null\n }\n onConnectionCreated={() => {\n void refetch();\n }}\n />\n\n {/* Level 1: name, status, who it signs in as, last used, and what to do. */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center\">\n <div className=\"flex min-w-0 flex-1 items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"shrink-0\"\n onClick={() => navigate?.(basePath)}\n aria-label={tr('integrations.connectionDetail.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </Button>\n <ProviderIcon provider={connection.provider} size={56} />\n <div className=\"min-w-0 flex-1\">\n <div\n className=\"flex flex-wrap items-center gap-3\"\n {...suggestAnchorProps({ entityType: 'connection', entityId: connection.id })}\n >\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary break-words\">\n {connection.name}\n </h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n <PrivateConnectionBadge connection={connection} />\n </div>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {signedInAs\n ? tr('integrations.connectedApps.signedInAs', 'Signed in as {{account}}', {\n account: signedInAs,\n })\n : connection.provider.name}\n {' · '}\n {tr('integrations.connectionCard.lastUsed', 'Last used {{time}}', {\n time: formatLastUsed(connection.lastUsedAt),\n })}\n </p>\n </div>\n </div>\n <div className=\"flex shrink-0 flex-wrap items-center gap-2\">\n {reconnectButton}\n {/* Test is a read: anyone who can see the connection may run it. */}\n <CTAOverflowMenu\n align=\"end\"\n primary={{\n label: tr('integrations.connectedApps.test', 'Test'),\n onSelect: () => {\n void handleTest();\n },\n disabled: actionLoading,\n icon: testing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Zap size={14} />\n ),\n }}\n actions={[\n ...(canShare\n ? [\n {\n label: tr('integrations.connectionDetail.actions.share', 'Share'),\n onSelect: () => setShareOpen(true),\n disabled: actionLoading,\n icon: <Share2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n label: tr(\n 'integrations.connectionDetail.actions.refreshToken',\n 'Refresh Token'\n ),\n onSelect: () => {\n void handleRefresh();\n },\n disabled: actionLoading,\n icon: <RotateCcw size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDelete\n ? [\n {\n label: tr('integrations.connectionDetail.actions.revoke', 'Revoke'),\n onSelect: () => {\n void handleRevoke();\n },\n disabled: actionLoading,\n icon: <Shield size={14} />,\n } satisfies CTAAction,\n {\n label: tr('integrations.connectedApps.remove', 'Remove'),\n onSelect: () => {\n void nativeImpact('medium');\n setDeleteDialogOpen(true);\n },\n intent: 'destructive',\n disabled: actionLoading,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </div>\n </div>\n </div>\n\n {connection.errorMessage && (\n <div\n role=\"alert\"\n className=\"flex flex-col gap-3 rounded-xl border border-border-default bg-status-error-bg-subtle p-4 sm:flex-row sm:items-center sm:justify-between\"\n >\n <div className=\"flex items-start gap-3\">\n <AlertCircle size={20} className=\"mt-0.5 shrink-0 text-status-error-text\" />\n <div className=\"min-w-0\">\n <p className=\"font-semibold text-status-error-text\">\n {tr('integrations.connectedApps.brokenTitle', '{{provider}} stopped working', {\n provider: connection.provider.name,\n })}\n </p>\n <p className=\"text-sm text-status-error-text break-words\">\n {connection.errorMessage}\n </p>\n </div>\n </div>\n {reconnectButton}\n </div>\n )}\n\n {testResult && (\n <div\n role=\"status\"\n className={cn(\n 'rounded-xl border p-4',\n testResult.success\n ? 'border-border-default bg-status-success-bg-subtle'\n : 'border-border-default bg-status-error-bg-subtle'\n )}\n >\n <p\n className={cn(\n 'font-semibold flex items-center gap-2',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.success ? <CheckCircle2 size={18} /> : <XCircle size={18} />}\n {testResult.success\n ? tr('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tr('integrations.connectionDetail.testResult.failed', 'Connection Test Failed')}\n </p>\n <p\n className={cn(\n 'text-sm mt-1',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.message}\n </p>\n </div>\n )}\n\n {/* Level 2: one click away, remembered per person. */}\n <OptionalFields\n storageKey=\"integrations.connection-detail.more-details\"\n label={tr('integrations.connectedApps.moreDetails', 'More details')}\n >\n <div className=\"space-y-4\">\n <div className=\"space-y-3 text-sm\">\n {connection.description && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-text-secondary uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-text-primary mt-0.5\">{connection.description}</p>\n </div>\n )}\n {[\n {\n id: 'app',\n label: tr('integrations.connectionDetail.fields.provider', 'Provider'),\n value: `${connection.provider.name} · ${getAuthTypeLabel(connection.provider.authType)}`,\n },\n ...(connection.externalAccountName && connection.externalAccountEmail\n ? [\n {\n id: 'name',\n label: tr('integrations.connectionDetail.fields.name', 'Name'),\n value: connection.externalAccountName,\n },\n ]\n : []),\n {\n id: 'health',\n label: tr('integrations.connectionDetail.fields.healthCheck', 'Health Check'),\n value: formatDate(connection.lastHealthCheck),\n },\n {\n id: 'created',\n label: tr('integrations.connectionDetail.fields.created', 'Created'),\n value: formatDate(connection.createdAt),\n },\n ...(testResult\n ? [\n {\n id: 'latency',\n label: tr('integrations.connectedApps.testLatency', 'Test latency'),\n value: tr(\n 'integrations.connectionDetail.testResult.latency',\n 'Latency: {{latency}}ms',\n { latency: testResult.latencyMs }\n ),\n },\n ]\n : []),\n ...(usesVaultCredentials\n ? [\n {\n id: 'storage',\n label: tr(\n 'integrations.connectionDetail.sections.credentialStorage',\n 'Credential Storage'\n ),\n value: [vaultName ?? connection.vaultId, connection.credentialSecretName]\n .filter(Boolean)\n .join(' · '),\n },\n ]\n : []),\n ].map((row) => (\n <div\n key={row.id}\n className=\"flex items-center justify-between gap-3 py-2 border-b border-border-seam\"\n >\n <span className=\"text-text-secondary\">{row.label}</span>\n <span className=\"text-text-primary text-end break-all\">{row.value}</span>\n </div>\n ))}\n </div>\n <div>\n <h3 className=\"text-sm font-medium text-text-primary mb-2 flex items-center gap-2\">\n <Shield size={16} className=\"text-primary\" aria-hidden=\"true\" />\n {tr('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h3>\n {connection.grantedScopes.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all scopes\">\n <div className=\"flex flex-wrap gap-2\">\n {connection.grantedScopes.map((scope) => (\n <span\n key={scope}\n className=\"text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </div>\n <SelfHostedReleaseSetting connection={connection} onResult={handleSelfHostedResult} />\n {(canUpdate || canDelete) && (\n <NextSteps storageKey=\"integrations-connection-detail\" steps={nextSteps} />\n )}\n <ShowTechnicalDetails copyable>\n {[\n `connectionId: ${connection.id}`,\n `providerKey: ${connection.provider.key}`,\n `status: ${connection.status}`,\n ...(connection.vaultId ? [`vaultId: ${connection.vaultId}`] : []),\n ...(connection.credentialSecretId\n ? [`secretId: ${connection.credentialSecretId}`]\n : []),\n ].join('\\n')}\n </ShowTechnicalDetails>\n </div>\n </OptionalFields>\n\n <RecentActivity\n connectionId={connection.id}\n onShowAll={() =>\n navigate?.(joinPath(basePath, `logs?connectionId=${encodeURIComponent(connection.id)}`))\n }\n />\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {overlays}\n\n {/* Header */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(joinPath(basePath, 'connections'))}\n aria-label={tr('integrations.connectionDetail.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </Button>\n <ProviderIcon provider={connection.provider} size={56} />\n <div className=\"flex-1\">\n {/* A proactive suggestion about this connection pins here (BOFF-13166). */}\n <div\n className=\"flex items-center gap-3\"\n {...suggestAnchorProps({ entityType: 'connection', entityId: connection.id })}\n >\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {connection.name}\n </h1>\n <ConnectionStatusBadge status={connection.status} size=\"md\" />\n <PrivateConnectionBadge connection={connection} />\n </div>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {connection.provider.name} · {getAuthTypeLabel(connection.provider.authType)}\n </p>\n </div>\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Activity size={16} />}>\n {tr(\n 'integrations.connectionDetail.purpose',\n 'This is a single live link to {{provider}}. From here you can confirm it is healthy, see which account and scopes were granted, test it on demand, refresh or revoke its access, and review where its credentials are stored.',\n { provider: connection.provider.name }\n )}\n </PagePurpose>\n\n {/* Next steps — guidance for managing this connection */}\n {(canUpdate || canDelete) && (\n <NextSteps storageKey=\"integrations-connection-detail\" steps={nextSteps} />\n )}\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Connection Info — the page's primary emphasis zone */}\n <EmphasisPanel className=\"p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Activity size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.info', 'Connection Info')}\n </h2>\n <div className=\"space-y-3\">\n {connection.description && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-text-secondary uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.description', 'Description')}\n </span>\n <p className=\"text-sm text-text-primary mt-0.5\">{connection.description}</p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.provider', 'Provider')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.provider.name}\n </span>\n </div>\n {connection.externalAccountEmail && (\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Mail size={14} /> {tr('integrations.connectionDetail.fields.account', 'Account')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.externalAccountEmail}\n </span>\n </div>\n )}\n {connection.externalAccountName && (\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <User size={14} /> {tr('integrations.connectionDetail.fields.name', 'Name')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {connection.externalAccountName}\n </span>\n </div>\n )}\n {connection.errorMessage && (\n <div className=\"py-2 border-b border-border-seam\">\n <span className=\"text-xs text-status-error-text uppercase tracking-wide\">\n {tr('integrations.connectionDetail.fields.error', 'Error')}\n </span>\n <p className=\"text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2\">\n {connection.errorMessage}\n </p>\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary flex items-center gap-1\">\n <Clock size={14} />{' '}\n {tr('integrations.connectionDetail.fields.lastUsed', 'Last Used')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatLastUsed(connection.lastUsedAt)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.healthCheck', 'Health Check')}\n </span>\n <span className=\"text-sm text-text-primary\">\n {formatDate(connection.lastHealthCheck)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.fields.created', 'Created')}\n </span>\n <span className=\"text-sm text-text-primary\">{formatDate(connection.createdAt)}</span>\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Scopes & Actions */}\n <div className=\"space-y-4\">\n {/* Granted Scopes */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.scopes', 'Granted Scopes')}\n </h2>\n {connection.grantedScopes.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all scopes\">\n <div className=\"flex flex-wrap gap-2\">\n {connection.grantedScopes.map((scope) => (\n <span\n key={scope}\n className=\"text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono\"\n >\n {scope}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.connectionDetail.scopes.empty', 'No scopes granted.')}\n </p>\n )}\n </GlassCard>\n\n <SelfHostedReleaseSetting connection={connection} onResult={handleSelfHostedResult} />\n\n {/* Test Result */}\n {testResult && (\n <div\n className={cn(\n 'rounded-xl border p-5',\n testResult.success\n ? 'border-border-default bg-status-success-bg-subtle'\n : 'border-border-default bg-status-error-bg-subtle'\n )}\n >\n <h2\n className={cn(\n 'font-semibold flex items-center gap-2 mb-2',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.success ? <CheckCircle2 size={18} /> : <XCircle size={18} />}\n {testResult.success\n ? tr('integrations.connectionDetail.testResult.passed', 'Connection Test Passed')\n : tr('integrations.connectionDetail.testResult.failed', 'Connection Test Failed')}\n </h2>\n <p\n className={cn(\n 'text-sm',\n testResult.success ? 'text-status-success-text' : 'text-status-error-text'\n )}\n >\n {testResult.message}\n </p>\n <p className=\"text-xs text-text-secondary mt-1\">\n {tr('integrations.connectionDetail.testResult.latency', 'Latency: {{latency}}ms', {\n latency: testResult.latencyMs,\n })}\n </p>\n </div>\n )}\n\n {usesVaultCredentials && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr(\n 'integrations.connectionDetail.sections.credentialStorage',\n 'Credential Storage'\n )}\n </h2>\n <div className=\"space-y-2 text-sm\">\n {connection.vaultId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-text-secondary\">\n {tr('integrations.connectionDetail.fields.vault', 'Vault')}\n </span>\n <span className=\"font-medium text-text-primary break-all\">\n {vaultName ?? connection.vaultId}\n </span>\n </div>\n )}\n {connection.credentialSecretName && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-text-secondary\">\n {tr('integrations.connectionDetail.fields.secret', 'Secret')}\n </span>\n <span className=\"font-medium text-text-primary break-all\">\n {connection.credentialSecretName}\n </span>\n </div>\n )}\n {connection.credentialSecretId && (\n <div className=\"flex items-center justify-between gap-3\">\n <span className=\"text-text-secondary\">\n {tr('integrations.connectionDetail.fields.secretId', 'Secret ID')}\n </span>\n <span className=\"font-mono text-xs text-text-primary break-all\">\n {connection.credentialSecretId}\n </span>\n </div>\n )}\n </div>\n </GlassCard>\n )}\n\n {/* Actions — hidden entirely when user has no action permissions */}\n {(canUpdate || canDelete || canShare) && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Key size={18} className=\"text-primary\" />\n {tr('integrations.connectionDetail.sections.actions', 'Actions')}\n </h2>\n <CTAOverflowMenu\n align=\"start\"\n primary={{\n label: tr('integrations.connectionDetail.actions.test', 'Test Connection'),\n onSelect: () => {\n void handleTest();\n },\n disabled: actionLoading,\n icon: testing ? (\n <Loader2 size={14} className=\"animate-spin\" />\n ) : (\n <Zap size={14} />\n ),\n }}\n actions={[\n ...(canShare\n ? [\n {\n label: tr('integrations.connectionDetail.actions.share', 'Share'),\n onSelect: () => setShareOpen(true),\n disabled: actionLoading,\n icon: <Share2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canUpdate && connection.provider.authType === 'oauth2' && canRefreshToken\n ? [\n {\n label: tr(\n 'integrations.connectionDetail.actions.refreshToken',\n 'Refresh Token'\n ),\n onSelect: () => {\n void handleRefresh();\n },\n disabled: actionLoading,\n icon: <RotateCcw size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDelete\n ? [\n {\n label: tr('integrations.connectionDetail.actions.revoke', 'Revoke'),\n onSelect: () => {\n void handleRevoke();\n },\n disabled: actionLoading,\n icon: <Shield size={14} />,\n } satisfies CTAAction,\n {\n label: tr('integrations.connectionDetail.actions.delete', 'Delete'),\n onSelect: () => {\n void handleDelete();\n },\n intent: 'destructive',\n disabled: actionLoading,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </GlassCard>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,SAAgBC,IAAmB;CACjC,IAAM,EAAE,oBAAiBC,GAAoC,GACvD,EAAE,cAAW,KAAK,aAAU,kBAAe,OAAUC,GAAgB,GACrEC,IAAKC,EAAM,GACXC,IAAmBC,GAAiB,GACpCC,IAAiBC,GAAkB,GACnCC,IAAaC,GAAc,GAE3B,EAAE,eAAY,aAAS,UAAO,eAAYC,GAAcC,KAAgB,EAAE,GAC1E,EAAE,oBAAgB,SAASC,MAAYC,GAAkB,GACzD,EAAE,kBAAc,SAASC,OAAeC,GAAgB,GACxD,EAAE,sBAAkB,SAASC,OAAaC,GAAoB,GAC9D,EAAE,sBAAkB,SAASC,MA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OrG,EAAG,gDAAgD,QAAQ;UAClE,gBAAgB;WACd,GAAkB;UACpB;UACA,QAAQ;UACR,UAAU2E;UACV,MAAM,kBAACwB,GAAD,EAAQ,MAAM,GAAK,CAAA;SAC3B,CACF,IACA,CAAC;QACP;OACD,CAAA,CACQ;;KAEV;IACF,CAAA,CAAA;;EACF;;AAET"}
|
|
@@ -217,7 +217,7 @@ function A() {
|
|
|
217
217
|
/* @__PURE__ */ y("div", {
|
|
218
218
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
219
219
|
children: /* @__PURE__ */ b("div", {
|
|
220
|
-
className: "flex items-center gap-4",
|
|
220
|
+
className: "flex flex-wrap items-center gap-4 sm:flex-nowrap",
|
|
221
221
|
children: [
|
|
222
222
|
/* @__PURE__ */ y(x, {
|
|
223
223
|
variant: "ghost",
|
|
@@ -255,6 +255,7 @@ function A() {
|
|
|
255
255
|
}),
|
|
256
256
|
q && R.pluginStatus === "installed" && R.isEnabled && /* @__PURE__ */ b(x, {
|
|
257
257
|
onClick: X,
|
|
258
|
+
className: "w-full sm:w-auto",
|
|
258
259
|
children: [/* @__PURE__ */ y(g, { size: 16 }), I("integrations.providerDetail.actions.createConnection", "Create Connection")]
|
|
259
260
|
})
|
|
260
261
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderDetail.js","names":["_Fragment","ProviderDetail","useParams","useIntegrations","tr","useTr","getCategoryLabel","useCategoryLabel","getAuthTypeLabel","useAuthTypeLabel","useIntegrationsStore","providerLoading","providerError","useProvider","providerId","connectionsLoading","useConnectionsByProvider","enabling","useEnableProvider","disabling","useDisableProvider","uninstalling","useUninstallPlugin","permissionsLoading","usePermissions","uninstallDialogOpen","setUninstallDialogOpen","useState","canCreateConnection","hasPermission","INTEGRATION_PERMISSIONS","canCreateProvider","adminMode","canUpdateProvider","canDeleteProvider","loading","provider","providerActionLoading","Loader2","AlertCircle","refetch","RefreshCw","navigate","joinPath","basePath","ArrowLeft","handleCreateConnection","handleConnectionClick","onConnectionSelect","connection","handleToggleEnabled","disableProvider","enableProvider","handleUninstall","confirmUninstall","uninstallPlugin","handleEditProvider","canConnectNow","hasConnections","connections","nextSteps","Plus","BookOpen","Package","detailsCard","Fragment","GlassCard","navigationV2","CheckCircle2","cn","featuresCard","Star","ShowMore","feature","Button","ProviderIcon","PagePurpose","NextSteps","ExternalLink","Shield","CTAOverflowMenu","Pencil","Power","Download","Trash2","OptionalFields","EmphasisPanel","Link2","IllustratedEmptyState","ConnectionCard","conn","AddConnectionDialog","addConnectionDialogOpen","closeAddConnectionDialog","addConnectionProviderId","ConfirmDialog"],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n ExternalLink,\n BookOpen,\n Plus,\n Link2,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Package,\n Star,\n Download,\n Trash2,\n Pencil,\n Power,\n CheckCircle2,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useCategoryLabel, useAuthTypeLabel } from '../hooks/useLabel';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport {\n Button,\n GlassCard,\n EmphasisPanel,\n ShowMore,\n CTAOverflowMenu,\n IllustratedEmptyState,\n PagePurpose,\n NextSteps,\n OptionalFields,\n type NextStep,\n type CTAAction,\n} from '@burdenoff/fe-libs/ui';\nimport type { IntegrationConnection } from '../types';\n\n/**\n * Provider Detail — Single provider view with info, connections, and actions.\n */\nexport function ProviderDetail() {\n const { providerId } = useParams<{ providerId: string }>();\n const {\n adminMode = false,\n basePath = '/',\n navigate,\n onConnectionSelect,\n navigationV2 = false,\n } = useIntegrations();\n const tr = useTr();\n const getCategoryLabel = useCategoryLabel();\n const getAuthTypeLabel = useAuthTypeLabel();\n const {\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const {\n provider,\n loading: providerLoading,\n error: providerError,\n refetch,\n } = useProvider(providerId ?? '');\n const { connections, loading: connectionsLoading } = useConnectionsByProvider(providerId ?? '');\n const { enableProvider, loading: enabling } = useEnableProvider();\n const { disableProvider, loading: disabling } = useDisableProvider();\n const { uninstallPlugin, loading: uninstalling } = useUninstallPlugin();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const [uninstallDialogOpen, setUninstallDialogOpen] = useState(false);\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n const canUpdateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_UPDATE);\n const canDeleteProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_DELETE);\n\n // Only the FIRST load replaces the page. A refetch — which any mutation on\n // the page can trigger — must not, because this early return unmounts the\n // whole subtree, including the open connection dialog: everything typed into\n // it is lost, its in-flight requests abort, and queued state updates are\n // discarded. Creating a vault from inside the dialog hit exactly that, and\n // the newly created vault silently failed to be selected.\n const loading = providerLoading && !provider;\n const providerActionLoading = enabling || disabling || uninstalling;\n\n if (loading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl motion-safe:animate-vc-glow-pulse\" />\n <Loader2 size={48} className=\"relative animate-spin text-primary\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">\n {tr('integrations.providerDetail.loading', 'Loading provider details…')}\n </span>\n </div>\n );\n }\n\n if (providerError || !provider) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('integrations.providerDetail.error.title', 'Provider not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message ||\n tr(\n 'integrations.providerDetail.error.description',\n 'The requested provider could not be loaded.'\n )}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n {tr('integrations.providerDetail.error.retry', 'Try Again')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />\n {tr('integrations.providerDetail.error.back', 'Back to Catalog')}\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleCreateConnection = () => {\n openAddConnectionDialog(provider.id);\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n const handleToggleEnabled = async () => {\n if (!provider) return;\n if (provider.isEnabled) {\n await disableProvider(provider.id);\n } else {\n await enableProvider(provider.id);\n }\n await refetch();\n };\n\n const handleUninstall = async () => {\n if (!provider) return;\n setUninstallDialogOpen(true);\n };\n\n const confirmUninstall = async () => {\n if (!provider) return;\n await uninstallPlugin(provider.id);\n setUninstallDialogOpen(false);\n navigate?.(joinPath(basePath, 'providers'));\n };\n\n const handleEditProvider = () => {\n navigate?.(joinPath(basePath, `providers/${provider.id}/edit`));\n };\n\n const canConnectNow =\n canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled;\n const hasConnections = (connections ?? []).length > 0;\n\n const nextSteps: NextStep[] = [\n ...(canConnectNow\n ? [\n {\n id: 'connect',\n label: tr(\n 'integrations.providerDetail.nextSteps.connect.label',\n 'Connect {{provider}}',\n { provider: provider.name }\n ),\n description: tr(\n 'integrations.providerDetail.nextSteps.connect.description',\n 'Authenticate once to create a reusable connection to {{provider}}.',\n { provider: provider.name }\n ),\n icon: <Plus size={16} />,\n onClick: handleCreateConnection,\n done: hasConnections,\n } satisfies NextStep,\n ]\n : []),\n ...(provider.docsUrl\n ? [\n {\n id: 'docs',\n label: tr(\n 'integrations.providerDetail.nextSteps.docs.label',\n 'Read the provider documentation'\n ),\n description: tr(\n 'integrations.providerDetail.nextSteps.docs.description',\n 'Learn how {{provider}} works and what credentials you will need.',\n { provider: provider.name }\n ),\n icon: <BookOpen size={16} />,\n href: provider.docsUrl,\n } satisfies NextStep,\n ]\n : []),\n {\n id: 'browse',\n label: tr('integrations.providerDetail.nextSteps.browse.label', 'Browse other providers'),\n description: tr(\n 'integrations.providerDetail.nextSteps.browse.description',\n 'Return to the catalog to discover more services you can integrate.'\n ),\n icon: <Package size={16} />,\n onClick: () => navigate?.(joinPath(basePath, 'providers')),\n },\n ];\n\n const detailsCard = (\n <>\n {/* Provider Details */}\n <GlassCard className=\"border-border-seam p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Package size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.providerDetails', 'Provider Details')}\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.category', 'Category')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {tr(\n `integrations.category.${provider.category}`,\n getCategoryLabel(provider.category)\n )}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.authType', 'Auth Type')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {tr(\n `integrations.authType.${provider.authType}`,\n getAuthTypeLabel(provider.authType)\n )}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.pluginVersion', 'Plugin Version')}\n </span>\n <span className=\"text-sm font-mono text-text-primary\">{provider.pluginVersion}</span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.author', 'Author')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n {navigationV2 && provider.isBuiltIn && (\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.builtIn', 'Built-in')}\n </span>\n <CheckCircle2 size={16} className=\"text-status-success-text\" aria-hidden=\"true\" />\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.connections', 'Connections')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {provider.connectionCount}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.status', 'Status')}\n </span>\n <span\n className={cn(\n 'text-sm font-medium px-2 py-0.5 rounded-full',\n provider.isEnabled\n ? 'text-status-success-text bg-status-success-bg-subtle'\n : 'text-text-secondary bg-bg-sunken'\n )}\n >\n {provider.isEnabled\n ? tr('integrations.providerDetail.sections.enabled', 'Enabled')\n : tr('integrations.providerDetail.sections.disabled', 'Disabled')}\n </span>\n </div>\n </div>\n </GlassCard>\n </>\n );\n\n const featuresCard = (\n <>\n {/* Supported Features */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Star size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.supportedFeatures', 'Supported Features')}\n </h2>\n {provider.supportedFeatures.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all features\">\n <div className=\"flex flex-wrap gap-2\">\n {provider.supportedFeatures.map((feature) => (\n <span\n key={feature}\n className=\"text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary\"\n >\n {feature}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.noFeatures', 'No specific features listed.')}\n </p>\n )}\n </GlassCard>\n </>\n );\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n <div className=\"flex items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n aria-label={tr('integrations.providerDetail.actions.backAriaLabel', 'Back to catalog')}\n >\n <ArrowLeft size={20} />\n </Button>\n <ProviderIcon provider={provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">{provider.name}</h1>\n {!navigationV2 && provider.isBuiltIn && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default\">\n {tr('integrations.providerDetail.builtIn', 'Built-in')}\n </span>\n )}\n {!navigationV2 && !provider.isBuiltIn && provider.pluginAuthor && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary border border-border-subtle\">\n {tr('integrations.providerDetail.thirdParty', 'Third-party · by {{author}}', {\n author: provider.pluginAuthor,\n })}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mt-1\">{provider.description}</p>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <Button onClick={handleCreateConnection}>\n <Plus size={16} />\n {tr('integrations.providerDetail.actions.createConnection', 'Create Connection')}\n </Button>\n )}\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Package size={16} />}>\n {tr(\n 'integrations.providerDetail.purpose',\n \"This is the {{provider}} provider — the platform's blueprint for talking to {{provider}}. Here you can see how it authenticates, which features and scopes it supports, and the connections your workspace has created with it. Create a connection to start using {{provider}} in your apps.\",\n { provider: provider.name }\n )}\n </PagePurpose>\n\n {/* Next steps — guidance for getting value from this provider */}\n {(canConnectNow || provider.docsUrl) && (\n <NextSteps storageKey=\"integrations-provider-detail\" steps={nextSteps} />\n )}\n\n {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {!navigationV2 && detailsCard}\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {!navigationV2 && featuresCard}\n\n {/* Links */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <ExternalLink size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.links', 'Links')}\n </h2>\n <div className=\"space-y-2\">\n {provider.website && (\n <a\n href={provider.website}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <ExternalLink size={14} />\n {tr('integrations.providerDetail.sections.website', 'Website')}\n </a>\n )}\n {provider.docsUrl && (\n <a\n href={provider.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <BookOpen size={14} />\n {tr('integrations.providerDetail.sections.documentation', 'Documentation')}\n </a>\n )}\n </div>\n </GlassCard>\n\n {/* Plugin Actions */}\n {adminMode && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.pluginManagement', 'Plugin Management')}\n </h2>\n <CTAOverflowMenu\n align=\"start\"\n primary={\n canUpdateProvider\n ? {\n label: tr('integrations.providerDetail.actions.edit', 'Edit'),\n onSelect: handleEditProvider,\n icon: <Pencil size={14} />,\n }\n : undefined\n }\n actions={[\n ...(canUpdateProvider && provider.pluginStatus === 'installed'\n ? [\n {\n label: provider.isEnabled\n ? tr('integrations.providerDetail.actions.disable', 'Disable')\n : tr('integrations.providerDetail.actions.enable', 'Enable'),\n onSelect: () => {\n void handleToggleEnabled();\n },\n disabled: providerActionLoading,\n icon: <Power size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canCreateProvider && provider.pluginStatus === 'available'\n ? [\n {\n label: tr(\n 'integrations.providerDetail.actions.installPlugin',\n 'Install Plugin'\n ),\n onSelect: () => {},\n icon: <Download size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canUpdateProvider && provider.pluginStatus === 'update_available'\n ? [\n {\n label: tr(\n 'integrations.providerDetail.actions.updateAvailable',\n 'Update Available'\n ),\n onSelect: () => {},\n icon: <Download size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDeleteProvider && provider.pluginStatus === 'installed'\n ? [\n {\n label: tr('integrations.providerDetail.actions.uninstall', 'Uninstall'),\n onSelect: () => {\n void handleUninstall();\n },\n intent: 'destructive',\n disabled: providerActionLoading || provider.isBuiltIn,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </GlassCard>\n )}\n </div>\n </div>\n\n {/* v2: built-in, auth type, version, author and the raw feature keys are\n technical detail, one click away. */}\n {navigationV2 && (\n <OptionalFields\n storageKey=\"integrations.app-detail.technical-details\"\n label={tr('integrations.connectedApps.technicalDetails', 'Technical details')}\n >\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {detailsCard}\n {featuresCard}\n </div>\n </OptionalFields>\n )}\n\n {/* Connections for this provider */}\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center justify-between p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.providerDetail.connectionsCount', 'Connections ({{count}})', {\n count: (connections ?? []).length,\n })}\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <Button size=\"sm\" onClick={handleCreateConnection}>\n <Plus size={14} />\n {tr('integrations.providerDetail.actions.add', 'Add')}\n </Button>\n )}\n </div>\n\n {connectionsLoading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-text-secondary\" />\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr('integrations.providerDetail.noConnections.title', 'No connections yet')}\n description={tr(\n 'integrations.providerDetail.noConnections.description',\n 'Create a connection to start using {{provider}} in your workspace.',\n { provider: provider.name }\n )}\n action={\n canConnectNow ? (\n <Button onClick={handleCreateConnection}>\n <Plus size={16} />\n {tr('integrations.providerDetail.actions.createConnection', 'Create Connection')}\n </Button>\n ) : undefined\n }\n />\n )}\n\n {!connectionsLoading && (connections ?? []).length > 0 && (\n <div className=\"p-4 space-y-3\">\n {(connections ?? []).map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode=\"list\"\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n )}\n </EmphasisPanel>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n <ConfirmDialog\n open={uninstallDialogOpen}\n title={tr('integrations.providerDetail.uninstallDialog.title', 'Uninstall {{provider}}', {\n provider: provider.name,\n })}\n description={tr(\n 'integrations.providerDetail.uninstallDialog.description',\n 'Existing active connections must be removed first. This action is only available in admin mode.'\n )}\n confirmLabel={tr('integrations.providerDetail.uninstallDialog.confirm', 'Uninstall')}\n cancelLabel={tr('integrations.common.cancel', 'Cancel')}\n destructive\n loading={uninstalling}\n icon={<Trash2 size={20} />}\n onConfirm={confirmUninstall}\n onCancel={() => setUninstallDialogOpen(false)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyDA,SAAgBC,IAAiB;CAC/B,IAAM,EAAE,kBAAeC,GAAkC,GACnD,EACJ,eAAY,IACZ,cAAW,KACX,aACA,uBACA,kBAAe,OACbC,GAAgB,GACdC,IAAKC,GAAM,GACXC,KAAmBC,GAAiB,GACpCC,KAAmBC,GAAiB,GACpC,EACJ,6BACA,6BACA,4BACA,iCACEC,GAAqB,GAEnB,EACJ,aACA,SAASC,IACT,OAAOC,GACP,eACEC,EAAYC,KAAc,EAAE,GAC1B,EAAE,gBAAa,SAASC,MAAuBC,EAAyBF,KAAc,EAAE,GACxF,EAAE,oBAAgB,SAASG,OAAaC,EAAkB,GAC1D,EAAE,qBAAiB,SAASC,OAAcC,EAAmB,GAC7D,EAAE,qBAAiB,SAASC,MAAiBC,EAAmB,GAChE,EAAE,kBAAe,WAAWC,MAAuBC,GAAe,GAClE,CAACC,IAAqBC,KAA0BC,GAAS,EAAK,GAC9DC,IACJ,CAACL,KAAsBM,EAAcC,EAAwB,iBAAiB,GAC1EC,KACJC,KAAa,CAACT,KAAsBM,EAAcC,EAAwB,eAAe,GACrFG,IACJD,KAAa,CAACT,KAAsBM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Q;IACV;GACD,CAAA;GACD,kBAACC,IAAD;IACE,MAAMtE;IACN,OAAOrB,EAAG,qDAAqD,0BAA0B,EACvF,UAAUgC,EAAS,KACrB,CAAC;IACD,aAAahC,EACX,2DACA,iGACF;IACA,cAAcA,EAAG,uDAAuD,WAAW;IACnF,aAAaA,EAAG,8BAA8B,QAAQ;IACtD,aAAA;IACA,SAASiB;IACT,MAAM,kBAAC+D,GAAD,EAAQ,MAAM,GAAK,CAAA;IACzB,WAAW9B;IACX,gBAAgB5B,EAAuB,EAAK;GAC7C,CAAA;EACE;;AAET"}
|
|
1
|
+
{"version":3,"file":"ProviderDetail.js","names":["_Fragment","ProviderDetail","useParams","useIntegrations","tr","useTr","getCategoryLabel","useCategoryLabel","getAuthTypeLabel","useAuthTypeLabel","useIntegrationsStore","providerLoading","providerError","useProvider","providerId","connectionsLoading","useConnectionsByProvider","enabling","useEnableProvider","disabling","useDisableProvider","uninstalling","useUninstallPlugin","permissionsLoading","usePermissions","uninstallDialogOpen","setUninstallDialogOpen","useState","canCreateConnection","hasPermission","INTEGRATION_PERMISSIONS","canCreateProvider","adminMode","canUpdateProvider","canDeleteProvider","loading","provider","providerActionLoading","Loader2","AlertCircle","refetch","RefreshCw","navigate","joinPath","basePath","ArrowLeft","handleCreateConnection","handleConnectionClick","onConnectionSelect","connection","handleToggleEnabled","disableProvider","enableProvider","handleUninstall","confirmUninstall","uninstallPlugin","handleEditProvider","canConnectNow","hasConnections","connections","nextSteps","Plus","BookOpen","Package","detailsCard","Fragment","GlassCard","navigationV2","CheckCircle2","cn","featuresCard","Star","ShowMore","feature","Button","ProviderIcon","PagePurpose","NextSteps","ExternalLink","Shield","CTAOverflowMenu","Pencil","Power","Download","Trash2","OptionalFields","EmphasisPanel","Link2","IllustratedEmptyState","ConnectionCard","conn","AddConnectionDialog","addConnectionDialogOpen","closeAddConnectionDialog","addConnectionProviderId","ConfirmDialog"],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router';\nimport {\n ArrowLeft,\n ExternalLink,\n BookOpen,\n Plus,\n Link2,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Package,\n Star,\n Download,\n Trash2,\n Pencil,\n Power,\n CheckCircle2,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\nimport { useCategoryLabel, useAuthTypeLabel } from '../hooks/useLabel';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '@burdenoff/fe-libs/connections';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport {\n Button,\n GlassCard,\n EmphasisPanel,\n ShowMore,\n CTAOverflowMenu,\n IllustratedEmptyState,\n PagePurpose,\n NextSteps,\n OptionalFields,\n type NextStep,\n type CTAAction,\n} from '@burdenoff/fe-libs/ui';\nimport type { IntegrationConnection } from '../types';\n\n/**\n * Provider Detail — Single provider view with info, connections, and actions.\n */\nexport function ProviderDetail() {\n const { providerId } = useParams<{ providerId: string }>();\n const {\n adminMode = false,\n basePath = '/',\n navigate,\n onConnectionSelect,\n navigationV2 = false,\n } = useIntegrations();\n const tr = useTr();\n const getCategoryLabel = useCategoryLabel();\n const getAuthTypeLabel = useAuthTypeLabel();\n const {\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const {\n provider,\n loading: providerLoading,\n error: providerError,\n refetch,\n } = useProvider(providerId ?? '');\n const { connections, loading: connectionsLoading } = useConnectionsByProvider(providerId ?? '');\n const { enableProvider, loading: enabling } = useEnableProvider();\n const { disableProvider, loading: disabling } = useDisableProvider();\n const { uninstallPlugin, loading: uninstalling } = useUninstallPlugin();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const [uninstallDialogOpen, setUninstallDialogOpen] = useState(false);\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n const canUpdateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_UPDATE);\n const canDeleteProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_DELETE);\n\n // Only the FIRST load replaces the page. A refetch — which any mutation on\n // the page can trigger — must not, because this early return unmounts the\n // whole subtree, including the open connection dialog: everything typed into\n // it is lost, its in-flight requests abort, and queued state updates are\n // discarded. Creating a vault from inside the dialog hit exactly that, and\n // the newly created vault silently failed to be selected.\n const loading = providerLoading && !provider;\n const providerActionLoading = enabling || disabling || uninstalling;\n\n if (loading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl motion-safe:animate-vc-glow-pulse\" />\n <Loader2 size={48} className=\"relative animate-spin text-primary\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">\n {tr('integrations.providerDetail.loading', 'Loading provider details…')}\n </span>\n </div>\n );\n }\n\n if (providerError || !provider) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('integrations.providerDetail.error.title', 'Provider not found')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message ||\n tr(\n 'integrations.providerDetail.error.description',\n 'The requested provider could not be loaded.'\n )}\n </p>\n <div className=\"flex gap-2\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n {tr('integrations.providerDetail.error.retry', 'Try Again')}\n </button>\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />\n {tr('integrations.providerDetail.error.back', 'Back to Catalog')}\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleCreateConnection = () => {\n openAddConnectionDialog(provider.id);\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n const handleToggleEnabled = async () => {\n if (!provider) return;\n if (provider.isEnabled) {\n await disableProvider(provider.id);\n } else {\n await enableProvider(provider.id);\n }\n await refetch();\n };\n\n const handleUninstall = async () => {\n if (!provider) return;\n setUninstallDialogOpen(true);\n };\n\n const confirmUninstall = async () => {\n if (!provider) return;\n await uninstallPlugin(provider.id);\n setUninstallDialogOpen(false);\n navigate?.(joinPath(basePath, 'providers'));\n };\n\n const handleEditProvider = () => {\n navigate?.(joinPath(basePath, `providers/${provider.id}/edit`));\n };\n\n const canConnectNow =\n canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled;\n const hasConnections = (connections ?? []).length > 0;\n\n const nextSteps: NextStep[] = [\n ...(canConnectNow\n ? [\n {\n id: 'connect',\n label: tr(\n 'integrations.providerDetail.nextSteps.connect.label',\n 'Connect {{provider}}',\n { provider: provider.name }\n ),\n description: tr(\n 'integrations.providerDetail.nextSteps.connect.description',\n 'Authenticate once to create a reusable connection to {{provider}}.',\n { provider: provider.name }\n ),\n icon: <Plus size={16} />,\n onClick: handleCreateConnection,\n done: hasConnections,\n } satisfies NextStep,\n ]\n : []),\n ...(provider.docsUrl\n ? [\n {\n id: 'docs',\n label: tr(\n 'integrations.providerDetail.nextSteps.docs.label',\n 'Read the provider documentation'\n ),\n description: tr(\n 'integrations.providerDetail.nextSteps.docs.description',\n 'Learn how {{provider}} works and what credentials you will need.',\n { provider: provider.name }\n ),\n icon: <BookOpen size={16} />,\n href: provider.docsUrl,\n } satisfies NextStep,\n ]\n : []),\n {\n id: 'browse',\n label: tr('integrations.providerDetail.nextSteps.browse.label', 'Browse other providers'),\n description: tr(\n 'integrations.providerDetail.nextSteps.browse.description',\n 'Return to the catalog to discover more services you can integrate.'\n ),\n icon: <Package size={16} />,\n onClick: () => navigate?.(joinPath(basePath, 'providers')),\n },\n ];\n\n const detailsCard = (\n <>\n {/* Provider Details */}\n <GlassCard className=\"border-border-seam p-5 space-y-4\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Package size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.providerDetails', 'Provider Details')}\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.category', 'Category')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {tr(\n `integrations.category.${provider.category}`,\n getCategoryLabel(provider.category)\n )}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.authType', 'Auth Type')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {tr(\n `integrations.authType.${provider.authType}`,\n getAuthTypeLabel(provider.authType)\n )}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.pluginVersion', 'Plugin Version')}\n </span>\n <span className=\"text-sm font-mono text-text-primary\">{provider.pluginVersion}</span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.author', 'Author')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n {navigationV2 && provider.isBuiltIn && (\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.builtIn', 'Built-in')}\n </span>\n <CheckCircle2 size={16} className=\"text-status-success-text\" aria-hidden=\"true\" />\n </div>\n )}\n <div className=\"flex items-center justify-between py-2 border-b border-border-seam\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.connections', 'Connections')}\n </span>\n <span className=\"text-sm font-medium text-text-primary\">\n {provider.connectionCount}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.status', 'Status')}\n </span>\n <span\n className={cn(\n 'text-sm font-medium px-2 py-0.5 rounded-full',\n provider.isEnabled\n ? 'text-status-success-text bg-status-success-bg-subtle'\n : 'text-text-secondary bg-bg-sunken'\n )}\n >\n {provider.isEnabled\n ? tr('integrations.providerDetail.sections.enabled', 'Enabled')\n : tr('integrations.providerDetail.sections.disabled', 'Disabled')}\n </span>\n </div>\n </div>\n </GlassCard>\n </>\n );\n\n const featuresCard = (\n <>\n {/* Supported Features */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Star size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.supportedFeatures', 'Supported Features')}\n </h2>\n {provider.supportedFeatures.length > 0 ? (\n <ShowMore collapsedHeight={88} label=\"Show all features\">\n <div className=\"flex flex-wrap gap-2\">\n {provider.supportedFeatures.map((feature) => (\n <span\n key={feature}\n className=\"text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary\"\n >\n {feature}\n </span>\n ))}\n </div>\n </ShowMore>\n ) : (\n <p className=\"text-sm text-text-secondary\">\n {tr('integrations.providerDetail.sections.noFeatures', 'No specific features listed.')}\n </p>\n )}\n </GlassCard>\n </>\n );\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"rounded-xl border border-border-seam bg-accent-wash p-6\">\n {/* Below sm the create-connection button wraps onto its own full-width line: on a\n 390 px phone back + icon + title + button did not fit and the button was cut off.\n From sm up the header stays one row, as before. */}\n <div className=\"flex flex-wrap items-center gap-4 sm:flex-nowrap\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n aria-label={tr('integrations.providerDetail.actions.backAriaLabel', 'Back to catalog')}\n >\n <ArrowLeft size={20} />\n </Button>\n <ProviderIcon provider={provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex flex-wrap items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">{provider.name}</h1>\n {!navigationV2 && provider.isBuiltIn && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default\">\n {tr('integrations.providerDetail.builtIn', 'Built-in')}\n </span>\n )}\n {!navigationV2 && !provider.isBuiltIn && provider.pluginAuthor && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary border border-border-subtle\">\n {tr('integrations.providerDetail.thirdParty', 'Third-party · by {{author}}', {\n author: provider.pluginAuthor,\n })}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mt-1\">{provider.description}</p>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <Button onClick={handleCreateConnection} className=\"w-full sm:w-auto\">\n <Plus size={16} />\n {tr('integrations.providerDetail.actions.createConnection', 'Create Connection')}\n </Button>\n )}\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Package size={16} />}>\n {tr(\n 'integrations.providerDetail.purpose',\n \"This is the {{provider}} provider — the platform's blueprint for talking to {{provider}}. Here you can see how it authenticates, which features and scopes it supports, and the connections your workspace has created with it. Create a connection to start using {{provider}} in your apps.\",\n { provider: provider.name }\n )}\n </PagePurpose>\n\n {/* Next steps — guidance for getting value from this provider */}\n {(canConnectNow || provider.docsUrl) && (\n <NextSteps storageKey=\"integrations-provider-detail\" steps={nextSteps} />\n )}\n\n {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {!navigationV2 && detailsCard}\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {!navigationV2 && featuresCard}\n\n {/* Links */}\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <ExternalLink size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.links', 'Links')}\n </h2>\n <div className=\"space-y-2\">\n {provider.website && (\n <a\n href={provider.website}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <ExternalLink size={14} />\n {tr('integrations.providerDetail.sections.website', 'Website')}\n </a>\n )}\n {provider.docsUrl && (\n <a\n href={provider.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <BookOpen size={14} />\n {tr('integrations.providerDetail.sections.documentation', 'Documentation')}\n </a>\n )}\n </div>\n </GlassCard>\n\n {/* Plugin Actions */}\n {adminMode && (\n <GlassCard className=\"border-border-seam p-5\">\n <h2 className=\"font-semibold text-text-primary flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n {tr('integrations.providerDetail.sections.pluginManagement', 'Plugin Management')}\n </h2>\n <CTAOverflowMenu\n align=\"start\"\n primary={\n canUpdateProvider\n ? {\n label: tr('integrations.providerDetail.actions.edit', 'Edit'),\n onSelect: handleEditProvider,\n icon: <Pencil size={14} />,\n }\n : undefined\n }\n actions={[\n ...(canUpdateProvider && provider.pluginStatus === 'installed'\n ? [\n {\n label: provider.isEnabled\n ? tr('integrations.providerDetail.actions.disable', 'Disable')\n : tr('integrations.providerDetail.actions.enable', 'Enable'),\n onSelect: () => {\n void handleToggleEnabled();\n },\n disabled: providerActionLoading,\n icon: <Power size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canCreateProvider && provider.pluginStatus === 'available'\n ? [\n {\n label: tr(\n 'integrations.providerDetail.actions.installPlugin',\n 'Install Plugin'\n ),\n onSelect: () => {},\n icon: <Download size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canUpdateProvider && provider.pluginStatus === 'update_available'\n ? [\n {\n label: tr(\n 'integrations.providerDetail.actions.updateAvailable',\n 'Update Available'\n ),\n onSelect: () => {},\n icon: <Download size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ...(canDeleteProvider && provider.pluginStatus === 'installed'\n ? [\n {\n label: tr('integrations.providerDetail.actions.uninstall', 'Uninstall'),\n onSelect: () => {\n void handleUninstall();\n },\n intent: 'destructive',\n disabled: providerActionLoading || provider.isBuiltIn,\n icon: <Trash2 size={14} />,\n } satisfies CTAAction,\n ]\n : []),\n ]}\n />\n </GlassCard>\n )}\n </div>\n </div>\n\n {/* v2: built-in, auth type, version, author and the raw feature keys are\n technical detail, one click away. */}\n {navigationV2 && (\n <OptionalFields\n storageKey=\"integrations.app-detail.technical-details\"\n label={tr('integrations.connectedApps.technicalDetails', 'Technical details')}\n >\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {detailsCard}\n {featuresCard}\n </div>\n </OptionalFields>\n )}\n\n {/* Connections for this provider */}\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center justify-between p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.providerDetail.connectionsCount', 'Connections ({{count}})', {\n count: (connections ?? []).length,\n })}\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <Button size=\"sm\" onClick={handleCreateConnection}>\n <Plus size={14} />\n {tr('integrations.providerDetail.actions.add', 'Add')}\n </Button>\n )}\n </div>\n\n {connectionsLoading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-text-secondary\" />\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length === 0 && (\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr('integrations.providerDetail.noConnections.title', 'No connections yet')}\n description={tr(\n 'integrations.providerDetail.noConnections.description',\n 'Create a connection to start using {{provider}} in your workspace.',\n { provider: provider.name }\n )}\n action={\n canConnectNow ? (\n <Button onClick={handleCreateConnection}>\n <Plus size={16} />\n {tr('integrations.providerDetail.actions.createConnection', 'Create Connection')}\n </Button>\n ) : undefined\n }\n />\n )}\n\n {!connectionsLoading && (connections ?? []).length > 0 && (\n <div className=\"p-4 space-y-3\">\n {(connections ?? []).map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode=\"list\"\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n )}\n </EmphasisPanel>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n <ConfirmDialog\n open={uninstallDialogOpen}\n title={tr('integrations.providerDetail.uninstallDialog.title', 'Uninstall {{provider}}', {\n provider: provider.name,\n })}\n description={tr(\n 'integrations.providerDetail.uninstallDialog.description',\n 'Existing active connections must be removed first. This action is only available in admin mode.'\n )}\n confirmLabel={tr('integrations.providerDetail.uninstallDialog.confirm', 'Uninstall')}\n cancelLabel={tr('integrations.common.cancel', 'Cancel')}\n destructive\n loading={uninstalling}\n icon={<Trash2 size={20} />}\n onConfirm={confirmUninstall}\n onCancel={() => setUninstallDialogOpen(false)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAyDA,SAAgBC,IAAiB;CAC/B,IAAM,EAAE,kBAAeC,GAAkC,GACnD,EACJ,eAAY,IACZ,cAAW,KACX,aACA,uBACA,kBAAe,OACbC,GAAgB,GACdC,IAAKC,GAAM,GACXC,KAAmBC,GAAiB,GACpCC,KAAmBC,GAAiB,GACpC,EACJ,6BACA,6BACA,4BACA,iCACEC,GAAqB,GAEnB,EACJ,aACA,SAASC,IACT,OAAOC,GACP,eACEC,EAAYC,KAAc,EAAE,GAC1B,EAAE,gBAAa,SAASC,MAAuBC,EAAyBF,KAAc,EAAE,GACxF,EAAE,oBAAgB,SAASG,OAAaC,EAAkB,GAC1D,EAAE,qBAAiB,SAASC,OAAcC,EAAmB,GAC7D,EAAE,qBAAiB,SAASC,MAAiBC,EAAmB,GAChE,EAAE,kBAAe,WAAWC,MAAuBC,GAAe,GAClE,CAACC,IAAqBC,KAA0BC,GAAS,EAAK,GAC9DC,IACJ,CAACL,KAAsBM,EAAcC,EAAwB,iBAAiB,GAC1EC,KACJC,KAAa,CAACT,KAAsBM,EAAcC,EAAwB,eAAe,GACrFG,IACJD,KAAa,CAACT,KAAsBM,EAAcC,EAAwB,eAAe,GACrFI,KACJF,KAAa,CAACT,KAAsBM,EAAcC,EAAwB,eAAe,GAQrFK,KAAUxB,MAAmB,CAACyB,GAC9BC,IAAwBpB,MAAYE,MAAaE;CAEvD,IAAIc,IACF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,OAAD,EAAK,WAAU,kGAAmG,CAAA,GAClH,kBAACG,GAAD;IAAS,M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