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