@burdenoff/microfe-channel 2026.624.3 → 2026.625.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 +108 -98
- 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 +170 -173
- package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
- package/dist/channel/modules/channels/pages/ChannelsListPage.js +127 -120
- 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 +70 -68
- 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 +179 -182
- 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 +193 -194
- package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,335 +1,334 @@
|
|
|
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 o } from "../hooks/useExport.js";
|
|
8
|
+
import { useCallback as s, useEffect as c, useRef as l, useState as u } from "react";
|
|
9
|
+
import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { AlertCircle as d, ArrowLeft as ne, CheckCircle2 as f, ChevronLeft as p, ChevronRight as m, Clock as h, Download as re, Eye as g, EyeOff as _, Loader2 as v, RefreshCw as y, XCircle as b } from "lucide-react";
|
|
11
|
+
import { useNavigate as x, useParams as ie } from "react-router-dom";
|
|
12
|
+
import { usePermissions as ae } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
13
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
14
|
+
import { CTAOverflowMenu as oe, GlassCard as T } 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: h
|
|
19
21
|
},
|
|
20
22
|
PROCESSING: {
|
|
21
23
|
label: "Processing",
|
|
22
24
|
color: "text-accent-primary bg-accent-primary/10",
|
|
23
|
-
icon:
|
|
25
|
+
icon: y
|
|
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: f
|
|
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: b
|
|
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: _
|
|
39
41
|
}
|
|
40
42
|
};
|
|
41
|
-
function
|
|
42
|
-
let { channelId: h } =
|
|
43
|
-
let n =
|
|
43
|
+
function D() {
|
|
44
|
+
let { channelId: f } = ie(), h = x(), { hasPermission: b } = ae(), D = b(a.CHANNEL_WEBHOOK_EXPORT), { t: O } = te(), k = (e, t) => {
|
|
45
|
+
let n = O(e);
|
|
44
46
|
return n === e ? t : n;
|
|
45
|
-
}, { organizationId:
|
|
46
|
-
if (
|
|
47
|
-
|
|
47
|
+
}, { organizationId: se } = e(), { triggerExport: ce, isExporting: A, exportError: j } = o(se ?? void 0, f), [M, N] = u(!0), [P, F] = u([]), [I, L] = u(null), [R, z] = u(25), [B, V] = u(0), [H, U] = u([void 0]), [W, G] = u(0), { channel: K, isLoading: le, error: q, fetchWebhookEvents: J } = ee(f), Y = s(async (e) => {
|
|
48
|
+
if (f) {
|
|
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
|
+
f,
|
|
57
59
|
J,
|
|
58
|
-
|
|
59
|
-
]), X =
|
|
60
|
-
|
|
61
|
-
X.current = Y, Z.current =
|
|
60
|
+
R
|
|
61
|
+
]), X = l(Y), Z = l(H), Q = l(W);
|
|
62
|
+
c(() => {
|
|
63
|
+
X.current = Y, Z.current = H, Q.current = W;
|
|
62
64
|
});
|
|
63
|
-
let $ =
|
|
64
|
-
|
|
65
|
+
let $ = l(!0);
|
|
66
|
+
c(() => {
|
|
65
67
|
Promise.resolve().then(() => {
|
|
66
|
-
|
|
68
|
+
U([void 0]), G(0), X.current(void 0);
|
|
67
69
|
});
|
|
68
|
-
}, [
|
|
70
|
+
}, [R]), c(() => {
|
|
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 ue = s(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
|
+
]), de = s(() => {
|
|
88
|
+
let e = W - 1;
|
|
89
|
+
G(e), Y(H[e]);
|
|
88
90
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
H,
|
|
92
|
+
W,
|
|
91
93
|
Y
|
|
92
|
-
]),
|
|
94
|
+
]), fe = P.length === R, pe = W > 0;
|
|
93
95
|
r({
|
|
94
96
|
query: n,
|
|
95
|
-
variables: { channelId:
|
|
97
|
+
variables: { channelId: f },
|
|
96
98
|
operationName: "WebhookReceived",
|
|
97
|
-
enabled: !!
|
|
98
|
-
onData:
|
|
99
|
-
t("webhook.received", { channelId:
|
|
100
|
-
}, [
|
|
101
|
-
pollFn:
|
|
99
|
+
enabled: !!f,
|
|
100
|
+
onData: s(() => {
|
|
101
|
+
t("webhook.received", { channelId: f }), X.current(Z.current[Q.current]);
|
|
102
|
+
}, [f]),
|
|
103
|
+
pollFn: s(() => {
|
|
102
104
|
X.current(Z.current[Q.current]);
|
|
103
105
|
}, []),
|
|
104
106
|
pollIntervalMs: 6e4
|
|
105
107
|
});
|
|
106
|
-
let
|
|
107
|
-
return
|
|
108
|
+
let me = (e) => E[e] || E.PENDING;
|
|
109
|
+
return le ? /* @__PURE__ */ C("div", {
|
|
108
110
|
className: "flex items-center justify-center min-h-screen",
|
|
109
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ C(v, {
|
|
110
112
|
size: 32,
|
|
111
113
|
className: "animate-spin text-accent-primary"
|
|
112
114
|
})
|
|
113
|
-
}) : q || !
|
|
115
|
+
}) : q || !K ? /* @__PURE__ */ C("div", {
|
|
114
116
|
className: "p-6",
|
|
115
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ w("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__ */ C(d, {
|
|
119
121
|
size: 20,
|
|
120
122
|
className: "text-status-error-text"
|
|
121
123
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ C("div", { children: /* @__PURE__ */ C("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__ */ C("button", {
|
|
127
129
|
type: "button",
|
|
128
|
-
onClick: () =>
|
|
130
|
+
onClick: () => h(`/channels/${f}`),
|
|
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__ */ C(i, {
|
|
137
|
+
permission: a.CHANNEL_WEBHOOK_READ,
|
|
138
|
+
children: /* @__PURE__ */ w("div", {
|
|
137
139
|
className: "space-y-6 p-3 sm:p-6",
|
|
138
140
|
children: [
|
|
139
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ w("div", {
|
|
140
142
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ w("div", {
|
|
142
144
|
className: "flex items-center gap-3",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ C("button", {
|
|
144
146
|
type: "button",
|
|
145
|
-
onClick: () =>
|
|
146
|
-
"aria-label":
|
|
147
|
+
onClick: () => h(`/channels/${f}`),
|
|
148
|
+
"aria-label": k("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__ */ C(ne, {
|
|
149
151
|
size: 20,
|
|
150
152
|
"aria-hidden": "true"
|
|
151
153
|
})
|
|
152
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
|
|
153
155
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
154
|
-
children:
|
|
155
|
-
}), /* @__PURE__ */
|
|
156
|
+
children: k("channel.webhookEvents", "Webhook Events")
|
|
157
|
+
}), /* @__PURE__ */ w("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__ */ w("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__ */ w("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__ */ C("option", {
|
|
169
|
+
value: 10,
|
|
170
|
+
children: "10 results"
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ C("option", {
|
|
173
|
+
value: 25,
|
|
174
|
+
children: "25 results"
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ C("option", {
|
|
177
|
+
value: 50,
|
|
178
|
+
children: "50 results"
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ C("option", {
|
|
181
|
+
value: 100,
|
|
182
|
+
children: "100 results"
|
|
183
|
+
})
|
|
184
|
+
]
|
|
185
|
+
}), /* @__PURE__ */ C(oe, { actions: [{
|
|
186
|
+
label: k("channel.refresh", "Refresh"),
|
|
187
|
+
icon: /* @__PURE__ */ C(y, {
|
|
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: k("channel.export", "Export"),
|
|
196
|
+
icon: A ? /* @__PURE__ */ C(v, {
|
|
197
|
+
size: 16,
|
|
198
|
+
className: "animate-spin",
|
|
199
|
+
"aria-hidden": "true"
|
|
200
|
+
}) : /* @__PURE__ */ C(re, {
|
|
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 ce()
|
|
206
|
+
}] : []] })]
|
|
210
207
|
})]
|
|
211
208
|
}),
|
|
212
|
-
|
|
209
|
+
j && /* @__PURE__ */ w("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__ */ C(d, {
|
|
215
212
|
size: 20,
|
|
216
213
|
className: "text-status-error-text"
|
|
217
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ C("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__ */ C(T, {
|
|
220
|
+
treatment: "insight",
|
|
221
|
+
className: "p-4 border-border-seam",
|
|
222
|
+
children: /* @__PURE__ */ C("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__ */ C(T, {
|
|
228
|
+
treatment: "plain",
|
|
229
|
+
className: "border-border-seam rounded-lg overflow-hidden p-0",
|
|
230
|
+
children: /* @__PURE__ */ C("div", {
|
|
232
231
|
className: "overflow-x-auto min-w-full",
|
|
233
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ w("table", {
|
|
234
233
|
className: "w-full min-w-[600px]",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ C("thead", {
|
|
236
235
|
className: "bg-bg-sunken/50 border-b border-border-subtle",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ w("tr", { children: [
|
|
237
|
+
/* @__PURE__ */ C("th", {
|
|
239
238
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
240
|
-
children:
|
|
239
|
+
children: k("channel.status", "Status")
|
|
241
240
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ C("th", {
|
|
243
242
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
244
|
-
children:
|
|
243
|
+
children: k("channel.eventType", "Event Type")
|
|
245
244
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ C("th", {
|
|
247
246
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
248
|
-
children:
|
|
247
|
+
children: k("channel.duplicate", "Duplicate")
|
|
249
248
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ C("th", {
|
|
251
250
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
252
|
-
children:
|
|
251
|
+
children: k("channel.processedAt", "Processed At")
|
|
253
252
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ C("th", {
|
|
255
254
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
256
|
-
children:
|
|
255
|
+
children: k("channel.error", "Error")
|
|
257
256
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ C("th", {
|
|
259
258
|
className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
260
|
-
children:
|
|
259
|
+
children: k("channel.actions", "Actions")
|
|
261
260
|
})
|
|
262
261
|
] })
|
|
263
|
-
}), /* @__PURE__ */
|
|
262
|
+
}), /* @__PURE__ */ C("tbody", {
|
|
264
263
|
className: "divide-y divide-border",
|
|
265
|
-
children:
|
|
264
|
+
children: P.length === 0 ? /* @__PURE__ */ C("tr", { children: /* @__PURE__ */ C("td", {
|
|
266
265
|
colSpan: 6,
|
|
267
266
|
className: "px-4 py-8 text-center text-text-secondary",
|
|
268
|
-
children:
|
|
269
|
-
}) }) :
|
|
270
|
-
let t =
|
|
271
|
-
return /* @__PURE__ */
|
|
267
|
+
children: k("channel.noWebhookEventsFound", "No webhook events found")
|
|
268
|
+
}) }) : P.map((e) => {
|
|
269
|
+
let t = me(e.status), n = t.icon, r = I === e.id;
|
|
270
|
+
return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("tr", {
|
|
272
271
|
className: "hover:bg-bg-sunken/30 transition-colors",
|
|
273
272
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ C("td", {
|
|
275
274
|
className: "px-4 py-3",
|
|
276
|
-
children: /* @__PURE__ */
|
|
275
|
+
children: /* @__PURE__ */ w("div", {
|
|
277
276
|
className: "flex items-center gap-2",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ C(n, {
|
|
279
278
|
size: 14,
|
|
280
279
|
className: t.color.split(" ")[0]
|
|
281
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ C("span", {
|
|
282
281
|
className: `text-sm font-medium ${t.color}`,
|
|
283
282
|
children: t.label
|
|
284
283
|
})]
|
|
285
284
|
})
|
|
286
285
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ C("td", {
|
|
288
287
|
className: "px-4 py-3 text-sm font-mono text-text-primary",
|
|
289
288
|
children: e.eventType
|
|
290
289
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ C("td", {
|
|
292
291
|
className: "px-4 py-3",
|
|
293
|
-
children: e.isDuplicate ? /* @__PURE__ */
|
|
292
|
+
children: e.isDuplicate ? /* @__PURE__ */ C("span", {
|
|
294
293
|
className: "text-xs text-status-warning-text bg-status-warning-bg-subtle px-2 py-1 rounded",
|
|
295
294
|
children: "Duplicate"
|
|
296
|
-
}) : /* @__PURE__ */
|
|
295
|
+
}) : /* @__PURE__ */ C("span", {
|
|
297
296
|
className: "text-xs text-text-secondary",
|
|
298
297
|
children: "No"
|
|
299
298
|
})
|
|
300
299
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ C("td", {
|
|
302
301
|
className: "px-4 py-3 text-sm text-text-secondary",
|
|
303
302
|
children: e.processedAt ? new Date(e.processedAt).toLocaleString() : "-"
|
|
304
303
|
}),
|
|
305
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ C("td", {
|
|
306
305
|
className: "px-4 py-3 text-sm text-status-error-text max-w-xs truncate",
|
|
307
306
|
children: e.errorMessage || "-"
|
|
308
307
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ C("td", {
|
|
310
309
|
className: "px-4 py-3",
|
|
311
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ C("button", {
|
|
312
311
|
type: "button",
|
|
313
|
-
onClick: () =>
|
|
314
|
-
"aria-label": r ?
|
|
312
|
+
onClick: () => L(r ? null : e.id),
|
|
313
|
+
"aria-label": r ? k("channel.hidePayload", "Hide payload") : k("channel.viewPayload", "View payload"),
|
|
315
314
|
"aria-expanded": r,
|
|
316
315
|
className: "p-1 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded transition-colors",
|
|
317
|
-
children:
|
|
316
|
+
children: C(r ? _ : g, {
|
|
318
317
|
size: 16,
|
|
319
318
|
"aria-hidden": "true"
|
|
320
319
|
})
|
|
321
320
|
})
|
|
322
321
|
})
|
|
323
322
|
]
|
|
324
|
-
}, e.id), r && /* @__PURE__ */
|
|
323
|
+
}, e.id), r && /* @__PURE__ */ C("tr", { children: /* @__PURE__ */ C("td", {
|
|
325
324
|
colSpan: 6,
|
|
326
325
|
className: "px-4 py-3 bg-bg-sunken/30",
|
|
327
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ w("div", {
|
|
328
327
|
className: "text-xs",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
328
|
+
children: [/* @__PURE__ */ w("p", {
|
|
330
329
|
className: "text-text-secondary mb-1",
|
|
331
|
-
children: [
|
|
332
|
-
}), /* @__PURE__ */
|
|
330
|
+
children: [k("channel.payload", "Payload"), ":"]
|
|
331
|
+
}), /* @__PURE__ */ C("pre", {
|
|
333
332
|
className: "bg-surface p-2 rounded border border-border-subtle overflow-auto",
|
|
334
333
|
children: JSON.stringify(e.payload, null, 2)
|
|
335
334
|
})]
|
|
@@ -340,39 +339,39 @@ function O() {
|
|
|
340
339
|
})
|
|
341
340
|
})
|
|
342
341
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ w("div", {
|
|
344
343
|
className: "flex items-center justify-between",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ C("p", {
|
|
346
345
|
className: "text-sm text-text-secondary",
|
|
347
|
-
children:
|
|
348
|
-
|
|
346
|
+
children: B > 0 && /* @__PURE__ */ w(S, { children: [
|
|
347
|
+
k("channel.page", "Page"),
|
|
349
348
|
" ",
|
|
350
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ C("span", {
|
|
351
350
|
className: "font-medium",
|
|
352
|
-
children:
|
|
351
|
+
children: W + 1
|
|
353
352
|
}),
|
|
354
353
|
" · ",
|
|
355
|
-
|
|
354
|
+
k("channel.totalRecords", "Total"),
|
|
356
355
|
": ",
|
|
357
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ C("span", {
|
|
358
357
|
className: "font-medium",
|
|
359
|
-
children:
|
|
358
|
+
children: B
|
|
360
359
|
})
|
|
361
360
|
] })
|
|
362
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ w("div", {
|
|
363
362
|
className: "flex items-center gap-2",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ w("button", {
|
|
365
364
|
type: "button",
|
|
366
|
-
onClick:
|
|
367
|
-
disabled: !
|
|
365
|
+
onClick: de,
|
|
366
|
+
disabled: !pe || M,
|
|
368
367
|
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__ */
|
|
368
|
+
children: [/* @__PURE__ */ C(p, { size: 16 }), k("channel.previous", "Previous")]
|
|
369
|
+
}), /* @__PURE__ */ w("button", {
|
|
371
370
|
type: "button",
|
|
372
|
-
onClick: () => void
|
|
373
|
-
disabled: !
|
|
371
|
+
onClick: () => void ue(),
|
|
372
|
+
disabled: !fe || M,
|
|
374
373
|
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: [
|
|
374
|
+
children: [k("channel.next", "Next"), /* @__PURE__ */ C(m, { size: 16 })]
|
|
376
375
|
})]
|
|
377
376
|
})]
|
|
378
377
|
})
|
|
@@ -381,6 +380,6 @@ function O() {
|
|
|
381
380
|
});
|
|
382
381
|
}
|
|
383
382
|
//#endregion
|
|
384
|
-
export {
|
|
383
|
+
export { D as WebhookEventsPage };
|
|
385
384
|
|
|
386
385
|
//# sourceMappingURL=WebhookEventsPage.js.map
|