@burdenoff/microfe-headshotmarketing 2026.626.2 → 2026.704.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.
Files changed (140) hide show
  1. package/dist/generated/wspace-operations.js +970 -52
  2. package/dist/generated/wspace-operations.js.map +1 -1
  3. package/dist/generated/wspace-types.js +26 -10
  4. package/dist/generated/wspace-types.js.map +1 -1
  5. package/dist/headshotmarketing/HeadshotMarketingRoot.js +45 -44
  6. package/dist/headshotmarketing/HeadshotMarketingRoot.js.map +1 -1
  7. package/dist/headshotmarketing/HeadshotMarketingRoutes.js +20 -0
  8. package/dist/headshotmarketing/HeadshotMarketingRoutes.js.map +1 -1
  9. package/dist/headshotmarketing/components/ActionMenu.js +57 -0
  10. package/dist/headshotmarketing/components/ActionMenu.js.map +1 -0
  11. package/dist/headshotmarketing/components/AssetUploadButton.js +47 -0
  12. package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -0
  13. package/dist/headshotmarketing/components/FilterBar.js.map +1 -1
  14. package/dist/headshotmarketing/components/InfluencerModals.js +606 -0
  15. package/dist/headshotmarketing/components/InfluencerModals.js.map +1 -0
  16. package/dist/headshotmarketing/components/LoadingSkeleton.js +11 -1
  17. package/dist/headshotmarketing/components/LoadingSkeleton.js.map +1 -0
  18. package/dist/headshotmarketing/components/Modal.js +6 -3
  19. package/dist/headshotmarketing/components/Modal.js.map +1 -1
  20. package/dist/headshotmarketing/components/Pagination.js +117 -0
  21. package/dist/headshotmarketing/components/Pagination.js.map +1 -0
  22. package/dist/headshotmarketing/components/QueryStateBoundary.js +46 -0
  23. package/dist/headshotmarketing/components/QueryStateBoundary.js.map +1 -0
  24. package/dist/headshotmarketing/components/StatusBadge.js.map +1 -1
  25. package/dist/headshotmarketing/components/TagChipsInput.js +74 -0
  26. package/dist/headshotmarketing/components/TagChipsInput.js.map +1 -0
  27. package/dist/headshotmarketing/components/index.js +6 -0
  28. package/dist/headshotmarketing/context/HeadshotMarketingContext.js +26 -22
  29. package/dist/headshotmarketing/context/HeadshotMarketingContext.js.map +1 -1
  30. package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js +29 -0
  31. package/dist/headshotmarketing/context/HeadshotmarketingBootstrapContext.js.map +1 -0
  32. package/dist/headshotmarketing/hooks/index.js +4 -0
  33. package/dist/headshotmarketing/hooks/useAssetUpload.js +86 -0
  34. package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -0
  35. package/dist/headshotmarketing/hooks/useHeadshotmarketingBootstrap.js +12 -0
  36. package/dist/headshotmarketing/hooks/useHeadshotmarketingBootstrap.js.map +1 -0
  37. package/dist/headshotmarketing/hooks/usePagination.js +53 -0
  38. package/dist/headshotmarketing/hooks/usePagination.js.map +1 -0
  39. package/dist/headshotmarketing/pages/HomePage.js +291 -322
  40. package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
  41. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js +522 -225
  42. package/dist/headshotmarketing/pages/ads/AdCampaignsPage.js.map +1 -1
  43. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +749 -147
  44. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  45. package/dist/headshotmarketing/pages/ads/AdsPage.js +197 -188
  46. package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
  47. package/dist/headshotmarketing/pages/ads/AudiencesPage.js +583 -147
  48. package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
  49. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js +218 -206
  50. package/dist/headshotmarketing/pages/ads/CreateAdCampaignPage.js.map +1 -1
  51. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +244 -237
  52. package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
  53. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js +278 -272
  54. package/dist/headshotmarketing/pages/analytics/AnalyticsPage.js.map +1 -1
  55. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +197 -193
  56. package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
  57. package/dist/headshotmarketing/pages/analytics/ReportsPage.js +254 -295
  58. package/dist/headshotmarketing/pages/analytics/ReportsPage.js.map +1 -1
  59. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +227 -210
  60. package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
  61. package/dist/headshotmarketing/pages/automation/AutomationPage.js +239 -168
  62. package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
  63. package/dist/headshotmarketing/pages/automation/TriggersPage.js +150 -102
  64. package/dist/headshotmarketing/pages/automation/TriggersPage.js.map +1 -1
  65. package/dist/headshotmarketing/pages/automation/WorkflowActions.js +287 -0
  66. package/dist/headshotmarketing/pages/automation/WorkflowActions.js.map +1 -0
  67. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js +56 -58
  68. package/dist/headshotmarketing/pages/automation/WorkflowBuilderPage.js.map +1 -1
  69. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js +211 -179
  70. package/dist/headshotmarketing/pages/automation/WorkflowsPage.js.map +1 -1
  71. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +444 -306
  72. package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
  73. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +303 -342
  74. package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
  75. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js +189 -151
  76. package/dist/headshotmarketing/pages/campaigns/CampaignTemplatesPage.js.map +1 -1
  77. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +417 -274
  78. package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
  79. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +345 -260
  80. package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
  81. package/dist/headshotmarketing/pages/content/AIToolsPage.js +261 -192
  82. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  83. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js +213 -141
  84. package/dist/headshotmarketing/pages/content/AssetLibraryPage.js.map +1 -1
  85. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js +242 -246
  86. package/dist/headshotmarketing/pages/content/ContentAnalyticsPage.js.map +1 -1
  87. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +184 -136
  88. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  89. package/dist/headshotmarketing/pages/content/ContentPage.js +208 -159
  90. package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
  91. package/dist/headshotmarketing/pages/crm/ContactsPage.js +336 -265
  92. package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
  93. package/dist/headshotmarketing/pages/crm/CreateContactPage.js +76 -87
  94. package/dist/headshotmarketing/pages/crm/CreateContactPage.js.map +1 -1
  95. package/dist/headshotmarketing/pages/crm/CreateDealPage.js +195 -196
  96. package/dist/headshotmarketing/pages/crm/CreateDealPage.js.map +1 -1
  97. package/dist/headshotmarketing/pages/crm/CrmActions.js +663 -0
  98. package/dist/headshotmarketing/pages/crm/CrmActions.js.map +1 -0
  99. package/dist/headshotmarketing/pages/crm/CrmPage.js +237 -207
  100. package/dist/headshotmarketing/pages/crm/CrmPage.js.map +1 -1
  101. package/dist/headshotmarketing/pages/crm/LeadsPage.js +168 -165
  102. package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
  103. package/dist/headshotmarketing/pages/crm/PipelinePage.js +189 -178
  104. package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
  105. package/dist/headshotmarketing/pages/events/CreateEventPage.js +188 -190
  106. package/dist/headshotmarketing/pages/events/CreateEventPage.js.map +1 -1
  107. package/dist/headshotmarketing/pages/events/EventsPage.js +256 -238
  108. package/dist/headshotmarketing/pages/events/EventsPage.js.map +1 -1
  109. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js +195 -167
  110. package/dist/headshotmarketing/pages/influencers/InfluencerCampaignsPage.js.map +1 -1
  111. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js +280 -243
  112. package/dist/headshotmarketing/pages/influencers/InfluencerDiscoveryPage.js.map +1 -1
  113. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +186 -183
  114. package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
  115. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js +303 -231
  116. package/dist/headshotmarketing/pages/influencers/RelationshipsPage.js.map +1 -1
  117. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js +460 -310
  118. package/dist/headshotmarketing/pages/seo/SeoToolsPage.js.map +1 -1
  119. package/dist/headshotmarketing/pages/social-media/AccountsPage.js +318 -104
  120. package/dist/headshotmarketing/pages/social-media/AccountsPage.js.map +1 -1
  121. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js +266 -255
  122. package/dist/headshotmarketing/pages/social-media/ContentCalendarPage.js.map +1 -1
  123. package/dist/headshotmarketing/pages/social-media/PostsPage.js +365 -202
  124. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  125. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js +321 -233
  126. package/dist/headshotmarketing/pages/social-media/SocialMediaComposePage.js.map +1 -1
  127. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +324 -308
  128. package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
  129. package/dist/headshotmarketing/utils/adsMapper.js +74 -51
  130. package/dist/headshotmarketing/utils/adsMapper.js.map +1 -1
  131. package/dist/headshotmarketing/utils/analyticsMapper.js +11 -11
  132. package/dist/headshotmarketing/utils/analyticsMapper.js.map +1 -1
  133. package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
  134. package/dist/headshotmarketing/utils/helpers.js +11 -1
  135. package/dist/headshotmarketing/utils/helpers.js.map +1 -1
  136. package/dist/headshotmarketing/utils/influencerMapper.js +5 -4
  137. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  138. package/package.json +1 -1
  139. package/dist/headshotmarketing/utils/reportMapper.js +0 -33
  140. package/dist/headshotmarketing/utils/reportMapper.js.map +0 -1
@@ -1,334 +1,293 @@
1
1
  import { useHeadshotMarketing as e } from "../../context/HeadshotMarketingContext.js";
2
- import { useHeadshotmarketingBootstrapDataQuery as t } from "../../../generated/wspace-operations.js";
3
- import { cn as n, formatDate as r } from "../../utils/helpers.js";
4
- import { PageLayout as i } from "../../components/PageLayout.js";
5
- import { DataTable as a } from "../../components/DataTable.js";
6
- import { StatusBadge as o } from "../../components/StatusBadge.js";
7
- import { EmptyState as s } from "../../components/EmptyState.js";
8
- import { Modal as c } from "../../components/Modal.js";
2
+ import { exportRowsToCsv as t, formatCurrency as n, formatNumber as r, formatPercentage as i } from "../../utils/helpers.js";
3
+ import { toCampaignModel as a } from "../../utils/campaignMapper.js";
4
+ import { toAdCampaignModel as o } from "../../utils/adsMapper.js";
5
+ import { toChannelPerformance as s } from "../../utils/analyticsMapper.js";
6
+ import { PageLayout as c } from "../../components/PageLayout.js";
7
+ import { StatCard as l } from "../../components/StatCard.js";
8
+ import { DataTable as u } from "../../components/DataTable.js";
9
+ import { StatusBadge as d } from "../../components/StatusBadge.js";
10
+ import { ChartCard as f } from "../../components/ChartCard.js";
11
+ import { QueryStateBoundary as p } from "../../components/QueryStateBoundary.js";
9
12
  import "../../components/index.js";
10
- import { toReportModel as l } from "../../utils/reportMapper.js";
11
- import { useState as u } from "react";
12
- import { Clock as d, Download as f, FileText as p, Plus as m, Send as h } from "lucide-react";
13
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { EmphasisPanel as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
13
+ import { useHeadshotmarketingBootstrap as m } from "../../hooks/useHeadshotmarketingBootstrap.js";
14
+ import { BarChart3 as h, DollarSign as g, Download as _, Share2 as v, Target as y, TrendingUp as b, Users as x } from "lucide-react";
15
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
16
+ import { EmphasisPanel as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
15
17
  //#region src/headshotmarketing/pages/analytics/ReportsPage.tsx
16
- var x = [
17
- {
18
- id: "qt1",
19
- name: "Campaign Overview",
20
- description: "Summary of all campaign performance",
21
- icon: "📊"
22
- },
23
- {
24
- id: "qt2",
25
- name: "ROI Analysis",
26
- description: "Return on investment breakdown",
27
- icon: "💰"
28
- },
29
- {
30
- id: "qt3",
31
- name: "Audience Insights",
32
- description: "Demographics and behavior report",
33
- icon: "👥"
34
- },
35
- {
36
- id: "qt4",
37
- name: "Social Media Digest",
38
- description: "Social platform performance summary",
39
- icon: "📱"
40
- },
41
- {
42
- id: "qt5",
43
- name: "Ad Performance",
44
- description: "Detailed ad metrics report",
45
- icon: "📈"
46
- },
47
- {
48
- id: "qt6",
49
- name: "Lead Pipeline",
50
- description: "Lead generation and conversion report",
51
- icon: "🎯"
52
- }
53
- ], S = () => {
54
- let { navigate: S } = e(), { data: C } = t({ variables: {
55
- limit: 200,
56
- offset: 0
57
- } }), [w, T] = u(!1), [E, D] = u({
58
- name: "",
59
- type: "campaign",
60
- dateRange: "last_30_days",
61
- metrics: [],
62
- format: "pdf"
63
- }), O = [
64
- "Revenue",
65
- "Cost",
66
- "Conversions",
67
- "CTR",
68
- "CPC",
69
- "ROAS",
70
- "Impressions",
71
- "Clicks"
72
- ], k = (C?.headshotmarketingReports.items ?? []).map((e) => l(e)), A = [
18
+ var E = () => {
19
+ let { navigate: E, basePath: D } = e(), { data: O, loading: k, error: A, refetch: j } = m(), M = (O?.headshotmarketingCampaigns.items ?? []).map((e) => a(e)), N = s(M, (O?.headshotmarketingAdCampaigns.items ?? []).map((e) => o(e))), P = N.reduce((e, t) => e + t.revenue, 0), F = N.reduce((e, t) => e + t.cost, 0), I = N.reduce((e, t) => e + t.conversions, 0), L = F > 0 ? P / F : 0, R = !!O, z = N.length > 0, B = M.length > 0, V = () => {
20
+ t("channel-performance", [
21
+ "Channel",
22
+ "Revenue",
23
+ "Cost",
24
+ "Conversions",
25
+ "ROAS",
26
+ "CTR",
27
+ "Impressions",
28
+ "Clicks"
29
+ ], N.map((e) => [
30
+ e.channel,
31
+ e.revenue,
32
+ e.cost,
33
+ e.conversions,
34
+ `${e.roas.toFixed(2)}x`,
35
+ `${e.ctr.toFixed(2)}%`,
36
+ e.impressions,
37
+ e.clicks
38
+ ]));
39
+ }, H = () => {
40
+ t("campaign-performance", [
41
+ "Campaign",
42
+ "Type",
43
+ "Status",
44
+ "Revenue",
45
+ "Cost",
46
+ "Conversions",
47
+ "ROAS"
48
+ ], M.map((e) => [
49
+ e.name,
50
+ e.type,
51
+ e.status,
52
+ e.metrics.revenue,
53
+ e.metrics.cost,
54
+ e.metrics.conversions,
55
+ `${e.metrics.roas.toFixed(2)}x`
56
+ ]));
57
+ }, U = [
73
58
  {
74
- key: "name",
75
- header: "Report Name",
59
+ key: "channel",
60
+ header: "Channel",
76
61
  sortable: !0,
77
- render: (e) => /* @__PURE__ */ v("div", {
78
- className: "flex items-center gap-3",
79
- children: [/* @__PURE__ */ _(p, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
80
- className: "font-medium text-text-primary",
81
- children: e.name
82
- }), /* @__PURE__ */ _("p", {
83
- className: "text-xs text-text-secondary",
84
- children: e.description
85
- })] })]
62
+ render: (e) => /* @__PURE__ */ C("div", {
63
+ className: "flex items-center gap-2",
64
+ children: [/* @__PURE__ */ S("div", {
65
+ className: "h-3 w-3 rounded-full",
66
+ style: { backgroundColor: e.color }
67
+ }), /* @__PURE__ */ S("span", {
68
+ className: "font-medium text-text-primary capitalize",
69
+ children: e.channel
70
+ })]
86
71
  })
87
72
  },
88
73
  {
89
- key: "type",
90
- header: "Type",
91
- render: (e) => /* @__PURE__ */ _(o, { status: e.type })
74
+ key: "revenue",
75
+ header: "Revenue",
76
+ sortable: !0,
77
+ render: (e) => n(e.revenue)
92
78
  },
93
79
  {
94
- key: "schedule",
95
- header: "Schedule",
96
- render: (e) => /* @__PURE__ */ v("div", {
97
- className: "flex items-center gap-1.5",
98
- children: [/* @__PURE__ */ _(d, { className: "h-3.5 w-3.5 text-text-secondary" }), /* @__PURE__ */ _("span", {
99
- className: "text-sm capitalize text-text-primary",
100
- children: e.schedule || "One-time"
101
- })]
102
- })
80
+ key: "cost",
81
+ header: "Cost",
82
+ sortable: !0,
83
+ render: (e) => n(e.cost)
103
84
  },
104
85
  {
105
- key: "format",
106
- header: "Format",
107
- render: (e) => /* @__PURE__ */ _("span", {
108
- className: "inline-flex items-center rounded-md bg-bg-sunken px-2 py-1 text-xs font-medium text-text-primary uppercase",
109
- children: e.format
110
- })
86
+ key: "conversions",
87
+ header: "Conversions",
88
+ sortable: !0,
89
+ render: (e) => r(e.conversions)
111
90
  },
112
91
  {
113
- key: "lastGeneratedAt",
114
- header: "Last Generated",
92
+ key: "roas",
93
+ header: "ROAS",
115
94
  sortable: !0,
116
- render: (e) => /* @__PURE__ */ _("span", {
117
- className: "text-sm text-text-secondary",
118
- children: e.lastGeneratedAt ? r(e.lastGeneratedAt, "relative") : "Never"
119
- })
95
+ render: (e) => `${e.roas.toFixed(1)}x`
120
96
  },
121
97
  {
122
- key: "recipients",
123
- header: "Recipients",
124
- render: (e) => /* @__PURE__ */ _("span", {
125
- className: "text-sm text-text-secondary",
126
- children: e.recipients.length > 0 ? `${e.recipients.length} recipient${e.recipients.length > 1 ? "s" : ""}` : "None"
98
+ key: "ctr",
99
+ header: "CTR",
100
+ sortable: !0,
101
+ render: (e) => i(e.ctr)
102
+ }
103
+ ], W = [
104
+ {
105
+ key: "name",
106
+ header: "Campaign",
107
+ sortable: !0,
108
+ render: (e) => /* @__PURE__ */ S("span", {
109
+ className: "font-medium text-text-primary",
110
+ children: e.name
127
111
  })
128
112
  },
129
113
  {
130
- key: "actions",
131
- header: "",
132
- render: () => /* @__PURE__ */ v("div", {
133
- className: "flex items-center gap-1",
134
- children: [/* @__PURE__ */ _("button", {
135
- className: "p-1.5 rounded-md hover:bg-bg-sunken text-text-secondary hover:text-text-primary",
136
- children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
137
- }), /* @__PURE__ */ _("button", {
138
- className: "p-1.5 rounded-md hover:bg-bg-sunken text-text-secondary hover:text-text-primary",
139
- children: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
140
- })]
141
- })
114
+ key: "status",
115
+ header: "Status",
116
+ render: (e) => /* @__PURE__ */ S(d, { status: e.status })
117
+ },
118
+ {
119
+ key: "revenue",
120
+ header: "Revenue",
121
+ sortable: !0,
122
+ render: (e) => n(e.metrics.revenue)
123
+ },
124
+ {
125
+ key: "conversions",
126
+ header: "Conversions",
127
+ sortable: !0,
128
+ render: (e) => r(e.metrics.conversions)
129
+ },
130
+ {
131
+ key: "roas",
132
+ header: "ROAS",
133
+ sortable: !0,
134
+ render: (e) => `${e.metrics.roas.toFixed(1)}x`
142
135
  }
143
- ], j = (e) => {
144
- D((t) => ({
145
- ...t,
146
- metrics: t.metrics.includes(e) ? t.metrics.filter((t) => t !== e) : [...t.metrics, e]
147
- }));
148
- };
149
- return /* @__PURE__ */ v(i, {
150
- title: "Reports",
151
- description: "Generate, schedule, and manage marketing reports",
152
- actions: /* @__PURE__ */ v("button", {
153
- onClick: () => T(!0),
154
- className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
155
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), "Create Report"]
136
+ ], G = [
137
+ {
138
+ id: "campaigns",
139
+ name: "Campaign performance",
140
+ description: "Revenue, conversions and ROAS by campaign.",
141
+ icon: /* @__PURE__ */ S(y, { className: "h-5 w-5" }),
142
+ segment: "/analytics/campaigns"
143
+ },
144
+ {
145
+ id: "channels",
146
+ name: "Channel breakdown",
147
+ description: "Where revenue and spend land across channels.",
148
+ icon: /* @__PURE__ */ S(h, { className: "h-5 w-5" }),
149
+ segment: "/analytics"
150
+ },
151
+ {
152
+ id: "ads",
153
+ name: "Ad performance",
154
+ description: "Paid spend, CPC and ROAS by platform.",
155
+ icon: /* @__PURE__ */ S(b, { className: "h-5 w-5" }),
156
+ segment: "/analytics/ads"
157
+ },
158
+ {
159
+ id: "social",
160
+ name: "Social digest",
161
+ description: "Reach, engagement and top posts by platform.",
162
+ icon: /* @__PURE__ */ S(v, { className: "h-5 w-5" }),
163
+ segment: "/analytics/social"
164
+ },
165
+ {
166
+ id: "audience",
167
+ name: "Audience insights",
168
+ description: "Geography and device breakdown for your traffic.",
169
+ icon: /* @__PURE__ */ S(x, { className: "h-5 w-5" }),
170
+ segment: "/analytics"
171
+ },
172
+ {
173
+ id: "pipeline",
174
+ name: "Lead pipeline",
175
+ description: "Deals and value across your CRM pipeline.",
176
+ icon: /* @__PURE__ */ S(g, { className: "h-5 w-5" }),
177
+ segment: "/crm/pipeline"
178
+ }
179
+ ];
180
+ return /* @__PURE__ */ C(c, {
181
+ title: "Reports & Exports",
182
+ description: "Live marketing performance you can view or export",
183
+ actions: /* @__PURE__ */ C("button", {
184
+ type: "button",
185
+ onClick: V,
186
+ disabled: !z,
187
+ title: z ? "Download channel performance as a CSV file" : "No performance data to export yet",
188
+ className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:cursor-not-allowed disabled:opacity-60",
189
+ children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), "Export CSV"]
156
190
  }),
157
191
  children: [
158
- /* @__PURE__ */ _(b, { children: "Turn your marketing data into shareable reports. Build a report once — pick the metrics, date range and format — then download it or schedule it to land in your team's inbox automatically. Start from a template below or create a custom one." }),
159
- k.length === 0 ? /* @__PURE__ */ _(s, {
160
- illustration: "empty-data",
161
- title: "No reports yet",
162
- description: "Create your first report or pick a quick template below to get started.",
163
- action: /* @__PURE__ */ v("button", {
164
- onClick: () => T(!0),
165
- className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
166
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), "Create Report"]
167
- })
168
- }) : /* @__PURE__ */ _(a, {
169
- data: k,
170
- columns: A,
171
- searchable: !0,
172
- searchPlaceholder: "Search reports..."
192
+ /* @__PURE__ */ S(T, { children: "Turn your marketing data into something you can share. This page pulls the same live channel and campaign performance that powers analytics — export any table to a CSV for your spreadsheets or slides, or jump into the full interactive view." }),
193
+ /* @__PURE__ */ C(p, {
194
+ loading: k,
195
+ error: A,
196
+ onRetry: j,
197
+ hasData: R,
198
+ children: [
199
+ /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C("div", {
200
+ className: "grid grid-cols-2 md:grid-cols-4 gap-4",
201
+ children: [
202
+ /* @__PURE__ */ S(l, {
203
+ title: "Total Revenue",
204
+ value: n(P),
205
+ icon: /* @__PURE__ */ S(g, { className: "h-4 w-4" })
206
+ }),
207
+ /* @__PURE__ */ S(l, {
208
+ title: "Total Cost",
209
+ value: n(F),
210
+ icon: /* @__PURE__ */ S(h, { className: "h-4 w-4" })
211
+ }),
212
+ /* @__PURE__ */ S(l, {
213
+ title: "Conversions",
214
+ value: r(I),
215
+ icon: /* @__PURE__ */ S(y, { className: "h-4 w-4" })
216
+ }),
217
+ /* @__PURE__ */ S(l, {
218
+ title: "Avg ROAS",
219
+ value: `${L.toFixed(1)}x`,
220
+ icon: /* @__PURE__ */ S(b, { className: "h-4 w-4" })
221
+ })
222
+ ]
223
+ }) }),
224
+ /* @__PURE__ */ S(f, {
225
+ title: "Channel Performance",
226
+ subtitle: "Revenue and ROAS across every channel",
227
+ children: /* @__PURE__ */ S(u, {
228
+ data: N,
229
+ columns: U,
230
+ searchable: !0,
231
+ searchPlaceholder: "Search channels...",
232
+ emptyMessage: "No channel data yet",
233
+ emptyDescription: "Launch a campaign to start collecting channel performance.",
234
+ actions: /* @__PURE__ */ C("button", {
235
+ type: "button",
236
+ onClick: V,
237
+ disabled: !z,
238
+ className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60",
239
+ children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), "Export"]
240
+ })
241
+ })
242
+ }),
243
+ /* @__PURE__ */ S(f, {
244
+ title: "Campaign Performance",
245
+ subtitle: "All campaigns ranked by revenue",
246
+ children: /* @__PURE__ */ S(u, {
247
+ data: M,
248
+ columns: W,
249
+ searchable: !0,
250
+ searchPlaceholder: "Search campaigns...",
251
+ pageSize: 8,
252
+ onRowClick: (e) => E(D + "/campaigns/" + e.id),
253
+ emptyMessage: "No campaigns yet",
254
+ emptyDescription: "Create your first campaign to see it here.",
255
+ actions: /* @__PURE__ */ C("button", {
256
+ type: "button",
257
+ onClick: H,
258
+ disabled: !B,
259
+ className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60",
260
+ children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), "Export"]
261
+ })
262
+ })
263
+ })
264
+ ]
173
265
  }),
174
- /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _("h3", {
266
+ /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ S("h3", {
175
267
  className: "text-sm font-semibold text-text-primary mb-4",
176
- children: "Quick Templates"
177
- }), /* @__PURE__ */ _("div", {
268
+ children: "Open a live report"
269
+ }), /* @__PURE__ */ S("div", {
178
270
  className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
179
- children: x.map((e) => /* @__PURE__ */ v("button", {
180
- onClick: () => {
181
- D((t) => ({
182
- ...t,
183
- name: e.name
184
- })), T(!0);
185
- },
186
- className: "flex items-start gap-3 rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 text-left hover:bg-bg-sunken/50 transition-colors",
187
- children: [/* @__PURE__ */ _("span", {
188
- className: "text-2xl",
271
+ children: G.map((e) => /* @__PURE__ */ C("button", {
272
+ type: "button",
273
+ onClick: () => E(D + e.segment),
274
+ className: "flex items-start gap-3 rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 text-left hover:bg-bg-sunken/50 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
275
+ children: [/* @__PURE__ */ S("span", {
276
+ className: "text-text-secondary",
189
277
  children: e.icon
190
- }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
278
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
191
279
  className: "text-sm font-medium text-text-primary",
192
280
  children: e.name
193
- }), /* @__PURE__ */ _("p", {
281
+ }), /* @__PURE__ */ S("p", {
194
282
  className: "text-xs text-text-secondary mt-0.5",
195
283
  children: e.description
196
284
  })] })]
197
285
  }, e.id))
198
- })] }),
199
- /* @__PURE__ */ _(c, {
200
- open: w,
201
- onClose: () => T(!1),
202
- title: "Create Report",
203
- description: "Configure your custom report",
204
- size: "lg",
205
- footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("button", {
206
- onClick: () => T(!1),
207
- className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
208
- children: "Cancel"
209
- }), /* @__PURE__ */ _("button", {
210
- onClick: () => T(!1),
211
- className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
212
- children: "Generate Report"
213
- })] }),
214
- children: /* @__PURE__ */ v("div", {
215
- className: "space-y-4",
216
- children: [
217
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
218
- className: "block text-sm font-medium text-text-primary mb-1",
219
- children: "Report Name"
220
- }), /* @__PURE__ */ _("input", {
221
- type: "text",
222
- value: E.name,
223
- onChange: (e) => D((t) => ({
224
- ...t,
225
- name: e.target.value
226
- })),
227
- placeholder: "Enter report name",
228
- className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
229
- })] }),
230
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
231
- className: "block text-sm font-medium text-text-primary mb-1",
232
- children: "Report Type"
233
- }), /* @__PURE__ */ v("select", {
234
- value: E.type,
235
- onChange: (e) => D((t) => ({
236
- ...t,
237
- type: e.target.value
238
- })),
239
- className: "w-full rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
240
- children: [
241
- /* @__PURE__ */ _("option", {
242
- value: "campaign",
243
- children: "Campaign Report"
244
- }),
245
- /* @__PURE__ */ _("option", {
246
- value: "channel",
247
- children: "Channel Report"
248
- }),
249
- /* @__PURE__ */ _("option", {
250
- value: "audience",
251
- children: "Audience Report"
252
- }),
253
- /* @__PURE__ */ _("option", {
254
- value: "custom",
255
- children: "Custom Report"
256
- })
257
- ]
258
- })] }),
259
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
260
- className: "block text-sm font-medium text-text-primary mb-1",
261
- children: "Date Range"
262
- }), /* @__PURE__ */ v("select", {
263
- value: E.dateRange,
264
- onChange: (e) => D((t) => ({
265
- ...t,
266
- dateRange: e.target.value
267
- })),
268
- className: "w-full rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
269
- children: [
270
- /* @__PURE__ */ _("option", {
271
- value: "last_7_days",
272
- children: "Last 7 Days"
273
- }),
274
- /* @__PURE__ */ _("option", {
275
- value: "last_30_days",
276
- children: "Last 30 Days"
277
- }),
278
- /* @__PURE__ */ _("option", {
279
- value: "last_90_days",
280
- children: "Last 90 Days"
281
- }),
282
- /* @__PURE__ */ _("option", {
283
- value: "this_month",
284
- children: "This Month"
285
- }),
286
- /* @__PURE__ */ _("option", {
287
- value: "last_month",
288
- children: "Last Month"
289
- }),
290
- /* @__PURE__ */ _("option", {
291
- value: "custom",
292
- children: "Custom Range"
293
- })
294
- ]
295
- })] }),
296
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
297
- className: "block text-sm font-medium text-text-primary mb-1",
298
- children: "Metrics"
299
- }), /* @__PURE__ */ _("div", {
300
- className: "flex flex-wrap gap-2",
301
- children: O.map((e) => /* @__PURE__ */ _("button", {
302
- onClick: () => j(e),
303
- className: n("rounded-full px-3 py-1 text-xs font-medium border transition-colors", E.metrics.includes(e) ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-secondary border-border-subtle hover:border-foreground"),
304
- children: e
305
- }, e))
306
- })] }),
307
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
308
- className: "block text-sm font-medium text-text-primary mb-1",
309
- children: "Format"
310
- }), /* @__PURE__ */ _("div", {
311
- className: "flex gap-2",
312
- children: [
313
- "pdf",
314
- "csv",
315
- "xlsx"
316
- ].map((e) => /* @__PURE__ */ _("button", {
317
- onClick: () => D((t) => ({
318
- ...t,
319
- format: e
320
- })),
321
- className: n("rounded-md px-4 py-2 text-sm font-medium border uppercase transition-colors", E.format === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "bg-bg-surface text-text-primary border-border-subtle hover:bg-bg-sunken"),
322
- children: e
323
- }, e))
324
- })] })
325
- ]
326
- })
327
- })
286
+ })] })
328
287
  ]
329
288
  });
330
289
  };
331
290
  //#endregion
332
- export { S as ReportsPage };
291
+ export { E as ReportsPage };
333
292
 
334
293
  //# sourceMappingURL=ReportsPage.js.map