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