@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
|
@@ -2,17 +2,18 @@ import { HeadshotmarketingCampaignByIdDocument as e, HeadshotmarketingCampaignsL
|
|
|
2
2
|
import { cn as a } from "../../utils/helpers.js";
|
|
3
3
|
import { toCampaignModel as ee } from "../../utils/campaignMapper.js";
|
|
4
4
|
import "../../components/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { UploadAudienceSelect as te } from "../../components/UploadAudienceSelect.js";
|
|
6
6
|
import { PageLayout as o } from "../../components/PageLayout.js";
|
|
7
|
+
import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
|
|
7
8
|
import { HeadshotmarketingCampaignStatus as s, HeadshotmarketingCampaignType as c } from "../../../generated/wspace-types.js";
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { ArrowLeft as u, FileText as d, Image as
|
|
10
|
-
import { useParams as
|
|
9
|
+
import { useEffect as re, useRef as ie, useState as l } from "react";
|
|
10
|
+
import { ArrowLeft as u, FileText as d, Image as f, Rocket as p, Save as ae, Upload as oe, Video as se, X as m } from "lucide-react";
|
|
11
|
+
import { useParams as h } from "react-router";
|
|
11
12
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
12
|
-
import { EmphasisPanel as
|
|
13
|
-
import { useSaveToFiles as
|
|
13
|
+
import { EmphasisPanel as ce, PagePurpose as le, ThemedSelect as v } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { fileUploadVisibility as ue, useSaveToFiles as de } from "@burdenoff/fe-libs/storage";
|
|
14
15
|
// src/headshotmarketing/pages/campaigns/CreateCampaignPage.tsx
|
|
15
|
-
var
|
|
16
|
+
var fe = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, pe = /\.(mp4|webm|mov|avi|mkv)$/i, me = /\.(pdf|docx?|xlsx?|pptx?|txt|csv|rtf|odt|ods)$/i, he = [
|
|
16
17
|
"Brand Awareness",
|
|
17
18
|
"Lead Generation",
|
|
18
19
|
"Sales Conversion",
|
|
@@ -21,7 +22,7 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
|
|
|
21
22
|
"Engagement",
|
|
22
23
|
"Product Launch",
|
|
23
24
|
"Market Research"
|
|
24
|
-
],
|
|
25
|
+
], ge = [
|
|
25
26
|
"Google Ads",
|
|
26
27
|
"Facebook",
|
|
27
28
|
"Instagram",
|
|
@@ -32,7 +33,7 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
|
|
|
32
33
|
"Email",
|
|
33
34
|
"Blog",
|
|
34
35
|
"Display Network"
|
|
35
|
-
],
|
|
36
|
+
], _e = [
|
|
36
37
|
"Impressions",
|
|
37
38
|
"Clicks",
|
|
38
39
|
"CTR",
|
|
@@ -43,7 +44,7 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
|
|
|
43
44
|
"Revenue",
|
|
44
45
|
"Engagement Rate",
|
|
45
46
|
"Reach"
|
|
46
|
-
],
|
|
47
|
+
], y = [
|
|
47
48
|
{
|
|
48
49
|
value: "email",
|
|
49
50
|
label: "Email"
|
|
@@ -72,20 +73,20 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
|
|
|
72
73
|
value: "content",
|
|
73
74
|
label: "Content"
|
|
74
75
|
}
|
|
75
|
-
],
|
|
76
|
+
], ve = [
|
|
76
77
|
"USD",
|
|
77
78
|
"EUR",
|
|
78
79
|
"GBP",
|
|
79
80
|
"CAD",
|
|
80
81
|
"AUD"
|
|
81
|
-
],
|
|
82
|
+
], ye = [
|
|
82
83
|
"Urban Professionals",
|
|
83
84
|
"College Students",
|
|
84
85
|
"Parents",
|
|
85
86
|
"Retirees",
|
|
86
87
|
"Tech Enthusiasts",
|
|
87
88
|
"Small Business Owners"
|
|
88
|
-
],
|
|
89
|
+
], be = [
|
|
89
90
|
{
|
|
90
91
|
key: "basics",
|
|
91
92
|
label: "Basics"
|
|
@@ -107,96 +108,101 @@ var le = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, ue = /\.(mp4|webm|mov|avi|mkv)
|
|
|
107
108
|
label: "Tracking"
|
|
108
109
|
}
|
|
109
110
|
];
|
|
110
|
-
function
|
|
111
|
+
function b(e) {
|
|
111
112
|
return typeof e == "object" && e && !Array.isArray(e) ? e : {};
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
+
function x(e) {
|
|
114
115
|
return Array.isArray(e) ? e.filter((e) => typeof e == "string") : [];
|
|
115
116
|
}
|
|
116
|
-
function
|
|
117
|
+
function S(e, t) {
|
|
117
118
|
let n = Number(e);
|
|
118
119
|
return Number.isFinite(n) ? String(n) : t;
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
-
let n =
|
|
121
|
+
function C(e, t) {
|
|
122
|
+
let n = b(t.ageRange);
|
|
122
123
|
return {
|
|
123
124
|
name: e?.name ?? "",
|
|
124
125
|
description: e?.description ?? "",
|
|
125
126
|
type: e?.type ?? "",
|
|
126
|
-
objectives:
|
|
127
|
+
objectives: x(t.objectives),
|
|
127
128
|
channels: e?.channels ?? [],
|
|
128
129
|
budget: e ? String(e.budget.total) : "",
|
|
129
130
|
currency: String(t.currency ?? e?.budget.currency ?? "USD"),
|
|
130
131
|
startDate: e?.timeline.startDate ?? "",
|
|
131
132
|
endDate: e?.timeline.endDate ?? "",
|
|
132
|
-
kpis:
|
|
133
|
+
kpis: x(t.kpis),
|
|
133
134
|
tags: e?.tags ?? [],
|
|
134
|
-
ageMin:
|
|
135
|
-
ageMax:
|
|
135
|
+
ageMin: S(n.min, "18"),
|
|
136
|
+
ageMax: S(n.max, "65"),
|
|
136
137
|
demographics: e?.targeting.demographics ?? [],
|
|
137
138
|
assets: e?.assets ?? []
|
|
138
139
|
};
|
|
139
140
|
}
|
|
140
|
-
var
|
|
141
|
-
let { navigate:
|
|
142
|
-
skip: !
|
|
143
|
-
variables:
|
|
144
|
-
}),
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}, [
|
|
148
|
-
let
|
|
149
|
-
|
|
141
|
+
var w = () => {
|
|
142
|
+
let { navigate: x, basePath: S } = ne(), { campaignId: w } = h(), { data: xe, loading: T, error: Se } = r({
|
|
143
|
+
skip: !w,
|
|
144
|
+
variables: w ? { id: w } : void 0
|
|
145
|
+
}), E = xe?.headshotmarketingCampaign, D = E ? ee(E) : null, O = b(E?.goals), k = !!w, [A, { loading: j, error: Ce }] = n(), [we, { loading: Te, error: Ee }] = i(), [M, De] = l("basics"), [N, P] = l(""), [F, I] = l(""), [Oe, L] = l(null), [R, z] = l(() => C(D, O));
|
|
146
|
+
re(() => {
|
|
147
|
+
D && z(C(D, O));
|
|
148
|
+
}, [E?.id, E?.updatedAt]);
|
|
149
|
+
let B = (e, t) => {
|
|
150
|
+
z((n) => ({
|
|
150
151
|
...n,
|
|
151
152
|
[e]: t
|
|
152
153
|
}));
|
|
153
|
-
},
|
|
154
|
-
|
|
154
|
+
}, V = (e, t) => {
|
|
155
|
+
z((n) => ({
|
|
155
156
|
...n,
|
|
156
157
|
[e]: n[e].includes(t) ? n[e].filter((e) => e !== t) : [...n[e], t]
|
|
157
158
|
}));
|
|
158
|
-
},
|
|
159
|
-
let e =
|
|
160
|
-
e && !
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
let t = (e ||
|
|
165
|
-
t && !
|
|
166
|
-
},
|
|
167
|
-
|
|
168
|
-
}, { save:
|
|
169
|
-
if (!e || e.length === 0) return;
|
|
170
|
-
|
|
171
|
-
let t =
|
|
159
|
+
}, H = () => {
|
|
160
|
+
let e = N.trim();
|
|
161
|
+
e && !R.tags.includes(e) && B("tags", [...R.tags, e]), P("");
|
|
162
|
+
}, ke = (e) => {
|
|
163
|
+
B("tags", R.tags.filter((t) => t !== e));
|
|
164
|
+
}, U = (e) => {
|
|
165
|
+
let t = (e || F).trim();
|
|
166
|
+
t && !R.demographics.includes(t) && B("demographics", [...R.demographics, t]), I("");
|
|
167
|
+
}, Ae = (e) => {
|
|
168
|
+
B("demographics", R.demographics.filter((t) => t !== e));
|
|
169
|
+
}, { save: je, isPending: Me } = de(), [W, G] = l(null), [K, Ne] = l("PRIVATE"), [Pe, q] = l(!1), J = ie(!1), Y = Me || Pe, Fe = async (e) => {
|
|
170
|
+
if (!e || e.length === 0 || J.current) return;
|
|
171
|
+
G(null);
|
|
172
|
+
let t = R.name.trim() || "Untitled Campaign";
|
|
172
173
|
try {
|
|
173
|
-
let n =
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
let n = ue(K);
|
|
175
|
+
J.current = !0, q(!0);
|
|
176
|
+
let r = [];
|
|
177
|
+
for (let i of Array.from(e)) {
|
|
178
|
+
let e = i.type || "application/octet-stream", a = await je({
|
|
176
179
|
source: {
|
|
177
180
|
kind: "blob",
|
|
178
181
|
getBlob: async () => ({
|
|
179
|
-
blob:
|
|
180
|
-
filename:
|
|
182
|
+
blob: i,
|
|
183
|
+
filename: i.name,
|
|
181
184
|
mimeType: e
|
|
182
185
|
}),
|
|
183
|
-
filename:
|
|
186
|
+
filename: i.name,
|
|
184
187
|
mimeType: e
|
|
185
188
|
},
|
|
186
|
-
folderPath: `Marketing/Campaigns/${t}
|
|
189
|
+
folderPath: `Marketing/Campaigns/${t}`,
|
|
190
|
+
visibility: n
|
|
187
191
|
});
|
|
188
|
-
|
|
192
|
+
r.push(a.name);
|
|
189
193
|
}
|
|
190
|
-
|
|
194
|
+
z((e) => ({
|
|
191
195
|
...e,
|
|
192
|
-
assets: Array.from(/* @__PURE__ */ new Set([...e.assets, ...
|
|
196
|
+
assets: Array.from(/* @__PURE__ */ new Set([...e.assets, ...r]))
|
|
193
197
|
}));
|
|
194
198
|
} catch (e) {
|
|
195
|
-
|
|
199
|
+
G(e instanceof Error ? e.message : "Failed to upload file(s).");
|
|
200
|
+
} finally {
|
|
201
|
+
J.current = !1, q(!1);
|
|
196
202
|
}
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
},
|
|
203
|
+
}, Ie = (e) => {
|
|
204
|
+
B("assets", R.assets.filter((t) => t !== e));
|
|
205
|
+
}, Le = (e) => {
|
|
200
206
|
switch (e) {
|
|
201
207
|
case "email": return c.Email;
|
|
202
208
|
case "social": return c.Social;
|
|
@@ -206,66 +212,67 @@ var C = () => {
|
|
|
206
212
|
case "influencer": return c.Influencer;
|
|
207
213
|
default: return c.Content;
|
|
208
214
|
}
|
|
209
|
-
},
|
|
215
|
+
}, Re = (e) => {
|
|
210
216
|
if (e === "draft") return s.Draft;
|
|
211
|
-
if (
|
|
212
|
-
let e = new Date(
|
|
217
|
+
if (R.startDate) {
|
|
218
|
+
let e = new Date(R.startDate).getTime();
|
|
213
219
|
if (Number.isFinite(e) && e > Date.now()) return s.Scheduled;
|
|
214
220
|
}
|
|
215
221
|
return s.Active;
|
|
216
|
-
},
|
|
217
|
-
if (!
|
|
218
|
-
if (!
|
|
219
|
-
if (
|
|
220
|
-
let e = Number(
|
|
222
|
+
}, ze = () => {
|
|
223
|
+
if (!R.name.trim()) return "Campaign name is required.";
|
|
224
|
+
if (!R.type) return "Campaign type is required.";
|
|
225
|
+
if (R.budget) {
|
|
226
|
+
let e = Number(R.budget);
|
|
221
227
|
if (!Number.isFinite(e) || e < 0) return "Budget must be a valid non-negative number.";
|
|
222
228
|
}
|
|
223
|
-
let e = Number(
|
|
229
|
+
let e = Number(R.ageMin), t = Number(R.ageMax);
|
|
224
230
|
if (!Number.isFinite(e) || !Number.isFinite(t) || e > t) return "Age range is invalid.";
|
|
225
|
-
if (
|
|
226
|
-
let e = new Date(
|
|
231
|
+
if (R.startDate && R.endDate) {
|
|
232
|
+
let e = new Date(R.startDate).getTime(), t = new Date(R.endDate).getTime();
|
|
227
233
|
if (Number.isFinite(e) && Number.isFinite(t) && t < e) return "End date must be on or after start date.";
|
|
228
234
|
}
|
|
229
235
|
return null;
|
|
230
236
|
}, X = (e) => {
|
|
231
|
-
let t =
|
|
237
|
+
let t = R.type ? Le(R.type) : c.Content;
|
|
232
238
|
return {
|
|
233
|
-
name:
|
|
234
|
-
description:
|
|
239
|
+
name: R.name,
|
|
240
|
+
description: R.description || null,
|
|
235
241
|
type: t,
|
|
236
|
-
status:
|
|
237
|
-
budget:
|
|
238
|
-
startDate:
|
|
239
|
-
endDate:
|
|
240
|
-
tags:
|
|
241
|
-
metadata: { currency:
|
|
242
|
+
status: Re(e),
|
|
243
|
+
budget: R.budget ? Number(R.budget) : null,
|
|
244
|
+
startDate: R.startDate || null,
|
|
245
|
+
endDate: R.endDate || null,
|
|
246
|
+
tags: R.tags,
|
|
247
|
+
metadata: { currency: R.currency },
|
|
242
248
|
goals: {
|
|
243
|
-
currency:
|
|
244
|
-
objectives:
|
|
245
|
-
channels:
|
|
246
|
-
kpis:
|
|
247
|
-
demographics:
|
|
248
|
-
assets:
|
|
249
|
+
currency: R.currency,
|
|
250
|
+
objectives: R.objectives,
|
|
251
|
+
channels: R.channels,
|
|
252
|
+
kpis: R.kpis,
|
|
253
|
+
demographics: R.demographics,
|
|
254
|
+
assets: R.assets,
|
|
249
255
|
ageRange: {
|
|
250
|
-
min: Number(
|
|
251
|
-
max: Number(
|
|
256
|
+
min: Number(R.ageMin || "18"),
|
|
257
|
+
max: Number(R.ageMax || "65")
|
|
252
258
|
}
|
|
253
259
|
}
|
|
254
260
|
};
|
|
255
261
|
}, Z = async (n) => {
|
|
256
|
-
|
|
257
|
-
|
|
262
|
+
if (J.current) return;
|
|
263
|
+
let r = ze();
|
|
264
|
+
if (r) L(r);
|
|
258
265
|
else {
|
|
259
|
-
|
|
266
|
+
L(null);
|
|
260
267
|
try {
|
|
261
|
-
|
|
268
|
+
k && w ? await we({
|
|
262
269
|
variables: {
|
|
263
|
-
id:
|
|
270
|
+
id: w,
|
|
264
271
|
input: X(n)
|
|
265
272
|
},
|
|
266
273
|
refetchQueries: [{
|
|
267
274
|
query: e,
|
|
268
|
-
variables: { id:
|
|
275
|
+
variables: { id: w }
|
|
269
276
|
}, {
|
|
270
277
|
query: t,
|
|
271
278
|
variables: {
|
|
@@ -274,7 +281,7 @@ var C = () => {
|
|
|
274
281
|
}
|
|
275
282
|
}],
|
|
276
283
|
awaitRefetchQueries: !0
|
|
277
|
-
}) : await
|
|
284
|
+
}) : await A({
|
|
278
285
|
variables: { input: X(n) },
|
|
279
286
|
refetchQueries: [{
|
|
280
287
|
query: t,
|
|
@@ -284,19 +291,19 @@ var C = () => {
|
|
|
284
291
|
}
|
|
285
292
|
}],
|
|
286
293
|
awaitRefetchQueries: !0
|
|
287
|
-
}),
|
|
294
|
+
}), x(S + "/campaigns");
|
|
288
295
|
} catch (e) {
|
|
289
|
-
|
|
296
|
+
L(e instanceof Error ? e.message : "Failed to save campaign.");
|
|
290
297
|
}
|
|
291
298
|
}
|
|
292
|
-
}, Q =
|
|
293
|
-
return
|
|
299
|
+
}, Q = j || Te, $ = Oe ?? Ce?.message ?? Ee?.message ?? null;
|
|
300
|
+
return k && T && !D ? /* @__PURE__ */ g(o, {
|
|
294
301
|
title: "Edit Campaign",
|
|
295
302
|
children: /* @__PURE__ */ g("div", {
|
|
296
303
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6 text-sm text-text-secondary",
|
|
297
304
|
children: "Loading campaign details..."
|
|
298
305
|
})
|
|
299
|
-
}) :
|
|
306
|
+
}) : k && !T && !D ? /* @__PURE__ */ g(o, {
|
|
300
307
|
title: "Edit Campaign",
|
|
301
308
|
children: /* @__PURE__ */ _("div", {
|
|
302
309
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
@@ -307,39 +314,39 @@ var C = () => {
|
|
|
307
314
|
}),
|
|
308
315
|
/* @__PURE__ */ g("p", {
|
|
309
316
|
className: "text-xs text-text-secondary mt-1",
|
|
310
|
-
children:
|
|
317
|
+
children: Se?.message ?? "The requested campaign could not be loaded."
|
|
311
318
|
}),
|
|
312
319
|
/* @__PURE__ */ _("button", {
|
|
313
|
-
onClick: () =>
|
|
320
|
+
onClick: () => x(S + "/campaigns"),
|
|
314
321
|
className: "mt-4 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",
|
|
315
322
|
children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
|
|
316
323
|
})
|
|
317
324
|
]
|
|
318
325
|
})
|
|
319
326
|
}) : /* @__PURE__ */ _(o, {
|
|
320
|
-
title:
|
|
327
|
+
title: k ? "Edit Campaign" : "Create Campaign",
|
|
321
328
|
actions: /* @__PURE__ */ _("button", {
|
|
322
|
-
onClick: () =>
|
|
329
|
+
onClick: () => x(S + "/campaigns"),
|
|
323
330
|
className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
324
331
|
children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
|
|
325
332
|
}),
|
|
326
333
|
children: [
|
|
327
|
-
/* @__PURE__ */ g(
|
|
334
|
+
/* @__PURE__ */ g(le, { children: k ? "Refine this campaign's setup — its goals, audience targeting, creative, budget and the KPIs you'll track. Changes apply the next time the campaign runs." : "Set up a new campaign step by step: name it and pick a type, define who you're targeting, attach creative, set a budget and timeline, then choose the KPIs you want to measure. Save as a draft anytime or launch when ready." }),
|
|
328
335
|
/* @__PURE__ */ g("div", {
|
|
329
336
|
className: "flex flex-nowrap items-center gap-1 overflow-x-auto border-b border-border-subtle",
|
|
330
|
-
children:
|
|
331
|
-
onClick: () =>
|
|
332
|
-
className: a("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px",
|
|
337
|
+
children: be.map((e, t) => /* @__PURE__ */ _("button", {
|
|
338
|
+
onClick: () => De(e.key),
|
|
339
|
+
className: a("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px", M === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
333
340
|
children: [/* @__PURE__ */ _("span", {
|
|
334
|
-
className: "
|
|
341
|
+
className: "me-1.5 text-xs text-text-secondary",
|
|
335
342
|
children: [t + 1, "."]
|
|
336
343
|
}), e.label]
|
|
337
344
|
}, e.key))
|
|
338
345
|
}),
|
|
339
|
-
/* @__PURE__ */ _(
|
|
346
|
+
/* @__PURE__ */ _(ce, {
|
|
340
347
|
className: "p-6",
|
|
341
348
|
children: [
|
|
342
|
-
|
|
349
|
+
M === "basics" && /* @__PURE__ */ _("div", {
|
|
343
350
|
className: "space-y-6 max-w-2xl",
|
|
344
351
|
children: [
|
|
345
352
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
@@ -347,22 +354,22 @@ var C = () => {
|
|
|
347
354
|
children: "Campaign Name"
|
|
348
355
|
}), /* @__PURE__ */ g("input", {
|
|
349
356
|
type: "text",
|
|
350
|
-
value:
|
|
351
|
-
onChange: (e) =>
|
|
357
|
+
value: R.name,
|
|
358
|
+
onChange: (e) => B("name", e.target.value),
|
|
352
359
|
placeholder: "Enter campaign name...",
|
|
353
360
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
354
361
|
})] }),
|
|
355
362
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
356
363
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
357
364
|
children: "Campaign Type"
|
|
358
|
-
}), /* @__PURE__ */ _(
|
|
359
|
-
value:
|
|
360
|
-
onChange: (e) =>
|
|
365
|
+
}), /* @__PURE__ */ _(v, {
|
|
366
|
+
value: R.type,
|
|
367
|
+
onChange: (e) => B("type", e.target.value),
|
|
361
368
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
362
369
|
children: [/* @__PURE__ */ g("option", {
|
|
363
370
|
value: "",
|
|
364
371
|
children: "Select type..."
|
|
365
|
-
}),
|
|
372
|
+
}), y.map((e) => /* @__PURE__ */ g("option", {
|
|
366
373
|
value: e.value,
|
|
367
374
|
children: e.label
|
|
368
375
|
}, e.value))]
|
|
@@ -371,8 +378,8 @@ var C = () => {
|
|
|
371
378
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
372
379
|
children: "Description"
|
|
373
380
|
}), /* @__PURE__ */ g("textarea", {
|
|
374
|
-
value:
|
|
375
|
-
onChange: (e) =>
|
|
381
|
+
value: R.description,
|
|
382
|
+
onChange: (e) => B("description", e.target.value),
|
|
376
383
|
placeholder: "Describe the campaign goals and strategy...",
|
|
377
384
|
rows: 4,
|
|
378
385
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none"
|
|
@@ -382,15 +389,15 @@ var C = () => {
|
|
|
382
389
|
children: "Objectives"
|
|
383
390
|
}), /* @__PURE__ */ g("div", {
|
|
384
391
|
className: "flex flex-wrap gap-2",
|
|
385
|
-
children:
|
|
386
|
-
onClick: () =>
|
|
387
|
-
className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors",
|
|
392
|
+
children: he.map((e) => /* @__PURE__ */ g("button", {
|
|
393
|
+
onClick: () => V("objectives", e),
|
|
394
|
+
className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", R.objectives.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
|
|
388
395
|
children: e
|
|
389
396
|
}, e))
|
|
390
397
|
})] })
|
|
391
398
|
]
|
|
392
399
|
}),
|
|
393
|
-
|
|
400
|
+
M === "targeting" && /* @__PURE__ */ _("div", {
|
|
394
401
|
className: "space-y-6 max-w-2xl",
|
|
395
402
|
children: [
|
|
396
403
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
@@ -401,8 +408,8 @@ var C = () => {
|
|
|
401
408
|
children: [
|
|
402
409
|
/* @__PURE__ */ g("input", {
|
|
403
410
|
type: "number",
|
|
404
|
-
value:
|
|
405
|
-
onChange: (e) =>
|
|
411
|
+
value: R.ageMin,
|
|
412
|
+
onChange: (e) => B("ageMin", e.target.value),
|
|
406
413
|
min: 13,
|
|
407
414
|
max: 100,
|
|
408
415
|
className: "w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
@@ -413,8 +420,8 @@ var C = () => {
|
|
|
413
420
|
}),
|
|
414
421
|
/* @__PURE__ */ g("input", {
|
|
415
422
|
type: "number",
|
|
416
|
-
value:
|
|
417
|
-
onChange: (e) =>
|
|
423
|
+
value: R.ageMax,
|
|
424
|
+
onChange: (e) => B("ageMax", e.target.value),
|
|
418
425
|
min: 13,
|
|
419
426
|
max: 100,
|
|
420
427
|
className: "w-24 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
@@ -428,12 +435,12 @@ var C = () => {
|
|
|
428
435
|
}),
|
|
429
436
|
/* @__PURE__ */ g("div", {
|
|
430
437
|
className: "flex flex-wrap gap-2 mb-2",
|
|
431
|
-
children:
|
|
438
|
+
children: R.demographics.map((e) => /* @__PURE__ */ _("span", {
|
|
432
439
|
className: "inline-flex items-center gap-1 rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-primary",
|
|
433
440
|
children: [e, /* @__PURE__ */ g("button", {
|
|
434
|
-
onClick: () =>
|
|
441
|
+
onClick: () => Ae(e),
|
|
435
442
|
className: "text-text-secondary hover:text-text-primary",
|
|
436
|
-
children: /* @__PURE__ */ g(
|
|
443
|
+
children: /* @__PURE__ */ g(m, { className: "h-3 w-3" })
|
|
437
444
|
})]
|
|
438
445
|
}, e))
|
|
439
446
|
}),
|
|
@@ -441,21 +448,21 @@ var C = () => {
|
|
|
441
448
|
className: "flex items-center gap-2 mb-2",
|
|
442
449
|
children: [/* @__PURE__ */ g("input", {
|
|
443
450
|
type: "text",
|
|
444
|
-
value:
|
|
445
|
-
onChange: (e) =>
|
|
446
|
-
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(),
|
|
451
|
+
value: F,
|
|
452
|
+
onChange: (e) => I(e.target.value),
|
|
453
|
+
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), U()),
|
|
447
454
|
placeholder: "Add demographic...",
|
|
448
455
|
className: "flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
449
456
|
}), /* @__PURE__ */ g("button", {
|
|
450
|
-
onClick: () =>
|
|
457
|
+
onClick: () => U(),
|
|
451
458
|
className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
452
459
|
children: "Add"
|
|
453
460
|
})]
|
|
454
461
|
}),
|
|
455
462
|
/* @__PURE__ */ g("div", {
|
|
456
463
|
className: "flex flex-wrap gap-1.5",
|
|
457
|
-
children:
|
|
458
|
-
onClick: () =>
|
|
464
|
+
children: ye.filter((e) => !R.demographics.includes(e)).map((e) => /* @__PURE__ */ _("button", {
|
|
465
|
+
onClick: () => U(e),
|
|
459
466
|
className: "rounded-full border border-dashed border-border-subtle px-2.5 py-1 text-xs text-text-secondary hover:text-text-primary hover:border-foreground transition-colors",
|
|
460
467
|
children: ["+ ", e]
|
|
461
468
|
}, e))
|
|
@@ -466,17 +473,22 @@ var C = () => {
|
|
|
466
473
|
children: "Channels"
|
|
467
474
|
}), /* @__PURE__ */ g("div", {
|
|
468
475
|
className: "flex flex-wrap gap-2",
|
|
469
|
-
children:
|
|
470
|
-
onClick: () =>
|
|
471
|
-
className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors",
|
|
476
|
+
children: ge.map((e) => /* @__PURE__ */ g("button", {
|
|
477
|
+
onClick: () => V("channels", e),
|
|
478
|
+
className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", R.channels.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
|
|
472
479
|
children: e
|
|
473
480
|
}, e))
|
|
474
481
|
})] })
|
|
475
482
|
]
|
|
476
483
|
}),
|
|
477
|
-
|
|
484
|
+
M === "content" && /* @__PURE__ */ _("div", {
|
|
478
485
|
className: "space-y-6",
|
|
479
486
|
children: [
|
|
487
|
+
/* @__PURE__ */ g(te, {
|
|
488
|
+
value: K,
|
|
489
|
+
onChange: Ne,
|
|
490
|
+
disabled: Y || Q
|
|
491
|
+
}),
|
|
480
492
|
/* @__PURE__ */ g("p", {
|
|
481
493
|
className: "text-sm text-text-secondary",
|
|
482
494
|
children: "Upload creative assets for your campaign. Files are stored in your workspace Files and attached to this campaign."
|
|
@@ -486,35 +498,35 @@ var C = () => {
|
|
|
486
498
|
children: [
|
|
487
499
|
{
|
|
488
500
|
label: "Images",
|
|
489
|
-
icon:
|
|
501
|
+
icon: f,
|
|
490
502
|
accept: "image/*",
|
|
491
|
-
match:
|
|
503
|
+
match: fe
|
|
492
504
|
},
|
|
493
505
|
{
|
|
494
506
|
label: "Videos",
|
|
495
|
-
icon:
|
|
507
|
+
icon: se,
|
|
496
508
|
accept: "video/*",
|
|
497
|
-
match:
|
|
509
|
+
match: pe
|
|
498
510
|
},
|
|
499
511
|
{
|
|
500
512
|
label: "Documents",
|
|
501
513
|
icon: d,
|
|
502
514
|
accept: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.csv",
|
|
503
|
-
match:
|
|
515
|
+
match: me
|
|
504
516
|
}
|
|
505
517
|
].map((e) => {
|
|
506
|
-
let t =
|
|
518
|
+
let t = R.assets.filter((t) => e.match.test(t)).length;
|
|
507
519
|
return /* @__PURE__ */ _("label", {
|
|
508
|
-
className: a("flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border-subtle bg-bg-sunken/30 p-8 text-center transition-colors",
|
|
520
|
+
className: a("flex flex-col items-center justify-center rounded-lg border-2 border-dashed border-border-subtle bg-bg-sunken/30 p-8 text-center transition-colors", Y ? "cursor-progress opacity-70" : "cursor-pointer hover:border-primary/50 hover:bg-bg-sunken/50"),
|
|
509
521
|
children: [
|
|
510
522
|
/* @__PURE__ */ g("input", {
|
|
511
523
|
type: "file",
|
|
512
524
|
accept: e.accept,
|
|
513
525
|
multiple: !0,
|
|
514
|
-
disabled:
|
|
526
|
+
disabled: Y || Q,
|
|
515
527
|
className: "sr-only",
|
|
516
528
|
onChange: (e) => {
|
|
517
|
-
|
|
529
|
+
Fe(e.currentTarget.files), e.currentTarget.value = "";
|
|
518
530
|
}
|
|
519
531
|
}),
|
|
520
532
|
/* @__PURE__ */ g(e.icon, { className: "h-10 w-10 text-text-secondary mb-3" }),
|
|
@@ -533,26 +545,26 @@ var C = () => {
|
|
|
533
545
|
}),
|
|
534
546
|
/* @__PURE__ */ _("span", {
|
|
535
547
|
className: "mt-3 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
|
|
536
|
-
children: [/* @__PURE__ */ g(
|
|
548
|
+
children: [/* @__PURE__ */ g(oe, { className: "h-3 w-3" }), Y ? "Uploading..." : "Upload"]
|
|
537
549
|
})
|
|
538
550
|
]
|
|
539
551
|
}, e.label);
|
|
540
552
|
})
|
|
541
553
|
}),
|
|
542
|
-
|
|
554
|
+
W && /* @__PURE__ */ g("div", {
|
|
543
555
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
544
|
-
children:
|
|
556
|
+
children: W
|
|
545
557
|
}),
|
|
546
|
-
|
|
558
|
+
R.assets.length > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
547
559
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
548
560
|
children: [
|
|
549
561
|
"Attached Assets (",
|
|
550
|
-
|
|
562
|
+
R.assets.length,
|
|
551
563
|
")"
|
|
552
564
|
]
|
|
553
565
|
}), /* @__PURE__ */ g("div", {
|
|
554
566
|
className: "space-y-2",
|
|
555
|
-
children:
|
|
567
|
+
children: R.assets.map((e) => /* @__PURE__ */ _("div", {
|
|
556
568
|
className: "flex items-center justify-between gap-3 rounded-md border border-border-subtle bg-bg-surface px-3 py-2",
|
|
557
569
|
children: [/* @__PURE__ */ _("div", {
|
|
558
570
|
className: "flex min-w-0 items-center gap-2",
|
|
@@ -562,16 +574,16 @@ var C = () => {
|
|
|
562
574
|
})]
|
|
563
575
|
}), /* @__PURE__ */ g("button", {
|
|
564
576
|
type: "button",
|
|
565
|
-
onClick: () =>
|
|
577
|
+
onClick: () => Ie(e),
|
|
566
578
|
className: "flex-shrink-0 rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
|
|
567
579
|
"aria-label": `Remove ${e}`,
|
|
568
|
-
children: /* @__PURE__ */ g(
|
|
580
|
+
children: /* @__PURE__ */ g(m, { className: "h-4 w-4" })
|
|
569
581
|
})]
|
|
570
582
|
}, e))
|
|
571
583
|
})] })
|
|
572
584
|
]
|
|
573
585
|
}),
|
|
574
|
-
|
|
586
|
+
M === "budget" && /* @__PURE__ */ _("div", {
|
|
575
587
|
className: "space-y-6 max-w-2xl",
|
|
576
588
|
children: [/* @__PURE__ */ _("div", {
|
|
577
589
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
@@ -580,19 +592,19 @@ var C = () => {
|
|
|
580
592
|
children: "Budget"
|
|
581
593
|
}), /* @__PURE__ */ g("input", {
|
|
582
594
|
type: "number",
|
|
583
|
-
value:
|
|
584
|
-
onChange: (e) =>
|
|
595
|
+
value: R.budget,
|
|
596
|
+
onChange: (e) => B("budget", e.target.value),
|
|
585
597
|
placeholder: "0",
|
|
586
598
|
min: 0,
|
|
587
599
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
588
600
|
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
589
601
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
590
602
|
children: "Currency"
|
|
591
|
-
}), /* @__PURE__ */ g(
|
|
592
|
-
value:
|
|
593
|
-
onChange: (e) =>
|
|
603
|
+
}), /* @__PURE__ */ g(v, {
|
|
604
|
+
value: R.currency,
|
|
605
|
+
onChange: (e) => B("currency", e.target.value),
|
|
594
606
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
595
|
-
children:
|
|
607
|
+
children: ve.map((e) => /* @__PURE__ */ g("option", {
|
|
596
608
|
value: e,
|
|
597
609
|
children: e
|
|
598
610
|
}, e))
|
|
@@ -604,30 +616,30 @@ var C = () => {
|
|
|
604
616
|
children: "Start Date"
|
|
605
617
|
}), /* @__PURE__ */ g("input", {
|
|
606
618
|
type: "date",
|
|
607
|
-
value:
|
|
608
|
-
onChange: (e) =>
|
|
619
|
+
value: R.startDate,
|
|
620
|
+
onChange: (e) => B("startDate", e.target.value),
|
|
609
621
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
610
622
|
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
611
623
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
612
624
|
children: "End Date"
|
|
613
625
|
}), /* @__PURE__ */ g("input", {
|
|
614
626
|
type: "date",
|
|
615
|
-
value:
|
|
616
|
-
onChange: (e) =>
|
|
627
|
+
value: R.endDate,
|
|
628
|
+
onChange: (e) => B("endDate", e.target.value),
|
|
617
629
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
618
630
|
})] })]
|
|
619
631
|
})]
|
|
620
632
|
}),
|
|
621
|
-
|
|
633
|
+
M === "tracking" && /* @__PURE__ */ _("div", {
|
|
622
634
|
className: "space-y-6 max-w-2xl",
|
|
623
635
|
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
624
636
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
625
637
|
children: "Key Performance Indicators"
|
|
626
638
|
}), /* @__PURE__ */ g("div", {
|
|
627
639
|
className: "flex flex-wrap gap-2",
|
|
628
|
-
children:
|
|
629
|
-
onClick: () =>
|
|
630
|
-
className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors",
|
|
640
|
+
children: _e.map((e) => /* @__PURE__ */ g("button", {
|
|
641
|
+
onClick: () => V("kpis", e),
|
|
642
|
+
className: a("rounded-full px-3 py-1.5 text-xs font-medium border transition-colors", R.kpis.includes(e) ? "border-primary bg-action-primary-bg text-action-primary-text" : "border-border-subtle bg-bg-surface text-text-primary hover:bg-bg-sunken"),
|
|
631
643
|
children: e
|
|
632
644
|
}, e))
|
|
633
645
|
})] }), /* @__PURE__ */ _("div", { children: [
|
|
@@ -637,12 +649,12 @@ var C = () => {
|
|
|
637
649
|
}),
|
|
638
650
|
/* @__PURE__ */ g("div", {
|
|
639
651
|
className: "flex flex-wrap gap-2 mb-2",
|
|
640
|
-
children:
|
|
652
|
+
children: R.tags.map((e) => /* @__PURE__ */ _("span", {
|
|
641
653
|
className: "inline-flex items-center gap-1 rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs font-medium text-text-primary",
|
|
642
654
|
children: [e, /* @__PURE__ */ g("button", {
|
|
643
|
-
onClick: () =>
|
|
655
|
+
onClick: () => ke(e),
|
|
644
656
|
className: "text-text-secondary hover:text-text-primary",
|
|
645
|
-
children: /* @__PURE__ */ g(
|
|
657
|
+
children: /* @__PURE__ */ g(m, { className: "h-3 w-3" })
|
|
646
658
|
})]
|
|
647
659
|
}, e))
|
|
648
660
|
}),
|
|
@@ -650,13 +662,13 @@ var C = () => {
|
|
|
650
662
|
className: "flex items-center gap-2",
|
|
651
663
|
children: [/* @__PURE__ */ g("input", {
|
|
652
664
|
type: "text",
|
|
653
|
-
value:
|
|
654
|
-
onChange: (e) =>
|
|
655
|
-
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(),
|
|
665
|
+
value: N,
|
|
666
|
+
onChange: (e) => P(e.target.value),
|
|
667
|
+
onKeyDown: (e) => e.key === "Enter" && (e.preventDefault(), H()),
|
|
656
668
|
placeholder: "Add a tag...",
|
|
657
669
|
className: "flex-1 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
658
670
|
}), /* @__PURE__ */ g("button", {
|
|
659
|
-
onClick:
|
|
671
|
+
onClick: H,
|
|
660
672
|
className: "rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
661
673
|
children: "Add"
|
|
662
674
|
})]
|
|
@@ -673,27 +685,27 @@ var C = () => {
|
|
|
673
685
|
className: "flex flex-wrap items-center justify-end gap-3 rounded-lg border border-border-seam bg-gloss-card p-4 shadow-pop",
|
|
674
686
|
children: [
|
|
675
687
|
/* @__PURE__ */ g("button", {
|
|
676
|
-
onClick: () =>
|
|
688
|
+
onClick: () => x(S + "/campaigns"),
|
|
677
689
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
678
690
|
children: "Cancel"
|
|
679
691
|
}),
|
|
680
692
|
/* @__PURE__ */ _("button", {
|
|
681
693
|
onClick: () => Z("draft"),
|
|
682
|
-
disabled: Q,
|
|
694
|
+
disabled: Q || Y,
|
|
683
695
|
className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
|
|
684
|
-
children: [/* @__PURE__ */ g(
|
|
696
|
+
children: [/* @__PURE__ */ g(ae, { className: "h-4 w-4" }), "Save Draft"]
|
|
685
697
|
}),
|
|
686
698
|
/* @__PURE__ */ _("button", {
|
|
687
699
|
onClick: () => Z("launch"),
|
|
688
|
-
disabled: Q,
|
|
700
|
+
disabled: Q || Y,
|
|
689
701
|
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 disabled:opacity-60",
|
|
690
|
-
children: [/* @__PURE__ */ g(
|
|
702
|
+
children: [/* @__PURE__ */ g(p, { className: "h-4 w-4" }), k ? "Update Campaign" : "Create Campaign"]
|
|
691
703
|
})
|
|
692
704
|
]
|
|
693
705
|
})
|
|
694
706
|
]
|
|
695
707
|
});
|
|
696
708
|
};
|
|
697
|
-
export {
|
|
709
|
+
export { w as CreateCampaignPage };
|
|
698
710
|
|
|
699
711
|
//# sourceMappingURL=CreateCampaignPage.js.map
|