@burdenoff/microfe-headshotmarketing 2026.1203.1 → 2026.1203.3
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/generated/wspace-operations.d.ts +252 -0
- package/dist/generated/wspace-operations.js +406 -243
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +167 -2
- package/dist/generated/wspace-types.js +21 -19
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/CrmRecordSelection.js +88 -51
- package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +460 -275
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +433 -264
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { useHeadshotmarketingAddLandingPageSectionMutation as e, useHeadshotmarketingCreateLandingPageMutation as t,
|
|
2
|
-
import { HeadshotmarketingLandingPageSectionType as
|
|
1
|
+
import { useHeadshotmarketingAddLandingPageSectionMutation as e, useHeadshotmarketingCreateLandingPageMutation as t, useHeadshotmarketingLandingPageSubmissionsQuery as n, useHeadshotmarketingPublishLandingPageMutation as r, useHeadshotmarketingRemoveLandingPageSectionMutation as i, useHeadshotmarketingReorderLandingPageSectionsMutation as a, useHeadshotmarketingSelectedLandingPageQuery as o, useHeadshotmarketingUpdateLandingPageMutation as s, useHeadshotmarketingUpdateLandingPageSectionMutation as c } from "../../../generated/wspace-operations.js";
|
|
2
|
+
import { HeadshotmarketingLandingPageSectionType as l } from "../../../generated/wspace-types.js";
|
|
3
3
|
import "../../components/index.js";
|
|
4
|
-
import { cn as
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { Modal as
|
|
7
|
-
import { QueryStateBoundary as
|
|
8
|
-
import { metadataWithoutLayout as
|
|
9
|
-
import { useHeadshotmarketingBootstrap as
|
|
10
|
-
import { useHeadshotMarketing as
|
|
4
|
+
import { cn as u, formatDate as ee, joinPath as te } from "../../utils/helpers.js";
|
|
5
|
+
import { PageLayout as ne } from "../../components/PageLayout.js";
|
|
6
|
+
import { Modal as re } from "../../components/Modal.js";
|
|
7
|
+
import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
|
|
8
|
+
import { metadataWithoutLayout as ae, planSectionSync as oe, sectionFromRow as se, sectionsFromLegacyLayout as ce, sectionsFromRows as d, toBuilderTemplateModel as le } from "../../utils/builderMapper.js";
|
|
9
|
+
import { useHeadshotmarketingBootstrap as ue } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
10
|
+
import { useHeadshotMarketing as de } from "../../context/HeadshotMarketingContext.js";
|
|
11
11
|
import "../../hooks/index.js";
|
|
12
|
-
import { SECTION_CATALOG as
|
|
13
|
-
import { SectionCanvasBlock as
|
|
14
|
-
import { SectionInspector as
|
|
15
|
-
import { SectionContent as
|
|
16
|
-
import { starterContent as
|
|
17
|
-
import { useRecordSelection as
|
|
18
|
-
import { useEffect as
|
|
19
|
-
import { ArrowLeft as
|
|
20
|
-
import { useBeforeUnload as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { PagePurpose as
|
|
12
|
+
import { SECTION_CATALOG as fe, SectionThumbnail as pe, defaultConfig as f, sectionLabelFor as p } from "./builderCatalog.js";
|
|
13
|
+
import { SectionCanvasBlock as me } from "./SectionCanvasBlock.js";
|
|
14
|
+
import { SectionInspector as he } from "./SectionInspector.js";
|
|
15
|
+
import { SectionContent as ge } from "./SectionContent.js";
|
|
16
|
+
import { starterContent as m } from "./sectionSchema.js";
|
|
17
|
+
import { useRecordSelection as _e } from "../../hooks/useRecordSelection.js";
|
|
18
|
+
import { useEffect as ve, useLayoutEffect as ye, useMemo as be, useRef as h, useState as g } from "react";
|
|
19
|
+
import { ArrowLeft as xe, BarChart3 as Se, Edit3 as Ce, ExternalLink as _, Eye as we, Globe as Te, Layers as v, LayoutTemplate as Ee, Monitor as De, MousePointerClick as Oe, Plus as ke, RefreshCw as Ae, Save as je, Smartphone as Me, Tablet as Ne, UserCheck as Pe } from "lucide-react";
|
|
20
|
+
import { useBeforeUnload as Fe } from "react-router";
|
|
21
|
+
import { Fragment as Ie, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
22
|
+
import { PagePurpose as Le, ThemedSelect as Re } from "@burdenoff/fe-libs/ui";
|
|
23
23
|
// src/headshotmarketing/pages/builder/LandingPageBuilderPage.tsx
|
|
24
|
-
var
|
|
24
|
+
var x = "application/x-hm-palette", S = "application/x-hm-reorder", ze = [
|
|
25
25
|
"header",
|
|
26
26
|
"hero",
|
|
27
27
|
"features",
|
|
28
28
|
"testimonials",
|
|
29
29
|
"cta",
|
|
30
30
|
"footer"
|
|
31
|
-
],
|
|
32
|
-
function
|
|
33
|
-
return
|
|
31
|
+
], C = 0;
|
|
32
|
+
function Be() {
|
|
33
|
+
return C += 1, `sec-${Date.now().toString(36)}-${C}`;
|
|
34
34
|
}
|
|
35
35
|
function w(e) {
|
|
36
36
|
return {
|
|
37
|
-
id:
|
|
37
|
+
id: Be(),
|
|
38
38
|
type: e,
|
|
39
39
|
label: p(e),
|
|
40
40
|
config: {
|
|
41
41
|
...f(),
|
|
42
|
-
...
|
|
42
|
+
...m(e)
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
function T(e) {
|
|
47
|
-
return Object.values(
|
|
47
|
+
return Object.values(l).find((t) => t === e) ?? l.Custom;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Ve(e) {
|
|
50
50
|
return {
|
|
51
51
|
type: T(e.type),
|
|
52
52
|
title: e.title,
|
|
@@ -56,56 +56,56 @@ function Fe(e) {
|
|
|
56
56
|
metadata: e.metadata
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
let t =
|
|
59
|
+
function He(e) {
|
|
60
|
+
let t = d(e?.sections);
|
|
61
61
|
return t.length > 0 ? {
|
|
62
62
|
saved: t,
|
|
63
63
|
legacy: !1
|
|
64
64
|
} : {
|
|
65
65
|
saved: [],
|
|
66
|
-
legacy:
|
|
66
|
+
legacy: ce(e?.metadata).length > 0
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Ue(e) {
|
|
70
70
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "") || "landing-page";
|
|
71
71
|
}
|
|
72
|
-
var
|
|
73
|
-
let { selectedId: e, invalidSelection: t, selectRecord: n } =
|
|
72
|
+
var We = () => {
|
|
73
|
+
let { selectedId: e, invalidSelection: t, selectRecord: n } = _e(), { workspaceId: r } = de(), i = ue().data?.headshotmarketingLandingPages.items ?? [], a = o({
|
|
74
74
|
variables: { id: e ?? "" },
|
|
75
75
|
skip: !e,
|
|
76
76
|
fetchPolicy: "network-only"
|
|
77
|
-
}), s = h(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l =
|
|
78
|
-
return /* @__PURE__ */
|
|
77
|
+
}), s = h(/* @__PURE__ */ new Map()), c = `${r}:${e ?? "new"}`, l = a.data?.headshotmarketingLandingPage;
|
|
78
|
+
return /* @__PURE__ */ b(Ie, { children: [/* @__PURE__ */ b("label", {
|
|
79
79
|
className: "block p-4 text-sm text-text-primary",
|
|
80
|
-
children: ["Landing page", /* @__PURE__ */
|
|
80
|
+
children: ["Landing page", /* @__PURE__ */ b(Re, {
|
|
81
81
|
"aria-label": "Select landing page",
|
|
82
82
|
value: e ?? "",
|
|
83
83
|
onChange: (e) => n(e.target.value || null),
|
|
84
84
|
className: "ms-3 rounded-md border border-border-subtle bg-bg-surface p-2",
|
|
85
85
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ y("option", {
|
|
87
87
|
value: "",
|
|
88
88
|
children: "New landing page"
|
|
89
89
|
}),
|
|
90
|
-
e && !i.some((t) => t.id === e) && /* @__PURE__ */
|
|
90
|
+
e && !i.some((t) => t.id === e) && /* @__PURE__ */ y("option", {
|
|
91
91
|
value: e,
|
|
92
92
|
children: l?.title ?? "Selected landing page"
|
|
93
93
|
}),
|
|
94
|
-
i.map((e) => /* @__PURE__ */
|
|
94
|
+
i.map((e) => /* @__PURE__ */ y("option", {
|
|
95
95
|
value: e.id,
|
|
96
96
|
children: e.title
|
|
97
97
|
}, e.id))
|
|
98
98
|
]
|
|
99
99
|
})]
|
|
100
|
-
}), t || e && !
|
|
100
|
+
}), t || e && !a.loading && (a.error || !l || l.id !== e) ? /* @__PURE__ */ y("p", {
|
|
101
101
|
role: "alert",
|
|
102
102
|
className: "p-4",
|
|
103
103
|
children: "This landing page is unavailable or you do not have access. Choose another page or start a new one."
|
|
104
|
-
}) : e &&
|
|
104
|
+
}) : e && a.loading ? /* @__PURE__ */ y("p", {
|
|
105
105
|
role: "status",
|
|
106
106
|
className: "p-4",
|
|
107
107
|
children: "Loading landing page…"
|
|
108
|
-
}) : /* @__PURE__ */
|
|
108
|
+
}) : /* @__PURE__ */ y(Ge, {
|
|
109
109
|
landingPage: e ? l : void 0,
|
|
110
110
|
initialDraft: s.current.get(c),
|
|
111
111
|
rememberDraft: (e) => {
|
|
@@ -115,52 +115,62 @@ var Re = () => {
|
|
|
115
115
|
s.current.delete(c), n(e);
|
|
116
116
|
}
|
|
117
117
|
}, c)] });
|
|
118
|
-
},
|
|
119
|
-
let { navigate: p, basePath:
|
|
120
|
-
|
|
118
|
+
}, Ge = ({ landingPage: o, initialDraft: l, rememberDraft: d, onCreated: f }) => {
|
|
119
|
+
let { navigate: p, basePath: m } = de(), { data: _e, loading: Re, error: C, refetch: T } = ue(), [We, { loading: Ge }] = t(), [Ke, { loading: qe }] = s(), [Je, { loading: Ye }] = r(), [Xe] = e(), [Ze] = c(), [Qe] = i(), [$e] = a(), [et, E] = g(!1), [D, tt] = g(l?.landingPageId ?? o?.id ?? null), [O, k] = g(o?.status ?? "DRAFT"), [nt, A] = g(o?.publishedUrl ?? null), [j, M] = g(l?.pageName ?? o?.title ?? "Landing Page"), [N, rt] = g(l?.pageSlug ?? o?.slug ?? ""), [P, it] = g(l?.templateId ?? o?.templateId ?? null), [at, ot] = g("desktop"), [F, st] = g("editor"), [I, L] = g(null), [ct, R] = g(!1), [z, B] = g(null), [lt, V] = g(null), H = n({
|
|
120
|
+
variables: {
|
|
121
|
+
landingPageId: D ?? void 0,
|
|
122
|
+
pagination: {
|
|
123
|
+
limit: 50,
|
|
124
|
+
offset: 0
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
skip: !D,
|
|
128
|
+
fetchPolicy: "cache-and-network"
|
|
129
|
+
}), U = H.data?.headshotmarketingLandingPageSubmissions.items ?? [], W = H.data?.headshotmarketingLandingPageSubmissions.total ?? o?.submissionCount ?? o?.conversionCount ?? 0, G = o?.viewCount ?? 0, ut = G > 0 ? `${(W / G * 100).toFixed(1)}%` : "—", [dt, K] = g(null), [ft, q] = g(null), [J, pt] = g(null), mt = dt !== null || ft !== null, [ht, gt] = g(() => He(o).saved), _t = be(() => {
|
|
130
|
+
let { saved: e } = He(o);
|
|
121
131
|
if (e.length > 0) return e;
|
|
122
|
-
let t =
|
|
123
|
-
return t.length > 0 ? t :
|
|
124
|
-
}, [
|
|
125
|
-
landingPageId:
|
|
126
|
-
pageName:
|
|
127
|
-
pageSlug:
|
|
128
|
-
templateId:
|
|
129
|
-
sections:
|
|
130
|
-
})),
|
|
132
|
+
let t = ce(o?.metadata);
|
|
133
|
+
return t.length > 0 ? t : o ? [] : [w("hero")];
|
|
134
|
+
}, [o]), [Y, X] = g(l?.sections ?? _t), [vt, yt] = g(() => ({
|
|
135
|
+
landingPageId: o?.id ?? null,
|
|
136
|
+
pageName: o?.title ?? "Landing Page",
|
|
137
|
+
pageSlug: o?.slug ?? "",
|
|
138
|
+
templateId: o?.templateId ?? null,
|
|
139
|
+
sections: _t
|
|
140
|
+
})), bt = {
|
|
131
141
|
landingPageId: D,
|
|
132
142
|
pageName: j,
|
|
133
143
|
pageSlug: N,
|
|
134
144
|
templateId: P,
|
|
135
|
-
sections:
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
sections: Y
|
|
146
|
+
}, Z = JSON.stringify(bt) !== JSON.stringify(vt), xt = h(Z ? bt : null), St = h(!1), Ct = h(d);
|
|
147
|
+
ye(() => {
|
|
148
|
+
xt.current = Z ? {
|
|
139
149
|
landingPageId: D,
|
|
140
150
|
pageName: j,
|
|
141
151
|
pageSlug: N,
|
|
142
152
|
templateId: P,
|
|
143
|
-
sections:
|
|
144
|
-
} : null,
|
|
153
|
+
sections: Y
|
|
154
|
+
} : null, Ct.current = d;
|
|
145
155
|
}, [
|
|
146
156
|
D,
|
|
147
157
|
j,
|
|
148
158
|
N,
|
|
149
159
|
P,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
]),
|
|
154
|
-
|
|
155
|
-
}, []),
|
|
156
|
-
|
|
160
|
+
Y,
|
|
161
|
+
d,
|
|
162
|
+
Z
|
|
163
|
+
]), ve(() => () => {
|
|
164
|
+
St.current || Ct.current(xt.current);
|
|
165
|
+
}, []), Fe((e) => {
|
|
166
|
+
Z && (e.preventDefault(), e.returnValue = "");
|
|
157
167
|
});
|
|
158
|
-
let
|
|
168
|
+
let wt = (_e?.headshotmarketingCampaignTemplates.items ?? []).map((e) => le(e)), Tt = {
|
|
159
169
|
desktop: "w-full",
|
|
160
170
|
tablet: "max-w-[768px]",
|
|
161
171
|
mobile: "max-w-[390px]"
|
|
162
|
-
},
|
|
163
|
-
|
|
172
|
+
}, Q = be(() => Y.find((e) => e.id === I) ?? null, [Y, I]), Et = (e, t) => {
|
|
173
|
+
X((n) => {
|
|
164
174
|
let r = n.findIndex((t) => t.id === e);
|
|
165
175
|
if (r === -1) return n;
|
|
166
176
|
let i = t === "up" ? r - 1 : r + 1;
|
|
@@ -168,108 +178,108 @@ var Re = () => {
|
|
|
168
178
|
let a = [...n];
|
|
169
179
|
return [a[r], a[i]] = [a[i], a[r]], a;
|
|
170
180
|
});
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
},
|
|
174
|
-
|
|
181
|
+
}, Dt = (e) => {
|
|
182
|
+
X((t) => t.filter((t) => t.id !== e)), I === e && L(null);
|
|
183
|
+
}, Ot = (e) => {
|
|
184
|
+
X((t) => {
|
|
175
185
|
let n = t.findIndex((t) => t.id === e);
|
|
176
186
|
if (n === -1) return t;
|
|
177
187
|
let r = {
|
|
178
188
|
...t[n],
|
|
179
|
-
id:
|
|
189
|
+
id: Be(),
|
|
180
190
|
label: `${t[n].label} copy`,
|
|
181
191
|
config: { ...t[n].config }
|
|
182
192
|
}, i = [...t];
|
|
183
|
-
return i.splice(n + 1, 0, r),
|
|
193
|
+
return i.splice(n + 1, 0, r), L(r.id), i;
|
|
184
194
|
});
|
|
185
|
-
},
|
|
195
|
+
}, kt = (e) => {
|
|
186
196
|
let t = w(e);
|
|
187
|
-
|
|
188
|
-
},
|
|
197
|
+
X((e) => [...e, t]), L(t.id);
|
|
198
|
+
}, At = (e, t) => {
|
|
189
199
|
let n = w(e);
|
|
190
|
-
|
|
200
|
+
X((e) => {
|
|
191
201
|
let r = [...e];
|
|
192
202
|
return r.splice(Math.min(Math.max(t, 0), r.length), 0, n), r;
|
|
193
|
-
}),
|
|
194
|
-
},
|
|
195
|
-
|
|
203
|
+
}), L(n.id);
|
|
204
|
+
}, jt = (e, t) => {
|
|
205
|
+
X((n) => {
|
|
196
206
|
let r = n.findIndex((t) => t.id === e);
|
|
197
207
|
if (r === -1) return n;
|
|
198
208
|
let i = [...n], [a] = i.splice(r, 1), o = r < t ? t - 1 : t;
|
|
199
209
|
return i.splice(Math.min(Math.max(o, 0), i.length), 0, a), i;
|
|
200
210
|
});
|
|
201
|
-
},
|
|
202
|
-
|
|
211
|
+
}, Mt = (e, t) => {
|
|
212
|
+
X((n) => n.map((n) => n.id === e ? {
|
|
203
213
|
...n,
|
|
204
214
|
config: {
|
|
205
215
|
...n.config,
|
|
206
216
|
...t
|
|
207
217
|
}
|
|
208
218
|
} : n));
|
|
209
|
-
},
|
|
210
|
-
|
|
219
|
+
}, Nt = (e, t) => {
|
|
220
|
+
X((n) => n.map((n) => n.id === e ? {
|
|
211
221
|
...n,
|
|
212
222
|
label: t
|
|
213
223
|
} : n));
|
|
214
|
-
},
|
|
215
|
-
t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(
|
|
216
|
-
},
|
|
217
|
-
t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
},
|
|
221
|
-
let n = t.dataTransfer.types, r = n.includes(
|
|
222
|
-
(r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy",
|
|
223
|
-
},
|
|
224
|
+
}, Pt = (e) => (t) => {
|
|
225
|
+
t.dataTransfer.effectAllowed = "copy", t.dataTransfer.setData(x, e), q(e), K(null);
|
|
226
|
+
}, Ft = (e) => (t) => {
|
|
227
|
+
t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData(S, e), K(e), q(null);
|
|
228
|
+
}, It = () => {
|
|
229
|
+
K(null), q(null), pt(null);
|
|
230
|
+
}, Lt = (e) => (t) => {
|
|
231
|
+
let n = t.dataTransfer.types, r = n.includes(S), i = n.includes(x);
|
|
232
|
+
(r || i) && (t.preventDefault(), t.dataTransfer.dropEffect = r ? "move" : "copy", pt(e));
|
|
233
|
+
}, Rt = (e) => (t) => {
|
|
224
234
|
t.preventDefault();
|
|
225
|
-
let n = t.dataTransfer.getData(
|
|
226
|
-
n ?
|
|
227
|
-
},
|
|
228
|
-
M(e.name),
|
|
229
|
-
},
|
|
230
|
-
let t =
|
|
231
|
-
for (let e of t.removeIds) await
|
|
235
|
+
let n = t.dataTransfer.getData(x), r = t.dataTransfer.getData(S);
|
|
236
|
+
n ? At(n, e) : r && jt(r, e), It();
|
|
237
|
+
}, zt = (e) => {
|
|
238
|
+
M(e.name), it(e.id), X(ze.map((e) => w(e))), L(null), V(`Applied "${e.name}" template — Save to keep it.`);
|
|
239
|
+
}, Bt = async (e) => {
|
|
240
|
+
let t = oe(ht, Y), n = /* @__PURE__ */ new Map();
|
|
241
|
+
for (let e of t.removeIds) await Qe({ variables: { id: e } });
|
|
232
242
|
for (let r of t.adds) {
|
|
233
|
-
let t = (await
|
|
243
|
+
let t = (await Xe({ variables: { input: {
|
|
234
244
|
landingPageId: e,
|
|
235
245
|
sortOrder: r.sortOrder,
|
|
236
|
-
...
|
|
246
|
+
...Ve(r.input)
|
|
237
247
|
} } })).data?.headshotmarketingAddLandingPageSection;
|
|
238
248
|
if (!t) throw Error("Failed to save a section.");
|
|
239
249
|
n.set(r.localId, t.id);
|
|
240
250
|
}
|
|
241
|
-
for (let e of t.updates) await
|
|
251
|
+
for (let e of t.updates) await Ze({ variables: {
|
|
242
252
|
id: e.id,
|
|
243
|
-
input:
|
|
253
|
+
input: Ve(e.input)
|
|
244
254
|
} });
|
|
245
|
-
let r =
|
|
255
|
+
let r = Y.map((e) => ({
|
|
246
256
|
...e,
|
|
247
257
|
id: n.get(e.id) ?? e.id
|
|
248
258
|
}));
|
|
249
259
|
if (t.reorder) {
|
|
250
|
-
let t = (await
|
|
260
|
+
let t = (await $e({ variables: { input: {
|
|
251
261
|
landingPageId: e,
|
|
252
262
|
sectionIds: r.map((e) => e.id)
|
|
253
263
|
} } })).data?.headshotmarketingReorderLandingPageSections?.sections;
|
|
254
|
-
|
|
255
|
-
} else
|
|
256
|
-
return
|
|
257
|
-
},
|
|
258
|
-
if (!j.trim()) return
|
|
259
|
-
|
|
264
|
+
gt(t ? t.map((e) => se(e)) : r);
|
|
265
|
+
} else gt(r);
|
|
266
|
+
return X(r), L((e) => e && (n.get(e) ?? e)), r;
|
|
267
|
+
}, Vt = async () => {
|
|
268
|
+
if (!j.trim()) return B("Page name is required."), null;
|
|
269
|
+
B(null);
|
|
260
270
|
try {
|
|
261
271
|
if (D) {
|
|
262
272
|
let e = {
|
|
263
273
|
title: j.trim(),
|
|
264
274
|
templateId: P ?? void 0,
|
|
265
|
-
metadata:
|
|
266
|
-
}, t = (await
|
|
275
|
+
metadata: ae(o?.metadata)
|
|
276
|
+
}, t = (await Ke({ variables: {
|
|
267
277
|
id: D,
|
|
268
278
|
input: e
|
|
269
279
|
} })).data?.headshotmarketingUpdateLandingPage;
|
|
270
280
|
t && (k(t.status), A(t.publishedUrl ?? null)), E(!0);
|
|
271
|
-
let n = await
|
|
272
|
-
return M(j.trim()),
|
|
281
|
+
let n = await Bt(D);
|
|
282
|
+
return M(j.trim()), yt({
|
|
273
283
|
landingPageId: D,
|
|
274
284
|
pageName: j.trim(),
|
|
275
285
|
pageSlug: N,
|
|
@@ -279,13 +289,13 @@ var Re = () => {
|
|
|
279
289
|
}
|
|
280
290
|
let e = {
|
|
281
291
|
title: j.trim(),
|
|
282
|
-
slug: `${
|
|
292
|
+
slug: `${Ue(j)}-${Date.now().toString(36)}`,
|
|
283
293
|
templateId: P ?? void 0
|
|
284
|
-
}, t = (await
|
|
285
|
-
if (!t) return
|
|
286
|
-
|
|
287
|
-
let n = await
|
|
288
|
-
return M(j.trim()),
|
|
294
|
+
}, t = (await We({ variables: { input: e } })).data?.headshotmarketingCreateLandingPage;
|
|
295
|
+
if (!t) return B("Failed to create landing page."), null;
|
|
296
|
+
tt(t.id), k(t.status), A(t.publishedUrl ?? null), rt(t.slug), E(!0);
|
|
297
|
+
let n = await Bt(t.id);
|
|
298
|
+
return M(j.trim()), yt({
|
|
289
299
|
landingPageId: t.id,
|
|
290
300
|
pageName: j.trim(),
|
|
291
301
|
pageSlug: t.slug,
|
|
@@ -293,82 +303,82 @@ var Re = () => {
|
|
|
293
303
|
sections: n
|
|
294
304
|
}), t.id;
|
|
295
305
|
} catch (e) {
|
|
296
|
-
return
|
|
306
|
+
return B(e instanceof Error ? e.message : "Failed to save landing page."), null;
|
|
297
307
|
} finally {
|
|
298
308
|
E(!1);
|
|
299
309
|
}
|
|
300
|
-
},
|
|
301
|
-
let e = await
|
|
302
|
-
e && (
|
|
303
|
-
},
|
|
304
|
-
let e = await
|
|
310
|
+
}, Ht = async () => {
|
|
311
|
+
let e = await Vt();
|
|
312
|
+
e && (V("Landing page saved."), o || (St.current = !0, f(e)), T());
|
|
313
|
+
}, Ut = async () => {
|
|
314
|
+
let e = await Vt();
|
|
305
315
|
if (e) try {
|
|
306
|
-
let t = (await
|
|
307
|
-
t && (k(t.status), A(t.publishedUrl ?? null),
|
|
316
|
+
let t = (await Je({ variables: { id: e } })).data?.headshotmarketingPublishLandingPage;
|
|
317
|
+
t && (k(t.status), A(t.publishedUrl ?? null), V("Landing page published."), t.publishedUrl && window.open(t.publishedUrl, "_blank", "noopener,noreferrer")), o || (St.current = !0, f(e)), T();
|
|
308
318
|
} catch (e) {
|
|
309
|
-
|
|
319
|
+
B(e instanceof Error ? e.message : "Failed to publish landing page.");
|
|
310
320
|
}
|
|
311
|
-
},
|
|
312
|
-
return /* @__PURE__ */
|
|
321
|
+
}, Wt = Ge || qe || et, $ = nt && O === "PUBLISHED" ? nt : null, Gt = $ ?? `/lp/${N || Ue(j)}`;
|
|
322
|
+
return /* @__PURE__ */ b(ne, {
|
|
313
323
|
title: "Landing Page Builder",
|
|
314
|
-
actions: /* @__PURE__ */
|
|
324
|
+
actions: /* @__PURE__ */ b("div", {
|
|
315
325
|
className: "flex flex-wrap items-center gap-2",
|
|
316
326
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
318
|
-
onClick: () => p(
|
|
327
|
+
/* @__PURE__ */ b("button", {
|
|
328
|
+
onClick: () => p(m),
|
|
319
329
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ y(xe, { className: "h-4 w-4" }), "Back"]
|
|
321
331
|
}),
|
|
322
|
-
$ && /* @__PURE__ */
|
|
332
|
+
$ && /* @__PURE__ */ b("a", {
|
|
323
333
|
href: $,
|
|
324
334
|
target: "_blank",
|
|
325
335
|
rel: "noreferrer",
|
|
326
336
|
"data-testid": "builder-open-live",
|
|
327
337
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "View live"]
|
|
329
339
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
onClick: () =>
|
|
340
|
+
/* @__PURE__ */ b("button", {
|
|
341
|
+
onClick: () => R(!0),
|
|
332
342
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ y(we, { className: "h-4 w-4" }), "Preview"]
|
|
334
344
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
-
onClick: () => void
|
|
337
|
-
disabled:
|
|
345
|
+
/* @__PURE__ */ b("button", {
|
|
346
|
+
onClick: () => void Ht(),
|
|
347
|
+
disabled: Wt,
|
|
338
348
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ y(je, { className: "h-4 w-4" }), Wt ? "Saving…" : "Save"]
|
|
340
350
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
onClick: () => void
|
|
343
|
-
disabled:
|
|
351
|
+
/* @__PURE__ */ b("button", {
|
|
352
|
+
onClick: () => void Ut(),
|
|
353
|
+
disabled: Wt || Ye,
|
|
344
354
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-60",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ y(Te, { className: "h-4 w-4" }), Ye ? "Publishing…" : "Publish"]
|
|
346
356
|
})
|
|
347
357
|
]
|
|
348
358
|
}),
|
|
349
359
|
children: [
|
|
350
|
-
/* @__PURE__ */
|
|
351
|
-
|
|
360
|
+
/* @__PURE__ */ y(Le, { children: "Build a campaign landing page without code. Start from a template, drag in sections (hero, features, testimonials, forms), edit the copy and style live, preview how it looks on desktop and mobile, then publish it to capture leads for the campaign you're promoting." }),
|
|
361
|
+
z && /* @__PURE__ */ y("div", {
|
|
352
362
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
353
|
-
children:
|
|
363
|
+
children: z
|
|
354
364
|
}),
|
|
355
|
-
|
|
365
|
+
lt && !z && /* @__PURE__ */ b("div", {
|
|
356
366
|
className: "flex items-center justify-between gap-3 rounded-lg border border-status-success-border/30 bg-status-success-bg/10 px-4 py-3 text-sm text-status-success-text",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ y("span", { children: lt }), $ && /* @__PURE__ */ b("a", {
|
|
358
368
|
href: $,
|
|
359
369
|
target: "_blank",
|
|
360
370
|
rel: "noreferrer",
|
|
361
371
|
className: "inline-flex items-center gap-1 font-medium underline",
|
|
362
|
-
children: ["View live ", /* @__PURE__ */
|
|
372
|
+
children: ["View live ", /* @__PURE__ */ y(_, { className: "h-3 w-3" })]
|
|
363
373
|
})]
|
|
364
374
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ y("div", {
|
|
366
376
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4",
|
|
367
|
-
children: /* @__PURE__ */
|
|
377
|
+
children: /* @__PURE__ */ b("div", {
|
|
368
378
|
className: "flex flex-wrap items-center gap-3",
|
|
369
379
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ y(Ce, { className: "h-4 w-4 text-text-secondary" }),
|
|
381
|
+
/* @__PURE__ */ y("input", {
|
|
372
382
|
type: "text",
|
|
373
383
|
"aria-label": "Page name",
|
|
374
384
|
value: j,
|
|
@@ -376,61 +386,236 @@ var Re = () => {
|
|
|
376
386
|
className: "text-lg font-semibold text-text-primary bg-transparent border-none outline-none flex-1 min-w-[12rem] placeholder:text-text-secondary",
|
|
377
387
|
placeholder: "Page name"
|
|
378
388
|
}),
|
|
379
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ b("span", {
|
|
380
390
|
className: "hidden items-center gap-1.5 text-xs text-text-secondary sm:inline-flex",
|
|
381
391
|
children: [
|
|
382
|
-
/* @__PURE__ */ v
|
|
383
|
-
|
|
392
|
+
/* @__PURE__ */ y(v, { className: "h-3.5 w-3.5" }),
|
|
393
|
+
Y.length,
|
|
384
394
|
" ",
|
|
385
|
-
|
|
395
|
+
Y.length === 1 ? "section" : "sections"
|
|
386
396
|
]
|
|
387
397
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
398
|
+
/* @__PURE__ */ b("span", {
|
|
399
|
+
"data-testid": "landing-page-submission-count",
|
|
400
|
+
className: "inline-flex items-center gap-1.5 rounded-full border border-border-subtle bg-bg-surface px-2.5 py-0.5 text-xs font-medium text-text-primary",
|
|
401
|
+
children: [
|
|
402
|
+
/* @__PURE__ */ y(Pe, { className: "h-3.5 w-3.5 text-primary" }),
|
|
403
|
+
W,
|
|
404
|
+
" ",
|
|
405
|
+
W === 1 ? "submission" : "submissions"
|
|
406
|
+
]
|
|
407
|
+
}),
|
|
408
|
+
/* @__PURE__ */ y("span", {
|
|
409
|
+
className: u("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-medium capitalize", O === "PUBLISHED" ? "border-status-success-border bg-status-success-bg text-status-success-text" : "border-border-subtle bg-bg-sunken text-text-secondary"),
|
|
390
410
|
children: O.toLowerCase()
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ b("div", {
|
|
413
|
+
role: "tablist",
|
|
414
|
+
"aria-label": "Landing page view",
|
|
415
|
+
className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
|
|
416
|
+
children: [/* @__PURE__ */ b("button", {
|
|
417
|
+
type: "button",
|
|
418
|
+
role: "tab",
|
|
419
|
+
"aria-selected": F === "editor",
|
|
420
|
+
onClick: () => st("editor"),
|
|
421
|
+
className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", F === "editor" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
422
|
+
children: [/* @__PURE__ */ y(v, { className: "h-3.5 w-3.5" }), "Editor"]
|
|
423
|
+
}), /* @__PURE__ */ b("button", {
|
|
424
|
+
type: "button",
|
|
425
|
+
role: "tab",
|
|
426
|
+
"data-testid": "builder-analytics-tab",
|
|
427
|
+
"aria-selected": F === "analytics",
|
|
428
|
+
onClick: () => st("analytics"),
|
|
429
|
+
className: u("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", F === "analytics" ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
430
|
+
children: [
|
|
431
|
+
/* @__PURE__ */ y(Se, { className: "h-3.5 w-3.5" }),
|
|
432
|
+
"Submissions (",
|
|
433
|
+
W,
|
|
434
|
+
")"
|
|
435
|
+
]
|
|
436
|
+
})]
|
|
391
437
|
})
|
|
392
438
|
]
|
|
393
439
|
})
|
|
394
440
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
loading:
|
|
397
|
-
error:
|
|
441
|
+
/* @__PURE__ */ y(ie, {
|
|
442
|
+
loading: Re,
|
|
443
|
+
error: C,
|
|
398
444
|
onRetry: T,
|
|
399
|
-
hasData: !!
|
|
400
|
-
children: /* @__PURE__ */
|
|
445
|
+
hasData: !!_e,
|
|
446
|
+
children: F === "analytics" ? /* @__PURE__ */ b("div", {
|
|
447
|
+
"data-testid": "landing-page-analytics-panel",
|
|
448
|
+
className: "space-y-4",
|
|
449
|
+
children: [/* @__PURE__ */ b("div", {
|
|
450
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
451
|
+
children: [
|
|
452
|
+
/* @__PURE__ */ b("div", {
|
|
453
|
+
className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
|
|
454
|
+
children: [/* @__PURE__ */ y("p", {
|
|
455
|
+
className: "text-xs font-medium text-text-secondary",
|
|
456
|
+
children: "Form Submissions"
|
|
457
|
+
}), /* @__PURE__ */ y("p", {
|
|
458
|
+
className: "mt-1 text-2xl font-bold text-text-primary",
|
|
459
|
+
children: W
|
|
460
|
+
})]
|
|
461
|
+
}),
|
|
462
|
+
/* @__PURE__ */ b("div", {
|
|
463
|
+
className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
|
|
464
|
+
children: [/* @__PURE__ */ y("p", {
|
|
465
|
+
className: "text-xs font-medium text-text-secondary",
|
|
466
|
+
children: "Page Views"
|
|
467
|
+
}), /* @__PURE__ */ y("p", {
|
|
468
|
+
className: "mt-1 text-2xl font-bold text-text-primary",
|
|
469
|
+
children: G
|
|
470
|
+
})]
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ b("div", {
|
|
473
|
+
className: "rounded-card border border-border-seam bg-gloss-card p-4 shadow-pop",
|
|
474
|
+
children: [/* @__PURE__ */ y("p", {
|
|
475
|
+
className: "text-xs font-medium text-text-secondary",
|
|
476
|
+
children: "Conversion Rate"
|
|
477
|
+
}), /* @__PURE__ */ y("p", {
|
|
478
|
+
className: "mt-1 text-2xl font-bold text-text-primary",
|
|
479
|
+
children: ut
|
|
480
|
+
})]
|
|
481
|
+
})
|
|
482
|
+
]
|
|
483
|
+
}), /* @__PURE__ */ b("div", {
|
|
484
|
+
className: "rounded-card border border-border-seam bg-gloss-card p-5 shadow-pop",
|
|
485
|
+
children: [/* @__PURE__ */ b("div", {
|
|
486
|
+
className: "mb-4 flex items-center justify-between gap-3",
|
|
487
|
+
children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
|
|
488
|
+
className: "text-sm font-semibold text-text-primary",
|
|
489
|
+
children: "CRM-Wired Form Submissions"
|
|
490
|
+
}), /* @__PURE__ */ y("p", {
|
|
491
|
+
className: "text-xs text-text-secondary",
|
|
492
|
+
children: "Every submission on this published landing page creates or updates a CRM Contact in your workspace."
|
|
493
|
+
})] }), D && /* @__PURE__ */ b("button", {
|
|
494
|
+
type: "button",
|
|
495
|
+
onClick: () => void H.refetch(),
|
|
496
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
497
|
+
children: [/* @__PURE__ */ y(Ae, { className: "h-3.5 w-3.5" }), "Refresh"]
|
|
498
|
+
})]
|
|
499
|
+
}), D ? H.loading && U.length === 0 ? /* @__PURE__ */ y("p", {
|
|
500
|
+
className: "py-6 text-center text-sm text-text-secondary",
|
|
501
|
+
children: "Loading submissions…"
|
|
502
|
+
}) : U.length === 0 ? /* @__PURE__ */ y("p", {
|
|
503
|
+
className: "py-6 text-center text-sm text-text-secondary",
|
|
504
|
+
children: "No form submissions recorded for this landing page yet."
|
|
505
|
+
}) : /* @__PURE__ */ y("div", {
|
|
506
|
+
className: "overflow-x-auto",
|
|
507
|
+
children: /* @__PURE__ */ b("table", {
|
|
508
|
+
className: "w-full text-sm",
|
|
509
|
+
children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
|
|
510
|
+
className: "border-b border-border-subtle text-start text-xs text-text-secondary",
|
|
511
|
+
children: [
|
|
512
|
+
/* @__PURE__ */ y("th", {
|
|
513
|
+
className: "py-2 pe-4 font-medium",
|
|
514
|
+
children: "Contact"
|
|
515
|
+
}),
|
|
516
|
+
/* @__PURE__ */ y("th", {
|
|
517
|
+
className: "py-2 pe-4 font-medium",
|
|
518
|
+
children: "Company"
|
|
519
|
+
}),
|
|
520
|
+
/* @__PURE__ */ y("th", {
|
|
521
|
+
className: "py-2 pe-4 font-medium",
|
|
522
|
+
children: "Source / UTM"
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ y("th", {
|
|
525
|
+
className: "py-2 pe-4 font-medium",
|
|
526
|
+
children: "Submitted"
|
|
527
|
+
}),
|
|
528
|
+
/* @__PURE__ */ y("th", {
|
|
529
|
+
className: "py-2 pe-4 font-medium",
|
|
530
|
+
children: "CRM"
|
|
531
|
+
})
|
|
532
|
+
]
|
|
533
|
+
}) }), /* @__PURE__ */ y("tbody", { children: U.map((e) => {
|
|
534
|
+
let t = [e.firstName, e.lastName].filter(Boolean).join(" "), n = [
|
|
535
|
+
e.utmSource,
|
|
536
|
+
e.utmMedium,
|
|
537
|
+
e.utmCampaign
|
|
538
|
+
].filter(Boolean).join(" / ");
|
|
539
|
+
return /* @__PURE__ */ b("tr", {
|
|
540
|
+
className: "border-b border-border-subtle/60 last:border-0",
|
|
541
|
+
children: [
|
|
542
|
+
/* @__PURE__ */ b("td", {
|
|
543
|
+
className: "py-2.5 pe-4",
|
|
544
|
+
children: [/* @__PURE__ */ y("p", {
|
|
545
|
+
className: "font-medium text-text-primary",
|
|
546
|
+
children: t || e.email
|
|
547
|
+
}), /* @__PURE__ */ y("p", {
|
|
548
|
+
className: "text-xs text-text-secondary",
|
|
549
|
+
children: e.email
|
|
550
|
+
})]
|
|
551
|
+
}),
|
|
552
|
+
/* @__PURE__ */ y("td", {
|
|
553
|
+
className: "py-2.5 pe-4 text-text-secondary",
|
|
554
|
+
children: e.company || "—"
|
|
555
|
+
}),
|
|
556
|
+
/* @__PURE__ */ y("td", {
|
|
557
|
+
className: "py-2.5 pe-4 text-xs text-text-secondary",
|
|
558
|
+
children: n || "Direct"
|
|
559
|
+
}),
|
|
560
|
+
/* @__PURE__ */ y("td", {
|
|
561
|
+
className: "py-2.5 pe-4 text-xs text-text-secondary",
|
|
562
|
+
children: ee(e.createdAt)
|
|
563
|
+
}),
|
|
564
|
+
/* @__PURE__ */ y("td", {
|
|
565
|
+
className: "py-2.5 pe-4",
|
|
566
|
+
children: e.contactId ? /* @__PURE__ */ y("button", {
|
|
567
|
+
type: "button",
|
|
568
|
+
onClick: () => p(`${te(m, "crm/contacts")}?selected=${encodeURIComponent(e.contactId)}`),
|
|
569
|
+
className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-2.5 py-1 text-xs font-medium text-primary hover:bg-bg-sunken",
|
|
570
|
+
children: "View contact"
|
|
571
|
+
}) : /* @__PURE__ */ y("span", {
|
|
572
|
+
className: "text-xs text-text-secondary",
|
|
573
|
+
children: "—"
|
|
574
|
+
})
|
|
575
|
+
})
|
|
576
|
+
]
|
|
577
|
+
}, e.id);
|
|
578
|
+
}) })]
|
|
579
|
+
})
|
|
580
|
+
}) : /* @__PURE__ */ y("p", {
|
|
581
|
+
className: "py-6 text-center text-sm text-text-secondary",
|
|
582
|
+
children: "Save and publish this landing page to start collecting form submissions into CRM."
|
|
583
|
+
})]
|
|
584
|
+
})]
|
|
585
|
+
}) : /* @__PURE__ */ b("div", {
|
|
401
586
|
className: "grid grid-cols-1 gap-4 lg:grid-cols-12",
|
|
402
587
|
children: [
|
|
403
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ b("aside", {
|
|
404
589
|
className: "space-y-4 lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ b("div", {
|
|
406
591
|
className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
|
|
407
592
|
children: [
|
|
408
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ b("h4", {
|
|
409
594
|
className: "mb-1 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
410
|
-
children: [/* @__PURE__ */ v
|
|
595
|
+
children: [/* @__PURE__ */ y(v, { className: "h-4 w-4 text-text-secondary" }), "Section blocks"]
|
|
411
596
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ y("p", {
|
|
413
598
|
className: "mb-3 text-[11px] text-text-secondary",
|
|
414
599
|
children: "Click to append, or drag onto the canvas."
|
|
415
600
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ y("div", {
|
|
417
602
|
className: "grid grid-cols-2 gap-2",
|
|
418
|
-
children:
|
|
603
|
+
children: fe.map((e) => {
|
|
419
604
|
let t = e.icon;
|
|
420
|
-
return /* @__PURE__ */
|
|
605
|
+
return /* @__PURE__ */ b("button", {
|
|
421
606
|
type: "button",
|
|
422
607
|
draggable: !0,
|
|
423
|
-
onDragStart:
|
|
424
|
-
onDragEnd:
|
|
425
|
-
onClick: () =>
|
|
608
|
+
onDragStart: Pt(e.type),
|
|
609
|
+
onDragEnd: It,
|
|
610
|
+
onClick: () => kt(e.type),
|
|
426
611
|
title: e.description,
|
|
427
612
|
className: "group flex cursor-grab flex-col gap-2 rounded-lg border border-border-subtle bg-bg-surface p-2 text-start transition-all hover:border-border-strong hover:shadow-pop active:cursor-grabbing",
|
|
428
|
-
children: [/* @__PURE__ */
|
|
613
|
+
children: [/* @__PURE__ */ y("div", {
|
|
429
614
|
className: "h-12 overflow-hidden rounded-md border border-border-subtle/60 bg-bg-sunken/50 p-1.5",
|
|
430
|
-
children: /* @__PURE__ */
|
|
431
|
-
}), /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ y(pe, { type: e.type })
|
|
616
|
+
}), /* @__PURE__ */ b("div", {
|
|
432
617
|
className: "flex items-center gap-1.5",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
618
|
+
children: [/* @__PURE__ */ y(t, { className: "h-3.5 w-3.5 text-text-secondary group-hover:text-primary" }), /* @__PURE__ */ y("span", {
|
|
434
619
|
className: "text-xs font-medium text-text-primary",
|
|
435
620
|
children: e.label
|
|
436
621
|
})]
|
|
@@ -439,30 +624,30 @@ var Re = () => {
|
|
|
439
624
|
})
|
|
440
625
|
})
|
|
441
626
|
]
|
|
442
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ b("div", {
|
|
443
628
|
className: "rounded-card border border-border-seam bg-gloss-card shadow-pop p-4",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
629
|
+
children: [/* @__PURE__ */ b("h4", {
|
|
445
630
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
446
|
-
children: [/* @__PURE__ */
|
|
447
|
-
}), /* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ y(Ee, { className: "h-4 w-4 text-text-secondary" }), "Templates"]
|
|
632
|
+
}), /* @__PURE__ */ b("div", {
|
|
448
633
|
className: "space-y-2",
|
|
449
|
-
children: [
|
|
634
|
+
children: [wt.length === 0 && /* @__PURE__ */ y("p", {
|
|
450
635
|
className: "text-xs text-text-secondary",
|
|
451
636
|
children: "No templates yet. Create a campaign template to reuse it here."
|
|
452
|
-
}),
|
|
637
|
+
}), wt.map((e) => /* @__PURE__ */ b("button", {
|
|
453
638
|
type: "button",
|
|
454
|
-
onClick: () =>
|
|
455
|
-
className:
|
|
639
|
+
onClick: () => zt(e),
|
|
640
|
+
className: u("flex w-full flex-col items-start rounded-md border px-3 py-2.5 text-start transition-colors", P === e.id ? "border-primary bg-action-primary-bg/5" : "border-border-subtle hover:bg-bg-sunken"),
|
|
456
641
|
children: [
|
|
457
|
-
/* @__PURE__ */
|
|
642
|
+
/* @__PURE__ */ y("span", {
|
|
458
643
|
className: "text-sm font-medium text-text-primary",
|
|
459
644
|
children: e.name
|
|
460
645
|
}),
|
|
461
|
-
e.description && /* @__PURE__ */
|
|
646
|
+
e.description && /* @__PURE__ */ y("span", {
|
|
462
647
|
className: "mt-0.5 text-[10px] text-text-secondary",
|
|
463
648
|
children: e.description
|
|
464
649
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ y("span", {
|
|
466
651
|
className: "mt-1 rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] capitalize text-text-secondary",
|
|
467
652
|
children: e.category
|
|
468
653
|
})
|
|
@@ -471,128 +656,128 @@ var Re = () => {
|
|
|
471
656
|
})]
|
|
472
657
|
})]
|
|
473
658
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
659
|
+
/* @__PURE__ */ b("div", {
|
|
475
660
|
className: "min-w-0 lg:col-span-6",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
661
|
+
children: [/* @__PURE__ */ y("div", {
|
|
477
662
|
className: "mb-4 flex justify-center",
|
|
478
|
-
children: /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ y("div", {
|
|
479
664
|
className: "inline-flex items-center gap-0.5 rounded-lg border border-border-subtle bg-bg-surface p-0.5",
|
|
480
665
|
children: [
|
|
481
666
|
{
|
|
482
667
|
key: "desktop",
|
|
483
|
-
icon:
|
|
668
|
+
icon: De,
|
|
484
669
|
label: "Desktop"
|
|
485
670
|
},
|
|
486
671
|
{
|
|
487
672
|
key: "tablet",
|
|
488
|
-
icon:
|
|
673
|
+
icon: Ne,
|
|
489
674
|
label: "Tablet"
|
|
490
675
|
},
|
|
491
676
|
{
|
|
492
677
|
key: "mobile",
|
|
493
|
-
icon:
|
|
678
|
+
icon: Me,
|
|
494
679
|
label: "Mobile"
|
|
495
680
|
}
|
|
496
681
|
].map((e) => {
|
|
497
|
-
let t = e.icon, n =
|
|
498
|
-
return /* @__PURE__ */
|
|
499
|
-
onClick: () =>
|
|
682
|
+
let t = e.icon, n = at === e.key;
|
|
683
|
+
return /* @__PURE__ */ b("button", {
|
|
684
|
+
onClick: () => ot(e.key),
|
|
500
685
|
title: e.label,
|
|
501
686
|
"aria-label": e.label,
|
|
502
687
|
"aria-pressed": n,
|
|
503
|
-
className:
|
|
504
|
-
children: [/* @__PURE__ */
|
|
688
|
+
className: u("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors", n ? "bg-action-primary-bg text-action-primary-text" : "text-text-secondary hover:text-text-primary"),
|
|
689
|
+
children: [/* @__PURE__ */ y(t, { className: "h-4 w-4" }), /* @__PURE__ */ y("span", {
|
|
505
690
|
className: "hidden sm:inline",
|
|
506
691
|
children: e.label
|
|
507
692
|
})]
|
|
508
693
|
}, e.key);
|
|
509
694
|
})
|
|
510
695
|
})
|
|
511
|
-
}), /* @__PURE__ */
|
|
512
|
-
className:
|
|
513
|
-
children: [/* @__PURE__ */
|
|
696
|
+
}), /* @__PURE__ */ b("div", {
|
|
697
|
+
className: u("mx-auto overflow-hidden rounded-card border border-border-seam bg-bg-canvas shadow-pop transition-all", Tt[at]),
|
|
698
|
+
children: [/* @__PURE__ */ b("div", {
|
|
514
699
|
className: "flex items-center gap-2 border-b border-border-subtle bg-bg-sunken/60 px-4 py-2.5",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
700
|
+
children: [/* @__PURE__ */ b("div", {
|
|
516
701
|
className: "flex gap-1.5",
|
|
517
702
|
children: [
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-bg" }),
|
|
704
|
+
/* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-bg" }),
|
|
705
|
+
/* @__PURE__ */ y("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-bg" })
|
|
521
706
|
]
|
|
522
|
-
}), /* @__PURE__ */
|
|
707
|
+
}), /* @__PURE__ */ b("div", {
|
|
523
708
|
className: "mx-auto flex max-w-[70%] items-center gap-1.5 truncate rounded-md bg-bg-surface px-3 py-1 text-[11px] text-text-secondary",
|
|
524
|
-
children: [/* @__PURE__ */
|
|
709
|
+
children: [/* @__PURE__ */ y(Te, { className: "h-3 w-3 shrink-0" }), /* @__PURE__ */ y("span", {
|
|
525
710
|
className: "truncate",
|
|
526
|
-
children:
|
|
711
|
+
children: Gt
|
|
527
712
|
})]
|
|
528
713
|
})]
|
|
529
|
-
}),
|
|
530
|
-
onDragOver:
|
|
531
|
-
onDrop:
|
|
532
|
-
className:
|
|
714
|
+
}), Y.length === 0 ? /* @__PURE__ */ b("div", {
|
|
715
|
+
onDragOver: Lt(0),
|
|
716
|
+
onDrop: Rt(0),
|
|
717
|
+
className: u("m-4 flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-12 text-center transition-colors", mt ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
|
|
533
718
|
children: [
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ y(ke, { className: "h-6 w-6 text-text-secondary" }),
|
|
720
|
+
/* @__PURE__ */ y("p", {
|
|
536
721
|
className: "text-sm font-medium text-text-primary",
|
|
537
722
|
children: "Start building your page"
|
|
538
723
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
724
|
+
/* @__PURE__ */ y("p", {
|
|
540
725
|
className: "max-w-xs text-xs text-text-secondary",
|
|
541
726
|
children: "Drag a block from the left, or click one to add it here."
|
|
542
727
|
})
|
|
543
728
|
]
|
|
544
|
-
}) : /* @__PURE__ */
|
|
729
|
+
}) : /* @__PURE__ */ b("div", { children: [Y.map((e, t) => /* @__PURE__ */ y(me, {
|
|
545
730
|
section: e,
|
|
546
731
|
index: t,
|
|
547
|
-
total:
|
|
548
|
-
selected:
|
|
549
|
-
dropBefore:
|
|
550
|
-
onSelect: () =>
|
|
551
|
-
onMoveUp: () =>
|
|
552
|
-
onMoveDown: () =>
|
|
553
|
-
onDuplicate: () =>
|
|
554
|
-
onRemove: () =>
|
|
555
|
-
onHandleDragStart:
|
|
556
|
-
onDragEnd:
|
|
557
|
-
onBlockDragOver:
|
|
558
|
-
onBlockDrop:
|
|
559
|
-
}, e.id)), /* @__PURE__ */
|
|
560
|
-
onDragOver:
|
|
561
|
-
onDrop:
|
|
562
|
-
className:
|
|
563
|
-
children: [
|
|
732
|
+
total: Y.length,
|
|
733
|
+
selected: I === e.id,
|
|
734
|
+
dropBefore: J === t,
|
|
735
|
+
onSelect: () => L(e.id),
|
|
736
|
+
onMoveUp: () => Et(e.id, "up"),
|
|
737
|
+
onMoveDown: () => Et(e.id, "down"),
|
|
738
|
+
onDuplicate: () => Ot(e.id),
|
|
739
|
+
onRemove: () => Dt(e.id),
|
|
740
|
+
onHandleDragStart: Ft(e.id),
|
|
741
|
+
onDragEnd: It,
|
|
742
|
+
onBlockDragOver: Lt(t),
|
|
743
|
+
onBlockDrop: Rt(t)
|
|
744
|
+
}, e.id)), /* @__PURE__ */ b("div", {
|
|
745
|
+
onDragOver: Lt(Y.length),
|
|
746
|
+
onDrop: Rt(Y.length),
|
|
747
|
+
className: u("relative border-t border-dashed transition-colors", J === Y.length ? "border-primary bg-action-primary-bg/5" : "border-border-subtle"),
|
|
748
|
+
children: [J === Y.length && /* @__PURE__ */ y("div", { className: "pointer-events-none absolute inset-x-0 -top-px h-0.5 bg-action-primary-bg" }), /* @__PURE__ */ b("button", {
|
|
564
749
|
type: "button",
|
|
565
|
-
onClick: () =>
|
|
750
|
+
onClick: () => kt("features"),
|
|
566
751
|
className: "flex w-full items-center justify-center gap-2 p-4 text-sm text-text-secondary transition-colors hover:bg-action-primary-bg/5 hover:text-primary",
|
|
567
|
-
children: [/* @__PURE__ */
|
|
752
|
+
children: [/* @__PURE__ */ y(ke, { className: "h-4 w-4" }), "Add section"]
|
|
568
753
|
})]
|
|
569
754
|
})] })]
|
|
570
755
|
})]
|
|
571
756
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ y("aside", {
|
|
573
758
|
className: "lg:col-span-3 lg:sticky lg:top-4 lg:self-start",
|
|
574
|
-
children:
|
|
759
|
+
children: Q ? /* @__PURE__ */ y("div", {
|
|
575
760
|
className: "lg:max-h-[calc(100vh-2rem)]",
|
|
576
|
-
children: /* @__PURE__ */
|
|
577
|
-
section:
|
|
578
|
-
onChangeConfig: (e) =>
|
|
579
|
-
onChangeLabel: (e) =>
|
|
580
|
-
onClose: () =>
|
|
581
|
-
onDuplicate: () =>
|
|
582
|
-
onRemove: () =>
|
|
761
|
+
children: /* @__PURE__ */ y(he, {
|
|
762
|
+
section: Q,
|
|
763
|
+
onChangeConfig: (e) => Mt(Q.id, e),
|
|
764
|
+
onChangeLabel: (e) => Nt(Q.id, e),
|
|
765
|
+
onClose: () => L(null),
|
|
766
|
+
onDuplicate: () => Ot(Q.id),
|
|
767
|
+
onRemove: () => Dt(Q.id)
|
|
583
768
|
})
|
|
584
|
-
}) : /* @__PURE__ */
|
|
769
|
+
}) : /* @__PURE__ */ b("div", {
|
|
585
770
|
className: "flex flex-col items-center justify-center gap-3 rounded-card border border-dashed border-border-subtle bg-bg-surface p-6 text-center",
|
|
586
771
|
children: [
|
|
587
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ y("span", {
|
|
588
773
|
className: "flex h-11 w-11 items-center justify-center rounded-full bg-action-primary-bg/10 text-primary",
|
|
589
|
-
children: /* @__PURE__ */
|
|
774
|
+
children: /* @__PURE__ */ y(Oe, { className: "h-5 w-5" })
|
|
590
775
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ y("p", {
|
|
592
777
|
className: "text-sm font-semibold text-text-primary",
|
|
593
778
|
children: "No block selected"
|
|
594
779
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ y("p", {
|
|
596
781
|
className: "text-xs text-text-secondary",
|
|
597
782
|
children: "Select a block on the canvas to edit its text, colors, spacing and alignment."
|
|
598
783
|
})
|
|
@@ -602,35 +787,35 @@ var Re = () => {
|
|
|
602
787
|
]
|
|
603
788
|
})
|
|
604
789
|
}),
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
open:
|
|
607
|
-
onClose: () =>
|
|
790
|
+
/* @__PURE__ */ y(re, {
|
|
791
|
+
open: ct,
|
|
792
|
+
onClose: () => R(!1),
|
|
608
793
|
title: j || "Landing Page",
|
|
609
794
|
description: $ ? `Preview of your landing page. Published at ${$} — save and publish again to update it.` : "Preview of your landing page. Publish it to make it public.",
|
|
610
795
|
size: "xl",
|
|
611
|
-
footer: /* @__PURE__ */
|
|
796
|
+
footer: /* @__PURE__ */ b(Ie, { children: [$ && /* @__PURE__ */ b("a", {
|
|
612
797
|
href: $,
|
|
613
798
|
target: "_blank",
|
|
614
799
|
rel: "noreferrer",
|
|
615
800
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
616
|
-
children: [/* @__PURE__ */
|
|
617
|
-
}), /* @__PURE__ */
|
|
801
|
+
children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), "Open live page"]
|
|
802
|
+
}), /* @__PURE__ */ y("button", {
|
|
618
803
|
type: "button",
|
|
619
|
-
onClick: () =>
|
|
804
|
+
onClick: () => R(!1),
|
|
620
805
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
621
806
|
children: "Close"
|
|
622
807
|
})] }),
|
|
623
|
-
children: /* @__PURE__ */
|
|
808
|
+
children: /* @__PURE__ */ y("div", {
|
|
624
809
|
className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-canvas",
|
|
625
|
-
children:
|
|
810
|
+
children: Y.length === 0 ? /* @__PURE__ */ y("p", {
|
|
626
811
|
className: "p-8 text-center text-sm text-text-secondary",
|
|
627
812
|
children: "This page has no sections yet."
|
|
628
|
-
}) :
|
|
813
|
+
}) : Y.map((e) => /* @__PURE__ */ y(ge, { section: e }, e.id))
|
|
629
814
|
})
|
|
630
815
|
})
|
|
631
816
|
]
|
|
632
817
|
});
|
|
633
818
|
};
|
|
634
|
-
export {
|
|
819
|
+
export { We as LandingPageBuilderPage };
|
|
635
820
|
|
|
636
821
|
//# sourceMappingURL=LandingPageBuilderPage.js.map
|