@burdenoff/microfe-integrations 2026.1013.1 → 2026.1023.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrations/components/AuthMethodsEditor.js +2 -2
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +2 -2
- 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 +91 -89
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +3 -3
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +2 -2
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.d.ts.map +1 -1
- package/dist/integrations/providers/IntegrationsProvider.js +19 -18
- package/dist/integrations/providers/IntegrationsProvider.js.map +1 -1
- package/dist/integrations/types/index.d.ts +8 -0
- package/dist/integrations/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -5,17 +5,17 @@ import { AddConnectionDialog as r } from "../components/AddConnectionDialog.js";
|
|
|
5
5
|
import { joinPath as i } from "../utils/navigation.js";
|
|
6
6
|
import { cn as a } from "../utils/cn.js";
|
|
7
7
|
import { useIntegrationsStore as o } from "../store/integrationsStore.js";
|
|
8
|
-
import { CONNECTION_STATUS_OPTIONS as s, PROVIDER_CATEGORIES as
|
|
9
|
-
import { useConnections as
|
|
10
|
-
import { ConnectionCard as
|
|
11
|
-
import { useId as
|
|
12
|
-
import { AlertCircle as
|
|
13
|
-
import { usePermissions as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { Button as
|
|
8
|
+
import { CONNECTION_STATUS_OPTIONS as s, PROVIDER_CATEGORIES as ee } from "../utils/constants.js";
|
|
9
|
+
import { useConnections as te } from "../hooks/useConnections.js";
|
|
10
|
+
import { ConnectionCard as ne } from "../components/ConnectionCard.js";
|
|
11
|
+
import { useId as c, useMemo as l, useState as u } from "react";
|
|
12
|
+
import { AlertCircle as d, ArrowLeft as f, 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 re, IllustratedEmptyState as ie, PagePurpose as ae } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
//#region src/integrations/pages/ConnectionsList.tsx
|
|
17
|
-
function
|
|
18
|
-
let { basePath:
|
|
17
|
+
function T() {
|
|
18
|
+
let { basePath: T = "/", navigate: E, onConnectionSelect: D, connectionsDocsUrl: O } = e(), k = t(), { viewMode: A, setViewMode: j, connectionFilter: M, updateConnectionFilter: N, addConnectionDialogOpen: P, openAddConnectionDialog: F, closeAddConnectionDialog: I } = o(), { connections: L, loading: R, answered: z, error: B, refetch: V } = te(), H = !R && !B && !z, { hasPermission: U, isLoading: W } = x(), G = !W && U(n.CONNECTION_CREATE), [K, q] = u(!1), J = c(), Y = `${J}-status`, X = `${J}-category`, Z = l(() => {
|
|
19
19
|
let e = L ?? [];
|
|
20
20
|
if (M.search) {
|
|
21
21
|
let t = M.search.toLowerCase();
|
|
@@ -29,69 +29,71 @@ function E() {
|
|
|
29
29
|
providerId: null,
|
|
30
30
|
category: "all"
|
|
31
31
|
});
|
|
32
|
-
},
|
|
33
|
-
|
|
32
|
+
}, oe = (e) => {
|
|
33
|
+
D?.(e), E?.(i(T, `connections/${e.id}`));
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
35
|
+
return /* @__PURE__ */ C("div", {
|
|
36
36
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ S("div", {
|
|
39
39
|
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
40
40
|
"data-tour": "integrations-connections-header",
|
|
41
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ C("div", {
|
|
42
42
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ C("div", {
|
|
44
44
|
className: "flex min-w-0 items-center gap-4",
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ S(w, {
|
|
47
47
|
variant: "ghost",
|
|
48
48
|
size: "icon",
|
|
49
49
|
className: "shrink-0",
|
|
50
|
-
onClick: () =>
|
|
50
|
+
onClick: () => E?.(T),
|
|
51
51
|
"aria-label": k("integrations.connections.actions.backAriaLabel", "Back to overview"),
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ S(f, { size: 20 })
|
|
53
53
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ S("div", {
|
|
55
55
|
className: "shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
56
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ S(h, {
|
|
57
57
|
size: 24,
|
|
58
58
|
className: "text-primary"
|
|
59
59
|
})
|
|
60
60
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ C("div", {
|
|
62
62
|
className: "min-w-0",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ S("h1", {
|
|
64
64
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
65
65
|
children: k("integrations.connections.title", "Connections")
|
|
66
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ S("p", {
|
|
67
67
|
className: "text-sm text-text-secondary mt-0.5",
|
|
68
68
|
children: k("integrations.connections.subtitle", "Manage your integration connections")
|
|
69
69
|
})]
|
|
70
70
|
})
|
|
71
71
|
]
|
|
72
|
-
}), G && /* @__PURE__ */ w
|
|
72
|
+
}), G && /* @__PURE__ */ C(w, {
|
|
73
73
|
className: "shrink-0",
|
|
74
74
|
onClick: () => F(),
|
|
75
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ S(_, { size: 16 }), k("integrations.connections.actions.addConnection", "Add Connection")]
|
|
76
76
|
})]
|
|
77
77
|
})
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
icon: /* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ S(ae, {
|
|
80
|
+
icon: /* @__PURE__ */ S(h, { size: 16 }),
|
|
81
|
+
learnMoreHref: O,
|
|
82
|
+
learnMoreLabel: k("integrations.connections.learnMore", "Learn more"),
|
|
81
83
|
children: k("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.")
|
|
82
84
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ C("div", {
|
|
84
86
|
className: "space-y-4",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ C("div", {
|
|
86
88
|
className: "flex flex-col sm:flex-row gap-3",
|
|
87
89
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ C("div", {
|
|
89
91
|
className: "flex-1 relative group",
|
|
90
92
|
"data-tour": "integrations-connections-search",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ S(y, {
|
|
92
94
|
size: 18,
|
|
93
95
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
|
|
94
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ S("input", {
|
|
95
97
|
type: "text",
|
|
96
98
|
placeholder: k("integrations.connections.search.placeholder", "Search connections..."),
|
|
97
99
|
value: M.search,
|
|
@@ -100,86 +102,86 @@ function E() {
|
|
|
100
102
|
"aria-label": k("integrations.connections.search.ariaLabel", "Search connections")
|
|
101
103
|
})]
|
|
102
104
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ C("button", {
|
|
104
106
|
type: "button",
|
|
105
107
|
onClick: () => q(!K),
|
|
106
108
|
className: a("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__ */
|
|
109
|
+
children: [/* @__PURE__ */ S(p, { size: 16 }), K ? k("integrations.connections.filters.hide", "Hide") : k("integrations.connections.filters.show", "Filter")]
|
|
108
110
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ C("div", {
|
|
110
112
|
className: "flex items-center border border-border-subtle rounded-lg overflow-hidden",
|
|
111
113
|
"data-tour": "integrations-connections-view-toggle",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ S("button", {
|
|
113
115
|
type: "button",
|
|
114
116
|
onClick: () => j("grid"),
|
|
115
117
|
className: a("p-2.5 transition-colors", A === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
116
118
|
"aria-label": k("integrations.connections.view.gridAriaLabel", "Grid view"),
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
}), /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ S(m, { size: 16 })
|
|
120
|
+
}), /* @__PURE__ */ S("button", {
|
|
119
121
|
type: "button",
|
|
120
122
|
onClick: () => j("list"),
|
|
121
123
|
className: a("p-2.5 transition-colors", A === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
122
124
|
"aria-label": k("integrations.connections.view.listAriaLabel", "List view"),
|
|
123
|
-
children: /* @__PURE__ */
|
|
125
|
+
children: /* @__PURE__ */ S(g, { size: 16 })
|
|
124
126
|
})]
|
|
125
127
|
})
|
|
126
128
|
]
|
|
127
|
-
}), K && /* @__PURE__ */
|
|
129
|
+
}), K && /* @__PURE__ */ C("div", {
|
|
128
130
|
className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-in slide-in-from-top-2 duration-200",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ C("div", {
|
|
130
132
|
className: "flex items-center justify-between mb-4",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ C("h3", {
|
|
132
134
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ S(p, {
|
|
134
136
|
size: 16,
|
|
135
137
|
className: "text-primary"
|
|
136
138
|
}), k("integrations.connections.filters.panelTitle", "Filters")]
|
|
137
|
-
}), Q && /* @__PURE__ */
|
|
139
|
+
}), Q && /* @__PURE__ */ C("button", {
|
|
138
140
|
type: "button",
|
|
139
141
|
onClick: $,
|
|
140
142
|
className: "text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1",
|
|
141
143
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ S(b, { size: 14 }),
|
|
143
145
|
" ",
|
|
144
146
|
k("integrations.connections.filters.clearAll", "Clear All")
|
|
145
147
|
]
|
|
146
148
|
})]
|
|
147
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ C("div", {
|
|
148
150
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ C("div", {
|
|
150
152
|
className: "space-y-2",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ S("label", {
|
|
152
154
|
htmlFor: Y,
|
|
153
155
|
className: "block text-sm font-medium text-text-primary",
|
|
154
156
|
children: k("integrations.connections.filters.statusLabel", "Status")
|
|
155
|
-
}), /* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ C("select", {
|
|
156
158
|
id: Y,
|
|
157
159
|
value: M.status,
|
|
158
160
|
onChange: (e) => N({ status: e.target.value }),
|
|
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",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
162
|
+
children: [/* @__PURE__ */ S("option", {
|
|
161
163
|
value: "all",
|
|
162
164
|
children: k("integrations.connections.filters.statusAll", "All Statuses")
|
|
163
|
-
}), s.map((e) => /* @__PURE__ */
|
|
165
|
+
}), s.map((e) => /* @__PURE__ */ S("option", {
|
|
164
166
|
value: e.value,
|
|
165
167
|
children: k(`integrations.status.${e.value}`, e.label)
|
|
166
168
|
}, e.value))]
|
|
167
169
|
})]
|
|
168
|
-
}), /* @__PURE__ */
|
|
170
|
+
}), /* @__PURE__ */ C("div", {
|
|
169
171
|
className: "space-y-2",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ S("label", {
|
|
171
173
|
htmlFor: X,
|
|
172
174
|
className: "block text-sm font-medium text-text-primary",
|
|
173
175
|
children: k("integrations.connections.filters.categoryLabel", "Category")
|
|
174
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ C("select", {
|
|
175
177
|
id: X,
|
|
176
178
|
value: M.category,
|
|
177
179
|
onChange: (e) => N({ category: e.target.value }),
|
|
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",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
180
|
+
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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
181
|
+
children: [/* @__PURE__ */ S("option", {
|
|
180
182
|
value: "all",
|
|
181
183
|
children: k("integrations.connections.filters.categoryAll", "All Categories")
|
|
182
|
-
}),
|
|
184
|
+
}), ee.map((e) => /* @__PURE__ */ S("option", {
|
|
183
185
|
value: e.value,
|
|
184
186
|
children: k(`integrations.category.${e.value}`, e.label)
|
|
185
187
|
}, e.value))]
|
|
@@ -188,28 +190,28 @@ function E() {
|
|
|
188
190
|
})]
|
|
189
191
|
})]
|
|
190
192
|
}),
|
|
191
|
-
B && /* @__PURE__ */
|
|
193
|
+
B && /* @__PURE__ */ C("div", {
|
|
192
194
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ S(d, {
|
|
194
196
|
size: 24,
|
|
195
197
|
className: "text-status-error-text flex-shrink-0"
|
|
196
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ C("div", {
|
|
197
199
|
className: "flex-1",
|
|
198
200
|
children: [
|
|
199
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ S("h3", {
|
|
200
202
|
className: "font-semibold text-status-error-text mb-1",
|
|
201
203
|
children: k("integrations.connections.error.title", "Error loading connections")
|
|
202
204
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ S("p", {
|
|
204
206
|
className: "text-sm text-status-error-text mb-3",
|
|
205
207
|
children: B.message
|
|
206
208
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ C("button", {
|
|
208
210
|
type: "button",
|
|
209
211
|
onClick: () => V(),
|
|
210
212
|
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",
|
|
211
213
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ S(v, { size: 14 }),
|
|
213
215
|
" ",
|
|
214
216
|
k("integrations.common.retry", "Try Again")
|
|
215
217
|
]
|
|
@@ -217,7 +219,7 @@ function E() {
|
|
|
217
219
|
]
|
|
218
220
|
})]
|
|
219
221
|
}),
|
|
220
|
-
(R || H) && /* @__PURE__ */
|
|
222
|
+
(R || H) && /* @__PURE__ */ S("div", {
|
|
221
223
|
className: a(A === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
222
224
|
children: [...[
|
|
223
225
|
,
|
|
@@ -226,29 +228,29 @@ function E() {
|
|
|
226
228
|
,
|
|
227
229
|
,
|
|
228
230
|
,
|
|
229
|
-
]].map((e, t) => /* @__PURE__ */
|
|
231
|
+
]].map((e, t) => /* @__PURE__ */ S("div", {
|
|
230
232
|
className: "rounded-xl border border-border-seam bg-bg-surface p-5",
|
|
231
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ C("div", {
|
|
232
234
|
className: "flex items-start gap-3",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ S("div", { className: "size-11 bg-bg-sunken rounded-xl animate-vc-shimmer" }), /* @__PURE__ */ C("div", {
|
|
234
236
|
className: "flex-1 space-y-2",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
237
|
+
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" })]
|
|
236
238
|
})]
|
|
237
239
|
})
|
|
238
240
|
}, t))
|
|
239
241
|
}),
|
|
240
|
-
!R && !B && !H && /* @__PURE__ */
|
|
242
|
+
!R && !B && !H && /* @__PURE__ */ C(re, {
|
|
241
243
|
className: "overflow-hidden p-0",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ C("div", {
|
|
243
245
|
className: "flex items-center justify-between gap-2 p-5 border-b border-border-seam",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ C("div", {
|
|
245
247
|
className: "flex items-center gap-2",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ S(h, {
|
|
247
249
|
size: 18,
|
|
248
250
|
className: "text-primary"
|
|
249
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ C("h2", {
|
|
250
252
|
className: "font-semibold text-text-primary",
|
|
251
|
-
children: [k("integrations.connections.results.title", "Your Connections"), Z.length > 0 && /* @__PURE__ */
|
|
253
|
+
children: [k("integrations.connections.results.title", "Your Connections"), Z.length > 0 && /* @__PURE__ */ C("span", {
|
|
252
254
|
className: "ml-2 text-sm font-normal text-text-secondary tabular-nums",
|
|
253
255
|
children: [
|
|
254
256
|
"(",
|
|
@@ -257,46 +259,46 @@ function E() {
|
|
|
257
259
|
]
|
|
258
260
|
})]
|
|
259
261
|
})]
|
|
260
|
-
}), G && Z.length > 0 && /* @__PURE__ */ w
|
|
262
|
+
}), G && Z.length > 0 && /* @__PURE__ */ C(w, {
|
|
261
263
|
size: "sm",
|
|
262
264
|
variant: "outline",
|
|
263
265
|
onClick: () => F(),
|
|
264
266
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ S(_, { size: 14 }),
|
|
266
268
|
" ",
|
|
267
269
|
k("integrations.connections.actions.add", "Add")
|
|
268
270
|
]
|
|
269
271
|
})]
|
|
270
|
-
}), Z.length > 0 ? /* @__PURE__ */
|
|
272
|
+
}), Z.length > 0 ? /* @__PURE__ */ S("div", {
|
|
271
273
|
className: a("p-5", A === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
272
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
274
|
+
children: Z.map((e) => /* @__PURE__ */ S(ne, {
|
|
273
275
|
connection: e,
|
|
274
276
|
displayMode: A,
|
|
275
|
-
onClick:
|
|
277
|
+
onClick: oe
|
|
276
278
|
}, e.id))
|
|
277
|
-
}) : /* @__PURE__ */
|
|
279
|
+
}) : /* @__PURE__ */ S(ie, {
|
|
278
280
|
illustration: Q ? "empty-search" : "empty-data",
|
|
279
281
|
title: Q ? k("integrations.connections.empty.filteredTitle", "No matching connections") : k("integrations.connections.empty.title", "No connections yet"),
|
|
280
282
|
description: Q ? k("integrations.connections.empty.filteredDescription", "Try adjusting your search or filters.") : G ? k("integrations.connections.empty.description", "Add a connection to start integrating with external services.") : k("integrations.connections.empty.readOnlyDescription", "No connections are configured yet. Contact your workspace admin to add one."),
|
|
281
|
-
action: Q ? /* @__PURE__ */ w
|
|
283
|
+
action: Q ? /* @__PURE__ */ C(w, {
|
|
282
284
|
variant: "outline",
|
|
283
285
|
onClick: $,
|
|
284
286
|
children: [
|
|
285
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ S(b, { size: 14 }),
|
|
286
288
|
" ",
|
|
287
289
|
k("integrations.connections.empty.clearFilters", "Clear Filters")
|
|
288
290
|
]
|
|
289
|
-
}) : G ? /* @__PURE__ */ w
|
|
291
|
+
}) : G ? /* @__PURE__ */ C(w, {
|
|
290
292
|
onClick: () => F(),
|
|
291
293
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ S(_, { size: 14 }),
|
|
293
295
|
" ",
|
|
294
296
|
k("integrations.connections.actions.addConnection", "Add Connection")
|
|
295
297
|
]
|
|
296
298
|
}) : void 0
|
|
297
299
|
})]
|
|
298
300
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ S(r, {
|
|
300
302
|
open: P,
|
|
301
303
|
onClose: I,
|
|
302
304
|
onConnectionCreated: () => {
|
|
@@ -307,6 +309,6 @@ function E() {
|
|
|
307
309
|
});
|
|
308
310
|
}
|
|
309
311
|
//#endregion
|
|
310
|
-
export {
|
|
312
|
+
export { T as ConnectionsList };
|
|
311
313
|
|
|
312
314
|
//# sourceMappingURL=ConnectionsList.js.map
|
|
@@ -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 { useTr } from '../hooks/useTr';\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';\nimport { Button, EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\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 tr = useTr();\n const {\n viewMode,\n setViewMode,\n connectionFilter,\n updateConnectionFilter,\n addConnectionDialogOpen,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { connections, loading, answered, error, refetch } = useConnections();\n\n /**\n * ★★ NEVER CLAIM \"no connections\" UNTIL THE SERVER HAS SAID SO.\n *\n * Measured in production 2026-09-13: this page rendered \"No connections yet\"\n * while the workspace held 46 connections — 8 ACTIVE (Gmail, GitHub, Google\n * Sheets, Linear, Anthropic), 1 EXPIRED, 37 PENDING_AUTH. The assistant, asked\n * the same question through the API, listed all 46. The loading state never\n * appeared and no error was shown, so the page presented a confident, wrong\n * answer and the user reasonably believed they had nothing connected.\n *\n * The cause is that `loading: false, error: undefined, data: undefined` — what\n * Apollo returns for a SKIPPED query, and equally for one resolved from an\n * empty cache entry — is indistinguishable here from \"asked and found none\".\n * `answered` closes that gap: it is false until `data.getConnections` exists.\n *\n * Gating the empty state is the point. Rendering the unanswered case as\n * loading is a presentation choice; claiming emptiness we never verified is a\n * correctness bug.\n */\n const unanswered = !loading && !error && !answered;\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=\"rounded-xl border border-border-seam bg-accent-wash p-6\"\n data-tour=\"integrations-connections-header\"\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex min-w-0 items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"shrink-0\"\n onClick={() => navigate?.(basePath)}\n aria-label={tr('integrations.connections.actions.backAriaLabel', 'Back to overview')}\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10\">\n <Link2 size={24} className=\"text-primary\" />\n </div>\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr('integrations.connections.title', 'Connections')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tr('integrations.connections.subtitle', 'Manage your integration connections')}\n </p>\n </div>\n </div>\n {canCreate && (\n <Button className=\"shrink-0\" onClick={() => openAddConnectionDialog()}>\n <Plus size={16} />\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n )}\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose icon={<Link2 size={16} />}>\n {tr(\n 'integrations.connections.purpose',\n '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.'\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\" 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={tr(\n 'integrations.connections.search.placeholder',\n 'Search connections...'\n )}\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={tr('integrations.connections.search.ariaLabel', '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 {showFilters\n ? tr('integrations.connections.filters.hide', 'Hide')\n : tr('integrations.connections.filters.show', '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'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.gridAriaLabel', 'Grid view')}\n >\n <Grid3x3 size={16} />\n </button>\n <button\n type=\"button\"\n onClick={() => setViewMode('list')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'list'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.listAriaLabel', 'List view')}\n >\n <List size={16} />\n </button>\n </div>\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.connections.filters.panelTitle', 'Filters')}\n </h3>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1\"\n >\n <X size={14} /> {tr('integrations.connections.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={statusFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.connections.filters.statusLabel', '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\">\n {tr('integrations.connections.filters.statusAll', 'All Statuses')}\n </option>\n {CONNECTION_STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {tr(`integrations.status.${opt.value}`, 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 {tr('integrations.connections.filters.categoryLabel', '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\">\n {tr('integrations.connections.filters.categoryAll', 'All Categories')}\n </option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {tr(`integrations.category.${cat.value}`, 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\">\n {tr('integrations.connections.error.title', 'Error loading connections')}\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 || unanswered) && (\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-seam bg-bg-surface p-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"size-11 bg-bg-sunken rounded-xl animate-vc-shimmer\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer\" />\n <div className=\"h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Connections — the page's primary emphasis zone */}\n {!loading && !error && !unanswered && (\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center justify-between gap-2 p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.connections.results.title', 'Your Connections')}\n {filteredConnections.length > 0 && (\n <span className=\"ml-2 text-sm font-normal text-text-secondary tabular-nums\">\n ({filteredConnections.length})\n </span>\n )}\n </h2>\n </div>\n {canCreate && filteredConnections.length > 0 && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => openAddConnectionDialog()}>\n <Plus size={14} /> {tr('integrations.connections.actions.add', 'Add')}\n </Button>\n )}\n </div>\n\n {filteredConnections.length > 0 ? (\n <div\n className={cn(\n 'p-5',\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 <IllustratedEmptyState\n illustration={hasActiveFilters ? 'empty-search' : 'empty-data'}\n title={\n hasActiveFilters\n ? tr('integrations.connections.empty.filteredTitle', 'No matching connections')\n : tr('integrations.connections.empty.title', 'No connections yet')\n }\n description={\n hasActiveFilters\n ? tr(\n 'integrations.connections.empty.filteredDescription',\n 'Try adjusting your search or filters.'\n )\n : canCreate\n ? tr(\n 'integrations.connections.empty.description',\n 'Add a connection to start integrating with external services.'\n )\n : tr(\n 'integrations.connections.empty.readOnlyDescription',\n 'No connections are configured yet. Contact your workspace admin to add one.'\n )\n }\n action={\n hasActiveFilters ? (\n <Button variant=\"outline\" onClick={handleClearFilters}>\n <X size={14} />{' '}\n {tr('integrations.connections.empty.clearFilters', 'Clear Filters')}\n </Button>\n ) : canCreate ? (\n <Button onClick={() => openAddConnectionDialog()}>\n <Plus size={14} />{' '}\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n ) : undefined\n }\n />\n )}\n </EmphasisPanel>\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":";;;;;;;;;;;;;;;;AA8BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACpE,IAAK,GAAO,EACZ,EACJ,aACA,gBACA,qBACA,2BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,gBAAa,YAAS,aAAU,UAAO,eAAY,IAAgB,EAqBrE,IAAa,CAAC,KAAW,CAAC,KAAS,CAAC,GACpC,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,KAAK,aAAa,CAAC,SAAS,EAAE,KACxC,EAAE,sBAAsB,aAAa,CAAC,SAAS,EAAE,IAAI,IACzD;;AAmBH,SAhBI,EAAiB,WAAW,UAC9B,IAAS,EAAO,QAAQ,MAA6B,EAAE,WAAW,EAAiB,OAAO,GAGxF,EAAiB,eACnB,IAAS,EAAO,QACb,MAA6B,EAAE,SAAS,OAAO,EAAiB,WAClE,GAGC,EAAiB,aAAa,UAChC,IAAS,EAAO,QACb,MAA6B,EAAE,SAAS,aAAa,EAAiB,SACxE,GAGI,EAAO,MACX,GAA0B,MACzB,IAAI,KAAK,EAAE,UAAU,CAAC,SAAS,GAAG,IAA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AwC,MAAM;OAC9D;QAEP;QAEL,EAAoB,SAAS,IAC5B,kBAAC,OAAD;KACE,WAAW,EACT,OACA,MAAa,SACT,yDACA,YACL;eAEA,EAAoB,KAAK,MACxB,kBAAC,IAAD;MAEE,YAAY;MACZ,aAAa;MACb,SAAS;MACT,EAJK,EAAK,GAIV,CACF;KACE,CAAA,GAEN,kBAAC,IAAD;KACE,cAAc,IAAmB,iBAAiB;KAClD,OACE,IACI,EAAG,gDAAgD,0BAA0B,GAC7E,EAAG,wCAAwC,qBAAqB;KAEtE,aACE,IACI,EACE,sDACA,wCACD,GACD,IACE,EACE,8CACA,gEACD,GACD,EACE,sDACA,8EACD;KAET,QACE,IACE,kBAAC,GAAD;MAAQ,SAAQ;MAAU,SAAS;gBAAnC;OACE,kBAAC,GAAD,EAAG,MAAM,IAAM,CAAA;OAAC;OACf,EAAG,+CAA+C,gBAAgB;OAC5D;UACP,IACF,kBAAC,GAAD;MAAQ,eAAe,GAAyB;gBAAhD;OACE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;OAAC;OAClB,EAAG,kDAAkD,iBAAiB;OAChE;UACP,KAAA;KAEN,CAAA,CAEU;;GAGlB,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 { useTr } from '../hooks/useTr';\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';\nimport { Button, EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\n/**\n * Connections List — list of all connections with search and status filter.\n */\nexport function ConnectionsList() {\n const { basePath = '/', navigate, onConnectionSelect, connectionsDocsUrl } = useIntegrations();\n const tr = useTr();\n const {\n viewMode,\n setViewMode,\n connectionFilter,\n updateConnectionFilter,\n addConnectionDialogOpen,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const { connections, loading, answered, error, refetch } = useConnections();\n\n /**\n * ★★ NEVER CLAIM \"no connections\" UNTIL THE SERVER HAS SAID SO.\n *\n * Measured in production 2026-09-13: this page rendered \"No connections yet\"\n * while the workspace held 46 connections — 8 ACTIVE (Gmail, GitHub, Google\n * Sheets, Linear, Anthropic), 1 EXPIRED, 37 PENDING_AUTH. The assistant, asked\n * the same question through the API, listed all 46. The loading state never\n * appeared and no error was shown, so the page presented a confident, wrong\n * answer and the user reasonably believed they had nothing connected.\n *\n * The cause is that `loading: false, error: undefined, data: undefined` — what\n * Apollo returns for a SKIPPED query, and equally for one resolved from an\n * empty cache entry — is indistinguishable here from \"asked and found none\".\n * `answered` closes that gap: it is false until `data.getConnections` exists.\n *\n * Gating the empty state is the point. Rendering the unanswered case as\n * loading is a presentation choice; claiming emptiness we never verified is a\n * correctness bug.\n */\n const unanswered = !loading && !error && !answered;\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=\"rounded-xl border border-border-seam bg-accent-wash p-6\"\n data-tour=\"integrations-connections-header\"\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex min-w-0 items-center gap-4\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"shrink-0\"\n onClick={() => navigate?.(basePath)}\n aria-label={tr('integrations.connections.actions.backAriaLabel', 'Back to overview')}\n >\n <ArrowLeft size={20} />\n </Button>\n <div className=\"shrink-0 p-2.5 rounded-lg bg-action-primary-bg/10\">\n <Link2 size={24} className=\"text-primary\" />\n </div>\n <div className=\"min-w-0\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tr('integrations.connections.title', 'Connections')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tr('integrations.connections.subtitle', 'Manage your integration connections')}\n </p>\n </div>\n </div>\n {canCreate && (\n <Button className=\"shrink-0\" onClick={() => openAddConnectionDialog()}>\n <Plus size={16} />\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n )}\n </div>\n </div>\n\n {/* Page purpose */}\n <PagePurpose\n icon={<Link2 size={16} />}\n learnMoreHref={connectionsDocsUrl}\n learnMoreLabel={tr('integrations.connections.learnMore', 'Learn more')}\n >\n {tr(\n 'integrations.connections.purpose',\n '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.'\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\" 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={tr(\n 'integrations.connections.search.placeholder',\n 'Search connections...'\n )}\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={tr('integrations.connections.search.ariaLabel', '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 {showFilters\n ? tr('integrations.connections.filters.hide', 'Hide')\n : tr('integrations.connections.filters.show', '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'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.gridAriaLabel', 'Grid view')}\n >\n <Grid3x3 size={16} />\n </button>\n <button\n type=\"button\"\n onClick={() => setViewMode('list')}\n className={cn(\n 'p-2.5 transition-colors',\n viewMode === 'list'\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'hover:bg-accent'\n )}\n aria-label={tr('integrations.connections.view.listAriaLabel', 'List view')}\n >\n <List size={16} />\n </button>\n </div>\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.connections.filters.panelTitle', 'Filters')}\n </h3>\n {hasActiveFilters && (\n <button\n type=\"button\"\n onClick={handleClearFilters}\n className=\"text-sm text-text-secondary hover:text-status-error-text transition-colors flex items-center gap-1\"\n >\n <X size={14} /> {tr('integrations.connections.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={statusFilterId}\n className=\"block text-sm font-medium text-text-primary\"\n >\n {tr('integrations.connections.filters.statusLabel', '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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"all\">\n {tr('integrations.connections.filters.statusAll', 'All Statuses')}\n </option>\n {CONNECTION_STATUS_OPTIONS.map((opt) => (\n <option key={opt.value} value={opt.value}>\n {tr(`integrations.status.${opt.value}`, 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 {tr('integrations.connections.filters.categoryLabel', '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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary\"\n >\n <option value=\"all\">\n {tr('integrations.connections.filters.categoryAll', 'All Categories')}\n </option>\n {PROVIDER_CATEGORIES.map((cat) => (\n <option key={cat.value} value={cat.value}>\n {tr(`integrations.category.${cat.value}`, 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\">\n {tr('integrations.connections.error.title', 'Error loading connections')}\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 || unanswered) && (\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-seam bg-bg-surface p-5\">\n <div className=\"flex items-start gap-3\">\n <div className=\"size-11 bg-bg-sunken rounded-xl animate-vc-shimmer\" />\n <div className=\"flex-1 space-y-2\">\n <div className=\"h-4 w-3/4 bg-bg-sunken rounded animate-vc-shimmer\" />\n <div className=\"h-3 w-1/2 bg-bg-sunken rounded animate-vc-shimmer\" />\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Connections — the page's primary emphasis zone */}\n {!loading && !error && !unanswered && (\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"flex items-center justify-between gap-2 p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tr('integrations.connections.results.title', 'Your Connections')}\n {filteredConnections.length > 0 && (\n <span className=\"ml-2 text-sm font-normal text-text-secondary tabular-nums\">\n ({filteredConnections.length})\n </span>\n )}\n </h2>\n </div>\n {canCreate && filteredConnections.length > 0 && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => openAddConnectionDialog()}>\n <Plus size={14} /> {tr('integrations.connections.actions.add', 'Add')}\n </Button>\n )}\n </div>\n\n {filteredConnections.length > 0 ? (\n <div\n className={cn(\n 'p-5',\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 <IllustratedEmptyState\n illustration={hasActiveFilters ? 'empty-search' : 'empty-data'}\n title={\n hasActiveFilters\n ? tr('integrations.connections.empty.filteredTitle', 'No matching connections')\n : tr('integrations.connections.empty.title', 'No connections yet')\n }\n description={\n hasActiveFilters\n ? tr(\n 'integrations.connections.empty.filteredDescription',\n 'Try adjusting your search or filters.'\n )\n : canCreate\n ? tr(\n 'integrations.connections.empty.description',\n 'Add a connection to start integrating with external services.'\n )\n : tr(\n 'integrations.connections.empty.readOnlyDescription',\n 'No connections are configured yet. Contact your workspace admin to add one.'\n )\n }\n action={\n hasActiveFilters ? (\n <Button variant=\"outline\" onClick={handleClearFilters}>\n <X size={14} />{' '}\n {tr('integrations.connections.empty.clearFilters', 'Clear Filters')}\n </Button>\n ) : canCreate ? (\n <Button onClick={() => openAddConnectionDialog()}>\n <Plus size={14} />{' '}\n {tr('integrations.connections.actions.addConnection', 'Add Connection')}\n </Button>\n ) : undefined\n }\n />\n )}\n </EmphasisPanel>\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":";;;;;;;;;;;;;;;;AA8BA,SAAgB,IAAkB;CAChC,IAAM,EAAE,cAAW,KAAK,aAAU,uBAAoB,0BAAuB,GAAiB,EACxF,IAAK,GAAO,EACZ,EACJ,aACA,gBACA,qBACA,2BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EAAE,gBAAa,YAAS,aAAU,UAAO,eAAY,IAAgB,EAqBrE,IAAa,CAAC,KAAW,CAAC,KAAS,CAAC,GACpC,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,EAA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AD;MAAQ,eAAe,GAAyB;gBAAhD;OACE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;OAAC;OAClB,EAAG,kDAAkD,iBAAiB;OAChE;UACP,KAAA;KAEN,CAAA,CAEU;;GAGlB,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACE"}
|
|
@@ -160,7 +160,7 @@ function w({ showCreateProviderButton: w = !1 }) {
|
|
|
160
160
|
}), /* @__PURE__ */ x("select", {
|
|
161
161
|
value: A.category,
|
|
162
162
|
onChange: (e) => j({ category: e.target.value }),
|
|
163
|
-
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",
|
|
163
|
+
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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
164
164
|
children: [/* @__PURE__ */ b("option", {
|
|
165
165
|
value: "all",
|
|
166
166
|
children: Z("all")
|
|
@@ -178,7 +178,7 @@ function w({ showCreateProviderButton: w = !1 }) {
|
|
|
178
178
|
}), /* @__PURE__ */ x("select", {
|
|
179
179
|
value: K,
|
|
180
180
|
onChange: (e) => q(e.target.value),
|
|
181
|
-
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",
|
|
181
|
+
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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
182
182
|
children: [/* @__PURE__ */ b("option", {
|
|
183
183
|
value: "all",
|
|
184
184
|
children: Q("all")
|
|
@@ -196,7 +196,7 @@ function w({ showCreateProviderButton: w = !1 }) {
|
|
|
196
196
|
}), /* @__PURE__ */ x("select", {
|
|
197
197
|
value: A.pluginStatus,
|
|
198
198
|
onChange: (e) => j({ pluginStatus: e.target.value }),
|
|
199
|
-
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",
|
|
199
|
+
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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
200
200
|
children: [/* @__PURE__ */ b("option", {
|
|
201
201
|
value: "all",
|
|
202
202
|
children: $("all")
|