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