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