@burdenoff/microfe-channel 2026.527.1 → 2026.530.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 (25) hide show
  1. package/dist/channel/ChannelRoutes.js +5 -5
  2. package/dist/channel/ChannelRoutes.js.map +1 -1
  3. package/dist/channel/constants/permissions.js +3 -0
  4. package/dist/channel/constants/permissions.js.map +1 -1
  5. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +227 -221
  6. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  7. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +392 -391
  8. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  9. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +1 -1
  10. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  11. package/dist/channel/modules/channels/pages/ChannelsListPage.js +216 -212
  12. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  13. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +99 -98
  14. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  15. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +129 -126
  16. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  17. package/dist/channel/modules/channels/pages/CreateChannelPage.js +40 -50
  18. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  19. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +1 -1
  20. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  21. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +1 -1
  22. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  23. package/dist/channel/pages/ChannelLandingPage.js +50 -34
  24. package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
  25. package/package.json +2 -2
@@ -8,11 +8,12 @@ import { CHANNEL_PERMISSIONS as c } from "../../../constants/permissions.js";
8
8
  import { HEALTH_I18N as ee, PLATFORM_I18N as te, STATUS_I18N as ne, translateLabel as l } from "../i18n.js";
9
9
  import { useCallback as u, useEffect as d, useMemo as re, useRef as ie, useState as f } from "react";
10
10
  import { useI18n as ae } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { Activity as p, AlertCircle as m, AlertTriangle as h, Cable as g, CheckCircle2 as _, Eye as oe, HelpCircle as v, LayoutDashboard as se, Loader2 as y, MessageSquare as b, Plus as x, Power as ce, PowerOff as S, Radio as C, RefreshCw as w, Search as le, ShieldCheck as ue, Trash2 as de, XCircle as T } from "lucide-react";
12
- import { useNavigate as fe } from "react-router-dom";
13
- import { jsx as E, jsxs as D } from "react/jsx-runtime";
11
+ import { Activity as oe, AlertCircle as p, AlertTriangle as m, Cable as h, CheckCircle2 as g, Eye as se, HelpCircle as _, LayoutDashboard as ce, Loader2 as v, MessageSquare as le, Plus as y, Power as ue, PowerOff as b, Radio as x, RefreshCw as S, Search as de, ShieldCheck as fe, Trash2 as pe, XCircle as C } 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 w, jsxs as T } from "react/jsx-runtime";
14
15
  //#region src/channel/modules/channels/pages/ChannelDashboardPage.tsx
15
- var O = {
16
+ var E = {
16
17
  EMAIL: {
17
18
  label: "Email",
18
19
  color: "bg-accent-blue-subtle text-accent-blue"
@@ -53,60 +54,60 @@ var O = {
53
54
  label: "Webchat",
54
55
  color: "bg-accent-teal-subtle text-accent-teal"
55
56
  }
56
- }, k = {
57
+ }, D = {
57
58
  ACTIVE: {
58
59
  label: "Active",
59
60
  dotColor: "bg-status-success-bg",
60
61
  textColor: "text-status-success-text",
61
- icon: _
62
+ icon: g
62
63
  },
63
64
  INACTIVE: {
64
65
  label: "Inactive",
65
66
  dotColor: "bg-text-tertiary",
66
67
  textColor: "text-muted-foreground",
67
- icon: S
68
+ icon: b
68
69
  },
69
70
  ERROR: {
70
71
  label: "Error",
71
72
  dotColor: "bg-status-error-bg-subtle",
72
73
  textColor: "text-status-error-text",
73
- icon: T
74
+ icon: C
74
75
  },
75
76
  SUSPENDED: {
76
77
  label: "Suspended",
77
78
  dotColor: "bg-status-warning-bg",
78
79
  textColor: "text-status-warning-text",
79
- icon: h
80
+ icon: m
80
81
  },
81
82
  ARCHIVED: {
82
83
  label: "Archived",
83
84
  dotColor: "bg-text-tertiary",
84
85
  textColor: "text-muted-foreground",
85
- icon: S
86
+ icon: b
86
87
  }
87
- }, A = {
88
+ }, O = {
88
89
  HEALTHY: {
89
90
  label: "Healthy",
90
91
  color: "text-status-success-text",
91
- icon: _
92
+ icon: g
92
93
  },
93
94
  DEGRADED: {
94
95
  label: "Degraded",
95
96
  color: "text-status-warning-text",
96
- icon: h
97
+ icon: m
97
98
  },
98
99
  UNHEALTHY: {
99
100
  label: "Unhealthy",
100
101
  color: "text-status-error-text",
101
- icon: T
102
+ icon: C
102
103
  },
103
104
  UNKNOWN: {
104
105
  label: "Unknown",
105
106
  color: "text-muted-foreground",
106
- icon: v
107
+ icon: _
107
108
  }
108
109
  };
109
- function pe(e) {
110
+ function ge(e) {
110
111
  let t = Date.now() - new Date(e).getTime();
111
112
  if (Number.isNaN(t) || t < 0) return "just now";
112
113
  let n = Math.floor(t / 1e3);
@@ -118,46 +119,46 @@ function pe(e) {
118
119
  let a = Math.floor(i / 24);
119
120
  return a < 7 ? `${a}d ago` : a < 30 ? `${Math.floor(a / 7)}w ago` : `${Math.floor(a / 30)}mo ago`;
120
121
  }
121
- function j({ icon: e, iconClass: t, value: n, label: r, sub: i }) {
122
- return /* @__PURE__ */ D("div", {
122
+ function k({ icon: e, iconClass: t, value: n, label: r, sub: i }) {
123
+ return /* @__PURE__ */ T("div", {
123
124
  className: "p-4 bg-surface border border-border rounded-lg",
124
- children: [/* @__PURE__ */ D("div", {
125
+ children: [/* @__PURE__ */ T("div", {
125
126
  className: "flex items-center gap-3",
126
- children: [/* @__PURE__ */ E("div", {
127
+ children: [/* @__PURE__ */ w("div", {
127
128
  className: "p-2 rounded-lg hover:bg-action-primary-bg/10",
128
- children: /* @__PURE__ */ E(e, {
129
+ children: /* @__PURE__ */ w(e, {
129
130
  size: 18,
130
131
  className: t
131
132
  })
132
- }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
133
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
133
134
  className: "text-2xl font-bold text-foreground leading-tight",
134
135
  children: n
135
- }), /* @__PURE__ */ E("p", {
136
+ }), /* @__PURE__ */ w("p", {
136
137
  className: "text-xs text-muted-foreground",
137
138
  children: r
138
139
  })] })]
139
- }), i && /* @__PURE__ */ E("p", {
140
+ }), i && /* @__PURE__ */ w("p", {
140
141
  className: "text-[11px] text-muted-foreground mt-2 pl-11",
141
142
  children: i
142
143
  })]
143
144
  });
144
145
  }
145
- function M() {
146
- let h = fe(), { t: _ } = ae(), v = (e, t) => {
147
- let n = _(e);
146
+ function A() {
147
+ let m = me(), { hasPermission: g } = he(), _ = g(c.CHANNEL_CREATE), { t: C } = ae(), A = (e, t) => {
148
+ let n = C(e);
148
149
  return n === e ? t : n;
149
- }, [T, M] = f(null), [me, N] = f(null), [P, F] = f(0), I = (e) => ({
150
- ...O[e] ?? {
150
+ }, [j, M] = f(null), [_e, N] = f(null), [P, F] = f(0), I = (e) => ({
151
+ ...E[e] ?? {
151
152
  label: e,
152
153
  color: "bg-bg-sunken text-text-tertiary"
153
154
  },
154
- label: l(e, te, v)
155
+ label: l(e, te, A)
155
156
  }), L = (e) => ({
156
- ...k[e] ?? k.INACTIVE,
157
- label: l(e, ne, v)
157
+ ...D[e] ?? D.INACTIVE,
158
+ label: l(e, ne, A)
158
159
  }), R = (e) => ({
159
- ...A[e] ?? A.UNKNOWN,
160
- label: l(e, ee, v)
160
+ ...O[e] ?? O.UNKNOWN,
161
+ label: l(e, ee, A)
161
162
  }), { channels: z, isLoading: B, error: V, total: H, filter: U, updateFilter: W, deleteChannel: G, activateChannel: K, deactivateChannel: q, runHealthCheck: J, refetch: Y } = o(), X = Math.max(1, Math.ceil(H / 10)), Z = ie(Y);
162
163
  d(() => {
163
164
  Z.current = Y;
@@ -206,7 +207,7 @@ function M() {
206
207
  errored: i,
207
208
  unhealthy: a
208
209
  };
209
- }, [z]), he = u(async (e) => {
210
+ }, [z]), ve = u(async (e) => {
210
211
  t("medium"), N(e);
211
212
  try {
212
213
  await G(e), n("success"), M(null);
@@ -215,14 +216,14 @@ function M() {
215
216
  } finally {
216
217
  N(null);
217
218
  }
218
- }, [G]), ge = u(async (e) => {
219
+ }, [G]), ye = u(async (e) => {
219
220
  N(e.id);
220
221
  try {
221
222
  e.status === "ACTIVE" ? await q(e.id) : await K(e.id);
222
223
  } finally {
223
224
  N(null);
224
225
  }
225
- }, [K, q]), _e = u(async (e) => {
226
+ }, [K, q]), be = u(async (e) => {
226
227
  N(e);
227
228
  try {
228
229
  await J(e);
@@ -230,376 +231,380 @@ function M() {
230
231
  N(null);
231
232
  }
232
233
  }, [J]);
233
- return /* @__PURE__ */ E(s, {
234
+ return /* @__PURE__ */ w(s, {
234
235
  permission: c.CHANNEL_READ,
235
- children: /* @__PURE__ */ D("div", {
236
+ children: /* @__PURE__ */ T("div", {
236
237
  className: "space-y-5 p-3 sm:p-6",
237
238
  children: [
238
- /* @__PURE__ */ D("div", {
239
+ /* @__PURE__ */ T("div", {
239
240
  className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
240
- children: [/* @__PURE__ */ D("div", {
241
+ children: [/* @__PURE__ */ T("div", {
241
242
  className: "flex items-center gap-3",
242
- children: [/* @__PURE__ */ E("div", {
243
+ children: [/* @__PURE__ */ w("div", {
243
244
  className: "p-2 rounded-lg bg-accent-primary/10",
244
- children: /* @__PURE__ */ E(se, {
245
+ children: /* @__PURE__ */ w(ce, {
245
246
  size: 20,
246
247
  className: "text-accent-primary"
247
248
  })
248
- }), /* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("h1", {
249
+ }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
249
250
  className: "text-xl font-bold text-foreground",
250
- children: v("channel.channelDashboard", "Channel Dashboard")
251
- }), /* @__PURE__ */ E("p", {
251
+ children: A("channel.channelDashboard", "Channel Dashboard")
252
+ }), /* @__PURE__ */ w("p", {
252
253
  className: "text-sm text-muted-foreground",
253
- children: v("channel.dashboardSubtitle", "Manage and monitor your communication channels")
254
+ children: A("channel.dashboardSubtitle", "Manage and monitor your communication channels")
254
255
  })] })]
255
- }), /* @__PURE__ */ D("div", {
256
+ }), /* @__PURE__ */ T("div", {
256
257
  className: "flex items-center gap-2",
257
- children: [/* @__PURE__ */ D("button", {
258
+ children: [/* @__PURE__ */ T("button", {
258
259
  type: "button",
259
260
  onClick: () => Y(),
260
261
  className: "inline-flex items-center gap-1.5 px-3 py-2 text-sm text-muted-foreground hover:text-foreground border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors",
261
- children: [/* @__PURE__ */ E(w, { size: 14 }), v("channel.refresh", "Refresh")]
262
- }), /* @__PURE__ */ D("button", {
262
+ children: [/* @__PURE__ */ w(S, { size: 14 }), A("channel.refresh", "Refresh")]
263
+ }), _ && /* @__PURE__ */ T("button", {
263
264
  type: "button",
264
- onClick: () => h("/channels/create"),
265
+ onClick: () => m("/channels/create"),
265
266
  className: "inline-flex items-center gap-1.5 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",
266
- children: [/* @__PURE__ */ E(x, { size: 14 }), v("channel.createChannel", "Create Channel")]
267
+ "data-tour": "channels-dashboard-create-button",
268
+ children: [/* @__PURE__ */ w(y, { size: 14 }), A("channel.createChannel", "Create Channel")]
267
269
  })]
268
270
  })]
269
271
  }),
270
- /* @__PURE__ */ D("div", {
272
+ /* @__PURE__ */ T("div", {
273
+ "data-tour": "channels-dashboard-kpi-section",
271
274
  className: "grid gap-3 grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
272
275
  children: [
273
- /* @__PURE__ */ E(j, {
274
- icon: C,
276
+ /* @__PURE__ */ w(k, {
277
+ icon: x,
275
278
  iconClass: "text-accent-primary",
276
279
  value: H,
277
- label: v("channel.totalChannels", "Total Channels"),
278
- sub: $.active > 0 ? `${$.active} ${v("channel.status.active", "Active").toLowerCase()}, ${H - $.active} ${v("channel.status.inactive", "Inactive").toLowerCase()}` : void 0
280
+ label: A("channel.totalChannels", "Total Channels"),
281
+ sub: $.active > 0 ? `${$.active} ${A("channel.status.active", "Active").toLowerCase()}, ${H - $.active} ${A("channel.status.inactive", "Inactive").toLowerCase()}` : void 0
279
282
  }),
280
- /* @__PURE__ */ E(j, {
281
- icon: ue,
283
+ /* @__PURE__ */ w(k, {
284
+ icon: fe,
282
285
  iconClass: "text-status-success-text",
283
286
  value: $.healthy,
284
- label: v("channel.healthy", "Healthy"),
285
- sub: $.unhealthy > 0 ? `${$.unhealthy} ${v("channel.health.unhealthy", "Unhealthy").toLowerCase()}` : H > 0 ? v("channel.allSystemsNominal", "All systems nominal") : void 0
287
+ label: A("channel.healthy", "Healthy"),
288
+ sub: $.unhealthy > 0 ? `${$.unhealthy} ${A("channel.health.unhealthy", "Unhealthy").toLowerCase()}` : H > 0 ? $.healthy === H ? A("channel.allSystemsNominal", "All systems nominal") : `${H - $.healthy} ${A("channel.health.unchecked", "unchecked")}` : void 0
286
289
  }),
287
- /* @__PURE__ */ E(j, {
288
- icon: g,
290
+ /* @__PURE__ */ w(k, {
291
+ icon: h,
289
292
  iconClass: "text-accent-blue",
290
293
  value: $.connected,
291
- label: v("channel.connected", "Connected"),
292
- sub: H > 0 ? `${H - $.connected} ${v("channel.disconnected", "Disconnected").toLowerCase()}` : void 0
294
+ label: A("channel.connected", "Connected"),
295
+ sub: H > 0 ? `${H - $.connected} ${A("channel.disconnected", "Disconnected").toLowerCase()}` : void 0
293
296
  }),
294
- /* @__PURE__ */ E(j, {
295
- icon: b,
297
+ /* @__PURE__ */ w(k, {
298
+ icon: le,
296
299
  iconClass: "text-accent-violet",
297
300
  value: $.messages24h.toLocaleString(),
298
- label: v("channel.messages24h", "Messages (24h)")
301
+ label: A("channel.messages24h", "Messages (24h)")
299
302
  })
300
303
  ]
301
304
  }),
302
- $.errored > 0 && /* @__PURE__ */ D("div", {
305
+ $.errored > 0 && /* @__PURE__ */ T("div", {
303
306
  className: "flex items-center gap-3 p-3 border border-status-error-border/30 bg-status-error-bg-subtle rounded-lg",
304
307
  children: [
305
- /* @__PURE__ */ E(m, {
308
+ /* @__PURE__ */ w(p, {
306
309
  size: 16,
307
310
  className: "text-status-error-text shrink-0"
308
311
  }),
309
- /* @__PURE__ */ D("p", {
312
+ /* @__PURE__ */ T("p", {
310
313
  className: "text-sm text-status-error-text",
311
314
  children: [
312
- /* @__PURE__ */ E("span", {
315
+ /* @__PURE__ */ w("span", {
313
316
  className: "font-semibold",
314
317
  children: $.errored
315
318
  }),
316
319
  " ",
317
- v($.errored === 1 ? "channel.errorStateSummarySingle" : "channel.errorStateSummaryMultiple", $.errored === 1 ? "channel in error state" : "channels in error state")
320
+ A($.errored === 1 ? "channel.errorStateSummarySingle" : "channel.errorStateSummaryMultiple", $.errored === 1 ? "channel in error state" : "channels in error state")
318
321
  ]
319
322
  }),
320
- /* @__PURE__ */ E("button", {
323
+ /* @__PURE__ */ w("button", {
321
324
  type: "button",
322
325
  onClick: () => W({ status: "ERROR" }),
323
326
  className: "ml-auto text-xs font-medium text-status-error-text hover:text-status-error-text/80 transition-colors",
324
- children: v("channel.showErrors", "Show errors")
327
+ children: A("channel.showErrors", "Show errors")
325
328
  })
326
329
  ]
327
330
  }),
328
- /* @__PURE__ */ D("div", {
331
+ /* @__PURE__ */ T("div", {
329
332
  className: "flex flex-col gap-3 sm:flex-row sm:items-center",
333
+ "data-tour": "channels-dashboard-search-filters",
330
334
  children: [
331
- /* @__PURE__ */ D("div", {
335
+ /* @__PURE__ */ T("div", {
332
336
  className: "relative flex-1",
333
- children: [/* @__PURE__ */ E(le, {
337
+ children: [/* @__PURE__ */ w(de, {
334
338
  size: 14,
335
339
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
336
- }), /* @__PURE__ */ E("input", {
340
+ }), /* @__PURE__ */ w("input", {
337
341
  type: "text",
338
- "aria-label": v("channel.searchChannels", "Search channels..."),
339
- placeholder: v("channel.searchChannels", "Search channels..."),
342
+ "aria-label": A("channel.searchChannels", "Search channels..."),
343
+ placeholder: A("channel.searchChannels", "Search channels..."),
340
344
  value: U.search || "",
341
345
  onChange: (e) => W({ search: e.target.value }),
342
346
  className: "w-full pl-9 pr-4 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 placeholder:text-muted-foreground"
343
347
  })]
344
348
  }),
345
- /* @__PURE__ */ D("select", {
349
+ /* @__PURE__ */ T("select", {
346
350
  value: U.platform || "",
347
351
  onChange: (e) => W({ platform: e.target.value || void 0 }),
348
352
  className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 text-foreground",
349
- children: [/* @__PURE__ */ E("option", {
353
+ children: [/* @__PURE__ */ w("option", {
350
354
  value: "",
351
- children: v("channel.allPlatforms", "All Platforms")
352
- }), Object.entries(O).map(([e, t]) => /* @__PURE__ */ E("option", {
355
+ children: A("channel.allPlatforms", "All Platforms")
356
+ }), Object.entries(E).map(([e, t]) => /* @__PURE__ */ w("option", {
353
357
  value: e,
354
358
  children: t.label
355
359
  }, e))]
356
360
  }),
357
- /* @__PURE__ */ D("select", {
361
+ /* @__PURE__ */ T("select", {
358
362
  value: U.status || "",
359
363
  onChange: (e) => W({ status: e.target.value || void 0 }),
360
364
  className: "px-3 py-2 text-sm bg-surface border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500/50 text-foreground",
361
- children: [/* @__PURE__ */ E("option", {
365
+ children: [/* @__PURE__ */ w("option", {
362
366
  value: "",
363
- children: v("channel.allStatus", "All Status")
364
- }), Object.entries(k).map(([e, t]) => /* @__PURE__ */ E("option", {
367
+ children: A("channel.allStatus", "All Status")
368
+ }), Object.entries(D).map(([e, t]) => /* @__PURE__ */ w("option", {
365
369
  value: e,
366
370
  children: t.label
367
371
  }, e))]
368
372
  })
369
373
  ]
370
374
  }),
371
- V && /* @__PURE__ */ D("div", {
375
+ V && /* @__PURE__ */ T("div", {
372
376
  className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border/30 rounded-lg",
373
377
  children: [
374
- /* @__PURE__ */ E(m, {
378
+ /* @__PURE__ */ w(p, {
375
379
  size: 18,
376
380
  className: "text-status-error-text shrink-0"
377
381
  }),
378
- /* @__PURE__ */ D("div", {
382
+ /* @__PURE__ */ T("div", {
379
383
  className: "flex-1 min-w-0",
380
- children: [/* @__PURE__ */ E("p", {
384
+ children: [/* @__PURE__ */ w("p", {
381
385
  className: "text-sm font-medium text-status-error-text",
382
- children: v("channel.loadFailed", "Failed to load channels")
383
- }), /* @__PURE__ */ E("p", {
386
+ children: A("channel.loadFailed", "Failed to load channels")
387
+ }), /* @__PURE__ */ w("p", {
384
388
  className: "text-xs text-status-error-text/70 truncate",
385
389
  children: V
386
390
  })]
387
391
  }),
388
- /* @__PURE__ */ E("button", {
392
+ /* @__PURE__ */ w("button", {
389
393
  type: "button",
390
394
  onClick: () => Y(),
391
395
  className: "shrink-0 px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
392
- children: v("channel.retry", "Retry")
396
+ children: A("channel.retry", "Retry")
393
397
  })
394
398
  ]
395
399
  }),
396
- B && z.length === 0 && /* @__PURE__ */ E("div", {
400
+ B && z.length === 0 && /* @__PURE__ */ w("div", {
397
401
  className: "flex items-center justify-center py-16",
398
- children: /* @__PURE__ */ E(y, {
402
+ children: /* @__PURE__ */ w(v, {
399
403
  size: 28,
400
404
  className: "animate-spin text-accent-primary"
401
405
  })
402
406
  }),
403
- !B && !V && z.length === 0 && /* @__PURE__ */ D("div", {
407
+ !B && !V && z.length === 0 && /* @__PURE__ */ T("div", {
404
408
  className: "flex flex-col items-center justify-center py-16 text-center",
405
409
  children: [
406
- /* @__PURE__ */ E("div", {
410
+ /* @__PURE__ */ w("div", {
407
411
  className: "p-3 rounded-full bg-accent-primary/10 mb-4",
408
- children: /* @__PURE__ */ E(C, {
412
+ children: /* @__PURE__ */ w(x, {
409
413
  size: 36,
410
414
  className: "text-accent-primary"
411
415
  })
412
416
  }),
413
- /* @__PURE__ */ E("h3", {
417
+ /* @__PURE__ */ w("h3", {
414
418
  className: "text-lg font-semibold text-foreground mb-1",
415
- children: U.search || U.platform || U.status ? v("channel.noChannelsMatchFilter", "No channels match your filters") : v("channel.noChannels", "No channels yet")
419
+ children: U.search || U.platform || U.status ? A("channel.noChannelsMatchFilter", "No channels match your filters") : A("channel.noChannels", "No channels yet")
416
420
  }),
417
- /* @__PURE__ */ E("p", {
421
+ /* @__PURE__ */ w("p", {
418
422
  className: "text-sm text-muted-foreground max-w-sm mb-5",
419
- children: U.search || U.platform || U.status ? v("channel.adjustFilters", "Try adjusting your search or filters.") : v("channel.createFirstChannel", "Create your first communication channel to start sending messages across Email, SMS, Push, Slack and more.")
423
+ children: U.search || U.platform || U.status ? A("channel.adjustFilters", "Try adjusting your search or filters.") : A("channel.createFirstChannel", "Create your first communication channel to start sending messages across Email, SMS, Push, Slack and more.")
420
424
  }),
421
- !(U.search || U.platform || U.status) && /* @__PURE__ */ D("button", {
425
+ _ && !(U.search || U.platform || U.status) && /* @__PURE__ */ T("button", {
422
426
  type: "button",
423
- onClick: () => h("/channels/create"),
427
+ onClick: () => m("/channels/create"),
424
428
  className: "inline-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",
425
- children: [/* @__PURE__ */ E(x, { size: 14 }), v("channel.createChannel", "Create Channel")]
429
+ children: [/* @__PURE__ */ w(y, { size: 14 }), A("channel.createChannel", "Create Channel")]
426
430
  })
427
431
  ]
428
432
  }),
429
- z.length > 0 && /* @__PURE__ */ D("div", {
433
+ z.length > 0 && /* @__PURE__ */ T("div", {
430
434
  className: "border border-border rounded-lg overflow-hidden",
431
- children: [/* @__PURE__ */ E("div", {
435
+ "data-tour": "channels-dashboard-table",
436
+ children: [/* @__PURE__ */ w("div", {
432
437
  className: "overflow-x-auto min-w-full",
433
- children: /* @__PURE__ */ D("table", {
438
+ children: /* @__PURE__ */ T("table", {
434
439
  className: "w-full text-sm min-w-[800px]",
435
- children: [/* @__PURE__ */ E("thead", { children: /* @__PURE__ */ D("tr", {
440
+ children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
436
441
  className: "hover:bg-action-primary-bg/10/50 border-b border-border",
437
442
  children: [
438
- /* @__PURE__ */ E("th", {
443
+ /* @__PURE__ */ w("th", {
439
444
  className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
440
- children: v("channel.channel", "Channel")
445
+ children: A("channel.channel", "Channel")
441
446
  }),
442
- /* @__PURE__ */ E("th", {
447
+ /* @__PURE__ */ w("th", {
443
448
  className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
444
- children: v("channel.platform", "Platform")
449
+ children: A("channel.platform", "Platform")
445
450
  }),
446
- /* @__PURE__ */ E("th", {
451
+ /* @__PURE__ */ w("th", {
447
452
  className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
448
- children: v("channel.status", "Status")
453
+ children: A("channel.status", "Status")
449
454
  }),
450
- /* @__PURE__ */ E("th", {
455
+ /* @__PURE__ */ w("th", {
451
456
  className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
452
- children: v("channel.health", "Health")
457
+ children: A("channel.health", "Health")
453
458
  }),
454
- /* @__PURE__ */ E("th", {
459
+ /* @__PURE__ */ w("th", {
455
460
  className: "text-left px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
456
- children: v("channel.connection", "Connection")
461
+ children: A("channel.connection", "Connection")
457
462
  }),
458
- /* @__PURE__ */ E("th", {
463
+ /* @__PURE__ */ w("th", {
459
464
  className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
460
- children: v("channel.msgs24h", "Msgs 24h")
465
+ children: A("channel.msgs24h", "Msgs 24h")
461
466
  }),
462
- /* @__PURE__ */ E("th", {
467
+ /* @__PURE__ */ w("th", {
463
468
  className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
464
- children: v("channel.updated", "Updated")
469
+ children: A("channel.updated", "Updated")
465
470
  }),
466
- /* @__PURE__ */ E("th", {
471
+ /* @__PURE__ */ w("th", {
467
472
  className: "text-right px-4 py-3 text-xs font-medium text-muted-foreground uppercase tracking-wider",
468
- children: v("channel.actions", "Actions")
473
+ children: A("channel.actions", "Actions")
469
474
  })
470
475
  ]
471
- }) }), /* @__PURE__ */ E("tbody", {
476
+ }) }), /* @__PURE__ */ w("tbody", {
472
477
  className: "divide-y divide-border",
473
478
  children: z.map((e) => {
474
- let t = me === e.id;
475
- return /* @__PURE__ */ D("tr", {
479
+ let t = _e === e.id;
480
+ return /* @__PURE__ */ T("tr", {
476
481
  className: "bg-surface hover:hover:bg-action-primary-bg/10/60 transition-colors group",
477
482
  children: [
478
- /* @__PURE__ */ E("td", {
483
+ /* @__PURE__ */ w("td", {
479
484
  className: "px-4 py-3",
480
- children: /* @__PURE__ */ D("button", {
485
+ children: /* @__PURE__ */ T("button", {
481
486
  type: "button",
482
- onClick: () => h(`/channels/${e.id}`),
487
+ onClick: () => m(`/channels/${e.id}`),
483
488
  className: "text-left group/name",
484
- children: [/* @__PURE__ */ E("p", {
489
+ children: [/* @__PURE__ */ w("p", {
485
490
  className: "font-medium text-foreground group-hover/name:text-accent-primary transition-colors truncate max-w-[200px]",
486
491
  children: e.name
487
- }), e.description && /* @__PURE__ */ E("p", {
492
+ }), e.description && /* @__PURE__ */ w("p", {
488
493
  className: "text-xs text-muted-foreground truncate max-w-[200px]",
489
494
  children: e.description
490
495
  })]
491
496
  })
492
497
  }),
493
- /* @__PURE__ */ D("td", {
498
+ /* @__PURE__ */ T("td", {
494
499
  className: "px-4 py-3",
495
- children: [/* @__PURE__ */ E("span", {
500
+ children: [/* @__PURE__ */ w("span", {
496
501
  className: `inline-flex items-center px-2 py-0.5 text-[11px] font-semibold rounded-full ${I(e.platform).color}`,
497
502
  children: I(e.platform).label
498
- }), e.adapterType && /* @__PURE__ */ E("p", {
503
+ }), e.adapterType && /* @__PURE__ */ w("p", {
499
504
  className: "text-[10px] text-muted-foreground mt-0.5 font-mono",
500
505
  children: e.adapterType.replace(/_/g, " ")
501
506
  })]
502
507
  }),
503
- /* @__PURE__ */ E("td", {
508
+ /* @__PURE__ */ w("td", {
504
509
  className: "px-4 py-3",
505
- children: /* @__PURE__ */ D("span", {
510
+ children: /* @__PURE__ */ T("span", {
506
511
  className: "inline-flex items-center gap-1.5",
507
- children: [/* @__PURE__ */ E("span", { className: `w-1.5 h-1.5 rounded-full ${L(e.status).dotColor}` }), /* @__PURE__ */ E("span", {
512
+ children: [/* @__PURE__ */ w("span", { className: `w-1.5 h-1.5 rounded-full ${L(e.status).dotColor}` }), /* @__PURE__ */ w("span", {
508
513
  className: `text-xs ${L(e.status).textColor}`,
509
514
  children: L(e.status).label
510
515
  })]
511
516
  })
512
517
  }),
513
- /* @__PURE__ */ E("td", {
518
+ /* @__PURE__ */ w("td", {
514
519
  className: "px-4 py-3",
515
- children: /* @__PURE__ */ D("span", {
520
+ children: /* @__PURE__ */ T("span", {
516
521
  className: `inline-flex items-center gap-1 text-xs ${R(e.connectionHealth).color}`,
517
522
  children: [(() => {
518
523
  let t = R(e.connectionHealth).icon;
519
- return /* @__PURE__ */ E(t, { size: 12 });
524
+ return /* @__PURE__ */ w(t, { size: 12 });
520
525
  })(), R(e.connectionHealth).label]
521
526
  })
522
527
  }),
523
- /* @__PURE__ */ E("td", {
528
+ /* @__PURE__ */ w("td", {
524
529
  className: "px-4 py-3",
525
- children: /* @__PURE__ */ E("span", {
530
+ children: /* @__PURE__ */ w("span", {
526
531
  className: `text-xs ${e.isConnected ? "text-status-success-text" : "text-muted-foreground"}`,
527
- children: e.isConnected ? v("channel.connected", "Connected") : v("channel.disconnected", "Disconnected")
532
+ children: e.isConnected ? A("channel.connected", "Connected") : A("channel.disconnected", "Disconnected")
528
533
  })
529
534
  }),
530
- /* @__PURE__ */ E("td", {
535
+ /* @__PURE__ */ w("td", {
531
536
  className: "px-4 py-3 text-right",
532
- children: /* @__PURE__ */ E("span", {
537
+ children: /* @__PURE__ */ w("span", {
533
538
  className: "text-xs text-foreground tabular-nums",
534
539
  children: (e.messageCount24h ?? 0).toLocaleString()
535
540
  })
536
541
  }),
537
- /* @__PURE__ */ E("td", {
542
+ /* @__PURE__ */ w("td", {
538
543
  className: "px-4 py-3 text-right",
539
- children: /* @__PURE__ */ E("span", {
544
+ children: /* @__PURE__ */ w("span", {
540
545
  className: "text-xs text-muted-foreground whitespace-nowrap",
541
- children: pe(e.updatedAt)
546
+ children: ge(e.updatedAt)
542
547
  })
543
548
  }),
544
- /* @__PURE__ */ E("td", {
549
+ /* @__PURE__ */ w("td", {
545
550
  className: "px-4 py-3",
546
- children: /* @__PURE__ */ D("div", {
551
+ children: /* @__PURE__ */ T("div", {
547
552
  className: "flex items-center justify-end gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity",
548
553
  children: [
549
- /* @__PURE__ */ E("button", {
554
+ /* @__PURE__ */ w("button", {
550
555
  type: "button",
551
- onClick: () => h(`/channels/${e.id}`),
556
+ onClick: () => m(`/channels/${e.id}`),
552
557
  className: "p-1.5 text-muted-foreground hover:text-accent-primary hover:bg-accent-primary/10 rounded transition-colors",
553
- title: v("channel.view", "View"),
554
- children: /* @__PURE__ */ E(oe, { size: 14 })
558
+ title: A("channel.view", "View"),
559
+ children: /* @__PURE__ */ w(se, { size: 14 })
555
560
  }),
556
- /* @__PURE__ */ E(s, {
561
+ /* @__PURE__ */ w(s, {
557
562
  permission: c.CHANNEL_EXECUTE,
558
- children: /* @__PURE__ */ E("button", {
563
+ children: /* @__PURE__ */ w("button", {
559
564
  type: "button",
560
- onClick: () => _e(e.id),
565
+ onClick: () => be(e.id),
561
566
  disabled: t,
562
567
  className: "p-1.5 text-muted-foreground hover:text-accent-blue hover:bg-accent-blue-subtle rounded transition-colors disabled:opacity-40",
563
- title: v("channel.healthCheck", "Health Check"),
564
- children: t ? /* @__PURE__ */ E(y, {
568
+ title: A("channel.healthCheck", "Health Check"),
569
+ children: t ? /* @__PURE__ */ w(v, {
565
570
  size: 14,
566
571
  className: "animate-spin"
567
- }) : /* @__PURE__ */ E(w, { size: 14 })
572
+ }) : /* @__PURE__ */ w(S, { size: 14 })
568
573
  })
569
574
  }),
570
- /* @__PURE__ */ E(s, {
575
+ /* @__PURE__ */ w(s, {
571
576
  permission: c.CHANNEL_UPDATE,
572
- children: /* @__PURE__ */ E("button", {
577
+ children: /* @__PURE__ */ w("button", {
573
578
  type: "button",
574
- onClick: () => ge(e),
579
+ onClick: () => ye(e),
575
580
  disabled: t,
576
581
  className: `p-1.5 rounded transition-colors disabled:opacity-40 ${e.status === "ACTIVE" ? "text-muted-foreground hover:text-status-warning-text hover:bg-status-warning-bg-subtle" : "text-muted-foreground hover:text-status-success-text hover:bg-status-success-bg-subtle"}`,
577
- title: e.status === "ACTIVE" ? v("channel.deactivate", "Deactivate") : v("channel.activate", "Activate"),
578
- children: e.status === "ACTIVE" ? /* @__PURE__ */ E(S, { size: 14 }) : /* @__PURE__ */ E(ce, { size: 14 })
582
+ title: e.status === "ACTIVE" ? A("channel.deactivate", "Deactivate") : A("channel.activate", "Activate"),
583
+ children: e.status === "ACTIVE" ? /* @__PURE__ */ w(b, { size: 14 }) : /* @__PURE__ */ w(ue, { size: 14 })
579
584
  })
580
585
  }),
581
- T === e.id ? /* @__PURE__ */ D("span", {
586
+ j === e.id ? /* @__PURE__ */ T("span", {
582
587
  className: "inline-flex items-center gap-1 ml-1",
583
- children: [/* @__PURE__ */ E("button", {
588
+ children: [/* @__PURE__ */ w("button", {
584
589
  type: "button",
585
- onClick: () => he(e.id),
590
+ onClick: () => ve(e.id),
586
591
  disabled: t,
587
592
  className: "px-1.5 py-0.5 text-[11px] font-medium text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
588
- children: t ? "..." : v("channel.yes", "Yes")
589
- }), /* @__PURE__ */ E("button", {
593
+ children: t ? "..." : A("channel.yes", "Yes")
594
+ }), /* @__PURE__ */ w("button", {
590
595
  type: "button",
591
596
  onClick: () => M(null),
592
597
  className: "px-1.5 py-0.5 text-[11px] text-muted-foreground hover:hover:bg-action-primary-bg/10 rounded transition-colors",
593
- children: v("channel.no", "No")
598
+ children: A("channel.no", "No")
594
599
  })]
595
- }) : /* @__PURE__ */ E(s, {
600
+ }) : /* @__PURE__ */ w(s, {
596
601
  permission: c.CHANNEL_DELETE,
597
- children: /* @__PURE__ */ E("button", {
602
+ children: /* @__PURE__ */ w("button", {
598
603
  type: "button",
599
604
  onClick: () => M(e.id),
600
605
  className: "p-1.5 text-muted-foreground hover:text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
601
- title: v("channel.delete", "Delete"),
602
- children: /* @__PURE__ */ E(de, { size: 14 })
606
+ title: A("channel.delete", "Delete"),
607
+ children: /* @__PURE__ */ w(pe, { size: 14 })
603
608
  })
604
609
  })
605
610
  ]
@@ -610,14 +615,14 @@ function M() {
610
615
  })
611
616
  })]
612
617
  })
613
- }), /* @__PURE__ */ D("div", {
618
+ }), /* @__PURE__ */ T("div", {
614
619
  className: "px-4 py-2.5 border-t border-border flex items-center justify-between",
615
- children: [/* @__PURE__ */ D("p", {
620
+ children: [/* @__PURE__ */ T("p", {
616
621
  className: "text-xs text-muted-foreground",
617
622
  children: [
618
- v("channel.showing", "Showing"),
623
+ A("channel.showing", "Showing"),
619
624
  " ",
620
- /* @__PURE__ */ D("span", {
625
+ /* @__PURE__ */ T("span", {
621
626
  className: "font-medium text-foreground",
622
627
  children: [
623
628
  H === 0 ? 0 : P * 10 + 1,
@@ -626,26 +631,26 @@ function M() {
626
631
  ]
627
632
  }),
628
633
  " ",
629
- v("channel.of", "of"),
634
+ A("channel.of", "of"),
630
635
  " ",
631
- /* @__PURE__ */ E("span", {
636
+ /* @__PURE__ */ w("span", {
632
637
  className: "font-medium text-foreground",
633
638
  children: H
634
639
  }),
635
640
  " ",
636
- v("channel.channelsLower", "channels")
641
+ A("channel.channelsLower", "channels")
637
642
  ]
638
- }), /* @__PURE__ */ D("div", {
643
+ }), /* @__PURE__ */ T("div", {
639
644
  className: "flex items-center gap-2",
640
645
  children: [
641
- /* @__PURE__ */ E("button", {
646
+ /* @__PURE__ */ w("button", {
642
647
  type: "button",
643
648
  onClick: () => F((e) => Math.max(0, e - 1)),
644
649
  disabled: P === 0,
645
650
  className: "px-2.5 py-1 text-xs border border-border rounded hover:bg-muted transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
646
- children: v("channel.previous", "Prev")
651
+ children: A("channel.previous", "Prev")
647
652
  }),
648
- /* @__PURE__ */ D("span", {
653
+ /* @__PURE__ */ T("span", {
649
654
  className: "text-xs text-muted-foreground",
650
655
  children: [
651
656
  P + 1,
@@ -653,71 +658,72 @@ function M() {
653
658
  X
654
659
  ]
655
660
  }),
656
- /* @__PURE__ */ E("button", {
661
+ /* @__PURE__ */ w("button", {
657
662
  type: "button",
658
663
  onClick: () => F((e) => Math.min(X - 1, e + 1)),
659
664
  disabled: P >= X - 1,
660
665
  className: "px-2.5 py-1 text-xs border border-border rounded hover:bg-muted transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
661
- children: v("channel.next", "Next")
666
+ children: A("channel.next", "Next")
662
667
  })
663
668
  ]
664
669
  })]
665
670
  })]
666
671
  }),
667
- z.length > 0 && /* @__PURE__ */ D("div", {
672
+ z.length > 0 && /* @__PURE__ */ T("div", {
668
673
  className: "grid gap-3 sm:grid-cols-3",
674
+ "data-tour": "channels-dashboard-quick-links",
669
675
  children: [
670
- /* @__PURE__ */ D("button", {
676
+ /* @__PURE__ */ T("button", {
671
677
  type: "button",
672
- onClick: () => h("/channels/?tab=all"),
678
+ onClick: () => m("/channels/?tab=all"),
673
679
  className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
674
- children: [/* @__PURE__ */ E(C, {
680
+ children: [/* @__PURE__ */ w(x, {
675
681
  size: 16,
676
682
  className: "text-accent-primary shrink-0"
677
- }), /* @__PURE__ */ D("div", {
683
+ }), /* @__PURE__ */ T("div", {
678
684
  className: "min-w-0",
679
- children: [/* @__PURE__ */ E("p", {
685
+ children: [/* @__PURE__ */ w("p", {
680
686
  className: "text-sm font-medium text-foreground",
681
- children: v("channel.allChannels", "All Channels")
682
- }), /* @__PURE__ */ E("p", {
687
+ children: A("channel.allChannels", "All Channels")
688
+ }), /* @__PURE__ */ w("p", {
683
689
  className: "text-xs text-muted-foreground truncate",
684
- children: v("channel.browseChannels", "Browse and manage channel cards")
690
+ children: A("channel.browseChannels", "Browse and manage channel cards")
685
691
  })]
686
692
  })]
687
693
  }),
688
- /* @__PURE__ */ D("button", {
694
+ /* @__PURE__ */ T("button", {
689
695
  type: "button",
690
- onClick: () => h("/channels/?tab=connections"),
696
+ onClick: () => m("/channels/?tab=connections"),
691
697
  className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
692
- children: [/* @__PURE__ */ E(g, {
698
+ children: [/* @__PURE__ */ w(h, {
693
699
  size: 16,
694
700
  className: "text-accent-blue shrink-0"
695
- }), /* @__PURE__ */ D("div", {
701
+ }), /* @__PURE__ */ T("div", {
696
702
  className: "min-w-0",
697
- children: [/* @__PURE__ */ E("p", {
703
+ children: [/* @__PURE__ */ w("p", {
698
704
  className: "text-sm font-medium text-foreground",
699
- children: v("channel.connections", "Connections")
700
- }), /* @__PURE__ */ E("p", {
705
+ children: A("channel.connections", "Connections")
706
+ }), /* @__PURE__ */ w("p", {
701
707
  className: "text-xs text-muted-foreground truncate",
702
- children: v("channel.connectionsSubtitle", "OAuth, API keys & credentials")
708
+ children: A("channel.connectionsSubtitle", "OAuth, API keys & credentials")
703
709
  })]
704
710
  })]
705
711
  }),
706
- /* @__PURE__ */ D("button", {
712
+ /* @__PURE__ */ T("button", {
707
713
  type: "button",
708
- onClick: () => h("/channels/?tab=send"),
714
+ onClick: () => m("/channels/?tab=send"),
709
715
  className: "flex items-center gap-3 p-3 bg-surface border border-border rounded-lg hover:hover:bg-action-primary-bg/10 transition-colors text-left",
710
- children: [/* @__PURE__ */ E(p, {
716
+ children: [/* @__PURE__ */ w(oe, {
711
717
  size: 16,
712
718
  className: "text-accent-violet shrink-0"
713
- }), /* @__PURE__ */ D("div", {
719
+ }), /* @__PURE__ */ T("div", {
714
720
  className: "min-w-0",
715
- children: [/* @__PURE__ */ E("p", {
721
+ children: [/* @__PURE__ */ w("p", {
716
722
  className: "text-sm font-medium text-foreground",
717
- children: v("channel.sendMessage", "Send Message")
718
- }), /* @__PURE__ */ E("p", {
723
+ children: A("channel.sendMessage", "Send Message")
724
+ }), /* @__PURE__ */ w("p", {
719
725
  className: "text-xs text-muted-foreground truncate",
720
- children: v("channel.sendMessageSubtitle", "Send a test or one-off notification")
726
+ children: A("channel.sendMessageSubtitle", "Send a test or one-off notification")
721
727
  })]
722
728
  })]
723
729
  })
@@ -728,6 +734,6 @@ function M() {
728
734
  });
729
735
  }
730
736
  //#endregion
731
- export { M as ChannelDashboardPage };
737
+ export { A as ChannelDashboardPage };
732
738
 
733
739
  //# sourceMappingURL=ChannelDashboardPage.js.map