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