@burdenoff/microfe-integrations 2026.624.2 → 2026.624.4
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/components/AddConnectionDialog.js +2 -2
- package/dist/integrations/components/AddConnectionDialog.js.map +1 -1
- package/dist/integrations/components/ConfirmDialog.js +30 -43
- package/dist/integrations/components/ConfirmDialog.js.map +1 -1
- package/dist/integrations/pages/ConnectionDetail.js +223 -229
- package/dist/integrations/pages/ConnectionDetail.js.map +1 -1
- package/dist/integrations/pages/IntegrationsOverview.js +2 -2
- package/dist/integrations/pages/IntegrationsOverview.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,77 +2,78 @@ import { useIntegrations as e } from "../providers/IntegrationsProvider.js";
|
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { INTEGRATION_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
4
|
import { joinPath as r } from "../utils/navigation.js";
|
|
5
|
-
import { formatDate as i, formatLastUsed as
|
|
6
|
-
import { useConnection as
|
|
7
|
-
import { ProviderIcon as
|
|
8
|
-
import { ConnectionStatusBadge as
|
|
5
|
+
import { formatDate as i, formatLastUsed as ee, getAuthTypeLabel as te } from "../utils/integrationsHelpers.js";
|
|
6
|
+
import { useConnection as ne, useDeleteConnection as re, useRefreshToken as ie, useRevokeConnection as a, useTestConnection as o } from "../hooks/useConnections.js";
|
|
7
|
+
import { ProviderIcon as s } from "../components/ProviderIcon.js";
|
|
8
|
+
import { ConnectionStatusBadge as c } from "../components/ConnectionStatusBadge.js";
|
|
9
9
|
import { INTEGRATION_FEATURE_FLAGS as ae } from "../constants/featureFlags.js";
|
|
10
10
|
import { ConfirmDialog as oe } from "../components/ConfirmDialog.js";
|
|
11
11
|
import { nativeConfirm as se, nativeImpact as ce, nativeNotify as l } from "../../utils/nativeBridge.js";
|
|
12
12
|
import { useState as u } from "react";
|
|
13
|
-
import { Activity as
|
|
14
|
-
import { useParams as
|
|
15
|
-
import { useI18n as
|
|
16
|
-
import { jsx as
|
|
17
|
-
import { useFeatureFlag as
|
|
13
|
+
import { Activity as le, AlertCircle as ue, ArrowLeft as d, CheckCircle2 as f, Clock as de, Key as p, Loader2 as m, Mail as fe, RefreshCw as pe, RotateCcw as h, Shield as g, Trash2 as _, User as me, XCircle as v, Zap as he } from "lucide-react";
|
|
14
|
+
import { useParams as ge } from "react-router-dom";
|
|
15
|
+
import { useI18n as _e, usePermissions as ve } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
17
|
+
import { useFeatureFlag as ye } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
18
|
+
import { AlertDialog as be, AlertDialogAction as xe, AlertDialogCancel as x, AlertDialogContent as S, AlertDialogDescription as C, AlertDialogFooter as w, AlertDialogHeader as T, AlertDialogTitle as E } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
//#region src/integrations/pages/ConnectionDetail.tsx
|
|
19
|
-
function
|
|
20
|
-
let { connectionId:
|
|
21
|
-
let r =
|
|
20
|
+
function D() {
|
|
21
|
+
let { connectionId: D } = ge(), { basePath: O = "/", navigate: k } = e(), { t: A } = _e(), j = (e, t, n) => {
|
|
22
|
+
let r = A(e, n);
|
|
22
23
|
return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)).replace(`{${t}}`, String(n)), t) : t : r;
|
|
23
|
-
}, { connection:
|
|
24
|
-
|
|
24
|
+
}, { connection: M, loading: Se, error: N, refetch: P } = ne(D ?? ""), { testConnection: Ce, loading: F } = o(), { refreshToken: we, loading: I } = ie(), { revokeConnection: Te, loading: L } = a(), { deleteConnection: R, loading: z } = re(), Ee = ye(ae.OAUTH_REFRESH, !0), { hasPermission: B, isLoading: De } = ve(), V = B(n.CONNECTION_UPDATE), H = B(n.CONNECTION_DELETE), [U, Oe] = u(null), [W, G] = u(null), [ke, K] = u(!1), [q, J] = u(!1), [Ae, Y] = u(!1), X = (e, t) => {
|
|
25
|
+
G({
|
|
25
26
|
type: e,
|
|
26
27
|
message: t
|
|
27
|
-
}), setTimeout(() =>
|
|
28
|
+
}), setTimeout(() => G(null), 5e3);
|
|
28
29
|
};
|
|
29
|
-
if (
|
|
30
|
+
if (Se || De) return /* @__PURE__ */ b("div", {
|
|
30
31
|
className: "flex flex-col items-center justify-center py-20",
|
|
31
|
-
children: [/* @__PURE__ */
|
|
32
|
+
children: [/* @__PURE__ */ y(m, {
|
|
32
33
|
size: 48,
|
|
33
34
|
className: "animate-spin text-primary"
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ y("span", {
|
|
35
36
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
36
|
-
children:
|
|
37
|
+
children: j("integrations.connectionDetail.loading", "Loading connection details...")
|
|
37
38
|
})]
|
|
38
39
|
});
|
|
39
|
-
if (
|
|
40
|
+
if (N || !M) return /* @__PURE__ */ y("div", {
|
|
40
41
|
className: "p-6 max-w-4xl mx-auto",
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ b("div", {
|
|
42
43
|
className: "rounded-xl border border-border-default bg-status-error-bg-subtle p-6 flex items-start gap-4",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
+
children: [/* @__PURE__ */ y(ue, {
|
|
44
45
|
size: 24,
|
|
45
46
|
className: "text-status-error-text flex-shrink-0"
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
+
}), /* @__PURE__ */ b("div", {
|
|
47
48
|
className: "flex-1",
|
|
48
49
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ y("h3", {
|
|
50
51
|
className: "font-semibold text-status-error-text mb-1",
|
|
51
|
-
children:
|
|
52
|
+
children: j("integrations.connectionDetail.error.title", "Connection not found")
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ y("p", {
|
|
54
55
|
className: "text-sm text-status-error-text mb-3",
|
|
55
|
-
children:
|
|
56
|
+
children: N?.message || j("integrations.connectionDetail.error.description", "The requested connection could not be loaded.")
|
|
56
57
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ b("div", {
|
|
58
59
|
className: "flex gap-2",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ b("button", {
|
|
60
61
|
type: "button",
|
|
61
|
-
onClick: () =>
|
|
62
|
+
onClick: () => P(),
|
|
62
63
|
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",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ y(pe, { size: 14 }),
|
|
65
66
|
" ",
|
|
66
|
-
|
|
67
|
+
j("integrations.connectionDetail.error.retry", "Try Again")
|
|
67
68
|
]
|
|
68
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ b("button", {
|
|
69
70
|
type: "button",
|
|
70
|
-
onClick: () =>
|
|
71
|
+
onClick: () => k?.(r(O, "connections")),
|
|
71
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",
|
|
72
73
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ y(d, { size: 14 }),
|
|
74
75
|
" ",
|
|
75
|
-
|
|
76
|
+
j("integrations.connectionDetail.error.back", "Back to Connections")
|
|
76
77
|
]
|
|
77
78
|
})]
|
|
78
79
|
})
|
|
@@ -80,387 +81,380 @@ function C() {
|
|
|
80
81
|
})]
|
|
81
82
|
})
|
|
82
83
|
});
|
|
83
|
-
let
|
|
84
|
-
let e = await M
|
|
85
|
-
e && (
|
|
86
|
-
},
|
|
87
|
-
await
|
|
88
|
-
},
|
|
89
|
-
|
|
90
|
-
},
|
|
91
|
-
await
|
|
92
|
-
},
|
|
84
|
+
let je = async () => {
|
|
85
|
+
let e = await Ce(M.id);
|
|
86
|
+
e && (Oe(e), X(e.success ? "success" : "error", e.message));
|
|
87
|
+
}, Me = async () => {
|
|
88
|
+
await we(M.id), X("success", j("integrations.connectionDetail.notifications.refreshSuccess", "Token refreshed successfully")), P();
|
|
89
|
+
}, Ne = async () => {
|
|
90
|
+
Y(!0);
|
|
91
|
+
}, Pe = async () => {
|
|
92
|
+
await Te(M.id), X("success", j("integrations.connectionDetail.notifications.revokeSuccess", "Connection revoked")), Y(!1), P();
|
|
93
|
+
}, Fe = async () => {
|
|
93
94
|
ce("medium");
|
|
94
95
|
let e = await se({
|
|
95
|
-
title:
|
|
96
|
-
message:
|
|
97
|
-
okButtonTitle:
|
|
98
|
-
cancelButtonTitle:
|
|
96
|
+
title: j("integrations.connectionDetail.deleteDialog.title", "Delete Connection"),
|
|
97
|
+
message: j("integrations.connectionDetail.deleteDialog.message", "Delete this connection? This cannot be undone."),
|
|
98
|
+
okButtonTitle: j("integrations.connectionDetail.deleteDialog.confirm", "Delete"),
|
|
99
|
+
cancelButtonTitle: j("integrations.connectionDetail.deleteDialog.cancel", "Cancel")
|
|
99
100
|
});
|
|
100
101
|
if (e === null) {
|
|
101
|
-
|
|
102
|
+
K(!0);
|
|
102
103
|
return;
|
|
103
104
|
}
|
|
104
105
|
e && await Z();
|
|
105
106
|
}, Z = async () => {
|
|
106
107
|
try {
|
|
107
|
-
await
|
|
108
|
+
await R(M.id, q), X("success", j("integrations.connectionDetail.notifications.deleteSuccess", "Connection deleted")), l("success"), K(!1), J(!1), k?.(r(O, "connections"));
|
|
108
109
|
} catch (e) {
|
|
109
|
-
|
|
110
|
+
X("error", e instanceof Error ? e.message : "Failed to delete connection"), l("error");
|
|
110
111
|
}
|
|
111
|
-
}, Q =
|
|
112
|
-
return /* @__PURE__ */
|
|
112
|
+
}, Q = F || I || L || z, $ = !!(M.vaultId || M.credentialSecretId);
|
|
113
|
+
return /* @__PURE__ */ b("div", {
|
|
113
114
|
className: "space-y-6 p-6 max-w-5xl mx-auto",
|
|
114
115
|
children: [
|
|
115
|
-
|
|
116
|
-
className: t("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-
|
|
117
|
-
children: [
|
|
116
|
+
W && /* @__PURE__ */ b("div", {
|
|
117
|
+
className: t("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", W.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"),
|
|
118
|
+
children: [W.type === "success" ? /* @__PURE__ */ y(f, { size: 20 }) : /* @__PURE__ */ y(v, { size: 20 }), /* @__PURE__ */ y("span", {
|
|
118
119
|
className: "font-medium",
|
|
119
|
-
children:
|
|
120
|
+
children: W.message
|
|
120
121
|
})]
|
|
121
122
|
}),
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
/* @__PURE__ */ y(be, {
|
|
124
|
+
open: ke,
|
|
125
|
+
onOpenChange: (e) => {
|
|
126
|
+
e || (K(!1), J(!1));
|
|
127
|
+
},
|
|
128
|
+
children: /* @__PURE__ */ b(S, {
|
|
129
|
+
className: "max-w-md",
|
|
126
130
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
|
|
129
|
-
children: "Delete connection"
|
|
130
|
-
}), /* @__PURE__ */ x("p", {
|
|
131
|
-
className: "text-sm text-text-secondary mt-1",
|
|
132
|
-
children: "This removes the connection record immediately. You can also remove the mapped vault secret if you no longer need it."
|
|
133
|
-
})] }),
|
|
134
|
-
$ && /* @__PURE__ */ S("label", {
|
|
131
|
+
/* @__PURE__ */ b(T, { children: [/* @__PURE__ */ y(E, { children: "Delete connection" }), /* @__PURE__ */ y(C, { children: "This removes the connection record immediately. You can also remove the mapped vault secret if you no longer need it." })] }),
|
|
132
|
+
$ && /* @__PURE__ */ b("label", {
|
|
135
133
|
className: "flex items-start gap-3 rounded-lg border border-border-subtle/60 bg-bg-surface px-4 py-3 cursor-pointer",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ y("input", {
|
|
137
135
|
type: "checkbox",
|
|
138
|
-
checked:
|
|
139
|
-
onChange: (e) =>
|
|
136
|
+
checked: q,
|
|
137
|
+
onChange: (e) => J(e.target.checked),
|
|
140
138
|
className: "mt-0.5",
|
|
141
139
|
"aria-label": "Also remove mapped vault secret"
|
|
142
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
143
141
|
className: "text-sm font-medium text-text-primary",
|
|
144
142
|
children: "Also remove mapped vault secret"
|
|
145
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ y("p", {
|
|
146
144
|
className: "text-xs text-text-secondary mt-1",
|
|
147
145
|
children: "Use this only if no other connections rely on the same secret."
|
|
148
146
|
})] })]
|
|
149
147
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
className: "
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
className: "animate-spin"
|
|
167
|
-
}) : /* @__PURE__ */ x(y, { size: 14 }), "Delete connection"]
|
|
168
|
-
})]
|
|
169
|
-
})
|
|
148
|
+
/* @__PURE__ */ b(w, { children: [/* @__PURE__ */ y(x, {
|
|
149
|
+
onClick: () => {
|
|
150
|
+
K(!1), J(!1);
|
|
151
|
+
},
|
|
152
|
+
children: "Cancel"
|
|
153
|
+
}), /* @__PURE__ */ b(xe, {
|
|
154
|
+
disabled: z,
|
|
155
|
+
onClick: (e) => {
|
|
156
|
+
e.preventDefault(), Z();
|
|
157
|
+
},
|
|
158
|
+
className: "inline-flex items-center gap-2 bg-status-error-bg text-action-primary-text disabled:opacity-50",
|
|
159
|
+
children: [z ? /* @__PURE__ */ y(m, {
|
|
160
|
+
size: 14,
|
|
161
|
+
className: "animate-spin"
|
|
162
|
+
}) : /* @__PURE__ */ y(_, { size: 14 }), "Delete connection"]
|
|
163
|
+
})] })
|
|
170
164
|
]
|
|
171
165
|
})
|
|
172
166
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
open:
|
|
175
|
-
title:
|
|
176
|
-
description:
|
|
177
|
-
confirmLabel:
|
|
178
|
-
cancelLabel:
|
|
167
|
+
/* @__PURE__ */ y(oe, {
|
|
168
|
+
open: Ae,
|
|
169
|
+
title: j("integrations.connectionDetail.confirm.revokeTitle", "Revoke connection"),
|
|
170
|
+
description: j("integrations.connectionDetail.confirm.revoke", "Are you sure you want to revoke this connection? This will disconnect the external service."),
|
|
171
|
+
confirmLabel: j("integrations.connectionDetail.actions.revoke", "Revoke"),
|
|
172
|
+
cancelLabel: j("integrations.connectionDetail.actions.cancel", "Cancel"),
|
|
179
173
|
loading: L,
|
|
180
174
|
destructive: !0,
|
|
181
|
-
icon: /* @__PURE__ */
|
|
182
|
-
onConfirm:
|
|
183
|
-
onCancel: () =>
|
|
175
|
+
icon: /* @__PURE__ */ y(g, { size: 20 }),
|
|
176
|
+
onConfirm: Pe,
|
|
177
|
+
onCancel: () => Y(!1)
|
|
184
178
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ b("div", {
|
|
186
180
|
className: "relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border-subtle/50 p-6 shadow-sm",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ b("div", {
|
|
188
182
|
className: "relative z-10 flex items-center gap-4",
|
|
189
183
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ y("button", {
|
|
191
185
|
type: "button",
|
|
192
|
-
onClick: () =>
|
|
186
|
+
onClick: () => k?.(r(O, "connections")),
|
|
193
187
|
className: "p-2.5 hover:bg-accent rounded-lg transition-all",
|
|
194
|
-
"aria-label":
|
|
195
|
-
children: /* @__PURE__ */
|
|
188
|
+
"aria-label": j("integrations.connectionDetail.actions.backAriaLabel", "Back"),
|
|
189
|
+
children: /* @__PURE__ */ y(d, { size: 20 })
|
|
196
190
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
provider:
|
|
191
|
+
/* @__PURE__ */ y(s, {
|
|
192
|
+
provider: M.provider,
|
|
199
193
|
size: 56
|
|
200
194
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ b("div", {
|
|
202
196
|
className: "flex-1",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ b("div", {
|
|
204
198
|
className: "flex items-center gap-3",
|
|
205
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ y("h1", {
|
|
206
200
|
className: "text-2xl sm:text-3xl font-bold text-text-primary",
|
|
207
|
-
children:
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
-
status:
|
|
201
|
+
children: M.name
|
|
202
|
+
}), /* @__PURE__ */ y(c, {
|
|
203
|
+
status: M.status,
|
|
210
204
|
size: "md"
|
|
211
205
|
})]
|
|
212
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ b("p", {
|
|
213
207
|
className: "text-sm text-text-secondary mt-0.5",
|
|
214
208
|
children: [
|
|
215
|
-
|
|
209
|
+
M.provider.name,
|
|
216
210
|
" · ",
|
|
217
|
-
|
|
211
|
+
te(M.provider.authType)
|
|
218
212
|
]
|
|
219
213
|
})]
|
|
220
214
|
})
|
|
221
215
|
]
|
|
222
|
-
}), /* @__PURE__ */
|
|
216
|
+
}), /* @__PURE__ */ y("div", { className: "absolute top-0 right-0 size-64 bg-gradient-to-br from-primary/10 to-transparent rounded-full blur-3xl -z-0" })]
|
|
223
217
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ b("div", {
|
|
225
219
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ b("div", {
|
|
227
221
|
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5 space-y-4",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
229
223
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ y(le, {
|
|
231
225
|
size: 18,
|
|
232
226
|
className: "text-primary"
|
|
233
|
-
}),
|
|
234
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), j("integrations.connectionDetail.sections.info", "Connection Info")]
|
|
228
|
+
}), /* @__PURE__ */ b("div", {
|
|
235
229
|
className: "space-y-3",
|
|
236
230
|
children: [
|
|
237
|
-
|
|
231
|
+
M.description && /* @__PURE__ */ b("div", {
|
|
238
232
|
className: "py-2 border-b border-border-subtle/50",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ y("span", {
|
|
240
234
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
241
|
-
children:
|
|
242
|
-
}), /* @__PURE__ */
|
|
235
|
+
children: j("integrations.connectionDetail.fields.description", "Description")
|
|
236
|
+
}), /* @__PURE__ */ y("p", {
|
|
243
237
|
className: "text-sm text-text-primary mt-0.5",
|
|
244
|
-
children:
|
|
238
|
+
children: M.description
|
|
245
239
|
})]
|
|
246
240
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ b("div", {
|
|
248
242
|
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
249
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ y("span", {
|
|
250
244
|
className: "text-sm text-text-secondary",
|
|
251
|
-
children:
|
|
252
|
-
}), /* @__PURE__ */
|
|
245
|
+
children: j("integrations.connectionDetail.fields.provider", "Provider")
|
|
246
|
+
}), /* @__PURE__ */ y("span", {
|
|
253
247
|
className: "text-sm font-medium text-text-primary",
|
|
254
|
-
children:
|
|
248
|
+
children: M.provider.name
|
|
255
249
|
})]
|
|
256
250
|
}),
|
|
257
|
-
|
|
251
|
+
M.externalAccountEmail && /* @__PURE__ */ b("div", {
|
|
258
252
|
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
253
|
+
children: [/* @__PURE__ */ b("span", {
|
|
260
254
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
261
255
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ y(fe, { size: 14 }),
|
|
263
257
|
" ",
|
|
264
|
-
|
|
258
|
+
j("integrations.connectionDetail.fields.account", "Account")
|
|
265
259
|
]
|
|
266
|
-
}), /* @__PURE__ */
|
|
260
|
+
}), /* @__PURE__ */ y("span", {
|
|
267
261
|
className: "text-sm font-medium text-text-primary",
|
|
268
|
-
children:
|
|
262
|
+
children: M.externalAccountEmail
|
|
269
263
|
})]
|
|
270
264
|
}),
|
|
271
|
-
|
|
265
|
+
M.externalAccountName && /* @__PURE__ */ b("div", {
|
|
272
266
|
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ b("span", {
|
|
274
268
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
275
269
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ y(me, { size: 14 }),
|
|
277
271
|
" ",
|
|
278
|
-
|
|
272
|
+
j("integrations.connectionDetail.fields.name", "Name")
|
|
279
273
|
]
|
|
280
|
-
}), /* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ y("span", {
|
|
281
275
|
className: "text-sm font-medium text-text-primary",
|
|
282
|
-
children:
|
|
276
|
+
children: M.externalAccountName
|
|
283
277
|
})]
|
|
284
278
|
}),
|
|
285
|
-
|
|
279
|
+
M.errorMessage && /* @__PURE__ */ b("div", {
|
|
286
280
|
className: "py-2 border-b border-border-subtle/50",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ y("span", {
|
|
288
282
|
className: "text-xs text-status-error-text uppercase tracking-wide",
|
|
289
|
-
children:
|
|
290
|
-
}), /* @__PURE__ */
|
|
283
|
+
children: j("integrations.connectionDetail.fields.error", "Error")
|
|
284
|
+
}), /* @__PURE__ */ y("p", {
|
|
291
285
|
className: "text-sm text-status-error-text mt-0.5 bg-status-error-bg-subtle rounded-lg p-2",
|
|
292
|
-
children:
|
|
286
|
+
children: M.errorMessage
|
|
293
287
|
})]
|
|
294
288
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ b("div", {
|
|
296
290
|
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ b("span", {
|
|
298
292
|
className: "text-sm text-text-secondary flex items-center gap-1",
|
|
299
293
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ y(de, { size: 14 }),
|
|
301
295
|
" ",
|
|
302
|
-
|
|
296
|
+
j("integrations.connectionDetail.fields.lastUsed", "Last Used")
|
|
303
297
|
]
|
|
304
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ y("span", {
|
|
305
299
|
className: "text-sm text-text-primary",
|
|
306
|
-
children:
|
|
300
|
+
children: ee(M.lastUsedAt)
|
|
307
301
|
})]
|
|
308
302
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ b("div", {
|
|
310
304
|
className: "flex items-center justify-between py-2 border-b border-border-subtle/50",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ y("span", {
|
|
312
306
|
className: "text-sm text-text-secondary",
|
|
313
|
-
children:
|
|
314
|
-
}), /* @__PURE__ */
|
|
307
|
+
children: j("integrations.connectionDetail.fields.healthCheck", "Health Check")
|
|
308
|
+
}), /* @__PURE__ */ y("span", {
|
|
315
309
|
className: "text-sm text-text-primary",
|
|
316
|
-
children: i(
|
|
310
|
+
children: i(M.lastHealthCheck)
|
|
317
311
|
})]
|
|
318
312
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ b("div", {
|
|
320
314
|
className: "flex items-center justify-between py-2",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ y("span", {
|
|
322
316
|
className: "text-sm text-text-secondary",
|
|
323
|
-
children:
|
|
324
|
-
}), /* @__PURE__ */
|
|
317
|
+
children: j("integrations.connectionDetail.fields.created", "Created")
|
|
318
|
+
}), /* @__PURE__ */ y("span", {
|
|
325
319
|
className: "text-sm text-text-primary",
|
|
326
|
-
children: i(
|
|
320
|
+
children: i(M.createdAt)
|
|
327
321
|
})]
|
|
328
322
|
})
|
|
329
323
|
]
|
|
330
324
|
})]
|
|
331
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ b("div", {
|
|
332
326
|
className: "space-y-4",
|
|
333
327
|
children: [
|
|
334
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ b("div", {
|
|
335
329
|
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
337
331
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ y(g, {
|
|
339
333
|
size: 18,
|
|
340
334
|
className: "text-primary"
|
|
341
|
-
}),
|
|
342
|
-
}),
|
|
335
|
+
}), j("integrations.connectionDetail.sections.scopes", "Granted Scopes")]
|
|
336
|
+
}), M.grantedScopes.length > 0 ? /* @__PURE__ */ y("div", {
|
|
343
337
|
className: "flex flex-wrap gap-2",
|
|
344
|
-
children:
|
|
338
|
+
children: M.grantedScopes.map((e) => /* @__PURE__ */ y("span", {
|
|
345
339
|
className: "text-xs px-2.5 py-1 rounded-full bg-bg-sunken text-text-secondary font-mono",
|
|
346
340
|
children: e
|
|
347
341
|
}, e))
|
|
348
|
-
}) : /* @__PURE__ */
|
|
342
|
+
}) : /* @__PURE__ */ y("p", {
|
|
349
343
|
className: "text-sm text-text-secondary",
|
|
350
|
-
children:
|
|
344
|
+
children: j("integrations.connectionDetail.scopes.empty", "No scopes granted.")
|
|
351
345
|
})]
|
|
352
346
|
}),
|
|
353
|
-
|
|
354
|
-
className: t("rounded-xl border p-5",
|
|
347
|
+
U && /* @__PURE__ */ b("div", {
|
|
348
|
+
className: t("rounded-xl border p-5", U.success ? "border-border-default bg-status-success-bg-subtle" : "border-border-default bg-status-error-bg-subtle"),
|
|
355
349
|
children: [
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
className: t("font-semibold flex items-center gap-2 mb-2",
|
|
358
|
-
children: [
|
|
350
|
+
/* @__PURE__ */ b("h2", {
|
|
351
|
+
className: t("font-semibold flex items-center gap-2 mb-2", U.success ? "text-status-success-text" : "text-status-error-text"),
|
|
352
|
+
children: [U.success ? /* @__PURE__ */ y(f, { size: 18 }) : /* @__PURE__ */ y(v, { size: 18 }), U.success ? j("integrations.connectionDetail.testResult.passed", "Connection Test Passed") : j("integrations.connectionDetail.testResult.failed", "Connection Test Failed")]
|
|
359
353
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
className: t("text-sm",
|
|
362
|
-
children:
|
|
354
|
+
/* @__PURE__ */ y("p", {
|
|
355
|
+
className: t("text-sm", U.success ? "text-status-success-text" : "text-status-error-text"),
|
|
356
|
+
children: U.message
|
|
363
357
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ y("p", {
|
|
365
359
|
className: "text-xs text-text-secondary mt-1",
|
|
366
|
-
children:
|
|
360
|
+
children: j("integrations.connectionDetail.testResult.latency", "Latency: {latency}ms", { latency: U.latencyMs })
|
|
367
361
|
})
|
|
368
362
|
]
|
|
369
363
|
}),
|
|
370
|
-
$ && /* @__PURE__ */
|
|
364
|
+
$ && /* @__PURE__ */ b("div", {
|
|
371
365
|
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
373
367
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ y(p, {
|
|
375
369
|
size: 18,
|
|
376
370
|
className: "text-primary"
|
|
377
371
|
}), "Credential Storage"]
|
|
378
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ b("div", {
|
|
379
373
|
className: "space-y-2 text-sm",
|
|
380
374
|
children: [
|
|
381
|
-
|
|
375
|
+
M.vaultId && /* @__PURE__ */ b("div", {
|
|
382
376
|
className: "flex items-center justify-between gap-3",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
377
|
+
children: [/* @__PURE__ */ y("span", {
|
|
384
378
|
className: "text-text-secondary",
|
|
385
379
|
children: "Vault"
|
|
386
|
-
}), /* @__PURE__ */
|
|
380
|
+
}), /* @__PURE__ */ y("span", {
|
|
387
381
|
className: "font-medium text-text-primary break-all",
|
|
388
|
-
children:
|
|
382
|
+
children: M.vaultId
|
|
389
383
|
})]
|
|
390
384
|
}),
|
|
391
|
-
|
|
385
|
+
M.credentialSecretName && /* @__PURE__ */ b("div", {
|
|
392
386
|
className: "flex items-center justify-between gap-3",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ y("span", {
|
|
394
388
|
className: "text-text-secondary",
|
|
395
389
|
children: "Secret"
|
|
396
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ y("span", {
|
|
397
391
|
className: "font-medium text-text-primary break-all",
|
|
398
|
-
children:
|
|
392
|
+
children: M.credentialSecretName
|
|
399
393
|
})]
|
|
400
394
|
}),
|
|
401
|
-
|
|
395
|
+
M.credentialSecretId && /* @__PURE__ */ b("div", {
|
|
402
396
|
className: "flex items-center justify-between gap-3",
|
|
403
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ y("span", {
|
|
404
398
|
className: "text-text-secondary",
|
|
405
399
|
children: "Secret ID"
|
|
406
|
-
}), /* @__PURE__ */
|
|
400
|
+
}), /* @__PURE__ */ y("span", {
|
|
407
401
|
className: "font-mono text-xs text-text-primary break-all",
|
|
408
|
-
children:
|
|
402
|
+
children: M.credentialSecretId
|
|
409
403
|
})]
|
|
410
404
|
})
|
|
411
405
|
]
|
|
412
406
|
})]
|
|
413
407
|
}),
|
|
414
|
-
(
|
|
408
|
+
(V || H) && /* @__PURE__ */ b("div", {
|
|
415
409
|
className: "rounded-xl border border-border-subtle/50 bg-bg-surface p-5",
|
|
416
|
-
children: [/* @__PURE__ */
|
|
410
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
417
411
|
className: "font-semibold text-text-primary flex items-center gap-2 mb-3",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ y(p, {
|
|
419
413
|
size: 18,
|
|
420
414
|
className: "text-primary"
|
|
421
|
-
}),
|
|
422
|
-
}), /* @__PURE__ */
|
|
415
|
+
}), j("integrations.connectionDetail.sections.actions", "Actions")]
|
|
416
|
+
}), /* @__PURE__ */ b("div", {
|
|
423
417
|
className: "flex flex-wrap gap-2",
|
|
424
418
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ b("button", {
|
|
426
420
|
type: "button",
|
|
427
|
-
onClick:
|
|
421
|
+
onClick: je,
|
|
428
422
|
disabled: Q,
|
|
429
423
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
430
|
-
children: [
|
|
424
|
+
children: [F ? /* @__PURE__ */ y(m, {
|
|
431
425
|
size: 14,
|
|
432
426
|
className: "animate-spin"
|
|
433
|
-
}) : /* @__PURE__ */
|
|
427
|
+
}) : /* @__PURE__ */ y(he, { size: 14 }), j("integrations.connectionDetail.actions.test", "Test Connection")]
|
|
434
428
|
}),
|
|
435
|
-
|
|
429
|
+
V && M.provider.authType === "oauth2" && Ee && /* @__PURE__ */ b("button", {
|
|
436
430
|
type: "button",
|
|
437
|
-
onClick:
|
|
431
|
+
onClick: Me,
|
|
438
432
|
disabled: Q,
|
|
439
433
|
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 disabled:opacity-50",
|
|
440
|
-
children: [
|
|
434
|
+
children: [I ? /* @__PURE__ */ y(m, {
|
|
441
435
|
size: 14,
|
|
442
436
|
className: "animate-spin"
|
|
443
|
-
}) : /* @__PURE__ */
|
|
437
|
+
}) : /* @__PURE__ */ y(h, { size: 14 }), j("integrations.connectionDetail.actions.refreshToken", "Refresh Token")]
|
|
444
438
|
}),
|
|
445
|
-
|
|
439
|
+
H && /* @__PURE__ */ b("button", {
|
|
446
440
|
type: "button",
|
|
447
|
-
onClick:
|
|
441
|
+
onClick: Ne,
|
|
448
442
|
disabled: Q,
|
|
449
443
|
className: "inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-lg border border-border-default text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50",
|
|
450
|
-
children: [L ? /* @__PURE__ */
|
|
444
|
+
children: [L ? /* @__PURE__ */ y(m, {
|
|
451
445
|
size: 14,
|
|
452
446
|
className: "animate-spin"
|
|
453
|
-
}) : /* @__PURE__ */
|
|
447
|
+
}) : /* @__PURE__ */ y(g, { size: 14 }), j("integrations.connectionDetail.actions.revoke", "Revoke")]
|
|
454
448
|
}),
|
|
455
|
-
|
|
449
|
+
H && /* @__PURE__ */ b("button", {
|
|
456
450
|
type: "button",
|
|
457
|
-
onClick:
|
|
451
|
+
onClick: Fe,
|
|
458
452
|
disabled: Q,
|
|
459
453
|
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",
|
|
460
|
-
children: [
|
|
454
|
+
children: [z ? /* @__PURE__ */ y(m, {
|
|
461
455
|
size: 14,
|
|
462
456
|
className: "animate-spin"
|
|
463
|
-
}) : /* @__PURE__ */
|
|
457
|
+
}) : /* @__PURE__ */ y(_, { size: 14 }), j("integrations.connectionDetail.actions.delete", "Delete")]
|
|
464
458
|
})
|
|
465
459
|
]
|
|
466
460
|
})]
|
|
@@ -472,6 +466,6 @@ function C() {
|
|
|
472
466
|
});
|
|
473
467
|
}
|
|
474
468
|
//#endregion
|
|
475
|
-
export {
|
|
469
|
+
export { D as ConnectionDetail };
|
|
476
470
|
|
|
477
471
|
//# sourceMappingURL=ConnectionDetail.js.map
|