@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,17 +1,17 @@
|
|
|
1
1
|
import { useTr as e } from "../../../hooks/useTr.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useChannel as t, useChannels as n } from "../../../hooks/useChannels.js";
|
|
3
|
+
import { nativeImpact as r, nativeNotify as i } from "../../../../utils/nativeBridge.js";
|
|
4
4
|
import { PermissionGuard as a } from "../../../components/PermissionGuard.js";
|
|
5
5
|
import { CHANNEL_PERMISSIONS as o } from "../../../constants/permissions.js";
|
|
6
6
|
import { MarkdownEditor as ee } from "../../../components/MarkdownEditor.js";
|
|
7
|
-
import { useEffect as
|
|
8
|
-
import { AlertCircle as
|
|
9
|
-
import { useNavigate as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { EmphasisPanel as
|
|
12
|
-
|
|
7
|
+
import { useEffect as te, useMemo as s, useRef as c, useState as l } from "react";
|
|
8
|
+
import { AlertCircle as u, ArrowLeft as ne, Bell as re, Hash as ie, Inbox as d, Loader2 as f, Mail as p, MessageCircle as m, MessageSquare as h, Save as g, Send as ae, Smartphone as _, Trash2 as v, Users as y } from "lucide-react";
|
|
9
|
+
import { useNavigate as b, useParams as x } from "react-router";
|
|
10
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
11
|
+
import { EmphasisPanel as T, GlassCard as oe, PagePurpose as se } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
// src/channel/modules/channels/pages/EditChannelPage.tsx
|
|
13
13
|
function E() {
|
|
14
|
-
let E =
|
|
14
|
+
let E = b(), { channelId: D } = x(), { channel: O, isLoading: ce, error: le } = t(D), { updateChannel: k, deleteChannel: A } = n(), j = e(), M = s(() => [
|
|
15
15
|
{
|
|
16
16
|
value: "EMAIL",
|
|
17
17
|
labelKey: "channel.platformLabel.email",
|
|
@@ -64,7 +64,7 @@ function E() {
|
|
|
64
64
|
labelFallback: "SMS",
|
|
65
65
|
descriptionKey: "channel.platformDescription.smsDescription",
|
|
66
66
|
descriptionFallback: "Send text messages",
|
|
67
|
-
icon:
|
|
67
|
+
icon: _,
|
|
68
68
|
color: "text-status-success-text bg-status-success-bg-subtle border-status-success-border/30",
|
|
69
69
|
adapters: [
|
|
70
70
|
{
|
|
@@ -105,7 +105,7 @@ function E() {
|
|
|
105
105
|
labelFallback: "Push",
|
|
106
106
|
descriptionKey: "channel.platformDescription.pushDescription",
|
|
107
107
|
descriptionFallback: "Mobile & web push",
|
|
108
|
-
icon:
|
|
108
|
+
icon: re,
|
|
109
109
|
color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
|
|
110
110
|
adapters: [
|
|
111
111
|
{
|
|
@@ -136,7 +136,7 @@ function E() {
|
|
|
136
136
|
labelFallback: "In-App",
|
|
137
137
|
descriptionKey: "channel.platformDescription.inAppDescription",
|
|
138
138
|
descriptionFallback: "Internal in-app notifications",
|
|
139
|
-
icon:
|
|
139
|
+
icon: d,
|
|
140
140
|
color: "text-status-warning-text bg-status-warning-bg-subtle border-status-warning-border/30",
|
|
141
141
|
adapters: [{
|
|
142
142
|
value: "INAPP_NATIVE",
|
|
@@ -168,7 +168,7 @@ function E() {
|
|
|
168
168
|
labelFallback: "Slack",
|
|
169
169
|
descriptionKey: "channel.platformDescription.slackDescription",
|
|
170
170
|
descriptionFallback: "Slack bot & channels",
|
|
171
|
-
icon:
|
|
171
|
+
icon: ie,
|
|
172
172
|
color: "text-accent-purple bg-accent-purple-subtle border-accent-purple/30",
|
|
173
173
|
adapters: [{
|
|
174
174
|
value: "SLACK_BOT",
|
|
@@ -182,7 +182,7 @@ function E() {
|
|
|
182
182
|
labelFallback: "Teams",
|
|
183
183
|
descriptionKey: "channel.platformDescription.teamsDescription",
|
|
184
184
|
descriptionFallback: "Microsoft Teams",
|
|
185
|
-
icon:
|
|
185
|
+
icon: y,
|
|
186
186
|
color: "text-status-info-text bg-status-info-bg-subtle border-status-info-border",
|
|
187
187
|
adapters: [{
|
|
188
188
|
value: "TEAMS_BOT",
|
|
@@ -224,7 +224,7 @@ function E() {
|
|
|
224
224
|
labelFallback: "Webhook",
|
|
225
225
|
descriptionKey: "channel.platformDescription.webhookDescription",
|
|
226
226
|
descriptionFallback: "Generic HTTP webhook",
|
|
227
|
-
icon:
|
|
227
|
+
icon: ae,
|
|
228
228
|
color: "text-text-secondary bg-bg-sunken/50 border-border-subtle",
|
|
229
229
|
adapters: [{
|
|
230
230
|
value: "WEBHOOK_HTTP",
|
|
@@ -232,7 +232,7 @@ function E() {
|
|
|
232
232
|
labelFallback: "HTTP Webhook"
|
|
233
233
|
}]
|
|
234
234
|
}
|
|
235
|
-
], []), N =
|
|
235
|
+
], []), N = s(() => [
|
|
236
236
|
{
|
|
237
237
|
value: 0,
|
|
238
238
|
label: j("channel.priorityLabel.lowest", "0 - Lowest")
|
|
@@ -253,100 +253,100 @@ function E() {
|
|
|
253
253
|
value: 4,
|
|
254
254
|
label: j("channel.priorityLabel.highest", "4 - Highest")
|
|
255
255
|
}
|
|
256
|
-
], [j]), [P, F] =
|
|
257
|
-
|
|
256
|
+
], [j]), [P, F] = l(""), [I, L] = l(""), [R, z] = l("AWS_SES"), [B, V] = l(2), [H, U] = l("INACTIVE"), [W, G] = l(!1), [K, q] = l(!1), [J, Y] = l(null), [X, Z] = l(!1), Q = c(null);
|
|
257
|
+
te(() => {
|
|
258
258
|
O && O.id !== Q.current && (Q.current = O.id, Promise.resolve().then(() => {
|
|
259
259
|
F(O.name || ""), L(O.description || ""), z(O.adapterType || "AWS_SES"), V(O.priority || 2), U(O.status || "INACTIVE");
|
|
260
260
|
}));
|
|
261
261
|
}, [O]);
|
|
262
262
|
let ue = O?.platform || "EMAIL", $ = M.find((e) => e.value === ue);
|
|
263
|
-
return ce ? /* @__PURE__ */
|
|
263
|
+
return ce ? /* @__PURE__ */ C("div", {
|
|
264
264
|
className: "flex items-center justify-center min-h-screen",
|
|
265
|
-
children: /* @__PURE__ */
|
|
266
|
-
}) : le || !O ? /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ C(f, { className: "size-8 animate-spin text-text-secondary" })
|
|
266
|
+
}) : le || !O ? /* @__PURE__ */ w("div", {
|
|
267
267
|
className: "flex flex-col items-center justify-center min-h-screen gap-4",
|
|
268
268
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ C(u, { className: "size-12 text-status-error-text" }),
|
|
270
|
+
/* @__PURE__ */ C("h1", {
|
|
271
271
|
className: "text-xl font-semibold",
|
|
272
272
|
children: j("channel.channelNotFound", "Channel not found")
|
|
273
273
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ C("button", {
|
|
275
275
|
type: "button",
|
|
276
276
|
onClick: () => E("../list"),
|
|
277
277
|
className: "text-primary hover:underline",
|
|
278
278
|
children: j("channel.backToChannels", "Back to channels")
|
|
279
279
|
})
|
|
280
280
|
]
|
|
281
|
-
}) : /* @__PURE__ */
|
|
281
|
+
}) : /* @__PURE__ */ C(a, {
|
|
282
282
|
permission: o.CHANNEL_UPDATE,
|
|
283
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ w("div", {
|
|
284
284
|
className: "min-h-screen bg-bg-surface",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ C("div", {
|
|
286
286
|
className: "border-b bg-bg-surface",
|
|
287
|
-
children: /* @__PURE__ */
|
|
287
|
+
children: /* @__PURE__ */ C("div", {
|
|
288
288
|
className: "container mx-auto px-6 py-4",
|
|
289
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ w("div", {
|
|
290
290
|
className: "flex items-center gap-4",
|
|
291
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ C("button", {
|
|
292
292
|
type: "button",
|
|
293
293
|
onClick: () => E(`/channels/${D}`),
|
|
294
294
|
className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
|
|
295
|
-
children: /* @__PURE__ */
|
|
296
|
-
}), /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ C(ne, { className: "size-5 " })
|
|
296
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
|
|
297
297
|
className: "text-2xl font-bold",
|
|
298
298
|
children: j("channel.editChannel", "Edit Channel")
|
|
299
|
-
}), /* @__PURE__ */
|
|
299
|
+
}), /* @__PURE__ */ C("p", {
|
|
300
300
|
className: "text-sm text-text-secondary",
|
|
301
301
|
children: j("channel.updateChannelConfig", "Update channel configuration")
|
|
302
302
|
})] })]
|
|
303
303
|
})
|
|
304
304
|
})
|
|
305
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ C("div", {
|
|
306
306
|
className: "container mx-auto px-6 py-8 max-w-2xl",
|
|
307
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ w("div", {
|
|
308
308
|
className: "space-y-6",
|
|
309
309
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
icon: /* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ C(se, {
|
|
311
|
+
icon: /* @__PURE__ */ C(g, {
|
|
312
312
|
size: 15,
|
|
313
313
|
"aria-hidden": "true"
|
|
314
314
|
}),
|
|
315
315
|
children: j("channel.editChannelPurpose", "Change how this channel behaves — its name, description, priority and status. The platform and provider stay fixed (they define what the channel is); to swap credentials use the channel's connection instead. Use this to rename a channel, bump its priority, or temporarily deactivate it without deleting it.")
|
|
316
316
|
}),
|
|
317
|
-
J && /* @__PURE__ */
|
|
317
|
+
J && /* @__PURE__ */ w("div", {
|
|
318
318
|
className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ C(u, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ C("p", {
|
|
320
320
|
className: "text-sm text-status-error-text",
|
|
321
321
|
children: J
|
|
322
322
|
})]
|
|
323
323
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ w(oe, {
|
|
325
325
|
treatment: "insight",
|
|
326
326
|
className: "p-4 border-border-seam space-y-2",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ C("div", {
|
|
328
328
|
className: "flex items-center gap-2",
|
|
329
|
-
children: $ && /* @__PURE__ */
|
|
329
|
+
children: $ && /* @__PURE__ */ w(S, { children: [(() => {
|
|
330
330
|
let e = $.icon;
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
})(), /* @__PURE__ */
|
|
331
|
+
return /* @__PURE__ */ C(e, { className: "size-5 text-text-secondary" });
|
|
332
|
+
})(), /* @__PURE__ */ C("span", {
|
|
333
333
|
className: "font-medium",
|
|
334
334
|
children: j($.labelKey, $.labelFallback)
|
|
335
335
|
})] })
|
|
336
|
-
}), /* @__PURE__ */
|
|
336
|
+
}), /* @__PURE__ */ C("p", {
|
|
337
337
|
className: "text-sm text-text-secondary",
|
|
338
338
|
children: j("channel.platformLockedHint", "Platform cannot be changed after channel creation. Create a new channel to use a different platform.")
|
|
339
339
|
})]
|
|
340
340
|
}),
|
|
341
|
-
/* @__PURE__ */ T
|
|
341
|
+
/* @__PURE__ */ w(T, {
|
|
342
342
|
className: "p-5 space-y-6",
|
|
343
343
|
children: [
|
|
344
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ w("div", {
|
|
345
345
|
className: "space-y-2",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ w("label", {
|
|
347
347
|
className: "text-sm font-medium",
|
|
348
348
|
children: [j("channel.channelName", "Channel Name"), " *"]
|
|
349
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ C("input", {
|
|
350
350
|
"aria-label": j("channel.editNamePlaceholder", "e.g., Production Email, Customer SMS"),
|
|
351
351
|
type: "text",
|
|
352
352
|
value: P,
|
|
@@ -355,13 +355,13 @@ function E() {
|
|
|
355
355
|
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
|
|
356
356
|
})]
|
|
357
357
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ w("div", {
|
|
359
359
|
className: "space-y-2",
|
|
360
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ C("label", {
|
|
361
361
|
htmlFor: "channel-edit-description",
|
|
362
362
|
className: "text-sm font-medium",
|
|
363
363
|
children: j("channel.description", "Description")
|
|
364
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ C(ee, {
|
|
365
365
|
id: "channel-edit-description",
|
|
366
366
|
value: I,
|
|
367
367
|
onChange: L,
|
|
@@ -370,63 +370,63 @@ function E() {
|
|
|
370
370
|
rows: 3
|
|
371
371
|
})]
|
|
372
372
|
}),
|
|
373
|
-
$ && /* @__PURE__ */
|
|
373
|
+
$ && /* @__PURE__ */ w("div", {
|
|
374
374
|
className: "space-y-2",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
375
|
+
children: [/* @__PURE__ */ C("label", {
|
|
376
376
|
className: "text-sm font-medium",
|
|
377
377
|
children: j("channel.adapterProvider", "Adapter / Provider")
|
|
378
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ C("select", {
|
|
379
379
|
value: R,
|
|
380
380
|
onChange: (e) => z(e.target.value),
|
|
381
|
-
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
|
|
382
|
-
children: $.adapters.map((e) => /* @__PURE__ */
|
|
381
|
+
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
382
|
+
children: $.adapters.map((e) => /* @__PURE__ */ C("option", {
|
|
383
383
|
value: e.value,
|
|
384
384
|
children: j(e.labelKey, e.labelFallback)
|
|
385
385
|
}, e.value))
|
|
386
386
|
})]
|
|
387
387
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ w("div", {
|
|
389
389
|
className: "grid grid-cols-2 gap-4",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ w("div", {
|
|
391
391
|
className: "space-y-2",
|
|
392
392
|
children: [
|
|
393
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ C("label", {
|
|
394
394
|
className: "text-sm font-medium",
|
|
395
395
|
children: j("channel.priority", "Priority")
|
|
396
396
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ C("select", {
|
|
398
398
|
value: B,
|
|
399
399
|
onChange: (e) => V(Number(e.target.value)),
|
|
400
|
-
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
|
|
401
|
-
children: N.map((e) => /* @__PURE__ */
|
|
400
|
+
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
401
|
+
children: N.map((e) => /* @__PURE__ */ C("option", {
|
|
402
402
|
value: e.value,
|
|
403
403
|
children: e.label
|
|
404
404
|
}, e.value))
|
|
405
405
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ C("p", {
|
|
407
407
|
className: "text-xs text-text-secondary",
|
|
408
408
|
children: j("channel.priorityFailoverHint", "Higher priority channels are used first in failover")
|
|
409
409
|
})
|
|
410
410
|
]
|
|
411
|
-
}), /* @__PURE__ */
|
|
411
|
+
}), /* @__PURE__ */ w("div", {
|
|
412
412
|
className: "space-y-2",
|
|
413
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ C("label", {
|
|
414
414
|
className: "text-sm font-medium",
|
|
415
415
|
children: j("channel.status", "Status")
|
|
416
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ w("select", {
|
|
417
417
|
value: H,
|
|
418
418
|
onChange: (e) => U(e.target.value),
|
|
419
|
-
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
|
|
419
|
+
className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
420
420
|
children: [
|
|
421
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ C("option", {
|
|
422
422
|
value: "INACTIVE",
|
|
423
423
|
children: j("channel.statusLabel.inactive", "Inactive")
|
|
424
424
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ C("option", {
|
|
426
426
|
value: "ACTIVE",
|
|
427
427
|
children: j("channel.statusLabel.active", "Active")
|
|
428
428
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ C("option", {
|
|
430
430
|
value: "SUSPENDED",
|
|
431
431
|
children: j("channel.statusLabel.suspended", "Suspended")
|
|
432
432
|
})
|
|
@@ -436,80 +436,83 @@ function E() {
|
|
|
436
436
|
})
|
|
437
437
|
]
|
|
438
438
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ w("div", {
|
|
440
440
|
className: "flex items-center justify-between pt-6 border-t",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
441
|
+
children: [/* @__PURE__ */ C("div", { children: X ? /* @__PURE__ */ w("div", {
|
|
442
442
|
className: "flex items-center gap-2",
|
|
443
443
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ C("span", {
|
|
445
445
|
className: "text-sm text-text-secondary",
|
|
446
446
|
children: j("channel.confirmDelete", "Confirm delete?")
|
|
447
447
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ w("button", {
|
|
449
449
|
type: "button",
|
|
450
450
|
onClick: async () => {
|
|
451
|
-
if (
|
|
452
|
-
|
|
451
|
+
if (D && X) {
|
|
452
|
+
r("medium"), q(!0);
|
|
453
453
|
try {
|
|
454
|
-
await A(D) ? (
|
|
454
|
+
await A(D) ? (i("success"), E("../list")) : i("error");
|
|
455
455
|
} catch (e) {
|
|
456
|
-
|
|
456
|
+
i("error");
|
|
457
|
+
let t = e instanceof Error ? e.message : j("channel.deleteFailed", "Failed to delete channel");
|
|
458
|
+
Y(t), q(!1);
|
|
457
459
|
}
|
|
458
460
|
}
|
|
459
461
|
},
|
|
460
462
|
disabled: K,
|
|
461
463
|
className: "px-4 py-2 text-sm bg-status-error-bg text-status-error-text rounded-lg hover:bg-status-error-bg/90 transition-colors flex items-center gap-2",
|
|
462
|
-
children: [K ? /* @__PURE__ */
|
|
464
|
+
children: [K ? /* @__PURE__ */ C(f, { className: "size-4 animate-spin" }) : /* @__PURE__ */ C(v, { className: "size-4 " }), j("channel.delete", "Delete")]
|
|
463
465
|
}),
|
|
464
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ C("button", {
|
|
465
467
|
type: "button",
|
|
466
468
|
onClick: () => Z(!1),
|
|
467
469
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
468
470
|
children: j("channel.cancel", "Cancel")
|
|
469
471
|
})
|
|
470
472
|
]
|
|
471
|
-
}) : /* @__PURE__ */
|
|
473
|
+
}) : /* @__PURE__ */ C(a, {
|
|
472
474
|
permission: o.CHANNEL_DELETE,
|
|
473
|
-
children: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ w("button", {
|
|
474
476
|
type: "button",
|
|
475
477
|
onClick: () => Z(!0),
|
|
476
478
|
className: "px-4 py-2 text-sm text-status-error-text hover:bg-status-error-bg/10 rounded-lg transition-colors flex items-center gap-2",
|
|
477
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ C(v, { className: "size-4 " }), j("channel.deleteChannel", "Delete Channel")]
|
|
478
480
|
})
|
|
479
|
-
}) }), /* @__PURE__ */
|
|
481
|
+
}) }), /* @__PURE__ */ w("div", {
|
|
480
482
|
className: "flex items-center gap-3",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
483
|
+
children: [/* @__PURE__ */ C("button", {
|
|
482
484
|
type: "button",
|
|
483
485
|
onClick: () => E(`/channels/${D}`),
|
|
484
486
|
className: "px-4 py-2 text-sm text-text-secondary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
485
487
|
children: j("channel.cancel", "Cancel")
|
|
486
|
-
}), /* @__PURE__ */
|
|
488
|
+
}), /* @__PURE__ */ w("button", {
|
|
487
489
|
type: "button",
|
|
488
490
|
onClick: async () => {
|
|
489
491
|
if (D) {
|
|
490
|
-
if (!P.trim())
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
492
|
+
if (!P.trim()) Y(j("channel.validation.nameRequired", "Channel name is required"));
|
|
493
|
+
else {
|
|
494
|
+
G(!0), Y(null);
|
|
495
|
+
try {
|
|
496
|
+
let e = {
|
|
497
|
+
name: P.trim(),
|
|
498
|
+
description: I.trim() || void 0,
|
|
499
|
+
adapterType: R,
|
|
500
|
+
priority: B,
|
|
501
|
+
status: H
|
|
502
|
+
};
|
|
503
|
+
await k(D, e) ? E(`/channels/${D}`) : Y(j("channel.updateFailed", "Failed to update channel"));
|
|
504
|
+
} catch (e) {
|
|
505
|
+
let t = e instanceof Error ? e.message : j("channel.updateFailed", "Failed to update channel");
|
|
506
|
+
Y(t);
|
|
507
|
+
} finally {
|
|
508
|
+
G(!1);
|
|
509
|
+
}
|
|
507
510
|
}
|
|
508
511
|
}
|
|
509
512
|
},
|
|
510
513
|
disabled: W || !P.trim(),
|
|
511
514
|
className: "px-6 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors flex items-center gap-2 disabled:opacity-50",
|
|
512
|
-
children: [W ? /* @__PURE__ */
|
|
515
|
+
children: [W ? /* @__PURE__ */ C(f, { className: "size-4 animate-spin" }) : /* @__PURE__ */ C(g, { className: "size-4 " }), j("channel.saveChanges", "Save Changes")]
|
|
513
516
|
})]
|
|
514
517
|
})]
|
|
515
518
|
})
|
|
@@ -519,7 +522,6 @@ function E() {
|
|
|
519
522
|
})
|
|
520
523
|
});
|
|
521
524
|
}
|
|
522
|
-
//#endregion
|
|
523
525
|
export { E as EditChannelPage };
|
|
524
526
|
|
|
525
527
|
//# sourceMappingURL=EditChannelPage.js.map
|