@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,60 +1,58 @@
1
1
  import { useNewsletterStats as e, useNewsletters as t, useSubscribers as n } from "../hooks/useNewsletterOperations.js";
2
- import { NEWSLETTER_PERMISSIONS as r } from "../constants/permissions.js";
3
- import { useCallback as i, useState as a } from "react";
2
+ import { useTr as r } from "../shared/hooks/useTr.js";
3
+ import { NEWSLETTER_PERMISSIONS as i } from "../constants/permissions.js";
4
+ import { useState as a } from "react";
4
5
  import { AccessDenied as o } from "@burdenoff/fe-libs/shared/components";
5
- import { useNavigate as s } from "react-router";
6
- import { AlertCircle as c, BarChart3 as l, Calendar as u, ChevronRight as d, Loader2 as f, Mail as p, MousePointer as m, RefreshCw as ee, TrendingUp as h, Users as g } from "lucide-react";
7
- import { usePermissions as _ } from "@burdenoff/fe-libs/shared/providers/shell";
6
+ import { useNavigate as ee } from "react-router";
7
+ import { AlertCircle as s, BarChart3 as c, Calendar as l, ChevronRight as u, Loader2 as d, Mail as f, MousePointer as p, RefreshCw as m, TrendingUp as h, Users as g } from "lucide-react";
8
+ import { usePermissions as te } from "@burdenoff/fe-libs/shared/providers/shell";
9
+ import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
10
  import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
9
- import { AuroraBackground as x, Button as S, EmphasisPanel as C, GlassCard as w, GradientText as T, IllustratedEmptyState as E, NextSteps as te, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
10
- import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
+ import { AuroraBackground as x, Button as S, EmphasisPanel as C, GlassCard as w, GradientText as T, IllustratedEmptyState as E, NextSteps as ne, PagePurpose as re } from "@burdenoff/fe-libs/ui";
11
12
  //#region src/newsletter/pages/AnalyticsDashboardPage.tsx
12
13
  function D() {
13
- let D = s(), { hasPermission: O, isLoading: k, permissions: A } = _(), { t: j, locale: M } = re(), N = i((e, t) => {
14
- let n = j(e);
15
- return n === e ? t : n;
16
- }, [j]), [P, F] = a("30d"), I = (Array.isArray(A) ? A : A?.permissionStrings)?.some?.((e) => e.startsWith("newsletter-analytics:")) ? O(r.ANALYTICS_VIEW) : !0, { stats: L, loading: R, error: z } = e(), { newsletters: B, loading: V, error: H, refetch: U } = t({ status: "SENT" }, 10), { totalCount: W, loading: G } = n({
14
+ let D = ee(), { hasPermission: O, isLoading: k, permissions: A } = te(), { locale: j } = _(), M = r(), [N, P] = a("30d"), F = (Array.isArray(A) ? A : A?.permissionStrings)?.some?.((e) => e.startsWith("newsletter-analytics:")) ? O(i.ANALYTICS_VIEW) : !0, { stats: I, loading: L, error: R } = e(), { newsletters: z, loading: B, error: V, refetch: H } = t({ status: "SENT" }, 10), { totalCount: U, loading: W } = n({
17
15
  subscribed: !0,
18
16
  limit: 1
19
- }), K = R || V || G, q = z || H, J = () => {
20
- U();
21
- }, Y = (e) => {
17
+ }), G = L || B || W, K = R || V, q = () => {
18
+ H();
19
+ }, J = (e) => {
22
20
  D(`../campaigns/${e}/analytics`);
23
- }, ie = (e) => new Date(e).toLocaleDateString(M || "en-US", {
21
+ }, Y = (e) => new Date(e).toLocaleDateString(j || "en-US", {
24
22
  month: "short",
25
23
  day: "numeric"
26
- }), ae = (e) => {
24
+ }), ie = (e) => {
27
25
  let t = /* @__PURE__ */ new Date(), n = new Date(e), r = t.getTime() - n.getTime(), i = Math.floor(r / (1e3 * 60 * 60 * 24)), a = Math.floor(r / (1e3 * 60 * 60));
28
- return i > 0 ? `${i} ${i > 1 ? N("newsletter.daysAgo", "days ago") : N("newsletter.dayAgo", "day ago")}` : a > 0 ? `${a} ${a > 1 ? N("newsletter.hoursAgo", "hours ago") : N("newsletter.hourAgo", "hour ago")}` : N("newsletter.justNow", "Just now");
29
- }, X = B.filter((e) => e.status === "SENT"), oe = X.reduce((e, t) => e + (t.recipientCount || 0), 0), Z = L?.averageOpenRate || 0, Q = L?.averageClickRate || 0, $ = X.toSorted((e, t) => (t.openRate || 0) - (e.openRate || 0)).slice(0, 5);
26
+ return i > 0 ? `${i} ${i > 1 ? M("newsletter.daysAgo", "days ago") : M("newsletter.dayAgo", "day ago")}` : a > 0 ? `${a} ${a > 1 ? M("newsletter.hoursAgo", "hours ago") : M("newsletter.hourAgo", "hour ago")}` : M("newsletter.justNow", "Just now");
27
+ }, X = z.filter((e) => e.status === "SENT"), ae = X.reduce((e, t) => e + (t.recipientCount || 0), 0), Z = I?.averageOpenRate || 0, Q = I?.averageClickRate || 0, $ = X.toSorted((e, t) => (t.openRate || 0) - (e.openRate || 0)).slice(0, 5);
30
28
  return k ? /* @__PURE__ */ y("div", {
31
29
  className: "flex items-center justify-center h-full",
32
30
  children: /* @__PURE__ */ b("div", {
33
31
  className: "flex items-center gap-2 text-text-secondary",
34
- children: [/* @__PURE__ */ y(f, {
32
+ children: [/* @__PURE__ */ y(d, {
35
33
  className: "animate-spin",
36
34
  size: 24
37
- }), /* @__PURE__ */ y("span", { children: N("newsletterCommon.loading", "Loading...") })]
35
+ }), /* @__PURE__ */ y("span", { children: M("newsletterCommon.loading", "Loading...") })]
38
36
  })
39
- }) : !k && A && A.permissionStrings?.length > 0 && !I ? /* @__PURE__ */ y(o, {}) : q ? /* @__PURE__ */ b("div", {
37
+ }) : !k && A && A.permissionStrings?.length > 0 && !F ? /* @__PURE__ */ y(o, {}) : K ? /* @__PURE__ */ b("div", {
40
38
  className: "flex flex-col items-center justify-center h-full text-center",
41
39
  children: [
42
- /* @__PURE__ */ y(c, {
40
+ /* @__PURE__ */ y(s, {
43
41
  size: 48,
44
42
  className: "text-status-error-text mb-4"
45
43
  }),
46
44
  /* @__PURE__ */ y("h2", {
47
45
  className: "text-xl font-semibold text-text-primary mb-2",
48
- children: N("analytics.failedLoadAnalytics", "Failed to load analytics")
46
+ children: M("analytics.failedLoadAnalytics", "Failed to load analytics")
49
47
  }),
50
48
  /* @__PURE__ */ y("p", {
51
49
  className: "text-text-secondary mb-4",
52
- children: q.message
50
+ children: K.message
53
51
  }),
54
52
  /* @__PURE__ */ y(S, {
55
53
  type: "button",
56
- onClick: J,
57
- children: N("newsletterCommon.tryAgain", "Try Again")
54
+ onClick: q,
55
+ children: M("newsletterCommon.tryAgain", "Try Again")
58
56
  })
59
57
  ]
60
58
  }) : /* @__PURE__ */ b("div", {
@@ -65,88 +63,88 @@ function D() {
65
63
  /* @__PURE__ */ y(x, { intensity: "subtle" }),
66
64
  /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
67
65
  className: "text-2xl font-semibold text-text-primary",
68
- children: /* @__PURE__ */ y(T, { children: N("analytics.dashboard", "Analytics Dashboard") })
66
+ children: /* @__PURE__ */ y(T, { children: M("analytics.dashboard", "Analytics Dashboard") })
69
67
  }), /* @__PURE__ */ y("p", {
70
68
  className: "mt-1 text-sm text-text-secondary",
71
- children: N("analytics.dashboardDescription", "Overview of your newsletter performance")
69
+ children: M("analytics.dashboardDescription", "Overview of your newsletter performance")
72
70
  })] }),
73
71
  /* @__PURE__ */ b("div", {
74
72
  className: "flex items-center gap-2",
75
73
  children: [/* @__PURE__ */ b("select", {
76
- value: P,
77
- onChange: (e) => F(e.target.value),
74
+ value: N,
75
+ onChange: (e) => P(e.target.value),
78
76
  className: "px-3 py-2 border border-border-seam rounded-lg bg-bg-surface focus:ring-2 focus:ring-primary/50 focus:border-transparent",
79
77
  children: [
80
78
  /* @__PURE__ */ y("option", {
81
79
  value: "7d",
82
- children: N("analytics.last7Days", "Last 7 days")
80
+ children: M("analytics.last7Days", "Last 7 days")
83
81
  }),
84
82
  /* @__PURE__ */ y("option", {
85
83
  value: "30d",
86
- children: N("analytics.last30Days", "Last 30 days")
84
+ children: M("analytics.last30Days", "Last 30 days")
87
85
  }),
88
86
  /* @__PURE__ */ y("option", {
89
87
  value: "90d",
90
- children: N("analytics.last90Days", "Last 90 days")
88
+ children: M("analytics.last90Days", "Last 90 days")
91
89
  }),
92
90
  /* @__PURE__ */ y("option", {
93
91
  value: "all",
94
- children: N("analytics.allTime", "All time")
92
+ children: M("analytics.allTime", "All time")
95
93
  })
96
94
  ]
97
95
  }), /* @__PURE__ */ y(S, {
98
96
  type: "button",
99
97
  variant: "outline",
100
98
  size: "icon",
101
- onClick: J,
102
- title: N("newsletter.refresh", "Refresh"),
103
- "aria-label": N("newsletter.refresh", "Refresh"),
104
- children: /* @__PURE__ */ y(ee, {
99
+ onClick: q,
100
+ title: M("newsletter.refresh", "Refresh"),
101
+ "aria-label": M("newsletter.refresh", "Refresh"),
102
+ children: /* @__PURE__ */ y(m, {
105
103
  size: 18,
106
- className: K ? "animate-spin" : ""
104
+ className: G ? "animate-spin" : ""
107
105
  })
108
106
  })]
109
107
  })
110
108
  ]
111
- }), K && !L ? /* @__PURE__ */ y("div", {
109
+ }), G && !I ? /* @__PURE__ */ y("div", {
112
110
  className: "flex items-center justify-center h-full",
113
111
  children: /* @__PURE__ */ b("div", {
114
112
  className: "flex items-center gap-2 text-text-secondary",
115
- children: [/* @__PURE__ */ y(f, {
113
+ children: [/* @__PURE__ */ y(d, {
116
114
  className: "animate-spin",
117
115
  size: 24
118
- }), /* @__PURE__ */ y("span", { children: N("analytics.loadingAnalytics", "Loading analytics...") })]
116
+ }), /* @__PURE__ */ y("span", { children: M("analytics.loadingAnalytics", "Loading analytics...") })]
119
117
  })
120
118
  }) : /* @__PURE__ */ b(v, { children: [
121
119
  /* @__PURE__ */ y("div", {
122
120
  className: "px-6 pt-6",
123
- children: /* @__PURE__ */ y(ne, { children: N("analytics.pagePurpose", "Your newsletter command center: track how many subscribers you reach, how many open and click, and which campaigns perform best — so you can decide what to send next and when. Use it to spot trends, compare campaigns, and prove the impact of your email program.") })
121
+ children: /* @__PURE__ */ y(re, { children: M("analytics.pagePurpose", "Your newsletter command center: track how many subscribers you reach, how many open and click, and which campaigns perform best — so you can decide what to send next and when. Use it to spot trends, compare campaigns, and prove the impact of your email program.") })
124
122
  }),
125
123
  /* @__PURE__ */ y("div", {
126
124
  className: "px-6 pt-4",
127
- children: /* @__PURE__ */ y(te, {
125
+ children: /* @__PURE__ */ y(ne, {
128
126
  storageKey: "newsletter-analytics-dashboard",
129
127
  steps: [
130
128
  {
131
129
  id: "view-campaigns",
132
- label: N("analytics.nextStepViewCampaigns", "Review your campaigns"),
133
- description: N("analytics.nextStepViewCampaignsDesc", "Open the campaign list to dig into individual sends."),
134
- icon: /* @__PURE__ */ y(p, { size: 16 }),
130
+ label: M("analytics.nextStepViewCampaigns", "Review your campaigns"),
131
+ description: M("analytics.nextStepViewCampaignsDesc", "Open the campaign list to dig into individual sends."),
132
+ icon: /* @__PURE__ */ y(f, { size: 16 }),
135
133
  onClick: () => D("../campaigns")
136
134
  },
137
135
  {
138
136
  id: "grow-list",
139
- label: N("analytics.nextStepGrowList", "Grow your subscriber list"),
140
- description: N("analytics.nextStepGrowListDesc", "Add or import subscribers to expand your reach."),
137
+ label: M("analytics.nextStepGrowList", "Grow your subscriber list"),
138
+ description: M("analytics.nextStepGrowListDesc", "Add or import subscribers to expand your reach."),
141
139
  icon: /* @__PURE__ */ y(g, { size: 16 }),
142
140
  onClick: () => D("../subscribers")
143
141
  },
144
142
  {
145
143
  id: "top-performer",
146
- label: N("analytics.nextStepTopPerformer", "Study your top performer"),
147
- description: N("analytics.nextStepTopPerformerDesc", "See what made your best campaign succeed and repeat it."),
144
+ label: M("analytics.nextStepTopPerformer", "Study your top performer"),
145
+ description: M("analytics.nextStepTopPerformerDesc", "See what made your best campaign succeed and repeat it."),
148
146
  icon: /* @__PURE__ */ y(h, { size: 16 }),
149
- onClick: () => $[0] ? Y($[0].id) : D("../campaigns")
147
+ onClick: () => $[0] ? J($[0].id) : D("../campaigns")
150
148
  }
151
149
  ]
152
150
  })
@@ -155,7 +153,7 @@ function D() {
155
153
  className: "p-6",
156
154
  children: [/* @__PURE__ */ y("h2", {
157
155
  className: "text-lg font-medium text-text-primary mb-4",
158
- children: N("analytics.overview", "Overview")
156
+ children: M("analytics.overview", "Overview")
159
157
  }), /* @__PURE__ */ b("div", {
160
158
  className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",
161
159
  children: [
@@ -165,24 +163,24 @@ function D() {
165
163
  children: [
166
164
  /* @__PURE__ */ b("div", {
167
165
  className: "flex items-center gap-2 mb-2",
168
- children: [/* @__PURE__ */ y(p, {
166
+ children: [/* @__PURE__ */ y(f, {
169
167
  size: 20,
170
168
  className: "text-primary"
171
169
  }), /* @__PURE__ */ y("span", {
172
170
  className: "text-sm font-medium text-text-secondary",
173
- children: N("analytics.totalCampaigns", "Total Campaigns")
171
+ children: M("analytics.totalCampaigns", "Total Campaigns")
174
172
  })]
175
173
  }),
176
174
  /* @__PURE__ */ y("div", {
177
175
  className: "text-2xl font-bold text-text-primary tabular-nums",
178
- children: L?.totalNewsletters || 0
176
+ children: I?.totalNewsletters || 0
179
177
  }),
180
178
  /* @__PURE__ */ b("div", {
181
179
  className: "text-xs text-text-secondary mt-1",
182
180
  children: [
183
181
  X.length,
184
182
  " ",
185
- N("newsletter.sent", "sent")
183
+ M("newsletter.sent", "sent")
186
184
  ]
187
185
  })
188
186
  ]
@@ -198,16 +196,16 @@ function D() {
198
196
  className: "text-status-success-text"
199
197
  }), /* @__PURE__ */ y("span", {
200
198
  className: "text-sm font-medium text-text-secondary",
201
- children: N("analytics.totalSubscribers", "Total Subscribers")
199
+ children: M("analytics.totalSubscribers", "Total Subscribers")
202
200
  })]
203
201
  }),
204
202
  /* @__PURE__ */ y("div", {
205
203
  className: "text-2xl font-bold text-text-primary tabular-nums",
206
- children: (L?.totalSubscribers || W || 0).toLocaleString()
204
+ children: (I?.totalSubscribers || U || 0).toLocaleString()
207
205
  }),
208
206
  /* @__PURE__ */ y("div", {
209
207
  className: "text-xs text-status-success-text mt-1",
210
- children: N("analytics.activeSubscribers", "Active subscribers")
208
+ children: M("analytics.activeSubscribers", "Active subscribers")
211
209
  })
212
210
  ]
213
211
  }),
@@ -222,7 +220,7 @@ function D() {
222
220
  className: "text-accent-purple"
223
221
  }), /* @__PURE__ */ y("span", {
224
222
  className: "text-sm font-medium text-text-secondary",
225
- children: N("analytics.avgOpenRate", "Avg Open Rate")
223
+ children: M("analytics.avgOpenRate", "Avg Open Rate")
226
224
  })]
227
225
  }),
228
226
  /* @__PURE__ */ b("div", {
@@ -231,7 +229,7 @@ function D() {
231
229
  }),
232
230
  /* @__PURE__ */ y("div", {
233
231
  className: "text-xs text-text-secondary mt-1",
234
- children: N("analytics.acrossAllCampaigns", "Across all campaigns")
232
+ children: M("analytics.acrossAllCampaigns", "Across all campaigns")
235
233
  })
236
234
  ]
237
235
  }),
@@ -241,12 +239,12 @@ function D() {
241
239
  children: [
242
240
  /* @__PURE__ */ b("div", {
243
241
  className: "flex items-center gap-2 mb-2",
244
- children: [/* @__PURE__ */ y(m, {
242
+ children: [/* @__PURE__ */ y(p, {
245
243
  size: 20,
246
244
  className: "text-status-warning-text"
247
245
  }), /* @__PURE__ */ y("span", {
248
246
  className: "text-sm font-medium text-text-secondary",
249
- children: N("analytics.avgClickRate", "Avg Click Rate")
247
+ children: M("analytics.avgClickRate", "Avg Click Rate")
250
248
  })]
251
249
  }),
252
250
  /* @__PURE__ */ b("div", {
@@ -255,7 +253,7 @@ function D() {
255
253
  }),
256
254
  /* @__PURE__ */ y("div", {
257
255
  className: "text-xs text-text-secondary mt-1",
258
- children: N("analytics.acrossAllCampaigns", "Across all campaigns")
256
+ children: M("analytics.acrossAllCampaigns", "Across all campaigns")
259
257
  })
260
258
  ]
261
259
  }),
@@ -265,21 +263,21 @@ function D() {
265
263
  children: [
266
264
  /* @__PURE__ */ b("div", {
267
265
  className: "flex items-center gap-2 mb-2",
268
- children: [/* @__PURE__ */ y(l, {
266
+ children: [/* @__PURE__ */ y(c, {
269
267
  size: 20,
270
268
  className: "text-primary"
271
269
  }), /* @__PURE__ */ y("span", {
272
270
  className: "text-sm font-medium text-text-secondary",
273
- children: N("analytics.totalSent", "Total Sent")
271
+ children: M("analytics.totalSent", "Total Sent")
274
272
  })]
275
273
  }),
276
274
  /* @__PURE__ */ y("div", {
277
275
  className: "text-2xl font-bold text-text-primary tabular-nums",
278
- children: (L?.totalSent || oe || 0).toLocaleString()
276
+ children: (I?.totalSent || ae || 0).toLocaleString()
279
277
  }),
280
278
  /* @__PURE__ */ y("div", {
281
279
  className: "text-xs text-text-secondary mt-1",
282
- children: N("analytics.emailsDelivered", "Emails delivered")
280
+ children: M("analytics.emailsDelivered", "Emails delivered")
283
281
  })
284
282
  ]
285
283
  }),
@@ -294,7 +292,7 @@ function D() {
294
292
  className: "text-status-success-text"
295
293
  }), /* @__PURE__ */ y("span", {
296
294
  className: "text-sm font-medium text-text-secondary",
297
- children: N("analytics.engagementScore", "Engagement Score")
295
+ children: M("analytics.engagementScore", "Engagement Score")
298
296
  })]
299
297
  }),
300
298
  /* @__PURE__ */ y("div", {
@@ -303,7 +301,7 @@ function D() {
303
301
  }),
304
302
  /* @__PURE__ */ y("div", {
305
303
  className: "text-xs text-text-secondary mt-1",
306
- children: N("analytics.compositeScore", "Composite score")
304
+ children: M("analytics.compositeScore", "Composite score")
307
305
  })
308
306
  ]
309
307
  })
@@ -318,7 +316,7 @@ function D() {
318
316
  className: "p-4",
319
317
  children: [/* @__PURE__ */ y("h3", {
320
318
  className: "font-medium text-text-primary mb-4",
321
- children: N("analytics.campaignPerformanceTrend", "Campaign Performance Trend")
319
+ children: M("analytics.campaignPerformanceTrend", "Campaign Performance Trend")
322
320
  }), /* @__PURE__ */ y("div", {
323
321
  className: "h-64 flex items-center justify-center text-text-secondary border border-border-seam bg-accent-wash rounded-lg",
324
322
  children: /* @__PURE__ */ b("div", {
@@ -328,10 +326,10 @@ function D() {
328
326
  size: 32,
329
327
  className: "mx-auto mb-2 text-primary/60"
330
328
  }),
331
- /* @__PURE__ */ y("p", { children: N("analytics.openRateClickRateOverTime", "Open rate & click rate over time") }),
329
+ /* @__PURE__ */ y("p", { children: M("analytics.openRateClickRateOverTime", "Open rate & click rate over time") }),
332
330
  /* @__PURE__ */ y("p", {
333
331
  className: "text-sm text-text-secondary/70",
334
- children: N("newsletterCommon.chartsComingSoon", "Charts coming soon")
332
+ children: M("newsletterCommon.chartsComingSoon", "Charts coming soon")
335
333
  })
336
334
  ]
337
335
  })
@@ -342,7 +340,7 @@ function D() {
342
340
  className: "p-4",
343
341
  children: [/* @__PURE__ */ y("h3", {
344
342
  className: "font-medium text-text-primary mb-4",
345
- children: N("analytics.subscriberGrowth", "Subscriber Growth")
343
+ children: M("analytics.subscriberGrowth", "Subscriber Growth")
346
344
  }), /* @__PURE__ */ y("div", {
347
345
  className: "h-64 flex items-center justify-center text-text-secondary border border-border-seam bg-accent-wash rounded-lg",
348
346
  children: /* @__PURE__ */ b("div", {
@@ -352,10 +350,10 @@ function D() {
352
350
  size: 32,
353
351
  className: "mx-auto mb-2 text-primary/60"
354
352
  }),
355
- /* @__PURE__ */ y("p", { children: N("analytics.subscriberCountOverTime", "Subscriber count over time") }),
353
+ /* @__PURE__ */ y("p", { children: M("analytics.subscriberCountOverTime", "Subscriber count over time") }),
356
354
  /* @__PURE__ */ y("p", {
357
355
  className: "text-sm text-text-secondary/70",
358
- children: N("newsletterCommon.chartsComingSoon", "Charts coming soon")
356
+ children: M("newsletterCommon.chartsComingSoon", "Charts coming soon")
359
357
  })
360
358
  ]
361
359
  })
@@ -367,23 +365,23 @@ function D() {
367
365
  className: "flex items-center justify-between mb-4",
368
366
  children: [/* @__PURE__ */ y("h3", {
369
367
  className: "font-medium text-text-primary",
370
- children: N("analytics.topPerformingCampaigns", "Top Performing Campaigns")
368
+ children: M("analytics.topPerformingCampaigns", "Top Performing Campaigns")
371
369
  }), /* @__PURE__ */ y(S, {
372
370
  type: "button",
373
371
  variant: "link",
374
372
  size: "sm",
375
373
  onClick: () => D("../campaigns"),
376
- children: N("newsletterCommon.viewAll", "View All")
374
+ children: M("newsletterCommon.viewAll", "View All")
377
375
  })]
378
376
  }), $.length === 0 ? /* @__PURE__ */ y(E, {
379
377
  illustration: "empty-data",
380
- title: N("analytics.noSentCampaignsYet", "No sent campaigns yet"),
381
- description: N("analytics.noSentCampaignsDescription", "Once you send a campaign, your best performers will rank here by open and click rate.")
378
+ title: M("analytics.noSentCampaignsYet", "No sent campaigns yet"),
379
+ description: M("analytics.noSentCampaignsDescription", "Once you send a campaign, your best performers will rank here by open and click rate.")
382
380
  }) : /* @__PURE__ */ y("div", {
383
381
  className: "space-y-3",
384
382
  children: $.map((e) => /* @__PURE__ */ b("button", {
385
383
  type: "button",
386
- onClick: () => Y(e.id),
384
+ onClick: () => J(e.id),
387
385
  className: "flex items-center justify-between p-3 bg-bg-surface border border-border-seam rounded-lg hover:border-border-strong hover:shadow-elevation-1 cursor-pointer transition-[box-shadow,border-color] w-full text-left",
388
386
  children: [
389
387
  /* @__PURE__ */ b("div", {
@@ -393,7 +391,7 @@ function D() {
393
391
  children: e.title
394
392
  }), /* @__PURE__ */ b("div", {
395
393
  className: "text-sm text-text-secondary flex items-center gap-2",
396
- children: [/* @__PURE__ */ y(u, { size: 12 }), e.sentAt ? ae(e.sentAt) : N("analytics.notSent", "Not sent")]
394
+ children: [/* @__PURE__ */ y(l, { size: 12 }), e.sentAt ? ie(e.sentAt) : M("analytics.notSent", "Not sent")]
397
395
  })]
398
396
  }),
399
397
  /* @__PURE__ */ b("div", {
@@ -403,18 +401,18 @@ function D() {
403
401
  children: [
404
402
  (e.openRate || 0).toFixed(1),
405
403
  "% ",
406
- N("newsletter.open", "open")
404
+ M("newsletter.open", "open")
407
405
  ]
408
406
  }), /* @__PURE__ */ b("div", {
409
407
  className: "text-sm text-text-secondary tabular-nums",
410
408
  children: [
411
409
  (e.clickRate || 0).toFixed(1),
412
410
  "% ",
413
- N("newsletter.click", "click")
411
+ M("newsletter.click", "click")
414
412
  ]
415
413
  })]
416
414
  }),
417
- /* @__PURE__ */ y(d, {
415
+ /* @__PURE__ */ y(u, {
418
416
  size: 16,
419
417
  className: "ml-2 text-text-secondary"
420
418
  })
@@ -427,18 +425,18 @@ function D() {
427
425
  className: "p-4",
428
426
  children: [/* @__PURE__ */ y("h3", {
429
427
  className: "font-medium text-text-primary mb-4",
430
- children: N("analytics.recentActivity", "Recent Activity")
428
+ children: M("analytics.recentActivity", "Recent Activity")
431
429
  }), X.length === 0 ? /* @__PURE__ */ y(E, {
432
430
  illustration: "empty-notifications",
433
- title: N("analytics.noRecentActivity", "No recent activity"),
434
- description: N("analytics.noRecentActivityDescription", "Sent campaigns will show up here as a running activity feed.")
431
+ title: M("analytics.noRecentActivity", "No recent activity"),
432
+ description: M("analytics.noRecentActivityDescription", "Sent campaigns will show up here as a running activity feed.")
435
433
  }) : /* @__PURE__ */ y("div", {
436
434
  className: "space-y-3",
437
435
  children: X.slice(0, 5).map((e) => /* @__PURE__ */ b("div", {
438
436
  className: "flex items-start gap-3 p-2",
439
437
  children: [/* @__PURE__ */ y("div", {
440
438
  className: "size-8 bg-action-primary-bg/10 rounded-full flex items-center justify-center flex-shrink-0",
441
- children: /* @__PURE__ */ y(p, {
439
+ children: /* @__PURE__ */ y(f, {
442
440
  size: 14,
443
441
  className: "text-primary"
444
442
  })
@@ -452,17 +450,17 @@ function D() {
452
450
  children: e.title
453
451
  }),
454
452
  " ",
455
- N("analytics.wasSent", "was sent")
453
+ M("analytics.wasSent", "was sent")
456
454
  ]
457
455
  }), /* @__PURE__ */ b("p", {
458
456
  className: "text-xs text-text-secondary",
459
457
  children: [
460
- e.sentAt ? ie(e.sentAt) : N("newsletter.unknown", "Unknown"),
458
+ e.sentAt ? Y(e.sentAt) : M("newsletter.unknown", "Unknown"),
461
459
  " ",
462
460
  "• ",
463
461
  e.recipientCount?.toLocaleString() || 0,
464
462
  " ",
465
- N("newsletter.recipientsLower", "recipients")
463
+ M("newsletter.recipientsLower", "recipients")
466
464
  ]
467
465
  })]
468
466
  })]
@@ -474,20 +472,20 @@ function D() {
474
472
  className: "p-4 lg:col-span-2",
475
473
  children: [/* @__PURE__ */ y("h3", {
476
474
  className: "font-medium text-text-primary mb-4",
477
- children: N("analytics.engagementByDayOfWeek", "Engagement by Day of Week")
475
+ children: M("analytics.engagementByDayOfWeek", "Engagement by Day of Week")
478
476
  }), /* @__PURE__ */ y("div", {
479
477
  className: "h-32 flex items-center justify-center text-text-secondary border border-border-seam bg-accent-wash rounded-lg",
480
478
  children: /* @__PURE__ */ b("div", {
481
479
  className: "text-center",
482
480
  children: [
483
- /* @__PURE__ */ y(l, {
481
+ /* @__PURE__ */ y(c, {
484
482
  size: 32,
485
483
  className: "mx-auto mb-2 text-primary/60"
486
484
  }),
487
- /* @__PURE__ */ y("p", { children: N("analytics.engagementPatternsByDay", "Engagement patterns by day") }),
485
+ /* @__PURE__ */ y("p", { children: M("analytics.engagementPatternsByDay", "Engagement patterns by day") }),
488
486
  /* @__PURE__ */ y("p", {
489
487
  className: "text-sm text-text-secondary/70",
490
- children: N("analytics.dataAvailableAfterSent", "Data available after campaigns are sent")
488
+ children: M("analytics.dataAvailableAfterSent", "Data available after campaigns are sent")
491
489
  })
492
490
  ]
493
491
  })