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