@burdenoff/microfe-channel 2026.830.1 → 2026.1013.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 (50) hide show
  1. package/dist/channel/ChannelRoot.d.ts.map +1 -1
  2. package/dist/channel/ChannelRoot.js +32 -35
  3. package/dist/channel/ChannelRoot.js.map +1 -1
  4. package/dist/channel/components/AdapterCredentialsForm.d.ts.map +1 -1
  5. package/dist/channel/components/AdapterCredentialsForm.js +52 -58
  6. package/dist/channel/components/AdapterCredentialsForm.js.map +1 -1
  7. package/dist/channel/components/FeatureNotEnabled.d.ts.map +1 -1
  8. package/dist/channel/components/FeatureNotEnabled.js +27 -22
  9. package/dist/channel/components/FeatureNotEnabled.js.map +1 -1
  10. package/dist/channel/components/MarkdownEditor.d.ts.map +1 -1
  11. package/dist/channel/components/MarkdownEditor.js +78 -77
  12. package/dist/channel/components/MarkdownEditor.js.map +1 -1
  13. package/dist/channel/components/PermissionGuard.d.ts.map +1 -1
  14. package/dist/channel/components/PermissionGuard.js +6 -9
  15. package/dist/channel/components/PermissionGuard.js.map +1 -1
  16. package/dist/channel/hooks/useTr.d.ts +17 -0
  17. package/dist/channel/hooks/useTr.d.ts.map +1 -0
  18. package/dist/channel/hooks/useTr.js +14 -0
  19. package/dist/channel/hooks/useTr.js.map +1 -0
  20. package/dist/channel/modules/channels/i18n.js +24 -24
  21. package/dist/channel/modules/channels/i18n.js.map +1 -1
  22. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js +2 -2
  23. package/dist/channel/modules/channels/pages/ChannelDashboardPage.js.map +1 -1
  24. package/dist/channel/modules/channels/pages/ChannelSettingsPage.d.ts.map +1 -1
  25. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js +232 -226
  26. package/dist/channel/modules/channels/pages/ChannelSettingsPage.js.map +1 -1
  27. package/dist/channel/modules/channels/pages/ChannelUsersPage.d.ts.map +1 -1
  28. package/dist/channel/modules/channels/pages/ChannelUsersPage.js +152 -146
  29. package/dist/channel/modules/channels/pages/ChannelUsersPage.js.map +1 -1
  30. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.d.ts.map +1 -1
  31. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js +112 -114
  32. package/dist/channel/modules/channels/pages/ConnectionDetailsPage.js.map +1 -1
  33. package/dist/channel/modules/channels/pages/CreateChannelPage.d.ts.map +1 -1
  34. package/dist/channel/modules/channels/pages/CreateChannelPage.js +300 -269
  35. package/dist/channel/modules/channels/pages/CreateChannelPage.js.map +1 -1
  36. package/dist/channel/modules/channels/pages/CreateConnectionPage.d.ts.map +1 -1
  37. package/dist/channel/modules/channels/pages/CreateConnectionPage.js +108 -102
  38. package/dist/channel/modules/channels/pages/CreateConnectionPage.js.map +1 -1
  39. package/dist/channel/modules/channels/pages/EditChannelPage.d.ts.map +1 -1
  40. package/dist/channel/modules/channels/pages/EditChannelPage.js +384 -343
  41. package/dist/channel/modules/channels/pages/EditChannelPage.js.map +1 -1
  42. package/dist/channel/modules/channels/pages/SendMessagePage.d.ts.map +1 -1
  43. package/dist/channel/modules/channels/pages/SendMessagePage.js +170 -156
  44. package/dist/channel/modules/channels/pages/SendMessagePage.js.map +1 -1
  45. package/dist/channel/pages/ChannelLandingPage.d.ts.map +1 -1
  46. package/dist/channel/pages/ChannelLandingPage.js +47 -50
  47. package/dist/channel/pages/ChannelLandingPage.js.map +1 -1
  48. package/dist/translations/en.d.ts +271 -4
  49. package/dist/translations/en.d.ts.map +1 -1
  50. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- import { PermissionGuard as e } from "../../../components/PermissionGuard.js";
2
- import { CHANNEL_PERMISSIONS as t } from "../../../constants/permissions.js";
3
- import { useChannelOrgSettings as n } from "../../../hooks/useChannelOrgSettings.js";
4
- import { useEffect as r, useRef as i, useState as a } from "react";
5
- import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
- import { AlertCircle as s, ArrowLeft as c, Bell as l, CheckCircle2 as u, Clock as d, Database as f, Loader2 as p, Save as m, Settings as h, Shield as g } from "lucide-react";
7
- import { useNavigate as _ } from "react-router";
8
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
9
- import { EmphasisPanel as b, GlassCard as x, PagePurpose as S, ShowMore as C } from "@burdenoff/fe-libs/ui";
1
+ import { useTr as e } from "../../../hooks/useTr.js";
2
+ import { PermissionGuard as t } from "../../../components/PermissionGuard.js";
3
+ import { CHANNEL_PERMISSIONS as n } from "../../../constants/permissions.js";
4
+ import { useChannelOrgSettings as r } from "../../../hooks/useChannelOrgSettings.js";
5
+ import { useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
6
+ import { AlertCircle as c, ArrowLeft as l, Bell as u, CheckCircle2 as d, Clock as f, Database as p, Loader2 as m, Save as h, Settings as g, Shield as _ } from "lucide-react";
7
+ import { useNavigate as v } from "react-router";
8
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
9
+ import { EmphasisPanel as x, GlassCard as S, PagePurpose as C, ShowMore as w } from "@burdenoff/fe-libs/ui";
10
10
  //#region src/channel/modules/channels/pages/ChannelSettingsPage.tsx
11
- var w = {
11
+ var T = {
12
12
  defaultPriority: 2,
13
13
  rateLimitPerMinute: 100,
14
14
  rateLimitPerHour: 5e3,
@@ -17,82 +17,146 @@ var w = {
17
17
  enableWebhookVerification: !0,
18
18
  sessionTimeoutMinutes: 30
19
19
  };
20
- function T() {
21
- let T = _(), { t: E } = o(), D = (e, t) => {
22
- let n = E(e);
23
- return n === e ? t : n;
24
- }, { settings: O, isLoading: k, error: A, saveSettings: j } = n(), [M, N] = a(w), [P, F] = a(!1), [I, L] = a(!1), [R, z] = a(null), B = i(null);
25
- r(() => {
26
- let e = B;
20
+ function E() {
21
+ let E = v(), D = e(), O = a(() => [
22
+ {
23
+ value: 0,
24
+ label: D("channel.priorityLabel.lowest", "0 - Lowest")
25
+ },
26
+ {
27
+ value: 1,
28
+ label: D("channel.priorityLabel.low", "1 - Low")
29
+ },
30
+ {
31
+ value: 2,
32
+ label: D("channel.priorityLabel.normal", "2 - Normal")
33
+ },
34
+ {
35
+ value: 3,
36
+ label: D("channel.priorityLabel.high", "3 - High")
37
+ },
38
+ {
39
+ value: 4,
40
+ label: D("channel.priorityLabel.highest", "4 - Highest")
41
+ }
42
+ ], [D]), k = a(() => [
43
+ {
44
+ value: 1,
45
+ label: D("channel.duration.oneMinute", "1 minute")
46
+ },
47
+ {
48
+ value: 5,
49
+ label: D("channel.duration.fiveMinutes", "5 minutes")
50
+ },
51
+ {
52
+ value: 10,
53
+ label: D("channel.duration.tenMinutes", "10 minutes")
54
+ },
55
+ {
56
+ value: 15,
57
+ label: D("channel.duration.fifteenMinutes", "15 minutes")
58
+ },
59
+ {
60
+ value: 30,
61
+ label: D("channel.duration.thirtyMinutes", "30 minutes")
62
+ },
63
+ {
64
+ value: 60,
65
+ label: D("channel.duration.oneHour", "1 hour")
66
+ }
67
+ ], [D]), A = a(() => [
68
+ {
69
+ value: 15,
70
+ label: D("channel.duration.fifteenMinutes", "15 minutes")
71
+ },
72
+ {
73
+ value: 30,
74
+ label: D("channel.duration.thirtyMinutes", "30 minutes")
75
+ },
76
+ {
77
+ value: 60,
78
+ label: D("channel.duration.oneHour", "1 hour")
79
+ },
80
+ {
81
+ value: 120,
82
+ label: D("channel.duration.twoHours", "2 hours")
83
+ },
84
+ {
85
+ value: 240,
86
+ label: D("channel.duration.fourHours", "4 hours")
87
+ }
88
+ ], [D]), { settings: j, isLoading: M, error: N, saveSettings: P } = r(), [F, I] = s(T), [L, R] = s(!1), [z, B] = s(!1), [V, H] = s(null), U = o(null);
89
+ i(() => {
90
+ let e = U;
27
91
  return () => {
28
92
  e.current && clearTimeout(e.current);
29
93
  };
30
94
  }, []);
31
- let V = i(null);
32
- r(() => {
33
- if (!O) return;
34
- let e = `${O.organizationId}:${O.updatedAt}`;
35
- e !== V.current && (V.current = e, Promise.resolve().then(() => {
36
- N({
37
- defaultPriority: O.defaultPriority,
38
- rateLimitPerMinute: O.rateLimitPerMinute,
39
- rateLimitPerHour: O.rateLimitPerHour,
40
- healthCheckIntervalMinutes: O.healthCheckIntervalMinutes,
41
- enableAuditLogging: O.enableAuditLogging,
42
- enableWebhookVerification: O.enableWebhookVerification,
43
- sessionTimeoutMinutes: O.sessionTimeoutMinutes
95
+ let W = o(null);
96
+ i(() => {
97
+ if (!j) return;
98
+ let e = `${j.organizationId}:${j.updatedAt}`;
99
+ e !== W.current && (W.current = e, Promise.resolve().then(() => {
100
+ I({
101
+ defaultPriority: j.defaultPriority,
102
+ rateLimitPerMinute: j.rateLimitPerMinute,
103
+ rateLimitPerHour: j.rateLimitPerHour,
104
+ healthCheckIntervalMinutes: j.healthCheckIntervalMinutes,
105
+ enableAuditLogging: j.enableAuditLogging,
106
+ enableWebhookVerification: j.enableWebhookVerification,
107
+ sessionTimeoutMinutes: j.sessionTimeoutMinutes
44
108
  });
45
109
  }));
46
- }, [O]);
47
- let H = async () => {
48
- F(!0), z(null), L(!1);
110
+ }, [j]);
111
+ let G = async () => {
112
+ R(!0), H(null), B(!1);
49
113
  try {
50
- await j({
51
- defaultPriority: M.defaultPriority,
52
- rateLimitPerMinute: M.rateLimitPerMinute,
53
- rateLimitPerHour: M.rateLimitPerHour,
54
- healthCheckIntervalMinutes: M.healthCheckIntervalMinutes,
55
- enableAuditLogging: M.enableAuditLogging,
56
- enableWebhookVerification: M.enableWebhookVerification,
57
- sessionTimeoutMinutes: M.sessionTimeoutMinutes
58
- }) ? (L(!0), B.current && clearTimeout(B.current), B.current = setTimeout(() => L(!1), 3e3)) : z(D("channel.settingsSaveNotPersisted", "Settings could not be saved — organization context is unavailable."));
114
+ await P({
115
+ defaultPriority: F.defaultPriority,
116
+ rateLimitPerMinute: F.rateLimitPerMinute,
117
+ rateLimitPerHour: F.rateLimitPerHour,
118
+ healthCheckIntervalMinutes: F.healthCheckIntervalMinutes,
119
+ enableAuditLogging: F.enableAuditLogging,
120
+ enableWebhookVerification: F.enableWebhookVerification,
121
+ sessionTimeoutMinutes: F.sessionTimeoutMinutes
122
+ }) ? (B(!0), U.current && clearTimeout(U.current), U.current = setTimeout(() => B(!1), 3e3)) : H(D("channel.settingsSaveNotPersisted", "Settings could not be saved — organization context is unavailable."));
59
123
  } catch (e) {
60
- z(e instanceof Error ? e.message : "Failed to save settings");
124
+ H(e instanceof Error ? e.message : D("channel.settingsSaveFailed", "Failed to save settings"));
61
125
  } finally {
62
- F(!1);
126
+ R(!1);
63
127
  }
64
- }, U = (e, t) => {
65
- N((n) => ({
128
+ }, K = (e, t) => {
129
+ I((n) => ({
66
130
  ...n,
67
131
  [e]: t
68
132
  }));
69
133
  };
70
- return /* @__PURE__ */ v(e, {
71
- permission: t.CHANNEL_UPDATE,
72
- children: /* @__PURE__ */ y("div", {
134
+ return /* @__PURE__ */ y(t, {
135
+ permission: n.CHANNEL_UPDATE,
136
+ children: /* @__PURE__ */ b("div", {
73
137
  className: "min-h-screen bg-bg-surface",
74
- children: [/* @__PURE__ */ v("div", {
138
+ children: [/* @__PURE__ */ y("div", {
75
139
  className: "border-b bg-bg-surface",
76
- children: /* @__PURE__ */ v("div", {
140
+ children: /* @__PURE__ */ y("div", {
77
141
  className: "container mx-auto px-6 py-4",
78
- children: /* @__PURE__ */ v("div", {
142
+ children: /* @__PURE__ */ y("div", {
79
143
  className: "flex items-center justify-between",
80
- children: /* @__PURE__ */ y("div", {
144
+ children: /* @__PURE__ */ b("div", {
81
145
  className: "flex items-center gap-4",
82
- children: [/* @__PURE__ */ v("button", {
146
+ children: [/* @__PURE__ */ y("button", {
83
147
  type: "button",
84
- onClick: () => T("./list"),
148
+ onClick: () => E("./list"),
85
149
  className: "p-2 hover:bg-bg-sunken rounded-lg transition-colors",
86
- children: /* @__PURE__ */ v(c, { className: "size-5 " })
87
- }), /* @__PURE__ */ y("div", {
150
+ children: /* @__PURE__ */ y(l, { className: "size-5 " })
151
+ }), /* @__PURE__ */ b("div", {
88
152
  className: "flex items-center gap-3",
89
- children: [/* @__PURE__ */ v("div", {
153
+ children: [/* @__PURE__ */ y("div", {
90
154
  className: "p-2 bg-action-primary-bg/10 rounded-lg",
91
- children: /* @__PURE__ */ v(h, { className: "size-5 text-primary" })
92
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
155
+ children: /* @__PURE__ */ y(g, { className: "size-5 text-primary" })
156
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
93
157
  className: "text-2xl font-bold",
94
158
  children: D("channel.channelSettings", "Channel Settings")
95
- }), /* @__PURE__ */ v("p", {
159
+ }), /* @__PURE__ */ y("p", {
96
160
  className: "text-sm text-text-secondary",
97
161
  children: D("channel.channelSettingsSubtitle", "Configure global channel preferences")
98
162
  })] })]
@@ -100,115 +164,97 @@ function T() {
100
164
  })
101
165
  })
102
166
  })
103
- }), /* @__PURE__ */ y("div", {
167
+ }), /* @__PURE__ */ b("div", {
104
168
  className: "container mx-auto px-6 py-8 max-w-2xl space-y-8",
105
169
  children: [
106
- /* @__PURE__ */ v(S, {
107
- icon: /* @__PURE__ */ v(h, {
170
+ /* @__PURE__ */ y(C, {
171
+ icon: /* @__PURE__ */ y(g, {
108
172
  size: 15,
109
173
  "aria-hidden": "true"
110
174
  }),
111
175
  children: D("channel.settingsPurpose", "Organization-wide defaults that apply to every channel — how fast messages may go out (rate limits), the default priority for new channels, how often health checks run, and security policies like webhook signature verification and audit logging. Tune these to protect provider quotas, keep an audit trail, and set sensible defaults so each new channel starts configured the way you want.")
112
176
  }),
113
- k && /* @__PURE__ */ y("div", {
177
+ M && /* @__PURE__ */ b("div", {
114
178
  className: "flex items-center gap-2 text-text-secondary",
115
- children: [/* @__PURE__ */ v(p, { className: "size-4 animate-spin" }), /* @__PURE__ */ v("span", {
179
+ children: [/* @__PURE__ */ y(m, { className: "size-4 animate-spin" }), /* @__PURE__ */ y("span", {
116
180
  className: "text-sm",
117
- children: "Loading settings…"
181
+ children: D("channel.loadingSettings", "Loading settings…")
118
182
  })]
119
183
  }),
120
- A && /* @__PURE__ */ y("div", {
184
+ N && /* @__PURE__ */ b("div", {
121
185
  className: "p-4 rounded-lg bg-status-error-bg-subtle border border-status-error-border flex items-center gap-3",
122
- children: [/* @__PURE__ */ v(s, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ v("p", {
186
+ children: [/* @__PURE__ */ y(c, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ y("p", {
123
187
  className: "text-sm text-status-error-text",
124
188
  children: D("channel.settingsLoadError", "Failed to load settings — saving is disabled to prevent overwriting existing configuration.")
125
189
  })]
126
190
  }),
127
- I && /* @__PURE__ */ y("div", {
191
+ z && /* @__PURE__ */ b("div", {
128
192
  className: "p-4 rounded-lg bg-status-success-bg-subtle border border-status-success-border flex items-center gap-3",
129
- children: [/* @__PURE__ */ v(u, { className: "size-5 text-status-success-text shrink-0" }), /* @__PURE__ */ v("p", {
193
+ children: [/* @__PURE__ */ y(d, { className: "size-5 text-status-success-text shrink-0" }), /* @__PURE__ */ y("p", {
130
194
  className: "text-sm text-status-success-text",
131
195
  children: D("channel.settingsSaved", "Settings saved successfully")
132
196
  })]
133
197
  }),
134
- R && /* @__PURE__ */ y("div", {
198
+ V && /* @__PURE__ */ b("div", {
135
199
  className: "p-4 rounded-lg bg-status-error-bg/10 border border-status-error-border/20 flex items-center gap-3",
136
- children: [/* @__PURE__ */ v(s, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ v("p", {
200
+ children: [/* @__PURE__ */ y(c, { className: "size-5 text-status-error-text shrink-0" }), /* @__PURE__ */ y("p", {
137
201
  className: "text-sm text-status-error-text",
138
- children: R
202
+ children: V
139
203
  })]
140
204
  }),
141
- /* @__PURE__ */ y(b, {
205
+ /* @__PURE__ */ b(x, {
142
206
  className: "space-y-4 p-6",
143
- children: [/* @__PURE__ */ y("div", {
207
+ children: [/* @__PURE__ */ b("div", {
144
208
  className: "flex items-center gap-2",
145
- children: [/* @__PURE__ */ v(l, { className: "size-5 text-primary" }), /* @__PURE__ */ v("h2", {
209
+ children: [/* @__PURE__ */ y(u, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
146
210
  className: "text-lg font-semibold",
147
211
  children: D("channel.deliverySettings", "Delivery Settings")
148
212
  })]
149
- }), /* @__PURE__ */ y("div", {
213
+ }), /* @__PURE__ */ b("div", {
150
214
  className: "space-y-4",
151
- children: [/* @__PURE__ */ y("div", { children: [
152
- /* @__PURE__ */ v("label", {
215
+ children: [/* @__PURE__ */ b("div", { children: [
216
+ /* @__PURE__ */ y("label", {
153
217
  className: "text-sm font-medium block mb-1",
154
218
  children: D("channel.defaultPriority", "Default Priority")
155
219
  }),
156
220
  /* @__PURE__ */ y("select", {
157
- value: M.defaultPriority,
158
- onChange: (e) => U("defaultPriority", Number(e.target.value)),
221
+ value: F.defaultPriority,
222
+ onChange: (e) => K("defaultPriority", Number(e.target.value)),
159
223
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
160
- children: [
161
- /* @__PURE__ */ v("option", {
162
- value: 0,
163
- children: "0 - Lowest"
164
- }),
165
- /* @__PURE__ */ v("option", {
166
- value: 1,
167
- children: "1 - Low"
168
- }),
169
- /* @__PURE__ */ v("option", {
170
- value: 2,
171
- children: "2 - Normal"
172
- }),
173
- /* @__PURE__ */ v("option", {
174
- value: 3,
175
- children: "3 - High"
176
- }),
177
- /* @__PURE__ */ v("option", {
178
- value: 4,
179
- children: "4 - Highest"
180
- })
181
- ]
224
+ children: O.map((e) => /* @__PURE__ */ y("option", {
225
+ value: e.value,
226
+ children: e.label
227
+ }, e.value))
182
228
  }),
183
- /* @__PURE__ */ v("p", {
229
+ /* @__PURE__ */ y("p", {
184
230
  className: "text-xs text-text-secondary mt-1",
185
- children: "Priority used when creating new channels without explicit priority"
231
+ children: D("channel.defaultPriorityHint", "Priority used when creating new channels without explicit priority")
186
232
  })
187
- ] }), /* @__PURE__ */ y("div", {
233
+ ] }), /* @__PURE__ */ b("div", {
188
234
  className: "grid grid-cols-2 gap-4",
189
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
235
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
190
236
  htmlFor: "channel-settings-rate-limit-min",
191
237
  className: "text-sm font-medium block mb-1",
192
238
  children: D("channel.rateLimitPerMin", "Rate Limit (per minute)")
193
- }), /* @__PURE__ */ v("input", {
239
+ }), /* @__PURE__ */ y("input", {
194
240
  id: "channel-settings-rate-limit-min",
195
241
  "aria-label": D("channel.rateLimitPerMin", "Rate Limit (per minute)"),
196
242
  type: "number",
197
- value: M.rateLimitPerMinute,
198
- onChange: (e) => U("rateLimitPerMinute", Number(e.target.value)),
243
+ value: F.rateLimitPerMinute,
244
+ onChange: (e) => K("rateLimitPerMinute", Number(e.target.value)),
199
245
  min: 1,
200
246
  max: 1e3,
201
247
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
202
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
248
+ })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
203
249
  htmlFor: "channel-settings-rate-limit-hour",
204
250
  className: "text-sm font-medium block mb-1",
205
251
  children: D("channel.rateLimitPerHour", "Rate Limit (per hour)")
206
- }), /* @__PURE__ */ v("input", {
252
+ }), /* @__PURE__ */ y("input", {
207
253
  id: "channel-settings-rate-limit-hour",
208
254
  "aria-label": D("channel.rateLimitPerHour", "Rate Limit (per hour)"),
209
255
  type: "number",
210
- value: M.rateLimitPerHour,
211
- onChange: (e) => U("rateLimitPerHour", Number(e.target.value)),
256
+ value: F.rateLimitPerHour,
257
+ onChange: (e) => K("rateLimitPerHour", Number(e.target.value)),
212
258
  min: 1,
213
259
  max: 5e4,
214
260
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary"
@@ -216,211 +262,171 @@ function T() {
216
262
  })]
217
263
  })]
218
264
  }),
219
- /* @__PURE__ */ y(x, {
265
+ /* @__PURE__ */ b(S, {
220
266
  treatment: "plain",
221
267
  className: "border-border-seam p-6 space-y-4",
222
- children: [/* @__PURE__ */ y("div", {
268
+ children: [/* @__PURE__ */ b("div", {
223
269
  className: "flex items-center gap-2",
224
- children: [/* @__PURE__ */ v(d, { className: "size-5 text-primary" }), /* @__PURE__ */ v("h2", {
270
+ children: [/* @__PURE__ */ y(f, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
225
271
  className: "text-lg font-semibold",
226
272
  children: D("channel.healthMonitoring", "Health Monitoring")
227
273
  })]
228
- }), /* @__PURE__ */ y("div", { children: [
229
- /* @__PURE__ */ v("label", {
274
+ }), /* @__PURE__ */ b("div", { children: [
275
+ /* @__PURE__ */ y("label", {
230
276
  htmlFor: "channel-settings-health-interval",
231
277
  className: "text-sm font-medium block mb-1",
232
- children: "Health Check Interval (minutes)"
278
+ children: D("channel.healthCheckInterval", "Health Check Interval (minutes)")
233
279
  }),
234
280
  /* @__PURE__ */ y("select", {
235
281
  id: "channel-settings-health-interval",
236
- value: M.healthCheckIntervalMinutes,
237
- onChange: (e) => U("healthCheckIntervalMinutes", Number(e.target.value)),
282
+ value: F.healthCheckIntervalMinutes,
283
+ onChange: (e) => K("healthCheckIntervalMinutes", Number(e.target.value)),
238
284
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
239
- children: [
240
- /* @__PURE__ */ v("option", {
241
- value: 1,
242
- children: "1 minute"
243
- }),
244
- /* @__PURE__ */ v("option", {
245
- value: 5,
246
- children: "5 minutes"
247
- }),
248
- /* @__PURE__ */ v("option", {
249
- value: 10,
250
- children: "10 minutes"
251
- }),
252
- /* @__PURE__ */ v("option", {
253
- value: 15,
254
- children: "15 minutes"
255
- }),
256
- /* @__PURE__ */ v("option", {
257
- value: 30,
258
- children: "30 minutes"
259
- }),
260
- /* @__PURE__ */ v("option", {
261
- value: 60,
262
- children: "1 hour"
263
- })
264
- ]
285
+ children: k.map((e) => /* @__PURE__ */ y("option", {
286
+ value: e.value,
287
+ children: e.label
288
+ }, e.value))
265
289
  }),
266
- /* @__PURE__ */ v("p", {
290
+ /* @__PURE__ */ y("p", {
267
291
  className: "text-xs text-text-secondary mt-1",
268
- children: "How often to check connection health status"
292
+ children: D("channel.healthCheckIntervalHint", "How often to check connection health status")
269
293
  })
270
294
  ] })]
271
295
  }),
272
- /* @__PURE__ */ y(x, {
296
+ /* @__PURE__ */ b(S, {
273
297
  treatment: "plain",
274
298
  className: "border-border-seam p-6 space-y-4",
275
- children: [/* @__PURE__ */ y("div", {
299
+ children: [/* @__PURE__ */ b("div", {
276
300
  className: "flex items-center gap-2",
277
- children: [/* @__PURE__ */ v(g, { className: "size-5 text-primary" }), /* @__PURE__ */ v("h2", {
301
+ children: [/* @__PURE__ */ y(_, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
278
302
  className: "text-lg font-semibold",
279
303
  children: D("channel.security", "Security")
280
304
  })]
281
- }), /* @__PURE__ */ y("div", {
305
+ }), /* @__PURE__ */ b("div", {
282
306
  className: "space-y-4",
283
307
  children: [
284
- /* @__PURE__ */ y("label", {
308
+ /* @__PURE__ */ b("label", {
285
309
  className: "flex items-center justify-between p-4 rounded-lg border hover:bg-bg-sunken/50 cursor-pointer",
286
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
310
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
287
311
  className: "font-medium",
288
312
  children: D("channel.webhookSignatureVerification", "Webhook Signature Verification")
289
- }), /* @__PURE__ */ v("p", {
313
+ }), /* @__PURE__ */ y("p", {
290
314
  className: "text-sm text-text-secondary",
291
- children: "Verify HMAC signatures on incoming webhooks"
292
- })] }), /* @__PURE__ */ v("input", {
315
+ children: D("channel.webhookSignatureVerificationHint", "Verify HMAC signatures on incoming webhooks")
316
+ })] }), /* @__PURE__ */ y("input", {
293
317
  type: "checkbox",
294
318
  "aria-label": D("channel.webhookSignatureVerification", "Webhook Signature Verification"),
295
- checked: M.enableWebhookVerification,
296
- onChange: (e) => U("enableWebhookVerification", e.target.checked),
319
+ checked: F.enableWebhookVerification,
320
+ onChange: (e) => K("enableWebhookVerification", e.target.checked),
297
321
  className: "size-5 rounded border-gray-300 text-primary focus:ring-primary"
298
322
  })]
299
323
  }),
300
- /* @__PURE__ */ y("label", {
324
+ /* @__PURE__ */ b("label", {
301
325
  className: "flex items-center justify-between p-4 rounded-lg border hover:bg-bg-sunken/50 cursor-pointer",
302
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
326
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
303
327
  className: "font-medium",
304
328
  children: D("channel.auditLogging", "Audit Logging")
305
- }), /* @__PURE__ */ v("p", {
329
+ }), /* @__PURE__ */ y("p", {
306
330
  className: "text-sm text-text-secondary",
307
- children: "Log all channel operations for audit trail"
308
- })] }), /* @__PURE__ */ v("input", {
331
+ children: D("channel.auditLoggingHint", "Log all channel operations for audit trail")
332
+ })] }), /* @__PURE__ */ y("input", {
309
333
  type: "checkbox",
310
334
  "aria-label": D("channel.auditLogging", "Audit Logging"),
311
- checked: M.enableAuditLogging,
312
- onChange: (e) => U("enableAuditLogging", e.target.checked),
335
+ checked: F.enableAuditLogging,
336
+ onChange: (e) => K("enableAuditLogging", e.target.checked),
313
337
  className: "size-5 rounded border-gray-300 text-primary focus:ring-primary"
314
338
  })]
315
339
  }),
316
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
340
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
317
341
  className: "text-sm font-medium block mb-1",
318
342
  children: D("channel.sessionTimeout", "Session Timeout (minutes)")
319
343
  }), /* @__PURE__ */ y("select", {
320
- value: M.sessionTimeoutMinutes,
321
- onChange: (e) => U("sessionTimeoutMinutes", Number(e.target.value)),
344
+ value: F.sessionTimeoutMinutes,
345
+ onChange: (e) => K("sessionTimeoutMinutes", Number(e.target.value)),
322
346
  className: "w-full px-4 py-2 rounded-lg border bg-bg-surface focus:outline-none focus:ring-2 focus:ring-primary",
323
- children: [
324
- /* @__PURE__ */ v("option", {
325
- value: 15,
326
- children: "15 minutes"
327
- }),
328
- /* @__PURE__ */ v("option", {
329
- value: 30,
330
- children: "30 minutes"
331
- }),
332
- /* @__PURE__ */ v("option", {
333
- value: 60,
334
- children: "1 hour"
335
- }),
336
- /* @__PURE__ */ v("option", {
337
- value: 120,
338
- children: "2 hours"
339
- }),
340
- /* @__PURE__ */ v("option", {
341
- value: 240,
342
- children: "4 hours"
343
- })
344
- ]
347
+ children: A.map((e) => /* @__PURE__ */ y("option", {
348
+ value: e.value,
349
+ children: e.label
350
+ }, e.value))
345
351
  })] })
346
352
  ]
347
353
  })]
348
354
  }),
349
- /* @__PURE__ */ y(x, {
355
+ /* @__PURE__ */ b(S, {
350
356
  treatment: "plain",
351
357
  className: "border-border-seam p-6 space-y-4",
352
- children: [/* @__PURE__ */ y("div", {
358
+ children: [/* @__PURE__ */ b("div", {
353
359
  className: "flex items-center gap-2",
354
- children: [/* @__PURE__ */ v(f, { className: "size-5 text-primary" }), /* @__PURE__ */ v("h2", {
360
+ children: [/* @__PURE__ */ y(p, { className: "size-5 text-primary" }), /* @__PURE__ */ y("h2", {
355
361
  className: "text-lg font-semibold",
356
362
  children: D("channel.dataManagement", "Data Management")
357
363
  })]
358
- }), /* @__PURE__ */ v(C, {
364
+ }), /* @__PURE__ */ y(w, {
359
365
  collapsedHeight: 96,
360
366
  label: D("channel.showRetentionPolicies", "Show retention policies"),
361
- children: /* @__PURE__ */ y("div", {
367
+ children: /* @__PURE__ */ b("div", {
362
368
  className: "space-y-4",
363
369
  children: [
364
- /* @__PURE__ */ y("div", {
370
+ /* @__PURE__ */ b("div", {
365
371
  className: "p-4 rounded-lg border",
366
- children: [/* @__PURE__ */ y("div", {
372
+ children: [/* @__PURE__ */ b("div", {
367
373
  className: "flex items-center justify-between mb-2",
368
- children: [/* @__PURE__ */ v("p", {
374
+ children: [/* @__PURE__ */ y("p", {
369
375
  className: "font-medium",
370
376
  children: D("channel.webhookEventRetention", "Webhook Event Retention")
371
- }), /* @__PURE__ */ v("span", {
377
+ }), /* @__PURE__ */ y("span", {
372
378
  className: "text-sm text-text-secondary",
373
- children: "7 days"
379
+ children: D("channel.retentionDays", "{{count}} days", { count: 7 })
374
380
  })]
375
- }), /* @__PURE__ */ v("p", {
381
+ }), /* @__PURE__ */ y("p", {
376
382
  className: "text-sm text-text-secondary",
377
- children: "Incoming webhook events are automatically deleted after 7 days"
383
+ children: D("channel.webhookEventRetentionHint", "Incoming webhook events are automatically deleted after 7 days")
378
384
  })]
379
385
  }),
380
- /* @__PURE__ */ y("div", {
386
+ /* @__PURE__ */ b("div", {
381
387
  className: "p-4 rounded-lg border",
382
- children: [/* @__PURE__ */ y("div", {
388
+ children: [/* @__PURE__ */ b("div", {
383
389
  className: "flex items-center justify-between mb-2",
384
- children: [/* @__PURE__ */ v("p", {
390
+ children: [/* @__PURE__ */ y("p", {
385
391
  className: "font-medium",
386
392
  children: D("channel.deliveryAttemptRetention", "Delivery Attempt Retention")
387
- }), /* @__PURE__ */ v("span", {
393
+ }), /* @__PURE__ */ y("span", {
388
394
  className: "text-sm text-text-secondary",
389
- children: "7 days"
395
+ children: D("channel.retentionDays", "{{count}} days", { count: 7 })
390
396
  })]
391
- }), /* @__PURE__ */ v("p", {
397
+ }), /* @__PURE__ */ y("p", {
392
398
  className: "text-sm text-text-secondary",
393
- children: "Successful delivery attempts are automatically deleted after 7 days"
399
+ children: D("channel.deliveryAttemptRetentionHint", "Successful delivery attempts are automatically deleted after 7 days")
394
400
  })]
395
401
  }),
396
- /* @__PURE__ */ y("div", {
402
+ /* @__PURE__ */ b("div", {
397
403
  className: "p-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle",
398
- children: [/* @__PURE__ */ y("div", {
404
+ children: [/* @__PURE__ */ b("div", {
399
405
  className: "flex items-center justify-between mb-2",
400
- children: [/* @__PURE__ */ v("p", {
406
+ children: [/* @__PURE__ */ y("p", {
401
407
  className: "font-medium",
402
408
  children: D("channel.failedDeliveryRetention", "Failed Delivery Retention")
403
- }), /* @__PURE__ */ v("span", {
409
+ }), /* @__PURE__ */ y("span", {
404
410
  className: "text-sm text-status-warning-text",
405
- children: "30 days"
411
+ children: D("channel.retentionDays", "{{count}} days", { count: 30 })
406
412
  })]
407
- }), /* @__PURE__ */ v("p", {
413
+ }), /* @__PURE__ */ y("p", {
408
414
  className: "text-sm text-text-secondary",
409
- children: "Failed delivery attempts are kept for 30 days for debugging"
415
+ children: D("channel.failedDeliveryRetentionHint", "Failed delivery attempts are kept for 30 days for debugging")
410
416
  })]
411
417
  })
412
418
  ]
413
419
  })
414
420
  })]
415
421
  }),
416
- /* @__PURE__ */ v("div", {
422
+ /* @__PURE__ */ y("div", {
417
423
  className: "flex justify-end pt-4",
418
- children: /* @__PURE__ */ y("button", {
424
+ children: /* @__PURE__ */ b("button", {
419
425
  type: "button",
420
- onClick: H,
421
- disabled: P || k || !!A,
426
+ onClick: G,
427
+ disabled: L || M || !!N,
422
428
  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",
423
- children: [P ? /* @__PURE__ */ v(p, { className: "size-5 animate-spin" }) : /* @__PURE__ */ v(m, { className: "size-5 " }), D("channel.saveSettings", "Save Settings")]
429
+ children: [L ? /* @__PURE__ */ y(m, { className: "size-5 animate-spin" }) : /* @__PURE__ */ y(h, { className: "size-5 " }), D("channel.saveSettings", "Save Settings")]
424
430
  })
425
431
  })
426
432
  ]
@@ -429,6 +435,6 @@ function T() {
429
435
  });
430
436
  }
431
437
  //#endregion
432
- export { T as ChannelSettingsPage };
438
+ export { E as ChannelSettingsPage };
433
439
 
434
440
  //# sourceMappingURL=ChannelSettingsPage.js.map