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