@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.
- package/dist/generated/wspace-operations.d.ts +0 -137
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +73 -142
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/integrations/ConnectSourceDialog.js +10 -10
- package/dist/integrations/components/AddConnectionDialog.d.ts +15 -3
- package/dist/integrations/components/AddConnectionDialog.d.ts.map +1 -1
- package/dist/integrations/components/AddConnectionDialog.js +53 -631
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.d.ts.map +1 -1
- package/dist/integrations/components/AuthMethodsEditor.js +69 -68
- package/dist/integrations/components/AuthMethodsEditor.js.map +1 -1
- package/dist/integrations/components/ConnectionCard.js +28 -28
- package/dist/integrations/components/ConnectionCard.js.map +1 -1
- package/dist/integrations/components/ProviderCard.js +29 -29
- package/dist/integrations/components/ProviderCard.js.map +1 -1
- package/dist/integrations/hooks/useConnections.js +91 -102
- package/dist/integrations/hooks/useConnections.js.map +1 -1
- package/dist/integrations/hooks/useLogs.js +4 -4
- package/dist/integrations/hooks/useProviders.js +36 -36
- package/dist/integrations/pages/AddConnectionWizard.d.ts.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +281 -277
- package/dist/integrations/pages/AddConnectionWizard.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +24 -24
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/ConnectionsList.js +7 -7
- package/dist/integrations/pages/ConnectionsList.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +34 -34
- package/dist/integrations/pages/ProviderCatalog.js +4 -4
- package/dist/integrations/pages/ProviderDetail.js +110 -110
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/dist/integrations/translations/en.d.ts +18 -0
- package/dist/integrations/translations/en.d.ts.map +1 -1
- package/dist/integrations/utils/appearance.d.ts +0 -3
- package/dist/integrations/utils/appearance.d.ts.map +1 -1
- package/dist/integrations/utils/appearance.js +1 -20
- package/dist/integrations/utils/appearance.js.map +1 -1
- package/dist/integrations/utils/integrationsHelpers.js +1 -4
- package/dist/integrations/utils/integrationsHelpers.js.map +1 -1
- package/package.json +2 -2
- package/dist/integrations/assets/brands/bigconsole.js +0 -6
- package/dist/integrations/assets/brands/bigconsole.js.map +0 -1
- package/dist/integrations/assets/brands/burdenoff.js +0 -6
- package/dist/integrations/assets/brands/burdenoff.js.map +0 -1
- package/dist/integrations/components/AuthMethodSelector.d.ts +0 -30
- package/dist/integrations/components/AuthMethodSelector.d.ts.map +0 -1
- package/dist/integrations/components/AuthMethodSelector.js +0 -66
- package/dist/integrations/components/AuthMethodSelector.js.map +0 -1
- package/dist/integrations/components/CredentialStorageSelector.d.ts +0 -16
- package/dist/integrations/components/CredentialStorageSelector.d.ts.map +0 -1
- package/dist/integrations/components/CredentialStorageSelector.js +0 -262
- package/dist/integrations/components/CredentialStorageSelector.js.map +0 -1
- package/dist/integrations/components/ProviderIcon.d.ts +0 -25
- package/dist/integrations/components/ProviderIcon.d.ts.map +0 -1
- package/dist/integrations/components/ProviderIcon.js +0 -166
- package/dist/integrations/components/ProviderIcon.js.map +0 -1
- package/dist/integrations/components/SchemaForm.d.ts +0 -60
- package/dist/integrations/components/SchemaForm.d.ts.map +0 -1
- package/dist/integrations/components/SchemaForm.js +0 -235
- package/dist/integrations/components/SchemaForm.js.map +0 -1
- package/dist/integrations/hooks/useCredentialVaults.d.ts +0 -40
- package/dist/integrations/hooks/useCredentialVaults.d.ts.map +0 -1
- package/dist/integrations/hooks/useCredentialVaults.js +0 -98
- package/dist/integrations/hooks/useCredentialVaults.js.map +0 -1
- package/dist/integrations/utils/oauthPopup.d.ts +0 -16
- package/dist/integrations/utils/oauthPopup.d.ts.map +0 -1
- package/dist/integrations/utils/oauthPopup.js +0 -62
- package/dist/integrations/utils/oauthPopup.js.map +0 -1
- package/dist/node_modules/@iconify/react/dist/iconify.js +0 -1005
- 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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
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
|
|
22
|
-
let { providerId:
|
|
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] =
|
|
28
|
-
|
|
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(() => !
|
|
32
|
-
|
|
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
|
-
|
|
33
|
+
xt
|
|
35
34
|
]);
|
|
36
|
-
|
|
37
|
-
J && !M && A === "configure" && (
|
|
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
|
|
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
|
-
...
|
|
50
|
-
...
|
|
51
|
-
}), [Y,
|
|
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]),
|
|
57
|
-
|
|
58
|
-
}, []),
|
|
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(
|
|
59
|
+
U(v("integrations.addConnection.errors.nameRequired", "Connection name is required"));
|
|
61
60
|
return;
|
|
62
61
|
}
|
|
63
62
|
if (!V.vaultId) {
|
|
64
|
-
U(
|
|
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(
|
|
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
|
-
|
|
76
|
-
]),
|
|
74
|
+
v
|
|
75
|
+
]), Et = a(async () => {
|
|
77
76
|
if (M) try {
|
|
78
77
|
U("");
|
|
79
|
-
let e =
|
|
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
|
|
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(
|
|
91
|
+
U(v("integrations.addConnection.errors.createFailed", "Failed to create connection")), j("error");
|
|
93
92
|
return;
|
|
94
93
|
}
|
|
95
|
-
switch (
|
|
94
|
+
switch (vt(n), M.authType) {
|
|
96
95
|
case "oauth2": {
|
|
97
|
-
let t = await
|
|
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(
|
|
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,
|
|
106
|
+
G.current = i, bt(!0), K.current?.(), K.current = je({
|
|
108
107
|
connectionId: n,
|
|
109
108
|
popup: i,
|
|
110
|
-
|
|
111
|
-
let { data: e } = await
|
|
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,
|
|
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(
|
|
130
|
+
U(v("integrations.addConnection.errors.apiKeyRequired", "API key is required"));
|
|
132
131
|
return;
|
|
133
132
|
}
|
|
134
|
-
await
|
|
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(
|
|
137
|
+
U(v("integrations.addConnection.errors.basicAuthRequired", "Username and password are required"));
|
|
139
138
|
return;
|
|
140
139
|
}
|
|
141
|
-
await
|
|
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(
|
|
144
|
+
U(v("integrations.addConnection.errors.bearerTokenRequired", "Bearer token is required"));
|
|
146
145
|
return;
|
|
147
146
|
}
|
|
148
|
-
await
|
|
147
|
+
await O(n, B.trim()), j("success");
|
|
149
148
|
break;
|
|
150
149
|
case "service_account":
|
|
151
|
-
await
|
|
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(
|
|
154
|
+
U(v("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form."));
|
|
156
155
|
return;
|
|
157
156
|
}
|
|
158
|
-
if (!
|
|
159
|
-
U(
|
|
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(
|
|
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
|
|
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 :
|
|
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
|
-
|
|
179
|
+
v,
|
|
181
180
|
R,
|
|
182
181
|
z,
|
|
183
182
|
B,
|
|
184
183
|
Y,
|
|
185
184
|
X,
|
|
186
|
-
|
|
185
|
+
Ye,
|
|
186
|
+
Ze,
|
|
187
|
+
st,
|
|
188
|
+
$e,
|
|
189
|
+
tt,
|
|
187
190
|
O,
|
|
188
|
-
|
|
191
|
+
it,
|
|
189
192
|
k,
|
|
190
|
-
Je,
|
|
191
|
-
Xe,
|
|
192
|
-
Qe,
|
|
193
|
-
et,
|
|
194
193
|
T,
|
|
195
194
|
C,
|
|
196
195
|
w,
|
|
197
|
-
|
|
196
|
+
_,
|
|
198
197
|
W,
|
|
199
198
|
V
|
|
200
|
-
]),
|
|
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),
|
|
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 =
|
|
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:
|
|
211
|
+
label: v("integrations.addConnection.steps.selectProvider", "Select Provider")
|
|
213
212
|
},
|
|
214
213
|
{
|
|
215
214
|
key: "configure",
|
|
216
|
-
label:
|
|
215
|
+
label: v("integrations.addConnection.steps.configure", "Configure")
|
|
217
216
|
},
|
|
218
217
|
{
|
|
219
218
|
key: "authenticate",
|
|
220
|
-
label:
|
|
219
|
+
label: v("integrations.addConnection.steps.authenticate", "Authenticate")
|
|
221
220
|
}
|
|
222
221
|
], $ = Q.findIndex((e) => e.key === A);
|
|
223
|
-
return
|
|
222
|
+
return We ? /* @__PURE__ */ u("div", {
|
|
224
223
|
className: "flex items-center justify-center py-20",
|
|
225
|
-
children: /* @__PURE__ */
|
|
224
|
+
children: /* @__PURE__ */ u(l, {
|
|
226
225
|
size: 48,
|
|
227
226
|
className: "animate-spin text-primary"
|
|
228
227
|
})
|
|
229
|
-
}) :
|
|
228
|
+
}) : Ge ? /* @__PURE__ */ d("div", {
|
|
230
229
|
className: "space-y-6 p-6 max-w-3xl mx-auto",
|
|
231
230
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ d("div", {
|
|
233
232
|
className: "flex items-center gap-4",
|
|
234
233
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ u(p, {
|
|
236
235
|
variant: "ghost",
|
|
237
236
|
size: "icon",
|
|
238
|
-
onClick: () =>
|
|
239
|
-
"aria-label":
|
|
240
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
241
|
+
/* @__PURE__ */ u("h1", {
|
|
243
242
|
className: "text-2xl font-bold text-text-primary",
|
|
244
|
-
children:
|
|
243
|
+
children: v("integrations.addConnection.title", "Add Connection")
|
|
245
244
|
}),
|
|
246
|
-
T && /* @__PURE__ */
|
|
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:
|
|
247
|
+
children: v("integrations.addConnection.botChannelSetup", "Bot Channel Setup")
|
|
249
248
|
})
|
|
250
249
|
]
|
|
251
250
|
}),
|
|
252
|
-
A !== "success" && A !== "error" && /* @__PURE__ */
|
|
253
|
-
icon: /* @__PURE__ */
|
|
254
|
-
children: T ?
|
|
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__ */
|
|
255
|
+
A !== "success" && A !== "error" && /* @__PURE__ */ u("div", {
|
|
257
256
|
className: "flex items-center gap-2",
|
|
258
|
-
children: Q.map((e, t) => /* @__PURE__ */
|
|
257
|
+
children: Q.map((e, t) => /* @__PURE__ */ d("div", {
|
|
259
258
|
className: "flex items-center gap-2",
|
|
260
259
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
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__ */
|
|
262
|
+
children: t < $ ? /* @__PURE__ */ u(_e, { size: 16 }) : t + 1
|
|
264
263
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
274
|
+
children: [/* @__PURE__ */ u(c, {
|
|
276
275
|
size: 20,
|
|
277
276
|
className: "text-status-error-text flex-shrink-0"
|
|
278
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ u("p", {
|
|
279
278
|
className: "text-sm text-status-error-text",
|
|
280
279
|
children: H
|
|
281
280
|
})]
|
|
282
281
|
}),
|
|
283
|
-
A === "configure" &&
|
|
282
|
+
A === "configure" && Ot && !M && /* @__PURE__ */ u("div", {
|
|
284
283
|
className: "flex items-center justify-center py-12",
|
|
285
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ u(l, {
|
|
286
285
|
size: 24,
|
|
287
286
|
className: "animate-spin text-text-secondary"
|
|
288
287
|
})
|
|
289
288
|
}),
|
|
290
|
-
A === "configure" && !
|
|
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__ */
|
|
291
|
+
children: [/* @__PURE__ */ u(c, {
|
|
293
292
|
size: 32,
|
|
294
293
|
className: "text-text-secondary mb-3"
|
|
295
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ u("p", {
|
|
296
295
|
className: "text-sm text-text-secondary",
|
|
297
|
-
children:
|
|
296
|
+
children: v("integrations.addConnection.providerUnavailable", "This provider isn't available.")
|
|
298
297
|
})]
|
|
299
298
|
}),
|
|
300
|
-
A === "select_provider" && /* @__PURE__ */
|
|
299
|
+
A === "select_provider" && /* @__PURE__ */ d("div", {
|
|
301
300
|
className: "space-y-4",
|
|
302
301
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ d("div", {
|
|
304
303
|
className: "relative group",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
307
|
+
}), /* @__PURE__ */ u("input", {
|
|
309
308
|
type: "text",
|
|
310
|
-
placeholder:
|
|
311
|
-
"aria-label":
|
|
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) =>
|
|
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__ */
|
|
316
|
+
D && /* @__PURE__ */ u("div", {
|
|
318
317
|
className: "flex items-center justify-center py-12",
|
|
319
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ u(l, {
|
|
320
319
|
size: 24,
|
|
321
320
|
className: "animate-spin text-text-secondary"
|
|
322
321
|
})
|
|
323
322
|
}),
|
|
324
|
-
!D &&
|
|
323
|
+
!D && Ct.length === 0 && /* @__PURE__ */ u(Ne, {
|
|
325
324
|
illustration: N ? "empty-search" : "empty-data",
|
|
326
|
-
title: N ?
|
|
327
|
-
description: N ?
|
|
328
|
-
action: /* @__PURE__ */
|
|
329
|
-
onClick: () =>
|
|
330
|
-
children:
|
|
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__ */
|
|
332
|
+
/* @__PURE__ */ u("div", {
|
|
334
333
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
335
|
-
children:
|
|
334
|
+
children: Ct.map((e) => /* @__PURE__ */ d("button", {
|
|
336
335
|
type: "button",
|
|
337
|
-
onClick: () =>
|
|
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
|
|
338
|
+
children: [/* @__PURE__ */ u(f, {
|
|
340
339
|
provider: e,
|
|
341
340
|
size: 40
|
|
342
|
-
}), /* @__PURE__ */
|
|
341
|
+
}), /* @__PURE__ */ d("div", {
|
|
343
342
|
className: "flex-1 min-w-0",
|
|
344
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
345
344
|
className: "font-medium text-text-primary truncate",
|
|
346
345
|
children: e.name
|
|
347
|
-
}), /* @__PURE__ */
|
|
346
|
+
}), /* @__PURE__ */ d("p", {
|
|
348
347
|
className: "text-xs text-text-secondary mt-0.5",
|
|
349
348
|
children: [
|
|
350
|
-
|
|
349
|
+
v(`integrations.category.${e.category}`, Be(e.category)),
|
|
351
350
|
" ",
|
|
352
351
|
"·",
|
|
353
352
|
" ",
|
|
354
|
-
|
|
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__ */
|
|
361
|
+
A === "configure" && M && /* @__PURE__ */ d("div", {
|
|
363
362
|
className: "space-y-6",
|
|
364
363
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ d(Me, {
|
|
366
365
|
className: "flex items-center gap-3 p-4 border-border-seam",
|
|
367
|
-
children: [/* @__PURE__ */ f
|
|
366
|
+
children: [/* @__PURE__ */ u(f, {
|
|
368
367
|
provider: M,
|
|
369
368
|
size: 40
|
|
370
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
|
|
371
370
|
className: "font-medium text-text-primary",
|
|
372
371
|
children: M.name
|
|
373
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ u("p", {
|
|
374
373
|
className: "text-xs text-text-secondary",
|
|
375
|
-
children:
|
|
374
|
+
children: v(`integrations.authType.${M.authType}`, y(M.authType))
|
|
376
375
|
})] })]
|
|
377
376
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ d("div", {
|
|
379
378
|
className: "space-y-4",
|
|
380
379
|
children: [
|
|
381
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
384
|
+
v("integrations.addConnection.fields.connectionName", "Connection Name"),
|
|
386
385
|
" ",
|
|
387
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ u("span", {
|
|
388
387
|
className: "text-status-error-text",
|
|
389
388
|
children: "*"
|
|
390
389
|
})
|
|
391
390
|
]
|
|
392
|
-
}), /* @__PURE__ */
|
|
391
|
+
}), /* @__PURE__ */ u("input", {
|
|
393
392
|
type: "text",
|
|
394
393
|
id: "conn-name",
|
|
395
|
-
"aria-label":
|
|
394
|
+
"aria-label": v("integrations.addConnection.fields.connectionName", "Connection Name"),
|
|
396
395
|
value: P,
|
|
397
396
|
onChange: (e) => F(e.target.value),
|
|
398
|
-
placeholder:
|
|
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__ */
|
|
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:
|
|
405
|
-
}), /* @__PURE__ */
|
|
403
|
+
children: v("integrations.addConnection.fields.description", "Description")
|
|
404
|
+
}), /* @__PURE__ */ u("textarea", {
|
|
406
405
|
id: "conn-desc",
|
|
407
|
-
"aria-label":
|
|
406
|
+
"aria-label": v("integrations.addConnection.fields.description", "Description"),
|
|
408
407
|
value: I,
|
|
409
|
-
onChange: (e) =>
|
|
408
|
+
onChange: (e) => ut(e.target.value),
|
|
410
409
|
rows: 3,
|
|
411
|
-
placeholder:
|
|
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__ */
|
|
413
|
+
/* @__PURE__ */ u(ke, {
|
|
414
|
+
api: Je,
|
|
415
415
|
value: V,
|
|
416
|
-
onChange:
|
|
417
|
-
|
|
416
|
+
onChange: _t,
|
|
417
|
+
authType: M.authType,
|
|
418
|
+
requireVault: !0,
|
|
419
|
+
canCreateVault: Ke,
|
|
420
|
+
translate: v
|
|
418
421
|
})
|
|
419
422
|
]
|
|
420
423
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ d("div", {
|
|
422
425
|
className: "flex gap-3",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ u(p, {
|
|
424
427
|
variant: "outline",
|
|
425
|
-
onClick: () =>
|
|
426
|
-
children:
|
|
427
|
-
}), /* @__PURE__ */ p
|
|
428
|
-
onClick:
|
|
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
|
-
|
|
433
|
+
v("integrations.addConnection.actions.next", "Next"),
|
|
431
434
|
" ",
|
|
432
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ u(ge, { size: 16 })
|
|
433
436
|
]
|
|
434
437
|
})]
|
|
435
438
|
})
|
|
436
439
|
]
|
|
437
440
|
}),
|
|
438
|
-
A === "authenticate" && M && /* @__PURE__ */
|
|
441
|
+
A === "authenticate" && M && /* @__PURE__ */ d("div", {
|
|
439
442
|
className: "space-y-6",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
448
|
+
/* @__PURE__ */ d("h2", {
|
|
446
449
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-4",
|
|
447
450
|
children: [
|
|
448
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ u(we, {
|
|
449
452
|
size: 18,
|
|
450
453
|
className: "text-primary"
|
|
451
454
|
}),
|
|
452
|
-
|
|
455
|
+
v("integrations.addConnection.authentication.title", "Authentication"),
|
|
453
456
|
":",
|
|
454
457
|
" ",
|
|
455
|
-
|
|
458
|
+
v(`integrations.authType.${M.authType}`, y(M.authType))
|
|
456
459
|
]
|
|
457
460
|
}),
|
|
458
|
-
M.authType === "oauth2" && /* @__PURE__ */
|
|
461
|
+
M.authType === "oauth2" && /* @__PURE__ */ d("div", {
|
|
459
462
|
className: "space-y-4",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ u("p", {
|
|
461
464
|
className: "text-sm text-text-secondary",
|
|
462
|
-
children:
|
|
463
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
471
|
+
M.authType === "api_key" && /* @__PURE__ */ d("div", {
|
|
469
472
|
className: "space-y-4",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ u("p", {
|
|
471
474
|
className: "text-sm text-text-secondary",
|
|
472
|
-
children:
|
|
473
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
480
|
+
v("integrations.addConnection.fields.apiKey", "API Key"),
|
|
478
481
|
" ",
|
|
479
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ u("span", {
|
|
480
483
|
className: "text-status-error-text",
|
|
481
484
|
children: "*"
|
|
482
485
|
})
|
|
483
486
|
]
|
|
484
|
-
}), /* @__PURE__ */
|
|
487
|
+
}), /* @__PURE__ */ d("div", {
|
|
485
488
|
className: "relative",
|
|
486
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
492
|
+
}), /* @__PURE__ */ u("input", {
|
|
490
493
|
type: "password",
|
|
491
494
|
id: "api-key",
|
|
492
|
-
"aria-label":
|
|
495
|
+
"aria-label": v("integrations.addConnection.fields.apiKey", "API Key"),
|
|
493
496
|
value: L,
|
|
494
|
-
onChange: (e) =>
|
|
495
|
-
placeholder:
|
|
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__ */
|
|
503
|
+
M.authType === "basic_auth" && /* @__PURE__ */ d("div", {
|
|
501
504
|
className: "space-y-4",
|
|
502
505
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ u("p", {
|
|
504
507
|
className: "text-sm text-text-secondary",
|
|
505
|
-
children:
|
|
508
|
+
children: v("integrations.addConnection.authentication.basicAuthHint", "Enter your {{provider}} credentials.", { provider: M.name })
|
|
506
509
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
514
|
+
v("integrations.addConnection.fields.username", "Username"),
|
|
512
515
|
" ",
|
|
513
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ u("span", {
|
|
514
517
|
className: "text-status-error-text",
|
|
515
518
|
children: "*"
|
|
516
519
|
})
|
|
517
520
|
]
|
|
518
|
-
}), /* @__PURE__ */
|
|
521
|
+
}), /* @__PURE__ */ u("input", {
|
|
519
522
|
type: "text",
|
|
520
523
|
id: "username",
|
|
521
|
-
"aria-label":
|
|
524
|
+
"aria-label": v("integrations.addConnection.fields.username", "Username"),
|
|
522
525
|
value: R,
|
|
523
|
-
onChange: (e) =>
|
|
524
|
-
placeholder:
|
|
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__ */
|
|
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
|
-
|
|
534
|
+
v("integrations.addConnection.fields.password", "Password"),
|
|
532
535
|
" ",
|
|
533
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ u("span", {
|
|
534
537
|
className: "text-status-error-text",
|
|
535
538
|
children: "*"
|
|
536
539
|
})
|
|
537
540
|
]
|
|
538
|
-
}), /* @__PURE__ */
|
|
541
|
+
}), /* @__PURE__ */ d("div", {
|
|
539
542
|
className: "relative",
|
|
540
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
546
|
+
}), /* @__PURE__ */ u("input", {
|
|
544
547
|
type: "password",
|
|
545
548
|
id: "password",
|
|
546
|
-
"aria-label":
|
|
549
|
+
"aria-label": v("integrations.addConnection.fields.password", "Password"),
|
|
547
550
|
value: z,
|
|
548
|
-
onChange: (e) =>
|
|
549
|
-
placeholder:
|
|
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__ */
|
|
558
|
+
M.authType === "bearer_token" && /* @__PURE__ */ d("div", {
|
|
556
559
|
className: "space-y-4",
|
|
557
|
-
children: [/* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ u("p", {
|
|
558
561
|
className: "text-sm text-text-secondary",
|
|
559
|
-
children:
|
|
560
|
-
}), /* @__PURE__ */
|
|
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
|
-
|
|
567
|
+
v("integrations.addConnection.fields.bearerToken", "Bearer Token"),
|
|
565
568
|
" ",
|
|
566
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ u("span", {
|
|
567
570
|
className: "text-status-error-text",
|
|
568
571
|
children: "*"
|
|
569
572
|
})
|
|
570
573
|
]
|
|
571
|
-
}), /* @__PURE__ */
|
|
574
|
+
}), /* @__PURE__ */ d("div", {
|
|
572
575
|
className: "relative",
|
|
573
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
579
|
+
}), /* @__PURE__ */ u("input", {
|
|
577
580
|
type: "password",
|
|
578
581
|
id: "bearer-token",
|
|
579
|
-
"aria-label":
|
|
582
|
+
"aria-label": v("integrations.addConnection.fields.bearerToken", "Bearer Token"),
|
|
580
583
|
value: B,
|
|
581
|
-
onChange: (e) =>
|
|
582
|
-
placeholder:
|
|
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__ */
|
|
590
|
+
M.authType === "service_account" && /* @__PURE__ */ u("div", {
|
|
588
591
|
className: "space-y-4",
|
|
589
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
595
|
+
/* @__PURE__ */ u("p", {
|
|
593
596
|
className: "text-sm font-semibold text-foreground",
|
|
594
|
-
children:
|
|
597
|
+
children: v("integrations.addConnection.authentication.serviceAccount.title", "No credentials needed")
|
|
595
598
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ u("p", {
|
|
597
600
|
className: "text-sm text-muted-foreground mt-1",
|
|
598
|
-
children:
|
|
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__ */
|
|
603
|
+
M.defaultScopes && M.defaultScopes.length > 0 && /* @__PURE__ */ u("p", {
|
|
601
604
|
className: "text-sm text-muted-foreground mt-2",
|
|
602
|
-
children:
|
|
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__ */
|
|
610
|
+
M.authType === "custom" && (Y ? /* @__PURE__ */ d("div", {
|
|
608
611
|
className: "space-y-4",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
612
|
+
children: [/* @__PURE__ */ u("p", {
|
|
610
613
|
className: "text-sm text-text-secondary",
|
|
611
|
-
children:
|
|
612
|
-
}), /* @__PURE__ */
|
|
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:
|
|
618
|
+
onChange: gt,
|
|
616
619
|
disabled: Z,
|
|
617
|
-
idPrefix: "custom"
|
|
620
|
+
idPrefix: "custom",
|
|
621
|
+
translate: v
|
|
618
622
|
})]
|
|
619
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
625
|
+
children: [/* @__PURE__ */ u(c, {
|
|
622
626
|
size: 16,
|
|
623
627
|
className: "text-status-error-text flex-shrink-0"
|
|
624
|
-
}), /* @__PURE__ */
|
|
628
|
+
}), /* @__PURE__ */ u("span", {
|
|
625
629
|
className: "text-sm text-status-error-text",
|
|
626
|
-
children:
|
|
630
|
+
children: v("integrations.addConnection.authentication.custom.missingSchema", "This provider does not declare a configuration form.")
|
|
627
631
|
})]
|
|
628
632
|
}))
|
|
629
633
|
]
|
|
630
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ d("div", {
|
|
631
635
|
className: "flex gap-3",
|
|
632
|
-
children: [/* @__PURE__ */
|
|
636
|
+
children: [/* @__PURE__ */ u(p, {
|
|
633
637
|
variant: "outline",
|
|
634
638
|
onClick: () => j("configure"),
|
|
635
639
|
disabled: Z,
|
|
636
|
-
children:
|
|
637
|
-
}), /* @__PURE__ */ p
|
|
638
|
-
onClick:
|
|
640
|
+
children: v("integrations.addConnection.actions.back", "Back")
|
|
641
|
+
}), /* @__PURE__ */ d(p, {
|
|
642
|
+
onClick: Et,
|
|
639
643
|
disabled: Z,
|
|
640
|
-
children: [Z ? /* @__PURE__ */
|
|
644
|
+
children: [Z ? /* @__PURE__ */ u(l, {
|
|
641
645
|
size: 16,
|
|
642
646
|
className: "animate-spin"
|
|
643
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
654
|
+
/* @__PURE__ */ u("div", {
|
|
651
655
|
className: "p-4 rounded-full bg-status-success-bg-subtle mb-4",
|
|
652
|
-
children: /* @__PURE__ */
|
|
656
|
+
children: /* @__PURE__ */ u(ve, {
|
|
653
657
|
size: 48,
|
|
654
658
|
className: "text-status-success-text"
|
|
655
659
|
})
|
|
656
660
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ u("h2", {
|
|
658
662
|
className: "text-xl font-bold text-text-primary mb-2",
|
|
659
|
-
children:
|
|
663
|
+
children: v("integrations.addConnection.success.title", "Connection Created!")
|
|
660
664
|
}),
|
|
661
|
-
/* @__PURE__ */
|
|
665
|
+
/* @__PURE__ */ u("p", {
|
|
662
666
|
className: "text-sm text-text-secondary mb-6 max-w-sm",
|
|
663
|
-
children:
|
|
667
|
+
children: v("integrations.addConnection.success.description", "Your {{provider}} connection has been set up successfully.", { provider: M?.name ?? "" })
|
|
664
668
|
}),
|
|
665
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ d("div", {
|
|
666
670
|
className: "flex gap-3",
|
|
667
671
|
children: [
|
|
668
|
-
T && W && /* @__PURE__ */ p
|
|
669
|
-
onClick:
|
|
670
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
673
|
-
onClick: () =>
|
|
674
|
-
children:
|
|
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__ */
|
|
680
|
+
/* @__PURE__ */ u(p, {
|
|
677
681
|
variant: "outline",
|
|
678
|
-
onClick: () =>
|
|
679
|
-
children:
|
|
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__ */
|
|
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__ */
|
|
692
|
+
/* @__PURE__ */ u("div", {
|
|
689
693
|
className: "p-4 rounded-full bg-status-error-bg-subtle mb-4",
|
|
690
|
-
children: /* @__PURE__ */
|
|
694
|
+
children: /* @__PURE__ */ u(c, {
|
|
691
695
|
size: 48,
|
|
692
696
|
className: "text-status-error-text"
|
|
693
697
|
})
|
|
694
698
|
}),
|
|
695
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ u("h2", {
|
|
696
700
|
className: "text-xl font-bold text-text-primary mb-2",
|
|
697
|
-
children:
|
|
701
|
+
children: v("integrations.addConnection.failed.title", "Connection Failed")
|
|
698
702
|
}),
|
|
699
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ u("p", {
|
|
700
704
|
className: "text-sm text-status-error-text mb-6 max-w-sm",
|
|
701
|
-
children: H ||
|
|
705
|
+
children: H || v("integrations.addConnection.errors.unexpected", "An unexpected error occurred.")
|
|
702
706
|
}),
|
|
703
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ d("div", {
|
|
704
708
|
className: "flex gap-3",
|
|
705
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ u(p, {
|
|
706
710
|
onClick: () => {
|
|
707
711
|
U(""), j("authenticate");
|
|
708
712
|
},
|
|
709
|
-
children:
|
|
710
|
-
}), /* @__PURE__ */
|
|
713
|
+
children: v("integrations.addConnection.actions.tryAgain", "Try Again")
|
|
714
|
+
}), /* @__PURE__ */ u(p, {
|
|
711
715
|
variant: "outline",
|
|
712
|
-
onClick: () =>
|
|
713
|
-
children:
|
|
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__ */
|
|
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__ */
|
|
726
|
+
/* @__PURE__ */ u(we, {
|
|
723
727
|
size: 48,
|
|
724
728
|
className: "text-text-secondary mb-4"
|
|
725
729
|
}),
|
|
726
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ u("h2", {
|
|
727
731
|
className: "text-xl font-bold text-text-primary mb-2",
|
|
728
|
-
children:
|
|
732
|
+
children: v("integrations.addConnection.denied.title", "Access Denied")
|
|
729
733
|
}),
|
|
730
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ u("p", {
|
|
731
735
|
className: "text-sm text-text-secondary mb-6 max-w-sm",
|
|
732
|
-
children:
|
|
736
|
+
children: v("integrations.addConnection.denied.description", "You don't have permission to create connections.")
|
|
733
737
|
}),
|
|
734
|
-
/* @__PURE__ */ p
|
|
738
|
+
/* @__PURE__ */ d(p, {
|
|
735
739
|
variant: "outline",
|
|
736
|
-
onClick: () =>
|
|
740
|
+
onClick: () => g?.(i(h, "connections")),
|
|
737
741
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ u(he, { size: 16 }),
|
|
739
743
|
" ",
|
|
740
|
-
|
|
744
|
+
v("integrations.addConnection.denied.back", "Back to Connections")
|
|
741
745
|
]
|
|
742
746
|
})
|
|
743
747
|
]
|
|
744
748
|
});
|
|
745
749
|
}
|
|
746
750
|
//#endregion
|
|
747
|
-
export {
|
|
751
|
+
export { m as AddConnectionWizard };
|
|
748
752
|
|
|
749
753
|
//# sourceMappingURL=AddConnectionWizard.js.map
|