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