@burdenoff/microfe-integrations 2026.527.1 → 2026.529.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 (28) hide show
  1. package/dist/integrations/IntegrationsAdminRoutes.js.map +1 -1
  2. package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
  3. package/dist/integrations/components/AddConnectionDialog.js +278 -251
  4. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  5. package/dist/integrations/components/CredentialStorageSelector.js +56 -48
  6. package/dist/integrations/components/CredentialStorageSelector.js.map +1 -1
  7. package/dist/integrations/components/ProviderCard.js.map +1 -1
  8. package/dist/integrations/hooks/useProviders.js +22 -18
  9. package/dist/integrations/hooks/useProviders.js.map +1 -1
  10. package/dist/integrations/pages/AddConnectionWizard.js +254 -233
  11. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  12. package/dist/integrations/pages/ConnectionDetail.js +2 -1
  13. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  14. package/dist/integrations/pages/ConnectionLogs.js +114 -110
  15. package/dist/integrations/pages/ConnectionLogs.js.map +1 -1
  16. package/dist/integrations/pages/ConnectionsList.js +116 -112
  17. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  18. package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
  19. package/dist/integrations/pages/IntegrationsSettings.js +3 -0
  20. package/dist/integrations/pages/IntegrationsSettings.js.map +1 -1
  21. package/dist/integrations/pages/ProviderCatalog.js +10 -10
  22. package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
  23. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  24. package/dist/integrations/pages/ProviderEditorPage.js +233 -179
  25. package/dist/integrations/pages/ProviderEditorPage.js.map +1 -1
  26. package/dist/integrations/utils/constants.js +10 -1
  27. package/dist/integrations/utils/constants.js.map +1 -1
  28. package/package.json +2 -2
@@ -4,166 +4,170 @@ import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
4
4
  import { joinPath as r } from "../utils/navigation.js";
5
5
  import { getAuthTypeLabel as i, getCategoryLabel as ee } from "../utils/integrationsHelpers.js";
6
6
  import { useGetConnectionLazyQuery as te } from "../../generated/wspace-operations.js";
7
- import { useProviderByKey as ne, useProviders as re } from "../hooks/useProviders.js";
8
- import { useAuthenticateWithApiKey as ie, useAuthenticateWithBasicAuth as ae, useAuthenticateWithBearerToken as oe, useCreateConnection as se, useInitiateOAuth as ce } from "../hooks/useConnections.js";
9
- import { waitForOAuthPopupCompletion as le } from "../utils/oauthPopup.js";
10
- import { CredentialStorageSelector as ue } from "../components/CredentialStorageSelector.js";
11
- import { ProviderIcon as a } from "../components/ProviderIcon.js";
12
- import { useCallback as o, useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
13
- import { AlertCircle as d, ArrowLeft as de, ArrowRight as fe, Check as pe, CheckCircle2 as me, ExternalLink as he, Key as ge, Link as _e, Loader2 as f, Lock as ve, Search as ye, Shield as be } from "lucide-react";
14
- import { useLocation as xe, useParams as Se } from "react-router-dom";
15
- import { usePermissions as Ce } from "@burdenoff/fe-libs/shared/providers/shell";
16
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
+ import { useProvider as ne, useProviderByKey as re, useProviders as ie } from "../hooks/useProviders.js";
8
+ import { useAuthenticateWithApiKey as ae, useAuthenticateWithBasicAuth as oe, useAuthenticateWithBearerToken as se, useCreateConnection as ce, useInitiateOAuth as le } from "../hooks/useConnections.js";
9
+ import { waitForOAuthPopupCompletion as ue } from "../utils/oauthPopup.js";
10
+ import { CredentialStorageSelector as de } from "../components/CredentialStorageSelector.js";
11
+ import { ProviderIcon as fe } from "../components/ProviderIcon.js";
12
+ import { useCallback as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
13
+ import { AlertCircle as u, ArrowLeft as pe, ArrowRight as me, Check as he, CheckCircle2 as ge, ExternalLink as _e, Key as ve, Link as ye, Loader2 as d, Lock as be, Search as xe, Shield as Se } from "lucide-react";
14
+ import { useLocation as Ce, useParams as we } from "react-router-dom";
15
+ import { usePermissions as Te } from "@burdenoff/fe-libs/shared/providers/shell";
16
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
17
17
  //#region src/integrations/pages/AddConnectionWizard.tsx
18
- function h() {
19
- let { providerId: h } = Se(), { basePath: g = "/", navigate: _, apiGatewayUrl: v } = e(), we = xe().search, y = c(() => new URLSearchParams(we), [we]), b = y.get("providerKey") ?? null, x = y.get("returnTo") ?? null, S = y.get("channelId") ?? null, C = !!(x && S), { provider: w, loading: Te } = ne(b ?? ""), { providers: T, loading: E } = re(), { hasPermission: Ee, isLoading: De } = Ce(), Oe = Ee(n.CONNECTION_CREATE), { createConnection: D, loading: ke } = se(), { initiateOAuth: O, loading: Ae } = ce(), { authenticateWithApiKey: k, loading: je } = ie(), { authenticateWithBasicAuth: A, loading: Me } = ae(), { authenticateWithBearerToken: j, loading: Ne } = oe(), [M] = te({ fetchPolicy: "network-only" }), [N, P] = u(h || b ? "configure" : "select_provider"), [F, Pe] = u(null), [I, Fe] = u(""), [L, R] = u(""), [z, Ie] = u(""), [B, Le] = u(""), [V, Re] = u(""), [H, ze] = u(""), [U, Be] = u(""), [W, Ve] = u({
18
+ function m() {
19
+ let { providerId: m } = we(), { basePath: h = "/", navigate: g, apiGatewayUrl: _ } = e(), v = Ce().search, y = s(() => new URLSearchParams(v), [v]), b = y.get("providerKey") ?? null, x = y.get("returnTo") ?? null, S = y.get("channelId") ?? null, C = !!(x && S), { provider: w, loading: Ee } = re(b ?? ""), { providers: T, loading: E } = ie(), { hasPermission: De, isLoading: Oe } = Te(), ke = De(n.CONNECTION_CREATE), { createConnection: D, loading: Ae } = ce(), { initiateOAuth: O, loading: je } = le(), { authenticateWithApiKey: k, loading: Me } = ae(), { authenticateWithBasicAuth: A, loading: Ne } = oe(), { authenticateWithBearerToken: j, loading: Pe } = se(), [Fe] = te({ fetchPolicy: "network-only" }), [M, N] = l(m || b ? "configure" : "select_provider"), [P, Ie] = l(null), [F, Le] = l(""), [I, L] = l(""), [R, Re] = l(""), [z, ze] = l(""), [B, Be] = l(""), [V, Ve] = l(""), [H, He] = l(""), [U, Ue] = l({
20
20
  mode: "managed",
21
21
  vaultId: "",
22
22
  secretId: "",
23
23
  managedSecretName: ""
24
- }), [G, K] = u(""), [q, He] = u(null), [Ue, We] = u(!1), J = l(null), Y = l(null);
25
- s(() => () => {
26
- Y.current?.(), J.current && !J.current.closed && J.current.close();
24
+ }), [W, G] = l(""), [K, We] = l(null), [Ge, Ke] = l(!1), q = c(null), J = c(null);
25
+ o(() => () => {
26
+ J.current?.(), q.current && !q.current.closed && q.current.close();
27
27
  }, []);
28
- let Ge = c(() => !h || !T ? null : T.find((e) => e.id === h) || null, [h, T]), X = c(() => w ?? Ge, [w, Ge]);
29
- s(() => {
30
- X && !F && N === "configure" && (Pe(X), L || R(`${X.name} Connection`));
28
+ let Y = s(() => !m || !T ? null : T.find((e) => e.id === m) || null, [m, T]), { provider: qe, loading: Je } = ne(m && !Y && !E ? m : ""), X = s(() => w ?? Y ?? qe, [
29
+ w,
30
+ Y,
31
+ qe
32
+ ]);
33
+ o(() => {
34
+ X && !P && M === "configure" && (Ie(X), I || L(`${X.name} Connection`));
31
35
  }, [
32
36
  X,
33
- F,
34
- N,
35
- L
37
+ P,
38
+ M,
39
+ I
36
40
  ]);
37
- let Ke = c(() => {
41
+ let Ye = s(() => {
38
42
  let e = (T ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
39
- if (!I) return e;
40
- let t = I.toLowerCase();
43
+ if (!F) return e;
44
+ let t = F.toLowerCase();
41
45
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t));
42
- }, [T, I]), qe = o((e) => {
43
- Pe(e), R(`${e.name} Connection`), P("configure");
44
- }, []), Je = o(() => {
45
- if (!L.trim()) {
46
- K("Connection name is required");
46
+ }, [T, F]), Xe = a((e) => {
47
+ Ie(e), L(`${e.name} Connection`), N("configure");
48
+ }, []), Ze = a(() => {
49
+ if (!I.trim()) {
50
+ G("Connection name is required");
47
51
  return;
48
52
  }
49
- if (!W.vaultId) {
50
- K("Please select a vault for storing or referencing credentials");
53
+ if (!U.vaultId) {
54
+ G("Please select a vault for storing or referencing credentials");
51
55
  return;
52
56
  }
53
- if (W.mode === "existing" && !W.secretId) {
54
- K("Please select an existing vault secret to reuse");
57
+ if (U.mode === "existing" && !U.secretId) {
58
+ G("Please select an existing vault secret to reuse");
55
59
  return;
56
60
  }
57
- K(""), P("authenticate");
58
- }, [L, W]), Ye = o(async () => {
59
- if (F) try {
60
- K("");
61
- let e = v ? `${v}/integrations/oauth/callback` : "/integrations/oauth/callback", t = C ? {
61
+ G(""), N("authenticate");
62
+ }, [I, U]), Qe = a(async () => {
63
+ if (P) try {
64
+ G("");
65
+ let e = _ ? `${_}/integrations/oauth/callback` : "/integrations/oauth/callback", t = C ? {
62
66
  returnTo: x,
63
67
  channelId: S
64
- } : void 0, n = q ?? await D({
65
- name: L.trim(),
66
- description: z.trim(),
67
- providerId: F.id,
68
- vaultId: W.vaultId,
69
- credentialSecretId: W.mode === "existing" ? W.secretId : void 0,
70
- managedSecretName: W.mode === "managed" && W.managedSecretName.trim() || void 0,
68
+ } : void 0, n = K ?? await D({
69
+ name: I.trim(),
70
+ description: R.trim(),
71
+ providerId: P.id,
72
+ vaultId: U.vaultId,
73
+ credentialSecretId: U.mode === "existing" ? U.secretId : void 0,
74
+ managedSecretName: U.mode === "managed" && U.managedSecretName.trim() || void 0,
71
75
  ...t ? { config: t } : {}
72
76
  });
73
77
  if (!n) {
74
- K("Failed to create connection"), P("error");
78
+ G("Failed to create connection"), N("error");
75
79
  return;
76
80
  }
77
- switch (He(n), F.authType) {
81
+ switch (We(n), P.authType) {
78
82
  case "oauth2": {
79
- let t = await O(n, e, F.key);
83
+ let t = await O(n, e, P.key);
80
84
  if (t?.redirectUrl) if (C) {
81
85
  window.location.href = t.redirectUrl;
82
86
  return;
83
87
  } else {
84
88
  let e = window.screenX + (window.innerWidth - 600) / 2, r = window.screenY + (window.innerHeight - 700) / 2, i = window.open(t.redirectUrl, "oauth_popup", `width=600,height=700,left=${e},top=${r},toolbar=no,menubar=no,scrollbars=yes,resizable=yes`);
85
89
  if (!i) {
86
- K("Popup was blocked. Please allow popups for this site and try again."), P("error");
90
+ G("Popup was blocked. Please allow popups for this site and try again."), N("error");
87
91
  return;
88
92
  }
89
- J.current = i, We(!0), Y.current?.(), Y.current = le({
93
+ q.current = i, Ke(!0), J.current?.(), J.current = ue({
90
94
  connectionId: n,
91
95
  popup: i,
92
96
  fetchConnectionStatus: async () => {
93
- let { data: e } = await M({ variables: { id: n } });
97
+ let { data: e } = await Fe({ variables: { id: n } });
94
98
  return e?.getConnection ?? null;
95
99
  },
96
100
  onSuccess: () => {
97
- P("success");
101
+ N("success");
98
102
  },
99
103
  onError: (e) => {
100
- K(e), P("error");
104
+ G(e), N("error");
101
105
  },
102
106
  onSettled: () => {
103
- Y.current = null, J.current = null, We(!1);
107
+ J.current = null, q.current = null, Ke(!1);
104
108
  }
105
109
  });
106
110
  return;
107
111
  }
108
- P("success");
112
+ N("success");
109
113
  break;
110
114
  }
111
115
  case "api_key":
112
- if (!B.trim()) {
113
- K("API key is required");
116
+ if (!z.trim()) {
117
+ G("API key is required");
114
118
  return;
115
119
  }
116
- await k(n, B.trim()), P("success");
120
+ await k(n, z.trim()), N("success");
117
121
  break;
118
122
  case "basic_auth":
119
- if (!V.trim() || !H.trim()) {
120
- K("Username and password are required");
123
+ if (!B.trim() || !V.trim()) {
124
+ G("Username and password are required");
121
125
  return;
122
126
  }
123
- await A(n, V.trim(), H.trim()), P("success");
127
+ await A(n, B.trim(), V.trim()), N("success");
124
128
  break;
125
129
  case "bearer_token":
126
- if (!U.trim()) {
127
- K("Bearer token is required");
130
+ if (!H.trim()) {
131
+ G("Bearer token is required");
128
132
  return;
129
133
  }
130
- await j(n, U.trim()), P("success");
134
+ await j(n, H.trim()), N("success");
131
135
  break;
132
- default: P("success");
136
+ default: N("success");
133
137
  }
134
138
  } catch (e) {
135
- K(e instanceof Error ? e.message : "Authentication failed"), P("error");
139
+ G(e instanceof Error ? e.message : "Authentication failed"), N("error");
136
140
  }
137
141
  }, [
138
- F,
139
- L,
142
+ P,
143
+ I,
144
+ R,
140
145
  z,
141
146
  B,
142
147
  V,
143
148
  H,
144
- U,
145
149
  D,
146
150
  O,
147
- M,
151
+ Fe,
148
152
  k,
149
153
  A,
150
154
  j,
151
155
  C,
152
156
  x,
153
157
  S,
154
- v,
155
- q,
156
- W
157
- ]), Xe = o(() => {
158
- if (!x || !q) return;
158
+ _,
159
+ K,
160
+ U
161
+ ]), $e = a(() => {
162
+ if (!x || !K) return;
159
163
  let e = new URL(x, window.location.origin);
160
- e.searchParams.set("integrationConnectionId", q), S && e.searchParams.set("channelId", S), _?.(e.pathname + e.search);
164
+ e.searchParams.set("integrationConnectionId", K), S && e.searchParams.set("channelId", S), g?.(e.pathname + e.search);
161
165
  }, [
162
166
  x,
163
- q,
167
+ K,
164
168
  S,
165
- _
166
- ]), Z = ke || Ae || Ue || je || Me || Ne, Ze = b ? Te : E, Q = [
169
+ g
170
+ ]), Z = Ae || je || Ge || Me || Ne || Pe, et = b ? Ee : E || Je, Q = [
167
171
  {
168
172
  key: "select_provider",
169
173
  label: "Select Provider"
@@ -176,120 +180,131 @@ function h() {
176
180
  key: "authenticate",
177
181
  label: "Authenticate"
178
182
  }
179
- ], $ = Q.findIndex((e) => e.key === N);
180
- return De ? /* @__PURE__ */ p("div", {
183
+ ], $ = Q.findIndex((e) => e.key === M);
184
+ return Oe ? /* @__PURE__ */ f("div", {
181
185
  className: "flex items-center justify-center py-20",
182
- children: /* @__PURE__ */ p(f, {
186
+ children: /* @__PURE__ */ f(d, {
183
187
  size: 48,
184
188
  className: "animate-spin text-primary"
185
189
  })
186
- }) : Oe ? /* @__PURE__ */ m("div", {
190
+ }) : ke ? /* @__PURE__ */ p("div", {
187
191
  className: "space-y-6 p-6 max-w-3xl mx-auto",
188
192
  children: [
189
- /* @__PURE__ */ m("div", {
193
+ /* @__PURE__ */ p("div", {
190
194
  className: "flex items-center gap-4",
191
195
  children: [
192
- /* @__PURE__ */ p("button", {
196
+ /* @__PURE__ */ f("button", {
193
197
  type: "button",
194
- onClick: () => _?.(r(g, "connections")),
198
+ onClick: () => g?.(r(h, "connections")),
195
199
  className: "p-2.5 hover:bg-accent rounded-lg transition-all",
196
200
  "aria-label": "Back",
197
- children: /* @__PURE__ */ p(de, { size: 20 })
201
+ children: /* @__PURE__ */ f(pe, { size: 20 })
198
202
  }),
199
- /* @__PURE__ */ p("h1", {
203
+ /* @__PURE__ */ f("h1", {
200
204
  className: "text-2xl font-bold text-foreground",
201
205
  children: "Add Connection"
202
206
  }),
203
- C && /* @__PURE__ */ p("span", {
207
+ C && /* @__PURE__ */ f("span", {
204
208
  className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-primary/10 text-primary",
205
209
  children: "Bot Channel Setup"
206
210
  })
207
211
  ]
208
212
  }),
209
- N !== "success" && N !== "error" && /* @__PURE__ */ p("div", {
213
+ M !== "success" && M !== "error" && /* @__PURE__ */ f("div", {
210
214
  className: "flex items-center gap-2",
211
- children: Q.map((e, n) => /* @__PURE__ */ m("div", {
215
+ children: Q.map((e, n) => /* @__PURE__ */ p("div", {
212
216
  className: "flex items-center gap-2",
213
217
  children: [
214
- /* @__PURE__ */ p("div", {
218
+ /* @__PURE__ */ f("div", {
215
219
  className: t("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", n < $ ? "bg-primary text-primary-foreground" : n === $ ? "bg-primary text-primary-foreground ring-4 ring-primary/20" : "bg-muted text-muted-foreground"),
216
- children: n < $ ? /* @__PURE__ */ p(pe, { size: 16 }) : n + 1
220
+ children: n < $ ? /* @__PURE__ */ f(he, { size: 16 }) : n + 1
217
221
  }),
218
- /* @__PURE__ */ p("span", {
222
+ /* @__PURE__ */ f("span", {
219
223
  className: t("text-sm font-medium hidden sm:inline", n === $ ? "text-foreground" : "text-muted-foreground"),
220
224
  children: e.label
221
225
  }),
222
- n < Q.length - 1 && /* @__PURE__ */ p("div", { className: "w-8 h-px bg-border" })
226
+ n < Q.length - 1 && /* @__PURE__ */ f("div", { className: "w-8 h-px bg-border" })
223
227
  ]
224
228
  }, e.key))
225
229
  }),
226
- G && N !== "error" && /* @__PURE__ */ m("div", {
230
+ W && M !== "error" && /* @__PURE__ */ p("div", {
227
231
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 flex items-center gap-3",
228
- children: [/* @__PURE__ */ p(d, {
232
+ children: [/* @__PURE__ */ f(u, {
229
233
  size: 20,
230
234
  className: "text-status-error-text flex-shrink-0"
231
- }), /* @__PURE__ */ p("p", {
235
+ }), /* @__PURE__ */ f("p", {
232
236
  className: "text-sm text-status-error-text",
233
- children: G
237
+ children: W
234
238
  })]
235
239
  }),
236
- N === "configure" && Ze && !F && /* @__PURE__ */ p("div", {
240
+ M === "configure" && et && !P && /* @__PURE__ */ f("div", {
237
241
  className: "flex items-center justify-center py-12",
238
- children: /* @__PURE__ */ p(f, {
242
+ children: /* @__PURE__ */ f(d, {
239
243
  size: 24,
240
244
  className: "animate-spin text-muted-foreground"
241
245
  })
242
246
  }),
243
- N === "select_provider" && /* @__PURE__ */ m("div", {
247
+ M === "configure" && !et && !P && (m || b) && /* @__PURE__ */ p("div", {
248
+ className: "flex flex-col items-center justify-center py-12 text-center",
249
+ children: [/* @__PURE__ */ f(u, {
250
+ size: 32,
251
+ className: "text-muted-foreground mb-3"
252
+ }), /* @__PURE__ */ f("p", {
253
+ className: "text-sm text-muted-foreground",
254
+ children: "This provider isn't available."
255
+ })]
256
+ }),
257
+ M === "select_provider" && /* @__PURE__ */ p("div", {
244
258
  className: "space-y-4",
245
259
  children: [
246
- /* @__PURE__ */ m("div", {
260
+ /* @__PURE__ */ p("div", {
247
261
  className: "relative group",
248
- children: [/* @__PURE__ */ p(ye, {
262
+ children: [/* @__PURE__ */ f(xe, {
249
263
  size: 18,
250
264
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
251
- }), /* @__PURE__ */ p("input", {
265
+ }), /* @__PURE__ */ f("input", {
252
266
  type: "text",
253
267
  placeholder: "Search installed providers...",
254
- value: I,
255
- onChange: (e) => Fe(e.target.value),
268
+ "aria-label": "Search installed providers",
269
+ value: F,
270
+ onChange: (e) => Le(e.target.value),
256
271
  className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
257
272
  })]
258
273
  }),
259
- E && /* @__PURE__ */ p("div", {
274
+ E && /* @__PURE__ */ f("div", {
260
275
  className: "flex items-center justify-center py-12",
261
- children: /* @__PURE__ */ p(f, {
276
+ children: /* @__PURE__ */ f(d, {
262
277
  size: 24,
263
278
  className: "animate-spin text-muted-foreground"
264
279
  })
265
280
  }),
266
- !E && Ke.length === 0 && /* @__PURE__ */ m("div", {
281
+ !E && Ye.length === 0 && /* @__PURE__ */ p("div", {
267
282
  className: "text-center py-12",
268
- children: [/* @__PURE__ */ p("p", {
283
+ children: [/* @__PURE__ */ f("p", {
269
284
  className: "text-muted-foreground",
270
285
  children: "No installed providers found. Install a provider from the catalog first."
271
- }), /* @__PURE__ */ p("button", {
286
+ }), /* @__PURE__ */ f("button", {
272
287
  type: "button",
273
- onClick: () => _?.(r(g, "providers")),
288
+ onClick: () => g?.(r(h, "providers")),
274
289
  className: "mt-4 inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
275
290
  children: "Browse Catalog"
276
291
  })]
277
292
  }),
278
- /* @__PURE__ */ p("div", {
293
+ /* @__PURE__ */ f("div", {
279
294
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
280
- children: Ke.map((e) => /* @__PURE__ */ m("button", {
295
+ children: Ye.map((e) => /* @__PURE__ */ p("button", {
281
296
  type: "button",
282
- onClick: () => qe(e),
297
+ onClick: () => Xe(e),
283
298
  className: t("flex items-start gap-3 p-4 rounded-xl border border-border/50 bg-card text-left", "hover:border-primary/50 hover:bg-accent/30 hover:shadow-md transition-all duration-200"),
284
- children: [/* @__PURE__ */ p(a, {
299
+ children: [/* @__PURE__ */ f(fe, {
285
300
  provider: e,
286
301
  size: 40
287
- }), /* @__PURE__ */ m("div", {
302
+ }), /* @__PURE__ */ p("div", {
288
303
  className: "flex-1 min-w-0",
289
- children: [/* @__PURE__ */ p("h3", {
304
+ children: [/* @__PURE__ */ f("h3", {
290
305
  className: "font-medium text-foreground truncate",
291
306
  children: e.name
292
- }), /* @__PURE__ */ m("p", {
307
+ }), /* @__PURE__ */ p("p", {
293
308
  className: "text-xs text-muted-foreground mt-0.5",
294
309
  children: [
295
310
  ee(e.category),
@@ -302,277 +317,283 @@ function h() {
302
317
  })
303
318
  ]
304
319
  }),
305
- N === "configure" && F && /* @__PURE__ */ m("div", {
320
+ M === "configure" && P && /* @__PURE__ */ p("div", {
306
321
  className: "space-y-6",
307
322
  children: [
308
- /* @__PURE__ */ m("div", {
323
+ /* @__PURE__ */ p("div", {
309
324
  className: "flex items-center gap-3 p-4 rounded-xl border border-border/50 bg-card",
310
- children: [/* @__PURE__ */ p(a, {
311
- provider: F,
325
+ children: [/* @__PURE__ */ f(fe, {
326
+ provider: P,
312
327
  size: 40
313
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h3", {
328
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
314
329
  className: "font-medium text-foreground",
315
- children: F.name
316
- }), /* @__PURE__ */ p("p", {
330
+ children: P.name
331
+ }), /* @__PURE__ */ f("p", {
317
332
  className: "text-xs text-muted-foreground",
318
- children: i(F.authType)
333
+ children: i(P.authType)
319
334
  })] })]
320
335
  }),
321
- /* @__PURE__ */ m("div", {
336
+ /* @__PURE__ */ p("div", {
322
337
  className: "space-y-4",
323
338
  children: [
324
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
339
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
325
340
  htmlFor: "conn-name",
326
341
  className: "block text-sm font-semibold mb-2",
327
- children: ["Connection Name ", /* @__PURE__ */ p("span", {
342
+ children: ["Connection Name ", /* @__PURE__ */ f("span", {
328
343
  className: "text-status-error-text",
329
344
  children: "*"
330
345
  })]
331
- }), /* @__PURE__ */ p("input", {
346
+ }), /* @__PURE__ */ f("input", {
332
347
  type: "text",
333
348
  id: "conn-name",
334
- value: L,
335
- onChange: (e) => R(e.target.value),
349
+ "aria-label": "Connection Name",
350
+ value: I,
351
+ onChange: (e) => L(e.target.value),
336
352
  placeholder: "e.g., My Slack Workspace",
337
353
  className: "w-full px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
338
354
  })] }),
339
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
355
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
340
356
  htmlFor: "conn-desc",
341
357
  className: "block text-sm font-semibold mb-2",
342
358
  children: "Description"
343
- }), /* @__PURE__ */ p("textarea", {
359
+ }), /* @__PURE__ */ f("textarea", {
344
360
  id: "conn-desc",
345
- value: z,
346
- onChange: (e) => Ie(e.target.value),
361
+ "aria-label": "Description",
362
+ value: R,
363
+ onChange: (e) => Re(e.target.value),
347
364
  rows: 3,
348
365
  placeholder: "Optional description...",
349
366
  className: "w-full px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
350
367
  })] }),
351
- /* @__PURE__ */ p(ue, {
352
- value: W,
353
- onChange: Ve,
354
- providerAuthType: F.authType
368
+ /* @__PURE__ */ f(de, {
369
+ value: U,
370
+ onChange: Ue,
371
+ providerAuthType: P.authType
355
372
  })
356
373
  ]
357
374
  }),
358
- /* @__PURE__ */ m("div", {
375
+ /* @__PURE__ */ p("div", {
359
376
  className: "flex gap-3",
360
- children: [/* @__PURE__ */ p("button", {
377
+ children: [/* @__PURE__ */ f("button", {
361
378
  type: "button",
362
- onClick: () => h || b ? _?.(r(g, "connections")) : P("select_provider"),
379
+ onClick: () => m || b ? g?.(r(h, "connections")) : N("select_provider"),
363
380
  className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
364
381
  children: "Back"
365
- }), /* @__PURE__ */ m("button", {
382
+ }), /* @__PURE__ */ p("button", {
366
383
  type: "button",
367
- onClick: Je,
384
+ onClick: Ze,
368
385
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
369
- children: ["Next ", /* @__PURE__ */ p(fe, { size: 16 })]
386
+ children: ["Next ", /* @__PURE__ */ f(me, { size: 16 })]
370
387
  })]
371
388
  })
372
389
  ]
373
390
  }),
374
- N === "authenticate" && F && /* @__PURE__ */ m("div", {
391
+ M === "authenticate" && P && /* @__PURE__ */ p("div", {
375
392
  className: "space-y-6",
376
- children: [/* @__PURE__ */ m("div", {
393
+ children: [/* @__PURE__ */ p("div", {
377
394
  className: "rounded-xl border border-border/50 bg-card p-5",
378
395
  children: [
379
- /* @__PURE__ */ m("h2", {
396
+ /* @__PURE__ */ p("h2", {
380
397
  className: "font-semibold text-foreground flex items-center gap-2 mb-4",
381
398
  children: [
382
- /* @__PURE__ */ p(be, {
399
+ /* @__PURE__ */ f(Se, {
383
400
  size: 18,
384
401
  className: "text-primary"
385
402
  }),
386
403
  "Authentication: ",
387
- i(F.authType)
404
+ i(P.authType)
388
405
  ]
389
406
  }),
390
- F.authType === "oauth2" && /* @__PURE__ */ m("div", {
407
+ P.authType === "oauth2" && /* @__PURE__ */ p("div", {
391
408
  className: "space-y-4",
392
- children: [/* @__PURE__ */ m("p", {
409
+ children: [/* @__PURE__ */ p("p", {
393
410
  className: "text-sm text-muted-foreground",
394
411
  children: [
395
412
  "You will be redirected to ",
396
- F.name,
413
+ P.name,
397
414
  " to authorize access. After granting permission, you'll be redirected back."
398
415
  ]
399
- }), /* @__PURE__ */ m("div", {
416
+ }), /* @__PURE__ */ p("div", {
400
417
  className: "p-3 rounded-lg bg-status-info-bg-subtle border border-border-default text-sm text-status-info-text flex items-center gap-2",
401
- children: [/* @__PURE__ */ p(he, { size: 16 }), C ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
418
+ children: [/* @__PURE__ */ f(_e, { size: 16 }), C ? "You'll be redirected back to the bot channel setup after authorization." : "A new window will open for OAuth authentication"]
402
419
  })]
403
420
  }),
404
- F.authType === "api_key" && /* @__PURE__ */ m("div", {
421
+ P.authType === "api_key" && /* @__PURE__ */ p("div", {
405
422
  className: "space-y-4",
406
- children: [/* @__PURE__ */ m("p", {
423
+ children: [/* @__PURE__ */ p("p", {
407
424
  className: "text-sm text-muted-foreground",
408
425
  children: [
409
426
  "Enter your ",
410
- F.name,
427
+ P.name,
411
428
  " API key. You can typically find this in your account settings."
412
429
  ]
413
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
430
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
414
431
  htmlFor: "api-key",
415
432
  className: "block text-sm font-semibold mb-2",
416
- children: ["API Key ", /* @__PURE__ */ p("span", {
433
+ children: ["API Key ", /* @__PURE__ */ f("span", {
417
434
  className: "text-status-error-text",
418
435
  children: "*"
419
436
  })]
420
- }), /* @__PURE__ */ m("div", {
437
+ }), /* @__PURE__ */ p("div", {
421
438
  className: "relative",
422
- children: [/* @__PURE__ */ p(ge, {
439
+ children: [/* @__PURE__ */ f(ve, {
423
440
  size: 16,
424
441
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
425
- }), /* @__PURE__ */ p("input", {
442
+ }), /* @__PURE__ */ f("input", {
426
443
  type: "password",
427
444
  id: "api-key",
428
- value: B,
429
- onChange: (e) => Le(e.target.value),
445
+ "aria-label": "API Key",
446
+ value: z,
447
+ onChange: (e) => ze(e.target.value),
430
448
  placeholder: "Enter your API key",
431
449
  className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-background text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
432
450
  })]
433
451
  })] })]
434
452
  }),
435
- F.authType === "basic_auth" && /* @__PURE__ */ m("div", {
453
+ P.authType === "basic_auth" && /* @__PURE__ */ p("div", {
436
454
  className: "space-y-4",
437
455
  children: [
438
- /* @__PURE__ */ m("p", {
456
+ /* @__PURE__ */ p("p", {
439
457
  className: "text-sm text-muted-foreground",
440
458
  children: [
441
459
  "Enter your ",
442
- F.name,
460
+ P.name,
443
461
  " credentials."
444
462
  ]
445
463
  }),
446
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
464
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
447
465
  htmlFor: "username",
448
466
  className: "block text-sm font-semibold mb-2",
449
- children: ["Username ", /* @__PURE__ */ p("span", {
467
+ children: ["Username ", /* @__PURE__ */ f("span", {
450
468
  className: "text-status-error-text",
451
469
  children: "*"
452
470
  })]
453
- }), /* @__PURE__ */ p("input", {
471
+ }), /* @__PURE__ */ f("input", {
454
472
  type: "text",
455
473
  id: "username",
456
- value: V,
457
- onChange: (e) => Re(e.target.value),
474
+ "aria-label": "Username",
475
+ value: B,
476
+ onChange: (e) => Be(e.target.value),
458
477
  placeholder: "Username or email",
459
478
  className: "w-full px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
460
479
  })] }),
461
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
480
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
462
481
  htmlFor: "password",
463
482
  className: "block text-sm font-semibold mb-2",
464
- children: ["Password ", /* @__PURE__ */ p("span", {
483
+ children: ["Password ", /* @__PURE__ */ f("span", {
465
484
  className: "text-status-error-text",
466
485
  children: "*"
467
486
  })]
468
- }), /* @__PURE__ */ m("div", {
487
+ }), /* @__PURE__ */ p("div", {
469
488
  className: "relative",
470
- children: [/* @__PURE__ */ p(ve, {
489
+ children: [/* @__PURE__ */ f(be, {
471
490
  size: 16,
472
491
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
473
- }), /* @__PURE__ */ p("input", {
492
+ }), /* @__PURE__ */ f("input", {
474
493
  type: "password",
475
494
  id: "password",
476
- value: H,
477
- onChange: (e) => ze(e.target.value),
495
+ "aria-label": "Password",
496
+ value: V,
497
+ onChange: (e) => Ve(e.target.value),
478
498
  placeholder: "Password",
479
499
  className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
480
500
  })]
481
501
  })] })
482
502
  ]
483
503
  }),
484
- F.authType === "bearer_token" && /* @__PURE__ */ m("div", {
504
+ P.authType === "bearer_token" && /* @__PURE__ */ p("div", {
485
505
  className: "space-y-4",
486
- children: [/* @__PURE__ */ m("p", {
506
+ children: [/* @__PURE__ */ p("p", {
487
507
  className: "text-sm text-muted-foreground",
488
508
  children: [
489
509
  "Enter your ",
490
- F.name,
510
+ P.name,
491
511
  " bearer token."
492
512
  ]
493
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
513
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
494
514
  htmlFor: "bearer-token",
495
515
  className: "block text-sm font-semibold mb-2",
496
- children: ["Bearer Token ", /* @__PURE__ */ p("span", {
516
+ children: ["Bearer Token ", /* @__PURE__ */ f("span", {
497
517
  className: "text-status-error-text",
498
518
  children: "*"
499
519
  })]
500
- }), /* @__PURE__ */ m("div", {
520
+ }), /* @__PURE__ */ p("div", {
501
521
  className: "relative",
502
- children: [/* @__PURE__ */ p(ge, {
522
+ children: [/* @__PURE__ */ f(ve, {
503
523
  size: 16,
504
524
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
505
- }), /* @__PURE__ */ p("input", {
525
+ }), /* @__PURE__ */ f("input", {
506
526
  type: "password",
507
527
  id: "bearer-token",
508
- value: U,
509
- onChange: (e) => Be(e.target.value),
528
+ "aria-label": "Bearer Token",
529
+ value: H,
530
+ onChange: (e) => He(e.target.value),
510
531
  placeholder: "Enter your token",
511
532
  className: "w-full pl-10 pr-4 py-2.5 border border-border rounded-lg bg-background text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
512
533
  })]
513
534
  })] })]
514
535
  })
515
536
  ]
516
- }), /* @__PURE__ */ m("div", {
537
+ }), /* @__PURE__ */ p("div", {
517
538
  className: "flex gap-3",
518
- children: [/* @__PURE__ */ p("button", {
539
+ children: [/* @__PURE__ */ f("button", {
519
540
  type: "button",
520
- onClick: () => P("configure"),
541
+ onClick: () => N("configure"),
521
542
  disabled: Z,
522
543
  className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50",
523
544
  children: "Back"
524
- }), /* @__PURE__ */ m("button", {
545
+ }), /* @__PURE__ */ p("button", {
525
546
  type: "button",
526
- onClick: Ye,
547
+ onClick: Qe,
527
548
  disabled: Z,
528
549
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
529
- children: [Z ? /* @__PURE__ */ p(f, {
550
+ children: [Z ? /* @__PURE__ */ f(d, {
530
551
  size: 16,
531
552
  className: "animate-spin"
532
- }) : /* @__PURE__ */ p(pe, { size: 16 }), F.authType === "oauth2" ? "Authorize" : "Connect"]
553
+ }) : /* @__PURE__ */ f(he, { size: 16 }), P.authType === "oauth2" ? "Authorize" : "Connect"]
533
554
  })]
534
555
  })]
535
556
  }),
536
- N === "success" && /* @__PURE__ */ m("div", {
557
+ M === "success" && /* @__PURE__ */ p("div", {
537
558
  className: "flex flex-col items-center justify-center py-12 text-center",
538
559
  children: [
539
- /* @__PURE__ */ p("div", {
560
+ /* @__PURE__ */ f("div", {
540
561
  className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
541
- children: /* @__PURE__ */ p(me, {
562
+ children: /* @__PURE__ */ f(ge, {
542
563
  size: 48,
543
564
  className: "text-status-success-text"
544
565
  })
545
566
  }),
546
- /* @__PURE__ */ p("h2", {
567
+ /* @__PURE__ */ f("h2", {
547
568
  className: "text-xl font-bold text-foreground mb-2",
548
569
  children: "Connection Created!"
549
570
  }),
550
- /* @__PURE__ */ m("p", {
571
+ /* @__PURE__ */ p("p", {
551
572
  className: "text-sm text-muted-foreground mb-6 max-w-sm",
552
573
  children: [
553
574
  "Your ",
554
- F?.name,
575
+ P?.name,
555
576
  " connection has been set up successfully."
556
577
  ]
557
578
  }),
558
- /* @__PURE__ */ m("div", {
579
+ /* @__PURE__ */ p("div", {
559
580
  className: "flex gap-3",
560
581
  children: [
561
- C && q && /* @__PURE__ */ m("button", {
582
+ C && K && /* @__PURE__ */ p("button", {
562
583
  type: "button",
563
- onClick: Xe,
584
+ onClick: $e,
564
585
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
565
- children: [/* @__PURE__ */ p(_e, { size: 16 }), "Link to Bot Channel"]
586
+ children: [/* @__PURE__ */ f(ye, { size: 16 }), "Link to Bot Channel"]
566
587
  }),
567
- !C && q && /* @__PURE__ */ p("button", {
588
+ !C && K && /* @__PURE__ */ f("button", {
568
589
  type: "button",
569
- onClick: () => _?.(r(g, `connections/${q}`)),
590
+ onClick: () => g?.(r(h, `connections/${K}`)),
570
591
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
571
592
  children: "View Connection"
572
593
  }),
573
- /* @__PURE__ */ p("button", {
594
+ /* @__PURE__ */ f("button", {
574
595
  type: "button",
575
- onClick: () => _?.(r(g, "connections")),
596
+ onClick: () => g?.(r(h, "connections")),
576
597
  className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
577
598
  children: "All Connections"
578
599
  })
@@ -580,36 +601,36 @@ function h() {
580
601
  })
581
602
  ]
582
603
  }),
583
- N === "error" && /* @__PURE__ */ m("div", {
604
+ M === "error" && /* @__PURE__ */ p("div", {
584
605
  className: "flex flex-col items-center justify-center py-12 text-center",
585
606
  children: [
586
- /* @__PURE__ */ p("div", {
607
+ /* @__PURE__ */ f("div", {
587
608
  className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
588
- children: /* @__PURE__ */ p(d, {
609
+ children: /* @__PURE__ */ f(u, {
589
610
  size: 48,
590
611
  className: "text-status-error-text"
591
612
  })
592
613
  }),
593
- /* @__PURE__ */ p("h2", {
614
+ /* @__PURE__ */ f("h2", {
594
615
  className: "text-xl font-bold text-foreground mb-2",
595
616
  children: "Connection Failed"
596
617
  }),
597
- /* @__PURE__ */ p("p", {
618
+ /* @__PURE__ */ f("p", {
598
619
  className: "text-sm text-status-error-text mb-6 max-w-sm",
599
- children: G || "An unexpected error occurred."
620
+ children: W || "An unexpected error occurred."
600
621
  }),
601
- /* @__PURE__ */ m("div", {
622
+ /* @__PURE__ */ p("div", {
602
623
  className: "flex gap-3",
603
- children: [/* @__PURE__ */ p("button", {
624
+ children: [/* @__PURE__ */ f("button", {
604
625
  type: "button",
605
626
  onClick: () => {
606
- K(""), P("authenticate");
627
+ G(""), N("authenticate");
607
628
  },
608
629
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
609
630
  children: "Try Again"
610
- }), /* @__PURE__ */ p("button", {
631
+ }), /* @__PURE__ */ f("button", {
611
632
  type: "button",
612
- onClick: () => _?.(r(g, "connections")),
633
+ onClick: () => g?.(r(h, "connections")),
613
634
  className: "px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
614
635
  children: "Cancel"
615
636
  })]
@@ -617,31 +638,31 @@ function h() {
617
638
  ]
618
639
  })
619
640
  ]
620
- }) : /* @__PURE__ */ m("div", {
641
+ }) : /* @__PURE__ */ p("div", {
621
642
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
622
643
  children: [
623
- /* @__PURE__ */ p(be, {
644
+ /* @__PURE__ */ f(Se, {
624
645
  size: 48,
625
646
  className: "text-muted-foreground mb-4"
626
647
  }),
627
- /* @__PURE__ */ p("h2", {
648
+ /* @__PURE__ */ f("h2", {
628
649
  className: "text-xl font-bold text-foreground mb-2",
629
650
  children: "Access Denied"
630
651
  }),
631
- /* @__PURE__ */ p("p", {
652
+ /* @__PURE__ */ f("p", {
632
653
  className: "text-sm text-muted-foreground mb-6 max-w-sm",
633
654
  children: "You don't have permission to create connections."
634
655
  }),
635
- /* @__PURE__ */ m("button", {
656
+ /* @__PURE__ */ p("button", {
636
657
  type: "button",
637
- onClick: () => _?.(r(g, "connections")),
658
+ onClick: () => g?.(r(h, "connections")),
638
659
  className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
639
- children: [/* @__PURE__ */ p(de, { size: 16 }), " Back to Connections"]
660
+ children: [/* @__PURE__ */ f(pe, { size: 16 }), " Back to Connections"]
640
661
  })
641
662
  ]
642
663
  });
643
664
  }
644
665
  //#endregion
645
- export { h as AddConnectionWizard };
666
+ export { m as AddConnectionWizard };
646
667
 
647
668
  //# sourceMappingURL=AddConnectionWizard.js.map