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