@burdenoff/microfe-channel 2026.625.2 → 2026.625.3

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.
Files changed (29) hide show
  1. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +19 -12
  2. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  3. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
  4. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  5. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
  6. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  7. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +154 -134
  8. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelsListPage.js +279 -244
  10. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  11. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
  12. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  13. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +159 -129
  14. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  15. package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
  16. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
  18. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  19. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +99 -79
  20. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  21. package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
  22. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  23. package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
  24. package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
  25. package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
  26. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +174 -154
  28. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  29. package/package.json +2 -2
@@ -1,338 +1,383 @@
1
1
  import { useChannel as e } from "../../../providers/ChannelProvider.js";
2
2
  import { nativeImpact as t, nativeNotify as n } from "../../../../utils/nativeBridge.js";
3
3
  import { reportShellError as ee } from "../../../utils/shellBridge.js";
4
- import { getGlobalChannelClient as r } from "../../../graphql/global-client.js";
5
- import { GetConnectionDocument as i } from "../../../../generated/global-operations.js";
6
- import { useChannel as a } from "../../../hooks/useChannels.js";
7
- import { PermissionGuard as o } from "../../../components/PermissionGuard.js";
8
- import { CHANNEL_PERMISSIONS as s } from "../../../constants/permissions.js";
9
- import { useEffect as c, useState as l } from "react";
10
- import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { AlertCircle as d, ArrowLeft as f, CheckCircle2 as p, Clock as te, Edit as ne, Loader2 as m, RefreshCw as h, Shield as g, Trash2 as _, XCircle as v } from "lucide-react";
12
- import { useNavigate as y, useParams as b } from "react-router-dom";
13
- import { usePermissions as x } from "@burdenoff/fe-libs/shared/providers/shell";
14
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
15
- import { CTAOverflowMenu as w, EmphasisPanel as T, GlassCard as E } from "@burdenoff/fe-libs/ui";
16
- import { TagBadge as D } from "@burdenoff/fe-libs/tag";
4
+ import { getGlobalChannelClient as te } from "../../../graphql/global-client.js";
5
+ import { GetConnectionDocument as r } from "../../../../generated/global-operations.js";
6
+ import { useChannel as ne } from "../../../hooks/useChannels.js";
7
+ import { PermissionGuard as i } from "../../../components/PermissionGuard.js";
8
+ import { CHANNEL_PERMISSIONS as a } from "../../../constants/permissions.js";
9
+ import { useEffect as re, useState as o } from "react";
10
+ import { useI18n as ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { AlertCircle as s, ArrowLeft as c, CheckCircle2 as l, Clock as u, Edit as d, Loader2 as f, RefreshCw as p, Shield as m, Trash2 as h, XCircle as g } from "lucide-react";
12
+ import { useNavigate as _, useParams as v } from "react-router-dom";
13
+ import { usePermissions as ae } from "@burdenoff/fe-libs/shared/providers/shell";
14
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
15
+ import { CTAOverflowMenu as oe, EmphasisPanel as x, GlassCard as S, NextSteps as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
16
+ import { TagBadge as T } from "@burdenoff/fe-libs/tag";
17
17
  //#region src/channel/modules/channels/pages/ConnectionDetailsPage.tsx
18
- var O = {
18
+ var E = {
19
19
  true: {
20
- icon: p,
20
+ icon: l,
21
21
  color: "text-status-success-text",
22
22
  bgColor: "bg-status-success-bg-subtle",
23
23
  label: "Healthy"
24
24
  },
25
25
  false: {
26
- icon: v,
26
+ icon: g,
27
27
  color: "text-status-error-text",
28
28
  bgColor: "bg-error-500/10",
29
29
  label: "Unhealthy"
30
30
  }
31
31
  };
32
- function k() {
33
- let p = y(), { hasPermission: v } = x(), k = v(s.CHANNEL_UPDATE), re = v(s.CHANNEL_EXECUTE), A = b(), { connectionId: j } = A, { authToken: M, apiGatewayUrl: N, organizationId: P } = e(), [F, I] = l(A.channelId), [L, R] = l(null);
34
- c(() => {
35
- if (F || !j) return;
32
+ function D() {
33
+ let l = _(), { hasPermission: g } = ae(), D = g(a.CHANNEL_UPDATE), O = g(a.CHANNEL_EXECUTE), k = v(), { connectionId: A } = k, { authToken: j, apiGatewayUrl: M, organizationId: N } = e(), [P, F] = o(k.channelId), [I, L] = o(null);
34
+ re(() => {
35
+ if (P || !A) return;
36
36
  let e = !1;
37
37
  return (async () => {
38
38
  try {
39
- let t = await r(N, M, P).query({
40
- query: i,
41
- variables: { id: j },
39
+ let t = await te(M, j, N).query({
40
+ query: r,
41
+ variables: { id: A },
42
42
  fetchPolicy: "network-only"
43
43
  });
44
44
  if (e) return;
45
45
  let n = t.data?.getConnection;
46
- n?.channelId ? I(n.channelId) : R("Connection not found");
46
+ n?.channelId ? F(n.channelId) : L("Connection not found");
47
47
  } catch (t) {
48
- e || R(t instanceof Error ? t.message : "Failed to resolve connection");
48
+ e || L(t instanceof Error ? t.message : "Failed to resolve connection");
49
49
  }
50
50
  })(), () => {
51
51
  e = !0;
52
52
  };
53
53
  }, [
54
- j,
55
- F,
56
- N,
54
+ A,
55
+ P,
57
56
  M,
58
- P
57
+ j,
58
+ N
59
59
  ]);
60
- let z = F, { channel: B, isLoading: V, error: H, runHealthCheck: U, deleteConnection: W } = a(z), { t: G } = u(), K = (e, t) => {
61
- let n = G(e);
60
+ let R = P, { channel: z, isLoading: B, error: V, runHealthCheck: H, deleteConnection: U } = ne(R), { t: W } = ie(), G = (e, t) => {
61
+ let n = W(e);
62
62
  return n === e ? t : n;
63
- }, [q, J] = l(!1), [Y, X] = l(!1), [ie, Z] = l(!1), Q = B?.connection, ae = async () => {
64
- X(!0);
63
+ }, [K, q] = o(!1), [J, Y] = o(!1), [se, X] = o(!1), Z = z?.connection, Q = async () => {
64
+ Y(!0);
65
65
  try {
66
- await U();
66
+ await H();
67
67
  } finally {
68
- X(!1);
68
+ Y(!1);
69
69
  }
70
- }, oe = async () => {
71
- if (j) {
72
- t("medium"), J(!0);
70
+ }, ce = async () => {
71
+ if (A) {
72
+ t("medium"), q(!0);
73
73
  try {
74
- await W(j), n("success"), p(`/channels/${z}`);
74
+ await U(A), n("success"), l(`/channels/${R}`);
75
75
  } catch (e) {
76
76
  n("error"), ee(e, {
77
77
  module: "channel",
78
78
  context: { action: "Failed to delete connection" }
79
79
  }, "[channel] Failed to delete connection");
80
80
  } finally {
81
- J(!1);
81
+ q(!1);
82
82
  }
83
83
  }
84
84
  };
85
- if (V || !F && !L) return /* @__PURE__ */ S("div", {
85
+ if (B || !P && !I) return /* @__PURE__ */ y("div", {
86
86
  className: "flex items-center justify-center min-h-screen",
87
- children: /* @__PURE__ */ S(m, { className: "size-8 animate-spin text-text-secondary" })
87
+ children: /* @__PURE__ */ y(f, { className: "size-8 animate-spin text-text-secondary" })
88
88
  });
89
- if (L || H || !B) return /* @__PURE__ */ C("div", {
89
+ if (I || V || !z) return /* @__PURE__ */ b("div", {
90
90
  className: "flex flex-col items-center justify-center min-h-screen gap-4",
91
91
  children: [
92
- /* @__PURE__ */ S(d, { className: "size-12 text-status-error-text" }),
93
- /* @__PURE__ */ S("h1", {
92
+ /* @__PURE__ */ y(s, { className: "size-12 text-status-error-text" }),
93
+ /* @__PURE__ */ y("h1", {
94
94
  className: "text-xl font-semibold",
95
- children: K("channel.channelNotFound", "Channel not found")
95
+ children: G("channel.channelNotFound", "Channel not found")
96
96
  }),
97
- /* @__PURE__ */ S("button", {
97
+ /* @__PURE__ */ y("button", {
98
98
  type: "button",
99
- onClick: () => p("../../list"),
99
+ onClick: () => l("../../list"),
100
100
  className: "text-primary hover:underline",
101
- children: K("channel.backToChannels", "Back to channels")
101
+ children: G("channel.backToChannels", "Back to channels")
102
102
  })
103
103
  ]
104
104
  });
105
- if (!Q) return /* @__PURE__ */ C("div", {
105
+ if (!Z) return /* @__PURE__ */ b("div", {
106
106
  className: "flex flex-col items-center justify-center min-h-screen gap-4",
107
107
  children: [
108
- /* @__PURE__ */ S(d, { className: "size-12 text-text-secondary" }),
109
- /* @__PURE__ */ S("h1", {
108
+ /* @__PURE__ */ y(s, { className: "size-12 text-text-secondary" }),
109
+ /* @__PURE__ */ y("h1", {
110
110
  className: "text-xl font-semibold",
111
- children: K("channel.noConnectionFound", "No connection found")
111
+ children: G("channel.noConnectionFound", "No connection found")
112
112
  }),
113
- /* @__PURE__ */ S("p", {
113
+ /* @__PURE__ */ y("p", {
114
114
  className: "text-sm text-text-secondary",
115
- children: K("channel.noConnectionConfigured", "This channel does not have a connection configured.")
115
+ children: G("channel.noConnectionConfigured", "This channel does not have a connection configured.")
116
116
  }),
117
- /* @__PURE__ */ S("button", {
117
+ /* @__PURE__ */ y("button", {
118
118
  type: "button",
119
- onClick: () => p(`/channels/${z}`),
119
+ onClick: () => l(`/channels/${R}`),
120
120
  className: "text-primary hover:underline",
121
- children: K("channel.backToChannel", "Back to channel")
121
+ children: G("channel.backToChannel", "Back to channel")
122
122
  })
123
123
  ]
124
124
  });
125
- let $ = O[String(Q.isHealthy)] || O.false, se = $.icon;
126
- return /* @__PURE__ */ S(o, {
127
- permission: s.CHANNEL_CONNECTION_READ,
128
- children: /* @__PURE__ */ C("div", {
125
+ let $ = E[String(Z.isHealthy)] || E.false, le = $.icon;
126
+ return /* @__PURE__ */ y(i, {
127
+ permission: a.CHANNEL_CONNECTION_READ,
128
+ children: /* @__PURE__ */ b("div", {
129
129
  className: "min-h-screen bg-bg-surface",
130
- children: [/* @__PURE__ */ S("div", {
130
+ children: [/* @__PURE__ */ y("div", {
131
131
  className: "border-b bg-bg-surface",
132
- children: /* @__PURE__ */ S("div", {
132
+ children: /* @__PURE__ */ y("div", {
133
133
  className: "container mx-auto px-6 py-4",
134
- children: /* @__PURE__ */ C("div", {
134
+ children: /* @__PURE__ */ b("div", {
135
135
  className: "flex items-center justify-between",
136
- children: [/* @__PURE__ */ C("div", {
136
+ children: [/* @__PURE__ */ b("div", {
137
137
  className: "flex items-center gap-4",
138
- children: [/* @__PURE__ */ S("button", {
138
+ children: [/* @__PURE__ */ y("button", {
139
139
  type: "button",
140
- onClick: () => p(`/channels/${z}`),
140
+ onClick: () => l(`/channels/${R}`),
141
141
  className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
142
- children: /* @__PURE__ */ S(f, { className: "size-5 " })
143
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
142
+ children: /* @__PURE__ */ y(c, { className: "size-5 " })
143
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
144
144
  className: "text-2xl font-bold",
145
- children: K("channel.connectionDetails", "Connection Details")
146
- }), /* @__PURE__ */ C("p", {
145
+ children: G("channel.connectionDetails", "Connection Details")
146
+ }), /* @__PURE__ */ b("p", {
147
147
  className: "text-sm text-text-secondary",
148
148
  children: [
149
- B.name,
149
+ z.name,
150
150
  " • ",
151
- B.platform
151
+ z.platform
152
152
  ]
153
153
  })] })]
154
- }), /* @__PURE__ */ S(w, {
155
- primary: k ? {
156
- label: K("channel.editChannel", "Edit Channel"),
157
- icon: /* @__PURE__ */ S(ne, {
154
+ }), /* @__PURE__ */ y(oe, {
155
+ primary: D ? {
156
+ label: G("channel.editChannel", "Edit Channel"),
157
+ icon: /* @__PURE__ */ y(d, {
158
158
  className: "size-4",
159
159
  "aria-hidden": "true"
160
160
  }),
161
- onSelect: () => p(`/channels/${z}/edit`)
161
+ onSelect: () => l(`/channels/${R}/edit`)
162
162
  } : void 0,
163
- actions: re ? [{
164
- label: K("channel.runHealthCheck", "Run Health Check"),
165
- icon: Y ? /* @__PURE__ */ S(m, {
163
+ actions: O ? [{
164
+ label: G("channel.runHealthCheck", "Run Health Check"),
165
+ icon: J ? /* @__PURE__ */ y(f, {
166
166
  className: "size-4 animate-spin",
167
167
  "aria-hidden": "true"
168
- }) : /* @__PURE__ */ S(h, {
168
+ }) : /* @__PURE__ */ y(p, {
169
169
  className: "size-4",
170
170
  "aria-hidden": "true"
171
171
  }),
172
- disabled: Y,
173
- onSelect: () => void ae()
172
+ disabled: J,
173
+ onSelect: () => void Q()
174
174
  }] : []
175
175
  })]
176
176
  })
177
177
  })
178
- }), /* @__PURE__ */ C("div", {
178
+ }), /* @__PURE__ */ b("div", {
179
179
  className: "container mx-auto px-6 py-8 max-w-5xl space-y-6",
180
- children: [/* @__PURE__ */ S(T, {
181
- className: "p-6",
182
- children: /* @__PURE__ */ S("div", {
183
- className: "flex items-center justify-between",
184
- children: /* @__PURE__ */ C("div", {
185
- className: "flex items-center gap-4",
186
- children: [/* @__PURE__ */ S("div", {
187
- className: $.color,
188
- children: /* @__PURE__ */ S(se, { className: "size-10 " })
189
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h2", {
190
- className: "text-xl font-semibold",
191
- children: $.label
192
- }), /* @__PURE__ */ S("p", {
193
- className: "text-sm text-text-secondary",
194
- children: Q.isHealthy ? K("channel.connectionWorking", "Connection is working properly") : K("channel.connectionNotWorking", "Connection is not working properly")
195
- })] })]
180
+ children: [
181
+ /* @__PURE__ */ y(w, {
182
+ icon: /* @__PURE__ */ y(m, {
183
+ size: 15,
184
+ "aria-hidden": "true"
185
+ }),
186
+ children: G("channel.connectionDetailsPurpose", "The authenticated link between this channel and its provider — its auth type, whether it is active, when it was last tested, and how soon its token expires. Use it to verify the channel can actually send, to spot a token that needs refreshing before it lapses, or to remove a connection you no longer need.")
187
+ }),
188
+ /* @__PURE__ */ y(C, {
189
+ storageKey: "channel-connection-detail",
190
+ steps: [
191
+ ...O ? [{
192
+ id: "health",
193
+ label: G("channel.nextRunHealthCheck", "Run a health check"),
194
+ description: G("channel.nextConnectionHealthDesc", "Confirm the credentials still authenticate against the provider."),
195
+ icon: /* @__PURE__ */ y(p, {
196
+ size: 16,
197
+ "aria-hidden": "true"
198
+ }),
199
+ onClick: () => void Q()
200
+ }] : [],
201
+ ...D ? [{
202
+ id: "edit",
203
+ label: G("channel.nextEditChannel", "Edit the channel"),
204
+ description: G("channel.nextEditChannelDesc", "Update credentials, status or platform metadata for this channel."),
205
+ icon: /* @__PURE__ */ y(d, {
206
+ size: 16,
207
+ "aria-hidden": "true"
208
+ }),
209
+ onClick: () => l(`/channels/${R}/edit`)
210
+ }] : [],
211
+ {
212
+ id: "back",
213
+ label: G("channel.nextBackToChannel", "Back to the channel"),
214
+ description: G("channel.nextBackToChannelDesc", "Return to the channel overview to send a test or review deliveries."),
215
+ icon: /* @__PURE__ */ y(c, {
216
+ size: 16,
217
+ "aria-hidden": "true"
218
+ }),
219
+ onClick: () => l(`/channels/${R}`)
220
+ }
221
+ ]
222
+ }),
223
+ /* @__PURE__ */ y(x, {
224
+ className: "p-6",
225
+ children: /* @__PURE__ */ y("div", {
226
+ className: "flex items-center justify-between",
227
+ children: /* @__PURE__ */ b("div", {
228
+ className: "flex items-center gap-4",
229
+ children: [/* @__PURE__ */ y("div", {
230
+ className: $.color,
231
+ children: /* @__PURE__ */ y(le, { className: "size-10 " })
232
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h2", {
233
+ className: "text-xl font-semibold",
234
+ children: $.label
235
+ }), /* @__PURE__ */ y("p", {
236
+ className: "text-sm text-text-secondary",
237
+ children: Z.isHealthy ? G("channel.connectionWorking", "Connection is working properly") : G("channel.connectionNotWorking", "Connection is not working properly")
238
+ })] })]
239
+ })
196
240
  })
197
- })
198
- }), /* @__PURE__ */ C("div", {
199
- className: "grid gap-6 lg:grid-cols-3",
200
- children: [/* @__PURE__ */ C(E, {
201
- treatment: "plain",
202
- className: "border-border-seam p-6 space-y-4 lg:col-span-2",
203
- children: [
204
- /* @__PURE__ */ S("h3", {
241
+ }),
242
+ /* @__PURE__ */ b("div", {
243
+ className: "grid gap-6 lg:grid-cols-3",
244
+ children: [/* @__PURE__ */ b(S, {
245
+ treatment: "plain",
246
+ className: "border-border-seam p-6 space-y-4 lg:col-span-2",
247
+ children: [
248
+ /* @__PURE__ */ y("h3", {
249
+ className: "font-semibold",
250
+ children: G("channel.connectionInformation", "Connection Information")
251
+ }),
252
+ /* @__PURE__ */ b("div", {
253
+ className: "grid grid-cols-2 gap-4",
254
+ children: [
255
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
256
+ className: "text-sm text-text-secondary",
257
+ children: "Connection ID"
258
+ }), /* @__PURE__ */ y("p", {
259
+ className: "font-mono text-sm",
260
+ children: Z.id
261
+ })] }),
262
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
263
+ className: "text-sm text-text-secondary",
264
+ children: "Auth Type"
265
+ }), /* @__PURE__ */ b("p", {
266
+ className: "flex items-center gap-2",
267
+ children: [/* @__PURE__ */ y(m, { className: "size-4 text-text-secondary" }), Z.authType]
268
+ })] }),
269
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
270
+ className: "text-sm text-text-secondary",
271
+ children: "Status"
272
+ }), /* @__PURE__ */ y("p", {
273
+ className: Z.isActive ? "text-status-success-text" : "text-text-secondary",
274
+ children: Z.isActive ? G("channel.activeStatus", "Active") : G("channel.inactiveStatus", "Inactive")
275
+ })] }),
276
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
277
+ className: "text-sm text-text-secondary",
278
+ children: "Token Refresh"
279
+ }), /* @__PURE__ */ y("p", {
280
+ className: Z.needsTokenRefresh ? "text-status-warning-text" : "text-text-secondary",
281
+ children: Z.needsTokenRefresh ? G("channel.tokenRefreshRequired", "Required soon") : G("channel.tokenRefreshNotNeeded", "Not needed")
282
+ })] }),
283
+ Z.lastTestedAt && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
284
+ className: "text-sm text-text-secondary",
285
+ children: "Last Tested"
286
+ }), /* @__PURE__ */ b("p", {
287
+ className: "flex items-center gap-2",
288
+ children: [/* @__PURE__ */ y(u, { className: "size-4 text-text-secondary" }), new Date(Z.lastTestedAt).toLocaleString()]
289
+ })] }),
290
+ Z.daysUntilExpiry !== null && Z.daysUntilExpiry !== void 0 && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
291
+ className: "text-sm text-text-secondary",
292
+ children: "Days Until Token Expiry"
293
+ }), /* @__PURE__ */ b("p", {
294
+ className: Z.daysUntilExpiry < 30 ? "text-status-warning-text" : "text-text-secondary",
295
+ children: [Z.daysUntilExpiry, " days"]
296
+ })] })
297
+ ]
298
+ }),
299
+ Z.testStatus && /* @__PURE__ */ b("div", {
300
+ className: "pt-4 border-t",
301
+ children: [/* @__PURE__ */ y("p", {
302
+ className: "text-sm text-text-secondary mb-2",
303
+ children: "Last Test Status"
304
+ }), /* @__PURE__ */ y("div", {
305
+ className: "p-3 rounded-lg bg-bg-sunken",
306
+ children: /* @__PURE__ */ y("p", {
307
+ className: "font-mono text-sm",
308
+ children: Z.testStatus
309
+ })
310
+ })]
311
+ }),
312
+ Z.tagAssignments && Z.tagAssignments.length > 0 && /* @__PURE__ */ b("div", {
313
+ className: "pt-4 border-t",
314
+ children: [/* @__PURE__ */ y("p", {
315
+ className: "text-sm text-text-secondary mb-2",
316
+ children: G("channel.tags", "Tags")
317
+ }), /* @__PURE__ */ y("div", {
318
+ className: "flex flex-wrap gap-1.5",
319
+ "aria-label": "Connection tags",
320
+ children: Z.tagAssignments.map((e) => /* @__PURE__ */ y(T, {
321
+ id: e.tagId,
322
+ label: e.tagId,
323
+ size: "md"
324
+ }, e.id))
325
+ })]
326
+ })
327
+ ]
328
+ }), /* @__PURE__ */ b(S, {
329
+ treatment: "plain",
330
+ className: "border-border-seam p-6 space-y-4 lg:col-span-1",
331
+ children: [/* @__PURE__ */ y("h3", {
205
332
  className: "font-semibold",
206
- children: K("channel.connectionInformation", "Connection Information")
207
- }),
208
- /* @__PURE__ */ C("div", {
209
- className: "grid grid-cols-2 gap-4",
210
- children: [
211
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
212
- className: "text-sm text-text-secondary",
213
- children: "Connection ID"
214
- }), /* @__PURE__ */ S("p", {
215
- className: "font-mono text-sm",
216
- children: Q.id
217
- })] }),
218
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
219
- className: "text-sm text-text-secondary",
220
- children: "Auth Type"
221
- }), /* @__PURE__ */ C("p", {
222
- className: "flex items-center gap-2",
223
- children: [/* @__PURE__ */ S(g, { className: "size-4 text-text-secondary" }), Q.authType]
224
- })] }),
225
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
226
- className: "text-sm text-text-secondary",
227
- children: "Status"
228
- }), /* @__PURE__ */ S("p", {
229
- className: Q.isActive ? "text-status-success-text" : "text-text-secondary",
230
- children: Q.isActive ? K("channel.activeStatus", "Active") : K("channel.inactiveStatus", "Inactive")
231
- })] }),
232
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
233
- className: "text-sm text-text-secondary",
234
- children: "Token Refresh"
235
- }), /* @__PURE__ */ S("p", {
236
- className: Q.needsTokenRefresh ? "text-status-warning-text" : "text-text-secondary",
237
- children: Q.needsTokenRefresh ? K("channel.tokenRefreshRequired", "Required soon") : K("channel.tokenRefreshNotNeeded", "Not needed")
238
- })] }),
239
- Q.lastTestedAt && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
240
- className: "text-sm text-text-secondary",
241
- children: "Last Tested"
242
- }), /* @__PURE__ */ C("p", {
243
- className: "flex items-center gap-2",
244
- children: [/* @__PURE__ */ S(te, { className: "size-4 text-text-secondary" }), new Date(Q.lastTestedAt).toLocaleString()]
245
- })] }),
246
- Q.daysUntilExpiry !== null && Q.daysUntilExpiry !== void 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
247
- className: "text-sm text-text-secondary",
248
- children: "Days Until Token Expiry"
249
- }), /* @__PURE__ */ C("p", {
250
- className: Q.daysUntilExpiry < 30 ? "text-status-warning-text" : "text-text-secondary",
251
- children: [Q.daysUntilExpiry, " days"]
252
- })] })
253
- ]
254
- }),
255
- Q.testStatus && /* @__PURE__ */ C("div", {
256
- className: "pt-4 border-t",
257
- children: [/* @__PURE__ */ S("p", {
258
- className: "text-sm text-text-secondary mb-2",
259
- children: "Last Test Status"
260
- }), /* @__PURE__ */ S("div", {
261
- className: "p-3 rounded-lg bg-bg-sunken",
262
- children: /* @__PURE__ */ S("p", {
263
- className: "font-mono text-sm",
264
- children: Q.testStatus
265
- })
266
- })]
267
- }),
268
- Q.tagAssignments && Q.tagAssignments.length > 0 && /* @__PURE__ */ C("div", {
269
- className: "pt-4 border-t",
270
- children: [/* @__PURE__ */ S("p", {
271
- className: "text-sm text-text-secondary mb-2",
272
- children: K("channel.tags", "Tags")
273
- }), /* @__PURE__ */ S("div", {
274
- className: "flex flex-wrap gap-1.5",
275
- "aria-label": "Connection tags",
276
- children: Q.tagAssignments.map((e) => /* @__PURE__ */ S(D, {
277
- id: e.tagId,
278
- label: e.tagId,
279
- size: "md"
280
- }, e.id))
281
- })]
282
- })
283
- ]
284
- }), /* @__PURE__ */ C(E, {
285
- treatment: "plain",
286
- className: "border-border-seam p-6 space-y-4 lg:col-span-1",
287
- children: [/* @__PURE__ */ S("h3", {
288
- className: "font-semibold",
289
- children: K("channel.actions", "Actions")
290
- }), /* @__PURE__ */ C("div", {
291
- className: "flex flex-col gap-3",
292
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
293
- className: "font-medium",
294
- children: K("channel.deleteConnection", "Delete Connection")
295
- }), /* @__PURE__ */ S("p", {
296
- className: "text-sm text-text-secondary",
297
- children: K("channel.deleteConnectionWarning", "Permanently remove this connection. The channel will become inactive.")
298
- })] }), ie ? /* @__PURE__ */ C("div", {
299
- className: "flex items-center gap-2",
300
- children: [
301
- /* @__PURE__ */ S("span", {
302
- className: "text-sm text-text-secondary",
303
- children: K("channel.confirmDelete", "Confirm delete?")
304
- }),
305
- /* @__PURE__ */ C("button", {
306
- type: "button",
307
- onClick: oe,
308
- disabled: q,
309
- className: "px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
310
- children: [q ? /* @__PURE__ */ S(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ S(_, { className: "size-4 " }), K("channel.delete", "Delete")]
311
- }),
312
- /* @__PURE__ */ S("button", {
333
+ children: G("channel.actions", "Actions")
334
+ }), /* @__PURE__ */ b("div", {
335
+ className: "flex flex-col gap-3",
336
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
337
+ className: "font-medium",
338
+ children: G("channel.deleteConnection", "Delete Connection")
339
+ }), /* @__PURE__ */ y("p", {
340
+ className: "text-sm text-text-secondary",
341
+ children: G("channel.deleteConnectionWarning", "Permanently remove this connection. The channel will become inactive.")
342
+ })] }), se ? /* @__PURE__ */ b("div", {
343
+ className: "flex items-center gap-2",
344
+ children: [
345
+ /* @__PURE__ */ y("span", {
346
+ className: "text-sm text-text-secondary",
347
+ children: G("channel.confirmDelete", "Confirm delete?")
348
+ }),
349
+ /* @__PURE__ */ b("button", {
350
+ type: "button",
351
+ onClick: ce,
352
+ disabled: K,
353
+ className: "px-4 py-2 rounded-lg bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
354
+ children: [K ? /* @__PURE__ */ y(f, { className: "size-4 animate-spin" }) : /* @__PURE__ */ y(h, { className: "size-4 " }), G("channel.delete", "Delete")]
355
+ }),
356
+ /* @__PURE__ */ y("button", {
357
+ type: "button",
358
+ onClick: () => X(!1),
359
+ className: "px-4 py-2 rounded-lg border hover:bg-bg-sunken transition-colors",
360
+ children: G("channel.cancel", "Cancel")
361
+ })
362
+ ]
363
+ }) : /* @__PURE__ */ y(i, {
364
+ permission: a.CHANNEL_CONNECTION_DELETE,
365
+ children: /* @__PURE__ */ b("button", {
313
366
  type: "button",
314
- onClick: () => Z(!1),
315
- className: "px-4 py-2 rounded-lg border hover:bg-bg-sunken transition-colors",
316
- children: K("channel.cancel", "Cancel")
367
+ onClick: () => X(!0),
368
+ className: "px-4 py-2 rounded-lg text-status-error-text border border-status-error-border hover:bg-status-error-bg/10 transition-colors flex items-center gap-2",
369
+ children: [/* @__PURE__ */ y(h, { className: "size-4 " }), G("channel.delete", "Delete")]
317
370
  })
318
- ]
319
- }) : /* @__PURE__ */ S(o, {
320
- permission: s.CHANNEL_CONNECTION_DELETE,
321
- children: /* @__PURE__ */ C("button", {
322
- type: "button",
323
- onClick: () => Z(!0),
324
- className: "px-4 py-2 rounded-lg text-status-error-text border border-status-error-border hover:bg-status-error-bg/10 transition-colors flex items-center gap-2",
325
- children: [/* @__PURE__ */ S(_, { className: "size-4 " }), K("channel.delete", "Delete")]
326
- })
371
+ })]
327
372
  })]
328
373
  })]
329
- })]
330
- })]
374
+ })
375
+ ]
331
376
  })]
332
377
  })
333
378
  });
334
379
  }
335
380
  //#endregion
336
- export { k as ConnectionDetailsPage };
381
+ export { D as ConnectionDetailsPage };
337
382
 
338
383
  //# sourceMappingURL=ConnectionDetailsPage.js.map