@burdenoff/microfe-headshotmarketing 2026.1114.1 → 2026.1114.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.
- package/dist/generated/wspace-operations.d.ts +239 -0
- package/dist/generated/wspace-operations.js +360 -241
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/headshotmarketing/components/CrmRecordSelection.d.ts +4 -0
- package/dist/headshotmarketing/components/CrmRecordSelection.js +93 -0
- package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -0
- package/dist/headshotmarketing/hooks/useRecordSelection.d.ts +6 -0
- package/dist/headshotmarketing/hooks/useRecordSelection.js +14 -0
- package/dist/headshotmarketing/hooks/useRecordSelection.js.map +1 -0
- package/dist/headshotmarketing/hooks/useRefreshCrmSelection.d.ts +8 -0
- package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js +25 -0
- package/dist/headshotmarketing/hooks/useRefreshCrmSelection.js.map +1 -0
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +169 -140
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js +330 -236
- package/dist/headshotmarketing/pages/builder/LandingPageBuilderPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +165 -157
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadsPage.js +119 -113
- package/dist/headshotmarketing/pages/crm/LeadsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/PipelinePage.js +107 -101
- package/dist/headshotmarketing/pages/crm/PipelinePage.js.map +1 -1
- package/dist/headshotmarketing/utils/crmMapper.d.ts +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js +1 -1
- package/dist/headshotmarketing/utils/crmMapper.js.map +1 -1
- package/dist/utils/pageContext.d.ts +1 -1
- package/dist/utils/pageContext.js +79 -39
- package/dist/utils/pageContext.js.map +1 -1
- package/dist/utils/recordSelection.d.ts +4 -0
- package/dist/utils/recordSelection.js +12 -0
- package/dist/utils/recordSelection.js.map +1 -0
- package/package.json +1 -1
|
@@ -3,23 +3,24 @@ import { Pie as t } from "../../../node_modules/recharts/es6/polar/Pie.js";
|
|
|
3
3
|
import { Cell as n } from "../../../node_modules/recharts/es6/component/Cell.js";
|
|
4
4
|
import { ResponsiveContainer as r } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
5
5
|
import { Tooltip as i } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
6
|
-
import { useCreateHeadshotmarketingAudienceMutation as a, useDeleteHeadshotmarketingAudienceMutation as o, useHeadshotmarketingAudiencesListQuery as s,
|
|
7
|
-
import { cn as
|
|
8
|
-
import { audienceAgeBreakdown as
|
|
9
|
-
import { toAudienceModel as
|
|
10
|
-
import { PageLayout as
|
|
11
|
-
import { EmptyState as
|
|
12
|
-
import { Modal as
|
|
13
|
-
import { QueryStateBoundary as
|
|
14
|
-
import { Pagination as
|
|
6
|
+
import { useCreateHeadshotmarketingAudienceMutation as a, useDeleteHeadshotmarketingAudienceMutation as o, useHeadshotmarketingAudiencesListQuery as s, useHeadshotmarketingSelectedAudienceQuery as c, useUpdateHeadshotmarketingAudienceMutation as l } from "../../../generated/wspace-operations.js";
|
|
7
|
+
import { cn as u, formatNumber as d, formatPercentage as f } from "../../utils/helpers.js";
|
|
8
|
+
import { audienceAgeBreakdown as p, audienceCriteriaChips as m, audienceUsageLabel as h } from "./audienceDetails.js";
|
|
9
|
+
import { toAudienceModel as g } from "../../utils/adsMapper.js";
|
|
10
|
+
import { PageLayout as _ } from "../../components/PageLayout.js";
|
|
11
|
+
import { EmptyState as v } from "../../components/EmptyState.js";
|
|
12
|
+
import { Modal as y } from "../../components/Modal.js";
|
|
13
|
+
import { QueryStateBoundary as ee } from "../../components/QueryStateBoundary.js";
|
|
14
|
+
import { Pagination as te } from "../../components/Pagination.js";
|
|
15
15
|
import "../../components/index.js";
|
|
16
|
-
import { useHeadshotMarketing as
|
|
17
|
-
import { useHeadshotmarketingBootstrap as
|
|
18
|
-
import { usePagination as
|
|
19
|
-
import {
|
|
16
|
+
import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
|
|
17
|
+
import { useHeadshotmarketingBootstrap as re } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
18
|
+
import { usePagination as ie } from "../../hooks/usePagination.js";
|
|
19
|
+
import { useRecordSelection as ae } from "../../hooks/useRecordSelection.js";
|
|
20
|
+
import { useEffect as b, useMemo as oe, useState as x } from "react";
|
|
20
21
|
import { Megaphone as S, Pencil as C, Plus as w, Trash2 as T, X as E } from "lucide-react";
|
|
21
22
|
import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
22
|
-
import { PagePurpose as
|
|
23
|
+
import { PagePurpose as se } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
// src/headshotmarketing/pages/ads/AudiencesPage.tsx
|
|
24
25
|
var A = {
|
|
25
26
|
google_ads: "Google Ads",
|
|
@@ -63,57 +64,65 @@ function P(e) {
|
|
|
63
64
|
};
|
|
64
65
|
}
|
|
65
66
|
var F = () => {
|
|
66
|
-
let { navigate: e, basePath: t } =
|
|
67
|
+
let { navigate: e, basePath: t } = ne(), { refetch: n } = re(), [r, i] = x(""), [u, d] = x(""), { selectedId: f, invalidSelection: p, selectRecord: m } = ae(), h = c({
|
|
68
|
+
variables: { id: f ?? "" },
|
|
69
|
+
skip: !f,
|
|
70
|
+
fetchPolicy: "network-only"
|
|
71
|
+
}), [S, C] = x(null), [T, E] = x(!1), [A, j] = x(N), [M, F] = x(null), [L, R] = x(null), [z, B] = x(null), V = ie({ initialPageSize: 9 }), { limit: ue, offset: de, setPage: H, setTotal: U } = V;
|
|
67
72
|
b(() => {
|
|
68
|
-
let e = setTimeout(() =>
|
|
73
|
+
let e = setTimeout(() => d(r), 300);
|
|
69
74
|
return () => clearTimeout(e);
|
|
70
75
|
}, [r]), b(() => {
|
|
71
|
-
|
|
72
|
-
}, [
|
|
73
|
-
let { data:
|
|
76
|
+
H(1);
|
|
77
|
+
}, [u, H]);
|
|
78
|
+
let { data: W, loading: G, error: fe, refetch: K } = s({
|
|
74
79
|
variables: {
|
|
75
|
-
limit:
|
|
76
|
-
offset:
|
|
77
|
-
search:
|
|
80
|
+
limit: ue,
|
|
81
|
+
offset: de,
|
|
82
|
+
search: u || null
|
|
78
83
|
},
|
|
79
84
|
errorPolicy: "all",
|
|
80
85
|
notifyOnNetworkStatusChange: !0
|
|
81
|
-
}),
|
|
86
|
+
}), q = W?.headshotmarketingAudiences.total ?? 0;
|
|
82
87
|
b(() => {
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
let
|
|
86
|
-
await Promise.all([
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
U(q);
|
|
89
|
+
}, [q, U]);
|
|
90
|
+
let J = oe(() => (W?.headshotmarketingAudiences.items ?? []).map((e) => g(e)), [W?.headshotmarketingAudiences.items]), Y = h.data?.headshotmarketingAudience, X = Y?.id === f ? g(Y) : null, [pe, { loading: Z }] = a(), [me, { loading: he }] = l(), [ge, { loading: _e }] = o(), Q = async () => {
|
|
91
|
+
await Promise.all([
|
|
92
|
+
K(),
|
|
93
|
+
n(),
|
|
94
|
+
...f ? [h.refetch()] : []
|
|
95
|
+
]);
|
|
96
|
+
}, ve = async () => {
|
|
97
|
+
if (!A.name.trim()) B("Audience name is required.");
|
|
89
98
|
else {
|
|
90
|
-
|
|
99
|
+
B(null);
|
|
91
100
|
try {
|
|
92
|
-
await
|
|
93
|
-
name:
|
|
94
|
-
description:
|
|
95
|
-
estimatedSize:
|
|
96
|
-
isActive:
|
|
97
|
-
targetingCriteria: P(
|
|
98
|
-
} } }),
|
|
101
|
+
await pe({ variables: { input: {
|
|
102
|
+
name: A.name.trim(),
|
|
103
|
+
description: A.description || null,
|
|
104
|
+
estimatedSize: A.estimatedSize ? Number(A.estimatedSize) : null,
|
|
105
|
+
isActive: A.isActive,
|
|
106
|
+
targetingCriteria: P(A)
|
|
107
|
+
} } }), E(!1), j(N), await Q();
|
|
99
108
|
} catch (e) {
|
|
100
|
-
|
|
109
|
+
B(e instanceof Error ? e.message : "Failed to create audience.");
|
|
101
110
|
}
|
|
102
111
|
}
|
|
103
112
|
}, $ = async (e) => {
|
|
104
|
-
|
|
113
|
+
B(null), C(e.id);
|
|
105
114
|
try {
|
|
106
|
-
await
|
|
115
|
+
await me({ variables: {
|
|
107
116
|
id: e.id,
|
|
108
117
|
input: { isActive: e.status !== "active" }
|
|
109
118
|
} }), await Q();
|
|
110
119
|
} catch (e) {
|
|
111
|
-
|
|
120
|
+
B(e instanceof Error ? e.message : "Failed to update audience.");
|
|
112
121
|
} finally {
|
|
113
|
-
|
|
122
|
+
C(null);
|
|
114
123
|
}
|
|
115
|
-
},
|
|
116
|
-
|
|
124
|
+
}, ye = (e) => {
|
|
125
|
+
B(null), F({
|
|
117
126
|
id: e.id,
|
|
118
127
|
form: {
|
|
119
128
|
name: e.name,
|
|
@@ -128,55 +137,55 @@ var F = () => {
|
|
|
128
137
|
platform: e.platform
|
|
129
138
|
}
|
|
130
139
|
});
|
|
131
|
-
},
|
|
132
|
-
if (
|
|
133
|
-
if (!
|
|
140
|
+
}, be = async () => {
|
|
141
|
+
if (M) {
|
|
142
|
+
if (!M.form.name.trim()) B("Audience name is required.");
|
|
134
143
|
else {
|
|
135
|
-
|
|
144
|
+
B(null);
|
|
136
145
|
try {
|
|
137
|
-
await
|
|
138
|
-
id:
|
|
146
|
+
await me({ variables: {
|
|
147
|
+
id: M.id,
|
|
139
148
|
input: {
|
|
140
|
-
name:
|
|
141
|
-
description:
|
|
142
|
-
estimatedSize:
|
|
143
|
-
isActive:
|
|
144
|
-
targetingCriteria: P(
|
|
149
|
+
name: M.form.name.trim(),
|
|
150
|
+
description: M.form.description || null,
|
|
151
|
+
estimatedSize: M.form.estimatedSize ? Number(M.form.estimatedSize) : null,
|
|
152
|
+
isActive: M.form.isActive,
|
|
153
|
+
targetingCriteria: P(M.form)
|
|
145
154
|
}
|
|
146
|
-
} }),
|
|
155
|
+
} }), F(null), await Q();
|
|
147
156
|
} catch (e) {
|
|
148
|
-
|
|
157
|
+
B(e instanceof Error ? e.message : "Failed to save audience.");
|
|
149
158
|
}
|
|
150
159
|
}
|
|
151
160
|
}
|
|
152
|
-
},
|
|
153
|
-
if (
|
|
154
|
-
|
|
161
|
+
}, xe = async () => {
|
|
162
|
+
if (L) {
|
|
163
|
+
B(null);
|
|
155
164
|
try {
|
|
156
|
-
await
|
|
165
|
+
await ge({ variables: { id: L.id } }), f === L.id && m(null), R(null), await Q();
|
|
157
166
|
} catch (e) {
|
|
158
|
-
|
|
167
|
+
B(e instanceof Error ? e.message : "Failed to delete audience.");
|
|
159
168
|
}
|
|
160
169
|
}
|
|
161
|
-
},
|
|
170
|
+
}, Se = (n) => {
|
|
162
171
|
let r = new URLSearchParams({
|
|
163
172
|
audienceId: n.id,
|
|
164
173
|
audienceName: n.name
|
|
165
174
|
});
|
|
166
175
|
e(`${t}/ads/campaigns/new?${r.toString()}`);
|
|
167
176
|
};
|
|
168
|
-
return /* @__PURE__ */ k(
|
|
177
|
+
return /* @__PURE__ */ k(_, {
|
|
169
178
|
title: "Audiences",
|
|
170
179
|
description: "Create and manage your target audiences",
|
|
171
180
|
actions: /* @__PURE__ */ k("button", {
|
|
172
181
|
onClick: () => {
|
|
173
|
-
|
|
182
|
+
B(null), j(N), E(!0);
|
|
174
183
|
},
|
|
175
184
|
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",
|
|
176
185
|
children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "New Audience"]
|
|
177
186
|
}),
|
|
178
187
|
children: [
|
|
179
|
-
/* @__PURE__ */ O(
|
|
188
|
+
/* @__PURE__ */ O(se, { children: "Define and reuse the groups of people your ads should reach — custom lists, lookalikes and retargeting audiences. Save an audience once, then target it across any campaign and track how well it matches." }),
|
|
180
189
|
/* @__PURE__ */ O("div", {
|
|
181
190
|
className: "relative max-w-md",
|
|
182
191
|
children: /* @__PURE__ */ O("input", {
|
|
@@ -187,121 +196,141 @@ var F = () => {
|
|
|
187
196
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
188
197
|
})
|
|
189
198
|
}),
|
|
190
|
-
|
|
199
|
+
z && !T && !M && /* @__PURE__ */ O("div", {
|
|
191
200
|
role: "alert",
|
|
192
201
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
193
|
-
children:
|
|
202
|
+
children: z
|
|
194
203
|
}),
|
|
195
|
-
/* @__PURE__ */ O(
|
|
196
|
-
loading:
|
|
197
|
-
error:
|
|
198
|
-
onRetry:
|
|
199
|
-
hasData: !!
|
|
200
|
-
children:
|
|
201
|
-
illustration:
|
|
202
|
-
title:
|
|
203
|
-
description:
|
|
204
|
-
action:
|
|
204
|
+
/* @__PURE__ */ O(ee, {
|
|
205
|
+
loading: G,
|
|
206
|
+
error: fe,
|
|
207
|
+
onRetry: K,
|
|
208
|
+
hasData: !!W,
|
|
209
|
+
children: J.length === 0 ? /* @__PURE__ */ O(v, {
|
|
210
|
+
illustration: q === 0 ? "empty-people" : "empty-search",
|
|
211
|
+
title: q === 0 ? "No audiences yet" : "No audiences match your search",
|
|
212
|
+
description: q === 0 ? "Create your first audience to target the right people in your campaigns." : "Try a different search term.",
|
|
213
|
+
action: q === 0 ? /* @__PURE__ */ k("button", {
|
|
205
214
|
onClick: () => {
|
|
206
|
-
|
|
215
|
+
B(null), j(N), E(!0);
|
|
207
216
|
},
|
|
208
217
|
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",
|
|
209
218
|
children: [/* @__PURE__ */ O(w, { className: "h-4 w-4" }), "Create Audience"]
|
|
210
219
|
}) : void 0
|
|
211
220
|
}) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("div", {
|
|
212
221
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
213
|
-
children:
|
|
222
|
+
children: J.map((e) => /* @__PURE__ */ O(ce, {
|
|
214
223
|
audience: e,
|
|
215
|
-
selected:
|
|
216
|
-
toggling:
|
|
217
|
-
onOpen: () =>
|
|
224
|
+
selected: f === e.id,
|
|
225
|
+
toggling: S === e.id,
|
|
226
|
+
onOpen: () => m(e.id),
|
|
218
227
|
onToggleActive: () => $(e)
|
|
219
228
|
}, e.id))
|
|
220
|
-
}), /* @__PURE__ */ O(
|
|
221
|
-
page:
|
|
222
|
-
pageSize:
|
|
223
|
-
total:
|
|
224
|
-
onPageChange:
|
|
225
|
-
onPageSizeChange:
|
|
229
|
+
}), /* @__PURE__ */ O(te, {
|
|
230
|
+
page: V.page,
|
|
231
|
+
pageSize: V.pageSize,
|
|
232
|
+
total: V.total,
|
|
233
|
+
onPageChange: V.setPage,
|
|
234
|
+
onPageSizeChange: V.setPageSize,
|
|
226
235
|
pageSizeOptions: [
|
|
227
236
|
9,
|
|
228
237
|
18,
|
|
229
238
|
36
|
|
230
239
|
],
|
|
231
|
-
disabled:
|
|
240
|
+
disabled: G,
|
|
232
241
|
hideWhenSinglePage: !0
|
|
233
242
|
})] })
|
|
234
243
|
}),
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
244
|
+
(f || p) && !X && /* @__PURE__ */ k("section", {
|
|
245
|
+
"aria-label": "Selected audience",
|
|
246
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ O("button", {
|
|
249
|
+
type: "button",
|
|
250
|
+
onClick: () => m(null),
|
|
251
|
+
children: "Close selection"
|
|
252
|
+
}),
|
|
253
|
+
/* @__PURE__ */ O("p", {
|
|
254
|
+
role: h.loading ? "status" : "alert",
|
|
255
|
+
children: h.loading ? "Loading audience…" : "This audience is unavailable or you do not have access."
|
|
256
|
+
}),
|
|
257
|
+
h.error && /* @__PURE__ */ O("button", {
|
|
258
|
+
type: "button",
|
|
259
|
+
onClick: () => void h.refetch(),
|
|
260
|
+
children: "Retry"
|
|
261
|
+
})
|
|
262
|
+
]
|
|
243
263
|
}),
|
|
244
|
-
/* @__PURE__ */ O(
|
|
245
|
-
|
|
246
|
-
|
|
264
|
+
X && /* @__PURE__ */ O(le, {
|
|
265
|
+
audience: X,
|
|
266
|
+
toggling: S === X.id,
|
|
267
|
+
onClose: () => m(null),
|
|
268
|
+
onToggleActive: () => $(X),
|
|
269
|
+
onEdit: () => ye(X),
|
|
270
|
+
onUseInCampaign: () => Se(X),
|
|
271
|
+
onDelete: () => R(X)
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ O(y, {
|
|
274
|
+
open: T,
|
|
275
|
+
onClose: () => E(!1),
|
|
247
276
|
title: "Create Audience",
|
|
248
277
|
description: "Define who your ads should reach",
|
|
249
278
|
size: "lg",
|
|
250
279
|
footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
|
|
251
|
-
onClick: () =>
|
|
280
|
+
onClick: () => E(!1),
|
|
252
281
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
253
282
|
children: "Cancel"
|
|
254
283
|
}), /* @__PURE__ */ O("button", {
|
|
255
|
-
onClick:
|
|
256
|
-
disabled:
|
|
284
|
+
onClick: ve,
|
|
285
|
+
disabled: Z,
|
|
257
286
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
258
|
-
children:
|
|
287
|
+
children: Z ? "Creating..." : "Create Audience"
|
|
259
288
|
})] }),
|
|
260
289
|
children: /* @__PURE__ */ O(I, {
|
|
261
|
-
form:
|
|
262
|
-
onChange:
|
|
263
|
-
error:
|
|
290
|
+
form: A,
|
|
291
|
+
onChange: j,
|
|
292
|
+
error: z
|
|
264
293
|
})
|
|
265
294
|
}),
|
|
266
|
-
/* @__PURE__ */ O(
|
|
267
|
-
open:
|
|
268
|
-
onClose: () =>
|
|
295
|
+
/* @__PURE__ */ O(y, {
|
|
296
|
+
open: M !== null,
|
|
297
|
+
onClose: () => F(null),
|
|
269
298
|
title: "Edit Audience",
|
|
270
299
|
description: "Update audience targeting",
|
|
271
300
|
size: "lg",
|
|
272
301
|
footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
|
|
273
|
-
onClick: () =>
|
|
302
|
+
onClick: () => F(null),
|
|
274
303
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
275
304
|
children: "Cancel"
|
|
276
305
|
}), /* @__PURE__ */ O("button", {
|
|
277
|
-
onClick:
|
|
278
|
-
disabled:
|
|
306
|
+
onClick: be,
|
|
307
|
+
disabled: he,
|
|
279
308
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
280
|
-
children:
|
|
309
|
+
children: he ? "Saving..." : "Save Changes"
|
|
281
310
|
})] }),
|
|
282
|
-
children:
|
|
283
|
-
form:
|
|
284
|
-
onChange: (e) =>
|
|
285
|
-
...
|
|
311
|
+
children: M && /* @__PURE__ */ O(I, {
|
|
312
|
+
form: M.form,
|
|
313
|
+
onChange: (e) => F({
|
|
314
|
+
...M,
|
|
286
315
|
form: e
|
|
287
316
|
}),
|
|
288
|
-
error:
|
|
317
|
+
error: z
|
|
289
318
|
})
|
|
290
319
|
}),
|
|
291
|
-
/* @__PURE__ */ O(
|
|
292
|
-
open:
|
|
293
|
-
onClose: () =>
|
|
320
|
+
/* @__PURE__ */ O(y, {
|
|
321
|
+
open: L !== null,
|
|
322
|
+
onClose: () => R(null),
|
|
294
323
|
title: "Delete Audience",
|
|
295
324
|
size: "sm",
|
|
296
325
|
footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("button", {
|
|
297
|
-
onClick: () =>
|
|
326
|
+
onClick: () => R(null),
|
|
298
327
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
299
328
|
children: "Cancel"
|
|
300
329
|
}), /* @__PURE__ */ O("button", {
|
|
301
|
-
onClick:
|
|
302
|
-
disabled:
|
|
330
|
+
onClick: xe,
|
|
331
|
+
disabled: _e,
|
|
303
332
|
className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
|
|
304
|
-
children:
|
|
333
|
+
children: _e ? "Deleting..." : "Delete"
|
|
305
334
|
})] }),
|
|
306
335
|
children: /* @__PURE__ */ k("p", {
|
|
307
336
|
className: "text-sm text-text-secondary",
|
|
@@ -310,7 +339,7 @@ var F = () => {
|
|
|
310
339
|
" ",
|
|
311
340
|
/* @__PURE__ */ O("span", {
|
|
312
341
|
className: "font-semibold text-text-primary",
|
|
313
|
-
children:
|
|
342
|
+
children: L?.name
|
|
314
343
|
}),
|
|
315
344
|
"? This action cannot be undone."
|
|
316
345
|
]
|
|
@@ -403,7 +432,7 @@ var F = () => {
|
|
|
403
432
|
children: M.map((t) => /* @__PURE__ */ O("button", {
|
|
404
433
|
type: "button",
|
|
405
434
|
onClick: () => r(t),
|
|
406
|
-
className:
|
|
435
|
+
className: u("rounded-full border px-4 py-1.5 text-sm capitalize transition-colors", e.genders.includes(t) ? "border-foreground bg-foreground text-background" : "border-border-subtle text-text-primary hover:bg-bg-sunken"),
|
|
407
436
|
children: t
|
|
408
437
|
}, t))
|
|
409
438
|
})] }),
|
|
@@ -497,14 +526,14 @@ var F = () => {
|
|
|
497
526
|
onClick: (e) => {
|
|
498
527
|
e.stopPropagation(), n();
|
|
499
528
|
},
|
|
500
|
-
className:
|
|
529
|
+
className: u("relative inline-flex h-6 w-11 shrink-0 items-center rounded-full border transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] disabled:opacity-60", r ? "border-action-primary-bg bg-action-primary-bg" : "border-border-subtle bg-bg-sunken"),
|
|
501
530
|
children: /* @__PURE__ */ O("span", {
|
|
502
531
|
"aria-hidden": "true",
|
|
503
|
-
className:
|
|
532
|
+
className: u("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
|
|
504
533
|
})
|
|
505
534
|
});
|
|
506
|
-
},
|
|
507
|
-
let a =
|
|
535
|
+
}, ce = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
|
|
536
|
+
let a = m(e), o = h(e.usedInCampaignCount);
|
|
508
537
|
return /* @__PURE__ */ k("div", {
|
|
509
538
|
role: "button",
|
|
510
539
|
tabIndex: 0,
|
|
@@ -513,7 +542,7 @@ var F = () => {
|
|
|
513
542
|
onKeyDown: (e) => {
|
|
514
543
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
|
|
515
544
|
},
|
|
516
|
-
className:
|
|
545
|
+
className: u("cursor-pointer space-y-3 rounded-lg border bg-gloss-card p-5 shadow-pop transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", t ? "border-action-primary-bg" : "border-border-seam hover:border-foreground/30"),
|
|
517
546
|
children: [
|
|
518
547
|
/* @__PURE__ */ k("div", {
|
|
519
548
|
className: "flex items-start justify-between gap-3",
|
|
@@ -524,7 +553,7 @@ var F = () => {
|
|
|
524
553
|
children: e.name
|
|
525
554
|
}), /* @__PURE__ */ O("p", {
|
|
526
555
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
527
|
-
children:
|
|
556
|
+
children: d(e.size)
|
|
528
557
|
})]
|
|
529
558
|
}), /* @__PURE__ */ k("div", {
|
|
530
559
|
className: "flex flex-col items-end gap-1",
|
|
@@ -558,8 +587,8 @@ var F = () => {
|
|
|
558
587
|
})
|
|
559
588
|
]
|
|
560
589
|
});
|
|
561
|
-
},
|
|
562
|
-
let _ =
|
|
590
|
+
}, le = ({ audience: a, toggling: o, onClose: s, onToggleActive: c, onEdit: l, onUseInCampaign: u, onDelete: g }) => {
|
|
591
|
+
let _ = p(a), v = m(a), y = h(a.usedInCampaignCount);
|
|
563
592
|
return b(() => {
|
|
564
593
|
let e = (e) => {
|
|
565
594
|
e.key === "Escape" && s();
|
|
@@ -607,7 +636,7 @@ var F = () => {
|
|
|
607
636
|
children: "Estimated size"
|
|
608
637
|
}), /* @__PURE__ */ O("dd", {
|
|
609
638
|
className: "font-semibold text-text-primary",
|
|
610
|
-
children:
|
|
639
|
+
children: d(a.size)
|
|
611
640
|
})] }),
|
|
612
641
|
y !== null && /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", {
|
|
613
642
|
className: "text-xs text-text-secondary",
|
|
@@ -628,7 +657,7 @@ var F = () => {
|
|
|
628
657
|
children: "Match rate"
|
|
629
658
|
}), /* @__PURE__ */ O("dd", {
|
|
630
659
|
className: "text-text-primary",
|
|
631
|
-
children: a.matchRate > 0 ?
|
|
660
|
+
children: a.matchRate > 0 ? f(a.matchRate, 0) : "—"
|
|
632
661
|
})] }),
|
|
633
662
|
/* @__PURE__ */ k("div", {
|
|
634
663
|
className: "col-span-2 flex items-center gap-3",
|
|
@@ -728,7 +757,7 @@ var F = () => {
|
|
|
728
757
|
}),
|
|
729
758
|
/* @__PURE__ */ k("button", {
|
|
730
759
|
type: "button",
|
|
731
|
-
onClick:
|
|
760
|
+
onClick: u,
|
|
732
761
|
className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
733
762
|
children: [/* @__PURE__ */ O(S, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
|
|
734
763
|
}),
|