@burdenoff/microfe-channel 2026.624.3 → 2026.625.2
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/channel/modules/channels/pages/ChannelDashboardPage.js +134 -134
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +287 -277
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +140 -131
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +169 -169
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +204 -209
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +161 -155
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +141 -148
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +27 -24
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +161 -156
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +177 -192
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +130 -122
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +137 -132
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +87 -84
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +185 -183
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,14 +6,14 @@ import { AUTH_TYPE_I18N as ee, HEALTH_I18N as te, PLATFORM_I18N as ne, STATUS_I1
|
|
|
6
6
|
import { AdapterCredentialsForm as ie, CredentialValidationStatus as ae } from "../../../components/AdapterCredentialsForm.js";
|
|
7
7
|
import { useEffect as oe, useState as o } from "react";
|
|
8
8
|
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
-
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as
|
|
10
|
-
import { useLocation as
|
|
11
|
-
import { usePermissions as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as m, Phone as pe, Play as me, Plus as he, Power as ge, PowerOff as h, Radio as _e, RefreshCw as g, Save as ve, Send as _, Trash2 as ye, Truck as be, Users as xe, X as Se, XCircle as v } from "lucide-react";
|
|
10
|
+
import { useLocation as Ce, useNavigate as we, useParams as Te } from "react-router-dom";
|
|
11
|
+
import { usePermissions as Ee } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
13
|
+
import { CTAOverflowMenu as De, EmphasisPanel as Oe, GlassCard as x, ResponsiveDialog as ke, ResponsiveDialogContent as Ae, ResponsiveDialogHeader as je, ResponsiveDialogTitle as S } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { TagBadge as Me } from "@burdenoff/fe-libs/tag";
|
|
15
15
|
//#region src/channel/modules/channels/pages/ChannelDetailsPage.tsx
|
|
16
|
-
var
|
|
16
|
+
var C = {
|
|
17
17
|
EMAIL: {
|
|
18
18
|
label: "Email",
|
|
19
19
|
color: "bg-accent-blue-subtle text-accent-blue"
|
|
@@ -54,7 +54,7 @@ var w = {
|
|
|
54
54
|
label: "Webchat",
|
|
55
55
|
color: "bg-accent-teal-subtle text-accent-teal"
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, w = {
|
|
58
58
|
ACTIVE: {
|
|
59
59
|
label: "Active",
|
|
60
60
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
@@ -63,12 +63,12 @@ var w = {
|
|
|
63
63
|
INACTIVE: {
|
|
64
64
|
label: "Inactive",
|
|
65
65
|
color: "text-text-secondary bg-bg-sunken",
|
|
66
|
-
icon:
|
|
66
|
+
icon: h
|
|
67
67
|
},
|
|
68
68
|
ERROR: {
|
|
69
69
|
label: "Error",
|
|
70
70
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
71
|
-
icon:
|
|
71
|
+
icon: v
|
|
72
72
|
},
|
|
73
73
|
SUSPENDED: {
|
|
74
74
|
label: "Suspended",
|
|
@@ -78,9 +78,9 @@ var w = {
|
|
|
78
78
|
ARCHIVED: {
|
|
79
79
|
label: "Archived",
|
|
80
80
|
color: "text-text-secondary bg-bg-sunken",
|
|
81
|
-
icon:
|
|
81
|
+
icon: h
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, T = {
|
|
84
84
|
HEALTHY: {
|
|
85
85
|
label: "Healthy",
|
|
86
86
|
color: "text-status-success-text",
|
|
@@ -94,7 +94,7 @@ var w = {
|
|
|
94
94
|
UNHEALTHY: {
|
|
95
95
|
label: "Unhealthy",
|
|
96
96
|
color: "text-status-error-text",
|
|
97
|
-
icon:
|
|
97
|
+
icon: v
|
|
98
98
|
},
|
|
99
99
|
UNKNOWN: {
|
|
100
100
|
label: "Unknown",
|
|
@@ -102,43 +102,43 @@ var w = {
|
|
|
102
102
|
icon: f
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
function
|
|
106
|
-
let { channelId: c } =
|
|
107
|
-
let n =
|
|
105
|
+
function E() {
|
|
106
|
+
let { channelId: c } = Te(), f = we(), E = Ce(), { hasPermission: D } = Ee(), O = D(i.CHANNEL_UPDATE), Ne = D(i.CHANNEL_EXECUTE), Pe = D(i.CHANNEL_CONNECTION_CREATE), Fe = D(i.CHANNEL_CONNECTION_UPDATE), { t: Ie } = se(), k = (e, t) => {
|
|
107
|
+
let n = Ie(e);
|
|
108
108
|
return n === e ? t : n;
|
|
109
|
-
}, A =
|
|
109
|
+
}, A = E.state, [j, M] = o(null), [N, P] = o(A?.showCredentialsForm || !1), [F, I] = o(A?.pendingCredentials || {}), [Le, L] = o(!1), [R, z] = o(null), [Re, B] = o(!1), [V, H] = o(""), [U, ze] = o(() => k("channel.testNotificationSubject", "Test Notification")), [W, Be] = o(() => k("channel.testNotificationBody", "This is a test notification from Burdenoff Channel Service.")), [G, K] = o(null);
|
|
110
110
|
oe(() => {
|
|
111
|
-
(A?.pendingCredentials || A?.showCredentialsForm) && f(
|
|
111
|
+
(A?.pendingCredentials || A?.showCredentialsForm) && f(E.pathname, {
|
|
112
112
|
replace: !0,
|
|
113
113
|
state: null
|
|
114
114
|
});
|
|
115
115
|
}, []);
|
|
116
|
-
let { channel: q, isLoading:
|
|
116
|
+
let { channel: q, isLoading: Ve, error: J, updateChannel: He, runHealthCheck: Ue, createConnection: We, updateConnection: Ge, deleteConnection: Ke, testConnection: qe, sendTestNotification: Je } = n(c), Ye = async () => {
|
|
117
117
|
M("health");
|
|
118
118
|
try {
|
|
119
|
-
await
|
|
119
|
+
await Ue();
|
|
120
120
|
} catch (e) {
|
|
121
121
|
console.error("[channel] Failed to run health check", e);
|
|
122
122
|
} finally {
|
|
123
123
|
M(null);
|
|
124
124
|
}
|
|
125
|
-
},
|
|
125
|
+
}, Xe = async () => {
|
|
126
126
|
if (q) {
|
|
127
127
|
M("status");
|
|
128
128
|
try {
|
|
129
|
-
await
|
|
129
|
+
await He({ status: q.status === "ACTIVE" ? "INACTIVE" : "ACTIVE" });
|
|
130
130
|
} catch (e) {
|
|
131
131
|
console.error("[channel] Failed to toggle channel status", e);
|
|
132
132
|
} finally {
|
|
133
133
|
M(null);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
},
|
|
136
|
+
}, Ze = async () => {
|
|
137
137
|
if (q) {
|
|
138
138
|
M("connection");
|
|
139
139
|
try {
|
|
140
140
|
let e = "API_KEY", t = q.adapterType;
|
|
141
|
-
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await
|
|
141
|
+
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await We({
|
|
142
142
|
authType: e,
|
|
143
143
|
credentials: F
|
|
144
144
|
}), P(!1), I({}), L(!1);
|
|
@@ -148,28 +148,28 @@ function D() {
|
|
|
148
148
|
M(null);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, Qe = async (e) => {
|
|
152
152
|
M("connection");
|
|
153
153
|
try {
|
|
154
|
-
await
|
|
154
|
+
await Ge(e, { credentials: F }), P(!1), I({}), L(!1);
|
|
155
155
|
} catch (e) {
|
|
156
156
|
console.error("[channel] Failed to update connection", e);
|
|
157
157
|
} finally {
|
|
158
158
|
M(null);
|
|
159
159
|
}
|
|
160
|
-
},
|
|
160
|
+
}, $e = async (n) => {
|
|
161
161
|
e("medium"), M("delete-connection");
|
|
162
162
|
try {
|
|
163
|
-
await
|
|
163
|
+
await Ke(n), t("success");
|
|
164
164
|
} catch (e) {
|
|
165
165
|
t("error"), console.error("[channel] Failed to delete connection", e);
|
|
166
166
|
} finally {
|
|
167
167
|
M(null);
|
|
168
168
|
}
|
|
169
|
-
},
|
|
169
|
+
}, et = async (e) => {
|
|
170
170
|
M("test"), z(null);
|
|
171
171
|
try {
|
|
172
|
-
let t = await
|
|
172
|
+
let t = await qe(e);
|
|
173
173
|
t && z({
|
|
174
174
|
success: t.success,
|
|
175
175
|
message: t.message || (t.success ? k("channel.connectionTestSuccess", "Connection successful!") : k("channel.connectionTestFailed", "Connection failed"))
|
|
@@ -182,14 +182,14 @@ function D() {
|
|
|
182
182
|
} finally {
|
|
183
183
|
M(null);
|
|
184
184
|
}
|
|
185
|
-
},
|
|
185
|
+
}, tt = async () => {
|
|
186
186
|
if (V.trim()) {
|
|
187
187
|
M("send-test"), K(null);
|
|
188
188
|
try {
|
|
189
189
|
let e = q?.platform === "EMAIL" ? {
|
|
190
190
|
subject: U,
|
|
191
191
|
html: `<p>${W}</p>`
|
|
192
|
-
} : void 0, t = await
|
|
192
|
+
} : void 0, t = await Je(V.trim(), W, e);
|
|
193
193
|
t && K({
|
|
194
194
|
success: t.success,
|
|
195
195
|
messageId: t.messageId,
|
|
@@ -227,7 +227,7 @@ function D() {
|
|
|
227
227
|
case "WHATSAPP": return k("channel.recipientPlaceholder.phone", "+1234567890");
|
|
228
228
|
default: return k("channel.recipientPlaceholder.default", "Recipient");
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, nt = (e) => {
|
|
231
231
|
switch (e) {
|
|
232
232
|
case "EMAIL": return k("channel.recipientLabel.email", "Email Address");
|
|
233
233
|
case "SMS":
|
|
@@ -238,40 +238,40 @@ function D() {
|
|
|
238
238
|
case "DISCORD": return k("channel.recipientLabel.channelOrUserId", "Channel/User ID");
|
|
239
239
|
default: return k("channel.recipientLabel.default", "Recipient");
|
|
240
240
|
}
|
|
241
|
-
},
|
|
242
|
-
...
|
|
241
|
+
}, rt = (e) => ({
|
|
242
|
+
...C[e] || {
|
|
243
243
|
label: e,
|
|
244
244
|
color: "bg-bg-sunken text-text-secondary"
|
|
245
245
|
},
|
|
246
246
|
label: a(e, ne, k)
|
|
247
|
-
}),
|
|
248
|
-
...
|
|
247
|
+
}), it = (e) => ({
|
|
248
|
+
...w[e] || w.INACTIVE,
|
|
249
249
|
label: a(e, re, k)
|
|
250
|
-
}),
|
|
251
|
-
...
|
|
250
|
+
}), at = (e) => ({
|
|
251
|
+
...T[e] || T.UNKNOWN,
|
|
252
252
|
label: a(e, te, k)
|
|
253
253
|
});
|
|
254
|
-
if (
|
|
254
|
+
if (Ve) return /* @__PURE__ */ y("div", {
|
|
255
255
|
className: "flex items-center justify-center min-h-screen",
|
|
256
|
-
children: /* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ y(p, {
|
|
257
257
|
size: 32,
|
|
258
258
|
className: "animate-spin text-accent-primary"
|
|
259
259
|
})
|
|
260
260
|
});
|
|
261
|
-
if (J || !q) return /* @__PURE__ */
|
|
261
|
+
if (J || !q) return /* @__PURE__ */ y("div", {
|
|
262
262
|
className: "p-6",
|
|
263
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ b("div", {
|
|
264
264
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ y(s, {
|
|
267
267
|
size: 20,
|
|
268
268
|
className: "text-status-error-text"
|
|
269
269
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ y("div", { children: /* @__PURE__ */ y("p", {
|
|
271
271
|
className: "text-sm font-medium text-status-error-text",
|
|
272
272
|
children: J || k("channel.channelNotFound", "Channel not found")
|
|
273
273
|
}) }),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ y("button", {
|
|
275
275
|
type: "button",
|
|
276
276
|
onClick: () => f(-1),
|
|
277
277
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
@@ -280,130 +280,138 @@ function D() {
|
|
|
280
280
|
]
|
|
281
281
|
})
|
|
282
282
|
});
|
|
283
|
-
let X =
|
|
284
|
-
return /* @__PURE__ */
|
|
283
|
+
let X = rt(q.platform), Z = it(q.status), Q = at(q.connectionHealth), ot = Z.icon, st = Q.icon, $ = q.connection;
|
|
284
|
+
return /* @__PURE__ */ y(r, {
|
|
285
285
|
permission: i.CHANNEL_READ,
|
|
286
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ b("div", {
|
|
287
287
|
className: "space-y-6 p-3 sm:p-6",
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ b("div", {
|
|
290
290
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ b("div", {
|
|
292
292
|
className: "flex items-center gap-3",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ y("button", {
|
|
294
294
|
type: "button",
|
|
295
295
|
onClick: () => f(-1),
|
|
296
296
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
297
|
-
children: /* @__PURE__ */
|
|
298
|
-
}), /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ y(ce, { size: 20 })
|
|
298
|
+
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
|
|
299
299
|
className: "flex items-center gap-2",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ y(_e, {
|
|
301
301
|
size: 24,
|
|
302
302
|
className: "text-accent-primary"
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ y("h1", {
|
|
304
304
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
305
305
|
children: q.name
|
|
306
306
|
})]
|
|
307
|
-
}), q.description && /* @__PURE__ */
|
|
307
|
+
}), q.description && /* @__PURE__ */ y("p", {
|
|
308
308
|
className: "text-sm text-text-secondary mt-1",
|
|
309
309
|
children: q.description
|
|
310
310
|
})] })]
|
|
311
|
-
}), /* @__PURE__ */
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
type: "button",
|
|
318
|
-
onClick: Ge,
|
|
319
|
-
disabled: j === "health",
|
|
320
|
-
className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
321
|
-
children: [j === "health" ? /* @__PURE__ */ x(p, {
|
|
322
|
-
size: 16,
|
|
323
|
-
className: "animate-spin"
|
|
324
|
-
}) : /* @__PURE__ */ x(_, { size: 16 }), k("channel.healthCheck", "Health Check")]
|
|
325
|
-
})
|
|
311
|
+
}), /* @__PURE__ */ y(De, {
|
|
312
|
+
primary: O ? {
|
|
313
|
+
label: k("channel.edit", "Edit"),
|
|
314
|
+
icon: /* @__PURE__ */ y(m, {
|
|
315
|
+
size: 16,
|
|
316
|
+
"aria-hidden": "true"
|
|
326
317
|
}),
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
318
|
+
onSelect: () => f("./edit")
|
|
319
|
+
} : void 0,
|
|
320
|
+
actions: [
|
|
321
|
+
...Ne ? [{
|
|
322
|
+
label: k("channel.healthCheck", "Health Check"),
|
|
323
|
+
icon: j === "health" ? /* @__PURE__ */ y(p, {
|
|
324
|
+
size: 16,
|
|
325
|
+
className: "animate-spin",
|
|
326
|
+
"aria-hidden": "true"
|
|
327
|
+
}) : /* @__PURE__ */ y(g, {
|
|
328
|
+
size: 16,
|
|
329
|
+
"aria-hidden": "true"
|
|
330
|
+
}),
|
|
331
|
+
disabled: j === "health",
|
|
332
|
+
onSelect: () => void Ye()
|
|
333
|
+
}] : [],
|
|
334
|
+
...O ? [{
|
|
335
|
+
label: q.status === "ACTIVE" ? k("channel.deactivate", "Deactivate") : k("channel.activate", "Activate"),
|
|
336
|
+
icon: j === "status" ? /* @__PURE__ */ y(p, {
|
|
337
|
+
size: 16,
|
|
338
|
+
className: "animate-spin",
|
|
339
|
+
"aria-hidden": "true"
|
|
340
|
+
}) : q.status === "ACTIVE" ? /* @__PURE__ */ y(h, {
|
|
341
|
+
size: 16,
|
|
342
|
+
"aria-hidden": "true"
|
|
343
|
+
}) : /* @__PURE__ */ y(ge, {
|
|
344
|
+
size: 16,
|
|
345
|
+
"aria-hidden": "true"
|
|
346
|
+
}),
|
|
347
|
+
disabled: j === "status",
|
|
348
|
+
onSelect: () => void Xe()
|
|
349
|
+
}] : [],
|
|
350
|
+
{
|
|
351
|
+
label: k("channel.testChannel", "Test Channel"),
|
|
352
|
+
icon: /* @__PURE__ */ y(_, {
|
|
353
|
+
size: 16,
|
|
354
|
+
"aria-hidden": "true"
|
|
355
|
+
}),
|
|
345
356
|
disabled: !q.connection,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
}
|
|
350
|
-
ke && /* @__PURE__ */ S("button", {
|
|
351
|
-
type: "button",
|
|
352
|
-
onClick: () => f("./edit"),
|
|
353
|
-
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors shadow-sm",
|
|
354
|
-
children: [/* @__PURE__ */ x(m, { size: 16 }), k("channel.edit", "Edit")]
|
|
355
|
-
})
|
|
357
|
+
onSelect: () => {
|
|
358
|
+
B(!0), K(null), H("");
|
|
359
|
+
}
|
|
360
|
+
}
|
|
356
361
|
]
|
|
357
362
|
})]
|
|
358
363
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ b("div", {
|
|
360
365
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
361
366
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
|
|
364
|
-
|
|
367
|
+
/* @__PURE__ */ b(x, {
|
|
368
|
+
treatment: "metric",
|
|
369
|
+
className: "p-4 border-border-seam",
|
|
370
|
+
children: [/* @__PURE__ */ y("p", {
|
|
365
371
|
className: "text-xs text-text-secondary mb-1",
|
|
366
372
|
children: k("channel.platform", "Platform")
|
|
367
|
-
}), /* @__PURE__ */
|
|
373
|
+
}), /* @__PURE__ */ y("span", {
|
|
368
374
|
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${X.color}`,
|
|
369
375
|
children: X.label
|
|
370
376
|
})]
|
|
371
377
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
|
|
374
|
-
|
|
378
|
+
/* @__PURE__ */ b(x, {
|
|
379
|
+
treatment: "metric",
|
|
380
|
+
className: "p-4 border-border-seam",
|
|
381
|
+
children: [/* @__PURE__ */ y("p", {
|
|
375
382
|
className: "text-xs text-text-secondary mb-1",
|
|
376
383
|
children: k("channel.status", "Status")
|
|
377
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ b("div", {
|
|
378
385
|
className: "flex items-center gap-2",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ y(ot, {
|
|
380
387
|
size: 16,
|
|
381
388
|
className: Z.color.split(" ")[0]
|
|
382
|
-
}), /* @__PURE__ */
|
|
389
|
+
}), /* @__PURE__ */ y("span", {
|
|
383
390
|
className: `px-2 py-1 text-sm font-medium rounded-full ${Z.color}`,
|
|
384
391
|
children: Z.label
|
|
385
392
|
})]
|
|
386
393
|
})]
|
|
387
394
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
395
|
+
/* @__PURE__ */ b(x, {
|
|
396
|
+
treatment: "metric",
|
|
397
|
+
className: "p-4 border-border-seam",
|
|
390
398
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ y("p", {
|
|
392
400
|
className: "text-xs text-text-secondary mb-1",
|
|
393
401
|
children: k("channel.connectionHealth", "Connection Health")
|
|
394
402
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ b("div", {
|
|
396
404
|
className: "flex items-center gap-2",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ y(st, {
|
|
398
406
|
size: 16,
|
|
399
407
|
className: Q.color
|
|
400
|
-
}), /* @__PURE__ */
|
|
408
|
+
}), /* @__PURE__ */ y("span", {
|
|
401
409
|
className: `text-sm font-medium ${Q.color}`,
|
|
402
410
|
children: Q.label
|
|
403
411
|
})]
|
|
404
412
|
}),
|
|
405
|
-
q.lastHealthCheckAt && /* @__PURE__ */
|
|
406
|
-
className: "text-xs text-text-
|
|
413
|
+
q.lastHealthCheckAt && /* @__PURE__ */ b("p", {
|
|
414
|
+
className: "text-xs text-text-muted mt-1",
|
|
407
415
|
children: [
|
|
408
416
|
k("channel.lastCheck", "Last check"),
|
|
409
417
|
":",
|
|
@@ -413,17 +421,18 @@ function D() {
|
|
|
413
421
|
})
|
|
414
422
|
]
|
|
415
423
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
|
|
418
|
-
|
|
424
|
+
/* @__PURE__ */ b(x, {
|
|
425
|
+
treatment: "metric",
|
|
426
|
+
className: "p-4 border-border-seam",
|
|
427
|
+
children: [/* @__PURE__ */ y("p", {
|
|
419
428
|
className: "text-xs text-text-secondary mb-1",
|
|
420
429
|
children: k("channel.connection", "Connection")
|
|
421
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ b("div", {
|
|
422
431
|
className: "flex items-center gap-2",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ y(u, {
|
|
424
433
|
size: 16,
|
|
425
434
|
className: q.isConnected ? "text-status-success-text" : "text-text-secondary"
|
|
426
|
-
}), /* @__PURE__ */
|
|
435
|
+
}), /* @__PURE__ */ y("span", {
|
|
427
436
|
className: `text-sm font-medium ${q.isConnected ? "text-status-success-text" : "text-text-secondary"}`,
|
|
428
437
|
children: q.isConnected ? k("channel.connected", "Connected") : k("channel.notConnected", "Not Connected")
|
|
429
438
|
})]
|
|
@@ -431,169 +440,169 @@ function D() {
|
|
|
431
440
|
})
|
|
432
441
|
]
|
|
433
442
|
}),
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
className: "p-4
|
|
443
|
+
/* @__PURE__ */ b(Oe, {
|
|
444
|
+
className: "p-4",
|
|
436
445
|
children: [
|
|
437
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ y("h2", {
|
|
438
447
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
439
448
|
children: k("channel.channelDetails", "Channel Details")
|
|
440
449
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ b("div", {
|
|
442
451
|
className: "grid gap-4 sm:grid-cols-2",
|
|
443
452
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
445
454
|
className: "text-xs text-text-secondary",
|
|
446
455
|
children: k("channel.adapterType", "Adapter Type")
|
|
447
|
-
}), /* @__PURE__ */
|
|
456
|
+
}), /* @__PURE__ */ y("p", {
|
|
448
457
|
className: "text-sm font-medium text-text-primary",
|
|
449
458
|
children: q.adapterType?.replace(/_/g, " ") || k("channel.notConfigured", "Not configured")
|
|
450
459
|
})] }),
|
|
451
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
452
461
|
className: "text-xs text-text-secondary",
|
|
453
462
|
children: k("channel.priority", "Priority")
|
|
454
|
-
}), /* @__PURE__ */
|
|
463
|
+
}), /* @__PURE__ */ y("p", {
|
|
455
464
|
className: "text-sm font-medium text-text-primary",
|
|
456
465
|
children: q.priority
|
|
457
466
|
})] }),
|
|
458
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
459
468
|
className: "text-xs text-text-secondary",
|
|
460
469
|
children: k("channel.consecutiveFailures", "Consecutive Failures")
|
|
461
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ y("p", {
|
|
462
471
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
463
472
|
children: q.consecutiveFailures
|
|
464
473
|
})] }),
|
|
465
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
466
475
|
className: "text-xs text-text-secondary",
|
|
467
476
|
children: k("channel.messages24h", "Messages (24h)")
|
|
468
|
-
}), /* @__PURE__ */
|
|
477
|
+
}), /* @__PURE__ */ y("p", {
|
|
469
478
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
470
479
|
children: q.messageCount24h
|
|
471
480
|
})] }),
|
|
472
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
473
482
|
className: "text-xs text-text-secondary",
|
|
474
483
|
children: k("channel.createdAt", "Created At")
|
|
475
|
-
}), /* @__PURE__ */
|
|
484
|
+
}), /* @__PURE__ */ y("p", {
|
|
476
485
|
className: "text-sm font-medium text-text-primary",
|
|
477
486
|
children: new Date(q.createdAt).toLocaleString()
|
|
478
487
|
})] }),
|
|
479
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
480
489
|
className: "text-xs text-text-secondary",
|
|
481
490
|
children: k("channel.updatedAt", "Updated At")
|
|
482
|
-
}), /* @__PURE__ */
|
|
491
|
+
}), /* @__PURE__ */ y("p", {
|
|
483
492
|
className: "text-sm font-medium text-text-primary",
|
|
484
493
|
children: new Date(q.updatedAt).toLocaleString()
|
|
485
494
|
})] })
|
|
486
495
|
]
|
|
487
496
|
}),
|
|
488
|
-
q.tagAssignments && q.tagAssignments.length > 0 && /* @__PURE__ */
|
|
497
|
+
q.tagAssignments && q.tagAssignments.length > 0 && /* @__PURE__ */ b("div", {
|
|
489
498
|
className: "mt-4",
|
|
490
|
-
children: [/* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ y("p", {
|
|
491
500
|
className: "text-xs text-text-secondary mb-1.5",
|
|
492
501
|
children: k("channel.tags", "Tags")
|
|
493
|
-
}), /* @__PURE__ */
|
|
502
|
+
}), /* @__PURE__ */ y("div", {
|
|
494
503
|
className: "flex flex-wrap gap-1.5",
|
|
495
504
|
"aria-label": "Channel tags",
|
|
496
|
-
children: q.tagAssignments.map((e) => /* @__PURE__ */
|
|
505
|
+
children: q.tagAssignments.map((e) => /* @__PURE__ */ y(Me, {
|
|
497
506
|
id: e.tagId,
|
|
498
507
|
label: e.tagId,
|
|
499
508
|
size: "md"
|
|
500
509
|
}, e.id))
|
|
501
510
|
})]
|
|
502
511
|
}),
|
|
503
|
-
q.healthCheckError && /* @__PURE__ */
|
|
512
|
+
q.healthCheckError && /* @__PURE__ */ b("div", {
|
|
504
513
|
className: "mt-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ y("p", {
|
|
506
515
|
className: "text-xs text-status-error-text font-medium",
|
|
507
516
|
children: k("channel.lastHealthCheckError", "Last Health Check Error")
|
|
508
|
-
}), /* @__PURE__ */
|
|
517
|
+
}), /* @__PURE__ */ y("p", {
|
|
509
518
|
className: "text-sm text-status-error-text",
|
|
510
519
|
children: q.healthCheckError
|
|
511
520
|
})]
|
|
512
521
|
})
|
|
513
522
|
]
|
|
514
523
|
}),
|
|
515
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ b("div", {
|
|
516
525
|
className: "grid gap-3 sm:grid-cols-3",
|
|
517
526
|
children: [
|
|
518
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ b("button", {
|
|
519
528
|
type: "button",
|
|
520
529
|
onClick: () => f("./deliveries"),
|
|
521
|
-
className: "flex items-center gap-3 p-3 bg-
|
|
530
|
+
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
522
531
|
children: [
|
|
523
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ y("div", {
|
|
524
533
|
className: "p-2 bg-accent-orange/10 rounded-lg",
|
|
525
|
-
children: /* @__PURE__ */
|
|
534
|
+
children: /* @__PURE__ */ y(be, {
|
|
526
535
|
size: 18,
|
|
527
536
|
className: "text-accent-orange"
|
|
528
537
|
})
|
|
529
538
|
}),
|
|
530
|
-
/* @__PURE__ */
|
|
539
|
+
/* @__PURE__ */ b("div", {
|
|
531
540
|
className: "flex-1 min-w-0",
|
|
532
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ y("p", {
|
|
533
542
|
className: "text-sm font-medium text-text-primary",
|
|
534
543
|
children: k("channel.deliveryHistory", "Delivery History")
|
|
535
|
-
}), /* @__PURE__ */
|
|
544
|
+
}), /* @__PURE__ */ y("p", {
|
|
536
545
|
className: "text-xs text-text-secondary truncate",
|
|
537
546
|
children: k("channel.viewMessageDeliveries", "View message deliveries")
|
|
538
547
|
})]
|
|
539
548
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ y(l, {
|
|
541
550
|
size: 16,
|
|
542
551
|
className: "text-text-secondary shrink-0"
|
|
543
552
|
})
|
|
544
553
|
]
|
|
545
554
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ b("button", {
|
|
547
556
|
type: "button",
|
|
548
557
|
onClick: () => f("./webhooks"),
|
|
549
|
-
className: "flex items-center gap-3 p-3 bg-
|
|
558
|
+
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
550
559
|
children: [
|
|
551
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ y("div", {
|
|
552
561
|
className: "p-2 bg-accent-purple/10 rounded-lg",
|
|
553
|
-
children: /* @__PURE__ */
|
|
562
|
+
children: /* @__PURE__ */ y(le, {
|
|
554
563
|
size: 18,
|
|
555
564
|
className: "text-accent-purple"
|
|
556
565
|
})
|
|
557
566
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ b("div", {
|
|
559
568
|
className: "flex-1 min-w-0",
|
|
560
|
-
children: [/* @__PURE__ */
|
|
569
|
+
children: [/* @__PURE__ */ y("p", {
|
|
561
570
|
className: "text-sm font-medium text-text-primary",
|
|
562
571
|
children: k("channel.webhookEvents", "Webhook Events")
|
|
563
|
-
}), /* @__PURE__ */
|
|
572
|
+
}), /* @__PURE__ */ y("p", {
|
|
564
573
|
className: "text-xs text-text-secondary truncate",
|
|
565
574
|
children: k("channel.viewIncomingWebhooks", "View incoming webhooks")
|
|
566
575
|
})]
|
|
567
576
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
577
|
+
/* @__PURE__ */ y(l, {
|
|
569
578
|
size: 16,
|
|
570
579
|
className: "text-text-secondary shrink-0"
|
|
571
580
|
})
|
|
572
581
|
]
|
|
573
582
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ b("button", {
|
|
575
584
|
type: "button",
|
|
576
585
|
onClick: () => f("./users"),
|
|
577
|
-
className: "flex items-center gap-3 p-3 bg-
|
|
586
|
+
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
578
587
|
children: [
|
|
579
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ y("div", {
|
|
580
589
|
className: "p-2 bg-accent-blue/10 rounded-lg",
|
|
581
|
-
children: /* @__PURE__ */
|
|
590
|
+
children: /* @__PURE__ */ y(xe, {
|
|
582
591
|
size: 18,
|
|
583
592
|
className: "text-accent-blue"
|
|
584
593
|
})
|
|
585
594
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ b("div", {
|
|
587
596
|
className: "flex-1 min-w-0",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
597
|
+
children: [/* @__PURE__ */ y("p", {
|
|
589
598
|
className: "text-sm font-medium text-text-primary",
|
|
590
599
|
children: k("channel.channelUsers", "Channel Users")
|
|
591
|
-
}), /* @__PURE__ */
|
|
600
|
+
}), /* @__PURE__ */ y("p", {
|
|
592
601
|
className: "text-xs text-text-secondary truncate",
|
|
593
602
|
children: k("channel.viewConnectedUsers", "View connected users")
|
|
594
603
|
})]
|
|
595
604
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ y(l, {
|
|
597
606
|
size: 16,
|
|
598
607
|
className: "text-text-secondary shrink-0"
|
|
599
608
|
})
|
|
@@ -601,76 +610,77 @@ function D() {
|
|
|
601
610
|
})
|
|
602
611
|
]
|
|
603
612
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
605
|
-
|
|
613
|
+
/* @__PURE__ */ b(x, {
|
|
614
|
+
treatment: "plain",
|
|
615
|
+
className: "p-4 border-border-seam",
|
|
606
616
|
children: [
|
|
607
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ b("div", {
|
|
608
618
|
className: "flex items-center justify-between mb-4",
|
|
609
|
-
children: [/* @__PURE__ */
|
|
619
|
+
children: [/* @__PURE__ */ b("div", {
|
|
610
620
|
className: "flex items-center gap-2",
|
|
611
|
-
children: [/* @__PURE__ */
|
|
621
|
+
children: [/* @__PURE__ */ y(ue, {
|
|
612
622
|
size: 20,
|
|
613
623
|
className: "text-accent-primary"
|
|
614
|
-
}), /* @__PURE__ */
|
|
624
|
+
}), /* @__PURE__ */ y("h2", {
|
|
615
625
|
className: "text-lg font-semibold text-text-primary",
|
|
616
626
|
children: k("channel.connectionAndCredentials", "Connection & Credentials")
|
|
617
627
|
})]
|
|
618
|
-
}),
|
|
628
|
+
}), Pe && !$ && !N && /* @__PURE__ */ b("button", {
|
|
619
629
|
type: "button",
|
|
620
630
|
onClick: () => P(!0),
|
|
621
631
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
|
|
622
|
-
children: [/* @__PURE__ */
|
|
632
|
+
children: [/* @__PURE__ */ y(he, { size: 16 }), k("channel.addCredentials", "Add Credentials")]
|
|
623
633
|
})]
|
|
624
634
|
}),
|
|
625
|
-
$ && !N && /* @__PURE__ */
|
|
635
|
+
$ && !N && /* @__PURE__ */ b("div", {
|
|
626
636
|
className: "space-y-4",
|
|
627
637
|
children: [
|
|
628
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ b("div", {
|
|
629
639
|
className: "grid gap-4 sm:grid-cols-2",
|
|
630
640
|
children: [
|
|
631
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
632
642
|
className: "text-xs text-text-secondary",
|
|
633
643
|
children: k("channel.authType", "Auth Type")
|
|
634
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__PURE__ */ y("p", {
|
|
635
645
|
className: "text-sm font-medium text-text-primary",
|
|
636
646
|
children: a($.authType, ee, k)
|
|
637
647
|
})] }),
|
|
638
|
-
/* @__PURE__ */
|
|
648
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
639
649
|
className: "text-xs text-text-secondary",
|
|
640
650
|
children: k("channel.status", "Status")
|
|
641
|
-
}), /* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ b("div", {
|
|
642
652
|
className: "flex items-center gap-2",
|
|
643
|
-
children: [$.isHealthy ? /* @__PURE__ */
|
|
653
|
+
children: [$.isHealthy ? /* @__PURE__ */ y(d, {
|
|
644
654
|
size: 14,
|
|
645
655
|
className: "text-status-success-text"
|
|
646
|
-
}) : /* @__PURE__ */
|
|
656
|
+
}) : /* @__PURE__ */ y(v, {
|
|
647
657
|
size: 14,
|
|
648
658
|
className: "text-status-error-text"
|
|
649
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ y("span", {
|
|
650
660
|
className: `text-sm font-medium ${$.isHealthy ? "text-status-success-text" : "text-status-error-text"}`,
|
|
651
661
|
children: $.isHealthy ? k("channel.healthy", "Healthy") : k("channel.unhealthy", "Unhealthy")
|
|
652
662
|
})]
|
|
653
663
|
})] }),
|
|
654
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
655
665
|
className: "text-xs text-text-secondary",
|
|
656
666
|
children: k("channel.lastTested", "Last Tested")
|
|
657
|
-
}), /* @__PURE__ */
|
|
667
|
+
}), /* @__PURE__ */ y("p", {
|
|
658
668
|
className: "text-sm font-medium text-text-primary",
|
|
659
669
|
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : k("channel.never", "Never")
|
|
660
670
|
})] }),
|
|
661
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
662
672
|
className: "text-xs text-text-secondary",
|
|
663
673
|
children: k("channel.testStatus", "Test Status")
|
|
664
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ y("p", {
|
|
665
675
|
className: "text-sm font-medium text-text-primary",
|
|
666
676
|
children: $.testStatus || k("channel.notTested", "Not tested")
|
|
667
677
|
})] }),
|
|
668
|
-
$.tokenExpiresAt && /* @__PURE__ */
|
|
678
|
+
$.tokenExpiresAt && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
669
679
|
className: "text-xs text-text-secondary",
|
|
670
680
|
children: k("channel.tokenExpires", "Token Expires")
|
|
671
|
-
}), /* @__PURE__ */
|
|
681
|
+
}), /* @__PURE__ */ b("p", {
|
|
672
682
|
className: `text-sm font-medium ${$.needsTokenRefresh ? "text-status-warning-text" : "text-text-primary"}`,
|
|
673
|
-
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */
|
|
683
|
+
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ b("span", {
|
|
674
684
|
className: "text-xs text-text-secondary ml-1",
|
|
675
685
|
children: [
|
|
676
686
|
"(",
|
|
@@ -683,250 +693,250 @@ function D() {
|
|
|
683
693
|
})] })
|
|
684
694
|
]
|
|
685
695
|
}),
|
|
686
|
-
R && /* @__PURE__ */
|
|
696
|
+
R && /* @__PURE__ */ y("div", {
|
|
687
697
|
className: `p-3 rounded-lg ${R.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
688
|
-
children: /* @__PURE__ */
|
|
698
|
+
children: /* @__PURE__ */ b("div", {
|
|
689
699
|
className: "flex items-center gap-2",
|
|
690
|
-
children: [R.success ? /* @__PURE__ */
|
|
700
|
+
children: [R.success ? /* @__PURE__ */ y(d, {
|
|
691
701
|
size: 16,
|
|
692
702
|
className: "text-status-success-text"
|
|
693
|
-
}) : /* @__PURE__ */
|
|
703
|
+
}) : /* @__PURE__ */ y(v, {
|
|
694
704
|
size: 16,
|
|
695
705
|
className: "text-status-error-text"
|
|
696
|
-
}), /* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ y("p", {
|
|
697
707
|
className: `text-sm font-medium ${R.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
698
708
|
children: R.message
|
|
699
709
|
})]
|
|
700
710
|
})
|
|
701
711
|
}),
|
|
702
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ b("div", {
|
|
703
713
|
className: "flex items-center gap-2 pt-2",
|
|
704
714
|
children: [
|
|
705
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ y(r, {
|
|
706
716
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
707
|
-
children: /* @__PURE__ */
|
|
717
|
+
children: /* @__PURE__ */ b("button", {
|
|
708
718
|
type: "button",
|
|
709
|
-
onClick: () =>
|
|
719
|
+
onClick: () => et($.id),
|
|
710
720
|
disabled: j === "test",
|
|
711
721
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
712
|
-
children: [j === "test" ? /* @__PURE__ */
|
|
722
|
+
children: [j === "test" ? /* @__PURE__ */ y(p, {
|
|
713
723
|
size: 16,
|
|
714
724
|
className: "animate-spin"
|
|
715
|
-
}) : /* @__PURE__ */
|
|
725
|
+
}) : /* @__PURE__ */ y(me, { size: 16 }), k("channel.testConnection", "Test Connection")]
|
|
716
726
|
})
|
|
717
727
|
}),
|
|
718
|
-
|
|
728
|
+
Fe && /* @__PURE__ */ b("button", {
|
|
719
729
|
type: "button",
|
|
720
730
|
onClick: () => {
|
|
721
731
|
P(!0), I($?.platformMetadata ?? {});
|
|
722
732
|
},
|
|
723
733
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors",
|
|
724
|
-
children: [/* @__PURE__ */
|
|
734
|
+
children: [/* @__PURE__ */ y(m, { size: 16 }), k("channel.updateCredentials", "Update Credentials")]
|
|
725
735
|
}),
|
|
726
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ y(r, {
|
|
727
737
|
permission: i.CHANNEL_CONNECTION_DELETE,
|
|
728
|
-
children: /* @__PURE__ */
|
|
738
|
+
children: /* @__PURE__ */ b("button", {
|
|
729
739
|
type: "button",
|
|
730
|
-
onClick: () =>
|
|
740
|
+
onClick: () => $e($.id),
|
|
731
741
|
disabled: j === "delete-connection",
|
|
732
742
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
733
|
-
children: [j === "delete-connection" ? /* @__PURE__ */
|
|
743
|
+
children: [j === "delete-connection" ? /* @__PURE__ */ y(p, {
|
|
734
744
|
size: 16,
|
|
735
745
|
className: "animate-spin"
|
|
736
|
-
}) : /* @__PURE__ */
|
|
746
|
+
}) : /* @__PURE__ */ y(ye, { size: 16 }), k("channel.remove", "Remove")]
|
|
737
747
|
})
|
|
738
748
|
})
|
|
739
749
|
]
|
|
740
750
|
})
|
|
741
751
|
]
|
|
742
752
|
}),
|
|
743
|
-
!$ && !N && /* @__PURE__ */
|
|
753
|
+
!$ && !N && /* @__PURE__ */ b("div", {
|
|
744
754
|
className: "text-center py-8",
|
|
745
755
|
children: [
|
|
746
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ y(u, {
|
|
747
757
|
size: 32,
|
|
748
758
|
className: "mx-auto text-text-secondary mb-3"
|
|
749
759
|
}),
|
|
750
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ y("p", {
|
|
751
761
|
className: "text-sm text-text-secondary mb-2",
|
|
752
762
|
children: k("channel.noCredentialsConfigured", "No credentials configured for this channel")
|
|
753
763
|
}),
|
|
754
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ y("p", {
|
|
755
765
|
className: "text-xs text-text-secondary",
|
|
756
766
|
children: k("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
|
|
757
767
|
})
|
|
758
768
|
]
|
|
759
769
|
}),
|
|
760
|
-
N && /* @__PURE__ */
|
|
770
|
+
N && /* @__PURE__ */ b("div", {
|
|
761
771
|
className: "space-y-4",
|
|
762
772
|
children: [
|
|
763
|
-
!q.adapterType && /* @__PURE__ */
|
|
773
|
+
!q.adapterType && /* @__PURE__ */ y("div", {
|
|
764
774
|
className: "p-3 bg-accent-orange/10 border border-accent-orange/30 rounded-lg",
|
|
765
|
-
children: /* @__PURE__ */
|
|
775
|
+
children: /* @__PURE__ */ b("div", {
|
|
766
776
|
className: "flex items-start gap-2",
|
|
767
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ y(s, {
|
|
768
778
|
size: 16,
|
|
769
779
|
className: "text-accent-orange mt-0.5"
|
|
770
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
771
781
|
className: "text-sm font-medium text-accent-orange",
|
|
772
782
|
children: k("channel.noAdapterTypeConfigured", "No adapter type configured")
|
|
773
|
-
}), /* @__PURE__ */
|
|
783
|
+
}), /* @__PURE__ */ y("p", {
|
|
774
784
|
className: "text-xs text-text-secondary mt-1",
|
|
775
785
|
children: k("channel.noAdapterTypeConfiguredHint", "You can still add credentials below. The system will attempt to validate them when the channel is configured with an adapter type.")
|
|
776
786
|
})] })]
|
|
777
787
|
})
|
|
778
788
|
}),
|
|
779
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ y(ie, {
|
|
780
790
|
adapterType: q.adapterType ?? void 0,
|
|
781
791
|
credentials: F,
|
|
782
792
|
onChange: I,
|
|
783
793
|
onValidationChange: (e) => L(e),
|
|
784
794
|
disabled: j === "connection"
|
|
785
795
|
}),
|
|
786
|
-
q.adapterType && /* @__PURE__ */
|
|
796
|
+
q.adapterType && /* @__PURE__ */ y("div", {
|
|
787
797
|
className: "pt-2",
|
|
788
|
-
children: /* @__PURE__ */
|
|
798
|
+
children: /* @__PURE__ */ y(ae, {
|
|
789
799
|
adapterType: q.adapterType,
|
|
790
800
|
credentials: F
|
|
791
801
|
})
|
|
792
802
|
}),
|
|
793
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ b("div", {
|
|
794
804
|
className: "flex items-center gap-2 pt-2 border-t border-border-subtle",
|
|
795
|
-
children: [/* @__PURE__ */
|
|
805
|
+
children: [/* @__PURE__ */ y(r, {
|
|
796
806
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
797
|
-
children: /* @__PURE__ */
|
|
807
|
+
children: /* @__PURE__ */ b("button", {
|
|
798
808
|
type: "button",
|
|
799
809
|
onClick: () => {
|
|
800
|
-
$ ?
|
|
810
|
+
$ ? Qe($.id) : Ze();
|
|
801
811
|
},
|
|
802
|
-
disabled: j === "connection" || !
|
|
812
|
+
disabled: j === "connection" || !Le && !!q.adapterType,
|
|
803
813
|
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
804
|
-
children: [j === "connection" ? /* @__PURE__ */
|
|
814
|
+
children: [j === "connection" ? /* @__PURE__ */ y(p, {
|
|
805
815
|
size: 16,
|
|
806
816
|
className: "animate-spin"
|
|
807
|
-
}) : /* @__PURE__ */
|
|
817
|
+
}) : /* @__PURE__ */ y(ve, { size: 16 }), $ ? k("channel.updateCredentials", "Update Credentials") : k("channel.saveCredentials", "Save Credentials")]
|
|
808
818
|
})
|
|
809
|
-
}), /* @__PURE__ */
|
|
819
|
+
}), /* @__PURE__ */ b("button", {
|
|
810
820
|
type: "button",
|
|
811
821
|
onClick: () => {
|
|
812
822
|
P(!1), I({}), L(!1);
|
|
813
823
|
},
|
|
814
824
|
className: "flex items-center gap-2 px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
815
|
-
children: [/* @__PURE__ */
|
|
825
|
+
children: [/* @__PURE__ */ y(Se, { size: 16 }), k("channel.cancel", "Cancel")]
|
|
816
826
|
})]
|
|
817
827
|
})
|
|
818
828
|
]
|
|
819
829
|
})
|
|
820
830
|
]
|
|
821
831
|
}),
|
|
822
|
-
/* @__PURE__ */
|
|
823
|
-
open:
|
|
832
|
+
/* @__PURE__ */ y(ke, {
|
|
833
|
+
open: Re,
|
|
824
834
|
onOpenChange: (e) => {
|
|
825
835
|
e || B(!1);
|
|
826
836
|
},
|
|
827
|
-
children: /* @__PURE__ */
|
|
837
|
+
children: /* @__PURE__ */ b(Ae, {
|
|
828
838
|
className: "sm:max-w-md",
|
|
829
|
-
children: [/* @__PURE__ */
|
|
839
|
+
children: [/* @__PURE__ */ y(je, { children: /* @__PURE__ */ b(S, {
|
|
830
840
|
className: "flex items-center gap-2",
|
|
831
841
|
children: [
|
|
832
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ y(_, {
|
|
833
843
|
size: 20,
|
|
834
844
|
className: "text-accent-primary"
|
|
835
845
|
}),
|
|
836
846
|
"Test ",
|
|
837
|
-
|
|
847
|
+
C[q.platform]?.label || q.platform,
|
|
838
848
|
" Channel"
|
|
839
849
|
]
|
|
840
|
-
}) }), /* @__PURE__ */
|
|
850
|
+
}) }), /* @__PURE__ */ b("div", {
|
|
841
851
|
className: "space-y-4",
|
|
842
852
|
children: [
|
|
843
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("label", {
|
|
844
854
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
845
855
|
children: [
|
|
846
|
-
|
|
856
|
+
nt(q.platform),
|
|
847
857
|
" ",
|
|
848
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ y("span", {
|
|
849
859
|
className: "text-status-error-text",
|
|
850
860
|
children: "*"
|
|
851
861
|
})
|
|
852
862
|
]
|
|
853
|
-
}), /* @__PURE__ */
|
|
863
|
+
}), /* @__PURE__ */ b("div", {
|
|
854
864
|
className: "relative",
|
|
855
|
-
children: [/* @__PURE__ */
|
|
865
|
+
children: [/* @__PURE__ */ y("input", {
|
|
856
866
|
"aria-label": Y(q.platform),
|
|
857
867
|
type: "text",
|
|
858
868
|
value: V,
|
|
859
869
|
onChange: (e) => H(e.target.value),
|
|
860
870
|
placeholder: Y(q.platform),
|
|
861
871
|
className: "w-full pl-9 pr-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
862
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ y("div", {
|
|
863
873
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
864
|
-
children: q.platform === "EMAIL" ? /* @__PURE__ */
|
|
874
|
+
children: q.platform === "EMAIL" ? /* @__PURE__ */ y(de, { size: 16 }) : q.platform === "SMS" || q.platform === "WHATSAPP" ? /* @__PURE__ */ y(pe, { size: 16 }) : /* @__PURE__ */ y(fe, { size: 16 })
|
|
865
875
|
})]
|
|
866
876
|
})] }),
|
|
867
|
-
q.platform === "EMAIL" && /* @__PURE__ */
|
|
877
|
+
q.platform === "EMAIL" && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
868
878
|
htmlFor: "channel-details-test-subject",
|
|
869
879
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
870
880
|
children: "Subject"
|
|
871
|
-
}), /* @__PURE__ */
|
|
881
|
+
}), /* @__PURE__ */ y("input", {
|
|
872
882
|
id: "channel-details-test-subject",
|
|
873
883
|
"aria-label": "Email subject",
|
|
874
884
|
type: "text",
|
|
875
885
|
value: U,
|
|
876
|
-
onChange: (e) =>
|
|
886
|
+
onChange: (e) => ze(e.target.value),
|
|
877
887
|
placeholder: "Email subject",
|
|
878
888
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
879
889
|
})] }),
|
|
880
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
881
891
|
htmlFor: "channel-details-test-message",
|
|
882
892
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
883
893
|
children: "Message"
|
|
884
|
-
}), /* @__PURE__ */
|
|
894
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
885
895
|
id: "channel-details-test-message",
|
|
886
896
|
"aria-label": "Test message content",
|
|
887
897
|
value: W,
|
|
888
|
-
onChange: (e) =>
|
|
898
|
+
onChange: (e) => Be(e.target.value),
|
|
889
899
|
placeholder: "Test message content",
|
|
890
900
|
rows: 3,
|
|
891
901
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none"
|
|
892
902
|
})] }),
|
|
893
|
-
G && /* @__PURE__ */
|
|
903
|
+
G && /* @__PURE__ */ y("div", {
|
|
894
904
|
className: `p-3 rounded-lg ${G.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
895
|
-
children: /* @__PURE__ */
|
|
905
|
+
children: /* @__PURE__ */ b("div", {
|
|
896
906
|
className: "flex items-start gap-2",
|
|
897
|
-
children: [G.success ? /* @__PURE__ */
|
|
907
|
+
children: [G.success ? /* @__PURE__ */ y(d, {
|
|
898
908
|
size: 16,
|
|
899
909
|
className: "text-status-success-text mt-0.5"
|
|
900
|
-
}) : /* @__PURE__ */
|
|
910
|
+
}) : /* @__PURE__ */ y(v, {
|
|
901
911
|
size: 16,
|
|
902
912
|
className: "text-status-error-text mt-0.5"
|
|
903
|
-
}), /* @__PURE__ */
|
|
913
|
+
}), /* @__PURE__ */ b("div", {
|
|
904
914
|
className: "flex-1",
|
|
905
915
|
children: [
|
|
906
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ y("p", {
|
|
907
917
|
className: `text-sm font-medium ${G.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
908
918
|
children: G.success ? k("channel.messageSentSuccess", "Message sent successfully!") : k("channel.messageSendFailed", "Failed to send message")
|
|
909
919
|
}),
|
|
910
|
-
G.messageId && /* @__PURE__ */
|
|
920
|
+
G.messageId && /* @__PURE__ */ b("p", {
|
|
911
921
|
className: "text-xs text-success-600 mt-1",
|
|
912
922
|
children: ["Message ID: ", G.messageId]
|
|
913
923
|
}),
|
|
914
|
-
G.externalId && /* @__PURE__ */
|
|
924
|
+
G.externalId && /* @__PURE__ */ b("p", {
|
|
915
925
|
className: "text-xs text-text-secondary mt-1",
|
|
916
926
|
children: ["External ID: ", G.externalId]
|
|
917
927
|
}),
|
|
918
|
-
G.status && /* @__PURE__ */
|
|
928
|
+
G.status && /* @__PURE__ */ b("p", {
|
|
919
929
|
className: "text-xs text-text-secondary mt-1",
|
|
920
930
|
children: ["Status: ", G.status]
|
|
921
931
|
}),
|
|
922
|
-
G.error && /* @__PURE__ */
|
|
932
|
+
G.error && /* @__PURE__ */ b("p", {
|
|
923
933
|
className: "text-xs text-status-error-text mt-1",
|
|
924
|
-
children: [G.error.message, G.error.retryable && /* @__PURE__ */
|
|
934
|
+
children: [G.error.message, G.error.retryable && /* @__PURE__ */ y("span", {
|
|
925
935
|
className: "text-warning-600 ml-1",
|
|
926
936
|
children: "(will retry)"
|
|
927
937
|
})]
|
|
928
938
|
}),
|
|
929
|
-
G.sentAt && /* @__PURE__ */
|
|
939
|
+
G.sentAt && /* @__PURE__ */ b("p", {
|
|
930
940
|
className: "text-xs text-text-secondary mt-1",
|
|
931
941
|
children: ["Sent at: ", new Date(G.sentAt).toLocaleString()]
|
|
932
942
|
})
|
|
@@ -934,21 +944,21 @@ function D() {
|
|
|
934
944
|
})]
|
|
935
945
|
})
|
|
936
946
|
}),
|
|
937
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ b("div", {
|
|
938
948
|
className: "flex items-center gap-2 pt-2",
|
|
939
|
-
children: [/* @__PURE__ */
|
|
949
|
+
children: [/* @__PURE__ */ y(r, {
|
|
940
950
|
permission: i.CHANNEL_DELIVERY_SEND,
|
|
941
|
-
children: /* @__PURE__ */
|
|
951
|
+
children: /* @__PURE__ */ b("button", {
|
|
942
952
|
type: "button",
|
|
943
|
-
onClick:
|
|
953
|
+
onClick: tt,
|
|
944
954
|
disabled: j === "send-test" || !V.trim(),
|
|
945
955
|
className: "flex-1 flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
946
|
-
children: [j === "send-test" ? /* @__PURE__ */
|
|
956
|
+
children: [j === "send-test" ? /* @__PURE__ */ y(p, {
|
|
947
957
|
size: 16,
|
|
948
958
|
className: "animate-spin"
|
|
949
|
-
}) : /* @__PURE__ */
|
|
959
|
+
}) : /* @__PURE__ */ y(_, { size: 16 }), k("channel.sendTest", "Send Test")]
|
|
950
960
|
})
|
|
951
|
-
}), /* @__PURE__ */
|
|
961
|
+
}), /* @__PURE__ */ y("button", {
|
|
952
962
|
type: "button",
|
|
953
963
|
onClick: () => B(!1),
|
|
954
964
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
@@ -964,6 +974,6 @@ function D() {
|
|
|
964
974
|
});
|
|
965
975
|
}
|
|
966
976
|
//#endregion
|
|
967
|
-
export {
|
|
977
|
+
export { E as ChannelDetailsPage };
|
|
968
978
|
|
|
969
979
|
//# sourceMappingURL=ChannelDetailsPage.js.map
|