@burdenoff/microfe-integrations 2026.810.1 → 2026.810.3
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 +36 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +98 -81
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +130 -118
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.d.ts +17 -0
- package/dist/integrations/components/AuthMethodSelector.d.ts.map +1 -1
- package/dist/integrations/components/AuthMethodSelector.js +45 -40
- package/dist/integrations/components/AuthMethodSelector.js.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.d.ts.map +1 -1
- package/dist/integrations/components/CredentialStorageSelector.js +151 -59
- package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
- package/dist/integrations/constants/permissions.d.ts +1 -0
- package/dist/integrations/constants/permissions.d.ts.map +1 -1
- package/dist/integrations/constants/permissions.js +2 -1
- package/dist/integrations/constants/permissions.js.map +1 -1
- package/dist/integrations/hooks/useCredentialVaults.d.ts +19 -0
- package/dist/integrations/hooks/useCredentialVaults.d.ts.map +1 -1
- package/dist/integrations/hooks/useCredentialVaults.js +43 -22
- package/dist/integrations/hooks/useCredentialVaults.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.d.ts.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +1 -1
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddConnectionDialog.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/AddConnectionDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqDH,MAAM,WAAW,wBAAwB;IACvC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,mCAAmC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4DAA4D;IAC5D,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;
|
|
1
|
+
{"version":3,"file":"AddConnectionDialog.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/AddConnectionDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAqDH,MAAM,WAAW,wBAAwB;IACvC,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,mCAAmC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,4DAA4D;IAC5D,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAmBD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,mBAAmB,GACpB,EAAE,wBAAwB,sCAw3B1B"}
|
|
@@ -7,25 +7,26 @@ import { useProvider as ne, useProviders as re } from "../hooks/useProviders.js"
|
|
|
7
7
|
import { useAuthenticateConnection as ie, useAuthenticateWithServiceAccount as ae, useCreateConnection as oe, useInitiateOAuth as se } from "../hooks/useConnections.js";
|
|
8
8
|
import { waitForOAuthPopupCompletion as ce } from "../utils/oauthPopup.js";
|
|
9
9
|
import { CredentialStorageSelector as le } from "./CredentialStorageSelector.js";
|
|
10
|
-
import {
|
|
10
|
+
import { AuthMethodNotice as ue, AuthMethodSelector as de } from "./AuthMethodSelector.js";
|
|
11
11
|
import { ProviderIcon as a } from "./ProviderIcon.js";
|
|
12
|
-
import { SchemaForm as
|
|
13
|
-
import { useCallback as
|
|
14
|
-
import { AlertCircle as u, Check as
|
|
15
|
-
import { usePermissions as
|
|
12
|
+
import { SchemaForm as fe, initialValuesFromSchema as pe, isSchemaComplete as me, parseFormSchema as he, visibleValues as ge } from "./SchemaForm.js";
|
|
13
|
+
import { useCallback as _e, useEffect as o, useId as ve, useMemo as s, useRef as c, useState as l } from "react";
|
|
14
|
+
import { AlertCircle as u, Check as ye, CheckCircle2 as be, ExternalLink as xe, Info as Se, Link2 as Ce, Loader2 as d, Search as we, Shield as f, X as Te } from "lucide-react";
|
|
15
|
+
import { usePermissions as Ee } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
16
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
17
|
-
import { IllustratedEmptyState as
|
|
17
|
+
import { IllustratedEmptyState as De } from "@burdenoff/fe-libs/ui";
|
|
18
18
|
//#region src/integrations/components/AddConnectionDialog.tsx
|
|
19
|
+
var Oe = 1100, ke = 1101;
|
|
19
20
|
function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated: y }) {
|
|
20
|
-
let { apiGatewayUrl: b } = e(), { providers: x, loading: S } = re(),
|
|
21
|
+
let { apiGatewayUrl: b } = e(), { providers: x, loading: S } = re(), Ae = s(() => v ? (x ?? []).find((e) => e.id === v) ?? null : null, [x, v]), { provider: je, loading: Me } = ne(!S && v && !Ae ? v : ""), C = Ae ?? je, w = !!v && !C && (S || Me), { hasPermission: Ne, isLoading: Pe } = Ee(), Fe = !Pe && Ne(n.CONNECTION_CREATE), { createConnection: T, loading: Ie } = oe(), { initiateOAuth: Le, loading: Re } = se(), { authenticateConnection: ze, loading: Be } = ie(), { authenticateWithServiceAccount: Ve, loading: He } = ae(), [Ue] = te({ fetchPolicy: "network-only" }), [E, D] = l(null), [O, k] = l(!v), [A, We] = l("connection"), [j, Ge] = l(""), [M, N] = l(""), [P, F] = l(""), [I, Ke] = l(null), [L, R] = l({}), [z, qe] = l({
|
|
21
22
|
mode: "managed",
|
|
22
23
|
vaultId: "",
|
|
23
24
|
secretId: "",
|
|
24
25
|
managedSecretName: ""
|
|
25
|
-
}), [
|
|
26
|
+
}), [Je, B] = l(""), [V, H] = l(!1), [Ye, U] = l(!1), [, Xe] = l(null), W = c(null), G = c(null), Ze = c(null), Qe = ve(), K = (e) => `${Qe}-${e}`, q = s(() => (E?.authMethods ?? []).filter((e) => e.isEnabled), [E]), J = s(() => q.find((e) => e.key === I) ?? q[0] ?? null, [q, I]), Y = J?.flow ?? ee(E?.authType), $e = J?.authType ?? E?.authType, X = s(() => J?.defaultScopes?.length ? J.defaultScopes : E?.defaultScopes ?? [], [J, E]), Z = s(() => he(J?.configSchema ?? E?.configSchema), [J, E]);
|
|
26
27
|
o(() => {
|
|
27
|
-
|
|
28
|
-
}, [
|
|
28
|
+
R(pe(Z)), B("");
|
|
29
|
+
}, [I, E?.id]), o(() => {
|
|
29
30
|
if (!g) return;
|
|
30
31
|
let e = (e) => {
|
|
31
32
|
e.key === "Escape" && _();
|
|
@@ -34,22 +35,22 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
34
35
|
}, [g, _]), o(() => () => {
|
|
35
36
|
G.current?.(), W.current && !W.current.closed && W.current.close();
|
|
36
37
|
}, []), o(() => {
|
|
37
|
-
g && (
|
|
38
|
+
g && (We("connection"), Ge(""), N(""), F(""), Ke(null), R({}), qe({
|
|
38
39
|
mode: "managed",
|
|
39
40
|
vaultId: "",
|
|
40
41
|
secretId: "",
|
|
41
42
|
managedSecretName: ""
|
|
42
|
-
}),
|
|
43
|
+
}), B(""), H(!1), U(!1), Xe(null), v ? (k(!1), D(null)) : (k(!0), D(null)));
|
|
43
44
|
}, [g, v]), o(() => {
|
|
44
|
-
g && v &&
|
|
45
|
+
g && v && C && !E && (D(C), N(`${C.name} Connection`), k(!1));
|
|
45
46
|
}, [
|
|
46
47
|
g,
|
|
47
48
|
v,
|
|
48
|
-
|
|
49
|
+
C,
|
|
49
50
|
E
|
|
50
51
|
]), o(() => {
|
|
51
52
|
if (g && O) {
|
|
52
|
-
let e = setTimeout(() =>
|
|
53
|
+
let e = setTimeout(() => Ze.current?.focus(), 100);
|
|
53
54
|
return () => clearTimeout(e);
|
|
54
55
|
}
|
|
55
56
|
}, [g, O]);
|
|
@@ -58,137 +59,139 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
58
59
|
if (!j.trim()) return e;
|
|
59
60
|
let t = j.toLowerCase();
|
|
60
61
|
return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t) || e.key.toLowerCase().includes(t));
|
|
61
|
-
}, [x, j]),
|
|
62
|
+
}, [x, j]), et = s(() => {
|
|
62
63
|
let e = {};
|
|
63
64
|
return Q.forEach((t) => {
|
|
64
65
|
let n = t.category;
|
|
65
66
|
e[n] || (e[n] = []), e[n].push(t);
|
|
66
67
|
}), e;
|
|
67
|
-
}, [Q]),
|
|
68
|
-
D(e), N(`${e.name} Connection`), k(!1),
|
|
69
|
-
}, []), $ =
|
|
68
|
+
}, [Q]), tt = _e((e) => {
|
|
69
|
+
D(e), N(`${e.name} Connection`), k(!1), B("");
|
|
70
|
+
}, []), $ = Ie || Re || Ye || Be || He, nt = _e(async () => {
|
|
70
71
|
if (!E || !M.trim()) return;
|
|
71
72
|
let e = Y === "minted";
|
|
72
73
|
if (!e) {
|
|
73
|
-
if (!
|
|
74
|
-
|
|
74
|
+
if (!z.vaultId) {
|
|
75
|
+
B("Please select a vault for this connection");
|
|
75
76
|
return;
|
|
76
77
|
}
|
|
77
|
-
if (
|
|
78
|
-
|
|
78
|
+
if (z.mode === "existing" && !z.secretId) {
|
|
79
|
+
B("Please select an existing vault secret");
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
|
-
if (Y === "oauth2" && Z && !
|
|
83
|
-
|
|
83
|
+
if (Y === "oauth2" && Z && !me(Z, L)) {
|
|
84
|
+
B("Please fill in all required fields");
|
|
84
85
|
return;
|
|
85
86
|
}
|
|
86
87
|
if (J && !J.isConfigured) {
|
|
87
|
-
|
|
88
|
+
B("This authentication method is not configured in this environment. Ask an administrator to add its credentials, or pick another method.");
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
91
|
try {
|
|
91
|
-
|
|
92
|
-
let t = await
|
|
92
|
+
B("");
|
|
93
|
+
let t = await T({
|
|
93
94
|
name: M.trim(),
|
|
94
95
|
description: P.trim() || void 0,
|
|
95
96
|
providerId: E.id,
|
|
96
|
-
authMethodKey:
|
|
97
|
-
...Y === "oauth2" && Z ? { config:
|
|
97
|
+
authMethodKey: I ?? void 0,
|
|
98
|
+
...Y === "oauth2" && Z ? { config: ge(Z, L) } : {},
|
|
98
99
|
...e ? {} : {
|
|
99
|
-
vaultId:
|
|
100
|
-
credentialSecretId:
|
|
101
|
-
managedSecretName:
|
|
100
|
+
vaultId: z.vaultId,
|
|
101
|
+
credentialSecretId: z.mode === "existing" ? z.secretId : void 0,
|
|
102
|
+
managedSecretName: z.mode === "managed" && z.managedSecretName.trim() || void 0
|
|
102
103
|
}
|
|
103
104
|
});
|
|
104
105
|
if (!t) {
|
|
105
|
-
|
|
106
|
+
B("Failed to create connection");
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
108
|
-
switch (
|
|
109
|
+
switch (Xe(t), Y) {
|
|
109
110
|
case "oauth2": {
|
|
110
|
-
let e = await
|
|
111
|
+
let e = await Le(t, b ? `${b}/integrations/oauth/callback` : "/integrations/oauth/callback", E.key);
|
|
111
112
|
if (e?.redirectUrl) {
|
|
112
113
|
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`);
|
|
113
114
|
if (!i) {
|
|
114
|
-
|
|
115
|
+
B("Popup was blocked. Please allow popups for this site and try again.");
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
|
-
W.current = i,
|
|
118
|
+
W.current = i, U(!0), G.current?.(), G.current = ce({
|
|
118
119
|
connectionId: t,
|
|
119
120
|
popup: i,
|
|
120
121
|
fetchConnectionStatus: async () => {
|
|
121
|
-
let { data: e } = await
|
|
122
|
+
let { data: e } = await Ue({ variables: { id: t } });
|
|
122
123
|
return e?.getConnection ?? null;
|
|
123
124
|
},
|
|
124
125
|
onSuccess: () => {
|
|
125
|
-
|
|
126
|
+
H(!0), y?.(t);
|
|
126
127
|
},
|
|
127
|
-
onError:
|
|
128
|
+
onError: B,
|
|
128
129
|
onSettled: () => {
|
|
129
|
-
G.current = null, W.current = null,
|
|
130
|
+
G.current = null, W.current = null, U(!1);
|
|
130
131
|
}
|
|
131
132
|
});
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
134
|
-
|
|
135
|
+
H(!0), y?.(t);
|
|
135
136
|
break;
|
|
136
137
|
}
|
|
137
138
|
case "minted":
|
|
138
|
-
|
|
139
|
+
$e === "service_account" && await Ve(t, X.length > 0 ? X : void 0), H(!0), y?.(t);
|
|
139
140
|
break;
|
|
140
141
|
default: {
|
|
141
|
-
if (Z && !
|
|
142
|
-
|
|
142
|
+
if (Z && !me(Z, L)) {
|
|
143
|
+
B("Please fill in all required fields");
|
|
143
144
|
return;
|
|
144
145
|
}
|
|
145
146
|
let e = {};
|
|
146
|
-
for (let [t, n] of Object.entries(
|
|
147
|
+
for (let [t, n] of Object.entries(ge(Z, L))) if (typeof n == "string") {
|
|
147
148
|
let r = n.trim();
|
|
148
149
|
r && (e[t] = r);
|
|
149
150
|
} else n != null && (e[t] = n);
|
|
150
|
-
await
|
|
151
|
+
await ze(t, I ?? void 0, e), H(!0), y?.(t);
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
} catch (e) {
|
|
154
|
-
|
|
155
|
+
B(e instanceof Error ? e.message : "Connection failed");
|
|
155
156
|
}
|
|
156
157
|
}, [
|
|
157
158
|
E,
|
|
158
159
|
M,
|
|
159
160
|
P,
|
|
160
|
-
|
|
161
|
+
I,
|
|
161
162
|
Y,
|
|
162
|
-
|
|
163
|
+
$e,
|
|
163
164
|
X,
|
|
164
165
|
Z,
|
|
165
|
-
|
|
166
|
+
L,
|
|
166
167
|
J,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
T,
|
|
169
|
+
Le,
|
|
170
|
+
Ue,
|
|
171
|
+
ze,
|
|
172
|
+
Ve,
|
|
172
173
|
b,
|
|
173
174
|
y,
|
|
174
|
-
|
|
175
|
-
]),
|
|
175
|
+
z
|
|
176
|
+
]), rt = [{
|
|
176
177
|
key: "connection",
|
|
177
178
|
label: "Connection",
|
|
178
|
-
icon:
|
|
179
|
+
icon: Ce
|
|
179
180
|
}, {
|
|
180
181
|
key: "details",
|
|
181
182
|
label: "Details",
|
|
182
|
-
icon:
|
|
183
|
+
icon: Se
|
|
183
184
|
}];
|
|
184
|
-
return g ? !
|
|
185
|
-
|
|
185
|
+
return g ? !Fe && !Pe ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
186
|
+
style: { zIndex: Oe },
|
|
187
|
+
className: "fixed inset-0 bg-bg-overlay animate-in fade-in-0 duration-200",
|
|
186
188
|
onClick: _
|
|
187
189
|
}), /* @__PURE__ */ h("div", {
|
|
188
190
|
role: "dialog",
|
|
189
191
|
"aria-modal": "true",
|
|
190
192
|
"aria-labelledby": "add-connection-denied-title",
|
|
191
|
-
|
|
193
|
+
style: { zIndex: ke },
|
|
194
|
+
className: "fixed inset-x-4 top-1/2 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",
|
|
192
195
|
children: [
|
|
193
196
|
/* @__PURE__ */ m(f, {
|
|
194
197
|
size: 40,
|
|
@@ -211,13 +214,15 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
211
214
|
})
|
|
212
215
|
]
|
|
213
216
|
})] }) : /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
214
|
-
|
|
217
|
+
style: { zIndex: Oe },
|
|
218
|
+
className: "fixed inset-0 bg-bg-overlay animate-in fade-in-0 duration-200",
|
|
215
219
|
onClick: _
|
|
216
220
|
}), /* @__PURE__ */ h("div", {
|
|
217
221
|
role: "dialog",
|
|
218
222
|
"aria-modal": "true",
|
|
219
223
|
"aria-labelledby": "add-connection-dialog-title",
|
|
220
|
-
|
|
224
|
+
style: { zIndex: ke },
|
|
225
|
+
className: "fixed inset-x-4 top-4 bottom-4 mx-auto flex w-auto max-w-3xl 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:max-h-[min(90vh,56rem)] sm:w-full sm:-translate-y-1/2",
|
|
221
226
|
children: [/* @__PURE__ */ h("div", {
|
|
222
227
|
className: "flex items-center justify-between px-5 py-4 border-b border-border-subtle flex-shrink-0",
|
|
223
228
|
children: [/* @__PURE__ */ m("div", {
|
|
@@ -242,21 +247,21 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
242
247
|
})] })
|
|
243
248
|
}), /* @__PURE__ */ h("div", {
|
|
244
249
|
className: "flex items-center gap-2",
|
|
245
|
-
children: [E && !O && !
|
|
250
|
+
children: [E && !O && !V && /* @__PURE__ */ h("button", {
|
|
246
251
|
type: "button",
|
|
247
|
-
onClick:
|
|
252
|
+
onClick: nt,
|
|
248
253
|
disabled: $ || !M.trim(),
|
|
249
254
|
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",
|
|
250
255
|
children: [$ ? /* @__PURE__ */ m(d, {
|
|
251
256
|
size: 14,
|
|
252
257
|
className: "animate-spin"
|
|
253
|
-
}) : /* @__PURE__ */ m(
|
|
258
|
+
}) : /* @__PURE__ */ m(ye, { size: 14 }), Ye ? "Waiting..." : "Save"]
|
|
254
259
|
}), /* @__PURE__ */ m("button", {
|
|
255
260
|
type: "button",
|
|
256
261
|
onClick: _,
|
|
257
262
|
className: "p-1.5 rounded-md hover:bg-accent transition-colors text-text-secondary hover:text-text-primary",
|
|
258
263
|
"aria-label": "Close",
|
|
259
|
-
children: /* @__PURE__ */ m(
|
|
264
|
+
children: /* @__PURE__ */ m(Te, { size: 20 })
|
|
260
265
|
})]
|
|
261
266
|
})]
|
|
262
267
|
}), /* @__PURE__ */ h("div", {
|
|
@@ -271,14 +276,14 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
271
276
|
}),
|
|
272
277
|
/* @__PURE__ */ h("div", {
|
|
273
278
|
className: "relative mb-4",
|
|
274
|
-
children: [/* @__PURE__ */ m(
|
|
279
|
+
children: [/* @__PURE__ */ m(we, {
|
|
275
280
|
size: 16,
|
|
276
281
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
277
282
|
}), /* @__PURE__ */ m("input", {
|
|
278
|
-
ref:
|
|
283
|
+
ref: Ze,
|
|
279
284
|
type: "text",
|
|
280
285
|
value: j,
|
|
281
|
-
onChange: (e) =>
|
|
286
|
+
onChange: (e) => Ge(e.target.value),
|
|
282
287
|
placeholder: "Search providers...",
|
|
283
288
|
"aria-label": "Search providers",
|
|
284
289
|
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"
|
|
@@ -290,18 +295,18 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
290
295
|
size: 24,
|
|
291
296
|
className: "animate-spin text-text-secondary"
|
|
292
297
|
})
|
|
293
|
-
}) : Q.length === 0 ? /* @__PURE__ */ m(
|
|
298
|
+
}) : Q.length === 0 ? /* @__PURE__ */ m(De, {
|
|
294
299
|
illustration: j ? "empty-search" : "empty-data",
|
|
295
300
|
title: j ? "No matching providers" : "No providers available",
|
|
296
301
|
description: j ? `No installed provider matches “${j}”. Try a different term.` : "Install and enable a provider from the catalog to create a connection."
|
|
297
302
|
}) : /* @__PURE__ */ m("div", {
|
|
298
303
|
className: "max-h-[400px] overflow-y-auto space-y-1",
|
|
299
|
-
children: Object.entries(
|
|
304
|
+
children: Object.entries(et).map(([e, t]) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
|
|
300
305
|
className: "px-2 py-1.5 text-xs font-semibold text-text-secondary uppercase tracking-wider",
|
|
301
306
|
children: i(e)
|
|
302
307
|
}), t.map((e) => /* @__PURE__ */ h("button", {
|
|
303
308
|
type: "button",
|
|
304
|
-
onClick: () =>
|
|
309
|
+
onClick: () => tt(e),
|
|
305
310
|
className: "w-full flex items-center gap-3 px-3 py-2.5 rounded-md hover:bg-accent/50 transition-colors text-left",
|
|
306
311
|
children: [/* @__PURE__ */ m(a, {
|
|
307
312
|
provider: e,
|
|
@@ -320,14 +325,14 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
320
325
|
})
|
|
321
326
|
]
|
|
322
327
|
}),
|
|
323
|
-
!O && !E &&
|
|
328
|
+
!O && !E && w && /* @__PURE__ */ m("div", {
|
|
324
329
|
className: "flex-1 flex items-center justify-center",
|
|
325
330
|
children: /* @__PURE__ */ m(d, {
|
|
326
331
|
size: 32,
|
|
327
332
|
className: "animate-spin text-text-secondary"
|
|
328
333
|
})
|
|
329
334
|
}),
|
|
330
|
-
!O && !E && !
|
|
335
|
+
!O && !E && !w && v && /* @__PURE__ */ h("div", {
|
|
331
336
|
className: "flex-1 flex flex-col items-center justify-center p-8 text-center",
|
|
332
337
|
children: [/* @__PURE__ */ m(u, {
|
|
333
338
|
size: 32,
|
|
@@ -337,12 +342,12 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
337
342
|
children: "This provider isn't available."
|
|
338
343
|
})]
|
|
339
344
|
}),
|
|
340
|
-
|
|
345
|
+
V && E && /* @__PURE__ */ h("div", {
|
|
341
346
|
className: "flex-1 flex flex-col items-center justify-center p-8 text-center",
|
|
342
347
|
children: [
|
|
343
348
|
/* @__PURE__ */ m("div", {
|
|
344
349
|
className: "p-3 rounded-full bg-status-success-bg-subtle mb-4",
|
|
345
|
-
children: /* @__PURE__ */ m(
|
|
350
|
+
children: /* @__PURE__ */ m(be, {
|
|
346
351
|
size: 48,
|
|
347
352
|
className: "text-status-success-text"
|
|
348
353
|
})
|
|
@@ -367,13 +372,13 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
367
372
|
})
|
|
368
373
|
]
|
|
369
374
|
}),
|
|
370
|
-
E && !O && !
|
|
375
|
+
E && !O && !V && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
371
376
|
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",
|
|
372
|
-
children:
|
|
377
|
+
children: rt.map((e) => {
|
|
373
378
|
let n = e.icon;
|
|
374
379
|
return /* @__PURE__ */ h("button", {
|
|
375
380
|
type: "button",
|
|
376
|
-
onClick: () =>
|
|
381
|
+
onClick: () => We(e.key),
|
|
377
382
|
className: t("flex min-w-max items-center gap-2 px-4 py-2 text-sm font-medium transition-colors sm:w-full", A === 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"),
|
|
378
383
|
children: [/* @__PURE__ */ m(n, { size: 16 }), e.label]
|
|
379
384
|
}, e.key);
|
|
@@ -383,14 +388,14 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
383
388
|
children: [A === "connection" && /* @__PURE__ */ h("div", {
|
|
384
389
|
className: "space-y-5",
|
|
385
390
|
children: [
|
|
386
|
-
|
|
391
|
+
Je && /* @__PURE__ */ h("div", {
|
|
387
392
|
className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-error-bg/10 border border-status-error-border/20",
|
|
388
393
|
children: [/* @__PURE__ */ m(u, {
|
|
389
394
|
size: 16,
|
|
390
395
|
className: "text-status-error-text flex-shrink-0"
|
|
391
396
|
}), /* @__PURE__ */ m("span", {
|
|
392
397
|
className: "text-sm text-status-error-text",
|
|
393
|
-
children:
|
|
398
|
+
children: Je
|
|
394
399
|
})]
|
|
395
400
|
}),
|
|
396
401
|
/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
|
|
@@ -419,53 +424,60 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
419
424
|
"aria-label": "Description",
|
|
420
425
|
type: "text",
|
|
421
426
|
value: P,
|
|
422
|
-
onChange: (e) =>
|
|
427
|
+
onChange: (e) => F(e.target.value),
|
|
423
428
|
placeholder: "Optional description",
|
|
424
429
|
disabled: $,
|
|
425
430
|
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"
|
|
426
431
|
})] }),
|
|
427
432
|
E.authType !== "service_account" && /* @__PURE__ */ m(le, {
|
|
428
|
-
value:
|
|
429
|
-
onChange:
|
|
433
|
+
value: z,
|
|
434
|
+
onChange: qe,
|
|
430
435
|
providerAuthType: E.authType
|
|
431
436
|
}),
|
|
432
437
|
/* @__PURE__ */ h("div", {
|
|
433
438
|
className: "rounded-md border border-border-subtle/50 bg-bg-surface p-4 space-y-3",
|
|
434
439
|
children: [
|
|
435
|
-
/* @__PURE__ */ h("
|
|
436
|
-
className: "
|
|
437
|
-
children: [
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
"
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
440
|
+
/* @__PURE__ */ h("div", {
|
|
441
|
+
className: "flex items-center justify-between gap-3",
|
|
442
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
443
|
+
className: "font-medium text-text-primary flex items-center gap-2 text-sm",
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ m(f, {
|
|
446
|
+
size: 16,
|
|
447
|
+
className: "text-primary"
|
|
448
|
+
}),
|
|
449
|
+
"Authentication",
|
|
450
|
+
q.length <= 1 && /* @__PURE__ */ h("span", {
|
|
451
|
+
className: "text-text-secondary font-normal",
|
|
452
|
+
children: [
|
|
453
|
+
"·",
|
|
454
|
+
" ",
|
|
455
|
+
J?.displayName ?? r(E.authType)
|
|
456
|
+
]
|
|
457
|
+
})
|
|
458
|
+
]
|
|
459
|
+
}), /* @__PURE__ */ m(de, {
|
|
460
|
+
methods: q,
|
|
461
|
+
selectedKey: I,
|
|
462
|
+
onSelect: Ke,
|
|
463
|
+
disabled: $,
|
|
464
|
+
idPrefix: K("auth-method"),
|
|
465
|
+
compact: !0
|
|
466
|
+
})]
|
|
452
467
|
}),
|
|
453
|
-
/* @__PURE__ */ m(
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
onSelect: We,
|
|
457
|
-
disabled: $,
|
|
458
|
-
idPrefix: K("auth-method")
|
|
468
|
+
/* @__PURE__ */ m("div", {
|
|
469
|
+
className: "space-y-2",
|
|
470
|
+
children: /* @__PURE__ */ m(ue, { method: J })
|
|
459
471
|
}),
|
|
460
|
-
Y === "oauth2" && /* @__PURE__ */ h(p, { children: [Z && /* @__PURE__ */ m(
|
|
472
|
+
Y === "oauth2" && /* @__PURE__ */ h(p, { children: [Z && /* @__PURE__ */ m(fe, {
|
|
461
473
|
schema: Z,
|
|
462
|
-
values:
|
|
463
|
-
onChange:
|
|
474
|
+
values: L,
|
|
475
|
+
onChange: R,
|
|
464
476
|
disabled: $,
|
|
465
477
|
idPrefix: K("oauth-cfg")
|
|
466
478
|
}), /* @__PURE__ */ h("div", {
|
|
467
479
|
className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-info-bg-subtle border border-border-default",
|
|
468
|
-
children: [/* @__PURE__ */ m(
|
|
480
|
+
children: [/* @__PURE__ */ m(xe, {
|
|
469
481
|
size: 14,
|
|
470
482
|
className: "text-status-info-text flex-shrink-0"
|
|
471
483
|
}), /* @__PURE__ */ h("span", {
|
|
@@ -490,10 +502,10 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
|
|
|
490
502
|
Y === "fields" && (Z ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("p", {
|
|
491
503
|
className: "text-xs text-text-secondary",
|
|
492
504
|
children: "Secret values are stored encrypted and never shown again."
|
|
493
|
-
}), /* @__PURE__ */ m(
|
|
505
|
+
}), /* @__PURE__ */ m(fe, {
|
|
494
506
|
schema: Z,
|
|
495
|
-
values:
|
|
496
|
-
onChange:
|
|
507
|
+
values: L,
|
|
508
|
+
onChange: R,
|
|
497
509
|
disabled: $,
|
|
498
510
|
idPrefix: K("cred")
|
|
499
511
|
})] }) : /* @__PURE__ */ h("div", {
|