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