@burdenoff/microfe-integrations 2026.624.3 → 2026.625.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/AddConnectionDialog.js +2 -2
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +27 -26
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +67 -66
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +268 -283
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +241 -245
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +118 -119
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +68 -70
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +67 -67
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +71 -71
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +46 -46
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +214 -215
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +152 -154
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,8 +13,9 @@ import { gql as w } from "@apollo/client";
|
|
|
13
13
|
import { useQuery as T } from "@apollo/client/react";
|
|
14
14
|
import { useI18n as E, usePermissions as D } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
15
15
|
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
16
|
+
import { Button as A, EmphasisPanel as j, GlassCard as M } from "@burdenoff/fe-libs/ui";
|
|
16
17
|
//#region src/integrations/pages/IntegrationsOverview.tsx
|
|
17
|
-
var
|
|
18
|
+
var N = w`
|
|
18
19
|
query IntegrationsOverviewQuery {
|
|
19
20
|
getProviders(pagination: { limit: 100 }) {
|
|
20
21
|
total
|
|
@@ -86,8 +87,8 @@ var A = w`
|
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
`;
|
|
89
|
-
function
|
|
90
|
-
let { data: e, loading: t, error: n, refetch: r } = T(
|
|
90
|
+
function P() {
|
|
91
|
+
let { data: e, loading: t, error: n, refetch: r } = T(N, {
|
|
91
92
|
errorPolicy: "all",
|
|
92
93
|
fetchPolicy: "cache-first",
|
|
93
94
|
nextFetchPolicy: "cache-first"
|
|
@@ -100,17 +101,18 @@ function j() {
|
|
|
100
101
|
refetch: r
|
|
101
102
|
};
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
+
function F({ label: e, value: n, icon: r, tone: i = "primary", onClick: a }) {
|
|
104
105
|
let o = l(i);
|
|
105
|
-
return /* @__PURE__ */
|
|
106
|
-
|
|
106
|
+
return /* @__PURE__ */ O(M, {
|
|
107
|
+
treatment: "metric",
|
|
108
|
+
className: t("border-border-seam p-5", a && "cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]"),
|
|
107
109
|
onClick: a,
|
|
108
110
|
role: a ? "button" : void 0,
|
|
109
111
|
tabIndex: a ? 0 : void 0,
|
|
110
112
|
onKeyDown: a ? (e) => {
|
|
111
113
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), a());
|
|
112
114
|
} : void 0,
|
|
113
|
-
children:
|
|
115
|
+
children: /* @__PURE__ */ k("div", {
|
|
114
116
|
className: "flex items-center justify-between",
|
|
115
117
|
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
116
118
|
className: "text-sm font-medium text-text-secondary",
|
|
@@ -122,34 +124,34 @@ function M({ label: e, value: n, icon: r, tone: i = "primary", onClick: a }) {
|
|
|
122
124
|
className: t("p-3 rounded-xl", o.surface),
|
|
123
125
|
children: r
|
|
124
126
|
})]
|
|
125
|
-
})
|
|
127
|
+
})
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
|
-
function
|
|
130
|
+
function I() {
|
|
129
131
|
let { basePath: s = "/", navigate: c } = e(), { t: l } = E(), w = (e, t, n) => {
|
|
130
132
|
let r = l(e, n);
|
|
131
133
|
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), t) : t : r;
|
|
132
|
-
}, { addConnectionDialogOpen: T, openAddConnectionDialog:
|
|
133
|
-
totalProviders: (
|
|
134
|
-
installedProviders: (
|
|
135
|
-
activeConnections: (
|
|
136
|
-
pendingAuth: (
|
|
137
|
-
errorConnections: (
|
|
138
|
-
}), [
|
|
134
|
+
}, { addConnectionDialogOpen: T, openAddConnectionDialog: M, closeAddConnectionDialog: N } = r(), { hasPermission: I, isLoading: L } = D(), R = !L && I(n.CONNECTION_CREATE), { providers: z, connections: B, loading: V, error: H, refetch: U } = P(), W = d(() => ({
|
|
135
|
+
totalProviders: (z ?? []).length,
|
|
136
|
+
installedProviders: (z ?? []).filter((e) => e.pluginStatus === "installed").length,
|
|
137
|
+
activeConnections: (B ?? []).filter((e) => e.status === "active").length,
|
|
138
|
+
pendingAuth: (B ?? []).filter((e) => e.status === "pending_auth").length,
|
|
139
|
+
errorConnections: (B ?? []).filter((e) => e.status === "error").length
|
|
140
|
+
}), [z, B]), G = d(() => [...B ?? []].sort((e, t) => new Date(t.updatedAt).getTime() - new Date(e.updatedAt).getTime()).slice(0, 5), [B]), K = (e) => {
|
|
139
141
|
c && c(i(s, e));
|
|
140
142
|
};
|
|
141
143
|
return /* @__PURE__ */ k("div", {
|
|
142
144
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
143
145
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
className: "
|
|
146
|
+
/* @__PURE__ */ O("div", {
|
|
147
|
+
className: "rounded-xl border border-border-seam bg-accent-wash p-6",
|
|
146
148
|
"data-tour": "integrations-overview-header",
|
|
147
|
-
children:
|
|
148
|
-
className: "
|
|
149
|
+
children: /* @__PURE__ */ k("div", {
|
|
150
|
+
className: "flex items-center justify-between gap-3",
|
|
149
151
|
children: [/* @__PURE__ */ k("div", {
|
|
150
152
|
className: "flex items-center gap-3",
|
|
151
153
|
children: [/* @__PURE__ */ O("div", {
|
|
152
|
-
className: "p-2.5 rounded-lg bg-action-primary-bg/10
|
|
154
|
+
className: "p-2.5 rounded-lg bg-action-primary-bg/10",
|
|
153
155
|
children: /* @__PURE__ */ O(g, {
|
|
154
156
|
size: 24,
|
|
155
157
|
className: "text-primary"
|
|
@@ -163,12 +165,12 @@ function N() {
|
|
|
163
165
|
})] })]
|
|
164
166
|
}), /* @__PURE__ */ O("div", {
|
|
165
167
|
className: "flex items-center gap-2",
|
|
166
|
-
children: /* @__PURE__ */ O(
|
|
167
|
-
|
|
168
|
+
children: /* @__PURE__ */ O(A, {
|
|
169
|
+
variant: "ghost",
|
|
170
|
+
size: "icon",
|
|
168
171
|
onClick: () => {
|
|
169
|
-
|
|
172
|
+
U();
|
|
170
173
|
},
|
|
171
|
-
className: "p-2 rounded-lg hover:bg-accent transition-colors",
|
|
172
174
|
"aria-label": w("integrations.overview.actions.refreshAriaLabel", "Refresh"),
|
|
173
175
|
children: /* @__PURE__ */ O(x, {
|
|
174
176
|
size: 18,
|
|
@@ -176,9 +178,9 @@ function N() {
|
|
|
176
178
|
})
|
|
177
179
|
})
|
|
178
180
|
})]
|
|
179
|
-
})
|
|
181
|
+
})
|
|
180
182
|
}),
|
|
181
|
-
|
|
183
|
+
H && /* @__PURE__ */ k("div", {
|
|
182
184
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4 animate-in fade-in-0 duration-200",
|
|
183
185
|
children: [/* @__PURE__ */ O("div", {
|
|
184
186
|
className: "p-2.5 rounded-lg bg-status-error-bg-subtle",
|
|
@@ -195,12 +197,12 @@ function N() {
|
|
|
195
197
|
}),
|
|
196
198
|
/* @__PURE__ */ O("p", {
|
|
197
199
|
className: "text-sm text-status-error-text mb-3",
|
|
198
|
-
children:
|
|
200
|
+
children: H.message
|
|
199
201
|
}),
|
|
200
202
|
/* @__PURE__ */ k("button", {
|
|
201
203
|
type: "button",
|
|
202
204
|
onClick: () => {
|
|
203
|
-
|
|
205
|
+
U();
|
|
204
206
|
},
|
|
205
207
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
|
|
206
208
|
children: [/* @__PURE__ */ O(x, { size: 14 }), w("integrations.overview.error.retry", "Try Again")]
|
|
@@ -208,7 +210,7 @@ function N() {
|
|
|
208
210
|
]
|
|
209
211
|
})]
|
|
210
212
|
}),
|
|
211
|
-
|
|
213
|
+
V && !H && /* @__PURE__ */ O("div", {
|
|
212
214
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
213
215
|
children: [...[
|
|
214
216
|
,
|
|
@@ -216,7 +218,7 @@ function N() {
|
|
|
216
218
|
,
|
|
217
219
|
,
|
|
218
220
|
]].map((e, t) => /* @__PURE__ */ O("div", {
|
|
219
|
-
className: "rounded-xl border border-border-
|
|
221
|
+
className: "rounded-xl border border-border-seam bg-bg-surface p-5 animate-pulse",
|
|
220
222
|
children: /* @__PURE__ */ k("div", {
|
|
221
223
|
className: "flex items-center justify-between",
|
|
222
224
|
children: [/* @__PURE__ */ k("div", {
|
|
@@ -226,49 +228,49 @@ function N() {
|
|
|
226
228
|
})
|
|
227
229
|
}, t))
|
|
228
230
|
}),
|
|
229
|
-
!
|
|
231
|
+
!V && !H && /* @__PURE__ */ k("div", {
|
|
230
232
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
231
233
|
"data-tour": "integrations-stats-cards",
|
|
232
234
|
children: [
|
|
233
|
-
/* @__PURE__ */ O(
|
|
235
|
+
/* @__PURE__ */ O(F, {
|
|
234
236
|
label: w("integrations.overview.stats.installedProviders", "Installed Providers"),
|
|
235
|
-
value:
|
|
237
|
+
value: W.installedProviders,
|
|
236
238
|
icon: /* @__PURE__ */ O(S, {
|
|
237
239
|
size: 24,
|
|
238
240
|
className: "text-primary"
|
|
239
241
|
}),
|
|
240
242
|
tone: "primary",
|
|
241
|
-
onClick: () =>
|
|
243
|
+
onClick: () => K("providers")
|
|
242
244
|
}),
|
|
243
|
-
/* @__PURE__ */ O(
|
|
245
|
+
/* @__PURE__ */ O(F, {
|
|
244
246
|
label: w("integrations.overview.stats.activeConnections", "Active Connections"),
|
|
245
|
-
value:
|
|
247
|
+
value: W.activeConnections,
|
|
246
248
|
icon: /* @__PURE__ */ O(m, {
|
|
247
249
|
size: 24,
|
|
248
250
|
className: "text-status-success-text"
|
|
249
251
|
}),
|
|
250
252
|
tone: "success",
|
|
251
|
-
onClick: () =>
|
|
253
|
+
onClick: () => K("connections")
|
|
252
254
|
}),
|
|
253
|
-
/* @__PURE__ */ O(
|
|
255
|
+
/* @__PURE__ */ O(F, {
|
|
254
256
|
label: w("integrations.overview.stats.pendingAuth", "Pending Auth"),
|
|
255
|
-
value:
|
|
257
|
+
value: W.pendingAuth,
|
|
256
258
|
icon: /* @__PURE__ */ O(h, {
|
|
257
259
|
size: 24,
|
|
258
260
|
className: "text-status-warning-text"
|
|
259
261
|
}),
|
|
260
262
|
tone: "warning",
|
|
261
|
-
onClick: () =>
|
|
263
|
+
onClick: () => K("connections")
|
|
262
264
|
}),
|
|
263
|
-
/* @__PURE__ */ O(
|
|
265
|
+
/* @__PURE__ */ O(F, {
|
|
264
266
|
label: w("integrations.overview.stats.errors", "Errors"),
|
|
265
|
-
value:
|
|
267
|
+
value: W.errorConnections,
|
|
266
268
|
icon: /* @__PURE__ */ O(C, {
|
|
267
269
|
size: 24,
|
|
268
270
|
className: "text-status-error-text"
|
|
269
271
|
}),
|
|
270
272
|
tone: "neutral",
|
|
271
|
-
onClick: () =>
|
|
273
|
+
onClick: () => K("connections")
|
|
272
274
|
})
|
|
273
275
|
]
|
|
274
276
|
}),
|
|
@@ -277,8 +279,8 @@ function N() {
|
|
|
277
279
|
"data-tour": "integrations-quick-actions",
|
|
278
280
|
children: [/* @__PURE__ */ k("button", {
|
|
279
281
|
type: "button",
|
|
280
|
-
onClick: () =>
|
|
281
|
-
className: t("flex items-center gap-4 p-5 rounded-xl border border-border-
|
|
282
|
+
onClick: () => K("providers"),
|
|
283
|
+
className: t("flex items-center gap-4 p-5 rounded-xl border border-border-seam bg-bg-surface", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "text-left transition-[box-shadow,border-color] duration-200 group"),
|
|
282
284
|
children: [
|
|
283
285
|
/* @__PURE__ */ O("div", {
|
|
284
286
|
className: "p-3 rounded-xl bg-action-primary-bg/10",
|
|
@@ -302,10 +304,10 @@ function N() {
|
|
|
302
304
|
className: "text-text-secondary group-hover:text-primary transition-colors"
|
|
303
305
|
})
|
|
304
306
|
]
|
|
305
|
-
}),
|
|
307
|
+
}), R && /* @__PURE__ */ k("button", {
|
|
306
308
|
type: "button",
|
|
307
|
-
onClick: () =>
|
|
308
|
-
className: t("flex items-center gap-4 p-5 rounded-xl border border-border-
|
|
309
|
+
onClick: () => M(),
|
|
310
|
+
className: t("flex items-center gap-4 p-5 rounded-xl border border-border-seam bg-bg-surface", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "text-left transition-[box-shadow,border-color] duration-200 group"),
|
|
309
311
|
children: [
|
|
310
312
|
/* @__PURE__ */ O("div", {
|
|
311
313
|
className: "p-3 rounded-xl bg-status-success-bg-subtle",
|
|
@@ -331,12 +333,12 @@ function N() {
|
|
|
331
333
|
]
|
|
332
334
|
})]
|
|
333
335
|
}),
|
|
334
|
-
/* @__PURE__ */ k(
|
|
335
|
-
className: "
|
|
336
|
+
/* @__PURE__ */ k(j, {
|
|
337
|
+
className: "overflow-hidden p-0",
|
|
336
338
|
"data-tour": "integrations-recent-connections",
|
|
337
339
|
children: [
|
|
338
340
|
/* @__PURE__ */ k("div", {
|
|
339
|
-
className: "flex items-center justify-between p-5 border-b border-border-
|
|
341
|
+
className: "flex items-center justify-between p-5 border-b border-border-seam",
|
|
340
342
|
children: [/* @__PURE__ */ k("div", {
|
|
341
343
|
className: "flex items-center gap-2",
|
|
342
344
|
children: [/* @__PURE__ */ O(_, {
|
|
@@ -348,19 +350,19 @@ function N() {
|
|
|
348
350
|
})]
|
|
349
351
|
}), /* @__PURE__ */ O("button", {
|
|
350
352
|
type: "button",
|
|
351
|
-
onClick: () =>
|
|
353
|
+
onClick: () => K("connections"),
|
|
352
354
|
className: "text-sm text-primary hover:underline",
|
|
353
355
|
children: w("integrations.overview.recentConnections.viewAll", "View all")
|
|
354
356
|
})]
|
|
355
357
|
}),
|
|
356
|
-
|
|
358
|
+
V && /* @__PURE__ */ O("div", {
|
|
357
359
|
className: "flex items-center justify-center py-12",
|
|
358
360
|
children: /* @__PURE__ */ O(v, {
|
|
359
361
|
size: 24,
|
|
360
362
|
className: "animate-spin text-text-secondary"
|
|
361
363
|
})
|
|
362
364
|
}),
|
|
363
|
-
!
|
|
365
|
+
!V && G.length === 0 && /* @__PURE__ */ k("div", {
|
|
364
366
|
className: "flex flex-col items-center justify-center py-12 px-6 text-center",
|
|
365
367
|
children: [
|
|
366
368
|
/* @__PURE__ */ O("div", {
|
|
@@ -376,25 +378,23 @@ function N() {
|
|
|
376
378
|
}),
|
|
377
379
|
/* @__PURE__ */ O("p", {
|
|
378
380
|
className: "text-sm text-text-secondary mb-4 max-w-sm",
|
|
379
|
-
children:
|
|
381
|
+
children: R ? 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
382
|
}),
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
onClick: () => A(),
|
|
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",
|
|
383
|
+
R && /* @__PURE__ */ k(A, {
|
|
384
|
+
onClick: () => M(),
|
|
385
385
|
children: [/* @__PURE__ */ O(b, { size: 16 }), w("integrations.overview.actions.addConnection", "Add Connection")]
|
|
386
386
|
})
|
|
387
387
|
]
|
|
388
388
|
}),
|
|
389
|
-
!
|
|
390
|
-
className: "divide-y divide-border
|
|
391
|
-
children:
|
|
389
|
+
!V && G.length > 0 && /* @__PURE__ */ O("div", {
|
|
390
|
+
className: "divide-y divide-border-seam",
|
|
391
|
+
children: G.map((e) => /* @__PURE__ */ k("div", {
|
|
392
392
|
className: "flex items-center gap-4 px-5 py-3.5 hover:bg-accent/30 cursor-pointer transition-colors",
|
|
393
|
-
onClick: () =>
|
|
393
|
+
onClick: () => K(`connections/${e.id}`),
|
|
394
394
|
role: "button",
|
|
395
395
|
tabIndex: 0,
|
|
396
396
|
onKeyDown: (t) => {
|
|
397
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
397
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), K(`connections/${e.id}`));
|
|
398
398
|
},
|
|
399
399
|
children: [
|
|
400
400
|
/* @__PURE__ */ O("div", {
|
|
@@ -430,13 +430,13 @@ function N() {
|
|
|
430
430
|
open: T,
|
|
431
431
|
onClose: N,
|
|
432
432
|
onConnectionCreated: () => {
|
|
433
|
-
|
|
433
|
+
U();
|
|
434
434
|
}
|
|
435
435
|
})
|
|
436
436
|
]
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
//#endregion
|
|
440
|
-
export {
|
|
440
|
+
export { I as IntegrationsOverview };
|
|
441
441
|
|
|
442
442
|
//# sourceMappingURL=IntegrationsOverview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsOverview.js","names":[],"sources":["../../../src/integrations/pages/IntegrationsOverview.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n Plug,\n Link2,\n AlertCircle,\n Clock,\n Store,\n Plus,\n ArrowRight,\n RefreshCw,\n Loader2,\n CheckCircle2,\n XCircle,\n LayoutDashboard,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { formatLastUsed, getStatusDotColor } from '../utils/integrationsHelpers';\nimport type { IntegrationConnection, IntegrationProvider } from '../types';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { getAccentClasses } from '../utils/appearance';\nimport { mapConnection, mapProvider } from '../utils/mappers';\n\nconst OVERVIEW_QUERY = gql`\n query IntegrationsOverviewQuery {\n getProviders(pagination: { limit: 100 }) {\n total\n items {\n id\n key\n name\n description\n category\n authType\n icon\n color\n website\n docsUrl\n pluginStatus\n pluginVersion\n pluginAuthor\n isBuiltIn\n isEnabled\n displayOrder\n supportedFeatures\n connectionCount\n createdAt\n updatedAt\n }\n }\n getConnections(pagination: { limit: 100 }) {\n total\n items {\n id\n name\n description\n status\n lastHealthCheck\n lastUsedAt\n errorMessage\n externalAccountId\n externalAccountEmail\n externalAccountName\n grantedScopes\n config\n metadata\n createdBy\n createdAt\n updatedAt\n provider {\n id\n key\n name\n description\n category\n authType\n icon\n color\n website\n docsUrl\n pluginStatus\n pluginVersion\n pluginAuthor\n isBuiltIn\n isEnabled\n displayOrder\n supportedFeatures\n connectionCount\n createdAt\n updatedAt\n }\n }\n }\n }\n`;\n\ninterface OverviewQueryData {\n getProviders?: { total?: number; items?: Array<Record<string, unknown>> };\n getConnections?: { total?: number; items?: Array<Record<string, unknown>> };\n}\n\nfunction useOverviewData() {\n const { data, loading, error, refetch } = useQuery<OverviewQueryData>(OVERVIEW_QUERY, {\n errorPolicy: 'all',\n fetchPolicy: 'cache-first',\n nextFetchPolicy: 'cache-first',\n });\n\n const providers = (data?.getProviders?.items ?? []).map((item: Record<string, unknown>) =>\n mapProvider(item)\n );\n const connections = (data?.getConnections?.items ?? []).map((item: Record<string, unknown>) =>\n mapConnection(item)\n );\n\n return {\n providers,\n connections,\n loading,\n error,\n refetch,\n };\n}\n\n/**\n * Stat card for overview metrics\n */\nfunction StatCard({\n label,\n value,\n icon,\n tone = 'primary',\n onClick,\n}: {\n label: string;\n value: number;\n icon: React.ReactNode;\n tone?: 'primary' | 'success' | 'warning' | 'info' | 'neutral';\n onClick?: () => void;\n}) {\n const accent = getAccentClasses(tone);\n\n return (\n <div\n className={cn(\n 'relative overflow-hidden rounded-xl border border-border-subtle/50 bg-bg-surface p-5',\n 'hover:shadow-md hover:border-primary/30 transition-all duration-200',\n onClick && 'cursor-pointer'\n )}\n onClick={onClick}\n role={onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n onKeyDown={\n onClick\n ? (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick();\n }\n }\n : undefined\n }\n >\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm font-medium text-text-secondary\">{label}</p>\n <p className=\"text-3xl font-bold text-text-primary mt-1 tabular-nums\">{value}</p>\n </div>\n <div className={cn('p-3 rounded-xl', accent.surface)}>{icon}</div>\n </div>\n <div className=\"absolute bottom-0 right-0 size-32 bg-gradient-to-tl from-primary/5 to-transparent rounded-full blur-2xl -z-0\" />\n </div>\n );\n}\n\n/**\n * Integrations Overview — Dashboard page with stats, recent connections, and quick actions.\n */\nexport function IntegrationsOverview() {\n const { basePath = '/', navigate } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const { addConnectionDialogOpen, openAddConnectionDialog, closeAddConnectionDialog } =\n useIntegrationsStore();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n\n const { providers, connections, loading, error, refetch } = useOverviewData();\n\n // Compute stats\n const stats = useMemo(() => {\n const totalProviders = (providers ?? []).length;\n const installedProviders = (providers ?? []).filter(\n (p: IntegrationProvider) => p.pluginStatus === 'installed'\n ).length;\n const activeConnections = (connections ?? []).filter(\n (c: IntegrationConnection) => c.status === 'active'\n ).length;\n const pendingAuth = (connections ?? []).filter(\n (c: IntegrationConnection) => c.status === 'pending_auth'\n ).length;\n const errorConnections = (connections ?? []).filter(\n (c: IntegrationConnection) => c.status === 'error'\n ).length;\n\n return { totalProviders, installedProviders, activeConnections, pendingAuth, errorConnections };\n }, [providers, connections]);\n\n // Recent connections (last 5 by updatedAt)\n const recentConnections = useMemo(() => {\n return [...(connections ?? [])]\n .sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime())\n .slice(0, 5);\n }, [connections]);\n\n const handleNavigate = (path: string) => {\n if (!navigate) return;\n navigate(joinPath(basePath, path));\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-overview-header\"\n >\n <div className=\"relative z-10 flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm\">\n <LayoutDashboard size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tx('integrations.overview.title', 'Integrations')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.overview.subtitle',\n 'Connect your workspace to external services and tools'\n )}\n </p>\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <button\n type=\"button\"\n onClick={() => {\n void refetch();\n }}\n className=\"p-2 rounded-lg hover:bg-accent transition-colors\"\n aria-label={tx('integrations.overview.actions.refreshAriaLabel', 'Refresh')}\n >\n <RefreshCw size={18} className=\"text-text-secondary\" />\n </button>\n </div>\n </div>\n <div className=\"absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* Error State */}\n {error && (\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4 animate-in fade-in-0 duration-200\">\n <div className=\"p-2.5 rounded-lg bg-status-error-bg-subtle\">\n <AlertCircle size={24} className=\"text-status-error-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tx('integrations.overview.error.title', 'Failed to load integrations data')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">{error.message}</p>\n <button\n type=\"button\"\n onClick={() => {\n void refetch();\n }}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n {tx('integrations.overview.error.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading State */}\n {loading && !error && (\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\">\n {[...Array(4)].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-center justify-between\">\n <div className=\"space-y-2\">\n <div className=\"h-3 w-20 bg-bg-sunken rounded\" />\n <div className=\"h-8 w-12 bg-bg-sunken rounded\" />\n </div>\n <div className=\"size-12 bg-bg-sunken rounded-xl\" />\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Stats Cards */}\n {!loading && !error && (\n <div\n className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\"\n data-tour=\"integrations-stats-cards\"\n >\n <StatCard\n label={tx('integrations.overview.stats.installedProviders', 'Installed Providers')}\n value={stats.installedProviders}\n icon={<Store size={24} className=\"text-primary\" />}\n tone=\"primary\"\n onClick={() => handleNavigate('providers')}\n />\n <StatCard\n label={tx('integrations.overview.stats.activeConnections', 'Active Connections')}\n value={stats.activeConnections}\n icon={<CheckCircle2 size={24} className=\"text-status-success-text\" />}\n tone=\"success\"\n onClick={() => handleNavigate('connections')}\n />\n <StatCard\n label={tx('integrations.overview.stats.pendingAuth', 'Pending Auth')}\n value={stats.pendingAuth}\n icon={<Clock size={24} className=\"text-status-warning-text\" />}\n tone=\"warning\"\n onClick={() => handleNavigate('connections')}\n />\n <StatCard\n label={tx('integrations.overview.stats.errors', 'Errors')}\n value={stats.errorConnections}\n icon={<XCircle size={24} className=\"text-status-error-text\" />}\n tone=\"neutral\"\n onClick={() => handleNavigate('connections')}\n />\n </div>\n )}\n\n {/* Quick Actions */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\" data-tour=\"integrations-quick-actions\">\n <button\n type=\"button\"\n onClick={() => handleNavigate('providers')}\n className={cn(\n 'flex items-center gap-4 p-5 rounded-xl border border-border-subtle/50 bg-bg-surface',\n 'hover:bg-accent/30 hover:border-primary/30 hover:shadow-md',\n 'text-left transition-all duration-200 group'\n )}\n >\n <div className=\"p-3 rounded-xl bg-action-primary-bg/10\">\n <Store size={24} className=\"text-primary\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary\">\n {tx('integrations.overview.quickActions.browseProviders.title', 'Browse Providers')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.overview.quickActions.browseProviders.description',\n 'Discover and install integration plugins'\n )}\n </p>\n </div>\n <ArrowRight\n size={18}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </button>\n\n {canCreateConnection && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\n className={cn(\n 'flex items-center gap-4 p-5 rounded-xl border border-border-subtle/50 bg-bg-surface',\n 'hover:bg-accent/30 hover:border-primary/30 hover:shadow-md',\n 'text-left transition-all duration-200 group'\n )}\n >\n <div className=\"p-3 rounded-xl bg-status-success-bg-subtle\">\n <Plus size={24} className=\"text-status-success-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary\">\n {tx('integrations.overview.quickActions.addConnection.title', 'Add Connection')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.overview.quickActions.addConnection.description',\n 'Connect to an external service'\n )}\n </p>\n </div>\n <ArrowRight\n size={18}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </button>\n )}\n </div>\n\n {/* Recent Connections */}\n <div\n className=\"rounded-xl border border-border-subtle/50 bg-bg-surface overflow-hidden\"\n data-tour=\"integrations-recent-connections\"\n >\n <div className=\"flex items-center justify-between p-5 border-b border-border-subtle/50\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tx('integrations.overview.recentConnections.title', 'Recent Connections')}\n </h2>\n </div>\n <button\n type=\"button\"\n onClick={() => handleNavigate('connections')}\n className=\"text-sm text-primary hover:underline\"\n >\n {tx('integrations.overview.recentConnections.viewAll', 'View all')}\n </button>\n </div>\n\n {loading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-text-secondary\" />\n </div>\n )}\n\n {!loading && recentConnections.length === 0 && (\n <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-bg-sunken/50 mb-4\">\n <Plug size={32} className=\"text-text-secondary\" />\n </div>\n <h3 className=\"font-semibold text-text-primary mb-1\">\n {tx('integrations.overview.empty.title', 'No connections yet')}\n </h3>\n <p className=\"text-sm text-text-secondary mb-4 max-w-sm\">\n {canCreateConnection\n ? tx(\n 'integrations.overview.empty.canCreateDescription',\n 'Create your first connection to start integrating with external services.'\n )\n : tx(\n 'integrations.overview.empty.readOnlyDescription',\n 'No connections have been configured yet.'\n )}\n </p>\n {canCreateConnection && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus size={16} />\n {tx('integrations.overview.actions.addConnection', 'Add Connection')}\n </button>\n )}\n </div>\n )}\n\n {!loading && recentConnections.length > 0 && (\n <div className=\"divide-y divide-border/50\">\n {recentConnections.map((conn) => (\n <div\n key={conn.id}\n className=\"flex items-center gap-4 px-5 py-3.5 hover:bg-accent/30 cursor-pointer transition-colors\"\n onClick={() => handleNavigate(`connections/${conn.id}`)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleNavigate(`connections/${conn.id}`);\n }\n }}\n >\n <div className=\"size-8 rounded-lg flex items-center justify-center flex-shrink-0 bg-action-primary-bg/10\">\n <Plug size={16} className=\"text-primary\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{conn.name}</p>\n <p className=\"text-xs text-text-secondary truncate\">{conn.provider.name}</p>\n </div>\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n <span className={cn('size-2 rounded-full', getStatusDotColor(conn.status))} />\n <span className=\"text-xs text-text-secondary\">\n {formatLastUsed(conn.lastUsedAt)}\n </span>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n onConnectionCreated={() => {\n void refetch();\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA6BA,IAAM,IAAiB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8E1B,SAAS,IAAkB;CACzB,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAA4B,GAAgB;EACpF,aAAa;EACb,aAAa;EACb,iBAAiB;EAClB,CAAC;AASF,QAAO;EACL,YARiB,GAAM,cAAc,SAAS,EAAE,EAAE,KAAK,MACvD,EAAY,EAAK,CAClB;EAOC,cANmB,GAAM,gBAAgB,SAAS,EAAE,EAAE,KAAK,MAC3D,EAAc,EAAK,CACpB;EAKC;EACA;EACA;EACD;;AAMH,SAAS,EAAS,EAChB,UACA,UACA,SACA,UAAO,WACP,cAOC;CACD,IAAM,IAAS,EAAiB,EAAK;AAErC,QACE,kBAAC,OAAD;EACE,WAAW,EACT,wFACA,uEACA,KAAW,iBACZ;EACQ;EACT,MAAM,IAAU,WAAW,KAAA;EAC3B,UAAU,IAAU,IAAI,KAAA;EACxB,WACE,KACK,MAAM;AACL,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,gBAAgB,EAClB,GAAS;MAGb,KAAA;YAjBR,CAoBE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;cAA2C;IAAU,CAAA,EAClE,kBAAC,KAAD;IAAG,WAAU;cAA0D;IAAU,CAAA,CAC7E,EAAA,CAAA,EACN,kBAAC,OAAD;IAAK,WAAW,EAAG,kBAAkB,EAAO,QAAQ;cAAG;I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AkB,EAAK,OAAO,CAAC,EAAI,CAAA,EAC9E,kBAAC,QAAD;UAAM,WAAU;oBACb,EAAe,EAAK,WAAW;UAC3B,CAAA,CACH;;QACF;SAzBC,EAAK,GAyBN,CACN;MACE,CAAA;KAEJ;;GAGN,kBAAC,GAAD;IACE,MAAM;IACN,SAAS;IACT,2BAA2B;AACpB,QAAS;;IAEhB,CAAA;GACE"}
|
|
1
|
+
{"version":3,"file":"IntegrationsOverview.js","names":[],"sources":["../../../src/integrations/pages/IntegrationsOverview.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n Plug,\n Link2,\n AlertCircle,\n Clock,\n Store,\n Plus,\n ArrowRight,\n RefreshCw,\n Loader2,\n CheckCircle2,\n XCircle,\n LayoutDashboard,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { formatLastUsed, getStatusDotColor } from '../utils/integrationsHelpers';\nimport type { IntegrationConnection, IntegrationProvider } from '../types';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { getAccentClasses } from '../utils/appearance';\nimport { mapConnection, mapProvider } from '../utils/mappers';\nimport { Button, GlassCard, EmphasisPanel } from '@burdenoff/fe-libs/ui';\n\nconst OVERVIEW_QUERY = gql`\n query IntegrationsOverviewQuery {\n getProviders(pagination: { limit: 100 }) {\n total\n items {\n id\n key\n name\n description\n category\n authType\n icon\n color\n website\n docsUrl\n pluginStatus\n pluginVersion\n pluginAuthor\n isBuiltIn\n isEnabled\n displayOrder\n supportedFeatures\n connectionCount\n createdAt\n updatedAt\n }\n }\n getConnections(pagination: { limit: 100 }) {\n total\n items {\n id\n name\n description\n status\n lastHealthCheck\n lastUsedAt\n errorMessage\n externalAccountId\n externalAccountEmail\n externalAccountName\n grantedScopes\n config\n metadata\n createdBy\n createdAt\n updatedAt\n provider {\n id\n key\n name\n description\n category\n authType\n icon\n color\n website\n docsUrl\n pluginStatus\n pluginVersion\n pluginAuthor\n isBuiltIn\n isEnabled\n displayOrder\n supportedFeatures\n connectionCount\n createdAt\n updatedAt\n }\n }\n }\n }\n`;\n\ninterface OverviewQueryData {\n getProviders?: { total?: number; items?: Array<Record<string, unknown>> };\n getConnections?: { total?: number; items?: Array<Record<string, unknown>> };\n}\n\nfunction useOverviewData() {\n const { data, loading, error, refetch } = useQuery<OverviewQueryData>(OVERVIEW_QUERY, {\n errorPolicy: 'all',\n fetchPolicy: 'cache-first',\n nextFetchPolicy: 'cache-first',\n });\n\n const providers = (data?.getProviders?.items ?? []).map((item: Record<string, unknown>) =>\n mapProvider(item)\n );\n const connections = (data?.getConnections?.items ?? []).map((item: Record<string, unknown>) =>\n mapConnection(item)\n );\n\n return {\n providers,\n connections,\n loading,\n error,\n refetch,\n };\n}\n\n/**\n * Stat card for overview metrics\n */\nfunction StatCard({\n label,\n value,\n icon,\n tone = 'primary',\n onClick,\n}: {\n label: string;\n value: number;\n icon: React.ReactNode;\n tone?: 'primary' | 'success' | 'warning' | 'info' | 'neutral';\n onClick?: () => void;\n}) {\n const accent = getAccentClasses(tone);\n\n return (\n <GlassCard\n treatment=\"metric\"\n className={cn(\n 'border-border-seam p-5',\n onClick &&\n 'cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]'\n )}\n onClick={onClick}\n role={onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n onKeyDown={\n onClick\n ? (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onClick();\n }\n }\n : undefined\n }\n >\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"text-sm font-medium text-text-secondary\">{label}</p>\n <p className=\"text-3xl font-bold text-text-primary mt-1 tabular-nums\">{value}</p>\n </div>\n <div className={cn('p-3 rounded-xl', accent.surface)}>{icon}</div>\n </div>\n </GlassCard>\n );\n}\n\n/**\n * Integrations Overview — Dashboard page with stats, recent connections, and quick actions.\n */\nexport function IntegrationsOverview() {\n const { basePath = '/', navigate } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const { addConnectionDialogOpen, openAddConnectionDialog, closeAddConnectionDialog } =\n useIntegrationsStore();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n\n const { providers, connections, loading, error, refetch } = useOverviewData();\n\n // Compute stats\n const stats = useMemo(() => {\n const totalProviders = (providers ?? []).length;\n const installedProviders = (providers ?? []).filter(\n (p: IntegrationProvider) => p.pluginStatus === 'installed'\n ).length;\n const activeConnections = (connections ?? []).filter(\n (c: IntegrationConnection) => c.status === 'active'\n ).length;\n const pendingAuth = (connections ?? []).filter(\n (c: IntegrationConnection) => c.status === 'pending_auth'\n ).length;\n const errorConnections = (connections ?? []).filter(\n (c: IntegrationConnection) => c.status === 'error'\n ).length;\n\n return { totalProviders, installedProviders, activeConnections, pendingAuth, errorConnections };\n }, [providers, connections]);\n\n // Recent connections (last 5 by updatedAt)\n const recentConnections = useMemo(() => {\n return [...(connections ?? [])]\n .sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime())\n .slice(0, 5);\n }, [connections]);\n\n const handleNavigate = (path: string) => {\n if (!navigate) return;\n navigate(joinPath(basePath, path));\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-overview-header\"\n >\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex items-center gap-3\">\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/10\">\n <LayoutDashboard size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-text-primary\">\n {tx('integrations.overview.title', 'Integrations')}\n </h1>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.overview.subtitle',\n 'Connect your workspace to external services and tools'\n )}\n </p>\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"ghost\"\n size=\"icon\"\n onClick={() => {\n void refetch();\n }}\n aria-label={tx('integrations.overview.actions.refreshAriaLabel', 'Refresh')}\n >\n <RefreshCw size={18} className=\"text-text-secondary\" />\n </Button>\n </div>\n </div>\n </div>\n\n {/* Error State */}\n {error && (\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-5 flex items-start gap-4 animate-in fade-in-0 duration-200\">\n <div className=\"p-2.5 rounded-lg bg-status-error-bg-subtle\">\n <AlertCircle size={24} className=\"text-status-error-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">\n {tx('integrations.overview.error.title', 'Failed to load integrations data')}\n </h3>\n <p className=\"text-sm text-status-error-text mb-3\">{error.message}</p>\n <button\n type=\"button\"\n onClick={() => {\n void refetch();\n }}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n {tx('integrations.overview.error.retry', 'Try Again')}\n </button>\n </div>\n </div>\n )}\n\n {/* Loading State */}\n {loading && !error && (\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\">\n {[...Array(4)].map((_, i) => (\n <div\n key={i}\n className=\"rounded-xl border border-border-seam bg-bg-surface p-5 animate-pulse\"\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"space-y-2\">\n <div className=\"h-3 w-20 bg-bg-sunken rounded\" />\n <div className=\"h-8 w-12 bg-bg-sunken rounded\" />\n </div>\n <div className=\"size-12 bg-bg-sunken rounded-xl\" />\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Stats Cards */}\n {!loading && !error && (\n <div\n className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\"\n data-tour=\"integrations-stats-cards\"\n >\n <StatCard\n label={tx('integrations.overview.stats.installedProviders', 'Installed Providers')}\n value={stats.installedProviders}\n icon={<Store size={24} className=\"text-primary\" />}\n tone=\"primary\"\n onClick={() => handleNavigate('providers')}\n />\n <StatCard\n label={tx('integrations.overview.stats.activeConnections', 'Active Connections')}\n value={stats.activeConnections}\n icon={<CheckCircle2 size={24} className=\"text-status-success-text\" />}\n tone=\"success\"\n onClick={() => handleNavigate('connections')}\n />\n <StatCard\n label={tx('integrations.overview.stats.pendingAuth', 'Pending Auth')}\n value={stats.pendingAuth}\n icon={<Clock size={24} className=\"text-status-warning-text\" />}\n tone=\"warning\"\n onClick={() => handleNavigate('connections')}\n />\n <StatCard\n label={tx('integrations.overview.stats.errors', 'Errors')}\n value={stats.errorConnections}\n icon={<XCircle size={24} className=\"text-status-error-text\" />}\n tone=\"neutral\"\n onClick={() => handleNavigate('connections')}\n />\n </div>\n )}\n\n {/* Quick Actions */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\" data-tour=\"integrations-quick-actions\">\n <button\n type=\"button\"\n onClick={() => handleNavigate('providers')}\n className={cn(\n 'flex items-center gap-4 p-5 rounded-xl border border-border-seam bg-bg-surface',\n 'hover:border-border-strong hover:shadow-[var(--shadow-pop)]',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'text-left transition-[box-shadow,border-color] duration-200 group'\n )}\n >\n <div className=\"p-3 rounded-xl bg-action-primary-bg/10\">\n <Store size={24} className=\"text-primary\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary\">\n {tx('integrations.overview.quickActions.browseProviders.title', 'Browse Providers')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.overview.quickActions.browseProviders.description',\n 'Discover and install integration plugins'\n )}\n </p>\n </div>\n <ArrowRight\n size={18}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </button>\n\n {canCreateConnection && (\n <button\n type=\"button\"\n onClick={() => openAddConnectionDialog()}\n className={cn(\n 'flex items-center gap-4 p-5 rounded-xl border border-border-seam bg-bg-surface',\n 'hover:border-border-strong hover:shadow-[var(--shadow-pop)]',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]',\n 'text-left transition-[box-shadow,border-color] duration-200 group'\n )}\n >\n <div className=\"p-3 rounded-xl bg-status-success-bg-subtle\">\n <Plus size={24} className=\"text-status-success-text\" />\n </div>\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-text-primary\">\n {tx('integrations.overview.quickActions.addConnection.title', 'Add Connection')}\n </h3>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n {tx(\n 'integrations.overview.quickActions.addConnection.description',\n 'Connect to an external service'\n )}\n </p>\n </div>\n <ArrowRight\n size={18}\n className=\"text-text-secondary group-hover:text-primary transition-colors\"\n />\n </button>\n )}\n </div>\n\n {/* Recent Connections */}\n <EmphasisPanel className=\"overflow-hidden p-0\" data-tour=\"integrations-recent-connections\">\n <div className=\"flex items-center justify-between p-5 border-b border-border-seam\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-text-primary\">\n {tx('integrations.overview.recentConnections.title', 'Recent Connections')}\n </h2>\n </div>\n <button\n type=\"button\"\n onClick={() => handleNavigate('connections')}\n className=\"text-sm text-primary hover:underline\"\n >\n {tx('integrations.overview.recentConnections.viewAll', 'View all')}\n </button>\n </div>\n\n {loading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-text-secondary\" />\n </div>\n )}\n\n {!loading && recentConnections.length === 0 && (\n <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-bg-sunken/50 mb-4\">\n <Plug size={32} className=\"text-text-secondary\" />\n </div>\n <h3 className=\"font-semibold text-text-primary mb-1\">\n {tx('integrations.overview.empty.title', 'No connections yet')}\n </h3>\n <p className=\"text-sm text-text-secondary mb-4 max-w-sm\">\n {canCreateConnection\n ? tx(\n 'integrations.overview.empty.canCreateDescription',\n 'Create your first connection to start integrating with external services.'\n )\n : tx(\n 'integrations.overview.empty.readOnlyDescription',\n 'No connections have been configured yet.'\n )}\n </p>\n {canCreateConnection && (\n <Button onClick={() => openAddConnectionDialog()}>\n <Plus size={16} />\n {tx('integrations.overview.actions.addConnection', 'Add Connection')}\n </Button>\n )}\n </div>\n )}\n\n {!loading && recentConnections.length > 0 && (\n <div className=\"divide-y divide-border-seam\">\n {recentConnections.map((conn) => (\n <div\n key={conn.id}\n className=\"flex items-center gap-4 px-5 py-3.5 hover:bg-accent/30 cursor-pointer transition-colors\"\n onClick={() => handleNavigate(`connections/${conn.id}`)}\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleNavigate(`connections/${conn.id}`);\n }\n }}\n >\n <div className=\"size-8 rounded-lg flex items-center justify-center flex-shrink-0 bg-action-primary-bg/10\">\n <Plug size={16} className=\"text-primary\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-text-primary truncate\">{conn.name}</p>\n <p className=\"text-xs text-text-secondary truncate\">{conn.provider.name}</p>\n </div>\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n <span className={cn('size-2 rounded-full', getStatusDotColor(conn.status))} />\n <span className=\"text-xs text-text-secondary\">\n {formatLastUsed(conn.lastUsedAt)}\n </span>\n </div>\n </div>\n ))}\n </div>\n )}\n </EmphasisPanel>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n onConnectionCreated={() => {\n void refetch();\n }}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA8BA,IAAM,IAAiB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8E1B,SAAS,IAAkB;CACzB,IAAM,EAAE,SAAM,YAAS,UAAO,eAAY,EAA4B,GAAgB;EACpF,aAAa;EACb,aAAa;EACb,iBAAiB;EAClB,CAAC;AASF,QAAO;EACL,YARiB,GAAM,cAAc,SAAS,EAAE,EAAE,KAAK,MACvD,EAAY,EAAK,CAClB;EAOC,cANmB,GAAM,gBAAgB,SAAS,EAAE,EAAE,KAAK,MAC3D,EAAc,EAAK,CACpB;EAKC;EACA;EACA;EACD;;AAMH,SAAS,EAAS,EAChB,UACA,UACA,SACA,UAAO,WACP,cAOC;CACD,IAAM,IAAS,EAAiB,EAAK;AAErC,QACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAW,EACT,0BACA,KACE,8GACH;EACQ;EACT,MAAM,IAAU,WAAW,KAAA;EAC3B,UAAU,IAAU,IAAI,KAAA;EACxB,WACE,KACK,MAAM;AACL,IAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,SACjC,EAAE,gBAAgB,EAClB,GAAS;MAGb,KAAA;YAGN,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,KAAD;IAAG,WAAU;cAA2C;IAAU,CAAA,EAClE,kBAAC,KAAD;IAAG,WAAU;cAA0D;IAAU,CAAA,CAC7E,EAAA,CAAA,EACN,kBAAC,OAAD;IAAK,WAAW,EAAG,kBAAkB,EAAO,QAAQ;cAAG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