@burdenoff/microfe-integrations 2026.608.1 → 2026.624.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrations/IntegrationsAdminRoutes.js +5 -5
- package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +5 -5
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +313 -284
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConfirmDialog.js +5 -5
- package/dist/integrations/components/ConfirmDialog.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +15 -15
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.js +19 -19
- package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +16 -15
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/hooks/useConnections.js +33 -13
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +143 -113
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +53 -53
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionLogs.js +35 -35
- package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +27 -27
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +33 -33
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/dist/integrations/pages/IntegrationsSettings.js +26 -26
- package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
- package/dist/integrations/pages/ProviderCatalog.js +30 -29
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +46 -46
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/pages/ProviderEditorPage.js +47 -45
- package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
- package/dist/integrations/utils/appearance.js +7 -7
- package/dist/integrations/utils/appearance.js.map +1 -1
- package/dist/integrations/utils/constants.js +4 -0
- package/dist/integrations/utils/constants.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.js +1 -0
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/dist/integrations/utils/mappers.js +1 -0
- package/dist/integrations/utils/mappers.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,47 +5,47 @@ import { joinPath as r } from "../utils/navigation.js";
|
|
|
5
5
|
import { getAuthTypeLabel as i, getCategoryLabel as ee } from "../utils/integrationsHelpers.js";
|
|
6
6
|
import { useGetConnectionLazyQuery as te } from "../../generated/wspace-operations.js";
|
|
7
7
|
import { useProvider as ne, useProviderByKey as re, useProviders as ie } from "../hooks/useProviders.js";
|
|
8
|
-
import { useAuthenticateWithApiKey as ae, useAuthenticateWithBasicAuth as oe, useAuthenticateWithBearerToken as se,
|
|
9
|
-
import { waitForOAuthPopupCompletion as
|
|
10
|
-
import { CredentialStorageSelector as
|
|
11
|
-
import { ProviderIcon as
|
|
12
|
-
import { useCallback as a, useEffect as
|
|
13
|
-
import { AlertCircle as
|
|
14
|
-
import { useLocation as
|
|
15
|
-
import { usePermissions as
|
|
8
|
+
import { useAuthenticateWithApiKey as ae, useAuthenticateWithBasicAuth as oe, useAuthenticateWithBearerToken as se, useAuthenticateWithServiceAccount as ce, useCreateConnection as le, useInitiateOAuth as ue } from "../hooks/useConnections.js";
|
|
9
|
+
import { waitForOAuthPopupCompletion as de } from "../utils/oauthPopup.js";
|
|
10
|
+
import { CredentialStorageSelector as fe } from "../components/CredentialStorageSelector.js";
|
|
11
|
+
import { ProviderIcon as pe } from "../components/ProviderIcon.js";
|
|
12
|
+
import { useCallback as a, useEffect as me, useMemo as o, useRef as he, useState as s } from "react";
|
|
13
|
+
import { AlertCircle as c, ArrowLeft as l, ArrowRight as ge, Check as _e, CheckCircle2 as ve, ExternalLink as ye, Key as u, Link as be, Loader2 as d, Lock as xe, Search as Se, Shield as Ce } from "lucide-react";
|
|
14
|
+
import { useLocation as we, useParams as Te } from "react-router-dom";
|
|
15
|
+
import { usePermissions as Ee } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
16
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
17
17
|
//#region src/integrations/pages/AddConnectionWizard.tsx
|
|
18
18
|
function m() {
|
|
19
|
-
let { providerId: m } =
|
|
19
|
+
let { providerId: m } = Te(), { basePath: h = "/", navigate: g, apiGatewayUrl: _ } = e(), v = we().search, y = o(() => new URLSearchParams(v), [v]), b = y.get("providerKey") ?? null, x = y.get("returnTo") ?? null, S = y.get("channelId") ?? null, C = !!(x && S), { provider: w, loading: De } = re(b ?? ""), { providers: T, loading: E } = ie(), { hasPermission: Oe, isLoading: ke } = Ee(), Ae = Oe(n.CONNECTION_CREATE), { createConnection: D, loading: je } = le(), { initiateOAuth: O, loading: Me } = ue(), { authenticateWithApiKey: k, loading: Ne } = ae(), { authenticateWithBasicAuth: A, loading: Pe } = oe(), { authenticateWithBearerToken: j, loading: Fe } = se(), { authenticateWithServiceAccount: Ie, loading: Le } = ce(), [Re] = te({ fetchPolicy: "network-only" }), [M, N] = s(m || b ? "configure" : "select_provider"), [P, ze] = s(null), [F, Be] = s(""), [I, L] = s(""), [R, Ve] = s(""), [z, He] = s(""), [B, Ue] = s(""), [V, We] = s(""), [H, Ge] = s(""), [U, Ke] = s({
|
|
20
20
|
mode: "managed",
|
|
21
21
|
vaultId: "",
|
|
22
22
|
secretId: "",
|
|
23
23
|
managedSecretName: ""
|
|
24
|
-
}), [W, G] =
|
|
25
|
-
|
|
24
|
+
}), [W, G] = s(""), [K, qe] = s(null), [Je, Ye] = s(!1), q = he(null), J = he(null);
|
|
25
|
+
me(() => () => {
|
|
26
26
|
J.current?.(), q.current && !q.current.closed && q.current.close();
|
|
27
27
|
}, []);
|
|
28
|
-
let Y =
|
|
28
|
+
let Y = o(() => !m || !T ? null : T.find((e) => e.id === m) || null, [m, T]), { provider: Xe, loading: Ze } = ne(m && !Y && !E ? m : ""), X = o(() => w ?? Y ?? Xe, [
|
|
29
29
|
w,
|
|
30
30
|
Y,
|
|
31
|
-
|
|
31
|
+
Xe
|
|
32
32
|
]);
|
|
33
|
-
|
|
34
|
-
X && !P && M === "configure" && (
|
|
33
|
+
me(() => {
|
|
34
|
+
X && !P && M === "configure" && (ze(X), I || L(`${X.name} Connection`));
|
|
35
35
|
}, [
|
|
36
36
|
X,
|
|
37
37
|
P,
|
|
38
38
|
M,
|
|
39
39
|
I
|
|
40
40
|
]);
|
|
41
|
-
let
|
|
41
|
+
let Qe = o(() => {
|
|
42
42
|
let e = (T ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
|
|
43
43
|
if (!F) return e;
|
|
44
44
|
let t = F.toLowerCase();
|
|
45
45
|
return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t));
|
|
46
|
-
}, [T, F]),
|
|
47
|
-
|
|
48
|
-
}, []),
|
|
46
|
+
}, [T, F]), $e = a((e) => {
|
|
47
|
+
ze(e), L(`${e.name} Connection`), N("configure");
|
|
48
|
+
}, []), et = a(() => {
|
|
49
49
|
if (!I.trim()) {
|
|
50
50
|
G("Connection name is required");
|
|
51
51
|
return;
|
|
@@ -59,7 +59,7 @@ function m() {
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
G(""), N("authenticate");
|
|
62
|
-
}, [I, U]),
|
|
62
|
+
}, [I, U]), tt = a(async () => {
|
|
63
63
|
if (P) try {
|
|
64
64
|
G("");
|
|
65
65
|
let e = _ ? `${_}/integrations/oauth/callback` : "/integrations/oauth/callback", t = C ? {
|
|
@@ -78,7 +78,7 @@ function m() {
|
|
|
78
78
|
G("Failed to create connection"), N("error");
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
|
-
switch (
|
|
81
|
+
switch (qe(n), P.authType) {
|
|
82
82
|
case "oauth2": {
|
|
83
83
|
let t = await O(n, e, P.key);
|
|
84
84
|
if (t?.redirectUrl) if (C) {
|
|
@@ -90,11 +90,11 @@ function m() {
|
|
|
90
90
|
G("Popup was blocked. Please allow popups for this site and try again."), N("error");
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
q.current = i,
|
|
93
|
+
q.current = i, Ye(!0), J.current?.(), J.current = de({
|
|
94
94
|
connectionId: n,
|
|
95
95
|
popup: i,
|
|
96
96
|
fetchConnectionStatus: async () => {
|
|
97
|
-
let { data: e } = await
|
|
97
|
+
let { data: e } = await Re({ variables: { id: n } });
|
|
98
98
|
return e?.getConnection ?? null;
|
|
99
99
|
},
|
|
100
100
|
onSuccess: () => {
|
|
@@ -104,7 +104,7 @@ function m() {
|
|
|
104
104
|
G(e), N("error");
|
|
105
105
|
},
|
|
106
106
|
onSettled: () => {
|
|
107
|
-
J.current = null, q.current = null,
|
|
107
|
+
J.current = null, q.current = null, Ye(!1);
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
return;
|
|
@@ -133,6 +133,9 @@ function m() {
|
|
|
133
133
|
}
|
|
134
134
|
await j(n, H.trim()), N("success");
|
|
135
135
|
break;
|
|
136
|
+
case "service_account":
|
|
137
|
+
await Ie(n, P.defaultScopes && P.defaultScopes.length > 0 ? P.defaultScopes : void 0), N("success");
|
|
138
|
+
break;
|
|
136
139
|
default: N("success");
|
|
137
140
|
}
|
|
138
141
|
} catch (e) {
|
|
@@ -148,17 +151,18 @@ function m() {
|
|
|
148
151
|
H,
|
|
149
152
|
D,
|
|
150
153
|
O,
|
|
151
|
-
|
|
154
|
+
Re,
|
|
152
155
|
k,
|
|
153
156
|
A,
|
|
154
157
|
j,
|
|
158
|
+
Ie,
|
|
155
159
|
C,
|
|
156
160
|
x,
|
|
157
161
|
S,
|
|
158
162
|
_,
|
|
159
163
|
K,
|
|
160
164
|
U
|
|
161
|
-
]),
|
|
165
|
+
]), nt = a(() => {
|
|
162
166
|
if (!x || !K) return;
|
|
163
167
|
let e = new URL(x, window.location.origin);
|
|
164
168
|
e.searchParams.set("integrationConnectionId", K), S && e.searchParams.set("channelId", S), g?.(e.pathname + e.search);
|
|
@@ -167,7 +171,7 @@ function m() {
|
|
|
167
171
|
K,
|
|
168
172
|
S,
|
|
169
173
|
g
|
|
170
|
-
]), Z =
|
|
174
|
+
]), Z = je || Me || Je || Ne || Pe || Fe || Le, rt = b ? De : E || Ze, Q = [
|
|
171
175
|
{
|
|
172
176
|
key: "select_provider",
|
|
173
177
|
label: "Select Provider"
|
|
@@ -181,13 +185,13 @@ function m() {
|
|
|
181
185
|
label: "Authenticate"
|
|
182
186
|
}
|
|
183
187
|
], $ = Q.findIndex((e) => e.key === M);
|
|
184
|
-
return
|
|
188
|
+
return ke ? /* @__PURE__ */ f("div", {
|
|
185
189
|
className: "flex items-center justify-center py-20",
|
|
186
190
|
children: /* @__PURE__ */ f(d, {
|
|
187
191
|
size: 48,
|
|
188
192
|
className: "animate-spin text-primary"
|
|
189
193
|
})
|
|
190
|
-
}) :
|
|
194
|
+
}) : Ae ? /* @__PURE__ */ p("div", {
|
|
191
195
|
className: "space-y-6 p-6 max-w-3xl mx-auto",
|
|
192
196
|
children: [
|
|
193
197
|
/* @__PURE__ */ p("div", {
|
|
@@ -198,14 +202,14 @@ function m() {
|
|
|
198
202
|
onClick: () => g?.(r(h, "connections")),
|
|
199
203
|
className: "p-2.5 hover:bg-accent rounded-lg transition-all",
|
|
200
204
|
"aria-label": "Back",
|
|
201
|
-
children: /* @__PURE__ */ f(
|
|
205
|
+
children: /* @__PURE__ */ f(l, { size: 20 })
|
|
202
206
|
}),
|
|
203
207
|
/* @__PURE__ */ f("h1", {
|
|
204
|
-
className: "text-2xl font-bold text-
|
|
208
|
+
className: "text-2xl font-bold text-text-primary",
|
|
205
209
|
children: "Add Connection"
|
|
206
210
|
}),
|
|
207
211
|
C && /* @__PURE__ */ f("span", {
|
|
208
|
-
className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-primary/10 text-primary",
|
|
212
|
+
className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-action-primary-bg/10 text-primary",
|
|
209
213
|
children: "Bot Channel Setup"
|
|
210
214
|
})
|
|
211
215
|
]
|
|
@@ -216,11 +220,11 @@ function m() {
|
|
|
216
220
|
className: "flex items-center gap-2",
|
|
217
221
|
children: [
|
|
218
222
|
/* @__PURE__ */ f("div", {
|
|
219
|
-
className: t("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", n < $ ? "bg-primary text-primary-
|
|
220
|
-
children: n < $ ? /* @__PURE__ */ f(
|
|
223
|
+
className: t("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", n < $ ? "bg-action-primary-bg text-action-primary-text" : n === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
|
|
224
|
+
children: n < $ ? /* @__PURE__ */ f(_e, { size: 16 }) : n + 1
|
|
221
225
|
}),
|
|
222
226
|
/* @__PURE__ */ f("span", {
|
|
223
|
-
className: t("text-sm font-medium hidden sm:inline", n === $ ? "text-
|
|
227
|
+
className: t("text-sm font-medium hidden sm:inline", n === $ ? "text-text-primary" : "text-text-secondary"),
|
|
224
228
|
children: e.label
|
|
225
229
|
}),
|
|
226
230
|
n < Q.length - 1 && /* @__PURE__ */ f("div", { className: "w-8 h-px bg-border" })
|
|
@@ -229,7 +233,7 @@ function m() {
|
|
|
229
233
|
}),
|
|
230
234
|
W && M !== "error" && /* @__PURE__ */ p("div", {
|
|
231
235
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 flex items-center gap-3",
|
|
232
|
-
children: [/* @__PURE__ */ f(
|
|
236
|
+
children: [/* @__PURE__ */ f(c, {
|
|
233
237
|
size: 20,
|
|
234
238
|
className: "text-status-error-text flex-shrink-0"
|
|
235
239
|
}), /* @__PURE__ */ f("p", {
|
|
@@ -237,20 +241,20 @@ function m() {
|
|
|
237
241
|
children: W
|
|
238
242
|
})]
|
|
239
243
|
}),
|
|
240
|
-
M === "configure" &&
|
|
244
|
+
M === "configure" && rt && !P && /* @__PURE__ */ f("div", {
|
|
241
245
|
className: "flex items-center justify-center py-12",
|
|
242
246
|
children: /* @__PURE__ */ f(d, {
|
|
243
247
|
size: 24,
|
|
244
|
-
className: "animate-spin text-
|
|
248
|
+
className: "animate-spin text-text-secondary"
|
|
245
249
|
})
|
|
246
250
|
}),
|
|
247
|
-
M === "configure" && !
|
|
251
|
+
M === "configure" && !rt && !P && (m || b) && /* @__PURE__ */ p("div", {
|
|
248
252
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
249
|
-
children: [/* @__PURE__ */ f(
|
|
253
|
+
children: [/* @__PURE__ */ f(c, {
|
|
250
254
|
size: 32,
|
|
251
|
-
className: "text-
|
|
255
|
+
className: "text-text-secondary mb-3"
|
|
252
256
|
}), /* @__PURE__ */ f("p", {
|
|
253
|
-
className: "text-sm text-
|
|
257
|
+
className: "text-sm text-text-secondary",
|
|
254
258
|
children: "This provider isn't available."
|
|
255
259
|
})]
|
|
256
260
|
}),
|
|
@@ -259,53 +263,53 @@ function m() {
|
|
|
259
263
|
children: [
|
|
260
264
|
/* @__PURE__ */ p("div", {
|
|
261
265
|
className: "relative group",
|
|
262
|
-
children: [/* @__PURE__ */ f(
|
|
266
|
+
children: [/* @__PURE__ */ f(Se, {
|
|
263
267
|
size: 18,
|
|
264
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 text-
|
|
268
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
265
269
|
}), /* @__PURE__ */ f("input", {
|
|
266
270
|
type: "text",
|
|
267
271
|
placeholder: "Search installed providers...",
|
|
268
272
|
"aria-label": "Search installed providers",
|
|
269
273
|
value: F,
|
|
270
|
-
onChange: (e) =>
|
|
271
|
-
className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-
|
|
274
|
+
onChange: (e) => Be(e.target.value),
|
|
275
|
+
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"
|
|
272
276
|
})]
|
|
273
277
|
}),
|
|
274
278
|
E && /* @__PURE__ */ f("div", {
|
|
275
279
|
className: "flex items-center justify-center py-12",
|
|
276
280
|
children: /* @__PURE__ */ f(d, {
|
|
277
281
|
size: 24,
|
|
278
|
-
className: "animate-spin text-
|
|
282
|
+
className: "animate-spin text-text-secondary"
|
|
279
283
|
})
|
|
280
284
|
}),
|
|
281
|
-
!E &&
|
|
285
|
+
!E && Qe.length === 0 && /* @__PURE__ */ p("div", {
|
|
282
286
|
className: "text-center py-12",
|
|
283
287
|
children: [/* @__PURE__ */ f("p", {
|
|
284
|
-
className: "text-
|
|
288
|
+
className: "text-text-secondary",
|
|
285
289
|
children: "No installed providers found. Install a provider from the catalog first."
|
|
286
290
|
}), /* @__PURE__ */ f("button", {
|
|
287
291
|
type: "button",
|
|
288
292
|
onClick: () => g?.(r(h, "providers")),
|
|
289
|
-
className: "mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
293
|
+
className: "mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
290
294
|
children: "Browse Catalog"
|
|
291
295
|
})]
|
|
292
296
|
}),
|
|
293
297
|
/* @__PURE__ */ f("div", {
|
|
294
298
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
295
|
-
children:
|
|
299
|
+
children: Qe.map((e) => /* @__PURE__ */ p("button", {
|
|
296
300
|
type: "button",
|
|
297
|
-
onClick: () =>
|
|
298
|
-
className: t("flex items-start gap-3 p-4 rounded-xl border border-border/50 bg-
|
|
299
|
-
children: [/* @__PURE__ */ f(
|
|
301
|
+
onClick: () => $e(e),
|
|
302
|
+
className: t("flex items-start gap-3 p-4 rounded-xl border border-border-subtle/50 bg-bg-surface text-left", "hover:border-primary/50 hover:bg-accent/30 hover:shadow-md transition-all duration-200"),
|
|
303
|
+
children: [/* @__PURE__ */ f(pe, {
|
|
300
304
|
provider: e,
|
|
301
305
|
size: 40
|
|
302
306
|
}), /* @__PURE__ */ p("div", {
|
|
303
307
|
className: "flex-1 min-w-0",
|
|
304
308
|
children: [/* @__PURE__ */ f("h3", {
|
|
305
|
-
className: "font-medium text-
|
|
309
|
+
className: "font-medium text-text-primary truncate",
|
|
306
310
|
children: e.name
|
|
307
311
|
}), /* @__PURE__ */ p("p", {
|
|
308
|
-
className: "text-xs text-
|
|
312
|
+
className: "text-xs text-text-secondary mt-0.5",
|
|
309
313
|
children: [
|
|
310
314
|
ee(e.category),
|
|
311
315
|
" · ",
|
|
@@ -321,15 +325,15 @@ function m() {
|
|
|
321
325
|
className: "space-y-6",
|
|
322
326
|
children: [
|
|
323
327
|
/* @__PURE__ */ p("div", {
|
|
324
|
-
className: "flex items-center gap-3 p-4 rounded-xl border border-border/50 bg-
|
|
325
|
-
children: [/* @__PURE__ */ f(
|
|
328
|
+
className: "flex items-center gap-3 p-4 rounded-xl border border-border-subtle/50 bg-bg-surface",
|
|
329
|
+
children: [/* @__PURE__ */ f(pe, {
|
|
326
330
|
provider: P,
|
|
327
331
|
size: 40
|
|
328
332
|
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
|
|
329
|
-
className: "font-medium text-
|
|
333
|
+
className: "font-medium text-text-primary",
|
|
330
334
|
children: P.name
|
|
331
335
|
}), /* @__PURE__ */ f("p", {
|
|
332
|
-
className: "text-xs text-
|
|
336
|
+
className: "text-xs text-text-secondary",
|
|
333
337
|
children: i(P.authType)
|
|
334
338
|
})] })]
|
|
335
339
|
}),
|
|
@@ -350,7 +354,7 @@ function m() {
|
|
|
350
354
|
value: I,
|
|
351
355
|
onChange: (e) => L(e.target.value),
|
|
352
356
|
placeholder: "e.g., My Slack Workspace",
|
|
353
|
-
className: "w-full px-4 py-2.5 border border-border rounded-lg bg-
|
|
357
|
+
className: "w-full px-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"
|
|
354
358
|
})] }),
|
|
355
359
|
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
356
360
|
htmlFor: "conn-desc",
|
|
@@ -360,14 +364,14 @@ function m() {
|
|
|
360
364
|
id: "conn-desc",
|
|
361
365
|
"aria-label": "Description",
|
|
362
366
|
value: R,
|
|
363
|
-
onChange: (e) =>
|
|
367
|
+
onChange: (e) => Ve(e.target.value),
|
|
364
368
|
rows: 3,
|
|
365
369
|
placeholder: "Optional description...",
|
|
366
|
-
className: "w-full px-4 py-2.5 border border-border rounded-lg bg-
|
|
370
|
+
className: "w-full px-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"
|
|
367
371
|
})] }),
|
|
368
|
-
/* @__PURE__ */ f(
|
|
372
|
+
/* @__PURE__ */ f(fe, {
|
|
369
373
|
value: U,
|
|
370
|
-
onChange:
|
|
374
|
+
onChange: Ke,
|
|
371
375
|
providerAuthType: P.authType
|
|
372
376
|
})
|
|
373
377
|
]
|
|
@@ -377,13 +381,13 @@ function m() {
|
|
|
377
381
|
children: [/* @__PURE__ */ f("button", {
|
|
378
382
|
type: "button",
|
|
379
383
|
onClick: () => m || b ? g?.(r(h, "connections")) : N("select_provider"),
|
|
380
|
-
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
384
|
+
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
381
385
|
children: "Back"
|
|
382
386
|
}), /* @__PURE__ */ p("button", {
|
|
383
387
|
type: "button",
|
|
384
|
-
onClick:
|
|
385
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
386
|
-
children: ["Next ", /* @__PURE__ */ f(
|
|
388
|
+
onClick: et,
|
|
389
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
390
|
+
children: ["Next ", /* @__PURE__ */ f(ge, { size: 16 })]
|
|
387
391
|
})]
|
|
388
392
|
})
|
|
389
393
|
]
|
|
@@ -391,12 +395,12 @@ function m() {
|
|
|
391
395
|
M === "authenticate" && P && /* @__PURE__ */ p("div", {
|
|
392
396
|
className: "space-y-6",
|
|
393
397
|
children: [/* @__PURE__ */ p("div", {
|
|
394
|
-
className: "rounded-xl border border-border/50 bg-
|
|
398
|
+
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
395
399
|
children: [
|
|
396
400
|
/* @__PURE__ */ p("h2", {
|
|
397
|
-
className: "font-semibold text-
|
|
401
|
+
className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
|
|
398
402
|
children: [
|
|
399
|
-
/* @__PURE__ */ f(
|
|
403
|
+
/* @__PURE__ */ f(Ce, {
|
|
400
404
|
size: 18,
|
|
401
405
|
className: "text-primary"
|
|
402
406
|
}),
|
|
@@ -407,7 +411,7 @@ function m() {
|
|
|
407
411
|
P.authType === "oauth2" && /* @__PURE__ */ p("div", {
|
|
408
412
|
className: "space-y-4",
|
|
409
413
|
children: [/* @__PURE__ */ p("p", {
|
|
410
|
-
className: "text-sm text-
|
|
414
|
+
className: "text-sm text-text-secondary",
|
|
411
415
|
children: [
|
|
412
416
|
"You will be redirected to ",
|
|
413
417
|
P.name,
|
|
@@ -415,13 +419,13 @@ function m() {
|
|
|
415
419
|
]
|
|
416
420
|
}), /* @__PURE__ */ p("div", {
|
|
417
421
|
className: "p-3 rounded-lg bg-status-info-bg-subtle border border-border-default text-sm text-status-info-text flex items-center gap-2",
|
|
418
|
-
children: [/* @__PURE__ */ f(
|
|
422
|
+
children: [/* @__PURE__ */ f(ye, { size: 16 }), C ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
|
|
419
423
|
})]
|
|
420
424
|
}),
|
|
421
425
|
P.authType === "api_key" && /* @__PURE__ */ p("div", {
|
|
422
426
|
className: "space-y-4",
|
|
423
427
|
children: [/* @__PURE__ */ p("p", {
|
|
424
|
-
className: "text-sm text-
|
|
428
|
+
className: "text-sm text-text-secondary",
|
|
425
429
|
children: [
|
|
426
430
|
"Enter your ",
|
|
427
431
|
P.name,
|
|
@@ -436,17 +440,17 @@ function m() {
|
|
|
436
440
|
})]
|
|
437
441
|
}), /* @__PURE__ */ p("div", {
|
|
438
442
|
className: "relative",
|
|
439
|
-
children: [/* @__PURE__ */ f(
|
|
443
|
+
children: [/* @__PURE__ */ f(u, {
|
|
440
444
|
size: 16,
|
|
441
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 text-
|
|
445
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
442
446
|
}), /* @__PURE__ */ f("input", {
|
|
443
447
|
type: "password",
|
|
444
448
|
id: "api-key",
|
|
445
449
|
"aria-label": "API Key",
|
|
446
450
|
value: z,
|
|
447
|
-
onChange: (e) =>
|
|
451
|
+
onChange: (e) => He(e.target.value),
|
|
448
452
|
placeholder: "Enter your API key",
|
|
449
|
-
className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-
|
|
453
|
+
className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
|
|
450
454
|
})]
|
|
451
455
|
})] })]
|
|
452
456
|
}),
|
|
@@ -454,7 +458,7 @@ function m() {
|
|
|
454
458
|
className: "space-y-4",
|
|
455
459
|
children: [
|
|
456
460
|
/* @__PURE__ */ p("p", {
|
|
457
|
-
className: "text-sm text-
|
|
461
|
+
className: "text-sm text-text-secondary",
|
|
458
462
|
children: [
|
|
459
463
|
"Enter your ",
|
|
460
464
|
P.name,
|
|
@@ -473,9 +477,9 @@ function m() {
|
|
|
473
477
|
id: "username",
|
|
474
478
|
"aria-label": "Username",
|
|
475
479
|
value: B,
|
|
476
|
-
onChange: (e) =>
|
|
480
|
+
onChange: (e) => Ue(e.target.value),
|
|
477
481
|
placeholder: "Username or email",
|
|
478
|
-
className: "w-full px-4 py-2.5 border border-border rounded-lg bg-
|
|
482
|
+
className: "w-full px-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"
|
|
479
483
|
})] }),
|
|
480
484
|
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
481
485
|
htmlFor: "password",
|
|
@@ -486,17 +490,17 @@ function m() {
|
|
|
486
490
|
})]
|
|
487
491
|
}), /* @__PURE__ */ p("div", {
|
|
488
492
|
className: "relative",
|
|
489
|
-
children: [/* @__PURE__ */ f(
|
|
493
|
+
children: [/* @__PURE__ */ f(xe, {
|
|
490
494
|
size: 16,
|
|
491
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 text-
|
|
495
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
492
496
|
}), /* @__PURE__ */ f("input", {
|
|
493
497
|
type: "password",
|
|
494
498
|
id: "password",
|
|
495
499
|
"aria-label": "Password",
|
|
496
500
|
value: V,
|
|
497
|
-
onChange: (e) =>
|
|
501
|
+
onChange: (e) => We(e.target.value),
|
|
498
502
|
placeholder: "Password",
|
|
499
|
-
className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-
|
|
503
|
+
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"
|
|
500
504
|
})]
|
|
501
505
|
})] })
|
|
502
506
|
]
|
|
@@ -504,7 +508,7 @@ function m() {
|
|
|
504
508
|
P.authType === "bearer_token" && /* @__PURE__ */ p("div", {
|
|
505
509
|
className: "space-y-4",
|
|
506
510
|
children: [/* @__PURE__ */ p("p", {
|
|
507
|
-
className: "text-sm text-
|
|
511
|
+
className: "text-sm text-text-secondary",
|
|
508
512
|
children: [
|
|
509
513
|
"Enter your ",
|
|
510
514
|
P.name,
|
|
@@ -519,19 +523,45 @@ function m() {
|
|
|
519
523
|
})]
|
|
520
524
|
}), /* @__PURE__ */ p("div", {
|
|
521
525
|
className: "relative",
|
|
522
|
-
children: [/* @__PURE__ */ f(
|
|
526
|
+
children: [/* @__PURE__ */ f(u, {
|
|
523
527
|
size: 16,
|
|
524
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 text-
|
|
528
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
525
529
|
}), /* @__PURE__ */ f("input", {
|
|
526
530
|
type: "password",
|
|
527
531
|
id: "bearer-token",
|
|
528
532
|
"aria-label": "Bearer Token",
|
|
529
533
|
value: H,
|
|
530
|
-
onChange: (e) =>
|
|
534
|
+
onChange: (e) => Ge(e.target.value),
|
|
531
535
|
placeholder: "Enter your token",
|
|
532
|
-
className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-
|
|
536
|
+
className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
|
|
533
537
|
})]
|
|
534
538
|
})] })]
|
|
539
|
+
}),
|
|
540
|
+
P.authType === "service_account" && /* @__PURE__ */ f("div", {
|
|
541
|
+
className: "space-y-4",
|
|
542
|
+
children: /* @__PURE__ */ p("div", {
|
|
543
|
+
className: "rounded-lg border border-border bg-status-success-bg-subtle p-4",
|
|
544
|
+
children: [
|
|
545
|
+
/* @__PURE__ */ f("p", {
|
|
546
|
+
className: "text-sm font-semibold text-foreground",
|
|
547
|
+
children: "No credentials needed"
|
|
548
|
+
}),
|
|
549
|
+
/* @__PURE__ */ p("p", {
|
|
550
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
551
|
+
children: [
|
|
552
|
+
P.name,
|
|
553
|
+
" is a first-party integration. Connecting grants",
|
|
554
|
+
" ",
|
|
555
|
+
P.name,
|
|
556
|
+
" permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage."
|
|
557
|
+
]
|
|
558
|
+
}),
|
|
559
|
+
P.defaultScopes && P.defaultScopes.length > 0 && /* @__PURE__ */ p("p", {
|
|
560
|
+
className: "text-sm text-muted-foreground mt-2",
|
|
561
|
+
children: ["Scopes: ", P.defaultScopes.join(", ")]
|
|
562
|
+
})
|
|
563
|
+
]
|
|
564
|
+
})
|
|
535
565
|
})
|
|
536
566
|
]
|
|
537
567
|
}), /* @__PURE__ */ p("div", {
|
|
@@ -540,17 +570,17 @@ function m() {
|
|
|
540
570
|
type: "button",
|
|
541
571
|
onClick: () => N("configure"),
|
|
542
572
|
disabled: Z,
|
|
543
|
-
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50",
|
|
573
|
+
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors disabled:opacity-50",
|
|
544
574
|
children: "Back"
|
|
545
575
|
}), /* @__PURE__ */ p("button", {
|
|
546
576
|
type: "button",
|
|
547
|
-
onClick:
|
|
577
|
+
onClick: tt,
|
|
548
578
|
disabled: Z,
|
|
549
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
579
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
550
580
|
children: [Z ? /* @__PURE__ */ f(d, {
|
|
551
581
|
size: 16,
|
|
552
582
|
className: "animate-spin"
|
|
553
|
-
}) : /* @__PURE__ */ f(
|
|
583
|
+
}) : /* @__PURE__ */ f(_e, { size: 16 }), P.authType === "oauth2" ? "Authorize" : "Connect"]
|
|
554
584
|
})]
|
|
555
585
|
})]
|
|
556
586
|
}),
|
|
@@ -559,17 +589,17 @@ function m() {
|
|
|
559
589
|
children: [
|
|
560
590
|
/* @__PURE__ */ f("div", {
|
|
561
591
|
className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
|
|
562
|
-
children: /* @__PURE__ */ f(
|
|
592
|
+
children: /* @__PURE__ */ f(ve, {
|
|
563
593
|
size: 48,
|
|
564
594
|
className: "text-status-success-text"
|
|
565
595
|
})
|
|
566
596
|
}),
|
|
567
597
|
/* @__PURE__ */ f("h2", {
|
|
568
|
-
className: "text-xl font-bold text-
|
|
598
|
+
className: "text-xl font-bold text-text-primary mb-2",
|
|
569
599
|
children: "Connection Created!"
|
|
570
600
|
}),
|
|
571
601
|
/* @__PURE__ */ p("p", {
|
|
572
|
-
className: "text-sm text-
|
|
602
|
+
className: "text-sm text-text-secondary mb-6 max-w-sm",
|
|
573
603
|
children: [
|
|
574
604
|
"Your ",
|
|
575
605
|
P?.name,
|
|
@@ -581,20 +611,20 @@ function m() {
|
|
|
581
611
|
children: [
|
|
582
612
|
C && K && /* @__PURE__ */ p("button", {
|
|
583
613
|
type: "button",
|
|
584
|
-
onClick:
|
|
585
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
586
|
-
children: [/* @__PURE__ */ f(
|
|
614
|
+
onClick: nt,
|
|
615
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
616
|
+
children: [/* @__PURE__ */ f(be, { size: 16 }), "Link to Bot Channel"]
|
|
587
617
|
}),
|
|
588
618
|
!C && K && /* @__PURE__ */ f("button", {
|
|
589
619
|
type: "button",
|
|
590
620
|
onClick: () => g?.(r(h, `connections/${K}`)),
|
|
591
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
621
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
592
622
|
children: "View Connection"
|
|
593
623
|
}),
|
|
594
624
|
/* @__PURE__ */ f("button", {
|
|
595
625
|
type: "button",
|
|
596
626
|
onClick: () => g?.(r(h, "connections")),
|
|
597
|
-
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
627
|
+
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
598
628
|
children: "All Connections"
|
|
599
629
|
})
|
|
600
630
|
]
|
|
@@ -606,13 +636,13 @@ function m() {
|
|
|
606
636
|
children: [
|
|
607
637
|
/* @__PURE__ */ f("div", {
|
|
608
638
|
className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
|
|
609
|
-
children: /* @__PURE__ */ f(
|
|
639
|
+
children: /* @__PURE__ */ f(c, {
|
|
610
640
|
size: 48,
|
|
611
641
|
className: "text-status-error-text"
|
|
612
642
|
})
|
|
613
643
|
}),
|
|
614
644
|
/* @__PURE__ */ f("h2", {
|
|
615
|
-
className: "text-xl font-bold text-
|
|
645
|
+
className: "text-xl font-bold text-text-primary mb-2",
|
|
616
646
|
children: "Connection Failed"
|
|
617
647
|
}),
|
|
618
648
|
/* @__PURE__ */ f("p", {
|
|
@@ -626,12 +656,12 @@ function m() {
|
|
|
626
656
|
onClick: () => {
|
|
627
657
|
G(""), N("authenticate");
|
|
628
658
|
},
|
|
629
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-
|
|
659
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
630
660
|
children: "Try Again"
|
|
631
661
|
}), /* @__PURE__ */ f("button", {
|
|
632
662
|
type: "button",
|
|
633
663
|
onClick: () => g?.(r(h, "connections")),
|
|
634
|
-
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
664
|
+
className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
635
665
|
children: "Cancel"
|
|
636
666
|
})]
|
|
637
667
|
})
|
|
@@ -641,23 +671,23 @@ function m() {
|
|
|
641
671
|
}) : /* @__PURE__ */ p("div", {
|
|
642
672
|
className: "flex flex-col items-center justify-center py-20 text-center p-6",
|
|
643
673
|
children: [
|
|
644
|
-
/* @__PURE__ */ f(
|
|
674
|
+
/* @__PURE__ */ f(Ce, {
|
|
645
675
|
size: 48,
|
|
646
|
-
className: "text-
|
|
676
|
+
className: "text-text-secondary mb-4"
|
|
647
677
|
}),
|
|
648
678
|
/* @__PURE__ */ f("h2", {
|
|
649
|
-
className: "text-xl font-bold text-
|
|
679
|
+
className: "text-xl font-bold text-text-primary mb-2",
|
|
650
680
|
children: "Access Denied"
|
|
651
681
|
}),
|
|
652
682
|
/* @__PURE__ */ f("p", {
|
|
653
|
-
className: "text-sm text-
|
|
683
|
+
className: "text-sm text-text-secondary mb-6 max-w-sm",
|
|
654
684
|
children: "You don't have permission to create connections."
|
|
655
685
|
}),
|
|
656
686
|
/* @__PURE__ */ p("button", {
|
|
657
687
|
type: "button",
|
|
658
688
|
onClick: () => g?.(r(h, "connections")),
|
|
659
|
-
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
660
|
-
children: [/* @__PURE__ */ f(
|
|
689
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
690
|
+
children: [/* @__PURE__ */ f(l, { size: 16 }), " Back to Connections"]
|
|
661
691
|
})
|
|
662
692
|
]
|
|
663
693
|
});
|