@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,222 @@
|
|
|
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 { nativeCopyText as r, nativeImpact as i } from "../../utils/nativeBridge.js";
|
|
5
|
+
import { useState as a } from "react";
|
|
6
|
+
import { ArrowLeft as o, Check as s, CheckCircle2 as c, Clock as l, Copy as u, Globe as d, Loader2 as f, Save as p, Settings as m, Shield as h } from "lucide-react";
|
|
7
|
+
import { useI18n as g, usePermissions as _ } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
8
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
9
|
+
//#region src/integrations/pages/IntegrationsSettings.tsx
|
|
10
|
+
function b() {
|
|
11
|
+
let { basePath: b = "/", navigate: x, apiGatewayUrl: S } = e(), { t: C } = g(), w = (e, t, n) => {
|
|
12
|
+
let r = C(e, n);
|
|
13
|
+
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), t) : t : r;
|
|
14
|
+
}, { hasPermission: T, isLoading: E } = _(), D = T(n.INTEGRATION_WRITE), [O, k] = a(30), [A, j] = a(60), [M, N] = a(!0), [P, F] = a(!1), [I, L] = a(!1), [R, z] = a(!1), B = S ? `${S}/integrations/oauth/callback` : `${typeof window < "u" ? window.location.origin : ""}/integrations/oauth/callback`;
|
|
15
|
+
return E ? /* @__PURE__ */ v("div", {
|
|
16
|
+
className: "flex items-center justify-center py-20",
|
|
17
|
+
children: /* @__PURE__ */ v(f, {
|
|
18
|
+
size: 48,
|
|
19
|
+
className: "animate-spin text-primary"
|
|
20
|
+
})
|
|
21
|
+
}) : D ? /* @__PURE__ */ y("div", {
|
|
22
|
+
className: "space-y-6 p-6 max-w-4xl mx-auto",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ y("div", {
|
|
25
|
+
className: "relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm",
|
|
26
|
+
children: [/* @__PURE__ */ y("div", {
|
|
27
|
+
className: "relative z-10 flex items-center gap-4",
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ v("button", {
|
|
30
|
+
onClick: () => x?.(b),
|
|
31
|
+
className: "p-2.5 hover:bg-accent rounded-lg transition-all",
|
|
32
|
+
"aria-label": w("integrations.settings.actions.backAriaLabel", "Back"),
|
|
33
|
+
children: /* @__PURE__ */ v(o, { size: 20 })
|
|
34
|
+
}),
|
|
35
|
+
/* @__PURE__ */ v("div", {
|
|
36
|
+
className: "p-2.5 rounded-lg bg-primary/10",
|
|
37
|
+
children: /* @__PURE__ */ v(m, {
|
|
38
|
+
size: 24,
|
|
39
|
+
className: "text-primary"
|
|
40
|
+
})
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
|
|
43
|
+
className: "text-2xl sm:text-3xl font-bold text-foreground",
|
|
44
|
+
children: w("integrations.settings.title", "Integrations Settings")
|
|
45
|
+
}), /* @__PURE__ */ v("p", {
|
|
46
|
+
className: "text-sm text-muted-foreground mt-0.5",
|
|
47
|
+
children: w("integrations.settings.subtitle", "Configure integration module behavior")
|
|
48
|
+
})] })
|
|
49
|
+
]
|
|
50
|
+
}), /* @__PURE__ */ v("div", { className: "absolute top-0 right-0 w-64 h-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0" })]
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ y("div", {
|
|
53
|
+
className: "rounded-xl border border-border/50 bg-card p-5 space-y-4",
|
|
54
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
55
|
+
className: "font-semibold text-foreground flex items-center gap-2",
|
|
56
|
+
children: [/* @__PURE__ */ v(d, {
|
|
57
|
+
size: 18,
|
|
58
|
+
className: "text-primary"
|
|
59
|
+
}), w("integrations.settings.oauth.title", "OAuth Configuration")]
|
|
60
|
+
}), /* @__PURE__ */ y("div", {
|
|
61
|
+
className: "space-y-2",
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ v("label", {
|
|
64
|
+
className: "block text-sm font-medium text-foreground",
|
|
65
|
+
children: w("integrations.settings.oauth.redirectUriLabel", "Default OAuth Redirect URI")
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ v("p", {
|
|
68
|
+
className: "text-xs text-muted-foreground mb-2",
|
|
69
|
+
children: w("integrations.settings.oauth.redirectUriDescription", "Use this URL as the redirect/callback URI when configuring OAuth applications with providers.")
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ y("div", {
|
|
72
|
+
className: "flex items-center gap-2",
|
|
73
|
+
children: [/* @__PURE__ */ v("div", {
|
|
74
|
+
className: "flex-1 px-4 py-2.5 border border-border rounded-lg bg-muted/30 font-mono text-sm text-foreground break-all",
|
|
75
|
+
children: B
|
|
76
|
+
}), /* @__PURE__ */ v("button", {
|
|
77
|
+
onClick: async () => {
|
|
78
|
+
if (i("light"), !await r(B)) {
|
|
79
|
+
let e = document.createElement("input");
|
|
80
|
+
e.value = B, document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
81
|
+
}
|
|
82
|
+
z(!0), setTimeout(() => z(!1), 2e3);
|
|
83
|
+
},
|
|
84
|
+
className: "p-2.5 rounded-lg border border-border hover:bg-accent transition-colors flex-shrink-0",
|
|
85
|
+
"aria-label": w("integrations.settings.oauth.copyAriaLabel", "Copy redirect URI"),
|
|
86
|
+
children: R ? /* @__PURE__ */ v(s, {
|
|
87
|
+
size: 16,
|
|
88
|
+
className: "text-status-success-text"
|
|
89
|
+
}) : /* @__PURE__ */ v(u, { size: 16 })
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})]
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ y("div", {
|
|
96
|
+
className: "rounded-xl border border-border/50 bg-card p-5 space-y-4",
|
|
97
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
98
|
+
className: "font-semibold text-foreground flex items-center gap-2",
|
|
99
|
+
children: [/* @__PURE__ */ v(l, {
|
|
100
|
+
size: 18,
|
|
101
|
+
className: "text-primary"
|
|
102
|
+
}), w("integrations.settings.connection.title", "Connection Settings")]
|
|
103
|
+
}), /* @__PURE__ */ y("div", {
|
|
104
|
+
className: "space-y-4",
|
|
105
|
+
children: [/* @__PURE__ */ y("div", { children: [
|
|
106
|
+
/* @__PURE__ */ v("label", {
|
|
107
|
+
htmlFor: "conn-timeout",
|
|
108
|
+
className: "block text-sm font-semibold mb-2",
|
|
109
|
+
children: w("integrations.settings.connection.timeoutLabel", "Connection Timeout (seconds)")
|
|
110
|
+
}),
|
|
111
|
+
/* @__PURE__ */ v("p", {
|
|
112
|
+
className: "text-xs text-muted-foreground mb-2",
|
|
113
|
+
children: w("integrations.settings.connection.timeoutDescription", "Maximum time to wait when testing or using a connection.")
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ v("input", {
|
|
116
|
+
type: "number",
|
|
117
|
+
id: "conn-timeout",
|
|
118
|
+
value: O,
|
|
119
|
+
onChange: (e) => k(Number(e.target.value)),
|
|
120
|
+
min: 5,
|
|
121
|
+
max: 120,
|
|
122
|
+
className: "w-full max-w-[200px] px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
|
|
123
|
+
})
|
|
124
|
+
] }), /* @__PURE__ */ y("div", { children: [
|
|
125
|
+
/* @__PURE__ */ v("label", {
|
|
126
|
+
htmlFor: "health-interval",
|
|
127
|
+
className: "block text-sm font-semibold mb-2",
|
|
128
|
+
children: w("integrations.settings.connection.healthCheckLabel", "Health Check Interval (minutes)")
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ v("p", {
|
|
131
|
+
className: "text-xs text-muted-foreground mb-2",
|
|
132
|
+
children: w("integrations.settings.connection.healthCheckDescription", "How often to automatically check connection health.")
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ v("input", {
|
|
135
|
+
type: "number",
|
|
136
|
+
id: "health-interval",
|
|
137
|
+
value: A,
|
|
138
|
+
onChange: (e) => j(Number(e.target.value)),
|
|
139
|
+
min: 5,
|
|
140
|
+
max: 1440,
|
|
141
|
+
className: "w-full max-w-[200px] px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary"
|
|
142
|
+
})
|
|
143
|
+
] })]
|
|
144
|
+
})]
|
|
145
|
+
}),
|
|
146
|
+
/* @__PURE__ */ y("div", {
|
|
147
|
+
className: "rounded-xl border border-border/50 bg-card p-5 space-y-4",
|
|
148
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
149
|
+
className: "font-semibold text-foreground flex items-center gap-2",
|
|
150
|
+
children: [/* @__PURE__ */ v(h, {
|
|
151
|
+
size: 18,
|
|
152
|
+
className: "text-primary"
|
|
153
|
+
}), w("integrations.settings.security.title", "Security")]
|
|
154
|
+
}), /* @__PURE__ */ v("div", {
|
|
155
|
+
className: "space-y-4",
|
|
156
|
+
children: /* @__PURE__ */ y("div", {
|
|
157
|
+
className: "flex items-center justify-between",
|
|
158
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
159
|
+
htmlFor: "auto-refresh",
|
|
160
|
+
className: "text-sm font-semibold text-foreground",
|
|
161
|
+
children: w("integrations.settings.security.autoRefreshLabel", "Auto-refresh OAuth Tokens")
|
|
162
|
+
}), /* @__PURE__ */ v("p", {
|
|
163
|
+
className: "text-xs text-muted-foreground mt-0.5",
|
|
164
|
+
children: w("integrations.settings.security.autoRefreshDescription", "Automatically refresh tokens before they expire.")
|
|
165
|
+
})] }), /* @__PURE__ */ v("button", {
|
|
166
|
+
id: "auto-refresh",
|
|
167
|
+
role: "switch",
|
|
168
|
+
"aria-checked": M,
|
|
169
|
+
onClick: () => N(!M),
|
|
170
|
+
className: t("relative w-11 h-6 rounded-full transition-colors flex-shrink-0", M ? "bg-primary" : "bg-muted"),
|
|
171
|
+
children: /* @__PURE__ */ v("span", { className: t("absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform", M && "translate-x-5") })
|
|
172
|
+
})]
|
|
173
|
+
})
|
|
174
|
+
})]
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ v("div", {
|
|
177
|
+
className: "flex items-center gap-3",
|
|
178
|
+
children: /* @__PURE__ */ y("button", {
|
|
179
|
+
onClick: async () => {
|
|
180
|
+
F(!0), await new Promise((e) => setTimeout(e, 1e3)), F(!1), L(!0), setTimeout(() => L(!1), 3e3);
|
|
181
|
+
},
|
|
182
|
+
disabled: P,
|
|
183
|
+
className: "inline-flex items-center gap-2 px-6 py-3 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-all disabled:opacity-50",
|
|
184
|
+
children: [P ? /* @__PURE__ */ v(f, {
|
|
185
|
+
size: 16,
|
|
186
|
+
className: "animate-spin"
|
|
187
|
+
}) : v(I ? c : p, { size: 16 }), P ? w("integrations.settings.actions.saving", "Saving...") : I ? w("integrations.settings.actions.saved", "Saved!") : w("integrations.settings.actions.save", "Save Settings")]
|
|
188
|
+
})
|
|
189
|
+
})
|
|
190
|
+
]
|
|
191
|
+
}) : /* @__PURE__ */ y("div", {
|
|
192
|
+
className: "flex flex-col items-center justify-center py-20 text-center p-6",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ v(h, {
|
|
195
|
+
size: 48,
|
|
196
|
+
className: "text-muted-foreground mb-4"
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ v("h2", {
|
|
199
|
+
className: "text-xl font-bold text-foreground mb-2",
|
|
200
|
+
children: w("integrations.settings.accessDenied.title", "Access Denied")
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ v("p", {
|
|
203
|
+
className: "text-sm text-muted-foreground mb-6 max-w-sm",
|
|
204
|
+
children: w("integrations.settings.accessDenied.description", "You don't have permission to manage integration settings.")
|
|
205
|
+
}),
|
|
206
|
+
/* @__PURE__ */ y("button", {
|
|
207
|
+
type: "button",
|
|
208
|
+
onClick: () => x?.(b),
|
|
209
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
210
|
+
children: [
|
|
211
|
+
/* @__PURE__ */ v(o, { size: 16 }),
|
|
212
|
+
" ",
|
|
213
|
+
w("integrations.settings.accessDenied.back", "Back to Overview")
|
|
214
|
+
]
|
|
215
|
+
})
|
|
216
|
+
]
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
//#endregion
|
|
220
|
+
export { b as IntegrationsSettings };
|
|
221
|
+
|
|
222
|
+
//# sourceMappingURL=IntegrationsSettings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrationsSettings.js","names":[],"sources":["../../../src/integrations/pages/IntegrationsSettings.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n Settings,\n ArrowLeft,\n Globe,\n Clock,\n Shield,\n Save,\n Loader2,\n CheckCircle2,\n Copy,\n Check,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { useI18n, usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { nativeCopyText, nativeImpact } from '../../utils/nativeBridge';\n\n/**\n * Integrations Settings — module configuration page.\n */\nexport function IntegrationsSettings() {\n const { basePath = '/', navigate, apiGatewayUrl } = useIntegrations();\n const { t } = useI18n();\n const tx = (key: string, fallback: string, params?: Record<string, string | number>) => {\n const translated = t(key, params);\n if (translated !== key) return translated;\n if (!params) return fallback;\n\n return Object.entries(params).reduce(\n (value, [paramKey, paramValue]) =>\n value\n .replace(`{{${paramKey}}}`, String(paramValue))\n .replace(`{${paramKey}}`, String(paramValue)),\n fallback\n );\n };\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const canWrite = hasPermission(INTEGRATION_PERMISSIONS.INTEGRATION_WRITE);\n\n const [connectionTimeout, setConnectionTimeout] = useState(30);\n const [healthCheckInterval, setHealthCheckInterval] = useState(60);\n const [autoRefreshTokens, setAutoRefreshTokens] = useState(true);\n const [saving, setSaving] = useState(false);\n const [saved, setSaved] = useState(false);\n const [copiedRedirectUri, setCopiedRedirectUri] = useState(false);\n\n // Compute the default OAuth redirect URI based on the gateway URL\n const oauthRedirectUri = apiGatewayUrl\n ? `${apiGatewayUrl}/integrations/oauth/callback`\n : `${typeof window !== 'undefined' ? window.location.origin : ''}/integrations/oauth/callback`;\n\n const handleSave = async () => {\n setSaving(true);\n // Simulated save — in production this would call a GraphQL mutation\n await new Promise((resolve) => setTimeout(resolve, 1000));\n setSaving(false);\n setSaved(true);\n setTimeout(() => setSaved(false), 3000);\n };\n\n const handleCopyRedirectUri = async () => {\n void nativeImpact('light');\n const ok = await nativeCopyText(oauthRedirectUri);\n if (!ok) {\n // Last-resort fallback for very old browsers without clipboard or execCommand support\n const input = document.createElement('input');\n input.value = oauthRedirectUri;\n document.body.appendChild(input);\n input.select();\n document.execCommand('copy');\n document.body.removeChild(input);\n }\n setCopiedRedirectUri(true);\n setTimeout(() => setCopiedRedirectUri(false), 2000);\n };\n\n if (permissionsLoading) {\n return (\n <div className=\"flex items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n </div>\n );\n }\n\n if (!canWrite) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20 text-center p-6\">\n <Shield size={48} className=\"text-muted-foreground mb-4\" />\n <h2 className=\"text-xl font-bold text-foreground mb-2\">\n {tx('integrations.settings.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-muted-foreground mb-6 max-w-sm\">\n {tx(\n 'integrations.settings.accessDenied.description',\n \"You don't have permission to manage integration settings.\"\n )}\n </p>\n <button\n type=\"button\"\n onClick={() => navigate?.(basePath)}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={16} />{' '}\n {tx('integrations.settings.accessDenied.back', 'Back to Overview')}\n </button>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl mx-auto\">\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n onClick={() => navigate?.(basePath)}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all\"\n aria-label={tx('integrations.settings.actions.backAriaLabel', 'Back')}\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"p-2.5 rounded-lg bg-primary/10\">\n <Settings size={24} className=\"text-primary\" />\n </div>\n <div>\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">\n {tx('integrations.settings.title', 'Integrations Settings')}\n </h1>\n <p className=\"text-sm text-muted-foreground mt-0.5\">\n {tx('integrations.settings.subtitle', 'Configure integration module behavior')}\n </p>\n </div>\n </div>\n <div className=\"absolute top-0 right-0 w-64 h-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0\" />\n </div>\n\n {/* OAuth Redirect URI */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Globe size={18} className=\"text-primary\" />\n {tx('integrations.settings.oauth.title', 'OAuth Configuration')}\n </h2>\n <div className=\"space-y-2\">\n <label className=\"block text-sm font-medium text-foreground\">\n {tx('integrations.settings.oauth.redirectUriLabel', 'Default OAuth Redirect URI')}\n </label>\n <p className=\"text-xs text-muted-foreground mb-2\">\n {tx(\n 'integrations.settings.oauth.redirectUriDescription',\n 'Use this URL as the redirect/callback URI when configuring OAuth applications with providers.'\n )}\n </p>\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 px-4 py-2.5 border border-border rounded-lg bg-muted/30 font-mono text-sm text-foreground break-all\">\n {oauthRedirectUri}\n </div>\n <button\n onClick={handleCopyRedirectUri}\n className=\"p-2.5 rounded-lg border border-border hover:bg-accent transition-colors flex-shrink-0\"\n aria-label={tx('integrations.settings.oauth.copyAriaLabel', 'Copy redirect URI')}\n >\n {copiedRedirectUri ? (\n <Check size={16} className=\"text-status-success-text\" />\n ) : (\n <Copy size={16} />\n )}\n </button>\n </div>\n </div>\n </div>\n\n {/* Connection Settings */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Clock size={18} className=\"text-primary\" />\n {tx('integrations.settings.connection.title', 'Connection Settings')}\n </h2>\n <div className=\"space-y-4\">\n <div>\n <label htmlFor=\"conn-timeout\" className=\"block text-sm font-semibold mb-2\">\n {tx('integrations.settings.connection.timeoutLabel', 'Connection Timeout (seconds)')}\n </label>\n <p className=\"text-xs text-muted-foreground mb-2\">\n {tx(\n 'integrations.settings.connection.timeoutDescription',\n 'Maximum time to wait when testing or using a connection.'\n )}\n </p>\n <input\n type=\"number\"\n id=\"conn-timeout\"\n value={connectionTimeout}\n onChange={(e) => setConnectionTimeout(Number(e.target.value))}\n min={5}\n max={120}\n className=\"w-full max-w-[200px] px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n />\n </div>\n <div>\n <label htmlFor=\"health-interval\" className=\"block text-sm font-semibold mb-2\">\n {tx(\n 'integrations.settings.connection.healthCheckLabel',\n 'Health Check Interval (minutes)'\n )}\n </label>\n <p className=\"text-xs text-muted-foreground mb-2\">\n {tx(\n 'integrations.settings.connection.healthCheckDescription',\n 'How often to automatically check connection health.'\n )}\n </p>\n <input\n type=\"number\"\n id=\"health-interval\"\n value={healthCheckInterval}\n onChange={(e) => setHealthCheckInterval(Number(e.target.value))}\n min={5}\n max={1440}\n className=\"w-full max-w-[200px] px-4 py-2.5 border border-border rounded-lg bg-background text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary\"\n />\n </div>\n </div>\n </div>\n\n {/* Security Settings */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5 space-y-4\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2\">\n <Shield size={18} className=\"text-primary\" />\n {tx('integrations.settings.security.title', 'Security')}\n </h2>\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <label htmlFor=\"auto-refresh\" className=\"text-sm font-semibold text-foreground\">\n {tx('integrations.settings.security.autoRefreshLabel', 'Auto-refresh OAuth Tokens')}\n </label>\n <p className=\"text-xs text-muted-foreground mt-0.5\">\n {tx(\n 'integrations.settings.security.autoRefreshDescription',\n 'Automatically refresh tokens before they expire.'\n )}\n </p>\n </div>\n <button\n id=\"auto-refresh\"\n role=\"switch\"\n aria-checked={autoRefreshTokens}\n onClick={() => setAutoRefreshTokens(!autoRefreshTokens)}\n className={cn(\n 'relative w-11 h-6 rounded-full transition-colors flex-shrink-0',\n autoRefreshTokens ? 'bg-primary' : 'bg-muted'\n )}\n >\n <span\n className={cn(\n 'absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full shadow transition-transform',\n autoRefreshTokens && 'translate-x-5'\n )}\n />\n </button>\n </div>\n </div>\n </div>\n\n {/* Save Button */}\n <div className=\"flex items-center gap-3\">\n <button\n onClick={handleSave}\n disabled={saving}\n className=\"inline-flex items-center gap-2 px-6 py-3 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-all disabled:opacity-50\"\n >\n {saving ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : saved ? (\n <CheckCircle2 size={16} />\n ) : (\n <Save size={16} />\n )}\n {saving\n ? tx('integrations.settings.actions.saving', 'Saving...')\n : saved\n ? tx('integrations.settings.actions.saved', 'Saved!')\n : tx('integrations.settings.actions.save', 'Save Settings')}\n </button>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAsBA,SAAgB,IAAuB;CACrC,IAAM,EAAE,cAAW,KAAK,aAAU,qBAAkB,GAAiB,EAC/D,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,GAAkB,MAA6C;EACtF,IAAM,IAAa,EAAE,GAAK,EAAO;AAIjC,SAHI,MAAe,IACd,IAEE,OAAO,QAAQ,EAAO,CAAC,QAC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T,uFACA,KAAqB,gBACtB,EACD,CAAA;OACK,CAAA,CACL;;KACF,CAAA,CACF;;GAGN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,UAAD;KACE,SAxNW,YAAY;AAM7B,MALA,EAAU,GAAK,EAEf,MAAM,IAAI,SAAS,MAAY,WAAW,GAAS,IAAK,CAAC,EACzD,EAAU,GAAM,EAChB,EAAS,GAAK,EACd,iBAAiB,EAAS,GAAM,EAAE,IAAK;;KAmNjC,UAAU;KACV,WAAU;eAHZ,CAKG,IACC,kBAAC,GAAD;MAAS,MAAM;MAAI,WAAU;MAAiB,CAAA,GAE9C,EADE,IACD,IAEA,GAFD,EAAc,MAAM,IAAM,CAER,EAEnB,IACG,EAAG,wCAAwC,YAAY,GACvD,IACE,EAAG,uCAAuC,SAAS,GACnD,EAAG,sCAAsC,gBAAgB,CACxD;;IACL,CAAA;GACF;MAvMJ,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAQ,MAAM;IAAI,WAAU;IAA+B,CAAA;GAC3D,kBAAC,MAAD;IAAI,WAAU;cACX,EAAG,4CAA4C,gBAAgB;IAC7D,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,kDACA,4DACD;IACC,CAAA;GACJ,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,IAAW,EAAS;IACnC,WAAU;cAHZ;KAKE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;KAAC;KACvB,EAAG,2CAA2C,mBAAmB;KAC3D;;GACL"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IntegrationsUserLandingPage
|
|
3
|
+
*
|
|
4
|
+
* User-facing tabbed landing page for the Integrations microfrontend.
|
|
5
|
+
* Renders user sub-pages (overview, providers, connections, logs) inside a
|
|
6
|
+
* Tabs container. The active tab is reflected in the `?tab=` URL search param.
|
|
7
|
+
*
|
|
8
|
+
* Excludes admin features: Settings.
|
|
9
|
+
*/
|
|
10
|
+
export declare function IntegrationsUserLandingPage(): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=IntegrationsUserLandingPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrationsUserLandingPage.d.ts","sourceRoot":"","sources":["../../../src/integrations/pages/IntegrationsUserLandingPage.tsx"],"names":[],"mappings":"AASA;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,4CA4C1C"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { IntegrationsOverview as e } from "./IntegrationsOverview.js";
|
|
2
|
+
import { ProviderCatalog as t } from "./ProviderCatalog.js";
|
|
3
|
+
import { ConnectionsList as n } from "./ConnectionsList.js";
|
|
4
|
+
import { ConnectionLogs as r } from "./ConnectionLogs.js";
|
|
5
|
+
import { useMemo as i } from "react";
|
|
6
|
+
import { useSearchParams as a } from "react-router-dom";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import { Tabs as c } from "@burdenoff/fe-libs/chrome";
|
|
9
|
+
//#region src/integrations/pages/IntegrationsUserLandingPage.tsx
|
|
10
|
+
function l() {
|
|
11
|
+
let [l, u] = a(), d = i(() => [
|
|
12
|
+
{
|
|
13
|
+
id: "overview",
|
|
14
|
+
label: "Overview"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "providers",
|
|
18
|
+
label: "Providers"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "connections",
|
|
22
|
+
label: "Connections"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "logs",
|
|
26
|
+
label: "Activity Logs"
|
|
27
|
+
}
|
|
28
|
+
], []), f = l.get("tab"), p = f && d.some((e) => e.id === f) ? f : d[0].id;
|
|
29
|
+
return /* @__PURE__ */ s("div", {
|
|
30
|
+
className: "flex flex-col h-full",
|
|
31
|
+
children: [/* @__PURE__ */ o("div", {
|
|
32
|
+
className: "border-b border-border-subtle px-4 pt-3",
|
|
33
|
+
children: /* @__PURE__ */ o(c, {
|
|
34
|
+
items: d,
|
|
35
|
+
activeTabId: p,
|
|
36
|
+
onTabChange: (e) => {
|
|
37
|
+
let t = new URLSearchParams(l);
|
|
38
|
+
e === d[0].id ? t.delete("tab") : t.set("tab", e), u(t, { replace: !0 });
|
|
39
|
+
},
|
|
40
|
+
variant: "underline"
|
|
41
|
+
})
|
|
42
|
+
}), /* @__PURE__ */ s("div", {
|
|
43
|
+
className: "flex-1 min-h-0 overflow-auto",
|
|
44
|
+
children: [
|
|
45
|
+
p === "overview" && /* @__PURE__ */ o(e, {}),
|
|
46
|
+
p === "providers" && /* @__PURE__ */ o(t, {}),
|
|
47
|
+
p === "connections" && /* @__PURE__ */ o(n, {}),
|
|
48
|
+
p === "logs" && /* @__PURE__ */ o(r, {})
|
|
49
|
+
]
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { l as IntegrationsUserLandingPage };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=IntegrationsUserLandingPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IntegrationsUserLandingPage.js","names":[],"sources":["../../../src/integrations/pages/IntegrationsUserLandingPage.tsx"],"sourcesContent":["import { useMemo } from 'react';\nimport { useSearchParams } from 'react-router-dom';\nimport { Tabs, type TabItem } from '@burdenoff/fe-libs/chrome';\n\nimport { IntegrationsOverview } from './IntegrationsOverview';\nimport { ProviderCatalog } from './ProviderCatalog';\nimport { ConnectionsList } from './ConnectionsList';\nimport { ConnectionLogs } from './ConnectionLogs';\n\n/**\n * IntegrationsUserLandingPage\n *\n * User-facing tabbed landing page for the Integrations microfrontend.\n * Renders user sub-pages (overview, providers, connections, logs) inside a\n * Tabs container. The active tab is reflected in the `?tab=` URL search param.\n *\n * Excludes admin features: Settings.\n */\nexport function IntegrationsUserLandingPage() {\n const [params, setParams] = useSearchParams();\n\n const tabs: TabItem[] = useMemo(\n () => [\n { id: 'overview', label: 'Overview' },\n { id: 'providers', label: 'Providers' },\n { id: 'connections', label: 'Connections' },\n { id: 'logs', label: 'Activity Logs' },\n ],\n []\n );\n\n const rawTab = params.get('tab');\n const activeId = rawTab && tabs.some((t) => t.id === rawTab) ? rawTab : tabs[0].id;\n\n const handleTabChange = (id: string) => {\n const next = new URLSearchParams(params);\n if (id === tabs[0].id) {\n next.delete('tab');\n } else {\n next.set('tab', id);\n }\n setParams(next, { replace: true });\n };\n\n return (\n <div className=\"flex flex-col h-full\">\n <div className=\"border-b border-border-subtle px-4 pt-3\">\n <Tabs\n items={tabs}\n activeTabId={activeId}\n onTabChange={handleTabChange}\n variant=\"underline\"\n />\n </div>\n <div className=\"flex-1 min-h-0 overflow-auto\">\n {activeId === 'overview' && <IntegrationsOverview />}\n {activeId === 'providers' && <ProviderCatalog />}\n {activeId === 'connections' && <ConnectionsList />}\n {activeId === 'logs' && <ConnectionLogs />}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAkBA,SAAgB,IAA8B;CAC5C,IAAM,CAAC,GAAQ,KAAa,GAAiB,EAEvC,IAAkB,QAChB;EACJ;GAAE,IAAI;GAAY,OAAO;GAAY;EACrC;GAAE,IAAI;GAAa,OAAO;GAAa;EACvC;GAAE,IAAI;GAAe,OAAO;GAAe;EAC3C;GAAE,IAAI;GAAQ,OAAO;GAAiB;EACvC,EACD,EAAE,CACH,EAEK,IAAS,EAAO,IAAI,MAAM,EAC1B,IAAW,KAAU,EAAK,MAAM,MAAM,EAAE,OAAO,EAAO,GAAG,IAAS,EAAK,GAAG;AAYhF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD;IACE,OAAO;IACP,aAAa;IACb,cAhBiB,MAAe;KACtC,IAAM,IAAO,IAAI,gBAAgB,EAAO;AAMxC,KALI,MAAO,EAAK,GAAG,KACjB,EAAK,OAAO,MAAM,GAElB,EAAK,IAAI,OAAO,EAAG,EAErB,EAAU,GAAM,EAAE,SAAS,IAAM,CAAC;;IAU5B,SAAQ;IACR,CAAA;GACE,CAAA,EACN,kBAAC,OAAD;GAAK,WAAU;aAAf;IACG,MAAa,cAAc,kBAAC,GAAD,EAAwB,CAAA;IACnD,MAAa,eAAe,kBAAC,GAAD,EAAmB,CAAA;IAC/C,MAAa,iBAAiB,kBAAC,GAAD,EAAmB,CAAA;IACjD,MAAa,UAAU,kBAAC,GAAD,EAAkB,CAAA;IACtC;KACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ProviderCatalogProps {
|
|
2
|
+
showCreateProviderButton?: boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Provider Catalog — Grid/list view of available providers with filtering.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ProviderCatalog({ showCreateProviderButton }: ProviderCatalogProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ProviderCatalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderCatalog.d.ts","sourceRoot":"","sources":["../../../src/integrations/pages/ProviderCatalog.tsx"],"names":[],"mappings":"AAwBA,UAAU,oBAAoB;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,wBAAgC,EAAE,EAAE,oBAAoB,2CA2dzF"}
|