@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.
Files changed (28) hide show
  1. package/dist/newsletter/AdminNewsletterRoot.js +4 -4
  2. package/dist/newsletter/UserNewsletterRoot.js +4 -4
  3. package/dist/newsletter/pages/ABTestingPage.js +23 -23
  4. package/dist/newsletter/pages/ABTestingPage.js.map +1 -1
  5. package/dist/newsletter/pages/AnalyticsDashboardPage.js +95 -97
  6. package/dist/newsletter/pages/AnalyticsDashboardPage.js.map +1 -1
  7. package/dist/newsletter/pages/CampaignAnalyticsPage.js +3 -3
  8. package/dist/newsletter/pages/CampaignEditorPage.js +297 -300
  9. package/dist/newsletter/pages/CampaignEditorPage.js.map +1 -1
  10. package/dist/newsletter/pages/CampaignsListPage.js +14 -14
  11. package/dist/newsletter/pages/CompliancePage.js +175 -184
  12. package/dist/newsletter/pages/CompliancePage.js.map +1 -1
  13. package/dist/newsletter/pages/SchedulerPage.js +3 -3
  14. package/dist/newsletter/pages/SubscriberDetailPage.js +222 -222
  15. package/dist/newsletter/pages/SubscriberDetailPage.js.map +1 -1
  16. package/dist/newsletter/pages/SubscribersListPage.js +279 -282
  17. package/dist/newsletter/pages/SubscribersListPage.js.map +1 -1
  18. package/dist/newsletter/pages/TemplateEditorPage.js +3 -3
  19. package/dist/newsletter/pages/TemplateLibraryPage.js +109 -112
  20. package/dist/newsletter/pages/TemplateLibraryPage.js.map +1 -1
  21. package/dist/newsletter/pages/WaitlistDetailPage.js +3 -3
  22. package/dist/newsletter/pages/WaitlistListPage.js +139 -139
  23. package/dist/newsletter/pages/WaitlistListPage.js.map +1 -1
  24. package/dist/newsletter/providers/NewsletterProvider.js +47 -46
  25. package/dist/newsletter/providers/NewsletterProvider.js.map +1 -1
  26. package/dist/newsletter/shared/hooks/useTr.js +3 -3
  27. package/dist/newsletter/shared/hooks/useTr.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,76 +1,76 @@
1
1
  import { useSubscriber as e, useSubscriberMutations as t } from "../hooks/useNewsletterOperations.js";
2
- import { useNewsletter as n } from "../providers/NewsletterProvider.js";
3
- import { NEWSLETTER_PERMISSIONS as r } from "../constants/permissions.js";
4
- import { useTr as i } from "../shared/hooks/useTr.js";
5
- import { nativeConfirm as ee, nativeNotify as a } from "../../utils/nativeBridge.js";
6
- import { useEffect as o, useState as s } from "react";
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 te } from "react-router";
9
- import { AlertCircle as ne, ArrowLeft as u, Calendar as re, CheckCircle as ie, Loader2 as d, Mail as f, MailX as p, MousePointer as m, RefreshCw as h, Trash2 as g, TrendingUp as _ } from "lucide-react";
10
- import { usePermissions as v } from "@burdenoff/fe-libs/shared/providers/shell";
11
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
12
- import { AuroraBackground as S, Button as C, CTAOverflowMenu as ae, EmphasisPanel as oe, GlassCard as w, GradientText as se, IllustratedEmptyState as T, NextSteps as ce, PagePurpose as le } from "@burdenoff/fe-libs/ui";
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 E() {
15
- let E = i(), { subscriberId: ue } = te(), de = l(), { productId: D } = n(), { hasPermission: O, isLoading: k, permissions: A } = v(), j = (Array.isArray(A) ? A : A?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:subscribers:")), M = j ? O(r.SUBSCRIBER_READ) : !0, N = j ? O(r.SUBSCRIBER_DELETE) : !0, [P, F] = s(null), [I, L] = s(!1), [R, z] = s({
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: B, userId: V, metadata: H } = R, fe = (e) => z((t) => ({
19
+ }), { email: V, userId: H, metadata: U } = z, de = (e) => B((t) => ({
20
20
  ...t,
21
21
  email: e
22
- })), pe = (e) => z((t) => ({
22
+ })), fe = (e) => B((t) => ({
23
23
  ...t,
24
24
  userId: e
25
- })), me = (e) => z((t) => ({
25
+ })), pe = (e) => B((t) => ({
26
26
  ...t,
27
27
  metadata: e
28
- })), { subscriber: U, loading: he, error: W, refetch: G } = e(ue || ""), { unsubscribeFromProduct: ge, resubscribeToProduct: _e, updateSubscriber: ve, deleteSubscriber: ye, unsubscribing: be, resubscribing: K, updatingSubscriber: q, deletingSubscriber: xe } = t();
29
- o(() => {
30
- U && z({
31
- email: U.email,
32
- userId: U.userId || "",
33
- metadata: U.metadata ? JSON.stringify(U.metadata, null, 2) : ""
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
- }, [U]);
35
+ }, [W]);
36
36
  let J = (e, t) => {
37
- F({
37
+ I({
38
38
  type: e,
39
39
  message: t
40
- }), setTimeout(() => F(null), 5e3);
40
+ }), setTimeout(() => I(null), 5e3);
41
41
  }, Y = () => {
42
- de("../subscribers");
42
+ ue("../subscribers");
43
43
  }, X = async () => {
44
- if (U && confirm(`${E("subscribers.confirmUnsubscribePrefix", "Are you sure you want to unsubscribe")} ${U.email}?`)) try {
45
- await ge(U.email, D), J("success", `${U.email} ${E("subscribers.unsubscribedSuffix", "unsubscribed")}`), G();
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", `${E("subscribers.failedToUnsubscribe", "Failed to unsubscribe")}: ${e instanceof Error ? e.message : E("newsletter.unknownError", "Unknown 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 (U) try {
51
- await _e(U.email, D), J("success", `${U.email} ${E("subscribers.resubscribedSuffix", "resubscribed")}`), G();
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", `${E("subscribers.failedToResubscribe", "Failed to resubscribe")}: ${e instanceof Error ? e.message : E("newsletter.unknownError", "Unknown 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 (U) try {
57
- let e = H.trim() ? JSON.parse(H) : void 0;
58
- await ve(U.id, {
59
- email: B.trim(),
60
- userId: V.trim() || void 0,
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", E("subscribers.updatedSuccessfully", "Subscriber updated successfully")), L(!1), G();
62
+ }), J("success", D("subscribers.updatedSuccessfully", "Subscriber updated successfully")), R(!1), K();
63
63
  } catch (e) {
64
- J("error", `${E("subscribers.failedToUpdateSubscriber", "Failed to update subscriber")}: ${e instanceof Error ? e.message : E("newsletter.unknownError", "Unknown 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 (U && await ee({
68
- title: E("subscribers.deleteSubscriber", "Delete Subscriber"),
69
- message: `${E("subscribers.confirmDeletePrefix", "Are you sure you want to delete")} ${U.email}? ${E("subscribers.gdprDeleteWarning", "This action cannot be undone and will remove all associated data (GDPR compliant).")}`
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 ye(U.id), a("success"), J("success", `${U.email} ${E("newsletter.deletedSuffix", "deleted")}`), setTimeout(() => Y(), 1500);
71
+ await ve(W.id), o("success"), J("success", `${W.email} ${D("newsletter.deletedSuffix", "deleted")}`), setTimeout(() => Y(), 1500);
72
72
  } catch (e) {
73
- a("error"), J("error", `${E("templates.failedToDelete", "Failed to delete")}: ${e instanceof Error ? e.message : E("newsletter.unknownError", "Unknown error")}`);
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
- }) : E("subscribers.never", "Never"), we = (e) => !e.subscribed || e.status === "UNSUBSCRIBED" ? /* @__PURE__ */ x("span", {
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__ */ b(p, { size: 12 }), E("subscribers.unsubscribed", "Unsubscribed")]
84
- }) : e.status === "PAUSED" ? /* @__PURE__ */ b("span", {
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: E("subscribers.paused", "Paused")
87
- }) : /* @__PURE__ */ x("span", {
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__ */ b("span", { className: "size-1.5 rounded-full bg-status-success-text motion-safe:animate-vc-glow-pulse" }),
91
- /* @__PURE__ */ b(f, { size: 12 }),
92
- E("subscribers.active", "Active")
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 (k) return /* @__PURE__ */ b("div", {
95
+ if (A) return /* @__PURE__ */ v("div", {
96
96
  className: "flex items-center justify-center h-full",
97
- children: /* @__PURE__ */ x("div", {
97
+ children: /* @__PURE__ */ y("div", {
98
98
  className: "flex items-center gap-2 text-text-secondary",
99
- children: [/* @__PURE__ */ b(d, {
99
+ children: [/* @__PURE__ */ v(m, {
100
100
  className: "animate-spin",
101
101
  size: 24
102
- }), /* @__PURE__ */ b("span", { children: E("newsletterCommon.loading", "Loading...") })]
102
+ }), /* @__PURE__ */ v("span", { children: D("newsletterCommon.loading", "Loading...") })]
103
103
  })
104
104
  });
105
- if (!k && A && A.permissionStrings?.length > 0 && !M) return /* @__PURE__ */ b(c, {});
106
- if (he) return /* @__PURE__ */ b("div", {
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__ */ x("div", {
108
+ children: /* @__PURE__ */ y("div", {
109
109
  className: "flex items-center gap-2 text-text-secondary",
110
- children: [/* @__PURE__ */ b(d, {
110
+ children: [/* @__PURE__ */ v(m, {
111
111
  className: "animate-spin",
112
112
  size: 24
113
- }), /* @__PURE__ */ b("span", { children: E("subscribers.loadingSubscriber", "Loading subscriber...") })]
113
+ }), /* @__PURE__ */ v("span", { children: D("subscribers.loadingSubscriber", "Loading subscriber...") })]
114
114
  })
115
115
  });
116
- if (W) return /* @__PURE__ */ b("div", {
116
+ if (G) return /* @__PURE__ */ v("div", {
117
117
  className: "flex items-center justify-center h-full p-6",
118
- children: /* @__PURE__ */ b(T, {
118
+ children: /* @__PURE__ */ v(E, {
119
119
  illustration: "empty-generic",
120
- title: E("subscribers.failedLoadSubscriber", "Failed to load subscriber"),
121
- description: W.message,
122
- action: /* @__PURE__ */ b(C, {
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: E("subscribers.backToSubscribers", "Back to Subscribers")
125
+ children: D("subscribers.backToSubscribers", "Back to Subscribers")
126
126
  })
127
127
  })
128
128
  });
129
- if (!U) return /* @__PURE__ */ b("div", {
129
+ if (!W) return /* @__PURE__ */ v("div", {
130
130
  className: "flex items-center justify-center h-full p-6",
131
- children: /* @__PURE__ */ b(T, {
131
+ children: /* @__PURE__ */ v(E, {
132
132
  illustration: "empty-people",
133
- title: E("subscribers.subscriberNotFound", "Subscriber not found"),
134
- description: E("subscribers.subscriberNotFoundDescription", "The subscriber you're looking for doesn't exist or has been deleted."),
135
- action: /* @__PURE__ */ b(C, {
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: E("subscribers.backToSubscribers", "Back to Subscribers")
138
+ children: D("subscribers.backToSubscribers", "Back to Subscribers")
139
139
  })
140
140
  })
141
141
  });
142
- let $ = U.metadata && typeof U.metadata == "object" ? U.metadata : {};
143
- return /* @__PURE__ */ x("div", {
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
- P && /* @__PURE__ */ x("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)] ${P.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: [P.type === "success" ? /* @__PURE__ */ b(ie, { size: 20 }) : /* @__PURE__ */ b(ne, { size: 20 }), /* @__PURE__ */ b("span", { children: P.message })]
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__ */ x("div", {
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(S, { intensity: "subtle" }),
154
- /* @__PURE__ */ x("div", {
153
+ /* @__PURE__ */ v(b, { intensity: "subtle" }),
154
+ /* @__PURE__ */ y("div", {
155
155
  className: "flex items-center gap-4",
156
- children: [/* @__PURE__ */ b(C, {
156
+ children: [/* @__PURE__ */ v(x, {
157
157
  type: "button",
158
158
  variant: "ghost",
159
159
  size: "icon",
160
160
  onClick: Y,
161
- "aria-label": E("subscribers.backToSubscribers", "Back to Subscribers"),
162
- children: /* @__PURE__ */ b(u, { size: 20 })
163
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("h1", {
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__ */ b(se, { children: E("subscribers.subscriberDetails", "Subscriber Details") })
166
- }), /* @__PURE__ */ b("p", {
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: U.email
168
+ children: W.email
169
169
  })] })]
170
170
  }),
171
- /* @__PURE__ */ x("div", {
171
+ /* @__PURE__ */ y("div", {
172
172
  className: "flex items-center gap-2",
173
- children: [/* @__PURE__ */ b(C, {
173
+ children: [/* @__PURE__ */ v(x, {
174
174
  type: "button",
175
175
  variant: "outline",
176
176
  size: "icon",
177
- onClick: () => G(),
178
- title: E("newsletter.refresh", "Refresh"),
179
- "aria-label": E("newsletter.refresh", "Refresh"),
180
- children: /* @__PURE__ */ b(h, { size: 18 })
181
- }), I ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(C, {
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: () => L(!1),
185
- children: E("newsletter.cancel", "Cancel")
186
- }), /* @__PURE__ */ x(C, {
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__ */ b(d, {
190
+ children: [q ? /* @__PURE__ */ v(m, {
191
191
  size: 16,
192
192
  className: "animate-spin"
193
- }) : null, E("newsletter.saveChanges", "Save Changes")]
194
- })] }) : /* @__PURE__ */ b(ae, {
193
+ }) : null, D("newsletter.saveChanges", "Save Changes")]
194
+ })] }) : /* @__PURE__ */ v(S, {
195
195
  primary: {
196
- label: E("newsletter.edit", "Edit"),
197
- onSelect: () => L(!0)
196
+ label: D("newsletter.edit", "Edit"),
197
+ onSelect: () => R(!0)
198
198
  },
199
- actions: [U.subscribed ? {
200
- label: E("subscribers.unsubscribe", "Unsubscribe"),
201
- icon: /* @__PURE__ */ b(p, { size: 16 }),
199
+ actions: [W.subscribed ? {
200
+ label: D("subscribers.unsubscribe", "Unsubscribe"),
201
+ icon: /* @__PURE__ */ v(g, { size: 16 }),
202
202
  onSelect: () => void X(),
203
- disabled: be
203
+ disabled: ye
204
204
  } : {
205
- label: E("subscribers.resubscribe", "Resubscribe"),
206
- icon: /* @__PURE__ */ b(f, { size: 16 }),
205
+ label: D("subscribers.resubscribe", "Resubscribe"),
206
+ icon: /* @__PURE__ */ v(h, { size: 16 }),
207
207
  onSelect: () => void Z(),
208
- disabled: K
209
- }, ...N ? [{
210
- label: E("newsletter.delete", "Delete"),
211
- icon: /* @__PURE__ */ b(g, { size: 16 }),
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__ */ x("div", {
220
+ /* @__PURE__ */ y("div", {
221
221
  className: "p-6 space-y-6",
222
222
  children: [
223
- /* @__PURE__ */ b(le, { children: E("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__ */ b(ce, {
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: E("subscribers.nextStepEdit", "Edit their details"),
230
- description: E("subscribers.nextStepEditDesc", "Fix the email, link a user ID, or update metadata."),
231
- icon: /* @__PURE__ */ b(f, { size: 16 }),
232
- onClick: () => L(!0)
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
- U.subscribed ? {
234
+ W.subscribed ? {
235
235
  id: "unsubscribe",
236
- label: E("subscribers.nextStepUnsubscribe", "Unsubscribe this person"),
237
- description: E("subscribers.nextStepUnsubscribeDesc", "Stop sending them newsletters at their request."),
238
- icon: /* @__PURE__ */ b(p, { size: 16 }),
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: E("subscribers.nextStepResubscribe", "Re-subscribe this person"),
243
- description: E("subscribers.nextStepResubscribeDesc", "Add them back to your sending list."),
244
- icon: /* @__PURE__ */ b(f, { size: 16 }),
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: E("subscribers.nextStepBack", "Back to all subscribers"),
250
- description: E("subscribers.nextStepBackDesc", "Return to the full list to manage your audience."),
251
- icon: /* @__PURE__ */ b(u, { size: 16 }),
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__ */ x(oe, {
256
+ /* @__PURE__ */ y(C, {
257
257
  className: "p-4",
258
258
  children: [
259
- /* @__PURE__ */ b("h2", {
259
+ /* @__PURE__ */ v("h2", {
260
260
  className: "text-lg font-medium text-text-primary mb-4",
261
- children: E("subscribers.profileInformation", "Profile Information")
261
+ children: D("subscribers.profileInformation", "Profile Information")
262
262
  }),
263
- /* @__PURE__ */ x("div", {
263
+ /* @__PURE__ */ y("div", {
264
264
  className: "grid grid-cols-2 gap-4",
265
265
  children: [
266
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
266
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
267
267
  className: "block text-sm font-medium text-text-secondary mb-1",
268
- children: E("newsletterCommon.email", "Email")
269
- }), I ? /* @__PURE__ */ b("input", {
268
+ children: D("newsletterCommon.email", "Email")
269
+ }), L ? /* @__PURE__ */ v("input", {
270
270
  type: "email",
271
- "aria-label": E("newsletterCommon.email", "Email"),
272
- value: B,
273
- onChange: (e) => fe(e.target.value),
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__ */ b("div", {
275
+ }) : /* @__PURE__ */ v("div", {
276
276
  className: "text-text-primary",
277
- children: U.email
277
+ children: W.email
278
278
  })] }),
279
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
279
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
280
280
  className: "block text-sm font-medium text-text-secondary mb-1",
281
- children: E("subscribers.userId", "User ID")
282
- }), I ? /* @__PURE__ */ b("input", {
281
+ children: D("subscribers.userId", "User ID")
282
+ }), L ? /* @__PURE__ */ v("input", {
283
283
  type: "text",
284
- "aria-label": E("subscribers.userId", "User ID"),
285
- value: V,
286
- onChange: (e) => pe(e.target.value),
287
- placeholder: E("subscribers.notLinked", "Not linked"),
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__ */ b("div", {
289
+ }) : /* @__PURE__ */ v("div", {
290
290
  className: "text-text-primary",
291
- children: U.userId || /* @__PURE__ */ b("span", {
291
+ children: W.userId || /* @__PURE__ */ v("span", {
292
292
  className: "text-text-secondary",
293
- children: E("subscribers.notLinked", "Not linked")
293
+ children: D("subscribers.notLinked", "Not linked")
294
294
  })
295
295
  })] }),
296
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
296
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
297
297
  className: "block text-sm font-medium text-text-secondary mb-1",
298
- children: E("newsletterCommon.status", "Status")
299
- }), we(U)] }),
300
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
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: E("subscribers.subscribedAt", "Subscribed At")
303
- }), /* @__PURE__ */ b("div", {
302
+ children: D("subscribers.subscribedAt", "Subscribed At")
303
+ }), /* @__PURE__ */ v("div", {
304
304
  className: "text-text-primary",
305
- children: Q(U.subscribedAt)
305
+ children: Q(W.subscribedAt)
306
306
  })] }),
307
- U.unsubscribedAt && /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
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: E("subscribers.unsubscribedAt", "Unsubscribed At")
310
- }), /* @__PURE__ */ b("div", {
309
+ children: D("subscribers.unsubscribedAt", "Unsubscribed At")
310
+ }), /* @__PURE__ */ v("div", {
311
311
  className: "text-text-primary",
312
- children: Q(U.unsubscribedAt)
312
+ children: Q(W.unsubscribedAt)
313
313
  })] })
314
314
  ]
315
315
  }),
316
- I && /* @__PURE__ */ x("div", {
316
+ L && /* @__PURE__ */ y("div", {
317
317
  className: "mt-4",
318
- children: [/* @__PURE__ */ b("label", {
318
+ children: [/* @__PURE__ */ v("label", {
319
319
  className: "mb-1 block text-sm font-medium text-text-secondary",
320
- children: E("subscribers.metadataJson", "Metadata JSON")
321
- }), /* @__PURE__ */ b("textarea", {
322
- "aria-label": E("subscribers.metadataJson", "Metadata JSON"),
323
- value: H,
324
- onChange: (e) => me(e.target.value),
325
- placeholder: E("subscribers.metadataJsonPlaceholder", "Optional JSON metadata"),
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__ */ x(w, {
331
+ /* @__PURE__ */ y(w, {
332
332
  treatment: "insight",
333
333
  className: "p-4",
334
334
  children: [
335
- /* @__PURE__ */ b("h2", {
335
+ /* @__PURE__ */ v("h2", {
336
336
  className: "text-lg font-medium text-text-primary mb-4",
337
- children: E("subscribers.engagementMetrics", "Engagement Metrics")
337
+ children: D("subscribers.engagementMetrics", "Engagement Metrics")
338
338
  }),
339
- /* @__PURE__ */ x("div", {
339
+ /* @__PURE__ */ y("div", {
340
340
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
341
341
  children: [
342
- /* @__PURE__ */ x(w, {
342
+ /* @__PURE__ */ y(w, {
343
343
  treatment: "metric",
344
344
  className: "p-4 text-center",
345
345
  children: [
346
- /* @__PURE__ */ b(f, {
346
+ /* @__PURE__ */ v(h, {
347
347
  size: 24,
348
348
  className: "mx-auto text-primary mb-2"
349
349
  }),
350
- /* @__PURE__ */ b("div", {
350
+ /* @__PURE__ */ v("div", {
351
351
  className: "text-2xl font-bold text-text-primary tabular-nums",
352
352
  children: "-"
353
353
  }),
354
- /* @__PURE__ */ b("div", {
354
+ /* @__PURE__ */ v("div", {
355
355
  className: "text-sm text-text-secondary",
356
- children: E("subscribers.totalSent", "Total Sent")
356
+ children: D("subscribers.totalSent", "Total Sent")
357
357
  })
358
358
  ]
359
359
  }),
360
- /* @__PURE__ */ x(w, {
360
+ /* @__PURE__ */ y(w, {
361
361
  treatment: "metric",
362
362
  className: "p-4 text-center",
363
363
  children: [
364
- /* @__PURE__ */ b(_, {
364
+ /* @__PURE__ */ v(ae, {
365
365
  size: 24,
366
366
  className: "mx-auto text-status-success-text mb-2"
367
367
  }),
368
- /* @__PURE__ */ b("div", {
368
+ /* @__PURE__ */ v("div", {
369
369
  className: "text-2xl font-bold text-text-primary tabular-nums",
370
370
  children: "-"
371
371
  }),
372
- /* @__PURE__ */ b("div", {
372
+ /* @__PURE__ */ v("div", {
373
373
  className: "text-sm text-text-secondary",
374
- children: E("subscribers.totalOpened", "Total Opened")
374
+ children: D("subscribers.totalOpened", "Total Opened")
375
375
  })
376
376
  ]
377
377
  }),
378
- /* @__PURE__ */ x(w, {
378
+ /* @__PURE__ */ y(w, {
379
379
  treatment: "metric",
380
380
  className: "p-4 text-center",
381
381
  children: [
382
- /* @__PURE__ */ b(m, {
382
+ /* @__PURE__ */ v(ne, {
383
383
  size: 24,
384
384
  className: "mx-auto text-accent-purple mb-2"
385
385
  }),
386
- /* @__PURE__ */ b("div", {
386
+ /* @__PURE__ */ v("div", {
387
387
  className: "text-2xl font-bold text-text-primary tabular-nums",
388
388
  children: "-"
389
389
  }),
390
- /* @__PURE__ */ b("div", {
390
+ /* @__PURE__ */ v("div", {
391
391
  className: "text-sm text-text-secondary",
392
- children: E("subscribers.totalClicked", "Total Clicked")
392
+ children: D("subscribers.totalClicked", "Total Clicked")
393
393
  })
394
394
  ]
395
395
  }),
396
- /* @__PURE__ */ x(w, {
396
+ /* @__PURE__ */ y(w, {
397
397
  treatment: "metric",
398
398
  className: "p-4 text-center",
399
399
  children: [
400
- /* @__PURE__ */ b(re, {
400
+ /* @__PURE__ */ v(f, {
401
401
  size: 24,
402
402
  className: "mx-auto text-status-warning-text mb-2"
403
403
  }),
404
- /* @__PURE__ */ b("div", {
404
+ /* @__PURE__ */ v("div", {
405
405
  className: "text-2xl font-bold text-text-primary tabular-nums",
406
406
  children: "-"
407
407
  }),
408
- /* @__PURE__ */ b("div", {
408
+ /* @__PURE__ */ v("div", {
409
409
  className: "text-sm text-text-secondary",
410
- children: E("subscribers.lastOpened", "Last Opened")
410
+ children: D("subscribers.lastOpened", "Last Opened")
411
411
  })
412
412
  ]
413
413
  })
414
414
  ]
415
415
  }),
416
- /* @__PURE__ */ b("p", {
416
+ /* @__PURE__ */ v("p", {
417
417
  className: "mt-4 text-sm text-text-secondary text-center",
418
- children: E("subscribers.engagementTrackingDescription", "Engagement tracking will be available once the subscriber receives campaigns.")
418
+ children: D("subscribers.engagementTrackingDescription", "Engagement tracking will be available once the subscriber receives campaigns.")
419
419
  })
420
420
  ]
421
421
  }),
422
- /* @__PURE__ */ x(w, {
422
+ /* @__PURE__ */ y(w, {
423
423
  treatment: "plain",
424
424
  className: "p-4",
425
- children: [/* @__PURE__ */ b("h2", {
425
+ children: [/* @__PURE__ */ v("h2", {
426
426
  className: "text-lg font-medium text-text-primary mb-4",
427
- children: E("subscribers.campaignHistory", "Campaign History")
428
- }), /* @__PURE__ */ b(T, {
427
+ children: D("subscribers.campaignHistory", "Campaign History")
428
+ }), /* @__PURE__ */ v(E, {
429
429
  illustration: "empty-notifications",
430
- title: E("subscribers.noCampaignsSentTitle", "No campaigns sent yet"),
431
- description: E("subscribers.noCampaignsSent", "No campaigns sent to this subscriber yet.")
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__ */ x(w, {
434
+ Object.keys($).length > 0 && /* @__PURE__ */ y(w, {
435
435
  treatment: "plain",
436
436
  className: "p-4",
437
- children: [/* @__PURE__ */ b("h2", {
437
+ children: [/* @__PURE__ */ v("h2", {
438
438
  className: "text-lg font-medium text-text-primary mb-4",
439
- children: E("subscribers.customFields", "Custom Fields")
440
- }), /* @__PURE__ */ b("div", {
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__ */ x("div", {
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__ */ b("span", {
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__ */ b("span", {
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__ */ x(w, {
454
+ /* @__PURE__ */ y(w, {
455
455
  treatment: "plain",
456
456
  className: "p-4",
457
- children: [/* @__PURE__ */ b("h2", {
457
+ children: [/* @__PURE__ */ v("h2", {
458
458
  className: "text-lg font-medium text-text-primary mb-4",
459
- children: E("subscribers.tags", "Tags")
460
- }), /* @__PURE__ */ b(T, {
459
+ children: D("subscribers.tags", "Tags")
460
+ }), /* @__PURE__ */ v(E, {
461
461
  illustration: "empty-generic",
462
- title: E("subscribers.noTagsTitle", "No tags yet"),
463
- description: E("subscribers.noTags", "No tags assigned to this subscriber.")
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__ */ x("div", {
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__ */ b("h3", {
468
+ children: [/* @__PURE__ */ v("h3", {
469
469
  className: "text-sm font-medium text-status-warning-text mb-2",
470
- children: E("subscribers.gdprCompliance", "GDPR Compliance")
471
- }), /* @__PURE__ */ x("p", {
470
+ children: D("subscribers.gdprCompliance", "GDPR Compliance")
471
+ }), /* @__PURE__ */ y("p", {
472
472
  className: "text-sm text-status-warning-text",
473
473
  children: [
474
- E("subscribers.gdprDeleteDescription", "Deleting this subscriber will permanently remove"),
474
+ D("subscribers.gdprDeleteDescription", "Deleting this subscriber will permanently remove"),
475
475
  " ",
476
- E("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.")
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 { E as SubscriberDetailPage };
486
+ export { D as SubscriberDetailPage };
487
487
 
488
488
  //# sourceMappingURL=SubscriberDetailPage.js.map