@burdenoff/microfe-headshotmarketing 2026.716.2 → 2026.719.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/generated/wspace-operations.d.ts +234 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +201 -72
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/headshotmarketing/HeadshotMarketingRoutes.d.ts +1 -0
- package/dist/headshotmarketing/HeadshotMarketingRoutes.d.ts.map +1 -1
- package/dist/headshotmarketing/HeadshotMarketingRoutes.js +54 -50
- package/dist/headshotmarketing/HeadshotMarketingRoutes.js.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js +10 -1
- package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +281 -249
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/CreateEventPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/events/CreateEventPage.js +180 -165
- package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.d.ts +4 -0
- package/dist/headshotmarketing/pages/events/EventDetailsPage.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +617 -0
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -0
- package/dist/headshotmarketing/pages/events/EventsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/events/EventsPage.js +91 -84
- package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
- package/dist/headshotmarketing/types/index.d.ts +1 -1
- package/dist/headshotmarketing/types/index.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/campaignMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/campaignMapper.js +1 -0
- package/dist/headshotmarketing/utils/campaignMapper.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,92 +2,93 @@ import { useCreateHeadshotmarketingAdCreativeMutation as e, useDeleteHeadshotmar
|
|
|
2
2
|
import { cn as i, formatNumber as a, formatPercentage as o } from "../../utils/helpers.js";
|
|
3
3
|
import { HeadshotmarketingAdCreativeStatus as s, HeadshotmarketingAdCreativeType as c } from "../../../generated/wspace-types.js";
|
|
4
4
|
import { toAdCreativeModel as l } from "../../utils/adsMapper.js";
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { StatusBadge as
|
|
7
|
-
import { EmptyState as
|
|
8
|
-
import { FilterBar as
|
|
9
|
-
import { Modal as
|
|
10
|
-
import { QueryStateBoundary as
|
|
11
|
-
import { Pagination as
|
|
5
|
+
import { PageLayout as u } from "../../components/PageLayout.js";
|
|
6
|
+
import { StatusBadge as ee } from "../../components/StatusBadge.js";
|
|
7
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
8
|
+
import { FilterBar as ne } from "../../components/FilterBar.js";
|
|
9
|
+
import { Modal as d } from "../../components/Modal.js";
|
|
10
|
+
import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
|
|
11
|
+
import { Pagination as ie } from "../../components/Pagination.js";
|
|
12
12
|
import "../../components/index.js";
|
|
13
|
-
import { useHeadshotmarketingBootstrap as
|
|
14
|
-
import { usePagination as
|
|
15
|
-
import { useEffect as
|
|
16
|
-
import { ExternalLink as
|
|
13
|
+
import { useHeadshotmarketingBootstrap as ae } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
14
|
+
import { usePagination as oe } from "../../hooks/usePagination.js";
|
|
15
|
+
import { useEffect as f, useMemo as p, useRef as se, useState as m } from "react";
|
|
16
|
+
import { ExternalLink as ce, Eye as h, Image as g, Layers as _, MoreHorizontal as v, Pencil as y, Plus as le, Smartphone as b, Trash2 as ue, Type as x, UploadCloud as de, Video as fe } from "lucide-react";
|
|
17
17
|
import { useExclusiveMenu as S } from "@burdenoff/fe-libs/shared/hooks";
|
|
18
18
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
19
19
|
import { EmphasisPanel as pe, PagePurpose as me } from "@burdenoff/fe-libs/ui";
|
|
20
20
|
import { useSaveToFiles as he } from "@burdenoff/fe-libs/storage";
|
|
21
21
|
//#region src/headshotmarketing/pages/ads/AdCreativesPage.tsx
|
|
22
22
|
var ge = {
|
|
23
|
-
image:
|
|
24
|
-
video:
|
|
25
|
-
carousel:
|
|
26
|
-
text:
|
|
27
|
-
responsive:
|
|
23
|
+
image: g,
|
|
24
|
+
video: fe,
|
|
25
|
+
carousel: _,
|
|
26
|
+
text: x,
|
|
27
|
+
responsive: b
|
|
28
28
|
}, _e = {
|
|
29
29
|
image: "bg-status-info-bg text-status-info-text",
|
|
30
30
|
video: "bg-[var(--color-accent-soft)] text-action-primary-bg",
|
|
31
31
|
carousel: "bg-status-warning-bg text-status-warning-text",
|
|
32
32
|
text: "bg-bg-sunken text-text-secondary",
|
|
33
33
|
responsive: "bg-status-success-bg text-status-success-text"
|
|
34
|
-
},
|
|
34
|
+
}, ve = {
|
|
35
35
|
image: c.Image,
|
|
36
36
|
video: c.Video,
|
|
37
37
|
carousel: c.Carousel,
|
|
38
38
|
text: c.Text,
|
|
39
39
|
responsive: c.Responsive
|
|
40
|
-
},
|
|
40
|
+
}, ye = {
|
|
41
41
|
active: s.Active,
|
|
42
42
|
paused: s.Paused,
|
|
43
43
|
pending_review: s.PendingReview,
|
|
44
44
|
rejected: s.Rejected
|
|
45
45
|
};
|
|
46
|
-
function
|
|
47
|
-
return
|
|
46
|
+
function be(e) {
|
|
47
|
+
return ve[e] ?? c.Image;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
49
|
+
function xe(e) {
|
|
50
|
+
return ye[e] ?? s.PendingReview;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function Se(e) {
|
|
53
53
|
return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "text";
|
|
54
54
|
}
|
|
55
|
-
var
|
|
55
|
+
var E = {
|
|
56
56
|
name: "",
|
|
57
57
|
type: "image",
|
|
58
58
|
headline: "",
|
|
59
59
|
body: "",
|
|
60
60
|
callToAction: "Learn More",
|
|
61
61
|
destinationUrl: "",
|
|
62
|
-
status: "pending_review"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
status: "pending_review",
|
|
63
|
+
adCampaignId: ""
|
|
64
|
+
}, D = () => {
|
|
65
|
+
let { data: s, refetch: c } = ae(), [h, _] = m(""), [v, y] = m(""), [b, ue] = m("all"), [x, fe] = m("all"), [S, D] = m(null), [k, A] = m(!1), [j, M] = m(E), [N, P] = m(null), [F, I] = m(null), [L, R] = m(null), [z, we] = m(null), [B, V] = m(null), [H, U] = m(null), W = se(null), G = oe({ initialPageSize: 12 }), { limit: Te, offset: Ee, setPage: De, setTotal: Oe } = G;
|
|
66
|
+
f(() => {
|
|
67
|
+
let e = setTimeout(() => y(h), 300);
|
|
67
68
|
return () => clearTimeout(e);
|
|
68
|
-
}, [
|
|
69
|
-
|
|
69
|
+
}, [h]), f(() => {
|
|
70
|
+
De(1);
|
|
70
71
|
}, [
|
|
71
|
-
|
|
72
|
-
y,
|
|
72
|
+
v,
|
|
73
73
|
b,
|
|
74
|
-
|
|
74
|
+
x,
|
|
75
|
+
De
|
|
75
76
|
]);
|
|
76
|
-
let { data:
|
|
77
|
+
let { data: K, loading: ke, error: Ae, refetch: je } = n({
|
|
77
78
|
variables: {
|
|
78
|
-
limit:
|
|
79
|
-
offset:
|
|
80
|
-
search:
|
|
81
|
-
status:
|
|
82
|
-
type:
|
|
79
|
+
limit: Te,
|
|
80
|
+
offset: Ee,
|
|
81
|
+
search: v || null,
|
|
82
|
+
status: ye[x] ?? null,
|
|
83
|
+
type: ve[b] ?? null
|
|
83
84
|
},
|
|
84
85
|
errorPolicy: "all",
|
|
85
86
|
notifyOnNetworkStatusChange: !0
|
|
86
|
-
}),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}, [
|
|
90
|
-
let
|
|
87
|
+
}), q = K?.headshotmarketingAdCreatives.total ?? 0;
|
|
88
|
+
f(() => {
|
|
89
|
+
Oe(q);
|
|
90
|
+
}, [q, Oe]);
|
|
91
|
+
let Me = p(() => (K?.headshotmarketingAdCreatives.items ?? []).map((e) => l(e)), [K?.headshotmarketingAdCreatives.items]), J = p(() => {
|
|
91
92
|
let e = (s?.headshotmarketingAdCreatives.items ?? []).map((e) => l(e)), t = e.filter((e) => e.status === "active").length, n = e.reduce((e, t) => e + t.performance.impressions, 0), r = e.filter((e) => e.performance.impressions > 0), i = r.length > 0 ? r.reduce((e, t) => e + t.performance.ctr, 0) / r.length : 0;
|
|
92
93
|
return {
|
|
93
94
|
total: e.length,
|
|
@@ -95,32 +96,36 @@ var k = {
|
|
|
95
96
|
totalImpressions: n,
|
|
96
97
|
avgCtr: i
|
|
97
98
|
};
|
|
98
|
-
}, [s?.headshotmarketingAdCreatives.items]), { save:
|
|
99
|
-
await Promise.all([
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
if (
|
|
106
|
-
|
|
99
|
+
}, [s?.headshotmarketingAdCreatives.items]), Y = p(() => s?.headshotmarketingAdCampaigns.items ?? [], [s?.headshotmarketingAdCampaigns.items]), { save: Ne, isPending: Pe } = he(), [Fe, { loading: Ie }] = e(), [Le, { loading: X }] = r(), [Re, { loading: ze }] = t(), Z = async () => {
|
|
100
|
+
await Promise.all([je(), c()]);
|
|
101
|
+
}, Q = () => {
|
|
102
|
+
A(!1), M(E), P(null), F && URL.revokeObjectURL(F), I(null), W.current && (W.current.value = "");
|
|
103
|
+
}, Be = () => {
|
|
104
|
+
U(null), M(E), P(null), I(null), A(!0);
|
|
105
|
+
}, Ve = (e) => {
|
|
106
|
+
if (F && URL.revokeObjectURL(F), !e) {
|
|
107
|
+
P(null), I(null);
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
109
|
-
|
|
110
|
+
P(e), I(e.type.startsWith("image/") ? URL.createObjectURL(e) : null), M((t) => ({
|
|
110
111
|
...t,
|
|
111
112
|
name: t.name || e.name.replace(/\.[^.]+$/, ""),
|
|
112
|
-
type:
|
|
113
|
+
type: Se(e.type)
|
|
113
114
|
}));
|
|
114
|
-
},
|
|
115
|
-
if (!
|
|
116
|
-
|
|
115
|
+
}, He = async () => {
|
|
116
|
+
if (!j.name.trim()) {
|
|
117
|
+
U("Creative name is required.");
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (!j.adCampaignId) {
|
|
121
|
+
U("An ad campaign is required — select one, or create an ad campaign first.");
|
|
117
122
|
return;
|
|
118
123
|
}
|
|
119
|
-
|
|
124
|
+
U(null);
|
|
120
125
|
try {
|
|
121
126
|
let e = [], t = {};
|
|
122
|
-
if (
|
|
123
|
-
let e =
|
|
127
|
+
if (N) {
|
|
128
|
+
let e = N, n = await Ne({
|
|
124
129
|
source: {
|
|
125
130
|
kind: "blob",
|
|
126
131
|
getBlob: async () => ({
|
|
@@ -135,21 +140,22 @@ var k = {
|
|
|
135
140
|
});
|
|
136
141
|
t.fileId = n.id, t.fileName = n.name;
|
|
137
142
|
}
|
|
138
|
-
await
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
await Fe({ variables: { input: {
|
|
144
|
+
adCampaignId: j.adCampaignId,
|
|
145
|
+
name: j.name.trim(),
|
|
146
|
+
type: be(j.type),
|
|
147
|
+
headline: j.headline || null,
|
|
148
|
+
body: j.body || null,
|
|
149
|
+
callToAction: j.callToAction || null,
|
|
150
|
+
destinationUrl: j.destinationUrl || null,
|
|
145
151
|
mediaUrls: e,
|
|
146
152
|
metadata: Object.keys(t).length > 0 ? t : null
|
|
147
|
-
} } }),
|
|
153
|
+
} } }), Q(), await Z();
|
|
148
154
|
} catch (e) {
|
|
149
|
-
|
|
155
|
+
U(e instanceof Error ? e.message : "Failed to upload creative.");
|
|
150
156
|
}
|
|
151
|
-
},
|
|
152
|
-
|
|
157
|
+
}, Ue = (e) => {
|
|
158
|
+
D(null), U(null), R({
|
|
153
159
|
id: e.id,
|
|
154
160
|
form: {
|
|
155
161
|
name: e.name,
|
|
@@ -161,47 +167,47 @@ var k = {
|
|
|
161
167
|
status: e.status
|
|
162
168
|
}
|
|
163
169
|
});
|
|
164
|
-
},
|
|
165
|
-
if (
|
|
166
|
-
if (!
|
|
167
|
-
|
|
170
|
+
}, We = async () => {
|
|
171
|
+
if (L) {
|
|
172
|
+
if (!L.form.name.trim()) {
|
|
173
|
+
U("Creative name is required.");
|
|
168
174
|
return;
|
|
169
175
|
}
|
|
170
|
-
|
|
176
|
+
U(null);
|
|
171
177
|
try {
|
|
172
|
-
await
|
|
173
|
-
id:
|
|
178
|
+
await Le({ variables: {
|
|
179
|
+
id: L.id,
|
|
174
180
|
input: {
|
|
175
|
-
name:
|
|
176
|
-
type:
|
|
177
|
-
headline:
|
|
178
|
-
body:
|
|
179
|
-
callToAction:
|
|
180
|
-
destinationUrl:
|
|
181
|
-
status:
|
|
181
|
+
name: L.form.name.trim(),
|
|
182
|
+
type: be(L.form.type),
|
|
183
|
+
headline: L.form.headline || null,
|
|
184
|
+
body: L.form.body || null,
|
|
185
|
+
callToAction: L.form.callToAction || null,
|
|
186
|
+
destinationUrl: L.form.destinationUrl || null,
|
|
187
|
+
status: xe(L.form.status)
|
|
182
188
|
}
|
|
183
|
-
} }),
|
|
189
|
+
} }), R(null), await Z();
|
|
184
190
|
} catch (e) {
|
|
185
|
-
|
|
191
|
+
U(e instanceof Error ? e.message : "Failed to save creative.");
|
|
186
192
|
}
|
|
187
193
|
}
|
|
188
|
-
},
|
|
189
|
-
if (
|
|
190
|
-
|
|
194
|
+
}, Ge = async () => {
|
|
195
|
+
if (B) {
|
|
196
|
+
U(null);
|
|
191
197
|
try {
|
|
192
|
-
await
|
|
198
|
+
await Re({ variables: { id: B.id } }), V(null), await Z();
|
|
193
199
|
} catch (e) {
|
|
194
|
-
|
|
200
|
+
U(e instanceof Error ? e.message : "Failed to delete creative.");
|
|
195
201
|
}
|
|
196
202
|
}
|
|
197
|
-
},
|
|
198
|
-
return /* @__PURE__ */ T(
|
|
203
|
+
}, $ = Pe || Ie;
|
|
204
|
+
return /* @__PURE__ */ T(u, {
|
|
199
205
|
title: "Ad Creatives",
|
|
200
206
|
description: "Manage your advertising creative assets",
|
|
201
207
|
actions: /* @__PURE__ */ T("button", {
|
|
202
|
-
onClick:
|
|
208
|
+
onClick: Be,
|
|
203
209
|
className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
|
|
204
|
-
children: [/* @__PURE__ */ w(
|
|
210
|
+
children: [/* @__PURE__ */ w(le, { className: "h-4 w-4" }), "Upload Creative"]
|
|
205
211
|
}),
|
|
206
212
|
children: [
|
|
207
213
|
/* @__PURE__ */ w(me, { children: "Your library of ad creatives — images, videos, carousels and copy. Keep every asset and its real performance (impressions, CTR) in one place so you can quickly see what's resonating and reuse your best creative across campaigns." }),
|
|
@@ -213,38 +219,38 @@ var k = {
|
|
|
213
219
|
children: "Total Creatives"
|
|
214
220
|
}), /* @__PURE__ */ w("p", {
|
|
215
221
|
className: "text-2xl font-semibold text-text-primary",
|
|
216
|
-
children: a(
|
|
222
|
+
children: a(J.total)
|
|
217
223
|
})] }),
|
|
218
224
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
219
225
|
className: "text-xs text-text-secondary",
|
|
220
226
|
children: "Active"
|
|
221
227
|
}), /* @__PURE__ */ w("p", {
|
|
222
228
|
className: "text-2xl font-semibold text-text-primary",
|
|
223
|
-
children: a(
|
|
229
|
+
children: a(J.active)
|
|
224
230
|
})] }),
|
|
225
231
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
226
232
|
className: "text-xs text-text-secondary",
|
|
227
233
|
children: "Impressions"
|
|
228
234
|
}), /* @__PURE__ */ w("p", {
|
|
229
235
|
className: "text-2xl font-semibold text-text-primary",
|
|
230
|
-
children: a(
|
|
236
|
+
children: a(J.totalImpressions)
|
|
231
237
|
})] }),
|
|
232
238
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
|
|
233
239
|
className: "text-xs text-text-secondary",
|
|
234
240
|
children: "Avg CTR"
|
|
235
241
|
}), /* @__PURE__ */ w("p", {
|
|
236
242
|
className: "text-2xl font-semibold text-text-primary",
|
|
237
|
-
children: o(
|
|
243
|
+
children: o(J.avgCtr)
|
|
238
244
|
})] })
|
|
239
245
|
]
|
|
240
246
|
}) }),
|
|
241
|
-
/* @__PURE__ */ w(
|
|
242
|
-
searchValue:
|
|
243
|
-
onSearchChange:
|
|
247
|
+
/* @__PURE__ */ w(ne, {
|
|
248
|
+
searchValue: h,
|
|
249
|
+
onSearchChange: _,
|
|
244
250
|
searchPlaceholder: "Search creatives...",
|
|
245
251
|
filters: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("select", {
|
|
246
|
-
value:
|
|
247
|
-
onChange: (e) =>
|
|
252
|
+
value: b,
|
|
253
|
+
onChange: (e) => ue(e.target.value),
|
|
248
254
|
className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
|
|
249
255
|
children: [
|
|
250
256
|
/* @__PURE__ */ w("option", {
|
|
@@ -273,8 +279,8 @@ var k = {
|
|
|
273
279
|
})
|
|
274
280
|
]
|
|
275
281
|
}), /* @__PURE__ */ T("select", {
|
|
276
|
-
value:
|
|
277
|
-
onChange: (e) =>
|
|
282
|
+
value: x,
|
|
283
|
+
onChange: (e) => fe(e.target.value),
|
|
278
284
|
className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
|
|
279
285
|
children: [
|
|
280
286
|
/* @__PURE__ */ w("option", {
|
|
@@ -300,91 +306,91 @@ var k = {
|
|
|
300
306
|
]
|
|
301
307
|
})] })
|
|
302
308
|
}),
|
|
303
|
-
|
|
309
|
+
H && !k && !L && /* @__PURE__ */ w("div", {
|
|
304
310
|
role: "alert",
|
|
305
311
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
306
|
-
children:
|
|
312
|
+
children: H
|
|
307
313
|
}),
|
|
308
|
-
/* @__PURE__ */ w(
|
|
309
|
-
loading:
|
|
310
|
-
error:
|
|
311
|
-
onRetry:
|
|
312
|
-
hasData: !!
|
|
313
|
-
children:
|
|
314
|
-
illustration:
|
|
315
|
-
title:
|
|
316
|
-
description:
|
|
317
|
-
action:
|
|
318
|
-
onClick:
|
|
314
|
+
/* @__PURE__ */ w(re, {
|
|
315
|
+
loading: ke,
|
|
316
|
+
error: Ae,
|
|
317
|
+
onRetry: je,
|
|
318
|
+
hasData: !!K,
|
|
319
|
+
children: Me.length === 0 ? /* @__PURE__ */ w(te, {
|
|
320
|
+
illustration: q === 0 ? "empty-files" : "empty-search",
|
|
321
|
+
title: q === 0 ? "No creatives yet" : "No creatives match your filters",
|
|
322
|
+
description: q === 0 ? "Upload images, videos or copy to build your ad creative library." : "Try a different search term, type or status.",
|
|
323
|
+
action: q === 0 ? /* @__PURE__ */ T("button", {
|
|
324
|
+
onClick: Be,
|
|
319
325
|
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",
|
|
320
|
-
children: [/* @__PURE__ */ w(
|
|
326
|
+
children: [/* @__PURE__ */ w(le, { className: "h-4 w-4" }), "Upload Creative"]
|
|
321
327
|
}) : void 0
|
|
322
328
|
}) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
323
329
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
324
|
-
children:
|
|
330
|
+
children: Me.map((e) => /* @__PURE__ */ w(Ce, {
|
|
325
331
|
creative: e,
|
|
326
332
|
menuOpen: S === e.id,
|
|
327
|
-
onToggleMenu: () =>
|
|
328
|
-
onCloseMenu: () =>
|
|
329
|
-
onPreview: () =>
|
|
330
|
-
onEdit: () =>
|
|
333
|
+
onToggleMenu: () => D(S === e.id ? null : e.id),
|
|
334
|
+
onCloseMenu: () => D(null),
|
|
335
|
+
onPreview: () => we(e),
|
|
336
|
+
onEdit: () => Ue(e),
|
|
331
337
|
onDelete: () => {
|
|
332
|
-
|
|
338
|
+
D(null), V(e);
|
|
333
339
|
}
|
|
334
340
|
}, e.id))
|
|
335
|
-
}), /* @__PURE__ */ w(
|
|
336
|
-
page:
|
|
337
|
-
pageSize:
|
|
338
|
-
total:
|
|
339
|
-
onPageChange:
|
|
340
|
-
onPageSizeChange:
|
|
341
|
+
}), /* @__PURE__ */ w(ie, {
|
|
342
|
+
page: G.page,
|
|
343
|
+
pageSize: G.pageSize,
|
|
344
|
+
total: G.total,
|
|
345
|
+
onPageChange: G.setPage,
|
|
346
|
+
onPageSizeChange: G.setPageSize,
|
|
341
347
|
pageSizeOptions: [
|
|
342
348
|
12,
|
|
343
349
|
24,
|
|
344
350
|
48
|
|
345
351
|
],
|
|
346
|
-
disabled:
|
|
352
|
+
disabled: ke,
|
|
347
353
|
hideWhenSinglePage: !0
|
|
348
354
|
})] })
|
|
349
355
|
}),
|
|
350
|
-
/* @__PURE__ */ w(
|
|
351
|
-
open:
|
|
352
|
-
onClose:
|
|
356
|
+
/* @__PURE__ */ w(d, {
|
|
357
|
+
open: k,
|
|
358
|
+
onClose: Q,
|
|
353
359
|
title: "Upload Creative",
|
|
354
360
|
description: "Add a new creative asset to your library",
|
|
355
361
|
size: "lg",
|
|
356
362
|
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
357
|
-
onClick:
|
|
363
|
+
onClick: Q,
|
|
358
364
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
359
365
|
children: "Cancel"
|
|
360
366
|
}), /* @__PURE__ */ w("button", {
|
|
361
|
-
onClick:
|
|
362
|
-
disabled:
|
|
367
|
+
onClick: He,
|
|
368
|
+
disabled: $,
|
|
363
369
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
364
|
-
children:
|
|
370
|
+
children: $ ? "Uploading..." : "Upload Creative"
|
|
365
371
|
})] }),
|
|
366
372
|
children: /* @__PURE__ */ T("div", {
|
|
367
373
|
className: "space-y-4",
|
|
368
374
|
children: [
|
|
369
375
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("input", {
|
|
370
|
-
ref:
|
|
376
|
+
ref: W,
|
|
371
377
|
type: "file",
|
|
372
378
|
accept: "image/*,video/*",
|
|
373
379
|
className: "sr-only",
|
|
374
|
-
onChange: (e) =>
|
|
380
|
+
onChange: (e) => Ve(e.target.files?.[0] ?? null)
|
|
375
381
|
}), /* @__PURE__ */ T("button", {
|
|
376
382
|
type: "button",
|
|
377
|
-
onClick: () =>
|
|
383
|
+
onClick: () => W.current?.click(),
|
|
378
384
|
className: "flex w-full flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken/40 px-4 py-6 text-center transition-colors hover:border-foreground/40",
|
|
379
385
|
children: [
|
|
380
|
-
|
|
381
|
-
src:
|
|
386
|
+
F ? /* @__PURE__ */ w("img", {
|
|
387
|
+
src: F,
|
|
382
388
|
alt: "Selected creative preview",
|
|
383
389
|
className: "max-h-40 rounded-md object-contain"
|
|
384
|
-
}) : /* @__PURE__ */ w(
|
|
390
|
+
}) : /* @__PURE__ */ w(de, { className: "h-8 w-8 text-text-secondary" }),
|
|
385
391
|
/* @__PURE__ */ w("span", {
|
|
386
392
|
className: "text-sm font-medium text-text-primary",
|
|
387
|
-
children:
|
|
393
|
+
children: N ? N.name : "Click to select a file"
|
|
388
394
|
}),
|
|
389
395
|
/* @__PURE__ */ w("span", {
|
|
390
396
|
className: "text-xs text-text-secondary",
|
|
@@ -399,9 +405,9 @@ var k = {
|
|
|
399
405
|
children: "Name"
|
|
400
406
|
}), /* @__PURE__ */ w("input", {
|
|
401
407
|
type: "text",
|
|
402
|
-
value:
|
|
403
|
-
onChange: (e) =>
|
|
404
|
-
...
|
|
408
|
+
value: j.name,
|
|
409
|
+
onChange: (e) => M({
|
|
410
|
+
...j,
|
|
405
411
|
name: e.target.value
|
|
406
412
|
}),
|
|
407
413
|
placeholder: "e.g., Spring Promo Hero",
|
|
@@ -410,9 +416,9 @@ var k = {
|
|
|
410
416
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
411
417
|
children: "Type"
|
|
412
418
|
}), /* @__PURE__ */ T("select", {
|
|
413
|
-
value:
|
|
414
|
-
onChange: (e) =>
|
|
415
|
-
...
|
|
419
|
+
value: j.type,
|
|
420
|
+
onChange: (e) => M({
|
|
421
|
+
...j,
|
|
416
422
|
type: e.target.value
|
|
417
423
|
}),
|
|
418
424
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
@@ -440,14 +446,40 @@ var k = {
|
|
|
440
446
|
]
|
|
441
447
|
})] })]
|
|
442
448
|
}),
|
|
449
|
+
/* @__PURE__ */ T("div", { children: [
|
|
450
|
+
/* @__PURE__ */ w("label", {
|
|
451
|
+
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
452
|
+
children: "Ad Campaign"
|
|
453
|
+
}),
|
|
454
|
+
/* @__PURE__ */ T("select", {
|
|
455
|
+
value: j.adCampaignId,
|
|
456
|
+
onChange: (e) => M({
|
|
457
|
+
...j,
|
|
458
|
+
adCampaignId: e.target.value
|
|
459
|
+
}),
|
|
460
|
+
disabled: Y.length === 0,
|
|
461
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60",
|
|
462
|
+
children: [/* @__PURE__ */ w("option", {
|
|
463
|
+
value: "",
|
|
464
|
+
children: Y.length === 0 ? "No ad campaigns yet — create one first" : "Select an ad campaign"
|
|
465
|
+
}), Y.map((e) => /* @__PURE__ */ w("option", {
|
|
466
|
+
value: e.id,
|
|
467
|
+
children: e.name
|
|
468
|
+
}, e.id))]
|
|
469
|
+
}),
|
|
470
|
+
/* @__PURE__ */ w("p", {
|
|
471
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
472
|
+
children: "Every creative belongs to an ad campaign so its performance rolls up correctly."
|
|
473
|
+
})
|
|
474
|
+
] }),
|
|
443
475
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
444
476
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
445
477
|
children: "Headline"
|
|
446
478
|
}), /* @__PURE__ */ w("input", {
|
|
447
479
|
type: "text",
|
|
448
|
-
value:
|
|
449
|
-
onChange: (e) =>
|
|
450
|
-
...
|
|
480
|
+
value: j.headline,
|
|
481
|
+
onChange: (e) => M({
|
|
482
|
+
...j,
|
|
451
483
|
headline: e.target.value
|
|
452
484
|
}),
|
|
453
485
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
@@ -459,9 +491,9 @@ var k = {
|
|
|
459
491
|
children: "Call to Action"
|
|
460
492
|
}), /* @__PURE__ */ w("input", {
|
|
461
493
|
type: "text",
|
|
462
|
-
value:
|
|
463
|
-
onChange: (e) =>
|
|
464
|
-
...
|
|
494
|
+
value: j.callToAction,
|
|
495
|
+
onChange: (e) => M({
|
|
496
|
+
...j,
|
|
465
497
|
callToAction: e.target.value
|
|
466
498
|
}),
|
|
467
499
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
@@ -470,38 +502,38 @@ var k = {
|
|
|
470
502
|
children: "Destination URL"
|
|
471
503
|
}), /* @__PURE__ */ w("input", {
|
|
472
504
|
type: "url",
|
|
473
|
-
value:
|
|
474
|
-
onChange: (e) =>
|
|
475
|
-
...
|
|
505
|
+
value: j.destinationUrl,
|
|
506
|
+
onChange: (e) => M({
|
|
507
|
+
...j,
|
|
476
508
|
destinationUrl: e.target.value
|
|
477
509
|
}),
|
|
478
510
|
placeholder: "https://",
|
|
479
511
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
480
512
|
})] })]
|
|
481
513
|
}),
|
|
482
|
-
|
|
514
|
+
H && /* @__PURE__ */ w("p", {
|
|
483
515
|
className: "text-sm text-status-error-text",
|
|
484
|
-
children:
|
|
516
|
+
children: H
|
|
485
517
|
})
|
|
486
518
|
]
|
|
487
519
|
})
|
|
488
520
|
}),
|
|
489
|
-
/* @__PURE__ */ w(
|
|
490
|
-
open:
|
|
491
|
-
onClose: () =>
|
|
521
|
+
/* @__PURE__ */ w(d, {
|
|
522
|
+
open: L !== null,
|
|
523
|
+
onClose: () => R(null),
|
|
492
524
|
title: "Edit Creative",
|
|
493
525
|
size: "lg",
|
|
494
526
|
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
495
|
-
onClick: () =>
|
|
527
|
+
onClick: () => R(null),
|
|
496
528
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
497
529
|
children: "Cancel"
|
|
498
530
|
}), /* @__PURE__ */ w("button", {
|
|
499
|
-
onClick:
|
|
500
|
-
disabled:
|
|
531
|
+
onClick: We,
|
|
532
|
+
disabled: X,
|
|
501
533
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
502
|
-
children:
|
|
534
|
+
children: X ? "Saving..." : "Save Changes"
|
|
503
535
|
})] }),
|
|
504
|
-
children:
|
|
536
|
+
children: L && /* @__PURE__ */ T("div", {
|
|
505
537
|
className: "space-y-4",
|
|
506
538
|
children: [
|
|
507
539
|
/* @__PURE__ */ T("div", {
|
|
@@ -511,11 +543,11 @@ var k = {
|
|
|
511
543
|
children: "Name"
|
|
512
544
|
}), /* @__PURE__ */ w("input", {
|
|
513
545
|
type: "text",
|
|
514
|
-
value:
|
|
515
|
-
onChange: (e) =>
|
|
516
|
-
...
|
|
546
|
+
value: L.form.name,
|
|
547
|
+
onChange: (e) => R({
|
|
548
|
+
...L,
|
|
517
549
|
form: {
|
|
518
|
-
...
|
|
550
|
+
...L.form,
|
|
519
551
|
name: e.target.value
|
|
520
552
|
}
|
|
521
553
|
}),
|
|
@@ -524,11 +556,11 @@ var k = {
|
|
|
524
556
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
525
557
|
children: "Status"
|
|
526
558
|
}), /* @__PURE__ */ T("select", {
|
|
527
|
-
value:
|
|
528
|
-
onChange: (e) =>
|
|
529
|
-
...
|
|
559
|
+
value: L.form.status,
|
|
560
|
+
onChange: (e) => R({
|
|
561
|
+
...L,
|
|
530
562
|
form: {
|
|
531
|
-
...
|
|
563
|
+
...L.form,
|
|
532
564
|
status: e.target.value
|
|
533
565
|
}
|
|
534
566
|
}),
|
|
@@ -558,11 +590,11 @@ var k = {
|
|
|
558
590
|
children: "Headline"
|
|
559
591
|
}), /* @__PURE__ */ w("input", {
|
|
560
592
|
type: "text",
|
|
561
|
-
value:
|
|
562
|
-
onChange: (e) =>
|
|
563
|
-
...
|
|
593
|
+
value: L.form.headline,
|
|
594
|
+
onChange: (e) => R({
|
|
595
|
+
...L,
|
|
564
596
|
form: {
|
|
565
|
-
...
|
|
597
|
+
...L.form,
|
|
566
598
|
headline: e.target.value
|
|
567
599
|
}
|
|
568
600
|
}),
|
|
@@ -572,11 +604,11 @@ var k = {
|
|
|
572
604
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
573
605
|
children: "Body"
|
|
574
606
|
}), /* @__PURE__ */ w("textarea", {
|
|
575
|
-
value:
|
|
576
|
-
onChange: (e) =>
|
|
577
|
-
...
|
|
607
|
+
value: L.form.body,
|
|
608
|
+
onChange: (e) => R({
|
|
609
|
+
...L,
|
|
578
610
|
form: {
|
|
579
|
-
...
|
|
611
|
+
...L.form,
|
|
580
612
|
body: e.target.value
|
|
581
613
|
}
|
|
582
614
|
}),
|
|
@@ -590,11 +622,11 @@ var k = {
|
|
|
590
622
|
children: "Call to Action"
|
|
591
623
|
}), /* @__PURE__ */ w("input", {
|
|
592
624
|
type: "text",
|
|
593
|
-
value:
|
|
594
|
-
onChange: (e) =>
|
|
595
|
-
...
|
|
625
|
+
value: L.form.callToAction,
|
|
626
|
+
onChange: (e) => R({
|
|
627
|
+
...L,
|
|
596
628
|
form: {
|
|
597
|
-
...
|
|
629
|
+
...L.form,
|
|
598
630
|
callToAction: e.target.value
|
|
599
631
|
}
|
|
600
632
|
}),
|
|
@@ -604,46 +636,46 @@ var k = {
|
|
|
604
636
|
children: "Destination URL"
|
|
605
637
|
}), /* @__PURE__ */ w("input", {
|
|
606
638
|
type: "url",
|
|
607
|
-
value:
|
|
608
|
-
onChange: (e) =>
|
|
609
|
-
...
|
|
639
|
+
value: L.form.destinationUrl,
|
|
640
|
+
onChange: (e) => R({
|
|
641
|
+
...L,
|
|
610
642
|
form: {
|
|
611
|
-
...
|
|
643
|
+
...L.form,
|
|
612
644
|
destinationUrl: e.target.value
|
|
613
645
|
}
|
|
614
646
|
}),
|
|
615
647
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
616
648
|
})] })]
|
|
617
649
|
}),
|
|
618
|
-
|
|
650
|
+
H && /* @__PURE__ */ w("p", {
|
|
619
651
|
className: "text-sm text-status-error-text",
|
|
620
|
-
children:
|
|
652
|
+
children: H
|
|
621
653
|
})
|
|
622
654
|
]
|
|
623
655
|
})
|
|
624
656
|
}),
|
|
625
|
-
/* @__PURE__ */ w(
|
|
626
|
-
open:
|
|
627
|
-
onClose: () =>
|
|
628
|
-
title:
|
|
629
|
-
description:
|
|
657
|
+
/* @__PURE__ */ w(d, {
|
|
658
|
+
open: z !== null,
|
|
659
|
+
onClose: () => we(null),
|
|
660
|
+
title: z?.name ?? "Creative Preview",
|
|
661
|
+
description: z?.headline,
|
|
630
662
|
size: "lg",
|
|
631
|
-
children:
|
|
663
|
+
children: z && /* @__PURE__ */ T("div", {
|
|
632
664
|
className: "space-y-4",
|
|
633
665
|
children: [
|
|
634
666
|
/* @__PURE__ */ w("div", {
|
|
635
667
|
className: "flex min-h-[12rem] items-center justify-center rounded-lg border border-border-subtle bg-bg-sunken/40 p-4",
|
|
636
|
-
children:
|
|
637
|
-
src:
|
|
668
|
+
children: z.mediaUrl ? z.type === "video" ? /* @__PURE__ */ w("video", {
|
|
669
|
+
src: z.mediaUrl,
|
|
638
670
|
controls: !0,
|
|
639
671
|
className: "max-h-80 rounded-md"
|
|
640
672
|
}) : /* @__PURE__ */ w("img", {
|
|
641
|
-
src:
|
|
642
|
-
alt:
|
|
673
|
+
src: z.mediaUrl,
|
|
674
|
+
alt: z.name,
|
|
643
675
|
className: "max-h-80 rounded-md object-contain"
|
|
644
676
|
}) : /* @__PURE__ */ T("div", {
|
|
645
677
|
className: "flex flex-col items-center gap-2 text-text-secondary",
|
|
646
|
-
children: [/* @__PURE__ */ w(ge[
|
|
678
|
+
children: [/* @__PURE__ */ w(ge[z.type] ?? g, { className: "h-12 w-12" }), /* @__PURE__ */ w("span", {
|
|
647
679
|
className: "text-xs",
|
|
648
680
|
children: "No media preview available"
|
|
649
681
|
})]
|
|
@@ -653,65 +685,65 @@ var k = {
|
|
|
653
685
|
className: "flex flex-wrap items-center gap-2",
|
|
654
686
|
children: [
|
|
655
687
|
/* @__PURE__ */ w("span", {
|
|
656
|
-
className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", _e[
|
|
657
|
-
children:
|
|
688
|
+
className: i("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", _e[z.type]),
|
|
689
|
+
children: z.type
|
|
658
690
|
}),
|
|
659
|
-
/* @__PURE__ */ w(
|
|
660
|
-
|
|
691
|
+
/* @__PURE__ */ w(ee, { status: z.status }),
|
|
692
|
+
z.callToAction && /* @__PURE__ */ T("span", {
|
|
661
693
|
className: "text-xs text-text-secondary",
|
|
662
|
-
children: ["CTA: ",
|
|
694
|
+
children: ["CTA: ", z.callToAction]
|
|
663
695
|
})
|
|
664
696
|
]
|
|
665
697
|
}),
|
|
666
|
-
|
|
698
|
+
z.description && /* @__PURE__ */ w("p", {
|
|
667
699
|
className: "text-sm text-text-secondary",
|
|
668
|
-
children:
|
|
700
|
+
children: z.description
|
|
669
701
|
}),
|
|
670
|
-
|
|
671
|
-
href:
|
|
702
|
+
z.landingPageUrl && /* @__PURE__ */ T("a", {
|
|
703
|
+
href: z.landingPageUrl,
|
|
672
704
|
target: "_blank",
|
|
673
705
|
rel: "noreferrer",
|
|
674
706
|
className: "inline-flex items-center gap-1.5 text-sm text-action-primary-bg hover:underline",
|
|
675
|
-
children: [/* @__PURE__ */ w(
|
|
707
|
+
children: [/* @__PURE__ */ w(ce, { className: "h-3.5 w-3.5" }), z.landingPageUrl]
|
|
676
708
|
}),
|
|
677
|
-
|
|
709
|
+
z.performance.impressions > 0 && /* @__PURE__ */ T("div", {
|
|
678
710
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
679
711
|
children: [
|
|
680
|
-
/* @__PURE__ */ w(
|
|
712
|
+
/* @__PURE__ */ w(O, {
|
|
681
713
|
label: "Impressions",
|
|
682
|
-
value: a(
|
|
714
|
+
value: a(z.performance.impressions)
|
|
683
715
|
}),
|
|
684
|
-
/* @__PURE__ */ w(
|
|
716
|
+
/* @__PURE__ */ w(O, {
|
|
685
717
|
label: "Clicks",
|
|
686
|
-
value: a(
|
|
718
|
+
value: a(z.performance.clicks)
|
|
687
719
|
}),
|
|
688
|
-
/* @__PURE__ */ w(
|
|
720
|
+
/* @__PURE__ */ w(O, {
|
|
689
721
|
label: "CTR",
|
|
690
|
-
value: o(
|
|
722
|
+
value: o(z.performance.ctr)
|
|
691
723
|
}),
|
|
692
|
-
/* @__PURE__ */ w(
|
|
724
|
+
/* @__PURE__ */ w(O, {
|
|
693
725
|
label: "Conversions",
|
|
694
|
-
value: a(
|
|
726
|
+
value: a(z.performance.conversions)
|
|
695
727
|
})
|
|
696
728
|
]
|
|
697
729
|
})
|
|
698
730
|
]
|
|
699
731
|
})
|
|
700
732
|
}),
|
|
701
|
-
/* @__PURE__ */ w(
|
|
702
|
-
open:
|
|
703
|
-
onClose: () =>
|
|
733
|
+
/* @__PURE__ */ w(d, {
|
|
734
|
+
open: B !== null,
|
|
735
|
+
onClose: () => V(null),
|
|
704
736
|
title: "Delete Creative",
|
|
705
737
|
size: "sm",
|
|
706
738
|
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
707
|
-
onClick: () =>
|
|
739
|
+
onClick: () => V(null),
|
|
708
740
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
709
741
|
children: "Cancel"
|
|
710
742
|
}), /* @__PURE__ */ w("button", {
|
|
711
|
-
onClick:
|
|
712
|
-
disabled:
|
|
743
|
+
onClick: Ge,
|
|
744
|
+
disabled: ze,
|
|
713
745
|
className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
|
|
714
|
-
children:
|
|
746
|
+
children: ze ? "Deleting..." : "Delete"
|
|
715
747
|
})] }),
|
|
716
748
|
children: /* @__PURE__ */ T("p", {
|
|
717
749
|
className: "text-sm text-text-secondary",
|
|
@@ -720,7 +752,7 @@ var k = {
|
|
|
720
752
|
" ",
|
|
721
753
|
/* @__PURE__ */ w("span", {
|
|
722
754
|
className: "font-semibold text-text-primary",
|
|
723
|
-
children:
|
|
755
|
+
children: B?.name
|
|
724
756
|
}),
|
|
725
757
|
"? This action cannot be undone."
|
|
726
758
|
]
|
|
@@ -728,7 +760,7 @@ var k = {
|
|
|
728
760
|
})
|
|
729
761
|
]
|
|
730
762
|
});
|
|
731
|
-
},
|
|
763
|
+
}, O = ({ label: e, value: t }) => /* @__PURE__ */ T("div", {
|
|
732
764
|
className: "rounded-md bg-bg-sunken/50 py-2 text-center",
|
|
733
765
|
children: [/* @__PURE__ */ w("p", {
|
|
734
766
|
className: "text-sm font-bold text-text-primary",
|
|
@@ -737,9 +769,9 @@ var k = {
|
|
|
737
769
|
className: "text-[10px] text-text-secondary",
|
|
738
770
|
children: e
|
|
739
771
|
})]
|
|
740
|
-
}),
|
|
772
|
+
}), Ce = ({ creative: e, menuOpen: t, onToggleMenu: n, onCloseMenu: r, onPreview: s, onEdit: c, onDelete: l }) => {
|
|
741
773
|
S(`ad-creative-${e.id}`, t, r);
|
|
742
|
-
let
|
|
774
|
+
let u = ge[e.type] || g;
|
|
743
775
|
return /* @__PURE__ */ T("div", {
|
|
744
776
|
className: "overflow-hidden rounded-lg border border-border-seam bg-gloss-card shadow-pop transition-colors hover:border-foreground/30",
|
|
745
777
|
children: [/* @__PURE__ */ T("button", {
|
|
@@ -751,9 +783,9 @@ var k = {
|
|
|
751
783
|
src: e.mediaUrl,
|
|
752
784
|
alt: e.name,
|
|
753
785
|
className: "h-full w-full object-cover"
|
|
754
|
-
}) : /* @__PURE__ */ w(
|
|
786
|
+
}) : /* @__PURE__ */ w(u, { className: "h-12 w-12 text-text-secondary/40" }), /* @__PURE__ */ w("div", {
|
|
755
787
|
className: "absolute right-2 top-2",
|
|
756
|
-
children: /* @__PURE__ */ w(
|
|
788
|
+
children: /* @__PURE__ */ w(ee, { status: e.status })
|
|
757
789
|
})]
|
|
758
790
|
}), /* @__PURE__ */ T("div", {
|
|
759
791
|
className: "space-y-3 p-4",
|
|
@@ -802,7 +834,7 @@ var k = {
|
|
|
802
834
|
children: [/* @__PURE__ */ T("button", {
|
|
803
835
|
onClick: s,
|
|
804
836
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary hover:text-text-primary",
|
|
805
|
-
children: [/* @__PURE__ */ w(
|
|
837
|
+
children: [/* @__PURE__ */ w(h, { className: "h-3 w-3" }), "Preview"]
|
|
806
838
|
}), /* @__PURE__ */ T("div", {
|
|
807
839
|
className: "relative",
|
|
808
840
|
children: [/* @__PURE__ */ w("button", {
|
|
@@ -811,7 +843,7 @@ var k = {
|
|
|
811
843
|
"aria-expanded": t,
|
|
812
844
|
"aria-label": "Creative actions",
|
|
813
845
|
className: "text-text-secondary hover:text-text-primary",
|
|
814
|
-
children: /* @__PURE__ */ w(
|
|
846
|
+
children: /* @__PURE__ */ w(v, { className: "h-4 w-4" })
|
|
815
847
|
}), t && /* @__PURE__ */ T("div", {
|
|
816
848
|
role: "menu",
|
|
817
849
|
className: "absolute bottom-6 right-0 z-20 w-36 rounded-md border border-border-seam bg-gloss-card py-1 shadow-lg",
|
|
@@ -819,12 +851,12 @@ var k = {
|
|
|
819
851
|
role: "menuitem",
|
|
820
852
|
onClick: c,
|
|
821
853
|
className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
|
|
822
|
-
children: [/* @__PURE__ */ w(
|
|
854
|
+
children: [/* @__PURE__ */ w(y, { className: "h-3.5 w-3.5" }), "Edit"]
|
|
823
855
|
}), /* @__PURE__ */ T("button", {
|
|
824
856
|
role: "menuitem",
|
|
825
857
|
onClick: l,
|
|
826
858
|
className: "flex w-full items-center gap-2 px-4 py-2 text-left text-sm text-status-error-text hover:bg-bg-sunken",
|
|
827
|
-
children: [/* @__PURE__ */ w(
|
|
859
|
+
children: [/* @__PURE__ */ w(ue, { className: "h-3.5 w-3.5" }), "Delete"]
|
|
828
860
|
})]
|
|
829
861
|
})]
|
|
830
862
|
})]
|
|
@@ -834,6 +866,6 @@ var k = {
|
|
|
834
866
|
});
|
|
835
867
|
};
|
|
836
868
|
//#endregion
|
|
837
|
-
export {
|
|
869
|
+
export { D as AdCreativesPage };
|
|
838
870
|
|
|
839
871
|
//# sourceMappingURL=AdCreativesPage.js.map
|