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