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