@burdenoff/microfe-headshotmarketing 2026.1202.2 → 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/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/index.d.ts +1 -0
- package/dist/headshotmarketing/components/index.js +2 -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/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/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/influencers/InfluencersPage.js +0 -3
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.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 +1 -1
|
@@ -1,179 +1,187 @@
|
|
|
1
1
|
import { useDeleteHeadshotmarketingAdCampaignMutation as e, useUpdateHeadshotmarketingAdCampaignMutation as t } from "../../../generated/wspace-operations.js";
|
|
2
2
|
import { HeadshotmarketingAdCampaignStatus as n } from "../../../generated/wspace-types.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { toAdCampaignModel as
|
|
3
|
+
import { cn as ee, formatCurrency as r, formatDate as i, formatNumber as a, formatPercentage as o } from "../../utils/helpers.js";
|
|
4
|
+
import { toAdCampaignModel as te, toAdCampaignStatusEnum as s, toAdCreativeModel as c, toAudienceModel as l } from "../../utils/adsMapper.js";
|
|
5
5
|
import "../../components/index.js";
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { StatCard as
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { StatusBadge as
|
|
10
|
-
import { Modal as
|
|
11
|
-
import { QueryStateBoundary as
|
|
12
|
-
import { TrackedLinksPanel as
|
|
6
|
+
import { PageLayout as u } from "../../components/PageLayout.js";
|
|
7
|
+
import { StatCard as d } from "../../components/StatCard.js";
|
|
8
|
+
import { EmptyState as ne } from "../../components/EmptyState.js";
|
|
9
|
+
import { StatusBadge as re } from "../../components/StatusBadge.js";
|
|
10
|
+
import { Modal as f } from "../../components/Modal.js";
|
|
11
|
+
import { QueryStateBoundary as ie } from "../../components/QueryStateBoundary.js";
|
|
12
|
+
import { TrackedLinksPanel as p } from "../../components/TrackedLinksPanel.js";
|
|
13
|
+
import { EntityTagPicker as m } from "../../components/EntityTagPicker.js";
|
|
13
14
|
import { useHeadshotMarketing as h } from "../../context/HeadshotMarketingContext.js";
|
|
14
|
-
import { useHeadshotmarketingBootstrap as
|
|
15
|
-
import { AdPlatformSyncPanel as
|
|
16
|
-
import { AdBudgetAiPanel as
|
|
17
|
-
import { useMemo as
|
|
18
|
-
import { ArrowLeft as
|
|
19
|
-
import { useParams as
|
|
15
|
+
import { useHeadshotmarketingBootstrap as ae } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
16
|
+
import { AdPlatformSyncPanel as oe } from "./AdPlatformSyncPanel.js";
|
|
17
|
+
import { AdBudgetAiPanel as se } from "./AdBudgetAiPanel.js";
|
|
18
|
+
import { useMemo as g, useState as _ } from "react";
|
|
19
|
+
import { ArrowLeft as v, Calendar as ce, DollarSign as y, Eye as le, Link2 as b, MousePointerClick as x, Pause as S, Pencil as ue, Play as de, Target as fe, Trash2 as pe, TrendingUp as me } from "lucide-react";
|
|
20
|
+
import { useParams as he } from "react-router";
|
|
20
21
|
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
21
|
-
import { EmphasisPanel as
|
|
22
|
+
import { EmphasisPanel as ge, PagePurpose as E, ThemedSelect as D } from "@burdenoff/fe-libs/ui";
|
|
22
23
|
// src/headshotmarketing/pages/ads/AdCampaignDetailsPage.tsx
|
|
23
|
-
var
|
|
24
|
+
var O = {
|
|
24
25
|
google_ads: "Google Ads",
|
|
25
26
|
facebook: "Facebook",
|
|
26
27
|
instagram: "Instagram",
|
|
27
28
|
linkedin: "LinkedIn",
|
|
28
29
|
twitter: "Twitter"
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
+
function k(e) {
|
|
31
32
|
if (!e) return "";
|
|
32
33
|
let t = new Date(e);
|
|
33
34
|
return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
|
|
34
35
|
}
|
|
35
|
-
var
|
|
36
|
-
let { navigate:
|
|
37
|
-
if (!
|
|
38
|
-
let e = new Set(
|
|
39
|
-
return (
|
|
40
|
-
}, [
|
|
41
|
-
if (
|
|
42
|
-
|
|
36
|
+
var A = () => {
|
|
37
|
+
let { navigate: A, basePath: j } = h(), { adCampaignId: M } = he(), { data: N, loading: P, error: F, refetch: I } = ae(), [L, R] = _(null), [_e, z] = _(!1), [B, V] = _(null), [H, U] = _(null), [W, { loading: G }] = t(), [ve, { loading: K }] = e(), q = g(() => (N?.headshotmarketingAdCampaigns.items ?? []).find((e) => e.id === M) ?? null, [N?.headshotmarketingAdCampaigns.items, M]), J = q ? te(q) : null, Y = g(() => M ? (N?.headshotmarketingAdCreatives.items ?? []).filter((e) => e.adCampaignId === M).map((e) => c(e)) : [], [N?.headshotmarketingAdCreatives.items, M]), X = g(() => {
|
|
38
|
+
if (!J) return [];
|
|
39
|
+
let e = new Set(J.audiences);
|
|
40
|
+
return (N?.headshotmarketingAudiences.items ?? []).filter((t) => e.has(t.id)).map((e) => l(e));
|
|
41
|
+
}, [N?.headshotmarketingAudiences.items, J]), Z = () => A(j + "/ads/campaigns"), ye = async () => {
|
|
42
|
+
if (M && J) {
|
|
43
|
+
V(null);
|
|
43
44
|
try {
|
|
44
|
-
await
|
|
45
|
-
id:
|
|
46
|
-
input: { status:
|
|
47
|
-
} }), await
|
|
45
|
+
await W({ variables: {
|
|
46
|
+
id: M,
|
|
47
|
+
input: { status: J.status === "active" ? n.Paused : n.Active }
|
|
48
|
+
} }), await I();
|
|
48
49
|
} catch (e) {
|
|
49
|
-
|
|
50
|
+
V(e instanceof Error ? e.message : "Failed to update campaign.");
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
|
-
},
|
|
53
|
-
if (!
|
|
54
|
-
if (!
|
|
55
|
-
|
|
53
|
+
}, be = async () => {
|
|
54
|
+
if (!M || !L) return;
|
|
55
|
+
if (!L.name.trim()) {
|
|
56
|
+
V("Campaign name is required.");
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
let e = Number(
|
|
59
|
+
V(null);
|
|
60
|
+
let e = Number(L.totalBudget);
|
|
60
61
|
try {
|
|
61
|
-
await
|
|
62
|
-
id:
|
|
62
|
+
await W({ variables: {
|
|
63
|
+
id: M,
|
|
63
64
|
input: {
|
|
64
|
-
name:
|
|
65
|
-
status:
|
|
66
|
-
bidStrategy:
|
|
67
|
-
totalBudget:
|
|
68
|
-
startDate:
|
|
69
|
-
endDate:
|
|
65
|
+
name: L.name.trim(),
|
|
66
|
+
status: s(L.status),
|
|
67
|
+
bidStrategy: L.bidStrategy || null,
|
|
68
|
+
totalBudget: L.totalBudget && Number.isFinite(e) ? e : null,
|
|
69
|
+
startDate: L.startDate ? new Date(L.startDate).toISOString() : null,
|
|
70
|
+
endDate: L.endDate ? new Date(L.endDate).toISOString() : null
|
|
70
71
|
}
|
|
71
|
-
} }),
|
|
72
|
+
} }), R(null), await I();
|
|
72
73
|
} catch (e) {
|
|
73
|
-
|
|
74
|
+
V(e instanceof Error ? e.message : "Failed to save campaign.");
|
|
74
75
|
}
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
|
|
76
|
+
}, xe = async () => {
|
|
77
|
+
if (M) {
|
|
78
|
+
V(null);
|
|
78
79
|
try {
|
|
79
|
-
await ve({ variables: { id:
|
|
80
|
+
await ve({ variables: { id: M } }), z(!1), await I(), Z();
|
|
80
81
|
} catch (e) {
|
|
81
|
-
|
|
82
|
+
V(e instanceof Error ? e.message : "Failed to delete campaign.");
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
name:
|
|
87
|
-
status:
|
|
88
|
-
totalBudget:
|
|
89
|
-
bidStrategy:
|
|
90
|
-
startDate:
|
|
91
|
-
endDate:
|
|
85
|
+
}, Se = () => {
|
|
86
|
+
J && (V(null), R({
|
|
87
|
+
name: J.name,
|
|
88
|
+
status: J.status,
|
|
89
|
+
totalBudget: J.budget.total > 0 ? String(J.budget.total) : "",
|
|
90
|
+
bidStrategy: J.bidStrategy,
|
|
91
|
+
startDate: k(J.startDate),
|
|
92
|
+
endDate: k(J.endDate)
|
|
92
93
|
}));
|
|
93
94
|
};
|
|
94
|
-
if (!
|
|
95
|
+
if (!J) return /* @__PURE__ */ w(u, {
|
|
95
96
|
title: "Ad Campaign",
|
|
96
|
-
children: /* @__PURE__ */ w(
|
|
97
|
-
loading:
|
|
98
|
-
error:
|
|
99
|
-
onRetry:
|
|
100
|
-
hasData: !!
|
|
101
|
-
children: /* @__PURE__ */ w(
|
|
97
|
+
children: /* @__PURE__ */ w(ie, {
|
|
98
|
+
loading: P,
|
|
99
|
+
error: F,
|
|
100
|
+
onRetry: I,
|
|
101
|
+
hasData: !!N,
|
|
102
|
+
children: /* @__PURE__ */ w(ne, {
|
|
102
103
|
illustration: "empty-generic",
|
|
103
104
|
title: "Campaign not found",
|
|
104
105
|
description: "This ad campaign doesn't exist or has been removed.",
|
|
105
106
|
action: /* @__PURE__ */ T("button", {
|
|
106
|
-
onClick:
|
|
107
|
+
onClick: Z,
|
|
107
108
|
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",
|
|
108
|
-
children: [/* @__PURE__ */ w(
|
|
109
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Back to Campaigns"]
|
|
109
110
|
})
|
|
110
111
|
})
|
|
111
112
|
})
|
|
112
113
|
});
|
|
113
|
-
let Q =
|
|
114
|
-
return /* @__PURE__ */ T(
|
|
115
|
-
title:
|
|
116
|
-
description: `${
|
|
114
|
+
let Q = J.budget.total > 0 ? Math.round(J.budget.spent / J.budget.total * 100) : 0, Ce = J.status === "active", $ = G || K;
|
|
115
|
+
return /* @__PURE__ */ T(u, {
|
|
116
|
+
title: J.name,
|
|
117
|
+
description: `${O[J.platform] ?? J.platform} · ${J.bidStrategy}`,
|
|
117
118
|
actions: /* @__PURE__ */ T("div", {
|
|
118
119
|
className: "flex flex-wrap items-center gap-2",
|
|
119
120
|
children: [
|
|
120
|
-
/* @__PURE__ */ w(
|
|
121
|
+
/* @__PURE__ */ w(re, { status: J.status }),
|
|
121
122
|
/* @__PURE__ */ T("button", {
|
|
122
|
-
onClick:
|
|
123
|
+
onClick: Z,
|
|
123
124
|
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",
|
|
124
|
-
children: [/* @__PURE__ */ w(
|
|
125
|
+
children: [/* @__PURE__ */ w(v, { className: "h-4 w-4" }), "Back"]
|
|
125
126
|
}),
|
|
126
127
|
/* @__PURE__ */ w("button", {
|
|
127
|
-
onClick: () => void
|
|
128
|
+
onClick: () => void ye(),
|
|
128
129
|
disabled: $,
|
|
129
130
|
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 disabled:opacity-60",
|
|
130
|
-
children:
|
|
131
|
+
children: Ce ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(S, { className: "h-4 w-4" }), "Pause"] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(de, { className: "h-4 w-4" }), "Activate"] })
|
|
131
132
|
}),
|
|
132
133
|
/* @__PURE__ */ T("button", {
|
|
133
|
-
onClick:
|
|
134
|
+
onClick: Se,
|
|
134
135
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
135
|
-
children: [/* @__PURE__ */ w(
|
|
136
|
+
children: [/* @__PURE__ */ w(ue, { className: "h-4 w-4" }), "Edit"]
|
|
136
137
|
}),
|
|
137
138
|
/* @__PURE__ */ T("button", {
|
|
138
|
-
onClick: () =>
|
|
139
|
+
onClick: () => z(!0),
|
|
139
140
|
disabled: $,
|
|
140
141
|
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-status-error-text hover:bg-bg-sunken disabled:opacity-60",
|
|
141
|
-
children: [/* @__PURE__ */ w(
|
|
142
|
+
children: [/* @__PURE__ */ w(pe, { className: "h-4 w-4" }), "Delete"]
|
|
142
143
|
})
|
|
143
144
|
]
|
|
144
145
|
}),
|
|
145
146
|
children: [
|
|
146
|
-
/* @__PURE__ */ w(
|
|
147
|
-
|
|
147
|
+
/* @__PURE__ */ w(E, { children: "Manage this ad campaign — review budget pacing and performance, adjust its schedule and bid strategy, pause or activate it, and see the creatives and audience it's running against." }),
|
|
148
|
+
B && /* @__PURE__ */ w("div", {
|
|
148
149
|
role: "alert",
|
|
149
150
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
150
|
-
children:
|
|
151
|
+
children: B
|
|
151
152
|
}),
|
|
152
|
-
/* @__PURE__ */ w(
|
|
153
|
+
/* @__PURE__ */ w(ge, { children: /* @__PURE__ */ T("div", {
|
|
153
154
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
154
155
|
children: [
|
|
155
|
-
/* @__PURE__ */ w(
|
|
156
|
+
/* @__PURE__ */ w(d, {
|
|
156
157
|
title: "Spend",
|
|
157
|
-
value:
|
|
158
|
-
icon: /* @__PURE__ */ w(
|
|
158
|
+
value: r(J.metrics.spend),
|
|
159
|
+
icon: /* @__PURE__ */ w(y, { className: "h-5 w-5" })
|
|
159
160
|
}),
|
|
160
|
-
/* @__PURE__ */ w(
|
|
161
|
+
/* @__PURE__ */ w(d, {
|
|
161
162
|
title: "Impressions",
|
|
162
|
-
value:
|
|
163
|
-
icon: /* @__PURE__ */ w(
|
|
163
|
+
value: a(J.metrics.impressions),
|
|
164
|
+
icon: /* @__PURE__ */ w(le, { className: "h-5 w-5" })
|
|
164
165
|
}),
|
|
165
|
-
/* @__PURE__ */ w(
|
|
166
|
+
/* @__PURE__ */ w(d, {
|
|
166
167
|
title: "Clicks",
|
|
167
|
-
value:
|
|
168
|
-
icon: /* @__PURE__ */ w(
|
|
168
|
+
value: a(J.metrics.clicks),
|
|
169
|
+
icon: /* @__PURE__ */ w(x, { className: "h-5 w-5" })
|
|
169
170
|
}),
|
|
170
|
-
/* @__PURE__ */ w(
|
|
171
|
+
/* @__PURE__ */ w(d, {
|
|
171
172
|
title: "ROAS",
|
|
172
|
-
value: `${
|
|
173
|
-
icon: /* @__PURE__ */ w(
|
|
173
|
+
value: `${J.metrics.roas.toFixed(1)}x`,
|
|
174
|
+
icon: /* @__PURE__ */ w(me, { className: "h-5 w-5" })
|
|
174
175
|
})
|
|
175
176
|
]
|
|
176
177
|
}) }),
|
|
178
|
+
/* @__PURE__ */ w("div", {
|
|
179
|
+
className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
|
|
180
|
+
children: /* @__PURE__ */ w(m, {
|
|
181
|
+
entityType: "HEADSHOTMARKETING_AD_CAMPAIGN",
|
|
182
|
+
entityId: J.id
|
|
183
|
+
})
|
|
184
|
+
}),
|
|
177
185
|
/* @__PURE__ */ T("div", {
|
|
178
186
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
179
187
|
children: [/* @__PURE__ */ T("div", {
|
|
@@ -181,33 +189,33 @@ var k = () => {
|
|
|
181
189
|
children: [
|
|
182
190
|
/* @__PURE__ */ T("h4", {
|
|
183
191
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
184
|
-
children: [/* @__PURE__ */ w(
|
|
192
|
+
children: [/* @__PURE__ */ w(y, { className: "h-4 w-4 text-text-secondary" }), "Budget"]
|
|
185
193
|
}),
|
|
186
194
|
/* @__PURE__ */ T("div", {
|
|
187
195
|
className: "mb-1.5 flex items-center justify-between text-xs text-text-secondary",
|
|
188
196
|
children: [
|
|
189
|
-
/* @__PURE__ */ T("span", { children: [
|
|
197
|
+
/* @__PURE__ */ T("span", { children: [r(J.budget.spent), " spent"] }),
|
|
190
198
|
/* @__PURE__ */ T("span", { children: [Q, "%"] }),
|
|
191
|
-
/* @__PURE__ */ T("span", { children: [
|
|
199
|
+
/* @__PURE__ */ T("span", { children: [r(J.budget.total), " total"] })
|
|
192
200
|
]
|
|
193
201
|
}),
|
|
194
202
|
/* @__PURE__ */ w("div", {
|
|
195
203
|
className: "h-2.5 w-full rounded-full bg-bg-sunken",
|
|
196
204
|
children: /* @__PURE__ */ w("div", {
|
|
197
|
-
className:
|
|
205
|
+
className: ee("h-2.5 rounded-full transition-all", Q >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
|
|
198
206
|
style: { width: `${Math.min(Q, 100)}%` }
|
|
199
207
|
})
|
|
200
208
|
}),
|
|
201
209
|
/* @__PURE__ */ T("p", {
|
|
202
210
|
className: "mt-3 text-xs text-text-secondary",
|
|
203
|
-
children: ["Remaining: ",
|
|
211
|
+
children: ["Remaining: ", r(J.budget.remaining)]
|
|
204
212
|
})
|
|
205
213
|
]
|
|
206
214
|
}), /* @__PURE__ */ T("div", {
|
|
207
215
|
className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
|
|
208
216
|
children: [/* @__PURE__ */ T("h4", {
|
|
209
217
|
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
210
|
-
children: [/* @__PURE__ */ w(
|
|
218
|
+
children: [/* @__PURE__ */ w(ce, { className: "h-4 w-4 text-text-secondary" }), "Schedule & settings"]
|
|
211
219
|
}), /* @__PURE__ */ T("dl", {
|
|
212
220
|
className: "space-y-2 text-sm",
|
|
213
221
|
children: [
|
|
@@ -218,7 +226,7 @@ var k = () => {
|
|
|
218
226
|
children: "Platform"
|
|
219
227
|
}), /* @__PURE__ */ w("dd", {
|
|
220
228
|
className: "font-medium text-text-primary",
|
|
221
|
-
children:
|
|
229
|
+
children: O[J.platform] ?? J.platform
|
|
222
230
|
})]
|
|
223
231
|
}),
|
|
224
232
|
/* @__PURE__ */ T("div", {
|
|
@@ -228,7 +236,7 @@ var k = () => {
|
|
|
228
236
|
children: "Bid strategy"
|
|
229
237
|
}), /* @__PURE__ */ w("dd", {
|
|
230
238
|
className: "font-medium text-text-primary",
|
|
231
|
-
children:
|
|
239
|
+
children: J.bidStrategy
|
|
232
240
|
})]
|
|
233
241
|
}),
|
|
234
242
|
/* @__PURE__ */ T("div", {
|
|
@@ -238,7 +246,7 @@ var k = () => {
|
|
|
238
246
|
children: "Start"
|
|
239
247
|
}), /* @__PURE__ */ w("dd", {
|
|
240
248
|
className: "font-medium text-text-primary",
|
|
241
|
-
children:
|
|
249
|
+
children: i(J.startDate)
|
|
242
250
|
})]
|
|
243
251
|
}),
|
|
244
252
|
/* @__PURE__ */ T("div", {
|
|
@@ -248,7 +256,7 @@ var k = () => {
|
|
|
248
256
|
children: "End"
|
|
249
257
|
}), /* @__PURE__ */ w("dd", {
|
|
250
258
|
className: "font-medium text-text-primary",
|
|
251
|
-
children:
|
|
259
|
+
children: i(J.endDate)
|
|
252
260
|
})]
|
|
253
261
|
}),
|
|
254
262
|
/* @__PURE__ */ T("div", {
|
|
@@ -258,7 +266,7 @@ var k = () => {
|
|
|
258
266
|
children: "CTR"
|
|
259
267
|
}), /* @__PURE__ */ w("dd", {
|
|
260
268
|
className: "font-medium text-text-primary",
|
|
261
|
-
children:
|
|
269
|
+
children: o(J.metrics.ctr)
|
|
262
270
|
})]
|
|
263
271
|
}),
|
|
264
272
|
/* @__PURE__ */ T("div", {
|
|
@@ -268,24 +276,24 @@ var k = () => {
|
|
|
268
276
|
children: "CPC"
|
|
269
277
|
}), /* @__PURE__ */ T("dd", {
|
|
270
278
|
className: "font-medium text-text-primary",
|
|
271
|
-
children: ["$",
|
|
279
|
+
children: ["$", J.metrics.cpc.toFixed(2)]
|
|
272
280
|
})]
|
|
273
281
|
})
|
|
274
282
|
]
|
|
275
283
|
})]
|
|
276
284
|
})]
|
|
277
285
|
}),
|
|
278
|
-
|
|
279
|
-
adCampaignId:
|
|
280
|
-
onApplied:
|
|
286
|
+
M && /* @__PURE__ */ w(se, {
|
|
287
|
+
adCampaignId: M,
|
|
288
|
+
onApplied: I
|
|
281
289
|
}),
|
|
282
|
-
|
|
283
|
-
adCampaignId:
|
|
284
|
-
onSynced:
|
|
290
|
+
M && /* @__PURE__ */ w(oe, {
|
|
291
|
+
adCampaignId: M,
|
|
292
|
+
onSynced: I
|
|
285
293
|
}),
|
|
286
|
-
|
|
294
|
+
M && /* @__PURE__ */ w(p, {
|
|
287
295
|
sourceType: "AD_CAMPAIGN",
|
|
288
|
-
sourceId:
|
|
296
|
+
sourceId: M,
|
|
289
297
|
allowCreate: !0,
|
|
290
298
|
title: "Tracked links",
|
|
291
299
|
description: "Create a tracked URL for this campaign's landing page and paste it as the ad destination. Clicks are counted here and attributed as AD_CLICK touchpoints.",
|
|
@@ -297,12 +305,12 @@ var k = () => {
|
|
|
297
305
|
className: "mb-4 text-sm font-semibold text-text-primary",
|
|
298
306
|
children: [
|
|
299
307
|
"Creatives (",
|
|
300
|
-
|
|
308
|
+
Y.length,
|
|
301
309
|
")"
|
|
302
310
|
]
|
|
303
|
-
}),
|
|
311
|
+
}), Y.length > 0 ? /* @__PURE__ */ w("div", {
|
|
304
312
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
305
|
-
children:
|
|
313
|
+
children: Y.map((e) => /* @__PURE__ */ T("div", {
|
|
306
314
|
className: "rounded-md border border-border-subtle p-3",
|
|
307
315
|
children: [
|
|
308
316
|
/* @__PURE__ */ T("div", {
|
|
@@ -322,20 +330,20 @@ var k = () => {
|
|
|
322
330
|
/* @__PURE__ */ T("div", {
|
|
323
331
|
className: "mt-2 flex flex-wrap gap-3 text-[11px] text-text-secondary",
|
|
324
332
|
children: [
|
|
325
|
-
/* @__PURE__ */ T("span", { children: [
|
|
326
|
-
/* @__PURE__ */ T("span", { children: [
|
|
327
|
-
/* @__PURE__ */ T("span", { children: [
|
|
333
|
+
/* @__PURE__ */ T("span", { children: [a(e.performance.impressions), " impr."] }),
|
|
334
|
+
/* @__PURE__ */ T("span", { children: [a(e.performance.clicks), " clicks"] }),
|
|
335
|
+
/* @__PURE__ */ T("span", { children: [o(e.performance.ctr), " CTR"] })
|
|
328
336
|
]
|
|
329
337
|
}),
|
|
330
338
|
/* @__PURE__ */ T("button", {
|
|
331
339
|
type: "button",
|
|
332
|
-
onClick: () =>
|
|
340
|
+
onClick: () => U({
|
|
333
341
|
id: e.id,
|
|
334
342
|
name: e.name,
|
|
335
343
|
landingPageUrl: e.landingPageUrl
|
|
336
344
|
}),
|
|
337
345
|
className: "mt-2 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-2 py-1 text-[11px] font-medium text-text-primary hover:bg-bg-sunken",
|
|
338
|
-
children: [/* @__PURE__ */ w(
|
|
346
|
+
children: [/* @__PURE__ */ w(b, { className: "h-3 w-3" }), "Tracked link"]
|
|
339
347
|
})
|
|
340
348
|
]
|
|
341
349
|
}, e.id))
|
|
@@ -349,14 +357,14 @@ var k = () => {
|
|
|
349
357
|
children: [/* @__PURE__ */ T("h4", {
|
|
350
358
|
className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
351
359
|
children: [
|
|
352
|
-
/* @__PURE__ */ w(
|
|
360
|
+
/* @__PURE__ */ w(fe, { className: "h-4 w-4 text-text-secondary" }),
|
|
353
361
|
"Audience (",
|
|
354
|
-
|
|
362
|
+
X.length,
|
|
355
363
|
")"
|
|
356
364
|
]
|
|
357
|
-
}),
|
|
365
|
+
}), X.length > 0 ? /* @__PURE__ */ w("div", {
|
|
358
366
|
className: "space-y-3",
|
|
359
|
-
children:
|
|
367
|
+
children: X.map((e) => /* @__PURE__ */ T("div", {
|
|
360
368
|
className: "rounded-md border border-border-subtle p-3",
|
|
361
369
|
children: [/* @__PURE__ */ T("div", {
|
|
362
370
|
className: "flex items-center justify-between gap-2",
|
|
@@ -365,7 +373,7 @@ var k = () => {
|
|
|
365
373
|
children: e.name
|
|
366
374
|
}), /* @__PURE__ */ T("span", {
|
|
367
375
|
className: "text-xs text-text-secondary",
|
|
368
|
-
children: [
|
|
376
|
+
children: [a(e.size), " people"]
|
|
369
377
|
})]
|
|
370
378
|
}), e.description && /* @__PURE__ */ w("p", {
|
|
371
379
|
className: "mt-1 text-xs text-text-secondary",
|
|
@@ -377,23 +385,23 @@ var k = () => {
|
|
|
377
385
|
children: "No audience is linked to this campaign."
|
|
378
386
|
})]
|
|
379
387
|
}),
|
|
380
|
-
/* @__PURE__ */ w(
|
|
381
|
-
open:
|
|
382
|
-
onClose: () =>
|
|
388
|
+
/* @__PURE__ */ w(f, {
|
|
389
|
+
open: L !== null,
|
|
390
|
+
onClose: () => R(null),
|
|
383
391
|
title: "Edit Campaign",
|
|
384
392
|
description: "Update campaign details",
|
|
385
393
|
size: "lg",
|
|
386
394
|
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
387
|
-
onClick: () =>
|
|
395
|
+
onClick: () => R(null),
|
|
388
396
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
389
397
|
children: "Cancel"
|
|
390
398
|
}), /* @__PURE__ */ w("button", {
|
|
391
|
-
onClick: () => void
|
|
392
|
-
disabled:
|
|
399
|
+
onClick: () => void be(),
|
|
400
|
+
disabled: G,
|
|
393
401
|
className: "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",
|
|
394
|
-
children:
|
|
402
|
+
children: G ? "Saving..." : "Save Changes"
|
|
395
403
|
})] }),
|
|
396
|
-
children:
|
|
404
|
+
children: L && /* @__PURE__ */ T("div", {
|
|
397
405
|
className: "space-y-4",
|
|
398
406
|
children: [
|
|
399
407
|
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
@@ -401,9 +409,9 @@ var k = () => {
|
|
|
401
409
|
children: "Campaign Name"
|
|
402
410
|
}), /* @__PURE__ */ w("input", {
|
|
403
411
|
type: "text",
|
|
404
|
-
value:
|
|
405
|
-
onChange: (e) =>
|
|
406
|
-
...
|
|
412
|
+
value: L.name,
|
|
413
|
+
onChange: (e) => R({
|
|
414
|
+
...L,
|
|
407
415
|
name: e.target.value
|
|
408
416
|
}),
|
|
409
417
|
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)]"
|
|
@@ -413,10 +421,10 @@ var k = () => {
|
|
|
413
421
|
children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
414
422
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
415
423
|
children: "Status"
|
|
416
|
-
}), /* @__PURE__ */ T(
|
|
417
|
-
value:
|
|
418
|
-
onChange: (e) =>
|
|
419
|
-
...
|
|
424
|
+
}), /* @__PURE__ */ T(D, {
|
|
425
|
+
value: L.status,
|
|
426
|
+
onChange: (e) => R({
|
|
427
|
+
...L,
|
|
420
428
|
status: e.target.value
|
|
421
429
|
}),
|
|
422
430
|
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)]",
|
|
@@ -443,9 +451,9 @@ var k = () => {
|
|
|
443
451
|
children: "Total Budget (USD)"
|
|
444
452
|
}), /* @__PURE__ */ w("input", {
|
|
445
453
|
type: "number",
|
|
446
|
-
value:
|
|
447
|
-
onChange: (e) =>
|
|
448
|
-
...
|
|
454
|
+
value: L.totalBudget,
|
|
455
|
+
onChange: (e) => R({
|
|
456
|
+
...L,
|
|
449
457
|
totalBudget: e.target.value
|
|
450
458
|
}),
|
|
451
459
|
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)]"
|
|
@@ -456,9 +464,9 @@ var k = () => {
|
|
|
456
464
|
children: "Bid Strategy"
|
|
457
465
|
}), /* @__PURE__ */ w("input", {
|
|
458
466
|
type: "text",
|
|
459
|
-
value:
|
|
460
|
-
onChange: (e) =>
|
|
461
|
-
...
|
|
467
|
+
value: L.bidStrategy,
|
|
468
|
+
onChange: (e) => R({
|
|
469
|
+
...L,
|
|
462
470
|
bidStrategy: e.target.value
|
|
463
471
|
}),
|
|
464
472
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
@@ -470,9 +478,9 @@ var k = () => {
|
|
|
470
478
|
children: "Start Date"
|
|
471
479
|
}), /* @__PURE__ */ w("input", {
|
|
472
480
|
type: "date",
|
|
473
|
-
value:
|
|
474
|
-
onChange: (e) =>
|
|
475
|
-
...
|
|
481
|
+
value: L.startDate,
|
|
482
|
+
onChange: (e) => R({
|
|
483
|
+
...L,
|
|
476
484
|
startDate: e.target.value
|
|
477
485
|
}),
|
|
478
486
|
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)]"
|
|
@@ -481,9 +489,9 @@ var k = () => {
|
|
|
481
489
|
children: "End Date"
|
|
482
490
|
}), /* @__PURE__ */ w("input", {
|
|
483
491
|
type: "date",
|
|
484
|
-
value:
|
|
485
|
-
onChange: (e) =>
|
|
486
|
-
...
|
|
492
|
+
value: L.endDate,
|
|
493
|
+
onChange: (e) => R({
|
|
494
|
+
...L,
|
|
487
495
|
endDate: e.target.value
|
|
488
496
|
}),
|
|
489
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)]"
|
|
@@ -492,35 +500,35 @@ var k = () => {
|
|
|
492
500
|
]
|
|
493
501
|
})
|
|
494
502
|
}),
|
|
495
|
-
/* @__PURE__ */ w(
|
|
496
|
-
open:
|
|
497
|
-
onClose: () =>
|
|
498
|
-
title:
|
|
503
|
+
/* @__PURE__ */ w(f, {
|
|
504
|
+
open: H !== null,
|
|
505
|
+
onClose: () => U(null),
|
|
506
|
+
title: H ? `Tracked link · ${H.name}` : "Tracked link",
|
|
499
507
|
description: "Use the tracked URL as this creative's ad destination.",
|
|
500
508
|
size: "lg",
|
|
501
|
-
children:
|
|
509
|
+
children: H && /* @__PURE__ */ w(p, {
|
|
502
510
|
sourceType: "AD_CREATIVE",
|
|
503
|
-
sourceId:
|
|
511
|
+
sourceId: H.id,
|
|
504
512
|
allowCreate: !0,
|
|
505
|
-
defaultDestinationUrl:
|
|
513
|
+
defaultDestinationUrl: H.landingPageUrl,
|
|
506
514
|
title: "Creative tracked links",
|
|
507
515
|
emptyMessage: "No tracked links for this creative yet."
|
|
508
|
-
},
|
|
516
|
+
}, H.id)
|
|
509
517
|
}),
|
|
510
|
-
/* @__PURE__ */ w(
|
|
518
|
+
/* @__PURE__ */ w(f, {
|
|
511
519
|
open: _e,
|
|
512
|
-
onClose: () =>
|
|
520
|
+
onClose: () => z(!1),
|
|
513
521
|
title: "Delete Campaign",
|
|
514
522
|
size: "sm",
|
|
515
523
|
footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
|
|
516
|
-
onClick: () =>
|
|
524
|
+
onClick: () => z(!1),
|
|
517
525
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
518
526
|
children: "Cancel"
|
|
519
527
|
}), /* @__PURE__ */ w("button", {
|
|
520
|
-
onClick: () => void
|
|
521
|
-
disabled:
|
|
528
|
+
onClick: () => void xe(),
|
|
529
|
+
disabled: K,
|
|
522
530
|
className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
|
|
523
|
-
children:
|
|
531
|
+
children: K ? "Deleting..." : "Delete"
|
|
524
532
|
})] }),
|
|
525
533
|
children: /* @__PURE__ */ T("p", {
|
|
526
534
|
className: "text-sm text-text-secondary",
|
|
@@ -529,7 +537,7 @@ var k = () => {
|
|
|
529
537
|
" ",
|
|
530
538
|
/* @__PURE__ */ w("span", {
|
|
531
539
|
className: "font-semibold text-text-primary",
|
|
532
|
-
children:
|
|
540
|
+
children: J.name
|
|
533
541
|
}),
|
|
534
542
|
"? This action cannot be undone."
|
|
535
543
|
]
|
|
@@ -538,6 +546,6 @@ var k = () => {
|
|
|
538
546
|
]
|
|
539
547
|
});
|
|
540
548
|
};
|
|
541
|
-
export {
|
|
549
|
+
export { A as AdCampaignDetailsPage };
|
|
542
550
|
|
|
543
551
|
//# sourceMappingURL=AdCampaignDetailsPage.js.map
|