@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.
Files changed (29) hide show
  1. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +108 -98
  2. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  3. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +287 -277
  4. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  5. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +140 -131
  6. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  7. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +170 -173
  8. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelsListPage.js +127 -120
  10. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  11. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +161 -155
  12. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  13. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +70 -68
  14. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  15. package/dist/channel/modules/channels/pages/CreateChannelPage.js +27 -24
  16. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +161 -156
  18. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  19. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +179 -182
  20. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  21. package/dist/channel/modules/channels/pages/EditChannelPage.js +130 -122
  22. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  23. package/dist/channel/modules/channels/pages/EditConnectionPage.js +137 -132
  24. package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
  25. package/dist/channel/modules/channels/pages/SendMessagePage.js +87 -84
  26. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +193 -194
  28. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  29. package/package.json +2 -2
@@ -8,13 +8,14 @@ import { HEALTH_I18N as ee, PLATFORM_I18N as te, STATUS_I18N as ne, translateLab
8
8
  import { useExportChannels as re } from "../hooks/useExport.js";
9
9
  import { useEffect as u, useMemo as d, useRef as ie, useState as f } from "react";
10
10
  import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { AlertCircle as p, AlertTriangle as m, CheckCircle2 as h, Download as oe, Eye as se, HelpCircle as g, Loader2 as _, Pencil as ce, Plus as v, Power as le, PowerOff as y, Radio as ue, RefreshCw as de, Search as fe, Trash2 as pe, XCircle as b } from "lucide-react";
11
+ import { AlertCircle as oe, AlertTriangle as p, CheckCircle2 as m, Download as se, Eye as ce, HelpCircle as h, Loader2 as g, Pencil as le, Plus as _, Power as ue, PowerOff as v, Radio as y, RefreshCw as de, Search as fe, Trash2 as pe, XCircle as b } from "lucide-react";
12
12
  import { useNavigate as me } from "react-router-dom";
13
13
  import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
14
14
  import { jsx as x, jsxs as S } from "react/jsx-runtime";
15
- import { TagBadge as ge } from "@burdenoff/fe-libs/tag";
15
+ import { CTAOverflowMenu as ge, GlassCard as _e } from "@burdenoff/fe-libs/ui";
16
+ import { TagBadge as ve } from "@burdenoff/fe-libs/tag";
16
17
  //#region src/channel/modules/channels/pages/ChannelsListPage.tsx
17
- var C = {
18
+ var ye = {
18
19
  EMAIL: {
19
20
  label: "Email",
20
21
  color: "bg-accent-blue-subtle text-accent-blue"
@@ -55,16 +56,16 @@ var C = {
55
56
  label: "Webchat",
56
57
  color: "bg-accent-teal-subtle text-accent-teal"
57
58
  }
58
- }, w = {
59
+ }, C = {
59
60
  ACTIVE: {
60
61
  label: "Active",
61
62
  color: "text-status-success-text bg-status-success-bg-subtle",
62
- icon: h
63
+ icon: m
63
64
  },
64
65
  INACTIVE: {
65
66
  label: "Inactive",
66
67
  color: "text-text-secondary bg-bg-sunken",
67
- icon: y
68
+ icon: v
68
69
  },
69
70
  ERROR: {
70
71
  label: "Error",
@@ -74,23 +75,23 @@ var C = {
74
75
  SUSPENDED: {
75
76
  label: "Suspended",
76
77
  color: "text-status-warning-text bg-status-warning-bg-subtle",
77
- icon: m
78
+ icon: p
78
79
  },
79
80
  ARCHIVED: {
80
81
  label: "Archived",
81
82
  color: "text-text-secondary bg-bg-sunken",
82
- icon: y
83
+ icon: v
83
84
  }
84
- }, T = {
85
+ }, w = {
85
86
  HEALTHY: {
86
87
  label: "Healthy",
87
88
  color: "text-status-success-text",
88
- icon: h
89
+ icon: m
89
90
  },
90
91
  DEGRADED: {
91
92
  label: "Degraded",
92
93
  color: "text-status-warning-text",
93
- icon: m
94
+ icon: p
94
95
  },
95
96
  UNHEALTHY: {
96
97
  label: "Unhealthy",
@@ -100,27 +101,27 @@ var C = {
100
101
  UNKNOWN: {
101
102
  label: "Unknown",
102
103
  color: "text-text-secondary",
103
- icon: g
104
+ icon: h
104
105
  }
105
106
  };
106
- function _e() {
107
- let m = me(), { hasPermission: h } = he(), g = h(c.CHANNEL_CREATE), b = h(c.CHANNEL_UPDATE), { t: _e } = ae(), E = (e, t) => {
108
- let n = _e(e);
107
+ function T() {
108
+ let p = me(), { hasPermission: m } = he(), h = m(c.CHANNEL_CREATE), b = m(c.CHANNEL_UPDATE), T = m(c.CHANNEL_EXPORT), { t: be } = ae(), E = (e, t) => {
109
+ let n = be(e);
109
110
  return n === e ? t : n;
110
- }, [ve, D] = f(null), [ye, O] = f(null), [k, A] = f(/* @__PURE__ */ new Set()), [j, M] = f(null), { organizationId: be } = e(), { triggerExport: xe, isExporting: N, exportError: P } = re(be ?? void 0), [F] = f(12), [I, L] = f(0), { channels: R, isLoading: Se, error: z, total: B, filter: V, updateFilter: H, deleteChannel: U, activateChannel: W, deactivateChannel: G, runHealthCheck: K, refetch: q } = o(), J = Math.max(1, Math.ceil(B / F)), Y = ie(q);
111
+ }, [xe, D] = f(null), [Se, O] = f(null), [k, A] = f(/* @__PURE__ */ new Set()), [j, M] = f(null), { organizationId: Ce } = e(), { triggerExport: we, isExporting: N, exportError: P } = re(Ce ?? void 0), [F] = f(12), [I, L] = f(0), { channels: R, isLoading: z, error: B, total: V, filter: H, updateFilter: U, deleteChannel: W, activateChannel: G, deactivateChannel: K, runHealthCheck: q, refetch: J } = o(), Y = Math.max(1, Math.ceil(V / F)), Te = ie(J);
111
112
  u(() => {
112
- Y.current = q;
113
+ Te.current = J;
113
114
  }), u(() => {
114
- Y.current({
115
+ Te.current({
115
116
  offset: I * F,
116
117
  limit: F
117
118
  });
118
119
  }, [I, F]), u(() => {
119
120
  Promise.resolve().then(() => L(0));
120
121
  }, [
121
- V.search,
122
- V.platform,
123
- V.status
122
+ H.search,
123
+ H.platform,
124
+ H.status
124
125
  ]), u(() => {
125
126
  let e = [
126
127
  "channel.created",
@@ -129,13 +130,13 @@ function _e() {
129
130
  "connection.created",
130
131
  "connection.updated",
131
132
  "connection.deleted"
132
- ].map((e) => a(e, () => void q()));
133
+ ].map((e) => a(e, () => void J()));
133
134
  return () => e.forEach((e) => e());
134
- }, [q]);
135
- let Ce = async (e) => {
135
+ }, [J]);
136
+ let Ee = async (e) => {
136
137
  n("medium"), O(e);
137
138
  try {
138
- await U(e), r("success"), D(null);
139
+ await W(e), r("success"), D(null);
139
140
  } catch (e) {
140
141
  r("error"), i(e, {
141
142
  module: "channel",
@@ -144,10 +145,10 @@ function _e() {
144
145
  } finally {
145
146
  O(null);
146
147
  }
147
- }, we = async (e) => {
148
+ }, De = async (e) => {
148
149
  O(e.id);
149
150
  try {
150
- e.status === "ACTIVE" ? await G(e.id) : await W(e.id);
151
+ e.status === "ACTIVE" ? await K(e.id) : await G(e.id);
151
152
  } catch (e) {
152
153
  i(e, {
153
154
  module: "channel",
@@ -156,10 +157,10 @@ function _e() {
156
157
  } finally {
157
158
  O(null);
158
159
  }
159
- }, Te = async (e) => {
160
+ }, Oe = async (e) => {
160
161
  O(e);
161
162
  try {
162
- await K(e);
163
+ await q(e);
163
164
  } catch (e) {
164
165
  i(e, {
165
166
  module: "channel",
@@ -168,19 +169,19 @@ function _e() {
168
169
  } finally {
169
170
  O(null);
170
171
  }
171
- }, X = d(() => R.filter((e) => k.has(e.id)), [R, k]), Z = d(() => X.filter((e) => e.status === "ACTIVE"), [X]), Q = d(() => X.filter((e) => e.status !== "ACTIVE"), [X]), $ = R.length > 0 && R.every((e) => k.has(e.id)), Ee = R.some((e) => k.has(e.id)) && !$, De = (e, t) => {
172
+ }, X = d(() => R.filter((e) => k.has(e.id)), [R, k]), Z = d(() => X.filter((e) => e.status === "ACTIVE"), [X]), Q = d(() => X.filter((e) => e.status !== "ACTIVE"), [X]), $ = R.length > 0 && R.every((e) => k.has(e.id)), ke = R.some((e) => k.has(e.id)) && !$, Ae = (e, t) => {
172
173
  A((n) => {
173
174
  let r = new Set(n);
174
175
  return t ? r.add(e) : r.delete(e), r;
175
176
  });
176
- }, Oe = (e) => {
177
+ }, je = (e) => {
177
178
  A((t) => {
178
179
  let n = new Set(t);
179
180
  return R.forEach((t) => {
180
181
  e ? n.add(t.id) : n.delete(t.id);
181
182
  }), n;
182
183
  });
183
- }, ke = async () => {
184
+ }, Me = async () => {
184
185
  if (X.length === 0) return;
185
186
  n("medium");
186
187
  let e = E(X.length === 1 ? "channel.bulkDeleteConfirmSingle" : "channel.bulkDeleteConfirmMultiple", X.length === 1 ? "Delete 1 selected channel?" : `Delete ${X.length} selected channels?`), r = await t({
@@ -192,49 +193,49 @@ function _e() {
192
193
  if (r === null ? window.confirm(e) : r) {
193
194
  M("delete");
194
195
  try {
195
- await Promise.allSettled(X.map((e) => U(e.id))), A(/* @__PURE__ */ new Set());
196
+ await Promise.allSettled(X.map((e) => W(e.id))), A(/* @__PURE__ */ new Set());
196
197
  } finally {
197
198
  M(null);
198
199
  }
199
200
  }
200
- }, Ae = async () => {
201
+ }, Ne = async () => {
201
202
  if (Q.length !== 0) {
202
203
  M("activate");
203
204
  try {
204
- await Promise.allSettled(Q.map((e) => W(e.id))), A(/* @__PURE__ */ new Set());
205
+ await Promise.allSettled(Q.map((e) => G(e.id))), A(/* @__PURE__ */ new Set());
205
206
  } finally {
206
207
  M(null);
207
208
  }
208
209
  }
209
- }, je = async () => {
210
+ }, Pe = async () => {
210
211
  if (Z.length !== 0) {
211
212
  M("deactivate");
212
213
  try {
213
- await Promise.allSettled(Z.map((e) => G(e.id))), A(/* @__PURE__ */ new Set());
214
+ await Promise.allSettled(Z.map((e) => K(e.id))), A(/* @__PURE__ */ new Set());
214
215
  } finally {
215
216
  M(null);
216
217
  }
217
218
  }
218
- }, Me = async () => {
219
+ }, Fe = async () => {
219
220
  if (X.length !== 0) {
220
221
  M("health");
221
222
  try {
222
- await Promise.allSettled(X.map((e) => K(e.id)));
223
+ await Promise.allSettled(X.map((e) => q(e.id)));
223
224
  } finally {
224
225
  M(null);
225
226
  }
226
227
  }
227
- }, Ne = (e) => ({
228
- ...C[e] || {
228
+ }, Ie = (e) => ({
229
+ ...ye[e] || {
229
230
  label: e,
230
231
  color: "bg-bg-sunken text-text-secondary"
231
232
  },
232
233
  label: l(e, te, E)
233
- }), Pe = (e) => ({
234
- ...w[e] || w.INACTIVE,
234
+ }), Le = (e) => ({
235
+ ...C[e] || C.INACTIVE,
235
236
  label: l(e, ne, E)
236
- }), Fe = (e) => ({
237
- ...T[e] || T.UNKNOWN,
237
+ }), Re = (e) => ({
238
+ ...w[e] || w.UNKNOWN,
238
239
  label: l(e, ee, E)
239
240
  });
240
241
  return /* @__PURE__ */ x(s, {
@@ -252,31 +253,35 @@ function _e() {
252
253
  children: [
253
254
  E("channel.manageChannels", "Manage your communication channels"),
254
255
  " (",
255
- B,
256
+ V,
256
257
  " total)"
257
258
  ]
258
- })] }), /* @__PURE__ */ S("div", {
259
+ })] }), /* @__PURE__ */ x("div", {
259
260
  className: "flex items-center gap-2",
260
- children: [/* @__PURE__ */ x(s, {
261
- permission: c.CHANNEL_EXPORT,
262
- children: /* @__PURE__ */ S("button", {
263
- type: "button",
264
- onClick: () => void xe(),
265
- disabled: N,
266
- 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",
267
- title: E("channel.exportCSV", "Export to CSV"),
268
- "data-tour": "channels-list-export-button",
269
- children: [N ? /* @__PURE__ */ x(_, {
261
+ "data-tour": "channels-list-export-button",
262
+ children: /* @__PURE__ */ x(ge, {
263
+ primary: h ? {
264
+ label: E("channel.createChannel", "Create Channel"),
265
+ icon: /* @__PURE__ */ x(_, {
270
266
  size: 16,
271
- className: "animate-spin"
272
- }) : /* @__PURE__ */ x(oe, { size: 16 }), E("channel.export", "Export")]
273
- })
274
- }), g && /* @__PURE__ */ S("button", {
275
- type: "button",
276
- onClick: () => m("/channels/create"),
277
- className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
278
- children: [/* @__PURE__ */ x(v, { size: 16 }), E("channel.createChannel", "Create Channel")]
279
- })]
267
+ "aria-hidden": "true"
268
+ }),
269
+ onSelect: () => p("/channels/create")
270
+ } : void 0,
271
+ actions: T ? [{
272
+ label: E("channel.export", "Export"),
273
+ icon: N ? /* @__PURE__ */ x(g, {
274
+ size: 16,
275
+ className: "animate-spin",
276
+ "aria-hidden": "true"
277
+ }) : /* @__PURE__ */ x(se, {
278
+ size: 16,
279
+ "aria-hidden": "true"
280
+ }),
281
+ disabled: N,
282
+ onSelect: () => void we()
283
+ }] : []
284
+ })
280
285
  })]
281
286
  }),
282
287
  /* @__PURE__ */ S("div", {
@@ -291,31 +296,31 @@ function _e() {
291
296
  "aria-label": E("channel.searchChannels", "Search channels..."),
292
297
  type: "text",
293
298
  placeholder: E("channel.searchChannels", "Search channels..."),
294
- value: V.search || "",
295
- onChange: (e) => H({ search: e.target.value }),
299
+ value: H.search || "",
300
+ onChange: (e) => U({ search: e.target.value }),
296
301
  className: "w-full pl-9 pr-4 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
297
302
  })]
298
303
  }),
299
304
  /* @__PURE__ */ S("select", {
300
- value: V.platform || "",
301
- onChange: (e) => H({ platform: e.target.value || void 0 }),
305
+ value: H.platform || "",
306
+ onChange: (e) => U({ platform: e.target.value || void 0 }),
302
307
  className: "px-3 py-2 text-sm bg-bg-surface text-text-primary border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
303
308
  children: [/* @__PURE__ */ x("option", {
304
309
  value: "",
305
310
  children: E("channel.allPlatforms", "All Platforms")
306
- }), Object.entries(C).map(([e, t]) => /* @__PURE__ */ x("option", {
311
+ }), Object.entries(ye).map(([e, t]) => /* @__PURE__ */ x("option", {
307
312
  value: e,
308
313
  children: t.label
309
314
  }, e))]
310
315
  }),
311
316
  /* @__PURE__ */ S("select", {
312
- value: V.status || "",
313
- onChange: (e) => H({ status: e.target.value || void 0 }),
317
+ value: H.status || "",
318
+ onChange: (e) => U({ status: e.target.value || void 0 }),
314
319
  className: "px-3 py-2 text-sm bg-bg-surface text-text-primary border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
315
320
  children: [/* @__PURE__ */ x("option", {
316
321
  value: "",
317
322
  children: E("channel.allStatus", "All Status")
318
- }), Object.entries(w).map(([e, t]) => /* @__PURE__ */ x("option", {
323
+ }), Object.entries(C).map(([e, t]) => /* @__PURE__ */ x("option", {
319
324
  value: e,
320
325
  children: t.label
321
326
  }, e))]
@@ -324,7 +329,7 @@ function _e() {
324
329
  }),
325
330
  P && /* @__PURE__ */ S("div", {
326
331
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
327
- children: [/* @__PURE__ */ x(p, {
332
+ children: [/* @__PURE__ */ x(oe, {
328
333
  size: 20,
329
334
  className: "text-status-error-text"
330
335
  }), /* @__PURE__ */ x("p", {
@@ -332,8 +337,9 @@ function _e() {
332
337
  children: P
333
338
  })]
334
339
  }),
335
- R.length > 0 && /* @__PURE__ */ S("div", {
336
- className: "flex flex-col gap-3 rounded-lg border border-border-subtle bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
340
+ R.length > 0 && /* @__PURE__ */ S(_e, {
341
+ treatment: "plain",
342
+ className: "flex flex-col gap-3 border-border-seam p-4 sm:flex-row sm:items-center sm:justify-between",
337
343
  "data-tour": "channels-list-bulk-actions",
338
344
  children: [/* @__PURE__ */ S("label", {
339
345
  className: "flex items-center gap-2 text-sm text-text-primary",
@@ -341,9 +347,9 @@ function _e() {
341
347
  type: "checkbox",
342
348
  checked: $,
343
349
  ref: (e) => {
344
- e && (e.indeterminate = Ee && !$);
350
+ e && (e.indeterminate = ke && !$);
345
351
  },
346
- onChange: (e) => Oe(e.target.checked),
352
+ onChange: (e) => je(e.target.checked),
347
353
  "aria-label": "Select all channels",
348
354
  className: "size-4 rounded border-border-subtle text-primary"
349
355
  }), /* @__PURE__ */ x("span", { children: E("channel.selectAllVisible", "Select all visible") })]
@@ -368,7 +374,7 @@ function _e() {
368
374
  permission: c.CHANNEL_EXECUTE,
369
375
  children: /* @__PURE__ */ S("button", {
370
376
  type: "button",
371
- onClick: Me,
377
+ onClick: Fe,
372
378
  disabled: X.length === 0 || j !== null,
373
379
  className: "px-3 py-2 text-sm font-medium border border-border-subtle rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
374
380
  children: [E("channel.healthCheck", "Health Check"), X.length > 0 ? ` (${X.length})` : ""]
@@ -378,7 +384,7 @@ function _e() {
378
384
  permission: c.CHANNEL_UPDATE,
379
385
  children: /* @__PURE__ */ S("button", {
380
386
  type: "button",
381
- onClick: Ae,
387
+ onClick: Ne,
382
388
  disabled: Q.length === 0 || j !== null,
383
389
  className: "px-3 py-2 text-sm font-medium border border-status-success-border/30 text-status-success-text rounded-md hover:bg-status-success-bg-subtle transition-colors disabled:opacity-50",
384
390
  children: [E("channel.activateSelected", "Activate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
@@ -388,7 +394,7 @@ function _e() {
388
394
  permission: c.CHANNEL_UPDATE,
389
395
  children: /* @__PURE__ */ S("button", {
390
396
  type: "button",
391
- onClick: je,
397
+ onClick: Pe,
392
398
  disabled: Z.length === 0 || j !== null,
393
399
  className: "px-3 py-2 text-sm font-medium border border-status-warning-border text-status-warning-text rounded-md hover:bg-status-warning-bg-subtle transition-colors disabled:opacity-50",
394
400
  children: [E("channel.deactivateSelected", "Deactivate Selected"), Z.length > 0 ? ` (${Z.length})` : ""]
@@ -398,7 +404,7 @@ function _e() {
398
404
  permission: c.CHANNEL_DELETE,
399
405
  children: /* @__PURE__ */ S("button", {
400
406
  type: "button",
401
- onClick: ke,
407
+ onClick: Me,
402
408
  disabled: X.length === 0 || j !== null,
403
409
  className: "px-3 py-2 text-sm font-medium border border-status-error-border/30 text-status-error-text rounded-md hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50",
404
410
  children: [E("channel.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
@@ -407,10 +413,10 @@ function _e() {
407
413
  ]
408
414
  })]
409
415
  }),
410
- z && /* @__PURE__ */ S("div", {
416
+ B && /* @__PURE__ */ S("div", {
411
417
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
412
418
  children: [
413
- /* @__PURE__ */ x(p, {
419
+ /* @__PURE__ */ x(oe, {
414
420
  size: 20,
415
421
  className: "text-status-error-text"
416
422
  }),
@@ -419,27 +425,27 @@ function _e() {
419
425
  children: E("channel.loadFailed", "Failed to load channels")
420
426
  }), /* @__PURE__ */ x("p", {
421
427
  className: "text-xs text-status-error-text",
422
- children: z
428
+ children: B
423
429
  })] }),
424
430
  /* @__PURE__ */ x("button", {
425
431
  type: "button",
426
- onClick: () => q(),
432
+ onClick: () => J(),
427
433
  className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
428
434
  children: E("channel.retry", "Retry")
429
435
  })
430
436
  ]
431
437
  }),
432
- Se && R.length === 0 && /* @__PURE__ */ x("div", {
438
+ z && R.length === 0 && /* @__PURE__ */ x("div", {
433
439
  className: "flex items-center justify-center py-12",
434
- children: /* @__PURE__ */ x(_, {
440
+ children: /* @__PURE__ */ x(g, {
435
441
  size: 32,
436
442
  className: "animate-spin text-accent-primary"
437
443
  })
438
444
  }),
439
- !Se && !z && R.length === 0 && /* @__PURE__ */ S("div", {
445
+ !z && !B && R.length === 0 && /* @__PURE__ */ S("div", {
440
446
  className: "flex flex-col items-center justify-center py-12 text-center",
441
447
  children: [
442
- /* @__PURE__ */ x(ue, {
448
+ /* @__PURE__ */ x(y, {
443
449
  size: 48,
444
450
  className: "text-text-secondary mb-4"
445
451
  }),
@@ -449,13 +455,13 @@ function _e() {
449
455
  }),
450
456
  /* @__PURE__ */ x("p", {
451
457
  className: "text-sm text-text-secondary max-w-md mb-4",
452
- children: V.search || V.platform || V.status ? E("channel.adjustFilters", "Try adjusting your filters to see more channels.") : E("channel.createFirstChannelPrompt", "Create your first communication channel to get started.")
458
+ children: H.search || H.platform || H.status ? E("channel.adjustFilters", "Try adjusting your filters to see more channels.") : E("channel.createFirstChannelPrompt", "Create your first communication channel to get started.")
453
459
  }),
454
- g && !V.search && !V.platform && !V.status && /* @__PURE__ */ S("button", {
460
+ h && !H.search && !H.platform && !H.status && /* @__PURE__ */ S("button", {
455
461
  type: "button",
456
- onClick: () => m("/channels/create"),
462
+ onClick: () => p("/channels/create"),
457
463
  className: "flex items-center gap-2 px-4 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
458
- children: [/* @__PURE__ */ x(v, { size: 16 }), E("channel.createChannel", "Create Channel")]
464
+ children: [/* @__PURE__ */ x(_, { size: 16 }), E("channel.createChannel", "Create Channel")]
459
465
  })
460
466
  ]
461
467
  }),
@@ -463,9 +469,10 @@ function _e() {
463
469
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
464
470
  "data-tour": "channels-list-grid",
465
471
  children: R.map((e) => {
466
- let t = Ne(e.platform), n = Pe(e.status), r = Fe(e.connectionHealth), i = n.icon, a = r.icon, o = ye === e.id;
467
- return /* @__PURE__ */ S("div", {
468
- className: `p-4 bg-surface border rounded-lg transition-colors group ${k.has(e.id) ? "ring-2 ring-action-primary-bg border-action-primary-bg/40" : "border-border-subtle hover:border-action-primary-bg/40"}`,
472
+ let t = Ie(e.platform), n = Le(e.status), r = Re(e.connectionHealth), i = n.icon, a = r.icon, o = Se === e.id;
473
+ return /* @__PURE__ */ S(_e, {
474
+ treatment: "insight",
475
+ className: `p-4 transition-colors group ${k.has(e.id) ? "ring-2 ring-action-primary-bg border-action-primary-bg/40" : "border-border-seam"}`,
469
476
  children: [
470
477
  /* @__PURE__ */ S("div", {
471
478
  className: "flex items-start justify-between mb-3",
@@ -475,11 +482,11 @@ function _e() {
475
482
  /* @__PURE__ */ x("input", {
476
483
  type: "checkbox",
477
484
  checked: k.has(e.id),
478
- onChange: (t) => De(e.id, t.target.checked),
485
+ onChange: (t) => Ae(e.id, t.target.checked),
479
486
  "aria-label": `Select channel ${e.name}`,
480
487
  className: "size-4 rounded border-border-subtle text-primary"
481
488
  }),
482
- /* @__PURE__ */ x(ue, {
489
+ /* @__PURE__ */ x(y, {
483
490
  size: 20,
484
491
  className: "text-accent-primary"
485
492
  }),
@@ -502,9 +509,9 @@ function _e() {
502
509
  /* @__PURE__ */ S("div", {
503
510
  role: "button",
504
511
  tabIndex: 0,
505
- onClick: () => m(`/channels/${e.id}`),
512
+ onClick: () => p(`/channels/${e.id}`),
506
513
  onKeyDown: (t) => {
507
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), m(`/channels/${e.id}`));
514
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), p(`/channels/${e.id}`));
508
515
  },
509
516
  className: "cursor-pointer",
510
517
  children: [
@@ -553,7 +560,7 @@ function _e() {
553
560
  e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
554
561
  className: "flex flex-wrap gap-1 mt-2",
555
562
  "aria-label": "Channel tags",
556
- children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(ge, {
563
+ children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(ve, {
557
564
  id: e.tagId,
558
565
  label: e.tagId,
559
566
  size: "sm"
@@ -569,27 +576,27 @@ function _e() {
569
576
  children: [
570
577
  /* @__PURE__ */ x("button", {
571
578
  type: "button",
572
- onClick: () => m(`/channels/${e.id}`),
579
+ onClick: () => p(`/channels/${e.id}`),
573
580
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
574
581
  title: E("channel.viewDetails", "View Details"),
575
- children: /* @__PURE__ */ x(se, { size: 14 })
582
+ children: /* @__PURE__ */ x(ce, { size: 14 })
576
583
  }),
577
584
  b && /* @__PURE__ */ x("button", {
578
585
  type: "button",
579
- onClick: () => m(`/channels/${e.id}/edit`),
586
+ onClick: () => p(`/channels/${e.id}/edit`),
580
587
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
581
588
  title: E("channel.editChannel", "Edit Channel"),
582
- children: /* @__PURE__ */ x(ce, { size: 14 })
589
+ children: /* @__PURE__ */ x(le, { size: 14 })
583
590
  }),
584
591
  /* @__PURE__ */ x(s, {
585
592
  permission: c.CHANNEL_EXECUTE,
586
593
  children: /* @__PURE__ */ x("button", {
587
594
  type: "button",
588
- onClick: () => Te(e.id),
595
+ onClick: () => Oe(e.id),
589
596
  disabled: o,
590
597
  className: "p-1.5 text-text-secondary hover:text-status-info-text hover:bg-status-info-bg-subtle rounded transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed",
591
598
  title: E("channel.runHealthCheck", "Run Health Check"),
592
- children: o ? /* @__PURE__ */ x(_, {
599
+ children: o ? /* @__PURE__ */ x(g, {
593
600
  size: 14,
594
601
  className: "animate-spin"
595
602
  }) : /* @__PURE__ */ x(de, { size: 14 })
@@ -599,15 +606,15 @@ function _e() {
599
606
  permission: c.CHANNEL_UPDATE,
600
607
  children: /* @__PURE__ */ x("button", {
601
608
  type: "button",
602
- onClick: () => we(e),
609
+ onClick: () => De(e),
603
610
  disabled: o,
604
611
  className: `p-1.5 rounded transition-colors disabled:opacity-50 cursor-pointer disabled:cursor-not-allowed ${e.status === "ACTIVE" ? "text-text-secondary hover:text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-text-secondary hover:text-status-success-text hover:bg-status-success-bg-subtle"}`,
605
612
  title: e.status === "ACTIVE" ? E("channel.deactivate", "Deactivate") : E("channel.activate", "Activate"),
606
- children: e.status === "ACTIVE" ? /* @__PURE__ */ x(y, { size: 14 }) : /* @__PURE__ */ x(le, { size: 14 })
613
+ children: e.status === "ACTIVE" ? /* @__PURE__ */ x(v, { size: 14 }) : /* @__PURE__ */ x(ue, { size: 14 })
607
614
  })
608
615
  })
609
616
  ]
610
- }), ve === e.id ? /* @__PURE__ */ S("div", {
617
+ }), xe === e.id ? /* @__PURE__ */ S("div", {
611
618
  className: "flex items-center gap-2",
612
619
  children: [
613
620
  /* @__PURE__ */ x("span", {
@@ -616,7 +623,7 @@ function _e() {
616
623
  }),
617
624
  /* @__PURE__ */ x("button", {
618
625
  type: "button",
619
- onClick: () => Ce(e.id),
626
+ onClick: () => Ee(e.id),
620
627
  disabled: o,
621
628
  className: "px-2 py-1 text-xs text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer disabled:cursor-not-allowed",
622
629
  children: o ? "..." : E("channel.yes", "Yes")
@@ -643,7 +650,7 @@ function _e() {
643
650
  }, e.id);
644
651
  })
645
652
  }),
646
- B > F && /* @__PURE__ */ S("div", {
653
+ V > F && /* @__PURE__ */ S("div", {
647
654
  className: "flex items-center justify-between px-1 py-2",
648
655
  children: [/* @__PURE__ */ S("p", {
649
656
  className: "text-sm text-text-secondary",
@@ -655,7 +662,7 @@ function _e() {
655
662
  children: [
656
663
  I * F + 1,
657
664
  "–",
658
- Math.min((I + 1) * F, B)
665
+ Math.min((I + 1) * F, V)
659
666
  ]
660
667
  }),
661
668
  " ",
@@ -663,7 +670,7 @@ function _e() {
663
670
  " ",
664
671
  /* @__PURE__ */ x("span", {
665
672
  className: "font-medium text-text-primary",
666
- children: B
673
+ children: V
667
674
  }),
668
675
  " ",
669
676
  E("channel.channelsLower", "channels")
@@ -683,13 +690,13 @@ function _e() {
683
690
  children: [
684
691
  I + 1,
685
692
  " / ",
686
- J
693
+ Y
687
694
  ]
688
695
  }),
689
696
  /* @__PURE__ */ x("button", {
690
697
  type: "button",
691
- onClick: () => L((e) => Math.min(J - 1, e + 1)),
692
- disabled: I >= J - 1,
698
+ onClick: () => L((e) => Math.min(Y - 1, e + 1)),
699
+ disabled: I >= Y - 1,
693
700
  className: "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",
694
701
  children: E("channel.next", "Next")
695
702
  })
@@ -701,6 +708,6 @@ function _e() {
701
708
  });
702
709
  }
703
710
  //#endregion
704
- export { _e as ChannelsListPage };
711
+ export { T as ChannelsListPage };
705
712
 
706
713
  //# sourceMappingURL=ChannelsListPage.js.map