@burdenoff/microfe-notification 2026.1123.1 → 2026.1125.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/AdminNotificationRoutes.js +59 -51
- package/dist/AdminNotificationRoutes.js.map +1 -1
- package/dist/NotificationRoutes.js +76 -68
- package/dist/NotificationRoutes.js.map +1 -1
- package/dist/UserNotificationRoutes.js +39 -31
- package/dist/UserNotificationRoutes.js.map +1 -1
- package/dist/components/NotificationListFooter.js +1 -1
- package/dist/components/NotificationListFooter.js.map +1 -1
- package/dist/components/loadingSystem.d.ts +64 -0
- package/dist/components/loadingSystem.js +34 -0
- package/dist/components/loadingSystem.js.map +1 -0
- package/dist/navigation-v2/AdminPageV2.js +23 -16
- package/dist/navigation-v2/AdminPageV2.js.map +1 -1
- package/dist/navigation-v2/NotificationArchivedV2.js +100 -93
- package/dist/navigation-v2/NotificationArchivedV2.js.map +1 -1
- package/dist/navigation-v2/NotificationInboxV2.js +130 -123
- package/dist/navigation-v2/NotificationInboxV2.js.map +1 -1
- package/dist/navigation-v2/NotificationSettingsV2.js +91 -84
- package/dist/navigation-v2/NotificationSettingsV2.js.map +1 -1
- package/dist/navigation-v2/NotificationsV2Landing.js +31 -23
- package/dist/navigation-v2/NotificationsV2Landing.js.map +1 -1
- package/dist/pages/CreateNotificationPage.js +442 -432
- package/dist/pages/CreateNotificationPage.js.map +1 -1
- package/dist/pages/NotificationCenterPage.js +91 -84
- package/dist/pages/NotificationCenterPage.js.map +1 -1
- package/dist/pages/NotificationHistoryAdminPage.js +226 -219
- package/dist/pages/NotificationHistoryAdminPage.js.map +1 -1
- package/dist/pages/NotificationHistoryPage.js +69 -62
- package/dist/pages/NotificationHistoryPage.js.map +1 -1
- package/dist/pages/NotificationLandingPage.js +42 -34
- package/dist/pages/NotificationLandingPage.js.map +1 -1
- package/dist/pages/NotificationPreferencesPage.js +80 -70
- package/dist/pages/NotificationPreferencesPage.js.map +1 -1
- package/dist/pages/NotificationTemplatesPage.js +192 -181
- package/dist/pages/NotificationTemplatesPage.js.map +1 -1
- package/dist/pages/NotificationTopicsPage.js +124 -117
- package/dist/pages/NotificationTopicsPage.js.map +1 -1
- package/dist/pages/TemplateEditorPage.js +248 -233
- package/dist/pages/TemplateEditorPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -9,69 +9,70 @@ import { NOTIFICATION_PERMISSIONS as re } from "../constants/permissions.js";
|
|
|
9
9
|
import { useTr as ie } from "../shared/hooks/useTr.js";
|
|
10
10
|
import { nativeImpact as ae, nativeNotify as i } from "../utils/nativeBridge.js";
|
|
11
11
|
import { useNavigationV2 as oe, useNotificationPaths as se } from "../navigation-v2/paths.js";
|
|
12
|
+
import { CompactMarkOr as ce, SectionLoaderOr as le, SpinnerIcon as ue } from "../components/loadingSystem.js";
|
|
12
13
|
import { useMemo as a, useState as o } from "react";
|
|
13
|
-
import { useGlobalUi as
|
|
14
|
-
import { AlertCircle as
|
|
15
|
-
import { useNavigate as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { CTAOverflowMenu as
|
|
14
|
+
import { useGlobalUi as de, usePermissions as fe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
15
|
+
import { AlertCircle as pe, ArrowLeft as me, Bell as he, CheckCircle2 as ge, Eye as _e, EyeOff as ve, FileText as ye, ImagePlus as be, Link2 as xe, Mail as Se, MessageSquare as s, Send as Ce, Smartphone as c, User as l, Users as we, X as Te } from "lucide-react";
|
|
16
|
+
import { useNavigate as Ee } from "react-router";
|
|
17
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
18
|
+
import { CTAOverflowMenu as De, GlassCard as Oe, IllustratedEmptyState as ke, NextSteps as Ae, OptionalFields as je, PagePurpose as Me, ThemedSelect as p } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
// src/pages/CreateNotificationPage.tsx
|
|
19
|
-
var
|
|
20
|
+
var Ne = [
|
|
20
21
|
{
|
|
21
22
|
value: "EMAIL",
|
|
22
23
|
label: "Email",
|
|
23
|
-
icon:
|
|
24
|
+
icon: Se,
|
|
24
25
|
description: "Send via email"
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
value: "SMS",
|
|
28
29
|
label: "SMS",
|
|
29
|
-
icon:
|
|
30
|
+
icon: s,
|
|
30
31
|
description: "Send text message"
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
value: "PUSH",
|
|
34
35
|
label: "Push",
|
|
35
|
-
icon:
|
|
36
|
+
icon: c,
|
|
36
37
|
description: "Mobile push notification"
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
value: "WEBHOOK",
|
|
40
41
|
label: "Webhook",
|
|
41
|
-
icon:
|
|
42
|
+
icon: xe,
|
|
42
43
|
description: "POST to a webhook URL"
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
value: "WHATSAPP",
|
|
46
47
|
label: "WhatsApp",
|
|
47
|
-
icon:
|
|
48
|
+
icon: s,
|
|
48
49
|
description: "Send via WhatsApp"
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
52
|
value: "SLACK",
|
|
52
53
|
label: "Slack",
|
|
53
|
-
icon:
|
|
54
|
+
icon: s,
|
|
54
55
|
description: "Send to Slack"
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
value: "TEAMS",
|
|
58
59
|
label: "Teams",
|
|
59
|
-
icon:
|
|
60
|
+
icon: s,
|
|
60
61
|
description: "Send to Microsoft Teams"
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
value: "TELEGRAM",
|
|
64
65
|
label: "Telegram",
|
|
65
|
-
icon:
|
|
66
|
+
icon: s,
|
|
66
67
|
description: "Send to Telegram"
|
|
67
68
|
},
|
|
68
69
|
{
|
|
69
70
|
value: "DISCORD",
|
|
70
71
|
label: "Discord",
|
|
71
|
-
icon:
|
|
72
|
+
icon: s,
|
|
72
73
|
description: "Send to Discord"
|
|
73
74
|
}
|
|
74
|
-
],
|
|
75
|
+
], Pe = [
|
|
75
76
|
{
|
|
76
77
|
value: "TRANSACTIONAL",
|
|
77
78
|
label: "Transactional",
|
|
@@ -92,7 +93,7 @@ var ke = [
|
|
|
92
93
|
label: "Alert",
|
|
93
94
|
description: "Important alerts and warnings"
|
|
94
95
|
}
|
|
95
|
-
],
|
|
96
|
+
], Fe = [
|
|
96
97
|
{
|
|
97
98
|
value: "LOW",
|
|
98
99
|
label: "Low",
|
|
@@ -113,7 +114,7 @@ var ke = [
|
|
|
113
114
|
label: "Urgent",
|
|
114
115
|
color: "bg-status-error-bg-subtle text-status-error-text"
|
|
115
116
|
}
|
|
116
|
-
],
|
|
117
|
+
], Ie = [
|
|
117
118
|
{
|
|
118
119
|
value: "",
|
|
119
120
|
labelKey: "notifications.userRole.allRoles",
|
|
@@ -149,7 +150,7 @@ var ke = [
|
|
|
149
150
|
labelKey: "notifications.userRole.guest",
|
|
150
151
|
label: "Guest"
|
|
151
152
|
}
|
|
152
|
-
],
|
|
153
|
+
], Le = [
|
|
153
154
|
{
|
|
154
155
|
value: "",
|
|
155
156
|
labelKey: "notifications.userStatus.allStatuses",
|
|
@@ -176,24 +177,24 @@ var ke = [
|
|
|
176
177
|
label: "Inactive"
|
|
177
178
|
}
|
|
178
179
|
];
|
|
179
|
-
function
|
|
180
|
-
let
|
|
180
|
+
function m() {
|
|
181
|
+
let Se = Ee(), s = ie(), c = se(), m = oe(), { hasPermission: Re, isLoading: ze, refreshPermissions: Be } = fe(), { showToast: Ve } = de(), { sendNotification: He, sendBatch: Ue, sendWithTemplate: We, isSending: h, error: Ge, lastResult: Ke, clearError: qe, clearResult: Je } = t(), { templates: g, isLoading: Ye } = n(), { trackNotificationSent: Xe } = te(), { searchUsers: _, fetchAllUsers: Ze, results: v, isLoading: Qe, error: y } = r(), { topics: $e } = ee({ isActive: !0 }), [b, et] = o("compose"), [x, tt] = o("EMAIL"), [S, nt] = o("MARKETING"), [C, rt] = o("MEDIUM"), [w, it] = o([]), [T, E] = o("manual"), [D, O] = o([]), [k, at] = o(!1), [A, ot] = o(""), [j, st] = o(""), [M, ct] = o(""), [N, lt] = o(""), [ut, dt] = o(""), [ft, pt] = o(!1), [P, mt] = o(""), [ht, F] = o([{
|
|
181
182
|
url: "",
|
|
182
183
|
label: "",
|
|
183
184
|
kind: "image"
|
|
184
|
-
}]), [
|
|
185
|
+
}]), [gt, I] = o([{
|
|
185
186
|
id: "primary-action",
|
|
186
187
|
label: "",
|
|
187
188
|
url: "",
|
|
188
189
|
style: "primary"
|
|
189
|
-
}]), [L,
|
|
190
|
+
}]), [L, _t] = o(!1), [R, z] = o([]), [B, V] = o(""), [H, vt] = o(""), [U, yt] = o({}), [W, bt] = o(!1), [G, xt] = o(""), [K, St] = o(!0), [Ct, q] = o(null), [J, Y] = o(!1), X = a(() => g.find((e) => e.slug === H), [g, H]), Z = a(() => {
|
|
190
191
|
if (!X?.variables) return null;
|
|
191
192
|
try {
|
|
192
193
|
return typeof X.variables == "string" ? JSON.parse(X.variables) : X.variables;
|
|
193
194
|
} catch {
|
|
194
195
|
return null;
|
|
195
196
|
}
|
|
196
|
-
}, [X]),
|
|
197
|
+
}, [X]), wt = a(() => Z ? Array.isArray(Z) ? Z.filter((e) => e && typeof e.name == "string").map((e) => ({
|
|
197
198
|
key: e.name,
|
|
198
199
|
type: e.type || "string",
|
|
199
200
|
required: !!e.required,
|
|
@@ -205,44 +206,50 @@ function g() {
|
|
|
205
206
|
required: !1,
|
|
206
207
|
description: "",
|
|
207
208
|
defaultValue: ""
|
|
208
|
-
})) : [] : [], [Z]),
|
|
209
|
+
})) : [] : [], [Z]), Tt = (e) => {
|
|
209
210
|
let t = e;
|
|
210
211
|
for (let [e, n] of Object.entries(U)) t = t.replace(RegExp(`\\{\\{${e}\\}\\}`, "g"), n || `{{${e}}}`);
|
|
211
212
|
return t;
|
|
212
|
-
},
|
|
213
|
+
}, Et = a(() => b === "template" && X ? Tt(X.bodyTemplate || "") : N, [
|
|
213
214
|
b,
|
|
214
215
|
X,
|
|
215
216
|
U,
|
|
216
217
|
N
|
|
217
|
-
]),
|
|
218
|
+
]), Dt = a(() => b === "template" && X?.subject ? Tt(X.subject) : M, [
|
|
218
219
|
b,
|
|
219
220
|
X,
|
|
220
221
|
U,
|
|
221
222
|
M
|
|
222
|
-
]),
|
|
223
|
+
]), Ot = [
|
|
223
224
|
"EMAIL",
|
|
224
225
|
"SMS",
|
|
225
226
|
"WHATSAPP"
|
|
226
|
-
].includes(x), Q = a(() =>
|
|
227
|
+
].includes(x), Q = a(() => gt.filter((e) => e.label.trim() && e.url.trim()).map((e) => ({
|
|
227
228
|
id: e.id,
|
|
228
229
|
label: e.label.trim(),
|
|
229
230
|
url: e.url.trim(),
|
|
230
231
|
style: e.style
|
|
231
|
-
})), [
|
|
232
|
+
})), [gt]), $ = a(() => ht.filter((e) => e.url.trim()).map((e) => ({
|
|
232
233
|
url: e.url.trim(),
|
|
233
234
|
label: e.label.trim() || void 0,
|
|
234
235
|
kind: e.kind
|
|
235
|
-
})), [
|
|
236
|
-
if (
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
})), [ht]);
|
|
237
|
+
if (ze) return /* @__PURE__ */ d(le, {
|
|
238
|
+
minHeight: "16rem",
|
|
239
|
+
today: /* @__PURE__ */ d("div", {
|
|
240
|
+
className: "flex h-64 items-center justify-center",
|
|
241
|
+
children: /* @__PURE__ */ d(ce, {
|
|
242
|
+
className: "h-8 w-8",
|
|
243
|
+
today: /* @__PURE__ */ d("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" })
|
|
244
|
+
})
|
|
245
|
+
})
|
|
239
246
|
});
|
|
240
|
-
let
|
|
241
|
-
if (!
|
|
247
|
+
let kt = Re(re.NOTIFICATION_CREATE), At = Re(re.NOTIFICATION_SEND);
|
|
248
|
+
if (!kt || !At) return /* @__PURE__ */ d("div", {
|
|
242
249
|
className: "p-8 text-center text-text-secondary",
|
|
243
|
-
children:
|
|
250
|
+
children: s("notifications.noPermissionCreateAndSend", "You don't have permission to create and send notifications.")
|
|
244
251
|
});
|
|
245
|
-
let
|
|
252
|
+
let jt = (e) => x === "EMAIL" ? {
|
|
246
253
|
userId: e.id,
|
|
247
254
|
email: e.email
|
|
248
255
|
} : x === "SMS" ? e.phoneNumber ? {
|
|
@@ -254,11 +261,11 @@ function g() {
|
|
|
254
261
|
} : null : {
|
|
255
262
|
userId: e.id,
|
|
256
263
|
email: e.email
|
|
257
|
-
},
|
|
264
|
+
}, Mt = async () => (k ? await Ze({
|
|
258
265
|
search: B,
|
|
259
266
|
role: A || void 0,
|
|
260
267
|
status: j || void 0
|
|
261
|
-
}) : D).map((e) =>
|
|
268
|
+
}) : D).map((e) => jt(e)).filter((e) => !!e), Nt = () => w.map((e) => ({
|
|
262
269
|
email: e.email,
|
|
263
270
|
phoneNumber: e.phoneNumber,
|
|
264
271
|
pushToken: e.pushToken,
|
|
@@ -267,22 +274,22 @@ function g() {
|
|
|
267
274
|
teamsUserId: e.teamsUserId,
|
|
268
275
|
webhookUrl: e.webhookUrl,
|
|
269
276
|
userId: e.userId
|
|
270
|
-
})),
|
|
271
|
-
if (q(null), T === "manual" && w.length === 0) return q(
|
|
272
|
-
if (T === "directory" && D.length === 0 && !k) return q(
|
|
273
|
-
if (L && R.length === 0) return q(
|
|
274
|
-
if (S === "MARKETING" && !P) return q(
|
|
277
|
+
})), Pt = () => {
|
|
278
|
+
if (q(null), T === "manual" && w.length === 0) return q(s("notifications.addRecipientRequired", "Please add at least one recipient")), !1;
|
|
279
|
+
if (T === "directory" && D.length === 0 && !k) return q(s("notifications.selectDirectoryUsersRequired", "Please select at least one user")), !1;
|
|
280
|
+
if (L && R.length === 0) return q(s("notifications.selectUsersRequired", "Please select users for in-app notifications")), !1;
|
|
281
|
+
if (S === "MARKETING" && !P) return q(s("notifications.selectTopicRequired", "Please choose a topic for promotional notifications")), !1;
|
|
275
282
|
if (b === "compose") {
|
|
276
|
-
if (!N.trim()) return q(
|
|
277
|
-
if (x === "EMAIL" && !M.trim()) return q(
|
|
278
|
-
} else if (!H) return q(
|
|
283
|
+
if (!N.trim()) return q(s("notifications.bodyRequired", "Message body is required")), !1;
|
|
284
|
+
if (x === "EMAIL" && !M.trim()) return q(s("notifications.subjectRequired", "Subject is required for email notifications")), !1;
|
|
285
|
+
} else if (!H) return q(s("notifications.selectTemplateRequired", "Please select a template")), !1;
|
|
279
286
|
return !0;
|
|
280
|
-
},
|
|
281
|
-
if (ae("light"),
|
|
282
|
-
|
|
287
|
+
}, Ft = async () => {
|
|
288
|
+
if (ae("light"), Pt()) {
|
|
289
|
+
qe(), Je(), Y(!1);
|
|
283
290
|
try {
|
|
284
|
-
let e = T === "directory" ? await
|
|
285
|
-
|
|
291
|
+
let e = T === "directory" ? await Mt() : Nt(), t = e.length + (L ? R.length : 0), n = (e, n) => {
|
|
292
|
+
Xe({
|
|
286
293
|
mode: b,
|
|
287
294
|
channel: x,
|
|
288
295
|
type: b === "template" && X?.type || S,
|
|
@@ -298,11 +305,11 @@ function g() {
|
|
|
298
305
|
});
|
|
299
306
|
};
|
|
300
307
|
if (e.length === 0) {
|
|
301
|
-
q(
|
|
308
|
+
q(s("notifications.noDeliverableRecipients", "No valid recipients matched the selected channel and filters"));
|
|
302
309
|
return;
|
|
303
310
|
}
|
|
304
311
|
if (b === "template") {
|
|
305
|
-
let t = await
|
|
312
|
+
let t = await We({
|
|
306
313
|
templateSlug: H,
|
|
307
314
|
variables: U,
|
|
308
315
|
recipients: e,
|
|
@@ -328,7 +335,7 @@ function g() {
|
|
|
328
335
|
channel: x,
|
|
329
336
|
recipient: e,
|
|
330
337
|
subject: x === "EMAIL" ? M : void 0,
|
|
331
|
-
htmlBody:
|
|
338
|
+
htmlBody: ft && ut ? ut : void 0,
|
|
332
339
|
type: S,
|
|
333
340
|
priority: C,
|
|
334
341
|
topicId: P || void 0,
|
|
@@ -337,7 +344,7 @@ function g() {
|
|
|
337
344
|
media: $
|
|
338
345
|
}));
|
|
339
346
|
if (W || t.length > 1) {
|
|
340
|
-
let e = await
|
|
347
|
+
let e = await Ue({
|
|
341
348
|
notifications: t,
|
|
342
349
|
...W && G && {
|
|
343
350
|
scheduledFor: new Date(G).toISOString(),
|
|
@@ -345,7 +352,7 @@ function g() {
|
|
|
345
352
|
}
|
|
346
353
|
});
|
|
347
354
|
e && (e.successCount > 0 || e.totalRequested > 0) && (n(e.successCount, e.failureCount), Y(!0), i("success"));
|
|
348
|
-
} else (await
|
|
355
|
+
} else (await He({
|
|
349
356
|
notification: t[0],
|
|
350
357
|
platform: x,
|
|
351
358
|
...L && {
|
|
@@ -356,14 +363,14 @@ function g() {
|
|
|
356
363
|
}
|
|
357
364
|
} catch (t) {
|
|
358
365
|
if (i("error"), e(t)) {
|
|
359
|
-
|
|
366
|
+
qe(), Ve(s("notifications.permissionDeniedOnSend", "You don't have permission to send that notification. Refreshing access…"), "warning"), Be().catch((e) => console.warn("[permissions] refresh failed after send denial:", e));
|
|
360
367
|
return;
|
|
361
368
|
}
|
|
362
369
|
console.error("Failed to send notification:", t);
|
|
363
370
|
}
|
|
364
371
|
}
|
|
365
|
-
},
|
|
366
|
-
|
|
372
|
+
}, It = () => {
|
|
373
|
+
it([]), E("manual"), O([]), at(!1), ot(""), st(""), ct(""), lt(""), dt(""), mt(""), F([{
|
|
367
374
|
url: "",
|
|
368
375
|
label: "",
|
|
369
376
|
kind: "image"
|
|
@@ -372,109 +379,109 @@ function g() {
|
|
|
372
379
|
label: "",
|
|
373
380
|
url: "",
|
|
374
381
|
style: "primary"
|
|
375
|
-
}]),
|
|
376
|
-
},
|
|
382
|
+
}]), vt(""), yt({}), _t(!1), z([]), V(""), bt(!1), xt(""), Y(!1), qe(), Je();
|
|
383
|
+
}, Lt = Ct || Ge, Rt = /* @__PURE__ */ d(u, { children: /* @__PURE__ */ f("div", {
|
|
377
384
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ f("label", {
|
|
379
386
|
className: "flex items-center gap-3 cursor-pointer",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ d("input", {
|
|
381
388
|
type: "checkbox",
|
|
382
389
|
checked: W,
|
|
383
390
|
onChange: (e) => {
|
|
384
|
-
|
|
391
|
+
bt(e.target.checked), e.target.checked || xt("");
|
|
385
392
|
},
|
|
386
393
|
className: "w-4 h-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
|
|
387
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ d("span", {
|
|
388
395
|
className: "text-sm font-medium text-text-primary",
|
|
389
|
-
children:
|
|
396
|
+
children: s("notifications.scheduleForLater", "Schedule for later")
|
|
390
397
|
})]
|
|
391
|
-
}), W && /* @__PURE__ */
|
|
398
|
+
}), W && /* @__PURE__ */ f("div", {
|
|
392
399
|
className: "mt-3 ml-7",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ d("input", {
|
|
394
401
|
type: "datetime-local",
|
|
395
|
-
"aria-label":
|
|
402
|
+
"aria-label": s("notifications.scheduleDateTime", "Send date and time"),
|
|
396
403
|
value: G,
|
|
397
404
|
min: (/* @__PURE__ */ new Date()).toISOString().slice(0, 16),
|
|
398
|
-
onChange: (e) =>
|
|
405
|
+
onChange: (e) => xt(e.target.value),
|
|
399
406
|
className: "px-4 py-2 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
400
|
-
}), /* @__PURE__ */
|
|
407
|
+
}), /* @__PURE__ */ f("p", {
|
|
401
408
|
className: "text-xs text-text-tertiary mt-1",
|
|
402
409
|
children: [
|
|
403
|
-
|
|
410
|
+
s("notifications.timezone", "Timezone"),
|
|
404
411
|
":",
|
|
405
412
|
" ",
|
|
406
413
|
Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
407
414
|
]
|
|
408
415
|
})]
|
|
409
416
|
})]
|
|
410
|
-
}) }),
|
|
417
|
+
}) }), zt = /* @__PURE__ */ d(u, { children: /* @__PURE__ */ d("div", {
|
|
411
418
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
412
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ f("div", {
|
|
413
420
|
className: "grid grid-cols-2 gap-4",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
421
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
415
422
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
416
|
-
children:
|
|
417
|
-
}), /* @__PURE__ */ p
|
|
418
|
-
"aria-label":
|
|
423
|
+
children: s("notifications.typeLabel", "Type")
|
|
424
|
+
}), /* @__PURE__ */ d(p, {
|
|
425
|
+
"aria-label": s("notifications.typeLabel", "Type"),
|
|
419
426
|
value: S,
|
|
420
|
-
onChange: (e) =>
|
|
427
|
+
onChange: (e) => nt(e.target.value),
|
|
421
428
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
422
|
-
children:
|
|
429
|
+
children: Pe.map((e) => /* @__PURE__ */ d("option", {
|
|
423
430
|
value: e.value,
|
|
424
|
-
children:
|
|
431
|
+
children: s(`notifications.type.${e.value}`, e.label)
|
|
425
432
|
}, e.value))
|
|
426
|
-
})] }), /* @__PURE__ */
|
|
433
|
+
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
427
434
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
428
|
-
children:
|
|
429
|
-
}), /* @__PURE__ */ p
|
|
430
|
-
"aria-label":
|
|
435
|
+
children: s("notifications.priorityLabel", "Priority")
|
|
436
|
+
}), /* @__PURE__ */ d(p, {
|
|
437
|
+
"aria-label": s("notifications.priorityLabel", "Priority"),
|
|
431
438
|
value: C,
|
|
432
|
-
onChange: (e) =>
|
|
439
|
+
onChange: (e) => rt(e.target.value),
|
|
433
440
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
434
|
-
children:
|
|
441
|
+
children: Fe.map((e) => /* @__PURE__ */ d("option", {
|
|
435
442
|
value: e.value,
|
|
436
|
-
children:
|
|
443
|
+
children: s(`notifications.priority.${e.value}`, e.label)
|
|
437
444
|
}, e.value))
|
|
438
445
|
})] })]
|
|
439
446
|
})
|
|
440
|
-
}) }),
|
|
447
|
+
}) }), Bt = /* @__PURE__ */ d(u, { children: /* @__PURE__ */ f("div", {
|
|
441
448
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ f("div", {
|
|
443
450
|
className: "mb-4 flex items-center gap-2",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ d(xe, {
|
|
445
452
|
size: 18,
|
|
446
453
|
className: "text-text-secondary"
|
|
447
|
-
}), /* @__PURE__ */
|
|
454
|
+
}), /* @__PURE__ */ d("h2", {
|
|
448
455
|
className: "text-sm font-medium text-text-primary",
|
|
449
|
-
children:
|
|
456
|
+
children: s("notifications.actions", "Actions")
|
|
450
457
|
})]
|
|
451
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ f("div", {
|
|
452
459
|
className: "space-y-3",
|
|
453
|
-
children: [
|
|
460
|
+
children: [gt.map((e, t) => /* @__PURE__ */ f("div", {
|
|
454
461
|
className: "grid gap-3 rounded-lg border border-border-subtle bg-bg-canvas p-3 md:grid-cols-[1fr,1fr,160px,auto]",
|
|
455
462
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ d("input", {
|
|
457
464
|
type: "text",
|
|
458
465
|
value: e.label,
|
|
459
466
|
onChange: (e) => I((n) => n.map((n, r) => r === t ? {
|
|
460
467
|
...n,
|
|
461
468
|
label: e.target.value
|
|
462
469
|
} : n)),
|
|
463
|
-
placeholder:
|
|
470
|
+
placeholder: s("notifications.actionLabel", "Action label"),
|
|
464
471
|
className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
|
|
465
472
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ d("input", {
|
|
467
474
|
type: "url",
|
|
468
475
|
value: e.url,
|
|
469
476
|
onChange: (e) => I((n) => n.map((n, r) => r === t ? {
|
|
470
477
|
...n,
|
|
471
478
|
url: e.target.value
|
|
472
479
|
} : n)),
|
|
473
|
-
placeholder:
|
|
480
|
+
placeholder: s("notifications.actionUrl", "https://..."),
|
|
474
481
|
className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
|
|
475
482
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
"aria-label":
|
|
483
|
+
/* @__PURE__ */ f(p, {
|
|
484
|
+
"aria-label": s("notifications.actionStyle", "Action style"),
|
|
478
485
|
value: e.style,
|
|
479
486
|
onChange: (e) => I((n) => n.map((n, r) => r === t ? {
|
|
480
487
|
...n,
|
|
@@ -482,21 +489,21 @@ function g() {
|
|
|
482
489
|
} : n)),
|
|
483
490
|
className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
484
491
|
children: [
|
|
485
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ d("option", {
|
|
486
493
|
value: "primary",
|
|
487
|
-
children:
|
|
494
|
+
children: s("notifications.actionStyle.primary", "Primary")
|
|
488
495
|
}),
|
|
489
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ d("option", {
|
|
490
497
|
value: "secondary",
|
|
491
|
-
children:
|
|
498
|
+
children: s("notifications.actionStyle.secondary", "Secondary")
|
|
492
499
|
}),
|
|
493
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ d("option", {
|
|
494
501
|
value: "danger",
|
|
495
|
-
children:
|
|
502
|
+
children: s("notifications.actionStyle.danger", "Danger")
|
|
496
503
|
})
|
|
497
504
|
]
|
|
498
505
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
506
|
+
/* @__PURE__ */ d("button", {
|
|
500
507
|
type: "button",
|
|
501
508
|
onClick: () => I((e) => e.length === 1 ? [{
|
|
502
509
|
id: "primary-action",
|
|
@@ -505,10 +512,10 @@ function g() {
|
|
|
505
512
|
style: "primary"
|
|
506
513
|
}] : e.filter((e, n) => n !== t)),
|
|
507
514
|
className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
|
|
508
|
-
children:
|
|
515
|
+
children: s("notifications.remove", "Remove")
|
|
509
516
|
})
|
|
510
517
|
]
|
|
511
|
-
}, e.id)), /* @__PURE__ */
|
|
518
|
+
}, e.id)), /* @__PURE__ */ d("button", {
|
|
512
519
|
type: "button",
|
|
513
520
|
onClick: () => I((e) => [...e, {
|
|
514
521
|
id: `action-${e.length + 1}`,
|
|
@@ -517,47 +524,47 @@ function g() {
|
|
|
517
524
|
style: "secondary"
|
|
518
525
|
}]),
|
|
519
526
|
className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
|
|
520
|
-
children:
|
|
527
|
+
children: s("notifications.addAction", "Add action")
|
|
521
528
|
})]
|
|
522
529
|
})]
|
|
523
|
-
}) }),
|
|
530
|
+
}) }), Vt = /* @__PURE__ */ d(u, { children: /* @__PURE__ */ f("div", {
|
|
524
531
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
532
|
+
children: [/* @__PURE__ */ f("div", {
|
|
526
533
|
className: "mb-4 flex items-center gap-2",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
534
|
+
children: [/* @__PURE__ */ d(be, {
|
|
528
535
|
size: 18,
|
|
529
536
|
className: "text-text-secondary"
|
|
530
|
-
}), /* @__PURE__ */
|
|
537
|
+
}), /* @__PURE__ */ d("h2", {
|
|
531
538
|
className: "text-sm font-medium text-text-primary",
|
|
532
|
-
children:
|
|
539
|
+
children: s("notifications.media", "Media")
|
|
533
540
|
})]
|
|
534
|
-
}), /* @__PURE__ */
|
|
541
|
+
}), /* @__PURE__ */ f("div", {
|
|
535
542
|
className: "space-y-3",
|
|
536
|
-
children: [
|
|
543
|
+
children: [ht.map((e, t) => /* @__PURE__ */ f("div", {
|
|
537
544
|
className: "grid gap-3 rounded-lg border border-border-subtle bg-bg-canvas p-3 md:grid-cols-[1fr,220px,140px,auto]",
|
|
538
545
|
children: [
|
|
539
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ d("input", {
|
|
540
547
|
type: "url",
|
|
541
548
|
value: e.url,
|
|
542
549
|
onChange: (e) => F((n) => n.map((n, r) => r === t ? {
|
|
543
550
|
...n,
|
|
544
551
|
url: e.target.value
|
|
545
552
|
} : n)),
|
|
546
|
-
placeholder:
|
|
553
|
+
placeholder: s("notifications.mediaUrl", "Media URL"),
|
|
547
554
|
className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
|
|
548
555
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ d("input", {
|
|
550
557
|
type: "text",
|
|
551
558
|
value: e.label,
|
|
552
559
|
onChange: (e) => F((n) => n.map((n, r) => r === t ? {
|
|
553
560
|
...n,
|
|
554
561
|
label: e.target.value
|
|
555
562
|
} : n)),
|
|
556
|
-
placeholder:
|
|
563
|
+
placeholder: s("notifications.mediaLabel", "Caption / label"),
|
|
557
564
|
className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary"
|
|
558
565
|
}),
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
"aria-label":
|
|
566
|
+
/* @__PURE__ */ f(p, {
|
|
567
|
+
"aria-label": s("notifications.mediaKindLabel", "Media kind"),
|
|
561
568
|
value: e.kind,
|
|
562
569
|
onChange: (e) => F((n) => n.map((n, r) => r === t ? {
|
|
563
570
|
...n,
|
|
@@ -565,21 +572,21 @@ function g() {
|
|
|
565
572
|
} : n)),
|
|
566
573
|
className: "rounded-md border border-border-subtle bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
567
574
|
children: [
|
|
568
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__PURE__ */ d("option", {
|
|
569
576
|
value: "image",
|
|
570
|
-
children:
|
|
577
|
+
children: s("notifications.mediaKind.image", "Image")
|
|
571
578
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ d("option", {
|
|
573
580
|
value: "video",
|
|
574
|
-
children:
|
|
581
|
+
children: s("notifications.mediaKind.video", "Video")
|
|
575
582
|
}),
|
|
576
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ d("option", {
|
|
577
584
|
value: "file",
|
|
578
|
-
children:
|
|
585
|
+
children: s("notifications.mediaKind.file", "File")
|
|
579
586
|
})
|
|
580
587
|
]
|
|
581
588
|
}),
|
|
582
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ d("button", {
|
|
583
590
|
type: "button",
|
|
584
591
|
onClick: () => F((e) => e.length === 1 ? [{
|
|
585
592
|
url: "",
|
|
@@ -587,10 +594,10 @@ function g() {
|
|
|
587
594
|
kind: "image"
|
|
588
595
|
}] : e.filter((e, n) => n !== t)),
|
|
589
596
|
className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
|
|
590
|
-
children:
|
|
597
|
+
children: s("notifications.remove", "Remove")
|
|
591
598
|
})
|
|
592
599
|
]
|
|
593
|
-
}, `${e.kind}-${t}`)), /* @__PURE__ */
|
|
600
|
+
}, `${e.kind}-${t}`)), /* @__PURE__ */ d("button", {
|
|
594
601
|
type: "button",
|
|
595
602
|
onClick: () => F((e) => [...e, {
|
|
596
603
|
url: "",
|
|
@@ -598,214 +605,214 @@ function g() {
|
|
|
598
605
|
kind: "image"
|
|
599
606
|
}]),
|
|
600
607
|
className: "rounded-md border border-border-subtle px-3 py-2 text-sm text-text-secondary hover:bg-bg-sunken",
|
|
601
|
-
children:
|
|
608
|
+
children: s("notifications.addMedia", "Add media")
|
|
602
609
|
})]
|
|
603
610
|
})]
|
|
604
611
|
}) });
|
|
605
|
-
return /* @__PURE__ */
|
|
612
|
+
return /* @__PURE__ */ f("div", {
|
|
606
613
|
className: "min-h-screen bg-bg-canvas",
|
|
607
614
|
children: [
|
|
608
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ f("div", {
|
|
609
616
|
className: "sticky top-0 z-10 flex flex-wrap items-center justify-between gap-3 px-6 py-4 bg-bg-surface border-b border-border-seam sm:flex-nowrap",
|
|
610
617
|
"data-testid": "notification-send-header",
|
|
611
|
-
children: [/* @__PURE__ */
|
|
618
|
+
children: [/* @__PURE__ */ f("div", {
|
|
612
619
|
className: "flex items-center gap-4",
|
|
613
|
-
children: [/* @__PURE__ */
|
|
614
|
-
onClick: () =>
|
|
615
|
-
"aria-label":
|
|
620
|
+
children: [/* @__PURE__ */ d("button", {
|
|
621
|
+
onClick: () => Se(m ? c.inbox : c.center),
|
|
622
|
+
"aria-label": s("notifications.back", "Back"),
|
|
616
623
|
className: "p-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-lg transition-colors",
|
|
617
|
-
children: /* @__PURE__ */
|
|
618
|
-
}), /* @__PURE__ */
|
|
624
|
+
children: /* @__PURE__ */ d(me, { size: 20 })
|
|
625
|
+
}), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
619
626
|
className: "text-xl font-semibold text-text-primary",
|
|
620
|
-
children:
|
|
621
|
-
}), /* @__PURE__ */
|
|
627
|
+
children: s("notifications.sendTitle", "Send Notification")
|
|
628
|
+
}), /* @__PURE__ */ d("p", {
|
|
622
629
|
className: "text-sm text-text-secondary",
|
|
623
|
-
children:
|
|
630
|
+
children: s("notifications.sendSubtitle", "Compose and send notifications to users")
|
|
624
631
|
})] })]
|
|
625
|
-
}), /* @__PURE__ */
|
|
632
|
+
}), /* @__PURE__ */ d(De, {
|
|
626
633
|
primary: {
|
|
627
|
-
label:
|
|
628
|
-
onSelect:
|
|
629
|
-
disabled:
|
|
630
|
-
icon:
|
|
634
|
+
label: h ? s("notifications.sending", "Sending...") : J ? s("notifications.sent", "Sent!") : W ? s("notifications.schedule", "Schedule") : s("notifications.sendNotification", "Send Notification"),
|
|
635
|
+
onSelect: Ft,
|
|
636
|
+
disabled: h || J,
|
|
637
|
+
icon: h ? /* @__PURE__ */ d(ue, {
|
|
631
638
|
size: 16,
|
|
632
639
|
className: "animate-spin"
|
|
633
|
-
}) :
|
|
640
|
+
}) : d(J ? ge : Ce, { size: 16 })
|
|
634
641
|
},
|
|
635
642
|
actions: [{
|
|
636
|
-
label: K ?
|
|
637
|
-
onSelect: () =>
|
|
638
|
-
icon:
|
|
643
|
+
label: K ? s("notifications.hidePreview", "Hide preview") : s("notifications.showPreview", "Show preview"),
|
|
644
|
+
onSelect: () => St(!K),
|
|
645
|
+
icon: d(K ? ve : _e, { size: 16 })
|
|
639
646
|
}]
|
|
640
647
|
})]
|
|
641
648
|
}),
|
|
642
|
-
J && /* @__PURE__ */
|
|
649
|
+
J && /* @__PURE__ */ f("div", {
|
|
643
650
|
className: "mx-6 mt-4 flex items-center justify-between p-4 bg-status-success-bg-subtle border border-border-seam rounded-lg",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
651
|
+
children: [/* @__PURE__ */ f("div", {
|
|
645
652
|
className: "flex items-center gap-3",
|
|
646
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ d(ge, {
|
|
647
654
|
size: 20,
|
|
648
655
|
className: "text-status-success-text"
|
|
649
|
-
}), /* @__PURE__ */
|
|
656
|
+
}), /* @__PURE__ */ f("p", {
|
|
650
657
|
className: "text-sm text-status-success-text",
|
|
651
658
|
children: [
|
|
652
|
-
|
|
659
|
+
s("notifications.sentSuccessfully", "Notification sent successfully to"),
|
|
653
660
|
" ",
|
|
654
661
|
w.length,
|
|
655
662
|
" ",
|
|
656
|
-
|
|
663
|
+
s("notifications.recipientCount", "recipient"),
|
|
657
664
|
w.length === 1 ? "" : "s",
|
|
658
665
|
"!"
|
|
659
666
|
]
|
|
660
667
|
})]
|
|
661
|
-
}), /* @__PURE__ */
|
|
662
|
-
onClick:
|
|
668
|
+
}), /* @__PURE__ */ d("button", {
|
|
669
|
+
onClick: It,
|
|
663
670
|
className: "px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle rounded-lg transition-colors",
|
|
664
|
-
children:
|
|
671
|
+
children: s("notifications.sendAnother", "Send Another")
|
|
665
672
|
})]
|
|
666
673
|
}),
|
|
667
|
-
|
|
674
|
+
Lt && /* @__PURE__ */ f("div", {
|
|
668
675
|
className: "mx-6 mt-4 flex items-center gap-3 p-4 bg-status-error-bg-subtle border border-border-seam rounded-lg",
|
|
669
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ d(pe, {
|
|
670
677
|
size: 20,
|
|
671
678
|
className: "text-status-error-text flex-shrink-0"
|
|
672
|
-
}), /* @__PURE__ */
|
|
679
|
+
}), /* @__PURE__ */ d("p", {
|
|
673
680
|
className: "text-sm text-status-error-text",
|
|
674
|
-
children:
|
|
681
|
+
children: Lt
|
|
675
682
|
})]
|
|
676
683
|
}),
|
|
677
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ f("div", {
|
|
678
685
|
className: "px-6 pt-4 space-y-4",
|
|
679
|
-
children: [/* @__PURE__ */
|
|
680
|
-
icon: /* @__PURE__ */
|
|
681
|
-
children:
|
|
682
|
-
}), /* @__PURE__ */
|
|
686
|
+
children: [/* @__PURE__ */ d(Me, {
|
|
687
|
+
icon: /* @__PURE__ */ d(Ce, { size: 16 }),
|
|
688
|
+
children: s("notifications.sendPurpose", "Compose and dispatch a one-off notification to specific people. Pick a delivery channel (email, SMS, push, Slack, webhook…), write the message or start from a saved template, choose recipients individually or by directory query, and send now or schedule it for later. A live preview on the right shows exactly what each recipient will get.")
|
|
689
|
+
}), /* @__PURE__ */ d(Ae, {
|
|
683
690
|
storageKey: "notification-create",
|
|
684
691
|
steps: [
|
|
685
692
|
{
|
|
686
693
|
id: "template",
|
|
687
|
-
label:
|
|
688
|
-
description:
|
|
689
|
-
onClick: () =>
|
|
694
|
+
label: s("notifications.nextUseTemplateLabel", "Start from a template"),
|
|
695
|
+
description: s("notifications.nextUseTemplateDesc", "Reuse an approved template instead of writing the message from scratch."),
|
|
696
|
+
onClick: () => et("template")
|
|
690
697
|
},
|
|
691
698
|
{
|
|
692
699
|
id: "recipients",
|
|
693
|
-
label:
|
|
694
|
-
description:
|
|
700
|
+
label: s("notifications.nextRecipientsLabel", "Target by directory"),
|
|
701
|
+
description: s("notifications.nextRecipientsDesc", "Send to everyone matching a role or status filter instead of picking users one by one."),
|
|
695
702
|
onClick: () => E("directory")
|
|
696
703
|
},
|
|
697
704
|
{
|
|
698
705
|
id: "preview",
|
|
699
|
-
label:
|
|
700
|
-
description:
|
|
701
|
-
onClick: () =>
|
|
706
|
+
label: s("notifications.nextPreviewLabel", "Check the live preview"),
|
|
707
|
+
description: s("notifications.nextPreviewDesc", "Confirm the rendered message, recipients and actions look right before you send."),
|
|
708
|
+
onClick: () => St(!0)
|
|
702
709
|
}
|
|
703
710
|
]
|
|
704
711
|
})]
|
|
705
712
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
713
|
+
/* @__PURE__ */ f("div", {
|
|
707
714
|
className: "flex flex-col gap-6 p-6 sm:flex-row",
|
|
708
|
-
children: [/* @__PURE__ */
|
|
715
|
+
children: [/* @__PURE__ */ f("div", {
|
|
709
716
|
className: `flex-1 space-y-6 ${K ? "max-w-2xl" : ""}`,
|
|
710
717
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ f("div", {
|
|
712
719
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
713
|
-
children: [/* @__PURE__ */
|
|
720
|
+
children: [/* @__PURE__ */ f("div", {
|
|
714
721
|
className: "flex items-center gap-2 mb-4",
|
|
715
|
-
children: [/* @__PURE__ */
|
|
722
|
+
children: [/* @__PURE__ */ d(ye, {
|
|
716
723
|
size: 18,
|
|
717
724
|
className: "text-text-secondary"
|
|
718
|
-
}), /* @__PURE__ */
|
|
725
|
+
}), /* @__PURE__ */ d("h2", {
|
|
719
726
|
className: "text-sm font-medium text-text-primary",
|
|
720
|
-
children:
|
|
727
|
+
children: s("notifications.sendMode", "Send Mode")
|
|
721
728
|
})]
|
|
722
|
-
}), /* @__PURE__ */
|
|
729
|
+
}), /* @__PURE__ */ f("div", {
|
|
723
730
|
className: "flex gap-2",
|
|
724
|
-
children: [/* @__PURE__ */
|
|
725
|
-
onClick: () =>
|
|
731
|
+
children: [/* @__PURE__ */ d("button", {
|
|
732
|
+
onClick: () => et("compose"),
|
|
726
733
|
className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${b === "compose" ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
|
|
727
|
-
children:
|
|
728
|
-
}), /* @__PURE__ */
|
|
729
|
-
onClick: () =>
|
|
734
|
+
children: s("notifications.composeMessage", "Compose Message")
|
|
735
|
+
}), /* @__PURE__ */ d("button", {
|
|
736
|
+
onClick: () => et("template"),
|
|
730
737
|
className: `flex-1 px-4 py-3 text-sm font-medium rounded-lg border transition-colors ${b === "template" ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
|
|
731
|
-
children:
|
|
738
|
+
children: s("notifications.useTemplate", "Use Template")
|
|
732
739
|
})]
|
|
733
740
|
})]
|
|
734
741
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ f("div", {
|
|
736
743
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
737
744
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ d("h2", {
|
|
739
746
|
className: "text-sm font-medium text-text-primary mb-4",
|
|
740
|
-
children:
|
|
747
|
+
children: s("notifications.channel", "Channel")
|
|
741
748
|
}),
|
|
742
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ d("div", {
|
|
743
750
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-2",
|
|
744
|
-
children:
|
|
751
|
+
children: Ne.map((e) => {
|
|
745
752
|
let t = e.icon;
|
|
746
|
-
return /* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ f("button", {
|
|
747
754
|
onClick: () => {
|
|
748
|
-
|
|
755
|
+
tt(e.value), it([]), O([]), [
|
|
749
756
|
"EMAIL",
|
|
750
757
|
"SMS",
|
|
751
758
|
"WHATSAPP"
|
|
752
|
-
].includes(e.value) || (E("manual"),
|
|
759
|
+
].includes(e.value) || (E("manual"), at(!1));
|
|
753
760
|
},
|
|
754
761
|
className: `flex flex-col items-center gap-2 p-3 rounded-lg border transition-colors ${x === e.value ? "bg-primary-50 dark:bg-primary-900/30 border-primary-500 text-primary-700 dark:text-primary-300" : "bg-bg-canvas border-border-subtle text-text-secondary hover:bg-bg-sunken"}`,
|
|
755
|
-
children: [/* @__PURE__ */
|
|
762
|
+
children: [/* @__PURE__ */ d(t, { size: 20 }), /* @__PURE__ */ d("span", {
|
|
756
763
|
className: "text-xs font-medium",
|
|
757
|
-
children:
|
|
764
|
+
children: s(`notifications.channel.${e.value}`, e.label)
|
|
758
765
|
})]
|
|
759
766
|
}, e.value);
|
|
760
767
|
})
|
|
761
768
|
}),
|
|
762
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ f("div", {
|
|
763
770
|
className: "mt-4 pt-4 border-t border-border-subtle",
|
|
764
|
-
children: [/* @__PURE__ */
|
|
771
|
+
children: [/* @__PURE__ */ f("label", {
|
|
765
772
|
className: "flex items-center gap-3 cursor-pointer",
|
|
766
|
-
children: [/* @__PURE__ */
|
|
773
|
+
children: [/* @__PURE__ */ d("input", {
|
|
767
774
|
type: "checkbox",
|
|
768
775
|
checked: L,
|
|
769
776
|
onChange: (e) => {
|
|
770
|
-
|
|
777
|
+
_t(e.target.checked), e.target.checked || (z([]), V(""));
|
|
771
778
|
},
|
|
772
779
|
className: "w-4 h-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
|
|
773
|
-
}), /* @__PURE__ */
|
|
780
|
+
}), /* @__PURE__ */ f("div", {
|
|
774
781
|
className: "flex items-center gap-2",
|
|
775
|
-
children: [/* @__PURE__ */
|
|
782
|
+
children: [/* @__PURE__ */ d(he, {
|
|
776
783
|
size: 16,
|
|
777
784
|
className: "text-primary-500"
|
|
778
|
-
}), /* @__PURE__ */
|
|
785
|
+
}), /* @__PURE__ */ d("span", {
|
|
779
786
|
className: "text-sm font-medium text-text-primary",
|
|
780
|
-
children:
|
|
787
|
+
children: s("notifications.alsoSendInApp", "Also send as In-App notification")
|
|
781
788
|
})]
|
|
782
789
|
})]
|
|
783
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ d("p", {
|
|
784
791
|
className: "text-xs text-text-secondary ml-7 mt-1",
|
|
785
|
-
children:
|
|
792
|
+
children: s("notifications.inAppDescription", "Show this notification in the app's notification center alongside the selected channel")
|
|
786
793
|
})]
|
|
787
794
|
})
|
|
788
795
|
]
|
|
789
796
|
}),
|
|
790
|
-
!
|
|
791
|
-
/* @__PURE__ */
|
|
797
|
+
!m && Rt,
|
|
798
|
+
/* @__PURE__ */ f("div", {
|
|
792
799
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
793
800
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
801
|
+
/* @__PURE__ */ f("label", {
|
|
795
802
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
796
|
-
children: [
|
|
803
|
+
children: [s("notifications.topic", "Topic"), S === "MARKETING" && /* @__PURE__ */ d("span", {
|
|
797
804
|
className: "text-status-error-text ml-1",
|
|
798
805
|
children: "*"
|
|
799
806
|
})]
|
|
800
807
|
}),
|
|
801
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ f(p, {
|
|
802
809
|
value: P,
|
|
803
|
-
onChange: (e) =>
|
|
810
|
+
onChange: (e) => mt(e.target.value),
|
|
804
811
|
className: "w-full rounded-lg border border-border-subtle bg-bg-canvas px-4 py-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary-500 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
805
|
-
children: [/* @__PURE__ */
|
|
812
|
+
children: [/* @__PURE__ */ d("option", {
|
|
806
813
|
value: "",
|
|
807
|
-
children:
|
|
808
|
-
}),
|
|
814
|
+
children: s("notifications.selectTopic", "Select a topic")
|
|
815
|
+
}), $e.map((e) => /* @__PURE__ */ f("option", {
|
|
809
816
|
value: e.id,
|
|
810
817
|
children: [
|
|
811
818
|
e.name,
|
|
@@ -815,58 +822,58 @@ function g() {
|
|
|
815
822
|
]
|
|
816
823
|
}, e.id))]
|
|
817
824
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ d("p", {
|
|
819
826
|
className: "mt-2 text-xs text-text-secondary",
|
|
820
|
-
children:
|
|
827
|
+
children: s("notifications.topicHelper", "Topics help users unsubscribe from promotional content they do not want.")
|
|
821
828
|
})
|
|
822
829
|
]
|
|
823
830
|
}),
|
|
824
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ f("div", {
|
|
825
832
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
826
833
|
children: [
|
|
827
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ f("div", {
|
|
828
835
|
className: "flex items-center gap-2 mb-4",
|
|
829
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ d(we, {
|
|
830
837
|
size: 18,
|
|
831
838
|
className: "text-text-secondary"
|
|
832
|
-
}), /* @__PURE__ */
|
|
839
|
+
}), /* @__PURE__ */ f("h2", {
|
|
833
840
|
className: "text-sm font-medium text-text-primary",
|
|
834
841
|
children: [
|
|
835
|
-
|
|
842
|
+
s("notifications.recipients", "Recipients"),
|
|
836
843
|
" ",
|
|
837
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ d("span", {
|
|
838
845
|
className: "text-status-error-text",
|
|
839
846
|
children: "*"
|
|
840
847
|
})
|
|
841
848
|
]
|
|
842
849
|
})]
|
|
843
850
|
}),
|
|
844
|
-
|
|
851
|
+
Ot && /* @__PURE__ */ f("div", {
|
|
845
852
|
className: "mb-4 flex gap-2",
|
|
846
|
-
children: [/* @__PURE__ */
|
|
853
|
+
children: [/* @__PURE__ */ d("button", {
|
|
847
854
|
onClick: () => E("manual"),
|
|
848
855
|
className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${T === "manual" ? "border-primary-500 bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"}`,
|
|
849
|
-
children:
|
|
850
|
-
}), /* @__PURE__ */
|
|
856
|
+
children: s("notifications.manualRecipients", "Manual recipients")
|
|
857
|
+
}), /* @__PURE__ */ d("button", {
|
|
851
858
|
onClick: () => E("directory"),
|
|
852
859
|
className: `flex-1 rounded-lg border px-4 py-2 text-sm font-medium ${T === "directory" ? "border-primary-500 bg-primary-50 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300" : "border-border-subtle bg-bg-canvas text-text-secondary hover:bg-bg-sunken"}`,
|
|
853
|
-
children:
|
|
860
|
+
children: s("notifications.userDirectory", "User directory")
|
|
854
861
|
})]
|
|
855
862
|
}),
|
|
856
|
-
T === "manual" || !
|
|
863
|
+
T === "manual" || !Ot ? /* @__PURE__ */ d(ne, {
|
|
857
864
|
recipients: w,
|
|
858
|
-
onChange:
|
|
865
|
+
onChange: it,
|
|
859
866
|
channel: x,
|
|
860
|
-
disabled:
|
|
861
|
-
}) : /* @__PURE__ */
|
|
867
|
+
disabled: h || J
|
|
868
|
+
}) : /* @__PURE__ */ f("div", {
|
|
862
869
|
className: "space-y-4",
|
|
863
870
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ f("div", {
|
|
865
872
|
className: "grid gap-3 md:grid-cols-[minmax(0,1fr),180px,180px]",
|
|
866
873
|
children: [
|
|
867
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ f("div", {
|
|
868
875
|
className: "relative",
|
|
869
|
-
children: [/* @__PURE__ */
|
|
876
|
+
children: [/* @__PURE__ */ d("input", {
|
|
870
877
|
type: "text",
|
|
871
878
|
value: B,
|
|
872
879
|
onChange: (e) => {
|
|
@@ -875,60 +882,60 @@ function g() {
|
|
|
875
882
|
status: j || void 0
|
|
876
883
|
});
|
|
877
884
|
},
|
|
878
|
-
placeholder:
|
|
885
|
+
placeholder: s("notifications.searchUsersPlaceholder", "Search users by email or name..."),
|
|
879
886
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
880
|
-
}),
|
|
887
|
+
}), Qe && /* @__PURE__ */ d("div", {
|
|
881
888
|
className: "absolute right-3 top-1/2 -translate-y-1/2",
|
|
882
|
-
children: /* @__PURE__ */
|
|
889
|
+
children: /* @__PURE__ */ d(ue, {
|
|
883
890
|
size: 16,
|
|
884
891
|
className: "animate-spin text-text-tertiary"
|
|
885
892
|
})
|
|
886
893
|
})]
|
|
887
894
|
}),
|
|
888
|
-
/* @__PURE__ */ p
|
|
895
|
+
/* @__PURE__ */ d(p, {
|
|
889
896
|
value: A,
|
|
890
897
|
onChange: (e) => {
|
|
891
|
-
|
|
898
|
+
ot(e.target.value), _(B, {
|
|
892
899
|
role: e.target.value || void 0,
|
|
893
900
|
status: j || void 0
|
|
894
901
|
});
|
|
895
902
|
},
|
|
896
903
|
className: "rounded-lg border border-border-subtle bg-bg-canvas px-4 py-3 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
897
|
-
children:
|
|
904
|
+
children: Ie.map((e) => /* @__PURE__ */ d("option", {
|
|
898
905
|
value: e.value,
|
|
899
|
-
children:
|
|
906
|
+
children: s(e.labelKey, e.label)
|
|
900
907
|
}, e.value))
|
|
901
908
|
}),
|
|
902
|
-
/* @__PURE__ */ p
|
|
909
|
+
/* @__PURE__ */ d(p, {
|
|
903
910
|
value: j,
|
|
904
911
|
onChange: (e) => {
|
|
905
|
-
|
|
912
|
+
st(e.target.value), _(B, {
|
|
906
913
|
role: A || void 0,
|
|
907
914
|
status: e.target.value || void 0
|
|
908
915
|
});
|
|
909
916
|
},
|
|
910
917
|
className: "rounded-lg border border-border-subtle bg-bg-canvas px-4 py-3 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
911
|
-
children:
|
|
918
|
+
children: Le.map((e) => /* @__PURE__ */ d("option", {
|
|
912
919
|
value: e.value,
|
|
913
|
-
children:
|
|
920
|
+
children: s(e.labelKey, e.label)
|
|
914
921
|
}, e.value))
|
|
915
922
|
})
|
|
916
923
|
]
|
|
917
924
|
}),
|
|
918
|
-
/* @__PURE__ */
|
|
925
|
+
/* @__PURE__ */ f("label", {
|
|
919
926
|
className: "flex items-center gap-3 text-sm text-text-secondary",
|
|
920
|
-
children: [/* @__PURE__ */
|
|
927
|
+
children: [/* @__PURE__ */ d("input", {
|
|
921
928
|
type: "checkbox",
|
|
922
929
|
checked: k,
|
|
923
|
-
onChange: (e) =>
|
|
930
|
+
onChange: (e) => at(e.target.checked),
|
|
924
931
|
className: "h-4 w-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
|
|
925
|
-
}), /* @__PURE__ */
|
|
932
|
+
}), /* @__PURE__ */ d("span", { children: s("notifications.sendToAllMatchingUsers", "Send to all users matching the current search and filters") })]
|
|
926
933
|
}),
|
|
927
|
-
B && /* @__PURE__ */
|
|
934
|
+
B && /* @__PURE__ */ d("div", {
|
|
928
935
|
className: "max-h-56 overflow-y-auto rounded-lg border border-border-subtle",
|
|
929
936
|
children: v.length > 0 ? v.map((e) => {
|
|
930
937
|
let t = D.some((t) => t.id === e.id), n = x === "EMAIL" ? !!e.email : x === "SMS" || x === "WHATSAPP" ? !!e.phoneNumber : !0;
|
|
931
|
-
return /* @__PURE__ */
|
|
938
|
+
return /* @__PURE__ */ f("button", {
|
|
932
939
|
type: "button",
|
|
933
940
|
disabled: !n,
|
|
934
941
|
onClick: () => {
|
|
@@ -936,68 +943,68 @@ function g() {
|
|
|
936
943
|
},
|
|
937
944
|
className: `flex w-full items-center gap-3 p-3 text-left transition-colors ${t ? "bg-primary-50 dark:bg-primary-900/30" : "hover:bg-bg-canvas"} ${n ? "" : "cursor-not-allowed opacity-50"}`,
|
|
938
945
|
children: [
|
|
939
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ d(l, {
|
|
940
947
|
size: 16,
|
|
941
948
|
className: t ? "text-primary-500" : "text-text-tertiary"
|
|
942
949
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ f("div", {
|
|
944
951
|
className: "flex-1",
|
|
945
952
|
children: [
|
|
946
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ d("div", {
|
|
947
954
|
className: "text-sm font-medium text-text-primary",
|
|
948
955
|
children: e.name
|
|
949
956
|
}),
|
|
950
|
-
/* @__PURE__ */
|
|
957
|
+
/* @__PURE__ */ d("div", {
|
|
951
958
|
className: "text-xs text-text-secondary",
|
|
952
959
|
children: e.email
|
|
953
960
|
}),
|
|
954
|
-
e.phoneNumber && /* @__PURE__ */
|
|
961
|
+
e.phoneNumber && /* @__PURE__ */ d("div", {
|
|
955
962
|
className: "text-xs text-text-tertiary",
|
|
956
963
|
children: e.phoneNumber
|
|
957
964
|
})
|
|
958
965
|
]
|
|
959
966
|
}),
|
|
960
|
-
!n && /* @__PURE__ */
|
|
967
|
+
!n && /* @__PURE__ */ d("span", {
|
|
961
968
|
className: "text-xs text-status-error-text",
|
|
962
|
-
children:
|
|
969
|
+
children: s("notifications.missingChannelTarget", "Missing channel target")
|
|
963
970
|
}),
|
|
964
|
-
t && /* @__PURE__ */
|
|
971
|
+
t && /* @__PURE__ */ d(ge, {
|
|
965
972
|
size: 16,
|
|
966
973
|
className: "text-primary-500"
|
|
967
974
|
})
|
|
968
975
|
]
|
|
969
976
|
}, e.id);
|
|
970
|
-
}) : /* @__PURE__ */
|
|
977
|
+
}) : /* @__PURE__ */ d("div", {
|
|
971
978
|
className: "p-4 text-center text-sm text-text-secondary",
|
|
972
|
-
children: y ? `${
|
|
979
|
+
children: y ? `${s("notifications.error", "Error")}: ${y}` : s("notifications.noUsersFound", "No users found")
|
|
973
980
|
})
|
|
974
981
|
}),
|
|
975
|
-
D.length > 0 && /* @__PURE__ */
|
|
982
|
+
D.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("h3", {
|
|
976
983
|
className: "mb-2 text-sm font-medium text-text-secondary",
|
|
977
984
|
children: [
|
|
978
|
-
|
|
985
|
+
s("notifications.selectedUsers", "Selected Users"),
|
|
979
986
|
" (",
|
|
980
987
|
D.length,
|
|
981
988
|
")"
|
|
982
989
|
]
|
|
983
|
-
}), /* @__PURE__ */
|
|
990
|
+
}), /* @__PURE__ */ d("div", {
|
|
984
991
|
className: "flex flex-wrap gap-2",
|
|
985
|
-
children: D.map((e) => /* @__PURE__ */
|
|
992
|
+
children: D.map((e) => /* @__PURE__ */ f("div", {
|
|
986
993
|
className: "flex items-center gap-2 rounded-full border border-primary-200 bg-primary-50 px-3 py-1.5 text-sm dark:border-primary-800 dark:bg-primary-900/30",
|
|
987
994
|
children: [
|
|
988
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ d(l, {
|
|
989
996
|
size: 12,
|
|
990
997
|
className: "text-primary-500"
|
|
991
998
|
}),
|
|
992
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ d("span", {
|
|
993
1000
|
className: "text-primary-700 dark:text-primary-300",
|
|
994
1001
|
children: e.name
|
|
995
1002
|
}),
|
|
996
|
-
/* @__PURE__ */
|
|
1003
|
+
/* @__PURE__ */ d("button", {
|
|
997
1004
|
type: "button",
|
|
998
1005
|
onClick: () => O((t) => t.filter((t) => t.id !== e.id)),
|
|
999
1006
|
className: "rounded-full p-0.5 hover:bg-primary-100 dark:hover:bg-primary-800",
|
|
1000
|
-
children: /* @__PURE__ */
|
|
1007
|
+
children: /* @__PURE__ */ d(Te, {
|
|
1001
1008
|
size: 12,
|
|
1002
1009
|
className: "text-primary-500"
|
|
1003
1010
|
})
|
|
@@ -1009,29 +1016,29 @@ function g() {
|
|
|
1009
1016
|
})
|
|
1010
1017
|
]
|
|
1011
1018
|
}),
|
|
1012
|
-
L && /* @__PURE__ */
|
|
1019
|
+
L && /* @__PURE__ */ f("div", {
|
|
1013
1020
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
1014
1021
|
children: [
|
|
1015
|
-
/* @__PURE__ */
|
|
1022
|
+
/* @__PURE__ */ f("div", {
|
|
1016
1023
|
className: "flex items-center gap-2 mb-4",
|
|
1017
|
-
children: [/* @__PURE__ */
|
|
1024
|
+
children: [/* @__PURE__ */ d(he, {
|
|
1018
1025
|
size: 18,
|
|
1019
1026
|
className: "text-primary-500"
|
|
1020
|
-
}), /* @__PURE__ */
|
|
1027
|
+
}), /* @__PURE__ */ f("h2", {
|
|
1021
1028
|
className: "text-sm font-medium text-text-primary",
|
|
1022
1029
|
children: [
|
|
1023
|
-
|
|
1030
|
+
s("notifications.inAppUsers", "In-App Notification Users"),
|
|
1024
1031
|
" ",
|
|
1025
|
-
/* @__PURE__ */
|
|
1032
|
+
/* @__PURE__ */ d("span", {
|
|
1026
1033
|
className: "text-status-error-text",
|
|
1027
1034
|
children: "*"
|
|
1028
1035
|
})
|
|
1029
1036
|
]
|
|
1030
1037
|
})]
|
|
1031
1038
|
}),
|
|
1032
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ f("div", {
|
|
1033
1040
|
className: "relative mb-4",
|
|
1034
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ d("input", {
|
|
1035
1042
|
type: "text",
|
|
1036
1043
|
value: B,
|
|
1037
1044
|
onChange: (e) => {
|
|
@@ -1040,81 +1047,81 @@ function g() {
|
|
|
1040
1047
|
status: j || void 0
|
|
1041
1048
|
});
|
|
1042
1049
|
},
|
|
1043
|
-
placeholder:
|
|
1050
|
+
placeholder: s("notifications.searchUsersPlaceholder", "Search users by email or name..."),
|
|
1044
1051
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
1045
|
-
}),
|
|
1052
|
+
}), Qe && /* @__PURE__ */ d("div", {
|
|
1046
1053
|
className: "absolute right-3 top-1/2 transform -translate-y-1/2",
|
|
1047
|
-
children: /* @__PURE__ */
|
|
1054
|
+
children: /* @__PURE__ */ d(ue, {
|
|
1048
1055
|
size: 16,
|
|
1049
1056
|
className: "animate-spin text-text-tertiary"
|
|
1050
1057
|
})
|
|
1051
1058
|
})]
|
|
1052
1059
|
}),
|
|
1053
|
-
B && /* @__PURE__ */
|
|
1060
|
+
B && /* @__PURE__ */ d("div", {
|
|
1054
1061
|
className: "mb-4",
|
|
1055
|
-
children: v.length > 0 ? /* @__PURE__ */
|
|
1062
|
+
children: v.length > 0 ? /* @__PURE__ */ d("div", {
|
|
1056
1063
|
className: "max-h-48 overflow-y-auto border border-border-subtle rounded-lg",
|
|
1057
1064
|
children: v.map((e) => {
|
|
1058
1065
|
let t = R.some((t) => t.id === e.id);
|
|
1059
|
-
return /* @__PURE__ */
|
|
1066
|
+
return /* @__PURE__ */ f("button", {
|
|
1060
1067
|
type: "button",
|
|
1061
1068
|
onClick: () => {
|
|
1062
1069
|
z(t ? (t) => t.filter((t) => t.id !== e.id) : (t) => [...t, e]);
|
|
1063
1070
|
},
|
|
1064
1071
|
className: `w-full flex items-center gap-3 p-3 text-left hover:bg-bg-canvas transition-colors ${t ? "bg-primary-50 dark:bg-primary-900/30" : ""}`,
|
|
1065
1072
|
children: [
|
|
1066
|
-
/* @__PURE__ */
|
|
1073
|
+
/* @__PURE__ */ d(l, {
|
|
1067
1074
|
size: 16,
|
|
1068
1075
|
className: t ? "text-primary-500" : "text-text-tertiary"
|
|
1069
1076
|
}),
|
|
1070
|
-
/* @__PURE__ */
|
|
1077
|
+
/* @__PURE__ */ f("div", {
|
|
1071
1078
|
className: "flex-1",
|
|
1072
|
-
children: [/* @__PURE__ */
|
|
1079
|
+
children: [/* @__PURE__ */ d("div", {
|
|
1073
1080
|
className: "text-sm font-medium text-text-primary",
|
|
1074
1081
|
children: e.name
|
|
1075
|
-
}), /* @__PURE__ */
|
|
1082
|
+
}), /* @__PURE__ */ d("div", {
|
|
1076
1083
|
className: "text-xs text-text-secondary",
|
|
1077
1084
|
children: e.email
|
|
1078
1085
|
})]
|
|
1079
1086
|
}),
|
|
1080
|
-
t && /* @__PURE__ */
|
|
1087
|
+
t && /* @__PURE__ */ d(ge, {
|
|
1081
1088
|
size: 16,
|
|
1082
1089
|
className: "text-primary-500"
|
|
1083
1090
|
})
|
|
1084
1091
|
]
|
|
1085
1092
|
}, e.id);
|
|
1086
1093
|
})
|
|
1087
|
-
}) : /* @__PURE__ */
|
|
1094
|
+
}) : /* @__PURE__ */ d("div", {
|
|
1088
1095
|
className: "text-center py-4 text-sm text-text-secondary",
|
|
1089
|
-
children: y ? `${
|
|
1096
|
+
children: y ? `${s("notifications.error", "Error")}: ${y}` : s("notifications.noUsersFound", "No users found")
|
|
1090
1097
|
})
|
|
1091
1098
|
}),
|
|
1092
|
-
R.length > 0 && /* @__PURE__ */
|
|
1099
|
+
R.length > 0 && /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("h3", {
|
|
1093
1100
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
1094
1101
|
children: [
|
|
1095
|
-
|
|
1102
|
+
s("notifications.selectedUsers", "Selected Users"),
|
|
1096
1103
|
" (",
|
|
1097
1104
|
R.length,
|
|
1098
1105
|
")"
|
|
1099
1106
|
]
|
|
1100
|
-
}), /* @__PURE__ */
|
|
1107
|
+
}), /* @__PURE__ */ d("div", {
|
|
1101
1108
|
className: "flex flex-wrap gap-2",
|
|
1102
|
-
children: R.map((e) => /* @__PURE__ */
|
|
1109
|
+
children: R.map((e) => /* @__PURE__ */ f("div", {
|
|
1103
1110
|
className: "flex items-center gap-2 px-3 py-1.5 bg-primary-50 dark:bg-primary-900/30 border border-primary-200 dark:border-primary-800 rounded-full text-sm",
|
|
1104
1111
|
children: [
|
|
1105
|
-
/* @__PURE__ */
|
|
1112
|
+
/* @__PURE__ */ d(l, {
|
|
1106
1113
|
size: 12,
|
|
1107
1114
|
className: "text-primary-500"
|
|
1108
1115
|
}),
|
|
1109
|
-
/* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ d("span", {
|
|
1110
1117
|
className: "text-primary-700 dark:text-primary-300",
|
|
1111
1118
|
children: e.name
|
|
1112
1119
|
}),
|
|
1113
|
-
/* @__PURE__ */
|
|
1120
|
+
/* @__PURE__ */ d("button", {
|
|
1114
1121
|
type: "button",
|
|
1115
1122
|
onClick: () => z((t) => t.filter((t) => t.id !== e.id)),
|
|
1116
1123
|
className: "p-0.5 hover:bg-primary-100 dark:hover:bg-primary-800 rounded-full transition-colors",
|
|
1117
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ d(Te, {
|
|
1118
1125
|
size: 12,
|
|
1119
1126
|
className: "text-primary-500"
|
|
1120
1127
|
})
|
|
@@ -1124,70 +1131,73 @@ function g() {
|
|
|
1124
1131
|
})] })
|
|
1125
1132
|
]
|
|
1126
1133
|
}),
|
|
1127
|
-
b === "template" && /* @__PURE__ */
|
|
1134
|
+
b === "template" && /* @__PURE__ */ f("div", {
|
|
1128
1135
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
1129
1136
|
children: [
|
|
1130
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ f("h2", {
|
|
1131
1138
|
className: "text-sm font-medium text-text-primary mb-4",
|
|
1132
1139
|
children: [
|
|
1133
|
-
|
|
1140
|
+
s("notifications.selectTemplate", "Select Template"),
|
|
1134
1141
|
" ",
|
|
1135
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ d("span", {
|
|
1136
1143
|
className: "text-status-error-text",
|
|
1137
1144
|
children: "*"
|
|
1138
1145
|
})
|
|
1139
1146
|
]
|
|
1140
1147
|
}),
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1148
|
+
Ye ? /* @__PURE__ */ d(le, {
|
|
1149
|
+
minHeight: "6rem",
|
|
1150
|
+
today: /* @__PURE__ */ d("div", {
|
|
1151
|
+
className: "flex items-center justify-center py-8",
|
|
1152
|
+
children: /* @__PURE__ */ d(ue, {
|
|
1153
|
+
size: 24,
|
|
1154
|
+
className: "animate-spin text-text-tertiary"
|
|
1155
|
+
})
|
|
1146
1156
|
})
|
|
1147
|
-
}) :
|
|
1157
|
+
}) : g.length === 0 ? /* @__PURE__ */ d(ke, {
|
|
1148
1158
|
illustration: "empty-files",
|
|
1149
|
-
title:
|
|
1150
|
-
description:
|
|
1151
|
-
action: /* @__PURE__ */
|
|
1152
|
-
onClick: () =>
|
|
1159
|
+
title: s("notifications.noTemplatesAvailable", "No templates available"),
|
|
1160
|
+
description: s("notifications.noTemplatesAvailableDesc", "Create a reusable template once and pick it here every time you send."),
|
|
1161
|
+
action: /* @__PURE__ */ d("button", {
|
|
1162
|
+
onClick: () => Se(c.newTemplate),
|
|
1153
1163
|
className: "text-sm text-primary-600 hover:text-primary-700",
|
|
1154
|
-
children:
|
|
1164
|
+
children: s("notifications.createATemplate", "Create a template")
|
|
1155
1165
|
}),
|
|
1156
1166
|
size: "panel"
|
|
1157
|
-
}) : /* @__PURE__ */
|
|
1167
|
+
}) : /* @__PURE__ */ f(p, {
|
|
1158
1168
|
value: H,
|
|
1159
1169
|
onChange: (e) => {
|
|
1160
|
-
|
|
1170
|
+
vt(e.target.value), yt({});
|
|
1161
1171
|
},
|
|
1162
1172
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
1163
|
-
children: [/* @__PURE__ */
|
|
1173
|
+
children: [/* @__PURE__ */ d("option", {
|
|
1164
1174
|
value: "",
|
|
1165
|
-
children:
|
|
1166
|
-
}),
|
|
1175
|
+
children: s("notifications.selectATemplate", "Select a template...")
|
|
1176
|
+
}), g.filter((e) => e.enabled).map((e) => /* @__PURE__ */ f("option", {
|
|
1167
1177
|
value: e.slug,
|
|
1168
1178
|
children: [
|
|
1169
1179
|
e.name,
|
|
1170
1180
|
" (",
|
|
1171
|
-
|
|
1181
|
+
s(`notifications.type.${e.type}`, e.type),
|
|
1172
1182
|
")"
|
|
1173
1183
|
]
|
|
1174
1184
|
}, e.id))]
|
|
1175
1185
|
}),
|
|
1176
|
-
X &&
|
|
1186
|
+
X && wt.length > 0 && /* @__PURE__ */ f("div", {
|
|
1177
1187
|
className: "mt-4 space-y-3",
|
|
1178
|
-
children: [/* @__PURE__ */
|
|
1188
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
1179
1189
|
className: "text-sm font-medium text-text-secondary",
|
|
1180
|
-
children:
|
|
1181
|
-
}),
|
|
1182
|
-
/* @__PURE__ */
|
|
1190
|
+
children: s("notifications.templateVariables", "Template Variables")
|
|
1191
|
+
}), wt.map((e) => /* @__PURE__ */ f("div", { children: [
|
|
1192
|
+
/* @__PURE__ */ f("label", {
|
|
1183
1193
|
className: "block text-xs text-text-secondary mb-1",
|
|
1184
1194
|
children: [
|
|
1185
1195
|
e.key,
|
|
1186
|
-
e.required && /* @__PURE__ */
|
|
1196
|
+
e.required && /* @__PURE__ */ d("span", {
|
|
1187
1197
|
className: "text-status-error-text ml-0.5",
|
|
1188
1198
|
children: "*"
|
|
1189
1199
|
}),
|
|
1190
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ f("span", {
|
|
1191
1201
|
className: "text-text-tertiary ml-1",
|
|
1192
1202
|
children: [
|
|
1193
1203
|
"(",
|
|
@@ -1197,231 +1207,231 @@ function g() {
|
|
|
1197
1207
|
})
|
|
1198
1208
|
]
|
|
1199
1209
|
}),
|
|
1200
|
-
e.description && /* @__PURE__ */
|
|
1210
|
+
e.description && /* @__PURE__ */ d("p", {
|
|
1201
1211
|
className: "text-xs text-text-tertiary mb-1",
|
|
1202
1212
|
children: e.description
|
|
1203
1213
|
}),
|
|
1204
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ d("input", {
|
|
1205
1215
|
type: "text",
|
|
1206
1216
|
value: U[e.key] || "",
|
|
1207
|
-
onChange: (t) =>
|
|
1217
|
+
onChange: (t) => yt((n) => ({
|
|
1208
1218
|
...n,
|
|
1209
1219
|
[e.key]: t.target.value
|
|
1210
1220
|
})),
|
|
1211
|
-
placeholder: e.defaultValue || `${
|
|
1221
|
+
placeholder: e.defaultValue || `${s("notifications.enterVariablePrefix", "Enter")} ${e.key}...`,
|
|
1212
1222
|
className: "w-full px-3 py-2 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
1213
1223
|
})
|
|
1214
1224
|
] }, e.key))]
|
|
1215
1225
|
})
|
|
1216
1226
|
]
|
|
1217
1227
|
}),
|
|
1218
|
-
b === "compose" && /* @__PURE__ */
|
|
1219
|
-
!
|
|
1220
|
-
x === "EMAIL" && /* @__PURE__ */
|
|
1228
|
+
b === "compose" && /* @__PURE__ */ f(u, { children: [
|
|
1229
|
+
!m && zt,
|
|
1230
|
+
x === "EMAIL" && /* @__PURE__ */ f("div", {
|
|
1221
1231
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
1222
|
-
children: [/* @__PURE__ */
|
|
1232
|
+
children: [/* @__PURE__ */ f("label", {
|
|
1223
1233
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
1224
1234
|
children: [
|
|
1225
|
-
|
|
1235
|
+
s("notifications.subjectLabel", "Subject"),
|
|
1226
1236
|
" ",
|
|
1227
|
-
/* @__PURE__ */
|
|
1237
|
+
/* @__PURE__ */ d("span", {
|
|
1228
1238
|
className: "text-status-error-text",
|
|
1229
1239
|
children: "*"
|
|
1230
1240
|
})
|
|
1231
1241
|
]
|
|
1232
|
-
}), /* @__PURE__ */
|
|
1242
|
+
}), /* @__PURE__ */ d("input", {
|
|
1233
1243
|
type: "text",
|
|
1234
1244
|
value: M,
|
|
1235
|
-
onChange: (e) =>
|
|
1236
|
-
placeholder:
|
|
1245
|
+
onChange: (e) => ct(e.target.value),
|
|
1246
|
+
placeholder: s("notifications.enterSubjectPlaceholder", "Enter email subject..."),
|
|
1237
1247
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"
|
|
1238
1248
|
})]
|
|
1239
1249
|
}),
|
|
1240
|
-
/* @__PURE__ */
|
|
1250
|
+
/* @__PURE__ */ f("div", {
|
|
1241
1251
|
className: "bg-bg-surface rounded-lg border border-border-seam p-4",
|
|
1242
1252
|
children: [
|
|
1243
|
-
/* @__PURE__ */
|
|
1253
|
+
/* @__PURE__ */ f("div", {
|
|
1244
1254
|
className: "flex items-center justify-between mb-2",
|
|
1245
|
-
children: [/* @__PURE__ */
|
|
1255
|
+
children: [/* @__PURE__ */ f("label", {
|
|
1246
1256
|
className: "block text-sm font-medium text-text-primary",
|
|
1247
1257
|
children: [
|
|
1248
|
-
|
|
1258
|
+
s("notifications.messageLabel", "Message"),
|
|
1249
1259
|
" ",
|
|
1250
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ d("span", {
|
|
1251
1261
|
className: "text-status-error-text",
|
|
1252
1262
|
children: "*"
|
|
1253
1263
|
})
|
|
1254
1264
|
]
|
|
1255
|
-
}), x === "EMAIL" && /* @__PURE__ */
|
|
1265
|
+
}), x === "EMAIL" && /* @__PURE__ */ f("label", {
|
|
1256
1266
|
className: "flex items-center gap-2 text-sm text-text-secondary cursor-pointer",
|
|
1257
|
-
children: [/* @__PURE__ */
|
|
1267
|
+
children: [/* @__PURE__ */ d("input", {
|
|
1258
1268
|
type: "checkbox",
|
|
1259
|
-
checked:
|
|
1260
|
-
onChange: (e) =>
|
|
1269
|
+
checked: ft,
|
|
1270
|
+
onChange: (e) => pt(e.target.checked),
|
|
1261
1271
|
className: "w-4 h-4 rounded border-border-default text-primary-600 focus:ring-primary-500"
|
|
1262
|
-
}),
|
|
1272
|
+
}), s("notifications.includeHtmlVersion", "Include HTML version")]
|
|
1263
1273
|
})]
|
|
1264
1274
|
}),
|
|
1265
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ d("textarea", {
|
|
1266
1276
|
rows: 6,
|
|
1267
1277
|
value: N,
|
|
1268
|
-
onChange: (e) =>
|
|
1269
|
-
placeholder:
|
|
1278
|
+
onChange: (e) => lt(e.target.value),
|
|
1279
|
+
placeholder: s("notifications.enterMessagePlaceholder", "Enter your message..."),
|
|
1270
1280
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 resize-none"
|
|
1271
1281
|
}),
|
|
1272
|
-
x === "EMAIL" &&
|
|
1282
|
+
x === "EMAIL" && ft && /* @__PURE__ */ f("div", {
|
|
1273
1283
|
className: "mt-4",
|
|
1274
|
-
children: [/* @__PURE__ */
|
|
1284
|
+
children: [/* @__PURE__ */ d("label", {
|
|
1275
1285
|
className: "block text-sm font-medium text-text-secondary mb-2",
|
|
1276
|
-
children:
|
|
1277
|
-
}), /* @__PURE__ */
|
|
1286
|
+
children: s("notifications.htmlContent", "HTML Content")
|
|
1287
|
+
}), /* @__PURE__ */ d("textarea", {
|
|
1278
1288
|
rows: 8,
|
|
1279
|
-
value:
|
|
1280
|
-
onChange: (e) =>
|
|
1281
|
-
placeholder:
|
|
1289
|
+
value: ut,
|
|
1290
|
+
onChange: (e) => dt(e.target.value),
|
|
1291
|
+
placeholder: s("notifications.htmlPlaceholder", "<html>...</html>"),
|
|
1282
1292
|
className: "w-full px-4 py-3 text-sm bg-bg-canvas border border-border-subtle rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 resize-none font-mono"
|
|
1283
1293
|
})]
|
|
1284
1294
|
})
|
|
1285
1295
|
]
|
|
1286
1296
|
})
|
|
1287
1297
|
] }),
|
|
1288
|
-
!
|
|
1289
|
-
!
|
|
1290
|
-
|
|
1298
|
+
!m && Bt,
|
|
1299
|
+
!m && Vt,
|
|
1300
|
+
m && /* @__PURE__ */ d(je, {
|
|
1291
1301
|
storageKey: "notifications.send.more",
|
|
1292
|
-
children: /* @__PURE__ */
|
|
1302
|
+
children: /* @__PURE__ */ f("div", {
|
|
1293
1303
|
className: "space-y-6",
|
|
1294
1304
|
children: [
|
|
1295
|
-
It,
|
|
1296
|
-
b === "compose" && Lt,
|
|
1297
1305
|
Rt,
|
|
1298
|
-
zt
|
|
1306
|
+
b === "compose" && zt,
|
|
1307
|
+
Bt,
|
|
1308
|
+
Vt
|
|
1299
1309
|
]
|
|
1300
1310
|
})
|
|
1301
1311
|
})
|
|
1302
1312
|
]
|
|
1303
|
-
}), K && /* @__PURE__ */
|
|
1313
|
+
}), K && /* @__PURE__ */ d("div", {
|
|
1304
1314
|
className: "w-full flex-shrink-0 sm:w-96",
|
|
1305
1315
|
"data-testid": "notification-preview-rail",
|
|
1306
|
-
children: /* @__PURE__ */
|
|
1316
|
+
children: /* @__PURE__ */ f(Oe, {
|
|
1307
1317
|
treatment: "glass",
|
|
1308
1318
|
glow: !0,
|
|
1309
1319
|
className: "sticky top-24 border-border-seam p-0 overflow-hidden",
|
|
1310
|
-
children: [/* @__PURE__ */
|
|
1320
|
+
children: [/* @__PURE__ */ d("div", {
|
|
1311
1321
|
className: "px-4 py-3 bg-accent-wash border-b border-border-seam",
|
|
1312
|
-
children: /* @__PURE__ */
|
|
1322
|
+
children: /* @__PURE__ */ d("h3", {
|
|
1313
1323
|
className: "text-sm font-medium text-text-primary",
|
|
1314
|
-
children:
|
|
1324
|
+
children: s("notifications.preview", "Preview")
|
|
1315
1325
|
})
|
|
1316
|
-
}), /* @__PURE__ */
|
|
1326
|
+
}), /* @__PURE__ */ f("div", {
|
|
1317
1327
|
className: "p-4",
|
|
1318
1328
|
children: [
|
|
1319
|
-
/* @__PURE__ */
|
|
1329
|
+
/* @__PURE__ */ f("div", {
|
|
1320
1330
|
className: "flex items-center gap-2 mb-4",
|
|
1321
1331
|
children: [
|
|
1322
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ d("span", {
|
|
1323
1333
|
className: "px-2 py-1 text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 rounded",
|
|
1324
|
-
children:
|
|
1334
|
+
children: s(`notifications.channel.${x}`, x)
|
|
1325
1335
|
}),
|
|
1326
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ d("span", {
|
|
1327
1337
|
className: "px-2 py-1 text-xs font-medium bg-bg-sunken text-text-secondary rounded",
|
|
1328
|
-
children:
|
|
1338
|
+
children: s(`notifications.type.${S}`, S)
|
|
1329
1339
|
}),
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
className: `px-2 py-1 text-xs font-medium rounded ${
|
|
1332
|
-
children:
|
|
1340
|
+
/* @__PURE__ */ d("span", {
|
|
1341
|
+
className: `px-2 py-1 text-xs font-medium rounded ${Fe.find((e) => e.value === C)?.color || ""}`,
|
|
1342
|
+
children: s(`notifications.priority.${C}`, C)
|
|
1333
1343
|
})
|
|
1334
1344
|
]
|
|
1335
1345
|
}),
|
|
1336
|
-
/* @__PURE__ */
|
|
1346
|
+
/* @__PURE__ */ f("div", {
|
|
1337
1347
|
className: "mb-4",
|
|
1338
|
-
children: [/* @__PURE__ */
|
|
1348
|
+
children: [/* @__PURE__ */ d("p", {
|
|
1339
1349
|
className: "text-xs text-text-secondary mb-1",
|
|
1340
|
-
children:
|
|
1341
|
-
}), w.length === 0 ? T === "directory" ? /* @__PURE__ */
|
|
1350
|
+
children: s("notifications.recipients", "Recipients")
|
|
1351
|
+
}), w.length === 0 ? T === "directory" ? /* @__PURE__ */ d("p", {
|
|
1342
1352
|
className: "text-sm text-text-primary",
|
|
1343
|
-
children: k ?
|
|
1344
|
-
}) : /* @__PURE__ */
|
|
1353
|
+
children: k ? s("notifications.allMatchingUsers", "All matching directory users") : `${D.length} ${s("notifications.recipientCount", "recipient")}${D.length === 1 ? "" : "s"}`
|
|
1354
|
+
}) : /* @__PURE__ */ d("p", {
|
|
1345
1355
|
className: "text-sm text-text-tertiary italic",
|
|
1346
|
-
children:
|
|
1347
|
-
}) : /* @__PURE__ */
|
|
1356
|
+
children: s("notifications.noRecipientsSelected", "No recipients selected")
|
|
1357
|
+
}) : /* @__PURE__ */ f("p", {
|
|
1348
1358
|
className: "text-sm text-text-primary",
|
|
1349
1359
|
children: [
|
|
1350
1360
|
w.length,
|
|
1351
1361
|
" ",
|
|
1352
|
-
|
|
1362
|
+
s("notifications.recipientCount", "recipient"),
|
|
1353
1363
|
w.length === 1 ? "" : "s"
|
|
1354
1364
|
]
|
|
1355
1365
|
})]
|
|
1356
1366
|
}),
|
|
1357
|
-
x === "EMAIL" &&
|
|
1367
|
+
x === "EMAIL" && Dt && /* @__PURE__ */ f("div", {
|
|
1358
1368
|
className: "mb-4",
|
|
1359
|
-
children: [/* @__PURE__ */
|
|
1369
|
+
children: [/* @__PURE__ */ d("p", {
|
|
1360
1370
|
className: "text-xs text-text-secondary mb-1",
|
|
1361
|
-
children:
|
|
1362
|
-
}), /* @__PURE__ */
|
|
1371
|
+
children: s("notifications.subjectLabel", "Subject")
|
|
1372
|
+
}), /* @__PURE__ */ d("p", {
|
|
1363
1373
|
className: "text-sm font-medium text-text-primary",
|
|
1364
|
-
children:
|
|
1374
|
+
children: Dt
|
|
1365
1375
|
})]
|
|
1366
1376
|
}),
|
|
1367
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("p", {
|
|
1368
1378
|
className: "text-xs text-text-secondary mb-1",
|
|
1369
|
-
children:
|
|
1370
|
-
}),
|
|
1379
|
+
children: s("notifications.messageLabel", "Message")
|
|
1380
|
+
}), Et ? /* @__PURE__ */ d("div", {
|
|
1371
1381
|
className: "p-3 bg-bg-canvas rounded-lg",
|
|
1372
|
-
children: /* @__PURE__ */
|
|
1382
|
+
children: /* @__PURE__ */ d("p", {
|
|
1373
1383
|
className: "text-sm text-text-secondary whitespace-pre-wrap",
|
|
1374
|
-
children:
|
|
1384
|
+
children: Et
|
|
1375
1385
|
})
|
|
1376
|
-
}) : /* @__PURE__ */
|
|
1386
|
+
}) : /* @__PURE__ */ d("p", {
|
|
1377
1387
|
className: "text-sm text-text-tertiary italic",
|
|
1378
|
-
children:
|
|
1388
|
+
children: s("notifications.noMessageContent", "No message content")
|
|
1379
1389
|
})] }),
|
|
1380
|
-
P && /* @__PURE__ */
|
|
1390
|
+
P && /* @__PURE__ */ f("div", {
|
|
1381
1391
|
className: "mt-4",
|
|
1382
|
-
children: [/* @__PURE__ */
|
|
1392
|
+
children: [/* @__PURE__ */ d("p", {
|
|
1383
1393
|
className: "text-xs text-text-secondary mb-1",
|
|
1384
|
-
children:
|
|
1385
|
-
}), /* @__PURE__ */
|
|
1394
|
+
children: s("notifications.topic", "Topic")
|
|
1395
|
+
}), /* @__PURE__ */ d("p", {
|
|
1386
1396
|
className: "text-sm text-text-primary",
|
|
1387
|
-
children:
|
|
1397
|
+
children: $e.find((e) => e.id === P)?.name || P
|
|
1388
1398
|
})]
|
|
1389
1399
|
}),
|
|
1390
|
-
Q.length > 0 && /* @__PURE__ */
|
|
1400
|
+
Q.length > 0 && /* @__PURE__ */ f("div", {
|
|
1391
1401
|
className: "mt-4",
|
|
1392
|
-
children: [/* @__PURE__ */
|
|
1402
|
+
children: [/* @__PURE__ */ d("p", {
|
|
1393
1403
|
className: "text-xs text-text-secondary mb-1",
|
|
1394
|
-
children:
|
|
1395
|
-
}), /* @__PURE__ */
|
|
1404
|
+
children: s("notifications.actions", "Actions")
|
|
1405
|
+
}), /* @__PURE__ */ d("div", {
|
|
1396
1406
|
className: "flex flex-wrap gap-2",
|
|
1397
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
1407
|
+
children: Q.map((e) => /* @__PURE__ */ d("span", {
|
|
1398
1408
|
className: "rounded-full bg-bg-sunken px-2 py-1 text-xs text-text-secondary",
|
|
1399
1409
|
children: e.label
|
|
1400
1410
|
}, e.id))
|
|
1401
1411
|
})]
|
|
1402
1412
|
}),
|
|
1403
|
-
$.length > 0 && /* @__PURE__ */
|
|
1413
|
+
$.length > 0 && /* @__PURE__ */ f("div", {
|
|
1404
1414
|
className: "mt-4 space-y-2",
|
|
1405
|
-
children: [/* @__PURE__ */
|
|
1415
|
+
children: [/* @__PURE__ */ d("p", {
|
|
1406
1416
|
className: "text-xs text-text-secondary",
|
|
1407
|
-
children:
|
|
1408
|
-
}), $.map((e) => /* @__PURE__ */
|
|
1417
|
+
children: s("notifications.media", "Media")
|
|
1418
|
+
}), $.map((e) => /* @__PURE__ */ d("div", {
|
|
1409
1419
|
className: "rounded-lg border border-border-subtle bg-bg-canvas p-2 text-xs text-text-secondary",
|
|
1410
1420
|
children: e.label || e.url
|
|
1411
1421
|
}, e.url))]
|
|
1412
1422
|
}),
|
|
1413
|
-
b === "template" && X && /* @__PURE__ */
|
|
1423
|
+
b === "template" && X && /* @__PURE__ */ f("div", {
|
|
1414
1424
|
className: "mt-4 pt-4 border-t border-border-subtle",
|
|
1415
1425
|
children: [
|
|
1416
|
-
/* @__PURE__ */
|
|
1426
|
+
/* @__PURE__ */ d("p", {
|
|
1417
1427
|
className: "text-xs text-text-secondary mb-1",
|
|
1418
|
-
children:
|
|
1428
|
+
children: s("notifications.usingTemplate", "Using Template")
|
|
1419
1429
|
}),
|
|
1420
|
-
/* @__PURE__ */
|
|
1430
|
+
/* @__PURE__ */ d("p", {
|
|
1421
1431
|
className: "text-sm font-medium text-text-primary",
|
|
1422
1432
|
children: X.name
|
|
1423
1433
|
}),
|
|
1424
|
-
/* @__PURE__ */
|
|
1434
|
+
/* @__PURE__ */ d("p", {
|
|
1425
1435
|
className: "text-xs text-text-secondary font-mono",
|
|
1426
1436
|
children: X.slug
|
|
1427
1437
|
})
|
|
@@ -1435,6 +1445,6 @@ function g() {
|
|
|
1435
1445
|
]
|
|
1436
1446
|
});
|
|
1437
1447
|
}
|
|
1438
|
-
export {
|
|
1448
|
+
export { m as CreateNotificationPage };
|
|
1439
1449
|
|
|
1440
1450
|
//# sourceMappingURL=CreateNotificationPage.js.map
|