@burdenoff/microfe-channel 2026.608.1 → 2026.624.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 (31) hide show
  1. package/dist/channel/components/AdapterCredentialsForm.js +11 -11
  2. package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
  3. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +54 -54
  4. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  5. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +456 -462
  6. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  7. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +26 -26
  8. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +226 -252
  10. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  11. package/dist/channel/modules/channels/pages/ChannelsListPage.js +41 -41
  12. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  13. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +30 -30
  14. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  15. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +29 -29
  16. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -28
  18. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  19. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +8 -8
  20. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  21. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +208 -233
  22. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  23. package/dist/channel/modules/channels/pages/EditChannelPage.js +25 -25
  24. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  25. package/dist/channel/modules/channels/pages/EditConnectionPage.js +4 -4
  26. package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/SendMessagePage.js +27 -27
  28. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  29. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +29 -29
  30. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  31. package/package.json +1 -1
@@ -5,18 +5,19 @@ import { CHANNEL_PERMISSIONS as r } from "../../../constants/permissions.js";
5
5
  import { useExportChannelUsers as i } from "../hooks/useExport.js";
6
6
  import { useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
7
7
  import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { AlertCircle as u, ArrowLeft as d, Bell as f, BellOff as p, CheckCircle2 as m, ChevronLeft as ee, ChevronRight as h, Clock as g, Download as _, Loader2 as v, RefreshCw as y, User as b, UserCheck as x, XCircle as S } from "lucide-react";
9
- import { useNavigate as C, useParams as w } from "react-router-dom";
10
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
8
+ import { AlertCircle as u, ArrowLeft as d, Bell as f, BellOff as p, CheckCircle2 as m, ChevronLeft as h, ChevronRight as g, Clock as _, Download as v, Loader2 as y, RefreshCw as ee, User as te, UserCheck as ne, XCircle as b } from "lucide-react";
9
+ import { useNavigate as x, useParams as S } from "react-router-dom";
10
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
11
+ import { ResponsiveTable as E } from "@burdenoff/fe-libs/ui";
11
12
  //#region src/channel/modules/channels/pages/ChannelUsersPage.tsx
12
- var O = {
13
+ var D = {
13
14
  ONLINE: {
14
15
  label: "Online",
15
16
  color: "text-status-success-text"
16
17
  },
17
18
  OFFLINE: {
18
19
  label: "Offline",
19
- color: "text-muted-foreground"
20
+ color: "text-text-secondary"
20
21
  },
21
22
  AWAY: {
22
23
  label: "Away",
@@ -26,11 +27,11 @@ var O = {
26
27
  label: "Do Not Disturb",
27
28
  color: "text-status-error-text"
28
29
  }
29
- }, k = {
30
+ }, O = {
30
31
  PENDING: {
31
32
  label: "Pending",
32
33
  color: "text-status-warning-text bg-status-warning-bg-subtle",
33
- icon: g
34
+ icon: _
34
35
  },
35
36
  APPROVED: {
36
37
  label: "Approved",
@@ -39,356 +40,329 @@ var O = {
39
40
  },
40
41
  EXPIRED: {
41
42
  label: "Expired",
42
- color: "text-muted-foreground bg-muted",
43
- icon: S
43
+ color: "text-text-secondary bg-bg-sunken",
44
+ icon: b
44
45
  }
45
46
  };
46
- function A() {
47
- let { channelId: m } = w(), g = C(), { t: A } = l(), j = (e, t) => {
48
- let n = A(e);
47
+ function k() {
48
+ let { channelId: m } = S(), _ = x(), { t: k } = l(), A = (e, t) => {
49
+ let n = k(e);
49
50
  return n === e ? t : n;
50
- }, { organizationId: M } = e(), { triggerExport: te, isExporting: N, exportError: P } = i(M ?? void 0, m), [F, I] = c(!0), [L, R] = c([]), [z, B] = c(25), [V, H] = c(0), [U, W] = c(0), { channel: G, isLoading: K, error: q, fetchUserPlatformConnections: J } = t(m), Y = a(async (e = 0) => {
51
+ }, { organizationId: j } = e(), { triggerExport: re, isExporting: M, exportError: N } = i(j ?? void 0, m), [P, F] = c(!0), [I, L] = c([]), [R, z] = c(25), [B, V] = c(0), [H, U] = c(0), { channel: W, isLoading: G, error: K, fetchUserPlatformConnections: q } = t(m), J = a(async (e = 0) => {
51
52
  if (m) {
52
- I(!0);
53
+ F(!0);
53
54
  try {
54
- let t = await J(z, e * z);
55
- R(t.items), H(t.total);
55
+ let t = await q(R, e * R);
56
+ L(t.items), V(t.total);
56
57
  } finally {
57
- I(!1);
58
+ F(!1);
58
59
  }
59
60
  }
60
61
  }, [
61
62
  m,
62
- J,
63
- z
64
- ]), X = s(Y);
63
+ q,
64
+ R
65
+ ]), Y = s(J);
65
66
  o(() => {
66
- X.current = Y;
67
+ Y.current = J;
67
68
  });
68
- let Z = s(!0), Q = s(!1);
69
+ let X = s(!0), Z = s(!1);
69
70
  o(() => {
70
71
  Promise.resolve().then(() => {
71
- Q.current = !0, W(0), X.current(0).finally(() => {
72
- Q.current = !1;
72
+ Z.current = !0, U(0), Y.current(0).finally(() => {
73
+ Z.current = !1;
73
74
  });
74
75
  });
75
- }, [z]), o(() => {
76
- if (Z.current) {
77
- Z.current = !1;
76
+ }, [R]), o(() => {
77
+ if (X.current) {
78
+ X.current = !1;
78
79
  return;
79
80
  }
80
- Q.current || Promise.resolve().then(() => X.current(U));
81
- }, [U]);
82
- let $ = Math.max(1, Math.ceil(V / z)), ne = U > 0, re = U < $ - 1, ie = (e) => O[e] || O.OFFLINE, ae = (e) => k[e] || k.EXPIRED;
83
- return K ? /* @__PURE__ */ E("div", {
81
+ Z.current || Promise.resolve().then(() => Y.current(H));
82
+ }, [H]);
83
+ let Q = Math.max(1, Math.ceil(B / R)), $ = H > 0, ie = H < Q - 1, ae = (e) => D[e] || D.OFFLINE, oe = (e) => O[e] || O.EXPIRED, se = [
84
+ {
85
+ key: "user",
86
+ header: A("channel.user", "User"),
87
+ priority: "primary",
88
+ cell: (e) => /* @__PURE__ */ T("div", {
89
+ className: "flex items-center gap-3",
90
+ children: [/* @__PURE__ */ w("div", {
91
+ className: "size-8 bg-accent-primary/10 rounded-full flex items-center justify-center",
92
+ children: /* @__PURE__ */ w(te, {
93
+ size: 16,
94
+ className: "text-accent-primary"
95
+ })
96
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
97
+ className: "text-sm font-medium text-text-primary",
98
+ children: e.externalDisplayName || "Unknown"
99
+ }), e.externalUsername && /* @__PURE__ */ w("p", {
100
+ className: "text-xs text-text-secondary",
101
+ children: e.externalUsername
102
+ })] })]
103
+ })
104
+ },
105
+ {
106
+ key: "platformId",
107
+ header: A("channel.platformId", "Platform ID"),
108
+ priority: "secondary",
109
+ cellClassName: "text-sm font-mono text-text-secondary",
110
+ cell: (e) => e.externalUserId
111
+ },
112
+ {
113
+ key: "source",
114
+ header: A("channel.source", "Source"),
115
+ priority: "secondary",
116
+ cell: (e) => /* @__PURE__ */ w("span", {
117
+ className: "text-xs text-text-secondary bg-bg-sunken px-2 py-1 rounded",
118
+ children: e.source
119
+ })
120
+ },
121
+ {
122
+ key: "status",
123
+ header: A("channel.status", "Status"),
124
+ priority: "primary",
125
+ cell: (e) => {
126
+ let t = ae(e.presenceStatus);
127
+ return /* @__PURE__ */ T("div", {
128
+ className: "flex items-center gap-2",
129
+ children: [/* @__PURE__ */ w("span", { className: `w-2 h-2 rounded-full ${t.color.replace("text-", "bg-")}` }), /* @__PURE__ */ w("span", {
130
+ className: `text-sm ${t.color}`,
131
+ children: t.label
132
+ })]
133
+ });
134
+ }
135
+ },
136
+ {
137
+ key: "pairing",
138
+ header: A("channel.pairing", "Pairing"),
139
+ priority: "secondary",
140
+ cell: (e) => {
141
+ let t = e.pairingStatus ? oe(e.pairingStatus) : null, n = t?.icon ?? b;
142
+ return e.pairingStatus && t ? /* @__PURE__ */ T("span", {
143
+ className: `inline-flex items-center gap-1 text-xs px-2 py-1 rounded ${t.color}`,
144
+ children: [/* @__PURE__ */ w(n, { size: 12 }), t.label]
145
+ }) : /* @__PURE__ */ w("span", {
146
+ className: "text-xs text-text-secondary",
147
+ children: "-"
148
+ });
149
+ }
150
+ },
151
+ {
152
+ key: "notifications",
153
+ header: A("channel.notifications", "Notifications"),
154
+ priority: "secondary",
155
+ cell: (e) => e.notificationsEnabled ? /* @__PURE__ */ T("span", {
156
+ className: "inline-flex items-center gap-1",
157
+ children: [/* @__PURE__ */ w(f, {
158
+ size: 16,
159
+ className: "text-status-success-text",
160
+ "aria-hidden": "true"
161
+ }), /* @__PURE__ */ w("span", {
162
+ className: "sr-only",
163
+ children: A("channel.enabled", "Enabled")
164
+ })]
165
+ }) : /* @__PURE__ */ T("span", {
166
+ className: "inline-flex items-center gap-1",
167
+ children: [/* @__PURE__ */ w(p, {
168
+ size: 16,
169
+ className: "text-text-secondary",
170
+ "aria-hidden": "true"
171
+ }), /* @__PURE__ */ w("span", {
172
+ className: "sr-only",
173
+ children: A("channel.disabled", "Disabled")
174
+ })]
175
+ })
176
+ },
177
+ {
178
+ key: "dmAllowed",
179
+ header: A("channel.dmAllowed", "DM Allowed"),
180
+ priority: "secondary",
181
+ cell: (e) => e.dmAllowed ? /* @__PURE__ */ T("span", {
182
+ className: "inline-flex items-center gap-1 text-sm text-status-success-text",
183
+ children: [/* @__PURE__ */ w(ne, { size: 16 }), A("channel.allowed", "Allowed")]
184
+ }) : /* @__PURE__ */ T("span", {
185
+ className: "inline-flex items-center gap-1 text-sm text-text-secondary",
186
+ children: [/* @__PURE__ */ w(b, { size: 16 }), A("channel.blocked", "Blocked")]
187
+ })
188
+ }
189
+ ];
190
+ return G ? /* @__PURE__ */ w("div", {
84
191
  className: "flex items-center justify-center min-h-screen",
85
- children: /* @__PURE__ */ E(v, {
192
+ children: /* @__PURE__ */ w(y, {
86
193
  size: 32,
87
194
  className: "animate-spin text-accent-primary"
88
195
  })
89
- }) : q || !G ? /* @__PURE__ */ E("div", {
196
+ }) : K || !W ? /* @__PURE__ */ w("div", {
90
197
  className: "p-6",
91
- children: /* @__PURE__ */ D("div", {
198
+ children: /* @__PURE__ */ T("div", {
92
199
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
93
200
  children: [
94
- /* @__PURE__ */ E(u, {
201
+ /* @__PURE__ */ w(u, {
95
202
  size: 20,
96
203
  className: "text-status-error-text"
97
204
  }),
98
- /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E("p", {
205
+ /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w("p", {
99
206
  className: "text-sm font-medium text-status-error-text",
100
- children: q || "Channel not found"
207
+ children: K || "Channel not found"
101
208
  }) }),
102
- /* @__PURE__ */ E("button", {
209
+ /* @__PURE__ */ w("button", {
103
210
  type: "button",
104
- onClick: () => g(`/channels/${m}`),
211
+ onClick: () => _(`/channels/${m}`),
105
212
  className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
106
213
  children: "Go Back"
107
214
  })
108
215
  ]
109
216
  })
110
- }) : /* @__PURE__ */ E(n, {
217
+ }) : /* @__PURE__ */ w(n, {
111
218
  permission: r.USER_PLATFORM_CONNECTION_READ,
112
- children: /* @__PURE__ */ D("div", {
219
+ children: /* @__PURE__ */ T("div", {
113
220
  className: "space-y-6 p-3 sm:p-6",
114
221
  children: [
115
- /* @__PURE__ */ D("div", {
222
+ /* @__PURE__ */ T("div", {
116
223
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
117
- children: [/* @__PURE__ */ D("div", {
224
+ children: [/* @__PURE__ */ T("div", {
118
225
  className: "flex items-center gap-3",
119
- children: [/* @__PURE__ */ E("button", {
226
+ children: [/* @__PURE__ */ w("button", {
120
227
  type: "button",
121
- onClick: () => g(`/channels/${m}`),
122
- "aria-label": j("channel.backToChannel", "Back to channel"),
123
- className: "p-2 text-muted-foreground hover:text-foreground hover:bg-muted rounded-lg transition-colors",
124
- children: /* @__PURE__ */ E(d, {
228
+ onClick: () => _(`/channels/${m}`),
229
+ "aria-label": A("channel.backToChannel", "Back to channel"),
230
+ className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
231
+ children: /* @__PURE__ */ w(d, {
125
232
  size: 20,
126
233
  "aria-hidden": "true"
127
234
  })
128
- }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h1", {
129
- className: "text-xl sm:text-2xl font-bold text-foreground",
130
- children: j("channel.channelUsers", "Channel Users")
131
- }), /* @__PURE__ */ D("p", {
132
- className: "text-sm text-muted-foreground mt-1",
133
- children: [G.name, " - User connections"]
235
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
236
+ className: "text-xl sm:text-2xl font-bold text-text-primary",
237
+ children: A("channel.channelUsers", "Channel Users")
238
+ }), /* @__PURE__ */ T("p", {
239
+ className: "text-sm text-text-secondary mt-1",
240
+ children: [W.name, " - User connections"]
134
241
  })] })]
135
- }), /* @__PURE__ */ D("div", {
242
+ }), /* @__PURE__ */ T("div", {
136
243
  className: "flex items-center gap-3",
137
244
  children: [
138
- /* @__PURE__ */ D("select", {
139
- value: z,
140
- onChange: (e) => B(Number(e.target.value)),
141
- className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-accent-primary/50 text-foreground",
245
+ /* @__PURE__ */ T("select", {
246
+ value: R,
247
+ onChange: (e) => z(Number(e.target.value)),
248
+ className: "px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-accent-primary/50 text-text-primary",
142
249
  children: [
143
- /* @__PURE__ */ E("option", {
250
+ /* @__PURE__ */ w("option", {
144
251
  value: 10,
145
252
  children: "10 results"
146
253
  }),
147
- /* @__PURE__ */ E("option", {
254
+ /* @__PURE__ */ w("option", {
148
255
  value: 25,
149
256
  children: "25 results"
150
257
  }),
151
- /* @__PURE__ */ E("option", {
258
+ /* @__PURE__ */ w("option", {
152
259
  value: 50,
153
260
  children: "50 results"
154
261
  }),
155
- /* @__PURE__ */ E("option", {
262
+ /* @__PURE__ */ w("option", {
156
263
  value: 100,
157
264
  children: "100 results"
158
265
  })
159
266
  ]
160
267
  }),
161
- /* @__PURE__ */ D("button", {
268
+ /* @__PURE__ */ T("button", {
162
269
  type: "button",
163
- onClick: () => void Y(U),
164
- disabled: F,
165
- 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",
166
- children: [/* @__PURE__ */ E(y, {
270
+ onClick: () => void J(H),
271
+ disabled: P,
272
+ className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors disabled:opacity-50",
273
+ children: [/* @__PURE__ */ w(ee, {
167
274
  size: 16,
168
- className: F ? "animate-spin" : ""
169
- }), j("channel.refresh", "Refresh")]
275
+ className: P ? "animate-spin" : ""
276
+ }), A("channel.refresh", "Refresh")]
170
277
  }),
171
- /* @__PURE__ */ E(n, {
278
+ /* @__PURE__ */ w(n, {
172
279
  permission: r.CHANNEL_USER_EXPORT,
173
- children: /* @__PURE__ */ D("button", {
280
+ children: /* @__PURE__ */ T("button", {
174
281
  type: "button",
175
- onClick: () => void te(),
176
- disabled: N,
177
- 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",
178
- title: j("channel.exportCSV", "Export to CSV"),
179
- children: [N ? /* @__PURE__ */ E(v, {
282
+ onClick: () => void re(),
283
+ disabled: M,
284
+ 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",
285
+ title: A("channel.exportCSV", "Export to CSV"),
286
+ children: [M ? /* @__PURE__ */ w(y, {
180
287
  size: 16,
181
288
  className: "animate-spin"
182
- }) : /* @__PURE__ */ E(_, { size: 16 }), j("channel.export", "Export")]
289
+ }) : /* @__PURE__ */ w(v, { size: 16 }), A("channel.export", "Export")]
183
290
  })
184
291
  })
185
292
  ]
186
293
  })]
187
294
  }),
188
- P && /* @__PURE__ */ D("div", {
295
+ N && /* @__PURE__ */ T("div", {
189
296
  className: "p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg flex items-center gap-3",
190
- children: [/* @__PURE__ */ E(u, {
297
+ children: [/* @__PURE__ */ w(u, {
191
298
  size: 20,
192
299
  className: "text-status-error-text"
193
- }), /* @__PURE__ */ E("p", {
300
+ }), /* @__PURE__ */ w("p", {
194
301
  className: "text-sm text-status-error-text flex-1",
195
- children: P
302
+ children: N
196
303
  })]
197
304
  }),
198
- /* @__PURE__ */ E("div", {
199
- className: "p-4 bg-surface border border-border rounded-lg",
200
- children: /* @__PURE__ */ E("p", {
201
- className: "text-sm text-muted-foreground",
305
+ /* @__PURE__ */ w("div", {
306
+ className: "p-4 bg-surface border border-border-subtle rounded-lg",
307
+ children: /* @__PURE__ */ w("p", {
308
+ className: "text-sm text-text-secondary",
202
309
  children: "Users connected to this channel through OAuth or pairing. Manage notification preferences and DM authorization here."
203
310
  })
204
311
  }),
205
- /* @__PURE__ */ E("div", {
206
- className: "bg-surface border border-border rounded-lg overflow-hidden",
207
- children: /* @__PURE__ */ E("div", {
208
- className: "overflow-x-auto min-w-full",
209
- children: /* @__PURE__ */ D("table", {
210
- className: "w-full min-w-[800px]",
211
- children: [/* @__PURE__ */ E("thead", {
212
- className: "bg-muted/50 border-b border-border",
213
- children: /* @__PURE__ */ D("tr", { children: [
214
- /* @__PURE__ */ E("th", {
215
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
216
- children: j("channel.user", "User")
217
- }),
218
- /* @__PURE__ */ E("th", {
219
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
220
- children: j("channel.platformId", "Platform ID")
221
- }),
222
- /* @__PURE__ */ E("th", {
223
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
224
- children: j("channel.source", "Source")
225
- }),
226
- /* @__PURE__ */ E("th", {
227
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
228
- children: j("channel.status", "Status")
229
- }),
230
- /* @__PURE__ */ E("th", {
231
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
232
- children: j("channel.pairing", "Pairing")
233
- }),
234
- /* @__PURE__ */ E("th", {
235
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
236
- children: j("channel.notifications", "Notifications")
237
- }),
238
- /* @__PURE__ */ E("th", {
239
- className: "px-4 py-3 text-left text-xs font-medium text-muted-foreground uppercase tracking-wider",
240
- children: j("channel.dmAllowed", "DM Allowed")
241
- })
242
- ] })
243
- }), /* @__PURE__ */ E("tbody", {
244
- className: "divide-y divide-border",
245
- children: L.length === 0 ? /* @__PURE__ */ E("tr", { children: /* @__PURE__ */ E("td", {
246
- colSpan: 7,
247
- className: "px-4 py-8 text-center text-muted-foreground",
248
- children: j("channel.noUsersConnected", "No users connected to this channel")
249
- }) }) : L.map((e) => {
250
- let t = ie(e.presenceStatus), n = e.pairingStatus ? ae(e.pairingStatus) : null, r = n?.icon ?? S;
251
- return /* @__PURE__ */ D("tr", {
252
- className: "hover:bg-muted/30 transition-colors",
253
- children: [
254
- /* @__PURE__ */ E("td", {
255
- className: "px-4 py-3",
256
- children: /* @__PURE__ */ D("div", {
257
- className: "flex items-center gap-3",
258
- children: [/* @__PURE__ */ E("div", {
259
- className: "size-8 bg-accent-primary/10 rounded-full flex items-center justify-center",
260
- children: /* @__PURE__ */ E(b, {
261
- size: 16,
262
- className: "text-accent-primary"
263
- })
264
- }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
265
- className: "text-sm font-medium text-foreground",
266
- children: e.externalDisplayName || "Unknown"
267
- }), e.externalUsername && /* @__PURE__ */ E("p", {
268
- className: "text-xs text-muted-foreground",
269
- children: e.externalUsername
270
- })] })]
271
- })
272
- }),
273
- /* @__PURE__ */ E("td", {
274
- className: "px-4 py-3 text-sm font-mono text-muted-foreground",
275
- children: e.externalUserId
276
- }),
277
- /* @__PURE__ */ E("td", {
278
- className: "px-4 py-3",
279
- children: /* @__PURE__ */ E("span", {
280
- className: "text-xs text-muted-foreground bg-muted px-2 py-1 rounded",
281
- children: e.source
282
- })
283
- }),
284
- /* @__PURE__ */ E("td", {
285
- className: "px-4 py-3",
286
- children: /* @__PURE__ */ D("div", {
287
- className: "flex items-center gap-2",
288
- children: [/* @__PURE__ */ E("span", { className: `w-2 h-2 rounded-full ${t.color.replace("text-", "bg-")}` }), /* @__PURE__ */ E("span", {
289
- className: `text-sm ${t.color}`,
290
- children: t.label
291
- })]
292
- })
293
- }),
294
- /* @__PURE__ */ E("td", {
295
- className: "px-4 py-3",
296
- children: e.pairingStatus && n ? /* @__PURE__ */ D("span", {
297
- className: `inline-flex items-center gap-1 text-xs px-2 py-1 rounded ${n.color}`,
298
- children: [/* @__PURE__ */ E(r, { size: 12 }), n.label]
299
- }) : /* @__PURE__ */ E("span", {
300
- className: "text-xs text-muted-foreground",
301
- children: "-"
302
- })
303
- }),
304
- /* @__PURE__ */ E("td", {
305
- className: "px-4 py-3",
306
- children: e.notificationsEnabled ? /* @__PURE__ */ D("span", {
307
- className: "inline-flex items-center gap-1",
308
- children: [/* @__PURE__ */ E(f, {
309
- size: 16,
310
- className: "text-status-success-text",
311
- "aria-hidden": "true"
312
- }), /* @__PURE__ */ E("span", {
313
- className: "sr-only",
314
- children: j("channel.enabled", "Enabled")
315
- })]
316
- }) : /* @__PURE__ */ D("span", {
317
- className: "inline-flex items-center gap-1",
318
- children: [/* @__PURE__ */ E(p, {
319
- size: 16,
320
- className: "text-muted-foreground",
321
- "aria-hidden": "true"
322
- }), /* @__PURE__ */ E("span", {
323
- className: "sr-only",
324
- children: j("channel.disabled", "Disabled")
325
- })]
326
- })
327
- }),
328
- /* @__PURE__ */ E("td", {
329
- className: "px-4 py-3",
330
- children: e.dmAllowed ? /* @__PURE__ */ D("span", {
331
- className: "inline-flex items-center gap-1 text-sm text-status-success-text",
332
- children: [/* @__PURE__ */ E(x, { size: 16 }), j("channel.allowed", "Allowed")]
333
- }) : /* @__PURE__ */ D("span", {
334
- className: "inline-flex items-center gap-1 text-sm text-muted-foreground",
335
- children: [/* @__PURE__ */ E(S, { size: 16 }), j("channel.blocked", "Blocked")]
336
- })
337
- })
338
- ]
339
- }, e.id);
340
- })
341
- })]
342
- })
343
- })
312
+ /* @__PURE__ */ w(E, {
313
+ columns: se,
314
+ data: I,
315
+ rowKey: (e) => e.id,
316
+ emptyState: A("channel.noUsersConnected", "No users connected to this channel"),
317
+ className: "bg-surface border border-border-subtle rounded-lg"
344
318
  }),
345
- /* @__PURE__ */ D("div", {
319
+ /* @__PURE__ */ T("div", {
346
320
  className: "flex items-center justify-between",
347
- children: [/* @__PURE__ */ E("p", {
348
- className: "text-sm text-muted-foreground",
349
- children: V > 0 && /* @__PURE__ */ D(T, { children: [
350
- j("channel.showing", "Showing"),
321
+ children: [/* @__PURE__ */ w("p", {
322
+ className: "text-sm text-text-secondary",
323
+ children: B > 0 && /* @__PURE__ */ T(C, { children: [
324
+ A("channel.showing", "Showing"),
351
325
  " ",
352
- /* @__PURE__ */ D("span", {
326
+ /* @__PURE__ */ T("span", {
353
327
  className: "font-medium",
354
328
  children: [
355
- U * z + 1,
329
+ H * R + 1,
356
330
  "–",
357
- Math.min((U + 1) * z, V)
331
+ Math.min((H + 1) * R, B)
358
332
  ]
359
333
  }),
360
334
  " ",
361
- j("channel.of", "of"),
335
+ A("channel.of", "of"),
362
336
  " ",
363
- /* @__PURE__ */ E("span", {
337
+ /* @__PURE__ */ w("span", {
364
338
  className: "font-medium",
365
- children: V
339
+ children: B
366
340
  })
367
341
  ] })
368
- }), /* @__PURE__ */ D("div", {
342
+ }), /* @__PURE__ */ T("div", {
369
343
  className: "flex items-center gap-2",
370
344
  children: [
371
- /* @__PURE__ */ D("button", {
345
+ /* @__PURE__ */ T("button", {
372
346
  type: "button",
373
- onClick: () => W((e) => Math.max(0, e - 1)),
374
- disabled: !ne || F,
375
- 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",
376
- children: [/* @__PURE__ */ E(ee, { size: 16 }), j("channel.previous", "Previous")]
347
+ onClick: () => U((e) => Math.max(0, e - 1)),
348
+ disabled: !$ || P,
349
+ 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",
350
+ children: [/* @__PURE__ */ w(h, { size: 16 }), A("channel.previous", "Previous")]
377
351
  }),
378
- /* @__PURE__ */ D("span", {
379
- className: "text-sm text-muted-foreground",
352
+ /* @__PURE__ */ T("span", {
353
+ className: "text-sm text-text-secondary",
380
354
  children: [
381
- U + 1,
355
+ H + 1,
382
356
  " / ",
383
- $
357
+ Q
384
358
  ]
385
359
  }),
386
- /* @__PURE__ */ D("button", {
360
+ /* @__PURE__ */ T("button", {
387
361
  type: "button",
388
- onClick: () => W((e) => Math.min($ - 1, e + 1)),
389
- disabled: !re || F,
390
- 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",
391
- children: [j("channel.next", "Next"), /* @__PURE__ */ E(h, { size: 16 })]
362
+ onClick: () => U((e) => Math.min(Q - 1, e + 1)),
363
+ disabled: !ie || P,
364
+ 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",
365
+ children: [A("channel.next", "Next"), /* @__PURE__ */ w(g, { size: 16 })]
392
366
  })
393
367
  ]
394
368
  })]
@@ -398,6 +372,6 @@ function A() {
398
372
  });
399
373
  }
400
374
  //#endregion
401
- export { A as ChannelUsersPage };
375
+ export { k as ChannelUsersPage };
402
376
 
403
377
  //# sourceMappingURL=ChannelUsersPage.js.map