@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.
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 +312 -277
  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 +33 -33
  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 +24 -24
  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 +206 -142
  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 +322 -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 +6 -6
  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 +201 -133
  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 +126 -58
  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 +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, useState as s } from "react";
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";
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 { jsx as x, jsxs as S } from "react/jsx-runtime";
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 C = {
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-info-500 bg-info-100",
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-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",
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-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",
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-500 bg-warning-100",
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-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) => {
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: 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: 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
- M(await H(L));
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
- H,
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(() => W());
94
- }, [W]), o(() => {
95
- if (!d) return;
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
- W();
110
+ X(void 0);
98
111
  }, 6e4);
99
112
  return () => clearInterval(e);
100
- }, [d, W]);
101
- let G = async (e) => {
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 U(e);
105
- t.success || I(t.error || "Retry failed");
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
- }, K = (e) => C[e] || C.PENDING;
110
- return B ? /* @__PURE__ */ x("div", {
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": w("channel.loading", "Loading"),
114
- children: /* @__PURE__ */ x(m, {
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
- }) : V || !z ? /* @__PURE__ */ x("div", {
153
+ }) : q || !G ? /* @__PURE__ */ S("div", {
120
154
  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",
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__ */ x(l, {
158
+ /* @__PURE__ */ S(l, {
125
159
  size: 20,
126
- className: "text-error-500"
160
+ className: "text-status-error-text"
127
161
  }),
128
- /* @__PURE__ */ x("div", { children: /* @__PURE__ */ x("p", {
129
- className: "text-sm font-medium text-error-700",
130
- children: V || "Channel not found"
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__ */ x("button", {
166
+ /* @__PURE__ */ S("button", {
133
167
  onClick: () => f(`/channels/${d}`),
134
- className: "ml-auto px-3 py-1 text-sm text-error-700 hover:bg-error-200 rounded transition-colors",
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__ */ x(n, {
173
+ }) : /* @__PURE__ */ S(n, {
140
174
  permission: r.CHANNEL_DELIVERY_READ,
141
- children: /* @__PURE__ */ S("div", {
175
+ children: /* @__PURE__ */ C("div", {
142
176
  className: "space-y-6 p-3 sm:p-6",
143
177
  children: [
144
- /* @__PURE__ */ S("div", {
178
+ /* @__PURE__ */ C("div", {
145
179
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
146
- children: [/* @__PURE__ */ S("div", {
180
+ children: [/* @__PURE__ */ C("div", {
147
181
  className: "flex items-center gap-3",
148
- children: [/* @__PURE__ */ x("button", {
182
+ children: [/* @__PURE__ */ S("button", {
149
183
  onClick: () => f(`/channels/${d}`),
150
- "aria-label": w("channel.backToChannel", "Back to channel"),
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__ */ x(u, {
186
+ children: /* @__PURE__ */ S(u, {
153
187
  size: 20,
154
188
  "aria-hidden": "true"
155
189
  })
156
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
190
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
157
191
  className: "text-xl sm:text-2xl font-bold text-foreground",
158
- children: w("channel.deliveryHistory", "Delivery History")
159
- }), /* @__PURE__ */ S("p", {
192
+ children: T("channel.deliveryHistory", "Delivery History")
193
+ }), /* @__PURE__ */ C("p", {
160
194
  className: "text-sm text-muted-foreground mt-1",
161
- children: [z.name, " - Message deliveries"]
195
+ children: [G.name, " - Message deliveries"]
162
196
  })] })]
163
- }), /* @__PURE__ */ S("div", {
197
+ }), /* @__PURE__ */ C("div", {
164
198
  className: "flex items-center gap-3",
165
199
  children: [
166
- /* @__PURE__ */ S("select", {
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__ */ x("option", {
205
+ /* @__PURE__ */ S("option", {
172
206
  value: 10,
173
207
  children: "10 results"
174
208
  }),
175
- /* @__PURE__ */ x("option", {
209
+ /* @__PURE__ */ S("option", {
176
210
  value: 25,
177
211
  children: "25 results"
178
212
  }),
179
- /* @__PURE__ */ x("option", {
213
+ /* @__PURE__ */ S("option", {
180
214
  value: 50,
181
215
  children: "50 results"
182
216
  }),
183
- /* @__PURE__ */ x("option", {
217
+ /* @__PURE__ */ S("option", {
184
218
  value: 100,
185
219
  children: "100 results"
186
220
  })
187
221
  ]
188
222
  }),
189
- /* @__PURE__ */ S("button", {
190
- onClick: W,
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__ */ x(h, {
227
+ children: [/* @__PURE__ */ S(h, {
194
228
  size: 16,
195
229
  className: k ? "animate-spin" : ""
196
- }), w("channel.refresh", "Refresh")]
230
+ }), T("channel.refresh", "Refresh")]
197
231
  }),
198
- /* @__PURE__ */ x(n, {
232
+ /* @__PURE__ */ S(n, {
199
233
  permission: r.CHANNEL_ADMIN,
200
- children: /* @__PURE__ */ S("button", {
201
- onClick: () => void E(),
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: w("channel.exportCSV", "Export to CSV"),
205
- children: [D ? /* @__PURE__ */ x(m, {
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__ */ x(p, { size: 16 }), w("channel.export", "Export")]
242
+ }) : /* @__PURE__ */ S(p, { size: 16 }), T("channel.export", "Export")]
209
243
  })
210
244
  })
211
245
  ]
212
246
  })]
213
247
  }),
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, {
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-500"
219
- }), /* @__PURE__ */ x("p", {
220
- className: "text-sm text-error-700 flex-1",
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__ */ S("div", {
225
- className: "p-4 bg-error-100 border border-error-500 rounded-lg flex items-center gap-3",
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__ */ x(l, {
261
+ /* @__PURE__ */ S(l, {
228
262
  size: 20,
229
- className: "text-error-500"
263
+ className: "text-status-error-text"
230
264
  }),
231
- /* @__PURE__ */ x("p", {
232
- className: "text-sm text-error-700 flex-1",
265
+ /* @__PURE__ */ S("p", {
266
+ className: "text-sm text-status-error-text flex-1",
233
267
  children: F
234
268
  }),
235
- /* @__PURE__ */ x("button", {
269
+ /* @__PURE__ */ S("button", {
236
270
  onClick: () => I(null),
237
- className: "text-error-500 hover:text-error-700",
238
- children: w("channel.dismiss", "Dismiss")
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__ */ x("div", {
276
+ /* @__PURE__ */ S("div", {
243
277
  className: "p-4 bg-surface border border-border rounded-lg",
244
- children: /* @__PURE__ */ x("p", {
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__ */ x("div", {
283
+ /* @__PURE__ */ S("div", {
250
284
  className: "bg-surface border border-border rounded-lg overflow-hidden",
251
- children: /* @__PURE__ */ x("div", {
285
+ children: /* @__PURE__ */ S("div", {
252
286
  className: "overflow-x-auto min-w-full",
253
- children: /* @__PURE__ */ S("table", {
287
+ children: /* @__PURE__ */ C("table", {
254
288
  className: "w-full min-w-[700px]",
255
- children: [/* @__PURE__ */ x("thead", {
289
+ children: [/* @__PURE__ */ S("thead", {
256
290
  className: "bg-muted/50 border-b border-border",
257
- children: /* @__PURE__ */ S("tr", { children: [
258
- /* @__PURE__ */ x("th", {
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: w("channel.status", "Status")
294
+ children: T("channel.status", "Status")
261
295
  }),
262
- /* @__PURE__ */ x("th", {
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: w("channel.content", "Content")
298
+ children: T("channel.content", "Content")
265
299
  }),
266
- /* @__PURE__ */ x("th", {
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: w("channel.sentAt", "Sent At")
302
+ children: T("channel.sentAt", "Sent At")
269
303
  }),
270
- /* @__PURE__ */ x("th", {
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: w("channel.retries", "Retries")
306
+ children: T("channel.retries", "Retries")
273
307
  }),
274
- /* @__PURE__ */ x("th", {
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: w("channel.error", "Error")
310
+ children: T("channel.error", "Error")
277
311
  }),
278
- /* @__PURE__ */ x("th", {
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: w("channel.actions", "Actions")
314
+ children: T("channel.actions", "Actions")
281
315
  })
282
316
  ] })
283
- }), /* @__PURE__ */ x("tbody", {
317
+ }), /* @__PURE__ */ S("tbody", {
284
318
  className: "divide-y divide-border",
285
- children: k ? /* @__PURE__ */ x("tr", { children: /* @__PURE__ */ S("td", {
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__ */ x(m, {
322
+ children: [/* @__PURE__ */ S(m, {
289
323
  size: 24,
290
324
  className: "animate-spin text-accent-primary mx-auto"
291
- }), /* @__PURE__ */ x("p", {
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__ */ x("tr", { children: /* @__PURE__ */ x("td", {
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__ */ S("div", {
332
+ children: /* @__PURE__ */ C("div", {
299
333
  className: "flex flex-col items-center gap-2",
300
334
  children: [
301
- /* @__PURE__ */ x(_, {
335
+ /* @__PURE__ */ S(_, {
302
336
  size: 32,
303
337
  className: "text-muted-foreground"
304
338
  }),
305
- /* @__PURE__ */ x("p", {
339
+ /* @__PURE__ */ S("p", {
306
340
  className: "text-sm font-medium text-foreground",
307
- children: w("channel.noDeliveryAttempts", "No delivery attempts yet")
341
+ children: T("channel.noDeliveryAttempts", "No delivery attempts yet")
308
342
  }),
309
- /* @__PURE__ */ x("p", {
343
+ /* @__PURE__ */ S("p", {
310
344
  className: "text-xs text-muted-foreground",
311
- children: w("channel.sendMessageToSeeHistory", "Send a message through this channel to see delivery history")
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 = K(e.status), i = t.icon, a = e.status === "FAILED" || e.status === "BOUNCED" || e.status === "REJECTED";
317
- return /* @__PURE__ */ S("tr", {
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__ */ x("td", {
354
+ /* @__PURE__ */ S("td", {
321
355
  className: "px-4 py-3",
322
- children: /* @__PURE__ */ S("div", {
356
+ children: /* @__PURE__ */ C("div", {
323
357
  className: "flex items-center gap-2",
324
- children: [/* @__PURE__ */ x(i, {
358
+ children: [/* @__PURE__ */ S(i, {
325
359
  size: 14,
326
360
  className: t.color.split(" ")[0]
327
- }), /* @__PURE__ */ x("span", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
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__ */ x("td", {
346
- className: "px-4 py-3 text-sm text-error-500 max-w-xs truncate",
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__ */ x("td", {
383
+ /* @__PURE__ */ S("td", {
350
384
  className: "px-4 py-3",
351
- children: a && /* @__PURE__ */ x(n, {
385
+ children: a && /* @__PURE__ */ S(n, {
352
386
  permission: r.CHANNEL_DELIVERY_EXECUTE,
353
- children: /* @__PURE__ */ S("button", {
354
- onClick: () => G(e.id),
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: w("channel.retryDelivery", "Retry this delivery"),
358
- children: [/* @__PURE__ */ x(g, {
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 ? w("channel.retrying", "Retrying...") : w("channel.retry", "Retry")]
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 { w as DeliveryHistoryPage };
445
+ export { T as DeliveryHistoryPage };
378
446
 
379
447
  //# sourceMappingURL=DeliveryHistoryPage.js.map