@burdenoff/microfe-integrations 2026.828.1 → 2026.830.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +151 -152
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.d.ts.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.js +48 -40
- package/dist/integrations/components/AuthMethodSelector.js.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.js +207 -190
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.d.ts.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +102 -98
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.d.ts.map +1 -1
- package/dist/integrations/components/ConnectionStatusBadge.js +9 -5
- package/dist/integrations/components/ConnectionStatusBadge.js.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.d.ts.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.js +124 -121
- package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
- package/dist/integrations/components/ProviderCard.d.ts.map +1 -1
- package/dist/integrations/components/ProviderCard.js +25 -65
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/components/SchemaForm.d.ts.map +1 -1
- package/dist/integrations/components/SchemaForm.js +116 -111
- package/dist/integrations/components/SchemaForm.js.map +1 -1
- package/dist/integrations/hooks/useFormatDate.d.ts +7 -0
- package/dist/integrations/hooks/useFormatDate.d.ts.map +1 -0
- package/dist/integrations/hooks/useFormatDate.js +17 -0
- package/dist/integrations/hooks/useFormatDate.js.map +1 -0
- package/dist/integrations/hooks/useFormatLastUsed.d.ts +9 -0
- package/dist/integrations/hooks/useFormatLastUsed.d.ts.map +1 -0
- package/dist/integrations/hooks/useFormatLastUsed.js +15 -0
- package/dist/integrations/hooks/useFormatLastUsed.js.map +1 -0
- package/dist/integrations/hooks/useLabel.d.ts +13 -0
- package/dist/integrations/hooks/useLabel.d.ts.map +1 -0
- package/dist/integrations/hooks/useLabel.js +20 -0
- package/dist/integrations/hooks/useLabel.js.map +1 -0
- package/dist/integrations/hooks/useTr.d.ts +17 -0
- package/dist/integrations/hooks/useTr.d.ts.map +1 -0
- package/dist/integrations/hooks/useTr.js +14 -0
- package/dist/integrations/hooks/useTr.js.map +1 -0
- package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +396 -387
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +128 -128
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +210 -181
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.d.ts.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +136 -115
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.d.ts.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +76 -77
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.d.ts.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +59 -61
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.d.ts.map +1 -1
- package/dist/integrations/pages/IntegrationsUserLandingPage.js +29 -28
- package/dist/integrations/pages/IntegrationsUserLandingPage.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +99 -141
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +208 -220
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +262 -261
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +731 -0
- package/dist/integrations/translations/en.d.ts.map +1 -0
- package/dist/integrations/utils/integrationsHelpers.js +2 -16
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionLogs.js","names":[],"sources":["../../../src/integrations/pages/ConnectionLogs.tsx"],"sourcesContent":["import { useState, useMemo, useId } from 'react';\nimport {\n FileText,\n Search,\n Filter,\n X,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\n Loader2,\n ChevronLeft,\n ChevronRight,\n Info,\n AlertTriangle,\n Bug,\n Activity,\n Download,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\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 { formatDate } from '../utils/integrationsHelpers';\nimport { useIntegrationLogs } from '../hooks/useLogs';\nimport { LOG_LEVEL_OPTIONS, LOG_ACTION_OPTIONS, DEFAULT_PAGE_SIZE } from '../utils/constants';\nimport type { IntegrationLog, LogLevel, LogAction } from '../types';\nimport { Button, EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nfunction getLogLevelIcon(level: LogLevel) {\n switch (level) {\n case 'error':\n return <AlertCircle size={14} className=\"text-status-error-text\" />;\n case 'warn':\n return <AlertTriangle size={14} className=\"text-status-warning-text\" />;\n case 'info':\n return <Info size={14} className=\"text-status-info-text\" />;\n case 'debug':\n return <Bug size={14} className=\"text-text-tertiary\" />;\n default:\n return <Activity size={14} className=\"text-text-tertiary\" />;\n }\n}\n\nfunction getLogLevelColor(level: LogLevel): string {\n switch (level) {\n case 'error':\n return 'text-status-error-text bg-status-error-bg-subtle border-border-default';\n case 'warn':\n return 'text-status-warning-text bg-status-warning-bg-subtle border-border-default';\n case 'info':\n return 'text-status-info-text bg-status-info-bg-subtle border-border-default';\n case 'debug':\n return 'text-text-secondary bg-bg-sunken border-border-subtle';\n default:\n return 'text-text-secondary bg-bg-sunken border-border-subtle';\n }\n}\n\nfunction toCsvCell(value: string | number | null): string {\n const text = String(value ?? '');\n return `\"${text.replaceAll('\"', '\"\"')}\"`;\n}\n\nfunction downloadLogsCsv(logs: IntegrationLog[]) {\n const header = [\n 'Created At',\n 'Level',\n 'Action',\n 'Message',\n 'Request Method',\n 'Request URL',\n 'Status',\n ];\n const rows = logs.map((log) => [\n log.createdAt,\n log.level,\n log.action,\n log.message,\n log.requestMethod,\n log.requestUrl,\n log.responseStatus,\n ]);\n const csv = [header, ...rows].map((row) => row.map(toCsvCell).join(',')).join('\\n');\n const blob = new Blob([csv], { type: 'text/csv;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = `integration-logs-${new Date().toISOString().slice(0, 10)}.csv`;\n link.click();\n URL.revokeObjectURL(url);\n}\n\n/**\n * Connection Logs — activity log view with filtering and pagination.\n */\nexport function ConnectionLogs() {\n const { basePath = '/', navigate } = useIntegrations();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canReadLogs = hasPermission(INTEGRATION_PERMISSIONS.LOG_READ);\n const canExportCsv = useFeatureFlag(INTEGRATION_FEATURE_FLAGS.CSV_EXPORT, true);\n\n const idPrefix = useId();\n const levelFilterId = `${idPrefix}-level`;\n const actionFilterId = `${idPrefix}-action`;\n const [searchQuery, setSearchQuery] = useState('');\n const [levelFilter, setLevelFilter] = useState<LogLevel | 'all'>('all');\n const [actionFilter, setActionFilter] = useState<LogAction | 'all'>('all');\n const [showFilters, setShowFilters] = useState(false);\n const [currentPage, setCurrentPage] = useState(1);\n\n const { logs, total, loading, error, refetch } = useIntegrationLogs({\n level: levelFilter === 'all' ? undefined : levelFilter,\n action: actionFilter === 'all' ? undefined : actionFilter,\n page: currentPage,\n pageSize: DEFAULT_PAGE_SIZE,\n skip: permissionsLoading || !canReadLogs,\n });\n\n // Client-side search filter\n const filteredLogs = useMemo(() => {\n if (!searchQuery) return logs ?? [];\n const q = searchQuery.toLowerCase();\n return (logs ?? []).filter(\n (log: IntegrationLog) =>\n log.message.toLowerCase().includes(q) ||\n (log.requestUrl?.toLowerCase().includes(q) ?? false)\n );\n }, [logs, searchQuery]);\n\n const totalPages = Math.ceil((total ?? 0) / DEFAULT_PAGE_SIZE);\n\n const hasActiveFilters = searchQuery || levelFilter !== 'all' || actionFilter !== 'all';\n\n const handleClearFilters = () => {\n setSearchQuery('');\n setLevelFilter('all');\n setActionFilter('all');\n setCurrentPage(1);\n };\n\n const handleExport = () => {\n downloadLogsCsv(filteredLogs);\n };\n\n if (permissionsLoading) {\n return (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n </div>\n );\n }\n\n if (!canReadLogs) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20 text-center p-6\">\n <AlertCircle size={48} className=\"text-text-secondary mb-4\" />\n <h2 className=\"text-xl font-bold text-text-primary mb-2\">Access Denied</h2>\n <p className=\"text-sm text-text-secondary mb-6 max-w-sm\">\n You don't have permission to view activity logs.\n </p>\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={16} /> Back to Overview\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-7xl 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?.(basePath)}\n aria-label=\"Back\"\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10\">\n <FileText size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">Activity Logs</h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n Track integration activity and debug issues\n </p>\n </div>\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<FileText size={16} />}>\n Every request an integration makes — token refreshes, API calls, errors — is recorded here.\n Use this timeline to confirm a connection is working, see exactly what a provider returned,\n and debug failures (filter by level or action, then export to CSV to share with support).\n </PagePurpose>\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\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n aria-label=\"Search activity logs\"\n placeholder=\"Search logs...\"\n value={searchQuery}\n onChange={(e) => setSearchQuery(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\"\n />\n </div>\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n aria-expanded={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} /> Filter\n </button>\n {canExportCsv && (\n <Button variant=\"outline\" onClick={handleExport} disabled={filteredLogs.length === 0}>\n <Download size={16} /> Export CSV\n </Button>\n )}\n <Button variant=\"outline\" onClick={() => refetch()}>\n <RefreshCw size={16} /> Refresh\n </Button>\n </div>\n\n {showFilters && (\n <div className=\"rounded-xl border border-border-seam 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\" /> 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 flex items-center gap-1\"\n >\n <X size={14} /> Clear All\n </button>\n )}\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <label\n htmlFor={levelFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n Log Level\n </label>\n <select\n id={levelFilterId}\n value={levelFilter}\n onChange={(e) => {\n setLevelFilter(e.target.value as LogLevel | 'all');\n setCurrentPage(1);\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\"\n >\n <option value=\"all\">All Levels</option>\n {LOG_LEVEL_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label\n htmlFor={actionFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n Action\n </label>\n <select\n id={actionFilterId}\n value={actionFilter}\n onChange={(e) => {\n setActionFilter(e.target.value as LogAction | 'all');\n setCurrentPage(1);\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\"\n >\n <option value=\"all\">All Actions</option>\n {LOG_ACTION_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {opt.label}\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\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">Error loading logs</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} /> Try Again\n </button>\n </div>\n </div>\n )}\n\n {/* Loading */}\n {loading && (\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 {/* Logs List — the page's primary emphasis zone */}\n {!loading && !error && (\n <>\n {filteredLogs.length > 0 ? (\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center gap-2 p-5 border-b border-border-seam\">\n <Activity size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">Activity Timeline</h2>\n </div>\n <div className=\"divide-y divide-border-seam\">\n {filteredLogs.map((log: IntegrationLog) => (\n <div\n key={log.id}\n className=\"flex items-start gap-3 px-5 py-3.5 hover:bg-accent/30 transition-colors\"\n >\n <div className=\"mt-0.5\">{getLogLevelIcon(log.level)}</div>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <span\n className={cn(\n 'text-xs px-2 py-0.5 rounded-full border font-medium',\n getLogLevelColor(log.level)\n )}\n >\n {log.level.toUpperCase()}\n </span>\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary\">\n {log.action.replace(/_/g, ' ')}\n </span>\n {log.responseStatus && (\n <span\n className={cn(\n 'text-xs px-2 py-0.5 rounded-full border font-mono',\n log.responseStatus >= 400\n ? 'text-status-error-text bg-status-error-bg-subtle border-border-default'\n : 'text-status-success-text bg-status-success-bg-subtle border-border-default'\n )}\n >\n {log.responseStatus}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-primary mt-1\">{log.message}</p>\n {log.requestUrl && (\n <p className=\"text-xs text-text-secondary font-mono mt-0.5 truncate\">\n {log.requestMethod && (\n <span className=\"font-semibold\">{log.requestMethod} </span>\n )}\n {log.requestUrl}\n </p>\n )}\n </div>\n <span className=\"text-xs text-text-secondary whitespace-nowrap flex-shrink-0\">\n {formatDate(log.createdAt)}\n </span>\n </div>\n ))}\n </div>\n </EmphasisPanel>\n ) : (\n <IllustratedEmptyState\n illustration={hasActiveFilters ? 'empty-search' : 'empty-data'}\n title={hasActiveFilters ? 'No matching logs' : 'No activity logs yet'}\n description={\n hasActiveFilters\n ? 'Try adjusting your filters.'\n : 'Activity logs will appear here once you start using integrations.'\n }\n action={\n hasActiveFilters ? (\n <Button variant=\"outline\" onClick={handleClearFilters}>\n <X size={14} /> Clear Filters\n </Button>\n ) : undefined\n }\n />\n )}\n\n {/* Pagination */}\n {totalPages > 1 && (\n <div className=\"flex items-center justify-between px-2\">\n <p className=\"text-sm text-text-secondary\">\n Showing {(currentPage - 1) * DEFAULT_PAGE_SIZE + 1}-\n {Math.min(currentPage * DEFAULT_PAGE_SIZE, total ?? 0)} of {total}\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setCurrentPage((p) => Math.max(1, p - 1))}\n disabled={currentPage === 1}\n aria-label=\"Previous page\"\n className=\"p-2 rounded-lg border border-border-subtle hover:bg-accent disabled:opacity-50 transition-colors\"\n >\n <ChevronLeft size={16} />\n </button>\n <span className=\"text-sm text-text-primary px-3 py-1.5 rounded-lg bg-bg-sunken\">\n {currentPage} / {totalPages}\n </span>\n <button\n type=\"button\"\n onClick={() => setCurrentPage((p) => Math.min(totalPages, p + 1))}\n disabled={currentPage === totalPages}\n aria-label=\"Next page\"\n className=\"p-2 rounded-lg border border-border-subtle hover:bg-accent disabled:opacity-50 transition-colors\"\n >\n <ChevronRight size={16} />\n </button>\n </div>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA8BA,SAAS,GAAgB,GAAiB;AACxC,SAAQ,GAAR;EACE,KAAK,QACH,QAAO,kBAAC,GAAD;GAAa,MAAM;GAAI,WAAU;GAA2B,CAAA;EACrE,KAAK,OACH,QAAO,kBAAC,GAAD;GAAe,MAAM;GAAI,WAAU;GAA6B,CAAA;EACzE,KAAK,OACH,QAAO,kBAAC,GAAD;GAAM,MAAM;GAAI,WAAU;GAA0B,CAAA;EAC7D,KAAK,QACH,QAAO,kBAAC,GAAD;GAAK,MAAM;GAAI,WAAU;GAAuB,CAAA;EACzD,QACE,QAAO,kBAAC,GAAD;GAAU,MAAM;GAAI,WAAU;GAAuB,CAAA;;;AAIlE,SAAS,GAAiB,GAAyB;AACjD,SAAQ,GAAR;EACE,KAAK,QACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,QACE,QAAO;;;AAIb,SAAS,EAAU,GAAuC;AAExD,QAAO,IADM,OAAO,KAAS,GAAG,CAChB,WAAW,MAAK,OAAK,CAAC;;AAGxC,SAAS,GAAgB,GAAwB;CAmB/C,IAAM,IAAM,CAlBG;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EAUoB,GATR,EAAK,KAAK,MAAQ;EAC7B,EAAI;EACJ,EAAI;EACJ,EAAI;EACJ,EAAI;EACJ,EAAI;EACJ,EAAI;EACJ,EAAI;EACL,CAAC,CAC2B,CAAC,KAAK,MAAQ,EAAI,IAAI,EAAU,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,KAAK,EAC7E,IAAO,IAAI,KAAK,CAAC,EAAI,EAAE,EAAE,MAAM,0BAA0B,CAAC,EAC1D,IAAM,IAAI,gBAAgB,EAAK,EAC/B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AY;QAAI;QACZ;;MACP,kBAAC,UAAD;OACE,MAAK;OACL,eAAe,GAAgB,MAAM,KAAK,IAAI,GAAY,IAAI,EAAE,CAAC;OACjE,UAAU,MAAgB;OAC1B,cAAW;OACX,WAAU;iBAEV,kBAAC,GAAD,EAAc,MAAM,IAAM,CAAA;OACnB,CAAA;MACL;OACF;MAEP,EAAA,CAAA;GAED;MAxSJ,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAa,MAAM;IAAI,WAAU;IAA6B,CAAA;GAC9D,kBAAC,MAAD;IAAI,WAAU;cAA2C;IAAkB,CAAA;GAC3E,kBAAC,KAAD;IAAG,WAAU;cAA4C;IAErD,CAAA;GACJ,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,IAAW,EAAS;IACnC,WAAU;cAHZ,CAKE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EAAA,oBAChB;;GACL"}
|
|
1
|
+
{"version":3,"file":"ConnectionLogs.js","names":[],"sources":["../../../src/integrations/pages/ConnectionLogs.tsx"],"sourcesContent":["import { useState, useMemo, useId } from 'react';\nimport {\n FileText,\n Search,\n Filter,\n X,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\n Loader2,\n ChevronLeft,\n ChevronRight,\n Info,\n AlertTriangle,\n Bug,\n Activity,\n Download,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useTr } from '../hooks/useTr';\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 { useFormatDate } from '../hooks/useFormatDate';\nimport { useIntegrationLogs } from '../hooks/useLogs';\nimport { LOG_LEVEL_OPTIONS, LOG_ACTION_OPTIONS, DEFAULT_PAGE_SIZE } from '../utils/constants';\nimport type { IntegrationLog, LogLevel, LogAction } from '../types';\nimport { Button, EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\nfunction getLogLevelIcon(level: LogLevel) {\n switch (level) {\n case 'error':\n return <AlertCircle size={14} className=\"text-status-error-text\" />;\n case 'warn':\n return <AlertTriangle size={14} className=\"text-status-warning-text\" />;\n case 'info':\n return <Info size={14} className=\"text-status-info-text\" />;\n case 'debug':\n return <Bug size={14} className=\"text-text-tertiary\" />;\n default:\n return <Activity size={14} className=\"text-text-tertiary\" />;\n }\n}\n\nfunction getLogLevelColor(level: LogLevel): string {\n switch (level) {\n case 'error':\n return 'text-status-error-text bg-status-error-bg-subtle border-border-default';\n case 'warn':\n return 'text-status-warning-text bg-status-warning-bg-subtle border-border-default';\n case 'info':\n return 'text-status-info-text bg-status-info-bg-subtle border-border-default';\n case 'debug':\n return 'text-text-secondary bg-bg-sunken border-border-subtle';\n default:\n return 'text-text-secondary bg-bg-sunken border-border-subtle';\n }\n}\n\nfunction toCsvCell(value: string | number | null): string {\n const text = String(value ?? '');\n return `\"${text.replaceAll('\"', '\"\"')}\"`;\n}\n\nfunction downloadLogsCsv(logs: IntegrationLog[], tr: ReturnType<typeof useTr>) {\n const header = [\n tr('integrations.logs.csv.createdAt', 'Created At'),\n tr('integrations.logs.csv.level', 'Level'),\n tr('integrations.logs.csv.action', 'Action'),\n tr('integrations.logs.csv.message', 'Message'),\n tr('integrations.logs.csv.requestMethod', 'Request Method'),\n tr('integrations.logs.csv.requestUrl', 'Request URL'),\n tr('integrations.logs.csv.status', 'Status'),\n ];\n const rows = logs.map((log) => [\n log.createdAt,\n log.level,\n log.action,\n log.message,\n log.requestMethod,\n log.requestUrl,\n log.responseStatus,\n ]);\n const csv = [header, ...rows].map((row) => row.map(toCsvCell).join(',')).join('\\n');\n const blob = new Blob([csv], { type: 'text/csv;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = tr('integrations.logs.csv.filename', 'integration-logs-{{date}}.csv', {\n date: new Date().toISOString().slice(0, 10),\n });\n link.click();\n URL.revokeObjectURL(url);\n}\n\n/**\n * Connection Logs — activity log view with filtering and pagination.\n */\nexport function ConnectionLogs() {\n const { basePath = '/', navigate } = useIntegrations();\n const tr = useTr();\n const formatDate = useFormatDate();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canReadLogs = hasPermission(INTEGRATION_PERMISSIONS.LOG_READ);\n const canExportCsv = useFeatureFlag(INTEGRATION_FEATURE_FLAGS.CSV_EXPORT, true);\n\n const idPrefix = useId();\n const levelFilterId = `${idPrefix}-level`;\n const actionFilterId = `${idPrefix}-action`;\n const [searchQuery, setSearchQuery] = useState('');\n const [levelFilter, setLevelFilter] = useState<LogLevel | 'all'>('all');\n const [actionFilter, setActionFilter] = useState<LogAction | 'all'>('all');\n const [showFilters, setShowFilters] = useState(false);\n const [currentPage, setCurrentPage] = useState(1);\n\n const { logs, total, loading, error, refetch } = useIntegrationLogs({\n level: levelFilter === 'all' ? undefined : levelFilter,\n action: actionFilter === 'all' ? undefined : actionFilter,\n page: currentPage,\n pageSize: DEFAULT_PAGE_SIZE,\n skip: permissionsLoading || !canReadLogs,\n });\n\n // Client-side search filter\n const filteredLogs = useMemo(() => {\n if (!searchQuery) return logs ?? [];\n const q = searchQuery.toLowerCase();\n return (logs ?? []).filter(\n (log: IntegrationLog) =>\n log.message.toLowerCase().includes(q) ||\n (log.requestUrl?.toLowerCase().includes(q) ?? false)\n );\n }, [logs, searchQuery]);\n\n const totalPages = Math.ceil((total ?? 0) / DEFAULT_PAGE_SIZE);\n\n const hasActiveFilters = searchQuery || levelFilter !== 'all' || actionFilter !== 'all';\n\n const handleClearFilters = () => {\n setSearchQuery('');\n setLevelFilter('all');\n setActionFilter('all');\n setCurrentPage(1);\n };\n\n const handleExport = () => {\n downloadLogsCsv(filteredLogs, tr);\n };\n\n if (permissionsLoading) {\n return (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n </div>\n );\n }\n\n if (!canReadLogs) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20 text-center p-6\">\n <AlertCircle size={48} className=\"text-text-secondary mb-4\" />\n <h2 className=\"text-xl font-bold text-text-primary mb-2\">\n {tr('integrations.logs.denied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary mb-6 max-w-sm\">\n {tr(\n 'integrations.logs.denied.description',\n \"You don't have permission to view activity logs.\"\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={16} /> {tr('integrations.logs.denied.back', 'Back to Overview')}\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-7xl 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?.(basePath)}\n aria-label={tr('integrations.logs.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10\">\n <FileText size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr('integrations.logs.title', 'Activity Logs')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tr('integrations.logs.subtitle', 'Track integration activity and debug issues')}\n </p>\n </div>\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<FileText size={16} />}>\n {tr(\n 'integrations.logs.purpose',\n 'Every request an integration makes — token refreshes, API calls, errors — is recorded here. Use this timeline to confirm a connection is working, see exactly what a provider returned, and debug failures (filter by level or action, then export to CSV to share with support).'\n )}\n </PagePurpose>\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\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n aria-label={tr('integrations.logs.search.ariaLabel', 'Search activity logs')}\n placeholder={tr('integrations.logs.search.placeholder', 'Search logs...')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(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\"\n />\n </div>\n <button\n type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n aria-expanded={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} /> {tr('integrations.logs.filters.show', 'Filter')}\n </button>\n {canExportCsv && (\n <Button variant=\"outline\" onClick={handleExport} disabled={filteredLogs.length === 0}>\n <Download size={16} /> {tr('integrations.logs.actions.exportCsv', 'Export CSV')}\n </Button>\n )}\n <Button variant=\"outline\" onClick={() => refetch()}>\n <RefreshCw size={16} /> {tr('integrations.logs.actions.refresh', 'Refresh')}\n </Button>\n </div>\n\n {showFilters && (\n <div className=\"rounded-xl border border-border-seam 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 {tr('integrations.logs.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 flex items-center gap-1\"\n >\n <X size={14} /> {tr('integrations.logs.filters.clearAll', 'Clear All')}\n </button>\n )}\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-2\">\n <label\n htmlFor={levelFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.logs.filters.logLevel', 'Log Level')}\n </label>\n <select\n id={levelFilterId}\n value={levelFilter}\n onChange={(e) => {\n setLevelFilter(e.target.value as LogLevel | 'all');\n setCurrentPage(1);\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\"\n >\n <option value=\"all\">\n {tr('integrations.logs.filters.logLevelAll', 'All Levels')}\n </option>\n {LOG_LEVEL_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {tr(`integrations.logLevel.${opt.value}`, opt.label)}\n </option>\n ))}\n </select>\n </div>\n <div className=\"space-y-2\">\n <label\n htmlFor={actionFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.logs.filters.action', 'Action')}\n </label>\n <select\n id={actionFilterId}\n value={actionFilter}\n onChange={(e) => {\n setActionFilter(e.target.value as LogAction | 'all');\n setCurrentPage(1);\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\"\n >\n <option value=\"all\">\n {tr('integrations.logs.filters.actionAll', 'All Actions')}\n </option>\n {LOG_ACTION_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {tr(`integrations.logAction.${opt.value}`, opt.label)}\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\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tr('integrations.logs.error.title', 'Error loading logs')}\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} /> {tr('integrations.common.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading */}\n {loading && (\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 {/* Logs List — the page's primary emphasis zone */}\n {!loading && !error && (\n <>\n {filteredLogs.length > 0 ? (\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center gap-2 p-5 border-b border-border-seam\">\n <Activity size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.logs.timeline.title', 'Activity Timeline')}\n </h2>\n </div>\n <div className=\"divide-y divide-border-seam\">\n {filteredLogs.map((log: IntegrationLog) => (\n <div\n key={log.id}\n className=\"flex items-start gap-3 px-5 py-3.5 hover:bg-accent/30 transition-colors\"\n >\n <div className=\"mt-0.5\">{getLogLevelIcon(log.level)}</div>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <span\n className={cn(\n 'text-xs px-2 py-0.5 rounded-full border font-medium',\n getLogLevelColor(log.level)\n )}\n >\n {log.level.toUpperCase()}\n </span>\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary\">\n {log.action.replace(/_/g, ' ')}\n </span>\n {log.responseStatus && (\n <span\n className={cn(\n 'text-xs px-2 py-0.5 rounded-full border font-mono',\n log.responseStatus >= 400\n ? 'text-status-error-text bg-status-error-bg-subtle border-border-default'\n : 'text-status-success-text bg-status-success-bg-subtle border-border-default'\n )}\n >\n {log.responseStatus}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-primary mt-1\">{log.message}</p>\n {log.requestUrl && (\n <p className=\"text-xs text-text-secondary font-mono mt-0.5 truncate\">\n {log.requestMethod && (\n <span className=\"font-semibold\">{log.requestMethod} </span>\n )}\n {log.requestUrl}\n </p>\n )}\n </div>\n <span className=\"text-xs text-text-secondary whitespace-nowrap flex-shrink-0\">\n {formatDate(log.createdAt)}\n </span>\n </div>\n ))}\n </div>\n </EmphasisPanel>\n ) : (\n <IllustratedEmptyState\n illustration={hasActiveFilters ? 'empty-search' : 'empty-data'}\n title={\n hasActiveFilters\n ? tr('integrations.logs.empty.filteredTitle', 'No matching logs')\n : tr('integrations.logs.empty.title', 'No activity logs yet')\n }\n description={\n hasActiveFilters\n ? tr('integrations.logs.empty.filteredDescription', 'Try adjusting your filters.')\n : tr(\n 'integrations.logs.empty.description',\n 'Activity logs will appear here once you start using integrations.'\n )\n }\n action={\n hasActiveFilters ? (\n <Button variant=\"outline\" onClick={handleClearFilters}>\n <X size={14} /> {tr('integrations.logs.empty.clearFilters', 'Clear Filters')}\n </Button>\n ) : undefined\n }\n />\n )}\n\n {/* Pagination */}\n {totalPages > 1 && (\n <div className=\"flex items-center justify-between px-2\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'integrations.logs.pagination.showing',\n 'Showing {{start}}-{{end}} of {{total}}',\n {\n start: (currentPage - 1) * DEFAULT_PAGE_SIZE + 1,\n end: Math.min(currentPage * DEFAULT_PAGE_SIZE, total ?? 0),\n total: total ?? 0,\n }\n )}\n </p>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => setCurrentPage((p) => Math.max(1, p - 1))}\n disabled={currentPage === 1}\n aria-label={tr('integrations.logs.pagination.previous', 'Previous page')}\n className=\"p-2 rounded-lg border border-border-subtle hover:bg-accent disabled:opacity-50 transition-colors\"\n >\n <ChevronLeft size={16} />\n </button>\n <span className=\"text-sm text-text-primary px-3 py-1.5 rounded-lg bg-bg-sunken\">\n {tr('integrations.logs.pagination.pageOf', '{{page}} / {{total}}', {\n page: currentPage,\n total: totalPages,\n })}\n </span>\n <button\n type=\"button\"\n onClick={() => setCurrentPage((p) => Math.min(totalPages, p + 1))}\n disabled={currentPage === totalPages}\n aria-label={tr('integrations.logs.pagination.next', 'Next page')}\n className=\"p-2 rounded-lg border border-border-subtle hover:bg-accent disabled:opacity-50 transition-colors\"\n >\n <ChevronRight size={16} />\n </button>\n </div>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+BA,SAAS,EAAgB,GAAiB;AACxC,SAAQ,GAAR;EACE,KAAK,QACH,QAAO,kBAAC,GAAD;GAAa,MAAM;GAAI,WAAU;GAA2B,CAAA;EACrE,KAAK,OACH,QAAO,kBAAC,GAAD;GAAe,MAAM;GAAI,WAAU;GAA6B,CAAA;EACzE,KAAK,OACH,QAAO,kBAAC,GAAD;GAAM,MAAM;GAAI,WAAU;GAA0B,CAAA;EAC7D,KAAK,QACH,QAAO,kBAAC,GAAD;GAAK,MAAM;GAAI,WAAU;GAAuB,CAAA;EACzD,QACE,QAAO,kBAAC,GAAD;GAAU,MAAM;GAAI,WAAU;GAAuB,CAAA;;;AAIlE,SAAS,EAAiB,GAAyB;AACjD,SAAQ,GAAR;EACE,KAAK,QACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,OACH,QAAO;EACT,KAAK,QACH,QAAO;EACT,QACE,QAAO;;;AAIb,SAAS,EAAU,GAAuC;AAExD,QAAO,IADM,OAAO,KAAS,GAAG,CAChB,WAAW,MAAK,OAAK,CAAC;;AAGxC,SAAS,EAAgB,GAAwB,GAA8B;CAmB7E,IAAM,IAAM,CAlBG;EACb,EAAG,mCAAmC,aAAa;EACnD,EAAG,+BAA+B,QAAQ;EAC1C,EAAG,gCAAgC,SAAS;EAC5C,EAAG,iCAAiC,UAAU;EAC9C,EAAG,uCAAuC,iBAAiB;EAC3D,EAAG,oCAAoC,cAAc;EACrD,EAAG,gCAAgC,SAAS;EAC7C,EAUoB,GATR,EAAK,KAAK,MAAQ;EAC7B,EAAI;EACJ,EAAI;EACJ,EAAI;EACJ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;GAED;MA1UJ,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAa,MAAM;IAAI,WAAU;IAA6B,CAAA;GAC9D,kBAAC,MAAD;IAAI,WAAU;cACX,EAAG,kCAAkC,gBAAgB;IACnD,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,wCACA,mDACD;IACC,CAAA;GACJ,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,IAAW,EAAS;IACnC,WAAU;cAHZ;KAKE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;;KAAE,EAAG,iCAAiC,mBAAmB;KACzE;;GACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionsList.d.ts","sourceRoot":"","sources":["../../../src/integrations/pages/ConnectionsList.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConnectionsList.d.ts","sourceRoot":"","sources":["../../../src/integrations/pages/ConnectionsList.tsx"],"names":[],"mappings":"AA2BA;;GAEG;AACH,wBAAgB,eAAe,gCA2Y9B"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
+
import { cn as n } from "../utils/cn.js";
|
|
4
|
+
import { INTEGRATION_PERMISSIONS as r } from "../constants/permissions.js";
|
|
5
|
+
import { useIntegrationsStore as i } from "../store/integrationsStore.js";
|
|
6
|
+
import { joinPath as a } from "../utils/navigation.js";
|
|
7
|
+
import { useConnections as o } from "../hooks/useConnections.js";
|
|
8
|
+
import { AddConnectionDialog as s } from "../components/AddConnectionDialog.js";
|
|
9
|
+
import { CONNECTION_STATUS_OPTIONS as c, PROVIDER_CATEGORIES as l } from "../utils/constants.js";
|
|
10
|
+
import { ConnectionCard as ee } from "../components/ConnectionCard.js";
|
|
11
|
+
import { useId as te, useMemo as u, useState as d } from "react";
|
|
12
|
+
import { AlertCircle as f, ArrowLeft as ne, Filter as p, Grid3x3 as m, Link2 as h, List as g, Plus as _, RefreshCw as v, Search as y, X as b } from "lucide-react";
|
|
13
|
+
import { usePermissions as x } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
+
import { Button as w, EmphasisPanel as T, IllustratedEmptyState as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
|
|
15
16
|
//#region src/integrations/pages/ConnectionsList.tsx
|
|
16
|
-
function
|
|
17
|
-
let { basePath:
|
|
17
|
+
function O() {
|
|
18
|
+
let { basePath: O = "/", navigate: k, onConnectionSelect: A } = e(), j = t(), { viewMode: M, setViewMode: N, connectionFilter: P, updateConnectionFilter: F, addConnectionDialogOpen: I, openAddConnectionDialog: L, closeAddConnectionDialog: R } = i(), { connections: z, loading: B, error: V, refetch: H } = o(), { hasPermission: U, isLoading: W } = x(), G = !W && U(r.CONNECTION_CREATE), [K, q] = d(!1), J = te(), Y = `${J}-status`, X = `${J}-category`, Z = u(() => {
|
|
18
19
|
let e = z ?? [];
|
|
19
20
|
if (P.search) {
|
|
20
21
|
let t = P.search.toLowerCase();
|
|
@@ -28,188 +29,196 @@ function k() {
|
|
|
28
29
|
providerId: null,
|
|
29
30
|
category: "all"
|
|
30
31
|
});
|
|
31
|
-
},
|
|
32
|
-
|
|
32
|
+
}, re = (e) => {
|
|
33
|
+
A?.(e), k?.(a(O, `connections/${e.id}`));
|
|
33
34
|
};
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ C("div", {
|
|
35
36
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
36
37
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ S("div", {
|
|
38
39
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
39
40
|
"data-tour": "integrations-connections-header",
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ C("div", {
|
|
41
42
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ C("div", {
|
|
43
44
|
className: "flex min-w-0 items-center gap-4",
|
|
44
45
|
children: [
|
|
45
|
-
/* @__PURE__ */ w
|
|
46
|
+
/* @__PURE__ */ S(w, {
|
|
46
47
|
variant: "ghost",
|
|
47
48
|
size: "icon",
|
|
48
49
|
className: "shrink-0",
|
|
49
|
-
onClick: () =>
|
|
50
|
-
"aria-label": "Back to overview",
|
|
51
|
-
children: /* @__PURE__ */
|
|
50
|
+
onClick: () => k?.(O),
|
|
51
|
+
"aria-label": j("integrations.connections.actions.backAriaLabel", "Back to overview"),
|
|
52
|
+
children: /* @__PURE__ */ S(ne, { size: 20 })
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ S("div", {
|
|
54
55
|
className: "shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ S(h, {
|
|
56
57
|
size: 24,
|
|
57
58
|
className: "text-primary"
|
|
58
59
|
})
|
|
59
60
|
}),
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ C("div", {
|
|
61
62
|
className: "min-w-0",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ S("h1", {
|
|
63
64
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
64
|
-
children: "Connections"
|
|
65
|
-
}), /* @__PURE__ */
|
|
65
|
+
children: j("integrations.connections.title", "Connections")
|
|
66
|
+
}), /* @__PURE__ */ S("p", {
|
|
66
67
|
className: "text-sm text-text-secondary mt-0.5",
|
|
67
|
-
children: "Manage your integration connections"
|
|
68
|
+
children: j("integrations.connections.subtitle", "Manage your integration connections")
|
|
68
69
|
})]
|
|
69
70
|
})
|
|
70
71
|
]
|
|
71
|
-
}), G && /* @__PURE__ */
|
|
72
|
+
}), G && /* @__PURE__ */ C(w, {
|
|
72
73
|
className: "shrink-0",
|
|
73
74
|
onClick: () => L(),
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ S(_, { size: 16 }), j("integrations.connections.actions.addConnection", "Add Connection")]
|
|
75
76
|
})]
|
|
76
77
|
})
|
|
77
78
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
icon: /* @__PURE__ */
|
|
80
|
-
children: "A connection is one authenticated link between your workspace and an external service (for example,
|
|
79
|
+
/* @__PURE__ */ S(D, {
|
|
80
|
+
icon: /* @__PURE__ */ S(h, { size: 16 }),
|
|
81
|
+
children: j("integrations.connections.purpose", "A connection is one authenticated link between your workspace and an external service (for example, \"Marketing Slack\" or \"Finance Google Drive\"). Use this page to see every connection at a glance, check its health, search by provider or account, and open one to test, refresh, or revoke its access.")
|
|
81
82
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ C("div", {
|
|
83
84
|
className: "space-y-4",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ C("div", {
|
|
85
86
|
className: "flex flex-col sm:flex-row gap-3",
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ C("div", {
|
|
88
89
|
className: "flex-1 relative group",
|
|
89
90
|
"data-tour": "integrations-connections-search",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ S(y, {
|
|
91
92
|
size: 18,
|
|
92
93
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
+
}), /* @__PURE__ */ S("input", {
|
|
94
95
|
type: "text",
|
|
95
|
-
placeholder: "Search connections...",
|
|
96
|
+
placeholder: j("integrations.connections.search.placeholder", "Search connections..."),
|
|
96
97
|
value: P.search,
|
|
97
98
|
onChange: (e) => F({ search: e.target.value }),
|
|
98
99
|
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",
|
|
99
|
-
"aria-label": "Search connections"
|
|
100
|
+
"aria-label": j("integrations.connections.search.ariaLabel", "Search connections")
|
|
100
101
|
})]
|
|
101
102
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ C("button", {
|
|
103
104
|
type: "button",
|
|
104
105
|
onClick: () => q(!K),
|
|
105
|
-
className:
|
|
106
|
-
children: [/* @__PURE__ */
|
|
106
|
+
className: n("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", K || Q ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
|
|
107
|
+
children: [/* @__PURE__ */ S(p, { size: 16 }), K ? j("integrations.connections.filters.hide", "Hide") : j("integrations.connections.filters.show", "Filter")]
|
|
107
108
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ C("div", {
|
|
109
110
|
className: "flex items-center border border-border-subtle rounded-lg overflow-hidden",
|
|
110
111
|
"data-tour": "integrations-connections-view-toggle",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ S("button", {
|
|
112
113
|
type: "button",
|
|
113
114
|
onClick: () => N("grid"),
|
|
114
|
-
className:
|
|
115
|
-
"aria-label": "Grid view",
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
-
}), /* @__PURE__ */
|
|
115
|
+
className: n("p-2.5 transition-colors", M === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
116
|
+
"aria-label": j("integrations.connections.view.gridAriaLabel", "Grid view"),
|
|
117
|
+
children: /* @__PURE__ */ S(m, { size: 16 })
|
|
118
|
+
}), /* @__PURE__ */ S("button", {
|
|
118
119
|
type: "button",
|
|
119
120
|
onClick: () => N("list"),
|
|
120
|
-
className:
|
|
121
|
-
"aria-label": "List view",
|
|
122
|
-
children: /* @__PURE__ */
|
|
121
|
+
className: n("p-2.5 transition-colors", M === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
122
|
+
"aria-label": j("integrations.connections.view.listAriaLabel", "List view"),
|
|
123
|
+
children: /* @__PURE__ */ S(g, { size: 16 })
|
|
123
124
|
})]
|
|
124
125
|
})
|
|
125
126
|
]
|
|
126
|
-
}), K && /* @__PURE__ */
|
|
127
|
+
}), K && /* @__PURE__ */ C("div", {
|
|
127
128
|
className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ C("div", {
|
|
129
130
|
className: "flex items-center justify-between mb-4",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
131
132
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ S(p, {
|
|
133
134
|
size: 16,
|
|
134
135
|
className: "text-primary"
|
|
135
|
-
}), "Filters"]
|
|
136
|
-
}), Q && /* @__PURE__ */
|
|
136
|
+
}), j("integrations.connections.filters.panelTitle", "Filters")]
|
|
137
|
+
}), Q && /* @__PURE__ */ C("button", {
|
|
137
138
|
type: "button",
|
|
138
139
|
onClick: $,
|
|
139
140
|
className: "text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1",
|
|
140
|
-
children: [
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ S(b, { size: 14 }),
|
|
143
|
+
" ",
|
|
144
|
+
j("integrations.connections.filters.clearAll", "Clear All")
|
|
145
|
+
]
|
|
141
146
|
})]
|
|
142
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ C("div", {
|
|
143
148
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ C("div", {
|
|
145
150
|
className: "space-y-2",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ S("label", {
|
|
147
152
|
htmlFor: Y,
|
|
148
153
|
className: "block text-sm font-medium text-text-primary",
|
|
149
|
-
children: "Status"
|
|
150
|
-
}), /* @__PURE__ */
|
|
154
|
+
children: j("integrations.connections.filters.statusLabel", "Status")
|
|
155
|
+
}), /* @__PURE__ */ C("select", {
|
|
151
156
|
id: Y,
|
|
152
157
|
value: P.status,
|
|
153
158
|
onChange: (e) => F({ status: e.target.value }),
|
|
154
159
|
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",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ S("option", {
|
|
156
161
|
value: "all",
|
|
157
|
-
children: "All Statuses"
|
|
158
|
-
}),
|
|
162
|
+
children: j("integrations.connections.filters.statusAll", "All Statuses")
|
|
163
|
+
}), c.map((e) => /* @__PURE__ */ S("option", {
|
|
159
164
|
value: e.value,
|
|
160
|
-
children: e.label
|
|
165
|
+
children: j(`integrations.status.${e.value}`, e.label)
|
|
161
166
|
}, e.value))]
|
|
162
167
|
})]
|
|
163
|
-
}), /* @__PURE__ */
|
|
168
|
+
}), /* @__PURE__ */ C("div", {
|
|
164
169
|
className: "space-y-2",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ S("label", {
|
|
166
171
|
htmlFor: X,
|
|
167
172
|
className: "block text-sm font-medium text-text-primary",
|
|
168
|
-
children: "Category"
|
|
169
|
-
}), /* @__PURE__ */
|
|
173
|
+
children: j("integrations.connections.filters.categoryLabel", "Category")
|
|
174
|
+
}), /* @__PURE__ */ C("select", {
|
|
170
175
|
id: X,
|
|
171
176
|
value: P.category,
|
|
172
177
|
onChange: (e) => F({ category: e.target.value }),
|
|
173
178
|
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",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ S("option", {
|
|
175
180
|
value: "all",
|
|
176
|
-
children: "All Categories"
|
|
177
|
-
}),
|
|
181
|
+
children: j("integrations.connections.filters.categoryAll", "All Categories")
|
|
182
|
+
}), l.map((e) => /* @__PURE__ */ S("option", {
|
|
178
183
|
value: e.value,
|
|
179
|
-
children: e.label
|
|
184
|
+
children: j(`integrations.category.${e.value}`, e.label)
|
|
180
185
|
}, e.value))]
|
|
181
186
|
})]
|
|
182
187
|
})]
|
|
183
188
|
})]
|
|
184
189
|
})]
|
|
185
190
|
}),
|
|
186
|
-
V && /* @__PURE__ */
|
|
191
|
+
V && /* @__PURE__ */ C("div", {
|
|
187
192
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ S(f, {
|
|
189
194
|
size: 24,
|
|
190
195
|
className: "text-status-error-text flex-shrink-0"
|
|
191
|
-
}), /* @__PURE__ */
|
|
196
|
+
}), /* @__PURE__ */ C("div", {
|
|
192
197
|
className: "flex-1",
|
|
193
198
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ S("h3", {
|
|
195
200
|
className: "font-semibold text-status-error-text mb-1",
|
|
196
|
-
children: "Error loading connections"
|
|
201
|
+
children: j("integrations.connections.error.title", "Error loading connections")
|
|
197
202
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ S("p", {
|
|
199
204
|
className: "text-sm text-status-error-text mb-3",
|
|
200
205
|
children: V.message
|
|
201
206
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ C("button", {
|
|
203
208
|
type: "button",
|
|
204
209
|
onClick: () => H(),
|
|
205
210
|
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",
|
|
206
|
-
children: [
|
|
211
|
+
children: [
|
|
212
|
+
/* @__PURE__ */ S(v, { size: 14 }),
|
|
213
|
+
" ",
|
|
214
|
+
j("integrations.common.retry", "Try Again")
|
|
215
|
+
]
|
|
207
216
|
})
|
|
208
217
|
]
|
|
209
218
|
})]
|
|
210
219
|
}),
|
|
211
|
-
B && /* @__PURE__ */
|
|
212
|
-
className:
|
|
220
|
+
B && /* @__PURE__ */ S("div", {
|
|
221
|
+
className: n(M === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
213
222
|
children: [...[
|
|
214
223
|
,
|
|
215
224
|
,
|
|
@@ -217,29 +226,29 @@ function k() {
|
|
|
217
226
|
,
|
|
218
227
|
,
|
|
219
228
|
,
|
|
220
|
-
]].map((e, t) => /* @__PURE__ */
|
|
229
|
+
]].map((e, t) => /* @__PURE__ */ S("div", {
|
|
221
230
|
className: "rounded-xl border border-border-seam bg-bg-surface p-5",
|
|
222
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ C("div", {
|
|
223
232
|
className: "flex items-start gap-3",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ S("div", { className: "size-11 bg-bg-sunken rounded-xl animate-vc-shimmer" }), /* @__PURE__ */ C("div", {
|
|
225
234
|
className: "flex-1 space-y-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ S("div", { className: "h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer" }), /* @__PURE__ */ S("div", { className: "h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer" })]
|
|
227
236
|
})]
|
|
228
237
|
})
|
|
229
238
|
}, t))
|
|
230
239
|
}),
|
|
231
|
-
!B && !V && /* @__PURE__ */ T
|
|
240
|
+
!B && !V && /* @__PURE__ */ C(T, {
|
|
232
241
|
className: "overflow-hidden p-0",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ C("div", {
|
|
234
243
|
className: "flex items-center justify-between gap-2 p-5 border-b border-border-seam",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ C("div", {
|
|
236
245
|
className: "flex items-center gap-2",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ S(h, {
|
|
238
247
|
size: 18,
|
|
239
248
|
className: "text-primary"
|
|
240
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ C("h2", {
|
|
241
250
|
className: "font-semibold text-text-primary",
|
|
242
|
-
children: ["Your Connections", Z.length > 0 && /* @__PURE__ */
|
|
251
|
+
children: [j("integrations.connections.results.title", "Your Connections"), Z.length > 0 && /* @__PURE__ */ C("span", {
|
|
243
252
|
className: "ml-2 text-sm font-normal text-text-secondary tabular-nums",
|
|
244
253
|
children: [
|
|
245
254
|
"(",
|
|
@@ -248,34 +257,46 @@ function k() {
|
|
|
248
257
|
]
|
|
249
258
|
})]
|
|
250
259
|
})]
|
|
251
|
-
}), G && Z.length > 0 && /* @__PURE__ */
|
|
260
|
+
}), G && Z.length > 0 && /* @__PURE__ */ C(w, {
|
|
252
261
|
size: "sm",
|
|
253
262
|
variant: "outline",
|
|
254
263
|
onClick: () => L(),
|
|
255
|
-
children: [
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ S(_, { size: 14 }),
|
|
266
|
+
" ",
|
|
267
|
+
j("integrations.connections.actions.add", "Add")
|
|
268
|
+
]
|
|
256
269
|
})]
|
|
257
|
-
}), Z.length > 0 ? /* @__PURE__ */
|
|
258
|
-
className:
|
|
259
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
270
|
+
}), Z.length > 0 ? /* @__PURE__ */ S("div", {
|
|
271
|
+
className: n("p-5", M === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
272
|
+
children: Z.map((e) => /* @__PURE__ */ S(ee, {
|
|
260
273
|
connection: e,
|
|
261
274
|
displayMode: M,
|
|
262
|
-
onClick:
|
|
275
|
+
onClick: re
|
|
263
276
|
}, e.id))
|
|
264
|
-
}) : /* @__PURE__ */
|
|
277
|
+
}) : /* @__PURE__ */ S(E, {
|
|
265
278
|
illustration: Q ? "empty-search" : "empty-data",
|
|
266
|
-
title: Q ? "No matching connections" : "No connections yet",
|
|
267
|
-
description: Q ? "Try adjusting your search or filters." : G ? "Add a connection to start integrating with external services." : "No connections are configured yet. Contact your workspace admin to add one.",
|
|
268
|
-
action: Q ? /* @__PURE__ */
|
|
279
|
+
title: Q ? j("integrations.connections.empty.filteredTitle", "No matching connections") : j("integrations.connections.empty.title", "No connections yet"),
|
|
280
|
+
description: Q ? j("integrations.connections.empty.filteredDescription", "Try adjusting your search or filters.") : G ? j("integrations.connections.empty.description", "Add a connection to start integrating with external services.") : j("integrations.connections.empty.readOnlyDescription", "No connections are configured yet. Contact your workspace admin to add one."),
|
|
281
|
+
action: Q ? /* @__PURE__ */ C(w, {
|
|
269
282
|
variant: "outline",
|
|
270
283
|
onClick: $,
|
|
271
|
-
children: [
|
|
272
|
-
|
|
284
|
+
children: [
|
|
285
|
+
/* @__PURE__ */ S(b, { size: 14 }),
|
|
286
|
+
" ",
|
|
287
|
+
j("integrations.connections.empty.clearFilters", "Clear Filters")
|
|
288
|
+
]
|
|
289
|
+
}) : G ? /* @__PURE__ */ C(w, {
|
|
273
290
|
onClick: () => L(),
|
|
274
|
-
children: [
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ S(_, { size: 14 }),
|
|
293
|
+
" ",
|
|
294
|
+
j("integrations.connections.actions.addConnection", "Add Connection")
|
|
295
|
+
]
|
|
275
296
|
}) : void 0
|
|
276
297
|
})]
|
|
277
298
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ S(s, {
|
|
279
300
|
open: I,
|
|
280
301
|
onClose: R,
|
|
281
302
|
onConnectionCreated: () => {
|
|
@@ -286,6 +307,6 @@ function k() {
|
|
|
286
307
|
});
|
|
287
308
|
}
|
|
288
309
|
//#endregion
|
|
289
|
-
export {
|
|
310
|
+
export { O as ConnectionsList };
|
|
290
311
|
|
|
291
312
|
//# sourceMappingURL=ConnectionsList.js.map
|