@burdenoff/microfe-integrations 2026.801.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.
Files changed (54) hide show
  1. package/dist/generated/wspace-operations.d.ts +351 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +131 -71
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +70519 -34096
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
  8. package/dist/integrations/components/AddConnectionDialog.js +238 -484
  9. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  10. package/dist/integrations/components/AuthMethodSelector.d.ts +13 -0
  11. package/dist/integrations/components/AuthMethodSelector.d.ts.map +1 -0
  12. package/dist/integrations/components/AuthMethodSelector.js +48 -0
  13. package/dist/integrations/components/AuthMethodSelector.js.map +1 -0
  14. package/dist/integrations/components/AuthMethodsEditor.d.ts +10 -0
  15. package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -0
  16. package/dist/integrations/components/AuthMethodsEditor.js +388 -0
  17. package/dist/integrations/components/AuthMethodsEditor.js.map +1 -0
  18. package/dist/integrations/components/ProviderIcon.d.ts +5 -4
  19. package/dist/integrations/components/ProviderIcon.d.ts.map +1 -1
  20. package/dist/integrations/components/ProviderIcon.js +18 -14
  21. package/dist/integrations/components/ProviderIcon.js.map +1 -1
  22. package/dist/integrations/components/SchemaForm.d.ts +43 -0
  23. package/dist/integrations/components/SchemaForm.d.ts.map +1 -0
  24. package/dist/integrations/components/SchemaForm.js +170 -0
  25. package/dist/integrations/components/SchemaForm.js.map +1 -0
  26. package/dist/integrations/hooks/useConnections.d.ts +12 -0
  27. package/dist/integrations/hooks/useConnections.d.ts.map +1 -1
  28. package/dist/integrations/hooks/useConnections.js +63 -52
  29. package/dist/integrations/hooks/useConnections.js.map +1 -1
  30. package/dist/integrations/hooks/useProviders.d.ts +27 -0
  31. package/dist/integrations/hooks/useProviders.d.ts.map +1 -1
  32. package/dist/integrations/hooks/useProviders.js +49 -33
  33. package/dist/integrations/hooks/useProviders.js.map +1 -1
  34. package/dist/integrations/pages/ConnectionsList.js +7 -7
  35. package/dist/integrations/pages/ProviderCatalog.js +10 -10
  36. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  37. package/dist/integrations/pages/ProviderEditorPage.d.ts.map +1 -1
  38. package/dist/integrations/pages/ProviderEditorPage.js +326 -315
  39. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  40. package/dist/integrations/types/index.d.ts +24 -0
  41. package/dist/integrations/types/index.d.ts.map +1 -1
  42. package/dist/integrations/utils/constants.d.ts +12 -13
  43. package/dist/integrations/utils/constants.d.ts.map +1 -1
  44. package/dist/integrations/utils/constants.js +1 -18
  45. package/dist/integrations/utils/constants.js.map +1 -1
  46. package/dist/integrations/utils/integrationsHelpers.d.ts +7 -0
  47. package/dist/integrations/utils/integrationsHelpers.d.ts.map +1 -1
  48. package/dist/integrations/utils/integrationsHelpers.js +4 -1
  49. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  50. package/dist/integrations/utils/mappers.d.ts +0 -3
  51. package/dist/integrations/utils/mappers.d.ts.map +1 -1
  52. package/dist/integrations/utils/mappers.js +24 -4
  53. package/dist/integrations/utils/mappers.js.map +1 -1
  54. package/package.json +2 -2
@@ -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, parseConfigSchema as a } from "../utils/integrationsHelpers.js";
5
- import { useGetConnectionLazyQuery as ee } from "../../generated/wspace-operations.js";
6
- import { useProvider as te, useProviders as ne } from "../hooks/useProviders.js";
7
- import { useAuthenticateWithApiKey as re, useAuthenticateWithBasicAuth as ie, useAuthenticateWithBearerToken as ae, useAuthenticateWithCustomConfig as oe, useAuthenticateWithServiceAccount as se, useCreateConnection as ce, useInitiateOAuth as le } from "../hooks/useConnections.js";
8
- import { waitForOAuthPopupCompletion as ue } from "../utils/oauthPopup.js";
9
- import { CredentialStorageSelector as de } from "./CredentialStorageSelector.js";
10
- import { ProviderIcon as o } from "./ProviderIcon.js";
11
- import { useCallback as fe, useEffect as s, useId as pe, useMemo as c, useRef as l, useState as u } from "react";
12
- import { AlertCircle as d, Check as me, CheckCircle2 as he, ExternalLink as ge, Info as _e, Key as f, Link2 as ve, Loader2 as p, Lock as m, Search as ye, Shield as be, X as xe } from "lucide-react";
13
- import { usePermissions as Se } from "@burdenoff/fe-libs/shared/providers/shell";
14
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
15
- import { IllustratedEmptyState as Ce } from "@burdenoff/fe-libs/ui";
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 v({ open: v, onClose: y, preselectedProviderId: b, onConnectionCreated: x }) {
18
- let { apiGatewayUrl: S } = e(), { providers: C, loading: w } = ne(), we = c(() => b ? (C ?? []).find((e) => e.id === b) ?? null : null, [C, b]), { provider: Te, loading: Ee } = te(!w && b && !we ? b : ""), T = we ?? Te, De = !!b && !T && (w || Ee), { hasPermission: Oe, isLoading: ke } = Se(), Ae = !ke && Oe(n.CONNECTION_CREATE), { createConnection: je, loading: Me } = ce(), { initiateOAuth: Ne, loading: Pe } = le(), { authenticateWithApiKey: Fe, loading: Ie } = re(), { authenticateWithBasicAuth: Le, loading: Re } = ie(), { authenticateWithBearerToken: ze, loading: Be } = ae(), { authenticateWithServiceAccount: Ve, loading: He } = se(), { authenticateWithCustomConfig: Ue, loading: We } = oe(), [E] = ee({ fetchPolicy: "network-only" }), [D, O] = u(null), [k, A] = u(!b), [j, Ge] = u("connection"), [M, Ke] = u(""), [N, P] = u(""), [F, qe] = u(""), [I, Je] = u(""), [L, Ye] = u(""), [R, Xe] = u(""), [z, Ze] = u(""), [B, V] = u({}), [H, Qe] = u({
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
- }), [U, $e] = u(!1), [et, W] = u(""), [G, K] = u(!1), [q, J] = u(!1), [, tt] = u(null), Y = l(null), X = l(null), nt = l(null), rt = pe(), Z = (e) => `${rt}-${e}`;
24
- s(() => {
25
- if (!v) return;
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" && y();
31
+ e.key === "Escape" && _();
28
32
  };
29
33
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
30
- }, [v, y]), s(() => () => {
31
- X.current?.(), Y.current && !Y.current.closed && Y.current.close();
32
- }, []), s(() => {
33
- v && (Ge("connection"), Ke(""), P(""), qe(""), Je(""), Ye(""), Xe(""), Ze(""), V({}), Qe({
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
- }), $e(!1), W(""), K(!1), J(!1), tt(null), b ? (A(!1), O(null)) : (A(!0), O(null)));
39
- }, [v, b]), s(() => {
40
- v && b && T && !D && (O(T), P(`${T.name} Connection`), A(!1));
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
- b,
44
- T,
48
+ C,
45
49
  D
46
- ]), s(() => {
47
- if (v && k) {
48
- let e = setTimeout(() => nt.current?.focus(), 100);
50
+ ]), o(() => {
51
+ if (g && k) {
52
+ let e = setTimeout(() => Ke.current?.focus(), 100);
49
53
  return () => clearTimeout(e);
50
54
  }
51
- }, [v, k]);
52
- let Q = c(() => {
53
- let e = (C ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
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
- }, [C, M]), it = c(() => {
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]), at = fe((e) => {
64
- O(e), P(`${e.name} Connection`), A(!1), W("");
65
- }, []), $ = Me || Pe || q || Ie || Re || Be || He || We, ot = fe(async () => {
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 = D.authType === "service_account";
71
+ let e = Y === "minted";
68
72
  if (!e) {
69
- if (!H.vaultId) {
70
- W("Please select a vault for this connection");
73
+ if (!z.vaultId) {
74
+ B("Please select a vault for this connection");
71
75
  return;
72
76
  }
73
- if (H.mode === "existing" && !H.secretId) {
74
- W("Please select an existing vault secret");
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
- W("");
80
- let t = await je({
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: H.vaultId,
86
- credentialSecretId: H.mode === "existing" ? H.secretId : void 0,
87
- managedSecretName: H.mode === "managed" && H.managedSecretName.trim() || void 0
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
- W("Failed to create connection");
96
+ B("Failed to create connection");
92
97
  return;
93
98
  }
94
- switch (tt(t), D.authType) {
99
+ switch (Ge(t), Y) {
95
100
  case "oauth2": {
96
- let e = await Ne(t, S ? `${S}/integrations/oauth/callback` : "/integrations/oauth/callback", D.key);
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
- W("Popup was blocked. Please allow popups for this site and try again.");
105
+ B("Popup was blocked. Please allow popups for this site and try again.");
101
106
  return;
102
107
  }
103
- Y.current = i, J(!0), X.current?.(), X.current = ue({
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 E({ variables: { id: t } });
112
+ let { data: e } = await Le({ variables: { id: t } });
108
113
  return e?.getConnection ?? null;
109
114
  },
110
115
  onSuccess: () => {
111
- K(!0), x?.(t);
116
+ H(!0), y?.(t);
112
117
  },
113
- onError: W,
118
+ onError: B,
114
119
  onSettled: () => {
115
- X.current = null, Y.current = null, J(!1);
120
+ G.current = null, W.current = null, U(!1);
116
121
  }
117
122
  });
118
123
  return;
119
124
  }
120
- K(!0), x?.(t);
125
+ H(!0), y?.(t);
121
126
  break;
122
127
  }
123
- case "api_key":
124
- if (!I.trim()) {
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
- case "custom": {
148
- let e = a(D.configSchema);
149
- if (!e) {
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
- for (let t of e.required) if (!B[t]?.trim()) {
154
- W(`${e.properties[t]?.title ?? t} is required`);
155
- return;
156
- }
157
- let n = {};
158
- for (let t of Object.keys(e.properties)) {
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
- W(e instanceof Error ? e.message : "Connection failed");
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
- R,
177
- z,
178
- B,
179
- je,
180
- Ne,
157
+ T,
181
158
  E,
182
- Fe,
183
159
  Le,
184
- ze,
185
- Ve,
186
- Ue,
187
- S,
188
- x,
189
- H
190
- ]), st = [{
160
+ Ne,
161
+ Fe,
162
+ b,
163
+ y,
164
+ z
165
+ ]), Qe = [{
191
166
  key: "connection",
192
167
  label: "Connection",
193
- icon: ve
168
+ icon: be
194
169
  }, {
195
170
  key: "details",
196
171
  label: "Details",
197
- icon: _e
172
+ icon: ye
198
173
  }];
199
- return v ? !Ae && !ke ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
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: y
202
- }), /* @__PURE__ */ _("div", {
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__ */ g(be, {
183
+ /* @__PURE__ */ m(f, {
209
184
  size: 40,
210
185
  className: "text-text-secondary"
211
186
  }),
212
- /* @__PURE__ */ g("h2", {
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__ */ g("p", {
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__ */ g("button", {
196
+ /* @__PURE__ */ m("button", {
222
197
  type: "button",
223
- onClick: y,
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__ */ _(h, { children: [/* @__PURE__ */ g("div", {
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: y
231
- }), /* @__PURE__ */ _("div", {
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__ */ _("div", {
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__ */ g("div", {
213
+ children: [/* @__PURE__ */ m("div", {
239
214
  className: "flex items-center gap-3",
240
- children: D && !k ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(o, {
215
+ children: D && !k ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
241
216
  provider: D,
242
217
  size: 32
243
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("h2", {
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__ */ g("p", {
222
+ }), /* @__PURE__ */ m("p", {
248
223
  className: "text-xs text-text-secondary",
249
224
  children: r(D.authType)
250
- })] })] }) : /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h2", {
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__ */ g("p", {
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__ */ _("div", {
233
+ }), /* @__PURE__ */ h("div", {
259
234
  className: "flex items-center gap-2",
260
- children: [D && !k && !G && /* @__PURE__ */ _("button", {
235
+ children: [D && !k && !V && /* @__PURE__ */ h("button", {
261
236
  type: "button",
262
- onClick: ot,
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__ */ g(p, {
240
+ children: [$ ? /* @__PURE__ */ m(d, {
266
241
  size: 14,
267
242
  className: "animate-spin"
268
- }) : /* @__PURE__ */ g(me, { size: 14 }), q ? "Waiting..." : "Save"]
269
- }), /* @__PURE__ */ g("button", {
243
+ }) : /* @__PURE__ */ m(ge, { size: 14 }), We ? "Waiting..." : "Save"]
244
+ }), /* @__PURE__ */ m("button", {
270
245
  type: "button",
271
- onClick: y,
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__ */ g(xe, { size: 20 })
249
+ children: /* @__PURE__ */ m(Se, { size: 20 })
275
250
  })]
276
251
  })]
277
- }), /* @__PURE__ */ _("div", {
252
+ }), /* @__PURE__ */ h("div", {
278
253
  className: "flex flex-1 min-h-0 overflow-hidden",
279
254
  children: [
280
- k && !D && /* @__PURE__ */ _("div", {
255
+ k && !D && /* @__PURE__ */ h("div", {
281
256
  className: "flex-1 p-5 overflow-y-auto",
282
257
  children: [
283
- /* @__PURE__ */ g("p", {
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__ */ _("div", {
262
+ /* @__PURE__ */ h("div", {
288
263
  className: "relative mb-4",
289
- children: [/* @__PURE__ */ g(ye, {
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__ */ g("input", {
293
- ref: nt,
267
+ }), /* @__PURE__ */ m("input", {
268
+ ref: Ke,
294
269
  type: "text",
295
270
  value: M,
296
- onChange: (e) => Ke(e.target.value),
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
- w ? /* @__PURE__ */ g("div", {
277
+ S ? /* @__PURE__ */ m("div", {
303
278
  className: "flex items-center justify-center py-8",
304
- children: /* @__PURE__ */ g(p, {
279
+ children: /* @__PURE__ */ m(d, {
305
280
  size: 24,
306
281
  className: "animate-spin text-text-secondary"
307
282
  })
308
- }) : Q.length === 0 ? /* @__PURE__ */ g(Ce, {
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__ */ g("div", {
287
+ }) : /* @__PURE__ */ m("div", {
313
288
  className: "max-h-[400px] overflow-y-auto space-y-1",
314
- children: Object.entries(it).map(([e, t]) => /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("div", {
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__ */ _("button", {
292
+ }), t.map((e) => /* @__PURE__ */ h("button", {
318
293
  type: "button",
319
- onClick: () => at(e),
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__ */ g(o, {
296
+ children: [/* @__PURE__ */ m(a, {
322
297
  provider: e,
323
298
  size: 32
324
- }), /* @__PURE__ */ _("div", {
299
+ }), /* @__PURE__ */ h("div", {
325
300
  className: "flex-1 min-w-0",
326
- children: [/* @__PURE__ */ g("div", {
301
+ children: [/* @__PURE__ */ m("div", {
327
302
  className: "text-sm font-medium text-text-primary",
328
303
  children: e.name
329
- }), /* @__PURE__ */ g("div", {
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 && De && /* @__PURE__ */ g("div", {
313
+ !k && !D && Oe && /* @__PURE__ */ m("div", {
339
314
  className: "flex-1 flex items-center justify-center",
340
- children: /* @__PURE__ */ g(p, {
315
+ children: /* @__PURE__ */ m(d, {
341
316
  size: 32,
342
317
  className: "animate-spin text-text-secondary"
343
318
  })
344
319
  }),
345
- !k && !D && !De && b && /* @__PURE__ */ _("div", {
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__ */ g(d, {
322
+ children: [/* @__PURE__ */ m(u, {
348
323
  size: 32,
349
324
  className: "text-text-secondary mb-3"
350
- }), /* @__PURE__ */ g("p", {
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
- G && D && /* @__PURE__ */ _("div", {
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__ */ g("div", {
333
+ /* @__PURE__ */ m("div", {
359
334
  className: "p-3 rounded-full bg-status-success-bg-subtle mb-4",
360
- children: /* @__PURE__ */ g(he, {
335
+ children: /* @__PURE__ */ m(_e, {
361
336
  size: 48,
362
337
  className: "text-status-success-text"
363
338
  })
364
339
  }),
365
- /* @__PURE__ */ g("h3", {
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__ */ _("p", {
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__ */ g("button", {
352
+ /* @__PURE__ */ m("button", {
378
353
  type: "button",
379
- onClick: y,
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 && !G && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
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: st.map((e) => {
362
+ children: Qe.map((e) => {
388
363
  let n = e.icon;
389
- return /* @__PURE__ */ _("button", {
364
+ return /* @__PURE__ */ h("button", {
390
365
  type: "button",
391
- onClick: () => Ge(e.key),
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__ */ g(n, { size: 16 }), e.label]
368
+ children: [/* @__PURE__ */ m(n, { size: 16 }), e.label]
394
369
  }, e.key);
395
370
  })
396
- }), /* @__PURE__ */ _("div", {
371
+ }), /* @__PURE__ */ h("div", {
397
372
  className: "flex-1 p-5 overflow-y-auto",
398
- children: [j === "connection" && /* @__PURE__ */ _("div", {
373
+ children: [j === "connection" && /* @__PURE__ */ h("div", {
399
374
  className: "space-y-5",
400
375
  children: [
401
- et && /* @__PURE__ */ _("div", {
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__ */ g(d, {
378
+ children: [/* @__PURE__ */ m(u, {
404
379
  size: 16,
405
380
  className: "text-status-error-text flex-shrink-0"
406
- }), /* @__PURE__ */ g("span", {
381
+ }), /* @__PURE__ */ m("span", {
407
382
  className: "text-sm text-status-error-text",
408
- children: et
383
+ children: Ue
409
384
  })]
410
385
  }),
411
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
412
- htmlFor: Z("conn-name"),
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__ */ g("span", {
389
+ children: ["Connection Name ", /* @__PURE__ */ m("span", {
415
390
  className: "text-status-error-text",
416
391
  children: "*"
417
392
  })]
418
- }), /* @__PURE__ */ g("input", {
419
- id: Z("conn-name"),
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__ */ _("div", { children: [/* @__PURE__ */ g("label", {
429
- htmlFor: Z("conn-desc"),
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__ */ g("input", {
433
- id: Z("conn-desc"),
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) => qe(e.target.value),
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__ */ g(de, {
443
- value: H,
444
- onChange: Qe,
417
+ D.authType !== "service_account" && /* @__PURE__ */ m(le, {
418
+ value: z,
419
+ onChange: He,
445
420
  providerAuthType: D.authType
446
421
  }),
447
- /* @__PURE__ */ _("div", {
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__ */ _("h3", {
451
- className: "font-medium text-text-primary flex items-center gap-2 mb-3 text-sm",
425
+ /* @__PURE__ */ h("h3", {
426
+ className: "font-medium text-text-primary flex items-center gap-2 text-sm",
452
427
  children: [
453
- /* @__PURE__ */ g(be, {
428
+ /* @__PURE__ */ m(f, {
454
429
  size: 16,
455
430
  className: "text-primary"
456
431
  }),
457
- "Authentication: ",
458
- r(D.authType)
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
- /* @__PURE__ */ g(o, {
505
- provider: D,
506
- size: 20
507
- }),
508
- "Sign in with",
436
+ "·",
509
437
  " ",
510
- D.name.replace(/^(Google|Microsoft)\s/, "")
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
- D.authType === "bearer_token" && /* @__PURE__ */ _("div", {
612
- className: "space-y-3",
613
- children: [/* @__PURE__ */ _("p", {
614
- className: "text-xs text-text-secondary",
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
- "Enter your ",
458
+ "A popup window will open for ",
617
459
  D.name,
618
- " bearer token."
460
+ " sign-in"
619
461
  ]
620
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
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
- D.authType === "service_account" && /* @__PURE__ */ g("div", {
645
- className: "space-y-3",
646
- children: /* @__PURE__ */ _("div", {
647
- className: "rounded-md border border-border bg-status-success-bg-subtle p-3",
648
- children: [
649
- /* @__PURE__ */ g("p", {
650
- className: "text-sm font-medium text-foreground",
651
- children: "No credentials needed"
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
- D.authType === "custom" && (() => {
670
- let e = a(D.configSchema);
671
- if (!e) return /* @__PURE__ */ _("div", {
672
- className: "flex items-center gap-2 px-3 py-2 rounded-md bg-status-error-bg-subtle border border-border-default",
673
- children: [/* @__PURE__ */ g(d, {
674
- size: 16,
675
- className: "text-status-error-text flex-shrink-0"
676
- }), /* @__PURE__ */ g("span", {
677
- className: "text-sm text-status-error-text",
678
- children: "This provider does not declare a configuration form."
679
- })]
680
- });
681
- let t = new Set(e.required);
682
- return /* @__PURE__ */ _("div", {
683
- className: "space-y-3",
684
- children: [/* @__PURE__ */ _("p", {
685
- className: "text-xs text-text-secondary",
686
- children: [
687
- "Enter your ",
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__ */ _("div", {
496
+ }), j === "details" && /* @__PURE__ */ h("div", {
743
497
  className: "space-y-4",
744
- children: [/* @__PURE__ */ g("h3", {
498
+ children: [/* @__PURE__ */ m("h3", {
745
499
  className: "text-sm font-semibold text-text-primary",
746
500
  children: "Details"
747
- }), /* @__PURE__ */ _("div", {
501
+ }), /* @__PURE__ */ h("div", {
748
502
  className: "space-y-3",
749
503
  children: [
750
- /* @__PURE__ */ _("div", {
504
+ /* @__PURE__ */ h("div", {
751
505
  className: "flex items-center gap-3 p-3 rounded-md border border-border-subtle",
752
- children: [/* @__PURE__ */ g(o, {
506
+ children: [/* @__PURE__ */ m(a, {
753
507
  provider: D,
754
508
  size: 40
755
- }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
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__ */ _("p", {
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__ */ _("div", { children: [/* @__PURE__ */ g("div", {
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__ */ g("p", {
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__ */ _("div", { children: [/* @__PURE__ */ g("div", {
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__ */ g("a", {
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__ */ _("div", { children: [/* @__PURE__ */ g("div", {
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__ */ g("a", {
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 { v as AddConnectionDialog };
558
+ export { g as AddConnectionDialog };
805
559
 
806
560
  //# sourceMappingURL=AddConnectionDialog.js.map