@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,386 @@
|
|
|
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 { useIntegrationsStore as r } from "../store/integrationsStore.js";
|
|
5
|
+
import { joinPath as i } from "../utils/navigation.js";
|
|
6
|
+
import { getAuthTypeLabel as a, getCategoryLabel as o } from "../utils/integrationsHelpers.js";
|
|
7
|
+
import { useDisableProvider as s, useEnableProvider as c, useProvider as l, useUninstallPlugin as u } from "../hooks/useProviders.js";
|
|
8
|
+
import { useConnectionsByProvider as ee } from "../hooks/useConnections.js";
|
|
9
|
+
import { ProviderIcon as te } from "../components/ProviderIcon.js";
|
|
10
|
+
import { AddConnectionDialog as ne } from "../components/AddConnectionDialog.js";
|
|
11
|
+
import { ConnectionCard as d } from "../components/ConnectionCard.js";
|
|
12
|
+
import { ConfirmDialog as f } from "../components/ConfirmDialog.js";
|
|
13
|
+
import { useState as re } from "react";
|
|
14
|
+
import { AlertCircle as p, ArrowLeft as m, BookOpen as h, Download as g, ExternalLink as _, Link2 as v, Loader2 as y, Package as b, Pencil as x, Plus as S, Power as ie, RefreshCw as ae, Shield as oe, Star as se, Trash2 as C } from "lucide-react";
|
|
15
|
+
import { useParams as w } from "react-router-dom";
|
|
16
|
+
import { usePermissions as T } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
17
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
18
|
+
//#region src/integrations/pages/ProviderDetail.tsx
|
|
19
|
+
function O() {
|
|
20
|
+
let { providerId: O } = w(), { adminMode: k = !1, basePath: A = "/", navigate: j, onConnectionSelect: M } = e(), { addConnectionDialogOpen: N, addConnectionProviderId: P, openAddConnectionDialog: F, closeAddConnectionDialog: I } = r(), { provider: L, loading: ce, error: R, refetch: z } = l(O ?? ""), { connections: B, loading: V } = ee(O ?? ""), { enableProvider: H, loading: U } = c(), { disableProvider: W, loading: G } = s(), { uninstallPlugin: le, loading: K } = u(), { hasPermission: q, isLoading: J } = T(), [ue, Y] = re(!1), X = !J && q(n.CONNECTION_CREATE), de = k && !J && q(n.PROVIDER_CREATE), Z = k && !J && q(n.PROVIDER_UPDATE), fe = k && !J && q(n.PROVIDER_DELETE), pe = ce, Q = U || G || K;
|
|
21
|
+
if (pe) return /* @__PURE__ */ D("div", {
|
|
22
|
+
className: "flex flex-col items-center justify-center py-20",
|
|
23
|
+
children: [/* @__PURE__ */ D("div", {
|
|
24
|
+
className: "relative",
|
|
25
|
+
children: [/* @__PURE__ */ E("div", { className: "absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ E(y, {
|
|
26
|
+
size: 48,
|
|
27
|
+
className: "relative animate-spin text-primary"
|
|
28
|
+
})]
|
|
29
|
+
}), /* @__PURE__ */ E("span", {
|
|
30
|
+
className: "mt-6 text-sm font-medium text-muted-foreground",
|
|
31
|
+
children: "Loading provider details..."
|
|
32
|
+
})]
|
|
33
|
+
});
|
|
34
|
+
if (R || !L) return /* @__PURE__ */ E("div", {
|
|
35
|
+
className: "p-6 max-w-4xl mx-auto",
|
|
36
|
+
children: /* @__PURE__ */ D("div", {
|
|
37
|
+
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
|
|
38
|
+
children: [/* @__PURE__ */ E(p, {
|
|
39
|
+
size: 24,
|
|
40
|
+
className: "text-status-error-text flex-shrink-0"
|
|
41
|
+
}), /* @__PURE__ */ D("div", {
|
|
42
|
+
className: "flex-1",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ E("h3", {
|
|
45
|
+
className: "font-semibold text-status-error-text mb-1",
|
|
46
|
+
children: "Provider not found"
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ E("p", {
|
|
49
|
+
className: "text-sm text-status-error-text mb-3",
|
|
50
|
+
children: R?.message || "The requested provider could not be loaded."
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ D("div", {
|
|
53
|
+
className: "flex gap-2",
|
|
54
|
+
children: [/* @__PURE__ */ D("button", {
|
|
55
|
+
onClick: () => z(),
|
|
56
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors",
|
|
57
|
+
children: [/* @__PURE__ */ E(ae, { size: 14 }), "Try Again"]
|
|
58
|
+
}), /* @__PURE__ */ D("button", {
|
|
59
|
+
onClick: () => j?.(i(A, "providers")),
|
|
60
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
61
|
+
children: [/* @__PURE__ */ E(m, { size: 14 }), "Back to Catalog"]
|
|
62
|
+
})]
|
|
63
|
+
})
|
|
64
|
+
]
|
|
65
|
+
})]
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
let $ = () => {
|
|
69
|
+
F(L.id);
|
|
70
|
+
}, me = (e) => {
|
|
71
|
+
M?.(e), j?.(i(A, `connections/${e.id}`));
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ D("div", {
|
|
74
|
+
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ D("div", {
|
|
77
|
+
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",
|
|
78
|
+
children: [/* @__PURE__ */ E("div", {
|
|
79
|
+
className: "relative z-10",
|
|
80
|
+
children: /* @__PURE__ */ D("div", {
|
|
81
|
+
className: "flex items-center gap-4 mb-4",
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ E("button", {
|
|
84
|
+
onClick: () => j?.(i(A, "providers")),
|
|
85
|
+
className: "p-2.5 hover:bg-accent rounded-lg transition-all duration-200",
|
|
86
|
+
"aria-label": "Back to catalog",
|
|
87
|
+
children: /* @__PURE__ */ E(m, { size: 20 })
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ E(te, {
|
|
90
|
+
provider: L,
|
|
91
|
+
size: 56
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ D("div", {
|
|
94
|
+
className: "flex-1",
|
|
95
|
+
children: [/* @__PURE__ */ D("div", {
|
|
96
|
+
className: "flex items-center gap-3",
|
|
97
|
+
children: [/* @__PURE__ */ E("h1", {
|
|
98
|
+
className: "text-2xl sm:text-3xl font-bold text-foreground",
|
|
99
|
+
children: L.name
|
|
100
|
+
}), L.isBuiltIn && /* @__PURE__ */ E("span", {
|
|
101
|
+
className: "text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default",
|
|
102
|
+
children: "Built-in"
|
|
103
|
+
})]
|
|
104
|
+
}), /* @__PURE__ */ E("p", {
|
|
105
|
+
className: "text-sm text-muted-foreground mt-1",
|
|
106
|
+
children: L.description
|
|
107
|
+
})]
|
|
108
|
+
}),
|
|
109
|
+
X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
|
|
110
|
+
onClick: $,
|
|
111
|
+
className: "inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
112
|
+
children: [/* @__PURE__ */ E(S, { size: 16 }), "Create Connection"]
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
}), /* @__PURE__ */ E("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" })]
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ D("div", {
|
|
119
|
+
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
120
|
+
children: [/* @__PURE__ */ D("div", {
|
|
121
|
+
className: "rounded-xl border border-border/50 bg-card p-5 space-y-4",
|
|
122
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
123
|
+
className: "font-semibold text-foreground flex items-center gap-2",
|
|
124
|
+
children: [/* @__PURE__ */ E(b, {
|
|
125
|
+
size: 18,
|
|
126
|
+
className: "text-primary"
|
|
127
|
+
}), "Provider Details"]
|
|
128
|
+
}), /* @__PURE__ */ D("div", {
|
|
129
|
+
className: "space-y-3",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ D("div", {
|
|
132
|
+
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
133
|
+
children: [/* @__PURE__ */ E("span", {
|
|
134
|
+
className: "text-sm text-muted-foreground",
|
|
135
|
+
children: "Category"
|
|
136
|
+
}), /* @__PURE__ */ E("span", {
|
|
137
|
+
className: "text-sm font-medium text-foreground",
|
|
138
|
+
children: o(L.category)
|
|
139
|
+
})]
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ D("div", {
|
|
142
|
+
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
143
|
+
children: [/* @__PURE__ */ E("span", {
|
|
144
|
+
className: "text-sm text-muted-foreground",
|
|
145
|
+
children: "Auth Type"
|
|
146
|
+
}), /* @__PURE__ */ E("span", {
|
|
147
|
+
className: "text-sm font-medium text-foreground",
|
|
148
|
+
children: a(L.authType)
|
|
149
|
+
})]
|
|
150
|
+
}),
|
|
151
|
+
/* @__PURE__ */ D("div", {
|
|
152
|
+
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
153
|
+
children: [/* @__PURE__ */ E("span", {
|
|
154
|
+
className: "text-sm text-muted-foreground",
|
|
155
|
+
children: "Plugin Version"
|
|
156
|
+
}), /* @__PURE__ */ E("span", {
|
|
157
|
+
className: "text-sm font-mono text-foreground",
|
|
158
|
+
children: L.pluginVersion
|
|
159
|
+
})]
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ D("div", {
|
|
162
|
+
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
163
|
+
children: [/* @__PURE__ */ E("span", {
|
|
164
|
+
className: "text-sm text-muted-foreground",
|
|
165
|
+
children: "Author"
|
|
166
|
+
}), /* @__PURE__ */ E("span", {
|
|
167
|
+
className: "text-sm font-medium text-foreground",
|
|
168
|
+
children: L.pluginAuthor || "-"
|
|
169
|
+
})]
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ D("div", {
|
|
172
|
+
className: "flex items-center justify-between py-2 border-b border-border/50",
|
|
173
|
+
children: [/* @__PURE__ */ E("span", {
|
|
174
|
+
className: "text-sm text-muted-foreground",
|
|
175
|
+
children: "Connections"
|
|
176
|
+
}), /* @__PURE__ */ E("span", {
|
|
177
|
+
className: "text-sm font-medium text-foreground",
|
|
178
|
+
children: L.connectionCount
|
|
179
|
+
})]
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ D("div", {
|
|
182
|
+
className: "flex items-center justify-between py-2",
|
|
183
|
+
children: [/* @__PURE__ */ E("span", {
|
|
184
|
+
className: "text-sm text-muted-foreground",
|
|
185
|
+
children: "Status"
|
|
186
|
+
}), /* @__PURE__ */ E("span", {
|
|
187
|
+
className: t("text-sm font-medium px-2 py-0.5 rounded-full", L.isEnabled ? "text-status-success-text bg-status-success-bg-subtle" : "text-text-secondary bg-bg-sunken"),
|
|
188
|
+
children: L.isEnabled ? "Enabled" : "Disabled"
|
|
189
|
+
})]
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
})]
|
|
193
|
+
}), /* @__PURE__ */ D("div", {
|
|
194
|
+
className: "space-y-4",
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ D("div", {
|
|
197
|
+
className: "rounded-xl border border-border/50 bg-card p-5",
|
|
198
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
199
|
+
className: "font-semibold text-foreground flex items-center gap-2 mb-3",
|
|
200
|
+
children: [/* @__PURE__ */ E(se, {
|
|
201
|
+
size: 18,
|
|
202
|
+
className: "text-primary"
|
|
203
|
+
}), "Supported Features"]
|
|
204
|
+
}), L.supportedFeatures.length > 0 ? /* @__PURE__ */ E("div", {
|
|
205
|
+
className: "flex flex-wrap gap-2",
|
|
206
|
+
children: L.supportedFeatures.map((e) => /* @__PURE__ */ E("span", {
|
|
207
|
+
className: "text-xs px-2.5 py-1 rounded-full bg-muted text-muted-foreground",
|
|
208
|
+
children: e
|
|
209
|
+
}, e))
|
|
210
|
+
}) : /* @__PURE__ */ E("p", {
|
|
211
|
+
className: "text-sm text-muted-foreground",
|
|
212
|
+
children: "No specific features listed."
|
|
213
|
+
})]
|
|
214
|
+
}),
|
|
215
|
+
/* @__PURE__ */ D("div", {
|
|
216
|
+
className: "rounded-xl border border-border/50 bg-card p-5",
|
|
217
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
218
|
+
className: "font-semibold text-foreground flex items-center gap-2 mb-3",
|
|
219
|
+
children: [/* @__PURE__ */ E(_, {
|
|
220
|
+
size: 18,
|
|
221
|
+
className: "text-primary"
|
|
222
|
+
}), "Links"]
|
|
223
|
+
}), /* @__PURE__ */ D("div", {
|
|
224
|
+
className: "space-y-2",
|
|
225
|
+
children: [L.website && /* @__PURE__ */ D("a", {
|
|
226
|
+
href: L.website,
|
|
227
|
+
target: "_blank",
|
|
228
|
+
rel: "noopener noreferrer",
|
|
229
|
+
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
230
|
+
children: [/* @__PURE__ */ E(_, { size: 14 }), "Website"]
|
|
231
|
+
}), L.docsUrl && /* @__PURE__ */ D("a", {
|
|
232
|
+
href: L.docsUrl,
|
|
233
|
+
target: "_blank",
|
|
234
|
+
rel: "noopener noreferrer",
|
|
235
|
+
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
236
|
+
children: [/* @__PURE__ */ E(h, { size: 14 }), "Documentation"]
|
|
237
|
+
})]
|
|
238
|
+
})]
|
|
239
|
+
}),
|
|
240
|
+
k && /* @__PURE__ */ D("div", {
|
|
241
|
+
className: "rounded-xl border border-border/50 bg-card p-5",
|
|
242
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
243
|
+
className: "font-semibold text-foreground flex items-center gap-2 mb-3",
|
|
244
|
+
children: [/* @__PURE__ */ E(oe, {
|
|
245
|
+
size: 18,
|
|
246
|
+
className: "text-primary"
|
|
247
|
+
}), "Plugin Management"]
|
|
248
|
+
}), /* @__PURE__ */ D("div", {
|
|
249
|
+
className: "flex flex-wrap gap-2",
|
|
250
|
+
children: [
|
|
251
|
+
Z && /* @__PURE__ */ D("button", {
|
|
252
|
+
onClick: () => {
|
|
253
|
+
j?.(i(A, `providers/${L.id}/edit`));
|
|
254
|
+
},
|
|
255
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors",
|
|
256
|
+
children: [/* @__PURE__ */ E(x, { size: 14 }), "Edit"]
|
|
257
|
+
}),
|
|
258
|
+
Z && L.pluginStatus === "installed" && /* @__PURE__ */ D("button", {
|
|
259
|
+
onClick: async () => {
|
|
260
|
+
L && (L.isEnabled ? await W(L.id) : await H(L.id), await z());
|
|
261
|
+
},
|
|
262
|
+
disabled: Q,
|
|
263
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50",
|
|
264
|
+
children: [/* @__PURE__ */ E(ie, { size: 14 }), L.isEnabled ? "Disable" : "Enable"]
|
|
265
|
+
}),
|
|
266
|
+
de && L.pluginStatus === "available" && /* @__PURE__ */ D("button", {
|
|
267
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
268
|
+
children: [/* @__PURE__ */ E(g, { size: 14 }), "Install Plugin"]
|
|
269
|
+
}),
|
|
270
|
+
fe && L.pluginStatus === "installed" && /* @__PURE__ */ D("button", {
|
|
271
|
+
onClick: async () => {
|
|
272
|
+
L && Y(!0);
|
|
273
|
+
},
|
|
274
|
+
disabled: Q || L.isBuiltIn,
|
|
275
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
|
|
276
|
+
children: [/* @__PURE__ */ E(C, { size: 14 }), "Uninstall"]
|
|
277
|
+
}),
|
|
278
|
+
Z && L.pluginStatus === "update_available" && /* @__PURE__ */ D("button", {
|
|
279
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors",
|
|
280
|
+
children: [/* @__PURE__ */ E(g, { size: 14 }), "Update Available"]
|
|
281
|
+
})
|
|
282
|
+
]
|
|
283
|
+
})]
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
})]
|
|
287
|
+
}),
|
|
288
|
+
/* @__PURE__ */ D("div", {
|
|
289
|
+
className: "rounded-xl border border-border/50 bg-card overflow-hidden",
|
|
290
|
+
children: [
|
|
291
|
+
/* @__PURE__ */ D("div", {
|
|
292
|
+
className: "flex items-center justify-between p-5 border-b border-border/50",
|
|
293
|
+
children: [/* @__PURE__ */ D("div", {
|
|
294
|
+
className: "flex items-center gap-2",
|
|
295
|
+
children: [/* @__PURE__ */ E(v, {
|
|
296
|
+
size: 18,
|
|
297
|
+
className: "text-primary"
|
|
298
|
+
}), /* @__PURE__ */ D("h2", {
|
|
299
|
+
className: "font-semibold text-foreground",
|
|
300
|
+
children: [
|
|
301
|
+
"Connections (",
|
|
302
|
+
(B ?? []).length,
|
|
303
|
+
")"
|
|
304
|
+
]
|
|
305
|
+
})]
|
|
306
|
+
}), X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
|
|
307
|
+
onClick: $,
|
|
308
|
+
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
309
|
+
children: [/* @__PURE__ */ E(S, { size: 14 }), "Add"]
|
|
310
|
+
})]
|
|
311
|
+
}),
|
|
312
|
+
V && /* @__PURE__ */ E("div", {
|
|
313
|
+
className: "flex items-center justify-center py-12",
|
|
314
|
+
children: /* @__PURE__ */ E(y, {
|
|
315
|
+
size: 24,
|
|
316
|
+
className: "animate-spin text-muted-foreground"
|
|
317
|
+
})
|
|
318
|
+
}),
|
|
319
|
+
!V && (B ?? []).length === 0 && /* @__PURE__ */ D("div", {
|
|
320
|
+
className: "flex flex-col items-center justify-center py-12 px-6 text-center",
|
|
321
|
+
children: [
|
|
322
|
+
/* @__PURE__ */ E("div", {
|
|
323
|
+
className: "p-4 rounded-full bg-muted/50 mb-4",
|
|
324
|
+
children: /* @__PURE__ */ E(v, {
|
|
325
|
+
size: 32,
|
|
326
|
+
className: "text-muted-foreground"
|
|
327
|
+
})
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ E("h3", {
|
|
330
|
+
className: "font-semibold text-foreground mb-1",
|
|
331
|
+
children: "No connections yet"
|
|
332
|
+
}),
|
|
333
|
+
/* @__PURE__ */ D("p", {
|
|
334
|
+
className: "text-sm text-muted-foreground mb-4 max-w-sm",
|
|
335
|
+
children: [
|
|
336
|
+
"Create a connection to start using ",
|
|
337
|
+
L.name,
|
|
338
|
+
" in your workspace."
|
|
339
|
+
]
|
|
340
|
+
}),
|
|
341
|
+
X && L.pluginStatus === "installed" && L.isEnabled && /* @__PURE__ */ D("button", {
|
|
342
|
+
onClick: $,
|
|
343
|
+
className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
344
|
+
children: [/* @__PURE__ */ E(S, { size: 16 }), "Create Connection"]
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
}),
|
|
348
|
+
!V && (B ?? []).length > 0 && /* @__PURE__ */ E("div", {
|
|
349
|
+
className: "p-4 space-y-3",
|
|
350
|
+
children: (B ?? []).map((e) => /* @__PURE__ */ E(d, {
|
|
351
|
+
connection: e,
|
|
352
|
+
displayMode: "list",
|
|
353
|
+
onClick: me
|
|
354
|
+
}, e.id))
|
|
355
|
+
})
|
|
356
|
+
]
|
|
357
|
+
}),
|
|
358
|
+
/* @__PURE__ */ E(ne, {
|
|
359
|
+
open: N,
|
|
360
|
+
onClose: I,
|
|
361
|
+
preselectedProviderId: P,
|
|
362
|
+
onConnectionCreated: () => {
|
|
363
|
+
z();
|
|
364
|
+
}
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ E(f, {
|
|
367
|
+
open: ue,
|
|
368
|
+
title: `Uninstall ${L.name}`,
|
|
369
|
+
description: "Existing active connections must be removed first. This action is only available in admin mode.",
|
|
370
|
+
confirmLabel: "Uninstall",
|
|
371
|
+
cancelLabel: "Cancel",
|
|
372
|
+
destructive: !0,
|
|
373
|
+
loading: K,
|
|
374
|
+
icon: /* @__PURE__ */ E(C, { size: 20 }),
|
|
375
|
+
onConfirm: async () => {
|
|
376
|
+
L && (await le(L.id), Y(!1), j?.(i(A, "providers")));
|
|
377
|
+
},
|
|
378
|
+
onCancel: () => Y(!1)
|
|
379
|
+
})
|
|
380
|
+
]
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
//#endregion
|
|
384
|
+
export { O as ProviderDetail };
|
|
385
|
+
|
|
386
|
+
//# sourceMappingURL=ProviderDetail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderDetail.js","names":[],"sources":["../../../src/integrations/pages/ProviderDetail.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n ExternalLink,\n BookOpen,\n Plus,\n Link2,\n Loader2,\n AlertCircle,\n RefreshCw,\n Shield,\n Package,\n Star,\n Download,\n Trash2,\n Pencil,\n Power,\n} from 'lucide-react';\nimport { cn } from '../utils/cn';\nimport { usePermissions } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { useIntegrations } from '../providers/IntegrationsProvider';\nimport { INTEGRATION_PERMISSIONS } from '../constants/permissions';\nimport { useIntegrationsStore } from '../store/integrationsStore';\nimport { joinPath } from '../utils/navigation';\nimport { getAuthTypeLabel, getCategoryLabel } from '../utils/integrationsHelpers';\nimport {\n useDisableProvider,\n useEnableProvider,\n useProvider,\n useUninstallPlugin,\n} from '../hooks/useProviders';\nimport { useConnectionsByProvider } from '../hooks/useConnections';\nimport { ProviderIcon } from '../components/ProviderIcon';\nimport { ConnectionCard } from '../components/ConnectionCard';\nimport { AddConnectionDialog } from '../components/AddConnectionDialog';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport type { IntegrationConnection } from '../types';\n\n/**\n * Provider Detail — Single provider view with info, connections, and actions.\n */\nexport function ProviderDetail() {\n const { providerId } = useParams<{ providerId: string }>();\n const { adminMode = false, basePath = '/', navigate, onConnectionSelect } = useIntegrations();\n const {\n addConnectionDialogOpen,\n addConnectionProviderId,\n openAddConnectionDialog,\n closeAddConnectionDialog,\n } = useIntegrationsStore();\n\n const {\n provider,\n loading: providerLoading,\n error: providerError,\n refetch,\n } = useProvider(providerId ?? '');\n const { connections, loading: connectionsLoading } = useConnectionsByProvider(providerId ?? '');\n const { enableProvider, loading: enabling } = useEnableProvider();\n const { disableProvider, loading: disabling } = useDisableProvider();\n const { uninstallPlugin, loading: uninstalling } = useUninstallPlugin();\n const { hasPermission, isLoading: permissionsLoading } = usePermissions();\n const [uninstallDialogOpen, setUninstallDialogOpen] = useState(false);\n const canCreateConnection =\n !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.CONNECTION_CREATE);\n const canCreateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_CREATE);\n const canUpdateProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_UPDATE);\n const canDeleteProvider =\n adminMode && !permissionsLoading && hasPermission(INTEGRATION_PERMISSIONS.PROVIDER_DELETE);\n\n const loading = providerLoading;\n const providerActionLoading = enabling || disabling || uninstalling;\n\n if (loading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-primary/20 rounded-full blur-xl animate-pulse\" />\n <Loader2 size={48} className=\"relative animate-spin text-primary\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n Loading provider details...\n </span>\n </div>\n );\n }\n\n if (providerError || !provider) {\n return (\n <div className=\"p-6 max-w-4xl mx-auto\">\n <div className=\"rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4\">\n <AlertCircle size={24} className=\"text-status-error-text flex-shrink-0\" />\n <div className=\"flex-1\">\n <h3 className=\"font-semibold text-status-error-text mb-1\">Provider not found</h3>\n <p className=\"text-sm text-status-error-text mb-3\">\n {providerError?.message || 'The requested provider could not be loaded.'}\n </p>\n <div className=\"flex gap-2\">\n <button\n onClick={() => refetch()}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-error-bg-subtle text-status-error-text hover:bg-status-error-bg-subtle/80 transition-colors\"\n >\n <RefreshCw size={14} />\n Try Again\n </button>\n <button\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <ArrowLeft size={14} />\n Back to Catalog\n </button>\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n const handleCreateConnection = () => {\n openAddConnectionDialog(provider.id);\n };\n\n const handleConnectionClick = (connection: IntegrationConnection) => {\n onConnectionSelect?.(connection);\n navigate?.(joinPath(basePath, `connections/${connection.id}`));\n };\n\n const handleToggleEnabled = async () => {\n if (!provider) return;\n if (provider.isEnabled) {\n await disableProvider(provider.id);\n } else {\n await enableProvider(provider.id);\n }\n await refetch();\n };\n\n const handleUninstall = async () => {\n if (!provider) return;\n setUninstallDialogOpen(true);\n };\n\n const confirmUninstall = async () => {\n if (!provider) return;\n await uninstallPlugin(provider.id);\n setUninstallDialogOpen(false);\n navigate?.(joinPath(basePath, 'providers'));\n };\n\n const handleEditProvider = () => {\n navigate?.(joinPath(basePath, `providers/${provider.id}/edit`));\n };\n\n return (\n <div className=\"space-y-6 p-6 max-w-5xl 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\">\n <div className=\"flex items-center gap-4 mb-4\">\n <button\n onClick={() => navigate?.(joinPath(basePath, 'providers'))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n aria-label=\"Back to catalog\"\n >\n <ArrowLeft size={20} />\n </button>\n <ProviderIcon provider={provider} size={56} />\n <div className=\"flex-1\">\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl sm:text-3xl font-bold text-foreground\">{provider.name}</h1>\n {provider.isBuiltIn && (\n <span className=\"text-xs px-2 py-0.5 rounded-full bg-status-info-bg-subtle text-status-info-text border border-border-default\">\n Built-in\n </span>\n )}\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{provider.description}</p>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\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 {/* Info Cards */}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {/* Provider Details */}\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 <Package size={18} className=\"text-primary\" />\n Provider Details\n </h2>\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Category</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getCategoryLabel(provider.category)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Auth Type</span>\n <span className=\"text-sm font-medium text-foreground\">\n {getAuthTypeLabel(provider.authType)}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Plugin Version</span>\n <span className=\"text-sm font-mono text-foreground\">{provider.pluginVersion}</span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Author</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.pluginAuthor || '-'}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2 border-b border-border/50\">\n <span className=\"text-sm text-muted-foreground\">Connections</span>\n <span className=\"text-sm font-medium text-foreground\">\n {provider.connectionCount}\n </span>\n </div>\n <div className=\"flex items-center justify-between py-2\">\n <span className=\"text-sm text-muted-foreground\">Status</span>\n <span\n className={cn(\n 'text-sm font-medium px-2 py-0.5 rounded-full',\n provider.isEnabled\n ? 'text-status-success-text bg-status-success-bg-subtle'\n : 'text-text-secondary bg-bg-sunken'\n )}\n >\n {provider.isEnabled ? 'Enabled' : 'Disabled'}\n </span>\n </div>\n </div>\n </div>\n\n {/* Features & Links */}\n <div className=\"space-y-4\">\n {/* Supported Features */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Star size={18} className=\"text-primary\" />\n Supported Features\n </h2>\n {provider.supportedFeatures.length > 0 ? (\n <div className=\"flex flex-wrap gap-2\">\n {provider.supportedFeatures.map((feature) => (\n <span\n key={feature}\n className=\"text-xs px-2.5 py-1 rounded-full bg-muted text-muted-foreground\"\n >\n {feature}\n </span>\n ))}\n </div>\n ) : (\n <p className=\"text-sm text-muted-foreground\">No specific features listed.</p>\n )}\n </div>\n\n {/* Links */}\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <ExternalLink size={18} className=\"text-primary\" />\n Links\n </h2>\n <div className=\"space-y-2\">\n {provider.website && (\n <a\n href={provider.website}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <ExternalLink size={14} />\n Website\n </a>\n )}\n {provider.docsUrl && (\n <a\n href={provider.docsUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-2 text-sm text-primary hover:underline\"\n >\n <BookOpen size={14} />\n Documentation\n </a>\n )}\n </div>\n </div>\n\n {/* Plugin Actions */}\n {adminMode && (\n <div className=\"rounded-xl border border-border/50 bg-card p-5\">\n <h2 className=\"font-semibold text-foreground flex items-center gap-2 mb-3\">\n <Shield size={18} className=\"text-primary\" />\n Plugin Management\n </h2>\n <div className=\"flex flex-wrap gap-2\">\n {canUpdateProvider && (\n <button\n onClick={handleEditProvider}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors\"\n >\n <Pencil size={14} />\n Edit\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'installed' && (\n <button\n onClick={handleToggleEnabled}\n disabled={providerActionLoading}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border hover:bg-accent transition-colors disabled:opacity-50\"\n >\n <Power size={14} />\n {provider.isEnabled ? 'Disable' : 'Enable'}\n </button>\n )}\n {canCreateProvider && provider.pluginStatus === 'available' && (\n <button className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\">\n <Download size={14} />\n Install Plugin\n </button>\n )}\n {canDeleteProvider && provider.pluginStatus === 'installed' && (\n <button\n onClick={handleUninstall}\n disabled={providerActionLoading || provider.isBuiltIn}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-error-text hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n <Trash2 size={14} />\n Uninstall\n </button>\n )}\n {canUpdateProvider && provider.pluginStatus === 'update_available' && (\n <button className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-status-warning-bg-subtle text-status-warning-text border border-border-default hover:bg-status-warning-bg-subtle/80 transition-colors\">\n <Download size={14} />\n Update Available\n </button>\n )}\n </div>\n </div>\n )}\n </div>\n </div>\n\n {/* Connections for this provider */}\n <div className=\"rounded-xl border border-border/50 bg-card overflow-hidden\">\n <div className=\"flex items-center justify-between p-5 border-b border-border/50\">\n <div className=\"flex items-center gap-2\">\n <Link2 size={18} className=\"text-primary\" />\n <h2 className=\"font-semibold text-foreground\">\n Connections ({(connections ?? []).length})\n </h2>\n </div>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={14} />\n Add\n </button>\n )}\n </div>\n\n {connectionsLoading && (\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 size={24} className=\"animate-spin text-muted-foreground\" />\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length === 0 && (\n <div className=\"flex flex-col items-center justify-center py-12 px-6 text-center\">\n <div className=\"p-4 rounded-full bg-muted/50 mb-4\">\n <Link2 size={32} className=\"text-muted-foreground\" />\n </div>\n <h3 className=\"font-semibold text-foreground mb-1\">No connections yet</h3>\n <p className=\"text-sm text-muted-foreground mb-4 max-w-sm\">\n Create a connection to start using {provider.name} in your workspace.\n </p>\n {canCreateConnection && provider.pluginStatus === 'installed' && provider.isEnabled && (\n <button\n onClick={handleCreateConnection}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-lg bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <Plus size={16} />\n Create Connection\n </button>\n )}\n </div>\n )}\n\n {!connectionsLoading && (connections ?? []).length > 0 && (\n <div className=\"p-4 space-y-3\">\n {(connections ?? []).map((conn: IntegrationConnection) => (\n <ConnectionCard\n key={conn.id}\n connection={conn}\n displayMode=\"list\"\n onClick={handleConnectionClick}\n />\n ))}\n </div>\n )}\n </div>\n\n {/* Add Connection Dialog */}\n <AddConnectionDialog\n open={addConnectionDialogOpen}\n onClose={closeAddConnectionDialog}\n preselectedProviderId={addConnectionProviderId}\n onConnectionCreated={() => {\n refetch();\n }}\n />\n <ConfirmDialog\n open={uninstallDialogOpen}\n title={`Uninstall ${provider.name}`}\n description=\"Existing active connections must be removed first. This action is only available in admin mode.\"\n confirmLabel=\"Uninstall\"\n cancelLabel=\"Cancel\"\n destructive\n loading={uninstalling}\n icon={<Trash2 size={20} />}\n onConfirm={confirmUninstall}\n onCancel={() => setUninstallDialogOpen(false)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,SAAgB,IAAiB;CAC/B,IAAM,EAAE,kBAAe,GAAmC,EACpD,EAAE,eAAY,IAAO,cAAW,KAAK,aAAU,0BAAuB,GAAiB,EACvF,EACJ,4BACA,4BACA,4BACA,gCACE,GAAsB,EAEpB,EACJ,aACA,SAAS,IACT,OAAO,GACP,eACE,EAAY,KAAc,GAAG,EAC3B,EAAE,gBAAa,SAAS,MAAuB,GAAyB,KAAc,GAAG,EACzF,EAAE,mBAAgB,SAAS,MAAa,GAAmB,EAC3D,EAAE,oBAAiB,SAAS,MAAc,GAAoB,EAC9D,EAAE,qBAAiB,SAAS,MAAiB,GAAoB,EACjE,EAAE,kBAAe,WAAW,MAAuB,GAAgB,EACnE,CAAC,IAAqB,KAA0B,GAAS,GAAM,EAC/D,IACJ,CAAC,KAAsB,EAAc,EAAwB,kBAAkB,EAC3E,KACJ,KAAa,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EACtF,IACJ,KAAa,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EACtF,KACJ,KAAa,CAAC,KAAsB,EAAc,EAAwB,gBAAgB,EAEtF,KAAU,IACV,IAAwB,KAAY,KAAa;AAEvD,KAAI,GACF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAK,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BAAuB;IACvB,2BAA2B;AACzB,QAAS;;IAEX,CAAA;GACF,kBAAC,GAAD;IACE,MAAM;IACN,OAAO,aAAa,EAAS;IAC7B,aAAY;IACZ,cAAa;IACb,aAAY;IACZ,aAAA;IACA,SAAS;IACT,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;IAC1B,WArSmB,YAAY;AAC9B,WACL,MAAM,GAAgB,EAAS,GAAG,EAClC,EAAuB,GAAM,EAC7B,IAAW,EAAS,GAAU,YAAY,CAAC;;IAkSvC,gBAAgB,EAAuB,GAAM;IAC7C,CAAA;GACE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProviderEditorPage.d.ts","sourceRoot":"","sources":["../../../src/integrations/pages/ProviderEditorPage.tsx"],"names":[],"mappings":"AAqEA,wBAAgB,kBAAkB,4CAmYjC"}
|