@burdenoff/microfe-newsletter 2026.830.1 → 2026.830.2
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/newsletter/AdminNewsletterRoot.js +4 -4
- package/dist/newsletter/UserNewsletterRoot.js +4 -4
- package/dist/newsletter/pages/ABTestingPage.js +23 -23
- package/dist/newsletter/pages/ABTestingPage.js.map +1 -1
- package/dist/newsletter/pages/AnalyticsDashboardPage.js +95 -97
- package/dist/newsletter/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/newsletter/pages/CampaignAnalyticsPage.js +3 -3
- package/dist/newsletter/pages/CampaignEditorPage.js +297 -300
- package/dist/newsletter/pages/CampaignEditorPage.js.map +1 -1
- package/dist/newsletter/pages/CampaignsListPage.js +14 -14
- package/dist/newsletter/pages/CompliancePage.js +175 -184
- package/dist/newsletter/pages/CompliancePage.js.map +1 -1
- package/dist/newsletter/pages/SchedulerPage.js +3 -3
- package/dist/newsletter/pages/SubscriberDetailPage.js +222 -222
- package/dist/newsletter/pages/SubscriberDetailPage.js.map +1 -1
- package/dist/newsletter/pages/SubscribersListPage.js +279 -282
- package/dist/newsletter/pages/SubscribersListPage.js.map +1 -1
- package/dist/newsletter/pages/TemplateEditorPage.js +3 -3
- package/dist/newsletter/pages/TemplateLibraryPage.js +109 -112
- package/dist/newsletter/pages/TemplateLibraryPage.js.map +1 -1
- package/dist/newsletter/pages/WaitlistDetailPage.js +3 -3
- package/dist/newsletter/pages/WaitlistListPage.js +139 -139
- package/dist/newsletter/pages/WaitlistListPage.js.map +1 -1
- package/dist/newsletter/providers/NewsletterProvider.js +47 -46
- package/dist/newsletter/providers/NewsletterProvider.js.map +1 -1
- package/dist/newsletter/shared/hooks/useTr.js +3 -3
- package/dist/newsletter/shared/hooks/useTr.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,593 +1,590 @@
|
|
|
1
1
|
import { useNewsletterStore as e } from "../store/newsletterStore.js";
|
|
2
|
-
import { useNewsletter as t, useNewsletterMutations as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { useNewsletter as t, useNewsletterMutations as ee, usePlatformProducts as te } from "../hooks/useNewsletterOperations.js";
|
|
3
|
+
import { useTr as ne } from "../shared/hooks/useTr.js";
|
|
4
|
+
import { useNewsletter as re } from "../providers/NewsletterProvider.js";
|
|
5
|
+
import { NEWSLETTER_PERMISSIONS as n } from "../constants/permissions.js";
|
|
6
|
+
import { useCallback as ie, useState as r } from "react";
|
|
7
|
+
import { AccessDenied as ae } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
+
import { useNavigate as oe, useParams as se } from "react-router";
|
|
9
|
+
import { AlertCircle as ce, ArrowLeft as le, CheckCircle as ue, Clock as i, Code as de, Eye as a, Loader2 as o, Monitor as s, Save as c, Send as l, Smartphone as fe, Tablet as pe, TestTube as u } from "lucide-react";
|
|
10
|
+
import { usePermissions as me } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
12
|
+
import { AuroraBackground as he, Button as p, CTAOverflowMenu as ge, GlassCard as _e, GradientText as ve, IllustratedEmptyState as ye, NextSteps as be, OptionalFields as xe, PagePurpose as Se } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/newsletter/pages/CampaignEditorPage.tsx
|
|
14
|
-
function
|
|
15
|
-
let {
|
|
16
|
-
let n = h(e);
|
|
17
|
-
return n === e ? t : n;
|
|
18
|
-
}, [h]), { campaignId: _ } = ie(), v = re(), { hasPermission: y, isLoading: b, permissions: x } = fe(), { productId: S } = te(), Se = (Array.isArray(x) ? x : x?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:campaigns:") || e.startsWith("tenantmodule-newsletter:newsletters:")), Ce = Se ? y(r.CAMPAIGN_CREATE) : !0, we = Se ? y(r.CAMPAIGN_UPDATE) : !0, { editorMode: C, setEditorMode: w, previewMode: T, setPreviewMode: E, emailContent: D, updateEmailContent: O, previewPanelOpen: k, togglePreviewPanel: A, resetEmailContent: Te } = e(), [j, M] = a(""), [N, P] = a(""), [F, I] = a(!1), [Ee, De] = a(null), [Oe, L] = a(!1), [R, z] = a(""), [ke, B] = a(!1), [V, Ae] = a(""), [H, je] = a(""), [U, W] = a(null), G = !_, K = _ || Ee, Me = `<!DOCTYPE html>
|
|
14
|
+
function m() {
|
|
15
|
+
let m = ne(), { campaignId: h } = se(), g = oe(), { hasPermission: Ce, isLoading: _, permissions: v } = me(), { productId: y } = re(), b = (Array.isArray(v) ? v : v?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:campaigns:") || e.startsWith("tenantmodule-newsletter:newsletters:")), we = b ? Ce(n.CAMPAIGN_CREATE) : !0, Te = b ? Ce(n.CAMPAIGN_UPDATE) : !0, { editorMode: x, setEditorMode: S, previewMode: C, setPreviewMode: w, emailContent: T, updateEmailContent: E, previewPanelOpen: D, togglePreviewPanel: O, resetEmailContent: Ee } = e(), [k, A] = r(""), [j, M] = r(""), [N, P] = r(!1), [F, I] = r(null), [De, L] = r(!1), [Oe, ke] = r(""), [Ae, R] = r(!1), [z, je] = r(""), [B, Me] = r(""), [V, H] = r(null), U = !h, W = h || F, Ne = `<!DOCTYPE html>
|
|
19
16
|
<html>
|
|
20
17
|
<head>
|
|
21
18
|
<meta charset='utf-8'>
|
|
22
19
|
</head>
|
|
23
20
|
<body>
|
|
24
|
-
<h1>${
|
|
25
|
-
<p>${
|
|
21
|
+
<h1>${m("newsletter.codeTemplateGreeting", "Hello {{firstName}}!")}</h1>
|
|
22
|
+
<p>${m("newsletter.codeTemplateBody", "Your email content here...")}</p>
|
|
26
23
|
</body>
|
|
27
|
-
</html>`, { newsletter:
|
|
28
|
-
|
|
29
|
-
subject:
|
|
30
|
-
previewText:
|
|
31
|
-
content:
|
|
32
|
-
}),
|
|
24
|
+
</html>`, { newsletter: G, loading: Pe, error: K } = t(h || ""), { products: Fe } = te(), { createNewsletter: Ie, updateNewsletter: Le, sendNewsletter: Re, scheduleNewsletter: ze, sendTestNewsletter: Be, creating: q, updating: J, sending: Ve, scheduling: Y, sendingTest: X } = ee(), Z = q || J || Ve || Y || X, Q = ie((e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").substring(0, 100), []), [He, Ue] = r(null), [We, Ge] = r(null);
|
|
25
|
+
G && h && G.id !== He && (Ue(G.id), A(G.title || ""), M(G.slug || ""), E({
|
|
26
|
+
subject: G.subject || "",
|
|
27
|
+
previewText: G.previewText || "",
|
|
28
|
+
content: G.content || ""
|
|
29
|
+
}), P(!0), I(G.id)), U && !F && We === !1 && (Ee(), A(""), M(""), P(!1)), We !== U && Ge(U);
|
|
33
30
|
let $ = (e, t) => {
|
|
34
|
-
|
|
31
|
+
H({
|
|
35
32
|
type: e,
|
|
36
33
|
message: t
|
|
37
|
-
}), setTimeout(() =>
|
|
38
|
-
},
|
|
34
|
+
}), setTimeout(() => H(null), 5e3);
|
|
35
|
+
}, Ke = async () => {
|
|
39
36
|
try {
|
|
40
|
-
let e =
|
|
41
|
-
if (!
|
|
42
|
-
$("error",
|
|
37
|
+
let e = j || Q(k);
|
|
38
|
+
if (!k.trim()) {
|
|
39
|
+
$("error", m("newsletter.pleaseEnterTitle", "Please enter a title for your campaign"));
|
|
43
40
|
return;
|
|
44
41
|
}
|
|
45
|
-
if (
|
|
46
|
-
title:
|
|
47
|
-
subject:
|
|
48
|
-
previewText:
|
|
49
|
-
content:
|
|
50
|
-
}), $("success",
|
|
42
|
+
if (W && N) await Le(W, {
|
|
43
|
+
title: k,
|
|
44
|
+
subject: T.subject,
|
|
45
|
+
previewText: T.previewText,
|
|
46
|
+
content: T.content
|
|
47
|
+
}), $("success", m("newsletter.campaignSavedSuccessfully", "Campaign saved successfully"));
|
|
51
48
|
else {
|
|
52
|
-
let t = await
|
|
53
|
-
platformProductId:
|
|
54
|
-
title:
|
|
49
|
+
let t = await Ie({
|
|
50
|
+
platformProductId: y,
|
|
51
|
+
title: k,
|
|
55
52
|
slug: e,
|
|
56
|
-
subject:
|
|
57
|
-
previewText:
|
|
58
|
-
content:
|
|
53
|
+
subject: T.subject || k,
|
|
54
|
+
previewText: T.previewText,
|
|
55
|
+
content: T.content || "<p>Your email content here</p>"
|
|
59
56
|
});
|
|
60
|
-
t && (
|
|
57
|
+
t && (I(t.id), P(!0), M(t.slug), $("success", m("newsletter.campaignCreatedSuccessfully", "Campaign created successfully")));
|
|
61
58
|
}
|
|
62
59
|
} catch (e) {
|
|
63
|
-
$("error", `${
|
|
60
|
+
$("error", `${m("newsletter.failedToSave", "Failed to save")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
|
|
64
61
|
}
|
|
65
|
-
},
|
|
66
|
-
if (!
|
|
67
|
-
$("error",
|
|
62
|
+
}, qe = async () => {
|
|
63
|
+
if (!W) {
|
|
64
|
+
$("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
|
|
68
65
|
return;
|
|
69
66
|
}
|
|
70
|
-
let e =
|
|
67
|
+
let e = Oe.split(",").flatMap((e) => {
|
|
71
68
|
let t = e.trim();
|
|
72
69
|
return t ? [t] : [];
|
|
73
70
|
});
|
|
74
71
|
if (e.length === 0) {
|
|
75
|
-
$("error",
|
|
72
|
+
$("error", m("newsletter.pleaseEnterAtLeastOneEmail", "Please enter at least one email address"));
|
|
76
73
|
return;
|
|
77
74
|
}
|
|
78
75
|
try {
|
|
79
|
-
let t = await
|
|
80
|
-
t?.success && ($("success", `${
|
|
76
|
+
let t = await Be(W, e);
|
|
77
|
+
t?.success && ($("success", `${m("newsletter.testEmailSentTo", "Test email sent to")} ${t.sentCount} ${m("newsletter.recipientsCount", "recipient(s)")}`), L(!1), ke(""));
|
|
81
78
|
} catch (e) {
|
|
82
|
-
$("error", `${
|
|
79
|
+
$("error", `${m("newsletter.failedToSendTest", "Failed to send test")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
|
|
83
80
|
}
|
|
84
|
-
},
|
|
85
|
-
if (!
|
|
86
|
-
$("error",
|
|
81
|
+
}, Je = async () => {
|
|
82
|
+
if (!W) {
|
|
83
|
+
$("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
|
|
87
84
|
return;
|
|
88
85
|
}
|
|
89
|
-
if (!
|
|
90
|
-
$("error",
|
|
86
|
+
if (!z || !B) {
|
|
87
|
+
$("error", m("newsletter.pleaseSelectDateTime", "Please select a date and time"));
|
|
91
88
|
return;
|
|
92
89
|
}
|
|
93
90
|
try {
|
|
94
|
-
await
|
|
91
|
+
await ze(W, (/* @__PURE__ */ new Date(`${z}T${B}`)).toISOString()), $("success", m("newsletter.campaignScheduledSuccessfully", "Campaign scheduled successfully")), R(!1), g("../campaigns");
|
|
95
92
|
} catch (e) {
|
|
96
|
-
$("error", `${
|
|
93
|
+
$("error", `${m("scheduler.failedToReschedule", "Failed to schedule")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
|
|
97
94
|
}
|
|
98
|
-
},
|
|
99
|
-
if (!
|
|
100
|
-
$("error",
|
|
95
|
+
}, Ye = async () => {
|
|
96
|
+
if (!W) {
|
|
97
|
+
$("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
|
|
101
98
|
return;
|
|
102
99
|
}
|
|
103
|
-
if (confirm(
|
|
104
|
-
await
|
|
100
|
+
if (confirm(m("newsletter.confirmSendCampaignIrreversible", "Are you sure you want to send this campaign now? This action cannot be undone."))) try {
|
|
101
|
+
await Re(W), $("success", m("newsletter.campaignSentSuccessfully", "Campaign sent successfully!")), setTimeout(() => g("../campaigns"), 1500);
|
|
105
102
|
} catch (e) {
|
|
106
|
-
$("error", `${
|
|
103
|
+
$("error", `${m("newsletter.failedToSend", "Failed to send")}: ${e instanceof Error ? e.message : m("newsletter.unknownError", "Unknown error")}`);
|
|
107
104
|
}
|
|
108
|
-
},
|
|
109
|
-
|
|
105
|
+
}, Xe = () => {
|
|
106
|
+
g("../campaigns");
|
|
110
107
|
};
|
|
111
|
-
if (
|
|
108
|
+
if (_) return /* @__PURE__ */ d("div", {
|
|
112
109
|
className: "flex items-center justify-center h-full",
|
|
113
|
-
children: /* @__PURE__ */
|
|
110
|
+
children: /* @__PURE__ */ f("div", {
|
|
114
111
|
className: "flex items-center gap-2 text-text-secondary",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ d(o, {
|
|
116
113
|
className: "animate-spin",
|
|
117
114
|
size: 24
|
|
118
|
-
}), /* @__PURE__ */
|
|
115
|
+
}), /* @__PURE__ */ d("span", { children: m("newsletterCommon.loading", "Loading...") })]
|
|
119
116
|
})
|
|
120
117
|
});
|
|
121
|
-
let
|
|
122
|
-
return !
|
|
118
|
+
let Ze = U ? we : Te;
|
|
119
|
+
return !_ && v && v.permissionStrings?.length > 0 && !Ze ? /* @__PURE__ */ d(ae, {}) : h && Pe ? /* @__PURE__ */ d("div", {
|
|
123
120
|
className: "flex items-center justify-center h-full",
|
|
124
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ f("div", {
|
|
125
122
|
className: "flex items-center gap-2 text-text-secondary",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ d(o, {
|
|
127
124
|
className: "animate-spin",
|
|
128
125
|
size: 24
|
|
129
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ d("span", { children: m("newsletter.loadingCampaign", "Loading campaign...") })]
|
|
130
127
|
})
|
|
131
|
-
}) :
|
|
128
|
+
}) : K ? /* @__PURE__ */ d("div", {
|
|
132
129
|
className: "flex items-center justify-center h-full p-6",
|
|
133
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ d(ye, {
|
|
134
131
|
illustration: "empty-generic",
|
|
135
|
-
title:
|
|
136
|
-
description:
|
|
137
|
-
action: /* @__PURE__ */
|
|
132
|
+
title: m("newsletter.failedLoadCampaign", "Failed to load campaign"),
|
|
133
|
+
description: K.message,
|
|
134
|
+
action: /* @__PURE__ */ d(p, {
|
|
138
135
|
type: "button",
|
|
139
|
-
onClick:
|
|
140
|
-
children:
|
|
136
|
+
onClick: Xe,
|
|
137
|
+
children: m("newsletter.backToCampaigns", "Back to Campaigns")
|
|
141
138
|
})
|
|
142
139
|
})
|
|
143
|
-
}) : /* @__PURE__ */
|
|
140
|
+
}) : /* @__PURE__ */ f("div", {
|
|
144
141
|
className: "flex flex-col h-full",
|
|
145
142
|
children: [
|
|
146
|
-
|
|
147
|
-
className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-pop ${
|
|
148
|
-
children: [
|
|
143
|
+
V && /* @__PURE__ */ f("div", {
|
|
144
|
+
className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-pop ${V.type === "success" ? "bg-status-success-bg/10 text-status-success-text border border-status-success-border/20" : "bg-status-error-bg/10 text-status-error-text border border-status-error-border/20"}`,
|
|
145
|
+
children: [V.type === "success" ? /* @__PURE__ */ d(ue, { size: 20 }) : /* @__PURE__ */ d(ce, { size: 20 }), /* @__PURE__ */ d("span", { children: V.message })]
|
|
149
146
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ f("div", {
|
|
151
148
|
className: "relative overflow-hidden flex items-center justify-between gap-4 p-4 border-b border-border-seam",
|
|
152
149
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ d(he, { intensity: "subtle" }),
|
|
151
|
+
/* @__PURE__ */ f("div", {
|
|
155
152
|
className: "flex items-center gap-4 min-w-0",
|
|
156
153
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ d(p, {
|
|
158
155
|
type: "button",
|
|
159
156
|
variant: "ghost",
|
|
160
157
|
size: "icon",
|
|
161
|
-
onClick:
|
|
162
|
-
"aria-label":
|
|
163
|
-
children: /* @__PURE__ */
|
|
158
|
+
onClick: Xe,
|
|
159
|
+
"aria-label": m("newsletter.backToCampaigns", "Back to Campaigns"),
|
|
160
|
+
children: /* @__PURE__ */ d(le, { size: 20 })
|
|
164
161
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ f("div", {
|
|
166
163
|
className: "min-w-0",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ d("h1", {
|
|
168
165
|
className: "text-xl font-semibold text-text-primary",
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
}),
|
|
166
|
+
children: /* @__PURE__ */ d(ve, { children: U && !N ? m("newsletter.createCampaign", "Create Campaign") : m("newsletter.editCampaign", "Edit Campaign") })
|
|
167
|
+
}), N && /* @__PURE__ */ f("p", {
|
|
171
168
|
className: "text-sm text-text-secondary truncate",
|
|
172
169
|
children: [
|
|
173
|
-
|
|
170
|
+
m("newsletter.editingPrefix", "Editing"),
|
|
174
171
|
":",
|
|
175
172
|
" ",
|
|
176
|
-
|
|
173
|
+
k || m("newsletter.untitled", "Untitled")
|
|
177
174
|
]
|
|
178
175
|
})]
|
|
179
176
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ f("div", {
|
|
181
178
|
className: "flex items-center gap-2 border border-border-seam rounded-lg ml-4 overflow-hidden",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ f("button", {
|
|
183
180
|
type: "button",
|
|
184
|
-
onClick: () =>
|
|
185
|
-
className: `px-3 py-1.5 text-sm font-medium transition-colors ${
|
|
186
|
-
children: [/* @__PURE__ */
|
|
181
|
+
onClick: () => S("VISUAL"),
|
|
182
|
+
className: `px-3 py-1.5 text-sm font-medium transition-colors ${x === "VISUAL" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"}`,
|
|
183
|
+
children: [/* @__PURE__ */ d(s, {
|
|
187
184
|
size: 16,
|
|
188
185
|
className: "inline mr-1"
|
|
189
|
-
}),
|
|
190
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), m("newsletter.visual", "Visual")]
|
|
187
|
+
}), /* @__PURE__ */ f("button", {
|
|
191
188
|
type: "button",
|
|
192
|
-
onClick: () =>
|
|
193
|
-
className: `px-3 py-1.5 text-sm font-medium transition-colors ${
|
|
194
|
-
children: [/* @__PURE__ */
|
|
189
|
+
onClick: () => S("CODE"),
|
|
190
|
+
className: `px-3 py-1.5 text-sm font-medium transition-colors ${x === "CODE" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:bg-accent"}`,
|
|
191
|
+
children: [/* @__PURE__ */ d(de, {
|
|
195
192
|
size: 16,
|
|
196
193
|
className: "inline mr-1"
|
|
197
|
-
}),
|
|
194
|
+
}), m("newsletter.code", "Code")]
|
|
198
195
|
})]
|
|
199
196
|
})
|
|
200
197
|
]
|
|
201
198
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ f("div", {
|
|
203
200
|
className: "flex items-center gap-2",
|
|
204
201
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ d(p, {
|
|
206
203
|
type: "button",
|
|
207
|
-
variant:
|
|
204
|
+
variant: D ? "secondary" : "outline",
|
|
208
205
|
size: "icon",
|
|
209
|
-
onClick:
|
|
210
|
-
title:
|
|
211
|
-
"aria-label":
|
|
212
|
-
children: /* @__PURE__ */
|
|
206
|
+
onClick: O,
|
|
207
|
+
title: m("newsletter.togglePreview", "Toggle Preview"),
|
|
208
|
+
"aria-label": m("newsletter.togglePreview", "Toggle Preview"),
|
|
209
|
+
children: /* @__PURE__ */ d(a, { size: 20 })
|
|
213
210
|
}),
|
|
214
|
-
/* @__PURE__ */ p
|
|
211
|
+
/* @__PURE__ */ f(p, {
|
|
215
212
|
type: "button",
|
|
216
|
-
onClick:
|
|
213
|
+
onClick: Ke,
|
|
217
214
|
disabled: Z,
|
|
218
215
|
className: "gap-2",
|
|
219
|
-
children: [
|
|
216
|
+
children: [q || J ? /* @__PURE__ */ d(o, {
|
|
220
217
|
size: 20,
|
|
221
218
|
className: "animate-spin"
|
|
222
|
-
}) : /* @__PURE__ */
|
|
219
|
+
}) : /* @__PURE__ */ d(c, { size: 20 }), N ? m("newsletterCommon.save", "Save") : m("newsletter.saveDraft", "Save Draft")]
|
|
223
220
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ d(ge, { actions: [
|
|
225
222
|
{
|
|
226
|
-
label:
|
|
223
|
+
label: m("newsletter.test", "Test"),
|
|
227
224
|
onSelect: () => L(!0),
|
|
228
|
-
disabled: Z || !
|
|
229
|
-
icon: /* @__PURE__ */
|
|
225
|
+
disabled: Z || !W && !N,
|
|
226
|
+
icon: /* @__PURE__ */ d(u, { size: 16 })
|
|
230
227
|
},
|
|
231
228
|
{
|
|
232
|
-
label:
|
|
233
|
-
onSelect: () =>
|
|
234
|
-
disabled: Z || !
|
|
235
|
-
icon: /* @__PURE__ */
|
|
229
|
+
label: m("newsletter.schedule", "Schedule"),
|
|
230
|
+
onSelect: () => R(!0),
|
|
231
|
+
disabled: Z || !W,
|
|
232
|
+
icon: /* @__PURE__ */ d(i, { size: 16 })
|
|
236
233
|
},
|
|
237
234
|
{
|
|
238
|
-
label:
|
|
235
|
+
label: m("newsletter.sendNow", "Send Now"),
|
|
239
236
|
onSelect: () => {
|
|
240
|
-
|
|
237
|
+
Ye();
|
|
241
238
|
},
|
|
242
|
-
disabled: Z || !
|
|
239
|
+
disabled: Z || !W,
|
|
243
240
|
intent: "destructive",
|
|
244
|
-
icon: /* @__PURE__ */
|
|
241
|
+
icon: /* @__PURE__ */ d(l, { size: 16 })
|
|
245
242
|
}
|
|
246
243
|
] })
|
|
247
244
|
]
|
|
248
245
|
})
|
|
249
246
|
]
|
|
250
247
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ f("div", {
|
|
252
249
|
className: "flex-1 flex overflow-hidden",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
254
|
-
className: `${
|
|
255
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ f("div", {
|
|
251
|
+
className: `${D ? "w-1/2" : "w-full"} flex flex-col border-r border-border-seam`,
|
|
252
|
+
children: [/* @__PURE__ */ f("div", {
|
|
256
253
|
className: "p-4 space-y-4 border-b border-border-seam",
|
|
257
254
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ d(Se, { children: m("newsletter.editorPurpose", "Where you build the actual email your subscribers receive. Write the subject line that earns the open, compose the body (visually or in raw HTML), and check the live preview on desktop and mobile. Always send yourself a test before you schedule or hit send — once it goes out, it cannot be unsent.") }),
|
|
256
|
+
/* @__PURE__ */ d(be, {
|
|
260
257
|
storageKey: "newsletter-campaign-editor",
|
|
261
258
|
steps: [
|
|
262
259
|
{
|
|
263
260
|
id: "save-draft",
|
|
264
|
-
label:
|
|
265
|
-
description:
|
|
266
|
-
icon: /* @__PURE__ */
|
|
267
|
-
onClick: () => void
|
|
268
|
-
done:
|
|
261
|
+
label: m("newsletter.nextStepSaveDraft", "Save your draft"),
|
|
262
|
+
description: m("newsletter.nextStepSaveDraftDesc", "Give the campaign a title and save before anything else."),
|
|
263
|
+
icon: /* @__PURE__ */ d(c, { size: 16 }),
|
|
264
|
+
onClick: () => void Ke(),
|
|
265
|
+
done: N
|
|
269
266
|
},
|
|
270
267
|
{
|
|
271
268
|
id: "preview",
|
|
272
|
-
label:
|
|
273
|
-
description:
|
|
274
|
-
icon: /* @__PURE__ */
|
|
269
|
+
label: m("newsletter.nextStepPreview", "Preview on every device"),
|
|
270
|
+
description: m("newsletter.nextStepPreviewDesc", "Open the preview panel to check desktop, tablet, and mobile."),
|
|
271
|
+
icon: /* @__PURE__ */ d(a, { size: 16 }),
|
|
275
272
|
onClick: () => {
|
|
276
|
-
|
|
273
|
+
D || O();
|
|
277
274
|
},
|
|
278
|
-
done:
|
|
275
|
+
done: D
|
|
279
276
|
},
|
|
280
277
|
{
|
|
281
278
|
id: "send-test",
|
|
282
|
-
label:
|
|
283
|
-
description:
|
|
284
|
-
icon: /* @__PURE__ */
|
|
279
|
+
label: m("newsletter.nextStepSendTest", "Send yourself a test"),
|
|
280
|
+
description: m("newsletter.nextStepSendTestDesc", "Confirm it looks right in a real inbox before sending for real."),
|
|
281
|
+
icon: /* @__PURE__ */ d(u, { size: 16 }),
|
|
285
282
|
onClick: () => {
|
|
286
|
-
|
|
283
|
+
W ? L(!0) : $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
|
|
287
284
|
}
|
|
288
285
|
},
|
|
289
286
|
{
|
|
290
287
|
id: "schedule",
|
|
291
|
-
label:
|
|
292
|
-
description:
|
|
293
|
-
icon: /* @__PURE__ */
|
|
288
|
+
label: m("newsletter.nextStepSchedule", "Schedule or send"),
|
|
289
|
+
description: m("newsletter.nextStepScheduleDesc", "Pick the perfect time to reach your audience."),
|
|
290
|
+
icon: /* @__PURE__ */ d(i, { size: 16 }),
|
|
294
291
|
onClick: () => {
|
|
295
|
-
|
|
292
|
+
W ? R(!0) : $("error", m("newsletter.pleaseSaveFirst", "Please save the campaign first"));
|
|
296
293
|
}
|
|
297
294
|
}
|
|
298
295
|
]
|
|
299
296
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ f("div", {
|
|
301
298
|
className: "grid grid-cols-3 gap-4",
|
|
302
299
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
|
|
304
301
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
305
|
-
children: [
|
|
306
|
-
}), /* @__PURE__ */
|
|
302
|
+
children: [m("newsletter.campaignTitle", "Campaign Title"), " *"]
|
|
303
|
+
}), /* @__PURE__ */ d("input", {
|
|
307
304
|
type: "text",
|
|
308
|
-
"aria-label":
|
|
309
|
-
value:
|
|
305
|
+
"aria-label": m("newsletter.campaignTitle", "Campaign Title"),
|
|
306
|
+
value: k,
|
|
310
307
|
onChange: (e) => {
|
|
311
|
-
|
|
308
|
+
A(e.target.value), (!j || j === Q(k)) && M(Q(e.target.value));
|
|
312
309
|
},
|
|
313
|
-
placeholder:
|
|
310
|
+
placeholder: m("newsletter.enterCampaignTitle", "Enter campaign title..."),
|
|
314
311
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
315
312
|
})] }),
|
|
316
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
317
314
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
318
|
-
children:
|
|
319
|
-
}), /* @__PURE__ */
|
|
315
|
+
children: m("newsletter.urlSlug", "URL Slug")
|
|
316
|
+
}), /* @__PURE__ */ d("input", {
|
|
320
317
|
type: "text",
|
|
321
|
-
"aria-label":
|
|
322
|
-
value:
|
|
323
|
-
onChange: (e) =>
|
|
324
|
-
placeholder:
|
|
325
|
-
disabled:
|
|
318
|
+
"aria-label": m("newsletter.urlSlug", "URL Slug"),
|
|
319
|
+
value: j,
|
|
320
|
+
onChange: (e) => M(e.target.value),
|
|
321
|
+
placeholder: m("newsletter.slugPlaceholder", "campaign-slug"),
|
|
322
|
+
disabled: N,
|
|
326
323
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent disabled:bg-bg-sunken disabled:cursor-not-allowed"
|
|
327
324
|
})] }),
|
|
328
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
|
|
329
326
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
330
|
-
children: [
|
|
331
|
-
}), /* @__PURE__ */
|
|
327
|
+
children: [m("newsletter.targetProduct", "Target Product"), " *"]
|
|
328
|
+
}), /* @__PURE__ */ d("input", {
|
|
332
329
|
type: "text",
|
|
333
|
-
"aria-label":
|
|
334
|
-
value:
|
|
330
|
+
"aria-label": m("newsletter.targetProduct", "Target Product"),
|
|
331
|
+
value: Fe.find((e) => e.id === (G?.platformProductId || y))?.name || G?.platformProductId || y,
|
|
335
332
|
readOnly: !0,
|
|
336
333
|
disabled: !0,
|
|
337
334
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-sunken text-text-secondary disabled:cursor-not-allowed"
|
|
338
335
|
})] })
|
|
339
336
|
]
|
|
340
337
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("label", {
|
|
342
339
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
343
|
-
children: [
|
|
344
|
-
}), /* @__PURE__ */
|
|
340
|
+
children: [m("newsletter.emailSubjectLine", "Email Subject Line"), " *"]
|
|
341
|
+
}), /* @__PURE__ */ d("input", {
|
|
345
342
|
type: "text",
|
|
346
|
-
"aria-label":
|
|
347
|
-
value:
|
|
348
|
-
onChange: (e) =>
|
|
349
|
-
placeholder:
|
|
343
|
+
"aria-label": m("newsletter.emailSubjectLine", "Email Subject Line"),
|
|
344
|
+
value: T.subject,
|
|
345
|
+
onChange: (e) => E({ subject: e.target.value }),
|
|
346
|
+
placeholder: m("newsletter.enterSubjectLine", "Enter subject line..."),
|
|
350
347
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
351
348
|
})] }),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
title:
|
|
354
|
-
description:
|
|
355
|
-
children: /* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ d(xe, {
|
|
350
|
+
title: m("newsletter.advancedDelivery", "Advanced settings"),
|
|
351
|
+
description: m("newsletter.advancedDeliveryDescription", "Deliverability tuning, SPF/DKIM, and custom headers."),
|
|
352
|
+
children: /* @__PURE__ */ f("div", { children: [
|
|
353
|
+
/* @__PURE__ */ d("label", {
|
|
357
354
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
358
|
-
children:
|
|
355
|
+
children: m("newsletter.previewText", "Preview Text")
|
|
359
356
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ d("input", {
|
|
361
358
|
type: "text",
|
|
362
|
-
"aria-label":
|
|
363
|
-
value:
|
|
364
|
-
onChange: (e) =>
|
|
365
|
-
placeholder:
|
|
359
|
+
"aria-label": m("newsletter.previewText", "Preview Text"),
|
|
360
|
+
value: T.previewText,
|
|
361
|
+
onChange: (e) => E({ previewText: e.target.value }),
|
|
362
|
+
placeholder: m("newsletter.previewTextPlaceholder", "This appears in the inbox preview..."),
|
|
366
363
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
367
364
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ d("p", {
|
|
369
366
|
className: "mt-1 text-xs text-text-secondary",
|
|
370
|
-
children:
|
|
367
|
+
children: m("newsletter.previewTextDescription", "This text appears after the subject line in email clients")
|
|
371
368
|
})
|
|
372
369
|
] })
|
|
373
370
|
})
|
|
374
371
|
]
|
|
375
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ d("div", {
|
|
376
373
|
className: "flex-1 overflow-auto p-4",
|
|
377
|
-
children:
|
|
374
|
+
children: x === "VISUAL" ? /* @__PURE__ */ f(_e, {
|
|
378
375
|
treatment: "glass",
|
|
379
376
|
glow: !0,
|
|
380
377
|
className: "border-border-seam p-4 min-h-full",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ f("div", {
|
|
382
379
|
className: "mb-4 pb-4 border-b border-border-seam",
|
|
383
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ f("p", {
|
|
384
381
|
className: "text-sm text-text-secondary mb-2",
|
|
385
|
-
children: [
|
|
386
|
-
}), /* @__PURE__ */
|
|
382
|
+
children: [m("newsletter.personalizationTags", "Personalization Tags"), ":"]
|
|
383
|
+
}), /* @__PURE__ */ d("div", {
|
|
387
384
|
className: "flex flex-wrap gap-2",
|
|
388
385
|
children: [
|
|
389
386
|
"{{firstName}}",
|
|
390
387
|
"{{lastName}}",
|
|
391
388
|
"{{email}}",
|
|
392
389
|
"{{unsubscribeLink}}"
|
|
393
|
-
].map((e) => /* @__PURE__ */
|
|
390
|
+
].map((e) => /* @__PURE__ */ d("button", {
|
|
394
391
|
type: "button",
|
|
395
|
-
onClick: () =>
|
|
392
|
+
onClick: () => E({ content: T.content + e }),
|
|
396
393
|
className: "px-2 py-1 text-xs bg-bg-sunken rounded hover:bg-accent",
|
|
397
394
|
children: e
|
|
398
395
|
}, e))
|
|
399
396
|
})]
|
|
400
|
-
}), /* @__PURE__ */
|
|
401
|
-
"aria-label":
|
|
402
|
-
value:
|
|
403
|
-
onChange: (e) =>
|
|
404
|
-
placeholder:
|
|
397
|
+
}), /* @__PURE__ */ d("textarea", {
|
|
398
|
+
"aria-label": m("newsletter.emailContent", "Email content"),
|
|
399
|
+
value: T.content,
|
|
400
|
+
onChange: (e) => E({ content: e.target.value }),
|
|
401
|
+
placeholder: m("newsletter.emailContentPlaceholder", "Write your email content here... You can use HTML tags for formatting."),
|
|
405
402
|
className: "w-full h-64 p-4 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent resize-none"
|
|
406
403
|
})]
|
|
407
|
-
}) : /* @__PURE__ */
|
|
408
|
-
"aria-label":
|
|
409
|
-
value:
|
|
410
|
-
onChange: (e) =>
|
|
411
|
-
placeholder:
|
|
404
|
+
}) : /* @__PURE__ */ d("textarea", {
|
|
405
|
+
"aria-label": m("newsletter.emailContent", "Email content"),
|
|
406
|
+
value: T.content,
|
|
407
|
+
onChange: (e) => E({ content: e.target.value }),
|
|
408
|
+
placeholder: Ne,
|
|
412
409
|
className: "w-full h-full p-4 font-mono text-sm border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
413
410
|
})
|
|
414
411
|
})]
|
|
415
|
-
}),
|
|
412
|
+
}), D && /* @__PURE__ */ f("div", {
|
|
416
413
|
className: "w-1/2 flex flex-col",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ f("div", {
|
|
418
415
|
className: "flex items-center justify-between p-4 border-b border-border-seam",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
420
417
|
className: "font-medium text-text-primary",
|
|
421
|
-
children:
|
|
422
|
-
}), /* @__PURE__ */
|
|
418
|
+
children: m("newsletter.preview", "Preview")
|
|
419
|
+
}), /* @__PURE__ */ f("div", {
|
|
423
420
|
className: "flex items-center gap-2",
|
|
424
421
|
children: [
|
|
425
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ d("button", {
|
|
426
423
|
type: "button",
|
|
427
|
-
onClick: () =>
|
|
428
|
-
className: `p-2 rounded ${
|
|
429
|
-
title:
|
|
430
|
-
children: /* @__PURE__ */
|
|
424
|
+
onClick: () => w("DESKTOP"),
|
|
425
|
+
className: `p-2 rounded ${C === "DESKTOP" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
|
|
426
|
+
title: m("newsletter.desktop", "Desktop"),
|
|
427
|
+
children: /* @__PURE__ */ d(s, { size: 20 })
|
|
431
428
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ d("button", {
|
|
433
430
|
type: "button",
|
|
434
|
-
onClick: () =>
|
|
435
|
-
className: `p-2 rounded ${
|
|
436
|
-
title:
|
|
437
|
-
children: /* @__PURE__ */
|
|
431
|
+
onClick: () => w("TABLET"),
|
|
432
|
+
className: `p-2 rounded ${C === "TABLET" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
|
|
433
|
+
title: m("newsletter.tablet", "Tablet"),
|
|
434
|
+
children: /* @__PURE__ */ d(pe, { size: 20 })
|
|
438
435
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ d("button", {
|
|
440
437
|
type: "button",
|
|
441
|
-
onClick: () =>
|
|
442
|
-
className: `p-2 rounded ${
|
|
443
|
-
title:
|
|
444
|
-
children: /* @__PURE__ */
|
|
438
|
+
onClick: () => w("MOBILE"),
|
|
439
|
+
className: `p-2 rounded ${C === "MOBILE" ? "bg-action-primary-bg/10 text-primary" : "text-text-secondary hover:bg-accent"}`,
|
|
440
|
+
title: m("newsletter.mobile", "Mobile"),
|
|
441
|
+
children: /* @__PURE__ */ d(fe, { size: 20 })
|
|
445
442
|
})
|
|
446
443
|
]
|
|
447
444
|
})]
|
|
448
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ d("div", {
|
|
449
446
|
className: "flex-1 overflow-auto p-4 bg-bg-sunken",
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
-
className: `mx-auto bg-bg-surface shadow-lg rounded-lg overflow-hidden ${
|
|
452
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: /* @__PURE__ */ f("div", {
|
|
448
|
+
className: `mx-auto bg-bg-surface shadow-lg rounded-lg overflow-hidden ${C === "DESKTOP" ? "w-full max-w-2xl" : C === "TABLET" ? "w-[768px] max-w-full" : "w-[375px]"}`,
|
|
449
|
+
children: [/* @__PURE__ */ f("div", {
|
|
453
450
|
className: "p-4 border-b border-border-seam bg-bg-sunken",
|
|
454
451
|
children: [
|
|
455
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ f("div", {
|
|
456
453
|
className: "text-sm text-text-secondary",
|
|
457
454
|
children: [
|
|
458
|
-
|
|
455
|
+
m("newsletter.fromLabel", "From"),
|
|
459
456
|
":",
|
|
460
457
|
" ",
|
|
461
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ d("span", {
|
|
462
459
|
className: "text-text-primary",
|
|
463
|
-
children:
|
|
460
|
+
children: m("newsletter.newsletter", "Newsletter")
|
|
464
461
|
})
|
|
465
462
|
]
|
|
466
463
|
}),
|
|
467
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ f("div", {
|
|
468
465
|
className: "text-sm text-text-secondary",
|
|
469
466
|
children: [
|
|
470
|
-
|
|
467
|
+
m("newsletter.subjectLabel", "Subject"),
|
|
471
468
|
":",
|
|
472
469
|
" ",
|
|
473
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ d("span", {
|
|
474
471
|
className: "text-text-primary font-medium",
|
|
475
|
-
children:
|
|
472
|
+
children: T.subject || m("newsletter.subjectLinePlaceholder", "Subject Line")
|
|
476
473
|
})
|
|
477
474
|
]
|
|
478
475
|
}),
|
|
479
|
-
|
|
476
|
+
T.previewText && /* @__PURE__ */ d("div", {
|
|
480
477
|
className: "text-sm text-text-secondary/70 mt-1 truncate",
|
|
481
|
-
children:
|
|
478
|
+
children: T.previewText
|
|
482
479
|
})
|
|
483
480
|
]
|
|
484
|
-
}), /* @__PURE__ */
|
|
481
|
+
}), /* @__PURE__ */ d("div", {
|
|
485
482
|
className: "p-4",
|
|
486
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ d("div", { dangerouslySetInnerHTML: { __html: T.content || `<p style="color: #999;">${m("newsletter.emailContentWillAppear", "Email content will appear here")}</p>` } })
|
|
487
484
|
})]
|
|
488
485
|
})
|
|
489
486
|
})]
|
|
490
487
|
})]
|
|
491
488
|
}),
|
|
492
|
-
|
|
489
|
+
De && /* @__PURE__ */ d("div", {
|
|
493
490
|
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
494
|
-
children: /* @__PURE__ */
|
|
491
|
+
children: /* @__PURE__ */ f("div", {
|
|
495
492
|
className: "bg-bg-surface rounded-card shadow-pop border border-border-seam w-full max-w-md p-6",
|
|
496
493
|
children: [
|
|
497
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ d("h2", {
|
|
498
495
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
499
|
-
children:
|
|
496
|
+
children: m("newsletter.sendTestEmail", "Send Test Email")
|
|
500
497
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
498
|
+
/* @__PURE__ */ f("div", {
|
|
502
499
|
className: "mb-4",
|
|
503
500
|
children: [
|
|
504
|
-
/* @__PURE__ */
|
|
501
|
+
/* @__PURE__ */ d("label", {
|
|
505
502
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
506
|
-
children:
|
|
503
|
+
children: m("newsletter.testEmailAddresses", "Test Email Addresses")
|
|
507
504
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
"aria-label":
|
|
510
|
-
value:
|
|
511
|
-
onChange: (e) =>
|
|
512
|
-
placeholder:
|
|
505
|
+
/* @__PURE__ */ d("textarea", {
|
|
506
|
+
"aria-label": m("newsletter.testEmailAddresses", "Test Email Addresses"),
|
|
507
|
+
value: Oe,
|
|
508
|
+
onChange: (e) => ke(e.target.value),
|
|
509
|
+
placeholder: m("newsletter.testEmailsPlaceholder", "email1@example.com, email2@example.com"),
|
|
513
510
|
rows: 3,
|
|
514
511
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
515
512
|
}),
|
|
516
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ d("p", {
|
|
517
514
|
className: "mt-1 text-xs text-text-secondary",
|
|
518
|
-
children:
|
|
515
|
+
children: m("newsletter.separateEmailsWithCommas", "Separate multiple emails with commas")
|
|
519
516
|
})
|
|
520
517
|
]
|
|
521
518
|
}),
|
|
522
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ f("div", {
|
|
523
520
|
className: "flex justify-end gap-2",
|
|
524
|
-
children: [/* @__PURE__ */
|
|
521
|
+
children: [/* @__PURE__ */ d(p, {
|
|
525
522
|
type: "button",
|
|
526
523
|
variant: "outline",
|
|
527
524
|
onClick: () => L(!1),
|
|
528
|
-
children:
|
|
529
|
-
}), /* @__PURE__ */ p
|
|
525
|
+
children: m("newsletterCommon.cancel", "Cancel")
|
|
526
|
+
}), /* @__PURE__ */ f(p, {
|
|
530
527
|
type: "button",
|
|
531
|
-
onClick:
|
|
528
|
+
onClick: qe,
|
|
532
529
|
disabled: X,
|
|
533
530
|
className: "gap-2",
|
|
534
|
-
children: [X ? /* @__PURE__ */
|
|
531
|
+
children: [X ? /* @__PURE__ */ d(o, {
|
|
535
532
|
size: 16,
|
|
536
533
|
className: "animate-spin"
|
|
537
|
-
}) : /* @__PURE__ */
|
|
534
|
+
}) : /* @__PURE__ */ d(l, { size: 16 }), m("newsletter.sendTest", "Send Test")]
|
|
538
535
|
})]
|
|
539
536
|
})
|
|
540
537
|
]
|
|
541
538
|
})
|
|
542
539
|
}),
|
|
543
|
-
|
|
540
|
+
Ae && /* @__PURE__ */ d("div", {
|
|
544
541
|
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
545
|
-
children: /* @__PURE__ */
|
|
542
|
+
children: /* @__PURE__ */ f("div", {
|
|
546
543
|
className: "bg-bg-surface rounded-card shadow-pop border border-border-seam w-full max-w-md p-6",
|
|
547
544
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
545
|
+
/* @__PURE__ */ d("h2", {
|
|
549
546
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
550
|
-
children:
|
|
547
|
+
children: m("newsletter.scheduleCampaign", "Schedule Campaign")
|
|
551
548
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ f("div", {
|
|
553
550
|
className: "space-y-4 mb-4",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
555
552
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
556
|
-
children:
|
|
557
|
-
}), /* @__PURE__ */
|
|
553
|
+
children: m("newsletterCommon.date", "Date")
|
|
554
|
+
}), /* @__PURE__ */ d("input", {
|
|
558
555
|
type: "date",
|
|
559
|
-
"aria-label":
|
|
560
|
-
value:
|
|
561
|
-
onChange: (e) =>
|
|
556
|
+
"aria-label": m("newsletterCommon.date", "Date"),
|
|
557
|
+
value: z,
|
|
558
|
+
onChange: (e) => je(e.target.value),
|
|
562
559
|
min: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
|
|
563
560
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
564
|
-
})] }), /* @__PURE__ */
|
|
561
|
+
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
565
562
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
566
|
-
children:
|
|
567
|
-
}), /* @__PURE__ */
|
|
563
|
+
children: m("newsletterCommon.time", "Time")
|
|
564
|
+
}), /* @__PURE__ */ d("input", {
|
|
568
565
|
type: "time",
|
|
569
|
-
"aria-label":
|
|
570
|
-
value:
|
|
571
|
-
onChange: (e) =>
|
|
566
|
+
"aria-label": m("newsletterCommon.time", "Time"),
|
|
567
|
+
value: B,
|
|
568
|
+
onChange: (e) => Me(e.target.value),
|
|
572
569
|
className: "w-full px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
573
570
|
})] })]
|
|
574
571
|
}),
|
|
575
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ f("div", {
|
|
576
573
|
className: "flex justify-end gap-2",
|
|
577
|
-
children: [/* @__PURE__ */
|
|
574
|
+
children: [/* @__PURE__ */ d(p, {
|
|
578
575
|
type: "button",
|
|
579
576
|
variant: "outline",
|
|
580
|
-
onClick: () =>
|
|
581
|
-
children:
|
|
582
|
-
}), /* @__PURE__ */ p
|
|
577
|
+
onClick: () => R(!1),
|
|
578
|
+
children: m("newsletterCommon.cancel", "Cancel")
|
|
579
|
+
}), /* @__PURE__ */ f(p, {
|
|
583
580
|
type: "button",
|
|
584
|
-
onClick:
|
|
581
|
+
onClick: Je,
|
|
585
582
|
disabled: Y,
|
|
586
583
|
className: "gap-2",
|
|
587
|
-
children: [Y ? /* @__PURE__ */
|
|
584
|
+
children: [Y ? /* @__PURE__ */ d(o, {
|
|
588
585
|
size: 16,
|
|
589
586
|
className: "animate-spin"
|
|
590
|
-
}) : /* @__PURE__ */
|
|
587
|
+
}) : /* @__PURE__ */ d(i, { size: 16 }), m("newsletter.schedule", "Schedule")]
|
|
591
588
|
})]
|
|
592
589
|
})
|
|
593
590
|
]
|
|
@@ -597,6 +594,6 @@ function h() {
|
|
|
597
594
|
});
|
|
598
595
|
}
|
|
599
596
|
//#endregion
|
|
600
|
-
export {
|
|
597
|
+
export { m as CampaignEditorPage };
|
|
601
598
|
|
|
602
599
|
//# sourceMappingURL=CampaignEditorPage.js.map
|