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