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