@burdenoff/microfe-integrations 2026.624.1 → 2026.624.3
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/IntegrationsAdminRoutes.js +5 -5
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +5 -5
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +64 -64
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConfirmDialog.js +30 -43
- package/dist/integrations/components/ConfirmDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +15 -15
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.js +19 -19
- package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +15 -15
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +49 -49
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +271 -277
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +35 -35
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +27 -27
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +34 -34
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +26 -26
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +29 -29
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +46 -46
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +44 -44
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/utils/appearance.js +7 -7
- package/dist/integrations/utils/appearance.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderCatalog.js","names":[],"sources":["../../../src/integrations/pages/ProviderCatalog.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport {\n Search,\n Filter,\n X,\n Grid3x3,\n List,\n Store,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { useProviders } from '../hooks/useProviders';\nimport { joinPath } from '../utils/navigation';\nimport { ProviderCard } from '../components/ProviderCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { PROVIDER_CATEGORIES, AUTH_TYPE_OPTIONS, PLUGIN_STATUS_OPTIONS } from '../utils/constants';\nimport type { IntegrationProvider, ProviderCategory, AuthType, PluginStatus } from '../types';\n\ninterface ProviderCatalogProps {\n showCreateProviderButton?: boolean;\n}\n\n/**\n * Provider Catalog — Grid/list view of available providers with filtering.\n */\nexport function ProviderCatalog({ showCreateProviderButton = false }: ProviderCatalogProps) {\n const { basePath = '/', navigate, onProviderSelect } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const {\n viewMode,\n setViewMode,\n providerFilter,\n updateProviderFilter,\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { providers, loading, error, refetch } = useProviders();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n\n const [showFilters, setShowFilters] = useState(false);\n const [authTypeFilter, setAuthTypeFilter] = useState<AuthType | 'all'>('all');\n\n // Filter providers\n const filteredProviders = useMemo(() => {\n let result = providers ?? [];\n\n if (providerFilter.search) {\n const q = providerFilter.search.toLowerCase();\n result = result.filter(\n (p: IntegrationProvider) =>\n p.name.toLowerCase().includes(q) ||\n p.description.toLowerCase().includes(q) ||\n p.key.toLowerCase().includes(q)\n );\n }\n\n if (providerFilter.category !== 'all') {\n result = result.filter((p: IntegrationProvider) => p.category === providerFilter.category);\n }\n\n if (providerFilter.pluginStatus !== 'all') {\n result = result.filter(\n (p: IntegrationProvider) => p.pluginStatus === providerFilter.pluginStatus\n );\n }\n\n if (authTypeFilter !== 'all') {\n result = result.filter((p: IntegrationProvider) => p.authType === authTypeFilter);\n }\n\n return result.sort(\n (a: IntegrationProvider, b: IntegrationProvider) => a.displayOrder - b.displayOrder\n );\n }, [providers, providerFilter, authTypeFilter]);\n\n const hasActiveFilters =\n providerFilter.search ||\n providerFilter.category !== 'all' ||\n providerFilter.pluginStatus !== 'all' ||\n authTypeFilter !== 'all';\n\n const handleClearFilters = () => {\n updateProviderFilter({ search: '', category: 'all', pluginStatus: 'all' });\n setAuthTypeFilter('all');\n };\n\n const handleProviderClick = (provider: IntegrationProvider) => {\n onProviderSelect?.(provider);\n navigate?.(joinPath(basePath, `providers/${provider.id}`));\n };\n\n const handleConnect = (provider: IntegrationProvider) => {\n openAddConnectionDialog(provider.id);\n };\n\n const getCategoryOptionLabel = (category: ProviderCategory | 'all') => {\n switch (category) {\n case 'all':\n return tx('integrations.providerCatalog.filters.category.all', 'All Categories');\n case 'communication':\n return tx('integrations.providerCatalog.category.communication', 'Communication');\n case 'project_management':\n return tx('integrations.providerCatalog.category.projectManagement', 'Project Management');\n case 'cloud_storage':\n return tx('integrations.providerCatalog.category.cloudStorage', 'Cloud Storage');\n case 'productivity':\n return tx('integrations.providerCatalog.category.productivity', 'Productivity');\n case 'crm':\n return tx('integrations.providerCatalog.category.crm', 'CRM');\n case 'analytics':\n return tx('integrations.providerCatalog.category.analytics', 'Analytics');\n case 'developer_tools':\n return tx('integrations.providerCatalog.category.developerTools', 'Developer Tools');\n case 'marketing':\n return tx('integrations.providerCatalog.category.marketing', 'Marketing');\n case 'finance':\n return tx('integrations.providerCatalog.category.finance', 'Finance');\n case 'hr':\n return tx('integrations.providerCatalog.category.hr', 'Human Resources');\n case 'support':\n return tx('integrations.providerCatalog.category.support', 'Support');\n case 'social':\n return tx('integrations.providerCatalog.category.social', 'Social');\n case 'ai':\n return tx('integrations.providerCatalog.category.ai', 'AI & ML');\n case 'email':\n return tx('integrations.providerCatalog.category.email', 'Email');\n case 'calendar':\n return tx('integrations.providerCatalog.category.calendar', 'Calendar');\n case 'other':\n return tx('integrations.providerCatalog.category.other', 'Other');\n default:\n return category;\n }\n };\n\n const getAuthTypeOptionLabel = (authType: AuthType | 'all') => {\n switch (authType) {\n case 'all':\n return tx('integrations.providerCatalog.filters.authType.all', 'All Auth Types');\n case 'oauth2':\n return tx('integrations.providerCatalog.authType.oauth2', 'OAuth 2.0');\n case 'api_key':\n return tx('integrations.providerCatalog.authType.apiKey', 'API Key');\n case 'basic_auth':\n return tx('integrations.providerCatalog.authType.basicAuth', 'Basic Auth');\n case 'bearer_token':\n return tx('integrations.providerCatalog.authType.bearerToken', 'Bearer Token');\n case 'service_account':\n return tx('integrations.providerCatalog.authType.serviceAccount', 'Service Account');\n default:\n return authType;\n }\n };\n\n const getPluginStatusOptionLabel = (status: PluginStatus | 'all') => {\n switch (status) {\n case 'all':\n return tx('integrations.providerCatalog.filters.pluginStatus.all', 'All Statuses');\n case 'available':\n return tx('integrations.providerCatalog.pluginStatus.available', 'Available');\n case 'installed':\n return tx('integrations.providerCatalog.pluginStatus.installed', 'Installed');\n case 'update_available':\n return tx('integrations.providerCatalog.pluginStatus.updateAvailable', 'Update Available');\n case 'deprecated':\n return tx('integrations.providerCatalog.pluginStatus.deprecated', 'Deprecated');\n default:\n return status;\n }\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-7xl mx-auto\">\n {/* Header */}\n <div\n className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\"\n data-tour=\"integrations-providers-header\"\n >\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label={tx(\n 'integrations.providerCatalog.actions.backAriaLabel',\n 'Back to overview'\n )}\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"p-2.5 rounded-lg bg-primary/10 backdrop-blur-sm\">\n <Store size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">\n {tx('integrations.providerCatalog.title', 'Provider Catalog')}\n </h1>\n <p className=\"text-sm text-muted-foreground mt-0.5\">\n {tx(\n 'integrations.providerCatalog.subtitle',\n 'Browse, install, and manage integration providers'\n )}\n </p>\n </div>\n {showCreateProviderButton && canCreateProvider && (\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers/new'))}\n className=\"ml-auto inline-flex items-center gap-2 px-4 py-2.5 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 transition-colors\"\n >\n <Store size={16} />\n {tx('integrations.providerCatalog.actions.addProvider', 'Add Provider')}\n </button>\n )}\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Search & Filters */}\n <div className=\"space-y-4\">\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <div className=\"flex-1 relative group\" data-tour=\"integrations-providers-search\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors\"\n />\n <input\n type=\"text\"\n placeholder={tx(\n 'integrations.providerCatalog.search.placeholder',\n 'Search providers by name, description, or key...'\n )}\n value={providerFilter.search}\n onChange={(e) => updateProviderFilter({ search: e.target.value })}\n className=\"w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all\"\n aria-label={tx('integrations.providerCatalog.search.ariaLabel', 'Search providers')}\n />\n </div>\n\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className={cn(\n 'inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all',\n showFilters || hasActiveFilters\n ? 'bg-primary text-primary-foreground border-primary'\n : 'bg-background text-foreground border-border hover:bg-accent'\n )}\n >\n <Filter size={16} />\n {showFilters\n ? tx('integrations.providerCatalog.filters.hide', 'Hide')\n : tx('integrations.providerCatalog.filters.show', 'Filter')}\n {hasActiveFilters && (\n <span className=\"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-primary-foreground/20\">\n {\n [\n providerFilter.category !== 'all',\n providerFilter.pluginStatus !== 'all',\n authTypeFilter !== 'all',\n ].filter(Boolean).length\n }\n </span>\n )}\n </button>\n\n {/* View mode toggle */}\n <div className=\"flex items-center border border-border rounded-lg overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setViewMode('grid')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'grid' ? 'bg-primary text-primary-foreground' : 'hover:bg-accent'\n )}\n aria-label={tx('integrations.providerCatalog.view.gridAriaLabel', 'Grid view')}\n >\n <Grid3x3 size={16} />\n </button>\n <button\n type=\"button\"\n onClick={() => setViewMode('list')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'list' ? 'bg-primary text-primary-foreground' : 'hover:bg-accent'\n )}\n aria-label={tx('integrations.providerCatalog.view.listAriaLabel', 'List view')}\n >\n <List size={16} />\n </button>\n </div>\n </div>\n\n {/* Filter Panel */}\n {showFilters && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5 animate-in slide-in-from-top-2 duration-200\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Filter size={16} className=\"text-primary\" />\n {tx('integrations.providerCatalog.filters.panelTitle', 'Filters')}\n </h3>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"text-sm text-muted-foreground hover:text-destructive transition-colors flex items-center gap-1\"\n >\n <X size={14} />\n {tx('integrations.providerCatalog.filters.clearAll', 'Clear All')}\n </button>\n )}\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-foreground\">\n {tx('integrations.providerCatalog.filters.category.label', 'Category')}\n </label>\n <select\n value={providerFilter.category}\n onChange={(e) =>\n updateProviderFilter({ category: e.target.value as ProviderCategory | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">{getCategoryOptionLabel('all')}</option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {getCategoryOptionLabel(cat.value)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-foreground\">\n {tx('integrations.providerCatalog.filters.authType.label', 'Auth Type')}\n </label>\n <select\n value={authTypeFilter}\n onChange={(e) => setAuthTypeFilter(e.target.value as AuthType | 'all')}\n className=\"w-full px-3 py-2 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">{getAuthTypeOptionLabel('all')}</option>\n {AUTH_TYPE_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {getAuthTypeOptionLabel(opt.value)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-foreground\">\n {tx('integrations.providerCatalog.filters.pluginStatus.label', 'Plugin Status')}\n </label>\n <select\n value={providerFilter.pluginStatus}\n onChange={(e) =>\n updateProviderFilter({ pluginStatus: e.target.value as PluginStatus | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">{getPluginStatusOptionLabel('all')}</option>\n {PLUGIN_STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {getPluginStatusOptionLabel(opt.value)}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Error */}\n {error && (\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-5 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 {tx('integrations.providerCatalog.error.title', 'Error loading providers')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">{error.message}</p>\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 {tx('integrations.providerCatalog.error.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading */}\n {loading && (\n <div\n className={cn(\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {[...Array(6)].map((_, i) => (\n <div key={i} className=\"rounded-xl border border-border/50 bg-card p-5 animate-pulse\">\n <div className=\"flex items-start gap-3\">\n <div className=\"size-12 bg-muted rounded-xl\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-4 w-3/4 bg-muted rounded\" />\n <div className=\"h-3 w-full bg-muted rounded\" />\n </div>\n </div>\n <div className=\"flex gap-2 mt-4\">\n <div className=\"h-5 w-16 bg-muted rounded-full\" />\n <div className=\"h-5 w-20 bg-muted rounded-full\" />\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Provider Grid / List */}\n {!loading && !error && (\n <>\n {filteredProviders.length > 0 ? (\n <div\n className={cn(\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {filteredProviders.map((provider: IntegrationProvider, index: number) => (\n <div key={provider.id} style={{ animationDelay: `${index * 30}ms` }}>\n <ProviderCard\n provider={provider}\n displayMode={viewMode}\n onClick={handleProviderClick}\n onConnect={canCreateConnection ? handleConnect : undefined}\n />\n </div>\n ))}\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-full bg-muted/50 mb-4\">\n {hasActiveFilters ? (\n <Search size={32} className=\"text-muted-foreground\" />\n ) : (\n <Store size={32} className=\"text-muted-foreground\" />\n )}\n </div>\n <h3 className=\"font-semibold text-foreground mb-1\">\n {hasActiveFilters\n ? tx('integrations.providerCatalog.empty.filteredTitle', 'No matching providers')\n : tx('integrations.providerCatalog.empty.title', 'No providers available')}\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-sm\">\n {hasActiveFilters\n ? tx(\n 'integrations.providerCatalog.empty.filteredDescription',\n 'Try adjusting your search or filters.'\n )\n : tx(\n 'integrations.providerCatalog.empty.description',\n 'Integration providers will appear here once configured.'\n )}\n </p>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <X size={14} />\n {tx('integrations.providerCatalog.empty.clearFilters', 'Clear Filters')}\n </button>\n )}\n </div>\n )}\n </>\n )}\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA+BA,SAAgB,EAAgB,EAAE,8BAA2B,MAA+B;CAC1F,IAAM,EAAE,cAAW,KAAK,aAAU,wBAAqB,GAAiB,EAClE,EAAE,UAAM,IAAS,EACjB,KAAM,GAAa,GAAkB,MAA6C;EACtF,IAAM,IAAa,GAAE,GAAK,EAAO;AAIjC,SAHI,MAAe,IACd,IAEE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAO,CAAC,GAAU,OACjB,EACG,QAAQ,KAAK,EAAS,KAAK,OAAO,EAAW,CAAC,CAC9C,QAAQ,IAAI,EAAS,IAAI,OAAO,EAAW,CAAC,EACjD,EACD,GARmB,IADW;IAW3B,EACJ,aACA,gBACA,mBACA,yBACA,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,cAAW,YAAS,UAAO,eAAY,GAAc,EACvD,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,IACJ,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3E,IACJ,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EAEzE,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAgB,KAAqB,EAA2B,MAAM,EAGvE,IAAoB,QAAc;EACtC,IAAI,IAAS,KAAa,EAAE;AAE5B,MAAI,EAAe,QAAQ;GACzB,IAAM,IAAI,EAAe,OAAO,aAAa;AAC7C,OAAS,EAAO,QACb,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,IAChC,EAAE,YAAY,aAAa,CAAC,SAAS,EAAE,IACvC,EAAE,IAAI,aAAa,CAAC,SAAS,E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BAHZ,CAKE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA,EACd,EAAG,mDAAmD,gBAAgB,CAChE;;KAEP;OAEP,CAAA;GAIL,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,uBAAuB;IACvB,CAAA;GACE"}
|
|
1
|
+
{"version":3,"file":"ProviderCatalog.js","names":[],"sources":["../../../src/integrations/pages/ProviderCatalog.tsx"],"sourcesContent":["import { useState, useMemo } from 'react';\nimport {\n Search,\n Filter,\n X,\n Grid3x3,\n List,\n Store,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { useProviders } from '../hooks/useProviders';\nimport { joinPath } from '../utils/navigation';\nimport { ProviderCard } from '../components/ProviderCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { PROVIDER_CATEGORIES, AUTH_TYPE_OPTIONS, PLUGIN_STATUS_OPTIONS } from '../utils/constants';\nimport type { IntegrationProvider, ProviderCategory, AuthType, PluginStatus } from '../types';\n\ninterface ProviderCatalogProps {\n showCreateProviderButton?: boolean;\n}\n\n/**\n * Provider Catalog — Grid/list view of available providers with filtering.\n */\nexport function ProviderCatalog({ showCreateProviderButton = false }: ProviderCatalogProps) {\n const { basePath = '/', navigate, onProviderSelect } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const {\n viewMode,\n setViewMode,\n providerFilter,\n updateProviderFilter,\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { providers, loading, error, refetch } = useProviders();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n\n const [showFilters, setShowFilters] = useState(false);\n const [authTypeFilter, setAuthTypeFilter] = useState<AuthType | 'all'>('all');\n\n // Filter providers\n const filteredProviders = useMemo(() => {\n let result = providers ?? [];\n\n if (providerFilter.search) {\n const q = providerFilter.search.toLowerCase();\n result = result.filter(\n (p: IntegrationProvider) =>\n p.name.toLowerCase().includes(q) ||\n p.description.toLowerCase().includes(q) ||\n p.key.toLowerCase().includes(q)\n );\n }\n\n if (providerFilter.category !== 'all') {\n result = result.filter((p: IntegrationProvider) => p.category === providerFilter.category);\n }\n\n if (providerFilter.pluginStatus !== 'all') {\n result = result.filter(\n (p: IntegrationProvider) => p.pluginStatus === providerFilter.pluginStatus\n );\n }\n\n if (authTypeFilter !== 'all') {\n result = result.filter((p: IntegrationProvider) => p.authType === authTypeFilter);\n }\n\n return result.sort(\n (a: IntegrationProvider, b: IntegrationProvider) => a.displayOrder - b.displayOrder\n );\n }, [providers, providerFilter, authTypeFilter]);\n\n const hasActiveFilters =\n providerFilter.search ||\n providerFilter.category !== 'all' ||\n providerFilter.pluginStatus !== 'all' ||\n authTypeFilter !== 'all';\n\n const handleClearFilters = () => {\n updateProviderFilter({ search: '', category: 'all', pluginStatus: 'all' });\n setAuthTypeFilter('all');\n };\n\n const handleProviderClick = (provider: IntegrationProvider) => {\n onProviderSelect?.(provider);\n navigate?.(joinPath(basePath, `providers/${provider.id}`));\n };\n\n const handleConnect = (provider: IntegrationProvider) => {\n openAddConnectionDialog(provider.id);\n };\n\n const getCategoryOptionLabel = (category: ProviderCategory | 'all') => {\n switch (category) {\n case 'all':\n return tx('integrations.providerCatalog.filters.category.all', 'All Categories');\n case 'communication':\n return tx('integrations.providerCatalog.category.communication', 'Communication');\n case 'project_management':\n return tx('integrations.providerCatalog.category.projectManagement', 'Project Management');\n case 'cloud_storage':\n return tx('integrations.providerCatalog.category.cloudStorage', 'Cloud Storage');\n case 'productivity':\n return tx('integrations.providerCatalog.category.productivity', 'Productivity');\n case 'crm':\n return tx('integrations.providerCatalog.category.crm', 'CRM');\n case 'analytics':\n return tx('integrations.providerCatalog.category.analytics', 'Analytics');\n case 'developer_tools':\n return tx('integrations.providerCatalog.category.developerTools', 'Developer Tools');\n case 'marketing':\n return tx('integrations.providerCatalog.category.marketing', 'Marketing');\n case 'finance':\n return tx('integrations.providerCatalog.category.finance', 'Finance');\n case 'hr':\n return tx('integrations.providerCatalog.category.hr', 'Human Resources');\n case 'support':\n return tx('integrations.providerCatalog.category.support', 'Support');\n case 'social':\n return tx('integrations.providerCatalog.category.social', 'Social');\n case 'ai':\n return tx('integrations.providerCatalog.category.ai', 'AI & ML');\n case 'email':\n return tx('integrations.providerCatalog.category.email', 'Email');\n case 'calendar':\n return tx('integrations.providerCatalog.category.calendar', 'Calendar');\n case 'other':\n return tx('integrations.providerCatalog.category.other', 'Other');\n default:\n return category;\n }\n };\n\n const getAuthTypeOptionLabel = (authType: AuthType | 'all') => {\n switch (authType) {\n case 'all':\n return tx('integrations.providerCatalog.filters.authType.all', 'All Auth Types');\n case 'oauth2':\n return tx('integrations.providerCatalog.authType.oauth2', 'OAuth 2.0');\n case 'api_key':\n return tx('integrations.providerCatalog.authType.apiKey', 'API Key');\n case 'basic_auth':\n return tx('integrations.providerCatalog.authType.basicAuth', 'Basic Auth');\n case 'bearer_token':\n return tx('integrations.providerCatalog.authType.bearerToken', 'Bearer Token');\n case 'service_account':\n return tx('integrations.providerCatalog.authType.serviceAccount', 'Service Account');\n default:\n return authType;\n }\n };\n\n const getPluginStatusOptionLabel = (status: PluginStatus | 'all') => {\n switch (status) {\n case 'all':\n return tx('integrations.providerCatalog.filters.pluginStatus.all', 'All Statuses');\n case 'available':\n return tx('integrations.providerCatalog.pluginStatus.available', 'Available');\n case 'installed':\n return tx('integrations.providerCatalog.pluginStatus.installed', 'Installed');\n case 'update_available':\n return tx('integrations.providerCatalog.pluginStatus.updateAvailable', 'Update Available');\n case 'deprecated':\n return tx('integrations.providerCatalog.pluginStatus.deprecated', 'Deprecated');\n default:\n return status;\n }\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-7xl mx-auto\">\n {/* Header */}\n <div\n className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border-subtle/50 p-6 shadow-sm\"\n data-tour=\"integrations-providers-header\"\n >\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label={tx(\n 'integrations.providerCatalog.actions.backAriaLabel',\n 'Back to overview'\n )}\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm\">\n <Store size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tx('integrations.providerCatalog.title', 'Provider Catalog')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.providerCatalog.subtitle',\n 'Browse, install, and manage integration providers'\n )}\n </p>\n </div>\n {showCreateProviderButton && canCreateProvider && (\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers/new'))}\n className=\"ml-auto inline-flex items-center gap-2 px-4 py-2.5 rounded-lg bg-action-primary-bg text-action-primary-text text-sm font-medium hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Store size={16} />\n {tx('integrations.providerCatalog.actions.addProvider', 'Add Provider')}\n </button>\n )}\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Search & Filters */}\n <div className=\"space-y-4\">\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <div className=\"flex-1 relative group\" data-tour=\"integrations-providers-search\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors\"\n />\n <input\n type=\"text\"\n placeholder={tx(\n 'integrations.providerCatalog.search.placeholder',\n 'Search providers by name, description, or key...'\n )}\n value={providerFilter.search}\n onChange={(e) => updateProviderFilter({ search: e.target.value })}\n className=\"w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all\"\n aria-label={tx('integrations.providerCatalog.search.ariaLabel', 'Search providers')}\n />\n </div>\n\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className={cn(\n 'inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all',\n showFilters || hasActiveFilters\n ? 'bg-action-primary-bg text-action-primary-text border-primary'\n : 'bg-bg-surface text-text-primary border-border-subtle hover:bg-accent'\n )}\n >\n <Filter size={16} />\n {showFilters\n ? tx('integrations.providerCatalog.filters.hide', 'Hide')\n : tx('integrations.providerCatalog.filters.show', 'Filter')}\n {hasActiveFilters && (\n <span className=\"ml-1 px-1.5 py-0.5 text-xs rounded-full bg-primary-foreground/20\">\n {\n [\n providerFilter.category !== 'all',\n providerFilter.pluginStatus !== 'all',\n authTypeFilter !== 'all',\n ].filter(Boolean).length\n }\n </span>\n )}\n </button>\n\n {/* View mode toggle */}\n <div className=\"flex items-center border border-border-subtle rounded-lg overflow-hidden\">\n <button\n type=\"button\"\n onClick={() => setViewMode('grid')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'grid' ? 'bg-action-primary-bg text-action-primary-text' : 'hover:bg-accent'\n )}\n aria-label={tx('integrations.providerCatalog.view.gridAriaLabel', 'Grid view')}\n >\n <Grid3x3 size={16} />\n </button>\n <button\n type=\"button\"\n onClick={() => setViewMode('list')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'list' ? 'bg-action-primary-bg text-action-primary-text' : 'hover:bg-accent'\n )}\n aria-label={tx('integrations.providerCatalog.view.listAriaLabel', 'List view')}\n >\n <List size={16} />\n </button>\n </div>\n </div>\n\n {/* Filter Panel */}\n {showFilters && (\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200\">\n <div className=\"flex items-center justify-between mb-4\">\n <h3 className=\"font-semibold text-text-primary flex items-center gap-2\">\n <Filter size={16} className=\"text-primary\" />\n {tx('integrations.providerCatalog.filters.panelTitle', 'Filters')}\n </h3>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1\"\n >\n <X size={14} />\n {tx('integrations.providerCatalog.filters.clearAll', 'Clear All')}\n </button>\n )}\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-3 gap-4\">\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n {tx('integrations.providerCatalog.filters.category.label', 'Category')}\n </label>\n <select\n value={providerFilter.category}\n onChange={(e) =>\n updateProviderFilter({ category: e.target.value as ProviderCategory | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">{getCategoryOptionLabel('all')}</option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {getCategoryOptionLabel(cat.value)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n {tx('integrations.providerCatalog.filters.authType.label', 'Auth Type')}\n </label>\n <select\n value={authTypeFilter}\n onChange={(e) => setAuthTypeFilter(e.target.value as AuthType | 'all')}\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">{getAuthTypeOptionLabel('all')}</option>\n {AUTH_TYPE_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {getAuthTypeOptionLabel(opt.value)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-text-primary\">\n {tx('integrations.providerCatalog.filters.pluginStatus.label', 'Plugin Status')}\n </label>\n <select\n value={providerFilter.pluginStatus}\n onChange={(e) =>\n updateProviderFilter({ pluginStatus: e.target.value as PluginStatus | 'all' })\n }\n className=\"w-full px-3 py-2 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n >\n <option value=\"all\">{getPluginStatusOptionLabel('all')}</option>\n {PLUGIN_STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {getPluginStatusOptionLabel(opt.value)}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Error */}\n {error && (\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-5 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 {tx('integrations.providerCatalog.error.title', 'Error loading providers')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">{error.message}</p>\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 {tx('integrations.providerCatalog.error.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading */}\n {loading && (\n <div\n className={cn(\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {[...Array(6)].map((_, i) => (\n <div key={i} className=\"rounded-xl border border-border-subtle/50 bg-bg-surface p-5 animate-pulse\">\n <div className=\"flex items-start gap-3\">\n <div className=\"size-12 bg-bg-sunken rounded-xl\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-4 w-3/4 bg-bg-sunken rounded\" />\n <div className=\"h-3 w-full bg-bg-sunken rounded\" />\n </div>\n </div>\n <div className=\"flex gap-2 mt-4\">\n <div className=\"h-5 w-16 bg-bg-sunken rounded-full\" />\n <div className=\"h-5 w-20 bg-bg-sunken rounded-full\" />\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Provider Grid / List */}\n {!loading && !error && (\n <>\n {filteredProviders.length > 0 ? (\n <div\n className={cn(\n viewMode === 'grid'\n ? 'grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4'\n : 'space-y-3'\n )}\n >\n {filteredProviders.map((provider: IntegrationProvider, index: number) => (\n <div key={provider.id} style={{ animationDelay: `${index * 30}ms` }}>\n <ProviderCard\n provider={provider}\n displayMode={viewMode}\n onClick={handleProviderClick}\n onConnect={canCreateConnection ? handleConnect : undefined}\n />\n </div>\n ))}\n </div>\n ) : (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-full bg-bg-sunken/50 mb-4\">\n {hasActiveFilters ? (\n <Search size={32} className=\"text-text-secondary\" />\n ) : (\n <Store size={32} className=\"text-text-secondary\" />\n )}\n </div>\n <h3 className=\"font-semibold text-text-primary mb-1\">\n {hasActiveFilters\n ? tx('integrations.providerCatalog.empty.filteredTitle', 'No matching providers')\n : tx('integrations.providerCatalog.empty.title', 'No providers available')}\n </h3>\n <p className=\"text-sm text-text-secondary max-w-sm\">\n {hasActiveFilters\n ? tx(\n 'integrations.providerCatalog.empty.filteredDescription',\n 'Try adjusting your search or filters.'\n )\n : tx(\n 'integrations.providerCatalog.empty.description',\n 'Integration providers will appear here once configured.'\n )}\n </p>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <X size={14} />\n {tx('integrations.providerCatalog.empty.clearFilters', 'Clear Filters')}\n </button>\n )}\n </div>\n )}\n </>\n )}\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA+BA,SAAgB,EAAgB,EAAE,8BAA2B,MAA+B;CAC1F,IAAM,EAAE,cAAW,KAAK,aAAU,wBAAqB,GAAiB,EAClE,EAAE,UAAM,IAAS,EACjB,KAAM,GAAa,GAAkB,MAA6C;EACtF,IAAM,IAAa,GAAE,GAAK,EAAO;AAIjC,SAHI,MAAe,IACd,IAEE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAO,CAAC,GAAU,OACjB,EACG,QAAQ,KAAK,EAAS,KAAK,OAAO,EAAW,CAAC,CAC9C,QAAQ,IAAI,EAAS,IAAI,OAAO,EAAW,CAAC,EACjD,EACD,GARmB,IADW;IAW3B,EACJ,aACA,gBACA,mBACA,yBACA,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,cAAW,YAAS,UAAO,eAAY,GAAc,EACvD,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,IACJ,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3E,IACJ,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EAEzE,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAgB,KAAqB,EAA2B,MAAM,EAGvE,IAAoB,QAAc;EACtC,IAAI,IAAS,KAAa,EAAE;AAE5B,MAAI,EAA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E,EAAG,4CAA4C,yBAAyB;MACzE,CAAA;KACL,kBAAC,KAAD;MAAG,WAAU;gBACV,IACG,EACE,0DACA,wCACD,GACD,EACE,kDACA,0DACD;MACH,CAAA;KACH,KACC,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,WAAU;gBAHZ,CAKE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA,EACd,EAAG,mDAAmD,gBAAgB,CAChE;;KAEP;OAEP,CAAA;GAIL,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,uBAAuB;IACvB,CAAA;GACE"}
|
|
@@ -22,12 +22,12 @@ function O() {
|
|
|
22
22
|
className: "flex flex-col items-center justify-center py-20",
|
|
23
23
|
children: [/* @__PURE__ */ D("div", {
|
|
24
24
|
className: "relative",
|
|
25
|
-
children: [/* @__PURE__ */ E("div", { className: "absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ E(y, {
|
|
25
|
+
children: [/* @__PURE__ */ E("div", { className: "absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ E(y, {
|
|
26
26
|
size: 48,
|
|
27
27
|
className: "relative animate-spin text-primary"
|
|
28
28
|
})]
|
|
29
29
|
}), /* @__PURE__ */ E("span", {
|
|
30
|
-
className: "mt-6 text-sm font-medium text-
|
|
30
|
+
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
31
31
|
children: "Loading provider details…"
|
|
32
32
|
})]
|
|
33
33
|
});
|
|
@@ -59,7 +59,7 @@ function O() {
|
|
|
59
59
|
}), /* @__PURE__ */ D("button", {
|
|
60
60
|
type: "button",
|
|
61
61
|
onClick: () => j?.(i(A, "providers")),
|
|
62
|
-
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
62
|
+
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",
|
|
63
63
|
children: [/* @__PURE__ */ E(m, { size: 14 }), "Back to Catalog"]
|
|
64
64
|
})]
|
|
65
65
|
})
|
|
@@ -76,7 +76,7 @@ function O() {
|
|
|
76
76
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
77
77
|
children: [
|
|
78
78
|
/* @__PURE__ */ D("div", {
|
|
79
|
-
className: "relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm",
|
|
79
|
+
className: "relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border-subtle/50 p-6 shadow-sm",
|
|
80
80
|
children: [/* @__PURE__ */ E("div", {
|
|
81
81
|
className: "relative z-10",
|
|
82
82
|
children: /* @__PURE__ */ D("div", {
|
|
@@ -98,21 +98,21 @@ function O() {
|
|
|
98
98
|
children: [/* @__PURE__ */ D("div", {
|
|
99
99
|
className: "flex items-center gap-3",
|
|
100
100
|
children: [/* @__PURE__ */ E("h1", {
|
|
101
|
-
className: "text-2xl sm:text-3xl font-bold text-
|
|
101
|
+
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
102
102
|
children: L.name
|
|
103
103
|
}), L.isBuiltIn && /* @__PURE__ */ E("span", {
|
|
104
104
|
className: "text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default",
|
|
105
105
|
children: "Built-in"
|
|
106
106
|
})]
|
|
107
107
|
}), /* @__PURE__ */ E("p", {
|
|
108
|
-
className: "text-sm text-
|
|
108
|
+
className: "text-sm text-text-secondary mt-1",
|
|
109
109
|
children: L.description
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
112
|
X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
|
|
113
113
|
type: "button",
|
|
114
114
|
onClick: $,
|
|
115
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
115
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
116
116
|
children: [/* @__PURE__ */ E(S, { size: 16 }), "Create Connection"]
|
|
117
117
|
})
|
|
118
118
|
]
|
|
@@ -122,9 +122,9 @@ function O() {
|
|
|
122
122
|
/* @__PURE__ */ D("div", {
|
|
123
123
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
124
124
|
children: [/* @__PURE__ */ D("div", {
|
|
125
|
-
className: "rounded-xl border border-border/50 bg-
|
|
125
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4",
|
|
126
126
|
children: [/* @__PURE__ */ D("h2", {
|
|
127
|
-
className: "font-semibold text-
|
|
127
|
+
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
128
128
|
children: [/* @__PURE__ */ E(b, {
|
|
129
129
|
size: 18,
|
|
130
130
|
className: "text-primary"
|
|
@@ -133,59 +133,59 @@ function O() {
|
|
|
133
133
|
className: "space-y-3",
|
|
134
134
|
children: [
|
|
135
135
|
/* @__PURE__ */ D("div", {
|
|
136
|
-
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
136
|
+
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
137
137
|
children: [/* @__PURE__ */ E("span", {
|
|
138
|
-
className: "text-sm text-
|
|
138
|
+
className: "text-sm text-text-secondary",
|
|
139
139
|
children: "Category"
|
|
140
140
|
}), /* @__PURE__ */ E("span", {
|
|
141
|
-
className: "text-sm font-medium text-
|
|
141
|
+
className: "text-sm font-medium text-text-primary",
|
|
142
142
|
children: o(L.category)
|
|
143
143
|
})]
|
|
144
144
|
}),
|
|
145
145
|
/* @__PURE__ */ D("div", {
|
|
146
|
-
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
146
|
+
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
147
147
|
children: [/* @__PURE__ */ E("span", {
|
|
148
|
-
className: "text-sm text-
|
|
148
|
+
className: "text-sm text-text-secondary",
|
|
149
149
|
children: "Auth Type"
|
|
150
150
|
}), /* @__PURE__ */ E("span", {
|
|
151
|
-
className: "text-sm font-medium text-
|
|
151
|
+
className: "text-sm font-medium text-text-primary",
|
|
152
152
|
children: a(L.authType)
|
|
153
153
|
})]
|
|
154
154
|
}),
|
|
155
155
|
/* @__PURE__ */ D("div", {
|
|
156
|
-
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
156
|
+
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
157
157
|
children: [/* @__PURE__ */ E("span", {
|
|
158
|
-
className: "text-sm text-
|
|
158
|
+
className: "text-sm text-text-secondary",
|
|
159
159
|
children: "Plugin Version"
|
|
160
160
|
}), /* @__PURE__ */ E("span", {
|
|
161
|
-
className: "text-sm font-mono text-
|
|
161
|
+
className: "text-sm font-mono text-text-primary",
|
|
162
162
|
children: L.pluginVersion
|
|
163
163
|
})]
|
|
164
164
|
}),
|
|
165
165
|
/* @__PURE__ */ D("div", {
|
|
166
|
-
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
166
|
+
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
167
167
|
children: [/* @__PURE__ */ E("span", {
|
|
168
|
-
className: "text-sm text-
|
|
168
|
+
className: "text-sm text-text-secondary",
|
|
169
169
|
children: "Author"
|
|
170
170
|
}), /* @__PURE__ */ E("span", {
|
|
171
|
-
className: "text-sm font-medium text-
|
|
171
|
+
className: "text-sm font-medium text-text-primary",
|
|
172
172
|
children: L.pluginAuthor || "-"
|
|
173
173
|
})]
|
|
174
174
|
}),
|
|
175
175
|
/* @__PURE__ */ D("div", {
|
|
176
|
-
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
176
|
+
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
177
177
|
children: [/* @__PURE__ */ E("span", {
|
|
178
|
-
className: "text-sm text-
|
|
178
|
+
className: "text-sm text-text-secondary",
|
|
179
179
|
children: "Connections"
|
|
180
180
|
}), /* @__PURE__ */ E("span", {
|
|
181
|
-
className: "text-sm font-medium text-
|
|
181
|
+
className: "text-sm font-medium text-text-primary",
|
|
182
182
|
children: L.connectionCount
|
|
183
183
|
})]
|
|
184
184
|
}),
|
|
185
185
|
/* @__PURE__ */ D("div", {
|
|
186
186
|
className: "flex items-center justify-between py-2",
|
|
187
187
|
children: [/* @__PURE__ */ E("span", {
|
|
188
|
-
className: "text-sm text-
|
|
188
|
+
className: "text-sm text-text-secondary",
|
|
189
189
|
children: "Status"
|
|
190
190
|
}), /* @__PURE__ */ E("span", {
|
|
191
191
|
className: t("text-sm font-medium px-2 py-0.5 rounded-full", L.isEnabled ? "text-status-success-text bg-status-success-bg-subtle" : "text-text-secondary bg-bg-sunken"),
|
|
@@ -198,9 +198,9 @@ function O() {
|
|
|
198
198
|
className: "space-y-4",
|
|
199
199
|
children: [
|
|
200
200
|
/* @__PURE__ */ D("div", {
|
|
201
|
-
className: "rounded-xl border border-border/50 bg-
|
|
201
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
202
202
|
children: [/* @__PURE__ */ D("h2", {
|
|
203
|
-
className: "font-semibold text-
|
|
203
|
+
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
204
204
|
children: [/* @__PURE__ */ E(se, {
|
|
205
205
|
size: 18,
|
|
206
206
|
className: "text-primary"
|
|
@@ -208,18 +208,18 @@ function O() {
|
|
|
208
208
|
}), L.supportedFeatures.length > 0 ? /* @__PURE__ */ E("div", {
|
|
209
209
|
className: "flex flex-wrap gap-2",
|
|
210
210
|
children: L.supportedFeatures.map((e) => /* @__PURE__ */ E("span", {
|
|
211
|
-
className: "text-xs px-2.5 py-1 rounded-full bg-
|
|
211
|
+
className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary",
|
|
212
212
|
children: e
|
|
213
213
|
}, e))
|
|
214
214
|
}) : /* @__PURE__ */ E("p", {
|
|
215
|
-
className: "text-sm text-
|
|
215
|
+
className: "text-sm text-text-secondary",
|
|
216
216
|
children: "No specific features listed."
|
|
217
217
|
})]
|
|
218
218
|
}),
|
|
219
219
|
/* @__PURE__ */ D("div", {
|
|
220
|
-
className: "rounded-xl border border-border/50 bg-
|
|
220
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
221
221
|
children: [/* @__PURE__ */ D("h2", {
|
|
222
|
-
className: "font-semibold text-
|
|
222
|
+
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
223
223
|
children: [/* @__PURE__ */ E(_, {
|
|
224
224
|
size: 18,
|
|
225
225
|
className: "text-primary"
|
|
@@ -242,9 +242,9 @@ function O() {
|
|
|
242
242
|
})]
|
|
243
243
|
}),
|
|
244
244
|
k && /* @__PURE__ */ D("div", {
|
|
245
|
-
className: "rounded-xl border border-border/50 bg-
|
|
245
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
246
246
|
children: [/* @__PURE__ */ D("h2", {
|
|
247
|
-
className: "font-semibold text-
|
|
247
|
+
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
248
248
|
children: [/* @__PURE__ */ E(oe, {
|
|
249
249
|
size: 18,
|
|
250
250
|
className: "text-primary"
|
|
@@ -257,7 +257,7 @@ function O() {
|
|
|
257
257
|
onClick: () => {
|
|
258
258
|
j?.(i(A, `providers/${L.id}/edit`));
|
|
259
259
|
},
|
|
260
|
-
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
260
|
+
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",
|
|
261
261
|
children: [/* @__PURE__ */ E(x, { size: 14 }), "Edit"]
|
|
262
262
|
}),
|
|
263
263
|
Z && L.pluginStatus === "installed" && /* @__PURE__ */ D("button", {
|
|
@@ -266,12 +266,12 @@ function O() {
|
|
|
266
266
|
L && (L.isEnabled ? await W(L.id) : await H(L.id), await z());
|
|
267
267
|
},
|
|
268
268
|
disabled: Q,
|
|
269
|
-
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50",
|
|
269
|
+
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 disabled:opacity-50",
|
|
270
270
|
children: [/* @__PURE__ */ E(ie, { size: 14 }), L.isEnabled ? "Disable" : "Enable"]
|
|
271
271
|
}),
|
|
272
272
|
de && L.pluginStatus === "available" && /* @__PURE__ */ D("button", {
|
|
273
273
|
type: "button",
|
|
274
|
-
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
274
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
275
275
|
children: [/* @__PURE__ */ E(g, { size: 14 }), "Install Plugin"]
|
|
276
276
|
}),
|
|
277
277
|
fe && L.pluginStatus === "installed" && /* @__PURE__ */ D("button", {
|
|
@@ -295,17 +295,17 @@ function O() {
|
|
|
295
295
|
})]
|
|
296
296
|
}),
|
|
297
297
|
/* @__PURE__ */ D("div", {
|
|
298
|
-
className: "rounded-xl border border-border/50 bg-
|
|
298
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface overflow-hidden",
|
|
299
299
|
children: [
|
|
300
300
|
/* @__PURE__ */ D("div", {
|
|
301
|
-
className: "flex items-center justify-between p-5 border-b border-border/50",
|
|
301
|
+
className: "flex items-center justify-between p-5 border-b border-border-subtle/50",
|
|
302
302
|
children: [/* @__PURE__ */ D("div", {
|
|
303
303
|
className: "flex items-center gap-2",
|
|
304
304
|
children: [/* @__PURE__ */ E(v, {
|
|
305
305
|
size: 18,
|
|
306
306
|
className: "text-primary"
|
|
307
307
|
}), /* @__PURE__ */ D("h2", {
|
|
308
|
-
className: "font-semibold text-
|
|
308
|
+
className: "font-semibold text-text-primary",
|
|
309
309
|
children: [
|
|
310
310
|
"Connections (",
|
|
311
311
|
(B ?? []).length,
|
|
@@ -315,7 +315,7 @@ function O() {
|
|
|
315
315
|
}), X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
|
|
316
316
|
type: "button",
|
|
317
317
|
onClick: $,
|
|
318
|
-
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
318
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
319
319
|
children: [/* @__PURE__ */ E(S, { size: 14 }), "Add"]
|
|
320
320
|
})]
|
|
321
321
|
}),
|
|
@@ -323,25 +323,25 @@ function O() {
|
|
|
323
323
|
className: "flex items-center justify-center py-12",
|
|
324
324
|
children: /* @__PURE__ */ E(y, {
|
|
325
325
|
size: 24,
|
|
326
|
-
className: "animate-spin text-
|
|
326
|
+
className: "animate-spin text-text-secondary"
|
|
327
327
|
})
|
|
328
328
|
}),
|
|
329
329
|
!V && (B ?? []).length === 0 && /* @__PURE__ */ D("div", {
|
|
330
330
|
className: "flex flex-col items-center justify-center py-12 px-6 text-center",
|
|
331
331
|
children: [
|
|
332
332
|
/* @__PURE__ */ E("div", {
|
|
333
|
-
className: "p-4 rounded-full bg-
|
|
333
|
+
className: "p-4 rounded-full bg-bg-sunken/50 mb-4",
|
|
334
334
|
children: /* @__PURE__ */ E(v, {
|
|
335
335
|
size: 32,
|
|
336
|
-
className: "text-
|
|
336
|
+
className: "text-text-secondary"
|
|
337
337
|
})
|
|
338
338
|
}),
|
|
339
339
|
/* @__PURE__ */ E("h3", {
|
|
340
|
-
className: "font-semibold text-
|
|
340
|
+
className: "font-semibold text-text-primary mb-1",
|
|
341
341
|
children: "No connections yet"
|
|
342
342
|
}),
|
|
343
343
|
/* @__PURE__ */ D("p", {
|
|
344
|
-
className: "text-sm text-
|
|
344
|
+
className: "text-sm text-text-secondary mb-4 max-w-sm",
|
|
345
345
|
children: [
|
|
346
346
|
"Create a connection to start using ",
|
|
347
347
|
L.name,
|
|
@@ -351,7 +351,7 @@ function O() {
|
|
|
351
351
|
X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
|
|
352
352
|
type: "button",
|
|
353
353
|
onClick: $,
|
|
354
|
-
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
354
|
+
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
355
355
|
children: [/* @__PURE__ */ E(S, { size: 16 }), "Create Connection"]
|
|
356
356
|
})
|
|
357
357
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderDetail.js","names":[],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\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} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { getAuthTypeLabel, getCategoryLabel } from '../utils/integrationsHelpers';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\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 { adminMode = false, basePath = '/', navigate, onConnectionSelect } = useIntegrations();\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 const loading = providerLoading;\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-primary/20 rounded-full blur-xl animate-pulse\" />\n <Loader2 size={48} className=\"relative animate-spin text-primary\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n 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\">Provider not found</h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message || 'The requested provider could not be loaded.'}\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 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 hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />\n 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 return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10\">\n <div className=\"flex items-center gap-4 mb-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label=\"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 items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">{provider.name}</h1>\n {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 Built-in\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{provider.description}</p>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Provider Details */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Package size={18} className=\"text-primary\" />\n Provider Details\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Category</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getCategoryLabel(provider.category)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Auth Type</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Plugin Version</span>\n <span className=\"text-sm font-mono text-foreground\">{provider.pluginVersion}</span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Author</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Connections</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.connectionCount}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-muted-foreground\">Status</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 ? 'Enabled' : 'Disabled'}\n </span>\n </div>\n </div>\n </div>\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {/* Supported Features */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Star size={18} className=\"text-primary\" />\n Supported Features\n </h2>\n {provider.supportedFeatures.length > 0 ? (\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-muted text-muted-foreground\"\n >\n {feature}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-muted-foreground\">No specific features listed.</p>\n )}\n </div>\n\n {/* Links */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <ExternalLink size={18} className=\"text-primary\" />\n 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 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 Documentation\n </a>\n )}\n </div>\n </div>\n\n {/* Plugin Actions */}\n {adminMode && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n Plugin Management\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n {canUpdateProvider && (\n <button\n type=\"button\"\n onClick={handleEditProvider}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <Pencil size={14} />\n Edit\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'installed' && (\n <button\n type=\"button\"\n onClick={handleToggleEnabled}\n disabled={providerActionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50\"\n >\n <Power size={14} />\n {provider.isEnabled ? 'Disable' : 'Enable'}\n </button>\n )}\n {canCreateProvider && provider.pluginStatus === 'available' && (\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Download size={14} />\n Install Plugin\n </button>\n )}\n {canDeleteProvider && provider.pluginStatus === 'installed' && (\n <button\n type=\"button\"\n onClick={handleUninstall}\n disabled={providerActionLoading || provider.isBuiltIn}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n Uninstall\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'update_available' && (\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors\"\n >\n <Download size={14} />\n Update Available\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Connections for this provider */}\n <div className=\"rounded-xl border border-border/50 bg-card overflow-hidden\">\n <div className=\"flex items-center justify-between p-5 border-b border-border/50\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-foreground\">\n Connections ({(connections ?? []).length})\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={14} />\n 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-muted-foreground\" />\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length === 0 && (\n <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-muted/50 mb-4\">\n <Link2 size={32} className=\"text-muted-foreground\" />\n </div>\n <h3 className=\"font-semibold text-foreground mb-1\">No connections yet</h3>\n <p className=\"text-sm text-muted-foreground mb-4 max-w-sm\">\n Create a connection to start using {provider.name} in your workspace.\n </p>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\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 </div>\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={`Uninstall ${provider.name}`}\n description=\"Existing active connections must be removed first. This action is only available in admin mode.\"\n confirmLabel=\"Uninstall\"\n cancelLabel=\"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":";;;;;;;;;;;;;;;;;;AA0CA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,kBAAe,GAAmC,EACpD,EAAE,eAAY,IAAO,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACvF,EACJ,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EACJ,aACA,SAAS,IACT,OAAO,GACP,eACE,EAAY,KAAc,GAAG,EAC3B,EAAE,gBAAa,SAAS,MAAuB,GAAyB,KAAc,GAAG,EACzF,EAAE,mBAAgB,SAAS,MAAa,GAAmB,EAC3D,EAAE,oBAAiB,SAAS,MAAc,GAAoB,EAC9D,EAAE,qBAAiB,SAAS,MAAiB,GAAoB,EACjE,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,CAAC,IAAqB,KAA0B,GAAS,GAAM,EAC/D,IACJ,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3E,KACJ,KAAa,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EACtF,IACJ,KAAa,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EACtF,KACJ,KAAa,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EAEtF,KAAU,IACV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AAC,MAAuB,KAAe,EAAE,EAAE,SAAS,KACnD,kBAAC,OAAD;MAAK,WAAU;iBACX,KAAe,EAAE,EAAE,KAAK,MACxB,kBAAC,GAAD;OAEE,YAAY;OACZ,aAAY;OACZ,SAAS;OACT,EAJK,EAAK,GAIV,CACF;MACE,CAAA;KAEJ;;GAGN,kBAAC,IAAD;IACE,MAAM;IACN,SAAS;IACT,uBAAuB;IACvB,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACF,kBAAC,GAAD;IACE,MAAM;IACN,OAAO,aAAa,EAAS;IAC7B,aAAY;IACZ,cAAa;IACb,aAAY;IACZ,aAAA;IACA,SAAS;IACT,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,WAlTmB,YAAY;AAC9B,WACL,MAAM,GAAgB,EAAS,GAAG,EAClC,EAAuB,GAAM,EAC7B,IAAW,EAAS,GAAU,YAAY,CAAC;;IA+SvC,gBAAgB,EAAuB,GAAM;IAC7C,CAAA;GACE"}
|
|
1
|
+
{"version":3,"file":"ProviderDetail.js","names":[],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\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} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { getAuthTypeLabel, getCategoryLabel } from '../utils/integrationsHelpers';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\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 { adminMode = false, basePath = '/', navigate, onConnectionSelect } = useIntegrations();\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 const loading = providerLoading;\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 animate-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 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\">Provider not found</h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message || 'The requested provider could not be loaded.'}\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 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 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 return (\n <div className=\"space-y-6 p-6 max-w-5xl mx-auto\">\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border-subtle/50 p-6 shadow-sm\">\n <div className=\"relative z-10\">\n <div className=\"flex items-center gap-4 mb-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label=\"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 items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">{provider.name}</h1>\n {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 Built-in\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\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Provider Details */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface 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 Provider Details\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border-subtle/50\">\n <span className=\"text-sm text-text-secondary\">Category</span>\n <span className=\"text-sm font-medium text-text-primary\">\n {getCategoryLabel(provider.category)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-subtle/50\">\n <span className=\"text-sm text-text-secondary\">Auth Type</span>\n <span className=\"text-sm font-medium text-text-primary\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-subtle/50\">\n <span className=\"text-sm text-text-secondary\">Plugin Version</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-subtle/50\">\n <span className=\"text-sm text-text-secondary\">Author</span>\n <span className=\"text-sm font-medium text-text-primary\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border-subtle/50\">\n <span className=\"text-sm text-text-secondary\">Connections</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\">Status</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 ? 'Enabled' : 'Disabled'}\n </span>\n </div>\n </div>\n </div>\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {/* Supported Features */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface 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 Supported Features\n </h2>\n {provider.supportedFeatures.length > 0 ? (\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 ) : (\n <p className=\"text-sm text-text-secondary\">No specific features listed.</p>\n )}\n </div>\n\n {/* Links */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface 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 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 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 Documentation\n </a>\n )}\n </div>\n </div>\n\n {/* Plugin Actions */}\n {adminMode && (\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface 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 Plugin Management\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n {canUpdateProvider && (\n <button\n type=\"button\"\n onClick={handleEditProvider}\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 <Pencil size={14} />\n Edit\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'installed' && (\n <button\n type=\"button\"\n onClick={handleToggleEnabled}\n disabled={providerActionLoading}\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 disabled:opacity-50\"\n >\n <Power size={14} />\n {provider.isEnabled ? 'Disable' : 'Enable'}\n </button>\n )}\n {canCreateProvider && provider.pluginStatus === 'available' && (\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Download size={14} />\n Install Plugin\n </button>\n )}\n {canDeleteProvider && provider.pluginStatus === 'installed' && (\n <button\n type=\"button\"\n onClick={handleUninstall}\n disabled={providerActionLoading || provider.isBuiltIn}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n Uninstall\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'update_available' && (\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors\"\n >\n <Download size={14} />\n Update Available\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Connections for this provider */}\n <div className=\"rounded-xl border border-border-subtle/50 bg-bg-surface overflow-hidden\">\n <div className=\"flex items-center justify-between p-5 border-b border-border-subtle/50\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n Connections ({(connections ?? []).length})\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus size={14} />\n 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 <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-bg-sunken/50 mb-4\">\n <Link2 size={32} className=\"text-text-secondary\" />\n </div>\n <h3 className=\"font-semibold text-text-primary mb-1\">No connections yet</h3>\n <p className=\"text-sm text-text-secondary mb-4 max-w-sm\">\n Create a connection to start using {provider.name} in your workspace.\n </p>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n type=\"button\"\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\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 </div>\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={`Uninstall ${provider.name}`}\n description=\"Existing active connections must be removed first. This action is only available in admin mode.\"\n confirmLabel=\"Uninstall\"\n cancelLabel=\"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":";;;;;;;;;;;;;;;;;;AA0CA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,kBAAe,GAAmC,EACpD,EAAE,eAAY,IAAO,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACvF,EACJ,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EACJ,aACA,SAAS,IACT,OAAO,GACP,eACE,EAAY,KAAc,GAAG,EAC3B,EAAE,gBAAa,SAAS,MAAuB,GAAyB,KAAc,GAAG,EACzF,EAAE,mBAAgB,SAAS,MAAa,GAAmB,EAC3D,EAAE,oBAAiB,SAAS,MAAc,GAAoB,EAC9D,EAAE,qBAAiB,SAAS,MAAiB,GAAoB,EACjE,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,CAAC,IAAqB,KAA0B,GAAS,GAAM,EAC/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