@burdenoff/microfe-channel 2026.518.2 → 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.
Files changed (52) hide show
  1. package/dist/channel/ChannelRoot.d.ts.map +1 -1
  2. package/dist/channel/ChannelRoot.js +23 -29
  3. package/dist/channel/ChannelRoot.js.map +1 -1
  4. package/dist/channel/components/AdapterCredentialsForm.js +7 -7
  5. package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
  6. package/dist/channel/components/FeatureNotEnabled.d.ts +3 -0
  7. package/dist/channel/components/FeatureNotEnabled.d.ts.map +1 -1
  8. package/dist/channel/components/FeatureNotEnabled.js +31 -13
  9. package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
  10. package/dist/channel/hooks/useChannels.d.ts +17 -3
  11. package/dist/channel/hooks/useChannels.d.ts.map +1 -1
  12. package/dist/channel/hooks/useChannels.js +64 -18
  13. package/dist/channel/hooks/useChannels.js.map +1 -1
  14. package/dist/channel/modules/channels/pages/ChannelDashboardPage.d.ts.map +1 -1
  15. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +307 -274
  16. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/ChannelDetailsPage.d.ts.map +1 -1
  18. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +31 -31
  19. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  20. package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +1 -1
  21. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +22 -22
  22. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  23. package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +1 -1
  24. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +193 -137
  25. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  26. package/dist/channel/modules/channels/pages/ChannelsListPage.d.ts.map +1 -1
  27. package/dist/channel/modules/channels/pages/ChannelsListPage.js +320 -248
  28. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  29. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +1 -1
  30. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +5 -5
  31. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  32. package/dist/channel/modules/channels/pages/ConnectionsListPage.d.ts.map +1 -1
  33. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +160 -112
  34. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  35. package/dist/channel/modules/channels/pages/CreateChannelPage.js +4 -4
  36. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  37. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.d.ts.map +1 -1
  38. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +221 -157
  39. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  40. package/dist/channel/modules/channels/pages/EditChannelPage.js +9 -9
  41. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  42. package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +1 -1
  43. package/dist/channel/modules/channels/pages/SendMessagePage.js +89 -89
  44. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  45. package/dist/channel/modules/channels/pages/WebhookEventsPage.d.ts.map +1 -1
  46. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +188 -126
  47. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  48. package/dist/generated/global-operations.d.ts +2 -0
  49. package/dist/generated/global-operations.d.ts.map +1 -1
  50. package/dist/generated/global-operations.js +2 -0
  51. package/dist/generated/global-operations.js.map +1 -1
  52. package/package.json +2 -2
@@ -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, Clock as f, Download as p, Loader2 as m, RefreshCw as h, RotateCcw as g, Send as _, XCircle as v } from "lucide-react";
9
- import { useNavigate as y, useParams as b } from "react-router-dom";
10
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
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 C = {
12
+ var E = {
13
13
  PENDING: {
14
14
  label: "Pending",
15
15
  color: "text-muted-foreground bg-muted",
16
- icon: f
16
+ icon: m
17
17
  },
18
18
  QUEUED: {
19
19
  label: "Queued",
20
- color: "text-info-500 bg-info-100",
21
- icon: f
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-500 bg-success-100",
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-500 bg-success-100",
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-500 bg-error-100",
41
- icon: v
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-500 bg-warning-100",
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-500 bg-error-100",
51
- icon: v
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-500 bg-warning-100",
56
- icon: f
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: h
61
+ icon: _
62
62
  },
63
63
  OPENED: {
64
64
  label: "Opened",
65
- color: "text-success-500 bg-success-100",
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-500 bg-success-100",
70
+ color: "text-status-success-text bg-status-success-bg-subtle",
71
71
  icon: d
72
72
  }
73
73
  };
74
- function w() {
75
- let { channelId: d } = b(), f = y(), { t: v } = c(), w = (e, t) => {
76
- let n = v(e);
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: T } = e(), { triggerExport: E, isExporting: D, exportError: O } = i(T ?? void 0, d), [k, A] = s(!0), [j, M] = s([]), [N, P] = s(null), [F, I] = s(null), [L, R] = s(25), { channel: z, isLoading: B, error: V, fetchDeliveryAttempts: H, retryDelivery: U } = t(d), W = a(async () => {
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
- A(!0), I(null);
80
+ N(!0), z(null);
81
81
  try {
82
- M(await H(L));
82
+ let t = await Z(B, e);
83
+ return F(t.items), U(t.total), t.nextCursor;
83
84
  } finally {
84
- A(!1);
85
+ N(!1);
85
86
  }
86
87
  }
87
88
  }, [
88
89
  d,
89
- H,
90
- L
90
+ Z,
91
+ B
91
92
  ]);
92
93
  o(() => {
93
- Promise.resolve().then(() => W());
94
- }, [W]), o(() => {
95
- if (!d) return;
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
- W();
106
+ $(void 0);
98
107
  }, 6e4);
99
108
  return () => clearInterval(e);
100
- }, [d, W]);
101
- let G = async (e) => {
102
- P(e), I(null);
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 U(e);
105
- t.success || I(t.error || "Retry failed");
134
+ let t = await Q(e);
135
+ t.success ? await $(W[K]) : z(t.error || "Retry failed");
106
136
  } finally {
107
- P(null);
137
+ L(null);
108
138
  }
109
- }, K = (e) => C[e] || C.PENDING;
110
- return B ? /* @__PURE__ */ x("div", {
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": w("channel.loading", "Loading"),
114
- children: /* @__PURE__ */ x(m, {
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
- }) : V || !z ? /* @__PURE__ */ x("div", {
149
+ }) : X || !J ? /* @__PURE__ */ w("div", {
120
150
  className: "p-6",
121
- children: /* @__PURE__ */ S("div", {
122
- className: "flex items-center gap-3 p-4 bg-error-100 border border-error-500 rounded-lg",
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__ */ x(l, {
154
+ /* @__PURE__ */ w(l, {
125
155
  size: 20,
126
- className: "text-error-500"
156
+ className: "text-status-error-text"
127
157
  }),
128
- /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x("p", {
129
- className: "text-sm font-medium text-error-700",
130
- children: V || "Channel not found"
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__ */ x("button", {
133
- onClick: () => f(`/channels/${d}`),
134
- className: "ml-auto px-3 py-1 text-sm text-error-700 hover:bg-error-200 rounded transition-colors",
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__ */ x(n, {
169
+ }) : /* @__PURE__ */ w(n, {
140
170
  permission: r.CHANNEL_DELIVERY_READ,
141
- children: /* @__PURE__ */ S("div", {
171
+ children: /* @__PURE__ */ T("div", {
142
172
  className: "space-y-6 p-3 sm:p-6",
143
173
  children: [
144
- /* @__PURE__ */ S("div", {
174
+ /* @__PURE__ */ T("div", {
145
175
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
146
- children: [/* @__PURE__ */ S("div", {
176
+ children: [/* @__PURE__ */ T("div", {
147
177
  className: "flex items-center gap-3",
148
- children: [/* @__PURE__ */ x("button", {
149
- onClick: () => f(`/channels/${d}`),
150
- "aria-label": w("channel.backToChannel", "Back to channel"),
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__ */ x(u, {
182
+ children: /* @__PURE__ */ w(u, {
153
183
  size: 20,
154
184
  "aria-hidden": "true"
155
185
  })
156
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
186
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
157
187
  className: "text-xl sm:text-2xl font-bold text-foreground",
158
- children: w("channel.deliveryHistory", "Delivery History")
159
- }), /* @__PURE__ */ S("p", {
188
+ children: D("channel.deliveryHistory", "Delivery History")
189
+ }), /* @__PURE__ */ T("p", {
160
190
  className: "text-sm text-muted-foreground mt-1",
161
- children: [z.name, " - Message deliveries"]
191
+ children: [J.name, " - Message deliveries"]
162
192
  })] })]
163
- }), /* @__PURE__ */ S("div", {
193
+ }), /* @__PURE__ */ T("div", {
164
194
  className: "flex items-center gap-3",
165
195
  children: [
166
- /* @__PURE__ */ S("select", {
167
- value: L,
168
- onChange: (e) => R(Number(e.target.value)),
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__ */ x("option", {
201
+ /* @__PURE__ */ w("option", {
172
202
  value: 10,
173
203
  children: "10 results"
174
204
  }),
175
- /* @__PURE__ */ x("option", {
205
+ /* @__PURE__ */ w("option", {
176
206
  value: 25,
177
207
  children: "25 results"
178
208
  }),
179
- /* @__PURE__ */ x("option", {
209
+ /* @__PURE__ */ w("option", {
180
210
  value: 50,
181
211
  children: "50 results"
182
212
  }),
183
- /* @__PURE__ */ x("option", {
213
+ /* @__PURE__ */ w("option", {
184
214
  value: 100,
185
215
  children: "100 results"
186
216
  })
187
217
  ]
188
218
  }),
189
- /* @__PURE__ */ S("button", {
190
- onClick: W,
191
- disabled: k,
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__ */ x(h, {
223
+ children: [/* @__PURE__ */ w(_, {
194
224
  size: 16,
195
- className: k ? "animate-spin" : ""
196
- }), w("channel.refresh", "Refresh")]
225
+ className: M ? "animate-spin" : ""
226
+ }), D("channel.refresh", "Refresh")]
197
227
  }),
198
- /* @__PURE__ */ x(n, {
228
+ /* @__PURE__ */ w(n, {
199
229
  permission: r.CHANNEL_ADMIN,
200
- children: /* @__PURE__ */ S("button", {
201
- onClick: () => void E(),
202
- disabled: D,
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: w("channel.exportCSV", "Export to CSV"),
205
- children: [D ? /* @__PURE__ */ x(m, {
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__ */ x(p, { size: 16 }), w("channel.export", "Export")]
238
+ }) : /* @__PURE__ */ w(h, { size: 16 }), D("channel.export", "Export")]
209
239
  })
210
240
  })
211
241
  ]
212
242
  })]
213
243
  }),
214
- O && /* @__PURE__ */ S("div", {
215
- className: "p-4 bg-error-100 border border-error-500 rounded-lg flex items-center gap-3",
216
- children: [/* @__PURE__ */ x(l, {
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-500"
219
- }), /* @__PURE__ */ x("p", {
220
- className: "text-sm text-error-700 flex-1",
221
- children: O
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
- F && /* @__PURE__ */ S("div", {
225
- className: "p-4 bg-error-100 border border-error-500 rounded-lg flex items-center gap-3",
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__ */ x(l, {
257
+ /* @__PURE__ */ w(l, {
228
258
  size: 20,
229
- className: "text-error-500"
259
+ className: "text-status-error-text"
230
260
  }),
231
- /* @__PURE__ */ x("p", {
232
- className: "text-sm text-error-700 flex-1",
233
- children: F
261
+ /* @__PURE__ */ w("p", {
262
+ className: "text-sm text-status-error-text flex-1",
263
+ children: R
234
264
  }),
235
- /* @__PURE__ */ x("button", {
236
- onClick: () => I(null),
237
- className: "text-error-500 hover:text-error-700",
238
- children: w("channel.dismiss", "Dismiss")
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__ */ x("div", {
272
+ /* @__PURE__ */ w("div", {
243
273
  className: "p-4 bg-surface border border-border rounded-lg",
244
- children: /* @__PURE__ */ x("p", {
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__ */ x("div", {
279
+ /* @__PURE__ */ w("div", {
250
280
  className: "bg-surface border border-border rounded-lg overflow-hidden",
251
- children: /* @__PURE__ */ x("div", {
281
+ children: /* @__PURE__ */ w("div", {
252
282
  className: "overflow-x-auto min-w-full",
253
- children: /* @__PURE__ */ S("table", {
283
+ children: /* @__PURE__ */ T("table", {
254
284
  className: "w-full min-w-[700px]",
255
- children: [/* @__PURE__ */ x("thead", {
285
+ children: [/* @__PURE__ */ w("thead", {
256
286
  className: "bg-muted/50 border-b border-border",
257
- children: /* @__PURE__ */ S("tr", { children: [
258
- /* @__PURE__ */ x("th", {
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: w("channel.status", "Status")
290
+ children: D("channel.status", "Status")
261
291
  }),
262
- /* @__PURE__ */ x("th", {
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: w("channel.content", "Content")
294
+ children: D("channel.content", "Content")
265
295
  }),
266
- /* @__PURE__ */ x("th", {
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: w("channel.sentAt", "Sent At")
298
+ children: D("channel.sentAt", "Sent At")
269
299
  }),
270
- /* @__PURE__ */ x("th", {
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: w("channel.retries", "Retries")
302
+ children: D("channel.retries", "Retries")
273
303
  }),
274
- /* @__PURE__ */ x("th", {
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: w("channel.error", "Error")
306
+ children: D("channel.error", "Error")
277
307
  }),
278
- /* @__PURE__ */ x("th", {
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: w("channel.actions", "Actions")
310
+ children: D("channel.actions", "Actions")
281
311
  })
282
312
  ] })
283
- }), /* @__PURE__ */ x("tbody", {
313
+ }), /* @__PURE__ */ w("tbody", {
284
314
  className: "divide-y divide-border",
285
- children: k ? /* @__PURE__ */ x("tr", { children: /* @__PURE__ */ S("td", {
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__ */ x(m, {
318
+ children: [/* @__PURE__ */ w(g, {
289
319
  size: 24,
290
320
  className: "animate-spin text-accent-primary mx-auto"
291
- }), /* @__PURE__ */ x("p", {
321
+ }), /* @__PURE__ */ w("p", {
292
322
  className: "text-sm text-muted-foreground mt-2",
293
323
  children: "Loading delivery attempts..."
294
324
  })]
295
- }) }) : j.length === 0 ? /* @__PURE__ */ x("tr", { children: /* @__PURE__ */ x("td", {
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__ */ S("div", {
328
+ children: /* @__PURE__ */ T("div", {
299
329
  className: "flex flex-col items-center gap-2",
300
330
  children: [
301
- /* @__PURE__ */ x(_, {
331
+ /* @__PURE__ */ w(y, {
302
332
  size: 32,
303
333
  className: "text-muted-foreground"
304
334
  }),
305
- /* @__PURE__ */ x("p", {
335
+ /* @__PURE__ */ w("p", {
306
336
  className: "text-sm font-medium text-foreground",
307
- children: w("channel.noDeliveryAttempts", "No delivery attempts yet")
337
+ children: D("channel.noDeliveryAttempts", "No delivery attempts yet")
308
338
  }),
309
- /* @__PURE__ */ x("p", {
339
+ /* @__PURE__ */ w("p", {
310
340
  className: "text-xs text-muted-foreground",
311
- children: w("channel.sendMessageToSeeHistory", "Send a message through this channel to see delivery history")
341
+ children: D("channel.sendMessageToSeeHistory", "Send a message through this channel to see delivery history")
312
342
  })
313
343
  ]
314
344
  })
315
- }) }) : j.map((e) => {
316
- let t = K(e.status), i = t.icon, a = e.status === "FAILED" || e.status === "BOUNCED" || e.status === "REJECTED";
317
- return /* @__PURE__ */ S("tr", {
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__ */ x("td", {
350
+ /* @__PURE__ */ w("td", {
321
351
  className: "px-4 py-3",
322
- children: /* @__PURE__ */ S("div", {
352
+ children: /* @__PURE__ */ T("div", {
323
353
  className: "flex items-center gap-2",
324
- children: [/* @__PURE__ */ x(i, {
354
+ children: [/* @__PURE__ */ w(i, {
325
355
  size: 14,
326
356
  className: t.color.split(" ")[0]
327
- }), /* @__PURE__ */ x("span", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
346
- className: "px-4 py-3 text-sm text-error-500 max-w-xs truncate",
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__ */ x("td", {
379
+ /* @__PURE__ */ w("td", {
350
380
  className: "px-4 py-3",
351
- children: a && /* @__PURE__ */ x(n, {
381
+ children: a && /* @__PURE__ */ w(n, {
352
382
  permission: r.CHANNEL_DELIVERY_EXECUTE,
353
- children: /* @__PURE__ */ S("button", {
354
- onClick: () => G(e.id),
355
- disabled: N === e.id,
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: w("channel.retryDelivery", "Retry this delivery"),
358
- children: [/* @__PURE__ */ x(g, {
387
+ title: D("channel.retryDelivery", "Retry this delivery"),
388
+ children: [/* @__PURE__ */ w(v, {
359
389
  size: 12,
360
- className: N === e.id ? "animate-spin" : ""
361
- }), N === e.id ? w("channel.retrying", "Retrying...") : w("channel.retry", "Retry")]
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 { w as DeliveryHistoryPage };
441
+ export { D as DeliveryHistoryPage };
378
442
 
379
443
  //# sourceMappingURL=DeliveryHistoryPage.js.map