@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,76 +1,76 @@
|
|
|
1
1
|
import { useSubscriber as e, useSubscriberMutations as t } from "../hooks/useNewsletterOperations.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { nativeConfirm as
|
|
6
|
-
import { useEffect as
|
|
2
|
+
import { useTr as n } from "../shared/hooks/useTr.js";
|
|
3
|
+
import { useNewsletter as r } from "../providers/NewsletterProvider.js";
|
|
4
|
+
import { NEWSLETTER_PERMISSIONS as i } from "../constants/permissions.js";
|
|
5
|
+
import { nativeConfirm as a, nativeNotify as o } from "../../utils/nativeBridge.js";
|
|
6
|
+
import { useEffect as ee, useState as s } from "react";
|
|
7
7
|
import { AccessDenied as c } from "@burdenoff/fe-libs/shared/components";
|
|
8
|
-
import { useNavigate as l, useParams as
|
|
9
|
-
import { AlertCircle as
|
|
10
|
-
import { usePermissions as
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { AuroraBackground as
|
|
8
|
+
import { useNavigate as l, useParams as u } from "react-router";
|
|
9
|
+
import { AlertCircle as te, ArrowLeft as d, Calendar as f, CheckCircle as p, Loader2 as m, Mail as h, MailX as g, MousePointer as ne, RefreshCw as re, Trash2 as ie, TrendingUp as ae } from "lucide-react";
|
|
10
|
+
import { usePermissions as _ } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { Fragment as oe, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
|
+
import { AuroraBackground as b, Button as x, CTAOverflowMenu as S, EmphasisPanel as C, GlassCard as w, GradientText as T, IllustratedEmptyState as E, NextSteps as se, PagePurpose as ce } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/newsletter/pages/SubscriberDetailPage.tsx
|
|
14
|
-
function
|
|
15
|
-
let
|
|
14
|
+
function D() {
|
|
15
|
+
let D = n(), { subscriberId: le } = u(), ue = l(), { productId: O } = r(), { hasPermission: k, isLoading: A, permissions: j } = _(), M = (Array.isArray(j) ? j : j?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:subscribers:")), N = M ? k(i.SUBSCRIBER_READ) : !0, P = M ? k(i.SUBSCRIBER_DELETE) : !0, [F, I] = s(null), [L, R] = s(!1), [z, B] = s({
|
|
16
16
|
email: "",
|
|
17
17
|
userId: "",
|
|
18
18
|
metadata: ""
|
|
19
|
-
}), { email:
|
|
19
|
+
}), { email: V, userId: H, metadata: U } = z, de = (e) => B((t) => ({
|
|
20
20
|
...t,
|
|
21
21
|
email: e
|
|
22
|
-
})),
|
|
22
|
+
})), fe = (e) => B((t) => ({
|
|
23
23
|
...t,
|
|
24
24
|
userId: e
|
|
25
|
-
})),
|
|
25
|
+
})), pe = (e) => B((t) => ({
|
|
26
26
|
...t,
|
|
27
27
|
metadata: e
|
|
28
|
-
})), { subscriber:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
email:
|
|
32
|
-
userId:
|
|
33
|
-
metadata:
|
|
28
|
+
})), { subscriber: W, loading: me, error: G, refetch: K } = e(le || ""), { unsubscribeFromProduct: he, resubscribeToProduct: ge, updateSubscriber: _e, deleteSubscriber: ve, unsubscribing: ye, resubscribing: be, updatingSubscriber: q, deletingSubscriber: xe } = t();
|
|
29
|
+
ee(() => {
|
|
30
|
+
W && B({
|
|
31
|
+
email: W.email,
|
|
32
|
+
userId: W.userId || "",
|
|
33
|
+
metadata: W.metadata ? JSON.stringify(W.metadata, null, 2) : ""
|
|
34
34
|
});
|
|
35
|
-
}, [
|
|
35
|
+
}, [W]);
|
|
36
36
|
let J = (e, t) => {
|
|
37
|
-
|
|
37
|
+
I({
|
|
38
38
|
type: e,
|
|
39
39
|
message: t
|
|
40
|
-
}), setTimeout(() =>
|
|
40
|
+
}), setTimeout(() => I(null), 5e3);
|
|
41
41
|
}, Y = () => {
|
|
42
|
-
|
|
42
|
+
ue("../subscribers");
|
|
43
43
|
}, X = async () => {
|
|
44
|
-
if (
|
|
45
|
-
await
|
|
44
|
+
if (W && confirm(`${D("subscribers.confirmUnsubscribePrefix", "Are you sure you want to unsubscribe")} ${W.email}?`)) try {
|
|
45
|
+
await he(W.email, O), J("success", `${W.email} ${D("subscribers.unsubscribedSuffix", "unsubscribed")}`), K();
|
|
46
46
|
} catch (e) {
|
|
47
|
-
J("error", `${
|
|
47
|
+
J("error", `${D("subscribers.failedToUnsubscribe", "Failed to unsubscribe")}: ${e instanceof Error ? e.message : D("newsletter.unknownError", "Unknown error")}`);
|
|
48
48
|
}
|
|
49
49
|
}, Z = async () => {
|
|
50
|
-
if (
|
|
51
|
-
await
|
|
50
|
+
if (W) try {
|
|
51
|
+
await ge(W.email, O), J("success", `${W.email} ${D("subscribers.resubscribedSuffix", "resubscribed")}`), K();
|
|
52
52
|
} catch (e) {
|
|
53
|
-
J("error", `${
|
|
53
|
+
J("error", `${D("subscribers.failedToResubscribe", "Failed to resubscribe")}: ${e instanceof Error ? e.message : D("newsletter.unknownError", "Unknown error")}`);
|
|
54
54
|
}
|
|
55
55
|
}, Se = async () => {
|
|
56
|
-
if (
|
|
57
|
-
let e =
|
|
58
|
-
await
|
|
59
|
-
email:
|
|
60
|
-
userId:
|
|
56
|
+
if (W) try {
|
|
57
|
+
let e = U.trim() ? JSON.parse(U) : void 0;
|
|
58
|
+
await _e(W.id, {
|
|
59
|
+
email: V.trim(),
|
|
60
|
+
userId: H.trim() || void 0,
|
|
61
61
|
metadata: e
|
|
62
|
-
}), J("success",
|
|
62
|
+
}), J("success", D("subscribers.updatedSuccessfully", "Subscriber updated successfully")), R(!1), K();
|
|
63
63
|
} catch (e) {
|
|
64
|
-
J("error", `${
|
|
64
|
+
J("error", `${D("subscribers.failedToUpdateSubscriber", "Failed to update subscriber")}: ${e instanceof Error ? e.message : D("newsletter.unknownError", "Unknown error")}`);
|
|
65
65
|
}
|
|
66
66
|
}, Ce = async () => {
|
|
67
|
-
if (
|
|
68
|
-
title:
|
|
69
|
-
message: `${
|
|
67
|
+
if (W && await a({
|
|
68
|
+
title: D("subscribers.deleteSubscriber", "Delete Subscriber"),
|
|
69
|
+
message: `${D("subscribers.confirmDeletePrefix", "Are you sure you want to delete")} ${W.email}? ${D("subscribers.gdprDeleteWarning", "This action cannot be undone and will remove all associated data (GDPR compliant).")}`
|
|
70
70
|
}) !== !1) try {
|
|
71
|
-
await
|
|
71
|
+
await ve(W.id), o("success"), J("success", `${W.email} ${D("newsletter.deletedSuffix", "deleted")}`), setTimeout(() => Y(), 1500);
|
|
72
72
|
} catch (e) {
|
|
73
|
-
|
|
73
|
+
o("error"), J("error", `${D("templates.failedToDelete", "Failed to delete")}: ${e instanceof Error ? e.message : D("newsletter.unknownError", "Unknown error")}`);
|
|
74
74
|
}
|
|
75
75
|
}, Q = (e) => e ? new Date(e).toLocaleDateString("en-US", {
|
|
76
76
|
month: "short",
|
|
@@ -78,137 +78,137 @@ function E() {
|
|
|
78
78
|
year: "numeric",
|
|
79
79
|
hour: "2-digit",
|
|
80
80
|
minute: "2-digit"
|
|
81
|
-
}) :
|
|
81
|
+
}) : D("subscribers.never", "Never"), we = (e) => !e.subscribed || e.status === "UNSUBSCRIBED" ? /* @__PURE__ */ y("span", {
|
|
82
82
|
className: "inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
-
}) : e.status === "PAUSED" ? /* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ v(g, { size: 12 }), D("subscribers.unsubscribed", "Unsubscribed")]
|
|
84
|
+
}) : e.status === "PAUSED" ? /* @__PURE__ */ v("span", {
|
|
85
85
|
className: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
|
|
86
|
-
children:
|
|
87
|
-
}) : /* @__PURE__ */
|
|
86
|
+
children: D("subscribers.paused", "Paused")
|
|
87
|
+
}) : /* @__PURE__ */ y("span", {
|
|
88
88
|
className: "inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
|
|
89
89
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
90
|
+
/* @__PURE__ */ v("span", { className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse" }),
|
|
91
|
+
/* @__PURE__ */ v(h, { size: 12 }),
|
|
92
|
+
D("subscribers.active", "Active")
|
|
93
93
|
]
|
|
94
94
|
});
|
|
95
|
-
if (
|
|
95
|
+
if (A) return /* @__PURE__ */ v("div", {
|
|
96
96
|
className: "flex items-center justify-center h-full",
|
|
97
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ y("div", {
|
|
98
98
|
className: "flex items-center gap-2 text-text-secondary",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ v(m, {
|
|
100
100
|
className: "animate-spin",
|
|
101
101
|
size: 24
|
|
102
|
-
}), /* @__PURE__ */
|
|
102
|
+
}), /* @__PURE__ */ v("span", { children: D("newsletterCommon.loading", "Loading...") })]
|
|
103
103
|
})
|
|
104
104
|
});
|
|
105
|
-
if (!
|
|
106
|
-
if (
|
|
105
|
+
if (!A && j && j.permissionStrings?.length > 0 && !N) return /* @__PURE__ */ v(c, {});
|
|
106
|
+
if (me) return /* @__PURE__ */ v("div", {
|
|
107
107
|
className: "flex items-center justify-center h-full",
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ y("div", {
|
|
109
109
|
className: "flex items-center gap-2 text-text-secondary",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ v(m, {
|
|
111
111
|
className: "animate-spin",
|
|
112
112
|
size: 24
|
|
113
|
-
}), /* @__PURE__ */
|
|
113
|
+
}), /* @__PURE__ */ v("span", { children: D("subscribers.loadingSubscriber", "Loading subscriber...") })]
|
|
114
114
|
})
|
|
115
115
|
});
|
|
116
|
-
if (
|
|
116
|
+
if (G) return /* @__PURE__ */ v("div", {
|
|
117
117
|
className: "flex items-center justify-center h-full p-6",
|
|
118
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ v(E, {
|
|
119
119
|
illustration: "empty-generic",
|
|
120
|
-
title:
|
|
121
|
-
description:
|
|
122
|
-
action: /* @__PURE__ */
|
|
120
|
+
title: D("subscribers.failedLoadSubscriber", "Failed to load subscriber"),
|
|
121
|
+
description: G.message,
|
|
122
|
+
action: /* @__PURE__ */ v(x, {
|
|
123
123
|
type: "button",
|
|
124
124
|
onClick: Y,
|
|
125
|
-
children:
|
|
125
|
+
children: D("subscribers.backToSubscribers", "Back to Subscribers")
|
|
126
126
|
})
|
|
127
127
|
})
|
|
128
128
|
});
|
|
129
|
-
if (!
|
|
129
|
+
if (!W) return /* @__PURE__ */ v("div", {
|
|
130
130
|
className: "flex items-center justify-center h-full p-6",
|
|
131
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ v(E, {
|
|
132
132
|
illustration: "empty-people",
|
|
133
|
-
title:
|
|
134
|
-
description:
|
|
135
|
-
action: /* @__PURE__ */
|
|
133
|
+
title: D("subscribers.subscriberNotFound", "Subscriber not found"),
|
|
134
|
+
description: D("subscribers.subscriberNotFoundDescription", "The subscriber you're looking for doesn't exist or has been deleted."),
|
|
135
|
+
action: /* @__PURE__ */ v(x, {
|
|
136
136
|
type: "button",
|
|
137
137
|
onClick: Y,
|
|
138
|
-
children:
|
|
138
|
+
children: D("subscribers.backToSubscribers", "Back to Subscribers")
|
|
139
139
|
})
|
|
140
140
|
})
|
|
141
141
|
});
|
|
142
|
-
let $ =
|
|
143
|
-
return /* @__PURE__ */
|
|
142
|
+
let $ = W.metadata && typeof W.metadata == "object" ? W.metadata : {};
|
|
143
|
+
return /* @__PURE__ */ y("div", {
|
|
144
144
|
className: "flex flex-col h-full overflow-auto",
|
|
145
145
|
children: [
|
|
146
|
-
|
|
147
|
-
className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-[var(--shadow-pop)] ${
|
|
148
|
-
children: [
|
|
146
|
+
F && /* @__PURE__ */ y("div", {
|
|
147
|
+
className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-[var(--shadow-pop)] ${F.type === "success" ? "bg-status-success-bg-subtle text-status-success-text border border-status-success-border/20" : "bg-status-error-bg-subtle text-status-error-text border border-status-error-border/20"}`,
|
|
148
|
+
children: [F.type === "success" ? /* @__PURE__ */ v(p, { size: 20 }) : /* @__PURE__ */ v(te, { size: 20 }), /* @__PURE__ */ v("span", { children: F.message })]
|
|
149
149
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ y("div", {
|
|
151
151
|
className: "relative overflow-hidden flex items-center justify-between p-6 border-b border-border-seam",
|
|
152
152
|
children: [
|
|
153
|
-
/* @__PURE__ */ b
|
|
154
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ v(b, { intensity: "subtle" }),
|
|
154
|
+
/* @__PURE__ */ y("div", {
|
|
155
155
|
className: "flex items-center gap-4",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ v(x, {
|
|
157
157
|
type: "button",
|
|
158
158
|
variant: "ghost",
|
|
159
159
|
size: "icon",
|
|
160
160
|
onClick: Y,
|
|
161
|
-
"aria-label":
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
-
}), /* @__PURE__ */
|
|
161
|
+
"aria-label": D("subscribers.backToSubscribers", "Back to Subscribers"),
|
|
162
|
+
children: /* @__PURE__ */ v(d, { size: 20 })
|
|
163
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
|
|
164
164
|
className: "text-2xl font-semibold text-text-primary",
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
}), /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ v(T, { children: D("subscribers.subscriberDetails", "Subscriber Details") })
|
|
166
|
+
}), /* @__PURE__ */ v("p", {
|
|
167
167
|
className: "mt-1 text-sm text-text-secondary",
|
|
168
|
-
children:
|
|
168
|
+
children: W.email
|
|
169
169
|
})] })]
|
|
170
170
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ y("div", {
|
|
172
172
|
className: "flex items-center gap-2",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ v(x, {
|
|
174
174
|
type: "button",
|
|
175
175
|
variant: "outline",
|
|
176
176
|
size: "icon",
|
|
177
|
-
onClick: () =>
|
|
178
|
-
title:
|
|
179
|
-
"aria-label":
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
}),
|
|
177
|
+
onClick: () => K(),
|
|
178
|
+
title: D("newsletter.refresh", "Refresh"),
|
|
179
|
+
"aria-label": D("newsletter.refresh", "Refresh"),
|
|
180
|
+
children: /* @__PURE__ */ v(re, { size: 18 })
|
|
181
|
+
}), L ? /* @__PURE__ */ y(oe, { children: [/* @__PURE__ */ v(x, {
|
|
182
182
|
type: "button",
|
|
183
183
|
variant: "outline",
|
|
184
|
-
onClick: () =>
|
|
185
|
-
children:
|
|
186
|
-
}), /* @__PURE__ */ x
|
|
184
|
+
onClick: () => R(!1),
|
|
185
|
+
children: D("newsletter.cancel", "Cancel")
|
|
186
|
+
}), /* @__PURE__ */ y(x, {
|
|
187
187
|
type: "button",
|
|
188
188
|
onClick: Se,
|
|
189
189
|
disabled: q,
|
|
190
|
-
children: [q ? /* @__PURE__ */
|
|
190
|
+
children: [q ? /* @__PURE__ */ v(m, {
|
|
191
191
|
size: 16,
|
|
192
192
|
className: "animate-spin"
|
|
193
|
-
}) : null,
|
|
194
|
-
})] }) : /* @__PURE__ */
|
|
193
|
+
}) : null, D("newsletter.saveChanges", "Save Changes")]
|
|
194
|
+
})] }) : /* @__PURE__ */ v(S, {
|
|
195
195
|
primary: {
|
|
196
|
-
label:
|
|
197
|
-
onSelect: () =>
|
|
196
|
+
label: D("newsletter.edit", "Edit"),
|
|
197
|
+
onSelect: () => R(!0)
|
|
198
198
|
},
|
|
199
|
-
actions: [
|
|
200
|
-
label:
|
|
201
|
-
icon: /* @__PURE__ */
|
|
199
|
+
actions: [W.subscribed ? {
|
|
200
|
+
label: D("subscribers.unsubscribe", "Unsubscribe"),
|
|
201
|
+
icon: /* @__PURE__ */ v(g, { size: 16 }),
|
|
202
202
|
onSelect: () => void X(),
|
|
203
|
-
disabled:
|
|
203
|
+
disabled: ye
|
|
204
204
|
} : {
|
|
205
|
-
label:
|
|
206
|
-
icon: /* @__PURE__ */
|
|
205
|
+
label: D("subscribers.resubscribe", "Resubscribe"),
|
|
206
|
+
icon: /* @__PURE__ */ v(h, { size: 16 }),
|
|
207
207
|
onSelect: () => void Z(),
|
|
208
|
-
disabled:
|
|
209
|
-
}, ...
|
|
210
|
-
label:
|
|
211
|
-
icon: /* @__PURE__ */
|
|
208
|
+
disabled: be
|
|
209
|
+
}, ...P ? [{
|
|
210
|
+
label: D("newsletter.delete", "Delete"),
|
|
211
|
+
icon: /* @__PURE__ */ v(ie, { size: 16 }),
|
|
212
212
|
intent: "destructive",
|
|
213
213
|
onSelect: () => void Ce(),
|
|
214
214
|
disabled: xe
|
|
@@ -217,263 +217,263 @@ function E() {
|
|
|
217
217
|
})
|
|
218
218
|
]
|
|
219
219
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ y("div", {
|
|
221
221
|
className: "p-6 space-y-6",
|
|
222
222
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ v(ce, { children: D("subscribers.detailPurpose", "Everything you know about one subscriber on a single page: their contact details, how they came to be on your list, and how engaged they are with your emails. Use it to keep records accurate, honour unsubscribe requests, or fully erase their data for GDPR — all from one place.") }),
|
|
224
|
+
/* @__PURE__ */ v(se, {
|
|
225
225
|
storageKey: "newsletter-subscriber-detail",
|
|
226
226
|
steps: [
|
|
227
227
|
{
|
|
228
228
|
id: "edit",
|
|
229
|
-
label:
|
|
230
|
-
description:
|
|
231
|
-
icon: /* @__PURE__ */
|
|
232
|
-
onClick: () =>
|
|
229
|
+
label: D("subscribers.nextStepEdit", "Edit their details"),
|
|
230
|
+
description: D("subscribers.nextStepEditDesc", "Fix the email, link a user ID, or update metadata."),
|
|
231
|
+
icon: /* @__PURE__ */ v(h, { size: 16 }),
|
|
232
|
+
onClick: () => R(!0)
|
|
233
233
|
},
|
|
234
|
-
|
|
234
|
+
W.subscribed ? {
|
|
235
235
|
id: "unsubscribe",
|
|
236
|
-
label:
|
|
237
|
-
description:
|
|
238
|
-
icon: /* @__PURE__ */
|
|
236
|
+
label: D("subscribers.nextStepUnsubscribe", "Unsubscribe this person"),
|
|
237
|
+
description: D("subscribers.nextStepUnsubscribeDesc", "Stop sending them newsletters at their request."),
|
|
238
|
+
icon: /* @__PURE__ */ v(g, { size: 16 }),
|
|
239
239
|
onClick: () => void X()
|
|
240
240
|
} : {
|
|
241
241
|
id: "resubscribe",
|
|
242
|
-
label:
|
|
243
|
-
description:
|
|
244
|
-
icon: /* @__PURE__ */
|
|
242
|
+
label: D("subscribers.nextStepResubscribe", "Re-subscribe this person"),
|
|
243
|
+
description: D("subscribers.nextStepResubscribeDesc", "Add them back to your sending list."),
|
|
244
|
+
icon: /* @__PURE__ */ v(h, { size: 16 }),
|
|
245
245
|
onClick: () => void Z()
|
|
246
246
|
},
|
|
247
247
|
{
|
|
248
248
|
id: "back",
|
|
249
|
-
label:
|
|
250
|
-
description:
|
|
251
|
-
icon: /* @__PURE__ */
|
|
249
|
+
label: D("subscribers.nextStepBack", "Back to all subscribers"),
|
|
250
|
+
description: D("subscribers.nextStepBackDesc", "Return to the full list to manage your audience."),
|
|
251
|
+
icon: /* @__PURE__ */ v(d, { size: 16 }),
|
|
252
252
|
onClick: Y
|
|
253
253
|
}
|
|
254
254
|
]
|
|
255
255
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ y(C, {
|
|
257
257
|
className: "p-4",
|
|
258
258
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ v("h2", {
|
|
260
260
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
261
|
-
children:
|
|
261
|
+
children: D("subscribers.profileInformation", "Profile Information")
|
|
262
262
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ y("div", {
|
|
264
264
|
className: "grid grid-cols-2 gap-4",
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
267
267
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
268
|
-
children:
|
|
269
|
-
}),
|
|
268
|
+
children: D("newsletterCommon.email", "Email")
|
|
269
|
+
}), L ? /* @__PURE__ */ v("input", {
|
|
270
270
|
type: "email",
|
|
271
|
-
"aria-label":
|
|
272
|
-
value:
|
|
273
|
-
onChange: (e) =>
|
|
271
|
+
"aria-label": D("newsletterCommon.email", "Email"),
|
|
272
|
+
value: V,
|
|
273
|
+
onChange: (e) => de(e.target.value),
|
|
274
274
|
className: "w-full rounded-lg border border-border-subtle px-3 py-2 text-text-primary"
|
|
275
|
-
}) : /* @__PURE__ */
|
|
275
|
+
}) : /* @__PURE__ */ v("div", {
|
|
276
276
|
className: "text-text-primary",
|
|
277
|
-
children:
|
|
277
|
+
children: W.email
|
|
278
278
|
})] }),
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
280
280
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
281
|
-
children:
|
|
282
|
-
}),
|
|
281
|
+
children: D("subscribers.userId", "User ID")
|
|
282
|
+
}), L ? /* @__PURE__ */ v("input", {
|
|
283
283
|
type: "text",
|
|
284
|
-
"aria-label":
|
|
285
|
-
value:
|
|
286
|
-
onChange: (e) =>
|
|
287
|
-
placeholder:
|
|
284
|
+
"aria-label": D("subscribers.userId", "User ID"),
|
|
285
|
+
value: H,
|
|
286
|
+
onChange: (e) => fe(e.target.value),
|
|
287
|
+
placeholder: D("subscribers.notLinked", "Not linked"),
|
|
288
288
|
className: "w-full rounded-lg border border-border-subtle px-3 py-2 text-text-primary"
|
|
289
|
-
}) : /* @__PURE__ */
|
|
289
|
+
}) : /* @__PURE__ */ v("div", {
|
|
290
290
|
className: "text-text-primary",
|
|
291
|
-
children:
|
|
291
|
+
children: W.userId || /* @__PURE__ */ v("span", {
|
|
292
292
|
className: "text-text-secondary",
|
|
293
|
-
children:
|
|
293
|
+
children: D("subscribers.notLinked", "Not linked")
|
|
294
294
|
})
|
|
295
295
|
})] }),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
297
297
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
298
|
-
children:
|
|
299
|
-
}), we(
|
|
300
|
-
/* @__PURE__ */
|
|
298
|
+
children: D("newsletterCommon.status", "Status")
|
|
299
|
+
}), we(W)] }),
|
|
300
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
301
301
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
302
|
-
children:
|
|
303
|
-
}), /* @__PURE__ */
|
|
302
|
+
children: D("subscribers.subscribedAt", "Subscribed At")
|
|
303
|
+
}), /* @__PURE__ */ v("div", {
|
|
304
304
|
className: "text-text-primary",
|
|
305
|
-
children: Q(
|
|
305
|
+
children: Q(W.subscribedAt)
|
|
306
306
|
})] }),
|
|
307
|
-
|
|
307
|
+
W.unsubscribedAt && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
308
308
|
className: "block text-sm font-medium text-text-secondary mb-1",
|
|
309
|
-
children:
|
|
310
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: D("subscribers.unsubscribedAt", "Unsubscribed At")
|
|
310
|
+
}), /* @__PURE__ */ v("div", {
|
|
311
311
|
className: "text-text-primary",
|
|
312
|
-
children: Q(
|
|
312
|
+
children: Q(W.unsubscribedAt)
|
|
313
313
|
})] })
|
|
314
314
|
]
|
|
315
315
|
}),
|
|
316
|
-
|
|
316
|
+
L && /* @__PURE__ */ y("div", {
|
|
317
317
|
className: "mt-4",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ v("label", {
|
|
319
319
|
className: "mb-1 block text-sm font-medium text-text-secondary",
|
|
320
|
-
children:
|
|
321
|
-
}), /* @__PURE__ */
|
|
322
|
-
"aria-label":
|
|
323
|
-
value:
|
|
324
|
-
onChange: (e) =>
|
|
325
|
-
placeholder:
|
|
320
|
+
children: D("subscribers.metadataJson", "Metadata JSON")
|
|
321
|
+
}), /* @__PURE__ */ v("textarea", {
|
|
322
|
+
"aria-label": D("subscribers.metadataJson", "Metadata JSON"),
|
|
323
|
+
value: U,
|
|
324
|
+
onChange: (e) => pe(e.target.value),
|
|
325
|
+
placeholder: D("subscribers.metadataJsonPlaceholder", "Optional JSON metadata"),
|
|
326
326
|
className: "min-h-32 w-full rounded-lg border border-border-seam px-3 py-2 font-mono text-sm text-text-primary"
|
|
327
327
|
})]
|
|
328
328
|
})
|
|
329
329
|
]
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ y(w, {
|
|
332
332
|
treatment: "insight",
|
|
333
333
|
className: "p-4",
|
|
334
334
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
335
|
+
/* @__PURE__ */ v("h2", {
|
|
336
336
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
337
|
-
children:
|
|
337
|
+
children: D("subscribers.engagementMetrics", "Engagement Metrics")
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ y("div", {
|
|
340
340
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
341
341
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ y(w, {
|
|
343
343
|
treatment: "metric",
|
|
344
344
|
className: "p-4 text-center",
|
|
345
345
|
children: [
|
|
346
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ v(h, {
|
|
347
347
|
size: 24,
|
|
348
348
|
className: "mx-auto text-primary mb-2"
|
|
349
349
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ v("div", {
|
|
351
351
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
352
352
|
children: "-"
|
|
353
353
|
}),
|
|
354
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ v("div", {
|
|
355
355
|
className: "text-sm text-text-secondary",
|
|
356
|
-
children:
|
|
356
|
+
children: D("subscribers.totalSent", "Total Sent")
|
|
357
357
|
})
|
|
358
358
|
]
|
|
359
359
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ y(w, {
|
|
361
361
|
treatment: "metric",
|
|
362
362
|
className: "p-4 text-center",
|
|
363
363
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ v(ae, {
|
|
365
365
|
size: 24,
|
|
366
366
|
className: "mx-auto text-status-success-text mb-2"
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ v("div", {
|
|
369
369
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
370
370
|
children: "-"
|
|
371
371
|
}),
|
|
372
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ v("div", {
|
|
373
373
|
className: "text-sm text-text-secondary",
|
|
374
|
-
children:
|
|
374
|
+
children: D("subscribers.totalOpened", "Total Opened")
|
|
375
375
|
})
|
|
376
376
|
]
|
|
377
377
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ y(w, {
|
|
379
379
|
treatment: "metric",
|
|
380
380
|
className: "p-4 text-center",
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ v(ne, {
|
|
383
383
|
size: 24,
|
|
384
384
|
className: "mx-auto text-accent-purple mb-2"
|
|
385
385
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ v("div", {
|
|
387
387
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
388
388
|
children: "-"
|
|
389
389
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ v("div", {
|
|
391
391
|
className: "text-sm text-text-secondary",
|
|
392
|
-
children:
|
|
392
|
+
children: D("subscribers.totalClicked", "Total Clicked")
|
|
393
393
|
})
|
|
394
394
|
]
|
|
395
395
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ y(w, {
|
|
397
397
|
treatment: "metric",
|
|
398
398
|
className: "p-4 text-center",
|
|
399
399
|
children: [
|
|
400
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ v(f, {
|
|
401
401
|
size: 24,
|
|
402
402
|
className: "mx-auto text-status-warning-text mb-2"
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ v("div", {
|
|
405
405
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
406
406
|
children: "-"
|
|
407
407
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ v("div", {
|
|
409
409
|
className: "text-sm text-text-secondary",
|
|
410
|
-
children:
|
|
410
|
+
children: D("subscribers.lastOpened", "Last Opened")
|
|
411
411
|
})
|
|
412
412
|
]
|
|
413
413
|
})
|
|
414
414
|
]
|
|
415
415
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ v("p", {
|
|
417
417
|
className: "mt-4 text-sm text-text-secondary text-center",
|
|
418
|
-
children:
|
|
418
|
+
children: D("subscribers.engagementTrackingDescription", "Engagement tracking will be available once the subscriber receives campaigns.")
|
|
419
419
|
})
|
|
420
420
|
]
|
|
421
421
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ y(w, {
|
|
423
423
|
treatment: "plain",
|
|
424
424
|
className: "p-4",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
426
426
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
427
|
-
children:
|
|
428
|
-
}), /* @__PURE__ */
|
|
427
|
+
children: D("subscribers.campaignHistory", "Campaign History")
|
|
428
|
+
}), /* @__PURE__ */ v(E, {
|
|
429
429
|
illustration: "empty-notifications",
|
|
430
|
-
title:
|
|
431
|
-
description:
|
|
430
|
+
title: D("subscribers.noCampaignsSentTitle", "No campaigns sent yet"),
|
|
431
|
+
description: D("subscribers.noCampaignsSent", "No campaigns sent to this subscriber yet.")
|
|
432
432
|
})]
|
|
433
433
|
}),
|
|
434
|
-
Object.keys($).length > 0 && /* @__PURE__ */
|
|
434
|
+
Object.keys($).length > 0 && /* @__PURE__ */ y(w, {
|
|
435
435
|
treatment: "plain",
|
|
436
436
|
className: "p-4",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
437
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
438
438
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
439
|
-
children:
|
|
440
|
-
}), /* @__PURE__ */
|
|
439
|
+
children: D("subscribers.customFields", "Custom Fields")
|
|
440
|
+
}), /* @__PURE__ */ v("div", {
|
|
441
441
|
className: "space-y-2",
|
|
442
|
-
children: Object.entries($).map(([e, t]) => /* @__PURE__ */
|
|
442
|
+
children: Object.entries($).map(([e, t]) => /* @__PURE__ */ y("div", {
|
|
443
443
|
className: "flex items-center justify-between py-2 border-b border-border-seam last:border-0",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ v("span", {
|
|
445
445
|
className: "text-sm font-medium text-text-secondary capitalize",
|
|
446
446
|
children: e.replace(/([A-Z])/g, " $1").trim()
|
|
447
|
-
}), /* @__PURE__ */
|
|
447
|
+
}), /* @__PURE__ */ v("span", {
|
|
448
448
|
className: "text-sm text-text-primary",
|
|
449
449
|
children: String(t)
|
|
450
450
|
})]
|
|
451
451
|
}, e))
|
|
452
452
|
})]
|
|
453
453
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ y(w, {
|
|
455
455
|
treatment: "plain",
|
|
456
456
|
className: "p-4",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
458
458
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
459
|
-
children:
|
|
460
|
-
}), /* @__PURE__ */
|
|
459
|
+
children: D("subscribers.tags", "Tags")
|
|
460
|
+
}), /* @__PURE__ */ v(E, {
|
|
461
461
|
illustration: "empty-generic",
|
|
462
|
-
title:
|
|
463
|
-
description:
|
|
462
|
+
title: D("subscribers.noTagsTitle", "No tags yet"),
|
|
463
|
+
description: D("subscribers.noTags", "No tags assigned to this subscriber.")
|
|
464
464
|
})]
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ y("div", {
|
|
467
467
|
className: "border border-status-warning-border/20 bg-status-warning-bg-subtle rounded-lg p-4",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ v("h3", {
|
|
469
469
|
className: "text-sm font-medium text-status-warning-text mb-2",
|
|
470
|
-
children:
|
|
471
|
-
}), /* @__PURE__ */
|
|
470
|
+
children: D("subscribers.gdprCompliance", "GDPR Compliance")
|
|
471
|
+
}), /* @__PURE__ */ y("p", {
|
|
472
472
|
className: "text-sm text-status-warning-text",
|
|
473
473
|
children: [
|
|
474
|
-
|
|
474
|
+
D("subscribers.gdprDeleteDescription", "Deleting this subscriber will permanently remove"),
|
|
475
475
|
" ",
|
|
476
|
-
|
|
476
|
+
D("subscribers.gdprDeleteDescriptionRest", "all associated data including email history, engagement metrics, and custom fields. This action complies with GDPR \"right to be forgotten\" requirements and cannot be undone.")
|
|
477
477
|
]
|
|
478
478
|
})]
|
|
479
479
|
})
|
|
@@ -483,6 +483,6 @@ function E() {
|
|
|
483
483
|
});
|
|
484
484
|
}
|
|
485
485
|
//#endregion
|
|
486
|
-
export {
|
|
486
|
+
export { D as SubscriberDetailPage };
|
|
487
487
|
|
|
488
488
|
//# sourceMappingURL=SubscriberDetailPage.js.map
|