@burdenoff/microfe-integrations 2026.930.1 → 2026.930.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.
Files changed (70) hide show
  1. package/dist/generated/wspace-operations.d.ts +0 -137
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +73 -142
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/integrations/ConnectSourceDialog.js +10 -10
  6. package/dist/integrations/components/AddConnectionDialog.d.ts +15 -3
  7. package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
  8. package/dist/integrations/components/AddConnectionDialog.js +53 -631
  9. package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
  10. package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -1
  11. package/dist/integrations/components/AuthMethodsEditor.js +69 -68
  12. package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
  13. package/dist/integrations/components/ConnectionCard.js +28 -28
  14. package/dist/integrations/components/ConnectionCard.js.map +1 -1
  15. package/dist/integrations/components/ProviderCard.js +29 -29
  16. package/dist/integrations/components/ProviderCard.js.map +1 -1
  17. package/dist/integrations/hooks/useConnections.js +91 -102
  18. package/dist/integrations/hooks/useConnections.js.map +1 -1
  19. package/dist/integrations/hooks/useLogs.js +4 -4
  20. package/dist/integrations/hooks/useProviders.js +36 -36
  21. package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
  22. package/dist/integrations/pages/AddConnectionWizard.js +281 -277
  23. package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
  24. package/dist/integrations/pages/ConnectionDetail.js +24 -24
  25. package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
  26. package/dist/integrations/pages/ConnectionsList.js +7 -7
  27. package/dist/integrations/pages/ConnectionsList.js.map +1 -1
  28. package/dist/integrations/pages/IntegrationsOverview.js +34 -34
  29. package/dist/integrations/pages/ProviderCatalog.js +4 -4
  30. package/dist/integrations/pages/ProviderDetail.js +110 -110
  31. package/dist/integrations/pages/ProviderDetail.js.map +1 -1
  32. package/dist/integrations/translations/en.d.ts +18 -0
  33. package/dist/integrations/translations/en.d.ts.map +1 -1
  34. package/dist/integrations/utils/appearance.d.ts +0 -3
  35. package/dist/integrations/utils/appearance.d.ts.map +1 -1
  36. package/dist/integrations/utils/appearance.js +1 -20
  37. package/dist/integrations/utils/appearance.js.map +1 -1
  38. package/dist/integrations/utils/integrationsHelpers.js +1 -4
  39. package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
  40. package/package.json +2 -2
  41. package/dist/integrations/assets/brands/bigconsole.js +0 -6
  42. package/dist/integrations/assets/brands/bigconsole.js.map +0 -1
  43. package/dist/integrations/assets/brands/burdenoff.js +0 -6
  44. package/dist/integrations/assets/brands/burdenoff.js.map +0 -1
  45. package/dist/integrations/components/AuthMethodSelector.d.ts +0 -30
  46. package/dist/integrations/components/AuthMethodSelector.d.ts.map +0 -1
  47. package/dist/integrations/components/AuthMethodSelector.js +0 -66
  48. package/dist/integrations/components/AuthMethodSelector.js.map +0 -1
  49. package/dist/integrations/components/CredentialStorageSelector.d.ts +0 -16
  50. package/dist/integrations/components/CredentialStorageSelector.d.ts.map +0 -1
  51. package/dist/integrations/components/CredentialStorageSelector.js +0 -262
  52. package/dist/integrations/components/CredentialStorageSelector.js.map +0 -1
  53. package/dist/integrations/components/ProviderIcon.d.ts +0 -25
  54. package/dist/integrations/components/ProviderIcon.d.ts.map +0 -1
  55. package/dist/integrations/components/ProviderIcon.js +0 -166
  56. package/dist/integrations/components/ProviderIcon.js.map +0 -1
  57. package/dist/integrations/components/SchemaForm.d.ts +0 -60
  58. package/dist/integrations/components/SchemaForm.d.ts.map +0 -1
  59. package/dist/integrations/components/SchemaForm.js +0 -235
  60. package/dist/integrations/components/SchemaForm.js.map +0 -1
  61. package/dist/integrations/hooks/useCredentialVaults.d.ts +0 -40
  62. package/dist/integrations/hooks/useCredentialVaults.d.ts.map +0 -1
  63. package/dist/integrations/hooks/useCredentialVaults.js +0 -98
  64. package/dist/integrations/hooks/useCredentialVaults.js.map +0 -1
  65. package/dist/integrations/utils/oauthPopup.d.ts +0 -16
  66. package/dist/integrations/utils/oauthPopup.d.ts.map +0 -1
  67. package/dist/integrations/utils/oauthPopup.js +0 -62
  68. package/dist/integrations/utils/oauthPopup.js.map +0 -1
  69. package/dist/node_modules/@iconify/react/dist/iconify.js +0 -1005
  70. package/dist/node_modules/@iconify/react/dist/iconify.js.map +0 -1
@@ -3,38 +3,37 @@ import { useTr as t } from "../hooks/useTr.js";
3
3
  import { cn as n } from "../utils/cn.js";
4
4
  import { INTEGRATION_PERMISSIONS as r } from "../constants/permissions.js";
5
5
  import { joinPath as i } from "../utils/navigation.js";
6
- import { useAuthTypeLabel as ee, useCategoryLabel as te } from "../hooks/useLabel.js";
7
- import { useGetConnectionLazyQuery as ne } from "../../generated/wspace-operations.js";
8
- import { useProvider as re, useProviderByKey as ie, useProviders as ae } from "../hooks/useProviders.js";
9
- import { useAuthenticateWithApiKey as oe, useAuthenticateWithBasicAuth as se, useAuthenticateWithBearerToken as ce, useAuthenticateWithCustomConfig as le, useAuthenticateWithServiceAccount as ue, useCreateConnection as de, useInitiateOAuth as fe } from "../hooks/useConnections.js";
10
- import { waitForOAuthPopupCompletion as pe } from "../utils/oauthPopup.js";
11
- import { CredentialStorageSelector as me } from "../components/CredentialStorageSelector.js";
12
- import { ProviderIcon as he } from "../components/ProviderIcon.js";
13
- import { SchemaForm as ge, initialValuesFromSchema as _e, isSchemaComplete as ve, parseFormSchema as ye, visibleValues as be } from "../components/SchemaForm.js";
14
- import { useCallback as a, useEffect as xe, useMemo as o, useRef as s, useState as c } from "react";
15
- import { AlertCircle as l, ArrowLeft as Se, ArrowRight as Ce, Check as we, CheckCircle2 as Te, ExternalLink as Ee, Key as u, Link as De, Loader2 as d, Lock as Oe, Search as ke, Shield as Ae } from "lucide-react";
16
- import { useLocation as je, useParams as Me } from "react-router";
17
- import { usePermissions as Ne } from "@burdenoff/fe-libs/shared/providers/shell";
18
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
19
- import { Button as m, GlassCard as Pe, IllustratedEmptyState as Fe, PagePurpose as Ie } from "@burdenoff/fe-libs/ui";
6
+ import { useGetConnectionLazyQuery as ee } from "../../generated/wspace-operations.js";
7
+ import { useProvider as te, useProviderByKey as ne, useProviders as re } from "../hooks/useProviders.js";
8
+ import { useAuthenticateWithApiKey as ie, useAuthenticateWithBasicAuth as ae, useAuthenticateWithBearerToken as oe, useAuthenticateWithCustomConfig as se, useAuthenticateWithServiceAccount as ce, useCreateConnection as le, useInitiateOAuth as ue } from "../hooks/useConnections.js";
9
+ import { useAuthTypeLabel as de, useCategoryLabel as fe } from "../hooks/useLabel.js";
10
+ import { useCallback as a, useEffect as pe, useMemo as o, useRef as me, useState as s } from "react";
11
+ import { AlertCircle as c, ArrowLeft as he, ArrowRight as ge, Check as _e, CheckCircle2 as ve, ExternalLink as ye, Key as be, Link as xe, Loader2 as l, Lock as Se, Search as Ce, Shield as we } from "lucide-react";
12
+ import { useLocation as Te, useParams as Ee } from "react-router";
13
+ import { useApolloClient as De } from "@apollo/client/react";
14
+ import { usePermissions as Oe } from "@burdenoff/fe-libs/shared/providers/shell";
15
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
16
+ import { CredentialStorageSelector as ke, ProviderIcon as f, createConnectionsApi as Ae, waitForOAuthCompletion as je } from "@burdenoff/fe-libs/connections";
17
+ import { Button as p, GlassCard as Me, IllustratedEmptyState as Ne, PagePurpose as Pe } from "@burdenoff/fe-libs/ui";
18
+ import { SchemaForm as Fe, initialValuesFromSchema as Ie, isSchemaComplete as Le, parseFormSchema as Re, visibleValues as ze } from "@burdenoff/fe-libs/credentials";
20
19
  //#region src/integrations/pages/AddConnectionWizard.tsx
21
- function h() {
22
- let { providerId: h } = Me(), { basePath: g = "/", navigate: _, apiGatewayUrl: v } = e(), y = t(), Le = te(), b = ee(), Re = je().search, x = o(() => new URLSearchParams(Re), [Re]), S = x.get("providerKey") ?? null, C = x.get("returnTo") ?? null, w = x.get("channelId") ?? null, T = !!(C && w), { provider: ze, loading: Be } = ie(S ?? ""), { providers: E, loading: D } = ae(), { hasPermission: Ve, isLoading: He } = Ne(), Ue = Ve(r.CONNECTION_CREATE), { createConnection: We, loading: Ge } = de(), { initiateOAuth: O, loading: Ke } = fe(), { authenticateWithApiKey: k, loading: qe } = oe(), { authenticateWithBasicAuth: Je, loading: Ye } = se(), { authenticateWithBearerToken: Xe, loading: Ze } = ce(), { authenticateWithServiceAccount: Qe, loading: $e } = ue(), { authenticateWithCustomConfig: et, loading: tt } = le(), [nt] = ne({ fetchPolicy: "network-only" }), [A, j] = c(h || S ? "configure" : "select_provider"), [M, rt] = c(null), [N, it] = c(""), [P, F] = c(""), [I, at] = c(""), [L, ot] = c(""), [R, st] = c(""), [z, ct] = c(""), [B, lt] = c(""), [ut, dt] = c({}), [V, ft] = c({
20
+ function m() {
21
+ let { providerId: m } = Ee(), { basePath: h = "/", navigate: g, apiGatewayUrl: _ } = e(), v = t(), Be = fe(), y = de(), b = Te().search, x = o(() => new URLSearchParams(b), [b]), S = x.get("providerKey") ?? null, C = x.get("returnTo") ?? null, w = x.get("channelId") ?? null, T = !!(C && w), { provider: Ve, loading: He } = ne(S ?? ""), { providers: E, loading: D } = re(), { hasPermission: Ue, isLoading: We } = Oe(), Ge = Ue(r.CONNECTION_CREATE), Ke = !We && Ue(r.VAULT_CREATE), qe = De(), Je = o(() => Ae(qe), [qe]), { createConnection: Ye, loading: Xe } = le(), { initiateOAuth: Ze, loading: Qe } = ue(), { authenticateWithApiKey: $e, loading: et } = ie(), { authenticateWithBasicAuth: tt, loading: nt } = ae(), { authenticateWithBearerToken: O, loading: rt } = oe(), { authenticateWithServiceAccount: it, loading: at } = ce(), { authenticateWithCustomConfig: k, loading: ot } = se(), [st] = ee({ fetchPolicy: "network-only" }), [A, j] = s(m || S ? "configure" : "select_provider"), [M, ct] = s(null), [N, lt] = s(""), [P, F] = s(""), [I, ut] = s(""), [L, dt] = s(""), [R, ft] = s(""), [z, pt] = s(""), [B, mt] = s(""), [ht, gt] = s({}), [V, _t] = s({
23
22
  mode: "managed",
24
23
  vaultId: "",
25
24
  secretId: "",
26
25
  managedSecretName: ""
27
- }), [H, U] = c(""), [W, pt] = c(null), [mt, ht] = c(!1), G = s(null), K = s(null);
28
- xe(() => () => {
26
+ }), [H, U] = s(""), [W, vt] = s(null), [yt, bt] = s(!1), G = me(null), K = me(null);
27
+ pe(() => () => {
29
28
  K.current?.(), G.current && !G.current.closed && G.current.close();
30
29
  }, []);
31
- let q = o(() => !h || !E ? null : E.find((e) => e.id === h) || null, [h, E]), { provider: gt, loading: _t } = re(h && !q && !D ? h : ""), J = o(() => ze ?? q ?? gt, [
32
- ze,
30
+ let q = o(() => !m || !E ? null : E.find((e) => e.id === m) || null, [m, E]), { provider: xt, loading: St } = te(m && !q && !D ? m : ""), J = o(() => Ve ?? q ?? xt, [
31
+ Ve,
33
32
  q,
34
- gt
33
+ xt
35
34
  ]);
36
- xe(() => {
37
- J && !M && A === "configure" && (rt(J), P || F(`${J.name} Connection`));
35
+ pe(() => {
36
+ J && !M && A === "configure" && (ct(J), P || F(`${J.name} Connection`));
38
37
  }, [
39
38
  J,
40
39
  M,
@@ -44,42 +43,42 @@ function h() {
44
43
  let Y = o(() => {
45
44
  if (!M) return null;
46
45
  let e = (M.authMethods ?? []).filter((e) => e.isEnabled);
47
- return ye((e.find((e) => e.authType === "custom") ?? e.find((e) => e.isDefault) ?? e[0] ?? null)?.configSchema ?? M.configSchema);
46
+ return Re((e.find((e) => e.authType === "custom") ?? e.find((e) => e.isDefault) ?? e[0] ?? null)?.configSchema ?? M.configSchema);
48
47
  }, [M]), X = o(() => ({
49
- ..._e(Y),
50
- ...ut
51
- }), [Y, ut]), vt = o(() => {
48
+ ...Ie(Y),
49
+ ...ht
50
+ }), [Y, ht]), Ct = o(() => {
52
51
  let e = (E ?? []).filter((e) => e.pluginStatus === "installed" && e.isEnabled);
53
52
  if (!N) return e;
54
53
  let t = N.toLowerCase();
55
54
  return e.filter((e) => e.name.toLowerCase().includes(t) || (e.description ?? "").toLowerCase().includes(t));
56
- }, [E, N]), yt = a((e) => {
57
- rt(e), dt({}), F(`${e.name} Connection`), j("configure");
58
- }, []), bt = a(() => {
55
+ }, [E, N]), wt = a((e) => {
56
+ ct(e), gt({}), F(`${e.name} Connection`), j("configure");
57
+ }, []), Tt = a(() => {
59
58
  if (!P.trim()) {
60
- U(y("integrations.addConnection.errors.nameRequired", "Connection name is required"));
59
+ U(v("integrations.addConnection.errors.nameRequired", "Connection name is required"));
61
60
  return;
62
61
  }
63
62
  if (!V.vaultId) {
64
- U(y("integrations.addConnection.errors.vaultRequired", "Please select a vault for storing or referencing credentials"));
63
+ U(v("integrations.addConnection.errors.vaultRequired", "Please select a vault for storing or referencing credentials"));
65
64
  return;
66
65
  }
67
66
  if (V.mode === "existing" && !V.secretId) {
68
- U(y("integrations.addConnection.errors.secretRequired", "Please select an existing vault secret to reuse"));
67
+ U(v("integrations.addConnection.errors.secretRequired", "Please select an existing vault secret to reuse"));
69
68
  return;
70
69
  }
71
70
  U(""), j("authenticate");
72
71
  }, [
73
72
  P,
74
73
  V,
75
- y
76
- ]), xt = a(async () => {
74
+ v
75
+ ]), Et = a(async () => {
77
76
  if (M) try {
78
77
  U("");
79
- let e = v ? `${v}/integrations/oauth/callback` : "/integrations/oauth/callback", t = T ? {
78
+ let e = _ ? `${_}/integrations/oauth/callback` : "/integrations/oauth/callback", t = T ? {
80
79
  returnTo: C,
81
80
  channelId: w
82
- } : void 0, n = W ?? await We({
81
+ } : void 0, n = W ?? await Ye({
83
82
  name: P.trim(),
84
83
  description: I.trim(),
85
84
  providerId: M.id,
@@ -89,26 +88,26 @@ function h() {
89
88
  ...t ? { config: t } : {}
90
89
  });
91
90
  if (!n) {
92
- U(y("integrations.addConnection.errors.createFailed", "Failed to create connection")), j("error");
91
+ U(v("integrations.addConnection.errors.createFailed", "Failed to create connection")), j("error");
93
92
  return;
94
93
  }
95
- switch (pt(n), M.authType) {
94
+ switch (vt(n), M.authType) {
96
95
  case "oauth2": {
97
- let t = await O(n, e, M.key);
96
+ let t = await Ze(n, e, M.key);
98
97
  if (t?.redirectUrl) if (T) {
99
98
  window.location.href = t.redirectUrl;
100
99
  return;
101
100
  } else {
102
101
  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`);
103
102
  if (!i) {
104
- U(y("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.")), j("error");
103
+ U(v("integrations.addConnection.authentication.popupBlocked", "Popup was blocked. Please allow popups for this site and try again.")), j("error");
105
104
  return;
106
105
  }
107
- G.current = i, ht(!0), K.current?.(), K.current = pe({
106
+ G.current = i, bt(!0), K.current?.(), K.current = je({
108
107
  connectionId: n,
109
108
  popup: i,
110
- fetchConnectionStatus: async () => {
111
- let { data: e } = await nt({ variables: { id: n } });
109
+ fetchConnection: async () => {
110
+ let { data: e } = await st({ variables: { id: n } });
112
111
  return e?.getConnection ?? null;
113
112
  },
114
113
  onSuccess: () => {
@@ -118,7 +117,7 @@ function h() {
118
117
  U(e), j("error");
119
118
  },
120
119
  onSettled: () => {
121
- K.current = null, G.current = null, ht(!1);
120
+ K.current = null, G.current = null, bt(!1);
122
121
  }
123
122
  });
124
123
  return;
@@ -128,230 +127,230 @@ function h() {
128
127
  }
129
128
  case "api_key":
130
129
  if (!L.trim()) {
131
- U(y("integrations.addConnection.errors.apiKeyRequired", "API key is required"));
130
+ U(v("integrations.addConnection.errors.apiKeyRequired", "API key is required"));
132
131
  return;
133
132
  }
134
- await k(n, L.trim()), j("success");
133
+ await $e(n, L.trim()), j("success");
135
134
  break;
136
135
  case "basic_auth":
137
136
  if (!R.trim() || !z.trim()) {
138
- U(y("integrations.addConnection.errors.basicAuthRequired", "Username and password are required"));
137
+ U(v("integrations.addConnection.errors.basicAuthRequired", "Username and password are required"));
139
138
  return;
140
139
  }
141
- await Je(n, R.trim(), z.trim()), j("success");
140
+ await tt(n, R.trim(), z.trim()), j("success");
142
141
  break;
143
142
  case "bearer_token":
144
143
  if (!B.trim()) {
145
- U(y("integrations.addConnection.errors.bearerTokenRequired", "Bearer token is required"));
144
+ U(v("integrations.addConnection.errors.bearerTokenRequired", "Bearer token is required"));
146
145
  return;
147
146
  }
148
- await Xe(n, B.trim()), j("success");
147
+ await O(n, B.trim()), j("success");
149
148
  break;
150
149
  case "service_account":
151
- await Qe(n, M.defaultScopes && M.defaultScopes.length > 0 ? M.defaultScopes : void 0), j("success");
150
+ await it(n, M.defaultScopes && M.defaultScopes.length > 0 ? M.defaultScopes : void 0), j("success");
152
151
  break;
153
152
  case "custom": {
154
153
  if (!Y) {
155
- U(y("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form."));
154
+ U(v("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form."));
156
155
  return;
157
156
  }
158
- if (!ve(Y, X)) {
159
- U(y("integrations.addConnection.errors.fieldsRequired", "Please fill in all required fields"));
157
+ if (!Le(Y, X)) {
158
+ U(v("integrations.addConnection.errors.fieldsRequired", "Please fill in all required fields"));
160
159
  return;
161
160
  }
162
161
  let e = {};
163
- for (let [t, n] of Object.entries(be(Y, X))) if (t in Y.properties) if (typeof n == "string") {
162
+ for (let [t, n] of Object.entries(ze(Y, X))) if (t in Y.properties) if (typeof n == "string") {
164
163
  let r = n.trim();
165
164
  r && (e[t] = r);
166
165
  } else n != null && (e[t] = n);
167
- await et(n, e), j("success");
166
+ await k(n, e), j("success");
168
167
  break;
169
168
  }
170
169
  default: j("success");
171
170
  }
172
171
  } catch (e) {
173
- U(e instanceof Error ? e.message : y("integrations.addConnection.errors.authFailed", "Authentication failed")), j("error");
172
+ U(e instanceof Error ? e.message : v("integrations.addConnection.errors.authFailed", "Authentication failed")), j("error");
174
173
  }
175
174
  }, [
176
175
  M,
177
176
  P,
178
177
  I,
179
178
  L,
180
- y,
179
+ v,
181
180
  R,
182
181
  z,
183
182
  B,
184
183
  Y,
185
184
  X,
186
- We,
185
+ Ye,
186
+ Ze,
187
+ st,
188
+ $e,
189
+ tt,
187
190
  O,
188
- nt,
191
+ it,
189
192
  k,
190
- Je,
191
- Xe,
192
- Qe,
193
- et,
194
193
  T,
195
194
  C,
196
195
  w,
197
- v,
196
+ _,
198
197
  W,
199
198
  V
200
- ]), St = a(() => {
199
+ ]), Dt = a(() => {
201
200
  if (!C || !W) return;
202
201
  let e = new URL(C, window.location.origin);
203
- e.searchParams.set("integrationConnectionId", W), w && e.searchParams.set("channelId", w), _?.(e.pathname + e.search);
202
+ e.searchParams.set("integrationConnectionId", W), w && e.searchParams.set("channelId", w), g?.(e.pathname + e.search);
204
203
  }, [
205
204
  C,
206
205
  W,
207
206
  w,
208
- _
209
- ]), Z = Ge || Ke || mt || qe || Ye || Ze || $e || tt, Ct = S ? Be : D || _t, Q = [
207
+ g
208
+ ]), Z = Xe || Qe || yt || et || nt || rt || at || ot, Ot = S ? He : D || St, Q = [
210
209
  {
211
210
  key: "select_provider",
212
- label: y("integrations.addConnection.steps.selectProvider", "Select Provider")
211
+ label: v("integrations.addConnection.steps.selectProvider", "Select Provider")
213
212
  },
214
213
  {
215
214
  key: "configure",
216
- label: y("integrations.addConnection.steps.configure", "Configure")
215
+ label: v("integrations.addConnection.steps.configure", "Configure")
217
216
  },
218
217
  {
219
218
  key: "authenticate",
220
- label: y("integrations.addConnection.steps.authenticate", "Authenticate")
219
+ label: v("integrations.addConnection.steps.authenticate", "Authenticate")
221
220
  }
222
221
  ], $ = Q.findIndex((e) => e.key === A);
223
- return He ? /* @__PURE__ */ f("div", {
222
+ return We ? /* @__PURE__ */ u("div", {
224
223
  className: "flex items-center justify-center py-20",
225
- children: /* @__PURE__ */ f(d, {
224
+ children: /* @__PURE__ */ u(l, {
226
225
  size: 48,
227
226
  className: "animate-spin text-primary"
228
227
  })
229
- }) : Ue ? /* @__PURE__ */ p("div", {
228
+ }) : Ge ? /* @__PURE__ */ d("div", {
230
229
  className: "space-y-6 p-6 max-w-3xl mx-auto",
231
230
  children: [
232
- /* @__PURE__ */ p("div", {
231
+ /* @__PURE__ */ d("div", {
233
232
  className: "flex items-center gap-4",
234
233
  children: [
235
- /* @__PURE__ */ f(m, {
234
+ /* @__PURE__ */ u(p, {
236
235
  variant: "ghost",
237
236
  size: "icon",
238
- onClick: () => _?.(i(g, "connections")),
239
- "aria-label": y("integrations.common.back", "Back"),
240
- children: /* @__PURE__ */ f(Se, { size: 20 })
237
+ onClick: () => g?.(i(h, "connections")),
238
+ "aria-label": v("integrations.common.back", "Back"),
239
+ children: /* @__PURE__ */ u(he, { size: 20 })
241
240
  }),
242
- /* @__PURE__ */ f("h1", {
241
+ /* @__PURE__ */ u("h1", {
243
242
  className: "text-2xl font-bold text-text-primary",
244
- children: y("integrations.addConnection.title", "Add Connection")
243
+ children: v("integrations.addConnection.title", "Add Connection")
245
244
  }),
246
- T && /* @__PURE__ */ f("span", {
245
+ T && /* @__PURE__ */ u("span", {
247
246
  className: "ml-auto text-xs font-medium px-2.5 py-1 rounded-full bg-action-primary-bg/10 text-primary",
248
- children: y("integrations.addConnection.botChannelSetup", "Bot Channel Setup")
247
+ children: v("integrations.addConnection.botChannelSetup", "Bot Channel Setup")
249
248
  })
250
249
  ]
251
250
  }),
252
- A !== "success" && A !== "error" && /* @__PURE__ */ f(Ie, {
253
- icon: /* @__PURE__ */ f(De, { size: 16 }),
254
- children: T ? y("integrations.addConnection.botChannelPurpose", "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel.") : y("integrations.addConnection.purpose", "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again.")
251
+ A !== "success" && A !== "error" && /* @__PURE__ */ u(Pe, {
252
+ icon: /* @__PURE__ */ u(xe, { size: 16 }),
253
+ children: T ? v("integrations.addConnection.botChannelPurpose", "Connect an external account so your bot channel can act on your behalf. Pick the service, name the connection, choose where its credentials live, then authenticate — you will be sent back to finish linking the channel.") : v("integrations.addConnection.purpose", "A connection is a one-time, authenticated link between your workspace and an external service. Choose a provider, give the connection a recognizable name, decide where its credentials are stored, then authenticate. Once created, the rest of the platform can reuse it without asking you to log in again.")
255
254
  }),
256
- A !== "success" && A !== "error" && /* @__PURE__ */ f("div", {
255
+ A !== "success" && A !== "error" && /* @__PURE__ */ u("div", {
257
256
  className: "flex items-center gap-2",
258
- children: Q.map((e, t) => /* @__PURE__ */ p("div", {
257
+ children: Q.map((e, t) => /* @__PURE__ */ d("div", {
259
258
  className: "flex items-center gap-2",
260
259
  children: [
261
- /* @__PURE__ */ f("div", {
260
+ /* @__PURE__ */ u("div", {
262
261
  className: n("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", t < $ ? "bg-action-primary-bg text-action-primary-text" : t === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
263
- children: t < $ ? /* @__PURE__ */ f(we, { size: 16 }) : t + 1
262
+ children: t < $ ? /* @__PURE__ */ u(_e, { size: 16 }) : t + 1
264
263
  }),
265
- /* @__PURE__ */ f("span", {
264
+ /* @__PURE__ */ u("span", {
266
265
  className: n("text-sm font-medium hidden sm:inline", t === $ ? "text-text-primary" : "text-text-secondary"),
267
266
  children: e.label
268
267
  }),
269
- t < Q.length - 1 && /* @__PURE__ */ f("div", { className: "w-8 h-px bg-border" })
268
+ t < Q.length - 1 && /* @__PURE__ */ u("div", { className: "w-8 h-px bg-border" })
270
269
  ]
271
270
  }, e.key))
272
271
  }),
273
- H && A !== "error" && /* @__PURE__ */ p("div", {
272
+ H && A !== "error" && /* @__PURE__ */ d("div", {
274
273
  className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-4 flex items-center gap-3",
275
- children: [/* @__PURE__ */ f(l, {
274
+ children: [/* @__PURE__ */ u(c, {
276
275
  size: 20,
277
276
  className: "text-status-error-text flex-shrink-0"
278
- }), /* @__PURE__ */ f("p", {
277
+ }), /* @__PURE__ */ u("p", {
279
278
  className: "text-sm text-status-error-text",
280
279
  children: H
281
280
  })]
282
281
  }),
283
- A === "configure" && Ct && !M && /* @__PURE__ */ f("div", {
282
+ A === "configure" && Ot && !M && /* @__PURE__ */ u("div", {
284
283
  className: "flex items-center justify-center py-12",
285
- children: /* @__PURE__ */ f(d, {
284
+ children: /* @__PURE__ */ u(l, {
286
285
  size: 24,
287
286
  className: "animate-spin text-text-secondary"
288
287
  })
289
288
  }),
290
- A === "configure" && !Ct && !M && (h || S) && /* @__PURE__ */ p("div", {
289
+ A === "configure" && !Ot && !M && (m || S) && /* @__PURE__ */ d("div", {
291
290
  className: "flex flex-col items-center justify-center py-12 text-center",
292
- children: [/* @__PURE__ */ f(l, {
291
+ children: [/* @__PURE__ */ u(c, {
293
292
  size: 32,
294
293
  className: "text-text-secondary mb-3"
295
- }), /* @__PURE__ */ f("p", {
294
+ }), /* @__PURE__ */ u("p", {
296
295
  className: "text-sm text-text-secondary",
297
- children: y("integrations.addConnection.providerUnavailable", "This provider isn't available.")
296
+ children: v("integrations.addConnection.providerUnavailable", "This provider isn't available.")
298
297
  })]
299
298
  }),
300
- A === "select_provider" && /* @__PURE__ */ p("div", {
299
+ A === "select_provider" && /* @__PURE__ */ d("div", {
301
300
  className: "space-y-4",
302
301
  children: [
303
- /* @__PURE__ */ p("div", {
302
+ /* @__PURE__ */ d("div", {
304
303
  className: "relative group",
305
- children: [/* @__PURE__ */ f(ke, {
304
+ children: [/* @__PURE__ */ u(Ce, {
306
305
  size: 18,
307
306
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
308
- }), /* @__PURE__ */ f("input", {
307
+ }), /* @__PURE__ */ u("input", {
309
308
  type: "text",
310
- placeholder: y("integrations.addConnection.search.placeholder", "Search installed providers..."),
311
- "aria-label": y("integrations.addConnection.search.ariaLabel", "Search installed providers"),
309
+ placeholder: v("integrations.addConnection.search.placeholder", "Search installed providers..."),
310
+ "aria-label": v("integrations.addConnection.search.ariaLabel", "Search installed providers"),
312
311
  value: N,
313
- onChange: (e) => it(e.target.value),
312
+ onChange: (e) => lt(e.target.value),
314
313
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
315
314
  })]
316
315
  }),
317
- D && /* @__PURE__ */ f("div", {
316
+ D && /* @__PURE__ */ u("div", {
318
317
  className: "flex items-center justify-center py-12",
319
- children: /* @__PURE__ */ f(d, {
318
+ children: /* @__PURE__ */ u(l, {
320
319
  size: 24,
321
320
  className: "animate-spin text-text-secondary"
322
321
  })
323
322
  }),
324
- !D && vt.length === 0 && /* @__PURE__ */ f(Fe, {
323
+ !D && Ct.length === 0 && /* @__PURE__ */ u(Ne, {
325
324
  illustration: N ? "empty-search" : "empty-data",
326
- title: N ? y("integrations.addConnection.empty.noMatchingProviders", "No matching providers") : y("integrations.addConnection.empty.noInstalledProviders", "No installed providers yet"),
327
- description: N ? y("integrations.addConnection.empty.matchingDescription", "No installed provider matches your search. Try a different term or install one from the catalog.") : y("integrations.addConnection.empty.installedDescription", "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started."),
328
- action: /* @__PURE__ */ f(m, {
329
- onClick: () => _?.(i(g, "providers")),
330
- children: y("integrations.addConnection.empty.browseCatalog", "Browse Catalog")
325
+ title: N ? v("integrations.addConnection.empty.noMatchingProviders", "No matching providers") : v("integrations.addConnection.empty.noInstalledProviders", "No installed providers yet"),
326
+ description: N ? v("integrations.addConnection.empty.matchingDescription", "No installed provider matches your search. Try a different term or install one from the catalog.") : v("integrations.addConnection.empty.installedDescription", "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started."),
327
+ action: /* @__PURE__ */ u(p, {
328
+ onClick: () => g?.(i(h, "providers")),
329
+ children: v("integrations.addConnection.empty.browseCatalog", "Browse Catalog")
331
330
  })
332
331
  }),
333
- /* @__PURE__ */ f("div", {
332
+ /* @__PURE__ */ u("div", {
334
333
  className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
335
- children: vt.map((e) => /* @__PURE__ */ p("button", {
334
+ children: Ct.map((e) => /* @__PURE__ */ d("button", {
336
335
  type: "button",
337
- onClick: () => yt(e),
336
+ onClick: () => wt(e),
338
337
  className: n("flex items-start gap-3 p-4 rounded-xl border border-border-seam bg-bg-surface text-left", "hover:border-border-strong hover:shadow-[var(--shadow-pop)]", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", "transition-[box-shadow,border-color] duration-200"),
339
- children: [/* @__PURE__ */ f(he, {
338
+ children: [/* @__PURE__ */ u(f, {
340
339
  provider: e,
341
340
  size: 40
342
- }), /* @__PURE__ */ p("div", {
341
+ }), /* @__PURE__ */ d("div", {
343
342
  className: "flex-1 min-w-0",
344
- children: [/* @__PURE__ */ f("h3", {
343
+ children: [/* @__PURE__ */ u("h3", {
345
344
  className: "font-medium text-text-primary truncate",
346
345
  children: e.name
347
- }), /* @__PURE__ */ p("p", {
346
+ }), /* @__PURE__ */ d("p", {
348
347
  className: "text-xs text-text-secondary mt-0.5",
349
348
  children: [
350
- y(`integrations.category.${e.category}`, Le(e.category)),
349
+ v(`integrations.category.${e.category}`, Be(e.category)),
351
350
  " ",
352
351
  "·",
353
352
  " ",
354
- y(`integrations.authType.${e.authType}`, b(e.authType))
353
+ v(`integrations.authType.${e.authType}`, y(e.authType))
355
354
  ]
356
355
  })]
357
356
  })]
@@ -359,391 +358,396 @@ function h() {
359
358
  })
360
359
  ]
361
360
  }),
362
- A === "configure" && M && /* @__PURE__ */ p("div", {
361
+ A === "configure" && M && /* @__PURE__ */ d("div", {
363
362
  className: "space-y-6",
364
363
  children: [
365
- /* @__PURE__ */ p(Pe, {
364
+ /* @__PURE__ */ d(Me, {
366
365
  className: "flex items-center gap-3 p-4 border-border-seam",
367
- children: [/* @__PURE__ */ f(he, {
366
+ children: [/* @__PURE__ */ u(f, {
368
367
  provider: M,
369
368
  size: 40
370
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h3", {
369
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
371
370
  className: "font-medium text-text-primary",
372
371
  children: M.name
373
- }), /* @__PURE__ */ f("p", {
372
+ }), /* @__PURE__ */ u("p", {
374
373
  className: "text-xs text-text-secondary",
375
- children: y(`integrations.authType.${M.authType}`, b(M.authType))
374
+ children: v(`integrations.authType.${M.authType}`, y(M.authType))
376
375
  })] })]
377
376
  }),
378
- /* @__PURE__ */ p("div", {
377
+ /* @__PURE__ */ d("div", {
379
378
  className: "space-y-4",
380
379
  children: [
381
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
380
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
382
381
  htmlFor: "conn-name",
383
382
  className: "block text-sm font-semibold mb-2",
384
383
  children: [
385
- y("integrations.addConnection.fields.connectionName", "Connection Name"),
384
+ v("integrations.addConnection.fields.connectionName", "Connection Name"),
386
385
  " ",
387
- /* @__PURE__ */ f("span", {
386
+ /* @__PURE__ */ u("span", {
388
387
  className: "text-status-error-text",
389
388
  children: "*"
390
389
  })
391
390
  ]
392
- }), /* @__PURE__ */ f("input", {
391
+ }), /* @__PURE__ */ u("input", {
393
392
  type: "text",
394
393
  id: "conn-name",
395
- "aria-label": y("integrations.addConnection.fields.connectionName", "Connection Name"),
394
+ "aria-label": v("integrations.addConnection.fields.connectionName", "Connection Name"),
396
395
  value: P,
397
396
  onChange: (e) => F(e.target.value),
398
- placeholder: y("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My Slack Workspace"),
397
+ placeholder: v("integrations.addConnection.fields.connectionNamePlaceholder", "e.g., My Slack Workspace"),
399
398
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
400
399
  })] }),
401
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
400
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
402
401
  htmlFor: "conn-desc",
403
402
  className: "block text-sm font-semibold mb-2",
404
- children: y("integrations.addConnection.fields.description", "Description")
405
- }), /* @__PURE__ */ f("textarea", {
403
+ children: v("integrations.addConnection.fields.description", "Description")
404
+ }), /* @__PURE__ */ u("textarea", {
406
405
  id: "conn-desc",
407
- "aria-label": y("integrations.addConnection.fields.description", "Description"),
406
+ "aria-label": v("integrations.addConnection.fields.description", "Description"),
408
407
  value: I,
409
- onChange: (e) => at(e.target.value),
408
+ onChange: (e) => ut(e.target.value),
410
409
  rows: 3,
411
- placeholder: y("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
410
+ placeholder: v("integrations.addConnection.fields.descriptionPlaceholder", "Optional description..."),
412
411
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
413
412
  })] }),
414
- /* @__PURE__ */ f(me, {
413
+ /* @__PURE__ */ u(ke, {
414
+ api: Je,
415
415
  value: V,
416
- onChange: ft,
417
- providerAuthType: M.authType
416
+ onChange: _t,
417
+ authType: M.authType,
418
+ requireVault: !0,
419
+ canCreateVault: Ke,
420
+ translate: v
418
421
  })
419
422
  ]
420
423
  }),
421
- /* @__PURE__ */ p("div", {
424
+ /* @__PURE__ */ d("div", {
422
425
  className: "flex gap-3",
423
- children: [/* @__PURE__ */ f(m, {
426
+ children: [/* @__PURE__ */ u(p, {
424
427
  variant: "outline",
425
- onClick: () => h || S ? _?.(i(g, "connections")) : j("select_provider"),
426
- children: y("integrations.addConnection.actions.back", "Back")
427
- }), /* @__PURE__ */ p(m, {
428
- onClick: bt,
428
+ onClick: () => m || S ? g?.(i(h, "connections")) : j("select_provider"),
429
+ children: v("integrations.addConnection.actions.back", "Back")
430
+ }), /* @__PURE__ */ d(p, {
431
+ onClick: Tt,
429
432
  children: [
430
- y("integrations.addConnection.actions.next", "Next"),
433
+ v("integrations.addConnection.actions.next", "Next"),
431
434
  " ",
432
- /* @__PURE__ */ f(Ce, { size: 16 })
435
+ /* @__PURE__ */ u(ge, { size: 16 })
433
436
  ]
434
437
  })]
435
438
  })
436
439
  ]
437
440
  }),
438
- A === "authenticate" && M && /* @__PURE__ */ p("div", {
441
+ A === "authenticate" && M && /* @__PURE__ */ d("div", {
439
442
  className: "space-y-6",
440
- children: [/* @__PURE__ */ p(Pe, {
443
+ children: [/* @__PURE__ */ d(Me, {
441
444
  treatment: "glass",
442
445
  glow: !0,
443
446
  className: "border-border-seam p-5",
444
447
  children: [
445
- /* @__PURE__ */ p("h2", {
448
+ /* @__PURE__ */ d("h2", {
446
449
  className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
447
450
  children: [
448
- /* @__PURE__ */ f(Ae, {
451
+ /* @__PURE__ */ u(we, {
449
452
  size: 18,
450
453
  className: "text-primary"
451
454
  }),
452
- y("integrations.addConnection.authentication.title", "Authentication"),
455
+ v("integrations.addConnection.authentication.title", "Authentication"),
453
456
  ":",
454
457
  " ",
455
- y(`integrations.authType.${M.authType}`, b(M.authType))
458
+ v(`integrations.authType.${M.authType}`, y(M.authType))
456
459
  ]
457
460
  }),
458
- M.authType === "oauth2" && /* @__PURE__ */ p("div", {
461
+ M.authType === "oauth2" && /* @__PURE__ */ d("div", {
459
462
  className: "space-y-4",
460
- children: [/* @__PURE__ */ f("p", {
463
+ children: [/* @__PURE__ */ u("p", {
461
464
  className: "text-sm text-text-secondary",
462
- children: y("integrations.addConnection.authentication.oauthRedirect", "You will be redirected to {{provider}} to authorize access. After granting permission, you'll be redirected back.", { provider: M.name })
463
- }), /* @__PURE__ */ p("div", {
465
+ children: v("integrations.addConnection.authentication.oauthRedirect", "You will be redirected to {{provider}} to authorize access. After granting permission, you'll be redirected back.", { provider: M.name })
466
+ }), /* @__PURE__ */ d("div", {
464
467
  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",
465
- children: [/* @__PURE__ */ f(Ee, { size: 16 }), T ? y("integrations.addConnection.authentication.botChannelRedirect", "You'll be redirected back to the bot channel setup after authorization.") : y("integrations.addConnection.authentication.oauthPopupInfo", "A new window will open for OAuth authentication")]
468
+ children: [/* @__PURE__ */ u(ye, { size: 16 }), T ? v("integrations.addConnection.authentication.botChannelRedirect", "You'll be redirected back to the bot channel setup after authorization.") : v("integrations.addConnection.authentication.oauthPopupInfo", "A new window will open for OAuth authentication")]
466
469
  })]
467
470
  }),
468
- M.authType === "api_key" && /* @__PURE__ */ p("div", {
471
+ M.authType === "api_key" && /* @__PURE__ */ d("div", {
469
472
  className: "space-y-4",
470
- children: [/* @__PURE__ */ f("p", {
473
+ children: [/* @__PURE__ */ u("p", {
471
474
  className: "text-sm text-text-secondary",
472
- children: y("integrations.addConnection.authentication.apiKeyHint", "Enter your {{provider}} API key. You can typically find this in your account settings.", { provider: M.name })
473
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
475
+ children: v("integrations.addConnection.authentication.apiKeyHint", "Enter your {{provider}} API key. You can typically find this in your account settings.", { provider: M.name })
476
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
474
477
  htmlFor: "api-key",
475
478
  className: "block text-sm font-semibold mb-2",
476
479
  children: [
477
- y("integrations.addConnection.fields.apiKey", "API Key"),
480
+ v("integrations.addConnection.fields.apiKey", "API Key"),
478
481
  " ",
479
- /* @__PURE__ */ f("span", {
482
+ /* @__PURE__ */ u("span", {
480
483
  className: "text-status-error-text",
481
484
  children: "*"
482
485
  })
483
486
  ]
484
- }), /* @__PURE__ */ p("div", {
487
+ }), /* @__PURE__ */ d("div", {
485
488
  className: "relative",
486
- children: [/* @__PURE__ */ f(u, {
489
+ children: [/* @__PURE__ */ u(be, {
487
490
  size: 16,
488
491
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
489
- }), /* @__PURE__ */ f("input", {
492
+ }), /* @__PURE__ */ u("input", {
490
493
  type: "password",
491
494
  id: "api-key",
492
- "aria-label": y("integrations.addConnection.fields.apiKey", "API Key"),
495
+ "aria-label": v("integrations.addConnection.fields.apiKey", "API Key"),
493
496
  value: L,
494
- onChange: (e) => ot(e.target.value),
495
- placeholder: y("integrations.addConnection.fields.apiKeyPlaceholder", "Enter your API key"),
497
+ onChange: (e) => dt(e.target.value),
498
+ placeholder: v("integrations.addConnection.fields.apiKeyPlaceholder", "Enter your API key"),
496
499
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
497
500
  })]
498
501
  })] })]
499
502
  }),
500
- M.authType === "basic_auth" && /* @__PURE__ */ p("div", {
503
+ M.authType === "basic_auth" && /* @__PURE__ */ d("div", {
501
504
  className: "space-y-4",
502
505
  children: [
503
- /* @__PURE__ */ f("p", {
506
+ /* @__PURE__ */ u("p", {
504
507
  className: "text-sm text-text-secondary",
505
- children: y("integrations.addConnection.authentication.basicAuthHint", "Enter your {{provider}} credentials.", { provider: M.name })
508
+ children: v("integrations.addConnection.authentication.basicAuthHint", "Enter your {{provider}} credentials.", { provider: M.name })
506
509
  }),
507
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
510
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
508
511
  htmlFor: "username",
509
512
  className: "block text-sm font-semibold mb-2",
510
513
  children: [
511
- y("integrations.addConnection.fields.username", "Username"),
514
+ v("integrations.addConnection.fields.username", "Username"),
512
515
  " ",
513
- /* @__PURE__ */ f("span", {
516
+ /* @__PURE__ */ u("span", {
514
517
  className: "text-status-error-text",
515
518
  children: "*"
516
519
  })
517
520
  ]
518
- }), /* @__PURE__ */ f("input", {
521
+ }), /* @__PURE__ */ u("input", {
519
522
  type: "text",
520
523
  id: "username",
521
- "aria-label": y("integrations.addConnection.fields.username", "Username"),
524
+ "aria-label": v("integrations.addConnection.fields.username", "Username"),
522
525
  value: R,
523
- onChange: (e) => st(e.target.value),
524
- placeholder: y("integrations.addConnection.fields.usernamePlaceholder", "Username or email"),
526
+ onChange: (e) => ft(e.target.value),
527
+ placeholder: v("integrations.addConnection.fields.usernamePlaceholder", "Username or email"),
525
528
  className: "w-full px-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
526
529
  })] }),
527
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
530
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
528
531
  htmlFor: "password",
529
532
  className: "block text-sm font-semibold mb-2",
530
533
  children: [
531
- y("integrations.addConnection.fields.password", "Password"),
534
+ v("integrations.addConnection.fields.password", "Password"),
532
535
  " ",
533
- /* @__PURE__ */ f("span", {
536
+ /* @__PURE__ */ u("span", {
534
537
  className: "text-status-error-text",
535
538
  children: "*"
536
539
  })
537
540
  ]
538
- }), /* @__PURE__ */ p("div", {
541
+ }), /* @__PURE__ */ d("div", {
539
542
  className: "relative",
540
- children: [/* @__PURE__ */ f(Oe, {
543
+ children: [/* @__PURE__ */ u(Se, {
541
544
  size: 16,
542
545
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
543
- }), /* @__PURE__ */ f("input", {
546
+ }), /* @__PURE__ */ u("input", {
544
547
  type: "password",
545
548
  id: "password",
546
- "aria-label": y("integrations.addConnection.fields.password", "Password"),
549
+ "aria-label": v("integrations.addConnection.fields.password", "Password"),
547
550
  value: z,
548
- onChange: (e) => ct(e.target.value),
549
- placeholder: y("integrations.addConnection.fields.passwordPlaceholder", "Password"),
551
+ onChange: (e) => pt(e.target.value),
552
+ placeholder: v("integrations.addConnection.fields.passwordPlaceholder", "Password"),
550
553
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
551
554
  })]
552
555
  })] })
553
556
  ]
554
557
  }),
555
- M.authType === "bearer_token" && /* @__PURE__ */ p("div", {
558
+ M.authType === "bearer_token" && /* @__PURE__ */ d("div", {
556
559
  className: "space-y-4",
557
- children: [/* @__PURE__ */ f("p", {
560
+ children: [/* @__PURE__ */ u("p", {
558
561
  className: "text-sm text-text-secondary",
559
- children: y("integrations.addConnection.authentication.bearerTokenHint", "Enter your {{provider}} bearer token.", { provider: M.name })
560
- }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
562
+ children: v("integrations.addConnection.authentication.bearerTokenHint", "Enter your {{provider}} bearer token.", { provider: M.name })
563
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("label", {
561
564
  htmlFor: "bearer-token",
562
565
  className: "block text-sm font-semibold mb-2",
563
566
  children: [
564
- y("integrations.addConnection.fields.bearerToken", "Bearer Token"),
567
+ v("integrations.addConnection.fields.bearerToken", "Bearer Token"),
565
568
  " ",
566
- /* @__PURE__ */ f("span", {
569
+ /* @__PURE__ */ u("span", {
567
570
  className: "text-status-error-text",
568
571
  children: "*"
569
572
  })
570
573
  ]
571
- }), /* @__PURE__ */ p("div", {
574
+ }), /* @__PURE__ */ d("div", {
572
575
  className: "relative",
573
- children: [/* @__PURE__ */ f(u, {
576
+ children: [/* @__PURE__ */ u(be, {
574
577
  size: 16,
575
578
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
576
- }), /* @__PURE__ */ f("input", {
579
+ }), /* @__PURE__ */ u("input", {
577
580
  type: "password",
578
581
  id: "bearer-token",
579
- "aria-label": y("integrations.addConnection.fields.bearerToken", "Bearer Token"),
582
+ "aria-label": v("integrations.addConnection.fields.bearerToken", "Bearer Token"),
580
583
  value: B,
581
- onChange: (e) => lt(e.target.value),
582
- placeholder: y("integrations.addConnection.fields.bearerTokenPlaceholder", "Enter your token"),
584
+ onChange: (e) => mt(e.target.value),
585
+ placeholder: v("integrations.addConnection.fields.bearerTokenPlaceholder", "Enter your token"),
583
586
  className: "w-full pl-10 pr-4 py-2.5 border border-border-subtle rounded-lg bg-bg-surface text-sm font-mono focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
584
587
  })]
585
588
  })] })]
586
589
  }),
587
- M.authType === "service_account" && /* @__PURE__ */ f("div", {
590
+ M.authType === "service_account" && /* @__PURE__ */ u("div", {
588
591
  className: "space-y-4",
589
- children: /* @__PURE__ */ p("div", {
592
+ children: /* @__PURE__ */ d("div", {
590
593
  className: "rounded-lg border border-border bg-status-success-bg-subtle p-4",
591
594
  children: [
592
- /* @__PURE__ */ f("p", {
595
+ /* @__PURE__ */ u("p", {
593
596
  className: "text-sm font-semibold text-foreground",
594
- children: y("integrations.addConnection.authentication.serviceAccount.title", "No credentials needed")
597
+ children: v("integrations.addConnection.authentication.serviceAccount.title", "No credentials needed")
595
598
  }),
596
- /* @__PURE__ */ f("p", {
599
+ /* @__PURE__ */ u("p", {
597
600
  className: "text-sm text-muted-foreground mt-1",
598
- children: y("integrations.addConnection.authentication.serviceAccount.description", "{{provider}} is a first-party integration. Connecting grants {{provider}} permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage.", { provider: M.name })
601
+ children: v("integrations.addConnection.authentication.serviceAccount.description", "{{provider}} is a first-party integration. Connecting grants {{provider}} permission to act on your behalf; access tokens are issued securely per use — there are no keys or secrets to manage.", { provider: M.name })
599
602
  }),
600
- M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ f("p", {
603
+ M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ u("p", {
601
604
  className: "text-sm text-muted-foreground mt-2",
602
- children: y("integrations.addConnection.authentication.serviceAccount.scopes", "Scopes: {{scopes}}", { scopes: M.defaultScopes.join(", ") })
605
+ children: v("integrations.addConnection.authentication.serviceAccount.scopes", "Scopes: {{scopes}}", { scopes: M.defaultScopes.join(", ") })
603
606
  })
604
607
  ]
605
608
  })
606
609
  }),
607
- M.authType === "custom" && (Y ? /* @__PURE__ */ p("div", {
610
+ M.authType === "custom" && (Y ? /* @__PURE__ */ d("div", {
608
611
  className: "space-y-4",
609
- children: [/* @__PURE__ */ f("p", {
612
+ children: [/* @__PURE__ */ u("p", {
610
613
  className: "text-sm text-text-secondary",
611
- children: y("integrations.addConnection.authentication.custom.hint", "Enter your {{provider}} configuration. Secret fields are stored encrypted and never shown again.", { provider: M.name })
612
- }), /* @__PURE__ */ f(ge, {
614
+ children: v("integrations.addConnection.authentication.custom.hint", "Enter your {{provider}} configuration. Secret fields are stored encrypted and never shown again.", { provider: M.name })
615
+ }), /* @__PURE__ */ u(Fe, {
613
616
  schema: Y,
614
617
  values: X,
615
- onChange: dt,
618
+ onChange: gt,
616
619
  disabled: Z,
617
- idPrefix: "custom"
620
+ idPrefix: "custom",
621
+ translate: v
618
622
  })]
619
- }) : /* @__PURE__ */ p("div", {
623
+ }) : /* @__PURE__ */ d("div", {
620
624
  className: "flex items-center gap-2 px-3 py-2 rounded-lg bg-status-error-bg-subtle border border-border-default",
621
- children: [/* @__PURE__ */ f(l, {
625
+ children: [/* @__PURE__ */ u(c, {
622
626
  size: 16,
623
627
  className: "text-status-error-text flex-shrink-0"
624
- }), /* @__PURE__ */ f("span", {
628
+ }), /* @__PURE__ */ u("span", {
625
629
  className: "text-sm text-status-error-text",
626
- children: y("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form.")
630
+ children: v("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form.")
627
631
  })]
628
632
  }))
629
633
  ]
630
- }), /* @__PURE__ */ p("div", {
634
+ }), /* @__PURE__ */ d("div", {
631
635
  className: "flex gap-3",
632
- children: [/* @__PURE__ */ f(m, {
636
+ children: [/* @__PURE__ */ u(p, {
633
637
  variant: "outline",
634
638
  onClick: () => j("configure"),
635
639
  disabled: Z,
636
- children: y("integrations.addConnection.actions.back", "Back")
637
- }), /* @__PURE__ */ p(m, {
638
- onClick: xt,
640
+ children: v("integrations.addConnection.actions.back", "Back")
641
+ }), /* @__PURE__ */ d(p, {
642
+ onClick: Et,
639
643
  disabled: Z,
640
- children: [Z ? /* @__PURE__ */ f(d, {
644
+ children: [Z ? /* @__PURE__ */ u(l, {
641
645
  size: 16,
642
646
  className: "animate-spin"
643
- }) : /* @__PURE__ */ f(we, { size: 16 }), M.authType === "oauth2" ? y("integrations.addConnection.actions.authorize", "Authorize") : y("integrations.addConnection.actions.connect", "Connect")]
647
+ }) : /* @__PURE__ */ u(_e, { size: 16 }), M.authType === "oauth2" ? v("integrations.addConnection.actions.authorize", "Authorize") : v("integrations.addConnection.actions.connect", "Connect")]
644
648
  })]
645
649
  })]
646
650
  }),
647
- A === "success" && /* @__PURE__ */ p("div", {
651
+ A === "success" && /* @__PURE__ */ d("div", {
648
652
  className: "flex flex-col items-center justify-center py-12 text-center",
649
653
  children: [
650
- /* @__PURE__ */ f("div", {
654
+ /* @__PURE__ */ u("div", {
651
655
  className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
652
- children: /* @__PURE__ */ f(Te, {
656
+ children: /* @__PURE__ */ u(ve, {
653
657
  size: 48,
654
658
  className: "text-status-success-text"
655
659
  })
656
660
  }),
657
- /* @__PURE__ */ f("h2", {
661
+ /* @__PURE__ */ u("h2", {
658
662
  className: "text-xl font-bold text-text-primary mb-2",
659
- children: y("integrations.addConnection.success.title", "Connection Created!")
663
+ children: v("integrations.addConnection.success.title", "Connection Created!")
660
664
  }),
661
- /* @__PURE__ */ f("p", {
665
+ /* @__PURE__ */ u("p", {
662
666
  className: "text-sm text-text-secondary mb-6 max-w-sm",
663
- children: y("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: M?.name ?? "" })
667
+ children: v("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: M?.name ?? "" })
664
668
  }),
665
- /* @__PURE__ */ p("div", {
669
+ /* @__PURE__ */ d("div", {
666
670
  className: "flex gap-3",
667
671
  children: [
668
- T && W && /* @__PURE__ */ p(m, {
669
- onClick: St,
670
- children: [/* @__PURE__ */ f(De, { size: 16 }), y("integrations.addConnection.actions.linkToBotChannel", "Link to Bot Channel")]
672
+ T && W && /* @__PURE__ */ d(p, {
673
+ onClick: Dt,
674
+ children: [/* @__PURE__ */ u(xe, { size: 16 }), v("integrations.addConnection.actions.linkToBotChannel", "Link to Bot Channel")]
671
675
  }),
672
- !T && W && /* @__PURE__ */ f(m, {
673
- onClick: () => _?.(i(g, `connections/${W}`)),
674
- children: y("integrations.addConnection.actions.viewConnection", "View Connection")
676
+ !T && W && /* @__PURE__ */ u(p, {
677
+ onClick: () => g?.(i(h, `connections/${W}`)),
678
+ children: v("integrations.addConnection.actions.viewConnection", "View Connection")
675
679
  }),
676
- /* @__PURE__ */ f(m, {
680
+ /* @__PURE__ */ u(p, {
677
681
  variant: "outline",
678
- onClick: () => _?.(i(g, "connections")),
679
- children: y("integrations.addConnection.actions.allConnections", "All Connections")
682
+ onClick: () => g?.(i(h, "connections")),
683
+ children: v("integrations.addConnection.actions.allConnections", "All Connections")
680
684
  })
681
685
  ]
682
686
  })
683
687
  ]
684
688
  }),
685
- A === "error" && /* @__PURE__ */ p("div", {
689
+ A === "error" && /* @__PURE__ */ d("div", {
686
690
  className: "flex flex-col items-center justify-center py-12 text-center",
687
691
  children: [
688
- /* @__PURE__ */ f("div", {
692
+ /* @__PURE__ */ u("div", {
689
693
  className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
690
- children: /* @__PURE__ */ f(l, {
694
+ children: /* @__PURE__ */ u(c, {
691
695
  size: 48,
692
696
  className: "text-status-error-text"
693
697
  })
694
698
  }),
695
- /* @__PURE__ */ f("h2", {
699
+ /* @__PURE__ */ u("h2", {
696
700
  className: "text-xl font-bold text-text-primary mb-2",
697
- children: y("integrations.addConnection.failed.title", "Connection Failed")
701
+ children: v("integrations.addConnection.failed.title", "Connection Failed")
698
702
  }),
699
- /* @__PURE__ */ f("p", {
703
+ /* @__PURE__ */ u("p", {
700
704
  className: "text-sm text-status-error-text mb-6 max-w-sm",
701
- children: H || y("integrations.addConnection.errors.unexpected", "An unexpected error occurred.")
705
+ children: H || v("integrations.addConnection.errors.unexpected", "An unexpected error occurred.")
702
706
  }),
703
- /* @__PURE__ */ p("div", {
707
+ /* @__PURE__ */ d("div", {
704
708
  className: "flex gap-3",
705
- children: [/* @__PURE__ */ f(m, {
709
+ children: [/* @__PURE__ */ u(p, {
706
710
  onClick: () => {
707
711
  U(""), j("authenticate");
708
712
  },
709
- children: y("integrations.addConnection.actions.tryAgain", "Try Again")
710
- }), /* @__PURE__ */ f(m, {
713
+ children: v("integrations.addConnection.actions.tryAgain", "Try Again")
714
+ }), /* @__PURE__ */ u(p, {
711
715
  variant: "outline",
712
- onClick: () => _?.(i(g, "connections")),
713
- children: y("integrations.addConnection.actions.cancel", "Cancel")
716
+ onClick: () => g?.(i(h, "connections")),
717
+ children: v("integrations.addConnection.actions.cancel", "Cancel")
714
718
  })]
715
719
  })
716
720
  ]
717
721
  })
718
722
  ]
719
- }) : /* @__PURE__ */ p("div", {
723
+ }) : /* @__PURE__ */ d("div", {
720
724
  className: "flex flex-col items-center justify-center py-20 text-center p-6",
721
725
  children: [
722
- /* @__PURE__ */ f(Ae, {
726
+ /* @__PURE__ */ u(we, {
723
727
  size: 48,
724
728
  className: "text-text-secondary mb-4"
725
729
  }),
726
- /* @__PURE__ */ f("h2", {
730
+ /* @__PURE__ */ u("h2", {
727
731
  className: "text-xl font-bold text-text-primary mb-2",
728
- children: y("integrations.addConnection.denied.title", "Access Denied")
732
+ children: v("integrations.addConnection.denied.title", "Access Denied")
729
733
  }),
730
- /* @__PURE__ */ f("p", {
734
+ /* @__PURE__ */ u("p", {
731
735
  className: "text-sm text-text-secondary mb-6 max-w-sm",
732
- children: y("integrations.addConnection.denied.description", "You don't have permission to create connections.")
736
+ children: v("integrations.addConnection.denied.description", "You don't have permission to create connections.")
733
737
  }),
734
- /* @__PURE__ */ p(m, {
738
+ /* @__PURE__ */ d(p, {
735
739
  variant: "outline",
736
- onClick: () => _?.(i(g, "connections")),
740
+ onClick: () => g?.(i(h, "connections")),
737
741
  children: [
738
- /* @__PURE__ */ f(Se, { size: 16 }),
742
+ /* @__PURE__ */ u(he, { size: 16 }),
739
743
  " ",
740
- y("integrations.addConnection.denied.back", "Back to Connections")
744
+ v("integrations.addConnection.denied.back", "Back to Connections")
741
745
  ]
742
746
  })
743
747
  ]
744
748
  });
745
749
  }
746
750
  //#endregion
747
- export { h as AddConnectionWizard };
751
+ export { m as AddConnectionWizard };
748
752
 
749
753
  //# sourceMappingURL=AddConnectionWizard.js.map