@burdenoff/microfe-headshotmarketing 2026.1030.13 → 2026.1101.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 (69) hide show
  1. package/dist/generated/wspace-operations.d.ts +251 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.js +446 -322
  4. package/dist/generated/wspace-operations.js.map +1 -1
  5. package/dist/generated/wspace-types.d.ts +4370 -34
  6. package/dist/generated/wspace-types.d.ts.map +1 -1
  7. package/dist/generated/wspace-types.js +3 -1
  8. package/dist/generated/wspace-types.js.map +1 -1
  9. package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts +19 -0
  10. package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts.map +1 -0
  11. package/dist/headshotmarketing/components/TrackedLinksPanel.js +246 -0
  12. package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -0
  13. package/dist/headshotmarketing/components/index.d.ts +1 -0
  14. package/dist/headshotmarketing/components/index.d.ts.map +1 -1
  15. package/dist/headshotmarketing/components/index.js +1 -0
  16. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.d.ts.map +1 -1
  17. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +245 -211
  18. package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
  19. package/dist/headshotmarketing/pages/ads/AdCreativesPage.d.ts.map +1 -1
  20. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +86 -76
  21. package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
  22. package/dist/headshotmarketing/pages/analytics/AttributionPage.d.ts.map +1 -1
  23. package/dist/headshotmarketing/pages/analytics/AttributionPage.js +249 -244
  24. package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
  25. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts +4 -0
  26. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts.map +1 -0
  27. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +196 -0
  28. package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -0
  29. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts +12 -0
  30. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts.map +1 -0
  31. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js +30 -0
  32. package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js.map +1 -0
  33. package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
  34. package/dist/headshotmarketing/pages/content/AIToolsPage.js +51 -50
  35. package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
  36. package/dist/headshotmarketing/pages/content/ContentCreationPage.d.ts.map +1 -1
  37. package/dist/headshotmarketing/pages/content/ContentCreationPage.js +409 -408
  38. package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
  39. package/dist/headshotmarketing/pages/content/ContentDetailsPage.d.ts.map +1 -1
  40. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +158 -104
  41. package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
  42. package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts +5 -0
  43. package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts.map +1 -1
  44. package/dist/headshotmarketing/pages/content/ContentItemActions.js +103 -34
  45. package/dist/headshotmarketing/pages/content/ContentItemActions.js.map +1 -1
  46. package/dist/headshotmarketing/pages/content/ContentLibraryCard.d.ts.map +1 -1
  47. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +102 -102
  48. package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
  49. package/dist/headshotmarketing/pages/crm/LeadCreateModal.d.ts.map +1 -1
  50. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +150 -76
  51. package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
  52. package/dist/headshotmarketing/pages/social-media/PostsPage.d.ts.map +1 -1
  53. package/dist/headshotmarketing/pages/social-media/PostsPage.js +254 -246
  54. package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
  55. package/dist/headshotmarketing/types/index.d.ts +17 -0
  56. package/dist/headshotmarketing/types/index.d.ts.map +1 -1
  57. package/dist/headshotmarketing/utils/contentLibrary.d.ts +6 -0
  58. package/dist/headshotmarketing/utils/contentLibrary.d.ts.map +1 -1
  59. package/dist/headshotmarketing/utils/contentLibrary.js +17 -11
  60. package/dist/headshotmarketing/utils/contentLibrary.js.map +1 -1
  61. package/dist/headshotmarketing/utils/contentMapper.d.ts +13 -1
  62. package/dist/headshotmarketing/utils/contentMapper.d.ts.map +1 -1
  63. package/dist/headshotmarketing/utils/contentMapper.js +26 -13
  64. package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
  65. package/dist/headshotmarketing/utils/trackedLinks.d.ts +75 -0
  66. package/dist/headshotmarketing/utils/trackedLinks.d.ts.map +1 -0
  67. package/dist/headshotmarketing/utils/trackedLinks.js +99 -0
  68. package/dist/headshotmarketing/utils/trackedLinks.js.map +1 -0
  69. package/package.json +1 -1
@@ -1,270 +1,271 @@
1
1
  import { useDeleteHeadshotmarketingAdCampaignMutation as e, useUpdateHeadshotmarketingAdCampaignMutation as t } from "../../../generated/wspace-operations.js";
2
- import { useHeadshotMarketing as ee } from "../../context/HeadshotMarketingContext.js";
3
- import { cn as te, formatCurrency as n, formatDate as r, formatNumber as i, formatPercentage as a } from "../../utils/helpers.js";
4
- import { HeadshotmarketingAdCampaignStatus as o } from "../../../generated/wspace-types.js";
5
- import { toAdCampaignModel as s, toAdCampaignStatusEnum as c, toAdCreativeModel as l, toAudienceModel as u } from "../../utils/adsMapper.js";
6
- import { PageLayout as d } from "../../components/PageLayout.js";
7
- import { StatCard as f } from "../../components/StatCard.js";
8
- import { StatusBadge as ne } from "../../components/StatusBadge.js";
9
- import { EmptyState as re } from "../../components/EmptyState.js";
10
- import { Modal as p } from "../../components/Modal.js";
11
- import { QueryStateBoundary as m } from "../../components/QueryStateBoundary.js";
2
+ import { useHeadshotMarketing as n } from "../../context/HeadshotMarketingContext.js";
3
+ import { cn as ee, formatCurrency as r, formatDate as i, formatNumber as a, formatPercentage as o } from "../../utils/helpers.js";
4
+ import { HeadshotmarketingAdCampaignStatus as s } from "../../../generated/wspace-types.js";
5
+ import { toAdCampaignModel as te, toAdCampaignStatusEnum as ne, toAdCreativeModel as c, toAudienceModel as l } from "../../utils/adsMapper.js";
6
+ import { PageLayout as u } from "../../components/PageLayout.js";
7
+ import { StatCard as d } from "../../components/StatCard.js";
8
+ import { StatusBadge as f } from "../../components/StatusBadge.js";
9
+ import { EmptyState as p } from "../../components/EmptyState.js";
10
+ import { Modal as m } from "../../components/Modal.js";
11
+ import { QueryStateBoundary as re } from "../../components/QueryStateBoundary.js";
12
+ import { TrackedLinksPanel as h } from "../../components/TrackedLinksPanel.js";
12
13
  import "../../components/index.js";
13
14
  import { useHeadshotmarketingBootstrap as ie } from "../../hooks/useHeadshotmarketingBootstrap.js";
14
15
  import { AdPlatformSyncPanel as ae } from "./AdPlatformSyncPanel.js";
15
- import { useMemo as h, useState as g } from "react";
16
- import { ArrowLeft as _, Calendar as oe, DollarSign as v, Eye as y, MousePointerClick as se, Pause as ce, Pencil as b, Play as x, Target as S, Trash2 as C, TrendingUp as w } from "lucide-react";
17
- import { useParams as T } from "react-router";
18
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
19
- import { EmphasisPanel as le, PagePurpose as ue } from "@burdenoff/fe-libs/ui";
16
+ import { useMemo as g, useState as _ } from "react";
17
+ import { ArrowLeft as v, Calendar as oe, DollarSign as y, Eye as b, Link2 as se, MousePointerClick as ce, Pause as le, Pencil as x, Play as S, Target as C, Trash2 as ue, TrendingUp as de } from "lucide-react";
18
+ import { useParams as fe } from "react-router";
19
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
20
+ import { EmphasisPanel as pe, PagePurpose as me } from "@burdenoff/fe-libs/ui";
20
21
  //#region src/headshotmarketing/pages/ads/AdCampaignDetailsPage.tsx
21
- var k = {
22
+ var D = {
22
23
  google_ads: "Google Ads",
23
24
  facebook: "Facebook",
24
25
  instagram: "Instagram",
25
26
  linkedin: "LinkedIn",
26
27
  twitter: "Twitter"
27
28
  };
28
- function A(e) {
29
+ function O(e) {
29
30
  if (!e) return "";
30
31
  let t = new Date(e);
31
32
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
32
33
  }
33
- var j = () => {
34
- let { navigate: j, basePath: M } = ee(), { adCampaignId: N } = T(), { data: P, loading: F, error: I, refetch: L } = ie(), [R, z] = g(null), [B, V] = g(!1), [H, U] = g(null), [W, { loading: G }] = t(), [de, { loading: K }] = e(), q = h(() => (P?.headshotmarketingAdCampaigns.items ?? []).find((e) => e.id === N) ?? null, [P?.headshotmarketingAdCampaigns.items, N]), J = q ? s(q) : null, Y = h(() => N ? (P?.headshotmarketingAdCreatives.items ?? []).filter((e) => e.adCampaignId === N).map((e) => l(e)) : [], [P?.headshotmarketingAdCreatives.items, N]), X = h(() => {
34
+ var k = () => {
35
+ let { navigate: k, basePath: A } = n(), { adCampaignId: j } = fe(), { data: M, loading: N, error: P, refetch: F } = ie(), [I, L] = _(null), [R, z] = _(!1), [B, V] = _(null), [H, U] = _(null), [W, { loading: G }] = t(), [he, { loading: K }] = e(), q = g(() => (M?.headshotmarketingAdCampaigns.items ?? []).find((e) => e.id === j) ?? null, [M?.headshotmarketingAdCampaigns.items, j]), J = q ? te(q) : null, Y = g(() => j ? (M?.headshotmarketingAdCreatives.items ?? []).filter((e) => e.adCampaignId === j).map((e) => c(e)) : [], [M?.headshotmarketingAdCreatives.items, j]), X = g(() => {
35
36
  if (!J) return [];
36
37
  let e = new Set(J.audiences);
37
- return (P?.headshotmarketingAudiences.items ?? []).filter((t) => e.has(t.id)).map((e) => u(e));
38
- }, [P?.headshotmarketingAudiences.items, J]), Z = () => j(M + "/ads/campaigns"), fe = async () => {
39
- if (!(!N || !J)) {
40
- U(null);
38
+ return (M?.headshotmarketingAudiences.items ?? []).filter((t) => e.has(t.id)).map((e) => l(e));
39
+ }, [M?.headshotmarketingAudiences.items, J]), Z = () => k(A + "/ads/campaigns"), ge = async () => {
40
+ if (!(!j || !J)) {
41
+ V(null);
41
42
  try {
42
43
  await W({ variables: {
43
- id: N,
44
- input: { status: J.status === "active" ? o.Paused : o.Active }
45
- } }), await L();
44
+ id: j,
45
+ input: { status: J.status === "active" ? s.Paused : s.Active }
46
+ } }), await F();
46
47
  } catch (e) {
47
- U(e instanceof Error ? e.message : "Failed to update campaign.");
48
+ V(e instanceof Error ? e.message : "Failed to update campaign.");
48
49
  }
49
50
  }
50
- }, pe = async () => {
51
- if (!N || !R) return;
52
- if (!R.name.trim()) {
53
- U("Campaign name is required.");
51
+ }, _e = async () => {
52
+ if (!j || !I) return;
53
+ if (!I.name.trim()) {
54
+ V("Campaign name is required.");
54
55
  return;
55
56
  }
56
- U(null);
57
- let e = Number(R.totalBudget);
57
+ V(null);
58
+ let e = Number(I.totalBudget);
58
59
  try {
59
60
  await W({ variables: {
60
- id: N,
61
+ id: j,
61
62
  input: {
62
- name: R.name.trim(),
63
- status: c(R.status),
64
- bidStrategy: R.bidStrategy || null,
65
- totalBudget: R.totalBudget && Number.isFinite(e) ? e : null,
66
- startDate: R.startDate ? new Date(R.startDate).toISOString() : null,
67
- endDate: R.endDate ? new Date(R.endDate).toISOString() : null
63
+ name: I.name.trim(),
64
+ status: ne(I.status),
65
+ bidStrategy: I.bidStrategy || null,
66
+ totalBudget: I.totalBudget && Number.isFinite(e) ? e : null,
67
+ startDate: I.startDate ? new Date(I.startDate).toISOString() : null,
68
+ endDate: I.endDate ? new Date(I.endDate).toISOString() : null
68
69
  }
69
- } }), z(null), await L();
70
+ } }), L(null), await F();
70
71
  } catch (e) {
71
- U(e instanceof Error ? e.message : "Failed to save campaign.");
72
+ V(e instanceof Error ? e.message : "Failed to save campaign.");
72
73
  }
73
- }, me = async () => {
74
- if (N) {
75
- U(null);
74
+ }, ve = async () => {
75
+ if (j) {
76
+ V(null);
76
77
  try {
77
- await de({ variables: { id: N } }), V(!1), await L(), Z();
78
+ await he({ variables: { id: j } }), z(!1), await F(), Z();
78
79
  } catch (e) {
79
- U(e instanceof Error ? e.message : "Failed to delete campaign.");
80
+ V(e instanceof Error ? e.message : "Failed to delete campaign.");
80
81
  }
81
82
  }
82
- }, he = () => {
83
- J && (U(null), z({
83
+ }, ye = () => {
84
+ J && (V(null), L({
84
85
  name: J.name,
85
86
  status: J.status,
86
87
  totalBudget: J.budget.total > 0 ? String(J.budget.total) : "",
87
88
  bidStrategy: J.bidStrategy,
88
- startDate: A(J.startDate),
89
- endDate: A(J.endDate)
89
+ startDate: O(J.startDate),
90
+ endDate: O(J.endDate)
90
91
  }));
91
92
  };
92
- if (!J) return /* @__PURE__ */ D(d, {
93
+ if (!J) return /* @__PURE__ */ T(u, {
93
94
  title: "Ad Campaign",
94
- children: /* @__PURE__ */ D(m, {
95
- loading: F,
96
- error: I,
97
- onRetry: L,
98
- hasData: !!P,
99
- children: /* @__PURE__ */ D(re, {
95
+ children: /* @__PURE__ */ T(re, {
96
+ loading: N,
97
+ error: P,
98
+ onRetry: F,
99
+ hasData: !!M,
100
+ children: /* @__PURE__ */ T(p, {
100
101
  illustration: "empty-generic",
101
102
  title: "Campaign not found",
102
103
  description: "This ad campaign doesn't exist or has been removed.",
103
- action: /* @__PURE__ */ O("button", {
104
+ action: /* @__PURE__ */ E("button", {
104
105
  onClick: Z,
105
106
  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",
106
- children: [/* @__PURE__ */ D(_, { className: "h-4 w-4" }), "Back to Campaigns"]
107
+ children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Back to Campaigns"]
107
108
  })
108
109
  })
109
110
  })
110
111
  });
111
- let Q = J.budget.total > 0 ? Math.round(J.budget.spent / J.budget.total * 100) : 0, ge = J.status === "active", $ = G || K;
112
- return /* @__PURE__ */ O(d, {
112
+ let Q = J.budget.total > 0 ? Math.round(J.budget.spent / J.budget.total * 100) : 0, be = J.status === "active", $ = G || K;
113
+ return /* @__PURE__ */ E(u, {
113
114
  title: J.name,
114
- description: `${k[J.platform] ?? J.platform} · ${J.bidStrategy}`,
115
- actions: /* @__PURE__ */ O("div", {
115
+ description: `${D[J.platform] ?? J.platform} · ${J.bidStrategy}`,
116
+ actions: /* @__PURE__ */ E("div", {
116
117
  className: "flex flex-wrap items-center gap-2",
117
118
  children: [
118
- /* @__PURE__ */ D(ne, { status: J.status }),
119
- /* @__PURE__ */ O("button", {
119
+ /* @__PURE__ */ T(f, { status: J.status }),
120
+ /* @__PURE__ */ E("button", {
120
121
  onClick: Z,
121
122
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
122
- children: [/* @__PURE__ */ D(_, { className: "h-4 w-4" }), "Back"]
123
+ children: [/* @__PURE__ */ T(v, { className: "h-4 w-4" }), "Back"]
123
124
  }),
124
- /* @__PURE__ */ D("button", {
125
- onClick: () => void fe(),
125
+ /* @__PURE__ */ T("button", {
126
+ onClick: () => void ge(),
126
127
  disabled: $,
127
128
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-60",
128
- children: ge ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(ce, { className: "h-4 w-4" }), "Pause"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(x, { className: "h-4 w-4" }), "Activate"] })
129
+ children: be ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(le, { className: "h-4 w-4" }), "Pause"] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(S, { className: "h-4 w-4" }), "Activate"] })
129
130
  }),
130
- /* @__PURE__ */ O("button", {
131
- onClick: he,
131
+ /* @__PURE__ */ E("button", {
132
+ onClick: ye,
132
133
  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",
133
- children: [/* @__PURE__ */ D(b, { className: "h-4 w-4" }), "Edit"]
134
+ children: [/* @__PURE__ */ T(x, { className: "h-4 w-4" }), "Edit"]
134
135
  }),
135
- /* @__PURE__ */ O("button", {
136
- onClick: () => V(!0),
136
+ /* @__PURE__ */ E("button", {
137
+ onClick: () => z(!0),
137
138
  disabled: $,
138
139
  className: "inline-flex items-center gap-2 rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm font-medium text-status-error-text hover:bg-bg-sunken disabled:opacity-60",
139
- children: [/* @__PURE__ */ D(C, { className: "h-4 w-4" }), "Delete"]
140
+ children: [/* @__PURE__ */ T(ue, { className: "h-4 w-4" }), "Delete"]
140
141
  })
141
142
  ]
142
143
  }),
143
144
  children: [
144
- /* @__PURE__ */ D(ue, { children: "Manage this ad campaign — review budget pacing and performance, adjust its schedule and bid strategy, pause or activate it, and see the creatives and audience it's running against." }),
145
- H && /* @__PURE__ */ D("div", {
145
+ /* @__PURE__ */ T(me, { children: "Manage this ad campaign — review budget pacing and performance, adjust its schedule and bid strategy, pause or activate it, and see the creatives and audience it's running against." }),
146
+ B && /* @__PURE__ */ T("div", {
146
147
  role: "alert",
147
148
  className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
148
- children: H
149
+ children: B
149
150
  }),
150
- /* @__PURE__ */ D(le, { children: /* @__PURE__ */ O("div", {
151
+ /* @__PURE__ */ T(pe, { children: /* @__PURE__ */ E("div", {
151
152
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
152
153
  children: [
153
- /* @__PURE__ */ D(f, {
154
+ /* @__PURE__ */ T(d, {
154
155
  title: "Spend",
155
- value: n(J.metrics.spend),
156
- icon: /* @__PURE__ */ D(v, { className: "h-5 w-5" })
156
+ value: r(J.metrics.spend),
157
+ icon: /* @__PURE__ */ T(y, { className: "h-5 w-5" })
157
158
  }),
158
- /* @__PURE__ */ D(f, {
159
+ /* @__PURE__ */ T(d, {
159
160
  title: "Impressions",
160
- value: i(J.metrics.impressions),
161
- icon: /* @__PURE__ */ D(y, { className: "h-5 w-5" })
161
+ value: a(J.metrics.impressions),
162
+ icon: /* @__PURE__ */ T(b, { className: "h-5 w-5" })
162
163
  }),
163
- /* @__PURE__ */ D(f, {
164
+ /* @__PURE__ */ T(d, {
164
165
  title: "Clicks",
165
- value: i(J.metrics.clicks),
166
- icon: /* @__PURE__ */ D(se, { className: "h-5 w-5" })
166
+ value: a(J.metrics.clicks),
167
+ icon: /* @__PURE__ */ T(ce, { className: "h-5 w-5" })
167
168
  }),
168
- /* @__PURE__ */ D(f, {
169
+ /* @__PURE__ */ T(d, {
169
170
  title: "ROAS",
170
171
  value: `${J.metrics.roas.toFixed(1)}x`,
171
- icon: /* @__PURE__ */ D(w, { className: "h-5 w-5" })
172
+ icon: /* @__PURE__ */ T(de, { className: "h-5 w-5" })
172
173
  })
173
174
  ]
174
175
  }) }),
175
- /* @__PURE__ */ O("div", {
176
+ /* @__PURE__ */ E("div", {
176
177
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
177
- children: [/* @__PURE__ */ O("div", {
178
+ children: [/* @__PURE__ */ E("div", {
178
179
  className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
179
180
  children: [
180
- /* @__PURE__ */ O("h4", {
181
+ /* @__PURE__ */ E("h4", {
181
182
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
182
- children: [/* @__PURE__ */ D(v, { className: "h-4 w-4 text-text-secondary" }), "Budget"]
183
+ children: [/* @__PURE__ */ T(y, { className: "h-4 w-4 text-text-secondary" }), "Budget"]
183
184
  }),
184
- /* @__PURE__ */ O("div", {
185
+ /* @__PURE__ */ E("div", {
185
186
  className: "mb-1.5 flex items-center justify-between text-xs text-text-secondary",
186
187
  children: [
187
- /* @__PURE__ */ O("span", { children: [n(J.budget.spent), " spent"] }),
188
- /* @__PURE__ */ O("span", { children: [Q, "%"] }),
189
- /* @__PURE__ */ O("span", { children: [n(J.budget.total), " total"] })
188
+ /* @__PURE__ */ E("span", { children: [r(J.budget.spent), " spent"] }),
189
+ /* @__PURE__ */ E("span", { children: [Q, "%"] }),
190
+ /* @__PURE__ */ E("span", { children: [r(J.budget.total), " total"] })
190
191
  ]
191
192
  }),
192
- /* @__PURE__ */ D("div", {
193
+ /* @__PURE__ */ T("div", {
193
194
  className: "h-2.5 w-full rounded-full bg-bg-sunken",
194
- children: /* @__PURE__ */ D("div", {
195
- className: te("h-2.5 rounded-full transition-all", Q >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
195
+ children: /* @__PURE__ */ T("div", {
196
+ className: ee("h-2.5 rounded-full transition-all", Q >= 90 ? "bg-status-error-bg" : "bg-action-primary-bg"),
196
197
  style: { width: `${Math.min(Q, 100)}%` }
197
198
  })
198
199
  }),
199
- /* @__PURE__ */ O("p", {
200
+ /* @__PURE__ */ E("p", {
200
201
  className: "mt-3 text-xs text-text-secondary",
201
- children: ["Remaining: ", n(J.budget.remaining)]
202
+ children: ["Remaining: ", r(J.budget.remaining)]
202
203
  })
203
204
  ]
204
- }), /* @__PURE__ */ O("div", {
205
+ }), /* @__PURE__ */ E("div", {
205
206
  className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
206
- children: [/* @__PURE__ */ O("h4", {
207
+ children: [/* @__PURE__ */ E("h4", {
207
208
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
208
- children: [/* @__PURE__ */ D(oe, { className: "h-4 w-4 text-text-secondary" }), "Schedule & settings"]
209
- }), /* @__PURE__ */ O("dl", {
209
+ children: [/* @__PURE__ */ T(oe, { className: "h-4 w-4 text-text-secondary" }), "Schedule & settings"]
210
+ }), /* @__PURE__ */ E("dl", {
210
211
  className: "space-y-2 text-sm",
211
212
  children: [
212
- /* @__PURE__ */ O("div", {
213
+ /* @__PURE__ */ E("div", {
213
214
  className: "flex items-center justify-between gap-4",
214
- children: [/* @__PURE__ */ D("dt", {
215
+ children: [/* @__PURE__ */ T("dt", {
215
216
  className: "text-text-secondary",
216
217
  children: "Platform"
217
- }), /* @__PURE__ */ D("dd", {
218
+ }), /* @__PURE__ */ T("dd", {
218
219
  className: "font-medium text-text-primary",
219
- children: k[J.platform] ?? J.platform
220
+ children: D[J.platform] ?? J.platform
220
221
  })]
221
222
  }),
222
- /* @__PURE__ */ O("div", {
223
+ /* @__PURE__ */ E("div", {
223
224
  className: "flex items-center justify-between gap-4",
224
- children: [/* @__PURE__ */ D("dt", {
225
+ children: [/* @__PURE__ */ T("dt", {
225
226
  className: "text-text-secondary",
226
227
  children: "Bid strategy"
227
- }), /* @__PURE__ */ D("dd", {
228
+ }), /* @__PURE__ */ T("dd", {
228
229
  className: "font-medium text-text-primary",
229
230
  children: J.bidStrategy
230
231
  })]
231
232
  }),
232
- /* @__PURE__ */ O("div", {
233
+ /* @__PURE__ */ E("div", {
233
234
  className: "flex items-center justify-between gap-4",
234
- children: [/* @__PURE__ */ D("dt", {
235
+ children: [/* @__PURE__ */ T("dt", {
235
236
  className: "text-text-secondary",
236
237
  children: "Start"
237
- }), /* @__PURE__ */ D("dd", {
238
+ }), /* @__PURE__ */ T("dd", {
238
239
  className: "font-medium text-text-primary",
239
- children: r(J.startDate)
240
+ children: i(J.startDate)
240
241
  })]
241
242
  }),
242
- /* @__PURE__ */ O("div", {
243
+ /* @__PURE__ */ E("div", {
243
244
  className: "flex items-center justify-between gap-4",
244
- children: [/* @__PURE__ */ D("dt", {
245
+ children: [/* @__PURE__ */ T("dt", {
245
246
  className: "text-text-secondary",
246
247
  children: "End"
247
- }), /* @__PURE__ */ D("dd", {
248
+ }), /* @__PURE__ */ T("dd", {
248
249
  className: "font-medium text-text-primary",
249
- children: r(J.endDate)
250
+ children: i(J.endDate)
250
251
  })]
251
252
  }),
252
- /* @__PURE__ */ O("div", {
253
+ /* @__PURE__ */ E("div", {
253
254
  className: "flex items-center justify-between gap-4",
254
- children: [/* @__PURE__ */ D("dt", {
255
+ children: [/* @__PURE__ */ T("dt", {
255
256
  className: "text-text-secondary",
256
257
  children: "CTR"
257
- }), /* @__PURE__ */ D("dd", {
258
+ }), /* @__PURE__ */ T("dd", {
258
259
  className: "font-medium text-text-primary",
259
- children: a(J.metrics.ctr)
260
+ children: o(J.metrics.ctr)
260
261
  })]
261
262
  }),
262
- /* @__PURE__ */ O("div", {
263
+ /* @__PURE__ */ E("div", {
263
264
  className: "flex items-center justify-between gap-4",
264
- children: [/* @__PURE__ */ D("dt", {
265
+ children: [/* @__PURE__ */ T("dt", {
265
266
  className: "text-text-secondary",
266
267
  children: "CPC"
267
- }), /* @__PURE__ */ O("dd", {
268
+ }), /* @__PURE__ */ E("dd", {
268
269
  className: "font-medium text-text-primary",
269
270
  children: ["$", J.metrics.cpc.toFixed(2)]
270
271
  })]
@@ -273,193 +274,211 @@ var j = () => {
273
274
  })]
274
275
  })]
275
276
  }),
276
- N && /* @__PURE__ */ D(ae, {
277
- adCampaignId: N,
278
- onSynced: L
277
+ j && /* @__PURE__ */ T(ae, {
278
+ adCampaignId: j,
279
+ onSynced: F
279
280
  }),
280
- /* @__PURE__ */ O("div", {
281
+ j && /* @__PURE__ */ T(h, {
282
+ sourceType: "AD_CAMPAIGN",
283
+ sourceId: j,
284
+ allowCreate: !0,
285
+ title: "Tracked links",
286
+ description: "Create a tracked URL for this campaign's landing page and paste it as the ad destination. Clicks are counted here and attributed as AD_CLICK touchpoints.",
287
+ emptyMessage: "No tracked links for this campaign yet. Enter the landing page URL above to create one."
288
+ }),
289
+ /* @__PURE__ */ E("div", {
281
290
  className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
282
- children: [/* @__PURE__ */ O("h4", {
291
+ children: [/* @__PURE__ */ E("h4", {
283
292
  className: "mb-4 text-sm font-semibold text-text-primary",
284
293
  children: [
285
294
  "Creatives (",
286
295
  Y.length,
287
296
  ")"
288
297
  ]
289
- }), Y.length > 0 ? /* @__PURE__ */ D("div", {
298
+ }), Y.length > 0 ? /* @__PURE__ */ T("div", {
290
299
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
291
- children: Y.map((e) => /* @__PURE__ */ O("div", {
300
+ children: Y.map((e) => /* @__PURE__ */ E("div", {
292
301
  className: "rounded-md border border-border-subtle p-3",
293
302
  children: [
294
- /* @__PURE__ */ O("div", {
303
+ /* @__PURE__ */ E("div", {
295
304
  className: "mb-1 flex items-center justify-between gap-2",
296
- children: [/* @__PURE__ */ D("p", {
305
+ children: [/* @__PURE__ */ T("p", {
297
306
  className: "truncate text-sm font-medium text-text-primary",
298
307
  children: e.name
299
- }), /* @__PURE__ */ D("span", {
308
+ }), /* @__PURE__ */ T("span", {
300
309
  className: "shrink-0 rounded-full bg-bg-sunken px-2 py-0.5 text-[10px] font-medium capitalize text-text-secondary",
301
310
  children: e.type
302
311
  })]
303
312
  }),
304
- e.headline && /* @__PURE__ */ D("p", {
313
+ e.headline && /* @__PURE__ */ T("p", {
305
314
  className: "text-xs text-text-secondary",
306
315
  children: e.headline
307
316
  }),
308
- /* @__PURE__ */ O("div", {
317
+ /* @__PURE__ */ E("div", {
309
318
  className: "mt-2 flex flex-wrap gap-3 text-[11px] text-text-secondary",
310
319
  children: [
311
- /* @__PURE__ */ O("span", { children: [i(e.performance.impressions), " impr."] }),
312
- /* @__PURE__ */ O("span", { children: [i(e.performance.clicks), " clicks"] }),
313
- /* @__PURE__ */ O("span", { children: [a(e.performance.ctr), " CTR"] })
320
+ /* @__PURE__ */ E("span", { children: [a(e.performance.impressions), " impr."] }),
321
+ /* @__PURE__ */ E("span", { children: [a(e.performance.clicks), " clicks"] }),
322
+ /* @__PURE__ */ E("span", { children: [o(e.performance.ctr), " CTR"] })
314
323
  ]
324
+ }),
325
+ /* @__PURE__ */ E("button", {
326
+ type: "button",
327
+ onClick: () => U({
328
+ id: e.id,
329
+ name: e.name,
330
+ landingPageUrl: e.landingPageUrl
331
+ }),
332
+ className: "mt-2 inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-2 py-1 text-[11px] font-medium text-text-primary hover:bg-bg-sunken",
333
+ children: [/* @__PURE__ */ T(se, { className: "h-3 w-3" }), "Tracked link"]
315
334
  })
316
335
  ]
317
336
  }, e.id))
318
- }) : /* @__PURE__ */ D("p", {
337
+ }) : /* @__PURE__ */ T("p", {
319
338
  className: "py-4 text-center text-sm text-text-secondary",
320
339
  children: "No creatives attached to this campaign yet."
321
340
  })]
322
341
  }),
323
- /* @__PURE__ */ O("div", {
342
+ /* @__PURE__ */ E("div", {
324
343
  className: "rounded-lg border border-border-seam bg-gloss-card p-5 shadow-pop",
325
- children: [/* @__PURE__ */ O("h4", {
344
+ children: [/* @__PURE__ */ E("h4", {
326
345
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
327
346
  children: [
328
- /* @__PURE__ */ D(S, { className: "h-4 w-4 text-text-secondary" }),
347
+ /* @__PURE__ */ T(C, { className: "h-4 w-4 text-text-secondary" }),
329
348
  "Audience (",
330
349
  X.length,
331
350
  ")"
332
351
  ]
333
- }), X.length > 0 ? /* @__PURE__ */ D("div", {
352
+ }), X.length > 0 ? /* @__PURE__ */ T("div", {
334
353
  className: "space-y-3",
335
- children: X.map((e) => /* @__PURE__ */ O("div", {
354
+ children: X.map((e) => /* @__PURE__ */ E("div", {
336
355
  className: "rounded-md border border-border-subtle p-3",
337
- children: [/* @__PURE__ */ O("div", {
356
+ children: [/* @__PURE__ */ E("div", {
338
357
  className: "flex items-center justify-between gap-2",
339
- children: [/* @__PURE__ */ D("p", {
358
+ children: [/* @__PURE__ */ T("p", {
340
359
  className: "text-sm font-medium text-text-primary",
341
360
  children: e.name
342
- }), /* @__PURE__ */ O("span", {
361
+ }), /* @__PURE__ */ E("span", {
343
362
  className: "text-xs text-text-secondary",
344
- children: [i(e.size), " people"]
363
+ children: [a(e.size), " people"]
345
364
  })]
346
- }), e.description && /* @__PURE__ */ D("p", {
365
+ }), e.description && /* @__PURE__ */ T("p", {
347
366
  className: "mt-1 text-xs text-text-secondary",
348
367
  children: e.description
349
368
  })]
350
369
  }, e.id))
351
- }) : /* @__PURE__ */ D("p", {
370
+ }) : /* @__PURE__ */ T("p", {
352
371
  className: "py-4 text-center text-sm text-text-secondary",
353
372
  children: "No audience is linked to this campaign."
354
373
  })]
355
374
  }),
356
- /* @__PURE__ */ D(p, {
357
- open: R !== null,
358
- onClose: () => z(null),
375
+ /* @__PURE__ */ T(m, {
376
+ open: I !== null,
377
+ onClose: () => L(null),
359
378
  title: "Edit Campaign",
360
379
  description: "Update campaign details",
361
380
  size: "lg",
362
- footer: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("button", {
363
- onClick: () => z(null),
381
+ footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
382
+ onClick: () => L(null),
364
383
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
365
384
  children: "Cancel"
366
- }), /* @__PURE__ */ D("button", {
367
- onClick: () => void pe(),
385
+ }), /* @__PURE__ */ T("button", {
386
+ onClick: () => void _e(),
368
387
  disabled: G,
369
388
  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 disabled:opacity-60",
370
389
  children: G ? "Saving..." : "Save Changes"
371
390
  })] }),
372
- children: R && /* @__PURE__ */ O("div", {
391
+ children: I && /* @__PURE__ */ E("div", {
373
392
  className: "space-y-4",
374
393
  children: [
375
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
394
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
376
395
  className: "mb-1.5 block text-sm font-medium text-text-primary",
377
396
  children: "Campaign Name"
378
- }), /* @__PURE__ */ D("input", {
397
+ }), /* @__PURE__ */ T("input", {
379
398
  type: "text",
380
- value: R.name,
381
- onChange: (e) => z({
382
- ...R,
399
+ value: I.name,
400
+ onChange: (e) => L({
401
+ ...I,
383
402
  name: e.target.value
384
403
  }),
385
404
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
386
405
  })] }),
387
- /* @__PURE__ */ O("div", {
406
+ /* @__PURE__ */ E("div", {
388
407
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
389
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
408
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
390
409
  className: "mb-1.5 block text-sm font-medium text-text-primary",
391
410
  children: "Status"
392
- }), /* @__PURE__ */ O("select", {
393
- value: R.status,
394
- onChange: (e) => z({
395
- ...R,
411
+ }), /* @__PURE__ */ E("select", {
412
+ value: I.status,
413
+ onChange: (e) => L({
414
+ ...I,
396
415
  status: e.target.value
397
416
  }),
398
417
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
399
418
  children: [
400
- /* @__PURE__ */ D("option", {
419
+ /* @__PURE__ */ T("option", {
401
420
  value: "draft",
402
421
  children: "Draft"
403
422
  }),
404
- /* @__PURE__ */ D("option", {
423
+ /* @__PURE__ */ T("option", {
405
424
  value: "active",
406
425
  children: "Active"
407
426
  }),
408
- /* @__PURE__ */ D("option", {
427
+ /* @__PURE__ */ T("option", {
409
428
  value: "paused",
410
429
  children: "Paused"
411
430
  }),
412
- /* @__PURE__ */ D("option", {
431
+ /* @__PURE__ */ T("option", {
413
432
  value: "completed",
414
433
  children: "Completed"
415
434
  })
416
435
  ]
417
- })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
436
+ })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
418
437
  className: "mb-1.5 block text-sm font-medium text-text-primary",
419
438
  children: "Total Budget (USD)"
420
- }), /* @__PURE__ */ D("input", {
439
+ }), /* @__PURE__ */ T("input", {
421
440
  type: "number",
422
- value: R.totalBudget,
423
- onChange: (e) => z({
424
- ...R,
441
+ value: I.totalBudget,
442
+ onChange: (e) => L({
443
+ ...I,
425
444
  totalBudget: e.target.value
426
445
  }),
427
446
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
428
447
  })] })]
429
448
  }),
430
- /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
449
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
431
450
  className: "mb-1.5 block text-sm font-medium text-text-primary",
432
451
  children: "Bid Strategy"
433
- }), /* @__PURE__ */ D("input", {
452
+ }), /* @__PURE__ */ T("input", {
434
453
  type: "text",
435
- value: R.bidStrategy,
436
- onChange: (e) => z({
437
- ...R,
454
+ value: I.bidStrategy,
455
+ onChange: (e) => L({
456
+ ...I,
438
457
  bidStrategy: e.target.value
439
458
  }),
440
459
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
441
460
  })] }),
442
- /* @__PURE__ */ O("div", {
461
+ /* @__PURE__ */ E("div", {
443
462
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
444
- children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
463
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
445
464
  className: "mb-1.5 block text-sm font-medium text-text-primary",
446
465
  children: "Start Date"
447
- }), /* @__PURE__ */ D("input", {
466
+ }), /* @__PURE__ */ T("input", {
448
467
  type: "date",
449
- value: R.startDate,
450
- onChange: (e) => z({
451
- ...R,
468
+ value: I.startDate,
469
+ onChange: (e) => L({
470
+ ...I,
452
471
  startDate: e.target.value
453
472
  }),
454
473
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
455
- })] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
474
+ })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
456
475
  className: "mb-1.5 block text-sm font-medium text-text-primary",
457
476
  children: "End Date"
458
- }), /* @__PURE__ */ D("input", {
477
+ }), /* @__PURE__ */ T("input", {
459
478
  type: "date",
460
- value: R.endDate,
461
- onChange: (e) => z({
462
- ...R,
479
+ value: I.endDate,
480
+ onChange: (e) => L({
481
+ ...I,
463
482
  endDate: e.target.value
464
483
  }),
465
484
  className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
@@ -468,27 +487,42 @@ var j = () => {
468
487
  ]
469
488
  })
470
489
  }),
471
- /* @__PURE__ */ D(p, {
472
- open: B,
473
- onClose: () => V(!1),
490
+ /* @__PURE__ */ T(m, {
491
+ open: H !== null,
492
+ onClose: () => U(null),
493
+ title: H ? `Tracked link · ${H.name}` : "Tracked link",
494
+ description: "Use the tracked URL as this creative's ad destination.",
495
+ size: "lg",
496
+ children: H && /* @__PURE__ */ T(h, {
497
+ sourceType: "AD_CREATIVE",
498
+ sourceId: H.id,
499
+ allowCreate: !0,
500
+ defaultDestinationUrl: H.landingPageUrl,
501
+ title: "Creative tracked links",
502
+ emptyMessage: "No tracked links for this creative yet."
503
+ }, H.id)
504
+ }),
505
+ /* @__PURE__ */ T(m, {
506
+ open: R,
507
+ onClose: () => z(!1),
474
508
  title: "Delete Campaign",
475
509
  size: "sm",
476
- footer: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("button", {
477
- onClick: () => V(!1),
510
+ footer: /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("button", {
511
+ onClick: () => z(!1),
478
512
  className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
479
513
  children: "Cancel"
480
- }), /* @__PURE__ */ D("button", {
481
- onClick: () => void me(),
514
+ }), /* @__PURE__ */ T("button", {
515
+ onClick: () => void ve(),
482
516
  disabled: K,
483
517
  className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
484
518
  children: K ? "Deleting..." : "Delete"
485
519
  })] }),
486
- children: /* @__PURE__ */ O("p", {
520
+ children: /* @__PURE__ */ E("p", {
487
521
  className: "text-sm text-text-secondary",
488
522
  children: [
489
523
  "Are you sure you want to delete",
490
524
  " ",
491
- /* @__PURE__ */ D("span", {
525
+ /* @__PURE__ */ T("span", {
492
526
  className: "font-semibold text-text-primary",
493
527
  children: J.name
494
528
  }),
@@ -500,6 +534,6 @@ var j = () => {
500
534
  });
501
535
  };
502
536
  //#endregion
503
- export { j as AdCampaignDetailsPage };
537
+ export { k as AdCampaignDetailsPage };
504
538
 
505
539
  //# sourceMappingURL=AdCampaignDetailsPage.js.map