@burdenoff/microfe-channel 2026.608.1 → 2026.624.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/components/AdapterCredentialsForm.js +11 -11
- package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +54 -54
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +456 -462
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +26 -26
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +226 -252
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +41 -41
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +30 -30
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +29 -29
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -28
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +8 -8
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +208 -233
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +25 -25
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +4 -4
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +27 -27
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +29 -29
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -4,167 +4,234 @@ import { PermissionGuard as n } from "../../../components/PermissionGuard.js";
|
|
|
4
4
|
import { CHANNEL_PERMISSIONS as r } from "../../../constants/permissions.js";
|
|
5
5
|
import { useExportDeliveryAttempts as i } from "../hooks/useExport.js";
|
|
6
6
|
import { useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { AlertCircle as
|
|
9
|
-
import { useNavigate as
|
|
10
|
-
import { Fragment as
|
|
7
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { AlertCircle as u, ArrowLeft as d, CheckCircle2 as f, ChevronLeft as ee, ChevronRight as p, Clock as m, Download as h, Loader2 as g, RefreshCw as _, RotateCcw as te, Send as v, XCircle as y } from "lucide-react";
|
|
9
|
+
import { useNavigate as b, useParams as x } from "react-router-dom";
|
|
10
|
+
import { Fragment as ne, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
11
|
+
import { ResponsiveTable as w } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/channel/modules/channels/pages/DeliveryHistoryPage.tsx
|
|
12
|
-
var
|
|
13
|
+
var T = {
|
|
13
14
|
PENDING: {
|
|
14
15
|
label: "Pending",
|
|
15
|
-
color: "text-
|
|
16
|
-
icon:
|
|
16
|
+
color: "text-text-secondary bg-bg-sunken",
|
|
17
|
+
icon: m
|
|
17
18
|
},
|
|
18
19
|
QUEUED: {
|
|
19
20
|
label: "Queued",
|
|
20
21
|
color: "text-accent-primary bg-accent-primary-subtle",
|
|
21
|
-
icon:
|
|
22
|
+
icon: m
|
|
22
23
|
},
|
|
23
24
|
SENDING: {
|
|
24
25
|
label: "Sending",
|
|
25
26
|
color: "text-accent-primary bg-accent-primary/10",
|
|
26
|
-
icon:
|
|
27
|
+
icon: v
|
|
27
28
|
},
|
|
28
29
|
SENT: {
|
|
29
30
|
label: "Sent",
|
|
30
31
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
31
|
-
icon:
|
|
32
|
+
icon: f
|
|
32
33
|
},
|
|
33
34
|
DELIVERED: {
|
|
34
35
|
label: "Delivered",
|
|
35
36
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
36
|
-
icon:
|
|
37
|
+
icon: f
|
|
37
38
|
},
|
|
38
39
|
FAILED: {
|
|
39
40
|
label: "Failed",
|
|
40
41
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
41
|
-
icon:
|
|
42
|
+
icon: y
|
|
42
43
|
},
|
|
43
44
|
BOUNCED: {
|
|
44
45
|
label: "Bounced",
|
|
45
46
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
46
|
-
icon:
|
|
47
|
+
icon: u
|
|
47
48
|
},
|
|
48
49
|
REJECTED: {
|
|
49
50
|
label: "Rejected",
|
|
50
51
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
51
|
-
icon:
|
|
52
|
+
icon: y
|
|
52
53
|
},
|
|
53
54
|
RATE_LIMITED: {
|
|
54
55
|
label: "Rate Limited",
|
|
55
56
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
56
|
-
icon:
|
|
57
|
+
icon: m
|
|
57
58
|
},
|
|
58
59
|
RETRYING: {
|
|
59
60
|
label: "Retrying",
|
|
60
61
|
color: "text-accent-primary bg-accent-primary/10",
|
|
61
|
-
icon:
|
|
62
|
+
icon: _
|
|
62
63
|
},
|
|
63
64
|
OPENED: {
|
|
64
65
|
label: "Opened",
|
|
65
66
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
66
|
-
icon:
|
|
67
|
+
icon: f
|
|
67
68
|
},
|
|
68
69
|
CLICKED: {
|
|
69
70
|
label: "Clicked",
|
|
70
71
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
71
|
-
icon:
|
|
72
|
+
icon: f
|
|
72
73
|
}
|
|
73
74
|
};
|
|
74
|
-
function
|
|
75
|
-
let { channelId:
|
|
76
|
-
let n =
|
|
75
|
+
function E() {
|
|
76
|
+
let { channelId: f } = x(), m = b(), { t: y } = l(), E = (e, t) => {
|
|
77
|
+
let n = y(e);
|
|
77
78
|
return n === e ? t : n;
|
|
78
|
-
}, { organizationId:
|
|
79
|
-
if (
|
|
80
|
-
|
|
79
|
+
}, { organizationId: D } = e(), { triggerExport: re, isExporting: O, exportError: k } = i(D ?? void 0, f), [A, j] = c(!0), [M, N] = c([]), [P, F] = c(null), [I, L] = c(null), [R, z] = c(25), [B, V] = c(0), [H, U] = c([void 0]), [W, G] = c(0), { channel: K, isLoading: q, error: J, fetchDeliveryAttempts: Y, retryDelivery: ie } = t(f), X = a(async (e) => {
|
|
80
|
+
if (f) {
|
|
81
|
+
j(!0), L(null);
|
|
81
82
|
try {
|
|
82
|
-
let t = await
|
|
83
|
-
return
|
|
83
|
+
let t = await Y(R, e);
|
|
84
|
+
return N(t.items), V(t.total), t.nextCursor;
|
|
84
85
|
} finally {
|
|
85
|
-
|
|
86
|
+
j(!1);
|
|
86
87
|
}
|
|
87
88
|
}
|
|
88
89
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
]), Z = s(X), Q = s(
|
|
90
|
+
f,
|
|
91
|
+
Y,
|
|
92
|
+
R
|
|
93
|
+
]), Z = s(X), Q = s(H);
|
|
93
94
|
o(() => {
|
|
94
|
-
Z.current = X, Q.current =
|
|
95
|
+
Z.current = X, Q.current = H;
|
|
95
96
|
});
|
|
96
97
|
let $ = s(!0);
|
|
97
98
|
o(() => {
|
|
98
99
|
Promise.resolve().then(() => {
|
|
99
|
-
|
|
100
|
+
U([void 0]), G(0), Z.current(void 0);
|
|
100
101
|
});
|
|
101
|
-
}, [
|
|
102
|
+
}, [R]), o(() => {
|
|
102
103
|
if ($.current) {
|
|
103
104
|
$.current = !1;
|
|
104
105
|
return;
|
|
105
106
|
}
|
|
106
|
-
Promise.resolve().then(() => Z.current(Q.current[
|
|
107
|
-
}, [
|
|
108
|
-
if (!
|
|
107
|
+
Promise.resolve().then(() => Z.current(Q.current[W]));
|
|
108
|
+
}, [W]), o(() => {
|
|
109
|
+
if (!f || W !== 0) return;
|
|
109
110
|
let e = setInterval(() => {
|
|
110
111
|
X(void 0);
|
|
111
112
|
}, 6e4);
|
|
112
113
|
return () => clearInterval(e);
|
|
113
114
|
}, [
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
f,
|
|
116
|
+
W,
|
|
116
117
|
X
|
|
117
118
|
]);
|
|
118
|
-
let
|
|
119
|
-
let e = await X(
|
|
120
|
-
e &&
|
|
119
|
+
let ae = a(async () => {
|
|
120
|
+
let e = await X(H[W]);
|
|
121
|
+
e && U((t) => {
|
|
121
122
|
let n = [...t];
|
|
122
|
-
return n[
|
|
123
|
-
}),
|
|
123
|
+
return n[W + 1] || (n[W + 1] = e), n;
|
|
124
|
+
}), G((e) => e + 1);
|
|
124
125
|
}, [
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
H,
|
|
127
|
+
W,
|
|
127
128
|
X
|
|
128
|
-
]),
|
|
129
|
-
let e =
|
|
130
|
-
|
|
129
|
+
]), oe = a(() => {
|
|
130
|
+
let e = W - 1;
|
|
131
|
+
G(e), X(H[e]);
|
|
131
132
|
}, [
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
H,
|
|
134
|
+
W,
|
|
134
135
|
X
|
|
135
|
-
]),
|
|
136
|
-
|
|
136
|
+
]), se = M.length === R, ce = W > 0, le = async (e) => {
|
|
137
|
+
F(e), L(null);
|
|
137
138
|
try {
|
|
138
|
-
let t = await
|
|
139
|
-
t.success ? await X(
|
|
139
|
+
let t = await ie(e);
|
|
140
|
+
t.success ? await X(H[W]) : L(t.error || "Retry failed");
|
|
140
141
|
} finally {
|
|
141
|
-
|
|
142
|
+
F(null);
|
|
143
|
+
}
|
|
144
|
+
}, ue = (e) => T[e] || T.PENDING, de = [
|
|
145
|
+
{
|
|
146
|
+
key: "status",
|
|
147
|
+
header: E("channel.status", "Status"),
|
|
148
|
+
priority: "primary",
|
|
149
|
+
cell: (e) => {
|
|
150
|
+
let t = ue(e.status), n = t.icon;
|
|
151
|
+
return /* @__PURE__ */ C("div", {
|
|
152
|
+
className: "flex items-center gap-2",
|
|
153
|
+
children: [/* @__PURE__ */ S(n, {
|
|
154
|
+
size: 14,
|
|
155
|
+
className: t.color.split(" ")[0]
|
|
156
|
+
}), /* @__PURE__ */ S("span", {
|
|
157
|
+
className: `text-sm font-medium ${t.color}`,
|
|
158
|
+
children: t.label
|
|
159
|
+
})]
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
key: "content",
|
|
165
|
+
header: E("channel.content", "Content"),
|
|
166
|
+
priority: "primary",
|
|
167
|
+
cellClassName: "text-sm text-text-primary truncate max-w-xs",
|
|
168
|
+
cell: (e) => e.content
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
key: "sentAt",
|
|
172
|
+
header: E("channel.sentAt", "Sent At"),
|
|
173
|
+
priority: "secondary",
|
|
174
|
+
cellClassName: "text-sm text-text-secondary",
|
|
175
|
+
cell: (e) => e.sentAt ? new Date(e.sentAt).toLocaleString() : "-"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
key: "retries",
|
|
179
|
+
header: E("channel.retries", "Retries"),
|
|
180
|
+
priority: "secondary",
|
|
181
|
+
cellClassName: "text-sm text-text-secondary tabular-nums",
|
|
182
|
+
cell: (e) => e.retryCount
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
key: "error",
|
|
186
|
+
header: E("channel.error", "Error"),
|
|
187
|
+
priority: "secondary",
|
|
188
|
+
cellClassName: "text-sm text-status-error-text max-w-xs truncate",
|
|
189
|
+
cell: (e) => e.errorMessage || "-"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
key: "actions",
|
|
193
|
+
header: E("channel.actions", "Actions"),
|
|
194
|
+
priority: "secondary",
|
|
195
|
+
cell: (e) => e.status === "FAILED" || e.status === "BOUNCED" || e.status === "REJECTED" ? /* @__PURE__ */ S(n, {
|
|
196
|
+
permission: r.CHANNEL_DELIVERY_EXECUTE,
|
|
197
|
+
children: /* @__PURE__ */ C("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
onClick: () => le(e.id),
|
|
200
|
+
disabled: P === e.id,
|
|
201
|
+
className: "flex items-center gap-1 px-2 py-1 text-xs font-medium text-accent-primary hover:bg-accent-primary/10 rounded transition-colors disabled:opacity-50",
|
|
202
|
+
title: E("channel.retryDelivery", "Retry this delivery"),
|
|
203
|
+
children: [/* @__PURE__ */ S(te, {
|
|
204
|
+
size: 12,
|
|
205
|
+
className: P === e.id ? "animate-spin" : ""
|
|
206
|
+
}), P === e.id ? E("channel.retrying", "Retrying...") : E("channel.retry", "Retry")]
|
|
207
|
+
})
|
|
208
|
+
}) : null
|
|
142
209
|
}
|
|
143
|
-
|
|
144
|
-
return
|
|
210
|
+
];
|
|
211
|
+
return q ? /* @__PURE__ */ S("output", {
|
|
145
212
|
className: "flex items-center justify-center min-h-screen",
|
|
146
|
-
"aria-label":
|
|
147
|
-
children: /* @__PURE__ */ S(
|
|
213
|
+
"aria-label": E("channel.loading", "Loading"),
|
|
214
|
+
children: /* @__PURE__ */ S(g, {
|
|
148
215
|
size: 32,
|
|
149
216
|
className: "animate-spin text-accent-primary",
|
|
150
217
|
"aria-hidden": "true"
|
|
151
218
|
})
|
|
152
|
-
}) :
|
|
219
|
+
}) : J || !K ? /* @__PURE__ */ S("div", {
|
|
153
220
|
className: "p-6",
|
|
154
221
|
children: /* @__PURE__ */ C("div", {
|
|
155
222
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
156
223
|
children: [
|
|
157
|
-
/* @__PURE__ */ S(
|
|
224
|
+
/* @__PURE__ */ S(u, {
|
|
158
225
|
size: 20,
|
|
159
226
|
className: "text-status-error-text"
|
|
160
227
|
}),
|
|
161
228
|
/* @__PURE__ */ S("div", { children: /* @__PURE__ */ S("p", {
|
|
162
229
|
className: "text-sm font-medium text-status-error-text",
|
|
163
|
-
children:
|
|
230
|
+
children: J || "Channel not found"
|
|
164
231
|
}) }),
|
|
165
232
|
/* @__PURE__ */ S("button", {
|
|
166
233
|
type: "button",
|
|
167
|
-
onClick: () =>
|
|
234
|
+
onClick: () => m(`/channels/${f}`),
|
|
168
235
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
169
236
|
children: "Go Back"
|
|
170
237
|
})
|
|
@@ -181,27 +248,27 @@ function T() {
|
|
|
181
248
|
className: "flex items-center gap-3",
|
|
182
249
|
children: [/* @__PURE__ */ S("button", {
|
|
183
250
|
type: "button",
|
|
184
|
-
onClick: () =>
|
|
185
|
-
"aria-label":
|
|
186
|
-
className: "p-2 text-
|
|
187
|
-
children: /* @__PURE__ */ S(
|
|
251
|
+
onClick: () => m(`/channels/${f}`),
|
|
252
|
+
"aria-label": E("channel.backToChannel", "Back to channel"),
|
|
253
|
+
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
254
|
+
children: /* @__PURE__ */ S(d, {
|
|
188
255
|
size: 20,
|
|
189
256
|
"aria-hidden": "true"
|
|
190
257
|
})
|
|
191
258
|
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
|
|
192
|
-
className: "text-xl sm:text-2xl font-bold text-
|
|
193
|
-
children:
|
|
259
|
+
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
260
|
+
children: E("channel.deliveryHistory", "Delivery History")
|
|
194
261
|
}), /* @__PURE__ */ C("p", {
|
|
195
|
-
className: "text-sm text-
|
|
196
|
-
children: [
|
|
262
|
+
className: "text-sm text-text-secondary mt-1",
|
|
263
|
+
children: [K.name, " - Message deliveries"]
|
|
197
264
|
})] })]
|
|
198
265
|
}), /* @__PURE__ */ C("div", {
|
|
199
266
|
className: "flex items-center gap-3",
|
|
200
267
|
children: [
|
|
201
268
|
/* @__PURE__ */ C("select", {
|
|
202
|
-
value:
|
|
203
|
-
onChange: (e) =>
|
|
204
|
-
className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg/50 text-
|
|
269
|
+
value: R,
|
|
270
|
+
onChange: (e) => z(Number(e.target.value)),
|
|
271
|
+
className: "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/50 text-text-primary",
|
|
205
272
|
children: [
|
|
206
273
|
/* @__PURE__ */ S("option", {
|
|
207
274
|
value: 10,
|
|
@@ -223,224 +290,132 @@ function T() {
|
|
|
223
290
|
}),
|
|
224
291
|
/* @__PURE__ */ C("button", {
|
|
225
292
|
type: "button",
|
|
226
|
-
onClick: () => void X(
|
|
227
|
-
disabled:
|
|
228
|
-
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-
|
|
229
|
-
children: [/* @__PURE__ */ S(
|
|
293
|
+
onClick: () => void X(H[W]),
|
|
294
|
+
disabled: A,
|
|
295
|
+
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors disabled:opacity-50",
|
|
296
|
+
children: [/* @__PURE__ */ S(_, {
|
|
230
297
|
size: 16,
|
|
231
|
-
className:
|
|
232
|
-
}),
|
|
298
|
+
className: A ? "animate-spin" : ""
|
|
299
|
+
}), E("channel.refresh", "Refresh")]
|
|
233
300
|
}),
|
|
234
301
|
/* @__PURE__ */ S(n, {
|
|
235
302
|
permission: r.CHANNEL_DELIVERY_EXPORT,
|
|
236
303
|
children: /* @__PURE__ */ C("button", {
|
|
237
304
|
type: "button",
|
|
238
305
|
onClick: () => void re(),
|
|
239
|
-
disabled:
|
|
240
|
-
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-fg border border-border hover:bg-bg-elevated rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
241
|
-
title:
|
|
242
|
-
children: [
|
|
306
|
+
disabled: O,
|
|
307
|
+
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-fg border border-border-subtle hover:bg-bg-elevated rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
308
|
+
title: E("channel.exportCSV", "Export to CSV"),
|
|
309
|
+
children: [O ? /* @__PURE__ */ S(g, {
|
|
243
310
|
size: 16,
|
|
244
311
|
className: "animate-spin"
|
|
245
|
-
}) : /* @__PURE__ */ S(
|
|
312
|
+
}) : /* @__PURE__ */ S(h, { size: 16 }), E("channel.export", "Export")]
|
|
246
313
|
})
|
|
247
314
|
})
|
|
248
315
|
]
|
|
249
316
|
})]
|
|
250
317
|
}),
|
|
251
|
-
|
|
318
|
+
k && /* @__PURE__ */ C("div", {
|
|
252
319
|
className: "p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg flex items-center gap-3",
|
|
253
|
-
children: [/* @__PURE__ */ S(
|
|
320
|
+
children: [/* @__PURE__ */ S(u, {
|
|
254
321
|
size: 20,
|
|
255
322
|
className: "text-status-error-text"
|
|
256
323
|
}), /* @__PURE__ */ S("p", {
|
|
257
324
|
className: "text-sm text-status-error-text flex-1",
|
|
258
|
-
children:
|
|
325
|
+
children: k
|
|
259
326
|
})]
|
|
260
327
|
}),
|
|
261
|
-
|
|
328
|
+
I && /* @__PURE__ */ C("div", {
|
|
262
329
|
className: "p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg flex items-center gap-3",
|
|
263
330
|
children: [
|
|
264
|
-
/* @__PURE__ */ S(
|
|
331
|
+
/* @__PURE__ */ S(u, {
|
|
265
332
|
size: 20,
|
|
266
333
|
className: "text-status-error-text"
|
|
267
334
|
}),
|
|
268
335
|
/* @__PURE__ */ S("p", {
|
|
269
336
|
className: "text-sm text-status-error-text flex-1",
|
|
270
|
-
children:
|
|
337
|
+
children: I
|
|
271
338
|
}),
|
|
272
339
|
/* @__PURE__ */ S("button", {
|
|
273
340
|
type: "button",
|
|
274
|
-
onClick: () =>
|
|
341
|
+
onClick: () => L(null),
|
|
275
342
|
className: "text-status-error-text hover:text-status-error-text",
|
|
276
|
-
children:
|
|
343
|
+
children: E("channel.dismiss", "Dismiss")
|
|
277
344
|
})
|
|
278
345
|
]
|
|
279
346
|
}),
|
|
280
347
|
/* @__PURE__ */ S("div", {
|
|
281
|
-
className: "p-4 bg-surface border border-border rounded-lg",
|
|
348
|
+
className: "p-4 bg-surface border border-border-subtle rounded-lg",
|
|
282
349
|
children: /* @__PURE__ */ S("p", {
|
|
283
|
-
className: "text-sm text-
|
|
350
|
+
className: "text-sm text-text-secondary",
|
|
284
351
|
children: "Delivery history shows all message attempts sent through this channel. Data is retained for 7 days. Click retry on a failed delivery to attempt sending again."
|
|
285
352
|
})
|
|
286
353
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
className: "bg-surface border border-border rounded-lg
|
|
289
|
-
children: /* @__PURE__ */ S(
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
|
|
318
|
-
children: T("channel.actions", "Actions")
|
|
319
|
-
})
|
|
320
|
-
] })
|
|
321
|
-
}), /* @__PURE__ */ S("tbody", {
|
|
322
|
-
className: "divide-y divide-border",
|
|
323
|
-
children: k ? /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ C("td", {
|
|
324
|
-
colSpan: 6,
|
|
325
|
-
className: "px-4 py-12 text-center",
|
|
326
|
-
children: [/* @__PURE__ */ S(m, {
|
|
327
|
-
size: 24,
|
|
328
|
-
className: "animate-spin text-accent-primary mx-auto"
|
|
329
|
-
}), /* @__PURE__ */ S("p", {
|
|
330
|
-
className: "text-sm text-muted-foreground mt-2",
|
|
331
|
-
children: "Loading delivery attempts…"
|
|
332
|
-
})]
|
|
333
|
-
}) }) : j.length === 0 ? /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
334
|
-
colSpan: 6,
|
|
335
|
-
className: "px-4 py-12 text-center",
|
|
336
|
-
children: /* @__PURE__ */ C("div", {
|
|
337
|
-
className: "flex flex-col items-center gap-2",
|
|
338
|
-
children: [
|
|
339
|
-
/* @__PURE__ */ S(_, {
|
|
340
|
-
size: 32,
|
|
341
|
-
className: "text-muted-foreground"
|
|
342
|
-
}),
|
|
343
|
-
/* @__PURE__ */ S("p", {
|
|
344
|
-
className: "text-sm font-medium text-foreground",
|
|
345
|
-
children: T("channel.noDeliveryAttempts", "No delivery attempts yet")
|
|
346
|
-
}),
|
|
347
|
-
/* @__PURE__ */ S("p", {
|
|
348
|
-
className: "text-xs text-muted-foreground",
|
|
349
|
-
children: T("channel.sendMessageToSeeHistory", "Send a message through this channel to see delivery history")
|
|
350
|
-
})
|
|
351
|
-
]
|
|
352
|
-
})
|
|
353
|
-
}) }) : j.map((e) => {
|
|
354
|
-
let t = le(e.status), i = t.icon, a = e.status === "FAILED" || e.status === "BOUNCED" || e.status === "REJECTED";
|
|
355
|
-
return /* @__PURE__ */ C("tr", {
|
|
356
|
-
className: "hover:bg-muted/30 transition-colors",
|
|
357
|
-
children: [
|
|
358
|
-
/* @__PURE__ */ S("td", {
|
|
359
|
-
className: "px-4 py-3",
|
|
360
|
-
children: /* @__PURE__ */ C("div", {
|
|
361
|
-
className: "flex items-center gap-2",
|
|
362
|
-
children: [/* @__PURE__ */ S(i, {
|
|
363
|
-
size: 14,
|
|
364
|
-
className: t.color.split(" ")[0]
|
|
365
|
-
}), /* @__PURE__ */ S("span", {
|
|
366
|
-
className: `text-sm font-medium ${t.color}`,
|
|
367
|
-
children: t.label
|
|
368
|
-
})]
|
|
369
|
-
})
|
|
370
|
-
}),
|
|
371
|
-
/* @__PURE__ */ S("td", {
|
|
372
|
-
className: "px-4 py-3 text-sm text-foreground truncate max-w-xs",
|
|
373
|
-
children: e.content
|
|
374
|
-
}),
|
|
375
|
-
/* @__PURE__ */ S("td", {
|
|
376
|
-
className: "px-4 py-3 text-sm text-muted-foreground",
|
|
377
|
-
children: e.sentAt ? new Date(e.sentAt).toLocaleString() : "-"
|
|
378
|
-
}),
|
|
379
|
-
/* @__PURE__ */ S("td", {
|
|
380
|
-
className: "px-4 py-3 text-sm text-muted-foreground",
|
|
381
|
-
children: e.retryCount
|
|
382
|
-
}),
|
|
383
|
-
/* @__PURE__ */ S("td", {
|
|
384
|
-
className: "px-4 py-3 text-sm text-status-error-text max-w-xs truncate",
|
|
385
|
-
children: e.errorMessage || "-"
|
|
386
|
-
}),
|
|
387
|
-
/* @__PURE__ */ S("td", {
|
|
388
|
-
className: "px-4 py-3",
|
|
389
|
-
children: a && /* @__PURE__ */ S(n, {
|
|
390
|
-
permission: r.CHANNEL_DELIVERY_EXECUTE,
|
|
391
|
-
children: /* @__PURE__ */ C("button", {
|
|
392
|
-
type: "button",
|
|
393
|
-
onClick: () => ce(e.id),
|
|
394
|
-
disabled: N === e.id,
|
|
395
|
-
className: "flex items-center gap-1 px-2 py-1 text-xs font-medium text-accent-primary hover:bg-accent-primary/10 rounded transition-colors disabled:opacity-50",
|
|
396
|
-
title: T("channel.retryDelivery", "Retry this delivery"),
|
|
397
|
-
children: [/* @__PURE__ */ S(g, {
|
|
398
|
-
size: 12,
|
|
399
|
-
className: N === e.id ? "animate-spin" : ""
|
|
400
|
-
}), N === e.id ? T("channel.retrying", "Retrying...") : T("channel.retry", "Retry")]
|
|
401
|
-
})
|
|
402
|
-
})
|
|
403
|
-
})
|
|
404
|
-
]
|
|
405
|
-
}, e.id);
|
|
406
|
-
})
|
|
407
|
-
})]
|
|
408
|
-
})
|
|
354
|
+
A ? /* @__PURE__ */ C("div", {
|
|
355
|
+
className: "bg-surface border border-border-subtle rounded-lg px-4 py-12 text-center",
|
|
356
|
+
children: [/* @__PURE__ */ S(g, {
|
|
357
|
+
size: 24,
|
|
358
|
+
className: "animate-spin text-accent-primary mx-auto"
|
|
359
|
+
}), /* @__PURE__ */ S("p", {
|
|
360
|
+
className: "text-sm text-text-secondary mt-2",
|
|
361
|
+
children: "Loading delivery attempts…"
|
|
362
|
+
})]
|
|
363
|
+
}) : /* @__PURE__ */ S(w, {
|
|
364
|
+
columns: de,
|
|
365
|
+
data: M,
|
|
366
|
+
rowKey: (e) => e.id,
|
|
367
|
+
className: "bg-surface border border-border-subtle rounded-lg",
|
|
368
|
+
emptyState: /* @__PURE__ */ C("div", {
|
|
369
|
+
className: "flex flex-col items-center gap-2 py-8",
|
|
370
|
+
children: [
|
|
371
|
+
/* @__PURE__ */ S(v, {
|
|
372
|
+
size: 32,
|
|
373
|
+
className: "text-text-secondary"
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ S("p", {
|
|
376
|
+
className: "text-sm font-medium text-text-primary",
|
|
377
|
+
children: E("channel.noDeliveryAttempts", "No delivery attempts yet")
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ S("p", {
|
|
380
|
+
className: "text-xs text-text-secondary",
|
|
381
|
+
children: E("channel.sendMessageToSeeHistory", "Send a message through this channel to see delivery history")
|
|
382
|
+
})
|
|
383
|
+
]
|
|
409
384
|
})
|
|
410
385
|
}),
|
|
411
386
|
/* @__PURE__ */ C("div", {
|
|
412
387
|
className: "flex items-center justify-between",
|
|
413
388
|
children: [/* @__PURE__ */ S("p", {
|
|
414
|
-
className: "text-sm text-
|
|
415
|
-
children:
|
|
416
|
-
|
|
389
|
+
className: "text-sm text-text-secondary",
|
|
390
|
+
children: B > 0 && /* @__PURE__ */ C(ne, { children: [
|
|
391
|
+
E("channel.page", "Page"),
|
|
417
392
|
" ",
|
|
418
393
|
/* @__PURE__ */ S("span", {
|
|
419
394
|
className: "font-medium",
|
|
420
|
-
children:
|
|
395
|
+
children: W + 1
|
|
421
396
|
}),
|
|
422
397
|
" · ",
|
|
423
|
-
|
|
398
|
+
E("channel.totalRecords", "Total"),
|
|
424
399
|
": ",
|
|
425
400
|
/* @__PURE__ */ S("span", {
|
|
426
401
|
className: "font-medium",
|
|
427
|
-
children:
|
|
402
|
+
children: B
|
|
428
403
|
})
|
|
429
404
|
] })
|
|
430
405
|
}), /* @__PURE__ */ C("div", {
|
|
431
406
|
className: "flex items-center gap-2",
|
|
432
407
|
children: [/* @__PURE__ */ C("button", {
|
|
433
408
|
type: "button",
|
|
434
|
-
onClick:
|
|
435
|
-
disabled: !
|
|
436
|
-
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border rounded-lg hover:bg-
|
|
437
|
-
children: [/* @__PURE__ */ S(
|
|
409
|
+
onClick: oe,
|
|
410
|
+
disabled: !ce || A,
|
|
411
|
+
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
412
|
+
children: [/* @__PURE__ */ S(ee, { size: 16 }), E("channel.previous", "Previous")]
|
|
438
413
|
}), /* @__PURE__ */ C("button", {
|
|
439
414
|
type: "button",
|
|
440
|
-
onClick: () => void
|
|
441
|
-
disabled: !
|
|
442
|
-
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border rounded-lg hover:bg-
|
|
443
|
-
children: [
|
|
415
|
+
onClick: () => void ae(),
|
|
416
|
+
disabled: !se || A,
|
|
417
|
+
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
418
|
+
children: [E("channel.next", "Next"), /* @__PURE__ */ S(p, { size: 16 })]
|
|
444
419
|
})]
|
|
445
420
|
})]
|
|
446
421
|
})
|
|
@@ -449,6 +424,6 @@ function T() {
|
|
|
449
424
|
});
|
|
450
425
|
}
|
|
451
426
|
//#endregion
|
|
452
|
-
export {
|
|
427
|
+
export { E as DeliveryHistoryPage };
|
|
453
428
|
|
|
454
429
|
//# sourceMappingURL=DeliveryHistoryPage.js.map
|