@burdenoff/microfe-headshotmarketing 2026.801.3 → 2026.827.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 +44 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +30 -4
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.d.ts.map +1 -1
- package/dist/headshotmarketing/components/InfluencerModals.js +201 -214
- package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.d.ts.map +1 -1
- package/dist/headshotmarketing/components/StatusBadge.js +2 -0
- package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +59 -29
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +389 -215
- package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts +26 -0
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.js +215 -0
- package/dist/headshotmarketing/pages/content/AIExecutionLedger.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +396 -379
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +436 -343
- package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +233 -223
- package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentPage.js +4 -4
- package/dist/headshotmarketing/pages/crm/ContactsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +339 -278
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmPage.js +118 -112
- package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts +14 -0
- package/dist/headshotmarketing/pages/crm/CrmSubNav.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/crm/CrmSubNav.js +51 -0
- package/dist/headshotmarketing/pages/crm/CrmSubNav.js.map +1 -0
- package/dist/headshotmarketing/pages/crm/LeadsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +122 -116
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +192 -183
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +184 -162
- package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +8 -14
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/types/index.d.ts +9 -4
- package/dist/headshotmarketing/types/index.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.d.ts +16 -2
- package/dist/headshotmarketing/utils/influencerMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/influencerMapper.js +56 -40
- package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,39 +8,44 @@ import { Area as o } from "../../../node_modules/recharts/es6/cartesian/Area.js"
|
|
|
8
8
|
import { XAxis as s } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
9
9
|
import { YAxis as c } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
10
10
|
import { BarChart as l } from "../../../node_modules/recharts/es6/chart/BarChart.js";
|
|
11
|
-
import { AreaChart as
|
|
12
|
-
import { cn as
|
|
13
|
-
import { toCampaignModel as
|
|
14
|
-
import { toAdCampaignModel as
|
|
15
|
-
import { toCampaignTimeSeries as
|
|
16
|
-
import { PageLayout as
|
|
17
|
-
import { StatCard as
|
|
18
|
-
import { DataTable as
|
|
19
|
-
import { ChartCard as
|
|
20
|
-
import { QueryStateBoundary as
|
|
11
|
+
import { AreaChart as ee } from "../../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
12
|
+
import { cn as te, formatCurrency as u, formatNumber as d, formatPercentage as f } from "../../utils/helpers.js";
|
|
13
|
+
import { toCampaignModel as ne } from "../../utils/campaignMapper.js";
|
|
14
|
+
import { toAdCampaignModel as p } from "../../utils/adsMapper.js";
|
|
15
|
+
import { toCampaignTimeSeries as m, toChannelPerformance as h, toDeviceData as g, toFunnelStages as _, toGeographicData as v } from "../../utils/analyticsMapper.js";
|
|
16
|
+
import { PageLayout as y } from "../../components/PageLayout.js";
|
|
17
|
+
import { StatCard as b } from "../../components/StatCard.js";
|
|
18
|
+
import { DataTable as x } from "../../components/DataTable.js";
|
|
19
|
+
import { ChartCard as S } from "../../components/ChartCard.js";
|
|
20
|
+
import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
|
|
21
21
|
import "../../components/index.js";
|
|
22
|
-
import { useHeadshotmarketingBootstrap as
|
|
23
|
-
import { toSocialAccountModel as
|
|
24
|
-
import { useState as
|
|
25
|
-
import { ArrowRightLeft as
|
|
26
|
-
import { jsx as
|
|
27
|
-
import { EmphasisPanel as
|
|
22
|
+
import { useHeadshotmarketingBootstrap as ie } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
23
|
+
import { toSocialAccountModel as ae } from "../../utils/socialMapper.js";
|
|
24
|
+
import { useState as oe } from "react";
|
|
25
|
+
import { ArrowRightLeft as se, CreditCard as ce, DollarSign as C, Eye as le, Gauge as ue, Globe as de, Monitor as w, MousePointerClick as T, Percent as E, Smartphone as D, Tablet as O, Target as k, TrendingUp as A, Trophy as j, Wallet as M } from "lucide-react";
|
|
26
|
+
import { jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
27
|
+
import { EmphasisPanel as F, NextSteps as I, PagePurpose as L } from "@burdenoff/fe-libs/ui";
|
|
28
28
|
//#region src/headshotmarketing/pages/analytics/AnalyticsPage.tsx
|
|
29
|
-
var
|
|
29
|
+
var R = [
|
|
30
30
|
"var(--color-chart-1)",
|
|
31
31
|
"var(--color-chart-2)",
|
|
32
32
|
"var(--color-chart-3)",
|
|
33
33
|
"var(--color-chart-4)",
|
|
34
34
|
"var(--color-chart-5)",
|
|
35
35
|
"var(--color-chart-6)"
|
|
36
|
-
],
|
|
37
|
-
let { navigate:
|
|
36
|
+
], z = (e) => e.replace(/\b\w/g, (e) => e.toUpperCase()), B = 5, V = () => {
|
|
37
|
+
let { navigate: V, basePath: H } = e(), { data: U, loading: fe, error: pe, refetch: me } = ie(), [W, he] = oe("overview"), G = (U?.headshotmarketingCampaigns.items ?? []).map((e) => ne(e)), ge = (U?.headshotmarketingAdCampaigns.items ?? []).map((e) => p(e)), _e = (U?.headshotmarketingSocialAccounts.items ?? []).map((e) => ae(e)), ve = m(G), K = h(G, ge), q = v(K), J = g(_e), Y = G.reduce((e, t) => (e.impressions += t.metrics.impressions, e.clicks += t.metrics.clicks, e.conversions += t.metrics.conversions, e.revenue += t.metrics.revenue, e.cost += t.metrics.cost, e), {
|
|
38
38
|
impressions: 0,
|
|
39
39
|
clicks: 0,
|
|
40
40
|
conversions: 0,
|
|
41
41
|
revenue: 0,
|
|
42
42
|
cost: 0
|
|
43
|
-
}),
|
|
43
|
+
}), ye = Y.impressions > 0 ? Y.clicks / Y.impressions * 100 : 0, be = Y.clicks > 0 ? Y.cost / Y.clicks : 0, xe = Y.cost > 0 ? Y.revenue / Y.cost : 0, Se = Y.conversions > 0 ? Y.cost / Y.conversions : 0, Ce = Y.clicks > 0 ? Y.conversions / Y.clicks * 100 : 0, X = _(Y.impressions, Y.clicks, Y.conversions), Z = K.map((e) => ({
|
|
44
|
+
channel: z(e.channel),
|
|
45
|
+
revenue: e.revenue,
|
|
46
|
+
cost: e.cost,
|
|
47
|
+
roas: e.roas
|
|
48
|
+
})), Q = [...G].sort((e, t) => t.metrics.revenue - e.metrics.revenue).slice(0, B), $ = [
|
|
44
49
|
{
|
|
45
50
|
key: "overview",
|
|
46
51
|
label: "Overview"
|
|
@@ -53,66 +58,68 @@ var V = [
|
|
|
53
58
|
key: "audience",
|
|
54
59
|
label: "Audience"
|
|
55
60
|
}
|
|
56
|
-
],
|
|
61
|
+
], we = [
|
|
57
62
|
{
|
|
58
63
|
title: "Impressions",
|
|
59
|
-
value:
|
|
60
|
-
|
|
61
|
-
icon: /* @__PURE__ */ I(D, { className: "h-4 w-4" })
|
|
64
|
+
value: d(Y.impressions),
|
|
65
|
+
icon: /* @__PURE__ */ N(le, { className: "h-4 w-4" })
|
|
62
66
|
},
|
|
63
67
|
{
|
|
64
68
|
title: "Clicks",
|
|
65
|
-
value:
|
|
66
|
-
|
|
67
|
-
icon: /* @__PURE__ */ I(A, { className: "h-4 w-4" })
|
|
69
|
+
value: d(Y.clicks),
|
|
70
|
+
icon: /* @__PURE__ */ N(T, { className: "h-4 w-4" })
|
|
68
71
|
},
|
|
69
72
|
{
|
|
70
73
|
title: "Conversions",
|
|
71
|
-
value:
|
|
72
|
-
|
|
73
|
-
icon: /* @__PURE__ */ I(ie, { className: "h-4 w-4" })
|
|
74
|
+
value: d(Y.conversions),
|
|
75
|
+
icon: /* @__PURE__ */ N(se, { className: "h-4 w-4" })
|
|
74
76
|
},
|
|
75
77
|
{
|
|
76
78
|
title: "Revenue",
|
|
77
|
-
value:
|
|
78
|
-
|
|
79
|
-
icon: /* @__PURE__ */ I(E, { className: "h-4 w-4" })
|
|
79
|
+
value: u(Y.revenue),
|
|
80
|
+
icon: /* @__PURE__ */ N(C, { className: "h-4 w-4" })
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
83
|
title: "Cost",
|
|
83
|
-
value:
|
|
84
|
-
|
|
85
|
-
icon: /* @__PURE__ */ I(ae, { className: "h-4 w-4" })
|
|
84
|
+
value: u(Y.cost),
|
|
85
|
+
icon: /* @__PURE__ */ N(ce, { className: "h-4 w-4" })
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
title: "CTR",
|
|
89
|
-
value:
|
|
90
|
-
|
|
91
|
-
icon: /* @__PURE__ */ I(j, { className: "h-4 w-4" })
|
|
89
|
+
value: f(ye),
|
|
90
|
+
icon: /* @__PURE__ */ N(E, { className: "h-4 w-4" })
|
|
92
91
|
},
|
|
93
92
|
{
|
|
94
93
|
title: "CPC",
|
|
95
|
-
value: `$${
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
value: `$${be.toFixed(2)}`,
|
|
95
|
+
icon: /* @__PURE__ */ N(k, { className: "h-4 w-4" })
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: "CPA",
|
|
99
|
+
value: `$${Se.toFixed(2)}`,
|
|
100
|
+
icon: /* @__PURE__ */ N(M, { className: "h-4 w-4" })
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: "Conv. Rate",
|
|
104
|
+
value: f(Ce),
|
|
105
|
+
icon: /* @__PURE__ */ N(ue, { className: "h-4 w-4" })
|
|
98
106
|
},
|
|
99
107
|
{
|
|
100
108
|
title: "ROAS",
|
|
101
|
-
value: `${
|
|
102
|
-
|
|
103
|
-
icon: /* @__PURE__ */ I(F, { className: "h-4 w-4" })
|
|
109
|
+
value: `${xe.toFixed(2)}x`,
|
|
110
|
+
icon: /* @__PURE__ */ N(A, { className: "h-4 w-4" })
|
|
104
111
|
}
|
|
105
|
-
],
|
|
112
|
+
], Te = [
|
|
106
113
|
{
|
|
107
114
|
key: "channel",
|
|
108
115
|
header: "Channel",
|
|
109
116
|
sortable: !0,
|
|
110
|
-
render: (e) => /* @__PURE__ */
|
|
117
|
+
render: (e) => /* @__PURE__ */ P("div", {
|
|
111
118
|
className: "flex items-center gap-2",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ N("div", {
|
|
113
120
|
className: "h-3 w-3 rounded-full",
|
|
114
121
|
style: { backgroundColor: e.color }
|
|
115
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ N("span", {
|
|
116
123
|
className: "font-medium text-text-primary",
|
|
117
124
|
children: e.channel
|
|
118
125
|
})]
|
|
@@ -122,19 +129,19 @@ var V = [
|
|
|
122
129
|
key: "revenue",
|
|
123
130
|
header: "Revenue",
|
|
124
131
|
sortable: !0,
|
|
125
|
-
render: (e) =>
|
|
132
|
+
render: (e) => u(e.revenue)
|
|
126
133
|
},
|
|
127
134
|
{
|
|
128
135
|
key: "cost",
|
|
129
136
|
header: "Cost",
|
|
130
137
|
sortable: !0,
|
|
131
|
-
render: (e) =>
|
|
138
|
+
render: (e) => u(e.cost)
|
|
132
139
|
},
|
|
133
140
|
{
|
|
134
141
|
key: "conversions",
|
|
135
142
|
header: "Conversions",
|
|
136
143
|
sortable: !0,
|
|
137
|
-
render: (e) =>
|
|
144
|
+
render: (e) => d(e.conversions)
|
|
138
145
|
},
|
|
139
146
|
{
|
|
140
147
|
key: "roas",
|
|
@@ -146,20 +153,20 @@ var V = [
|
|
|
146
153
|
key: "impressions",
|
|
147
154
|
header: "Impressions",
|
|
148
155
|
sortable: !0,
|
|
149
|
-
render: (e) =>
|
|
156
|
+
render: (e) => d(e.impressions)
|
|
150
157
|
},
|
|
151
158
|
{
|
|
152
159
|
key: "ctr",
|
|
153
160
|
header: "CTR",
|
|
154
161
|
sortable: !0,
|
|
155
|
-
render: (e) =>
|
|
162
|
+
render: (e) => f(e.ctr)
|
|
156
163
|
}
|
|
157
|
-
],
|
|
164
|
+
], Ee = [
|
|
158
165
|
{
|
|
159
166
|
key: "country",
|
|
160
167
|
header: "Country",
|
|
161
168
|
sortable: !0,
|
|
162
|
-
render: (e) => /* @__PURE__ */
|
|
169
|
+
render: (e) => /* @__PURE__ */ N("span", {
|
|
163
170
|
className: "font-medium",
|
|
164
171
|
children: e.country
|
|
165
172
|
})
|
|
@@ -168,251 +175,418 @@ var V = [
|
|
|
168
175
|
key: "revenue",
|
|
169
176
|
header: "Revenue",
|
|
170
177
|
sortable: !0,
|
|
171
|
-
render: (e) =>
|
|
178
|
+
render: (e) => u(e.revenue)
|
|
172
179
|
},
|
|
173
180
|
{
|
|
174
181
|
key: "users",
|
|
175
182
|
header: "Users",
|
|
176
183
|
sortable: !0,
|
|
177
|
-
render: (e) =>
|
|
184
|
+
render: (e) => d(e.users)
|
|
178
185
|
},
|
|
179
186
|
{
|
|
180
187
|
key: "conversions",
|
|
181
188
|
header: "Conversions",
|
|
182
189
|
sortable: !0,
|
|
183
|
-
render: (e) =>
|
|
190
|
+
render: (e) => d(e.conversions)
|
|
184
191
|
},
|
|
185
192
|
{
|
|
186
193
|
key: "conversionRate",
|
|
187
194
|
header: "Conv. Rate",
|
|
188
195
|
sortable: !0,
|
|
189
|
-
render: (e) =>
|
|
196
|
+
render: (e) => f(e.conversionRate)
|
|
190
197
|
}
|
|
191
|
-
],
|
|
192
|
-
Desktop:
|
|
193
|
-
Mobile:
|
|
194
|
-
Tablet:
|
|
198
|
+
], De = {
|
|
199
|
+
Desktop: w,
|
|
200
|
+
Mobile: D,
|
|
201
|
+
Tablet: O
|
|
195
202
|
};
|
|
196
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ P(y, {
|
|
197
204
|
title: "Analytics",
|
|
198
205
|
description: "Comprehensive marketing performance analytics",
|
|
199
206
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
/* @__PURE__ */ I
|
|
207
|
+
/* @__PURE__ */ N(L, { children: "The single source of truth for how your marketing is performing. Track reach, clicks, conversions, revenue and ROAS across every channel, then drill into channel and audience breakdowns to understand what's driving results and where to focus next." }),
|
|
208
|
+
/* @__PURE__ */ N(I, {
|
|
202
209
|
storageKey: "headshotmarketing-analytics",
|
|
203
210
|
steps: [
|
|
204
211
|
{
|
|
205
212
|
id: "campaigns",
|
|
206
213
|
label: "Campaign analytics",
|
|
207
214
|
description: "See which campaigns drive the most return.",
|
|
208
|
-
icon: /* @__PURE__ */
|
|
209
|
-
onClick: () => H
|
|
215
|
+
icon: /* @__PURE__ */ N(k, { className: "h-4 w-4" }),
|
|
216
|
+
onClick: () => V(H + "/analytics/campaigns")
|
|
210
217
|
},
|
|
211
218
|
{
|
|
212
219
|
id: "ads",
|
|
213
220
|
label: "Ad analytics",
|
|
214
221
|
description: "Break down paid spend, clicks and ROAS by platform.",
|
|
215
|
-
icon: /* @__PURE__ */
|
|
216
|
-
onClick: () => H
|
|
222
|
+
icon: /* @__PURE__ */ N(A, { className: "h-4 w-4" }),
|
|
223
|
+
onClick: () => V(H + "/analytics/ads")
|
|
217
224
|
},
|
|
218
225
|
{
|
|
219
226
|
id: "reports",
|
|
220
227
|
label: "Build a report",
|
|
221
228
|
description: "Assemble and export a shareable report.",
|
|
222
|
-
icon: /* @__PURE__ */
|
|
223
|
-
onClick: () => H
|
|
229
|
+
icon: /* @__PURE__ */ N(C, { className: "h-4 w-4" }),
|
|
230
|
+
onClick: () => V(H + "/analytics/reports")
|
|
224
231
|
}
|
|
225
232
|
]
|
|
226
233
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
loading:
|
|
229
|
-
error:
|
|
230
|
-
onRetry:
|
|
231
|
-
hasData: !!
|
|
234
|
+
/* @__PURE__ */ P(re, {
|
|
235
|
+
loading: fe,
|
|
236
|
+
error: pe,
|
|
237
|
+
onRetry: me,
|
|
238
|
+
hasData: !!U,
|
|
232
239
|
children: [
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
className: "grid grid-cols-2 md:grid-cols-
|
|
235
|
-
children:
|
|
240
|
+
/* @__PURE__ */ N(F, { children: /* @__PURE__ */ N("div", {
|
|
241
|
+
className: "grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4",
|
|
242
|
+
children: we.map((e) => /* @__PURE__ */ N(b, {
|
|
236
243
|
title: e.title,
|
|
237
244
|
value: e.value,
|
|
238
|
-
change: e.change,
|
|
239
|
-
changeLabel: "vs last period",
|
|
240
245
|
icon: e.icon
|
|
241
246
|
}, e.title))
|
|
242
247
|
}) }),
|
|
243
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ N("div", {
|
|
244
249
|
className: "border-b border-border-subtle",
|
|
245
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ N("div", {
|
|
246
251
|
className: "flex flex-nowrap gap-6 overflow-x-auto",
|
|
247
|
-
children:
|
|
248
|
-
onClick: () =>
|
|
249
|
-
className:
|
|
252
|
+
children: $.map((e) => /* @__PURE__ */ N("button", {
|
|
253
|
+
onClick: () => he(e.key),
|
|
254
|
+
className: te("shrink-0 whitespace-nowrap pb-3 text-sm font-medium transition-colors border-b-2", W === e.key ? "border-primary text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
|
|
250
255
|
children: e.label
|
|
251
256
|
}, e.key))
|
|
252
257
|
})
|
|
253
258
|
}),
|
|
254
|
-
|
|
259
|
+
W === "overview" && /* @__PURE__ */ P("div", {
|
|
255
260
|
className: "space-y-6",
|
|
256
|
-
children:
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ P("div", {
|
|
263
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
264
|
+
children: [/* @__PURE__ */ N(S, {
|
|
265
|
+
title: "Revenue Over Time",
|
|
266
|
+
subtitle: "Last 30 days",
|
|
267
|
+
children: /* @__PURE__ */ N(r, {
|
|
268
|
+
width: "100%",
|
|
269
|
+
height: 300,
|
|
270
|
+
children: /* @__PURE__ */ P(ee, {
|
|
271
|
+
data: ve,
|
|
272
|
+
children: [
|
|
273
|
+
/* @__PURE__ */ N(a, {
|
|
274
|
+
strokeDasharray: "3 3",
|
|
275
|
+
className: "stroke-border"
|
|
276
|
+
}),
|
|
277
|
+
/* @__PURE__ */ N(s, {
|
|
278
|
+
dataKey: "date",
|
|
279
|
+
tick: { fontSize: 12 },
|
|
280
|
+
className: "text-text-secondary"
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ N(c, {
|
|
283
|
+
tick: { fontSize: 12 },
|
|
284
|
+
className: "text-text-secondary"
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ N(n, {}),
|
|
287
|
+
/* @__PURE__ */ N(o, {
|
|
288
|
+
type: "monotone",
|
|
289
|
+
dataKey: "revenue",
|
|
290
|
+
stroke: R[0],
|
|
291
|
+
fill: R[0],
|
|
292
|
+
fillOpacity: .1
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ N(o, {
|
|
295
|
+
type: "monotone",
|
|
296
|
+
dataKey: "cost",
|
|
297
|
+
stroke: R[3],
|
|
298
|
+
fill: R[3],
|
|
299
|
+
fillOpacity: .1
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ N(t, {})
|
|
302
|
+
]
|
|
303
|
+
})
|
|
297
304
|
})
|
|
298
|
-
})
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
/* @__PURE__ */ I(i, {
|
|
327
|
-
dataKey: "value",
|
|
328
|
-
radius: [
|
|
329
|
-
0,
|
|
330
|
-
4,
|
|
331
|
-
4,
|
|
332
|
-
0
|
|
333
|
-
],
|
|
334
|
-
children: $.map((e, t) => /* @__PURE__ */ I(i, {
|
|
305
|
+
}), /* @__PURE__ */ N(S, {
|
|
306
|
+
title: "Conversion Funnel",
|
|
307
|
+
subtitle: "Current period",
|
|
308
|
+
children: /* @__PURE__ */ N(r, {
|
|
309
|
+
width: "100%",
|
|
310
|
+
height: 300,
|
|
311
|
+
children: /* @__PURE__ */ P(l, {
|
|
312
|
+
data: X,
|
|
313
|
+
layout: "vertical",
|
|
314
|
+
children: [
|
|
315
|
+
/* @__PURE__ */ N(a, {
|
|
316
|
+
strokeDasharray: "3 3",
|
|
317
|
+
className: "stroke-border"
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ N(s, {
|
|
320
|
+
type: "number",
|
|
321
|
+
tick: { fontSize: 12 },
|
|
322
|
+
className: "text-text-secondary"
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ N(c, {
|
|
325
|
+
dataKey: "stage",
|
|
326
|
+
type: "category",
|
|
327
|
+
tick: { fontSize: 12 },
|
|
328
|
+
width: 100,
|
|
329
|
+
className: "text-text-secondary"
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ N(n, { formatter: (e) => d(e) }),
|
|
332
|
+
/* @__PURE__ */ N(i, {
|
|
335
333
|
dataKey: "value",
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
334
|
+
radius: [
|
|
335
|
+
0,
|
|
336
|
+
4,
|
|
337
|
+
4,
|
|
338
|
+
0
|
|
339
|
+
],
|
|
340
|
+
children: X.map((e, t) => /* @__PURE__ */ N(i, {
|
|
341
|
+
dataKey: "value",
|
|
342
|
+
fill: e.color
|
|
343
|
+
}, t))
|
|
344
|
+
})
|
|
345
|
+
]
|
|
346
|
+
})
|
|
340
347
|
})
|
|
341
|
-
})
|
|
342
|
-
})
|
|
343
|
-
|
|
348
|
+
})]
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ P("div", {
|
|
351
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
352
|
+
children: [/* @__PURE__ */ N(S, {
|
|
353
|
+
title: "Revenue by Channel",
|
|
354
|
+
subtitle: "Revenue against spend, per channel",
|
|
355
|
+
children: Z.length === 0 ? /* @__PURE__ */ N("p", {
|
|
356
|
+
className: "py-12 text-center text-sm text-text-secondary",
|
|
357
|
+
children: "No channel performance recorded yet."
|
|
358
|
+
}) : /* @__PURE__ */ N(r, {
|
|
359
|
+
width: "100%",
|
|
360
|
+
height: 300,
|
|
361
|
+
children: /* @__PURE__ */ P(l, {
|
|
362
|
+
data: Z,
|
|
363
|
+
children: [
|
|
364
|
+
/* @__PURE__ */ N(a, {
|
|
365
|
+
strokeDasharray: "3 3",
|
|
366
|
+
className: "stroke-border"
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ N(s, {
|
|
369
|
+
dataKey: "channel",
|
|
370
|
+
tick: { fontSize: 12 },
|
|
371
|
+
className: "text-text-secondary"
|
|
372
|
+
}),
|
|
373
|
+
/* @__PURE__ */ N(c, {
|
|
374
|
+
tick: { fontSize: 12 },
|
|
375
|
+
className: "text-text-secondary"
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ N(n, { formatter: (e) => u(e) }),
|
|
378
|
+
/* @__PURE__ */ N(t, {}),
|
|
379
|
+
/* @__PURE__ */ N(i, {
|
|
380
|
+
dataKey: "revenue",
|
|
381
|
+
name: "Revenue",
|
|
382
|
+
fill: R[0],
|
|
383
|
+
radius: [
|
|
384
|
+
4,
|
|
385
|
+
4,
|
|
386
|
+
0,
|
|
387
|
+
0
|
|
388
|
+
]
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ N(i, {
|
|
391
|
+
dataKey: "cost",
|
|
392
|
+
name: "Cost",
|
|
393
|
+
fill: R[3],
|
|
394
|
+
radius: [
|
|
395
|
+
4,
|
|
396
|
+
4,
|
|
397
|
+
0,
|
|
398
|
+
0
|
|
399
|
+
]
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
}), /* @__PURE__ */ N(S, {
|
|
405
|
+
title: "ROAS by Channel",
|
|
406
|
+
subtitle: "Return on ad spend, per channel",
|
|
407
|
+
children: Z.length === 0 ? /* @__PURE__ */ N("p", {
|
|
408
|
+
className: "py-12 text-center text-sm text-text-secondary",
|
|
409
|
+
children: "No channel performance recorded yet."
|
|
410
|
+
}) : /* @__PURE__ */ N(r, {
|
|
411
|
+
width: "100%",
|
|
412
|
+
height: 300,
|
|
413
|
+
children: /* @__PURE__ */ P(l, {
|
|
414
|
+
data: Z,
|
|
415
|
+
layout: "vertical",
|
|
416
|
+
children: [
|
|
417
|
+
/* @__PURE__ */ N(a, {
|
|
418
|
+
strokeDasharray: "3 3",
|
|
419
|
+
className: "stroke-border"
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ N(s, {
|
|
422
|
+
type: "number",
|
|
423
|
+
tick: { fontSize: 12 },
|
|
424
|
+
className: "text-text-secondary"
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ N(c, {
|
|
427
|
+
dataKey: "channel",
|
|
428
|
+
type: "category",
|
|
429
|
+
width: 100,
|
|
430
|
+
tick: { fontSize: 12 },
|
|
431
|
+
className: "text-text-secondary"
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ N(n, { formatter: (e) => `${e.toFixed(2)}x` }),
|
|
434
|
+
/* @__PURE__ */ N(i, {
|
|
435
|
+
dataKey: "roas",
|
|
436
|
+
name: "ROAS",
|
|
437
|
+
fill: R[1],
|
|
438
|
+
radius: [
|
|
439
|
+
0,
|
|
440
|
+
4,
|
|
441
|
+
4,
|
|
442
|
+
0
|
|
443
|
+
]
|
|
444
|
+
})
|
|
445
|
+
]
|
|
446
|
+
})
|
|
447
|
+
})
|
|
448
|
+
})]
|
|
449
|
+
}),
|
|
450
|
+
/* @__PURE__ */ P("div", {
|
|
451
|
+
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
452
|
+
children: [/* @__PURE__ */ P("div", {
|
|
453
|
+
className: "mb-4 flex items-center gap-2",
|
|
454
|
+
children: [/* @__PURE__ */ N(j, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ N("h3", {
|
|
455
|
+
className: "text-sm font-semibold text-text-primary",
|
|
456
|
+
children: "Top Campaigns"
|
|
457
|
+
})]
|
|
458
|
+
}), Q.length === 0 ? /* @__PURE__ */ N("p", {
|
|
459
|
+
className: "text-sm text-text-secondary",
|
|
460
|
+
children: "No campaigns yet — create one to start tracking revenue."
|
|
461
|
+
}) : /* @__PURE__ */ N("div", {
|
|
462
|
+
className: "overflow-x-auto",
|
|
463
|
+
children: /* @__PURE__ */ P("table", {
|
|
464
|
+
className: "w-full min-w-[420px] text-left text-sm",
|
|
465
|
+
children: [/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ P("tr", {
|
|
466
|
+
className: "border-b border-border-subtle",
|
|
467
|
+
children: [
|
|
468
|
+
/* @__PURE__ */ N("th", {
|
|
469
|
+
className: "w-8 pb-2 text-xs font-medium text-text-secondary",
|
|
470
|
+
children: "#"
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ N("th", {
|
|
473
|
+
className: "pb-2 pr-3 text-xs font-medium text-text-secondary",
|
|
474
|
+
children: "Campaign"
|
|
475
|
+
}),
|
|
476
|
+
/* @__PURE__ */ N("th", {
|
|
477
|
+
className: "pb-2 pr-3 text-right text-xs font-medium text-text-secondary",
|
|
478
|
+
children: "Revenue"
|
|
479
|
+
}),
|
|
480
|
+
/* @__PURE__ */ N("th", {
|
|
481
|
+
className: "pb-2 pr-3 text-right text-xs font-medium text-text-secondary",
|
|
482
|
+
children: "Conversions"
|
|
483
|
+
}),
|
|
484
|
+
/* @__PURE__ */ N("th", {
|
|
485
|
+
className: "pb-2 text-right text-xs font-medium text-text-secondary",
|
|
486
|
+
children: "ROAS"
|
|
487
|
+
})
|
|
488
|
+
]
|
|
489
|
+
}) }), /* @__PURE__ */ N("tbody", { children: Q.map((e, t) => /* @__PURE__ */ P("tr", {
|
|
490
|
+
className: "border-b border-border-subtle/60 last:border-0",
|
|
491
|
+
children: [
|
|
492
|
+
/* @__PURE__ */ N("td", {
|
|
493
|
+
className: "py-2.5 text-xs tabular-nums text-text-secondary",
|
|
494
|
+
children: t + 1
|
|
495
|
+
}),
|
|
496
|
+
/* @__PURE__ */ N("td", {
|
|
497
|
+
className: "py-2.5 pr-3 font-medium text-text-primary",
|
|
498
|
+
children: e.name
|
|
499
|
+
}),
|
|
500
|
+
/* @__PURE__ */ N("td", {
|
|
501
|
+
className: "py-2.5 pr-3 text-right tabular-nums text-text-primary",
|
|
502
|
+
children: u(e.metrics.revenue)
|
|
503
|
+
}),
|
|
504
|
+
/* @__PURE__ */ N("td", {
|
|
505
|
+
className: "py-2.5 pr-3 text-right tabular-nums text-text-secondary",
|
|
506
|
+
children: d(e.metrics.conversions)
|
|
507
|
+
}),
|
|
508
|
+
/* @__PURE__ */ P("td", {
|
|
509
|
+
className: "py-2.5 text-right tabular-nums text-text-secondary",
|
|
510
|
+
children: [e.metrics.roas.toFixed(2), "x"]
|
|
511
|
+
})
|
|
512
|
+
]
|
|
513
|
+
}, e.id)) })]
|
|
514
|
+
})
|
|
515
|
+
})]
|
|
516
|
+
})
|
|
517
|
+
]
|
|
344
518
|
}),
|
|
345
|
-
|
|
346
|
-
data:
|
|
347
|
-
columns:
|
|
519
|
+
W === "channels" && /* @__PURE__ */ N(x, {
|
|
520
|
+
data: K,
|
|
521
|
+
columns: Te,
|
|
348
522
|
searchable: !0,
|
|
349
523
|
searchPlaceholder: "Search channels..."
|
|
350
524
|
}),
|
|
351
|
-
|
|
525
|
+
W === "audience" && /* @__PURE__ */ P("div", {
|
|
352
526
|
className: "space-y-6",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
527
|
+
children: [/* @__PURE__ */ P("div", {
|
|
354
528
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ P("div", {
|
|
356
530
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ P("div", {
|
|
358
532
|
className: "flex items-center gap-2 mb-4",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ N(de, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ N("h3", {
|
|
360
534
|
className: "text-sm font-semibold text-text-primary",
|
|
361
535
|
children: "Top Countries"
|
|
362
536
|
})]
|
|
363
|
-
}), /* @__PURE__ */
|
|
537
|
+
}), /* @__PURE__ */ N("div", {
|
|
364
538
|
className: "space-y-3",
|
|
365
|
-
children:
|
|
539
|
+
children: q.map((e) => /* @__PURE__ */ P("div", {
|
|
366
540
|
className: "flex items-center justify-between",
|
|
367
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ P("div", {
|
|
368
542
|
className: "flex items-center gap-2",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ N("span", {
|
|
370
544
|
className: "text-xs font-mono text-text-secondary w-6",
|
|
371
545
|
children: e.countryCode
|
|
372
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ N("span", {
|
|
373
547
|
className: "text-sm text-text-primary",
|
|
374
548
|
children: e.country
|
|
375
549
|
})]
|
|
376
|
-
}), /* @__PURE__ */
|
|
550
|
+
}), /* @__PURE__ */ P("div", {
|
|
377
551
|
className: "flex items-center gap-4",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ N("span", {
|
|
379
553
|
className: "text-sm font-medium text-text-primary",
|
|
380
|
-
children:
|
|
381
|
-
}), /* @__PURE__ */
|
|
554
|
+
children: u(e.revenue)
|
|
555
|
+
}), /* @__PURE__ */ N("div", {
|
|
382
556
|
className: "w-24 h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
383
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ N("div", {
|
|
384
558
|
className: "h-full rounded-full bg-action-primary-bg",
|
|
385
|
-
style: { width: `${e.revenue / (
|
|
559
|
+
style: { width: `${e.revenue / (q[0]?.revenue || 1) * 100}%` }
|
|
386
560
|
})
|
|
387
561
|
})]
|
|
388
562
|
})]
|
|
389
563
|
}, e.countryCode))
|
|
390
564
|
})]
|
|
391
|
-
}), /* @__PURE__ */
|
|
565
|
+
}), /* @__PURE__ */ P("div", {
|
|
392
566
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
393
567
|
children: [
|
|
394
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ N("h3", {
|
|
395
569
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
396
570
|
children: "Device Breakdown"
|
|
397
571
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ N("div", {
|
|
399
573
|
className: "space-y-4",
|
|
400
|
-
children:
|
|
574
|
+
children: J.devices.map((e) => /* @__PURE__ */ P("div", {
|
|
401
575
|
className: "flex items-center gap-3",
|
|
402
|
-
children: [/* @__PURE__ */
|
|
576
|
+
children: [/* @__PURE__ */ N(De[e.device] || w, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ P("div", {
|
|
403
577
|
className: "flex-1",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
578
|
+
children: [/* @__PURE__ */ P("div", {
|
|
405
579
|
className: "flex items-center justify-between mb-1",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
580
|
+
children: [/* @__PURE__ */ N("span", {
|
|
407
581
|
className: "text-sm text-text-primary",
|
|
408
582
|
children: e.device
|
|
409
|
-
}), /* @__PURE__ */
|
|
583
|
+
}), /* @__PURE__ */ N("span", {
|
|
410
584
|
className: "text-sm font-medium text-text-primary",
|
|
411
|
-
children:
|
|
585
|
+
children: f(e.percentage)
|
|
412
586
|
})]
|
|
413
|
-
}), /* @__PURE__ */
|
|
587
|
+
}), /* @__PURE__ */ N("div", {
|
|
414
588
|
className: "w-full h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
415
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ N("div", {
|
|
416
590
|
className: "h-full rounded-full bg-action-primary-bg",
|
|
417
591
|
style: { width: `${e.percentage}%` }
|
|
418
592
|
})
|
|
@@ -420,30 +594,30 @@ var V = [
|
|
|
420
594
|
})]
|
|
421
595
|
}, e.device))
|
|
422
596
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ P("div", {
|
|
424
598
|
className: "mt-6 pt-4 border-t border-border-subtle",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
599
|
+
children: [/* @__PURE__ */ N("h4", {
|
|
426
600
|
className: "text-sm font-semibold text-text-primary mb-3",
|
|
427
601
|
children: "Browser Usage"
|
|
428
|
-
}), /* @__PURE__ */
|
|
602
|
+
}), /* @__PURE__ */ N("div", {
|
|
429
603
|
className: "space-y-2",
|
|
430
|
-
children:
|
|
604
|
+
children: J.browsers.map((e) => /* @__PURE__ */ P("div", {
|
|
431
605
|
className: "flex items-center justify-between text-sm",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ N("span", {
|
|
433
607
|
className: "text-text-secondary",
|
|
434
608
|
children: e.browser
|
|
435
|
-
}), /* @__PURE__ */
|
|
609
|
+
}), /* @__PURE__ */ N("span", {
|
|
436
610
|
className: "font-medium text-text-primary",
|
|
437
|
-
children:
|
|
611
|
+
children: f(e.percentage)
|
|
438
612
|
})]
|
|
439
613
|
}, e.browser))
|
|
440
614
|
})]
|
|
441
615
|
})
|
|
442
616
|
]
|
|
443
617
|
})]
|
|
444
|
-
}), /* @__PURE__ */
|
|
445
|
-
data:
|
|
446
|
-
columns:
|
|
618
|
+
}), /* @__PURE__ */ N(x, {
|
|
619
|
+
data: q,
|
|
620
|
+
columns: Ee,
|
|
447
621
|
searchable: !0,
|
|
448
622
|
searchPlaceholder: "Search countries..."
|
|
449
623
|
})]
|
|
@@ -454,6 +628,6 @@ var V = [
|
|
|
454
628
|
});
|
|
455
629
|
};
|
|
456
630
|
//#endregion
|
|
457
|
-
export {
|
|
631
|
+
export { V as AnalyticsPage };
|
|
458
632
|
|
|
459
633
|
//# sourceMappingURL=AnalyticsPage.js.map
|