@burdenoff/microfe-integrations 2026.830.1 → 2026.830.3

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