@burdenoff/microfe-integrations 2026.1001.1 → 2026.1007.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/integrations/IntegrationsUserRoutes.d.ts.map +1 -1
- package/dist/integrations/IntegrationsUserRoutes.js +58 -43
- package/dist/integrations/IntegrationsUserRoutes.js.map +1 -1
- package/dist/integrations/pages/AddConnectionWizard.js +14 -14
- package/dist/integrations/pages/ConnectionDetail.js +12 -12
- package/dist/integrations/pages/ConnectionLogs.js +6 -6
- package/dist/integrations/pages/ConnectionsList.js +13 -13
- package/dist/integrations/pages/IntegrationsOverview.js +23 -23
- package/dist/integrations/pages/IntegrationsSettings.js +5 -5
- package/dist/integrations/pages/ProviderCatalog.js +14 -14
- package/dist/integrations/pages/ProviderCatalog.js.map +1 -1
- package/dist/integrations/pages/ProviderDetail.js +202 -202
- package/dist/integrations/pages/ProviderDetail.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsUserRoutes.d.ts","sourceRoot":"","sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntegrationsUserRoutes.d.ts","sourceRoot":"","sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"names":[],"mappings":"AAmIA;;;;;GAKG;AACH,wBAAgB,sBAAsB,uCA2CrC"}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
import { useIntegrations as e } from "./providers/IntegrationsProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { AddConnectionDialog as t } from "./components/AddConnectionDialog.js";
|
|
3
|
+
import { joinPath as n } from "./utils/navigation.js";
|
|
4
|
+
import { IntegrationsUserLandingPage as r } from "./pages/IntegrationsUserLandingPage.js";
|
|
5
|
+
import { Component as i, Suspense as a, lazy as o } from "react";
|
|
6
|
+
import { AlertTriangle as s, Loader2 as c, RefreshCw as l } from "lucide-react";
|
|
7
|
+
import { Navigate as u, Route as d, Routes as f, useLocation as p, useNavigate as m, useParams as h } from "react-router";
|
|
8
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
7
9
|
//#region src/integrations/IntegrationsUserRoutes.tsx
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
var v = o(() => import("./pages/ProviderCatalog.js").then((e) => ({ default: e.ProviderCatalog }))), y = o(() => import("./pages/ProviderDetail.js").then((e) => ({ default: e.ProviderDetail }))), b = o(() => import("./pages/ConnectionsList.js").then((e) => ({ default: e.ConnectionsList }))), x = o(() => import("./pages/AddConnectionWizard.js").then((e) => ({ default: e.AddConnectionWizard }))), S = o(() => import("./pages/ConnectionDetail.js").then((e) => ({ default: e.ConnectionDetail }))), C = o(() => import("./pages/ConnectionLogs.js").then((e) => ({ default: e.ConnectionLogs }))), w = new Set([
|
|
11
|
+
"slack-user",
|
|
12
|
+
"teams-user",
|
|
13
|
+
"discord-user"
|
|
14
|
+
]);
|
|
15
|
+
function T() {
|
|
16
|
+
let { basePath: r } = e(), { providerId: i } = h(), { search: a } = p(), o = m(), s = new URLSearchParams(a), c = s.get("providerKey");
|
|
17
|
+
return s.get("returnTo") && s.get("channelId") && c && w.has(c) ? /* @__PURE__ */ g(x, {}) : /* @__PURE__ */ g(t, {
|
|
18
|
+
open: !0,
|
|
19
|
+
onClose: () => o(n(r ?? "/", "connections")),
|
|
20
|
+
preselectedProviderId: i,
|
|
21
|
+
preselectedProviderKey: c
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function E() {
|
|
25
|
+
return /* @__PURE__ */ g("div", {
|
|
11
26
|
className: "flex items-center justify-center min-h-[400px]",
|
|
12
|
-
children: /* @__PURE__ */
|
|
27
|
+
children: /* @__PURE__ */ g(c, { className: "size-8 animate-spin text-primary" })
|
|
13
28
|
});
|
|
14
29
|
}
|
|
15
|
-
var
|
|
30
|
+
var D = class extends i {
|
|
16
31
|
constructor(e) {
|
|
17
32
|
super(e), this.state = {
|
|
18
33
|
hasError: !1,
|
|
@@ -37,73 +52,73 @@ var x = class extends n {
|
|
|
37
52
|
}));
|
|
38
53
|
};
|
|
39
54
|
render() {
|
|
40
|
-
return this.state.hasError ? /* @__PURE__ */
|
|
55
|
+
return this.state.hasError ? /* @__PURE__ */ _("div", {
|
|
41
56
|
className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
|
|
42
57
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ g("div", {
|
|
44
59
|
className: "p-3 rounded-full bg-status-error-bg/10",
|
|
45
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ g(s, { className: "size-8 text-status-error-text" })
|
|
46
61
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ _("div", {
|
|
48
63
|
className: "space-y-2",
|
|
49
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ g("h3", {
|
|
50
65
|
className: "text-lg font-semibold text-text-primary",
|
|
51
66
|
children: "Failed to load page"
|
|
52
|
-
}), /* @__PURE__ */
|
|
67
|
+
}), /* @__PURE__ */ g("p", {
|
|
53
68
|
className: "text-sm text-text-secondary max-w-md",
|
|
54
69
|
children: this.state.error?.message || "The page chunk could not be loaded. This may be due to a network issue."
|
|
55
70
|
})]
|
|
56
71
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ _("button", {
|
|
58
73
|
type: "button",
|
|
59
74
|
onClick: this.handleRetry,
|
|
60
75
|
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ g(l, { className: "size-4" }), "Try Again"]
|
|
62
77
|
})
|
|
63
78
|
]
|
|
64
|
-
}) : /* @__PURE__ */
|
|
79
|
+
}) : /* @__PURE__ */ g("div", { children: this.props.children }, this.state.retryKey);
|
|
65
80
|
}
|
|
66
81
|
};
|
|
67
|
-
function
|
|
68
|
-
let { basePath:
|
|
69
|
-
return
|
|
70
|
-
fallback: /* @__PURE__ */
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
82
|
+
function O() {
|
|
83
|
+
let { basePath: t } = e(), n = p(), i = t && t !== "/" ? t.endsWith("/") ? t.slice(0, -1) : t : "";
|
|
84
|
+
return i && !(n.pathname === i || n.pathname.startsWith(i + "/")) ? null : /* @__PURE__ */ g(D, { children: /* @__PURE__ */ g(a, {
|
|
85
|
+
fallback: /* @__PURE__ */ g(E, {}),
|
|
86
|
+
children: /* @__PURE__ */ _(f, { children: [
|
|
87
|
+
/* @__PURE__ */ g(d, {
|
|
73
88
|
index: !0,
|
|
74
|
-
element: /* @__PURE__ */
|
|
89
|
+
element: /* @__PURE__ */ g(r, {})
|
|
75
90
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ g(d, {
|
|
77
92
|
path: "providers",
|
|
78
|
-
element: /* @__PURE__ */
|
|
93
|
+
element: /* @__PURE__ */ g(v, {})
|
|
79
94
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ g(d, {
|
|
81
96
|
path: "providers/:providerId",
|
|
82
|
-
element: /* @__PURE__ */
|
|
97
|
+
element: /* @__PURE__ */ g(y, {})
|
|
83
98
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ g(d, {
|
|
85
100
|
path: "connections",
|
|
86
|
-
element: /* @__PURE__ */
|
|
101
|
+
element: /* @__PURE__ */ g(b, {})
|
|
87
102
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ g(d, {
|
|
89
104
|
path: "connections/add",
|
|
90
|
-
element: /* @__PURE__ */
|
|
105
|
+
element: /* @__PURE__ */ g(T, {})
|
|
91
106
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ g(d, {
|
|
93
108
|
path: "connections/add/:providerId",
|
|
94
|
-
element: /* @__PURE__ */
|
|
109
|
+
element: /* @__PURE__ */ g(T, {})
|
|
95
110
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ g(d, {
|
|
97
112
|
path: "connections/:connectionId",
|
|
98
|
-
element: /* @__PURE__ */
|
|
113
|
+
element: /* @__PURE__ */ g(S, {})
|
|
99
114
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ g(d, {
|
|
101
116
|
path: "logs",
|
|
102
|
-
element: /* @__PURE__ */
|
|
117
|
+
element: /* @__PURE__ */ g(C, {})
|
|
103
118
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ g(d, {
|
|
105
120
|
path: "*",
|
|
106
|
-
element: /* @__PURE__ */
|
|
121
|
+
element: /* @__PURE__ */ g(u, {
|
|
107
122
|
to: "",
|
|
108
123
|
replace: !0
|
|
109
124
|
})
|
|
@@ -112,6 +127,6 @@ function S() {
|
|
|
112
127
|
}) });
|
|
113
128
|
}
|
|
114
129
|
//#endregion
|
|
115
|
-
export {
|
|
130
|
+
export { O as IntegrationsUserRoutes };
|
|
116
131
|
|
|
117
132
|
//# sourceMappingURL=IntegrationsUserRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsUserRoutes.js","names":[],"sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, Component, type ReactNode, type ErrorInfo } from 'react';\nimport { Navigate, Route, Routes, useLocation } from 'react-router';\nimport { Loader2, AlertTriangle, RefreshCw } from 'lucide-react';\nimport { useIntegrations } from './providers/IntegrationsProvider';\n\n// Eager loaded - primary landing page\nimport { IntegrationsUserLandingPage } from './pages/IntegrationsUserLandingPage';\n\n// Lazy loaded pages\nconst ProviderCatalog = lazy(() =>\n import('./pages/ProviderCatalog').then((m) => ({ default: m.ProviderCatalog }))\n);\nconst ProviderDetail = lazy(() =>\n import('./pages/ProviderDetail').then((m) => ({ default: m.ProviderDetail }))\n);\nconst ConnectionsList = lazy(() =>\n import('./pages/ConnectionsList').then((m) => ({ default: m.ConnectionsList }))\n);\nconst AddConnectionWizard = lazy(() =>\n import('./pages/AddConnectionWizard').then((m) => ({ default: m.AddConnectionWizard }))\n);\nconst ConnectionDetail = lazy(() =>\n import('./pages/ConnectionDetail').then((m) => ({ default: m.ConnectionDetail }))\n);\nconst ConnectionLogs = lazy(() =>\n import('./pages/ConnectionLogs').then((m) => ({ default: m.ConnectionLogs }))\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null; retryKey: number }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null, retryKey: 0 };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[Integrations] Lazy page load failed:', error, errorInfo);\n }\n\n handleRetry = () => {\n // Increment retryKey to force React to remount the lazy tree,\n // which triggers a fresh dynamic import instead of reusing the cached rejection.\n this.setState((prev) => ({ hasError: false, error: null, retryKey: prev.retryKey + 1 }));\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Failed to load page</h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {this.state.error?.message ||\n 'The page chunk could not be loaded. This may be due to a network issue.'}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return <div key={this.state.retryKey}>{this.props.children}</div>;\n }\n}\n\n/**\n * User-facing routes for the Integrations microfrontend.\n *\n * Includes: Overview, Providers, Connections, Activity Logs.\n * Excludes admin features: Settings.\n */\nexport function IntegrationsUserRoutes() {\n const { basePath } = useIntegrations();\n const location = useLocation();\n\n const normalizedBasePath =\n basePath && basePath !== '/' ? (basePath.endsWith('/') ? basePath.slice(0, -1) : basePath) : '';\n\n if (normalizedBasePath) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <LazyErrorBoundary>\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route index element={<IntegrationsUserLandingPage />} />\n\n {/* Providers (lazy loaded) */}\n <Route path=\"providers\" element={<ProviderCatalog />} />\n <Route path=\"providers/:providerId\" element={<ProviderDetail />} />\n\n {/* Connections (lazy loaded) */}\n <Route path=\"connections\" element={<ConnectionsList />} />\n <Route path=\"connections/add\" element={<
|
|
1
|
+
{"version":3,"file":"IntegrationsUserRoutes.js","names":[],"sources":["../../src/integrations/IntegrationsUserRoutes.tsx"],"sourcesContent":["import { lazy, Suspense, Component, type ReactNode, type ErrorInfo } from 'react';\nimport { Navigate, Route, Routes, useLocation, useNavigate, useParams } from 'react-router';\nimport { Loader2, AlertTriangle, RefreshCw } from 'lucide-react';\nimport { AddConnectionDialog } from './components/AddConnectionDialog';\nimport { useIntegrations } from './providers/IntegrationsProvider';\nimport { joinPath } from './utils/navigation';\n\n// Eager loaded - primary landing page\nimport { IntegrationsUserLandingPage } from './pages/IntegrationsUserLandingPage';\n\n// Lazy loaded pages\nconst ProviderCatalog = lazy(() =>\n import('./pages/ProviderCatalog').then((m) => ({ default: m.ProviderCatalog }))\n);\nconst ProviderDetail = lazy(() =>\n import('./pages/ProviderDetail').then((m) => ({ default: m.ProviderDetail }))\n);\nconst ConnectionsList = lazy(() =>\n import('./pages/ConnectionsList').then((m) => ({ default: m.ConnectionsList }))\n);\nconst AddConnectionWizard = lazy(() =>\n import('./pages/AddConnectionWizard').then((m) => ({ default: m.AddConnectionWizard }))\n);\nconst ConnectionDetail = lazy(() =>\n import('./pages/ConnectionDetail').then((m) => ({ default: m.ConnectionDetail }))\n);\nconst ConnectionLogs = lazy(() =>\n import('./pages/ConnectionLogs').then((m) => ({ default: m.ConnectionLogs }))\n);\n\nconst BOTLIT_CHANNEL_PROVIDER_KEYS = new Set(['slack-user', 'teams-user', 'discord-user']);\n\n/** Deep links use the same schema-driven dialog as the Connections and provider pages. */\nfunction ConnectionAddRoute() {\n const { basePath } = useIntegrations();\n const { providerId } = useParams<{ providerId: string }>();\n const { search } = useLocation();\n const navigate = useNavigate();\n const params = new URLSearchParams(search);\n const providerKey = params.get('providerKey');\n\n // Botlit's existing channel setup needs its full-page OAuth return redirect.\n // Other deep links (including the FluidGrids channel picker) must honor the\n // shared dialog's provider/method storage policy instead of the old wizard.\n if (\n params.get('returnTo') &&\n params.get('channelId') &&\n providerKey &&\n BOTLIT_CHANNEL_PROVIDER_KEYS.has(providerKey)\n ) {\n return <AddConnectionWizard />;\n }\n\n return (\n <AddConnectionDialog\n open\n onClose={() => navigate(joinPath(basePath ?? '/', 'connections'))}\n preselectedProviderId={providerId}\n preselectedProviderKey={providerKey}\n />\n );\n}\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null; retryKey: number }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null, retryKey: 0 };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[Integrations] Lazy page load failed:', error, errorInfo);\n }\n\n handleRetry = () => {\n // Increment retryKey to force React to remount the lazy tree,\n // which triggers a fresh dynamic import instead of reusing the cached rejection.\n this.setState((prev) => ({ hasError: false, error: null, retryKey: prev.retryKey + 1 }));\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Failed to load page</h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {this.state.error?.message ||\n 'The page chunk could not be loaded. This may be due to a network issue.'}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return <div key={this.state.retryKey}>{this.props.children}</div>;\n }\n}\n\n/**\n * User-facing routes for the Integrations microfrontend.\n *\n * Includes: Overview, Providers, Connections, Activity Logs.\n * Excludes admin features: Settings.\n */\nexport function IntegrationsUserRoutes() {\n const { basePath } = useIntegrations();\n const location = useLocation();\n\n const normalizedBasePath =\n basePath && basePath !== '/' ? (basePath.endsWith('/') ? basePath.slice(0, -1) : basePath) : '';\n\n if (normalizedBasePath) {\n const pathMatches =\n location.pathname === normalizedBasePath ||\n location.pathname.startsWith(normalizedBasePath + '/');\n\n if (!pathMatches) {\n return null;\n }\n }\n\n return (\n <LazyErrorBoundary>\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route index element={<IntegrationsUserLandingPage />} />\n\n {/* Providers (lazy loaded) */}\n <Route path=\"providers\" element={<ProviderCatalog />} />\n <Route path=\"providers/:providerId\" element={<ProviderDetail />} />\n\n {/* Connections (lazy loaded) */}\n <Route path=\"connections\" element={<ConnectionsList />} />\n <Route path=\"connections/add\" element={<ConnectionAddRoute />} />\n <Route path=\"connections/add/:providerId\" element={<ConnectionAddRoute />} />\n <Route path=\"connections/:connectionId\" element={<ConnectionDetail />} />\n\n {/* Logs (lazy loaded) */}\n <Route path=\"logs\" element={<ConnectionLogs />} />\n\n {/* Catch-all route - redirect to overview */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
|
+
import { joinPath as r } from "../utils/navigation.js";
|
|
5
|
+
import { cn as i } from "../utils/cn.js";
|
|
6
6
|
import { useGetConnectionLazyQuery as ee } from "../../generated/wspace-operations.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";
|
|
@@ -18,7 +18,7 @@ import { Button as p, GlassCard as Me, IllustratedEmptyState as Ne, PagePurpose
|
|
|
18
18
|
import { SchemaForm as Fe, initialValuesFromSchema as Ie, isSchemaComplete as Le, parseFormSchema as Re, visibleValues as ze } from "@burdenoff/fe-libs/credentials";
|
|
19
19
|
//#region src/integrations/pages/AddConnectionWizard.tsx
|
|
20
20
|
function m() {
|
|
21
|
-
let { providerId: m } = Ee(), { basePath: h = "/", navigate: g, apiGatewayUrl: _ } = e(), v = t(), Be = fe(), y = de(), b = Te().search, x = o(() => new URLSearchParams(b), [b]), S = x.get("providerKey") ?? null, C = x.get("returnTo") ?? null, w = x.get("channelId") ?? null, T = !!(C && w), { provider: Ve, loading: He } = ne(S ?? ""), { providers: E, loading: D } = re(), { hasPermission: Ue, isLoading: We } = Oe(), Ge = Ue(
|
|
21
|
+
let { providerId: m } = Ee(), { basePath: h = "/", navigate: g, apiGatewayUrl: _ } = e(), v = t(), Be = fe(), y = de(), b = Te().search, x = o(() => new URLSearchParams(b), [b]), S = x.get("providerKey") ?? null, C = x.get("returnTo") ?? null, w = x.get("channelId") ?? null, T = !!(C && w), { provider: Ve, loading: He } = ne(S ?? ""), { providers: E, loading: D } = re(), { hasPermission: Ue, isLoading: We } = Oe(), Ge = Ue(n.CONNECTION_CREATE), Ke = !We && Ue(n.VAULT_CREATE), qe = De(), Je = o(() => Ae(qe), [qe]), { createConnection: Ye, loading: Xe } = le(), { initiateOAuth: Ze, loading: Qe } = ue(), { authenticateWithApiKey: $e, loading: et } = ie(), { authenticateWithBasicAuth: tt, loading: nt } = ae(), { authenticateWithBearerToken: O, loading: rt } = oe(), { authenticateWithServiceAccount: it, loading: at } = ce(), { authenticateWithCustomConfig: k, loading: ot } = se(), [st] = ee({ fetchPolicy: "network-only" }), [A, j] = s(m || S ? "configure" : "select_provider"), [M, ct] = s(null), [N, lt] = s(""), [P, F] = s(""), [I, ut] = s(""), [L, dt] = s(""), [R, ft] = s(""), [z, pt] = s(""), [B, mt] = s(""), [ht, gt] = s({}), [V, _t] = s({
|
|
22
22
|
mode: "managed",
|
|
23
23
|
vaultId: "",
|
|
24
24
|
secretId: "",
|
|
@@ -234,7 +234,7 @@ function m() {
|
|
|
234
234
|
/* @__PURE__ */ u(p, {
|
|
235
235
|
variant: "ghost",
|
|
236
236
|
size: "icon",
|
|
237
|
-
onClick: () => g?.(
|
|
237
|
+
onClick: () => g?.(r(h, "connections")),
|
|
238
238
|
"aria-label": v("integrations.common.back", "Back"),
|
|
239
239
|
children: /* @__PURE__ */ u(he, { size: 20 })
|
|
240
240
|
}),
|
|
@@ -258,11 +258,11 @@ function m() {
|
|
|
258
258
|
className: "flex items-center gap-2",
|
|
259
259
|
children: [
|
|
260
260
|
/* @__PURE__ */ u("div", {
|
|
261
|
-
className:
|
|
261
|
+
className: i("w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium transition-all", t < $ ? "bg-action-primary-bg text-action-primary-text" : t === $ ? "bg-action-primary-bg text-action-primary-text ring-4 ring-primary/20" : "bg-bg-sunken text-text-secondary"),
|
|
262
262
|
children: t < $ ? /* @__PURE__ */ u(_e, { size: 16 }) : t + 1
|
|
263
263
|
}),
|
|
264
264
|
/* @__PURE__ */ u("span", {
|
|
265
|
-
className:
|
|
265
|
+
className: i("text-sm font-medium hidden sm:inline", t === $ ? "text-text-primary" : "text-text-secondary"),
|
|
266
266
|
children: e.label
|
|
267
267
|
}),
|
|
268
268
|
t < Q.length - 1 && /* @__PURE__ */ u("div", { className: "w-8 h-px bg-border" })
|
|
@@ -325,7 +325,7 @@ function m() {
|
|
|
325
325
|
title: N ? v("integrations.addConnection.empty.noMatchingProviders", "No matching providers") : v("integrations.addConnection.empty.noInstalledProviders", "No installed providers yet"),
|
|
326
326
|
description: N ? v("integrations.addConnection.empty.matchingDescription", "No installed provider matches your search. Try a different term or install one from the catalog.") : v("integrations.addConnection.empty.installedDescription", "You need at least one installed, enabled provider before you can create a connection. Install one from the catalog to get started."),
|
|
327
327
|
action: /* @__PURE__ */ u(p, {
|
|
328
|
-
onClick: () => g?.(
|
|
328
|
+
onClick: () => g?.(r(h, "providers")),
|
|
329
329
|
children: v("integrations.addConnection.empty.browseCatalog", "Browse Catalog")
|
|
330
330
|
})
|
|
331
331
|
}),
|
|
@@ -334,7 +334,7 @@ function m() {
|
|
|
334
334
|
children: Ct.map((e) => /* @__PURE__ */ d("button", {
|
|
335
335
|
type: "button",
|
|
336
336
|
onClick: () => wt(e),
|
|
337
|
-
className:
|
|
337
|
+
className: i("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"),
|
|
338
338
|
children: [/* @__PURE__ */ u(f, {
|
|
339
339
|
provider: e,
|
|
340
340
|
size: 40
|
|
@@ -425,7 +425,7 @@ function m() {
|
|
|
425
425
|
className: "flex gap-3",
|
|
426
426
|
children: [/* @__PURE__ */ u(p, {
|
|
427
427
|
variant: "outline",
|
|
428
|
-
onClick: () => m || S ? g?.(
|
|
428
|
+
onClick: () => m || S ? g?.(r(h, "connections")) : j("select_provider"),
|
|
429
429
|
children: v("integrations.addConnection.actions.back", "Back")
|
|
430
430
|
}), /* @__PURE__ */ d(p, {
|
|
431
431
|
onClick: Tt,
|
|
@@ -674,12 +674,12 @@ function m() {
|
|
|
674
674
|
children: [/* @__PURE__ */ u(xe, { size: 16 }), v("integrations.addConnection.actions.linkToBotChannel", "Link to Bot Channel")]
|
|
675
675
|
}),
|
|
676
676
|
!T && W && /* @__PURE__ */ u(p, {
|
|
677
|
-
onClick: () => g?.(
|
|
677
|
+
onClick: () => g?.(r(h, `connections/${W}`)),
|
|
678
678
|
children: v("integrations.addConnection.actions.viewConnection", "View Connection")
|
|
679
679
|
}),
|
|
680
680
|
/* @__PURE__ */ u(p, {
|
|
681
681
|
variant: "outline",
|
|
682
|
-
onClick: () => g?.(
|
|
682
|
+
onClick: () => g?.(r(h, "connections")),
|
|
683
683
|
children: v("integrations.addConnection.actions.allConnections", "All Connections")
|
|
684
684
|
})
|
|
685
685
|
]
|
|
@@ -713,7 +713,7 @@ function m() {
|
|
|
713
713
|
children: v("integrations.addConnection.actions.tryAgain", "Try Again")
|
|
714
714
|
}), /* @__PURE__ */ u(p, {
|
|
715
715
|
variant: "outline",
|
|
716
|
-
onClick: () => g?.(
|
|
716
|
+
onClick: () => g?.(r(h, "connections")),
|
|
717
717
|
children: v("integrations.addConnection.actions.cancel", "Cancel")
|
|
718
718
|
})]
|
|
719
719
|
})
|
|
@@ -737,7 +737,7 @@ function m() {
|
|
|
737
737
|
}),
|
|
738
738
|
/* @__PURE__ */ d(p, {
|
|
739
739
|
variant: "outline",
|
|
740
|
-
onClick: () => g?.(
|
|
740
|
+
onClick: () => g?.(r(h, "connections")),
|
|
741
741
|
children: [
|
|
742
742
|
/* @__PURE__ */ u(he, { size: 16 }),
|
|
743
743
|
" ",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
|
+
import { joinPath as r } from "../utils/navigation.js";
|
|
5
|
+
import { cn as i } from "../utils/cn.js";
|
|
6
6
|
import { useFormatLastUsed as ee } from "../hooks/useFormatLastUsed.js";
|
|
7
7
|
import { useConnection as a, useDeleteConnection as te, useRefreshToken as ne, useRevokeConnection as re, useTestConnection as ie } from "../hooks/useConnections.js";
|
|
8
8
|
import { useAuthTypeLabel as ae } from "../hooks/useLabel.js";
|
|
@@ -21,7 +21,7 @@ import { ProviderIcon as be } from "@burdenoff/fe-libs/connections";
|
|
|
21
21
|
import { AlertDialog as xe, AlertDialogAction as Se, AlertDialogCancel as Ce, AlertDialogContent as we, AlertDialogDescription as Te, AlertDialogFooter as Ee, AlertDialogHeader as De, AlertDialogTitle as Oe, Button as ke, CTAOverflowMenu as b, EmphasisPanel as x, GlassCard as S, NextSteps as C, PagePurpose as w, ShowMore as Ae } from "@burdenoff/fe-libs/ui";
|
|
22
22
|
//#region src/integrations/pages/ConnectionDetail.tsx
|
|
23
23
|
function T() {
|
|
24
|
-
let { connectionId: T } = _e(), { basePath: E = "/", navigate: D } = e(), O = t(), je = ae(), Me = ee(), k = ce(), { connection: A, loading: Ne, error: j, refetch: M } = a(T ?? ""), { testConnection: Pe, loading: N } = ie(), { refreshToken: Fe, loading: Ie } = ne(), { revokeConnection: Le, loading: P } = re(), { deleteConnection: Re, loading: F } = te(), I = ye(se.OAUTH_REFRESH, !0), { hasPermission: L, isLoading: ze } = ve(), R = L(
|
|
24
|
+
let { connectionId: T } = _e(), { basePath: E = "/", navigate: D } = e(), O = t(), je = ae(), Me = ee(), k = ce(), { connection: A, loading: Ne, error: j, refetch: M } = a(T ?? ""), { testConnection: Pe, loading: N } = ie(), { refreshToken: Fe, loading: Ie } = ne(), { revokeConnection: Le, loading: P } = re(), { deleteConnection: Re, loading: F } = te(), I = ye(se.OAUTH_REFRESH, !0), { hasPermission: L, isLoading: ze } = ve(), R = L(n.CONNECTION_UPDATE), z = L(n.CONNECTION_DELETE), [B, Be] = s(null), [V, H] = s(null), [Ve, U] = s(!1), [W, G] = s(!1), [K, q] = s(!1), J = (e, t) => {
|
|
25
25
|
H({
|
|
26
26
|
type: e,
|
|
27
27
|
message: t
|
|
@@ -68,7 +68,7 @@ function T() {
|
|
|
68
68
|
]
|
|
69
69
|
}), /* @__PURE__ */ y("button", {
|
|
70
70
|
type: "button",
|
|
71
|
-
onClick: () => D?.(
|
|
71
|
+
onClick: () => D?.(r(E, "connections")),
|
|
72
72
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-subtle hover:bg-accent transition-colors",
|
|
73
73
|
children: [
|
|
74
74
|
/* @__PURE__ */ v(l, { size: 14 }),
|
|
@@ -105,7 +105,7 @@ function T() {
|
|
|
105
105
|
e && await Z();
|
|
106
106
|
}, Z = async () => {
|
|
107
107
|
try {
|
|
108
|
-
await Re(A.id, W), J("success", O("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), o("success"), U(!1), G(!1), D?.(
|
|
108
|
+
await Re(A.id, W), J("success", O("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), o("success"), U(!1), G(!1), D?.(r(E, "connections"));
|
|
109
109
|
} catch (e) {
|
|
110
110
|
J("error", e instanceof Error ? e.message : "Failed to delete connection"), o("error");
|
|
111
111
|
}
|
|
@@ -134,14 +134,14 @@ function T() {
|
|
|
134
134
|
label: O("integrations.connectionDetail.nextSteps.logs.label", "Review activity logs"),
|
|
135
135
|
description: O("integrations.connectionDetail.nextSteps.logs.description", "See recent requests and errors for this connection to debug issues."),
|
|
136
136
|
icon: /* @__PURE__ */ v(c, { size: 16 }),
|
|
137
|
-
onClick: () => D?.(
|
|
137
|
+
onClick: () => D?.(r(E, "logs"))
|
|
138
138
|
}
|
|
139
139
|
];
|
|
140
140
|
return /* @__PURE__ */ y("div", {
|
|
141
141
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
142
142
|
children: [
|
|
143
143
|
V && /* @__PURE__ */ y("div", {
|
|
144
|
-
className:
|
|
144
|
+
className: i("fixed top-4 right-4 z-50 flex items-center gap-3 px-5 py-3 rounded-xl shadow-2xl border-2 animate-in slide-in-from-top-4 duration-200", V.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border-border-default" : "bg-status-error-bg-subtle text-status-error-text border-border-default"),
|
|
145
145
|
children: [V.type === "success" ? /* @__PURE__ */ v(u, { size: 20 }) : /* @__PURE__ */ v(g, { size: 20 }), /* @__PURE__ */ v("span", {
|
|
146
146
|
className: "font-medium",
|
|
147
147
|
children: V.message
|
|
@@ -211,7 +211,7 @@ function T() {
|
|
|
211
211
|
/* @__PURE__ */ v(ke, {
|
|
212
212
|
variant: "ghost",
|
|
213
213
|
size: "icon",
|
|
214
|
-
onClick: () => D?.(
|
|
214
|
+
onClick: () => D?.(r(E, "connections")),
|
|
215
215
|
"aria-label": O("integrations.connectionDetail.actions.backAriaLabel", "Back"),
|
|
216
216
|
children: /* @__PURE__ */ v(l, { size: 20 })
|
|
217
217
|
}),
|
|
@@ -384,14 +384,14 @@ function T() {
|
|
|
384
384
|
})]
|
|
385
385
|
}),
|
|
386
386
|
B && /* @__PURE__ */ y("div", {
|
|
387
|
-
className:
|
|
387
|
+
className: i("rounded-xl border p-5", B.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
|
|
388
388
|
children: [
|
|
389
389
|
/* @__PURE__ */ y("h2", {
|
|
390
|
-
className:
|
|
390
|
+
className: i("font-semibold flex items-center gap-2 mb-2", B.success ? "text-status-success-text" : "text-status-error-text"),
|
|
391
391
|
children: [B.success ? /* @__PURE__ */ v(u, { size: 18 }) : /* @__PURE__ */ v(g, { size: 18 }), B.success ? O("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : O("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
|
|
392
392
|
}),
|
|
393
393
|
/* @__PURE__ */ v("p", {
|
|
394
|
-
className:
|
|
394
|
+
className: i("text-sm", B.success ? "text-status-success-text" : "text-status-error-text"),
|
|
395
395
|
children: B.message
|
|
396
396
|
}),
|
|
397
397
|
/* @__PURE__ */ v("p", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
|
+
import { cn as r } from "../utils/cn.js";
|
|
5
5
|
import { LOG_ACTION_OPTIONS as i, LOG_LEVEL_OPTIONS as a } from "../utils/constants.js";
|
|
6
6
|
import { INTEGRATION_FEATURE_FLAGS as ee } from "../constants/featureFlags.js";
|
|
7
7
|
import { useFormatDate as te } from "../hooks/useFormatDate.js";
|
|
@@ -70,7 +70,7 @@ function k(e, t) {
|
|
|
70
70
|
a.href = i, a.download = t("integrations.logs.csv.filename", "integration-logs-{{date}}.csv", { date: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10) }), a.click(), URL.revokeObjectURL(i);
|
|
71
71
|
}
|
|
72
72
|
function A() {
|
|
73
|
-
let { basePath: d = "/", navigate: p } = e(), g = t(), O = te(), { hasPermission: A, isLoading: j } = se(), M = A(
|
|
73
|
+
let { basePath: d = "/", navigate: p } = e(), g = t(), O = te(), { hasPermission: A, isLoading: j } = se(), M = A(n.LOG_READ), ue = le(ee.CSV_EXPORT, !0), N = o(), P = `${N}-level`, F = `${N}-action`, [I, L] = c(""), [R, z] = c("all"), [B, V] = c("all"), [H, de] = c(!1), [U, W] = c(1), { logs: G, total: K, loading: q, error: J, refetch: Y } = ne({
|
|
74
74
|
level: R === "all" ? void 0 : R,
|
|
75
75
|
action: B === "all" ? void 0 : B,
|
|
76
76
|
page: U,
|
|
@@ -148,7 +148,7 @@ function A() {
|
|
|
148
148
|
type: "button",
|
|
149
149
|
onClick: () => de(!H),
|
|
150
150
|
"aria-expanded": H,
|
|
151
|
-
className:
|
|
151
|
+
className: r("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", H || Q ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
|
|
152
152
|
children: [
|
|
153
153
|
/* @__PURE__ */ b(h, { size: 16 }),
|
|
154
154
|
" ",
|
|
@@ -312,7 +312,7 @@ function A() {
|
|
|
312
312
|
className: "flex items-center gap-2 flex-wrap",
|
|
313
313
|
children: [
|
|
314
314
|
/* @__PURE__ */ b("span", {
|
|
315
|
-
className:
|
|
315
|
+
className: r("text-xs px-2 py-0.5 rounded-full border font-medium", D(e.level)),
|
|
316
316
|
children: e.level.toUpperCase()
|
|
317
317
|
}),
|
|
318
318
|
/* @__PURE__ */ b("span", {
|
|
@@ -320,7 +320,7 @@ function A() {
|
|
|
320
320
|
children: e.action.replace(/_/g, " ")
|
|
321
321
|
}),
|
|
322
322
|
e.responseStatus && /* @__PURE__ */ b("span", {
|
|
323
|
-
className:
|
|
323
|
+
className: r("text-xs px-2 py-0.5 rounded-full border font-mono", e.responseStatus >= 400 ? "text-status-error-text bg-status-error-bg-subtle border-border-default" : "text-status-success-text bg-status-success-bg-subtle border-border-default"),
|
|
324
324
|
children: e.responseStatus
|
|
325
325
|
})
|
|
326
326
|
]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
2
2
|
import { useTr as t } from "../hooks/useTr.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
|
+
import { AddConnectionDialog as r } from "../components/AddConnectionDialog.js";
|
|
5
|
+
import { joinPath as i } from "../utils/navigation.js";
|
|
6
|
+
import { cn as a } from "../utils/cn.js";
|
|
7
|
+
import { useIntegrationsStore as o } from "../store/integrationsStore.js";
|
|
8
8
|
import { CONNECTION_STATUS_OPTIONS as s, PROVIDER_CATEGORIES as c } from "../utils/constants.js";
|
|
9
9
|
import { useConnections as ee } from "../hooks/useConnections.js";
|
|
10
10
|
import { ConnectionCard as te } from "../components/ConnectionCard.js";
|
|
@@ -15,7 +15,7 @@ import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
|
15
15
|
import { Button as T, EmphasisPanel as ne, IllustratedEmptyState as re, PagePurpose as ie } from "@burdenoff/fe-libs/ui";
|
|
16
16
|
//#region src/integrations/pages/ConnectionsList.tsx
|
|
17
17
|
function E() {
|
|
18
|
-
let { basePath: E = "/", navigate: D, onConnectionSelect: O } = e(), k = t(), { viewMode: A, setViewMode: j, connectionFilter: M, updateConnectionFilter: N, addConnectionDialogOpen: P, openAddConnectionDialog: F, closeAddConnectionDialog: I } =
|
|
18
|
+
let { basePath: E = "/", navigate: D, onConnectionSelect: O } = e(), k = t(), { viewMode: A, setViewMode: j, connectionFilter: M, updateConnectionFilter: N, addConnectionDialogOpen: P, openAddConnectionDialog: F, closeAddConnectionDialog: I } = o(), { connections: L, loading: R, answered: z, error: B, refetch: V } = ee(), H = !R && !B && !z, { hasPermission: U, isLoading: W } = S(), G = !W && U(n.CONNECTION_CREATE), [K, q] = d(!1), J = l(), Y = `${J}-status`, X = `${J}-category`, Z = u(() => {
|
|
19
19
|
let e = L ?? [];
|
|
20
20
|
if (M.search) {
|
|
21
21
|
let t = M.search.toLowerCase();
|
|
@@ -30,7 +30,7 @@ function E() {
|
|
|
30
30
|
category: "all"
|
|
31
31
|
});
|
|
32
32
|
}, ae = (e) => {
|
|
33
|
-
O?.(e), D?.(
|
|
33
|
+
O?.(e), D?.(i(E, `connections/${e.id}`));
|
|
34
34
|
};
|
|
35
35
|
return /* @__PURE__ */ w("div", {
|
|
36
36
|
className: "space-y-6 p-6 max-w-7xl mx-auto",
|
|
@@ -103,7 +103,7 @@ function E() {
|
|
|
103
103
|
/* @__PURE__ */ w("button", {
|
|
104
104
|
type: "button",
|
|
105
105
|
onClick: () => q(!K),
|
|
106
|
-
className:
|
|
106
|
+
className: a("inline-flex items-center gap-2 px-4 py-2.5 rounded-lg border text-sm font-medium transition-all", K || Q ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-accent"),
|
|
107
107
|
children: [/* @__PURE__ */ C(m, { size: 16 }), K ? k("integrations.connections.filters.hide", "Hide") : k("integrations.connections.filters.show", "Filter")]
|
|
108
108
|
}),
|
|
109
109
|
/* @__PURE__ */ w("div", {
|
|
@@ -112,13 +112,13 @@ function E() {
|
|
|
112
112
|
children: [/* @__PURE__ */ C("button", {
|
|
113
113
|
type: "button",
|
|
114
114
|
onClick: () => j("grid"),
|
|
115
|
-
className:
|
|
115
|
+
className: a("p-2.5 transition-colors", A === "grid" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
116
116
|
"aria-label": k("integrations.connections.view.gridAriaLabel", "Grid view"),
|
|
117
117
|
children: /* @__PURE__ */ C(h, { size: 16 })
|
|
118
118
|
}), /* @__PURE__ */ C("button", {
|
|
119
119
|
type: "button",
|
|
120
120
|
onClick: () => j("list"),
|
|
121
|
-
className:
|
|
121
|
+
className: a("p-2.5 transition-colors", A === "list" ? "bg-action-primary-bg text-action-primary-text" : "hover:bg-accent"),
|
|
122
122
|
"aria-label": k("integrations.connections.view.listAriaLabel", "List view"),
|
|
123
123
|
children: /* @__PURE__ */ C(_, { size: 16 })
|
|
124
124
|
})]
|
|
@@ -218,7 +218,7 @@ function E() {
|
|
|
218
218
|
})]
|
|
219
219
|
}),
|
|
220
220
|
(R || H) && /* @__PURE__ */ C("div", {
|
|
221
|
-
className:
|
|
221
|
+
className: a(A === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
222
222
|
children: [...[
|
|
223
223
|
,
|
|
224
224
|
,
|
|
@@ -268,7 +268,7 @@ function E() {
|
|
|
268
268
|
]
|
|
269
269
|
})]
|
|
270
270
|
}), Z.length > 0 ? /* @__PURE__ */ C("div", {
|
|
271
|
-
className:
|
|
271
|
+
className: a("p-5", A === "grid" ? "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" : "space-y-3"),
|
|
272
272
|
children: Z.map((e) => /* @__PURE__ */ C(te, {
|
|
273
273
|
connection: e,
|
|
274
274
|
displayMode: A,
|
|
@@ -296,7 +296,7 @@ function E() {
|
|
|
296
296
|
}) : void 0
|
|
297
297
|
})]
|
|
298
298
|
}),
|
|
299
|
-
/* @__PURE__ */ C(
|
|
299
|
+
/* @__PURE__ */ C(r, {
|
|
300
300
|
open: P,
|
|
301
301
|
onClose: I,
|
|
302
302
|
onConnectionCreated: () => {
|