@burdenoff/microfe-channel 2026.625.1 → 2026.625.3

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 +73 -76
  2. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  3. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +407 -353
  4. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  5. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +93 -87
  6. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  7. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +119 -96
  8. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelsListPage.js +219 -196
  10. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  11. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +277 -232
  12. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  13. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +112 -91
  14. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  15. package/dist/channel/modules/channels/pages/CreateChannelPage.js +28 -22
  16. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +72 -65
  18. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  19. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +101 -93
  20. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  21. package/dist/channel/modules/channels/pages/EditChannelPage.js +154 -148
  22. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  23. package/dist/channel/modules/channels/pages/EditConnectionPage.js +69 -62
  24. package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
  25. package/dist/channel/modules/channels/pages/SendMessagePage.js +131 -124
  26. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +152 -129
  28. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  29. package/package.json +2 -2
@@ -8,14 +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 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";
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";
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 { CTAOverflowMenu as ge, GlassCard as _e } from "@burdenoff/fe-libs/ui";
16
- import { TagBadge as ve } from "@burdenoff/fe-libs/tag";
15
+ import { CTAOverflowMenu as ge, EmphasisPanel as _e, GlassCard as C, IllustratedEmptyState as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
16
+ import { TagBadge as be } from "@burdenoff/fe-libs/tag";
17
17
  //#region src/channel/modules/channels/pages/ChannelsListPage.tsx
18
- var ye = {
18
+ var w = {
19
19
  EMAIL: {
20
20
  label: "Email",
21
21
  color: "bg-accent-blue-subtle text-accent-blue"
@@ -56,16 +56,16 @@ var ye = {
56
56
  label: "Webchat",
57
57
  color: "bg-accent-teal-subtle text-accent-teal"
58
58
  }
59
- }, C = {
59
+ }, T = {
60
60
  ACTIVE: {
61
61
  label: "Active",
62
62
  color: "text-status-success-text bg-status-success-bg-subtle",
63
- icon: m
63
+ icon: h
64
64
  },
65
65
  INACTIVE: {
66
66
  label: "Inactive",
67
67
  color: "text-text-secondary bg-bg-sunken",
68
- icon: v
68
+ icon: y
69
69
  },
70
70
  ERROR: {
71
71
  label: "Error",
@@ -75,23 +75,23 @@ var ye = {
75
75
  SUSPENDED: {
76
76
  label: "Suspended",
77
77
  color: "text-status-warning-text bg-status-warning-bg-subtle",
78
- icon: p
78
+ icon: m
79
79
  },
80
80
  ARCHIVED: {
81
81
  label: "Archived",
82
82
  color: "text-text-secondary bg-bg-sunken",
83
- icon: v
83
+ icon: y
84
84
  }
85
- }, w = {
85
+ }, E = {
86
86
  HEALTHY: {
87
87
  label: "Healthy",
88
88
  color: "text-status-success-text",
89
- icon: m
89
+ icon: h
90
90
  },
91
91
  DEGRADED: {
92
92
  label: "Degraded",
93
93
  color: "text-status-warning-text",
94
- icon: p
94
+ icon: m
95
95
  },
96
96
  UNHEALTHY: {
97
97
  label: "Unhealthy",
@@ -101,27 +101,27 @@ var ye = {
101
101
  UNKNOWN: {
102
102
  label: "Unknown",
103
103
  color: "text-text-secondary",
104
- icon: h
104
+ icon: g
105
105
  }
106
106
  };
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);
107
+ function D() {
108
+ let m = me(), { hasPermission: h } = he(), g = h(c.CHANNEL_CREATE), b = h(c.CHANNEL_UPDATE), D = h(c.CHANNEL_EXPORT), { t: xe } = ae(), O = (e, t) => {
109
+ let n = xe(e);
110
110
  return n === e ? t : n;
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
+ }, [Se, k] = f(null), [Ce, A] = f(null), [j, M] = f(/* @__PURE__ */ new Set()), [N, P] = f(null), { organizationId: we } = e(), { triggerExport: Te, isExporting: F, exportError: I } = re(we ?? void 0), [L] = f(12), [R, z] = f(0), { channels: B, isLoading: V, error: H, total: U, filter: W, updateFilter: G, deleteChannel: K, activateChannel: q, deactivateChannel: Ee, runHealthCheck: De, refetch: J } = o(), Y = Math.max(1, Math.ceil(U / L)), Oe = ie(J);
112
112
  u(() => {
113
- Te.current = J;
113
+ Oe.current = J;
114
114
  }), u(() => {
115
- Te.current({
116
- offset: I * F,
117
- limit: F
115
+ Oe.current({
116
+ offset: R * L,
117
+ limit: L
118
118
  });
119
- }, [I, F]), u(() => {
120
- Promise.resolve().then(() => L(0));
119
+ }, [R, L]), u(() => {
120
+ Promise.resolve().then(() => z(0));
121
121
  }, [
122
- H.search,
123
- H.platform,
124
- H.status
122
+ W.search,
123
+ W.platform,
124
+ W.status
125
125
  ]), u(() => {
126
126
  let e = [
127
127
  "channel.created",
@@ -133,110 +133,110 @@ function T() {
133
133
  ].map((e) => a(e, () => void J()));
134
134
  return () => e.forEach((e) => e());
135
135
  }, [J]);
136
- let Ee = async (e) => {
137
- n("medium"), O(e);
136
+ let ke = async (e) => {
137
+ n("medium"), A(e);
138
138
  try {
139
- await W(e), r("success"), D(null);
139
+ await K(e), r("success"), k(null);
140
140
  } catch (e) {
141
141
  r("error"), i(e, {
142
142
  module: "channel",
143
143
  context: { action: "Failed to delete channel" }
144
144
  }, "[channel] Failed to delete channel");
145
145
  } finally {
146
- O(null);
146
+ A(null);
147
147
  }
148
- }, De = async (e) => {
149
- O(e.id);
148
+ }, Ae = async (e) => {
149
+ A(e.id);
150
150
  try {
151
- e.status === "ACTIVE" ? await K(e.id) : await G(e.id);
151
+ e.status === "ACTIVE" ? await Ee(e.id) : await q(e.id);
152
152
  } catch (e) {
153
153
  i(e, {
154
154
  module: "channel",
155
155
  context: { action: "Failed to toggle channel status" }
156
156
  }, "[channel] Failed to toggle channel status");
157
157
  } finally {
158
- O(null);
158
+ A(null);
159
159
  }
160
- }, Oe = async (e) => {
161
- O(e);
160
+ }, je = async (e) => {
161
+ A(e);
162
162
  try {
163
- await q(e);
163
+ await De(e);
164
164
  } catch (e) {
165
165
  i(e, {
166
166
  module: "channel",
167
167
  context: { action: "Failed to run health check" }
168
168
  }, "[channel] Failed to run health check");
169
169
  } finally {
170
- O(null);
170
+ A(null);
171
171
  }
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) => {
173
- A((n) => {
172
+ }, X = d(() => B.filter((e) => j.has(e.id)), [B, j]), Z = d(() => X.filter((e) => e.status === "ACTIVE"), [X]), Q = d(() => X.filter((e) => e.status !== "ACTIVE"), [X]), $ = B.length > 0 && B.every((e) => j.has(e.id)), Me = B.some((e) => j.has(e.id)) && !$, Ne = (e, t) => {
173
+ M((n) => {
174
174
  let r = new Set(n);
175
175
  return t ? r.add(e) : r.delete(e), r;
176
176
  });
177
- }, je = (e) => {
178
- A((t) => {
177
+ }, Pe = (e) => {
178
+ M((t) => {
179
179
  let n = new Set(t);
180
- return R.forEach((t) => {
180
+ return B.forEach((t) => {
181
181
  e ? n.add(t.id) : n.delete(t.id);
182
182
  }), n;
183
183
  });
184
- }, Me = async () => {
184
+ }, Fe = async () => {
185
185
  if (X.length === 0) return;
186
186
  n("medium");
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({
187
+ let e = O(X.length === 1 ? "channel.bulkDeleteConfirmSingle" : "channel.bulkDeleteConfirmMultiple", X.length === 1 ? "Delete 1 selected channel?" : `Delete ${X.length} selected channels?`), r = await t({
188
188
  title: "Delete channels",
189
189
  message: e,
190
190
  okButtonTitle: "Delete",
191
191
  cancelButtonTitle: "Cancel"
192
192
  });
193
193
  if (r === null ? window.confirm(e) : r) {
194
- M("delete");
194
+ P("delete");
195
195
  try {
196
- await Promise.allSettled(X.map((e) => W(e.id))), A(/* @__PURE__ */ new Set());
196
+ await Promise.allSettled(X.map((e) => K(e.id))), M(/* @__PURE__ */ new Set());
197
197
  } finally {
198
- M(null);
198
+ P(null);
199
199
  }
200
200
  }
201
- }, Ne = async () => {
201
+ }, Ie = async () => {
202
202
  if (Q.length !== 0) {
203
- M("activate");
203
+ P("activate");
204
204
  try {
205
- await Promise.allSettled(Q.map((e) => G(e.id))), A(/* @__PURE__ */ new Set());
205
+ await Promise.allSettled(Q.map((e) => q(e.id))), M(/* @__PURE__ */ new Set());
206
206
  } finally {
207
- M(null);
207
+ P(null);
208
208
  }
209
209
  }
210
- }, Pe = async () => {
210
+ }, Le = async () => {
211
211
  if (Z.length !== 0) {
212
- M("deactivate");
212
+ P("deactivate");
213
213
  try {
214
- await Promise.allSettled(Z.map((e) => K(e.id))), A(/* @__PURE__ */ new Set());
214
+ await Promise.allSettled(Z.map((e) => Ee(e.id))), M(/* @__PURE__ */ new Set());
215
215
  } finally {
216
- M(null);
216
+ P(null);
217
217
  }
218
218
  }
219
- }, Fe = async () => {
219
+ }, Re = async () => {
220
220
  if (X.length !== 0) {
221
- M("health");
221
+ P("health");
222
222
  try {
223
- await Promise.allSettled(X.map((e) => q(e.id)));
223
+ await Promise.allSettled(X.map((e) => De(e.id)));
224
224
  } finally {
225
- M(null);
225
+ P(null);
226
226
  }
227
227
  }
228
- }, Ie = (e) => ({
229
- ...ye[e] || {
228
+ }, ze = (e) => ({
229
+ ...w[e] || {
230
230
  label: e,
231
231
  color: "bg-bg-sunken text-text-secondary"
232
232
  },
233
- label: l(e, te, E)
234
- }), Le = (e) => ({
235
- ...C[e] || C.INACTIVE,
236
- label: l(e, ne, E)
237
- }), Re = (e) => ({
238
- ...w[e] || w.UNKNOWN,
239
- label: l(e, ee, E)
233
+ label: l(e, te, O)
234
+ }), Be = (e) => ({
235
+ ...T[e] || T.INACTIVE,
236
+ label: l(e, ne, O)
237
+ }), Ve = (e) => ({
238
+ ...E[e] || E.UNKNOWN,
239
+ label: l(e, ee, O)
240
240
  });
241
241
  return /* @__PURE__ */ x(s, {
242
242
  permission: c.CHANNEL_READ,
@@ -247,43 +247,78 @@ function T() {
247
247
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
248
248
  children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
249
249
  className: "text-xl sm:text-2xl font-bold text-text-primary",
250
- children: E("channel.channels", "Channels")
250
+ children: O("channel.channels", "Channels")
251
251
  }), /* @__PURE__ */ S("p", {
252
252
  className: "text-sm text-text-secondary mt-1",
253
253
  children: [
254
- E("channel.manageChannels", "Manage your communication channels"),
254
+ O("channel.manageChannels", "Manage your communication channels"),
255
255
  " (",
256
- V,
256
+ U,
257
257
  " total)"
258
258
  ]
259
259
  })] }), /* @__PURE__ */ x("div", {
260
260
  className: "flex items-center gap-2",
261
261
  "data-tour": "channels-list-export-button",
262
262
  children: /* @__PURE__ */ x(ge, {
263
- primary: h ? {
264
- label: E("channel.createChannel", "Create Channel"),
265
- icon: /* @__PURE__ */ x(_, {
263
+ primary: g ? {
264
+ label: O("channel.createChannel", "Create Channel"),
265
+ icon: /* @__PURE__ */ x(v, {
266
266
  size: 16,
267
267
  "aria-hidden": "true"
268
268
  }),
269
- onSelect: () => p("/channels/create")
269
+ onSelect: () => m("/channels/create")
270
270
  } : void 0,
271
- actions: T ? [{
272
- label: E("channel.export", "Export"),
273
- icon: N ? /* @__PURE__ */ x(g, {
271
+ actions: D ? [{
272
+ label: O("channel.export", "Export"),
273
+ icon: F ? /* @__PURE__ */ x(_, {
274
274
  size: 16,
275
275
  className: "animate-spin",
276
276
  "aria-hidden": "true"
277
- }) : /* @__PURE__ */ x(se, {
277
+ }) : /* @__PURE__ */ x(oe, {
278
278
  size: 16,
279
279
  "aria-hidden": "true"
280
280
  }),
281
- disabled: N,
282
- onSelect: () => void we()
281
+ disabled: F,
282
+ onSelect: () => void Te()
283
283
  }] : []
284
284
  })
285
285
  })]
286
286
  }),
287
+ /* @__PURE__ */ x(ye, {
288
+ icon: /* @__PURE__ */ x(ue, {
289
+ size: 15,
290
+ "aria-hidden": "true"
291
+ }),
292
+ children: O("channel.listPurpose", "Every communication channel in your organization, in one browseable grid. Filter by platform or status, select several at once to activate, deactivate, health-check or delete them in bulk, and open any card to manage its connection and delivery history. Start here when you need to find a specific channel or tidy up the ones you no longer use.")
293
+ }),
294
+ g && /* @__PURE__ */ S(_e, {
295
+ className: "flex flex-col gap-3 p-5 sm:flex-row sm:items-center sm:justify-between",
296
+ children: [/* @__PURE__ */ S("div", {
297
+ className: "flex items-center gap-3",
298
+ children: [/* @__PURE__ */ x("span", {
299
+ className: "rounded-lg bg-accent-primary/10 p-2",
300
+ children: /* @__PURE__ */ x(v, {
301
+ size: 18,
302
+ className: "text-accent-primary",
303
+ "aria-hidden": "true"
304
+ })
305
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
306
+ className: "text-sm font-semibold text-text-primary",
307
+ children: O("channel.addAnotherChannel", "Add another channel")
308
+ }), /* @__PURE__ */ x("p", {
309
+ className: "text-sm text-text-secondary",
310
+ children: O("channel.addAnotherChannelHint", "Connect a new platform — Email, SMS, Push, Slack and more — to start delivering messages through it.")
311
+ })] })]
312
+ }), /* @__PURE__ */ S("button", {
313
+ type: "button",
314
+ onClick: () => m("/channels/create"),
315
+ className: "inline-flex shrink-0 items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
316
+ children: [/* @__PURE__ */ x(v, {
317
+ size: 16,
318
+ "aria-hidden": "true"
319
+ }), O("channel.createChannel", "Create Channel")]
320
+ })]
321
+ }),
287
322
  /* @__PURE__ */ S("div", {
288
323
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
289
324
  children: [
@@ -293,51 +328,51 @@ function T() {
293
328
  size: 16,
294
329
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
295
330
  }), /* @__PURE__ */ x("input", {
296
- "aria-label": E("channel.searchChannels", "Search channels..."),
331
+ "aria-label": O("channel.searchChannels", "Search channels..."),
297
332
  type: "text",
298
- placeholder: E("channel.searchChannels", "Search channels..."),
299
- value: H.search || "",
300
- onChange: (e) => U({ search: e.target.value }),
333
+ placeholder: O("channel.searchChannels", "Search channels..."),
334
+ value: W.search || "",
335
+ onChange: (e) => G({ search: e.target.value }),
301
336
  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"
302
337
  })]
303
338
  }),
304
339
  /* @__PURE__ */ S("select", {
305
- value: H.platform || "",
306
- onChange: (e) => U({ platform: e.target.value || void 0 }),
340
+ value: W.platform || "",
341
+ onChange: (e) => G({ platform: e.target.value || void 0 }),
307
342
  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",
308
343
  children: [/* @__PURE__ */ x("option", {
309
344
  value: "",
310
- children: E("channel.allPlatforms", "All Platforms")
311
- }), Object.entries(ye).map(([e, t]) => /* @__PURE__ */ x("option", {
345
+ children: O("channel.allPlatforms", "All Platforms")
346
+ }), Object.entries(w).map(([e, t]) => /* @__PURE__ */ x("option", {
312
347
  value: e,
313
348
  children: t.label
314
349
  }, e))]
315
350
  }),
316
351
  /* @__PURE__ */ S("select", {
317
- value: H.status || "",
318
- onChange: (e) => U({ status: e.target.value || void 0 }),
352
+ value: W.status || "",
353
+ onChange: (e) => G({ status: e.target.value || void 0 }),
319
354
  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",
320
355
  children: [/* @__PURE__ */ x("option", {
321
356
  value: "",
322
- children: E("channel.allStatus", "All Status")
323
- }), Object.entries(C).map(([e, t]) => /* @__PURE__ */ x("option", {
357
+ children: O("channel.allStatus", "All Status")
358
+ }), Object.entries(T).map(([e, t]) => /* @__PURE__ */ x("option", {
324
359
  value: e,
325
360
  children: t.label
326
361
  }, e))]
327
362
  })
328
363
  ]
329
364
  }),
330
- P && /* @__PURE__ */ S("div", {
365
+ I && /* @__PURE__ */ S("div", {
331
366
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
332
- children: [/* @__PURE__ */ x(oe, {
367
+ children: [/* @__PURE__ */ x(p, {
333
368
  size: 20,
334
369
  className: "text-status-error-text"
335
370
  }), /* @__PURE__ */ x("p", {
336
371
  className: "text-sm text-status-error-text flex-1",
337
- children: P
372
+ children: I
338
373
  })]
339
374
  }),
340
- R.length > 0 && /* @__PURE__ */ S(_e, {
375
+ B.length > 0 && /* @__PURE__ */ S(C, {
341
376
  treatment: "plain",
342
377
  className: "flex flex-col gap-3 border-border-seam p-4 sm:flex-row sm:items-center sm:justify-between",
343
378
  "data-tour": "channels-list-bulk-actions",
@@ -347,132 +382,120 @@ function T() {
347
382
  type: "checkbox",
348
383
  checked: $,
349
384
  ref: (e) => {
350
- e && (e.indeterminate = ke && !$);
385
+ e && (e.indeterminate = Me && !$);
351
386
  },
352
- onChange: (e) => je(e.target.checked),
387
+ onChange: (e) => Pe(e.target.checked),
353
388
  "aria-label": "Select all channels",
354
389
  className: "size-4 rounded border-border-subtle text-primary"
355
- }), /* @__PURE__ */ x("span", { children: E("channel.selectAllVisible", "Select all visible") })]
390
+ }), /* @__PURE__ */ x("span", { children: O("channel.selectAllVisible", "Select all visible") })]
356
391
  }), /* @__PURE__ */ S("div", {
357
392
  className: "flex flex-wrap items-center gap-2",
358
393
  children: [
359
394
  /* @__PURE__ */ S("span", {
360
395
  className: "text-sm text-text-secondary",
361
396
  children: [
362
- k.size,
397
+ j.size,
363
398
  " ",
364
- E("channel.selectedCountLabel", "selected")
399
+ O("channel.selectedCountLabel", "selected")
365
400
  ]
366
401
  }),
367
- k.size > 0 && /* @__PURE__ */ x("button", {
402
+ j.size > 0 && /* @__PURE__ */ x("button", {
368
403
  type: "button",
369
- onClick: () => A(/* @__PURE__ */ new Set()),
404
+ onClick: () => M(/* @__PURE__ */ new Set()),
370
405
  className: "text-sm text-text-secondary hover:text-text-primary",
371
- children: E("channel.clearSelection", "Clear selection")
406
+ children: O("channel.clearSelection", "Clear selection")
372
407
  }),
373
408
  /* @__PURE__ */ x(s, {
374
409
  permission: c.CHANNEL_EXECUTE,
375
410
  children: /* @__PURE__ */ S("button", {
376
411
  type: "button",
377
- onClick: Fe,
378
- disabled: X.length === 0 || j !== null,
412
+ onClick: Re,
413
+ disabled: X.length === 0 || N !== null,
379
414
  className: "px-3 py-2 text-sm font-medium border border-border-subtle rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
380
- children: [E("channel.healthCheck", "Health Check"), X.length > 0 ? ` (${X.length})` : ""]
415
+ children: [O("channel.healthCheck", "Health Check"), X.length > 0 ? ` (${X.length})` : ""]
381
416
  })
382
417
  }),
383
418
  /* @__PURE__ */ x(s, {
384
419
  permission: c.CHANNEL_UPDATE,
385
420
  children: /* @__PURE__ */ S("button", {
386
421
  type: "button",
387
- onClick: Ne,
388
- disabled: Q.length === 0 || j !== null,
422
+ onClick: Ie,
423
+ disabled: Q.length === 0 || N !== null,
389
424
  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",
390
- children: [E("channel.activateSelected", "Activate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
425
+ children: [O("channel.activateSelected", "Activate Selected"), Q.length > 0 ? ` (${Q.length})` : ""]
391
426
  })
392
427
  }),
393
428
  /* @__PURE__ */ x(s, {
394
429
  permission: c.CHANNEL_UPDATE,
395
430
  children: /* @__PURE__ */ S("button", {
396
431
  type: "button",
397
- onClick: Pe,
398
- disabled: Z.length === 0 || j !== null,
432
+ onClick: Le,
433
+ disabled: Z.length === 0 || N !== null,
399
434
  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",
400
- children: [E("channel.deactivateSelected", "Deactivate Selected"), Z.length > 0 ? ` (${Z.length})` : ""]
435
+ children: [O("channel.deactivateSelected", "Deactivate Selected"), Z.length > 0 ? ` (${Z.length})` : ""]
401
436
  })
402
437
  }),
403
438
  /* @__PURE__ */ x(s, {
404
439
  permission: c.CHANNEL_DELETE,
405
440
  children: /* @__PURE__ */ S("button", {
406
441
  type: "button",
407
- onClick: Me,
408
- disabled: X.length === 0 || j !== null,
442
+ onClick: Fe,
443
+ disabled: X.length === 0 || N !== null,
409
444
  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",
410
- children: [E("channel.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
445
+ children: [O("channel.deleteSelected", "Delete Selected"), X.length > 0 ? ` (${X.length})` : ""]
411
446
  })
412
447
  })
413
448
  ]
414
449
  })]
415
450
  }),
416
- B && /* @__PURE__ */ S("div", {
451
+ H && /* @__PURE__ */ S("div", {
417
452
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
418
453
  children: [
419
- /* @__PURE__ */ x(oe, {
454
+ /* @__PURE__ */ x(p, {
420
455
  size: 20,
421
456
  className: "text-status-error-text"
422
457
  }),
423
458
  /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
424
459
  className: "text-sm font-medium text-status-error-text",
425
- children: E("channel.loadFailed", "Failed to load channels")
460
+ children: O("channel.loadFailed", "Failed to load channels")
426
461
  }), /* @__PURE__ */ x("p", {
427
462
  className: "text-xs text-status-error-text",
428
- children: B
463
+ children: H
429
464
  })] }),
430
465
  /* @__PURE__ */ x("button", {
431
466
  type: "button",
432
467
  onClick: () => J(),
433
468
  className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
434
- children: E("channel.retry", "Retry")
469
+ children: O("channel.retry", "Retry")
435
470
  })
436
471
  ]
437
472
  }),
438
- z && R.length === 0 && /* @__PURE__ */ x("div", {
473
+ V && B.length === 0 && /* @__PURE__ */ x("div", {
439
474
  className: "flex items-center justify-center py-12",
440
- children: /* @__PURE__ */ x(g, {
475
+ children: /* @__PURE__ */ x(_, {
441
476
  size: 32,
442
477
  className: "animate-spin text-accent-primary"
443
478
  })
444
479
  }),
445
- !z && !B && R.length === 0 && /* @__PURE__ */ S("div", {
446
- className: "flex flex-col items-center justify-center py-12 text-center",
447
- children: [
448
- /* @__PURE__ */ x(y, {
449
- size: 48,
450
- className: "text-text-secondary mb-4"
451
- }),
452
- /* @__PURE__ */ x("h3", {
453
- className: "text-lg font-semibold text-text-primary mb-2",
454
- children: E("channel.noChannelsFound", "No channels found")
455
- }),
456
- /* @__PURE__ */ x("p", {
457
- className: "text-sm text-text-secondary max-w-md mb-4",
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.")
459
- }),
460
- h && !H.search && !H.platform && !H.status && /* @__PURE__ */ S("button", {
461
- type: "button",
462
- onClick: () => p("/channels/create"),
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",
464
- children: [/* @__PURE__ */ x(_, { size: 16 }), E("channel.createChannel", "Create Channel")]
465
- })
466
- ]
480
+ !V && !H && B.length === 0 && /* @__PURE__ */ x(ve, {
481
+ illustration: W.search || W.platform || W.status ? "empty-search" : "empty-data",
482
+ title: O("channel.noChannelsFound", "No channels found"),
483
+ description: W.search || W.platform || W.status ? O("channel.adjustFilters", "Try adjusting your filters to see more channels.") : O("channel.createFirstChannelPrompt", "Create your first communication channel to get started."),
484
+ action: g && !W.search && !W.platform && !W.status ? /* @__PURE__ */ S("button", {
485
+ type: "button",
486
+ onClick: () => m("/channels/create"),
487
+ 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",
488
+ children: [/* @__PURE__ */ x(v, { size: 16 }), O("channel.createChannel", "Create Channel")]
489
+ }) : void 0
467
490
  }),
468
- R.length > 0 && /* @__PURE__ */ x("div", {
491
+ B.length > 0 && /* @__PURE__ */ x("div", {
469
492
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
470
493
  "data-tour": "channels-list-grid",
471
- children: R.map((e) => {
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, {
494
+ children: B.map((e) => {
495
+ let t = ze(e.platform), n = Be(e.status), r = Ve(e.connectionHealth), i = n.icon, a = r.icon, o = Ce === e.id;
496
+ return /* @__PURE__ */ S(C, {
474
497
  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"}`,
498
+ className: `p-4 transition-colors group ${j.has(e.id) ? "ring-2 ring-action-primary-bg border-action-primary-bg/40" : "border-border-seam"}`,
476
499
  children: [
477
500
  /* @__PURE__ */ S("div", {
478
501
  className: "flex items-start justify-between mb-3",
@@ -481,12 +504,12 @@ function T() {
481
504
  children: [
482
505
  /* @__PURE__ */ x("input", {
483
506
  type: "checkbox",
484
- checked: k.has(e.id),
485
- onChange: (t) => Ae(e.id, t.target.checked),
507
+ checked: j.has(e.id),
508
+ onChange: (t) => Ne(e.id, t.target.checked),
486
509
  "aria-label": `Select channel ${e.name}`,
487
510
  className: "size-4 rounded border-border-subtle text-primary"
488
511
  }),
489
- /* @__PURE__ */ x(y, {
512
+ /* @__PURE__ */ x(ue, {
490
513
  size: 20,
491
514
  className: "text-accent-primary"
492
515
  }),
@@ -501,7 +524,7 @@ function T() {
501
524
  size: 14,
502
525
  className: n.color.split(" ")[0]
503
526
  }), /* @__PURE__ */ x("span", {
504
- className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color}`,
527
+ className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color} ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
505
528
  children: n.label
506
529
  })]
507
530
  })]
@@ -509,9 +532,9 @@ function T() {
509
532
  /* @__PURE__ */ S("div", {
510
533
  role: "button",
511
534
  tabIndex: 0,
512
- onClick: () => p(`/channels/${e.id}`),
535
+ onClick: () => m(`/channels/${e.id}`),
513
536
  onKeyDown: (t) => {
514
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), p(`/channels/${e.id}`));
537
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), m(`/channels/${e.id}`));
515
538
  },
516
539
  className: "cursor-pointer",
517
540
  children: [
@@ -530,7 +553,7 @@ function T() {
530
553
  /* @__PURE__ */ x("div", {
531
554
  className: "flex items-center gap-3 text-xs text-text-secondary mb-2",
532
555
  children: /* @__PURE__ */ S("span", { children: [
533
- E("channel.priority", "Priority"),
556
+ O("channel.priority", "Priority"),
534
557
  ": ",
535
558
  e.priority
536
559
  ] })
@@ -551,7 +574,7 @@ function T() {
551
574
  /* @__PURE__ */ x("span", { children: "•" }),
552
575
  /* @__PURE__ */ x("span", {
553
576
  className: e.isConnected ? "text-status-success-text" : "text-text-secondary",
554
- children: e.isConnected ? E("channel.connected", "Connected") : E("channel.notConnected", "Not Connected")
577
+ children: e.isConnected ? O("channel.connected", "Connected") : O("channel.notConnected", "Not Connected")
555
578
  })
556
579
  ]
557
580
  })
@@ -560,7 +583,7 @@ function T() {
560
583
  e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
561
584
  className: "flex flex-wrap gap-1 mt-2",
562
585
  "aria-label": "Channel tags",
563
- children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(ve, {
586
+ children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(be, {
564
587
  id: e.tagId,
565
588
  label: e.tagId,
566
589
  size: "sm"
@@ -576,27 +599,27 @@ function T() {
576
599
  children: [
577
600
  /* @__PURE__ */ x("button", {
578
601
  type: "button",
579
- onClick: () => p(`/channels/${e.id}`),
602
+ onClick: () => m(`/channels/${e.id}`),
580
603
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
581
- title: E("channel.viewDetails", "View Details"),
582
- children: /* @__PURE__ */ x(ce, { size: 14 })
604
+ title: O("channel.viewDetails", "View Details"),
605
+ children: /* @__PURE__ */ x(se, { size: 14 })
583
606
  }),
584
607
  b && /* @__PURE__ */ x("button", {
585
608
  type: "button",
586
- onClick: () => p(`/channels/${e.id}/edit`),
609
+ onClick: () => m(`/channels/${e.id}/edit`),
587
610
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
588
- title: E("channel.editChannel", "Edit Channel"),
589
- children: /* @__PURE__ */ x(le, { size: 14 })
611
+ title: O("channel.editChannel", "Edit Channel"),
612
+ children: /* @__PURE__ */ x(ce, { size: 14 })
590
613
  }),
591
614
  /* @__PURE__ */ x(s, {
592
615
  permission: c.CHANNEL_EXECUTE,
593
616
  children: /* @__PURE__ */ x("button", {
594
617
  type: "button",
595
- onClick: () => Oe(e.id),
618
+ onClick: () => je(e.id),
596
619
  disabled: o,
597
620
  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",
598
- title: E("channel.runHealthCheck", "Run Health Check"),
599
- children: o ? /* @__PURE__ */ x(g, {
621
+ title: O("channel.runHealthCheck", "Run Health Check"),
622
+ children: o ? /* @__PURE__ */ x(_, {
600
623
  size: 14,
601
624
  className: "animate-spin"
602
625
  }) : /* @__PURE__ */ x(de, { size: 14 })
@@ -606,42 +629,42 @@ function T() {
606
629
  permission: c.CHANNEL_UPDATE,
607
630
  children: /* @__PURE__ */ x("button", {
608
631
  type: "button",
609
- onClick: () => De(e),
632
+ onClick: () => Ae(e),
610
633
  disabled: o,
611
634
  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"}`,
612
- title: e.status === "ACTIVE" ? E("channel.deactivate", "Deactivate") : E("channel.activate", "Activate"),
613
- children: e.status === "ACTIVE" ? /* @__PURE__ */ x(v, { size: 14 }) : /* @__PURE__ */ x(ue, { size: 14 })
635
+ title: e.status === "ACTIVE" ? O("channel.deactivate", "Deactivate") : O("channel.activate", "Activate"),
636
+ children: e.status === "ACTIVE" ? /* @__PURE__ */ x(y, { size: 14 }) : /* @__PURE__ */ x(le, { size: 14 })
614
637
  })
615
638
  })
616
639
  ]
617
- }), xe === e.id ? /* @__PURE__ */ S("div", {
640
+ }), Se === e.id ? /* @__PURE__ */ S("div", {
618
641
  className: "flex items-center gap-2",
619
642
  children: [
620
643
  /* @__PURE__ */ x("span", {
621
644
  className: "text-xs text-text-secondary",
622
- children: E("channel.deleteQuestion", "Delete?")
645
+ children: O("channel.deleteQuestion", "Delete?")
623
646
  }),
624
647
  /* @__PURE__ */ x("button", {
625
648
  type: "button",
626
- onClick: () => Ee(e.id),
649
+ onClick: () => ke(e.id),
627
650
  disabled: o,
628
651
  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",
629
- children: o ? "..." : E("channel.yes", "Yes")
652
+ children: o ? "..." : O("channel.yes", "Yes")
630
653
  }),
631
654
  /* @__PURE__ */ x("button", {
632
655
  type: "button",
633
- onClick: () => D(null),
656
+ onClick: () => k(null),
634
657
  className: "px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken rounded transition-colors cursor-pointer",
635
- children: E("channel.no", "No")
658
+ children: O("channel.no", "No")
636
659
  })
637
660
  ]
638
661
  }) : /* @__PURE__ */ x(s, {
639
662
  permission: c.CHANNEL_DELETE,
640
663
  children: /* @__PURE__ */ x("button", {
641
664
  type: "button",
642
- onClick: () => D(e.id),
665
+ onClick: () => k(e.id),
643
666
  className: "p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer",
644
- title: E("channel.deleteChannel", "Delete Channel"),
667
+ title: O("channel.deleteChannel", "Delete Channel"),
645
668
  children: /* @__PURE__ */ x(pe, { size: 14 })
646
669
  })
647
670
  })]
@@ -650,55 +673,55 @@ function T() {
650
673
  }, e.id);
651
674
  })
652
675
  }),
653
- V > F && /* @__PURE__ */ S("div", {
676
+ U > L && /* @__PURE__ */ S("div", {
654
677
  className: "flex items-center justify-between px-1 py-2",
655
678
  children: [/* @__PURE__ */ S("p", {
656
679
  className: "text-sm text-text-secondary",
657
680
  children: [
658
- E("channel.showing", "Showing"),
681
+ O("channel.showing", "Showing"),
659
682
  " ",
660
683
  /* @__PURE__ */ S("span", {
661
684
  className: "font-medium text-text-primary",
662
685
  children: [
663
- I * F + 1,
686
+ R * L + 1,
664
687
  "–",
665
- Math.min((I + 1) * F, V)
688
+ Math.min((R + 1) * L, U)
666
689
  ]
667
690
  }),
668
691
  " ",
669
- E("channel.of", "of"),
692
+ O("channel.of", "of"),
670
693
  " ",
671
694
  /* @__PURE__ */ x("span", {
672
695
  className: "font-medium text-text-primary",
673
- children: V
696
+ children: U
674
697
  }),
675
698
  " ",
676
- E("channel.channelsLower", "channels")
699
+ O("channel.channelsLower", "channels")
677
700
  ]
678
701
  }), /* @__PURE__ */ S("div", {
679
702
  className: "flex items-center gap-2",
680
703
  children: [
681
704
  /* @__PURE__ */ x("button", {
682
705
  type: "button",
683
- onClick: () => L((e) => Math.max(0, e - 1)),
684
- disabled: I === 0,
706
+ onClick: () => z((e) => Math.max(0, e - 1)),
707
+ disabled: R === 0,
685
708
  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",
686
- children: E("channel.previous", "Previous")
709
+ children: O("channel.previous", "Previous")
687
710
  }),
688
711
  /* @__PURE__ */ S("span", {
689
712
  className: "text-sm text-text-secondary",
690
713
  children: [
691
- I + 1,
714
+ R + 1,
692
715
  " / ",
693
716
  Y
694
717
  ]
695
718
  }),
696
719
  /* @__PURE__ */ x("button", {
697
720
  type: "button",
698
- onClick: () => L((e) => Math.min(Y - 1, e + 1)),
699
- disabled: I >= Y - 1,
721
+ onClick: () => z((e) => Math.min(Y - 1, e + 1)),
722
+ disabled: R >= Y - 1,
700
723
  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",
701
- children: E("channel.next", "Next")
724
+ children: O("channel.next", "Next")
702
725
  })
703
726
  ]
704
727
  })]
@@ -708,6 +731,6 @@ function T() {
708
731
  });
709
732
  }
710
733
  //#endregion
711
- export { T as ChannelsListPage };
734
+ export { D as ChannelsListPage };
712
735
 
713
736
  //# sourceMappingURL=ChannelsListPage.js.map