@burdenoff/microfe-integrations 2026.608.1 → 2026.624.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/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 +313 -284
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConfirmDialog.js +5 -5
- 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 +16 -15
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/hooks/useConnections.js +33 -13
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +143 -113
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +53 -53
- 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 +33 -33
- 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 +30 -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 +47 -45
- 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/dist/integrations/utils/constants.js +4 -0
- package/dist/integrations/utils/constants.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.js +1 -0
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/dist/integrations/utils/mappers.js +1 -0
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ function D() {
|
|
|
34
34
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
35
35
|
children: [
|
|
36
36
|
/* @__PURE__ */ E("div", {
|
|
37
|
-
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",
|
|
37
|
+
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",
|
|
38
38
|
"data-tour": "integrations-connections-header",
|
|
39
39
|
children: [/* @__PURE__ */ E("div", {
|
|
40
40
|
className: "relative z-10 flex items-center justify-between",
|
|
@@ -49,24 +49,24 @@ function D() {
|
|
|
49
49
|
children: /* @__PURE__ */ T(m, { size: 20 })
|
|
50
50
|
}),
|
|
51
51
|
/* @__PURE__ */ T("div", {
|
|
52
|
-
className: "p-2.5 rounded-lg bg-primary/10 backdrop-blur-sm",
|
|
52
|
+
className: "p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm",
|
|
53
53
|
children: /* @__PURE__ */ T(_, {
|
|
54
54
|
size: 24,
|
|
55
55
|
className: "text-primary"
|
|
56
56
|
})
|
|
57
57
|
}),
|
|
58
58
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
|
|
59
|
-
className: "text-2xl sm:text-3xl font-bold text-
|
|
59
|
+
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
60
60
|
children: "Connections"
|
|
61
61
|
}), /* @__PURE__ */ T("p", {
|
|
62
|
-
className: "text-sm text-
|
|
62
|
+
className: "text-sm text-text-secondary mt-0.5",
|
|
63
63
|
children: "Manage your integration connections"
|
|
64
64
|
})] })
|
|
65
65
|
]
|
|
66
66
|
}), U && /* @__PURE__ */ E("button", {
|
|
67
67
|
type: "button",
|
|
68
68
|
onClick: () => F(),
|
|
69
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
69
|
+
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",
|
|
70
70
|
children: [/* @__PURE__ */ T(y, { size: 16 }), "Add Connection"]
|
|
71
71
|
})]
|
|
72
72
|
}), /* @__PURE__ */ T("div", { className: "absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0" })]
|
|
@@ -81,46 +81,46 @@ function D() {
|
|
|
81
81
|
"data-tour": "integrations-connections-search",
|
|
82
82
|
children: [/* @__PURE__ */ T(x, {
|
|
83
83
|
size: 18,
|
|
84
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 text-
|
|
84
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
85
85
|
}), /* @__PURE__ */ T("input", {
|
|
86
86
|
type: "text",
|
|
87
87
|
placeholder: "Search connections...",
|
|
88
88
|
value: M.search,
|
|
89
89
|
onChange: (e) => N({ search: e.target.value }),
|
|
90
|
-
className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-
|
|
90
|
+
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",
|
|
91
91
|
"aria-label": "Search connections"
|
|
92
92
|
})]
|
|
93
93
|
}),
|
|
94
94
|
/* @__PURE__ */ E("button", {
|
|
95
95
|
type: "button",
|
|
96
96
|
onClick: () => G(!W),
|
|
97
|
-
className: t("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", W || X ? "bg-primary text-primary-
|
|
97
|
+
className: t("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", W || X ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
|
|
98
98
|
children: [/* @__PURE__ */ T(h, { size: 16 }), "Filter"]
|
|
99
99
|
}),
|
|
100
100
|
/* @__PURE__ */ E("div", {
|
|
101
|
-
className: "flex items-center border border-border rounded-lg overflow-hidden",
|
|
101
|
+
className: "flex items-center border border-border-subtle rounded-lg overflow-hidden",
|
|
102
102
|
"data-tour": "integrations-connections-view-toggle",
|
|
103
103
|
children: [/* @__PURE__ */ T("button", {
|
|
104
104
|
type: "button",
|
|
105
105
|
onClick: () => j("grid"),
|
|
106
|
-
className: t("p-2.5 transition-colors", A === "grid" ? "bg-primary text-primary-
|
|
106
|
+
className: t("p-2.5 transition-colors", A === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
107
107
|
"aria-label": "Grid view",
|
|
108
108
|
children: /* @__PURE__ */ T(g, { size: 16 })
|
|
109
109
|
}), /* @__PURE__ */ T("button", {
|
|
110
110
|
type: "button",
|
|
111
111
|
onClick: () => j("list"),
|
|
112
|
-
className: t("p-2.5 transition-colors", A === "list" ? "bg-primary text-primary-
|
|
112
|
+
className: t("p-2.5 transition-colors", A === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
113
113
|
"aria-label": "List view",
|
|
114
114
|
children: /* @__PURE__ */ T(v, { size: 16 })
|
|
115
115
|
})]
|
|
116
116
|
})
|
|
117
117
|
]
|
|
118
118
|
}), W && /* @__PURE__ */ E("div", {
|
|
119
|
-
className: "rounded-xl border border-border/50 bg-
|
|
119
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200",
|
|
120
120
|
children: [/* @__PURE__ */ E("div", {
|
|
121
121
|
className: "flex items-center justify-between mb-4",
|
|
122
122
|
children: [/* @__PURE__ */ E("h3", {
|
|
123
|
-
className: "font-semibold text-
|
|
123
|
+
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
124
124
|
children: [/* @__PURE__ */ T(h, {
|
|
125
125
|
size: 16,
|
|
126
126
|
className: "text-primary"
|
|
@@ -128,7 +128,7 @@ function D() {
|
|
|
128
128
|
}), X && /* @__PURE__ */ E("button", {
|
|
129
129
|
type: "button",
|
|
130
130
|
onClick: Z,
|
|
131
|
-
className: "text-sm text-
|
|
131
|
+
className: "text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1",
|
|
132
132
|
children: [/* @__PURE__ */ T(S, { size: 14 }), " Clear All"]
|
|
133
133
|
})]
|
|
134
134
|
}), /* @__PURE__ */ E("div", {
|
|
@@ -137,13 +137,13 @@ function D() {
|
|
|
137
137
|
className: "space-y-2",
|
|
138
138
|
children: [/* @__PURE__ */ T("label", {
|
|
139
139
|
htmlFor: q,
|
|
140
|
-
className: "block text-sm font-medium text-
|
|
140
|
+
className: "block text-sm font-medium text-text-primary",
|
|
141
141
|
children: "Status"
|
|
142
142
|
}), /* @__PURE__ */ E("select", {
|
|
143
143
|
id: q,
|
|
144
144
|
value: M.status,
|
|
145
145
|
onChange: (e) => N({ status: e.target.value }),
|
|
146
|
-
className: "w-full px-3 py-2 border border-border rounded-lg bg-
|
|
146
|
+
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",
|
|
147
147
|
children: [/* @__PURE__ */ T("option", {
|
|
148
148
|
value: "all",
|
|
149
149
|
children: "All Statuses"
|
|
@@ -156,13 +156,13 @@ function D() {
|
|
|
156
156
|
className: "space-y-2",
|
|
157
157
|
children: [/* @__PURE__ */ T("label", {
|
|
158
158
|
htmlFor: J,
|
|
159
|
-
className: "block text-sm font-medium text-
|
|
159
|
+
className: "block text-sm font-medium text-text-primary",
|
|
160
160
|
children: "Category"
|
|
161
161
|
}), /* @__PURE__ */ E("select", {
|
|
162
162
|
id: J,
|
|
163
163
|
value: M.category,
|
|
164
164
|
onChange: (e) => N({ category: e.target.value }),
|
|
165
|
-
className: "w-full px-3 py-2 border border-border rounded-lg bg-
|
|
165
|
+
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",
|
|
166
166
|
children: [/* @__PURE__ */ T("option", {
|
|
167
167
|
value: "all",
|
|
168
168
|
children: "All Categories"
|
|
@@ -210,12 +210,12 @@ function D() {
|
|
|
210
210
|
,
|
|
211
211
|
,
|
|
212
212
|
]].map((e, t) => /* @__PURE__ */ T("div", {
|
|
213
|
-
className: "rounded-xl border border-border/50 bg-
|
|
213
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 animate-pulse",
|
|
214
214
|
children: /* @__PURE__ */ E("div", {
|
|
215
215
|
className: "flex items-start gap-3",
|
|
216
|
-
children: [/* @__PURE__ */ T("div", { className: "size-11 bg-
|
|
216
|
+
children: [/* @__PURE__ */ T("div", { className: "size-11 bg-bg-sunken rounded-xl" }), /* @__PURE__ */ E("div", {
|
|
217
217
|
className: "flex-1 space-y-2",
|
|
218
|
-
children: [/* @__PURE__ */ T("div", { className: "h-4 w-3/4 bg-
|
|
218
|
+
children: [/* @__PURE__ */ T("div", { className: "h-4 w-3/4 bg-bg-sunken rounded" }), /* @__PURE__ */ T("div", { className: "h-3 w-1/2 bg-bg-sunken rounded" })]
|
|
219
219
|
})]
|
|
220
220
|
})
|
|
221
221
|
}, t))
|
|
@@ -231,29 +231,29 @@ function D() {
|
|
|
231
231
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
232
232
|
children: [
|
|
233
233
|
/* @__PURE__ */ T("div", {
|
|
234
|
-
className: "p-4 rounded-full bg-
|
|
234
|
+
className: "p-4 rounded-full bg-bg-sunken/50 mb-4",
|
|
235
235
|
children: T(X ? x : _, {
|
|
236
236
|
size: 32,
|
|
237
|
-
className: "text-
|
|
237
|
+
className: "text-text-secondary"
|
|
238
238
|
})
|
|
239
239
|
}),
|
|
240
240
|
/* @__PURE__ */ T("h3", {
|
|
241
|
-
className: "font-semibold text-
|
|
241
|
+
className: "font-semibold text-text-primary mb-1",
|
|
242
242
|
children: X ? "No matching connections" : "No connections yet"
|
|
243
243
|
}),
|
|
244
244
|
/* @__PURE__ */ T("p", {
|
|
245
|
-
className: "text-sm text-
|
|
245
|
+
className: "text-sm text-text-secondary max-w-sm",
|
|
246
246
|
children: X ? "Try adjusting your search or filters." : U ? "Add a connection to start integrating with external services." : "No connections are configured yet. Contact your workspace admin to add one."
|
|
247
247
|
}),
|
|
248
248
|
X ? /* @__PURE__ */ E("button", {
|
|
249
249
|
type: "button",
|
|
250
250
|
onClick: Z,
|
|
251
|
-
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",
|
|
251
|
+
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",
|
|
252
252
|
children: [/* @__PURE__ */ T(S, { size: 14 }), " Clear Filters"]
|
|
253
253
|
}) : U && /* @__PURE__ */ E("button", {
|
|
254
254
|
type: "button",
|
|
255
255
|
onClick: () => F(),
|
|
256
|
-
className: "mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
256
|
+
className: "mt-4 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",
|
|
257
257
|
children: [/* @__PURE__ */ T(y, { size: 14 }), " Add Connection"]
|
|
258
258
|
})
|
|
259
259
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionsList.js","names":[],"sources":["../../../src/integrations/pages/ConnectionsList.tsx"],"sourcesContent":["import { useState, useMemo, useId } from 'react';\nimport {\n Search,\n Filter,\n X,\n Grid3x3,\n List,\n Plus,\n Link2,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\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 { useConnections } from '../hooks/useConnections';\nimport { joinPath } from '../utils/navigation';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { CONNECTION_STATUS_OPTIONS, PROVIDER_CATEGORIES } from '../utils/constants';\nimport type { IntegrationConnection, ConnectionStatus, ProviderCategory } from '../types';\n\n/**\n * Connections List — list of all connections with search and status filter.\n */\nexport function ConnectionsList() {\n const { basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const {\n viewMode,\n setViewMode,\n connectionFilter,\n updateConnectionFilter,\n addConnectionDialogOpen,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { connections, loading, error, refetch } = useConnections();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreate = !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const [showFilters, setShowFilters] = useState(false);\n const idPrefix = useId();\n const statusFilterId = `${idPrefix}-status`;\n const categoryFilterId = `${idPrefix}-category`;\n\n const filteredConnections = useMemo(() => {\n let result = connections ?? [];\n\n if (connectionFilter.search) {\n const q = connectionFilter.search.toLowerCase();\n result = result.filter(\n (c: IntegrationConnection) =>\n c.name.toLowerCase().includes(q) ||\n c.provider.name.toLowerCase().includes(q) ||\n (c.externalAccountEmail?.toLowerCase().includes(q) ?? false)\n );\n }\n\n if (connectionFilter.status !== 'all') {\n result = result.filter((c: IntegrationConnection) => c.status === connectionFilter.status);\n }\n\n if (connectionFilter.providerId) {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.id === connectionFilter.providerId\n );\n }\n\n if (connectionFilter.category !== 'all') {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.category === connectionFilter.category\n );\n }\n\n return result.sort(\n (a: IntegrationConnection, b: IntegrationConnection) =>\n new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()\n );\n }, [connections, connectionFilter]);\n\n const hasActiveFilters =\n connectionFilter.search ||\n connectionFilter.status !== 'all' ||\n connectionFilter.providerId ||\n connectionFilter.category !== 'all';\n\n const handleClearFilters = () => {\n updateConnectionFilter({ search: '', status: 'all', providerId: null, category: 'all' });\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\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-connections-header\"\n >\n <div className=\"relative z-10 flex items-center justify-between\">\n <div className=\"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=\"Back to overview\"\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"p-2.5 rounded-lg bg-primary/10 backdrop-blur-sm\">\n <Link2 size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">Connections</h1>\n <p className=\"text-sm text-muted-foreground mt-0.5\">\n Manage your integration connections\n </p>\n </div>\n </div>\n {canCreate && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\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 Add Connection\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-connections-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=\"Search connections...\"\n value={connectionFilter.search}\n onChange={(e) => updateConnectionFilter({ 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=\"Search connections\"\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 Filter\n </button>\n\n <div\n className=\"flex items-center border border-border rounded-lg overflow-hidden\"\n data-tour=\"integrations-connections-view-toggle\"\n >\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=\"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=\"List view\"\n >\n <List size={16} />\n </button>\n </div>\n </div>\n\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 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} /> 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={statusFilterId}\n className=\"block text-sm font-medium text-foreground\"\n >\n Status\n </label>\n <select\n id={statusFilterId}\n value={connectionFilter.status}\n onChange={(e) =>\n updateConnectionFilter({ status: e.target.value as ConnectionStatus | '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\">All Statuses</option>\n {CONNECTION_STATUS_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={categoryFilterId}\n className=\"block text-sm font-medium text-foreground\"\n >\n Category\n </label>\n <select\n id={categoryFilterId}\n value={connectionFilter.category}\n onChange={(e) =>\n updateConnectionFilter({ 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\">All Categories</option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {cat.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 flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">Error loading connections</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\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-11 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-1/2 bg-muted rounded\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Connections */}\n {!loading && !error && (\n <>\n {filteredConnections.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 {filteredConnections.map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode={viewMode}\n onClick={handleConnectionClick}\n />\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 <Link2 size={32} className=\"text-muted-foreground\" />\n )}\n </div>\n <h3 className=\"font-semibold text-foreground mb-1\">\n {hasActiveFilters ? 'No matching connections' : 'No connections yet'}\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-sm\">\n {hasActiveFilters\n ? 'Try adjusting your search or filters.'\n : canCreate\n ? 'Add a connection to start integrating with external services.'\n : 'No connections are configured yet. Contact your workspace admin to add one.'}\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} /> Clear Filters\n </button>\n ) : (\n canCreate && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\n className=\"mt-4 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={14} /> Add Connection\n </button>\n )\n )}\n </div>\n )}\n </>\n )}\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA4BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACpE,EACJ,aACA,gBACA,qBACA,2BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,gBAAa,YAAS,UAAO,eAAY,GAAgB,EAC3D,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,IAAY,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3F,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,IAAW,GAAO,EAClB,IAAiB,GAAG,EAAS,UAC7B,IAAmB,GAAG,EAAS,YAE/B,IAAsB,QAAc;EACxC,IAAI,IAAS,KAAe,EAAE;AAE9B,MAAI,EAAiB,QAAQ;GAC3B,IAAM,IAAI,EAAiB,OAAO,aAAa;AAC/C,OAAS,EAAO,QACb,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,IAChC,EAAE,SAAS,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AM,CAAA,EAAA,iBACR;UAET,KACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,GAAyB;MACxC,WAAU;gBAHZ,CAKE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA,EAAA,kBACX;;KAGT;OAEP,CAAA;GAGL,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACE"}
|
|
1
|
+
{"version":3,"file":"ConnectionsList.js","names":[],"sources":["../../../src/integrations/pages/ConnectionsList.tsx"],"sourcesContent":["import { useState, useMemo, useId } from 'react';\nimport {\n Search,\n Filter,\n X,\n Grid3x3,\n List,\n Plus,\n Link2,\n AlertCircle,\n RefreshCw,\n ArrowLeft,\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 { useConnections } from '../hooks/useConnections';\nimport { joinPath } from '../utils/navigation';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { CONNECTION_STATUS_OPTIONS, PROVIDER_CATEGORIES } from '../utils/constants';\nimport type { IntegrationConnection, ConnectionStatus, ProviderCategory } from '../types';\n\n/**\n * Connections List — list of all connections with search and status filter.\n */\nexport function ConnectionsList() {\n const { basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const {\n viewMode,\n setViewMode,\n connectionFilter,\n updateConnectionFilter,\n addConnectionDialogOpen,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { connections, loading, error, refetch } = useConnections();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreate = !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const [showFilters, setShowFilters] = useState(false);\n const idPrefix = useId();\n const statusFilterId = `${idPrefix}-status`;\n const categoryFilterId = `${idPrefix}-category`;\n\n const filteredConnections = useMemo(() => {\n let result = connections ?? [];\n\n if (connectionFilter.search) {\n const q = connectionFilter.search.toLowerCase();\n result = result.filter(\n (c: IntegrationConnection) =>\n c.name.toLowerCase().includes(q) ||\n c.provider.name.toLowerCase().includes(q) ||\n (c.externalAccountEmail?.toLowerCase().includes(q) ?? false)\n );\n }\n\n if (connectionFilter.status !== 'all') {\n result = result.filter((c: IntegrationConnection) => c.status === connectionFilter.status);\n }\n\n if (connectionFilter.providerId) {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.id === connectionFilter.providerId\n );\n }\n\n if (connectionFilter.category !== 'all') {\n result = result.filter(\n (c: IntegrationConnection) => c.provider.category === connectionFilter.category\n );\n }\n\n return result.sort(\n (a: IntegrationConnection, b: IntegrationConnection) =>\n new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()\n );\n }, [connections, connectionFilter]);\n\n const hasActiveFilters =\n connectionFilter.search ||\n connectionFilter.status !== 'all' ||\n connectionFilter.providerId ||\n connectionFilter.category !== 'all';\n\n const handleClearFilters = () => {\n updateConnectionFilter({ search: '', status: 'all', providerId: null, category: 'all' });\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\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-connections-header\"\n >\n <div className=\"relative z-10 flex items-center justify-between\">\n <div className=\"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=\"Back to overview\"\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm\">\n <Link2 size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">Connections</h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n Manage your integration connections\n </p>\n </div>\n </div>\n {canCreate && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\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 Add Connection\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-connections-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=\"Search connections...\"\n value={connectionFilter.search}\n onChange={(e) => updateConnectionFilter({ 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=\"Search connections\"\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 Filter\n </button>\n\n <div\n className=\"flex items-center border border-border-subtle rounded-lg overflow-hidden\"\n data-tour=\"integrations-connections-view-toggle\"\n >\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=\"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=\"List view\"\n >\n <List size={16} />\n </button>\n </div>\n </div>\n\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 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} /> 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={statusFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n Status\n </label>\n <select\n id={statusFilterId}\n value={connectionFilter.status}\n onChange={(e) =>\n updateConnectionFilter({ status: e.target.value as ConnectionStatus | '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\">All Statuses</option>\n {CONNECTION_STATUS_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={categoryFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n Category\n </label>\n <select\n id={categoryFilterId}\n value={connectionFilter.category}\n onChange={(e) =>\n updateConnectionFilter({ 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\">All Categories</option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {cat.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 flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">Error loading connections</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\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-11 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-1/2 bg-bg-sunken rounded\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Connections */}\n {!loading && !error && (\n <>\n {filteredConnections.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 {filteredConnections.map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode={viewMode}\n onClick={handleConnectionClick}\n />\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 <Link2 size={32} className=\"text-text-secondary\" />\n )}\n </div>\n <h3 className=\"font-semibold text-text-primary mb-1\">\n {hasActiveFilters ? 'No matching connections' : 'No connections yet'}\n </h3>\n <p className=\"text-sm text-text-secondary max-w-sm\">\n {hasActiveFilters\n ? 'Try adjusting your search or filters.'\n : canCreate\n ? 'Add a connection to start integrating with external services.'\n : 'No connections are configured yet. Contact your workspace admin to add one.'}\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} /> Clear Filters\n </button>\n ) : (\n canCreate && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\n className=\"mt-4 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={14} /> Add Connection\n </button>\n )\n )}\n </div>\n )}\n </>\n )}\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA4BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACpE,EACJ,aACA,gBACA,qBACA,2BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,gBAAa,YAAS,UAAO,eAAY,GAAgB,EAC3D,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,IAAY,CA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BAAC,OAAD;MAAK,WAAU;gBAEX,EADD,IACE,IAEA,GAFD;OAAQ,MAAM;OAAI,WAAU;OAAwB,CAED;MAEjD,CAAA;KACN,kBAAC,MAAD;MAAI,WAAU;gBACX,IAAmB,4BAA4B;MAC7C,CAAA;KACL,kBAAC,KAAD;MAAG,WAAU;gBACV,IACG,0CACA,IACE,kEACA;MACJ,CAAA;KACH,IACC,kBAAC,UAAD;MACE,MAAK;MACL,SAAS;MACT,WAAU;gBAHZ,CAKE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA,EAAA,iBACR;UAET,KACE,kBAAC,UAAD;MACE,MAAK;MACL,eAAe,GAAyB;MACxC,WAAU;gBAHZ,CAKE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA,EAAA,kBACX;;KAGT;OAEP,CAAA;GAGL,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACE"}
|
|
@@ -103,7 +103,7 @@ function j() {
|
|
|
103
103
|
function M({ label: e, value: n, icon: r, tone: i = "primary", onClick: a }) {
|
|
104
104
|
let o = l(i);
|
|
105
105
|
return /* @__PURE__ */ k("div", {
|
|
106
|
-
className: t("relative overflow-hidden rounded-xl border border-border/50 bg-
|
|
106
|
+
className: t("relative overflow-hidden rounded-xl border border-border-subtle/50 bg-bg-surface p-5", "hover:shadow-md hover:border-primary/30 transition-all duration-200", a && "cursor-pointer"),
|
|
107
107
|
onClick: a,
|
|
108
108
|
role: a ? "button" : void 0,
|
|
109
109
|
tabIndex: a ? 0 : void 0,
|
|
@@ -113,10 +113,10 @@ function M({ label: e, value: n, icon: r, tone: i = "primary", onClick: a }) {
|
|
|
113
113
|
children: [/* @__PURE__ */ k("div", {
|
|
114
114
|
className: "flex items-center justify-between",
|
|
115
115
|
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
116
|
-
className: "text-sm font-medium text-
|
|
116
|
+
className: "text-sm font-medium text-text-secondary",
|
|
117
117
|
children: e
|
|
118
118
|
}), /* @__PURE__ */ O("p", {
|
|
119
|
-
className: "text-3xl font-bold text-
|
|
119
|
+
className: "text-3xl font-bold text-text-primary mt-1",
|
|
120
120
|
children: n
|
|
121
121
|
})] }), /* @__PURE__ */ O("div", {
|
|
122
122
|
className: t("p-3 rounded-xl", o.surface),
|
|
@@ -142,23 +142,23 @@ function N() {
|
|
|
142
142
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
143
143
|
children: [
|
|
144
144
|
/* @__PURE__ */ k("div", {
|
|
145
|
-
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",
|
|
145
|
+
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",
|
|
146
146
|
"data-tour": "integrations-overview-header",
|
|
147
147
|
children: [/* @__PURE__ */ k("div", {
|
|
148
148
|
className: "relative z-10 flex items-center justify-between",
|
|
149
149
|
children: [/* @__PURE__ */ k("div", {
|
|
150
150
|
className: "flex items-center gap-3",
|
|
151
151
|
children: [/* @__PURE__ */ O("div", {
|
|
152
|
-
className: "p-2.5 rounded-lg bg-primary/10 backdrop-blur-sm",
|
|
152
|
+
className: "p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm",
|
|
153
153
|
children: /* @__PURE__ */ O(g, {
|
|
154
154
|
size: 24,
|
|
155
155
|
className: "text-primary"
|
|
156
156
|
})
|
|
157
157
|
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h1", {
|
|
158
|
-
className: "text-2xl sm:text-3xl font-bold text-
|
|
158
|
+
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
159
159
|
children: w("integrations.overview.title", "Integrations")
|
|
160
160
|
}), /* @__PURE__ */ O("p", {
|
|
161
|
-
className: "text-sm text-
|
|
161
|
+
className: "text-sm text-text-secondary mt-0.5",
|
|
162
162
|
children: w("integrations.overview.subtitle", "Connect your workspace to external services and tools")
|
|
163
163
|
})] })]
|
|
164
164
|
}), /* @__PURE__ */ O("div", {
|
|
@@ -172,7 +172,7 @@ function N() {
|
|
|
172
172
|
"aria-label": w("integrations.overview.actions.refreshAriaLabel", "Refresh"),
|
|
173
173
|
children: /* @__PURE__ */ O(x, {
|
|
174
174
|
size: 18,
|
|
175
|
-
className: "text-
|
|
175
|
+
className: "text-text-secondary"
|
|
176
176
|
})
|
|
177
177
|
})
|
|
178
178
|
})]
|
|
@@ -216,13 +216,13 @@ function N() {
|
|
|
216
216
|
,
|
|
217
217
|
,
|
|
218
218
|
]].map((e, t) => /* @__PURE__ */ O("div", {
|
|
219
|
-
className: "rounded-xl border border-border/50 bg-
|
|
219
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 animate-pulse",
|
|
220
220
|
children: /* @__PURE__ */ k("div", {
|
|
221
221
|
className: "flex items-center justify-between",
|
|
222
222
|
children: [/* @__PURE__ */ k("div", {
|
|
223
223
|
className: "space-y-2",
|
|
224
|
-
children: [/* @__PURE__ */ O("div", { className: "h-3 w-20 bg-
|
|
225
|
-
}), /* @__PURE__ */ O("div", { className: "size-12 bg-
|
|
224
|
+
children: [/* @__PURE__ */ O("div", { className: "h-3 w-20 bg-bg-sunken rounded" }), /* @__PURE__ */ O("div", { className: "h-8 w-12 bg-bg-sunken rounded" })]
|
|
225
|
+
}), /* @__PURE__ */ O("div", { className: "size-12 bg-bg-sunken rounded-xl" })]
|
|
226
226
|
})
|
|
227
227
|
}, t))
|
|
228
228
|
}),
|
|
@@ -278,10 +278,10 @@ function N() {
|
|
|
278
278
|
children: [/* @__PURE__ */ k("button", {
|
|
279
279
|
type: "button",
|
|
280
280
|
onClick: () => W("providers"),
|
|
281
|
-
className: t("flex items-center gap-4 p-5 rounded-xl border border-border/50 bg-
|
|
281
|
+
className: t("flex items-center gap-4 p-5 rounded-xl border border-border-subtle/50 bg-bg-surface", "hover:bg-accent/30 hover:border-primary/30 hover:shadow-md", "text-left transition-all duration-200 group"),
|
|
282
282
|
children: [
|
|
283
283
|
/* @__PURE__ */ O("div", {
|
|
284
|
-
className: "p-3 rounded-xl bg-primary/10",
|
|
284
|
+
className: "p-3 rounded-xl bg-action-primary-bg/10",
|
|
285
285
|
children: /* @__PURE__ */ O(S, {
|
|
286
286
|
size: 24,
|
|
287
287
|
className: "text-primary"
|
|
@@ -290,22 +290,22 @@ function N() {
|
|
|
290
290
|
/* @__PURE__ */ k("div", {
|
|
291
291
|
className: "flex-1",
|
|
292
292
|
children: [/* @__PURE__ */ O("h3", {
|
|
293
|
-
className: "font-semibold text-
|
|
293
|
+
className: "font-semibold text-text-primary",
|
|
294
294
|
children: w("integrations.overview.quickActions.browseProviders.title", "Browse Providers")
|
|
295
295
|
}), /* @__PURE__ */ O("p", {
|
|
296
|
-
className: "text-sm text-
|
|
296
|
+
className: "text-sm text-text-secondary mt-0.5",
|
|
297
297
|
children: w("integrations.overview.quickActions.browseProviders.description", "Discover and install integration plugins")
|
|
298
298
|
})]
|
|
299
299
|
}),
|
|
300
300
|
/* @__PURE__ */ O(p, {
|
|
301
301
|
size: 18,
|
|
302
|
-
className: "text-
|
|
302
|
+
className: "text-text-secondary group-hover:text-primary transition-colors"
|
|
303
303
|
})
|
|
304
304
|
]
|
|
305
305
|
}), I && /* @__PURE__ */ k("button", {
|
|
306
306
|
type: "button",
|
|
307
307
|
onClick: () => A(),
|
|
308
|
-
className: t("flex items-center gap-4 p-5 rounded-xl border border-border/50 bg-
|
|
308
|
+
className: t("flex items-center gap-4 p-5 rounded-xl border border-border-subtle/50 bg-bg-surface", "hover:bg-accent/30 hover:border-primary/30 hover:shadow-md", "text-left transition-all duration-200 group"),
|
|
309
309
|
children: [
|
|
310
310
|
/* @__PURE__ */ O("div", {
|
|
311
311
|
className: "p-3 rounded-xl bg-status-success-bg-subtle",
|
|
@@ -317,33 +317,33 @@ function N() {
|
|
|
317
317
|
/* @__PURE__ */ k("div", {
|
|
318
318
|
className: "flex-1",
|
|
319
319
|
children: [/* @__PURE__ */ O("h3", {
|
|
320
|
-
className: "font-semibold text-
|
|
320
|
+
className: "font-semibold text-text-primary",
|
|
321
321
|
children: w("integrations.overview.quickActions.addConnection.title", "Add Connection")
|
|
322
322
|
}), /* @__PURE__ */ O("p", {
|
|
323
|
-
className: "text-sm text-
|
|
323
|
+
className: "text-sm text-text-secondary mt-0.5",
|
|
324
324
|
children: w("integrations.overview.quickActions.addConnection.description", "Connect to an external service")
|
|
325
325
|
})]
|
|
326
326
|
}),
|
|
327
327
|
/* @__PURE__ */ O(p, {
|
|
328
328
|
size: 18,
|
|
329
|
-
className: "text-
|
|
329
|
+
className: "text-text-secondary group-hover:text-primary transition-colors"
|
|
330
330
|
})
|
|
331
331
|
]
|
|
332
332
|
})]
|
|
333
333
|
}),
|
|
334
334
|
/* @__PURE__ */ k("div", {
|
|
335
|
-
className: "rounded-xl border border-border/50 bg-
|
|
335
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface overflow-hidden",
|
|
336
336
|
"data-tour": "integrations-recent-connections",
|
|
337
337
|
children: [
|
|
338
338
|
/* @__PURE__ */ k("div", {
|
|
339
|
-
className: "flex items-center justify-between p-5 border-b border-border/50",
|
|
339
|
+
className: "flex items-center justify-between p-5 border-b border-border-subtle/50",
|
|
340
340
|
children: [/* @__PURE__ */ k("div", {
|
|
341
341
|
className: "flex items-center gap-2",
|
|
342
342
|
children: [/* @__PURE__ */ O(_, {
|
|
343
343
|
size: 18,
|
|
344
344
|
className: "text-primary"
|
|
345
345
|
}), /* @__PURE__ */ O("h2", {
|
|
346
|
-
className: "font-semibold text-
|
|
346
|
+
className: "font-semibold text-text-primary",
|
|
347
347
|
children: w("integrations.overview.recentConnections.title", "Recent Connections")
|
|
348
348
|
})]
|
|
349
349
|
}), /* @__PURE__ */ O("button", {
|
|
@@ -357,31 +357,31 @@ function N() {
|
|
|
357
357
|
className: "flex items-center justify-center py-12",
|
|
358
358
|
children: /* @__PURE__ */ O(v, {
|
|
359
359
|
size: 24,
|
|
360
|
-
className: "animate-spin text-
|
|
360
|
+
className: "animate-spin text-text-secondary"
|
|
361
361
|
})
|
|
362
362
|
}),
|
|
363
363
|
!z && U.length === 0 && /* @__PURE__ */ k("div", {
|
|
364
364
|
className: "flex flex-col items-center justify-center py-12 px-6 text-center",
|
|
365
365
|
children: [
|
|
366
366
|
/* @__PURE__ */ O("div", {
|
|
367
|
-
className: "p-4 rounded-full bg-
|
|
367
|
+
className: "p-4 rounded-full bg-bg-sunken/50 mb-4",
|
|
368
368
|
children: /* @__PURE__ */ O(y, {
|
|
369
369
|
size: 32,
|
|
370
|
-
className: "text-
|
|
370
|
+
className: "text-text-secondary"
|
|
371
371
|
})
|
|
372
372
|
}),
|
|
373
373
|
/* @__PURE__ */ O("h3", {
|
|
374
|
-
className: "font-semibold text-
|
|
374
|
+
className: "font-semibold text-text-primary mb-1",
|
|
375
375
|
children: w("integrations.overview.empty.title", "No connections yet")
|
|
376
376
|
}),
|
|
377
377
|
/* @__PURE__ */ O("p", {
|
|
378
|
-
className: "text-sm text-
|
|
378
|
+
className: "text-sm text-text-secondary mb-4 max-w-sm",
|
|
379
379
|
children: I ? w("integrations.overview.empty.canCreateDescription", "Create your first connection to start integrating with external services.") : w("integrations.overview.empty.readOnlyDescription", "No connections have been configured yet.")
|
|
380
380
|
}),
|
|
381
381
|
I && /* @__PURE__ */ k("button", {
|
|
382
382
|
type: "button",
|
|
383
383
|
onClick: () => A(),
|
|
384
|
-
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
384
|
+
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",
|
|
385
385
|
children: [/* @__PURE__ */ O(b, { size: 16 }), w("integrations.overview.actions.addConnection", "Add Connection")]
|
|
386
386
|
})
|
|
387
387
|
]
|
|
@@ -398,7 +398,7 @@ function N() {
|
|
|
398
398
|
},
|
|
399
399
|
children: [
|
|
400
400
|
/* @__PURE__ */ O("div", {
|
|
401
|
-
className: "size-8 rounded-lg flex items-center justify-center flex-shrink-0 bg-primary/10",
|
|
401
|
+
className: "size-8 rounded-lg flex items-center justify-center flex-shrink-0 bg-action-primary-bg/10",
|
|
402
402
|
children: /* @__PURE__ */ O(y, {
|
|
403
403
|
size: 16,
|
|
404
404
|
className: "text-primary"
|
|
@@ -407,17 +407,17 @@ function N() {
|
|
|
407
407
|
/* @__PURE__ */ k("div", {
|
|
408
408
|
className: "flex-1 min-w-0",
|
|
409
409
|
children: [/* @__PURE__ */ O("p", {
|
|
410
|
-
className: "text-sm font-medium text-
|
|
410
|
+
className: "text-sm font-medium text-text-primary truncate",
|
|
411
411
|
children: e.name
|
|
412
412
|
}), /* @__PURE__ */ O("p", {
|
|
413
|
-
className: "text-xs text-
|
|
413
|
+
className: "text-xs text-text-secondary truncate",
|
|
414
414
|
children: e.provider.name
|
|
415
415
|
})]
|
|
416
416
|
}),
|
|
417
417
|
/* @__PURE__ */ k("div", {
|
|
418
418
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
419
419
|
children: [/* @__PURE__ */ O("span", { className: t("size-2 rounded-full", o(e.status)) }), /* @__PURE__ */ O("span", {
|
|
420
|
-
className: "text-xs text-
|
|
420
|
+
className: "text-xs text-text-secondary",
|
|
421
421
|
children: a(e.lastUsedAt)
|
|
422
422
|
})]
|
|
423
423
|
})
|