@burdenoff/microfe-headshotmarketing 2026.703.1 → 2026.704.2

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 (137) hide show
  1. package/dist/generated/wspace-operations.js +960 -77
  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 +334 -301
  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 +221 -211
  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 +290 -217
  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/helpers.js +11 -1
  132. package/dist/headshotmarketing/utils/helpers.js.map +1 -1
  133. package/dist/headshotmarketing/utils/influencerMapper.js +1 -0
  134. package/dist/headshotmarketing/utils/influencerMapper.js.map +1 -1
  135. package/package.json +1 -1
  136. package/dist/headshotmarketing/utils/reportMapper.js +0 -33
  137. package/dist/headshotmarketing/utils/reportMapper.js.map +0 -1
@@ -1,291 +1,362 @@
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, formatNumber as i } from "../../utils/helpers.js";
4
- import { PageLayout as a } from "../../components/PageLayout.js";
5
- import { DataTable as o } from "../../components/DataTable.js";
6
- import { StatusBadge as s } from "../../components/StatusBadge.js";
7
- import { EmptyState as c } from "../../components/EmptyState.js";
8
- import { FilterBar as l } from "../../components/FilterBar.js";
2
+ import { cn as t, formatDate as n, formatNumber as r } from "../../utils/helpers.js";
3
+ import { PageLayout as i } from "../../components/PageLayout.js";
4
+ import { DataTable as a } from "../../components/DataTable.js";
5
+ import { StatusBadge as o } from "../../components/StatusBadge.js";
6
+ import { EmptyState as s } from "../../components/EmptyState.js";
7
+ import { FilterBar as c } from "../../components/FilterBar.js";
8
+ import { QueryStateBoundary as l } from "../../components/QueryStateBoundary.js";
9
+ import { Pagination as u } from "../../components/Pagination.js";
9
10
  import "../../components/index.js";
10
- import { toContactModel as u } from "../../utils/crmMapper.js";
11
- import { useState as d } from "react";
12
- import { Building2 as f, Download as p, LayoutGrid as m, List as h, Mail as g, Phone as _, UserPlus as v } from "lucide-react";
13
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
14
- import { EmphasisPanel as x, PagePurpose as S } from "@burdenoff/fe-libs/ui";
11
+ import { useHeadshotmarketingBootstrap as d } from "../../hooks/useHeadshotmarketingBootstrap.js";
12
+ import { usePagination as f } from "../../hooks/usePagination.js";
13
+ import { toContactModel as p } from "../../utils/crmMapper.js";
14
+ import { ContactActionsMenu as m } from "./CrmActions.js";
15
+ import { useEffect as h, useState as g } from "react";
16
+ import { Building2 as _, Download as v, LayoutGrid as y, List as b, Mail as x, Phone as S, UserPlus as C } from "lucide-react";
17
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
18
+ import { EmphasisPanel as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
15
19
  //#region src/headshotmarketing/pages/crm/ContactsPage.tsx
16
- var C = () => {
17
- let { navigate: C } = e(), { data: w } = t({ variables: {
18
- limit: 200,
19
- offset: 0
20
- } }), [T, E] = d(""), [D, O] = d("all"), [k, A] = d("grid"), j = (w?.headshotmarketingContacts.items ?? []).map((e) => u(e)), M = j.filter((e) => {
21
- let t = !T || `${e.firstName} ${e.lastName} ${e.email} ${e.company}`.toLowerCase().includes(T.toLowerCase()), n = D === "all" || e.status === D;
20
+ var k = [
21
+ "First Name",
22
+ "Last Name",
23
+ "Email",
24
+ "Phone",
25
+ "Company",
26
+ "Title",
27
+ "Status",
28
+ "Score",
29
+ "Tags"
30
+ ];
31
+ function A(e) {
32
+ return /[",\n]/.test(e) ? `"${e.replace(/"/g, "\"\"")}"` : e;
33
+ }
34
+ function j(e) {
35
+ let t = [k.join(",")];
36
+ for (let n of e) t.push([
37
+ n.firstName,
38
+ n.lastName,
39
+ n.email,
40
+ n.phone,
41
+ n.company,
42
+ n.title,
43
+ n.status,
44
+ String(n.score),
45
+ n.tags.join("; ")
46
+ ].map((e) => A(e ?? "")).join(","));
47
+ let n = new Blob([t.join("\n")], { type: "text/csv;charset=utf-8;" }), r = URL.createObjectURL(n), i = document.createElement("a");
48
+ i.href = r, i.download = `contacts-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, document.body.appendChild(i), i.click(), document.body.removeChild(i), URL.revokeObjectURL(r);
49
+ }
50
+ var M = 12, N = () => {
51
+ let { navigate: k, basePath: A } = e(), { data: N, loading: P, error: F, refetch: I } = d(), [L, R] = g(""), [z, B] = g("all"), [V, H] = g("grid"), U = f({ initialPageSize: M }), W = (N?.headshotmarketingContacts.items ?? []).map((e) => p(e)), G = W.filter((e) => {
52
+ let t = !L || `${e.firstName} ${e.lastName} ${e.email} ${e.company}`.toLowerCase().includes(L.toLowerCase()), n = z === "all" || e.status === z;
22
53
  return t && n;
23
- }), N = (e, t) => `${e[0] || ""}${t[0] || ""}`.toUpperCase(), P = j.filter((e) => e.status === "qualified").length, F = j.filter((e) => e.status === "converted").length, I = j.length > 0 ? Math.round(j.reduce((e, t) => e + t.score, 0) / j.length) : 0;
24
- return /* @__PURE__ */ b(a, {
54
+ }), { setTotal: K } = U;
55
+ h(() => {
56
+ K(G.length);
57
+ }, [G.length, K]);
58
+ let q = G.slice((U.page - 1) * U.pageSize, U.page * U.pageSize), J = (e, t) => `${e[0] || ""}${t[0] || ""}`.toUpperCase(), Y = W.filter((e) => e.status === "qualified").length, X = W.filter((e) => e.status === "converted").length, Z = W.length > 0 ? Math.round(W.reduce((e, t) => e + t.score, 0) / W.length) : 0;
59
+ return /* @__PURE__ */ E(i, {
25
60
  title: "Contacts",
26
61
  description: "Manage your contacts database",
27
- actions: /* @__PURE__ */ b("div", {
28
- className: "flex items-center gap-2",
29
- children: [/* @__PURE__ */ b("button", {
30
- className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
31
- children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), "Export"]
32
- }), /* @__PURE__ */ b("button", {
33
- onClick: () => C("crm/contacts/new"),
62
+ actions: /* @__PURE__ */ E("div", {
63
+ className: "flex flex-wrap items-center gap-2",
64
+ children: [/* @__PURE__ */ E("button", {
65
+ onClick: () => j(G),
66
+ disabled: G.length === 0,
67
+ className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
68
+ title: G.length === 0 ? "No contacts to export" : "Download the current contacts as a CSV file",
69
+ children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Export"]
70
+ }), /* @__PURE__ */ E("button", {
71
+ onClick: () => k(A + "/crm/contacts/new"),
34
72
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
35
- children: [/* @__PURE__ */ y(v, { className: "h-4 w-4" }), "Add Contact"]
73
+ children: [/* @__PURE__ */ T(C, { className: "h-4 w-4" }), "Add Contact"]
36
74
  })]
37
75
  }),
38
- children: [
39
- /* @__PURE__ */ y(S, { children: "Your full contacts database. Search, filter by status and switch between grid and table views to find anyone fast — then drill in to see their details, tags and where they are in your funnel." }),
40
- /* @__PURE__ */ y(x, { children: /* @__PURE__ */ b("div", {
41
- className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
42
- children: [
43
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
44
- className: "text-xs text-text-secondary",
45
- children: "Total Contacts"
46
- }), /* @__PURE__ */ y("p", {
47
- className: "text-2xl font-semibold text-text-primary",
48
- children: i(j.length)
49
- })] }),
50
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
51
- className: "text-xs text-text-secondary",
52
- children: "Qualified"
53
- }), /* @__PURE__ */ y("p", {
54
- className: "text-2xl font-semibold text-text-primary",
55
- children: i(P)
56
- })] }),
57
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
58
- className: "text-xs text-text-secondary",
59
- children: "Converted"
60
- }), /* @__PURE__ */ y("p", {
61
- className: "text-2xl font-semibold text-text-primary",
62
- children: i(F)
63
- })] }),
64
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
65
- className: "text-xs text-text-secondary",
66
- children: "Avg Score"
67
- }), /* @__PURE__ */ y("p", {
68
- className: "text-2xl font-semibold text-text-primary",
69
- children: I
70
- })] })
71
- ]
72
- }) }),
73
- /* @__PURE__ */ y(l, {
74
- searchValue: T,
75
- onSearchChange: E,
76
- searchPlaceholder: "Search contacts...",
77
- filters: /* @__PURE__ */ b("select", {
78
- value: D,
79
- onChange: (e) => O(e.target.value),
80
- className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
76
+ children: [/* @__PURE__ */ T(O, { children: "Your full contacts database. Search, filter by status and switch between grid and table views to find anyone fast — then drill in to see their details, tags and where they are in your funnel." }), /* @__PURE__ */ E(l, {
77
+ loading: P,
78
+ error: F,
79
+ onRetry: I,
80
+ hasData: !!N,
81
+ children: [
82
+ /* @__PURE__ */ T(D, { children: /* @__PURE__ */ E("div", {
83
+ className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
81
84
  children: [
82
- /* @__PURE__ */ y("option", {
83
- value: "all",
84
- children: "All Statuses"
85
- }),
86
- /* @__PURE__ */ y("option", {
87
- value: "new",
88
- children: "New"
89
- }),
90
- /* @__PURE__ */ y("option", {
91
- value: "contacted",
92
- children: "Contacted"
93
- }),
94
- /* @__PURE__ */ y("option", {
95
- value: "qualified",
85
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
86
+ className: "text-xs text-text-secondary",
87
+ children: "Total Contacts"
88
+ }), /* @__PURE__ */ T("p", {
89
+ className: "text-2xl font-semibold text-text-primary",
90
+ children: r(W.length)
91
+ })] }),
92
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
93
+ className: "text-xs text-text-secondary",
96
94
  children: "Qualified"
97
- }),
98
- /* @__PURE__ */ y("option", {
99
- value: "converted",
95
+ }), /* @__PURE__ */ T("p", {
96
+ className: "text-2xl font-semibold text-text-primary",
97
+ children: r(Y)
98
+ })] }),
99
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
100
+ className: "text-xs text-text-secondary",
100
101
  children: "Converted"
101
- }),
102
- /* @__PURE__ */ y("option", {
103
- value: "lost",
104
- children: "Lost"
105
- })
102
+ }), /* @__PURE__ */ T("p", {
103
+ className: "text-2xl font-semibold text-text-primary",
104
+ children: r(X)
105
+ })] }),
106
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
107
+ className: "text-xs text-text-secondary",
108
+ children: "Avg Score"
109
+ }), /* @__PURE__ */ T("p", {
110
+ className: "text-2xl font-semibold text-text-primary",
111
+ children: Z
112
+ })] })
106
113
  ]
114
+ }) }),
115
+ /* @__PURE__ */ T(c, {
116
+ searchValue: L,
117
+ onSearchChange: R,
118
+ searchPlaceholder: "Search contacts...",
119
+ filters: /* @__PURE__ */ E("select", {
120
+ value: z,
121
+ onChange: (e) => B(e.target.value),
122
+ className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
123
+ children: [
124
+ /* @__PURE__ */ T("option", {
125
+ value: "all",
126
+ children: "All Statuses"
127
+ }),
128
+ /* @__PURE__ */ T("option", {
129
+ value: "new",
130
+ children: "New"
131
+ }),
132
+ /* @__PURE__ */ T("option", {
133
+ value: "contacted",
134
+ children: "Contacted"
135
+ }),
136
+ /* @__PURE__ */ T("option", {
137
+ value: "qualified",
138
+ children: "Qualified"
139
+ }),
140
+ /* @__PURE__ */ T("option", {
141
+ value: "converted",
142
+ children: "Converted"
143
+ }),
144
+ /* @__PURE__ */ T("option", {
145
+ value: "lost",
146
+ children: "Lost"
147
+ })
148
+ ]
149
+ }),
150
+ actions: /* @__PURE__ */ E("div", {
151
+ className: "flex items-center border border-border-subtle rounded-md",
152
+ children: [/* @__PURE__ */ T("button", {
153
+ onClick: () => H("grid"),
154
+ "aria-label": "Grid view",
155
+ className: t("p-2 rounded-l-md", V === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"),
156
+ children: /* @__PURE__ */ T(y, { className: "h-4 w-4" })
157
+ }), /* @__PURE__ */ T("button", {
158
+ onClick: () => H("table"),
159
+ "aria-label": "Table view",
160
+ className: t("p-2 rounded-r-md", V === "table" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"),
161
+ children: /* @__PURE__ */ T(b, { className: "h-4 w-4" })
162
+ })]
163
+ })
107
164
  }),
108
- actions: /* @__PURE__ */ b("div", {
109
- className: "flex items-center border border-border-subtle rounded-md",
110
- children: [/* @__PURE__ */ y("button", {
111
- onClick: () => A("grid"),
112
- className: n("p-2 rounded-l-md", k === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"),
113
- children: /* @__PURE__ */ y(m, { className: "h-4 w-4" })
114
- }), /* @__PURE__ */ y("button", {
115
- onClick: () => A("table"),
116
- className: n("p-2 rounded-r-md", k === "table" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:text-text-primary"),
117
- children: /* @__PURE__ */ y(h, { className: "h-4 w-4" })
118
- })]
119
- })
120
- }),
121
- M.length === 0 ? /* @__PURE__ */ y(c, {
122
- illustration: j.length === 0 ? "empty-people" : "empty-search",
123
- title: j.length === 0 ? "No contacts yet" : "No contacts match your filters",
124
- description: j.length === 0 ? "Add your first contact to start building your database." : "Try a different search term or status.",
125
- action: j.length === 0 ? /* @__PURE__ */ b("button", {
126
- onClick: () => C("crm/contacts/new"),
127
- 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",
128
- children: [/* @__PURE__ */ y(v, { className: "h-4 w-4" }), "Add Contact"]
129
- }) : void 0
130
- }) : k === "grid" ? /* @__PURE__ */ y("div", {
131
- className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
132
- children: M.map((e) => /* @__PURE__ */ b("div", {
133
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 hover:bg-bg-sunken/50 transition-colors cursor-pointer",
134
- children: [
135
- /* @__PURE__ */ b("div", {
136
- className: "flex items-start gap-3",
137
- children: [/* @__PURE__ */ y("div", {
138
- className: "h-10 w-10 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-semibold text-primary",
139
- children: N(e.firstName, e.lastName)
140
- }), /* @__PURE__ */ b("div", {
141
- className: "flex-1 min-w-0",
142
- children: [/* @__PURE__ */ b("div", {
143
- className: "flex items-center justify-between",
144
- children: [/* @__PURE__ */ b("p", {
145
- className: "text-sm font-medium text-text-primary",
146
- children: [
147
- e.firstName,
148
- " ",
149
- e.lastName
150
- ]
151
- }), /* @__PURE__ */ y(s, { status: e.status })]
152
- }), /* @__PURE__ */ y("p", {
153
- className: "text-xs text-text-secondary mt-0.5",
154
- children: e.title
165
+ G.length === 0 ? /* @__PURE__ */ T(s, {
166
+ illustration: W.length === 0 ? "empty-people" : "empty-search",
167
+ title: W.length === 0 ? "No contacts yet" : "No contacts match your filters",
168
+ description: W.length === 0 ? "Add your first contact to start building your database." : "Try a different search term or status.",
169
+ action: W.length === 0 ? /* @__PURE__ */ E("button", {
170
+ onClick: () => k(A + "/crm/contacts/new"),
171
+ 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",
172
+ children: [/* @__PURE__ */ T(C, { className: "h-4 w-4" }), "Add Contact"]
173
+ }) : void 0
174
+ }) : V === "grid" ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
175
+ className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",
176
+ children: q.map((e) => /* @__PURE__ */ E("div", {
177
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 transition-colors hover:bg-bg-sunken/50",
178
+ children: [
179
+ /* @__PURE__ */ E("div", {
180
+ className: "flex items-start gap-3",
181
+ children: [/* @__PURE__ */ T("div", {
182
+ className: "h-10 w-10 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-semibold text-primary",
183
+ children: J(e.firstName, e.lastName)
184
+ }), /* @__PURE__ */ E("div", {
185
+ className: "flex-1 min-w-0",
186
+ children: [/* @__PURE__ */ E("div", {
187
+ className: "flex items-center justify-between gap-2",
188
+ children: [/* @__PURE__ */ E("p", {
189
+ className: "text-sm font-medium text-text-primary",
190
+ children: [
191
+ e.firstName,
192
+ " ",
193
+ e.lastName
194
+ ]
195
+ }), /* @__PURE__ */ E("div", {
196
+ className: "flex items-center gap-1",
197
+ children: [/* @__PURE__ */ T(o, { status: e.status }), /* @__PURE__ */ T(m, {
198
+ contact: e,
199
+ onChanged: I
200
+ })]
201
+ })]
202
+ }), /* @__PURE__ */ T("p", {
203
+ className: "text-xs text-text-secondary mt-0.5",
204
+ children: e.title
205
+ })]
155
206
  })]
156
- })]
157
- }),
158
- /* @__PURE__ */ b("div", {
159
- className: "mt-3 space-y-1.5",
160
- children: [
161
- /* @__PURE__ */ b("div", {
162
- className: "flex items-center gap-2 text-xs text-text-secondary",
163
- children: [/* @__PURE__ */ y(g, { className: "h-3 w-3" }), /* @__PURE__ */ y("span", {
164
- className: "truncate",
165
- children: e.email
207
+ }),
208
+ /* @__PURE__ */ E("div", {
209
+ className: "mt-3 space-y-1.5",
210
+ children: [
211
+ /* @__PURE__ */ E("div", {
212
+ className: "flex items-center gap-2 text-xs text-text-secondary",
213
+ children: [/* @__PURE__ */ T(x, { className: "h-3 w-3" }), /* @__PURE__ */ T("span", {
214
+ className: "truncate",
215
+ children: e.email
216
+ })]
217
+ }),
218
+ /* @__PURE__ */ E("div", {
219
+ className: "flex items-center gap-2 text-xs text-text-secondary",
220
+ children: [/* @__PURE__ */ T(S, { className: "h-3 w-3" }), /* @__PURE__ */ T("span", { children: e.phone })]
221
+ }),
222
+ /* @__PURE__ */ E("div", {
223
+ className: "flex items-center gap-2 text-xs text-text-secondary",
224
+ children: [/* @__PURE__ */ T(_, { className: "h-3 w-3" }), /* @__PURE__ */ T("span", { children: e.company })]
225
+ })
226
+ ]
227
+ }),
228
+ /* @__PURE__ */ E("div", {
229
+ className: "mt-3 pt-3 border-t border-border-subtle flex items-center justify-between",
230
+ children: [/* @__PURE__ */ E("div", {
231
+ className: "flex items-center gap-1",
232
+ children: [/* @__PURE__ */ T("span", {
233
+ className: "text-xs text-text-secondary",
234
+ children: "Score:"
235
+ }), /* @__PURE__ */ T("span", {
236
+ className: t("text-xs font-semibold", e.score >= 80 ? "text-status-success-text" : e.score >= 50 ? "text-status-warning-text" : "text-status-error-text"),
237
+ children: e.score
166
238
  })]
167
- }),
168
- /* @__PURE__ */ b("div", {
169
- className: "flex items-center gap-2 text-xs text-text-secondary",
170
- children: [/* @__PURE__ */ y(_, { className: "h-3 w-3" }), /* @__PURE__ */ y("span", { children: e.phone })]
171
- }),
172
- /* @__PURE__ */ b("div", {
173
- className: "flex items-center gap-2 text-xs text-text-secondary",
174
- children: [/* @__PURE__ */ y(f, { className: "h-3 w-3" }), /* @__PURE__ */ y("span", { children: e.company })]
175
- })
176
- ]
177
- }),
178
- /* @__PURE__ */ b("div", {
179
- className: "mt-3 pt-3 border-t border-border-subtle flex items-center justify-between",
180
- children: [/* @__PURE__ */ b("div", {
181
- className: "flex items-center gap-1",
182
- children: [/* @__PURE__ */ y("span", {
239
+ }), /* @__PURE__ */ T("div", {
240
+ className: "flex gap-1",
241
+ children: e.tags.slice(0, 2).map((e) => /* @__PURE__ */ T("span", {
242
+ className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
243
+ children: e
244
+ }, e))
245
+ })]
246
+ })
247
+ ]
248
+ }, e.id))
249
+ }), /* @__PURE__ */ T(u, {
250
+ page: U.page,
251
+ pageSize: U.pageSize,
252
+ total: U.total,
253
+ onPageChange: U.setPage,
254
+ onPageSizeChange: U.setPageSize,
255
+ disabled: P,
256
+ hideWhenSinglePage: !0
257
+ })] }) : /* @__PURE__ */ T(a, {
258
+ data: G,
259
+ columns: [
260
+ {
261
+ key: "name",
262
+ header: "Name",
263
+ sortable: !0,
264
+ render: (e) => /* @__PURE__ */ E("div", {
265
+ className: "flex items-center gap-3",
266
+ children: [/* @__PURE__ */ T("div", {
267
+ className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-xs font-semibold text-primary",
268
+ children: J(e.firstName, e.lastName)
269
+ }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("p", {
270
+ className: "font-medium text-text-primary",
271
+ children: [
272
+ e.firstName,
273
+ " ",
274
+ e.lastName
275
+ ]
276
+ }), /* @__PURE__ */ T("p", {
183
277
  className: "text-xs text-text-secondary",
184
- children: "Score:"
185
- }), /* @__PURE__ */ y("span", {
186
- className: n("text-xs font-semibold", e.score >= 80 ? "text-status-success-text" : e.score >= 50 ? "text-status-warning-text" : "text-status-error-text"),
278
+ children: e.title
279
+ })] })]
280
+ })
281
+ },
282
+ {
283
+ key: "email",
284
+ header: "Email",
285
+ sortable: !0,
286
+ render: (e) => /* @__PURE__ */ T("span", {
287
+ className: "text-sm",
288
+ children: e.email
289
+ })
290
+ },
291
+ {
292
+ key: "company",
293
+ header: "Company",
294
+ sortable: !0,
295
+ render: (e) => /* @__PURE__ */ T("span", {
296
+ className: "text-sm",
297
+ children: e.company
298
+ })
299
+ },
300
+ {
301
+ key: "status",
302
+ header: "Status",
303
+ render: (e) => /* @__PURE__ */ T(o, { status: e.status })
304
+ },
305
+ {
306
+ key: "score",
307
+ header: "Score",
308
+ sortable: !0,
309
+ render: (e) => /* @__PURE__ */ E("div", {
310
+ className: "flex items-center gap-2",
311
+ children: [/* @__PURE__ */ T("div", {
312
+ className: "w-12 h-1.5 rounded-full bg-bg-sunken overflow-hidden",
313
+ children: /* @__PURE__ */ T("div", {
314
+ className: t("h-full rounded-full", e.score >= 80 ? "bg-status-success-text" : e.score >= 50 ? "bg-status-warning-text" : "bg-status-error-text"),
315
+ style: { width: `${e.score}%` }
316
+ })
317
+ }), /* @__PURE__ */ T("span", {
318
+ className: "text-xs",
187
319
  children: e.score
188
320
  })]
189
- }), /* @__PURE__ */ y("div", {
190
- className: "flex gap-1",
191
- children: e.tags.slice(0, 2).map((e) => /* @__PURE__ */ y("span", {
192
- className: "rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] text-text-secondary",
193
- children: e
194
- }, e))
195
- })]
196
- })
197
- ]
198
- }, e.id))
199
- }) : /* @__PURE__ */ y(o, {
200
- data: M,
201
- columns: [
202
- {
203
- key: "name",
204
- header: "Name",
205
- sortable: !0,
206
- render: (e) => /* @__PURE__ */ b("div", {
207
- className: "flex items-center gap-3",
208
- children: [/* @__PURE__ */ y("div", {
209
- className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-xs font-semibold text-primary",
210
- children: N(e.firstName, e.lastName)
211
- }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("p", {
212
- className: "font-medium text-text-primary",
213
- children: [
214
- e.firstName,
215
- " ",
216
- e.lastName
217
- ]
218
- }), /* @__PURE__ */ y("p", {
321
+ })
322
+ },
323
+ {
324
+ key: "source",
325
+ header: "Source",
326
+ render: (e) => /* @__PURE__ */ T("span", {
327
+ className: "text-xs text-text-secondary",
328
+ children: e.source
329
+ })
330
+ },
331
+ {
332
+ key: "lastContactedAt",
333
+ header: "Last Contact",
334
+ sortable: !0,
335
+ render: (e) => /* @__PURE__ */ T("span", {
219
336
  className: "text-xs text-text-secondary",
220
- children: e.title
221
- })] })]
222
- })
223
- },
224
- {
225
- key: "email",
226
- header: "Email",
227
- sortable: !0,
228
- render: (e) => /* @__PURE__ */ y("span", {
229
- className: "text-sm",
230
- children: e.email
231
- })
232
- },
233
- {
234
- key: "company",
235
- header: "Company",
236
- sortable: !0,
237
- render: (e) => /* @__PURE__ */ y("span", {
238
- className: "text-sm",
239
- children: e.company
240
- })
241
- },
242
- {
243
- key: "status",
244
- header: "Status",
245
- render: (e) => /* @__PURE__ */ y(s, { status: e.status })
246
- },
247
- {
248
- key: "score",
249
- header: "Score",
250
- sortable: !0,
251
- render: (e) => /* @__PURE__ */ b("div", {
252
- className: "flex items-center gap-2",
253
- children: [/* @__PURE__ */ y("div", {
254
- className: "w-12 h-1.5 rounded-full bg-bg-sunken overflow-hidden",
255
- children: /* @__PURE__ */ y("div", {
256
- className: n("h-full rounded-full", e.score >= 80 ? "bg-status-success-text" : e.score >= 50 ? "bg-status-warning-text" : "bg-status-error-text"),
257
- style: { width: `${e.score}%` }
337
+ children: e.lastContactedAt ? n(e.lastContactedAt, "relative") : "Never"
338
+ })
339
+ },
340
+ {
341
+ key: "actions",
342
+ header: "",
343
+ className: "w-10 text-right",
344
+ render: (e) => /* @__PURE__ */ T("div", {
345
+ className: "flex justify-end",
346
+ children: /* @__PURE__ */ T(m, {
347
+ contact: e,
348
+ onChanged: I
258
349
  })
259
- }), /* @__PURE__ */ y("span", {
260
- className: "text-xs",
261
- children: e.score
262
- })]
263
- })
264
- },
265
- {
266
- key: "source",
267
- header: "Source",
268
- render: (e) => /* @__PURE__ */ y("span", {
269
- className: "text-xs text-text-secondary",
270
- children: e.source
271
- })
272
- },
273
- {
274
- key: "lastContactedAt",
275
- header: "Last Contact",
276
- sortable: !0,
277
- render: (e) => /* @__PURE__ */ y("span", {
278
- className: "text-xs text-text-secondary",
279
- children: e.lastContactedAt ? r(e.lastContactedAt, "relative") : "Never"
280
- })
281
- }
282
- ],
283
- pageSize: 10
284
- })
285
- ]
350
+ })
351
+ }
352
+ ],
353
+ pageSize: 10
354
+ })
355
+ ]
356
+ })]
286
357
  });
287
358
  };
288
359
  //#endregion
289
- export { C as ContactsPage };
360
+ export { N as ContactsPage };
290
361
 
291
362
  //# sourceMappingURL=ContactsPage.js.map