@burdenoff/microfe-headshotmarketing 2026.1202.1 → 2026.1203.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.d.ts +346 -0
- package/dist/generated/wspace-operations.js +565 -443
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +114 -2
- package/dist/generated/wspace-types.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/CrmRecordSelection.js +51 -43
- package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -1
- package/dist/headshotmarketing/components/EntityTagPicker.d.ts +9 -0
- package/dist/headshotmarketing/components/EntityTagPicker.js +261 -0
- package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -0
- 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/components/index.d.ts +1 -0
- package/dist/headshotmarketing/components/index.js +2 -1
- 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/hooks/useEntityTags.d.ts +31 -0
- package/dist/headshotmarketing/hooks/useEntityTags.js +34 -0
- package/dist/headshotmarketing/hooks/useEntityTags.js.map +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +33 -26
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +182 -174
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +309 -294
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdsPage.js +0 -8
- package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +173 -164
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +0 -4
- package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +0 -4
- package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +0 -4
- package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.js +28 -25
- package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +163 -155
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +2 -0
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +268 -256
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +136 -128
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentPage.js +1 -0
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +1 -0
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +190 -182
- 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/influencers/InfluencersPage.js +0 -3
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +3 -6
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +0 -8
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
- package/package.json +5 -3
|
@@ -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
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { EmphasisPanel as
|
|
13
|
-
import { useSaveToFiles 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";
|
|
12
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
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 ue = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, de = /\.(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 ue = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, de = /\.(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 ue = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, de = /\.(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 ue = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, de = /\.(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 ue = /\.(jpe?g|png|gif|webp|svg|avif|bmp)$/i, de = /\.(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,245 +291,250 @@ 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
|
-
children: /* @__PURE__ */
|
|
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
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ _("div", {
|
|
302
309
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
303
310
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ g("p", {
|
|
305
312
|
className: "text-sm font-medium text-text-primary",
|
|
306
313
|
children: "Campaign not found."
|
|
307
314
|
}),
|
|
308
|
-
/* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
313
|
-
onClick: () =>
|
|
319
|
+
/* @__PURE__ */ _("button", {
|
|
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
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
|
|
316
323
|
})
|
|
317
324
|
]
|
|
318
325
|
})
|
|
319
|
-
}) : /* @__PURE__ */
|
|
320
|
-
title:
|
|
321
|
-
actions: /* @__PURE__ */
|
|
322
|
-
onClick: () =>
|
|
326
|
+
}) : /* @__PURE__ */ _(o, {
|
|
327
|
+
title: k ? "Edit Campaign" : "Create Campaign",
|
|
328
|
+
actions: /* @__PURE__ */ _("button", {
|
|
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
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ g(u, { className: "h-4 w-4" }), "Back to Campaigns"]
|
|
325
332
|
}),
|
|
326
333
|
children: [
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
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." }),
|
|
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",
|
|
333
|
-
children: [/* @__PURE__ */
|
|
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"),
|
|
340
|
+
children: [/* @__PURE__ */ _("span", {
|
|
334
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
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
346
353
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
347
354
|
children: "Campaign Name"
|
|
348
|
-
}), /* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
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
|
-
children: [/* @__PURE__ */
|
|
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))]
|
|
369
376
|
})] }),
|
|
370
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
371
378
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
372
379
|
children: "Description"
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
-
value:
|
|
375
|
-
onChange: (e) =>
|
|
380
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
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"
|
|
379
386
|
})] }),
|
|
380
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
381
388
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
382
389
|
children: "Objectives"
|
|
383
|
-
}), /* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
397
404
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
398
405
|
children: "Age Range"
|
|
399
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ _("div", {
|
|
400
407
|
className: "flex items-center gap-3",
|
|
401
408
|
children: [
|
|
402
|
-
/* @__PURE__ */
|
|
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)]"
|
|
409
416
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ g("span", {
|
|
411
418
|
className: "text-sm text-text-secondary",
|
|
412
419
|
children: "to"
|
|
413
420
|
}),
|
|
414
|
-
/* @__PURE__ */
|
|
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)]"
|
|
421
428
|
})
|
|
422
429
|
]
|
|
423
430
|
})] }),
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ _("div", { children: [
|
|
432
|
+
/* @__PURE__ */ g("label", {
|
|
426
433
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
427
434
|
children: "Demographics"
|
|
428
435
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
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
|
-
children: [e, /* @__PURE__ */
|
|
434
|
-
onClick: () =>
|
|
440
|
+
children: [e, /* @__PURE__ */ g("button", {
|
|
441
|
+
onClick: () => Ae(e),
|
|
435
442
|
className: "text-text-secondary hover:text-text-primary",
|
|
436
|
-
children: /* @__PURE__ */
|
|
443
|
+
children: /* @__PURE__ */ g(m, { className: "h-3 w-3" })
|
|
437
444
|
})]
|
|
438
445
|
}, e))
|
|
439
446
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
447
|
+
/* @__PURE__ */ _("div", {
|
|
441
448
|
className: "flex items-center gap-2 mb-2",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
450
|
-
onClick: () =>
|
|
456
|
+
}), /* @__PURE__ */ g("button", {
|
|
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
|
-
/* @__PURE__ */
|
|
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))
|
|
462
469
|
})
|
|
463
470
|
] }),
|
|
464
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
465
472
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
466
473
|
children: "Channels"
|
|
467
|
-
}), /* @__PURE__ */
|
|
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: [
|
|
480
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ g(te, {
|
|
488
|
+
value: K,
|
|
489
|
+
onChange: Ne,
|
|
490
|
+
disabled: Y || Q
|
|
491
|
+
}),
|
|
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."
|
|
483
495
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ g("div", {
|
|
485
497
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
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 =
|
|
507
|
-
return /* @__PURE__ */
|
|
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",
|
|
518
|
+
let t = R.assets.filter((t) => e.match.test(t)).length;
|
|
519
|
+
return /* @__PURE__ */ _("label", {
|
|
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
|
-
/* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ g(e.icon, { className: "h-10 w-10 text-text-secondary mb-3" }),
|
|
533
|
+
/* @__PURE__ */ g("p", {
|
|
522
534
|
className: "text-sm font-medium text-text-primary",
|
|
523
535
|
children: e.label
|
|
524
536
|
}),
|
|
525
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ _("p", {
|
|
526
538
|
className: "text-xs text-text-secondary mt-1",
|
|
527
539
|
children: [
|
|
528
540
|
t,
|
|
@@ -531,132 +543,132 @@ var C = () => {
|
|
|
531
543
|
" uploaded"
|
|
532
544
|
]
|
|
533
545
|
}),
|
|
534
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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
|
-
children: [/* @__PURE__ */
|
|
569
|
+
children: [/* @__PURE__ */ _("div", {
|
|
558
570
|
className: "flex min-w-0 items-center gap-2",
|
|
559
|
-
children: [/* @__PURE__ */
|
|
571
|
+
children: [/* @__PURE__ */ g(d, { className: "h-4 w-4 flex-shrink-0 text-text-secondary" }), /* @__PURE__ */ g("span", {
|
|
560
572
|
className: "truncate text-sm text-text-primary",
|
|
561
573
|
children: e.split("/").pop() ?? e
|
|
562
574
|
})]
|
|
563
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
children: [/* @__PURE__ */
|
|
588
|
+
children: [/* @__PURE__ */ _("div", {
|
|
577
589
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
578
|
-
children: [/* @__PURE__ */
|
|
590
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
579
591
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
580
592
|
children: "Budget"
|
|
581
|
-
}), /* @__PURE__ */
|
|
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
|
-
})] }), /* @__PURE__ */
|
|
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__ */
|
|
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))
|
|
599
611
|
})] })]
|
|
600
|
-
}), /* @__PURE__ */
|
|
612
|
+
}), /* @__PURE__ */ _("div", {
|
|
601
613
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
614
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
603
615
|
className: "block text-sm font-medium text-text-primary mb-1.5",
|
|
604
616
|
children: "Start Date"
|
|
605
|
-
}), /* @__PURE__ */
|
|
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
|
-
})] }), /* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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
|
-
children: [/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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
|
-
})] }), /* @__PURE__ */
|
|
634
|
-
/* @__PURE__ */
|
|
645
|
+
})] }), /* @__PURE__ */ _("div", { children: [
|
|
646
|
+
/* @__PURE__ */ g("label", {
|
|
635
647
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
636
648
|
children: "Tags"
|
|
637
649
|
}),
|
|
638
|
-
/* @__PURE__ */
|
|
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
|
-
children: [e, /* @__PURE__ */
|
|
643
|
-
onClick: () =>
|
|
654
|
+
children: [e, /* @__PURE__ */ g("button", {
|
|
655
|
+
onClick: () => ke(e),
|
|
644
656
|
className: "text-text-secondary hover:text-text-primary",
|
|
645
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ g(m, { className: "h-3 w-3" })
|
|
646
658
|
})]
|
|
647
659
|
}, e))
|
|
648
660
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ _("div", {
|
|
650
662
|
className: "flex items-center gap-2",
|
|
651
|
-
children: [/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
659
|
-
onClick:
|
|
670
|
+
}), /* @__PURE__ */ g("button", {
|
|
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
|
})]
|
|
@@ -665,35 +677,35 @@ var C = () => {
|
|
|
665
677
|
})
|
|
666
678
|
]
|
|
667
679
|
}),
|
|
668
|
-
$ && /* @__PURE__ */
|
|
680
|
+
$ && /* @__PURE__ */ g("div", {
|
|
669
681
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
670
682
|
children: $
|
|
671
683
|
}),
|
|
672
|
-
/* @__PURE__ */
|
|
684
|
+
/* @__PURE__ */ _("div", {
|
|
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
|
-
/* @__PURE__ */
|
|
676
|
-
onClick: () =>
|
|
687
|
+
/* @__PURE__ */ g("button", {
|
|
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
|
-
/* @__PURE__ */
|
|
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__ */
|
|
696
|
+
children: [/* @__PURE__ */ g(ae, { className: "h-4 w-4" }), "Save Draft"]
|
|
685
697
|
}),
|
|
686
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|