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