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