@burdenoff/microfe-integrations 2026.807.1 → 2026.807.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AddConnectionDialog.d.ts","sourceRoot":"","sources":["../../../src/integrations/components/AddConnectionDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA+CH,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;AAQD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,mBAAmB,GACpB,EAAE,wBAAwB,sCAizB1B"}
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;AAQD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,mBAAmB,GACpB,EAAE,wBAAwB,sCA+1B1B"}
@@ -9,23 +9,23 @@ import { waitForOAuthPopupCompletion as ce } from "../utils/oauthPopup.js";
9
9
  import { CredentialStorageSelector as le } from "./CredentialStorageSelector.js";
10
10
  import { AuthMethodSelector as ue } from "./AuthMethodSelector.js";
11
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";
12
+ import { SchemaForm as de, initialValuesFromSchema as fe, isSchemaComplete as pe, parseFormSchema as me, visibleValues as he } from "./SchemaForm.js";
13
+ import { useCallback as ge, useEffect as o, useId as _e, useMemo as s, useRef as c, useState as l } from "react";
14
+ import { AlertCircle as u, Check as ve, CheckCircle2 as ye, ExternalLink as be, Info as xe, Link2 as Se, Loader2 as d, Search as Ce, Shield as f, X as we } from "lucide-react";
15
+ import { usePermissions as Te } 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 we } from "@burdenoff/fe-libs/ui";
17
+ import { IllustratedEmptyState as Ee } from "@burdenoff/fe-libs/ui";
18
18
  //#region src/integrations/components/AddConnectionDialog.tsx
19
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({
20
+ let { apiGatewayUrl: b } = e(), { providers: x, loading: S } = re(), C = s(() => v ? (x ?? []).find((e) => e.id === v) ?? null : null, [x, v]), { provider: De, loading: Oe } = ne(!S && v && !C ? v : ""), w = C ?? De, T = !!v && !w && (S || Oe), { hasPermission: ke, isLoading: Ae } = Te(), je = !Ae && ke(n.CONNECTION_CREATE), { createConnection: Me, loading: Ne } = oe(), { initiateOAuth: Pe, loading: Fe } = se(), { authenticateConnection: Ie, loading: Le } = ie(), { authenticateWithServiceAccount: Re, loading: ze } = ae(), [Be] = te({ fetchPolicy: "network-only" }), [E, D] = l(null), [O, k] = l(!v), [A, Ve] = l("connection"), [j, He] = l(""), [M, N] = l(""), [P, Ue] = l(""), [F, We] = l(null), [I, L] = l({}), [R, Ge] = l({
21
21
  mode: "managed",
22
22
  vaultId: "",
23
23
  secretId: "",
24
24
  managedSecretName: ""
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]);
25
+ }), [Ke, z] = l(""), [B, V] = l(!1), [qe, H] = l(!1), [, U] = l(null), W = c(null), G = c(null), Je = c(null), Ye = _e(), K = (e) => `${Ye}-${e}`, q = s(() => (E?.authMethods ?? []).filter((e) => e.isEnabled), [E]), J = s(() => q.find((e) => e.key === F) ?? q[0] ?? null, [q, F]), Y = J?.flow ?? ee(E?.authType), Xe = J?.authType ?? E?.authType, X = s(() => J?.defaultScopes?.length ? J.defaultScopes : E?.defaultScopes ?? [], [J, E]), Z = s(() => me(J?.configSchema ?? E?.configSchema), [J, E]);
26
26
  o(() => {
27
- R({}), B("");
28
- }, [I, D?.id]), o(() => {
27
+ L(fe(Z)), z("");
28
+ }, [F, E?.id]), o(() => {
29
29
  if (!g) return;
30
30
  let e = (e) => {
31
31
  e.key === "Escape" && _();
@@ -34,144 +34,154 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
34
34
  }, [g, _]), o(() => () => {
35
35
  G.current?.(), W.current && !W.current.closed && W.current.close();
36
36
  }, []), o(() => {
37
- g && (Re("connection"), ze(""), P(""), Be(""), Ve(null), R({}), He({
37
+ g && (Ve("connection"), He(""), N(""), Ue(""), We(null), L({}), Ge({
38
38
  mode: "managed",
39
39
  vaultId: "",
40
40
  secretId: "",
41
41
  managedSecretName: ""
42
- }), B(""), H(!1), U(!1), Ge(null), v ? (A(!1), O(null)) : (A(!0), O(null)));
42
+ }), z(""), V(!1), H(!1), U(null), v ? (k(!1), D(null)) : (k(!0), D(null)));
43
43
  }, [g, v]), o(() => {
44
- g && v && C && !D && (O(C), P(`${C.name} Connection`), A(!1));
44
+ g && v && w && !E && (D(w), N(`${w.name} Connection`), k(!1));
45
45
  }, [
46
46
  g,
47
47
  v,
48
- C,
49
- D
48
+ w,
49
+ E
50
50
  ]), o(() => {
51
- if (g && k) {
52
- let e = setTimeout(() => Ke.current?.focus(), 100);
51
+ if (g && O) {
52
+ let e = setTimeout(() => Je.current?.focus(), 100);
53
53
  return () => clearTimeout(e);
54
54
  }
55
- }, [g, k]);
55
+ }, [g, O]);
56
56
  let Q = s(() => {
57
57
  let e = (x ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
58
- if (!M.trim()) return e;
59
- let t = M.toLowerCase();
58
+ if (!j.trim()) return e;
59
+ let t = j.toLowerCase();
60
60
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t) || e.key.toLowerCase().includes(t));
61
- }, [x, M]), Ye = s(() => {
61
+ }, [x, j]), Ze = s(() => {
62
62
  let e = {};
63
63
  return Q.forEach((t) => {
64
64
  let n = t.category;
65
65
  e[n] || (e[n] = []), e[n].push(t);
66
66
  }), e;
67
- }, [Q]), Xe = me((e) => {
68
- O(e), P(`${e.name} Connection`), A(!1), B("");
69
- }, []), $ = je || Me || We || Pe || Ie, Ze = me(async () => {
70
- if (!D || !N.trim()) return;
67
+ }, [Q]), Qe = ge((e) => {
68
+ D(e), N(`${e.name} Connection`), k(!1), z("");
69
+ }, []), $ = Ne || Fe || qe || Le || ze, $e = ge(async () => {
70
+ if (!E || !M.trim()) return;
71
71
  let e = Y === "minted";
72
72
  if (!e) {
73
- if (!z.vaultId) {
74
- B("Please select a vault for this connection");
73
+ if (!R.vaultId) {
74
+ z("Please select a vault for this connection");
75
75
  return;
76
76
  }
77
- if (z.mode === "existing" && !z.secretId) {
78
- B("Please select an existing vault secret");
77
+ if (R.mode === "existing" && !R.secretId) {
78
+ z("Please select an existing vault secret");
79
79
  return;
80
80
  }
81
81
  }
82
+ if (Y === "oauth2" && Z && !pe(Z, I)) {
83
+ z("Please fill in all required fields");
84
+ return;
85
+ }
86
+ if (J && !J.isConfigured) {
87
+ z("This authentication method is not configured in this environment. Ask an administrator to add its credentials, or pick another method.");
88
+ return;
89
+ }
82
90
  try {
83
- B("");
84
- let t = await T({
85
- name: N.trim(),
86
- description: F.trim() || void 0,
87
- providerId: D.id,
88
- authMethodKey: I ?? void 0,
91
+ z("");
92
+ let t = await Me({
93
+ name: M.trim(),
94
+ description: P.trim() || void 0,
95
+ providerId: E.id,
96
+ authMethodKey: F ?? void 0,
97
+ ...Y === "oauth2" && Z ? { config: he(Z, I) } : {},
89
98
  ...e ? {} : {
90
- vaultId: z.vaultId,
91
- credentialSecretId: z.mode === "existing" ? z.secretId : void 0,
92
- managedSecretName: z.mode === "managed" && z.managedSecretName.trim() || void 0
99
+ vaultId: R.vaultId,
100
+ credentialSecretId: R.mode === "existing" ? R.secretId : void 0,
101
+ managedSecretName: R.mode === "managed" && R.managedSecretName.trim() || void 0
93
102
  }
94
103
  });
95
104
  if (!t) {
96
- B("Failed to create connection");
105
+ z("Failed to create connection");
97
106
  return;
98
107
  }
99
- switch (Ge(t), Y) {
108
+ switch (U(t), Y) {
100
109
  case "oauth2": {
101
- let e = await E(t, b ? `${b}/integrations/oauth/callback` : "/integrations/oauth/callback", D.key);
110
+ let e = await Pe(t, b ? `${b}/integrations/oauth/callback` : "/integrations/oauth/callback", E.key);
102
111
  if (e?.redirectUrl) {
103
112
  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`);
104
113
  if (!i) {
105
- B("Popup was blocked. Please allow popups for this site and try again.");
114
+ z("Popup was blocked. Please allow popups for this site and try again.");
106
115
  return;
107
116
  }
108
- W.current = i, U(!0), G.current?.(), G.current = ce({
117
+ W.current = i, H(!0), G.current?.(), G.current = ce({
109
118
  connectionId: t,
110
119
  popup: i,
111
120
  fetchConnectionStatus: async () => {
112
- let { data: e } = await Le({ variables: { id: t } });
121
+ let { data: e } = await Be({ variables: { id: t } });
113
122
  return e?.getConnection ?? null;
114
123
  },
115
124
  onSuccess: () => {
116
- H(!0), y?.(t);
125
+ V(!0), y?.(t);
117
126
  },
118
- onError: B,
127
+ onError: z,
119
128
  onSettled: () => {
120
- G.current = null, W.current = null, U(!1);
129
+ G.current = null, W.current = null, H(!1);
121
130
  }
122
131
  });
123
132
  return;
124
133
  }
125
- H(!0), y?.(t);
134
+ V(!0), y?.(t);
126
135
  break;
127
136
  }
128
137
  case "minted":
129
- Je === "service_account" && await Fe(t, X.length > 0 ? X : void 0), H(!0), y?.(t);
138
+ Xe === "service_account" && await Re(t, X.length > 0 ? X : void 0), V(!0), y?.(t);
130
139
  break;
131
140
  default: {
132
- if (Z && !fe(Z, L)) {
133
- B("Please fill in all required fields");
141
+ if (Z && !pe(Z, I)) {
142
+ z("Please fill in all required fields");
134
143
  return;
135
144
  }
136
145
  let e = {};
137
- for (let [t, n] of Object.entries(L)) if (typeof n == "string") {
146
+ for (let [t, n] of Object.entries(he(Z, I))) if (typeof n == "string") {
138
147
  let r = n.trim();
139
148
  r && (e[t] = r);
140
149
  } else n != null && (e[t] = n);
141
- await Ne(t, I ?? void 0, e), H(!0), y?.(t);
150
+ await Ie(t, F ?? void 0, e), V(!0), y?.(t);
142
151
  }
143
152
  }
144
153
  } catch (e) {
145
- B(e instanceof Error ? e.message : "Connection failed");
154
+ z(e instanceof Error ? e.message : "Connection failed");
146
155
  }
147
156
  }, [
148
- D,
149
- N,
157
+ E,
158
+ M,
159
+ P,
150
160
  F,
151
- I,
152
161
  Y,
153
- Je,
162
+ Xe,
154
163
  X,
155
164
  Z,
156
- L,
157
- T,
158
- E,
159
- Le,
160
- Ne,
161
- Fe,
165
+ I,
166
+ J,
167
+ Me,
168
+ Pe,
169
+ Be,
170
+ Ie,
171
+ Re,
162
172
  b,
163
173
  y,
164
- z
165
- ]), Qe = [{
174
+ R
175
+ ]), et = [{
166
176
  key: "connection",
167
177
  label: "Connection",
168
- icon: be
178
+ icon: Se
169
179
  }, {
170
180
  key: "details",
171
181
  label: "Details",
172
- icon: ye
182
+ icon: xe
173
183
  }];
174
- return g ? !Ae && !w ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
184
+ return g ? !je && !Ae ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
175
185
  className: "fixed inset-0 bg-bg-overlay z-50 animate-in fade-in-0 duration-200",
176
186
  onClick: _
177
187
  }), /* @__PURE__ */ h("div", {
@@ -212,16 +222,16 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
212
222
  className: "flex items-center justify-between px-5 py-4 border-b border-border-subtle flex-shrink-0",
213
223
  children: [/* @__PURE__ */ m("div", {
214
224
  className: "flex items-center gap-3",
215
- children: D && !k ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
216
- provider: D,
225
+ children: E && !O ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
226
+ provider: E,
217
227
  size: 32
218
228
  }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("h2", {
219
229
  id: "add-connection-dialog-title",
220
230
  className: "text-base font-semibold text-text-primary",
221
- children: [D.name, " account"]
231
+ children: [E.name, " account"]
222
232
  }), /* @__PURE__ */ m("p", {
223
233
  className: "text-xs text-text-secondary",
224
- children: r(D.authType)
234
+ children: r(E.authType)
225
235
  })] })] }) : /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h2", {
226
236
  id: "add-connection-dialog-title",
227
237
  className: "text-base font-semibold text-text-primary",
@@ -232,27 +242,27 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
232
242
  })] })
233
243
  }), /* @__PURE__ */ h("div", {
234
244
  className: "flex items-center gap-2",
235
- children: [D && !k && !V && /* @__PURE__ */ h("button", {
245
+ children: [E && !O && !B && /* @__PURE__ */ h("button", {
236
246
  type: "button",
237
- onClick: Ze,
238
- disabled: $ || !N.trim(),
247
+ onClick: $e,
248
+ disabled: $ || !M.trim(),
239
249
  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",
240
250
  children: [$ ? /* @__PURE__ */ m(d, {
241
251
  size: 14,
242
252
  className: "animate-spin"
243
- }) : /* @__PURE__ */ m(ge, { size: 14 }), We ? "Waiting..." : "Save"]
253
+ }) : /* @__PURE__ */ m(ve, { size: 14 }), qe ? "Waiting..." : "Save"]
244
254
  }), /* @__PURE__ */ m("button", {
245
255
  type: "button",
246
256
  onClick: _,
247
257
  className: "p-1.5 rounded-md hover:bg-accent transition-colors text-text-secondary hover:text-text-primary",
248
258
  "aria-label": "Close",
249
- children: /* @__PURE__ */ m(Se, { size: 20 })
259
+ children: /* @__PURE__ */ m(we, { size: 20 })
250
260
  })]
251
261
  })]
252
262
  }), /* @__PURE__ */ h("div", {
253
263
  className: "flex flex-1 min-h-0 overflow-hidden",
254
264
  children: [
255
- k && !D && /* @__PURE__ */ h("div", {
265
+ O && !E && /* @__PURE__ */ h("div", {
256
266
  className: "flex-1 p-5 overflow-y-auto",
257
267
  children: [
258
268
  /* @__PURE__ */ m("p", {
@@ -261,14 +271,14 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
261
271
  }),
262
272
  /* @__PURE__ */ h("div", {
263
273
  className: "relative mb-4",
264
- children: [/* @__PURE__ */ m(xe, {
274
+ children: [/* @__PURE__ */ m(Ce, {
265
275
  size: 16,
266
276
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
267
277
  }), /* @__PURE__ */ m("input", {
268
- ref: Ke,
278
+ ref: Je,
269
279
  type: "text",
270
- value: M,
271
- onChange: (e) => ze(e.target.value),
280
+ value: j,
281
+ onChange: (e) => He(e.target.value),
272
282
  placeholder: "Search providers...",
273
283
  "aria-label": "Search providers",
274
284
  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"
@@ -280,18 +290,18 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
280
290
  size: 24,
281
291
  className: "animate-spin text-text-secondary"
282
292
  })
283
- }) : Q.length === 0 ? /* @__PURE__ */ m(we, {
284
- illustration: M ? "empty-search" : "empty-data",
285
- title: M ? "No matching providers" : "No providers available",
286
- description: M ? `No installed provider matches “${M}”. Try a different term.` : "Install and enable a provider from the catalog to create a connection."
293
+ }) : Q.length === 0 ? /* @__PURE__ */ m(Ee, {
294
+ illustration: j ? "empty-search" : "empty-data",
295
+ title: j ? "No matching providers" : "No providers available",
296
+ description: j ? `No installed provider matches “${j}”. Try a different term.` : "Install and enable a provider from the catalog to create a connection."
287
297
  }) : /* @__PURE__ */ m("div", {
288
298
  className: "max-h-[400px] overflow-y-auto space-y-1",
289
- children: Object.entries(Ye).map(([e, t]) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
299
+ children: Object.entries(Ze).map(([e, t]) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
290
300
  className: "px-2 py-1.5 text-xs font-semibold text-text-secondary uppercase tracking-wider",
291
301
  children: i(e)
292
302
  }), t.map((e) => /* @__PURE__ */ h("button", {
293
303
  type: "button",
294
- onClick: () => Xe(e),
304
+ onClick: () => Qe(e),
295
305
  className: "w-full flex items-center gap-3 px-3 py-2.5 rounded-md hover:bg-accent/50 transition-colors text-left",
296
306
  children: [/* @__PURE__ */ m(a, {
297
307
  provider: e,
@@ -310,14 +320,14 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
310
320
  })
311
321
  ]
312
322
  }),
313
- !k && !D && Oe && /* @__PURE__ */ m("div", {
323
+ !O && !E && T && /* @__PURE__ */ m("div", {
314
324
  className: "flex-1 flex items-center justify-center",
315
325
  children: /* @__PURE__ */ m(d, {
316
326
  size: 32,
317
327
  className: "animate-spin text-text-secondary"
318
328
  })
319
329
  }),
320
- !k && !D && !Oe && v && /* @__PURE__ */ h("div", {
330
+ !O && !E && !T && v && /* @__PURE__ */ h("div", {
321
331
  className: "flex-1 flex flex-col items-center justify-center p-8 text-center",
322
332
  children: [/* @__PURE__ */ m(u, {
323
333
  size: 32,
@@ -327,12 +337,12 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
327
337
  children: "This provider isn't available."
328
338
  })]
329
339
  }),
330
- V && D && /* @__PURE__ */ h("div", {
340
+ B && E && /* @__PURE__ */ h("div", {
331
341
  className: "flex-1 flex flex-col items-center justify-center p-8 text-center",
332
342
  children: [
333
343
  /* @__PURE__ */ m("div", {
334
344
  className: "p-3 rounded-full bg-status-success-bg-subtle mb-4",
335
- children: /* @__PURE__ */ m(_e, {
345
+ children: /* @__PURE__ */ m(ye, {
336
346
  size: 48,
337
347
  className: "text-status-success-text"
338
348
  })
@@ -345,7 +355,7 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
345
355
  className: "text-sm text-text-secondary mb-6",
346
356
  children: [
347
357
  "Your ",
348
- D.name,
358
+ E.name,
349
359
  " connection has been set up successfully."
350
360
  ]
351
361
  }),
@@ -357,30 +367,30 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
357
367
  })
358
368
  ]
359
369
  }),
360
- D && !k && !V && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
370
+ E && !O && !B && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
361
371
  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",
362
- children: Qe.map((e) => {
372
+ children: et.map((e) => {
363
373
  let n = e.icon;
364
374
  return /* @__PURE__ */ h("button", {
365
375
  type: "button",
366
- onClick: () => Re(e.key),
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"),
376
+ onClick: () => Ve(e.key),
377
+ 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"),
368
378
  children: [/* @__PURE__ */ m(n, { size: 16 }), e.label]
369
379
  }, e.key);
370
380
  })
371
381
  }), /* @__PURE__ */ h("div", {
372
382
  className: "flex-1 p-5 overflow-y-auto",
373
- children: [j === "connection" && /* @__PURE__ */ h("div", {
383
+ children: [A === "connection" && /* @__PURE__ */ h("div", {
374
384
  className: "space-y-5",
375
385
  children: [
376
- Ue && /* @__PURE__ */ h("div", {
386
+ Ke && /* @__PURE__ */ h("div", {
377
387
  className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-error-bg/10 border border-status-error-border/20",
378
388
  children: [/* @__PURE__ */ m(u, {
379
389
  size: 16,
380
390
  className: "text-status-error-text flex-shrink-0"
381
391
  }), /* @__PURE__ */ m("span", {
382
392
  className: "text-sm text-status-error-text",
383
- children: Ue
393
+ children: Ke
384
394
  })]
385
395
  }),
386
396
  /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("label", {
@@ -394,9 +404,9 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
394
404
  id: K("conn-name"),
395
405
  "aria-label": "Connection Name",
396
406
  type: "text",
397
- value: N,
398
- onChange: (e) => P(e.target.value),
399
- placeholder: `My ${D.name} Connection`,
407
+ value: M,
408
+ onChange: (e) => N(e.target.value),
409
+ placeholder: `My ${E.name} Connection`,
400
410
  disabled: $,
401
411
  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"
402
412
  })] }),
@@ -408,16 +418,16 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
408
418
  id: K("conn-desc"),
409
419
  "aria-label": "Description",
410
420
  type: "text",
411
- value: F,
412
- onChange: (e) => Be(e.target.value),
421
+ value: P,
422
+ onChange: (e) => Ue(e.target.value),
413
423
  placeholder: "Optional description",
414
424
  disabled: $,
415
425
  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"
416
426
  })] }),
417
- D.authType !== "service_account" && /* @__PURE__ */ m(le, {
418
- value: z,
419
- onChange: He,
420
- providerAuthType: D.authType
427
+ E.authType !== "service_account" && /* @__PURE__ */ m(le, {
428
+ value: R,
429
+ onChange: Ge,
430
+ providerAuthType: E.authType
421
431
  }),
422
432
  /* @__PURE__ */ h("div", {
423
433
  className: "rounded-md border border-border-subtle/50 bg-bg-surface p-4 space-y-3",
@@ -435,7 +445,7 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
435
445
  children: [
436
446
  "·",
437
447
  " ",
438
- J?.displayName ?? r(D.authType)
448
+ J?.displayName ?? r(E.authType)
439
449
  ]
440
450
  })
441
451
  ]
@@ -443,24 +453,30 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
443
453
  /* @__PURE__ */ m(ue, {
444
454
  methods: q,
445
455
  selectedKey: J?.key ?? null,
446
- onSelect: Ve,
456
+ onSelect: We,
447
457
  disabled: $,
448
458
  idPrefix: K("auth-method")
449
459
  }),
450
- Y === "oauth2" && /* @__PURE__ */ h("div", {
460
+ Y === "oauth2" && /* @__PURE__ */ h(p, { children: [Z && /* @__PURE__ */ m(de, {
461
+ schema: Z,
462
+ values: I,
463
+ onChange: L,
464
+ disabled: $,
465
+ idPrefix: K("oauth-cfg")
466
+ }), /* @__PURE__ */ h("div", {
451
467
  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, {
468
+ children: [/* @__PURE__ */ m(be, {
453
469
  size: 14,
454
470
  className: "text-status-info-text flex-shrink-0"
455
471
  }), /* @__PURE__ */ h("span", {
456
472
  className: "text-xs text-status-info-text",
457
473
  children: [
458
474
  "A popup window will open for ",
459
- D.name,
475
+ E.name,
460
476
  " sign-in"
461
477
  ]
462
478
  })]
463
- }),
479
+ })] }),
464
480
  Y === "minted" && /* @__PURE__ */ h("div", {
465
481
  className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-info-bg-subtle border border-border-default",
466
482
  children: [/* @__PURE__ */ m(f, {
@@ -476,8 +492,8 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
476
492
  children: "Secret values are stored encrypted and never shown again."
477
493
  }), /* @__PURE__ */ m(de, {
478
494
  schema: Z,
479
- values: L,
480
- onChange: R,
495
+ values: I,
496
+ onChange: L,
481
497
  disabled: $,
482
498
  idPrefix: K("cred")
483
499
  })] }) : /* @__PURE__ */ h("div", {
@@ -493,7 +509,7 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
493
509
  ]
494
510
  })
495
511
  ]
496
- }), j === "details" && /* @__PURE__ */ h("div", {
512
+ }), A === "details" && /* @__PURE__ */ h("div", {
497
513
  className: "space-y-4",
498
514
  children: [/* @__PURE__ */ m("h3", {
499
515
  className: "text-sm font-semibold text-text-primary",
@@ -504,47 +520,47 @@ function g({ open: g, onClose: _, preselectedProviderId: v, onConnectionCreated:
504
520
  /* @__PURE__ */ h("div", {
505
521
  className: "flex items-center gap-3 p-3 rounded-md border border-border-subtle",
506
522
  children: [/* @__PURE__ */ m(a, {
507
- provider: D,
523
+ provider: E,
508
524
  size: 40
509
525
  }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("p", {
510
526
  className: "text-sm font-medium text-text-primary",
511
- children: D.name
527
+ children: E.name
512
528
  }), /* @__PURE__ */ h("p", {
513
529
  className: "text-xs text-text-secondary",
514
530
  children: [
515
- r(D.authType),
531
+ r(E.authType),
516
532
  " ·",
517
533
  " ",
518
- i(D.category)
534
+ i(E.category)
519
535
  ]
520
536
  })] })]
521
537
  }),
522
- D.description && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
538
+ E.description && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
523
539
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider",
524
540
  children: "Description"
525
541
  }), /* @__PURE__ */ m("p", {
526
542
  className: "text-sm text-text-primary mt-1",
527
- children: D.description
543
+ children: E.description
528
544
  })] }),
529
- D.website && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
545
+ E.website && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
530
546
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider",
531
547
  children: "Website"
532
548
  }), /* @__PURE__ */ m("a", {
533
- href: D.website,
549
+ href: E.website,
534
550
  target: "_blank",
535
551
  rel: "noopener noreferrer",
536
552
  className: "block text-sm text-primary hover:underline mt-1",
537
- children: D.website
553
+ children: E.website
538
554
  })] }),
539
- D.docsUrl && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
555
+ E.docsUrl && /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("div", {
540
556
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider",
541
557
  children: "Documentation"
542
558
  }), /* @__PURE__ */ m("a", {
543
- href: D.docsUrl,
559
+ href: E.docsUrl,
544
560
  target: "_blank",
545
561
  rel: "noopener noreferrer",
546
562
  className: "block text-sm text-primary hover:underline mt-1",
547
- children: D.docsUrl
563
+ children: E.docsUrl
548
564
  })] })
549
565
  ]
550
566
  })]