@burdenoff/microfe-headshotmarketing 2026.1102.1 → 2026.1107.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 +323 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +484 -337
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +10195 -158
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +10 -6
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/hooks/useToast.js +25 -0
- package/dist/headshotmarketing/hooks/useToast.js.map +1 -0
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +171 -465
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js +541 -550
- package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/analyticsView.d.ts +153 -0
- package/dist/headshotmarketing/pages/analytics/analyticsView.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/analytics/analyticsView.js +371 -0
- package/dist/headshotmarketing/pages/analytics/analyticsView.js.map +1 -0
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.d.ts +83 -0
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js +592 -0
- package/dist/headshotmarketing/pages/analytics/analyticsWidgets.js.map +1 -0
- package/dist/headshotmarketing/pages/analytics/reportDraft.d.ts +40 -0
- package/dist/headshotmarketing/pages/analytics/reportDraft.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/analytics/reportDraft.js +66 -0
- package/dist/headshotmarketing/pages/analytics/reportDraft.js.map +1 -0
- package/dist/headshotmarketing/pages/analytics/useAnalyticsData.d.ts +23 -0
- package/dist/headshotmarketing/pages/analytics/useAnalyticsData.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/analytics/useAnalyticsData.js +68 -0
- package/dist/headshotmarketing/pages/analytics/useAnalyticsData.js.map +1 -0
- package/dist/headshotmarketing/utils/analyticsMapper.js +3 -42
- package/dist/headshotmarketing/utils/analyticsMapper.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +1 -1
- package/package.json +1 -1
- package/dist/node_modules/lodash/_arrayEach.js +0 -14
- package/dist/node_modules/lodash/_arrayEach.js.map +0 -1
- package/dist/node_modules/lodash/_assignValue.js +0 -17
- package/dist/node_modules/lodash/_assignValue.js.map +0 -1
- package/dist/node_modules/lodash/_baseAssign.js +0 -16
- package/dist/node_modules/lodash/_baseAssign.js.map +0 -1
- package/dist/node_modules/lodash/_baseAssignIn.js +0 -16
- package/dist/node_modules/lodash/_baseAssignIn.js.map +0 -1
- package/dist/node_modules/lodash/_baseClone.js +0 -64
- package/dist/node_modules/lodash/_baseClone.js.map +0 -1
- package/dist/node_modules/lodash/_baseCreate.js +0 -21
- package/dist/node_modules/lodash/_baseCreate.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsMap.js +0 -16
- package/dist/node_modules/lodash/_baseIsMap.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsSet.js +0 -16
- package/dist/node_modules/lodash/_baseIsSet.js.map +0 -1
- package/dist/node_modules/lodash/_baseKeysIn.js +0 -20
- package/dist/node_modules/lodash/_baseKeysIn.js.map +0 -1
- package/dist/node_modules/lodash/_baseUnset.js +0 -26
- package/dist/node_modules/lodash/_baseUnset.js.map +0 -1
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +0 -16
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +0 -1
- package/dist/node_modules/lodash/_cloneBuffer.js +0 -17
- package/dist/node_modules/lodash/_cloneBuffer.js.map +0 -1
- package/dist/node_modules/lodash/_cloneDataView.js +0 -16
- package/dist/node_modules/lodash/_cloneDataView.js.map +0 -1
- package/dist/node_modules/lodash/_cloneRegExp.js +0 -15
- package/dist/node_modules/lodash/_cloneRegExp.js.map +0 -1
- package/dist/node_modules/lodash/_cloneSymbol.js +0 -15
- package/dist/node_modules/lodash/_cloneSymbol.js.map +0 -1
- package/dist/node_modules/lodash/_cloneTypedArray.js +0 -16
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +0 -1
- package/dist/node_modules/lodash/_copyArray.js +0 -15
- package/dist/node_modules/lodash/_copyArray.js.map +0 -1
- package/dist/node_modules/lodash/_copyObject.js +0 -22
- package/dist/node_modules/lodash/_copyObject.js.map +0 -1
- package/dist/node_modules/lodash/_copySymbols.js +0 -16
- package/dist/node_modules/lodash/_copySymbols.js.map +0 -1
- package/dist/node_modules/lodash/_copySymbolsIn.js +0 -16
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +0 -1
- package/dist/node_modules/lodash/_customOmitClone.js +0 -15
- package/dist/node_modules/lodash/_customOmitClone.js.map +0 -1
- package/dist/node_modules/lodash/_flatRest.js +0 -17
- package/dist/node_modules/lodash/_flatRest.js.map +0 -1
- package/dist/node_modules/lodash/_getAllKeysIn.js +0 -17
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +0 -1
- package/dist/node_modules/lodash/_getSymbolsIn.js +0 -18
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +0 -1
- package/dist/node_modules/lodash/_initCloneArray.js +0 -15
- package/dist/node_modules/lodash/_initCloneArray.js.map +0 -1
- package/dist/node_modules/lodash/_initCloneByTag.js +0 -40
- package/dist/node_modules/lodash/_initCloneByTag.js.map +0 -1
- package/dist/node_modules/lodash/_initCloneObject.js +0 -17
- package/dist/node_modules/lodash/_initCloneObject.js.map +0 -1
- package/dist/node_modules/lodash/_nativeKeysIn.js +0 -15
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +0 -1
- package/dist/node_modules/lodash/_parent.js +0 -16
- package/dist/node_modules/lodash/_parent.js.map +0 -1
- package/dist/node_modules/lodash/flatten.js +0 -15
- package/dist/node_modules/lodash/flatten.js.map +0 -1
- package/dist/node_modules/lodash/isMap.js +0 -14
- package/dist/node_modules/lodash/isMap.js.map +0 -1
- package/dist/node_modules/lodash/isSet.js +0 -14
- package/dist/node_modules/lodash/isSet.js.map +0 -1
- package/dist/node_modules/lodash/keysIn.js +0 -17
- package/dist/node_modules/lodash/keysIn.js.map +0 -1
- package/dist/node_modules/lodash/omit.js +0 -28
- package/dist/node_modules/lodash/omit.js.map +0 -1
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js +0 -15
- package/dist/node_modules/recharts/es6/chart/FunnelChart.js.map +0 -1
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js +0 -370
- package/dist/node_modules/recharts/es6/numberAxis/Funnel.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js +0 -81
- package/dist/node_modules/recharts/es6/util/FunnelUtils.js.map +0 -1
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { Legend as e } from "../../../node_modules/recharts/es6/component/Legend.js";
|
|
2
|
+
import { Tooltip as t } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
3
|
+
import { ResponsiveContainer as n } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
4
|
+
import { Bar as r } from "../../../node_modules/recharts/es6/cartesian/Bar.js";
|
|
5
|
+
import { CartesianGrid as i } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
6
|
+
import { Line as a } from "../../../node_modules/recharts/es6/cartesian/Line.js";
|
|
7
|
+
import { XAxis as o } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
8
|
+
import { YAxis as s } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
9
|
+
import { LineChart as c } from "../../../node_modules/recharts/es6/chart/LineChart.js";
|
|
10
|
+
import { BarChart as l } from "../../../node_modules/recharts/es6/chart/BarChart.js";
|
|
11
|
+
import { cn as u, formatCurrency as d, formatNumber as f, formatPercentage as p } from "../../utils/helpers.js";
|
|
12
|
+
import { HeadshotmarketingReportDateRange as m, HeadshotmarketingReportWidget as h } from "../../../generated/wspace-types.js";
|
|
13
|
+
import { StatCard as g } from "../../components/StatCard.js";
|
|
14
|
+
import { DataTable as _ } from "../../components/DataTable.js";
|
|
15
|
+
import { ChartCard as v } from "../../components/ChartCard.js";
|
|
16
|
+
import "../../components/index.js";
|
|
17
|
+
import { HomeFunnel as y } from "../HomeFunnel.js";
|
|
18
|
+
import { CHART_COLORS as b, DATE_RANGE_OPTIONS as x } from "./analyticsView.js";
|
|
19
|
+
import { BarChart3 as S, CalendarRange as C, DollarSign as w, Filter as T, GitBranch as E, Info as D, Percent as O, Table2 as ee, Target as k, TrendingUp as A, Trophy as j, Wallet as M } from "lucide-react";
|
|
20
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
21
|
+
//#region src/headshotmarketing/pages/analytics/analyticsWidgets.tsx
|
|
22
|
+
var I = {
|
|
23
|
+
background: "var(--color-bg-surface)",
|
|
24
|
+
border: "1px solid var(--color-border-seam)",
|
|
25
|
+
borderRadius: "0.5rem",
|
|
26
|
+
boxShadow: "var(--shadow-pop)",
|
|
27
|
+
color: "var(--color-text-primary)",
|
|
28
|
+
fontSize: "0.75rem"
|
|
29
|
+
}, L = { color: "var(--color-text-secondary)" }, R = { color: "var(--color-text-primary)" }, z = { fontSize: 12 }, B = (e) => (/* @__PURE__ */ new Date(`${e}T00:00:00.000Z`)).toLocaleDateString("en-US", {
|
|
30
|
+
month: "short",
|
|
31
|
+
day: "numeric",
|
|
32
|
+
timeZone: "UTC"
|
|
33
|
+
}), V = (e) => Math.abs(e) >= 1e3 ? `$${f(Math.round(e / 100) / 10)}k` : d(e), H = ({ icon: e, message: t, height: n = 260 }) => /* @__PURE__ */ F("div", {
|
|
34
|
+
className: "flex flex-col items-center justify-center gap-2 px-4 text-center",
|
|
35
|
+
style: { minHeight: n },
|
|
36
|
+
children: [/* @__PURE__ */ P("span", {
|
|
37
|
+
className: "text-text-secondary/70",
|
|
38
|
+
children: e
|
|
39
|
+
}), /* @__PURE__ */ P("p", {
|
|
40
|
+
className: "max-w-xs text-xs text-text-secondary",
|
|
41
|
+
children: t
|
|
42
|
+
})]
|
|
43
|
+
}), U = ({ value: e, onChange: t, invalid: n = !1, idPrefix: r }) => /* @__PURE__ */ F("div", {
|
|
44
|
+
className: "flex flex-wrap items-center gap-2",
|
|
45
|
+
children: [/* @__PURE__ */ F("label", {
|
|
46
|
+
className: "relative inline-flex items-center",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ P("span", {
|
|
49
|
+
className: "sr-only",
|
|
50
|
+
children: "Date range"
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ P(C, { className: "pointer-events-none absolute left-3 h-4 w-4 text-text-secondary" }),
|
|
53
|
+
/* @__PURE__ */ P("select", {
|
|
54
|
+
id: `${r}-range`,
|
|
55
|
+
"aria-label": "Date range",
|
|
56
|
+
value: e.preset,
|
|
57
|
+
onChange: (n) => {
|
|
58
|
+
let r = x.find((e) => e.value === n.target.value)?.value;
|
|
59
|
+
r && t({
|
|
60
|
+
...e,
|
|
61
|
+
preset: r
|
|
62
|
+
});
|
|
63
|
+
},
|
|
64
|
+
className: "min-h-[44px] appearance-none rounded-md border border-border-seam bg-bg-surface py-2 pl-9 pr-8 text-sm font-medium text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
65
|
+
children: x.map((e) => /* @__PURE__ */ P("option", {
|
|
66
|
+
value: e.value,
|
|
67
|
+
children: e.label
|
|
68
|
+
}, e.value))
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
}), e.preset === m.Custom && /* @__PURE__ */ F(N, { children: [
|
|
72
|
+
/* @__PURE__ */ P("label", {
|
|
73
|
+
className: "sr-only",
|
|
74
|
+
htmlFor: `${r}-start`,
|
|
75
|
+
children: "Start date"
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ P("input", {
|
|
78
|
+
id: `${r}-start`,
|
|
79
|
+
type: "date",
|
|
80
|
+
value: e.customStart,
|
|
81
|
+
max: e.customEnd || void 0,
|
|
82
|
+
onChange: (n) => t({
|
|
83
|
+
...e,
|
|
84
|
+
customStart: n.target.value
|
|
85
|
+
}),
|
|
86
|
+
"aria-invalid": n,
|
|
87
|
+
className: u("min-h-[44px] rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary", n ? "border-status-error-border" : "border-border-seam")
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ P("span", {
|
|
90
|
+
className: "text-xs text-text-secondary",
|
|
91
|
+
children: "to"
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ P("label", {
|
|
94
|
+
className: "sr-only",
|
|
95
|
+
htmlFor: `${r}-end`,
|
|
96
|
+
children: "End date"
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ P("input", {
|
|
99
|
+
id: `${r}-end`,
|
|
100
|
+
type: "date",
|
|
101
|
+
value: e.customEnd,
|
|
102
|
+
min: e.customStart || void 0,
|
|
103
|
+
onChange: (n) => t({
|
|
104
|
+
...e,
|
|
105
|
+
customEnd: n.target.value
|
|
106
|
+
}),
|
|
107
|
+
"aria-invalid": n,
|
|
108
|
+
className: u("min-h-[44px] rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary", n ? "border-status-error-border" : "border-border-seam")
|
|
109
|
+
})
|
|
110
|
+
] })]
|
|
111
|
+
}), W = ({ source: e, windowLabel: t }) => e === "daily" ? null : /* @__PURE__ */ F("div", {
|
|
112
|
+
role: "status",
|
|
113
|
+
className: "flex items-start gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3 text-sm text-text-secondary",
|
|
114
|
+
children: [/* @__PURE__ */ P(D, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ P("p", { children: e === "lifetime" ? `No daily performance was recorded between ${t}, so these figures are your campaigns' lifetime totals and the date range does not apply to them. Record daily channel and campaign performance (from a connected ad platform or the API) to see trends for any period.` : "No marketing performance has been recorded yet. Figures appear here once campaigns or connected platforms report impressions, clicks, conversions and revenue." })]
|
|
115
|
+
}), G = ({ view: e }) => /* @__PURE__ */ F("div", {
|
|
116
|
+
className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ P(g, {
|
|
119
|
+
title: "Total Revenue",
|
|
120
|
+
value: d(e.totals.revenue),
|
|
121
|
+
icon: /* @__PURE__ */ P(w, { className: "h-4 w-4" }),
|
|
122
|
+
featured: !0
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ P(g, {
|
|
125
|
+
title: "ROAS",
|
|
126
|
+
value: `${e.totals.roas.toFixed(1)}x`,
|
|
127
|
+
icon: /* @__PURE__ */ P(A, { className: "h-4 w-4" })
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ P(g, {
|
|
130
|
+
title: "CPA",
|
|
131
|
+
value: d(e.totals.cpa),
|
|
132
|
+
icon: /* @__PURE__ */ P(M, { className: "h-4 w-4" })
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ P(g, {
|
|
135
|
+
title: "Conversion Rate",
|
|
136
|
+
value: p(e.totals.conversionRate),
|
|
137
|
+
icon: /* @__PURE__ */ P(O, { className: "h-4 w-4" })
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}), K = ({ view: r, className: l }) => {
|
|
141
|
+
let { rows: u, series: f } = r.revenueSeries;
|
|
142
|
+
return /* @__PURE__ */ P(v, {
|
|
143
|
+
title: "Revenue by Channel",
|
|
144
|
+
subtitle: "Daily revenue per channel",
|
|
145
|
+
className: l,
|
|
146
|
+
children: u.length === 0 ? /* @__PURE__ */ P(H, {
|
|
147
|
+
icon: /* @__PURE__ */ P(A, { className: "h-8 w-8" }),
|
|
148
|
+
message: r.source === "daily" ? "No channel revenue was recorded in this period." : "Daily revenue per channel appears once daily channel performance is recorded."
|
|
149
|
+
}) : /* @__PURE__ */ P(n, {
|
|
150
|
+
width: "100%",
|
|
151
|
+
height: 280,
|
|
152
|
+
children: /* @__PURE__ */ F(c, {
|
|
153
|
+
data: u,
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ P(i, {
|
|
156
|
+
strokeDasharray: "3 3",
|
|
157
|
+
className: "stroke-border"
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ P(o, {
|
|
160
|
+
dataKey: "date",
|
|
161
|
+
tick: z,
|
|
162
|
+
tickFormatter: (e) => B(e),
|
|
163
|
+
className: "text-text-secondary"
|
|
164
|
+
}),
|
|
165
|
+
/* @__PURE__ */ P(s, {
|
|
166
|
+
tick: z,
|
|
167
|
+
tickFormatter: (e) => V(e),
|
|
168
|
+
className: "text-text-secondary"
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ P(t, {
|
|
171
|
+
contentStyle: I,
|
|
172
|
+
labelStyle: L,
|
|
173
|
+
itemStyle: R,
|
|
174
|
+
labelFormatter: (e) => B(e),
|
|
175
|
+
formatter: (e) => d(e)
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ P(e, { wrapperStyle: { fontSize: 12 } }),
|
|
178
|
+
f.map((e) => /* @__PURE__ */ P(a, {
|
|
179
|
+
type: "monotone",
|
|
180
|
+
dataKey: e.key,
|
|
181
|
+
name: e.label,
|
|
182
|
+
stroke: e.color,
|
|
183
|
+
strokeWidth: 2,
|
|
184
|
+
dot: u.length <= 31
|
|
185
|
+
}, e.key))
|
|
186
|
+
]
|
|
187
|
+
})
|
|
188
|
+
})
|
|
189
|
+
});
|
|
190
|
+
}, q = ({ view: e, className: a }) => /* @__PURE__ */ P(v, {
|
|
191
|
+
title: "ROAS by Channel",
|
|
192
|
+
subtitle: "Return on ad spend per channel",
|
|
193
|
+
className: a,
|
|
194
|
+
children: e.channels.length === 0 ? /* @__PURE__ */ P(H, {
|
|
195
|
+
icon: /* @__PURE__ */ P(S, { className: "h-8 w-8" }),
|
|
196
|
+
message: "No channel performance recorded for this period."
|
|
197
|
+
}) : /* @__PURE__ */ P(n, {
|
|
198
|
+
width: "100%",
|
|
199
|
+
height: Math.max(220, e.channels.length * 44),
|
|
200
|
+
children: /* @__PURE__ */ F(l, {
|
|
201
|
+
data: e.channels,
|
|
202
|
+
layout: "vertical",
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ P(i, {
|
|
205
|
+
strokeDasharray: "3 3",
|
|
206
|
+
className: "stroke-border"
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ P(o, {
|
|
209
|
+
type: "number",
|
|
210
|
+
tick: z,
|
|
211
|
+
className: "text-text-secondary"
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ P(s, {
|
|
214
|
+
dataKey: "label",
|
|
215
|
+
type: "category",
|
|
216
|
+
width: 100,
|
|
217
|
+
tick: z,
|
|
218
|
+
className: "text-text-secondary"
|
|
219
|
+
}),
|
|
220
|
+
/* @__PURE__ */ P(t, {
|
|
221
|
+
cursor: {
|
|
222
|
+
fill: "var(--color-bg-sunken)",
|
|
223
|
+
opacity: .4
|
|
224
|
+
},
|
|
225
|
+
contentStyle: I,
|
|
226
|
+
labelStyle: L,
|
|
227
|
+
itemStyle: R,
|
|
228
|
+
formatter: (e) => `${e.toFixed(2)}x`
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ P(r, {
|
|
231
|
+
dataKey: "roas",
|
|
232
|
+
name: "ROAS",
|
|
233
|
+
fill: b[0],
|
|
234
|
+
radius: [
|
|
235
|
+
0,
|
|
236
|
+
4,
|
|
237
|
+
4,
|
|
238
|
+
0
|
|
239
|
+
]
|
|
240
|
+
})
|
|
241
|
+
]
|
|
242
|
+
})
|
|
243
|
+
})
|
|
244
|
+
}), J = ({ view: a, className: c }) => /* @__PURE__ */ P(v, {
|
|
245
|
+
title: "Channel Comparison",
|
|
246
|
+
subtitle: "Revenue against cost per channel",
|
|
247
|
+
className: c,
|
|
248
|
+
children: a.channels.length === 0 ? /* @__PURE__ */ P(H, {
|
|
249
|
+
icon: /* @__PURE__ */ P(S, { className: "h-8 w-8" }),
|
|
250
|
+
message: "No channel performance recorded for this period."
|
|
251
|
+
}) : /* @__PURE__ */ P(n, {
|
|
252
|
+
width: "100%",
|
|
253
|
+
height: 280,
|
|
254
|
+
children: /* @__PURE__ */ F(l, {
|
|
255
|
+
data: a.channels,
|
|
256
|
+
barGap: 6,
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ P(i, {
|
|
259
|
+
strokeDasharray: "3 3",
|
|
260
|
+
className: "stroke-border"
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ P(o, {
|
|
263
|
+
dataKey: "label",
|
|
264
|
+
tick: z,
|
|
265
|
+
className: "text-text-secondary"
|
|
266
|
+
}),
|
|
267
|
+
/* @__PURE__ */ P(s, {
|
|
268
|
+
tick: z,
|
|
269
|
+
tickFormatter: (e) => V(e),
|
|
270
|
+
className: "text-text-secondary"
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ P(t, {
|
|
273
|
+
cursor: {
|
|
274
|
+
fill: "var(--color-bg-sunken)",
|
|
275
|
+
opacity: .4
|
|
276
|
+
},
|
|
277
|
+
contentStyle: I,
|
|
278
|
+
labelStyle: L,
|
|
279
|
+
itemStyle: R,
|
|
280
|
+
formatter: (e) => d(e)
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ P(e, { wrapperStyle: { fontSize: 12 } }),
|
|
283
|
+
/* @__PURE__ */ P(r, {
|
|
284
|
+
dataKey: "revenue",
|
|
285
|
+
name: "Revenue",
|
|
286
|
+
fill: b[0],
|
|
287
|
+
radius: [
|
|
288
|
+
4,
|
|
289
|
+
4,
|
|
290
|
+
0,
|
|
291
|
+
0
|
|
292
|
+
]
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ P(r, {
|
|
295
|
+
dataKey: "cost",
|
|
296
|
+
name: "Cost",
|
|
297
|
+
fill: b[3],
|
|
298
|
+
radius: [
|
|
299
|
+
4,
|
|
300
|
+
4,
|
|
301
|
+
0,
|
|
302
|
+
0
|
|
303
|
+
]
|
|
304
|
+
})
|
|
305
|
+
]
|
|
306
|
+
})
|
|
307
|
+
})
|
|
308
|
+
}), Y = ({ view: e, className: t }) => {
|
|
309
|
+
let { impressions: n, clicks: r, conversions: i } = e.totals;
|
|
310
|
+
return /* @__PURE__ */ P(v, {
|
|
311
|
+
title: "Conversion Funnel",
|
|
312
|
+
subtitle: "Impressions to clicks to conversions",
|
|
313
|
+
className: t,
|
|
314
|
+
children: n + r + i === 0 ? /* @__PURE__ */ P(H, {
|
|
315
|
+
icon: /* @__PURE__ */ P(T, { className: "h-8 w-8" }),
|
|
316
|
+
message: "No impressions, clicks or conversions recorded for this period.",
|
|
317
|
+
height: 200
|
|
318
|
+
}) : /* @__PURE__ */ P(y, { stages: [
|
|
319
|
+
{
|
|
320
|
+
name: "Impressions",
|
|
321
|
+
count: n
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: "Clicks",
|
|
325
|
+
count: r
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "Conversions",
|
|
329
|
+
count: i
|
|
330
|
+
}
|
|
331
|
+
] })
|
|
332
|
+
});
|
|
333
|
+
}, X = ({ attribution: a, loading: c, error: u, className: f }) => /* @__PURE__ */ P(v, {
|
|
334
|
+
title: "Attribution",
|
|
335
|
+
subtitle: "Won revenue credited to the first and the last touch, per channel",
|
|
336
|
+
className: f,
|
|
337
|
+
children: u ? /* @__PURE__ */ P(H, {
|
|
338
|
+
icon: /* @__PURE__ */ P(E, { className: "h-8 w-8" }),
|
|
339
|
+
message: `Attribution could not be loaded: ${u.message}`
|
|
340
|
+
}) : c ? /* @__PURE__ */ P("div", {
|
|
341
|
+
className: "h-[260px] animate-pulse rounded-md bg-bg-sunken/50",
|
|
342
|
+
"aria-label": "Loading attribution"
|
|
343
|
+
}) : a.length === 0 ? /* @__PURE__ */ P(H, {
|
|
344
|
+
icon: /* @__PURE__ */ P(E, { className: "h-8 w-8" }),
|
|
345
|
+
message: "No won deals with recorded touchpoints closed in this period."
|
|
346
|
+
}) : /* @__PURE__ */ P(n, {
|
|
347
|
+
width: "100%",
|
|
348
|
+
height: 280,
|
|
349
|
+
children: /* @__PURE__ */ F(l, {
|
|
350
|
+
data: a,
|
|
351
|
+
barGap: 4,
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ P(i, {
|
|
354
|
+
strokeDasharray: "3 3",
|
|
355
|
+
className: "stroke-border"
|
|
356
|
+
}),
|
|
357
|
+
/* @__PURE__ */ P(o, {
|
|
358
|
+
dataKey: "label",
|
|
359
|
+
tick: z,
|
|
360
|
+
className: "text-text-secondary"
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ P(s, {
|
|
363
|
+
tick: z,
|
|
364
|
+
tickFormatter: (e) => V(e),
|
|
365
|
+
className: "text-text-secondary"
|
|
366
|
+
}),
|
|
367
|
+
/* @__PURE__ */ P(t, {
|
|
368
|
+
cursor: {
|
|
369
|
+
fill: "var(--color-bg-sunken)",
|
|
370
|
+
opacity: .4
|
|
371
|
+
},
|
|
372
|
+
contentStyle: I,
|
|
373
|
+
labelStyle: L,
|
|
374
|
+
itemStyle: R,
|
|
375
|
+
formatter: (e) => d(e)
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ P(e, { wrapperStyle: { fontSize: 12 } }),
|
|
378
|
+
/* @__PURE__ */ P(r, {
|
|
379
|
+
dataKey: "firstTouch",
|
|
380
|
+
name: "First-touch",
|
|
381
|
+
fill: b[0],
|
|
382
|
+
radius: [
|
|
383
|
+
4,
|
|
384
|
+
4,
|
|
385
|
+
0,
|
|
386
|
+
0
|
|
387
|
+
]
|
|
388
|
+
}),
|
|
389
|
+
/* @__PURE__ */ P(r, {
|
|
390
|
+
dataKey: "lastTouch",
|
|
391
|
+
name: "Last-touch",
|
|
392
|
+
fill: b[1],
|
|
393
|
+
radius: [
|
|
394
|
+
4,
|
|
395
|
+
4,
|
|
396
|
+
0,
|
|
397
|
+
0
|
|
398
|
+
]
|
|
399
|
+
})
|
|
400
|
+
]
|
|
401
|
+
})
|
|
402
|
+
})
|
|
403
|
+
}), Z = ({ view: e, onOpenCampaign: t, className: n }) => /* @__PURE__ */ P(v, {
|
|
404
|
+
title: "Top Campaigns",
|
|
405
|
+
subtitle: "Ranked by revenue",
|
|
406
|
+
className: n,
|
|
407
|
+
children: e.topCampaigns.length === 0 ? /* @__PURE__ */ P(H, {
|
|
408
|
+
icon: /* @__PURE__ */ P(j, { className: "h-8 w-8" }),
|
|
409
|
+
message: "No campaign revenue recorded for this period.",
|
|
410
|
+
height: 200
|
|
411
|
+
}) : /* @__PURE__ */ P("div", {
|
|
412
|
+
className: "overflow-x-auto",
|
|
413
|
+
children: /* @__PURE__ */ F("table", {
|
|
414
|
+
className: "w-full min-w-[360px] text-left text-sm",
|
|
415
|
+
children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ F("tr", {
|
|
416
|
+
className: "border-b border-border-subtle",
|
|
417
|
+
children: [
|
|
418
|
+
/* @__PURE__ */ P("th", {
|
|
419
|
+
className: "w-8 pb-2 text-xs font-medium text-text-secondary",
|
|
420
|
+
children: "#"
|
|
421
|
+
}),
|
|
422
|
+
/* @__PURE__ */ P("th", {
|
|
423
|
+
className: "pb-2 pr-3 text-xs font-medium text-text-secondary",
|
|
424
|
+
children: "Campaign"
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ P("th", {
|
|
427
|
+
className: "pb-2 pr-3 text-right text-xs font-medium text-text-secondary",
|
|
428
|
+
children: "Revenue"
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ P("th", {
|
|
431
|
+
className: "pb-2 text-right text-xs font-medium text-text-secondary",
|
|
432
|
+
children: "ROAS"
|
|
433
|
+
})
|
|
434
|
+
]
|
|
435
|
+
}) }), /* @__PURE__ */ P("tbody", { children: e.topCampaigns.map((e, n) => /* @__PURE__ */ F("tr", {
|
|
436
|
+
className: "border-b border-border-subtle/60 last:border-0",
|
|
437
|
+
children: [
|
|
438
|
+
/* @__PURE__ */ P("td", {
|
|
439
|
+
className: "py-2.5 text-xs tabular-nums text-text-secondary",
|
|
440
|
+
children: n + 1
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ P("td", {
|
|
443
|
+
className: "py-2.5 pr-3 font-medium text-text-primary",
|
|
444
|
+
children: t ? /* @__PURE__ */ P("button", {
|
|
445
|
+
type: "button",
|
|
446
|
+
onClick: () => t(e.id),
|
|
447
|
+
className: "text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
448
|
+
children: e.name
|
|
449
|
+
}) : e.name
|
|
450
|
+
}),
|
|
451
|
+
/* @__PURE__ */ P("td", {
|
|
452
|
+
className: "py-2.5 pr-3 text-right tabular-nums text-text-primary",
|
|
453
|
+
children: d(e.revenue)
|
|
454
|
+
}),
|
|
455
|
+
/* @__PURE__ */ F("td", {
|
|
456
|
+
className: "py-2.5 text-right tabular-nums text-text-secondary",
|
|
457
|
+
children: [e.roas.toFixed(1), "x"]
|
|
458
|
+
})
|
|
459
|
+
]
|
|
460
|
+
}, e.id)) })]
|
|
461
|
+
})
|
|
462
|
+
})
|
|
463
|
+
}), Q = [
|
|
464
|
+
{
|
|
465
|
+
key: "label",
|
|
466
|
+
header: "Channel",
|
|
467
|
+
sortable: !0,
|
|
468
|
+
render: (e) => /* @__PURE__ */ F("div", {
|
|
469
|
+
className: "flex items-center gap-2",
|
|
470
|
+
children: [/* @__PURE__ */ P("span", {
|
|
471
|
+
className: "h-3 w-3 rounded-full",
|
|
472
|
+
style: { backgroundColor: e.color }
|
|
473
|
+
}), /* @__PURE__ */ P("span", {
|
|
474
|
+
className: "font-medium text-text-primary",
|
|
475
|
+
children: e.label
|
|
476
|
+
})]
|
|
477
|
+
})
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
key: "revenue",
|
|
481
|
+
header: "Revenue",
|
|
482
|
+
sortable: !0,
|
|
483
|
+
render: (e) => d(e.revenue)
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
key: "cost",
|
|
487
|
+
header: "Cost",
|
|
488
|
+
sortable: !0,
|
|
489
|
+
render: (e) => d(e.cost)
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
key: "conversions",
|
|
493
|
+
header: "Conversions",
|
|
494
|
+
sortable: !0,
|
|
495
|
+
render: (e) => f(e.conversions)
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
key: "roas",
|
|
499
|
+
header: "ROAS",
|
|
500
|
+
sortable: !0,
|
|
501
|
+
render: (e) => `${e.roas.toFixed(1)}x`
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
key: "ctr",
|
|
505
|
+
header: "CTR",
|
|
506
|
+
sortable: !0,
|
|
507
|
+
render: (e) => p(e.ctr)
|
|
508
|
+
}
|
|
509
|
+
], $ = ({ view: e, className: t }) => /* @__PURE__ */ P(v, {
|
|
510
|
+
title: "Channel Performance",
|
|
511
|
+
subtitle: "Totals per channel",
|
|
512
|
+
className: t,
|
|
513
|
+
children: /* @__PURE__ */ P(_, {
|
|
514
|
+
data: e.channels,
|
|
515
|
+
columns: Q,
|
|
516
|
+
emptyMessage: "No channel performance recorded",
|
|
517
|
+
emptyDescription: "Channel totals appear once performance is recorded for this period."
|
|
518
|
+
})
|
|
519
|
+
}), te = {
|
|
520
|
+
[h.KpiSummary]: {
|
|
521
|
+
label: "KPI summary",
|
|
522
|
+
description: "Total revenue, ROAS, CPA and conversion rate.",
|
|
523
|
+
icon: /* @__PURE__ */ P(w, { className: "h-4 w-4" }),
|
|
524
|
+
wide: !0
|
|
525
|
+
},
|
|
526
|
+
[h.RevenueByChannel]: {
|
|
527
|
+
label: "Revenue by channel",
|
|
528
|
+
description: "Daily revenue per channel as a line chart.",
|
|
529
|
+
icon: /* @__PURE__ */ P(A, { className: "h-4 w-4" }),
|
|
530
|
+
wide: !1
|
|
531
|
+
},
|
|
532
|
+
[h.RoasByChannel]: {
|
|
533
|
+
label: "ROAS by channel",
|
|
534
|
+
description: "Return on ad spend per channel.",
|
|
535
|
+
icon: /* @__PURE__ */ P(S, { className: "h-4 w-4" }),
|
|
536
|
+
wide: !1
|
|
537
|
+
},
|
|
538
|
+
[h.ChannelComparison]: {
|
|
539
|
+
label: "Channel comparison",
|
|
540
|
+
description: "Revenue against cost per channel.",
|
|
541
|
+
icon: /* @__PURE__ */ P(S, { className: "h-4 w-4" }),
|
|
542
|
+
wide: !1
|
|
543
|
+
},
|
|
544
|
+
[h.ConversionFunnel]: {
|
|
545
|
+
label: "Conversion funnel",
|
|
546
|
+
description: "Impressions to clicks to conversions.",
|
|
547
|
+
icon: /* @__PURE__ */ P(T, { className: "h-4 w-4" }),
|
|
548
|
+
wide: !1
|
|
549
|
+
},
|
|
550
|
+
[h.Attribution]: {
|
|
551
|
+
label: "Attribution",
|
|
552
|
+
description: "First-touch against last-touch won revenue per channel.",
|
|
553
|
+
icon: /* @__PURE__ */ P(E, { className: "h-4 w-4" }),
|
|
554
|
+
wide: !1
|
|
555
|
+
},
|
|
556
|
+
[h.TopCampaigns]: {
|
|
557
|
+
label: "Top campaigns",
|
|
558
|
+
description: "Campaigns ranked by revenue.",
|
|
559
|
+
icon: /* @__PURE__ */ P(k, { className: "h-4 w-4" }),
|
|
560
|
+
wide: !1
|
|
561
|
+
},
|
|
562
|
+
[h.ChannelTable]: {
|
|
563
|
+
label: "Channel table",
|
|
564
|
+
description: "Revenue, cost, conversions, ROAS and CTR per channel.",
|
|
565
|
+
icon: /* @__PURE__ */ P(ee, { className: "h-4 w-4" }),
|
|
566
|
+
wide: !0
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
h.KpiSummary, h.RevenueByChannel, h.RoasByChannel, h.ChannelComparison, h.ConversionFunnel, h.Attribution, h.TopCampaigns, h.ChannelTable;
|
|
570
|
+
var ne = ({ widget: e, view: t, attribution: n, attributionLoading: r, attributionError: i, onOpenCampaign: a }) => {
|
|
571
|
+
switch (e) {
|
|
572
|
+
case h.KpiSummary: return /* @__PURE__ */ P(G, { view: t });
|
|
573
|
+
case h.RevenueByChannel: return /* @__PURE__ */ P(K, { view: t });
|
|
574
|
+
case h.RoasByChannel: return /* @__PURE__ */ P(q, { view: t });
|
|
575
|
+
case h.ChannelComparison: return /* @__PURE__ */ P(J, { view: t });
|
|
576
|
+
case h.ConversionFunnel: return /* @__PURE__ */ P(Y, { view: t });
|
|
577
|
+
case h.Attribution: return /* @__PURE__ */ P(X, {
|
|
578
|
+
attribution: n,
|
|
579
|
+
loading: r,
|
|
580
|
+
error: i
|
|
581
|
+
});
|
|
582
|
+
case h.TopCampaigns: return /* @__PURE__ */ P(Z, {
|
|
583
|
+
view: t,
|
|
584
|
+
onOpenCampaign: a
|
|
585
|
+
});
|
|
586
|
+
case h.ChannelTable: return /* @__PURE__ */ P($, { view: t });
|
|
587
|
+
}
|
|
588
|
+
};
|
|
589
|
+
//#endregion
|
|
590
|
+
export { W as AnalyticsSourceNotice, X as AttributionWidget, $ as ChannelTableWidget, Y as ConversionFunnelWidget, U as DateRangeControl, G as KpiSummaryWidget, ne as ReportWidgetView, K as RevenueByChannelWidget, q as RoasByChannelWidget, Z as TopCampaignsWidget, te as WIDGET_META };
|
|
591
|
+
|
|
592
|
+
//# sourceMappingURL=analyticsWidgets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyticsWidgets.js","names":[],"sources":["../../../../src/headshotmarketing/pages/analytics/analyticsWidgets.tsx"],"sourcesContent":["/**\n * Analytics widgets (BOFF-4015)\n *\n * The visual building blocks shared by the Analytics page (mock 14) and the\n * saved-report canvas on the Reports page (mock 15). Every widget draws from\n * the `AnalyticsView` / attribution rows built in `analyticsView.ts`, shows an\n * honest empty state when there is nothing to draw, and uses semantic color\n * tokens only.\n *\n * @module headshotmarketing/pages/analytics\n */\n\nimport type { CSSProperties, FC, ReactNode } from \"react\";\nimport {\n BarChart3,\n CalendarRange,\n DollarSign,\n Filter,\n GitBranch,\n Info,\n Percent,\n Table2,\n Target,\n TrendingUp,\n Trophy,\n Wallet,\n} from \"lucide-react\";\nimport {\n Bar,\n BarChart,\n CartesianGrid,\n Legend,\n Line,\n LineChart,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\nimport { ChartCard, DataTable, StatCard, type Column } from \"../../components\";\nimport { HomeFunnel } from \"../HomeFunnel\";\nimport {\n cn,\n formatCurrency,\n formatNumber,\n formatPercentage,\n} from \"../../utils/helpers\";\nimport {\n HeadshotmarketingReportDateRange,\n HeadshotmarketingReportWidget,\n} from \"../../../generated/wspace-types\";\nimport {\n CHART_COLORS,\n DATE_RANGE_OPTIONS,\n type AnalyticsSource,\n type AnalyticsView,\n type AttributionByChannel,\n type ViewChannel,\n} from \"./analyticsView\";\n\n/** Theme-aware recharts tooltip surface (semantic tokens only). */\nexport const TOOLTIP_STYLE: CSSProperties = {\n background: \"var(--color-bg-surface)\",\n border: \"1px solid var(--color-border-seam)\",\n borderRadius: \"0.5rem\",\n boxShadow: \"var(--shadow-pop)\",\n color: \"var(--color-text-primary)\",\n fontSize: \"0.75rem\",\n};\nconst TOOLTIP_LABEL_STYLE: CSSProperties = {\n color: \"var(--color-text-secondary)\",\n};\nconst TOOLTIP_ITEM_STYLE: CSSProperties = {\n color: \"var(--color-text-primary)\",\n};\nconst AXIS_TICK = { fontSize: 12 };\n\n/** Short axis label for a `YYYY-MM-DD` day. */\nconst shortDay = (day: string): string =>\n new Date(`${day}T00:00:00.000Z`).toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n timeZone: \"UTC\",\n });\n\nconst compactCurrency = (value: number): string =>\n Math.abs(value) >= 1000\n ? `$${formatNumber(Math.round(value / 100) / 10)}k`\n : formatCurrency(value);\n\n/** Centered zero-state for a widget with nothing to draw yet. */\nexport const WidgetEmpty: FC<{\n icon: ReactNode;\n message: string;\n height?: number;\n}> = ({ icon, message, height = 260 }) => (\n <div\n className=\"flex flex-col items-center justify-center gap-2 px-4 text-center\"\n style={{ minHeight: height }}\n >\n <span className=\"text-text-secondary/70\">{icon}</span>\n <p className=\"max-w-xs text-xs text-text-secondary\">{message}</p>\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Date range control\n// ---------------------------------------------------------------------------\n\nexport interface DateRangeValue {\n preset: HeadshotmarketingReportDateRange;\n /** `YYYY-MM-DD`, used when preset is CUSTOM. */\n customStart: string;\n /** `YYYY-MM-DD`, used when preset is CUSTOM. */\n customEnd: string;\n}\n\nexport const DateRangeControl: FC<{\n value: DateRangeValue;\n onChange: (value: DateRangeValue) => void;\n invalid?: boolean;\n idPrefix: string;\n}> = ({ value, onChange, invalid = false, idPrefix }) => (\n <div className=\"flex flex-wrap items-center gap-2\">\n <label className=\"relative inline-flex items-center\">\n <span className=\"sr-only\">Date range</span>\n <CalendarRange className=\"pointer-events-none absolute left-3 h-4 w-4 text-text-secondary\" />\n <select\n id={`${idPrefix}-range`}\n aria-label=\"Date range\"\n value={value.preset}\n onChange={(e) => {\n const preset = DATE_RANGE_OPTIONS.find(\n (option) => option.value === e.target.value,\n )?.value;\n if (preset) onChange({ ...value, preset });\n }}\n className=\"min-h-[44px] appearance-none rounded-md border border-border-seam bg-bg-surface py-2 pl-9 pr-8 text-sm font-medium text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n {DATE_RANGE_OPTIONS.map((option) => (\n <option key={option.value} value={option.value}>\n {option.label}\n </option>\n ))}\n </select>\n </label>\n {value.preset === HeadshotmarketingReportDateRange.Custom && (\n <>\n <label className=\"sr-only\" htmlFor={`${idPrefix}-start`}>\n Start date\n </label>\n <input\n id={`${idPrefix}-start`}\n type=\"date\"\n value={value.customStart}\n max={value.customEnd || undefined}\n onChange={(e) => onChange({ ...value, customStart: e.target.value })}\n aria-invalid={invalid}\n className={cn(\n \"min-h-[44px] rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary\",\n invalid ? \"border-status-error-border\" : \"border-border-seam\",\n )}\n />\n <span className=\"text-xs text-text-secondary\">to</span>\n <label className=\"sr-only\" htmlFor={`${idPrefix}-end`}>\n End date\n </label>\n <input\n id={`${idPrefix}-end`}\n type=\"date\"\n value={value.customEnd}\n min={value.customStart || undefined}\n onChange={(e) => onChange({ ...value, customEnd: e.target.value })}\n aria-invalid={invalid}\n className={cn(\n \"min-h-[44px] rounded-md border bg-bg-surface px-3 py-2 text-sm text-text-primary\",\n invalid ? \"border-status-error-border\" : \"border-border-seam\",\n )}\n />\n </>\n )}\n </div>\n);\n\n// ---------------------------------------------------------------------------\n// Source notice\n// ---------------------------------------------------------------------------\n\nexport const AnalyticsSourceNotice: FC<{\n source: AnalyticsSource;\n windowLabel: string;\n}> = ({ source, windowLabel }) => {\n if (source === \"daily\") return null;\n return (\n <div\n role=\"status\"\n className=\"flex items-start gap-3 rounded-lg border border-border-seam bg-bg-sunken/40 px-4 py-3 text-sm text-text-secondary\"\n >\n <Info className=\"mt-0.5 h-4 w-4 shrink-0 text-text-secondary\" />\n <p>\n {source === \"lifetime\"\n ? `No daily performance was recorded between ${windowLabel}, so these figures are your campaigns' lifetime totals and the date range does not apply to them. Record daily channel and campaign performance (from a connected ad platform or the API) to see trends for any period.`\n : `No marketing performance has been recorded yet. Figures appear here once campaigns or connected platforms report impressions, clicks, conversions and revenue.`}\n </p>\n </div>\n );\n};\n\n// ---------------------------------------------------------------------------\n// Widgets\n// ---------------------------------------------------------------------------\n\nexport const KpiSummaryWidget: FC<{ view: AnalyticsView }> = ({ view }) => (\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n <StatCard\n title=\"Total Revenue\"\n value={formatCurrency(view.totals.revenue)}\n icon={<DollarSign className=\"h-4 w-4\" />}\n featured\n />\n <StatCard\n title=\"ROAS\"\n value={`${view.totals.roas.toFixed(1)}x`}\n icon={<TrendingUp className=\"h-4 w-4\" />}\n />\n <StatCard\n title=\"CPA\"\n value={formatCurrency(view.totals.cpa)}\n icon={<Wallet className=\"h-4 w-4\" />}\n />\n <StatCard\n title=\"Conversion Rate\"\n value={formatPercentage(view.totals.conversionRate)}\n icon={<Percent className=\"h-4 w-4\" />}\n />\n </div>\n);\n\nexport const RevenueByChannelWidget: FC<{\n view: AnalyticsView;\n className?: string;\n}> = ({ view, className }) => {\n const { rows, series } = view.revenueSeries;\n return (\n <ChartCard\n title=\"Revenue by Channel\"\n subtitle=\"Daily revenue per channel\"\n className={className}\n >\n {rows.length === 0 ? (\n <WidgetEmpty\n icon={<TrendingUp className=\"h-8 w-8\" />}\n message={\n view.source === \"daily\"\n ? \"No channel revenue was recorded in this period.\"\n : \"Daily revenue per channel appears once daily channel performance is recorded.\"\n }\n />\n ) : (\n <ResponsiveContainer width=\"100%\" height={280}>\n <LineChart data={rows}>\n <CartesianGrid strokeDasharray=\"3 3\" className=\"stroke-border\" />\n <XAxis\n dataKey=\"date\"\n tick={AXIS_TICK}\n tickFormatter={(day: string) => shortDay(day)}\n className=\"text-text-secondary\"\n />\n <YAxis\n tick={AXIS_TICK}\n tickFormatter={(value: number) => compactCurrency(value)}\n className=\"text-text-secondary\"\n />\n <Tooltip\n contentStyle={TOOLTIP_STYLE}\n labelStyle={TOOLTIP_LABEL_STYLE}\n itemStyle={TOOLTIP_ITEM_STYLE}\n labelFormatter={(day: string) => shortDay(day)}\n formatter={(value: number) => formatCurrency(value)}\n />\n <Legend wrapperStyle={{ fontSize: 12 }} />\n {series.map((s) => (\n <Line\n key={s.key}\n type=\"monotone\"\n dataKey={s.key}\n name={s.label}\n stroke={s.color}\n strokeWidth={2}\n dot={rows.length <= 31}\n />\n ))}\n </LineChart>\n </ResponsiveContainer>\n )}\n </ChartCard>\n );\n};\n\nexport const RoasByChannelWidget: FC<{\n view: AnalyticsView;\n className?: string;\n}> = ({ view, className }) => (\n <ChartCard\n title=\"ROAS by Channel\"\n subtitle=\"Return on ad spend per channel\"\n className={className}\n >\n {view.channels.length === 0 ? (\n <WidgetEmpty\n icon={<BarChart3 className=\"h-8 w-8\" />}\n message=\"No channel performance recorded for this period.\"\n />\n ) : (\n <ResponsiveContainer\n width=\"100%\"\n height={Math.max(220, view.channels.length * 44)}\n >\n <BarChart data={view.channels} layout=\"vertical\">\n <CartesianGrid strokeDasharray=\"3 3\" className=\"stroke-border\" />\n <XAxis\n type=\"number\"\n tick={AXIS_TICK}\n className=\"text-text-secondary\"\n />\n <YAxis\n dataKey=\"label\"\n type=\"category\"\n width={100}\n tick={AXIS_TICK}\n className=\"text-text-secondary\"\n />\n <Tooltip\n cursor={{ fill: \"var(--color-bg-sunken)\", opacity: 0.4 }}\n contentStyle={TOOLTIP_STYLE}\n labelStyle={TOOLTIP_LABEL_STYLE}\n itemStyle={TOOLTIP_ITEM_STYLE}\n formatter={(value: number) => `${value.toFixed(2)}x`}\n />\n <Bar\n dataKey=\"roas\"\n name=\"ROAS\"\n fill={CHART_COLORS[0]}\n radius={[0, 4, 4, 0]}\n />\n </BarChart>\n </ResponsiveContainer>\n )}\n </ChartCard>\n);\n\nexport const ChannelComparisonWidget: FC<{\n view: AnalyticsView;\n className?: string;\n}> = ({ view, className }) => (\n <ChartCard\n title=\"Channel Comparison\"\n subtitle=\"Revenue against cost per channel\"\n className={className}\n >\n {view.channels.length === 0 ? (\n <WidgetEmpty\n icon={<BarChart3 className=\"h-8 w-8\" />}\n message=\"No channel performance recorded for this period.\"\n />\n ) : (\n <ResponsiveContainer width=\"100%\" height={280}>\n <BarChart data={view.channels} barGap={6}>\n <CartesianGrid strokeDasharray=\"3 3\" className=\"stroke-border\" />\n <XAxis\n dataKey=\"label\"\n tick={AXIS_TICK}\n className=\"text-text-secondary\"\n />\n <YAxis\n tick={AXIS_TICK}\n tickFormatter={(value: number) => compactCurrency(value)}\n className=\"text-text-secondary\"\n />\n <Tooltip\n cursor={{ fill: \"var(--color-bg-sunken)\", opacity: 0.4 }}\n contentStyle={TOOLTIP_STYLE}\n labelStyle={TOOLTIP_LABEL_STYLE}\n itemStyle={TOOLTIP_ITEM_STYLE}\n formatter={(value: number) => formatCurrency(value)}\n />\n <Legend wrapperStyle={{ fontSize: 12 }} />\n <Bar\n dataKey=\"revenue\"\n name=\"Revenue\"\n fill={CHART_COLORS[0]}\n radius={[4, 4, 0, 0]}\n />\n <Bar\n dataKey=\"cost\"\n name=\"Cost\"\n fill={CHART_COLORS[3]}\n radius={[4, 4, 0, 0]}\n />\n </BarChart>\n </ResponsiveContainer>\n )}\n </ChartCard>\n);\n\nexport const ConversionFunnelWidget: FC<{\n view: AnalyticsView;\n className?: string;\n}> = ({ view, className }) => {\n const { impressions, clicks, conversions } = view.totals;\n return (\n <ChartCard\n title=\"Conversion Funnel\"\n subtitle=\"Impressions to clicks to conversions\"\n className={className}\n >\n {impressions + clicks + conversions === 0 ? (\n <WidgetEmpty\n icon={<Filter className=\"h-8 w-8\" />}\n message=\"No impressions, clicks or conversions recorded for this period.\"\n height={200}\n />\n ) : (\n <HomeFunnel\n stages={[\n { name: \"Impressions\", count: impressions },\n { name: \"Clicks\", count: clicks },\n { name: \"Conversions\", count: conversions },\n ]}\n />\n )}\n </ChartCard>\n );\n};\n\nexport const AttributionWidget: FC<{\n attribution: AttributionByChannel[];\n loading: boolean;\n error?: { message: string };\n className?: string;\n}> = ({ attribution, loading, error, className }) => (\n <ChartCard\n title=\"Attribution\"\n subtitle=\"Won revenue credited to the first and the last touch, per channel\"\n className={className}\n >\n {error ? (\n <WidgetEmpty\n icon={<GitBranch className=\"h-8 w-8\" />}\n message={`Attribution could not be loaded: ${error.message}`}\n />\n ) : loading ? (\n <div\n className=\"h-[260px] animate-pulse rounded-md bg-bg-sunken/50\"\n aria-label=\"Loading attribution\"\n />\n ) : attribution.length === 0 ? (\n <WidgetEmpty\n icon={<GitBranch className=\"h-8 w-8\" />}\n message=\"No won deals with recorded touchpoints closed in this period.\"\n />\n ) : (\n <ResponsiveContainer width=\"100%\" height={280}>\n <BarChart data={attribution} barGap={4}>\n <CartesianGrid strokeDasharray=\"3 3\" className=\"stroke-border\" />\n <XAxis\n dataKey=\"label\"\n tick={AXIS_TICK}\n className=\"text-text-secondary\"\n />\n <YAxis\n tick={AXIS_TICK}\n tickFormatter={(value: number) => compactCurrency(value)}\n className=\"text-text-secondary\"\n />\n <Tooltip\n cursor={{ fill: \"var(--color-bg-sunken)\", opacity: 0.4 }}\n contentStyle={TOOLTIP_STYLE}\n labelStyle={TOOLTIP_LABEL_STYLE}\n itemStyle={TOOLTIP_ITEM_STYLE}\n formatter={(value: number) => formatCurrency(value)}\n />\n <Legend wrapperStyle={{ fontSize: 12 }} />\n <Bar\n dataKey=\"firstTouch\"\n name=\"First-touch\"\n fill={CHART_COLORS[0]}\n radius={[4, 4, 0, 0]}\n />\n <Bar\n dataKey=\"lastTouch\"\n name=\"Last-touch\"\n fill={CHART_COLORS[1]}\n radius={[4, 4, 0, 0]}\n />\n </BarChart>\n </ResponsiveContainer>\n )}\n </ChartCard>\n);\n\nexport const TopCampaignsWidget: FC<{\n view: AnalyticsView;\n onOpenCampaign?: (id: string) => void;\n className?: string;\n}> = ({ view, onOpenCampaign, className }) => (\n <ChartCard\n title=\"Top Campaigns\"\n subtitle=\"Ranked by revenue\"\n className={className}\n >\n {view.topCampaigns.length === 0 ? (\n <WidgetEmpty\n icon={<Trophy className=\"h-8 w-8\" />}\n message=\"No campaign revenue recorded for this period.\"\n height={200}\n />\n ) : (\n <div className=\"overflow-x-auto\">\n <table className=\"w-full min-w-[360px] text-left text-sm\">\n <thead>\n <tr className=\"border-b border-border-subtle\">\n <th className=\"w-8 pb-2 text-xs font-medium text-text-secondary\">\n #\n </th>\n <th className=\"pb-2 pr-3 text-xs font-medium text-text-secondary\">\n Campaign\n </th>\n <th className=\"pb-2 pr-3 text-right text-xs font-medium text-text-secondary\">\n Revenue\n </th>\n <th className=\"pb-2 text-right text-xs font-medium text-text-secondary\">\n ROAS\n </th>\n </tr>\n </thead>\n <tbody>\n {view.topCampaigns.map((campaign, index) => (\n <tr\n key={campaign.id}\n className=\"border-b border-border-subtle/60 last:border-0\"\n >\n <td className=\"py-2.5 text-xs tabular-nums text-text-secondary\">\n {index + 1}\n </td>\n <td className=\"py-2.5 pr-3 font-medium text-text-primary\">\n {onOpenCampaign ? (\n <button\n type=\"button\"\n onClick={() => onOpenCampaign(campaign.id)}\n className=\"text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n {campaign.name}\n </button>\n ) : (\n campaign.name\n )}\n </td>\n <td className=\"py-2.5 pr-3 text-right tabular-nums text-text-primary\">\n {formatCurrency(campaign.revenue)}\n </td>\n <td className=\"py-2.5 text-right tabular-nums text-text-secondary\">\n {campaign.roas.toFixed(1)}x\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </ChartCard>\n);\n\nconst CHANNEL_COLUMNS: Column<ViewChannel>[] = [\n {\n key: \"label\",\n header: \"Channel\",\n sortable: true,\n render: (row) => (\n <div className=\"flex items-center gap-2\">\n <span\n className=\"h-3 w-3 rounded-full\"\n style={{ backgroundColor: row.color }}\n />\n <span className=\"font-medium text-text-primary\">{row.label}</span>\n </div>\n ),\n },\n {\n key: \"revenue\",\n header: \"Revenue\",\n sortable: true,\n render: (row) => formatCurrency(row.revenue),\n },\n {\n key: \"cost\",\n header: \"Cost\",\n sortable: true,\n render: (row) => formatCurrency(row.cost),\n },\n {\n key: \"conversions\",\n header: \"Conversions\",\n sortable: true,\n render: (row) => formatNumber(row.conversions),\n },\n {\n key: \"roas\",\n header: \"ROAS\",\n sortable: true,\n render: (row) => `${row.roas.toFixed(1)}x`,\n },\n {\n key: \"ctr\",\n header: \"CTR\",\n sortable: true,\n render: (row) => formatPercentage(row.ctr),\n },\n];\n\nexport const ChannelTableWidget: FC<{\n view: AnalyticsView;\n className?: string;\n}> = ({ view, className }) => (\n <ChartCard\n title=\"Channel Performance\"\n subtitle=\"Totals per channel\"\n className={className}\n >\n <DataTable\n data={view.channels}\n columns={CHANNEL_COLUMNS}\n emptyMessage=\"No channel performance recorded\"\n emptyDescription=\"Channel totals appear once performance is recorded for this period.\"\n />\n </ChartCard>\n);\n\n// ---------------------------------------------------------------------------\n// Saved-report widget catalogue\n// ---------------------------------------------------------------------------\n\nexport const WIDGET_META: Record<\n HeadshotmarketingReportWidget,\n { label: string; description: string; icon: ReactNode; wide: boolean }\n> = {\n [HeadshotmarketingReportWidget.KpiSummary]: {\n label: \"KPI summary\",\n description: \"Total revenue, ROAS, CPA and conversion rate.\",\n icon: <DollarSign className=\"h-4 w-4\" />,\n wide: true,\n },\n [HeadshotmarketingReportWidget.RevenueByChannel]: {\n label: \"Revenue by channel\",\n description: \"Daily revenue per channel as a line chart.\",\n icon: <TrendingUp className=\"h-4 w-4\" />,\n wide: false,\n },\n [HeadshotmarketingReportWidget.RoasByChannel]: {\n label: \"ROAS by channel\",\n description: \"Return on ad spend per channel.\",\n icon: <BarChart3 className=\"h-4 w-4\" />,\n wide: false,\n },\n [HeadshotmarketingReportWidget.ChannelComparison]: {\n label: \"Channel comparison\",\n description: \"Revenue against cost per channel.\",\n icon: <BarChart3 className=\"h-4 w-4\" />,\n wide: false,\n },\n [HeadshotmarketingReportWidget.ConversionFunnel]: {\n label: \"Conversion funnel\",\n description: \"Impressions to clicks to conversions.\",\n icon: <Filter className=\"h-4 w-4\" />,\n wide: false,\n },\n [HeadshotmarketingReportWidget.Attribution]: {\n label: \"Attribution\",\n description: \"First-touch against last-touch won revenue per channel.\",\n icon: <GitBranch className=\"h-4 w-4\" />,\n wide: false,\n },\n [HeadshotmarketingReportWidget.TopCampaigns]: {\n label: \"Top campaigns\",\n description: \"Campaigns ranked by revenue.\",\n icon: <Target className=\"h-4 w-4\" />,\n wide: false,\n },\n [HeadshotmarketingReportWidget.ChannelTable]: {\n label: \"Channel table\",\n description: \"Revenue, cost, conversions, ROAS and CTR per channel.\",\n icon: <Table2 className=\"h-4 w-4\" />,\n wide: true,\n },\n};\n\nexport const ALL_WIDGETS: HeadshotmarketingReportWidget[] = [\n HeadshotmarketingReportWidget.KpiSummary,\n HeadshotmarketingReportWidget.RevenueByChannel,\n HeadshotmarketingReportWidget.RoasByChannel,\n HeadshotmarketingReportWidget.ChannelComparison,\n HeadshotmarketingReportWidget.ConversionFunnel,\n HeadshotmarketingReportWidget.Attribution,\n HeadshotmarketingReportWidget.TopCampaigns,\n HeadshotmarketingReportWidget.ChannelTable,\n];\n\nexport const ReportWidgetView: FC<{\n widget: HeadshotmarketingReportWidget;\n view: AnalyticsView;\n attribution: AttributionByChannel[];\n attributionLoading: boolean;\n attributionError?: { message: string };\n onOpenCampaign?: (id: string) => void;\n}> = ({\n widget,\n view,\n attribution,\n attributionLoading,\n attributionError,\n onOpenCampaign,\n}) => {\n switch (widget) {\n case HeadshotmarketingReportWidget.KpiSummary:\n return <KpiSummaryWidget view={view} />;\n case HeadshotmarketingReportWidget.RevenueByChannel:\n return <RevenueByChannelWidget view={view} />;\n case HeadshotmarketingReportWidget.RoasByChannel:\n return <RoasByChannelWidget view={view} />;\n case HeadshotmarketingReportWidget.ChannelComparison:\n return <ChannelComparisonWidget view={view} />;\n case HeadshotmarketingReportWidget.ConversionFunnel:\n return <ConversionFunnelWidget view={view} />;\n case HeadshotmarketingReportWidget.Attribution:\n return (\n <AttributionWidget\n attribution={attribution}\n loading={attributionLoading}\n error={attributionError}\n />\n );\n case HeadshotmarketingReportWidget.TopCampaigns:\n return <TopCampaignsWidget view={view} onOpenCampaign={onOpenCampaign} />;\n case HeadshotmarketingReportWidget.ChannelTable:\n return <ChannelTableWidget view={view} />;\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6DA,IAAa,IAA+B;CAC1C,YAAY;CACZ,QAAQ;CACR,cAAc;CACd,WAAW;CACX,OAAO;CACP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