@burdenoff/microfe-headshotmarketing 2026.626.2 → 2026.703.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/headshotmarketing/pages/HomePage.js +191 -255
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +28 -21
- package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +198 -310
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/utils/analyticsMapper.js +11 -11
- package/dist/headshotmarketing/utils/analyticsMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +4 -4
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,482 +5,418 @@ import { Cell as r } from "../../node_modules/recharts/es6/component/Cell.js";
|
|
|
5
5
|
import { Pie as i } from "../../node_modules/recharts/es6/polar/Pie.js";
|
|
6
6
|
import { CartesianGrid as a } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
7
7
|
import { Area as o } from "../../node_modules/recharts/es6/cartesian/Area.js";
|
|
8
|
-
import { XAxis as
|
|
9
|
-
import { YAxis as
|
|
10
|
-
import { PieChart as
|
|
11
|
-
import { AreaChart as
|
|
12
|
-
import { useHeadshotmarketingBootstrapDataQuery as
|
|
13
|
-
import { cn as
|
|
14
|
-
import { toCampaignModel as
|
|
15
|
-
import { toAdCampaignModel as
|
|
16
|
-
import { toCampaignTimeSeries as
|
|
8
|
+
import { XAxis as ee } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
9
|
+
import { YAxis as s } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
10
|
+
import { PieChart as c } from "../../node_modules/recharts/es6/chart/PieChart.js";
|
|
11
|
+
import { AreaChart as l } from "../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
12
|
+
import { useHeadshotmarketingBootstrapDataQuery as u } from "../../generated/wspace-operations.js";
|
|
13
|
+
import { cn as d, formatCurrency as f, formatNumber as p } from "../utils/helpers.js";
|
|
14
|
+
import { toCampaignModel as m } from "../utils/campaignMapper.js";
|
|
15
|
+
import { toAdCampaignModel as te } from "../utils/adsMapper.js";
|
|
16
|
+
import { toCampaignTimeSeries as ne, toChannelPerformance as re } from "../utils/analyticsMapper.js";
|
|
17
17
|
import { StatCard as h } from "../components/StatCard.js";
|
|
18
18
|
import { DataTable as g } from "../components/DataTable.js";
|
|
19
19
|
import { StatusBadge as _ } from "../components/StatusBadge.js";
|
|
20
|
-
import {
|
|
20
|
+
import { EmptyState as v } from "../components/EmptyState.js";
|
|
21
|
+
import { ChartCard as y } from "../components/ChartCard.js";
|
|
21
22
|
import "../components/index.js";
|
|
22
|
-
import { useState as
|
|
23
|
-
import { AlertCircle as
|
|
24
|
-
import { useI18n as
|
|
25
|
-
import { jsx as
|
|
26
|
-
import { AuroraBackground as
|
|
23
|
+
import { useState as b } from "react";
|
|
24
|
+
import { AlertCircle as x, AlertTriangle as S, CheckCircle2 as C, DollarSign as w, Download as ie, Heart as ae, Info as T, Megaphone as E, Percent as D, RefreshCw as O, ShoppingCart as k, Target as A, TrendingUp as j, Users as M } from "lucide-react";
|
|
25
|
+
import { useI18n as N } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
26
|
+
import { jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
27
|
+
import { AuroraBackground as I, EmphasisPanel as L, GradientText as R, NextSteps as z, PagePurpose as B, ShowMore as oe } from "@burdenoff/fe-libs/ui";
|
|
27
28
|
//#region src/headshotmarketing/pages/HomePage.tsx
|
|
28
|
-
var
|
|
29
|
+
var V = [
|
|
29
30
|
"var(--color-chart-1)",
|
|
30
31
|
"var(--color-chart-2)",
|
|
31
32
|
"var(--color-chart-3)",
|
|
32
33
|
"var(--color-chart-4)",
|
|
33
34
|
"var(--color-chart-5)",
|
|
34
35
|
"var(--color-chart-6)"
|
|
35
|
-
],
|
|
36
|
-
success:
|
|
37
|
-
warning:
|
|
38
|
-
error:
|
|
39
|
-
info:
|
|
40
|
-
},
|
|
36
|
+
], H = {
|
|
37
|
+
success: C,
|
|
38
|
+
warning: S,
|
|
39
|
+
error: x,
|
|
40
|
+
info: T
|
|
41
|
+
}, U = {
|
|
41
42
|
success: "border-status-success-border bg-status-success-bg text-status-success-text",
|
|
42
43
|
warning: "border-status-warning-border bg-status-warning-bg text-status-warning-text",
|
|
43
44
|
error: "border-status-error-border bg-status-error-bg text-status-error-text",
|
|
44
45
|
info: "border-status-info-border bg-status-info-bg text-status-info-text"
|
|
45
|
-
},
|
|
46
|
+
}, W = {
|
|
46
47
|
success: "text-status-success-text",
|
|
47
48
|
warning: "text-status-warning-text",
|
|
48
49
|
error: "text-status-error-text",
|
|
49
50
|
info: "text-status-info-text"
|
|
50
|
-
},
|
|
51
|
-
let { navigate:
|
|
52
|
-
let n =
|
|
51
|
+
}, G = () => {
|
|
52
|
+
let { navigate: x, basePath: S } = e(), { t: C } = N(), G = (e, t) => {
|
|
53
|
+
let n = C(e);
|
|
53
54
|
return n === e ? t : n;
|
|
54
|
-
}, { data:
|
|
55
|
+
}, { data: K } = u({ variables: {
|
|
55
56
|
limit: 200,
|
|
56
57
|
offset: 0
|
|
57
|
-
} }), [
|
|
58
|
-
{
|
|
59
|
-
label: U("headshotmarketing.home.goals.revenue", "Revenue"),
|
|
60
|
-
percent: 78
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
label: U("headshotmarketing.home.goals.customers", "Customers"),
|
|
64
|
-
percent: 65
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: U("headshotmarketing.home.goals.roi", "ROI"),
|
|
68
|
-
percent: 82
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
label: U("headshotmarketing.home.goals.traffic", "Traffic"),
|
|
72
|
-
percent: 91
|
|
73
|
-
}
|
|
74
|
-
], Y = [
|
|
75
|
-
{
|
|
76
|
-
device: U("headshotmarketing.home.devices.desktop", "Desktop"),
|
|
77
|
-
sessions: 58
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
device: U("headshotmarketing.home.devices.mobile", "Mobile"),
|
|
81
|
-
sessions: 32
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
device: U("headshotmarketing.home.devices.tablet", "Tablet"),
|
|
85
|
-
sessions: 10
|
|
86
|
-
}
|
|
87
|
-
], de = [
|
|
58
|
+
} }), [q, se] = b("overview"), J = (K?.headshotmarketingCampaigns.items ?? []).map((e) => m(e)), ce = (K?.headshotmarketingAdCampaigns.items ?? []).map((e) => te(e)), le = ne(J), Y = re(J, ce), ue = [
|
|
88
59
|
{
|
|
89
60
|
key: "name",
|
|
90
|
-
header:
|
|
61
|
+
header: G("headshotmarketing.home.table.columns.name", "Name"),
|
|
91
62
|
sortable: !0
|
|
92
63
|
},
|
|
93
64
|
{
|
|
94
65
|
key: "type",
|
|
95
|
-
header:
|
|
66
|
+
header: G("headshotmarketing.home.table.columns.type", "Type"),
|
|
96
67
|
sortable: !0,
|
|
97
|
-
render: (e) => /* @__PURE__ */
|
|
68
|
+
render: (e) => /* @__PURE__ */ P("span", {
|
|
98
69
|
className: "capitalize",
|
|
99
70
|
children: e.type
|
|
100
71
|
})
|
|
101
72
|
},
|
|
102
73
|
{
|
|
103
74
|
key: "status",
|
|
104
|
-
header:
|
|
105
|
-
render: (e) => /* @__PURE__ */
|
|
75
|
+
header: G("headshotmarketing.home.table.columns.status", "Status"),
|
|
76
|
+
render: (e) => /* @__PURE__ */ P(_, { status: e.status })
|
|
106
77
|
},
|
|
107
78
|
{
|
|
108
79
|
key: "impressions",
|
|
109
|
-
header:
|
|
80
|
+
header: G("headshotmarketing.home.table.columns.impressions", "Impressions"),
|
|
110
81
|
sortable: !0,
|
|
111
|
-
render: (e) =>
|
|
82
|
+
render: (e) => p(e.metrics.impressions)
|
|
112
83
|
},
|
|
113
84
|
{
|
|
114
85
|
key: "clicks",
|
|
115
|
-
header:
|
|
86
|
+
header: G("headshotmarketing.home.table.columns.clicks", "Clicks"),
|
|
116
87
|
sortable: !0,
|
|
117
|
-
render: (e) =>
|
|
88
|
+
render: (e) => p(e.metrics.clicks)
|
|
118
89
|
},
|
|
119
90
|
{
|
|
120
91
|
key: "conversions",
|
|
121
|
-
header:
|
|
92
|
+
header: G("headshotmarketing.home.table.columns.conversions", "Conversions"),
|
|
122
93
|
sortable: !0,
|
|
123
|
-
render: (e) =>
|
|
94
|
+
render: (e) => p(e.metrics.conversions)
|
|
124
95
|
},
|
|
125
96
|
{
|
|
126
97
|
key: "roas",
|
|
127
|
-
header:
|
|
98
|
+
header: G("headshotmarketing.home.table.columns.roas", "ROAS"),
|
|
128
99
|
sortable: !0,
|
|
129
100
|
render: (e) => `${e.metrics.roas.toFixed(1)}x`
|
|
130
101
|
}
|
|
131
|
-
], X =
|
|
102
|
+
], X = J.reduce((e, t) => (e.revenue += t.metrics.revenue, e.conversions += t.metrics.conversions, e.clicks += t.metrics.clicks, e), {
|
|
132
103
|
revenue: 0,
|
|
133
|
-
conversions: 0
|
|
134
|
-
|
|
135
|
-
|
|
104
|
+
conversions: 0,
|
|
105
|
+
clicks: 0
|
|
106
|
+
}), Z = J.reduce((e, t) => e + t.metrics.cost, 0), Q = Z > 0 ? X.revenue / Z : 0, de = X.clicks > 0 ? `${(X.conversions / X.clicks * 100).toFixed(1)}%` : "—", $ = {
|
|
107
|
+
topChannels: Y,
|
|
136
108
|
recentAlerts: [{
|
|
137
109
|
id: "alert-1",
|
|
138
110
|
type: Q >= 3 ? "success" : "warning",
|
|
139
|
-
message: Q >= 3 ?
|
|
111
|
+
message: Q >= 3 ? G("headshotmarketing.home.alerts.roasHealthy", "ROAS is healthy across active channels.") : G("headshotmarketing.home.alerts.roasDropped", "ROAS dropped below target in this period."),
|
|
140
112
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
141
113
|
}, {
|
|
142
114
|
id: "alert-2",
|
|
143
|
-
type:
|
|
144
|
-
message:
|
|
115
|
+
type: J.length > 0 ? "info" : "error",
|
|
116
|
+
message: J.length > 0 ? `${J.length} ${G("headshotmarketing.home.alerts.campaignsTrackedSuffix", "campaigns are currently tracked.")}` : G("headshotmarketing.home.alerts.noCampaigns", "No campaigns found in workspace data."),
|
|
145
117
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
146
118
|
}]
|
|
147
119
|
}, fe = [
|
|
148
120
|
{
|
|
149
121
|
key: "overview",
|
|
150
|
-
label:
|
|
122
|
+
label: G("headshotmarketing.home.tabs.overview", "Overview")
|
|
151
123
|
},
|
|
152
124
|
{
|
|
153
125
|
key: "performance",
|
|
154
|
-
label:
|
|
126
|
+
label: G("headshotmarketing.home.tabs.performance", "Performance")
|
|
155
127
|
},
|
|
156
128
|
{
|
|
157
129
|
key: "audience",
|
|
158
|
-
label:
|
|
130
|
+
label: G("headshotmarketing.home.tabs.audience", "Audience")
|
|
159
131
|
},
|
|
160
132
|
{
|
|
161
133
|
key: "campaigns",
|
|
162
|
-
label:
|
|
134
|
+
label: G("headshotmarketing.home.tabs.campaigns", "Campaigns")
|
|
163
135
|
}
|
|
164
136
|
];
|
|
165
|
-
return /* @__PURE__ */
|
|
137
|
+
return /* @__PURE__ */ F("div", {
|
|
166
138
|
className: "space-y-6",
|
|
167
139
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ F("header", {
|
|
169
141
|
className: "relative overflow-hidden rounded-card border border-border-seam bg-gloss-card px-6 py-7 shadow-[var(--shadow-pop)] sm:px-8",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ P(I, { intensity: "subtle" }), /* @__PURE__ */ F("div", {
|
|
171
143
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("h1", {
|
|
173
145
|
className: "text-2xl font-bold tracking-tight text-text-primary sm:text-3xl",
|
|
174
|
-
children: /* @__PURE__ */
|
|
175
|
-
}), /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ P(R, { children: G("headshotmarketing.home.title", "Dashboard") })
|
|
147
|
+
}), /* @__PURE__ */ P("p", {
|
|
176
148
|
className: "mt-1 text-sm text-text-secondary",
|
|
177
|
-
children:
|
|
178
|
-
})] }), /* @__PURE__ */
|
|
149
|
+
children: G("headshotmarketing.home.subtitle", "Your marketing performance at a glance.")
|
|
150
|
+
})] }), /* @__PURE__ */ F("div", {
|
|
179
151
|
className: "flex items-center gap-2",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */ F("button", {
|
|
181
153
|
type: "button",
|
|
182
154
|
className: "inline-flex min-h-[44px] items-center gap-2 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ P(O, {
|
|
184
156
|
className: "h-4 w-4",
|
|
185
157
|
"aria-hidden": "true"
|
|
186
|
-
}),
|
|
187
|
-
}), /* @__PURE__ */
|
|
158
|
+
}), G("headshotmarketing.home.actions.refresh", "Refresh")]
|
|
159
|
+
}), /* @__PURE__ */ F("button", {
|
|
188
160
|
type: "button",
|
|
189
161
|
className: "inline-flex min-h-[44px] items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text shadow-pop transition-colors hover:bg-action-primary-bg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ P(ie, {
|
|
191
163
|
className: "h-4 w-4",
|
|
192
164
|
"aria-hidden": "true"
|
|
193
|
-
}),
|
|
165
|
+
}), G("headshotmarketing.home.actions.export", "Export")]
|
|
194
166
|
})]
|
|
195
167
|
})]
|
|
196
168
|
})]
|
|
197
169
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ P(B, { children: G("headshotmarketing.home.purpose", "Your marketing at a glance. This dashboard pulls revenue, active campaigns, conversions and ROAS into one view, then lets you dig into performance, audience and campaign detail — so you always know what's working and where to act next.") }),
|
|
171
|
+
/* @__PURE__ */ P(z, {
|
|
200
172
|
storageKey: "headshotmarketing-home",
|
|
201
173
|
steps: [
|
|
202
174
|
{
|
|
203
175
|
id: "campaign",
|
|
204
|
-
label:
|
|
205
|
-
description:
|
|
206
|
-
icon: /* @__PURE__ */
|
|
207
|
-
onClick: () =>
|
|
176
|
+
label: G("headshotmarketing.home.next.newCampaign", "Launch a campaign"),
|
|
177
|
+
description: G("headshotmarketing.home.next.newCampaignDesc", "Set up a marketing campaign end to end."),
|
|
178
|
+
icon: /* @__PURE__ */ P(E, { className: "h-4 w-4" }),
|
|
179
|
+
onClick: () => x(S + "/campaigns/new")
|
|
208
180
|
},
|
|
209
181
|
{
|
|
210
182
|
id: "ads",
|
|
211
|
-
label:
|
|
212
|
-
description:
|
|
213
|
-
icon: /* @__PURE__ */
|
|
214
|
-
onClick: () =>
|
|
183
|
+
label: G("headshotmarketing.home.next.ads", "Run paid ads"),
|
|
184
|
+
description: G("headshotmarketing.home.next.adsDesc", "Drive traffic with Google, Meta or LinkedIn ads."),
|
|
185
|
+
icon: /* @__PURE__ */ P(A, { className: "h-4 w-4" }),
|
|
186
|
+
onClick: () => x(S + "/ads")
|
|
215
187
|
},
|
|
216
188
|
{
|
|
217
189
|
id: "analytics",
|
|
218
|
-
label:
|
|
219
|
-
description:
|
|
220
|
-
icon: /* @__PURE__ */
|
|
221
|
-
onClick: () =>
|
|
190
|
+
label: G("headshotmarketing.home.next.analytics", "Review analytics"),
|
|
191
|
+
description: G("headshotmarketing.home.next.analyticsDesc", "Dig into channel and campaign performance."),
|
|
192
|
+
icon: /* @__PURE__ */ P(j, { className: "h-4 w-4" }),
|
|
193
|
+
onClick: () => x(S + "/analytics")
|
|
222
194
|
}
|
|
223
195
|
]
|
|
224
196
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ F("div", {
|
|
226
198
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
227
199
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ P(h, {
|
|
229
201
|
featured: !0,
|
|
230
|
-
title:
|
|
231
|
-
value:
|
|
232
|
-
|
|
233
|
-
changeLabel: U("headshotmarketing.common.vsLastMonth", "vs last month"),
|
|
234
|
-
icon: /* @__PURE__ */ M(ae, { className: "h-5 w-5" })
|
|
202
|
+
title: G("headshotmarketing.home.stats.totalRevenue", "Total Revenue"),
|
|
203
|
+
value: f(X.revenue),
|
|
204
|
+
icon: /* @__PURE__ */ P(w, { className: "h-5 w-5" })
|
|
235
205
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
title:
|
|
238
|
-
value: String(
|
|
239
|
-
|
|
240
|
-
changeLabel: U("headshotmarketing.common.vsLastMonth", "vs last month"),
|
|
241
|
-
icon: /* @__PURE__ */ M(w, { className: "h-5 w-5" })
|
|
206
|
+
/* @__PURE__ */ P(h, {
|
|
207
|
+
title: G("headshotmarketing.home.stats.activeCampaigns", "Active Campaigns"),
|
|
208
|
+
value: String(J.filter((e) => e.status === "active").length),
|
|
209
|
+
icon: /* @__PURE__ */ P(E, { className: "h-5 w-5" })
|
|
242
210
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
title:
|
|
245
|
-
value:
|
|
246
|
-
|
|
247
|
-
changeLabel: U("headshotmarketing.common.vsLastMonth", "vs last month"),
|
|
248
|
-
icon: /* @__PURE__ */ M(O, { className: "h-5 w-5" })
|
|
211
|
+
/* @__PURE__ */ P(h, {
|
|
212
|
+
title: G("headshotmarketing.home.stats.conversions", "Conversions"),
|
|
213
|
+
value: p(X.conversions),
|
|
214
|
+
icon: /* @__PURE__ */ P(A, { className: "h-5 w-5" })
|
|
249
215
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
title:
|
|
216
|
+
/* @__PURE__ */ P(h, {
|
|
217
|
+
title: G("headshotmarketing.home.stats.roas", "ROAS"),
|
|
252
218
|
value: `${Q.toFixed(1)}x`,
|
|
253
|
-
|
|
254
|
-
changeLabel: U("headshotmarketing.common.vsLastMonth", "vs last month"),
|
|
255
|
-
icon: /* @__PURE__ */ M(k, { className: "h-5 w-5" })
|
|
219
|
+
icon: /* @__PURE__ */ P(j, { className: "h-5 w-5" })
|
|
256
220
|
})
|
|
257
221
|
]
|
|
258
222
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ P(oe, {
|
|
260
224
|
collapsedHeight: 0,
|
|
261
|
-
label:
|
|
262
|
-
children: /* @__PURE__ */
|
|
225
|
+
label: G("headshotmarketing.home.actions.moreMetrics", "More metrics"),
|
|
226
|
+
children: /* @__PURE__ */ F("div", {
|
|
263
227
|
className: "grid grid-cols-1 gap-4 pt-1 sm:grid-cols-2 lg:grid-cols-4",
|
|
264
228
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
title:
|
|
267
|
-
value:
|
|
268
|
-
icon: /* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ P(h, {
|
|
230
|
+
title: G("headshotmarketing.home.stats.conversionRate", "Conversion Rate"),
|
|
231
|
+
value: de,
|
|
232
|
+
icon: /* @__PURE__ */ P(D, { className: "h-5 w-5" })
|
|
269
233
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
-
title:
|
|
272
|
-
value:
|
|
273
|
-
icon: /* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ P(h, {
|
|
235
|
+
title: G("headshotmarketing.home.stats.avgOrderValue", "Avg Order Value"),
|
|
236
|
+
value: "—",
|
|
237
|
+
icon: /* @__PURE__ */ P(k, { className: "h-5 w-5" })
|
|
274
238
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
title:
|
|
277
|
-
value:
|
|
278
|
-
icon: /* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ P(h, {
|
|
240
|
+
title: G("headshotmarketing.home.stats.customerLtv", "Customer LTV"),
|
|
241
|
+
value: "—",
|
|
242
|
+
icon: /* @__PURE__ */ P(ae, { className: "h-5 w-5" })
|
|
279
243
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
title:
|
|
282
|
-
value: "
|
|
283
|
-
icon: /* @__PURE__ */ M
|
|
244
|
+
/* @__PURE__ */ P(h, {
|
|
245
|
+
title: G("headshotmarketing.home.stats.monthlyVisitors", "Monthly Visitors"),
|
|
246
|
+
value: "—",
|
|
247
|
+
icon: /* @__PURE__ */ P(M, { className: "h-5 w-5" })
|
|
284
248
|
})
|
|
285
249
|
]
|
|
286
250
|
})
|
|
287
251
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ F(L, { children: [/* @__PURE__ */ P("h3", {
|
|
289
253
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
290
|
-
children:
|
|
291
|
-
}), /* @__PURE__ */
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
children: [/* @__PURE__ */ M("span", {
|
|
296
|
-
className: "text-sm font-medium text-text-primary",
|
|
297
|
-
children: e.label
|
|
298
|
-
}), /* @__PURE__ */ N("span", {
|
|
299
|
-
className: "text-sm font-medium tabular-nums text-text-secondary",
|
|
300
|
-
children: [e.percent, "%"]
|
|
301
|
-
})]
|
|
302
|
-
}), /* @__PURE__ */ M("div", {
|
|
303
|
-
className: "h-2 w-full rounded-full bg-bg-sunken",
|
|
304
|
-
children: /* @__PURE__ */ M("div", {
|
|
305
|
-
className: "h-2 rounded-full bg-action-primary-bg transition-all",
|
|
306
|
-
style: { width: `${e.percent}%` }
|
|
307
|
-
})
|
|
308
|
-
})] }, e.label))
|
|
254
|
+
children: G("headshotmarketing.home.sections.monthlyGoals", "Monthly Goals")
|
|
255
|
+
}), /* @__PURE__ */ P(v, {
|
|
256
|
+
icon: /* @__PURE__ */ P(A, { className: "h-10 w-10" }),
|
|
257
|
+
title: G("headshotmarketing.home.goals.emptyTitle", "No goal data yet"),
|
|
258
|
+
description: G("headshotmarketing.home.goals.emptyDesc", "Set monthly targets to track progress against revenue, customers, ROI and traffic.")
|
|
309
259
|
})] }),
|
|
310
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("div", {
|
|
311
261
|
className: "flex items-center gap-1 border-b border-border-subtle",
|
|
312
|
-
children: fe.map((e) => /* @__PURE__ */
|
|
313
|
-
onClick: () =>
|
|
314
|
-
className:
|
|
262
|
+
children: fe.map((e) => /* @__PURE__ */ P("button", {
|
|
263
|
+
onClick: () => se(e.key),
|
|
264
|
+
className: d("px-4 py-2 text-sm font-medium border-b-2 transition-colors -mb-px", q === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
315
265
|
children: e.label
|
|
316
266
|
}, e.key))
|
|
317
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ F("div", {
|
|
318
268
|
className: "mt-6",
|
|
319
269
|
children: [
|
|
320
|
-
|
|
270
|
+
q === "overview" && /* @__PURE__ */ F("div", {
|
|
321
271
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
323
|
-
title:
|
|
324
|
-
subtitle:
|
|
325
|
-
children: /* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ P(y, {
|
|
273
|
+
title: G("headshotmarketing.home.charts.revenueTrend", "Revenue Trend"),
|
|
274
|
+
subtitle: G("headshotmarketing.home.charts.last30Days", "Last 30 days"),
|
|
275
|
+
children: /* @__PURE__ */ P(n, {
|
|
326
276
|
width: "100%",
|
|
327
277
|
height: 280,
|
|
328
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ F(l, {
|
|
329
279
|
data: le,
|
|
330
280
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ P(a, {
|
|
332
282
|
strokeDasharray: "3 3",
|
|
333
283
|
className: "stroke-border"
|
|
334
284
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ P(ee, {
|
|
336
286
|
dataKey: "date",
|
|
337
287
|
tick: { fontSize: 11 },
|
|
338
288
|
className: "text-text-secondary",
|
|
339
289
|
tickFormatter: (e) => e.slice(5)
|
|
340
290
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ P(s, {
|
|
342
292
|
tick: { fontSize: 11 },
|
|
343
293
|
className: "text-text-secondary"
|
|
344
294
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ P(t, { contentStyle: {
|
|
346
296
|
backgroundColor: "var(--color-card)",
|
|
347
297
|
border: "1px solid var(--color-border)",
|
|
348
298
|
borderRadius: 8
|
|
349
299
|
} }),
|
|
350
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ P(o, {
|
|
351
301
|
type: "monotone",
|
|
352
302
|
dataKey: "revenue",
|
|
353
|
-
stroke:
|
|
354
|
-
fill:
|
|
303
|
+
stroke: V[0],
|
|
304
|
+
fill: V[0],
|
|
355
305
|
fillOpacity: .15,
|
|
356
306
|
strokeWidth: 2,
|
|
357
|
-
name:
|
|
307
|
+
name: G("headshotmarketing.home.charts.revenue", "Revenue")
|
|
358
308
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ P(o, {
|
|
360
310
|
type: "monotone",
|
|
361
311
|
dataKey: "cost",
|
|
362
|
-
stroke:
|
|
363
|
-
fill:
|
|
312
|
+
stroke: V[3],
|
|
313
|
+
fill: V[3],
|
|
364
314
|
fillOpacity: .1,
|
|
365
315
|
strokeWidth: 2,
|
|
366
|
-
name:
|
|
316
|
+
name: G("headshotmarketing.home.charts.cost", "Cost")
|
|
367
317
|
})
|
|
368
318
|
]
|
|
369
319
|
})
|
|
370
320
|
})
|
|
371
|
-
}), /* @__PURE__ */
|
|
372
|
-
title:
|
|
373
|
-
subtitle:
|
|
374
|
-
children: /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ P(y, {
|
|
322
|
+
title: G("headshotmarketing.home.charts.channelPerformance", "Channel Performance"),
|
|
323
|
+
subtitle: G("headshotmarketing.home.charts.revenueDistribution", "Revenue distribution"),
|
|
324
|
+
children: /* @__PURE__ */ P(n, {
|
|
375
325
|
width: "100%",
|
|
376
326
|
height: 280,
|
|
377
|
-
children: /* @__PURE__ */
|
|
378
|
-
data:
|
|
327
|
+
children: /* @__PURE__ */ F(c, { children: [/* @__PURE__ */ P(i, {
|
|
328
|
+
data: Y,
|
|
379
329
|
dataKey: "revenue",
|
|
380
330
|
nameKey: "channel",
|
|
381
331
|
cx: "50%",
|
|
382
332
|
cy: "50%",
|
|
383
333
|
outerRadius: 100,
|
|
384
334
|
label: ({ name: e, percent: t }) => `${e} ${(t * 100).toFixed(0)}%`,
|
|
385
|
-
children:
|
|
386
|
-
}), /* @__PURE__ */
|
|
335
|
+
children: Y.map((e, t) => /* @__PURE__ */ P(r, { fill: V[t % V.length] }, e.channel))
|
|
336
|
+
}), /* @__PURE__ */ P(t, {
|
|
387
337
|
contentStyle: {
|
|
388
338
|
backgroundColor: "var(--color-card)",
|
|
389
339
|
border: "1px solid var(--color-border)",
|
|
390
340
|
borderRadius: 8
|
|
391
341
|
},
|
|
392
|
-
formatter: (e) =>
|
|
342
|
+
formatter: (e) => f(e)
|
|
393
343
|
})] })
|
|
394
344
|
})
|
|
395
345
|
})]
|
|
396
346
|
}),
|
|
397
|
-
|
|
347
|
+
q === "performance" && /* @__PURE__ */ F("div", {
|
|
398
348
|
className: "rounded-card border border-border-seam bg-gloss-card p-6 shadow-[var(--shadow-pop)]",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ P("h3", {
|
|
400
350
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
401
|
-
children:
|
|
402
|
-
}), /* @__PURE__ */
|
|
351
|
+
children: G("headshotmarketing.home.sections.topChannels", "Top Channels")
|
|
352
|
+
}), /* @__PURE__ */ P("div", {
|
|
403
353
|
className: "space-y-4",
|
|
404
|
-
children: $.topChannels.slice(0, 5).map((e) => /* @__PURE__ */
|
|
354
|
+
children: $.topChannels.slice(0, 5).map((e) => /* @__PURE__ */ F("div", {
|
|
405
355
|
className: "flex items-center justify-between",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ F("div", {
|
|
407
357
|
className: "flex items-center gap-3",
|
|
408
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ P("div", {
|
|
409
359
|
className: "h-3 w-3 rounded-full motion-safe:animate-vc-glow-pulse",
|
|
410
360
|
style: { backgroundColor: e.color }
|
|
411
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ P("span", {
|
|
412
362
|
className: "text-sm font-medium text-text-primary",
|
|
413
363
|
children: e.channel
|
|
414
364
|
})]
|
|
415
|
-
}), /* @__PURE__ */
|
|
365
|
+
}), /* @__PURE__ */ F("div", {
|
|
416
366
|
className: "flex items-center gap-4",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ P("span", {
|
|
418
368
|
className: "text-sm font-semibold tabular-nums text-text-primary",
|
|
419
|
-
children:
|
|
420
|
-
}), /* @__PURE__ */
|
|
421
|
-
className:
|
|
369
|
+
children: f(e.revenue)
|
|
370
|
+
}), /* @__PURE__ */ F("span", {
|
|
371
|
+
className: d("inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium tabular-nums", e.roas >= 3.5 ? "bg-status-success-bg text-status-success-text border-status-success-border" : "bg-status-warning-bg text-status-warning-text border-status-warning-border"),
|
|
422
372
|
children: [
|
|
423
373
|
e.roas.toFixed(1),
|
|
424
374
|
"x",
|
|
425
375
|
" ",
|
|
426
|
-
|
|
376
|
+
G("headshotmarketing.home.stats.roas", "ROAS")
|
|
427
377
|
]
|
|
428
378
|
})]
|
|
429
379
|
})]
|
|
430
380
|
}, e.channel))
|
|
431
381
|
})]
|
|
432
382
|
}),
|
|
433
|
-
|
|
383
|
+
q === "audience" && /* @__PURE__ */ F("div", {
|
|
434
384
|
className: "rounded-card border border-border-seam bg-gloss-card p-6 shadow-[var(--shadow-pop)]",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ P("h3", {
|
|
436
386
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
437
|
-
children:
|
|
438
|
-
}), /* @__PURE__ */
|
|
439
|
-
className: "
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
children: [/* @__PURE__ */ M("span", {
|
|
443
|
-
className: "text-sm font-medium text-text-primary",
|
|
444
|
-
children: e.device
|
|
445
|
-
}), /* @__PURE__ */ N("span", {
|
|
446
|
-
className: "text-sm tabular-nums text-text-secondary",
|
|
447
|
-
children: [e.sessions, "%"]
|
|
448
|
-
})]
|
|
449
|
-
}), /* @__PURE__ */ M("div", {
|
|
450
|
-
className: "h-3 w-full rounded-full bg-bg-sunken",
|
|
451
|
-
children: /* @__PURE__ */ M("div", {
|
|
452
|
-
className: "h-3 rounded-full bg-action-primary-bg transition-all",
|
|
453
|
-
style: { width: `${e.sessions}%` }
|
|
454
|
-
})
|
|
455
|
-
})] }, e.device))
|
|
387
|
+
children: G("headshotmarketing.home.sections.deviceBreakdown", "Device Breakdown")
|
|
388
|
+
}), /* @__PURE__ */ P(v, {
|
|
389
|
+
icon: /* @__PURE__ */ P(M, { className: "h-10 w-10" }),
|
|
390
|
+
title: G("headshotmarketing.home.devices.emptyTitle", "No audience data yet"),
|
|
391
|
+
description: G("headshotmarketing.home.devices.emptyDesc", "Device and session breakdowns will appear here once audience analytics are available.")
|
|
456
392
|
})]
|
|
457
393
|
}),
|
|
458
|
-
|
|
459
|
-
data:
|
|
460
|
-
columns:
|
|
394
|
+
q === "campaigns" && /* @__PURE__ */ P(g, {
|
|
395
|
+
data: J,
|
|
396
|
+
columns: ue,
|
|
461
397
|
pageSize: 8,
|
|
462
|
-
onRowClick: (e) =>
|
|
463
|
-
emptyMessage:
|
|
398
|
+
onRowClick: (e) => x(S + "/campaigns/" + e.id),
|
|
399
|
+
emptyMessage: G("headshotmarketing.home.table.empty", "No campaigns found")
|
|
464
400
|
})
|
|
465
401
|
]
|
|
466
402
|
})] }),
|
|
467
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ F("div", {
|
|
468
404
|
className: "rounded-card border border-border-seam bg-gloss-card p-6 shadow-[var(--shadow-pop)]",
|
|
469
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ P("h3", {
|
|
470
406
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
471
|
-
children:
|
|
472
|
-
}), /* @__PURE__ */
|
|
407
|
+
children: G("headshotmarketing.home.sections.recentAlerts", "Recent Alerts")
|
|
408
|
+
}), /* @__PURE__ */ P("div", {
|
|
473
409
|
className: "space-y-3",
|
|
474
410
|
children: $.recentAlerts.map((e) => {
|
|
475
|
-
let t =
|
|
476
|
-
return /* @__PURE__ */
|
|
477
|
-
className:
|
|
478
|
-
children: [/* @__PURE__ */
|
|
411
|
+
let t = H[e.type] || T;
|
|
412
|
+
return /* @__PURE__ */ F("div", {
|
|
413
|
+
className: d("flex items-start gap-3 rounded-lg border p-3", U[e.type]),
|
|
414
|
+
children: [/* @__PURE__ */ P(t, { className: d("h-4 w-4 mt-0.5 flex-shrink-0", W[e.type]) }), /* @__PURE__ */ F("div", {
|
|
479
415
|
className: "flex-1 min-w-0",
|
|
480
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ P("p", {
|
|
481
417
|
className: "text-sm",
|
|
482
418
|
children: e.message
|
|
483
|
-
}), /* @__PURE__ */
|
|
419
|
+
}), /* @__PURE__ */ P("p", {
|
|
484
420
|
className: "text-xs mt-1 opacity-75",
|
|
485
421
|
children: new Date(e.timestamp).toLocaleString()
|
|
486
422
|
})]
|
|
@@ -493,6 +429,6 @@ var z = [
|
|
|
493
429
|
});
|
|
494
430
|
};
|
|
495
431
|
//#endregion
|
|
496
|
-
export {
|
|
432
|
+
export { G as HomePage };
|
|
497
433
|
|
|
498
434
|
//# sourceMappingURL=HomePage.js.map
|