@burdenoff/microfe-channel 2026.624.3 → 2026.625.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +134 -134
  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 +169 -169
  8. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelsListPage.js +204 -209
  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 +141 -148
  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 +177 -192
  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 +185 -183
  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";
12
- import { useNavigate as me } from "react-router-dom";
13
- import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
14
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
15
- import { TagBadge as ge } from "@burdenoff/fe-libs/tag";
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 le, Power as ue, PowerOff as v, Radio as de, RefreshCw as fe, Search as pe, Trash2 as me, XCircle as y } from "lucide-react";
12
+ import { useNavigate as he } from "react-router-dom";
13
+ import { usePermissions as ge } from "@burdenoff/fe-libs/shared/providers/shell";
14
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
15
+ import { CTAOverflowMenu as _e, GlassCard as ve, IllustratedEmptyState as ye } from "@burdenoff/fe-libs/ui";
16
+ import { TagBadge as be } from "@burdenoff/fe-libs/tag";
16
17
  //#region src/channel/modules/channels/pages/ChannelsListPage.tsx
17
- var C = {
18
+ var S = {
18
19
  EMAIL: {
19
20
  label: "Email",
20
21
  color: "bg-accent-blue-subtle text-accent-blue"
@@ -55,7 +56,7 @@ 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",
@@ -64,12 +65,12 @@ var C = {
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",
71
72
  color: "text-status-error-text bg-status-error-bg-subtle",
72
- icon: b
73
+ icon: y
73
74
  },
74
75
  SUSPENDED: {
75
76
  label: "Suspended",
@@ -79,9 +80,9 @@ var C = {
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",
@@ -95,7 +96,7 @@ var C = {
95
96
  UNHEALTHY: {
96
97
  label: "Unhealthy",
97
98
  color: "text-status-error-text",
98
- icon: b
99
+ icon: y
99
100
  },
100
101
  UNKNOWN: {
101
102
  label: "Unknown",
@@ -103,24 +104,24 @@ var C = {
103
104
  icon: g
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 m = he(), { hasPermission: h } = ge(), g = h(c.CHANNEL_CREATE), y = h(c.CHANNEL_UPDATE), T = h(c.CHANNEL_EXPORT), { t: xe } = ae(), E = (e, t) => {
109
+ let n = xe(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
+ }, [Se, D] = f(null), [Ce, O] = f(null), [k, A] = f(/* @__PURE__ */ new Set()), [j, M] = f(null), { organizationId: we } = e(), { triggerExport: Te, isExporting: N, exportError: P } = re(we ?? 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)), Ee = ie(J);
111
112
  u(() => {
112
- Y.current = q;
113
+ Ee.current = J;
113
114
  }), u(() => {
114
- Y.current({
115
+ Ee.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 De = 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
+ }, Oe = 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
+ }, ke = 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)), Ae = R.some((e) => k.has(e.id)) && !$, je = (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
+ }, Me = (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
+ }, Ne = 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,165 +193,170 @@ 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
+ }, Pe = 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
+ }, Fe = 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
+ }, Ie = 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
+ }, Le = (e) => ({
229
+ ...S[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
+ }), Re = (e) => ({
235
+ ...C[e] || C.INACTIVE,
235
236
  label: l(e, ne, E)
236
- }), Fe = (e) => ({
237
- ...T[e] || T.UNKNOWN,
237
+ }), ze = (e) => ({
238
+ ...w[e] || w.UNKNOWN,
238
239
  label: l(e, ee, E)
239
240
  });
240
- return /* @__PURE__ */ x(s, {
241
+ return /* @__PURE__ */ b(s, {
241
242
  permission: c.CHANNEL_READ,
242
- children: /* @__PURE__ */ S("div", {
243
+ children: /* @__PURE__ */ x("div", {
243
244
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
244
245
  children: [
245
- /* @__PURE__ */ S("div", {
246
+ /* @__PURE__ */ x("div", {
246
247
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
247
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
248
+ children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
248
249
  className: "text-xl sm:text-2xl font-bold text-text-primary",
249
250
  children: E("channel.channels", "Channels")
250
- }), /* @__PURE__ */ S("p", {
251
+ }), /* @__PURE__ */ x("p", {
251
252
  className: "text-sm text-text-secondary mt-1",
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__ */ b("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__ */ b(_e, {
263
+ primary: g ? {
264
+ label: E("channel.createChannel", "Create Channel"),
265
+ icon: /* @__PURE__ */ b(le, {
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: () => m("/channels/create")
270
+ } : void 0,
271
+ actions: T ? [{
272
+ label: E("channel.export", "Export"),
273
+ icon: N ? /* @__PURE__ */ b(_, {
274
+ size: 16,
275
+ className: "animate-spin",
276
+ "aria-hidden": "true"
277
+ }) : /* @__PURE__ */ b(oe, {
278
+ size: 16,
279
+ "aria-hidden": "true"
280
+ }),
281
+ disabled: N,
282
+ onSelect: () => void Te()
283
+ }] : []
284
+ })
280
285
  })]
281
286
  }),
282
- /* @__PURE__ */ S("div", {
287
+ /* @__PURE__ */ x("div", {
283
288
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
284
289
  children: [
285
- /* @__PURE__ */ S("div", {
290
+ /* @__PURE__ */ x("div", {
286
291
  className: "relative flex-1",
287
- children: [/* @__PURE__ */ x(fe, {
292
+ children: [/* @__PURE__ */ b(pe, {
288
293
  size: 16,
289
294
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
290
- }), /* @__PURE__ */ x("input", {
295
+ }), /* @__PURE__ */ b("input", {
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
- /* @__PURE__ */ S("select", {
300
- value: V.platform || "",
301
- onChange: (e) => H({ platform: e.target.value || void 0 }),
304
+ /* @__PURE__ */ x("select", {
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
- children: [/* @__PURE__ */ x("option", {
308
+ children: [/* @__PURE__ */ b("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(S).map(([e, t]) => /* @__PURE__ */ b("option", {
307
312
  value: e,
308
313
  children: t.label
309
314
  }, e))]
310
315
  }),
311
- /* @__PURE__ */ S("select", {
312
- value: V.status || "",
313
- onChange: (e) => H({ status: e.target.value || void 0 }),
316
+ /* @__PURE__ */ x("select", {
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
- children: [/* @__PURE__ */ x("option", {
320
+ children: [/* @__PURE__ */ b("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__ */ b("option", {
319
324
  value: e,
320
325
  children: t.label
321
326
  }, e))]
322
327
  })
323
328
  ]
324
329
  }),
325
- P && /* @__PURE__ */ S("div", {
330
+ P && /* @__PURE__ */ x("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__ */ b(p, {
328
333
  size: 20,
329
334
  className: "text-status-error-text"
330
- }), /* @__PURE__ */ x("p", {
335
+ }), /* @__PURE__ */ b("p", {
331
336
  className: "text-sm text-status-error-text flex-1",
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__ */ x(ve, {
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
- children: [/* @__PURE__ */ S("label", {
344
+ children: [/* @__PURE__ */ x("label", {
339
345
  className: "flex items-center gap-2 text-sm text-text-primary",
340
- children: [/* @__PURE__ */ x("input", {
346
+ children: [/* @__PURE__ */ b("input", {
341
347
  type: "checkbox",
342
348
  checked: $,
343
349
  ref: (e) => {
344
- e && (e.indeterminate = Ee && !$);
350
+ e && (e.indeterminate = Ae && !$);
345
351
  },
346
- onChange: (e) => Oe(e.target.checked),
352
+ onChange: (e) => Me(e.target.checked),
347
353
  "aria-label": "Select all channels",
348
354
  className: "size-4 rounded border-border-subtle text-primary"
349
- }), /* @__PURE__ */ x("span", { children: E("channel.selectAllVisible", "Select all visible") })]
350
- }), /* @__PURE__ */ S("div", {
355
+ }), /* @__PURE__ */ b("span", { children: E("channel.selectAllVisible", "Select all visible") })]
356
+ }), /* @__PURE__ */ x("div", {
351
357
  className: "flex flex-wrap items-center gap-2",
352
358
  children: [
353
- /* @__PURE__ */ S("span", {
359
+ /* @__PURE__ */ x("span", {
354
360
  className: "text-sm text-text-secondary",
355
361
  children: [
356
362
  k.size,
@@ -358,47 +364,47 @@ function _e() {
358
364
  E("channel.selectedCountLabel", "selected")
359
365
  ]
360
366
  }),
361
- k.size > 0 && /* @__PURE__ */ x("button", {
367
+ k.size > 0 && /* @__PURE__ */ b("button", {
362
368
  type: "button",
363
369
  onClick: () => A(/* @__PURE__ */ new Set()),
364
370
  className: "text-sm text-text-secondary hover:text-text-primary",
365
371
  children: E("channel.clearSelection", "Clear selection")
366
372
  }),
367
- /* @__PURE__ */ x(s, {
373
+ /* @__PURE__ */ b(s, {
368
374
  permission: c.CHANNEL_EXECUTE,
369
- children: /* @__PURE__ */ S("button", {
375
+ children: /* @__PURE__ */ x("button", {
370
376
  type: "button",
371
- onClick: Me,
377
+ onClick: Ie,
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})` : ""]
375
381
  })
376
382
  }),
377
- /* @__PURE__ */ x(s, {
383
+ /* @__PURE__ */ b(s, {
378
384
  permission: c.CHANNEL_UPDATE,
379
- children: /* @__PURE__ */ S("button", {
385
+ children: /* @__PURE__ */ x("button", {
380
386
  type: "button",
381
- onClick: Ae,
387
+ onClick: Pe,
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})` : ""]
385
391
  })
386
392
  }),
387
- /* @__PURE__ */ x(s, {
393
+ /* @__PURE__ */ b(s, {
388
394
  permission: c.CHANNEL_UPDATE,
389
- children: /* @__PURE__ */ S("button", {
395
+ children: /* @__PURE__ */ x("button", {
390
396
  type: "button",
391
- onClick: je,
397
+ onClick: Fe,
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})` : ""]
395
401
  })
396
402
  }),
397
- /* @__PURE__ */ x(s, {
403
+ /* @__PURE__ */ b(s, {
398
404
  permission: c.CHANNEL_DELETE,
399
- children: /* @__PURE__ */ S("button", {
405
+ children: /* @__PURE__ */ x("button", {
400
406
  type: "button",
401
- onClick: ke,
407
+ onClick: Ne,
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,99 +413,88 @@ function _e() {
407
413
  ]
408
414
  })]
409
415
  }),
410
- z && /* @__PURE__ */ S("div", {
416
+ B && /* @__PURE__ */ x("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__ */ b(p, {
414
420
  size: 20,
415
421
  className: "text-status-error-text"
416
422
  }),
417
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
423
+ /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
418
424
  className: "text-sm font-medium text-status-error-text",
419
425
  children: E("channel.loadFailed", "Failed to load channels")
420
- }), /* @__PURE__ */ x("p", {
426
+ }), /* @__PURE__ */ b("p", {
421
427
  className: "text-xs text-status-error-text",
422
- children: z
428
+ children: B
423
429
  })] }),
424
- /* @__PURE__ */ x("button", {
430
+ /* @__PURE__ */ b("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__ */ b("div", {
433
439
  className: "flex items-center justify-center py-12",
434
- children: /* @__PURE__ */ x(_, {
440
+ children: /* @__PURE__ */ b(_, {
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", {
440
- className: "flex flex-col items-center justify-center py-12 text-center",
441
- children: [
442
- /* @__PURE__ */ x(ue, {
443
- size: 48,
444
- className: "text-text-secondary mb-4"
445
- }),
446
- /* @__PURE__ */ x("h3", {
447
- className: "text-lg font-semibold text-text-primary mb-2",
448
- children: E("channel.noChannelsFound", "No channels found")
449
- }),
450
- /* @__PURE__ */ x("p", {
451
- 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.")
453
- }),
454
- g && !V.search && !V.platform && !V.status && /* @__PURE__ */ S("button", {
455
- type: "button",
456
- onClick: () => m("/channels/create"),
457
- 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")]
459
- })
460
- ]
445
+ !z && !B && R.length === 0 && /* @__PURE__ */ b(ye, {
446
+ illustration: H.search || H.platform || H.status ? "empty-search" : "empty-data",
447
+ title: E("channel.noChannelsFound", "No channels found"),
448
+ description: 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."),
449
+ action: g && !H.search && !H.platform && !H.status ? /* @__PURE__ */ x("button", {
450
+ type: "button",
451
+ onClick: () => m("/channels/create"),
452
+ 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",
453
+ children: [/* @__PURE__ */ b(le, { size: 16 }), E("channel.createChannel", "Create Channel")]
454
+ }) : void 0
461
455
  }),
462
- R.length > 0 && /* @__PURE__ */ x("div", {
456
+ R.length > 0 && /* @__PURE__ */ b("div", {
463
457
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
464
458
  "data-tour": "channels-list-grid",
465
459
  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"}`,
460
+ let t = Le(e.platform), n = Re(e.status), r = ze(e.connectionHealth), i = n.icon, a = r.icon, o = Ce === e.id;
461
+ return /* @__PURE__ */ x(ve, {
462
+ treatment: "insight",
463
+ 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
464
  children: [
470
- /* @__PURE__ */ S("div", {
465
+ /* @__PURE__ */ x("div", {
471
466
  className: "flex items-start justify-between mb-3",
472
- children: [/* @__PURE__ */ S("div", {
467
+ children: [/* @__PURE__ */ x("div", {
473
468
  className: "flex items-center gap-2",
474
469
  children: [
475
- /* @__PURE__ */ x("input", {
470
+ /* @__PURE__ */ b("input", {
476
471
  type: "checkbox",
477
472
  checked: k.has(e.id),
478
- onChange: (t) => De(e.id, t.target.checked),
473
+ onChange: (t) => je(e.id, t.target.checked),
479
474
  "aria-label": `Select channel ${e.name}`,
480
475
  className: "size-4 rounded border-border-subtle text-primary"
481
476
  }),
482
- /* @__PURE__ */ x(ue, {
477
+ /* @__PURE__ */ b(de, {
483
478
  size: 20,
484
479
  className: "text-accent-primary"
485
480
  }),
486
- /* @__PURE__ */ x("span", {
481
+ /* @__PURE__ */ b("span", {
487
482
  className: `px-2 py-0.5 text-xs font-semibold rounded-full ${t.color}`,
488
483
  children: t.label
489
484
  })
490
485
  ]
491
- }), /* @__PURE__ */ S("div", {
486
+ }), /* @__PURE__ */ x("div", {
492
487
  className: "flex items-center gap-1",
493
- children: [/* @__PURE__ */ x(i, {
488
+ children: [/* @__PURE__ */ b(i, {
494
489
  size: 14,
495
490
  className: n.color.split(" ")[0]
496
- }), /* @__PURE__ */ x("span", {
497
- className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color}`,
491
+ }), /* @__PURE__ */ b("span", {
492
+ className: `px-2 py-0.5 text-xs font-medium rounded-full ${n.color} ${e.status === "ACTIVE" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
498
493
  children: n.label
499
494
  })]
500
495
  })]
501
496
  }),
502
- /* @__PURE__ */ S("div", {
497
+ /* @__PURE__ */ x("div", {
503
498
  role: "button",
504
499
  tabIndex: 0,
505
500
  onClick: () => m(`/channels/${e.id}`),
@@ -508,41 +503,41 @@ function _e() {
508
503
  },
509
504
  className: "cursor-pointer",
510
505
  children: [
511
- /* @__PURE__ */ x("h3", {
506
+ /* @__PURE__ */ b("h3", {
512
507
  className: "text-sm font-semibold text-text-primary mb-1 truncate",
513
508
  children: e.name
514
509
  }),
515
- e.description && /* @__PURE__ */ x("p", {
510
+ e.description && /* @__PURE__ */ b("p", {
516
511
  className: "text-xs text-text-secondary mb-2 line-clamp-2",
517
512
  children: e.description
518
513
  }),
519
- e.adapterType && /* @__PURE__ */ x("p", {
514
+ e.adapterType && /* @__PURE__ */ b("p", {
520
515
  className: "text-xs text-text-secondary mb-2 font-mono",
521
516
  children: e.adapterType.replace(/_/g, " ")
522
517
  }),
523
- /* @__PURE__ */ x("div", {
518
+ /* @__PURE__ */ b("div", {
524
519
  className: "flex items-center gap-3 text-xs text-text-secondary mb-2",
525
- children: /* @__PURE__ */ S("span", { children: [
520
+ children: /* @__PURE__ */ x("span", { children: [
526
521
  E("channel.priority", "Priority"),
527
522
  ": ",
528
523
  e.priority
529
524
  ] })
530
525
  }),
531
- /* @__PURE__ */ S("div", {
526
+ /* @__PURE__ */ x("div", {
532
527
  className: "flex items-center gap-3 text-xs",
533
528
  children: [
534
- /* @__PURE__ */ S("div", {
529
+ /* @__PURE__ */ x("div", {
535
530
  className: "flex items-center gap-1",
536
- children: [/* @__PURE__ */ x(a, {
531
+ children: [/* @__PURE__ */ b(a, {
537
532
  size: 12,
538
533
  className: r.color
539
- }), /* @__PURE__ */ x("span", {
534
+ }), /* @__PURE__ */ b("span", {
540
535
  className: r.color,
541
536
  children: r.label
542
537
  })]
543
538
  }),
544
- /* @__PURE__ */ x("span", { children: "•" }),
545
- /* @__PURE__ */ x("span", {
539
+ /* @__PURE__ */ b("span", { children: "•" }),
540
+ /* @__PURE__ */ b("span", {
546
541
  className: e.isConnected ? "text-status-success-text" : "text-text-secondary",
547
542
  children: e.isConnected ? E("channel.connected", "Connected") : E("channel.notConnected", "Not Connected")
548
543
  })
@@ -550,92 +545,92 @@ function _e() {
550
545
  })
551
546
  ]
552
547
  }),
553
- e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ S("div", {
548
+ e.tagAssignments && e.tagAssignments.length > 0 && /* @__PURE__ */ x("div", {
554
549
  className: "flex flex-wrap gap-1 mt-2",
555
550
  "aria-label": "Channel tags",
556
- children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ x(ge, {
551
+ children: [e.tagAssignments.slice(0, 4).map((e) => /* @__PURE__ */ b(be, {
557
552
  id: e.tagId,
558
553
  label: e.tagId,
559
554
  size: "sm"
560
- }, e.id)), e.tagAssignments.length > 4 && /* @__PURE__ */ S("span", {
555
+ }, e.id)), e.tagAssignments.length > 4 && /* @__PURE__ */ x("span", {
561
556
  className: "text-xs text-text-secondary",
562
557
  children: ["+", e.tagAssignments.length - 4]
563
558
  })]
564
559
  }),
565
- /* @__PURE__ */ S("div", {
560
+ /* @__PURE__ */ x("div", {
566
561
  className: "mt-3 pt-3 border-t border-border-subtle flex items-center justify-between opacity-0 group-hover:opacity-100 transition-opacity",
567
- children: [/* @__PURE__ */ S("div", {
562
+ children: [/* @__PURE__ */ x("div", {
568
563
  className: "flex items-center gap-1",
569
564
  children: [
570
- /* @__PURE__ */ x("button", {
565
+ /* @__PURE__ */ b("button", {
571
566
  type: "button",
572
567
  onClick: () => m(`/channels/${e.id}`),
573
568
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
574
569
  title: E("channel.viewDetails", "View Details"),
575
- children: /* @__PURE__ */ x(se, { size: 14 })
570
+ children: /* @__PURE__ */ b(se, { size: 14 })
576
571
  }),
577
- b && /* @__PURE__ */ x("button", {
572
+ y && /* @__PURE__ */ b("button", {
578
573
  type: "button",
579
574
  onClick: () => m(`/channels/${e.id}/edit`),
580
575
  className: "p-1.5 text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors cursor-pointer",
581
576
  title: E("channel.editChannel", "Edit Channel"),
582
- children: /* @__PURE__ */ x(ce, { size: 14 })
577
+ children: /* @__PURE__ */ b(ce, { size: 14 })
583
578
  }),
584
- /* @__PURE__ */ x(s, {
579
+ /* @__PURE__ */ b(s, {
585
580
  permission: c.CHANNEL_EXECUTE,
586
- children: /* @__PURE__ */ x("button", {
581
+ children: /* @__PURE__ */ b("button", {
587
582
  type: "button",
588
- onClick: () => Te(e.id),
583
+ onClick: () => ke(e.id),
589
584
  disabled: o,
590
585
  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
586
  title: E("channel.runHealthCheck", "Run Health Check"),
592
- children: o ? /* @__PURE__ */ x(_, {
587
+ children: o ? /* @__PURE__ */ b(_, {
593
588
  size: 14,
594
589
  className: "animate-spin"
595
- }) : /* @__PURE__ */ x(de, { size: 14 })
590
+ }) : /* @__PURE__ */ b(fe, { size: 14 })
596
591
  })
597
592
  }),
598
- /* @__PURE__ */ x(s, {
593
+ /* @__PURE__ */ b(s, {
599
594
  permission: c.CHANNEL_UPDATE,
600
- children: /* @__PURE__ */ x("button", {
595
+ children: /* @__PURE__ */ b("button", {
601
596
  type: "button",
602
- onClick: () => we(e),
597
+ onClick: () => Oe(e),
603
598
  disabled: o,
604
599
  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
600
  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 })
601
+ children: e.status === "ACTIVE" ? /* @__PURE__ */ b(v, { size: 14 }) : /* @__PURE__ */ b(ue, { size: 14 })
607
602
  })
608
603
  })
609
604
  ]
610
- }), ve === e.id ? /* @__PURE__ */ S("div", {
605
+ }), Se === e.id ? /* @__PURE__ */ x("div", {
611
606
  className: "flex items-center gap-2",
612
607
  children: [
613
- /* @__PURE__ */ x("span", {
608
+ /* @__PURE__ */ b("span", {
614
609
  className: "text-xs text-text-secondary",
615
610
  children: E("channel.deleteQuestion", "Delete?")
616
611
  }),
617
- /* @__PURE__ */ x("button", {
612
+ /* @__PURE__ */ b("button", {
618
613
  type: "button",
619
- onClick: () => Ce(e.id),
614
+ onClick: () => De(e.id),
620
615
  disabled: o,
621
616
  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
617
  children: o ? "..." : E("channel.yes", "Yes")
623
618
  }),
624
- /* @__PURE__ */ x("button", {
619
+ /* @__PURE__ */ b("button", {
625
620
  type: "button",
626
621
  onClick: () => D(null),
627
622
  className: "px-2 py-1 text-xs text-text-secondary hover:bg-bg-sunken rounded transition-colors cursor-pointer",
628
623
  children: E("channel.no", "No")
629
624
  })
630
625
  ]
631
- }) : /* @__PURE__ */ x(s, {
626
+ }) : /* @__PURE__ */ b(s, {
632
627
  permission: c.CHANNEL_DELETE,
633
- children: /* @__PURE__ */ x("button", {
628
+ children: /* @__PURE__ */ b("button", {
634
629
  type: "button",
635
630
  onClick: () => D(e.id),
636
631
  className: "p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors cursor-pointer",
637
632
  title: E("channel.deleteChannel", "Delete Channel"),
638
- children: /* @__PURE__ */ x(pe, { size: 14 })
633
+ children: /* @__PURE__ */ b(me, { size: 14 })
639
634
  })
640
635
  })]
641
636
  })
@@ -643,53 +638,53 @@ function _e() {
643
638
  }, e.id);
644
639
  })
645
640
  }),
646
- B > F && /* @__PURE__ */ S("div", {
641
+ V > F && /* @__PURE__ */ x("div", {
647
642
  className: "flex items-center justify-between px-1 py-2",
648
- children: [/* @__PURE__ */ S("p", {
643
+ children: [/* @__PURE__ */ x("p", {
649
644
  className: "text-sm text-text-secondary",
650
645
  children: [
651
646
  E("channel.showing", "Showing"),
652
647
  " ",
653
- /* @__PURE__ */ S("span", {
648
+ /* @__PURE__ */ x("span", {
654
649
  className: "font-medium text-text-primary",
655
650
  children: [
656
651
  I * F + 1,
657
652
  "–",
658
- Math.min((I + 1) * F, B)
653
+ Math.min((I + 1) * F, V)
659
654
  ]
660
655
  }),
661
656
  " ",
662
657
  E("channel.of", "of"),
663
658
  " ",
664
- /* @__PURE__ */ x("span", {
659
+ /* @__PURE__ */ b("span", {
665
660
  className: "font-medium text-text-primary",
666
- children: B
661
+ children: V
667
662
  }),
668
663
  " ",
669
664
  E("channel.channelsLower", "channels")
670
665
  ]
671
- }), /* @__PURE__ */ S("div", {
666
+ }), /* @__PURE__ */ x("div", {
672
667
  className: "flex items-center gap-2",
673
668
  children: [
674
- /* @__PURE__ */ x("button", {
669
+ /* @__PURE__ */ b("button", {
675
670
  type: "button",
676
671
  onClick: () => L((e) => Math.max(0, e - 1)),
677
672
  disabled: I === 0,
678
673
  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",
679
674
  children: E("channel.previous", "Previous")
680
675
  }),
681
- /* @__PURE__ */ S("span", {
676
+ /* @__PURE__ */ x("span", {
682
677
  className: "text-sm text-text-secondary",
683
678
  children: [
684
679
  I + 1,
685
680
  " / ",
686
- J
681
+ Y
687
682
  ]
688
683
  }),
689
- /* @__PURE__ */ x("button", {
684
+ /* @__PURE__ */ b("button", {
690
685
  type: "button",
691
- onClick: () => L((e) => Math.min(J - 1, e + 1)),
692
- disabled: I >= J - 1,
686
+ onClick: () => L((e) => Math.min(Y - 1, e + 1)),
687
+ disabled: I >= Y - 1,
693
688
  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
689
  children: E("channel.next", "Next")
695
690
  })
@@ -701,6 +696,6 @@ function _e() {
701
696
  });
702
697
  }
703
698
  //#endregion
704
- export { _e as ChannelsListPage };
699
+ export { T as ChannelsListPage };
705
700
 
706
701
  //# sourceMappingURL=ChannelsListPage.js.map