@burdenoff/microfe-channel 2026.1013.1 → 2026.1107.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 +2 -3
- 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 +12 -13
- 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 +11 -10
- 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 +6 -11
- 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 +289 -290
- 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 +3 -4
- 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 +6 -7
- 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 +39 -40
- 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 +8 -13
- 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 +108 -106
- 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 +181 -188
- 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 +145 -150
- 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,20 +1,20 @@
|
|
|
1
1
|
import { nativeImpact as e, nativeNotify as t } from "../../../../utils/nativeBridge.js";
|
|
2
2
|
import { useChannel as n } from "../../../hooks/useChannels.js";
|
|
3
|
+
import { AdapterCredentialsForm as ee, CredentialValidationStatus as te } from "../../../components/AdapterCredentialsForm.js";
|
|
3
4
|
import { PermissionGuard as r } from "../../../components/PermissionGuard.js";
|
|
4
5
|
import { CHANNEL_PERMISSIONS as i } from "../../../constants/permissions.js";
|
|
5
|
-
import { AUTH_TYPE_I18N as
|
|
6
|
-
import { AdapterCredentialsForm as ie, CredentialValidationStatus as ae } from "../../../components/AdapterCredentialsForm.js";
|
|
6
|
+
import { AUTH_TYPE_I18N as ne, HEALTH_I18N as re, PLATFORM_I18N as ie, STATUS_I18N as ae, translateLabel as a } from "../i18n.js";
|
|
7
7
|
import { useEffect as oe, useState as o } from "react";
|
|
8
8
|
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
-
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as
|
|
10
|
-
import { useLocation as
|
|
11
|
-
import { usePermissions as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { CTAOverflowMenu as
|
|
14
|
-
import { TagBadge as
|
|
15
|
-
import { Markdown as
|
|
16
|
-
|
|
17
|
-
var
|
|
9
|
+
import { AlertCircle as s, AlertTriangle as c, ArrowLeft as ce, ArrowRight as l, Cable as u, CheckCircle2 as d, Clock as le, HelpCircle as f, Key as ue, Loader2 as p, Mail as de, MessageSquare as fe, Pencil as pe, Phone as me, Play as he, Plus as ge, Power as _e, PowerOff as m, Radio as ve, RefreshCw as ye, Save as be, Send as h, Trash2 as xe, Truck as g, Users as Se, X as Ce, XCircle as _ } from "lucide-react";
|
|
10
|
+
import { useLocation as we, useNavigate as Te, useParams as Ee } from "react-router";
|
|
11
|
+
import { usePermissions as De } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
13
|
+
import { CTAOverflowMenu as Oe, EmphasisPanel as ke, GlassCard as b, NextSteps as Ae, PagePurpose as je, ResponsiveDialog as Me, ResponsiveDialogContent as Ne, ResponsiveDialogHeader as Pe, ResponsiveDialogTitle as Fe } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { TagBadge as Ie } from "@burdenoff/fe-libs/tag";
|
|
15
|
+
import { Markdown as Le } from "@burdenoff/fe-libs/shared/components/Markdown";
|
|
16
|
+
// src/channel/modules/channels/pages/ChannelDetailsPage.tsx
|
|
17
|
+
var x = {
|
|
18
18
|
EMAIL: {
|
|
19
19
|
label: "Email",
|
|
20
20
|
color: "bg-accent-blue-subtle text-accent-blue"
|
|
@@ -55,7 +55,7 @@ var w = {
|
|
|
55
55
|
label: "Webchat",
|
|
56
56
|
color: "bg-accent-teal-subtle text-accent-teal"
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, S = {
|
|
59
59
|
ACTIVE: {
|
|
60
60
|
label: "Active",
|
|
61
61
|
color: "text-status-success-text bg-status-success-bg-subtle",
|
|
@@ -64,12 +64,12 @@ var w = {
|
|
|
64
64
|
INACTIVE: {
|
|
65
65
|
label: "Inactive",
|
|
66
66
|
color: "text-text-secondary bg-bg-sunken",
|
|
67
|
-
icon:
|
|
67
|
+
icon: m
|
|
68
68
|
},
|
|
69
69
|
ERROR: {
|
|
70
70
|
label: "Error",
|
|
71
71
|
color: "text-status-error-text bg-status-error-bg-subtle",
|
|
72
|
-
icon:
|
|
72
|
+
icon: _
|
|
73
73
|
},
|
|
74
74
|
SUSPENDED: {
|
|
75
75
|
label: "Suspended",
|
|
@@ -79,9 +79,9 @@ var w = {
|
|
|
79
79
|
ARCHIVED: {
|
|
80
80
|
label: "Archived",
|
|
81
81
|
color: "text-text-secondary bg-bg-sunken",
|
|
82
|
-
icon:
|
|
82
|
+
icon: m
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, C = {
|
|
85
85
|
HEALTHY: {
|
|
86
86
|
label: "Healthy",
|
|
87
87
|
color: "text-status-success-text",
|
|
@@ -95,7 +95,7 @@ var w = {
|
|
|
95
95
|
UNHEALTHY: {
|
|
96
96
|
label: "Unhealthy",
|
|
97
97
|
color: "text-status-error-text",
|
|
98
|
-
icon:
|
|
98
|
+
icon: _
|
|
99
99
|
},
|
|
100
100
|
UNKNOWN: {
|
|
101
101
|
label: "Unknown",
|
|
@@ -103,95 +103,95 @@ var w = {
|
|
|
103
103
|
icon: f
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
-
function
|
|
107
|
-
let { channelId: c } =
|
|
108
|
-
let n =
|
|
106
|
+
function w() {
|
|
107
|
+
let { channelId: c } = Ee(), f = Te(), w = we(), { hasPermission: T } = De(), E = T(i.CHANNEL_UPDATE), D = T(i.CHANNEL_EXECUTE), Re = T(i.CHANNEL_CONNECTION_CREATE), ze = T(i.CHANNEL_CONNECTION_UPDATE), { t: Be } = se(), O = (e, t) => {
|
|
108
|
+
let n = Be(e);
|
|
109
109
|
return n === e ? t : n;
|
|
110
|
-
},
|
|
110
|
+
}, k = w.state, [A, j] = o(null), [M, N] = o(k?.showCredentialsForm || !1), [P, F] = o(k?.pendingCredentials || {}), [Ve, I] = o(!1), [L, R] = o(null), [He, z] = o(!1), [B, V] = o(""), [H, Ue] = o(() => O("channel.testNotificationSubject", "Test Notification")), [U, We] = o(() => O("channel.testNotificationBody", "This is a test notification from Burdenoff Channel Service.")), [W, G] = o(null);
|
|
111
111
|
oe(() => {
|
|
112
|
-
(
|
|
112
|
+
(k?.pendingCredentials || k?.showCredentialsForm) && f(w.pathname, {
|
|
113
113
|
replace: !0,
|
|
114
114
|
state: null
|
|
115
115
|
});
|
|
116
116
|
}, []);
|
|
117
|
-
let { channel:
|
|
118
|
-
|
|
117
|
+
let { channel: K, isLoading: Ge, error: q, updateChannel: Ke, runHealthCheck: qe, createConnection: Je, updateConnection: Ye, deleteConnection: Xe, testConnection: Ze, sendTestNotification: Qe } = n(c), J = async () => {
|
|
118
|
+
j("health");
|
|
119
119
|
try {
|
|
120
|
-
await
|
|
120
|
+
await qe();
|
|
121
121
|
} catch (e) {
|
|
122
122
|
console.error("[channel] Failed to run health check", e);
|
|
123
123
|
} finally {
|
|
124
|
-
|
|
124
|
+
j(null);
|
|
125
125
|
}
|
|
126
|
-
},
|
|
127
|
-
if (
|
|
128
|
-
|
|
126
|
+
}, $e = async () => {
|
|
127
|
+
if (K) {
|
|
128
|
+
j("status");
|
|
129
129
|
try {
|
|
130
|
-
await
|
|
130
|
+
await Ke({ status: K.status === "ACTIVE" ? "INACTIVE" : "ACTIVE" });
|
|
131
131
|
} catch (e) {
|
|
132
132
|
console.error("[channel] Failed to toggle channel status", e);
|
|
133
133
|
} finally {
|
|
134
|
-
|
|
134
|
+
j(null);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
},
|
|
138
|
-
if (
|
|
139
|
-
|
|
137
|
+
}, et = async () => {
|
|
138
|
+
if (K) {
|
|
139
|
+
j("connection");
|
|
140
140
|
try {
|
|
141
|
-
let e = "API_KEY", t =
|
|
142
|
-
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await
|
|
141
|
+
let e = "API_KEY", t = K.adapterType;
|
|
142
|
+
t?.includes("BOT") ? e = "BOT_TOKEN" : t?.includes("WEBHOOK") ? e = "WEBHOOK" : t === "SMTP" && (e = "SMTP_IMAP"), await Je({
|
|
143
143
|
authType: e,
|
|
144
|
-
credentials:
|
|
145
|
-
}),
|
|
144
|
+
credentials: P
|
|
145
|
+
}), N(!1), F({}), I(!1);
|
|
146
146
|
} catch (e) {
|
|
147
147
|
console.error("[channel] Failed to create connection", e);
|
|
148
148
|
} finally {
|
|
149
|
-
|
|
149
|
+
j(null);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
},
|
|
153
|
-
|
|
152
|
+
}, tt = async (e) => {
|
|
153
|
+
j("connection");
|
|
154
154
|
try {
|
|
155
|
-
await
|
|
155
|
+
await Ye(e, { credentials: P }), N(!1), F({}), I(!1);
|
|
156
156
|
} catch (e) {
|
|
157
157
|
console.error("[channel] Failed to update connection", e);
|
|
158
158
|
} finally {
|
|
159
|
-
|
|
159
|
+
j(null);
|
|
160
160
|
}
|
|
161
|
-
},
|
|
162
|
-
e("medium"),
|
|
161
|
+
}, nt = async (n) => {
|
|
162
|
+
e("medium"), j("delete-connection");
|
|
163
163
|
try {
|
|
164
|
-
await
|
|
164
|
+
await Xe(n), t("success");
|
|
165
165
|
} catch (e) {
|
|
166
166
|
t("error"), console.error("[channel] Failed to delete connection", e);
|
|
167
167
|
} finally {
|
|
168
|
-
|
|
168
|
+
j(null);
|
|
169
169
|
}
|
|
170
|
-
},
|
|
171
|
-
|
|
170
|
+
}, rt = async (e) => {
|
|
171
|
+
j("test"), R(null);
|
|
172
172
|
try {
|
|
173
|
-
let t = await
|
|
174
|
-
t &&
|
|
173
|
+
let t = await Ze(e);
|
|
174
|
+
t && R({
|
|
175
175
|
success: t.success,
|
|
176
|
-
message: t.message || (t.success ?
|
|
176
|
+
message: t.message || (t.success ? O("channel.connectionTestSuccess", "Connection successful!") : O("channel.connectionTestFailed", "Connection failed"))
|
|
177
177
|
});
|
|
178
178
|
} catch (e) {
|
|
179
|
-
console.error("[channel] Failed to test connection", e),
|
|
179
|
+
console.error("[channel] Failed to test connection", e), R({
|
|
180
180
|
success: !1,
|
|
181
|
-
message:
|
|
181
|
+
message: O("channel.connectionTestRequestFailed", "Failed to test connection")
|
|
182
182
|
});
|
|
183
183
|
} finally {
|
|
184
|
-
|
|
184
|
+
j(null);
|
|
185
185
|
}
|
|
186
|
-
},
|
|
187
|
-
if (
|
|
188
|
-
|
|
186
|
+
}, it = async () => {
|
|
187
|
+
if (B.trim()) {
|
|
188
|
+
j("send-test"), G(null);
|
|
189
189
|
try {
|
|
190
|
-
let e =
|
|
191
|
-
subject:
|
|
192
|
-
html: `<p>${
|
|
193
|
-
} : void 0, t = await
|
|
194
|
-
t &&
|
|
190
|
+
let e = K?.platform === "EMAIL" ? {
|
|
191
|
+
subject: H,
|
|
192
|
+
html: `<p>${U}</p>`
|
|
193
|
+
} : void 0, t = await Qe(B.trim(), U, e);
|
|
194
|
+
t && G({
|
|
195
195
|
success: t.success,
|
|
196
196
|
messageId: t.messageId,
|
|
197
197
|
externalId: t.externalId,
|
|
@@ -204,8 +204,8 @@ function D() {
|
|
|
204
204
|
} : null
|
|
205
205
|
});
|
|
206
206
|
} catch (e) {
|
|
207
|
-
let t = e instanceof Error ? e.message :
|
|
208
|
-
console.error("[channel] Failed to send test notification", e),
|
|
207
|
+
let t = e instanceof Error ? e.message : O("channel.sendTestNotificationFailed", "Failed to send test notification");
|
|
208
|
+
console.error("[channel] Failed to send test notification", e), G({
|
|
209
209
|
success: !1,
|
|
210
210
|
error: {
|
|
211
211
|
code: "SEND_FAILED",
|
|
@@ -214,201 +214,201 @@ function D() {
|
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
} finally {
|
|
217
|
-
|
|
217
|
+
j(null);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, Y = (e) => {
|
|
221
221
|
switch (e) {
|
|
222
|
-
case "EMAIL": return
|
|
223
|
-
case "SMS": return
|
|
224
|
-
case "PUSH": return
|
|
225
|
-
case "SLACK": return
|
|
226
|
-
case "TEAMS": return
|
|
227
|
-
case "DISCORD": return
|
|
228
|
-
case "WHATSAPP": return
|
|
229
|
-
default: return
|
|
222
|
+
case "EMAIL": return O("channel.recipientPlaceholder.email", "email@example.com");
|
|
223
|
+
case "SMS": return O("channel.recipientPlaceholder.phone", "+1234567890");
|
|
224
|
+
case "PUSH": return O("channel.recipientPlaceholder.deviceToken", "Device token");
|
|
225
|
+
case "SLACK": return O("channel.recipientPlaceholder.slack", "Channel ID or User ID");
|
|
226
|
+
case "TEAMS": return O("channel.recipientPlaceholder.channelId", "Channel ID");
|
|
227
|
+
case "DISCORD": return O("channel.recipientPlaceholder.channelId", "Channel ID");
|
|
228
|
+
case "WHATSAPP": return O("channel.recipientPlaceholder.phone", "+1234567890");
|
|
229
|
+
default: return O("channel.recipientPlaceholder.default", "Recipient");
|
|
230
230
|
}
|
|
231
|
-
},
|
|
231
|
+
}, at = (e) => {
|
|
232
232
|
switch (e) {
|
|
233
|
-
case "EMAIL": return
|
|
233
|
+
case "EMAIL": return O("channel.recipientLabel.email", "Email Address");
|
|
234
234
|
case "SMS":
|
|
235
|
-
case "WHATSAPP": return
|
|
236
|
-
case "PUSH": return
|
|
235
|
+
case "WHATSAPP": return O("channel.recipientLabel.phone", "Phone Number");
|
|
236
|
+
case "PUSH": return O("channel.recipientLabel.deviceToken", "Device Token");
|
|
237
237
|
case "SLACK":
|
|
238
238
|
case "TEAMS":
|
|
239
|
-
case "DISCORD": return
|
|
240
|
-
default: return
|
|
239
|
+
case "DISCORD": return O("channel.recipientLabel.channelOrUserId", "Channel/User ID");
|
|
240
|
+
default: return O("channel.recipientLabel.default", "Recipient");
|
|
241
241
|
}
|
|
242
|
-
},
|
|
243
|
-
...
|
|
242
|
+
}, ot = (e) => ({
|
|
243
|
+
...x[e] || {
|
|
244
244
|
label: e,
|
|
245
245
|
color: "bg-bg-sunken text-text-secondary"
|
|
246
246
|
},
|
|
247
|
-
label: a(e,
|
|
248
|
-
}), ot = (e) => ({
|
|
249
|
-
...T[e] || T.INACTIVE,
|
|
250
|
-
label: a(e, re, j)
|
|
247
|
+
label: a(e, ie, O)
|
|
251
248
|
}), st = (e) => ({
|
|
252
|
-
...
|
|
253
|
-
label: a(e,
|
|
249
|
+
...S[e] || S.INACTIVE,
|
|
250
|
+
label: a(e, ae, O)
|
|
251
|
+
}), ct = (e) => ({
|
|
252
|
+
...C[e] || C.UNKNOWN,
|
|
253
|
+
label: a(e, re, O)
|
|
254
254
|
});
|
|
255
|
-
if (
|
|
255
|
+
if (Ge) return /* @__PURE__ */ v("div", {
|
|
256
256
|
className: "flex items-center justify-center min-h-screen",
|
|
257
|
-
children: /* @__PURE__ */
|
|
257
|
+
children: /* @__PURE__ */ v(p, {
|
|
258
258
|
size: 32,
|
|
259
259
|
className: "animate-spin text-accent-primary"
|
|
260
260
|
})
|
|
261
261
|
});
|
|
262
|
-
if (
|
|
262
|
+
if (q || !K) return /* @__PURE__ */ v("div", {
|
|
263
263
|
className: "p-6",
|
|
264
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ y("div", {
|
|
265
265
|
className: "flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
266
266
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ v(s, {
|
|
268
268
|
size: 20,
|
|
269
269
|
className: "text-status-error-text"
|
|
270
270
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v("p", {
|
|
272
272
|
className: "text-sm font-medium text-status-error-text",
|
|
273
|
-
children:
|
|
273
|
+
children: q || O("channel.channelNotFound", "Channel not found")
|
|
274
274
|
}) }),
|
|
275
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ v("button", {
|
|
276
276
|
type: "button",
|
|
277
277
|
onClick: () => f(-1),
|
|
278
278
|
className: "ml-auto px-3 py-1 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded transition-colors",
|
|
279
|
-
children:
|
|
279
|
+
children: O("channel.goBack", "Go Back")
|
|
280
280
|
})
|
|
281
281
|
]
|
|
282
282
|
})
|
|
283
283
|
});
|
|
284
|
-
let
|
|
285
|
-
return /* @__PURE__ */
|
|
284
|
+
let X = ot(K.platform), Z = st(K.status), Q = ct(K.connectionHealth), lt = Z.icon, ut = Q.icon, $ = K.connection;
|
|
285
|
+
return /* @__PURE__ */ v(r, {
|
|
286
286
|
permission: i.CHANNEL_READ,
|
|
287
|
-
children: /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ y("div", {
|
|
288
288
|
className: "space-y-6 p-3 sm:p-6",
|
|
289
289
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ y("div", {
|
|
291
291
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ y("div", {
|
|
293
293
|
className: "flex items-center gap-3",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ v("button", {
|
|
295
295
|
type: "button",
|
|
296
296
|
onClick: () => f(-1),
|
|
297
297
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
298
|
-
children: /* @__PURE__ */
|
|
299
|
-
}), /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ v(ce, { size: 20 })
|
|
299
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("div", {
|
|
300
300
|
className: "flex items-center gap-2",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ v(ve, {
|
|
302
302
|
size: 24,
|
|
303
303
|
className: "text-accent-primary"
|
|
304
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ v("h1", {
|
|
305
305
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
306
|
-
children:
|
|
306
|
+
children: K.name
|
|
307
307
|
})]
|
|
308
|
-
}),
|
|
308
|
+
}), K.description && /* @__PURE__ */ v("div", {
|
|
309
309
|
className: "text-sm text-text-secondary mt-1",
|
|
310
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ v(Le, { children: K.description })
|
|
311
311
|
})] })]
|
|
312
|
-
}), /* @__PURE__ */
|
|
313
|
-
primary:
|
|
314
|
-
label:
|
|
315
|
-
icon: /* @__PURE__ */
|
|
312
|
+
}), /* @__PURE__ */ v(Oe, {
|
|
313
|
+
primary: E ? {
|
|
314
|
+
label: O("channel.edit", "Edit"),
|
|
315
|
+
icon: /* @__PURE__ */ v(pe, {
|
|
316
316
|
size: 16,
|
|
317
317
|
"aria-hidden": "true"
|
|
318
318
|
}),
|
|
319
319
|
onSelect: () => f("./edit")
|
|
320
320
|
} : void 0,
|
|
321
321
|
actions: [
|
|
322
|
-
...
|
|
323
|
-
label:
|
|
324
|
-
icon:
|
|
322
|
+
...D ? [{
|
|
323
|
+
label: O("channel.healthCheck", "Health Check"),
|
|
324
|
+
icon: A === "health" ? /* @__PURE__ */ v(p, {
|
|
325
325
|
size: 16,
|
|
326
326
|
className: "animate-spin",
|
|
327
327
|
"aria-hidden": "true"
|
|
328
|
-
}) : /* @__PURE__ */
|
|
328
|
+
}) : /* @__PURE__ */ v(ye, {
|
|
329
329
|
size: 16,
|
|
330
330
|
"aria-hidden": "true"
|
|
331
331
|
}),
|
|
332
|
-
disabled:
|
|
333
|
-
onSelect: () => void
|
|
332
|
+
disabled: A === "health",
|
|
333
|
+
onSelect: () => void J()
|
|
334
334
|
}] : [],
|
|
335
|
-
...
|
|
336
|
-
label:
|
|
337
|
-
icon:
|
|
335
|
+
...E ? [{
|
|
336
|
+
label: K.status === "ACTIVE" ? O("channel.deactivate", "Deactivate") : O("channel.activate", "Activate"),
|
|
337
|
+
icon: A === "status" ? /* @__PURE__ */ v(p, {
|
|
338
338
|
size: 16,
|
|
339
339
|
className: "animate-spin",
|
|
340
340
|
"aria-hidden": "true"
|
|
341
|
-
}) :
|
|
341
|
+
}) : K.status === "ACTIVE" ? /* @__PURE__ */ v(m, {
|
|
342
342
|
size: 16,
|
|
343
343
|
"aria-hidden": "true"
|
|
344
|
-
}) : /* @__PURE__ */
|
|
344
|
+
}) : /* @__PURE__ */ v(_e, {
|
|
345
345
|
size: 16,
|
|
346
346
|
"aria-hidden": "true"
|
|
347
347
|
}),
|
|
348
|
-
disabled:
|
|
349
|
-
onSelect: () => void
|
|
348
|
+
disabled: A === "status",
|
|
349
|
+
onSelect: () => void $e()
|
|
350
350
|
}] : [],
|
|
351
351
|
{
|
|
352
|
-
label:
|
|
353
|
-
icon: /* @__PURE__ */
|
|
352
|
+
label: O("channel.testChannel", "Test Channel"),
|
|
353
|
+
icon: /* @__PURE__ */ v(h, {
|
|
354
354
|
size: 16,
|
|
355
355
|
"aria-hidden": "true"
|
|
356
356
|
}),
|
|
357
|
-
disabled: !
|
|
357
|
+
disabled: !K.connection,
|
|
358
358
|
onSelect: () => {
|
|
359
|
-
|
|
359
|
+
z(!0), G(null), V("");
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
]
|
|
363
363
|
})]
|
|
364
364
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
icon: /* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ v(je, {
|
|
366
|
+
icon: /* @__PURE__ */ v(ve, {
|
|
367
367
|
size: 15,
|
|
368
368
|
"aria-hidden": "true"
|
|
369
369
|
}),
|
|
370
|
-
children:
|
|
370
|
+
children: O("channel.detailsPurpose", "Everything about this one channel in a single place — its status and health, the connection that authenticates it to the provider, and shortcuts into its delivery history, incoming webhooks and connected users. Use it to wire up or refresh credentials, run a health check, send a test message, and confirm the channel is ready before you rely on it.")
|
|
371
371
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ v(Ae, {
|
|
373
373
|
storageKey: "channel-detail",
|
|
374
374
|
steps: [
|
|
375
|
-
...
|
|
375
|
+
...K.connection ? D ? [{
|
|
376
376
|
id: "health",
|
|
377
|
-
label:
|
|
378
|
-
description:
|
|
379
|
-
icon: /* @__PURE__ */
|
|
377
|
+
label: O("channel.nextRunHealthCheck", "Run a health check"),
|
|
378
|
+
description: O("channel.nextRunHealthCheckDesc", "Confirm the connection can reach the provider right now."),
|
|
379
|
+
icon: /* @__PURE__ */ v(ye, {
|
|
380
380
|
size: 16,
|
|
381
381
|
"aria-hidden": "true"
|
|
382
382
|
}),
|
|
383
|
-
onClick: () => void
|
|
383
|
+
onClick: () => void J()
|
|
384
384
|
}] : [] : [{
|
|
385
385
|
id: "connect",
|
|
386
|
-
label:
|
|
387
|
-
description:
|
|
388
|
-
icon: /* @__PURE__ */
|
|
386
|
+
label: O("channel.nextAddConnection", "Add a connection"),
|
|
387
|
+
description: O("channel.nextAddConnectionDesc", "Authenticate this channel to its provider so it can send."),
|
|
388
|
+
icon: /* @__PURE__ */ v(u, {
|
|
389
389
|
size: 16,
|
|
390
390
|
"aria-hidden": "true"
|
|
391
391
|
}),
|
|
392
|
-
onClick: () =>
|
|
392
|
+
onClick: () => N(!0)
|
|
393
393
|
}],
|
|
394
394
|
{
|
|
395
395
|
id: "test",
|
|
396
|
-
label:
|
|
397
|
-
description:
|
|
398
|
-
icon: /* @__PURE__ */
|
|
396
|
+
label: O("channel.nextSendTest", "Send a test message"),
|
|
397
|
+
description: O("channel.nextSendTestDesc", "Verify end-to-end delivery before you depend on this channel."),
|
|
398
|
+
icon: /* @__PURE__ */ v(h, {
|
|
399
399
|
size: 16,
|
|
400
400
|
"aria-hidden": "true"
|
|
401
401
|
}),
|
|
402
|
-
done: !
|
|
402
|
+
done: !K.connection,
|
|
403
403
|
onClick: () => {
|
|
404
|
-
|
|
404
|
+
K.connection && (z(!0), G(null), V(""));
|
|
405
405
|
}
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
408
|
id: "deliveries",
|
|
409
|
-
label:
|
|
410
|
-
description:
|
|
411
|
-
icon: /* @__PURE__ */
|
|
409
|
+
label: O("channel.nextReviewDeliveries", "Review delivery history"),
|
|
410
|
+
description: O("channel.nextReviewDeliveriesDesc", "See what has been sent and retry anything that failed."),
|
|
411
|
+
icon: /* @__PURE__ */ v(g, {
|
|
412
412
|
size: 16,
|
|
413
413
|
"aria-hidden": "true"
|
|
414
414
|
}),
|
|
@@ -416,248 +416,248 @@ function D() {
|
|
|
416
416
|
}
|
|
417
417
|
]
|
|
418
418
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ y("div", {
|
|
420
420
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
421
421
|
children: [
|
|
422
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ y(b, {
|
|
423
423
|
treatment: "metric",
|
|
424
424
|
className: "p-4 border-border-seam",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ v("p", {
|
|
426
426
|
className: "text-xs text-text-secondary mb-1",
|
|
427
|
-
children:
|
|
428
|
-
}), /* @__PURE__ */
|
|
429
|
-
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${
|
|
430
|
-
children:
|
|
427
|
+
children: O("channel.platform", "Platform")
|
|
428
|
+
}), /* @__PURE__ */ v("span", {
|
|
429
|
+
className: `inline-flex px-2 py-1 text-sm font-semibold rounded-full ${X.color}`,
|
|
430
|
+
children: X.label
|
|
431
431
|
})]
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ y(b, {
|
|
434
434
|
treatment: "metric",
|
|
435
435
|
className: "p-4 border-border-seam",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ v("p", {
|
|
437
437
|
className: "text-xs text-text-secondary mb-1",
|
|
438
|
-
children:
|
|
439
|
-
}), /* @__PURE__ */
|
|
438
|
+
children: O("channel.status", "Status")
|
|
439
|
+
}), /* @__PURE__ */ y("div", {
|
|
440
440
|
className: "flex items-center gap-2",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ v(lt, {
|
|
442
442
|
size: 16,
|
|
443
443
|
className: Z.color.split(" ")[0]
|
|
444
|
-
}), /* @__PURE__ */
|
|
444
|
+
}), /* @__PURE__ */ v("span", {
|
|
445
445
|
className: `px-2 py-1 text-sm font-medium rounded-full ${Z.color}`,
|
|
446
446
|
children: Z.label
|
|
447
447
|
})]
|
|
448
448
|
})]
|
|
449
449
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ y(b, {
|
|
451
451
|
treatment: "metric",
|
|
452
452
|
className: "p-4 border-border-seam",
|
|
453
453
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ v("p", {
|
|
455
455
|
className: "text-xs text-text-secondary mb-1",
|
|
456
|
-
children:
|
|
456
|
+
children: O("channel.connectionHealth", "Connection Health")
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ y("div", {
|
|
459
459
|
className: "flex items-center gap-2",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ v(ut, {
|
|
461
461
|
size: 16,
|
|
462
462
|
className: Q.color
|
|
463
|
-
}), /* @__PURE__ */
|
|
463
|
+
}), /* @__PURE__ */ v("span", {
|
|
464
464
|
className: `text-sm font-medium ${Q.color}`,
|
|
465
465
|
children: Q.label
|
|
466
466
|
})]
|
|
467
467
|
}),
|
|
468
|
-
|
|
468
|
+
K.lastHealthCheckAt && /* @__PURE__ */ y("p", {
|
|
469
469
|
className: "text-xs text-text-muted mt-1",
|
|
470
470
|
children: [
|
|
471
|
-
|
|
471
|
+
O("channel.lastCheck", "Last check"),
|
|
472
472
|
":",
|
|
473
473
|
" ",
|
|
474
|
-
new Date(
|
|
474
|
+
new Date(K.lastHealthCheckAt).toLocaleString()
|
|
475
475
|
]
|
|
476
476
|
})
|
|
477
477
|
]
|
|
478
478
|
}),
|
|
479
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ y(b, {
|
|
480
480
|
treatment: "metric",
|
|
481
481
|
className: "p-4 border-border-seam",
|
|
482
|
-
children: [/* @__PURE__ */
|
|
482
|
+
children: [/* @__PURE__ */ v("p", {
|
|
483
483
|
className: "text-xs text-text-secondary mb-1",
|
|
484
|
-
children:
|
|
485
|
-
}), /* @__PURE__ */
|
|
484
|
+
children: O("channel.connection", "Connection")
|
|
485
|
+
}), /* @__PURE__ */ y("div", {
|
|
486
486
|
className: "flex items-center gap-2",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ v(u, {
|
|
488
488
|
size: 16,
|
|
489
|
-
className:
|
|
490
|
-
}), /* @__PURE__ */
|
|
491
|
-
className: `text-sm font-medium ${
|
|
492
|
-
children:
|
|
489
|
+
className: K.isConnected ? "text-status-success-text" : "text-text-secondary"
|
|
490
|
+
}), /* @__PURE__ */ v("span", {
|
|
491
|
+
className: `text-sm font-medium ${K.isConnected ? "text-status-success-text" : "text-text-secondary"}`,
|
|
492
|
+
children: K.isConnected ? O("channel.connected", "Connected") : O("channel.notConnected", "Not Connected")
|
|
493
493
|
})]
|
|
494
494
|
})]
|
|
495
495
|
})
|
|
496
496
|
]
|
|
497
497
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ y(ke, {
|
|
499
499
|
className: "p-4",
|
|
500
500
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ v("h2", {
|
|
502
502
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
503
|
-
children:
|
|
503
|
+
children: O("channel.channelDetails", "Channel Details")
|
|
504
504
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ y("div", {
|
|
506
506
|
className: "grid gap-4 sm:grid-cols-2",
|
|
507
507
|
children: [
|
|
508
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
509
509
|
className: "text-xs text-text-secondary",
|
|
510
|
-
children:
|
|
511
|
-
}), /* @__PURE__ */
|
|
510
|
+
children: O("channel.adapterType", "Adapter Type")
|
|
511
|
+
}), /* @__PURE__ */ v("p", {
|
|
512
512
|
className: "text-sm font-medium text-text-primary",
|
|
513
|
-
children:
|
|
513
|
+
children: K.adapterType?.replace(/_/g, " ") || O("channel.notConfigured", "Not configured")
|
|
514
514
|
})] }),
|
|
515
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
516
516
|
className: "text-xs text-text-secondary",
|
|
517
|
-
children:
|
|
518
|
-
}), /* @__PURE__ */
|
|
517
|
+
children: O("channel.priority", "Priority")
|
|
518
|
+
}), /* @__PURE__ */ v("p", {
|
|
519
519
|
className: "text-sm font-medium text-text-primary",
|
|
520
|
-
children:
|
|
520
|
+
children: K.priority
|
|
521
521
|
})] }),
|
|
522
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
523
523
|
className: "text-xs text-text-secondary",
|
|
524
|
-
children:
|
|
525
|
-
}), /* @__PURE__ */
|
|
524
|
+
children: O("channel.consecutiveFailures", "Consecutive Failures")
|
|
525
|
+
}), /* @__PURE__ */ v("p", {
|
|
526
526
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
527
|
-
children:
|
|
527
|
+
children: K.consecutiveFailures
|
|
528
528
|
})] }),
|
|
529
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
530
530
|
className: "text-xs text-text-secondary",
|
|
531
|
-
children:
|
|
532
|
-
}), /* @__PURE__ */
|
|
531
|
+
children: O("channel.messages24h", "Messages (24h)")
|
|
532
|
+
}), /* @__PURE__ */ v("p", {
|
|
533
533
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
534
|
-
children:
|
|
534
|
+
children: K.messageCount24h
|
|
535
535
|
})] }),
|
|
536
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
537
537
|
className: "text-xs text-text-secondary",
|
|
538
|
-
children:
|
|
539
|
-
}), /* @__PURE__ */
|
|
538
|
+
children: O("channel.createdAt", "Created At")
|
|
539
|
+
}), /* @__PURE__ */ v("p", {
|
|
540
540
|
className: "text-sm font-medium text-text-primary",
|
|
541
|
-
children: new Date(
|
|
541
|
+
children: new Date(K.createdAt).toLocaleString()
|
|
542
542
|
})] }),
|
|
543
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
544
544
|
className: "text-xs text-text-secondary",
|
|
545
|
-
children:
|
|
546
|
-
}), /* @__PURE__ */
|
|
545
|
+
children: O("channel.updatedAt", "Updated At")
|
|
546
|
+
}), /* @__PURE__ */ v("p", {
|
|
547
547
|
className: "text-sm font-medium text-text-primary",
|
|
548
|
-
children: new Date(
|
|
548
|
+
children: new Date(K.updatedAt).toLocaleString()
|
|
549
549
|
})] })
|
|
550
550
|
]
|
|
551
551
|
}),
|
|
552
|
-
|
|
552
|
+
K.tagAssignments && K.tagAssignments.length > 0 && /* @__PURE__ */ y("div", {
|
|
553
553
|
className: "mt-4",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
554
|
+
children: [/* @__PURE__ */ v("p", {
|
|
555
555
|
className: "text-xs text-text-secondary mb-1.5",
|
|
556
|
-
children:
|
|
557
|
-
}), /* @__PURE__ */
|
|
556
|
+
children: O("channel.tags", "Tags")
|
|
557
|
+
}), /* @__PURE__ */ v("div", {
|
|
558
558
|
className: "flex flex-wrap gap-1.5",
|
|
559
559
|
"aria-label": "Channel tags",
|
|
560
|
-
children:
|
|
560
|
+
children: K.tagAssignments.map((e) => /* @__PURE__ */ v(Ie, {
|
|
561
561
|
id: e.tagId,
|
|
562
562
|
label: e.tagId,
|
|
563
563
|
size: "md"
|
|
564
564
|
}, e.id))
|
|
565
565
|
})]
|
|
566
566
|
}),
|
|
567
|
-
|
|
567
|
+
K.healthCheckError && /* @__PURE__ */ y("div", {
|
|
568
568
|
className: "mt-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-lg",
|
|
569
|
-
children: [/* @__PURE__ */
|
|
569
|
+
children: [/* @__PURE__ */ v("p", {
|
|
570
570
|
className: "text-xs text-status-error-text font-medium",
|
|
571
|
-
children:
|
|
572
|
-
}), /* @__PURE__ */
|
|
571
|
+
children: O("channel.lastHealthCheckError", "Last Health Check Error")
|
|
572
|
+
}), /* @__PURE__ */ v("p", {
|
|
573
573
|
className: "text-sm text-status-error-text",
|
|
574
|
-
children:
|
|
574
|
+
children: K.healthCheckError
|
|
575
575
|
})]
|
|
576
576
|
})
|
|
577
577
|
]
|
|
578
578
|
}),
|
|
579
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ y("div", {
|
|
580
580
|
className: "grid gap-3 sm:grid-cols-3",
|
|
581
581
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ y("button", {
|
|
583
583
|
type: "button",
|
|
584
584
|
onClick: () => f("./deliveries"),
|
|
585
585
|
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
586
586
|
children: [
|
|
587
|
-
/* @__PURE__ */
|
|
587
|
+
/* @__PURE__ */ v("div", {
|
|
588
588
|
className: "p-2 bg-accent-orange/10 rounded-lg",
|
|
589
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ v(g, {
|
|
590
590
|
size: 18,
|
|
591
591
|
className: "text-accent-orange"
|
|
592
592
|
})
|
|
593
593
|
}),
|
|
594
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ y("div", {
|
|
595
595
|
className: "flex-1 min-w-0",
|
|
596
|
-
children: [/* @__PURE__ */
|
|
596
|
+
children: [/* @__PURE__ */ v("p", {
|
|
597
597
|
className: "text-sm font-medium text-text-primary",
|
|
598
|
-
children:
|
|
599
|
-
}), /* @__PURE__ */
|
|
598
|
+
children: O("channel.deliveryHistory", "Delivery History")
|
|
599
|
+
}), /* @__PURE__ */ v("p", {
|
|
600
600
|
className: "text-xs text-text-secondary truncate",
|
|
601
|
-
children:
|
|
601
|
+
children: O("channel.viewMessageDeliveries", "View message deliveries")
|
|
602
602
|
})]
|
|
603
603
|
}),
|
|
604
|
-
/* @__PURE__ */
|
|
604
|
+
/* @__PURE__ */ v(l, {
|
|
605
605
|
size: 16,
|
|
606
606
|
className: "text-text-secondary shrink-0"
|
|
607
607
|
})
|
|
608
608
|
]
|
|
609
609
|
}),
|
|
610
|
-
/* @__PURE__ */
|
|
610
|
+
/* @__PURE__ */ y("button", {
|
|
611
611
|
type: "button",
|
|
612
612
|
onClick: () => f("./webhooks"),
|
|
613
613
|
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
614
614
|
children: [
|
|
615
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ v("div", {
|
|
616
616
|
className: "p-2 bg-accent-purple/10 rounded-lg",
|
|
617
|
-
children: /* @__PURE__ */
|
|
617
|
+
children: /* @__PURE__ */ v(le, {
|
|
618
618
|
size: 18,
|
|
619
619
|
className: "text-accent-purple"
|
|
620
620
|
})
|
|
621
621
|
}),
|
|
622
|
-
/* @__PURE__ */
|
|
622
|
+
/* @__PURE__ */ y("div", {
|
|
623
623
|
className: "flex-1 min-w-0",
|
|
624
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ v("p", {
|
|
625
625
|
className: "text-sm font-medium text-text-primary",
|
|
626
|
-
children:
|
|
627
|
-
}), /* @__PURE__ */
|
|
626
|
+
children: O("channel.webhookEvents", "Webhook Events")
|
|
627
|
+
}), /* @__PURE__ */ v("p", {
|
|
628
628
|
className: "text-xs text-text-secondary truncate",
|
|
629
|
-
children:
|
|
629
|
+
children: O("channel.viewIncomingWebhooks", "View incoming webhooks")
|
|
630
630
|
})]
|
|
631
631
|
}),
|
|
632
|
-
/* @__PURE__ */
|
|
632
|
+
/* @__PURE__ */ v(l, {
|
|
633
633
|
size: 16,
|
|
634
634
|
className: "text-text-secondary shrink-0"
|
|
635
635
|
})
|
|
636
636
|
]
|
|
637
637
|
}),
|
|
638
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ y("button", {
|
|
639
639
|
type: "button",
|
|
640
640
|
onClick: () => f("./users"),
|
|
641
641
|
className: "flex items-center gap-3 p-3 bg-gloss-card border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:bg-action-primary-bg/10 transition-colors text-left",
|
|
642
642
|
children: [
|
|
643
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ v("div", {
|
|
644
644
|
className: "p-2 bg-accent-blue/10 rounded-lg",
|
|
645
|
-
children: /* @__PURE__ */
|
|
645
|
+
children: /* @__PURE__ */ v(Se, {
|
|
646
646
|
size: 18,
|
|
647
647
|
className: "text-accent-blue"
|
|
648
648
|
})
|
|
649
649
|
}),
|
|
650
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ y("div", {
|
|
651
651
|
className: "flex-1 min-w-0",
|
|
652
|
-
children: [/* @__PURE__ */
|
|
652
|
+
children: [/* @__PURE__ */ v("p", {
|
|
653
653
|
className: "text-sm font-medium text-text-primary",
|
|
654
|
-
children:
|
|
655
|
-
}), /* @__PURE__ */
|
|
654
|
+
children: O("channel.channelUsers", "Channel Users")
|
|
655
|
+
}), /* @__PURE__ */ v("p", {
|
|
656
656
|
className: "text-xs text-text-secondary truncate",
|
|
657
|
-
children:
|
|
657
|
+
children: O("channel.viewConnectedUsers", "View connected users")
|
|
658
658
|
})]
|
|
659
659
|
}),
|
|
660
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ v(l, {
|
|
661
661
|
size: 16,
|
|
662
662
|
className: "text-text-secondary shrink-0"
|
|
663
663
|
})
|
|
@@ -665,359 +665,359 @@ function D() {
|
|
|
665
665
|
})
|
|
666
666
|
]
|
|
667
667
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ y(b, {
|
|
669
669
|
treatment: "plain",
|
|
670
670
|
className: "p-4 border-border-seam",
|
|
671
671
|
children: [
|
|
672
|
-
/* @__PURE__ */
|
|
672
|
+
/* @__PURE__ */ y("div", {
|
|
673
673
|
className: "flex items-center justify-between mb-4",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ y("div", {
|
|
675
675
|
className: "flex items-center gap-2",
|
|
676
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ v(ue, {
|
|
677
677
|
size: 20,
|
|
678
678
|
className: "text-accent-primary"
|
|
679
|
-
}), /* @__PURE__ */
|
|
679
|
+
}), /* @__PURE__ */ v("h2", {
|
|
680
680
|
className: "text-lg font-semibold text-text-primary",
|
|
681
|
-
children:
|
|
681
|
+
children: O("channel.connectionAndCredentials", "Connection & Credentials")
|
|
682
682
|
})]
|
|
683
|
-
}),
|
|
683
|
+
}), Re && !$ && !M && /* @__PURE__ */ y("button", {
|
|
684
684
|
type: "button",
|
|
685
|
-
onClick: () =>
|
|
685
|
+
onClick: () => N(!0),
|
|
686
686
|
className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bg-hover rounded-lg transition-colors",
|
|
687
|
-
children: [/* @__PURE__ */
|
|
687
|
+
children: [/* @__PURE__ */ v(ge, { size: 16 }), O("channel.addCredentials", "Add Credentials")]
|
|
688
688
|
})]
|
|
689
689
|
}),
|
|
690
|
-
$ && !
|
|
690
|
+
$ && !M && /* @__PURE__ */ y("div", {
|
|
691
691
|
className: "space-y-4",
|
|
692
692
|
children: [
|
|
693
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ y("div", {
|
|
694
694
|
className: "grid gap-4 sm:grid-cols-2",
|
|
695
695
|
children: [
|
|
696
|
-
/* @__PURE__ */
|
|
696
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
697
697
|
className: "text-xs text-text-secondary",
|
|
698
|
-
children:
|
|
699
|
-
}), /* @__PURE__ */
|
|
698
|
+
children: O("channel.authType", "Auth Type")
|
|
699
|
+
}), /* @__PURE__ */ v("p", {
|
|
700
700
|
className: "text-sm font-medium text-text-primary",
|
|
701
|
-
children: a($.authType,
|
|
701
|
+
children: a($.authType, ne, O)
|
|
702
702
|
})] }),
|
|
703
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
704
704
|
className: "text-xs text-text-secondary",
|
|
705
|
-
children:
|
|
706
|
-
}), /* @__PURE__ */
|
|
705
|
+
children: O("channel.status", "Status")
|
|
706
|
+
}), /* @__PURE__ */ y("div", {
|
|
707
707
|
className: "flex items-center gap-2",
|
|
708
|
-
children: [$.isHealthy ? /* @__PURE__ */
|
|
708
|
+
children: [$.isHealthy ? /* @__PURE__ */ v(d, {
|
|
709
709
|
size: 14,
|
|
710
710
|
className: "text-status-success-text"
|
|
711
|
-
}) : /* @__PURE__ */
|
|
711
|
+
}) : /* @__PURE__ */ v(_, {
|
|
712
712
|
size: 14,
|
|
713
713
|
className: "text-status-error-text"
|
|
714
|
-
}), /* @__PURE__ */
|
|
714
|
+
}), /* @__PURE__ */ v("span", {
|
|
715
715
|
className: `text-sm font-medium ${$.isHealthy ? "text-status-success-text" : "text-status-error-text"}`,
|
|
716
|
-
children: $.isHealthy ?
|
|
716
|
+
children: $.isHealthy ? O("channel.healthy", "Healthy") : O("channel.unhealthy", "Unhealthy")
|
|
717
717
|
})]
|
|
718
718
|
})] }),
|
|
719
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
720
720
|
className: "text-xs text-text-secondary",
|
|
721
|
-
children:
|
|
722
|
-
}), /* @__PURE__ */
|
|
721
|
+
children: O("channel.lastTested", "Last Tested")
|
|
722
|
+
}), /* @__PURE__ */ v("p", {
|
|
723
723
|
className: "text-sm font-medium text-text-primary",
|
|
724
|
-
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() :
|
|
724
|
+
children: $.lastTestedAt ? new Date($.lastTestedAt).toLocaleString() : O("channel.never", "Never")
|
|
725
725
|
})] }),
|
|
726
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
727
727
|
className: "text-xs text-text-secondary",
|
|
728
|
-
children:
|
|
729
|
-
}), /* @__PURE__ */
|
|
728
|
+
children: O("channel.testStatus", "Test Status")
|
|
729
|
+
}), /* @__PURE__ */ v("p", {
|
|
730
730
|
className: "text-sm font-medium text-text-primary",
|
|
731
|
-
children: $.testStatus ||
|
|
731
|
+
children: $.testStatus || O("channel.notTested", "Not tested")
|
|
732
732
|
})] }),
|
|
733
|
-
$.tokenExpiresAt && /* @__PURE__ */
|
|
733
|
+
$.tokenExpiresAt && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
734
734
|
className: "text-xs text-text-secondary",
|
|
735
|
-
children:
|
|
736
|
-
}), /* @__PURE__ */
|
|
735
|
+
children: O("channel.tokenExpires", "Token Expires")
|
|
736
|
+
}), /* @__PURE__ */ y("p", {
|
|
737
737
|
className: `text-sm font-medium ${$.needsTokenRefresh ? "text-status-warning-text" : "text-text-primary"}`,
|
|
738
|
-
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */
|
|
738
|
+
children: [new Date($.tokenExpiresAt).toLocaleString(), $.daysUntilExpiry !== void 0 && /* @__PURE__ */ y("span", {
|
|
739
739
|
className: "text-xs text-text-secondary ml-1",
|
|
740
740
|
children: [
|
|
741
741
|
"(",
|
|
742
742
|
$.daysUntilExpiry,
|
|
743
743
|
" ",
|
|
744
|
-
|
|
744
|
+
O("channel.days", "days"),
|
|
745
745
|
")"
|
|
746
746
|
]
|
|
747
747
|
})]
|
|
748
748
|
})] })
|
|
749
749
|
]
|
|
750
750
|
}),
|
|
751
|
-
|
|
752
|
-
className: `p-3 rounded-lg ${
|
|
753
|
-
children: /* @__PURE__ */
|
|
751
|
+
L && /* @__PURE__ */ v("div", {
|
|
752
|
+
className: `p-3 rounded-lg ${L.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
753
|
+
children: /* @__PURE__ */ y("div", {
|
|
754
754
|
className: "flex items-center gap-2",
|
|
755
|
-
children: [
|
|
755
|
+
children: [L.success ? /* @__PURE__ */ v(d, {
|
|
756
756
|
size: 16,
|
|
757
757
|
className: "text-status-success-text"
|
|
758
|
-
}) : /* @__PURE__ */
|
|
758
|
+
}) : /* @__PURE__ */ v(_, {
|
|
759
759
|
size: 16,
|
|
760
760
|
className: "text-status-error-text"
|
|
761
|
-
}), /* @__PURE__ */
|
|
762
|
-
className: `text-sm font-medium ${
|
|
763
|
-
children:
|
|
761
|
+
}), /* @__PURE__ */ v("p", {
|
|
762
|
+
className: `text-sm font-medium ${L.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
763
|
+
children: L.message
|
|
764
764
|
})]
|
|
765
765
|
})
|
|
766
766
|
}),
|
|
767
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ y("div", {
|
|
768
768
|
className: "flex items-center gap-2 pt-2",
|
|
769
769
|
children: [
|
|
770
|
-
/* @__PURE__ */
|
|
770
|
+
/* @__PURE__ */ v(r, {
|
|
771
771
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
772
|
-
children: /* @__PURE__ */
|
|
772
|
+
children: /* @__PURE__ */ y("button", {
|
|
773
773
|
type: "button",
|
|
774
|
-
onClick: () =>
|
|
775
|
-
disabled:
|
|
774
|
+
onClick: () => rt($.id),
|
|
775
|
+
disabled: A === "test",
|
|
776
776
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-info-text hover:bg-status-info-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
777
|
-
children: [
|
|
777
|
+
children: [A === "test" ? /* @__PURE__ */ v(p, {
|
|
778
778
|
size: 16,
|
|
779
779
|
className: "animate-spin"
|
|
780
|
-
}) : /* @__PURE__ */
|
|
780
|
+
}) : /* @__PURE__ */ v(he, { size: 16 }), O("channel.testConnection", "Test Connection")]
|
|
781
781
|
})
|
|
782
782
|
}),
|
|
783
|
-
|
|
783
|
+
ze && /* @__PURE__ */ y("button", {
|
|
784
784
|
type: "button",
|
|
785
785
|
onClick: () => {
|
|
786
|
-
|
|
786
|
+
N(!0), F($?.platformMetadata ?? {});
|
|
787
787
|
},
|
|
788
788
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary hover:text-accent-primary hover:bg-accent-primary/10 rounded-lg transition-colors",
|
|
789
|
-
children: [/* @__PURE__ */
|
|
789
|
+
children: [/* @__PURE__ */ v(pe, { size: 16 }), O("channel.updateCredentials", "Update Credentials")]
|
|
790
790
|
}),
|
|
791
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ v(r, {
|
|
792
792
|
permission: i.CHANNEL_CONNECTION_DELETE,
|
|
793
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ y("button", {
|
|
794
794
|
type: "button",
|
|
795
|
-
onClick: () =>
|
|
796
|
-
disabled:
|
|
795
|
+
onClick: () => nt($.id),
|
|
796
|
+
disabled: A === "delete-connection",
|
|
797
797
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-status-error-text hover:bg-status-error-bg-subtle rounded-lg transition-colors disabled:opacity-50",
|
|
798
|
-
children: [
|
|
798
|
+
children: [A === "delete-connection" ? /* @__PURE__ */ v(p, {
|
|
799
799
|
size: 16,
|
|
800
800
|
className: "animate-spin"
|
|
801
|
-
}) : /* @__PURE__ */
|
|
801
|
+
}) : /* @__PURE__ */ v(xe, { size: 16 }), O("channel.remove", "Remove")]
|
|
802
802
|
})
|
|
803
803
|
})
|
|
804
804
|
]
|
|
805
805
|
})
|
|
806
806
|
]
|
|
807
807
|
}),
|
|
808
|
-
!$ && !
|
|
808
|
+
!$ && !M && /* @__PURE__ */ y("div", {
|
|
809
809
|
className: "text-center py-8",
|
|
810
810
|
children: [
|
|
811
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ v(u, {
|
|
812
812
|
size: 32,
|
|
813
813
|
className: "mx-auto text-text-secondary mb-3"
|
|
814
814
|
}),
|
|
815
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ v("p", {
|
|
816
816
|
className: "text-sm text-text-secondary mb-2",
|
|
817
|
-
children:
|
|
817
|
+
children: O("channel.noCredentialsConfigured", "No credentials configured for this channel")
|
|
818
818
|
}),
|
|
819
|
-
/* @__PURE__ */
|
|
819
|
+
/* @__PURE__ */ v("p", {
|
|
820
820
|
className: "text-xs text-text-secondary",
|
|
821
|
-
children:
|
|
821
|
+
children: O("channel.addCredentialsHint", "Add credentials to enable message delivery through this channel")
|
|
822
822
|
})
|
|
823
823
|
]
|
|
824
824
|
}),
|
|
825
|
-
|
|
825
|
+
M && /* @__PURE__ */ y("div", {
|
|
826
826
|
className: "space-y-4",
|
|
827
827
|
children: [
|
|
828
|
-
!
|
|
828
|
+
!K.adapterType && /* @__PURE__ */ v("div", {
|
|
829
829
|
className: "p-3 bg-accent-orange/10 border border-accent-orange/30 rounded-lg",
|
|
830
|
-
children: /* @__PURE__ */
|
|
830
|
+
children: /* @__PURE__ */ y("div", {
|
|
831
831
|
className: "flex items-start gap-2",
|
|
832
|
-
children: [/* @__PURE__ */
|
|
832
|
+
children: [/* @__PURE__ */ v(s, {
|
|
833
833
|
size: 16,
|
|
834
834
|
className: "text-accent-orange mt-0.5"
|
|
835
|
-
}), /* @__PURE__ */
|
|
835
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
836
836
|
className: "text-sm font-medium text-accent-orange",
|
|
837
|
-
children:
|
|
838
|
-
}), /* @__PURE__ */
|
|
837
|
+
children: O("channel.noAdapterTypeConfigured", "No adapter type configured")
|
|
838
|
+
}), /* @__PURE__ */ v("p", {
|
|
839
839
|
className: "text-xs text-text-secondary mt-1",
|
|
840
|
-
children:
|
|
840
|
+
children: O("channel.noAdapterTypeConfiguredHint", "You can still add credentials below. The system will attempt to validate them when the channel is configured with an adapter type.")
|
|
841
841
|
})] })]
|
|
842
842
|
})
|
|
843
843
|
}),
|
|
844
|
-
/* @__PURE__ */
|
|
845
|
-
adapterType:
|
|
846
|
-
credentials:
|
|
847
|
-
onChange:
|
|
848
|
-
onValidationChange: (e) =>
|
|
849
|
-
disabled:
|
|
844
|
+
/* @__PURE__ */ v(ee, {
|
|
845
|
+
adapterType: K.adapterType ?? void 0,
|
|
846
|
+
credentials: P,
|
|
847
|
+
onChange: F,
|
|
848
|
+
onValidationChange: (e) => I(e),
|
|
849
|
+
disabled: A === "connection"
|
|
850
850
|
}),
|
|
851
|
-
|
|
851
|
+
K.adapterType && /* @__PURE__ */ v("div", {
|
|
852
852
|
className: "pt-2",
|
|
853
|
-
children: /* @__PURE__ */
|
|
854
|
-
adapterType:
|
|
855
|
-
credentials:
|
|
853
|
+
children: /* @__PURE__ */ v(te, {
|
|
854
|
+
adapterType: K.adapterType,
|
|
855
|
+
credentials: P
|
|
856
856
|
})
|
|
857
857
|
}),
|
|
858
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ y("div", {
|
|
859
859
|
className: "flex items-center gap-2 pt-2 border-t border-border-subtle",
|
|
860
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ v(r, {
|
|
861
861
|
permission: i.CHANNEL_CONNECTION_UPDATE,
|
|
862
|
-
children: /* @__PURE__ */
|
|
862
|
+
children: /* @__PURE__ */ y("button", {
|
|
863
863
|
type: "button",
|
|
864
864
|
onClick: () => {
|
|
865
|
-
$ ?
|
|
865
|
+
$ ? tt($.id) : et();
|
|
866
866
|
},
|
|
867
|
-
disabled:
|
|
867
|
+
disabled: A === "connection" || !Ve && !!K.adapterType,
|
|
868
868
|
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 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
869
|
-
children: [
|
|
869
|
+
children: [A === "connection" ? /* @__PURE__ */ v(p, {
|
|
870
870
|
size: 16,
|
|
871
871
|
className: "animate-spin"
|
|
872
|
-
}) : /* @__PURE__ */
|
|
872
|
+
}) : /* @__PURE__ */ v(be, { size: 16 }), $ ? O("channel.updateCredentials", "Update Credentials") : O("channel.saveCredentials", "Save Credentials")]
|
|
873
873
|
})
|
|
874
|
-
}), /* @__PURE__ */
|
|
874
|
+
}), /* @__PURE__ */ y("button", {
|
|
875
875
|
type: "button",
|
|
876
876
|
onClick: () => {
|
|
877
|
-
|
|
877
|
+
N(!1), F({}), I(!1);
|
|
878
878
|
},
|
|
879
879
|
className: "flex items-center gap-2 px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
880
|
-
children: [/* @__PURE__ */
|
|
880
|
+
children: [/* @__PURE__ */ v(Ce, { size: 16 }), O("channel.cancel", "Cancel")]
|
|
881
881
|
})]
|
|
882
882
|
})
|
|
883
883
|
]
|
|
884
884
|
})
|
|
885
885
|
]
|
|
886
886
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
open:
|
|
887
|
+
/* @__PURE__ */ v(Me, {
|
|
888
|
+
open: He,
|
|
889
889
|
onOpenChange: (e) => {
|
|
890
|
-
e ||
|
|
890
|
+
e || z(!1);
|
|
891
891
|
},
|
|
892
|
-
children: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ y(Ne, {
|
|
893
893
|
className: "sm:max-w-md",
|
|
894
|
-
children: [/* @__PURE__ */
|
|
894
|
+
children: [/* @__PURE__ */ v(Pe, { children: /* @__PURE__ */ y(Fe, {
|
|
895
895
|
className: "flex items-center gap-2",
|
|
896
896
|
children: [
|
|
897
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ v(h, {
|
|
898
898
|
size: 20,
|
|
899
899
|
className: "text-accent-primary"
|
|
900
900
|
}),
|
|
901
901
|
"Test ",
|
|
902
|
-
|
|
902
|
+
x[K.platform]?.label || K.platform,
|
|
903
903
|
" Channel"
|
|
904
904
|
]
|
|
905
|
-
}) }), /* @__PURE__ */
|
|
905
|
+
}) }), /* @__PURE__ */ y("div", {
|
|
906
906
|
className: "space-y-4",
|
|
907
907
|
children: [
|
|
908
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
|
|
909
909
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
910
910
|
children: [
|
|
911
|
-
|
|
911
|
+
at(K.platform),
|
|
912
912
|
" ",
|
|
913
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ v("span", {
|
|
914
914
|
className: "text-status-error-text",
|
|
915
915
|
children: "*"
|
|
916
916
|
})
|
|
917
917
|
]
|
|
918
|
-
}), /* @__PURE__ */
|
|
918
|
+
}), /* @__PURE__ */ y("div", {
|
|
919
919
|
className: "relative",
|
|
920
|
-
children: [/* @__PURE__ */
|
|
921
|
-
"aria-label":
|
|
920
|
+
children: [/* @__PURE__ */ v("input", {
|
|
921
|
+
"aria-label": Y(K.platform),
|
|
922
922
|
type: "text",
|
|
923
|
-
value:
|
|
924
|
-
onChange: (e) =>
|
|
925
|
-
placeholder:
|
|
923
|
+
value: B,
|
|
924
|
+
onChange: (e) => V(e.target.value),
|
|
925
|
+
placeholder: Y(K.platform),
|
|
926
926
|
className: "w-full pl-9 pr-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
927
|
-
}), /* @__PURE__ */
|
|
927
|
+
}), /* @__PURE__ */ v("div", {
|
|
928
928
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
929
|
-
children:
|
|
929
|
+
children: K.platform === "EMAIL" ? /* @__PURE__ */ v(de, { size: 16 }) : K.platform === "SMS" || K.platform === "WHATSAPP" ? /* @__PURE__ */ v(me, { size: 16 }) : /* @__PURE__ */ v(fe, { size: 16 })
|
|
930
930
|
})]
|
|
931
931
|
})] }),
|
|
932
|
-
|
|
932
|
+
K.platform === "EMAIL" && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
933
933
|
htmlFor: "channel-details-test-subject",
|
|
934
934
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
935
935
|
children: "Subject"
|
|
936
|
-
}), /* @__PURE__ */
|
|
936
|
+
}), /* @__PURE__ */ v("input", {
|
|
937
937
|
id: "channel-details-test-subject",
|
|
938
938
|
"aria-label": "Email subject",
|
|
939
939
|
type: "text",
|
|
940
|
-
value:
|
|
941
|
-
onChange: (e) =>
|
|
940
|
+
value: H,
|
|
941
|
+
onChange: (e) => Ue(e.target.value),
|
|
942
942
|
placeholder: "Email subject",
|
|
943
943
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg"
|
|
944
944
|
})] }),
|
|
945
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
946
946
|
htmlFor: "channel-details-test-message",
|
|
947
947
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
948
948
|
children: "Message"
|
|
949
|
-
}), /* @__PURE__ */
|
|
949
|
+
}), /* @__PURE__ */ v("textarea", {
|
|
950
950
|
id: "channel-details-test-message",
|
|
951
951
|
"aria-label": "Test message content",
|
|
952
|
-
value:
|
|
953
|
-
onChange: (e) =>
|
|
952
|
+
value: U,
|
|
953
|
+
onChange: (e) => We(e.target.value),
|
|
954
954
|
placeholder: "Test message content",
|
|
955
955
|
rows: 3,
|
|
956
956
|
className: "w-full px-3 py-2 text-sm bg-surface border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-action-primary-bg resize-none"
|
|
957
957
|
})] }),
|
|
958
|
-
|
|
959
|
-
className: `p-3 rounded-lg ${
|
|
960
|
-
children: /* @__PURE__ */
|
|
958
|
+
W && /* @__PURE__ */ v("div", {
|
|
959
|
+
className: `p-3 rounded-lg ${W.success ? "bg-status-success-bg-subtle border border-status-success-border" : "bg-status-error-bg-subtle border border-status-error-border"}`,
|
|
960
|
+
children: /* @__PURE__ */ y("div", {
|
|
961
961
|
className: "flex items-start gap-2",
|
|
962
|
-
children: [
|
|
962
|
+
children: [W.success ? /* @__PURE__ */ v(d, {
|
|
963
963
|
size: 16,
|
|
964
964
|
className: "text-status-success-text mt-0.5"
|
|
965
|
-
}) : /* @__PURE__ */
|
|
965
|
+
}) : /* @__PURE__ */ v(_, {
|
|
966
966
|
size: 16,
|
|
967
967
|
className: "text-status-error-text mt-0.5"
|
|
968
|
-
}), /* @__PURE__ */
|
|
968
|
+
}), /* @__PURE__ */ y("div", {
|
|
969
969
|
className: "flex-1",
|
|
970
970
|
children: [
|
|
971
|
-
/* @__PURE__ */
|
|
972
|
-
className: `text-sm font-medium ${
|
|
973
|
-
children:
|
|
971
|
+
/* @__PURE__ */ v("p", {
|
|
972
|
+
className: `text-sm font-medium ${W.success ? "text-status-success-text" : "text-status-error-text"}`,
|
|
973
|
+
children: W.success ? O("channel.messageSentSuccess", "Message sent successfully!") : O("channel.messageSendFailed", "Failed to send message")
|
|
974
974
|
}),
|
|
975
|
-
|
|
975
|
+
W.messageId && /* @__PURE__ */ y("p", {
|
|
976
976
|
className: "text-xs text-success-600 mt-1",
|
|
977
|
-
children: ["Message ID: ",
|
|
977
|
+
children: ["Message ID: ", W.messageId]
|
|
978
978
|
}),
|
|
979
|
-
|
|
979
|
+
W.externalId && /* @__PURE__ */ y("p", {
|
|
980
980
|
className: "text-xs text-text-secondary mt-1",
|
|
981
|
-
children: ["External ID: ",
|
|
981
|
+
children: ["External ID: ", W.externalId]
|
|
982
982
|
}),
|
|
983
|
-
|
|
983
|
+
W.status && /* @__PURE__ */ y("p", {
|
|
984
984
|
className: "text-xs text-text-secondary mt-1",
|
|
985
|
-
children: ["Status: ",
|
|
985
|
+
children: ["Status: ", W.status]
|
|
986
986
|
}),
|
|
987
|
-
|
|
987
|
+
W.error && /* @__PURE__ */ y("p", {
|
|
988
988
|
className: "text-xs text-status-error-text mt-1",
|
|
989
|
-
children: [
|
|
989
|
+
children: [W.error.message, W.error.retryable && /* @__PURE__ */ v("span", {
|
|
990
990
|
className: "text-warning-600 ml-1",
|
|
991
991
|
children: "(will retry)"
|
|
992
992
|
})]
|
|
993
993
|
}),
|
|
994
|
-
|
|
994
|
+
W.sentAt && /* @__PURE__ */ y("p", {
|
|
995
995
|
className: "text-xs text-text-secondary mt-1",
|
|
996
|
-
children: ["Sent at: ", new Date(
|
|
996
|
+
children: ["Sent at: ", new Date(W.sentAt).toLocaleString()]
|
|
997
997
|
})
|
|
998
998
|
]
|
|
999
999
|
})]
|
|
1000
1000
|
})
|
|
1001
1001
|
}),
|
|
1002
|
-
/* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ y("div", {
|
|
1003
1003
|
className: "flex items-center gap-2 pt-2",
|
|
1004
|
-
children: [/* @__PURE__ */
|
|
1004
|
+
children: [/* @__PURE__ */ v(r, {
|
|
1005
1005
|
permission: i.CHANNEL_DELIVERY_SEND,
|
|
1006
|
-
children: /* @__PURE__ */
|
|
1006
|
+
children: /* @__PURE__ */ y("button", {
|
|
1007
1007
|
type: "button",
|
|
1008
|
-
onClick:
|
|
1009
|
-
disabled:
|
|
1008
|
+
onClick: it,
|
|
1009
|
+
disabled: A === "send-test" || !B.trim(),
|
|
1010
1010
|
className: "flex-1 flex items-center justify-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 disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1011
|
-
children: [
|
|
1011
|
+
children: [A === "send-test" ? /* @__PURE__ */ v(p, {
|
|
1012
1012
|
size: 16,
|
|
1013
1013
|
className: "animate-spin"
|
|
1014
|
-
}) : /* @__PURE__ */
|
|
1014
|
+
}) : /* @__PURE__ */ v(h, { size: 16 }), O("channel.sendTest", "Send Test")]
|
|
1015
1015
|
})
|
|
1016
|
-
}), /* @__PURE__ */
|
|
1016
|
+
}), /* @__PURE__ */ v("button", {
|
|
1017
1017
|
type: "button",
|
|
1018
|
-
onClick: () =>
|
|
1018
|
+
onClick: () => z(!1),
|
|
1019
1019
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
1020
|
-
children:
|
|
1020
|
+
children: O("channel.close", "Close")
|
|
1021
1021
|
})]
|
|
1022
1022
|
})
|
|
1023
1023
|
]
|
|
@@ -1028,7 +1028,6 @@ function D() {
|
|
|
1028
1028
|
})
|
|
1029
1029
|
});
|
|
1030
1030
|
}
|
|
1031
|
-
|
|
1032
|
-
export { D as ChannelDetailsPage };
|
|
1031
|
+
export { w as ChannelDetailsPage };
|
|
1033
1032
|
|
|
1034
1033
|
//# sourceMappingURL=ChannelDetailsPage.js.map
|