@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,280 +1,352 @@
1
- import { useHeadshotMarketing as e } from "../../context/HeadshotMarketingContext.js";
2
- import { useHeadshotmarketingBootstrapDataQuery as t } from "../../../generated/wspace-operations.js";
3
- import { cn as n, formatCurrency as r, formatDate as i, formatNumber as a } from "../../utils/helpers.js";
4
- import { PageLayout as o } from "../../components/PageLayout.js";
5
- import { StatusBadge as s } from "../../components/StatusBadge.js";
6
- import { EmptyState as c } from "../../components/EmptyState.js";
7
- import { FilterBar as l } from "../../components/FilterBar.js";
1
+ import { useDeleteHeadshotmarketingInfluencerRelationshipMutation as e } from "../../../generated/wspace-operations.js";
2
+ import { cn as t, formatCurrency as n, formatDate as r, formatNumber as i } from "../../utils/helpers.js";
3
+ import { PageLayout as a } from "../../components/PageLayout.js";
4
+ import { StatusBadge as o } from "../../components/StatusBadge.js";
5
+ import { EmptyState as s } from "../../components/EmptyState.js";
6
+ import { FilterBar as c } from "../../components/FilterBar.js";
7
+ import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
8
+ import { Pagination as te } from "../../components/Pagination.js";
9
+ import { ActionMenu as ne } from "../../components/ActionMenu.js";
10
+ import { AddInfluencerRelationshipModal as re, CreateInfluencerCampaignModal as ie, EditInfluencerRelationshipModal as ae, InfluencerDetailsModal as l } from "../../components/InfluencerModals.js";
8
11
  import "../../components/index.js";
9
- import { toInfluencerModel as u, toInfluencerRelationshipModel as d } from "../../utils/influencerMapper.js";
10
- import { useMemo as f, useState as p } from "react";
11
- import { Calendar as m, DollarSign as h, FileText as g, Mail as _, MoreHorizontal as v, Phone as y, TrendingUp as b, UserPlus as x } from "lucide-react";
12
+ import { useHeadshotmarketingBootstrap as u } from "../../hooks/useHeadshotmarketingBootstrap.js";
13
+ import { usePagination as d } from "../../hooks/usePagination.js";
14
+ import { toInfluencerModel as f, toInfluencerRelationshipModel as p } from "../../utils/influencerMapper.js";
15
+ import { useEffect as m, useMemo as h, useState as g } from "react";
16
+ import { Calendar as _, DollarSign as v, Eye as oe, FileText as se, Mail as y, Megaphone as ce, Pencil as le, Phone as b, Trash2 as ue, TrendingUp as de, UserPlus as x } from "lucide-react";
12
17
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
13
- import { EmphasisPanel as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
18
+ import { EmphasisPanel as fe, PagePurpose as w } from "@burdenoff/fe-libs/ui";
14
19
  //#region src/headshotmarketing/pages/influencers/RelationshipsPage.tsx
15
- var E = {
20
+ var T = {
16
21
  nano: "bg-status-info-bg text-status-info-text",
17
22
  micro: "bg-status-success-bg text-status-success-text",
18
23
  macro: "bg-status-warning-bg text-status-warning-text",
19
24
  mega: "bg-status-error-bg text-status-error-text"
20
- }, D = () => {
21
- let { navigate: D } = e(), { data: O } = t({ variables: {
22
- limit: 200,
23
- offset: 0
24
- } }), [k, A] = p(""), [j, M] = p("all"), [N, P] = p(null), F = Object.fromEntries((O?.headshotmarketingInfluencers.items ?? []).map((e) => [e.id, e.name])), I = (O?.headshotmarketingInfluencers.items ?? []).map((e) => u(e)), L = (O?.headshotmarketingInfluencerRelationships.items ?? []).map((e) => d(e, F)), R = f(() => {
25
- let e = [...L];
26
- if (k) {
27
- let t = k.toLowerCase();
25
+ }, E = () => {
26
+ let { data: E, loading: D, error: O, refetch: k } = u(), [A] = e(), [j, M] = g(""), [N, P] = g("all"), [F, I] = g(!1), [L, R] = g(null), [z, B] = g(null), [V, H] = g(null), [U, W] = g(null), { page: pe, pageSize: G, offset: K, total: me, setPage: he, setPageSize: ge, setTotal: q } = d({ initialPageSize: 12 }), J = h(() => Object.fromEntries((E?.headshotmarketingInfluencers.items ?? []).map((e) => [e.id, e.name])), [E?.headshotmarketingInfluencers.items]), Y = h(() => (E?.headshotmarketingInfluencers.items ?? []).map((e) => f(e)), [E?.headshotmarketingInfluencers.items]), X = h(() => (E?.headshotmarketingInfluencerRelationships.items ?? []).map((e) => p(e, J)), [E?.headshotmarketingInfluencerRelationships.items, J]), _e = h(() => X.map((e) => e.influencerId), [X]), Z = h(() => {
27
+ let e = [...X];
28
+ if (j) {
29
+ let t = j.toLowerCase();
28
30
  e = e.filter((e) => e.influencerName.toLowerCase().includes(t));
29
31
  }
30
- return j !== "all" && (e = e.filter((e) => e.status === j)), e;
32
+ return N !== "all" && (e = e.filter((e) => e.status === N)), e;
31
33
  }, [
32
- k,
33
34
  j,
34
- L
35
- ]), z = f(() => {
36
- let e = L.filter((e) => e.status === "active").length, t = L.reduce((e, t) => e + t.totalSpent, 0), n = L.length > 0 ? L.reduce((e, t) => e + t.averageROI, 0) / L.length : 0;
35
+ N,
36
+ X
37
+ ]);
38
+ m(() => {
39
+ q(Z.length);
40
+ }, [Z.length, q]);
41
+ let Q = Z.slice(K, K + G), $ = h(() => {
42
+ let e = X.filter((e) => e.status === "active").length, t = X.reduce((e, t) => e + t.totalSpent, 0), n = X.length > 0 ? X.reduce((e, t) => e + t.averageROI, 0) / X.length : 0;
37
43
  return {
38
- total: L.length,
44
+ total: X.length,
39
45
  active: e,
40
46
  totalSpent: t,
41
47
  avgRoi: n
42
48
  };
43
- }, [L]);
44
- return /* @__PURE__ */ C(o, {
49
+ }, [X]), ve = async (e) => {
50
+ if (window.confirm(`Remove the relationship with ${e.influencerName}? This cannot be undone.`)) {
51
+ W(e.id);
52
+ try {
53
+ await A({ variables: { id: e.id } }), await k();
54
+ } finally {
55
+ W(null);
56
+ }
57
+ }
58
+ };
59
+ return /* @__PURE__ */ C(a, {
45
60
  title: "Influencer Relationships",
46
61
  description: "Manage your influencer partnerships and contacts",
47
62
  actions: /* @__PURE__ */ C("button", {
63
+ onClick: () => I(!0),
48
64
  className: "inline-flex items-center gap-2 rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90",
49
65
  children: [/* @__PURE__ */ S(x, { className: "h-4 w-4" }), "Add Contact"]
50
66
  }),
51
67
  children: [
52
- /* @__PURE__ */ S(T, { children: "Keep your creator relationships warm. Track the status of each partnership — active, pending or inactive — alongside contact details and history, so you always know who to re-engage for your next campaign." }),
53
- /* @__PURE__ */ S(w, { children: /* @__PURE__ */ C("div", {
54
- className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
68
+ /* @__PURE__ */ S(w, { children: "Keep your creator relationships warm. Track the status of each partnership — active, pending or inactive — alongside contact details and history, so you always know who to re-engage for your next campaign." }),
69
+ /* @__PURE__ */ C(ee, {
70
+ loading: D,
71
+ error: O,
72
+ onRetry: k,
73
+ hasData: !!E,
55
74
  children: [
56
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
57
- className: "text-xs text-text-secondary",
58
- children: "Relationships"
59
- }), /* @__PURE__ */ S("p", {
60
- className: "text-2xl font-semibold text-text-primary",
61
- children: a(z.total)
62
- })] }),
63
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
64
- className: "text-xs text-text-secondary",
65
- children: "Active"
66
- }), /* @__PURE__ */ S("p", {
67
- className: "text-2xl font-semibold text-text-primary",
68
- children: a(z.active)
69
- })] }),
70
- /* @__PURE__ */ C("div", {
71
- className: "flex items-start gap-2",
72
- children: [/* @__PURE__ */ S(h, { className: "mt-1 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
73
- className: "text-xs text-text-secondary",
74
- children: "Total Spent"
75
- }), /* @__PURE__ */ S("p", {
76
- className: "text-2xl font-semibold text-text-primary",
77
- children: r(z.totalSpent)
78
- })] })]
79
- }),
80
- /* @__PURE__ */ C("div", {
81
- className: "flex items-start gap-2",
82
- children: [/* @__PURE__ */ S(b, { className: "mt-1 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
83
- className: "text-xs text-text-secondary",
84
- children: "Avg ROI"
85
- }), /* @__PURE__ */ C("p", {
86
- className: "text-2xl font-semibold text-text-primary",
87
- children: [z.avgRoi.toFixed(1), "x"]
88
- })] })]
89
- })
90
- ]
91
- }) }),
92
- /* @__PURE__ */ S(l, {
93
- searchValue: k,
94
- onSearchChange: A,
95
- searchPlaceholder: "Search influencers...",
96
- filters: /* @__PURE__ */ C("select", {
97
- value: j,
98
- onChange: (e) => M(e.target.value),
99
- className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
100
- children: [
101
- /* @__PURE__ */ S("option", {
102
- value: "all",
103
- children: "All Status"
104
- }),
105
- /* @__PURE__ */ S("option", {
106
- value: "active",
107
- children: "Active"
108
- }),
109
- /* @__PURE__ */ S("option", {
110
- value: "pending",
111
- children: "Pending"
112
- }),
113
- /* @__PURE__ */ S("option", {
114
- value: "inactive",
115
- children: "Inactive"
116
- })
117
- ]
118
- })
119
- }),
120
- R.length === 0 && /* @__PURE__ */ S(c, {
121
- illustration: L.length === 0 ? "empty-people" : "empty-search",
122
- title: L.length === 0 ? "No relationships yet" : "No relationships match your filters",
123
- description: L.length === 0 ? "Partnerships you build with creators will appear here." : "Try a different search term or status.",
124
- action: L.length === 0 ? /* @__PURE__ */ C("button", {
125
- 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",
126
- children: [/* @__PURE__ */ S(x, { className: "h-4 w-4" }), "Add Contact"]
127
- }) : void 0
128
- }),
129
- /* @__PURE__ */ S("div", {
130
- className: "grid grid-cols-1 gap-4 md:grid-cols-2",
131
- children: R.map((e) => {
132
- let t = I.find((t) => t.id === e.influencerId);
133
- return /* @__PURE__ */ C("div", {
134
- className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-5 space-y-4 hover:border-foreground/30 transition-colors",
75
+ /* @__PURE__ */ S(fe, { children: /* @__PURE__ */ C("div", {
76
+ className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
135
77
  children: [
78
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
79
+ className: "text-xs text-text-secondary",
80
+ children: "Relationships"
81
+ }), /* @__PURE__ */ S("p", {
82
+ className: "text-2xl font-semibold text-text-primary",
83
+ children: i($.total)
84
+ })] }),
85
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
86
+ className: "text-xs text-text-secondary",
87
+ children: "Active"
88
+ }), /* @__PURE__ */ S("p", {
89
+ className: "text-2xl font-semibold text-text-primary",
90
+ children: i($.active)
91
+ })] }),
136
92
  /* @__PURE__ */ C("div", {
137
- className: "flex items-start justify-between",
138
- children: [/* @__PURE__ */ C("div", {
139
- className: "flex items-start gap-3",
140
- children: [/* @__PURE__ */ S("div", {
141
- className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-sm font-bold text-text-primary",
142
- children: e.influencerName.split(" ").map((e) => e[0]).join("")
143
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
144
- className: "text-sm font-semibold text-text-primary",
145
- children: e.influencerName
146
- }), t && /* @__PURE__ */ C("div", {
147
- className: "flex items-center gap-2 mt-0.5",
148
- children: [/* @__PURE__ */ S("span", {
149
- className: "text-xs text-text-secondary",
150
- children: t.handle
151
- }), /* @__PURE__ */ S("span", {
152
- className: n("rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", E[t.tier]),
153
- children: t.tier
154
- })]
155
- })] })]
156
- }), /* @__PURE__ */ C("div", {
157
- className: "flex items-center gap-2",
158
- children: [/* @__PURE__ */ S(s, { status: e.status }), /* @__PURE__ */ C("div", {
159
- className: "relative",
160
- children: [/* @__PURE__ */ S("button", {
161
- onClick: () => P(N === e.id ? null : e.id),
162
- className: "rounded-md p-1 text-text-secondary hover:text-text-primary hover:bg-bg-sunken",
163
- children: /* @__PURE__ */ S(v, { className: "h-4 w-4" })
164
- }), N === e.id && /* @__PURE__ */ C("div", {
165
- className: "absolute right-0 top-8 z-10 w-40 rounded-md border border-border-seam bg-gloss-card shadow-pop py-1 shadow-lg",
166
- children: [
167
- /* @__PURE__ */ S("button", {
168
- className: "w-full px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
169
- children: "View Profile"
170
- }),
171
- /* @__PURE__ */ S("button", {
172
- className: "w-full px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
173
- children: "Edit Notes"
174
- }),
175
- /* @__PURE__ */ S("button", {
176
- className: "w-full px-4 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken",
177
- children: "Schedule Follow-up"
178
- }),
179
- /* @__PURE__ */ S("button", {
180
- className: "w-full px-4 py-2 text-left text-sm text-status-error-text hover:bg-bg-sunken",
181
- children: "Remove"
182
- })
183
- ]
184
- })]
185
- })]
186
- })]
93
+ className: "flex items-start gap-2",
94
+ children: [/* @__PURE__ */ S(v, { className: "mt-1 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
95
+ className: "text-xs text-text-secondary",
96
+ children: "Total Spent"
97
+ }), /* @__PURE__ */ S("p", {
98
+ className: "text-2xl font-semibold text-text-primary",
99
+ children: n($.totalSpent)
100
+ })] })]
187
101
  }),
188
102
  /* @__PURE__ */ C("div", {
189
- className: "grid grid-cols-3 gap-3 text-center",
103
+ className: "flex items-start gap-2",
104
+ children: [/* @__PURE__ */ S(de, { className: "mt-1 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
105
+ className: "text-xs text-text-secondary",
106
+ children: "Avg ROI"
107
+ }), /* @__PURE__ */ C("p", {
108
+ className: "text-2xl font-semibold text-text-primary",
109
+ children: [$.avgRoi.toFixed(1), "x"]
110
+ })] })]
111
+ })
112
+ ]
113
+ }) }),
114
+ /* @__PURE__ */ S(c, {
115
+ searchValue: j,
116
+ onSearchChange: M,
117
+ searchPlaceholder: "Search influencers...",
118
+ filters: /* @__PURE__ */ C("select", {
119
+ value: N,
120
+ onChange: (e) => P(e.target.value),
121
+ className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
122
+ children: [
123
+ /* @__PURE__ */ S("option", {
124
+ value: "all",
125
+ children: "All Status"
126
+ }),
127
+ /* @__PURE__ */ S("option", {
128
+ value: "active",
129
+ children: "Active"
130
+ }),
131
+ /* @__PURE__ */ S("option", {
132
+ value: "pending",
133
+ children: "Pending"
134
+ }),
135
+ /* @__PURE__ */ S("option", {
136
+ value: "inactive",
137
+ children: "Inactive"
138
+ })
139
+ ]
140
+ })
141
+ }),
142
+ Z.length === 0 && /* @__PURE__ */ S(s, {
143
+ illustration: X.length === 0 ? "empty-people" : "empty-search",
144
+ title: X.length === 0 ? "No relationships yet" : "No relationships match your filters",
145
+ description: X.length === 0 ? "Partnerships you build with creators will appear here." : "Try a different search term or status.",
146
+ action: X.length === 0 ? /* @__PURE__ */ C("button", {
147
+ onClick: () => I(!0),
148
+ 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",
149
+ children: [/* @__PURE__ */ S(x, { className: "h-4 w-4" }), "Add Contact"]
150
+ }) : void 0
151
+ }),
152
+ /* @__PURE__ */ S("div", {
153
+ className: "grid grid-cols-1 gap-4 md:grid-cols-2",
154
+ children: Q.map((e) => {
155
+ let i = Y.find((t) => t.id === e.influencerId), a = i?.email ?? "", s = i?.phone ?? "";
156
+ return /* @__PURE__ */ C("div", {
157
+ className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-5 space-y-4 hover:border-foreground/30 transition-colors",
190
158
  children: [
191
159
  /* @__PURE__ */ C("div", {
192
- className: "rounded-md bg-bg-sunken/50 py-2",
193
- children: [/* @__PURE__ */ S("p", {
194
- className: "text-sm font-bold text-text-primary",
195
- children: e.campaignsCompleted
196
- }), /* @__PURE__ */ S("p", {
197
- className: "text-[10px] text-text-secondary",
198
- children: "Campaigns"
199
- })]
200
- }),
201
- /* @__PURE__ */ C("div", {
202
- className: "rounded-md bg-bg-sunken/50 py-2",
203
- children: [/* @__PURE__ */ S("p", {
204
- className: "text-sm font-bold text-text-primary",
205
- children: r(e.totalSpent)
206
- }), /* @__PURE__ */ S("p", {
207
- className: "text-[10px] text-text-secondary",
208
- children: "Total Spent"
160
+ className: "flex items-start justify-between",
161
+ children: [/* @__PURE__ */ C("div", {
162
+ className: "flex items-start gap-3",
163
+ children: [/* @__PURE__ */ S("div", {
164
+ className: "flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-sm font-bold text-text-primary",
165
+ children: e.influencerName.split(" ").map((e) => e[0]).join("")
166
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
167
+ className: "text-sm font-semibold text-text-primary",
168
+ children: e.influencerName
169
+ }), i && /* @__PURE__ */ C("div", {
170
+ className: "flex items-center gap-2 mt-0.5",
171
+ children: [/* @__PURE__ */ S("span", {
172
+ className: "text-xs text-text-secondary",
173
+ children: i.handle
174
+ }), /* @__PURE__ */ S("span", {
175
+ className: t("rounded-full px-2 py-0.5 text-[10px] font-medium capitalize", T[i.tier]),
176
+ children: i.tier
177
+ })]
178
+ })] })]
179
+ }), /* @__PURE__ */ C("div", {
180
+ className: "flex items-center gap-2",
181
+ children: [/* @__PURE__ */ S(o, { status: e.status }), /* @__PURE__ */ S(ne, {
182
+ id: `relationship-${e.id}`,
183
+ items: [
184
+ {
185
+ key: "view",
186
+ label: "View Profile",
187
+ icon: /* @__PURE__ */ S(oe, { className: "h-4 w-4" }),
188
+ onClick: () => i && B(i),
189
+ disabled: !i
190
+ },
191
+ {
192
+ key: "edit",
193
+ label: "Edit Notes & Status",
194
+ icon: /* @__PURE__ */ S(le, { className: "h-4 w-4" }),
195
+ onClick: () => R(e)
196
+ },
197
+ {
198
+ key: "remove",
199
+ label: U === e.id ? "Removing…" : "Remove",
200
+ icon: /* @__PURE__ */ S(ue, { className: "h-4 w-4" }),
201
+ danger: !0,
202
+ disabled: U === e.id,
203
+ onClick: () => void ve(e)
204
+ }
205
+ ]
206
+ })]
209
207
  })]
210
208
  }),
211
209
  /* @__PURE__ */ C("div", {
212
- className: "rounded-md bg-bg-sunken/50 py-2",
213
- children: [/* @__PURE__ */ C("p", {
214
- className: "text-sm font-bold text-text-primary",
215
- children: [e.averageROI.toFixed(1), "x"]
216
- }), /* @__PURE__ */ S("p", {
217
- className: "text-[10px] text-text-secondary",
218
- children: "Avg ROI"
219
- })]
220
- })
221
- ]
222
- }),
223
- /* @__PURE__ */ S("p", {
224
- className: "text-xs text-text-secondary italic",
225
- children: e.notes
226
- }),
227
- /* @__PURE__ */ C("div", {
228
- className: "flex items-center gap-4 text-xs text-text-secondary",
229
- children: [
230
- /* @__PURE__ */ C("span", {
231
- className: "flex items-center gap-1",
210
+ className: "grid grid-cols-3 gap-3 text-center",
232
211
  children: [
233
- /* @__PURE__ */ S(m, { className: "h-3 w-3" }),
234
- "Last contact:",
235
- " ",
236
- i(e.lastContactedAt, "relative")
212
+ /* @__PURE__ */ C("div", {
213
+ className: "rounded-md bg-bg-sunken/50 py-2",
214
+ children: [/* @__PURE__ */ S("p", {
215
+ className: "text-sm font-bold text-text-primary",
216
+ children: e.campaignsCompleted
217
+ }), /* @__PURE__ */ S("p", {
218
+ className: "text-[10px] text-text-secondary",
219
+ children: "Campaigns"
220
+ })]
221
+ }),
222
+ /* @__PURE__ */ C("div", {
223
+ className: "rounded-md bg-bg-sunken/50 py-2",
224
+ children: [/* @__PURE__ */ S("p", {
225
+ className: "text-sm font-bold text-text-primary",
226
+ children: n(e.totalSpent)
227
+ }), /* @__PURE__ */ S("p", {
228
+ className: "text-[10px] text-text-secondary",
229
+ children: "Total Spent"
230
+ })]
231
+ }),
232
+ /* @__PURE__ */ C("div", {
233
+ className: "rounded-md bg-bg-sunken/50 py-2",
234
+ children: [/* @__PURE__ */ C("p", {
235
+ className: "text-sm font-bold text-text-primary",
236
+ children: [e.averageROI.toFixed(1), "x"]
237
+ }), /* @__PURE__ */ S("p", {
238
+ className: "text-[10px] text-text-secondary",
239
+ children: "Avg ROI"
240
+ })]
241
+ })
237
242
  ]
238
243
  }),
239
- e.contractUrl && /* @__PURE__ */ C("span", {
240
- className: "flex items-center gap-1",
241
- children: [/* @__PURE__ */ S(g, { className: "h-3 w-3" }), "Contract"]
244
+ e.notes && /* @__PURE__ */ S("p", {
245
+ className: "text-xs text-text-secondary italic",
246
+ children: e.notes
242
247
  }),
243
- e.nextFollowUp && /* @__PURE__ */ C("span", {
244
- className: "flex items-center gap-1 text-status-info-text",
248
+ /* @__PURE__ */ C("div", {
249
+ className: "flex flex-wrap items-center gap-4 text-xs text-text-secondary",
245
250
  children: [
246
- /* @__PURE__ */ S(m, { className: "h-3 w-3" }),
247
- "Follow-up: ",
248
- i(e.nextFollowUp)
251
+ /* @__PURE__ */ C("span", {
252
+ className: "flex items-center gap-1",
253
+ children: [
254
+ /* @__PURE__ */ S(_, { className: "h-3 w-3" }),
255
+ "Last contact:",
256
+ " ",
257
+ r(e.lastContactedAt, "relative")
258
+ ]
259
+ }),
260
+ e.contractUrl && /* @__PURE__ */ C("span", {
261
+ className: "flex items-center gap-1",
262
+ children: [/* @__PURE__ */ S(se, { className: "h-3 w-3" }), "Contract"]
263
+ }),
264
+ e.nextFollowUp && /* @__PURE__ */ C("span", {
265
+ className: "flex items-center gap-1 text-status-info-text",
266
+ children: [
267
+ /* @__PURE__ */ S(_, { className: "h-3 w-3" }),
268
+ "Follow-up: ",
269
+ r(e.nextFollowUp)
270
+ ]
271
+ })
249
272
  ]
250
- })
251
- ]
252
- }),
253
- /* @__PURE__ */ C("div", {
254
- className: "flex items-center gap-2 pt-2 border-t border-border-subtle",
255
- children: [
256
- /* @__PURE__ */ C("button", {
257
- className: "flex-1 inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken",
258
- children: [/* @__PURE__ */ S(_, { className: "h-3 w-3" }), "Email"]
259
- }),
260
- /* @__PURE__ */ C("button", {
261
- className: "flex-1 inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken",
262
- children: [/* @__PURE__ */ S(y, { className: "h-3 w-3" }), "Call"]
263
273
  }),
264
- /* @__PURE__ */ S("button", {
265
- className: "flex-1 inline-flex items-center justify-center gap-1.5 rounded-md bg-foreground py-2 text-xs font-medium text-background hover:bg-foreground/90",
266
- children: "New Campaign"
274
+ /* @__PURE__ */ C("div", {
275
+ className: "flex flex-wrap items-center gap-2 pt-2 border-t border-border-subtle",
276
+ children: [
277
+ a ? /* @__PURE__ */ C("a", {
278
+ href: `mailto:${a}`,
279
+ className: "flex-1 min-w-[5rem] inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken",
280
+ children: [/* @__PURE__ */ S(y, { className: "h-3 w-3" }), "Email"]
281
+ }) : /* @__PURE__ */ C("button", {
282
+ type: "button",
283
+ disabled: !0,
284
+ title: "No email on file for this influencer",
285
+ className: "flex-1 min-w-[5rem] inline-flex cursor-not-allowed items-center justify-center gap-1.5 rounded-md border border-border-subtle py-2 text-xs font-medium text-text-secondary/50",
286
+ children: [/* @__PURE__ */ S(y, { className: "h-3 w-3" }), "Email"]
287
+ }),
288
+ s ? /* @__PURE__ */ C("a", {
289
+ href: `tel:${s}`,
290
+ className: "flex-1 min-w-[5rem] inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken",
291
+ children: [/* @__PURE__ */ S(b, { className: "h-3 w-3" }), "Call"]
292
+ }) : /* @__PURE__ */ C("button", {
293
+ type: "button",
294
+ disabled: !0,
295
+ title: "No phone number on file for this influencer",
296
+ className: "flex-1 min-w-[5rem] inline-flex cursor-not-allowed items-center justify-center gap-1.5 rounded-md border border-border-subtle py-2 text-xs font-medium text-text-secondary/50",
297
+ children: [/* @__PURE__ */ S(b, { className: "h-3 w-3" }), "Call"]
298
+ }),
299
+ /* @__PURE__ */ C("button", {
300
+ type: "button",
301
+ onClick: () => H(e.influencerId),
302
+ className: "flex-1 min-w-[5rem] inline-flex items-center justify-center gap-1.5 rounded-md bg-foreground py-2 text-xs font-medium text-background hover:bg-foreground/90",
303
+ children: [/* @__PURE__ */ S(ce, { className: "h-3 w-3" }), "New Campaign"]
304
+ })
305
+ ]
267
306
  })
268
307
  ]
269
- })
270
- ]
271
- }, e.id);
272
- })
308
+ }, e.id);
309
+ })
310
+ }),
311
+ Z.length > 0 && /* @__PURE__ */ S(te, {
312
+ page: pe,
313
+ pageSize: G,
314
+ total: me,
315
+ onPageChange: he,
316
+ onPageSizeChange: ge,
317
+ hideWhenSinglePage: !0
318
+ })
319
+ ]
320
+ }),
321
+ /* @__PURE__ */ S(re, {
322
+ open: F,
323
+ onClose: () => I(!1),
324
+ influencers: Y,
325
+ existingInfluencerIds: _e,
326
+ onCompleted: k
327
+ }),
328
+ /* @__PURE__ */ S(ae, {
329
+ open: !!L,
330
+ onClose: () => R(null),
331
+ relationship: L,
332
+ onCompleted: k
333
+ }),
334
+ /* @__PURE__ */ S(l, {
335
+ open: !!z,
336
+ onClose: () => B(null),
337
+ influencer: z
338
+ }),
339
+ /* @__PURE__ */ S(ie, {
340
+ open: !!V,
341
+ onClose: () => H(null),
342
+ influencers: Y,
343
+ defaultInfluencerId: V ?? void 0,
344
+ onCompleted: k
273
345
  })
274
346
  ]
275
347
  });
276
348
  };
277
349
  //#endregion
278
- export { D as RelationshipsPage };
350
+ export { E as RelationshipsPage };
279
351
 
280
352
  //# sourceMappingURL=RelationshipsPage.js.map