@burdenoff/microfe-channel 2026.1013.2 → 2026.1114.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/dist/channel/ChannelRoot.d.ts +0 -2
  2. package/dist/channel/ChannelRoot.js +9 -6
  3. package/dist/channel/ChannelRoot.js.map +1 -1
  4. package/dist/channel/ChannelRoutes.d.ts +1 -2
  5. package/dist/channel/ChannelRoutes.js +5 -6
  6. package/dist/channel/ChannelRoutes.js.map +1 -1
  7. package/dist/channel/components/AdapterCredentialsForm.d.ts +2 -4
  8. package/dist/channel/components/AdapterCredentialsForm.js +1 -2
  9. package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
  10. package/dist/channel/components/FeatureNotEnabled.d.ts +1 -2
  11. package/dist/channel/components/FeatureNotEnabled.js +1 -2
  12. package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
  13. package/dist/channel/components/MarkdownEditor.d.ts +1 -2
  14. package/dist/channel/components/MarkdownEditor.js +2 -5
  15. package/dist/channel/components/MarkdownEditor.js.map +1 -1
  16. package/dist/channel/components/PermissionGuard.d.ts +0 -2
  17. package/dist/channel/components/PermissionGuard.js +1 -2
  18. package/dist/channel/components/PermissionGuard.js.map +1 -1
  19. package/dist/channel/config/adapterCredentials.d.ts +0 -2
  20. package/dist/channel/config/adapterCredentials.js +3 -7
  21. package/dist/channel/config/adapterCredentials.js.map +1 -1
  22. package/dist/channel/constants/permissions.d.ts +0 -1
  23. package/dist/channel/constants/permissions.js +1 -2
  24. package/dist/channel/constants/permissions.js.map +1 -1
  25. package/dist/channel/graphql/global-client.d.ts +0 -2
  26. package/dist/channel/graphql/global-client.js +5 -6
  27. package/dist/channel/graphql/global-client.js.map +1 -1
  28. package/dist/channel/hooks/useChannelOrgSettings.d.ts +0 -2
  29. package/dist/channel/hooks/useChannelOrgSettings.js +20 -21
  30. package/dist/channel/hooks/useChannelOrgSettings.js.map +1 -1
  31. package/dist/channel/hooks/useChannelSubscription.d.ts +0 -1
  32. package/dist/channel/hooks/useChannelSubscription.js +7 -12
  33. package/dist/channel/hooks/useChannelSubscription.js.map +1 -1
  34. package/dist/channel/hooks/useChannels.d.ts +20 -30
  35. package/dist/channel/hooks/useChannels.js +100 -101
  36. package/dist/channel/hooks/useChannels.js.map +1 -1
  37. package/dist/channel/hooks/useTr.d.ts +0 -1
  38. package/dist/channel/hooks/useTr.js +1 -2
  39. package/dist/channel/hooks/useTr.js.map +1 -1
  40. package/dist/channel/index.d.ts +0 -1
  41. package/dist/channel/index.js +3 -2
  42. package/dist/channel/modules/channels/hooks/useExport.d.ts +0 -2
  43. package/dist/channel/modules/channels/hooks/useExport.js +77 -80
  44. package/dist/channel/modules/channels/hooks/useExport.js.map +1 -1
  45. package/dist/channel/modules/channels/i18n.d.ts +0 -2
  46. package/dist/channel/modules/channels/i18n.js +1 -2
  47. package/dist/channel/modules/channels/i18n.js.map +1 -1
  48. package/dist/channel/modules/channels/pages/ChannelDashboardPage.d.ts +1 -2
  49. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +10 -11
  50. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  51. package/dist/channel/modules/channels/pages/ChannelDetailsPage.d.ts +1 -2
  52. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js +400 -401
  53. package/dist/channel/modules/channels/pages/ChannelDetailsPage.js.map +1 -1
  54. package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts +1 -2
  55. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +8 -7
  56. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  57. package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts +1 -2
  58. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +5 -10
  59. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  60. package/dist/channel/modules/channels/pages/ChannelsListPage.d.ts +1 -2
  61. package/dist/channel/modules/channels/pages/ChannelsListPage.js +287 -288
  62. package/dist/channel/modules/channels/pages/ChannelsListPage.js.map +1 -1
  63. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts +1 -2
  64. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +11 -12
  65. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  66. package/dist/channel/modules/channels/pages/ConnectionsListPage.d.ts +1 -2
  67. package/dist/channel/modules/channels/pages/ConnectionsListPage.js +1 -2
  68. package/dist/channel/modules/channels/pages/ConnectionsListPage.js.map +1 -1
  69. package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts +1 -2
  70. package/dist/channel/modules/channels/pages/CreateChannelPage.js +4 -5
  71. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  72. package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts +1 -2
  73. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +37 -38
  74. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  75. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.d.ts +1 -2
  76. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js +7 -12
  77. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.js.map +1 -1
  78. package/dist/channel/modules/channels/pages/EditChannelPage.d.ts +1 -2
  79. package/dist/channel/modules/channels/pages/EditChannelPage.js +105 -103
  80. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  81. package/dist/channel/modules/channels/pages/EditConnectionPage.d.ts +1 -2
  82. package/dist/channel/modules/channels/pages/EditConnectionPage.js +22 -23
  83. package/dist/channel/modules/channels/pages/EditConnectionPage.js.map +1 -1
  84. package/dist/channel/modules/channels/pages/SendMessagePage.d.ts +1 -2
  85. package/dist/channel/modules/channels/pages/SendMessagePage.js +180 -187
  86. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  87. package/dist/channel/modules/channels/pages/WebhookEventsPage.d.ts +1 -2
  88. package/dist/channel/modules/channels/pages/WebhookEventsPage.js +144 -149
  89. package/dist/channel/modules/channels/pages/WebhookEventsPage.js.map +1 -1
  90. package/dist/channel/pages/ChannelLandingPage.d.ts +1 -2
  91. package/dist/channel/pages/ChannelLandingPage.js +20 -21
  92. package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
  93. package/dist/channel/providers/ChannelProvider.d.ts +0 -2
  94. package/dist/channel/providers/ChannelProvider.js +1 -2
  95. package/dist/channel/providers/ChannelProvider.js.map +1 -1
  96. package/dist/channel/types/index.d.ts +0 -2
  97. package/dist/channel/utils/shellBridge.d.ts +0 -1
  98. package/dist/channel/utils/shellBridge.js +1 -2
  99. package/dist/channel/utils/shellBridge.js.map +1 -1
  100. package/dist/dev/App.d.ts +1 -2
  101. package/dist/dev/main.d.ts +0 -2
  102. package/dist/generated/global-operations.d.ts +885 -336
  103. package/dist/generated/global-operations.js +2 -3
  104. package/dist/generated/global-operations.js.map +1 -1
  105. package/dist/generated/global-types.d.ts +2 -22
  106. package/dist/generated/global-types.js +1 -2
  107. package/dist/generated/global-types.js.map +1 -1
  108. package/dist/generated/wspace-operations.d.ts +4 -2
  109. package/dist/generated/wspace-types.d.ts +4 -24
  110. package/dist/index.d.ts +0 -1
  111. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
  112. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
  113. package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
  114. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
  115. package/dist/translations/en.d.ts +0 -1
  116. package/dist/utils/nativeBridge.d.ts +0 -1
  117. package/dist/utils/nativeBridge.js +1 -2
  118. package/package.json +65 -43
  119. package/dist/channel/ChannelRoot.d.ts.map +0 -1
  120. package/dist/channel/ChannelRoutes.d.ts.map +0 -1
  121. package/dist/channel/components/AdapterCredentialsForm.d.ts.map +0 -1
  122. package/dist/channel/components/FeatureNotEnabled.d.ts.map +0 -1
  123. package/dist/channel/components/MarkdownEditor.d.ts.map +0 -1
  124. package/dist/channel/components/PermissionGuard.d.ts.map +0 -1
  125. package/dist/channel/config/adapterCredentials.d.ts.map +0 -1
  126. package/dist/channel/constants/permissions.d.ts.map +0 -1
  127. package/dist/channel/graphql/global-client.d.ts.map +0 -1
  128. package/dist/channel/hooks/useChannelOrgSettings.d.ts.map +0 -1
  129. package/dist/channel/hooks/useChannelSubscription.d.ts.map +0 -1
  130. package/dist/channel/hooks/useChannels.d.ts.map +0 -1
  131. package/dist/channel/hooks/useTr.d.ts.map +0 -1
  132. package/dist/channel/index.d.ts.map +0 -1
  133. package/dist/channel/modules/channels/hooks/useExport.d.ts.map +0 -1
  134. package/dist/channel/modules/channels/i18n.d.ts.map +0 -1
  135. package/dist/channel/modules/channels/pages/ChannelDashboardPage.d.ts.map +0 -1
  136. package/dist/channel/modules/channels/pages/ChannelDetailsPage.d.ts.map +0 -1
  137. package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +0 -1
  138. package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +0 -1
  139. package/dist/channel/modules/channels/pages/ChannelsListPage.d.ts.map +0 -1
  140. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +0 -1
  141. package/dist/channel/modules/channels/pages/ConnectionsListPage.d.ts.map +0 -1
  142. package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts.map +0 -1
  143. package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts.map +0 -1
  144. package/dist/channel/modules/channels/pages/DeliveryHistoryPage.d.ts.map +0 -1
  145. package/dist/channel/modules/channels/pages/EditChannelPage.d.ts.map +0 -1
  146. package/dist/channel/modules/channels/pages/EditConnectionPage.d.ts.map +0 -1
  147. package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +0 -1
  148. package/dist/channel/modules/channels/pages/WebhookEventsPage.d.ts.map +0 -1
  149. package/dist/channel/pages/ChannelLandingPage.d.ts.map +0 -1
  150. package/dist/channel/providers/ChannelProvider.d.ts.map +0 -1
  151. package/dist/channel/types/index.d.ts.map +0 -1
  152. package/dist/channel/utils/shellBridge.d.ts.map +0 -1
  153. package/dist/dev/App.d.ts.map +0 -1
  154. package/dist/dev/main.d.ts.map +0 -1
  155. package/dist/generated/global-operations.d.ts.map +0 -1
  156. package/dist/generated/global-types.d.ts.map +0 -1
  157. package/dist/generated/wspace-operations.d.ts.map +0 -1
  158. package/dist/generated/wspace-types.d.ts.map +0 -1
  159. package/dist/index.d.ts.map +0 -1
  160. package/dist/translations/en.d.ts.map +0 -1
  161. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1,130 +1,124 @@
1
1
  import { useTr as e } from "../../../hooks/useTr.js";
2
2
  import { useChannel as t } from "../../../providers/ChannelProvider.js";
3
- import { getGlobalChannelClient as n } from "../../../graphql/global-client.js";
4
- import { useSendNotificationMutation as r } from "../../../../generated/global-operations.js";
5
- import { useChannels as i } from "../../../hooks/useChannels.js";
6
- import { PermissionGuard as ee } from "../../../components/PermissionGuard.js";
7
- import { CHANNEL_PERMISSIONS as te } from "../../../constants/permissions.js";
8
- import { PLATFORM_I18N as a, translateLabel as o } from "../i18n.js";
9
- import { NotificationChannel as ne, NotificationPriority as s } from "../../../../generated/global-types.js";
3
+ import { useChannels as n } from "../../../hooks/useChannels.js";
4
+ import { PLATFORM_I18N as r, translateLabel as i } from "../i18n.js";
5
+ import { getGlobalChannelClient as ee } from "../../../graphql/global-client.js";
6
+ import { useSendNotificationMutation as te } from "../../../../generated/global-operations.js";
7
+ import { NotificationChannel as a, NotificationPriority as o } from "../../../../generated/global-types.js";
8
+ import { PermissionGuard as s } from "../../../components/PermissionGuard.js";
9
+ import { CHANNEL_PERMISSIONS as ne } from "../../../constants/permissions.js";
10
10
  import { MarkdownEditor as re } from "../../../components/MarkdownEditor.js";
11
- import { useCallback as c, useRef as ie, useState as l } from "react";
12
- import { AlertCircle as u, ArrowLeft as ae, Bell as d, CheckCircle2 as f, Hash as p, Loader2 as oe, Mail as m, MessageCircle as h, MessageSquare as g, Plus as _, Send as v, Smartphone as y, Users as b, X as x, XCircle as S } from "lucide-react";
13
- import { useNavigate as C } from "react-router";
11
+ import { useCallback as c, useRef as l, useState as u } from "react";
12
+ import { AlertCircle as d, ArrowLeft as ie, Bell as f, CheckCircle2 as p, Hash as m, Loader2 as h, Mail as g, MessageCircle as _, MessageSquare as v, Plus as y, Send as b, Smartphone as x, Users as S, X as C, XCircle as ae } from "lucide-react";
13
+ import { useNavigate as oe } from "react-router";
14
14
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
15
15
  import { EmphasisPanel as se, GlassCard as D, IllustratedEmptyState as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
16
- //#region src/channel/modules/channels/pages/SendMessagePage.tsx
16
+ // src/channel/modules/channels/pages/SendMessagePage.tsx
17
17
  var A = {
18
- EMAIL: m,
19
- SMS: y,
20
- PUSH: d,
21
- WHATSAPP: g,
22
- SLACK: p,
23
- TEAMS: b,
24
- DISCORD: h,
25
- INAPP: d,
26
- WEBCHAT: g,
27
- WEBHOOK: v
18
+ EMAIL: g,
19
+ SMS: x,
20
+ PUSH: f,
21
+ WHATSAPP: v,
22
+ SLACK: m,
23
+ TEAMS: S,
24
+ DISCORD: _,
25
+ INAPP: f,
26
+ WEBCHAT: v,
27
+ WEBHOOK: b
28
28
  };
29
29
  function j() {
30
- let d = C(), { channels: p } = i(), { organizationId: m, authToken: h, apiGatewayUrl: g } = t(), y = e(), [b, { loading: j }] = r({ client: n(g, h, m) }), [M, N] = l(""), [P, ce] = l("EMAIL"), [F, I] = l([]), le = ie(0), [L, R] = l(""), [z, B] = l(""), [V, H] = l(""), [U, W] = l(""), [G, ue] = l(s.Medium), [K, q] = l(null), [J, Y] = l(null), X = p.filter((e) => e.platform === P), Z = c(() => {
31
- if (!L.trim()) return;
30
+ let f = oe(), { channels: m } = n(), { organizationId: g, authToken: _, apiGatewayUrl: v } = t(), x = e(), S = ee(v, _, g), [j, { loading: M }] = te({ client: S }), [N, P] = u(""), [F, ce] = u("EMAIL"), [I, L] = u([]), le = l(0), [R, z] = u(""), [B, V] = u(""), [H, U] = u(""), [W, G] = u(""), [K, ue] = u(o.Medium), [q, J] = u(null), [Y, X] = u(null), Z = m.filter((e) => e.platform === F), de = c(() => {
31
+ if (!R.trim()) return;
32
32
  let e = {
33
33
  id: `r-${++le.current}`,
34
- address: L.trim(),
35
- name: z.trim() || void 0
34
+ address: R.trim(),
35
+ name: B.trim() || void 0
36
36
  };
37
- I((t) => [...t, e]), R(""), B("");
38
- }, [L, z]), de = c((e) => {
39
- I((t) => t.filter((t) => t.id !== e));
40
- }, []), fe = c(() => {
41
- q(null), Y(null), H(""), W(""), I([]);
42
- }, []), pe = async () => {
43
- if (!M) {
44
- Y(y("channel.validation.selectChannel", "Please select a channel"));
45
- return;
46
- }
47
- if (F.length === 0) {
48
- Y(y("channel.validation.addRecipient", "Please add at least one recipient"));
49
- return;
50
- }
51
- if (!U.trim()) {
52
- Y(y("channel.validation.enterMessage", "Please enter a message"));
53
- return;
54
- }
55
- Y(null), q(null);
56
- try {
57
- let e = p.find((e) => e.id === M);
58
- if (!e) {
59
- Y(y("channel.error.channelNotFound", "Selected channel not found"));
60
- return;
61
- }
62
- let t = P === "INAPP" ? ne.InApp : P;
63
- q(await Promise.all(F.map(async (n) => {
64
- let r = {};
65
- switch (P) {
66
- case "EMAIL":
67
- r.email = n.address;
68
- break;
69
- case "SMS":
70
- case "WHATSAPP":
71
- r.phoneNumber = n.address;
72
- break;
73
- case "PUSH":
74
- r.pushToken = n.address;
75
- break;
76
- case "SLACK":
77
- r.slackUserId = n.address;
78
- break;
79
- case "TEAMS":
80
- r.teamsUserId = n.address;
81
- break;
82
- case "WEBHOOK":
83
- r.webhookUrl = n.address;
84
- break;
85
- default: r.email = n.address;
37
+ L((t) => [...t, e]), z(""), V("");
38
+ }, [R, B]), fe = c((e) => {
39
+ L((t) => t.filter((t) => t.id !== e));
40
+ }, []), pe = c(() => {
41
+ J(null), X(null), U(""), G(""), L([]);
42
+ }, []), me = async () => {
43
+ if (!N) X(x("channel.validation.selectChannel", "Please select a channel"));
44
+ else if (I.length === 0) X(x("channel.validation.addRecipient", "Please add at least one recipient"));
45
+ else if (!W.trim()) X(x("channel.validation.enterMessage", "Please enter a message"));
46
+ else {
47
+ X(null), J(null);
48
+ try {
49
+ let e = m.find((e) => e.id === N);
50
+ if (!e) {
51
+ X(x("channel.error.channelNotFound", "Selected channel not found"));
52
+ return;
86
53
  }
87
- let i = {
88
- channelId: e.id,
89
- platform: t,
90
- notification: {
91
- body: U,
92
- channel: t,
93
- recipient: r,
94
- subject: P === "EMAIL" ? V : void 0,
95
- priority: G
54
+ let t = F === "INAPP" ? a.InApp : F, n = await Promise.all(I.map(async (n) => {
55
+ let r = {};
56
+ switch (F) {
57
+ case "EMAIL":
58
+ r.email = n.address;
59
+ break;
60
+ case "SMS":
61
+ case "WHATSAPP":
62
+ r.phoneNumber = n.address;
63
+ break;
64
+ case "PUSH":
65
+ r.pushToken = n.address;
66
+ break;
67
+ case "SLACK":
68
+ r.slackUserId = n.address;
69
+ break;
70
+ case "TEAMS":
71
+ r.teamsUserId = n.address;
72
+ break;
73
+ case "WEBHOOK":
74
+ r.webhookUrl = n.address;
75
+ break;
76
+ default: r.email = n.address;
96
77
  }
97
- };
98
- try {
99
- let e = await b({ variables: { input: i } });
100
- if (e.data?.triggerNotification) {
101
- let t = e.data.triggerNotification, r = t.status === "FAILED" || t.triggerStatus === "FAILED", i = t.errorMessage || t.errorCode;
78
+ let i = {
79
+ channelId: e.id,
80
+ platform: t,
81
+ notification: {
82
+ body: W,
83
+ channel: t,
84
+ recipient: r,
85
+ subject: F === "EMAIL" ? H : void 0,
86
+ priority: K
87
+ }
88
+ };
89
+ try {
90
+ let e = await j({ variables: { input: i } });
91
+ if (e.data?.triggerNotification) {
92
+ let t = e.data.triggerNotification, r = t.status === "FAILED" || t.triggerStatus === "FAILED", i = t.errorMessage || t.errorCode;
93
+ return {
94
+ recipientId: n.id,
95
+ success: !r,
96
+ messageId: t.id,
97
+ error: r ? i ? x("channel.deliveryFailedWithDetail", "Delivery failed: {{detail}}", { detail: i }) : x("channel.deliveryFailed", "Delivery failed") : void 0
98
+ };
99
+ }
100
+ return {
101
+ recipientId: n.id,
102
+ success: !1,
103
+ error: e.error?.message || x("channel.sendNotificationFailed", "Failed to send notification")
104
+ };
105
+ } catch (e) {
102
106
  return {
103
107
  recipientId: n.id,
104
- success: !r,
105
- messageId: t.id,
106
- error: r ? i ? y("channel.deliveryFailedWithDetail", "Delivery failed: {{detail}}", { detail: i }) : y("channel.deliveryFailed", "Delivery failed") : void 0
108
+ success: !1,
109
+ error: e instanceof Error ? e.message : x("channel.sendNotificationFailed", "Failed to send notification")
107
110
  };
108
111
  }
109
- return {
110
- recipientId: n.id,
111
- success: !1,
112
- error: e.error?.message || y("channel.sendNotificationFailed", "Failed to send notification")
113
- };
114
- } catch (e) {
115
- return {
116
- recipientId: n.id,
117
- success: !1,
118
- error: e instanceof Error ? e.message : y("channel.sendNotificationFailed", "Failed to send notification")
119
- };
120
- }
121
- })));
122
- } catch (e) {
123
- Y(e instanceof Error ? e.message : y("channel.messageSendFailed", "Failed to send message"));
112
+ }));
113
+ J(n);
114
+ } catch (e) {
115
+ let t = e instanceof Error ? e.message : x("channel.messageSendFailed", "Failed to send message");
116
+ X(t);
117
+ }
124
118
  }
125
- }, Q = K?.filter((e) => e.success).length ?? 0, $ = K?.filter((e) => !e.success).length ?? 0;
126
- return /* @__PURE__ */ T(ee, {
127
- permission: te.CHANNEL_DELIVERY_SEND,
119
+ }, Q = q?.filter((e) => e.success).length ?? 0, $ = q?.filter((e) => !e.success).length ?? 0;
120
+ return /* @__PURE__ */ T(s, {
121
+ permission: ne.CHANNEL_DELIVERY_SEND,
128
122
  children: /* @__PURE__ */ E("div", {
129
123
  className: "min-h-screen bg-bg-surface",
130
124
  children: [/* @__PURE__ */ T("div", {
@@ -135,41 +129,41 @@ function j() {
135
129
  className: "flex items-center gap-4",
136
130
  children: [/* @__PURE__ */ T("button", {
137
131
  type: "button",
138
- onClick: () => d("/channels/list"),
132
+ onClick: () => f("/channels/list"),
139
133
  className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
140
- children: /* @__PURE__ */ T(ae, { className: "size-5 " })
134
+ children: /* @__PURE__ */ T(ie, { className: "size-5 " })
141
135
  }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
142
136
  className: "text-2xl font-bold",
143
- children: y("channel.sendMessage", "Send Message")
137
+ children: x("channel.sendMessage", "Send Message")
144
138
  }), /* @__PURE__ */ T("p", {
145
139
  className: "text-sm text-text-secondary",
146
- children: y("channel.sendMessageSubtitle", "Send notifications through configured channels")
140
+ children: x("channel.sendMessageSubtitle", "Send notifications through configured channels")
147
141
  })] })]
148
142
  })
149
143
  })
150
144
  }), /* @__PURE__ */ E("div", {
151
145
  className: "container mx-auto px-6 py-8 max-w-3xl space-y-6",
152
146
  children: [/* @__PURE__ */ T(k, {
153
- icon: /* @__PURE__ */ T(v, {
147
+ icon: /* @__PURE__ */ T(b, {
154
148
  size: 15,
155
149
  "aria-hidden": "true"
156
150
  }),
157
- children: y("channel.sendMessagePurpose", "Compose and fire off a one-off notification through any configured channel — handy for testing a freshly set-up channel, sending a quick announcement, or reproducing a delivery problem. Pick the platform and channel, add one or more recipients, write your message, and send; you will get a per-recipient success/failure breakdown so you know exactly what got through.")
158
- }), K === null ? /* @__PURE__ */ E("div", {
151
+ children: x("channel.sendMessagePurpose", "Compose and fire off a one-off notification through any configured channel — handy for testing a freshly set-up channel, sending a quick announcement, or reproducing a delivery problem. Pick the platform and channel, add one or more recipients, write your message, and send; you will get a per-recipient success/failure breakdown so you know exactly what got through.")
152
+ }), q === null ? /* @__PURE__ */ E("div", {
159
153
  className: "space-y-6",
160
154
  children: [
161
- J && /* @__PURE__ */ E("div", {
155
+ Y && /* @__PURE__ */ E("div", {
162
156
  className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
163
- children: [/* @__PURE__ */ T(u, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ T("p", {
157
+ children: [/* @__PURE__ */ T(d, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ T("p", {
164
158
  className: "text-sm text-status-error-text",
165
- children: J
159
+ children: Y
166
160
  })]
167
161
  }),
168
162
  /* @__PURE__ */ E("div", {
169
163
  className: "space-y-3",
170
164
  children: [/* @__PURE__ */ T("label", {
171
165
  className: "text-sm font-medium",
172
- children: y("channel.platform", "Platform")
166
+ children: x("channel.platform", "Platform")
173
167
  }), /* @__PURE__ */ T("div", {
174
168
  className: "flex flex-wrap gap-2",
175
169
  children: [
@@ -181,16 +175,16 @@ function j() {
181
175
  "TEAMS",
182
176
  "WEBHOOK"
183
177
  ].map((e) => {
184
- let t = A[e] || v;
178
+ let t = A[e] || b;
185
179
  return /* @__PURE__ */ E("button", {
186
180
  type: "button",
187
181
  onClick: () => {
188
- ce(e), N("");
182
+ ce(e), P("");
189
183
  },
190
- className: `px-4 py-2 rounded-lg border flex items-center gap-2 transition-all ${P === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
184
+ className: `px-4 py-2 rounded-lg border flex items-center gap-2 transition-all ${F === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
191
185
  children: [/* @__PURE__ */ T(t, { className: "size-4 " }), /* @__PURE__ */ T("span", {
192
186
  className: "text-sm",
193
- children: o(e, a, y)
187
+ children: i(e, r, x)
194
188
  })]
195
189
  }, e);
196
190
  })
@@ -200,31 +194,31 @@ function j() {
200
194
  className: "space-y-2",
201
195
  children: [/* @__PURE__ */ E("label", {
202
196
  className: "text-sm font-medium",
203
- children: [y("channel.channel", "Channel"), " *"]
204
- }), X.length === 0 ? /* @__PURE__ */ T("div", {
197
+ children: [x("channel.channel", "Channel"), " *"]
198
+ }), Z.length === 0 ? /* @__PURE__ */ T("div", {
205
199
  className: "rounded-lg border border-dashed",
206
200
  children: /* @__PURE__ */ T(O, {
207
201
  illustration: "empty-data",
208
- title: y("channel.noPlatformChannels", "No {{platform}} channels configured", { platform: o(P, a, y) }),
209
- description: y("channel.noPlatformChannelsHint", "Create a channel for this platform to be able to send through it."),
202
+ title: x("channel.noPlatformChannels", "No {{platform}} channels configured", { platform: i(F, r, x) }),
203
+ description: x("channel.noPlatformChannelsHint", "Create a channel for this platform to be able to send through it."),
210
204
  action: /* @__PURE__ */ E("button", {
211
205
  type: "button",
212
- onClick: () => d("./create"),
206
+ onClick: () => f("./create"),
213
207
  className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
214
- children: [/* @__PURE__ */ T(_, {
208
+ children: [/* @__PURE__ */ T(y, {
215
209
  className: "size-4",
216
210
  "aria-hidden": "true"
217
- }), y("channel.createChannel", "Create Channel")]
211
+ }), x("channel.createChannel", "Create Channel")]
218
212
  })
219
213
  })
220
214
  }) : /* @__PURE__ */ E("select", {
221
- value: M,
222
- onChange: (e) => N(e.target.value),
215
+ value: N,
216
+ onChange: (e) => P(e.target.value),
223
217
  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",
224
218
  children: [/* @__PURE__ */ T("option", {
225
219
  value: "",
226
- children: y("channel.selectChannel", "Select a channel...")
227
- }), X.map((e) => /* @__PURE__ */ E("option", {
220
+ children: x("channel.selectChannel", "Select a channel...")
221
+ }), Z.map((e) => /* @__PURE__ */ E("option", {
228
222
  value: e.id,
229
223
  children: [
230
224
  e.name,
@@ -240,40 +234,40 @@ function j() {
240
234
  children: [
241
235
  /* @__PURE__ */ T("label", {
242
236
  className: "text-sm font-medium",
243
- children: y("channel.recipients", "Recipients")
237
+ children: x("channel.recipients", "Recipients")
244
238
  }),
245
239
  /* @__PURE__ */ E("div", {
246
240
  className: "flex gap-2",
247
241
  children: [
248
242
  /* @__PURE__ */ T("input", {
249
- "aria-label": P === "EMAIL" ? y("channel.recipientPlaceholder.email", "email@example.com") : y("channel.recipientPlaceholder.phone", "+1234567890"),
243
+ "aria-label": F === "EMAIL" ? x("channel.recipientPlaceholder.email", "email@example.com") : x("channel.recipientPlaceholder.phone", "+1234567890"),
250
244
  type: "text",
251
- value: L,
252
- onChange: (e) => R(e.target.value),
253
- placeholder: P === "EMAIL" ? y("channel.recipientPlaceholder.email", "email@example.com") : y("channel.recipientPlaceholder.phone", "+1234567890"),
245
+ value: R,
246
+ onChange: (e) => z(e.target.value),
247
+ placeholder: F === "EMAIL" ? x("channel.recipientPlaceholder.email", "email@example.com") : x("channel.recipientPlaceholder.phone", "+1234567890"),
254
248
  className: "flex-1 px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
255
249
  }),
256
250
  /* @__PURE__ */ T("input", {
257
- "aria-label": y("channel.nameOptional", "Name (optional)"),
251
+ "aria-label": x("channel.nameOptional", "Name (optional)"),
258
252
  type: "text",
259
- value: z,
260
- onChange: (e) => B(e.target.value),
261
- placeholder: y("channel.nameOptional", "Name (optional)"),
253
+ value: B,
254
+ onChange: (e) => V(e.target.value),
255
+ placeholder: x("channel.nameOptional", "Name (optional)"),
262
256
  className: "w-full sm:w-48 px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
263
257
  }),
264
258
  /* @__PURE__ */ E("button", {
265
259
  type: "button",
266
- onClick: Z,
267
- disabled: !L.trim(),
260
+ onClick: de,
261
+ disabled: !R.trim(),
268
262
  className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex items-center gap-2",
269
- children: [/* @__PURE__ */ T(_, { className: "size-4 " }), y("channel.add", "Add")]
263
+ children: [/* @__PURE__ */ T(y, { className: "size-4 " }), x("channel.add", "Add")]
270
264
  })
271
265
  ]
272
266
  }),
273
- F.length > 0 ? /* @__PURE__ */ T(D, {
267
+ I.length > 0 ? /* @__PURE__ */ T(D, {
274
268
  treatment: "plain",
275
269
  className: "border-border-seam rounded-lg p-0 divide-y divide-[var(--color-border-seam)] overflow-hidden",
276
- children: F.map((e) => /* @__PURE__ */ E("div", {
270
+ children: I.map((e) => /* @__PURE__ */ E("div", {
277
271
  className: "p-3 flex items-center justify-between",
278
272
  children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
279
273
  className: "text-sm font-medium",
@@ -283,15 +277,15 @@ function j() {
283
277
  children: e.name
284
278
  })] }), /* @__PURE__ */ T("button", {
285
279
  type: "button",
286
- onClick: () => de(e.id),
280
+ onClick: () => fe(e.id),
287
281
  className: "p-1 hover:bg-bg-sunken rounded transition-colors",
288
- children: /* @__PURE__ */ T(x, { className: "size-4 text-text-secondary" })
282
+ children: /* @__PURE__ */ T(C, { className: "size-4 text-text-secondary" })
289
283
  })]
290
284
  }, e.id))
291
285
  }) : /* @__PURE__ */ T(O, {
292
286
  illustration: "empty-people",
293
- title: y("channel.noRecipientsYet", "No recipients added yet"),
294
- description: y("channel.addRecipientsHint", "Add one or more recipients above to send this message to.")
287
+ title: x("channel.noRecipientsYet", "No recipients added yet"),
288
+ description: x("channel.addRecipientsHint", "Add one or more recipients above to send this message to.")
295
289
  })
296
290
  ]
297
291
  }),
@@ -300,21 +294,21 @@ function j() {
300
294
  children: [
301
295
  /* @__PURE__ */ E("label", {
302
296
  className: "text-sm font-medium",
303
- children: [y("channel.messageContent", "Message Content"), " *"]
297
+ children: [x("channel.messageContent", "Message Content"), " *"]
304
298
  }),
305
- P === "EMAIL" && /* @__PURE__ */ T("input", {
306
- "aria-label": y("channel.subject", "Subject"),
299
+ F === "EMAIL" && /* @__PURE__ */ T("input", {
300
+ "aria-label": x("channel.subject", "Subject"),
307
301
  type: "text",
308
- value: V,
309
- onChange: (e) => H(e.target.value),
310
- placeholder: y("channel.subject", "Subject"),
302
+ value: H,
303
+ onChange: (e) => U(e.target.value),
304
+ placeholder: x("channel.subject", "Subject"),
311
305
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
312
306
  }),
313
307
  /* @__PURE__ */ T(re, {
314
- value: U,
315
- onChange: W,
316
- "aria-label": y("channel.messagePlaceholder", "Enter your message..."),
317
- placeholder: y("channel.messagePlaceholder", "Enter your message..."),
308
+ value: W,
309
+ onChange: G,
310
+ "aria-label": x("channel.messagePlaceholder", "Enter your message..."),
311
+ placeholder: x("channel.messagePlaceholder", "Enter your message..."),
318
312
  rows: 6
319
313
  })
320
314
  ]
@@ -323,35 +317,35 @@ function j() {
323
317
  className: "space-y-2",
324
318
  children: [/* @__PURE__ */ T("label", {
325
319
  className: "text-sm font-medium",
326
- children: y("channel.priority", "Priority")
320
+ children: x("channel.priority", "Priority")
327
321
  }), /* @__PURE__ */ T("div", {
328
322
  className: "flex gap-2",
329
323
  children: [
330
324
  {
331
- value: s.Low,
325
+ value: o.Low,
332
326
  key: "channel.priorityLabel.low",
333
327
  fallback: "Low"
334
328
  },
335
329
  {
336
- value: s.Medium,
330
+ value: o.Medium,
337
331
  key: "channel.priorityLabel.normal",
338
332
  fallback: "Medium"
339
333
  },
340
334
  {
341
- value: s.High,
335
+ value: o.High,
342
336
  key: "channel.priorityLabel.high",
343
337
  fallback: "High"
344
338
  },
345
339
  {
346
- value: s.Urgent,
340
+ value: o.Urgent,
347
341
  key: "channel.priorityLabel.urgent",
348
342
  fallback: "Urgent"
349
343
  }
350
344
  ].map((e) => /* @__PURE__ */ T("button", {
351
345
  type: "button",
352
346
  onClick: () => ue(e.value),
353
- className: `px-4 py-2 rounded-lg border text-sm transition-all ${G === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
354
- children: y(e.key, e.fallback)
347
+ className: `px-4 py-2 rounded-lg border text-sm transition-all ${K === e.value ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface hover:bg-bg-sunken border-border-subtle"}`,
348
+ children: x(e.key, e.fallback)
355
349
  }, e.value))
356
350
  })]
357
351
  }),
@@ -359,16 +353,16 @@ function j() {
359
353
  className: "flex justify-end pt-4",
360
354
  children: /* @__PURE__ */ T("button", {
361
355
  type: "button",
362
- onClick: pe,
363
- disabled: j || !M || F.length === 0 || !U.trim(),
356
+ onClick: me,
357
+ disabled: M || !N || I.length === 0 || !W.trim(),
364
358
  className: "px-6 py-3 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 flex items-center gap-2",
365
- children: j ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(oe, { className: "size-5 animate-spin" }), y("channel.sending", "Sending...")] }) : /* @__PURE__ */ E(w, { children: [
366
- /* @__PURE__ */ T(v, { className: "size-5 " }),
367
- y("channel.sendTo", "Send to"),
359
+ children: M ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(h, { className: "size-5 animate-spin" }), x("channel.sending", "Sending...")] }) : /* @__PURE__ */ E(w, { children: [
360
+ /* @__PURE__ */ T(b, { className: "size-5 " }),
361
+ x("channel.sendTo", "Send to"),
368
362
  " ",
369
- F.length,
363
+ I.length,
370
364
  " ",
371
- F.length === 1 ? y("channel.recipient", "recipient") : y("channel.recipients", "recipients")
365
+ I.length === 1 ? x("channel.recipient", "recipient") : x("channel.recipients", "recipients")
372
366
  ] })
373
367
  })
374
368
  })
@@ -379,32 +373,32 @@ function j() {
379
373
  className: "p-4 flex items-center justify-between",
380
374
  children: [/* @__PURE__ */ E("div", {
381
375
  className: "flex items-center gap-4",
382
- children: [$ === 0 ? /* @__PURE__ */ T(f, { className: "size-8 text-status-success-text" }) : /* @__PURE__ */ T(u, { className: "size-8 text-status-warning-text" }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h2", {
376
+ children: [$ === 0 ? /* @__PURE__ */ T(p, { className: "size-8 text-status-success-text" }) : /* @__PURE__ */ T(d, { className: "size-8 text-status-warning-text" }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h2", {
383
377
  className: "text-lg font-semibold",
384
- children: $ === 0 ? y("channel.allMessagesSent", "All messages sent!") : `${Q} of ${F.length} sent`
378
+ children: $ === 0 ? x("channel.allMessagesSent", "All messages sent!") : `${Q} of ${I.length} sent`
385
379
  }), /* @__PURE__ */ E("p", {
386
380
  className: "text-sm text-text-secondary",
387
381
  children: [
388
382
  Q,
389
383
  " ",
390
- y("channel.successful", "successful"),
384
+ x("channel.successful", "successful"),
391
385
  ", ",
392
386
  $,
393
387
  " ",
394
- y("channel.failed", "failed")
388
+ x("channel.failed", "failed")
395
389
  ]
396
390
  })] })]
397
391
  }), /* @__PURE__ */ T("button", {
398
392
  type: "button",
399
- onClick: fe,
393
+ onClick: pe,
400
394
  className: "px-4 py-2 rounded-lg border hover:bg-bg-sunken transition-colors",
401
- children: y("channel.sendAnother", "Send Another")
395
+ children: x("channel.sendAnother", "Send Another")
402
396
  })]
403
397
  }), /* @__PURE__ */ T(D, {
404
398
  treatment: "plain",
405
399
  className: "border-border-seam rounded-lg p-0 divide-y divide-[var(--color-border-seam)] overflow-hidden",
406
- children: K.map((e) => {
407
- let t = F.find((t) => t.id === e.recipientId);
400
+ children: q.map((e) => {
401
+ let t = I.find((t) => t.id === e.recipientId);
408
402
  return /* @__PURE__ */ E("div", {
409
403
  className: "p-4 flex items-center justify-between",
410
404
  children: [/* @__PURE__ */ E("div", { children: [
@@ -424,7 +418,7 @@ function j() {
424
418
  className: "text-xs text-status-error-text",
425
419
  children: e.error
426
420
  })
427
- ] }), e.success ? /* @__PURE__ */ T(f, { className: "size-5 text-status-success-text" }) : /* @__PURE__ */ T(S, { className: "size-5 text-status-error-text" })]
421
+ ] }), e.success ? /* @__PURE__ */ T(p, { className: "size-5 text-status-success-text" }) : /* @__PURE__ */ T(ae, { className: "size-5 text-status-error-text" })]
428
422
  }, e.recipientId);
429
423
  })
430
424
  })]
@@ -433,7 +427,6 @@ function j() {
433
427
  })
434
428
  });
435
429
  }
436
- //#endregion
437
430
  export { j as SendMessagePage };
438
431
 
439
432
  //# sourceMappingURL=SendMessagePage.js.map