@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,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useTr as e } from "../shared/hooks/useTr.js";
|
|
2
|
+
import { NEWSLETTER_PERMISSIONS as t } from "../constants/permissions.js";
|
|
3
3
|
import { useWaitlistEntry as n, useWaitlistMutations as r } from "../hooks/useWaitlistOperations.js";
|
|
4
4
|
import { useState as i } from "react";
|
|
5
5
|
import { AccessDenied as a } from "@burdenoff/fe-libs/shared/components";
|
|
@@ -10,7 +10,7 @@ import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
|
10
10
|
import { AuroraBackground as S, Button as C, CTAOverflowMenu as w, EmphasisPanel as te, GlassCard as T, GradientText as E, IllustratedEmptyState as D, NextSteps as O, PagePurpose as k } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/newsletter/pages/WaitlistDetailPage.tsx
|
|
12
12
|
function A() {
|
|
13
|
-
let A =
|
|
13
|
+
let A = e(), { entryId: ne } = s(), M = o(), { hasPermission: N, isLoading: P, permissions: F } = y(), I = (Array.isArray(F) ? F : F?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:subscribers:")) ? N(t.SUBSCRIBER_READ) : !0, [L, R] = i(!1), [z, B] = i(""), [V, H] = i(null), { entry: U, loading: W, error: G, refetch: K } = n(ne || ""), { approveWaitlist: q, rejectWaitlist: J, approving: Y, rejecting: X } = r(), Z = (e, t) => {
|
|
14
14
|
H({
|
|
15
15
|
type: e,
|
|
16
16
|
message: t
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { useNewsletterStore as e } from "../store/newsletterStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useTr as t } from "../shared/hooks/useTr.js";
|
|
3
|
+
import { NEWSLETTER_PERMISSIONS as n } from "../constants/permissions.js";
|
|
4
4
|
import { useWaitlistEntries as r, useWaitlistMutations as i } from "../hooks/useWaitlistOperations.js";
|
|
5
5
|
import { useRef as a, useState as o } from "react";
|
|
6
6
|
import { AccessDenied as s } from "@burdenoff/fe-libs/shared/components";
|
|
7
7
|
import { useNavigate as c } from "react-router";
|
|
8
|
-
import { AlertCircle as l, CheckCircle as u, Clock as d, Eye as f, Filter as
|
|
9
|
-
import { usePermissions as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { AuroraBackground as
|
|
8
|
+
import { AlertCircle as l, CheckCircle as u, Clock as d, Eye as f, Filter as p, Loader2 as m, RefreshCw as ee, Search as h, UserCheck as g, UserX as _, X as te } from "lucide-react";
|
|
9
|
+
import { usePermissions as ne } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
11
|
+
import { AuroraBackground as x, Button as S, GlassCard as C, GradientText as w, IllustratedEmptyState as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
//#region src/newsletter/pages/WaitlistListPage.tsx
|
|
13
|
-
function
|
|
14
|
-
let f =
|
|
15
|
-
if (!
|
|
16
|
-
let t =
|
|
13
|
+
function D() {
|
|
14
|
+
let f = t(), v = c(), { hasPermission: D, isLoading: k, permissions: A } = ne(), { waitlistFilter: j, updateWaitlistFilter: M } = e(), N = (Array.isArray(A) ? A : A?.permissionStrings)?.some?.((e) => e.startsWith("tenantmodule-newsletter:subscribers:")) ? D(n.SUBSCRIBER_LIST) : !0, [P, F] = o(!1), I = a(null), [L, R] = o(""), [z, B] = o(""), [V, H] = o(null), { entries: U, loading: W, error: G, refetch: K } = r(j.status === "ALL" ? void 0 : { status: j.status }), { approveWaitlist: q, rejectWaitlist: J, approving: Y, rejecting: X } = i(), Z = U.filter((e) => {
|
|
15
|
+
if (!j.search) return !0;
|
|
16
|
+
let t = j.search.toLowerCase();
|
|
17
17
|
return e.email.toLowerCase().includes(t) || e.name && e.name.toLowerCase().includes(t) || e.company && e.company.toLowerCase().includes(t);
|
|
18
18
|
}), Q = U.filter((e) => e.status === "PENDING").length, re = U.filter((e) => e.status === "APPROVED").length, ie = U.filter((e) => e.status === "REJECTED").length, $ = (e, t) => {
|
|
19
19
|
H({
|
|
@@ -36,7 +36,7 @@ function O() {
|
|
|
36
36
|
$("error", `${f("waitlist.failedToReject", "Failed to reject")}: ${e instanceof Error ? e.message : f("newsletter.unknownError", "Unknown error")}`);
|
|
37
37
|
}
|
|
38
38
|
}, ce = (e) => {
|
|
39
|
-
|
|
39
|
+
v(e);
|
|
40
40
|
}, le = (e) => new Date(e).toLocaleDateString("en-US", {
|
|
41
41
|
month: "short",
|
|
42
42
|
day: "numeric",
|
|
@@ -44,36 +44,36 @@ function O() {
|
|
|
44
44
|
hour: "2-digit",
|
|
45
45
|
minute: "2-digit"
|
|
46
46
|
});
|
|
47
|
-
return
|
|
47
|
+
return k ? /* @__PURE__ */ y("div", {
|
|
48
48
|
className: "flex items-center justify-center h-full",
|
|
49
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ b("div", {
|
|
50
50
|
className: "flex items-center gap-2 text-text-secondary",
|
|
51
|
-
children: [/* @__PURE__ */
|
|
51
|
+
children: [/* @__PURE__ */ y(m, {
|
|
52
52
|
className: "animate-spin",
|
|
53
53
|
size: 24
|
|
54
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ y("span", { children: f("newsletterCommon.loading", "Loading...") })]
|
|
55
55
|
})
|
|
56
|
-
}) : !
|
|
56
|
+
}) : !k && A && A.permissionStrings?.length > 0 && !N ? /* @__PURE__ */ y(s, {}) : /* @__PURE__ */ b("div", {
|
|
57
57
|
className: "flex flex-col h-full",
|
|
58
58
|
children: [
|
|
59
|
-
V && /* @__PURE__ */
|
|
59
|
+
V && /* @__PURE__ */ b("div", {
|
|
60
60
|
className: `fixed top-4 right-4 z-50 flex items-center gap-2 px-4 py-3 rounded-lg shadow-[var(--shadow-pop)] ${V.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"}`,
|
|
61
|
-
children: [V.type === "success" ? /* @__PURE__ */
|
|
61
|
+
children: [V.type === "success" ? /* @__PURE__ */ y(u, { size: 20 }) : /* @__PURE__ */ y(l, { size: 20 }), /* @__PURE__ */ y("span", { children: V.message })]
|
|
62
62
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ b("div", {
|
|
64
64
|
className: "relative overflow-hidden flex items-center justify-between p-6 border-b border-border-seam",
|
|
65
65
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ y(x, { intensity: "subtle" }),
|
|
67
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
|
|
68
68
|
className: "text-2xl font-semibold text-text-primary",
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
-
}), /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ y(w, { children: f("waitlist.waitlist", "Waitlist") })
|
|
70
|
+
}), /* @__PURE__ */ b("p", {
|
|
71
71
|
className: "mt-1 text-sm text-text-secondary tabular-nums",
|
|
72
72
|
children: [
|
|
73
73
|
U.length,
|
|
74
74
|
" ",
|
|
75
75
|
f("waitlist.totalEntries", "total entries"),
|
|
76
|
-
Q > 0 && /* @__PURE__ */
|
|
76
|
+
Q > 0 && /* @__PURE__ */ b("span", {
|
|
77
77
|
className: "ml-2 text-status-warning-text",
|
|
78
78
|
children: [
|
|
79
79
|
"(",
|
|
@@ -85,16 +85,16 @@ function O() {
|
|
|
85
85
|
})
|
|
86
86
|
]
|
|
87
87
|
})] }),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ y("div", {
|
|
89
89
|
className: "flex items-center gap-2",
|
|
90
|
-
children: /* @__PURE__ */
|
|
90
|
+
children: /* @__PURE__ */ y(S, {
|
|
91
91
|
type: "button",
|
|
92
92
|
variant: "outline",
|
|
93
93
|
size: "icon",
|
|
94
94
|
onClick: () => K(),
|
|
95
95
|
title: f("newsletter.refresh", "Refresh"),
|
|
96
96
|
"aria-label": f("newsletter.refresh", "Refresh"),
|
|
97
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ y(ee, {
|
|
98
98
|
size: 18,
|
|
99
99
|
className: W ? "animate-spin" : ""
|
|
100
100
|
})
|
|
@@ -102,89 +102,89 @@ function O() {
|
|
|
102
102
|
})
|
|
103
103
|
]
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ y("div", {
|
|
106
106
|
className: "px-6 pt-6",
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ y(E, { children: f("waitlist.pagePurpose", "A gatekeeper for early access. When people sign up to join before launch, their requests land here for you to review — approve the ones you want to let in (they become subscribers) or reject the rest with an optional reason. Use the cards below to focus on whatever still needs a decision.") })
|
|
108
108
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ b("div", {
|
|
110
110
|
className: "grid grid-cols-3 gap-4 p-6 border-b border-border-seam",
|
|
111
111
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ b(C, {
|
|
113
113
|
role: "button",
|
|
114
114
|
tabIndex: 0,
|
|
115
115
|
treatment: "metric",
|
|
116
|
-
glow:
|
|
117
|
-
onClick: () =>
|
|
116
|
+
glow: j.status === "PENDING",
|
|
117
|
+
onClick: () => M({ status: "PENDING" }),
|
|
118
118
|
onKeyDown: (e) => {
|
|
119
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
119
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), M({ status: "PENDING" }));
|
|
120
120
|
},
|
|
121
121
|
className: "flex cursor-pointer items-center gap-3 p-4 text-left focus-visible:outline-2 focus-visible:outline-action-primary-bg",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ y("div", {
|
|
123
123
|
className: "p-2 bg-status-warning-bg-subtle rounded-lg",
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ y(d, {
|
|
125
125
|
size: 20,
|
|
126
126
|
className: "text-status-warning-text"
|
|
127
127
|
})
|
|
128
|
-
}), /* @__PURE__ */
|
|
128
|
+
}), /* @__PURE__ */ b("div", {
|
|
129
129
|
className: "text-left",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ y("p", {
|
|
131
131
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
132
132
|
children: Q
|
|
133
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ y("p", {
|
|
134
134
|
className: "text-sm text-text-secondary",
|
|
135
135
|
children: f("waitlist.pending", "Pending")
|
|
136
136
|
})]
|
|
137
137
|
})]
|
|
138
138
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ b(C, {
|
|
140
140
|
role: "button",
|
|
141
141
|
tabIndex: 0,
|
|
142
142
|
treatment: "metric",
|
|
143
|
-
glow:
|
|
144
|
-
onClick: () =>
|
|
143
|
+
glow: j.status === "APPROVED",
|
|
144
|
+
onClick: () => M({ status: "APPROVED" }),
|
|
145
145
|
onKeyDown: (e) => {
|
|
146
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
146
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), M({ status: "APPROVED" }));
|
|
147
147
|
},
|
|
148
148
|
className: "flex cursor-pointer items-center gap-3 p-4 text-left focus-visible:outline-2 focus-visible:outline-action-primary-bg",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
149
|
+
children: [/* @__PURE__ */ y("div", {
|
|
150
150
|
className: "p-2 bg-status-success-bg-subtle rounded-lg",
|
|
151
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ y(g, {
|
|
152
152
|
size: 20,
|
|
153
153
|
className: "text-status-success-text"
|
|
154
154
|
})
|
|
155
|
-
}), /* @__PURE__ */
|
|
155
|
+
}), /* @__PURE__ */ b("div", {
|
|
156
156
|
className: "text-left",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ y("p", {
|
|
158
158
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
159
159
|
children: re
|
|
160
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ y("p", {
|
|
161
161
|
className: "text-sm text-text-secondary",
|
|
162
162
|
children: f("waitlist.approved", "Approved")
|
|
163
163
|
})]
|
|
164
164
|
})]
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ b(C, {
|
|
167
167
|
role: "button",
|
|
168
168
|
tabIndex: 0,
|
|
169
169
|
treatment: "metric",
|
|
170
|
-
glow:
|
|
171
|
-
onClick: () =>
|
|
170
|
+
glow: j.status === "REJECTED",
|
|
171
|
+
onClick: () => M({ status: "REJECTED" }),
|
|
172
172
|
onKeyDown: (e) => {
|
|
173
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
173
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), M({ status: "REJECTED" }));
|
|
174
174
|
},
|
|
175
175
|
className: "flex cursor-pointer items-center gap-3 p-4 text-left focus-visible:outline-2 focus-visible:outline-action-primary-bg",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ y("div", {
|
|
177
177
|
className: "p-2 bg-status-error-bg-subtle rounded-lg",
|
|
178
|
-
children: /* @__PURE__ */
|
|
178
|
+
children: /* @__PURE__ */ y(_, {
|
|
179
179
|
size: 20,
|
|
180
180
|
className: "text-status-error-text"
|
|
181
181
|
})
|
|
182
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ b("div", {
|
|
183
183
|
className: "text-left",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ y("p", {
|
|
185
185
|
className: "text-2xl font-bold text-text-primary tabular-nums",
|
|
186
186
|
children: ie
|
|
187
|
-
}), /* @__PURE__ */
|
|
187
|
+
}), /* @__PURE__ */ y("p", {
|
|
188
188
|
className: "text-sm text-text-secondary",
|
|
189
189
|
children: f("waitlist.rejected", "Rejected")
|
|
190
190
|
})]
|
|
@@ -192,125 +192,125 @@ function O() {
|
|
|
192
192
|
})
|
|
193
193
|
]
|
|
194
194
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ b("div", {
|
|
196
196
|
className: "flex items-center gap-4 p-6 border-b border-border-seam",
|
|
197
197
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ b("div", {
|
|
199
199
|
className: "flex-1 relative",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ y(h, {
|
|
201
201
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
202
202
|
size: 20
|
|
203
|
-
}), /* @__PURE__ */
|
|
203
|
+
}), /* @__PURE__ */ y("input", {
|
|
204
204
|
type: "text",
|
|
205
205
|
"aria-label": f("waitlist.searchByEmailNameCompany", "Search by email, name, or company..."),
|
|
206
206
|
placeholder: f("waitlist.searchByEmailNameCompany", "Search by email, name, or company..."),
|
|
207
|
-
value:
|
|
208
|
-
onChange: (e) =>
|
|
207
|
+
value: j.search,
|
|
208
|
+
onChange: (e) => M({ search: e.target.value }),
|
|
209
209
|
className: "w-full pl-10 pr-4 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
210
210
|
})]
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
value:
|
|
214
|
-
onChange: (e) =>
|
|
212
|
+
/* @__PURE__ */ b("select", {
|
|
213
|
+
value: j.status,
|
|
214
|
+
onChange: (e) => M({ status: e.target.value }),
|
|
215
215
|
className: "px-4 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent",
|
|
216
216
|
children: [
|
|
217
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ y("option", {
|
|
218
218
|
value: "ALL",
|
|
219
219
|
children: f("newsletterCommon.allStatuses", "All Statuses")
|
|
220
220
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ y("option", {
|
|
222
222
|
value: "PENDING",
|
|
223
223
|
children: f("waitlist.pending", "Pending")
|
|
224
224
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ y("option", {
|
|
226
226
|
value: "APPROVED",
|
|
227
227
|
children: f("waitlist.approved", "Approved")
|
|
228
228
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ y("option", {
|
|
230
230
|
value: "REJECTED",
|
|
231
231
|
children: f("waitlist.rejected", "Rejected")
|
|
232
232
|
})
|
|
233
233
|
]
|
|
234
234
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ b("button", {
|
|
236
236
|
type: "button",
|
|
237
237
|
className: "flex items-center gap-2 px-4 py-2 border border-border-subtle rounded-lg hover:bg-accent transition-colors",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ y(p, { size: 20 }), f("newsletter.moreFilters", "More Filters")]
|
|
239
239
|
})
|
|
240
240
|
]
|
|
241
241
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ y("div", {
|
|
243
243
|
className: "flex-1 overflow-auto",
|
|
244
|
-
children: G ? /* @__PURE__ */
|
|
244
|
+
children: G ? /* @__PURE__ */ b("div", {
|
|
245
245
|
className: "flex flex-col items-center justify-center h-full text-center p-6",
|
|
246
246
|
children: [
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ y(l, {
|
|
248
248
|
size: 48,
|
|
249
249
|
className: "text-status-error-text mb-4"
|
|
250
250
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ y("h3", {
|
|
252
252
|
className: "text-lg font-medium text-text-primary mb-2",
|
|
253
253
|
children: f("waitlist.failedLoadEntries", "Failed to load waitlist entries")
|
|
254
254
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ y("p", {
|
|
256
256
|
className: "text-sm text-text-secondary mb-4",
|
|
257
257
|
children: G.message
|
|
258
258
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ y(S, {
|
|
260
260
|
type: "button",
|
|
261
261
|
onClick: () => K(),
|
|
262
262
|
children: f("newsletterCommon.tryAgain", "Try Again")
|
|
263
263
|
})
|
|
264
264
|
]
|
|
265
|
-
}) : W && U.length === 0 ? /* @__PURE__ */
|
|
265
|
+
}) : W && U.length === 0 ? /* @__PURE__ */ y("div", {
|
|
266
266
|
className: "flex items-center justify-center h-full",
|
|
267
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ b("div", {
|
|
268
268
|
className: "flex items-center gap-2 text-text-secondary",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ y(m, {
|
|
270
270
|
className: "animate-spin",
|
|
271
271
|
size: 24
|
|
272
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ y("span", { children: f("waitlist.loadingEntries", "Loading waitlist entries...") })]
|
|
273
273
|
})
|
|
274
|
-
}) : Z.length === 0 ? /* @__PURE__ */
|
|
274
|
+
}) : Z.length === 0 ? /* @__PURE__ */ y("div", {
|
|
275
275
|
className: "flex items-center justify-center h-full p-6",
|
|
276
|
-
children: /* @__PURE__ */
|
|
277
|
-
illustration:
|
|
278
|
-
title:
|
|
279
|
-
description:
|
|
276
|
+
children: /* @__PURE__ */ y(T, {
|
|
277
|
+
illustration: j.search || j.status !== "ALL" ? "empty-search" : "empty-people",
|
|
278
|
+
title: j.search || j.status !== "ALL" ? f("waitlist.noEntriesFound", "No entries found") : f("waitlist.noEntriesYet", "No waitlist entries yet"),
|
|
279
|
+
description: j.search || j.status !== "ALL" ? f("waitlist.tryAdjustingFilters", "Try adjusting your search or filters") : f("waitlist.noEntriesDescription", "When users join the waitlist, their entries will appear here for review.")
|
|
280
280
|
})
|
|
281
|
-
}) : /* @__PURE__ */
|
|
281
|
+
}) : /* @__PURE__ */ b("table", {
|
|
282
282
|
className: "w-full",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ y("thead", {
|
|
284
284
|
className: "bg-bg-sunken border-b border-border-seam sticky top-0",
|
|
285
|
-
children: /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ b("tr", { children: [
|
|
286
|
+
/* @__PURE__ */ y("th", {
|
|
287
287
|
className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
288
288
|
children: f("newsletter.email", "Email")
|
|
289
289
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ y("th", {
|
|
291
291
|
className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
292
292
|
children: f("newsletter.name", "Name")
|
|
293
293
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ y("th", {
|
|
295
295
|
className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
296
296
|
children: f("waitlist.company", "Company")
|
|
297
297
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ y("th", {
|
|
299
299
|
className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
300
300
|
children: f("newsletterCommon.status", "Status")
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ y("th", {
|
|
303
303
|
className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
304
304
|
children: f("waitlist.submitted", "Submitted")
|
|
305
305
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ y("th", {
|
|
307
307
|
className: "px-6 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
|
|
308
308
|
children: f("newsletter.actions", "Actions")
|
|
309
309
|
})
|
|
310
310
|
] })
|
|
311
|
-
}), /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ y("tbody", {
|
|
312
312
|
className: "bg-bg-surface divide-y divide-border",
|
|
313
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
313
|
+
children: Z.map((e) => /* @__PURE__ */ y(O, {
|
|
314
314
|
entry: e,
|
|
315
315
|
onView: () => ce(e.id),
|
|
316
316
|
onApprove: () => ae(e.id, e.email),
|
|
@@ -321,37 +321,37 @@ function O() {
|
|
|
321
321
|
})]
|
|
322
322
|
})
|
|
323
323
|
}),
|
|
324
|
-
|
|
324
|
+
P && /* @__PURE__ */ y("div", {
|
|
325
325
|
className: "fixed inset-0 bg-black/50 flex items-center justify-center z-50",
|
|
326
|
-
children: /* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ b("div", {
|
|
327
327
|
className: "bg-bg-surface rounded-lg shadow-xl w-full max-w-md p-6",
|
|
328
328
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ b("div", {
|
|
330
330
|
className: "flex items-center justify-between mb-4",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
332
332
|
className: "text-lg font-semibold text-text-primary",
|
|
333
333
|
children: f("waitlist.rejectEntry", "Reject Entry")
|
|
334
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ y("button", {
|
|
335
335
|
type: "button",
|
|
336
336
|
onClick: () => F(!1),
|
|
337
337
|
className: "p-1 hover:bg-accent rounded",
|
|
338
|
-
children: /* @__PURE__ */
|
|
338
|
+
children: /* @__PURE__ */ y(te, { size: 20 })
|
|
339
339
|
})]
|
|
340
340
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ b("p", {
|
|
342
342
|
className: "text-sm text-text-secondary mb-4",
|
|
343
343
|
children: [
|
|
344
344
|
f("waitlist.rejectEntryPrompt", "Reject the waitlist entry for"),
|
|
345
345
|
" ",
|
|
346
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ y("strong", { children: L })
|
|
347
347
|
]
|
|
348
348
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ b("div", {
|
|
350
350
|
className: "mb-4",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ y("label", {
|
|
352
352
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
353
353
|
children: f("waitlist.reasonOptional", "Reason (optional)")
|
|
354
|
-
}), /* @__PURE__ */
|
|
354
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
355
355
|
"aria-label": f("waitlist.reasonOptional", "Reason (optional)"),
|
|
356
356
|
value: z,
|
|
357
357
|
onChange: (e) => B(e.target.value),
|
|
@@ -360,22 +360,22 @@ function O() {
|
|
|
360
360
|
className: "w-full px-3 py-2 border border-border-subtle rounded-lg focus:ring-2 focus:ring-primary/50 focus:border-transparent"
|
|
361
361
|
})]
|
|
362
362
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ b("div", {
|
|
364
364
|
className: "flex justify-end gap-2",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
365
|
+
children: [/* @__PURE__ */ y("button", {
|
|
366
366
|
type: "button",
|
|
367
367
|
onClick: () => F(!1),
|
|
368
368
|
className: "px-4 py-2 border border-border-subtle rounded-lg hover:bg-accent transition-colors",
|
|
369
369
|
children: f("newsletterCommon.cancel", "Cancel")
|
|
370
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ b("button", {
|
|
371
371
|
type: "button",
|
|
372
372
|
onClick: se,
|
|
373
373
|
disabled: X,
|
|
374
374
|
className: "flex items-center gap-2 px-4 py-2 bg-status-error-bg text-status-error-text rounded-lg hover:bg-status-error-bg/90 transition-colors disabled:opacity-50",
|
|
375
|
-
children: [X ? /* @__PURE__ */
|
|
375
|
+
children: [X ? /* @__PURE__ */ y(m, {
|
|
376
376
|
size: 16,
|
|
377
377
|
className: "animate-spin"
|
|
378
|
-
}) : /* @__PURE__ */
|
|
378
|
+
}) : /* @__PURE__ */ y(_, { size: 16 }), f("waitlist.reject", "Reject")]
|
|
379
379
|
})]
|
|
380
380
|
})
|
|
381
381
|
]
|
|
@@ -384,72 +384,72 @@ function O() {
|
|
|
384
384
|
]
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
let o =
|
|
389
|
-
return /* @__PURE__ */
|
|
387
|
+
function O({ entry: e, onView: n, onApprove: r, onReject: i, formatDate: a }) {
|
|
388
|
+
let o = t();
|
|
389
|
+
return /* @__PURE__ */ b("tr", {
|
|
390
390
|
className: "hover:bg-accent",
|
|
391
391
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ y("td", {
|
|
393
393
|
className: "px-6 py-4",
|
|
394
|
-
children: /* @__PURE__ */
|
|
394
|
+
children: /* @__PURE__ */ y("button", {
|
|
395
395
|
type: "button",
|
|
396
|
-
onClick:
|
|
396
|
+
onClick: n,
|
|
397
397
|
className: "text-text-primary hover:text-primary font-medium",
|
|
398
398
|
children: e.email
|
|
399
399
|
})
|
|
400
400
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ y("td", {
|
|
402
402
|
className: "px-6 py-4 text-sm text-text-secondary",
|
|
403
403
|
children: e.name || "-"
|
|
404
404
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ y("td", {
|
|
406
406
|
className: "px-6 py-4 text-sm text-text-secondary",
|
|
407
407
|
children: e.company || "-"
|
|
408
408
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ y("td", {
|
|
410
410
|
className: "px-6 py-4",
|
|
411
411
|
children: ((e) => {
|
|
412
412
|
switch (e) {
|
|
413
|
-
case "PENDING": return /* @__PURE__ */
|
|
413
|
+
case "PENDING": return /* @__PURE__ */ b("span", {
|
|
414
414
|
className: "inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
|
|
415
415
|
children: [
|
|
416
|
-
/* @__PURE__ */
|
|
417
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ y("span", { className: "size-1.5 rounded-full bg-status-warning-text motion-safe:animate-vc-glow-pulse" }),
|
|
417
|
+
/* @__PURE__ */ y(d, { size: 12 }),
|
|
418
418
|
o("waitlist.pending", "Pending")
|
|
419
419
|
]
|
|
420
420
|
});
|
|
421
|
-
case "APPROVED": return /* @__PURE__ */
|
|
421
|
+
case "APPROVED": return /* @__PURE__ */ b("span", {
|
|
422
422
|
className: "inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ y(g, { size: 12 }), o("waitlist.approved", "Approved")]
|
|
424
424
|
});
|
|
425
|
-
case "REJECTED": return /* @__PURE__ */
|
|
425
|
+
case "REJECTED": return /* @__PURE__ */ b("span", {
|
|
426
426
|
className: "inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium bg-status-error-bg-subtle text-status-error-text",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ y(_, { size: 12 }), o("waitlist.rejected", "Rejected")]
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
})(e.status)
|
|
431
431
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ y("td", {
|
|
433
433
|
className: "px-6 py-4 text-sm text-text-secondary",
|
|
434
434
|
children: a(e.createdAt)
|
|
435
435
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ y("td", {
|
|
437
437
|
className: "px-6 py-4",
|
|
438
|
-
children: /* @__PURE__ */
|
|
438
|
+
children: /* @__PURE__ */ b("div", {
|
|
439
439
|
className: "flex items-center gap-2",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ y("button", {
|
|
441
441
|
type: "button",
|
|
442
|
-
onClick:
|
|
442
|
+
onClick: n,
|
|
443
443
|
className: "p-1 text-text-secondary hover:text-text-primary hover:bg-accent rounded",
|
|
444
444
|
title: o("newsletter.viewDetails", "View details"),
|
|
445
|
-
children: /* @__PURE__ */
|
|
446
|
-
}), e.status === "PENDING" && /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ y(f, { size: 16 })
|
|
446
|
+
}), e.status === "PENDING" && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("button", {
|
|
447
447
|
type: "button",
|
|
448
448
|
onClick: r,
|
|
449
449
|
className: "text-xs text-status-success-text hover:opacity-80 px-2 py-1 rounded hover:bg-status-success-bg-subtle",
|
|
450
450
|
title: o("waitlist.approve", "Approve"),
|
|
451
451
|
children: o("waitlist.approve", "Approve")
|
|
452
|
-
}), /* @__PURE__ */
|
|
452
|
+
}), /* @__PURE__ */ y("button", {
|
|
453
453
|
type: "button",
|
|
454
454
|
onClick: i,
|
|
455
455
|
className: "text-xs text-status-error-text hover:opacity-80 px-2 py-1 rounded hover:bg-status-error-bg-subtle",
|
|
@@ -462,6 +462,6 @@ function k({ entry: e, onView: t, onApprove: r, onReject: i, formatDate: a }) {
|
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
464
|
//#endregion
|
|
465
|
-
export {
|
|
465
|
+
export { D as WaitlistListPage };
|
|
466
466
|
|
|
467
467
|
//# sourceMappingURL=WaitlistListPage.js.map
|