@burdenoff/microfe-channel 2026.624.3 → 2026.625.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +134 -134
- package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +287 -277
- package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +140 -131
- package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js +169 -169
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +204 -209
- package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +161 -155
- package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js +141 -148
- package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateChannelPage.js +27 -24
- package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js +161 -156
- package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +177 -192
- package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditChannelPage.js +130 -122
- package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/EditConnectionPage.js +137 -132
- package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/SendMessagePage.js +87 -84
- package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js +185 -183
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,335 +1,337 @@
|
|
|
1
1
|
import { useChannel as e } from "../../../providers/ChannelProvider.js";
|
|
2
2
|
import { emitShellEvent as t } from "../../../utils/shellBridge.js";
|
|
3
3
|
import { WEBHOOK_RECEIVED_SUBSCRIPTION as n, useChannelSubscription as r } from "../../../hooks/useChannelSubscription.js";
|
|
4
|
-
import { useChannel as
|
|
5
|
-
import { PermissionGuard as
|
|
6
|
-
import { CHANNEL_PERMISSIONS as
|
|
7
|
-
import { useExportWebhookEvents as
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { useI18n as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import { useNavigate as
|
|
12
|
-
import {
|
|
4
|
+
import { useChannel as ee } from "../../../hooks/useChannels.js";
|
|
5
|
+
import { PermissionGuard as i } from "../../../components/PermissionGuard.js";
|
|
6
|
+
import { CHANNEL_PERMISSIONS as a } from "../../../constants/permissions.js";
|
|
7
|
+
import { useExportWebhookEvents as te } from "../hooks/useExport.js";
|
|
8
|
+
import { useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
9
|
+
import { useI18n as ne } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { AlertCircle as u, ArrowLeft as re, CheckCircle2 as d, ChevronLeft as f, ChevronRight as p, Clock as m, Download as h, Eye as ie, EyeOff as g, Loader2 as _, RefreshCw as v, XCircle as y } from "lucide-react";
|
|
11
|
+
import { useNavigate as ae, useParams as oe } from "react-router-dom";
|
|
12
|
+
import { usePermissions as b } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
|
+
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
14
|
+
import { CTAOverflowMenu as w, GlassCard as T, IllustratedEmptyState as se } from "@burdenoff/fe-libs/ui";
|
|
13
15
|
//#region src/channel/modules/channels/pages/WebhookEventsPage.tsx
|
|
14
|
-
var
|
|
16
|
+
var E = {
|
|
15
17
|
PENDING: {
|
|
16
18
|
label: "Pending",
|
|
17
19
|
color: "text-text-secondary bg-bg-sunken",
|
|
18
|
-
icon:
|
|
20
|
+
icon: m
|
|
19
21
|
},
|
|
20
22
|
PROCESSING: {
|
|
21
23
|
label: "Processing",
|
|
22
24
|
color: "text-accent-primary bg-accent-primary/10",
|
|
23
|
-
icon:
|
|
25
|
+
icon: v
|
|
24
26
|
},
|
|
25
27
|
COMPLETED: {
|
|
26
28
|
label: "Completed",
|
|
27
29
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
28
|
-
icon:
|
|
30
|
+
icon: d
|
|
29
31
|
},
|
|
30
32
|
FAILED: {
|
|
31
33
|
label: "Failed",
|
|
32
34
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
33
|
-
icon:
|
|
35
|
+
icon: y
|
|
34
36
|
},
|
|
35
37
|
IGNORED: {
|
|
36
38
|
label: "Ignored",
|
|
37
39
|
color: "text-status-warning-text bg-status-warning-bg-subtle",
|
|
38
|
-
icon:
|
|
40
|
+
icon: g
|
|
39
41
|
}
|
|
40
42
|
};
|
|
41
|
-
function
|
|
42
|
-
let { channelId:
|
|
43
|
-
let n =
|
|
43
|
+
function D() {
|
|
44
|
+
let { channelId: d } = oe(), m = ae(), { hasPermission: y } = b(), D = y(a.CHANNEL_WEBHOOK_EXPORT), { t: ce } = ne(), O = (e, t) => {
|
|
45
|
+
let n = ce(e);
|
|
44
46
|
return n === e ? t : n;
|
|
45
|
-
}, { organizationId:
|
|
46
|
-
if (
|
|
47
|
-
|
|
47
|
+
}, { organizationId: le } = e(), { triggerExport: k, isExporting: A, exportError: j } = te(le ?? void 0, d), [M, N] = l(!0), [P, F] = l([]), [I, L] = l(null), [R, z] = l(25), [B, V] = l(0), [H, U] = l([void 0]), [W, G] = l(0), { channel: K, isLoading: ue, error: q, fetchWebhookEvents: J } = ee(d), Y = o(async (e) => {
|
|
48
|
+
if (d) {
|
|
49
|
+
N(!0);
|
|
48
50
|
try {
|
|
49
|
-
let t = await J(
|
|
50
|
-
return
|
|
51
|
+
let t = await J(R, e);
|
|
52
|
+
return F(t.items), V(t.total), t.nextCursor;
|
|
51
53
|
} finally {
|
|
52
|
-
|
|
54
|
+
N(!1);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
}, [
|
|
56
|
-
|
|
58
|
+
d,
|
|
57
59
|
J,
|
|
58
|
-
|
|
59
|
-
]), X =
|
|
60
|
-
|
|
61
|
-
X.current = Y, Z.current =
|
|
60
|
+
R
|
|
61
|
+
]), X = c(Y), Z = c(H), Q = c(W);
|
|
62
|
+
s(() => {
|
|
63
|
+
X.current = Y, Z.current = H, Q.current = W;
|
|
62
64
|
});
|
|
63
|
-
let $ =
|
|
64
|
-
|
|
65
|
+
let $ = c(!0);
|
|
66
|
+
s(() => {
|
|
65
67
|
Promise.resolve().then(() => {
|
|
66
|
-
|
|
68
|
+
U([void 0]), G(0), X.current(void 0);
|
|
67
69
|
});
|
|
68
|
-
}, [
|
|
70
|
+
}, [R]), s(() => {
|
|
69
71
|
if ($.current) {
|
|
70
72
|
$.current = !1;
|
|
71
73
|
return;
|
|
72
74
|
}
|
|
73
|
-
Promise.resolve().then(() => X.current(Z.current[
|
|
74
|
-
}, [
|
|
75
|
-
let
|
|
76
|
-
let e = await Y(
|
|
77
|
-
e &&
|
|
75
|
+
Promise.resolve().then(() => X.current(Z.current[W]));
|
|
76
|
+
}, [W]);
|
|
77
|
+
let de = o(async () => {
|
|
78
|
+
let e = await Y(H[W]);
|
|
79
|
+
e && U((t) => {
|
|
78
80
|
let n = [...t];
|
|
79
|
-
return n[
|
|
80
|
-
}),
|
|
81
|
+
return n[W + 1] || (n[W + 1] = e), n;
|
|
82
|
+
}), G((e) => e + 1);
|
|
81
83
|
}, [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
H,
|
|
85
|
+
W,
|
|
84
86
|
Y
|
|
85
|
-
]),
|
|
86
|
-
let e =
|
|
87
|
-
|
|
87
|
+
]), fe = o(() => {
|
|
88
|
+
let e = W - 1;
|
|
89
|
+
G(e), Y(H[e]);
|
|
88
90
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
H,
|
|
92
|
+
W,
|
|
91
93
|
Y
|
|
92
|
-
]),
|
|
94
|
+
]), pe = P.length === R, me = W > 0;
|
|
93
95
|
r({
|
|
94
96
|
query: n,
|
|
95
|
-
variables: { channelId:
|
|
97
|
+
variables: { channelId: d },
|
|
96
98
|
operationName: "WebhookReceived",
|
|
97
|
-
enabled: !!
|
|
98
|
-
onData:
|
|
99
|
-
t("webhook.received", { channelId:
|
|
100
|
-
}, [
|
|
101
|
-
pollFn:
|
|
99
|
+
enabled: !!d,
|
|
100
|
+
onData: o(() => {
|
|
101
|
+
t("webhook.received", { channelId: d }), X.current(Z.current[Q.current]);
|
|
102
|
+
}, [d]),
|
|
103
|
+
pollFn: o(() => {
|
|
102
104
|
X.current(Z.current[Q.current]);
|
|
103
105
|
}, []),
|
|
104
106
|
pollIntervalMs: 6e4
|
|
105
107
|
});
|
|
106
|
-
let
|
|
107
|
-
return
|
|
108
|
+
let he = (e) => E[e] || E.PENDING;
|
|
109
|
+
return ue ? /* @__PURE__ */ S("div", {
|
|
108
110
|
className: "flex items-center justify-center min-h-screen",
|
|
109
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ S(_, {
|
|
110
112
|
size: 32,
|
|
111
113
|
className: "animate-spin text-accent-primary"
|
|
112
114
|
})
|
|
113
|
-
}) : q || !
|
|
115
|
+
}) : q || !K ? /* @__PURE__ */ S("div", {
|
|
114
116
|
className: "p-6",
|
|
115
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ C("div", {
|
|
116
118
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
117
119
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ S(u, {
|
|
119
121
|
size: 20,
|
|
120
122
|
className: "text-status-error-text"
|
|
121
123
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ S("div", { children: /* @__PURE__ */ S("p", {
|
|
123
125
|
className: "text-sm font-medium text-status-error-text",
|
|
124
126
|
children: q || "Channel not found"
|
|
125
127
|
}) }),
|
|
126
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ S("button", {
|
|
127
129
|
type: "button",
|
|
128
|
-
onClick: () =>
|
|
130
|
+
onClick: () => m(`/channels/${d}`),
|
|
129
131
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
130
132
|
children: "Go Back"
|
|
131
133
|
})
|
|
132
134
|
]
|
|
133
135
|
})
|
|
134
|
-
}) : /* @__PURE__ */
|
|
135
|
-
permission:
|
|
136
|
-
children: /* @__PURE__ */
|
|
136
|
+
}) : /* @__PURE__ */ S(i, {
|
|
137
|
+
permission: a.CHANNEL_WEBHOOK_READ,
|
|
138
|
+
children: /* @__PURE__ */ C("div", {
|
|
137
139
|
className: "space-y-6 p-3 sm:p-6",
|
|
138
140
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ C("div", {
|
|
140
142
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ C("div", {
|
|
142
144
|
className: "flex items-center gap-3",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ S("button", {
|
|
144
146
|
type: "button",
|
|
145
|
-
onClick: () =>
|
|
147
|
+
onClick: () => m(`/channels/${d}`),
|
|
146
148
|
"aria-label": O("channel.backToChannel", "Back to channel"),
|
|
147
149
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
148
|
-
children: /* @__PURE__ */
|
|
150
|
+
children: /* @__PURE__ */ S(re, {
|
|
149
151
|
size: 20,
|
|
150
152
|
"aria-hidden": "true"
|
|
151
153
|
})
|
|
152
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
|
|
153
155
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
154
156
|
children: O("channel.webhookEvents", "Webhook Events")
|
|
155
|
-
}), /* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ C("p", {
|
|
156
158
|
className: "text-sm text-text-secondary mt-1",
|
|
157
|
-
children: [
|
|
159
|
+
children: [K.name, " - Event history"]
|
|
158
160
|
})] })]
|
|
159
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ C("div", {
|
|
160
162
|
className: "flex items-center gap-3",
|
|
161
|
-
children: [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
163
|
+
children: [/* @__PURE__ */ C("select", {
|
|
164
|
+
value: R,
|
|
165
|
+
onChange: (e) => z(Number(e.target.value)),
|
|
166
|
+
className: "px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg/50 text-text-primary",
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ S("option", {
|
|
169
|
+
value: 10,
|
|
170
|
+
children: "10 results"
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ S("option", {
|
|
173
|
+
value: 25,
|
|
174
|
+
children: "25 results"
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ S("option", {
|
|
177
|
+
value: 50,
|
|
178
|
+
children: "50 results"
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ S("option", {
|
|
181
|
+
value: 100,
|
|
182
|
+
children: "100 results"
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
}), /* @__PURE__ */ S(w, { actions: [{
|
|
186
|
+
label: O("channel.refresh", "Refresh"),
|
|
187
|
+
icon: /* @__PURE__ */ S(v, {
|
|
188
|
+
size: 16,
|
|
189
|
+
className: M ? "animate-spin" : "",
|
|
190
|
+
"aria-hidden": "true"
|
|
184
191
|
}),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
disabled: M,
|
|
193
|
+
onSelect: () => void Y(H[W])
|
|
194
|
+
}, ...D ? [{
|
|
195
|
+
label: O("channel.export", "Export"),
|
|
196
|
+
icon: A ? /* @__PURE__ */ S(_, {
|
|
197
|
+
size: 16,
|
|
198
|
+
className: "animate-spin",
|
|
199
|
+
"aria-hidden": "true"
|
|
200
|
+
}) : /* @__PURE__ */ S(h, {
|
|
201
|
+
size: 16,
|
|
202
|
+
"aria-hidden": "true"
|
|
194
203
|
}),
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
type: "button",
|
|
199
|
-
onClick: () => void A(),
|
|
200
|
-
disabled: j,
|
|
201
|
-
className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-fg border border-border-subtle hover:bg-bg-elevated rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
202
|
-
title: O("channel.exportCSV", "Export to CSV"),
|
|
203
|
-
children: [j ? /* @__PURE__ */ T(x, {
|
|
204
|
-
size: 16,
|
|
205
|
-
className: "animate-spin"
|
|
206
|
-
}) : /* @__PURE__ */ T(v, { size: 16 }), O("channel.export", "Export")]
|
|
207
|
-
})
|
|
208
|
-
})
|
|
209
|
-
]
|
|
204
|
+
disabled: A,
|
|
205
|
+
onSelect: () => void k()
|
|
206
|
+
}] : []] })]
|
|
210
207
|
})]
|
|
211
208
|
}),
|
|
212
|
-
|
|
209
|
+
j && /* @__PURE__ */ C("div", {
|
|
213
210
|
className: "p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg flex items-center gap-3",
|
|
214
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ S(u, {
|
|
215
212
|
size: 20,
|
|
216
213
|
className: "text-status-error-text"
|
|
217
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ S("p", {
|
|
218
215
|
className: "text-sm text-status-error-text flex-1",
|
|
219
|
-
children:
|
|
216
|
+
children: j
|
|
220
217
|
})]
|
|
221
218
|
}),
|
|
222
|
-
/* @__PURE__ */ T
|
|
223
|
-
|
|
224
|
-
|
|
219
|
+
/* @__PURE__ */ S(T, {
|
|
220
|
+
treatment: "insight",
|
|
221
|
+
className: "p-4 border-border-seam",
|
|
222
|
+
children: /* @__PURE__ */ S("p", {
|
|
225
223
|
className: "text-sm text-text-secondary",
|
|
226
224
|
children: "Webhook events show all incoming webhooks received by this channel. Data is retained for 7 days."
|
|
227
225
|
})
|
|
228
226
|
}),
|
|
229
|
-
/* @__PURE__ */ T
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
/* @__PURE__ */ S(T, {
|
|
228
|
+
treatment: "plain",
|
|
229
|
+
className: "border-border-seam rounded-lg overflow-hidden p-0",
|
|
230
|
+
children: /* @__PURE__ */ S("div", {
|
|
232
231
|
className: "overflow-x-auto min-w-full",
|
|
233
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ C("table", {
|
|
234
233
|
className: "w-full min-w-[600px]",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ S("thead", {
|
|
236
235
|
className: "bg-bg-sunken/50 border-b border-border-subtle",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ C("tr", { children: [
|
|
237
|
+
/* @__PURE__ */ S("th", {
|
|
239
238
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
240
239
|
children: O("channel.status", "Status")
|
|
241
240
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ S("th", {
|
|
243
242
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
244
243
|
children: O("channel.eventType", "Event Type")
|
|
245
244
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ S("th", {
|
|
247
246
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
248
247
|
children: O("channel.duplicate", "Duplicate")
|
|
249
248
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ S("th", {
|
|
251
250
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
252
251
|
children: O("channel.processedAt", "Processed At")
|
|
253
252
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ S("th", {
|
|
255
254
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
256
255
|
children: O("channel.error", "Error")
|
|
257
256
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ S("th", {
|
|
259
258
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
260
259
|
children: O("channel.actions", "Actions")
|
|
261
260
|
})
|
|
262
261
|
] })
|
|
263
|
-
}), /* @__PURE__ */
|
|
262
|
+
}), /* @__PURE__ */ S("tbody", {
|
|
264
263
|
className: "divide-y divide-border",
|
|
265
|
-
children:
|
|
264
|
+
children: P.length === 0 ? /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
266
265
|
colSpan: 6,
|
|
267
|
-
className: "px-4 py-8
|
|
268
|
-
children:
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
266
|
+
className: "px-4 py-8",
|
|
267
|
+
children: /* @__PURE__ */ S(se, {
|
|
268
|
+
illustration: "empty-notifications",
|
|
269
|
+
title: O("channel.noWebhookEventsFound", "No webhook events found")
|
|
270
|
+
})
|
|
271
|
+
}) }) : P.map((e) => {
|
|
272
|
+
let t = he(e.status), n = t.icon, r = I === e.id;
|
|
273
|
+
return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("tr", {
|
|
272
274
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
273
275
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ S("td", {
|
|
275
277
|
className: "px-4 py-3",
|
|
276
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ C("div", {
|
|
277
279
|
className: "flex items-center gap-2",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
280
|
+
children: [/* @__PURE__ */ S(n, {
|
|
279
281
|
size: 14,
|
|
280
282
|
className: t.color.split(" ")[0]
|
|
281
|
-
}), /* @__PURE__ */
|
|
283
|
+
}), /* @__PURE__ */ S("span", {
|
|
282
284
|
className: `text-sm font-medium ${t.color}`,
|
|
283
285
|
children: t.label
|
|
284
286
|
})]
|
|
285
287
|
})
|
|
286
288
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ S("td", {
|
|
288
290
|
className: "px-4 py-3 text-sm font-mono text-text-primary",
|
|
289
291
|
children: e.eventType
|
|
290
292
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ S("td", {
|
|
292
294
|
className: "px-4 py-3",
|
|
293
|
-
children: e.isDuplicate ? /* @__PURE__ */
|
|
295
|
+
children: e.isDuplicate ? /* @__PURE__ */ S("span", {
|
|
294
296
|
className: "text-xs text-status-warning-text bg-status-warning-bg-subtle px-2 py-1 rounded",
|
|
295
297
|
children: "Duplicate"
|
|
296
|
-
}) : /* @__PURE__ */
|
|
298
|
+
}) : /* @__PURE__ */ S("span", {
|
|
297
299
|
className: "text-xs text-text-secondary",
|
|
298
300
|
children: "No"
|
|
299
301
|
})
|
|
300
302
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ S("td", {
|
|
302
304
|
className: "px-4 py-3 text-sm text-text-secondary",
|
|
303
305
|
children: e.processedAt ? new Date(e.processedAt).toLocaleString() : "-"
|
|
304
306
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ S("td", {
|
|
306
308
|
className: "px-4 py-3 text-sm text-status-error-text max-w-xs truncate",
|
|
307
309
|
children: e.errorMessage || "-"
|
|
308
310
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ S("td", {
|
|
310
312
|
className: "px-4 py-3",
|
|
311
|
-
children: /* @__PURE__ */
|
|
313
|
+
children: /* @__PURE__ */ S("button", {
|
|
312
314
|
type: "button",
|
|
313
|
-
onClick: () =>
|
|
315
|
+
onClick: () => L(r ? null : e.id),
|
|
314
316
|
"aria-label": r ? O("channel.hidePayload", "Hide payload") : O("channel.viewPayload", "View payload"),
|
|
315
317
|
"aria-expanded": r,
|
|
316
318
|
className: "p-1 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded transition-colors",
|
|
317
|
-
children:
|
|
319
|
+
children: S(r ? g : ie, {
|
|
318
320
|
size: 16,
|
|
319
321
|
"aria-hidden": "true"
|
|
320
322
|
})
|
|
321
323
|
})
|
|
322
324
|
})
|
|
323
325
|
]
|
|
324
|
-
}, e.id), r && /* @__PURE__ */
|
|
326
|
+
}, e.id), r && /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
|
|
325
327
|
colSpan: 6,
|
|
326
328
|
className: "px-4 py-3 bg-bg-sunken/30",
|
|
327
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ C("div", {
|
|
328
330
|
className: "text-xs",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ C("p", {
|
|
330
332
|
className: "text-text-secondary mb-1",
|
|
331
333
|
children: [O("channel.payload", "Payload"), ":"]
|
|
332
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ S("pre", {
|
|
333
335
|
className: "bg-surface p-2 rounded border border-border-subtle overflow-auto",
|
|
334
336
|
children: JSON.stringify(e.payload, null, 2)
|
|
335
337
|
})]
|
|
@@ -340,39 +342,39 @@ function O() {
|
|
|
340
342
|
})
|
|
341
343
|
})
|
|
342
344
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ C("div", {
|
|
344
346
|
className: "flex items-center justify-between",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ S("p", {
|
|
346
348
|
className: "text-sm text-text-secondary",
|
|
347
|
-
children:
|
|
349
|
+
children: B > 0 && /* @__PURE__ */ C(x, { children: [
|
|
348
350
|
O("channel.page", "Page"),
|
|
349
351
|
" ",
|
|
350
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ S("span", {
|
|
351
353
|
className: "font-medium",
|
|
352
|
-
children:
|
|
354
|
+
children: W + 1
|
|
353
355
|
}),
|
|
354
356
|
" · ",
|
|
355
357
|
O("channel.totalRecords", "Total"),
|
|
356
358
|
": ",
|
|
357
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ S("span", {
|
|
358
360
|
className: "font-medium",
|
|
359
|
-
children:
|
|
361
|
+
children: B
|
|
360
362
|
})
|
|
361
363
|
] })
|
|
362
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ C("div", {
|
|
363
365
|
className: "flex items-center gap-2",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ C("button", {
|
|
365
367
|
type: "button",
|
|
366
|
-
onClick:
|
|
367
|
-
disabled: !
|
|
368
|
+
onClick: fe,
|
|
369
|
+
disabled: !me || M,
|
|
368
370
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
370
|
-
}), /* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ S(f, { size: 16 }), O("channel.previous", "Previous")]
|
|
372
|
+
}), /* @__PURE__ */ C("button", {
|
|
371
373
|
type: "button",
|
|
372
|
-
onClick: () => void
|
|
373
|
-
disabled: !
|
|
374
|
+
onClick: () => void de(),
|
|
375
|
+
disabled: !pe || M,
|
|
374
376
|
className: "flex items-center gap-1 px-3 py-1.5 text-sm border border-border-subtle rounded-lg hover:bg-bg-sunken transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
375
|
-
children: [O("channel.next", "Next"), /* @__PURE__ */
|
|
377
|
+
children: [O("channel.next", "Next"), /* @__PURE__ */ S(p, { size: 16 })]
|
|
376
378
|
})]
|
|
377
379
|
})]
|
|
378
380
|
})
|
|
@@ -381,6 +383,6 @@ function O() {
|
|
|
381
383
|
});
|
|
382
384
|
}
|
|
383
385
|
//#endregion
|
|
384
|
-
export {
|
|
386
|
+
export { D as WebhookEventsPage };
|
|
385
387
|
|
|
386
388
|
//# sourceMappingURL=WebhookEventsPage.js.map
|