@burdenoff/microfe-headshotmarketing 2026.1202.1 → 2026.1203.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.
- package/dist/generated/wspace-operations.d.ts +346 -0
- package/dist/generated/wspace-operations.js +565 -443
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +114 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/AssetUploadButton.js +35 -23
- package/dist/headshotmarketing/components/AssetUploadButton.js.map +1 -1
- package/dist/headshotmarketing/components/CrmRecordSelection.js +51 -43
- package/dist/headshotmarketing/components/CrmRecordSelection.js.map +1 -1
- package/dist/headshotmarketing/components/EntityTagPicker.d.ts +9 -0
- package/dist/headshotmarketing/components/EntityTagPicker.js +261 -0
- package/dist/headshotmarketing/components/EntityTagPicker.js.map +1 -0
- package/dist/headshotmarketing/components/UploadAudienceSelect.d.ts +7 -0
- package/dist/headshotmarketing/components/UploadAudienceSelect.js +40 -0
- package/dist/headshotmarketing/components/UploadAudienceSelect.js.map +1 -0
- package/dist/headshotmarketing/components/index.d.ts +1 -0
- package/dist/headshotmarketing/components/index.js +2 -1
- package/dist/headshotmarketing/hooks/useAssetUpload.d.ts +2 -19
- package/dist/headshotmarketing/hooks/useAssetUpload.js +38 -32
- package/dist/headshotmarketing/hooks/useAssetUpload.js.map +1 -1
- package/dist/headshotmarketing/hooks/useEntityTags.d.ts +31 -0
- package/dist/headshotmarketing/hooks/useEntityTags.js +34 -0
- package/dist/headshotmarketing/hooks/useEntityTags.js.map +1 -0
- package/dist/headshotmarketing/pages/HomePage.js +33 -26
- package/dist/headshotmarketing/pages/HomePage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +182 -174
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +309 -294
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdsPage.js +0 -8
- package/dist/headshotmarketing/pages/ads/AdsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js +173 -164
- package/dist/headshotmarketing/pages/ads/AudiencesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js +0 -4
- package/dist/headshotmarketing/pages/analytics/AdAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js +0 -4
- package/dist/headshotmarketing/pages/analytics/CampaignAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js +0 -4
- package/dist/headshotmarketing/pages/analytics/SocialAnalyticsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/automation/AutomationPage.js +28 -25
- package/dist/headshotmarketing/pages/automation/AutomationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js +163 -155
- package/dist/headshotmarketing/pages/campaigns/CampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js +2 -0
- package/dist/headshotmarketing/pages/campaigns/CampaignsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js +268 -256
- package/dist/headshotmarketing/pages/campaigns/CreateCampaignPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +136 -128
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentPage.js +1 -0
- package/dist/headshotmarketing/pages/content/ContentPage.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/ContactsPage.js +1 -0
- package/dist/headshotmarketing/pages/crm/ContactsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js +190 -182
- package/dist/headshotmarketing/pages/events/EventDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/events/EventImageUpload.js +8 -2
- package/dist/headshotmarketing/pages/events/EventImageUpload.js.map +1 -1
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js +0 -3
- package/dist/headshotmarketing/pages/influencers/InfluencersPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js +1 -1
- package/dist/headshotmarketing/pages/social-media/MediaDropZone.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +3 -6
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js +0 -8
- package/dist/headshotmarketing/pages/social-media/SocialMediaPage.js.map +1 -1
- package/package.json +5 -3
|
@@ -17,30 +17,31 @@ import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingConte
|
|
|
17
17
|
import { useHeadshotmarketingBootstrap as re } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
18
18
|
import { usePagination as ie } from "../../hooks/usePagination.js";
|
|
19
19
|
import { useRecordSelection as ae } from "../../hooks/useRecordSelection.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
20
|
+
import { EntityTagPicker as b } from "../../components/EntityTagPicker.js";
|
|
21
|
+
import { useEffect as x, useMemo as oe, useState as S } from "react";
|
|
22
|
+
import { Megaphone as C, Pencil as w, Plus as T, Trash2 as E, X as D } from "lucide-react";
|
|
23
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
24
|
+
import { PagePurpose as se, ThemedSelect as j } from "@burdenoff/fe-libs/ui";
|
|
24
25
|
// src/headshotmarketing/pages/ads/AudiencesPage.tsx
|
|
25
|
-
var
|
|
26
|
+
var M = {
|
|
26
27
|
google_ads: "Google Ads",
|
|
27
28
|
facebook: "Facebook",
|
|
28
29
|
instagram: "Instagram",
|
|
29
30
|
linkedin: "LinkedIn",
|
|
30
31
|
twitter: "Twitter",
|
|
31
32
|
tiktok: "TikTok"
|
|
32
|
-
},
|
|
33
|
+
}, N = [
|
|
33
34
|
"var(--color-chart-1)",
|
|
34
35
|
"var(--color-chart-2)",
|
|
35
36
|
"var(--color-chart-3)",
|
|
36
37
|
"var(--color-chart-4)",
|
|
37
38
|
"var(--color-chart-5)",
|
|
38
39
|
"var(--color-chart-6)"
|
|
39
|
-
],
|
|
40
|
+
], P = [
|
|
40
41
|
"all",
|
|
41
42
|
"male",
|
|
42
43
|
"female"
|
|
43
|
-
],
|
|
44
|
+
], F = {
|
|
44
45
|
name: "",
|
|
45
46
|
description: "",
|
|
46
47
|
estimatedSize: "",
|
|
@@ -52,7 +53,7 @@ var j = {
|
|
|
52
53
|
interests: "",
|
|
53
54
|
platform: "google_ads"
|
|
54
55
|
};
|
|
55
|
-
function
|
|
56
|
+
function I(e) {
|
|
56
57
|
let t = (e) => e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
57
58
|
return {
|
|
58
59
|
ageMin: Number(e.ageMin) || 18,
|
|
@@ -63,16 +64,16 @@ function F(e) {
|
|
|
63
64
|
platform: e.platform
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
|
-
var
|
|
67
|
-
let { navigate: e, basePath: t } = ne(), { refetch: n } = re(), [r, i] =
|
|
67
|
+
var L = () => {
|
|
68
|
+
let { navigate: e, basePath: t } = ne(), { refetch: n } = re(), [r, i] = S(""), [u, d] = S(""), { selectedId: f, invalidSelection: p, selectRecord: m } = ae(), h = c({
|
|
68
69
|
variables: { id: f ?? "" },
|
|
69
70
|
skip: !f,
|
|
70
71
|
fetchPolicy: "network-only"
|
|
71
|
-
}), [
|
|
72
|
-
|
|
72
|
+
}), [b, C] = S(null), [w, E] = S(!1), [D, j] = S(F), [M, N] = S(null), [P, L] = S(null), [z, B] = S(null), V = ie({ initialPageSize: 9 }), { limit: ue, offset: de, setPage: H, setTotal: U } = V;
|
|
73
|
+
x(() => {
|
|
73
74
|
let e = setTimeout(() => d(r), 300);
|
|
74
75
|
return () => clearTimeout(e);
|
|
75
|
-
}, [r]),
|
|
76
|
+
}, [r]), x(() => {
|
|
76
77
|
H(1);
|
|
77
78
|
}, [u, H]);
|
|
78
79
|
let { data: W, loading: G, error: fe, refetch: K } = s({
|
|
@@ -84,7 +85,7 @@ var I = () => {
|
|
|
84
85
|
errorPolicy: "all",
|
|
85
86
|
notifyOnNetworkStatusChange: !0
|
|
86
87
|
}), q = W?.headshotmarketingAudiences.total ?? 0;
|
|
87
|
-
|
|
88
|
+
x(() => {
|
|
88
89
|
U(q);
|
|
89
90
|
}, [q, U]);
|
|
90
91
|
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(), [Q, { loading: me }] = l(), [he, { loading: ge }] = o(), $ = async () => {
|
|
@@ -94,17 +95,17 @@ var I = () => {
|
|
|
94
95
|
...f ? [h.refetch()] : []
|
|
95
96
|
]);
|
|
96
97
|
}, _e = async () => {
|
|
97
|
-
if (!
|
|
98
|
+
if (!D.name.trim()) B("Audience name is required.");
|
|
98
99
|
else {
|
|
99
100
|
B(null);
|
|
100
101
|
try {
|
|
101
102
|
await pe({ variables: { input: {
|
|
102
|
-
name:
|
|
103
|
-
description:
|
|
104
|
-
estimatedSize:
|
|
105
|
-
isActive:
|
|
106
|
-
targetingCriteria:
|
|
107
|
-
} } }), E(!1), j(
|
|
103
|
+
name: D.name.trim(),
|
|
104
|
+
description: D.description || null,
|
|
105
|
+
estimatedSize: D.estimatedSize ? Number(D.estimatedSize) : null,
|
|
106
|
+
isActive: D.isActive,
|
|
107
|
+
targetingCriteria: I(D)
|
|
108
|
+
} } }), E(!1), j(F), await $();
|
|
108
109
|
} catch (e) {
|
|
109
110
|
B(e instanceof Error ? e.message : "Failed to create audience.");
|
|
110
111
|
}
|
|
@@ -150,7 +151,7 @@ var I = () => {
|
|
|
150
151
|
description: M.form.description || null,
|
|
151
152
|
estimatedSize: M.form.estimatedSize ? Number(M.form.estimatedSize) : null,
|
|
152
153
|
isActive: M.form.isActive,
|
|
153
|
-
targetingCriteria:
|
|
154
|
+
targetingCriteria: I(M.form)
|
|
154
155
|
}
|
|
155
156
|
} }), N(null), await $();
|
|
156
157
|
} catch (e) {
|
|
@@ -159,10 +160,10 @@ var I = () => {
|
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
}, xe = async () => {
|
|
162
|
-
if (
|
|
163
|
+
if (P) {
|
|
163
164
|
B(null);
|
|
164
165
|
try {
|
|
165
|
-
await he({ variables: { id:
|
|
166
|
+
await he({ variables: { id: P.id } }), f === P.id && m(null), L(null), await $();
|
|
166
167
|
} catch (e) {
|
|
167
168
|
B(e instanceof Error ? e.message : "Failed to delete audience.");
|
|
168
169
|
}
|
|
@@ -174,21 +175,22 @@ var I = () => {
|
|
|
174
175
|
});
|
|
175
176
|
e(`${t}/ads/campaigns/new?${r.toString()}`);
|
|
176
177
|
};
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ A(_, {
|
|
178
179
|
title: "Audiences",
|
|
179
180
|
description: "Create and manage your target audiences",
|
|
180
|
-
actions: /* @__PURE__ */
|
|
181
|
+
actions: /* @__PURE__ */ A("button", {
|
|
182
|
+
"data-tour": "headshotmarketing-audiences-create",
|
|
181
183
|
onClick: () => {
|
|
182
|
-
B(null), j(
|
|
184
|
+
B(null), j(F), E(!0);
|
|
183
185
|
},
|
|
184
186
|
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",
|
|
185
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ k(T, { className: "h-4 w-4" }), "New Audience"]
|
|
186
188
|
}),
|
|
187
189
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ k(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." }),
|
|
191
|
+
/* @__PURE__ */ k("div", {
|
|
190
192
|
className: "relative max-w-md",
|
|
191
|
-
children: /* @__PURE__ */
|
|
193
|
+
children: /* @__PURE__ */ k("input", {
|
|
192
194
|
type: "text",
|
|
193
195
|
value: r,
|
|
194
196
|
onChange: (e) => i(e.target.value),
|
|
@@ -196,37 +198,37 @@ var I = () => {
|
|
|
196
198
|
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)]"
|
|
197
199
|
})
|
|
198
200
|
}),
|
|
199
|
-
z && !
|
|
201
|
+
z && !w && !M && /* @__PURE__ */ k("div", {
|
|
200
202
|
role: "alert",
|
|
201
203
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
202
204
|
children: z
|
|
203
205
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ k(ee, {
|
|
205
207
|
loading: G,
|
|
206
208
|
error: fe,
|
|
207
209
|
onRetry: K,
|
|
208
210
|
hasData: !!W,
|
|
209
|
-
children: J.length === 0 ? /* @__PURE__ */
|
|
211
|
+
children: J.length === 0 ? /* @__PURE__ */ k(v, {
|
|
210
212
|
illustration: q === 0 ? "empty-people" : "empty-search",
|
|
211
213
|
title: q === 0 ? "No audiences yet" : "No audiences match your search",
|
|
212
214
|
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__ */
|
|
215
|
+
action: q === 0 ? /* @__PURE__ */ A("button", {
|
|
214
216
|
onClick: () => {
|
|
215
|
-
B(null), j(
|
|
217
|
+
B(null), j(F), E(!0);
|
|
216
218
|
},
|
|
217
219
|
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",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ k(T, { className: "h-4 w-4" }), "Create Audience"]
|
|
219
221
|
}) : void 0
|
|
220
|
-
}) : /* @__PURE__ */
|
|
222
|
+
}) : /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("div", {
|
|
221
223
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
222
|
-
children: J.map((e) => /* @__PURE__ */
|
|
224
|
+
children: J.map((e) => /* @__PURE__ */ k(ce, {
|
|
223
225
|
audience: e,
|
|
224
226
|
selected: f === e.id,
|
|
225
|
-
toggling:
|
|
227
|
+
toggling: b === e.id,
|
|
226
228
|
onOpen: () => m(e.id),
|
|
227
229
|
onToggleActive: () => ve(e)
|
|
228
230
|
}, e.id))
|
|
229
|
-
}), /* @__PURE__ */
|
|
231
|
+
}), /* @__PURE__ */ k(te, {
|
|
230
232
|
page: V.page,
|
|
231
233
|
pageSize: V.pageSize,
|
|
232
234
|
total: V.total,
|
|
@@ -241,74 +243,74 @@ var I = () => {
|
|
|
241
243
|
hideWhenSinglePage: !0
|
|
242
244
|
})] })
|
|
243
245
|
}),
|
|
244
|
-
(f || p) && !X && /* @__PURE__ */
|
|
246
|
+
(f || p) && !X && /* @__PURE__ */ A("section", {
|
|
245
247
|
"aria-label": "Selected audience",
|
|
246
248
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
247
249
|
children: [
|
|
248
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ k("button", {
|
|
249
251
|
type: "button",
|
|
250
252
|
onClick: () => m(null),
|
|
251
253
|
children: "Close selection"
|
|
252
254
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ k("p", {
|
|
254
256
|
role: h.loading ? "status" : "alert",
|
|
255
257
|
children: h.loading ? "Loading audience…" : "This audience is unavailable or you do not have access."
|
|
256
258
|
}),
|
|
257
|
-
h.error && /* @__PURE__ */
|
|
259
|
+
h.error && /* @__PURE__ */ k("button", {
|
|
258
260
|
type: "button",
|
|
259
261
|
onClick: () => void h.refetch(),
|
|
260
262
|
children: "Retry"
|
|
261
263
|
})
|
|
262
264
|
]
|
|
263
265
|
}),
|
|
264
|
-
X && /* @__PURE__ */
|
|
266
|
+
X && /* @__PURE__ */ k(le, {
|
|
265
267
|
audience: X,
|
|
266
|
-
toggling:
|
|
268
|
+
toggling: b === X.id,
|
|
267
269
|
onClose: () => m(null),
|
|
268
270
|
onToggleActive: () => ve(X),
|
|
269
271
|
onEdit: () => ye(X),
|
|
270
272
|
onUseInCampaign: () => Se(X),
|
|
271
|
-
onDelete: () =>
|
|
273
|
+
onDelete: () => L(X)
|
|
272
274
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
-
open:
|
|
275
|
+
/* @__PURE__ */ k(y, {
|
|
276
|
+
open: w,
|
|
275
277
|
onClose: () => E(!1),
|
|
276
278
|
title: "Create Audience",
|
|
277
279
|
description: "Define who your ads should reach",
|
|
278
280
|
size: "lg",
|
|
279
|
-
footer: /* @__PURE__ */
|
|
281
|
+
footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
|
|
280
282
|
onClick: () => E(!1),
|
|
281
283
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
282
284
|
children: "Cancel"
|
|
283
|
-
}), /* @__PURE__ */
|
|
285
|
+
}), /* @__PURE__ */ k("button", {
|
|
284
286
|
onClick: _e,
|
|
285
287
|
disabled: Z,
|
|
286
288
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
287
289
|
children: Z ? "Creating..." : "Create Audience"
|
|
288
290
|
})] }),
|
|
289
|
-
children: /* @__PURE__ */
|
|
290
|
-
form:
|
|
291
|
+
children: /* @__PURE__ */ k(R, {
|
|
292
|
+
form: D,
|
|
291
293
|
onChange: j,
|
|
292
294
|
error: z
|
|
293
295
|
})
|
|
294
296
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ k(y, {
|
|
296
298
|
open: M !== null,
|
|
297
299
|
onClose: () => N(null),
|
|
298
300
|
title: "Edit Audience",
|
|
299
301
|
description: "Update audience targeting",
|
|
300
302
|
size: "lg",
|
|
301
|
-
footer: /* @__PURE__ */
|
|
303
|
+
footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
|
|
302
304
|
onClick: () => N(null),
|
|
303
305
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
304
306
|
children: "Cancel"
|
|
305
|
-
}), /* @__PURE__ */
|
|
307
|
+
}), /* @__PURE__ */ k("button", {
|
|
306
308
|
onClick: be,
|
|
307
309
|
disabled: me,
|
|
308
310
|
className: "rounded-md bg-foreground px-4 py-2 text-sm font-medium text-background hover:bg-foreground/90 disabled:opacity-60",
|
|
309
311
|
children: me ? "Saving..." : "Save Changes"
|
|
310
312
|
})] }),
|
|
311
|
-
children: M && /* @__PURE__ */
|
|
313
|
+
children: M && /* @__PURE__ */ k(R, {
|
|
312
314
|
form: M.form,
|
|
313
315
|
onChange: (e) => N({
|
|
314
316
|
...M,
|
|
@@ -317,29 +319,29 @@ var I = () => {
|
|
|
317
319
|
error: z
|
|
318
320
|
})
|
|
319
321
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
open:
|
|
322
|
-
onClose: () =>
|
|
322
|
+
/* @__PURE__ */ k(y, {
|
|
323
|
+
open: P !== null,
|
|
324
|
+
onClose: () => L(null),
|
|
323
325
|
title: "Delete Audience",
|
|
324
326
|
size: "sm",
|
|
325
|
-
footer: /* @__PURE__ */
|
|
326
|
-
onClick: () =>
|
|
327
|
+
footer: /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("button", {
|
|
328
|
+
onClick: () => L(null),
|
|
327
329
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
328
330
|
children: "Cancel"
|
|
329
|
-
}), /* @__PURE__ */
|
|
331
|
+
}), /* @__PURE__ */ k("button", {
|
|
330
332
|
onClick: xe,
|
|
331
333
|
disabled: ge,
|
|
332
334
|
className: "rounded-md bg-status-error-text px-4 py-2 text-sm font-medium text-background hover:opacity-90 disabled:opacity-60",
|
|
333
335
|
children: ge ? "Deleting..." : "Delete"
|
|
334
336
|
})] }),
|
|
335
|
-
children: /* @__PURE__ */
|
|
337
|
+
children: /* @__PURE__ */ A("p", {
|
|
336
338
|
className: "text-sm text-text-secondary",
|
|
337
339
|
children: [
|
|
338
340
|
"Are you sure you want to delete",
|
|
339
341
|
" ",
|
|
340
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ k("span", {
|
|
341
343
|
className: "font-semibold text-text-primary",
|
|
342
|
-
children:
|
|
344
|
+
children: P?.name
|
|
343
345
|
}),
|
|
344
346
|
"? This action cannot be undone."
|
|
345
347
|
]
|
|
@@ -347,7 +349,7 @@ var I = () => {
|
|
|
347
349
|
})
|
|
348
350
|
]
|
|
349
351
|
});
|
|
350
|
-
},
|
|
352
|
+
}, R = ({ form: e, onChange: t, error: n }) => {
|
|
351
353
|
let r = (n) => {
|
|
352
354
|
let r = e.genders.includes(n) ? e.genders.filter((e) => e !== n) : [...e.genders, n];
|
|
353
355
|
t({
|
|
@@ -355,13 +357,13 @@ var I = () => {
|
|
|
355
357
|
genders: r
|
|
356
358
|
});
|
|
357
359
|
};
|
|
358
|
-
return /* @__PURE__ */
|
|
360
|
+
return /* @__PURE__ */ A("div", {
|
|
359
361
|
className: "space-y-4",
|
|
360
362
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
363
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
362
364
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
363
365
|
children: "Name"
|
|
364
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ k("input", {
|
|
365
367
|
type: "text",
|
|
366
368
|
value: e.name,
|
|
367
369
|
onChange: (n) => t({
|
|
@@ -371,10 +373,10 @@ var I = () => {
|
|
|
371
373
|
placeholder: "e.g., Returning Visitors — US",
|
|
372
374
|
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)]"
|
|
373
375
|
})] }),
|
|
374
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
375
377
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
376
378
|
children: "Description"
|
|
377
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ k("textarea", {
|
|
378
380
|
value: e.description,
|
|
379
381
|
onChange: (n) => t({
|
|
380
382
|
...e,
|
|
@@ -383,13 +385,13 @@ var I = () => {
|
|
|
383
385
|
rows: 2,
|
|
384
386
|
className: "w-full resize-none 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)]"
|
|
385
387
|
})] }),
|
|
386
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ A("div", {
|
|
387
389
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-3",
|
|
388
390
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
390
392
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
391
393
|
children: "Estimated Size"
|
|
392
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ k("input", {
|
|
393
395
|
type: "number",
|
|
394
396
|
value: e.estimatedSize,
|
|
395
397
|
onChange: (n) => t({
|
|
@@ -398,10 +400,10 @@ var I = () => {
|
|
|
398
400
|
}),
|
|
399
401
|
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)]"
|
|
400
402
|
})] }),
|
|
401
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
402
404
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
403
405
|
children: "Age Min"
|
|
404
|
-
}), /* @__PURE__ */
|
|
406
|
+
}), /* @__PURE__ */ k("input", {
|
|
405
407
|
type: "number",
|
|
406
408
|
value: e.ageMin,
|
|
407
409
|
onChange: (n) => t({
|
|
@@ -410,10 +412,10 @@ var I = () => {
|
|
|
410
412
|
}),
|
|
411
413
|
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)]"
|
|
412
414
|
})] }),
|
|
413
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
414
416
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
415
417
|
children: "Age Max"
|
|
416
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ k("input", {
|
|
417
419
|
type: "number",
|
|
418
420
|
value: e.ageMax,
|
|
419
421
|
onChange: (n) => t({
|
|
@@ -424,24 +426,24 @@ var I = () => {
|
|
|
424
426
|
})] })
|
|
425
427
|
]
|
|
426
428
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
428
430
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
429
431
|
children: "Gender"
|
|
430
|
-
}), /* @__PURE__ */
|
|
432
|
+
}), /* @__PURE__ */ k("div", {
|
|
431
433
|
className: "flex flex-wrap gap-2",
|
|
432
|
-
children:
|
|
434
|
+
children: P.map((t) => /* @__PURE__ */ k("button", {
|
|
433
435
|
type: "button",
|
|
434
436
|
onClick: () => r(t),
|
|
435
437
|
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"),
|
|
436
438
|
children: t
|
|
437
439
|
}, t))
|
|
438
440
|
})] }),
|
|
439
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ A("div", {
|
|
440
442
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
441
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
442
444
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
443
445
|
children: "Locations"
|
|
444
|
-
}), /* @__PURE__ */
|
|
446
|
+
}), /* @__PURE__ */ k("input", {
|
|
445
447
|
type: "text",
|
|
446
448
|
value: e.locations,
|
|
447
449
|
onChange: (n) => t({
|
|
@@ -450,10 +452,10 @@ var I = () => {
|
|
|
450
452
|
}),
|
|
451
453
|
placeholder: "Comma-separated",
|
|
452
454
|
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)]"
|
|
453
|
-
})] }), /* @__PURE__ */
|
|
455
|
+
})] }), /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
454
456
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
455
457
|
children: "Platform"
|
|
456
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ A(j, {
|
|
457
459
|
value: e.platform,
|
|
458
460
|
onChange: (n) => t({
|
|
459
461
|
...e,
|
|
@@ -461,33 +463,33 @@ var I = () => {
|
|
|
461
463
|
}),
|
|
462
464
|
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)]",
|
|
463
465
|
children: [
|
|
464
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ k("option", {
|
|
465
467
|
value: "google_ads",
|
|
466
468
|
children: "Google Ads"
|
|
467
469
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
470
|
+
/* @__PURE__ */ k("option", {
|
|
469
471
|
value: "facebook",
|
|
470
472
|
children: "Facebook"
|
|
471
473
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ k("option", {
|
|
473
475
|
value: "instagram",
|
|
474
476
|
children: "Instagram"
|
|
475
477
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
478
|
+
/* @__PURE__ */ k("option", {
|
|
477
479
|
value: "linkedin",
|
|
478
480
|
children: "LinkedIn"
|
|
479
481
|
}),
|
|
480
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ k("option", {
|
|
481
483
|
value: "twitter",
|
|
482
484
|
children: "Twitter"
|
|
483
485
|
})
|
|
484
486
|
]
|
|
485
487
|
})] })]
|
|
486
488
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
489
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("label", {
|
|
488
490
|
className: "mb-1.5 block text-sm font-medium text-text-primary",
|
|
489
491
|
children: "Interests"
|
|
490
|
-
}), /* @__PURE__ */
|
|
492
|
+
}), /* @__PURE__ */ k("input", {
|
|
491
493
|
type: "text",
|
|
492
494
|
value: e.interests,
|
|
493
495
|
onChange: (n) => t({
|
|
@@ -497,9 +499,9 @@ var I = () => {
|
|
|
497
499
|
placeholder: "Comma-separated interests",
|
|
498
500
|
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)]"
|
|
499
501
|
})] }),
|
|
500
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ A("label", {
|
|
501
503
|
className: "flex items-center gap-2 text-sm text-text-primary",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
504
|
+
children: [/* @__PURE__ */ k("input", {
|
|
503
505
|
type: "checkbox",
|
|
504
506
|
checked: e.isActive,
|
|
505
507
|
onChange: (n) => t({
|
|
@@ -509,15 +511,15 @@ var I = () => {
|
|
|
509
511
|
className: "h-4 w-4 rounded border-border-subtle"
|
|
510
512
|
}), "Active"]
|
|
511
513
|
}),
|
|
512
|
-
n && /* @__PURE__ */
|
|
514
|
+
n && /* @__PURE__ */ k("p", {
|
|
513
515
|
className: "text-sm text-status-error-text",
|
|
514
516
|
children: n
|
|
515
517
|
})
|
|
516
518
|
]
|
|
517
519
|
});
|
|
518
|
-
},
|
|
520
|
+
}, z = ({ audience: e, disabled: t, onToggle: n }) => {
|
|
519
521
|
let r = e.status === "active";
|
|
520
|
-
return /* @__PURE__ */
|
|
522
|
+
return /* @__PURE__ */ k("button", {
|
|
521
523
|
type: "button",
|
|
522
524
|
role: "switch",
|
|
523
525
|
"aria-checked": r,
|
|
@@ -527,14 +529,14 @@ var I = () => {
|
|
|
527
529
|
e.stopPropagation(), n();
|
|
528
530
|
},
|
|
529
531
|
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"),
|
|
530
|
-
children: /* @__PURE__ */
|
|
532
|
+
children: /* @__PURE__ */ k("span", {
|
|
531
533
|
"aria-hidden": "true",
|
|
532
534
|
className: u("inline-block h-4 w-4 rounded-full bg-bg-surface shadow transition-transform", r ? "translate-x-6" : "translate-x-1")
|
|
533
535
|
})
|
|
534
536
|
});
|
|
535
537
|
}, ce = ({ audience: e, selected: t, toggling: n, onOpen: r, onToggleActive: i }) => {
|
|
536
538
|
let a = m(e), o = h(e.usedInCampaignCount);
|
|
537
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ A("div", {
|
|
538
540
|
role: "button",
|
|
539
541
|
tabIndex: 0,
|
|
540
542
|
"aria-label": `Open ${e.name} details`,
|
|
@@ -544,35 +546,35 @@ var I = () => {
|
|
|
544
546
|
},
|
|
545
547
|
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"),
|
|
546
548
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
549
|
+
/* @__PURE__ */ A("div", {
|
|
548
550
|
className: "flex items-start justify-between gap-3",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ A("div", {
|
|
550
552
|
className: "min-w-0",
|
|
551
|
-
children: [/* @__PURE__ */
|
|
553
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
552
554
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
553
555
|
children: e.name
|
|
554
|
-
}), /* @__PURE__ */
|
|
556
|
+
}), /* @__PURE__ */ k("p", {
|
|
555
557
|
className: "mt-1 text-2xl font-semibold tabular-nums text-text-primary",
|
|
556
558
|
children: d(e.size)
|
|
557
559
|
})]
|
|
558
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ A("div", {
|
|
559
561
|
className: "flex flex-col items-end gap-1",
|
|
560
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ k(z, {
|
|
561
563
|
audience: e,
|
|
562
564
|
disabled: n,
|
|
563
565
|
onToggle: i
|
|
564
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ k("span", {
|
|
565
567
|
className: "text-xs text-text-secondary",
|
|
566
568
|
children: e.status === "active" ? "Active" : "Inactive"
|
|
567
569
|
})]
|
|
568
570
|
})]
|
|
569
571
|
}),
|
|
570
|
-
/* @__PURE__ */
|
|
572
|
+
/* @__PURE__ */ A("div", {
|
|
571
573
|
className: "flex flex-wrap gap-1.5 border-t border-border-subtle pt-3",
|
|
572
|
-
children: [a.slice(0, 4).map((e) => /* @__PURE__ */
|
|
574
|
+
children: [a.slice(0, 4).map((e) => /* @__PURE__ */ k("span", {
|
|
573
575
|
className: "rounded-full border border-border-subtle px-2 py-0.5 text-xs text-text-secondary",
|
|
574
576
|
children: e
|
|
575
|
-
}, e)), a.length > 4 && /* @__PURE__ */
|
|
577
|
+
}, e)), a.length > 4 && /* @__PURE__ */ A("span", {
|
|
576
578
|
className: "px-1 py-0.5 text-xs text-text-secondary",
|
|
577
579
|
children: [
|
|
578
580
|
"+",
|
|
@@ -581,7 +583,7 @@ var I = () => {
|
|
|
581
583
|
]
|
|
582
584
|
})]
|
|
583
585
|
}),
|
|
584
|
-
o !== null && /* @__PURE__ */
|
|
586
|
+
o !== null && /* @__PURE__ */ k("p", {
|
|
585
587
|
className: "border-t border-border-subtle pt-3 text-xs text-text-secondary",
|
|
586
588
|
children: o
|
|
587
589
|
})
|
|
@@ -589,107 +591,107 @@ var I = () => {
|
|
|
589
591
|
});
|
|
590
592
|
}, le = ({ audience: a, toggling: o, onClose: s, onToggleActive: c, onEdit: l, onUseInCampaign: u, onDelete: g }) => {
|
|
591
593
|
let _ = p(a), v = m(a), y = h(a.usedInCampaignCount);
|
|
592
|
-
return
|
|
594
|
+
return x(() => {
|
|
593
595
|
let e = (e) => {
|
|
594
596
|
e.key === "Escape" && s();
|
|
595
597
|
};
|
|
596
598
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
597
|
-
}, [s]), /* @__PURE__ */
|
|
599
|
+
}, [s]), /* @__PURE__ */ A("aside", {
|
|
598
600
|
role: "dialog",
|
|
599
601
|
"aria-modal": "false",
|
|
600
602
|
"aria-labelledby": "audience-drawer-title",
|
|
601
603
|
className: "fixed inset-y-0 end-0 z-40 flex w-full flex-col overflow-y-auto border-l border-border-seam bg-bg-surface shadow-2xl sm:w-[380px]",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
604
|
+
children: [/* @__PURE__ */ A("div", {
|
|
603
605
|
className: "flex items-start justify-between gap-3 border-b border-border-seam p-5",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ A("div", {
|
|
605
607
|
className: "min-w-0",
|
|
606
608
|
children: [
|
|
607
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ k("p", {
|
|
608
610
|
className: "text-xs uppercase tracking-wide text-text-secondary",
|
|
609
611
|
children: "Audience"
|
|
610
612
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ k("h2", {
|
|
612
614
|
id: "audience-drawer-title",
|
|
613
615
|
className: "truncate text-lg font-semibold text-text-primary",
|
|
614
616
|
children: a.name
|
|
615
617
|
}),
|
|
616
|
-
a.description && /* @__PURE__ */
|
|
618
|
+
a.description && /* @__PURE__ */ k("p", {
|
|
617
619
|
className: "mt-1 text-sm text-text-secondary",
|
|
618
620
|
children: a.description
|
|
619
621
|
})
|
|
620
622
|
]
|
|
621
|
-
}), /* @__PURE__ */
|
|
623
|
+
}), /* @__PURE__ */ k("button", {
|
|
622
624
|
type: "button",
|
|
623
625
|
onClick: s,
|
|
624
626
|
"aria-label": "Close audience details",
|
|
625
627
|
className: "rounded-md p-1.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary",
|
|
626
|
-
children: /* @__PURE__ */
|
|
628
|
+
children: /* @__PURE__ */ k(D, { className: "h-5 w-5" })
|
|
627
629
|
})]
|
|
628
|
-
}), /* @__PURE__ */
|
|
630
|
+
}), /* @__PURE__ */ A("div", {
|
|
629
631
|
className: "space-y-6 p-5",
|
|
630
632
|
children: [
|
|
631
|
-
/* @__PURE__ */
|
|
633
|
+
/* @__PURE__ */ A("dl", {
|
|
632
634
|
className: "grid grid-cols-2 gap-3 text-sm",
|
|
633
635
|
children: [
|
|
634
|
-
/* @__PURE__ */
|
|
636
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
635
637
|
className: "text-xs text-text-secondary",
|
|
636
638
|
children: "Estimated size"
|
|
637
|
-
}), /* @__PURE__ */
|
|
639
|
+
}), /* @__PURE__ */ k("dd", {
|
|
638
640
|
className: "font-semibold text-text-primary",
|
|
639
641
|
children: d(a.size)
|
|
640
642
|
})] }),
|
|
641
|
-
y !== null && /* @__PURE__ */
|
|
643
|
+
y !== null && /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
642
644
|
className: "text-xs text-text-secondary",
|
|
643
645
|
children: "Usage"
|
|
644
|
-
}), /* @__PURE__ */
|
|
646
|
+
}), /* @__PURE__ */ k("dd", {
|
|
645
647
|
className: "font-semibold text-text-primary",
|
|
646
648
|
children: y
|
|
647
649
|
})] }),
|
|
648
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
649
651
|
className: "text-xs text-text-secondary",
|
|
650
652
|
children: "Platform"
|
|
651
|
-
}), /* @__PURE__ */
|
|
653
|
+
}), /* @__PURE__ */ k("dd", {
|
|
652
654
|
className: "text-text-primary",
|
|
653
|
-
children:
|
|
655
|
+
children: M[a.platform] ?? a.platform
|
|
654
656
|
})] }),
|
|
655
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("dt", {
|
|
656
658
|
className: "text-xs text-text-secondary",
|
|
657
659
|
children: "Match rate"
|
|
658
|
-
}), /* @__PURE__ */
|
|
660
|
+
}), /* @__PURE__ */ k("dd", {
|
|
659
661
|
className: "text-text-primary",
|
|
660
662
|
children: a.matchRate > 0 ? f(a.matchRate, 0) : "—"
|
|
661
663
|
})] }),
|
|
662
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ A("div", {
|
|
663
665
|
className: "col-span-2 flex items-center gap-3",
|
|
664
|
-
children: [/* @__PURE__ */
|
|
666
|
+
children: [/* @__PURE__ */ k(z, {
|
|
665
667
|
audience: a,
|
|
666
668
|
disabled: o,
|
|
667
669
|
onToggle: c
|
|
668
|
-
}), /* @__PURE__ */
|
|
670
|
+
}), /* @__PURE__ */ k("span", {
|
|
669
671
|
className: "text-sm text-text-primary",
|
|
670
672
|
children: a.status === "active" ? "Active" : "Inactive"
|
|
671
673
|
})]
|
|
672
674
|
})
|
|
673
675
|
]
|
|
674
676
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ A("section", {
|
|
676
678
|
"aria-labelledby": "audience-demographics-title",
|
|
677
679
|
children: [
|
|
678
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ k("h3", {
|
|
679
681
|
id: "audience-demographics-title",
|
|
680
682
|
className: "text-sm font-semibold text-text-primary",
|
|
681
683
|
children: "Demographics"
|
|
682
684
|
}),
|
|
683
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ k("p", {
|
|
684
686
|
className: "mt-0.5 text-xs text-text-secondary",
|
|
685
687
|
children: "Targeted age span by bracket"
|
|
686
688
|
}),
|
|
687
|
-
_.length > 0 ? /* @__PURE__ */
|
|
689
|
+
_.length > 0 ? /* @__PURE__ */ A(O, { children: [/* @__PURE__ */ k("div", {
|
|
688
690
|
className: "h-48",
|
|
689
|
-
children: /* @__PURE__ */
|
|
691
|
+
children: /* @__PURE__ */ k(r, {
|
|
690
692
|
width: "100%",
|
|
691
693
|
height: "100%",
|
|
692
|
-
children: /* @__PURE__ */
|
|
694
|
+
children: /* @__PURE__ */ A(e, { children: [/* @__PURE__ */ k(t, {
|
|
693
695
|
data: _,
|
|
694
696
|
dataKey: "percent",
|
|
695
697
|
nameKey: "label",
|
|
@@ -697,8 +699,8 @@ var I = () => {
|
|
|
697
699
|
outerRadius: "90%",
|
|
698
700
|
paddingAngle: 2,
|
|
699
701
|
stroke: "var(--color-card)",
|
|
700
|
-
children: _.map((e, t) => /* @__PURE__ */
|
|
701
|
-
}), /* @__PURE__ */
|
|
702
|
+
children: _.map((e, t) => /* @__PURE__ */ k(n, { fill: N[t % N.length] }, e.label))
|
|
703
|
+
}), /* @__PURE__ */ k(i, {
|
|
702
704
|
formatter: (e) => `${e.toFixed(0)}%`,
|
|
703
705
|
contentStyle: {
|
|
704
706
|
backgroundColor: "var(--color-card)",
|
|
@@ -706,66 +708,73 @@ var I = () => {
|
|
|
706
708
|
}
|
|
707
709
|
})] })
|
|
708
710
|
})
|
|
709
|
-
}), /* @__PURE__ */
|
|
711
|
+
}), /* @__PURE__ */ k("ul", {
|
|
710
712
|
className: "grid grid-cols-2 gap-1.5 text-xs",
|
|
711
|
-
children: _.map((e, t) => /* @__PURE__ */
|
|
713
|
+
children: _.map((e, t) => /* @__PURE__ */ A("li", {
|
|
712
714
|
className: "flex items-center gap-2",
|
|
713
715
|
children: [
|
|
714
|
-
/* @__PURE__ */
|
|
716
|
+
/* @__PURE__ */ k("span", {
|
|
715
717
|
"aria-hidden": "true",
|
|
716
718
|
className: "h-2.5 w-2.5 rounded-full",
|
|
717
|
-
style: { backgroundColor:
|
|
719
|
+
style: { backgroundColor: N[t % N.length] }
|
|
718
720
|
}),
|
|
719
|
-
/* @__PURE__ */
|
|
721
|
+
/* @__PURE__ */ k("span", {
|
|
720
722
|
className: "text-text-secondary",
|
|
721
723
|
children: e.label
|
|
722
724
|
}),
|
|
723
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ A("span", {
|
|
724
726
|
className: "ms-auto tabular-nums text-text-primary",
|
|
725
727
|
children: [e.percent.toFixed(0), "%"]
|
|
726
728
|
})
|
|
727
729
|
]
|
|
728
730
|
}, e.label))
|
|
729
|
-
})] }) : /* @__PURE__ */
|
|
731
|
+
})] }) : /* @__PURE__ */ k("p", {
|
|
730
732
|
className: "mt-2 text-sm text-text-secondary",
|
|
731
733
|
children: "No age targeting set."
|
|
732
734
|
})
|
|
733
735
|
]
|
|
734
736
|
}),
|
|
735
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ A("section", {
|
|
736
738
|
"aria-labelledby": "audience-criteria-title",
|
|
737
|
-
children: [/* @__PURE__ */
|
|
739
|
+
children: [/* @__PURE__ */ k("h3", {
|
|
738
740
|
id: "audience-criteria-title",
|
|
739
741
|
className: "border-b border-border-subtle pb-2 text-sm font-semibold text-text-primary",
|
|
740
742
|
children: "Criteria"
|
|
741
|
-
}), /* @__PURE__ */
|
|
743
|
+
}), /* @__PURE__ */ k("ul", {
|
|
742
744
|
className: "mt-3 flex flex-wrap gap-2",
|
|
743
|
-
children: v.map((e) => /* @__PURE__ */
|
|
745
|
+
children: v.map((e) => /* @__PURE__ */ k("li", {
|
|
744
746
|
className: "rounded-full border border-border-subtle bg-bg-sunken px-2.5 py-1 text-xs text-text-primary",
|
|
745
747
|
children: e
|
|
746
748
|
}, e))
|
|
747
749
|
})]
|
|
748
750
|
}),
|
|
749
|
-
/* @__PURE__ */ k("
|
|
751
|
+
/* @__PURE__ */ k("section", {
|
|
752
|
+
className: "border-t border-border-subtle pt-4",
|
|
753
|
+
children: /* @__PURE__ */ k(b, {
|
|
754
|
+
entityType: "HEADSHOTMARKETING_AUDIENCE",
|
|
755
|
+
entityId: a.id
|
|
756
|
+
})
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ A("div", {
|
|
750
759
|
className: "flex flex-wrap gap-2 border-t border-border-subtle pt-4",
|
|
751
760
|
children: [
|
|
752
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ A("button", {
|
|
753
762
|
type: "button",
|
|
754
763
|
onClick: l,
|
|
755
764
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
756
|
-
children: [/* @__PURE__ */
|
|
765
|
+
children: [/* @__PURE__ */ k(w, { className: "h-3.5 w-3.5" }), "Edit"]
|
|
757
766
|
}),
|
|
758
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ A("button", {
|
|
759
768
|
type: "button",
|
|
760
769
|
onClick: u,
|
|
761
770
|
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",
|
|
762
|
-
children: [/* @__PURE__ */
|
|
771
|
+
children: [/* @__PURE__ */ k(C, { className: "h-3.5 w-3.5" }), "Use in Campaign"]
|
|
763
772
|
}),
|
|
764
|
-
/* @__PURE__ */
|
|
773
|
+
/* @__PURE__ */ A("button", {
|
|
765
774
|
type: "button",
|
|
766
775
|
onClick: g,
|
|
767
776
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm font-medium text-status-error-text hover:bg-bg-sunken",
|
|
768
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ k(E, { className: "h-3.5 w-3.5" }), "Delete"]
|
|
769
778
|
})
|
|
770
779
|
]
|
|
771
780
|
})
|
|
@@ -773,6 +782,6 @@ var I = () => {
|
|
|
773
782
|
})]
|
|
774
783
|
});
|
|
775
784
|
};
|
|
776
|
-
export {
|
|
785
|
+
export { L as AudiencesPage };
|
|
777
786
|
|
|
778
787
|
//# sourceMappingURL=AudiencesPage.js.map
|