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