@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.
- package/dist/generated/wspace-operations.d.ts +251 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +446 -322
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4370 -34
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js +3 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts +19 -0
- package/dist/headshotmarketing/components/TrackedLinksPanel.d.ts.map +1 -0
- package/dist/headshotmarketing/components/TrackedLinksPanel.js +246 -0
- package/dist/headshotmarketing/components/TrackedLinksPanel.js.map +1 -0
- package/dist/headshotmarketing/components/index.d.ts +1 -0
- package/dist/headshotmarketing/components/index.d.ts.map +1 -1
- package/dist/headshotmarketing/components/index.js +1 -0
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js +245 -211
- package/dist/headshotmarketing/pages/ads/AdCampaignDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js +86 -76
- package/dist/headshotmarketing/pages/ads/AdCreativesPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AttributionPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/analytics/AttributionPage.js +249 -244
- package/dist/headshotmarketing/pages/analytics/AttributionPage.js.map +1 -1
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts +4 -0
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js +196 -0
- package/dist/headshotmarketing/pages/analytics/TouchpointLedgerCard.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts +12 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.d.ts.map +1 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js +30 -0
- package/dist/headshotmarketing/pages/content/AIGeneratedBadge.js.map +1 -0
- package/dist/headshotmarketing/pages/content/AIToolsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/AIToolsPage.js +51 -50
- package/dist/headshotmarketing/pages/content/AIToolsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js +409 -408
- package/dist/headshotmarketing/pages/content/ContentCreationPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js +158 -104
- package/dist/headshotmarketing/pages/content/ContentDetailsPage.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts +5 -0
- package/dist/headshotmarketing/pages/content/ContentItemActions.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentItemActions.js +103 -34
- package/dist/headshotmarketing/pages/content/ContentItemActions.js.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js +102 -102
- package/dist/headshotmarketing/pages/content/ContentLibraryCard.js.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js +150 -76
- package/dist/headshotmarketing/pages/crm/LeadCreateModal.js.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.d.ts.map +1 -1
- package/dist/headshotmarketing/pages/social-media/PostsPage.js +254 -246
- package/dist/headshotmarketing/pages/social-media/PostsPage.js.map +1 -1
- package/dist/headshotmarketing/types/index.d.ts +17 -0
- package/dist/headshotmarketing/types/index.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentLibrary.d.ts +6 -0
- package/dist/headshotmarketing/utils/contentLibrary.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentLibrary.js +17 -11
- package/dist/headshotmarketing/utils/contentLibrary.js.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.d.ts +13 -1
- package/dist/headshotmarketing/utils/contentMapper.d.ts.map +1 -1
- package/dist/headshotmarketing/utils/contentMapper.js +26 -13
- package/dist/headshotmarketing/utils/contentMapper.js.map +1 -1
- package/dist/headshotmarketing/utils/trackedLinks.d.ts +75 -0
- package/dist/headshotmarketing/utils/trackedLinks.d.ts.map +1 -0
- package/dist/headshotmarketing/utils/trackedLinks.js +99 -0
- package/dist/headshotmarketing/utils/trackedLinks.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,148 +1,149 @@
|
|
|
1
1
|
import { useDeleteHeadshotmarketingSocialPostMutation as e, useHeadshotmarketingSocialPostsListQuery as t, usePublishHeadshotmarketingSocialPostMutation as n, useRetryHeadshotmarketingSocialPostMutation as ee, useUpdateHeadshotmarketingSocialPostMutation as te } from "../../../generated/wspace-operations.js";
|
|
2
2
|
import { useHeadshotMarketing as ne } from "../../context/HeadshotMarketingContext.js";
|
|
3
|
-
import { cn as r, formatDate as
|
|
4
|
-
import { HeadshotmarketingSocialPostStatus as
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { StatCard as
|
|
7
|
-
import { StatusBadge as
|
|
8
|
-
import { EmptyState as
|
|
9
|
-
import { FilterBar as
|
|
10
|
-
import { Modal as
|
|
11
|
-
import { QueryStateBoundary as
|
|
12
|
-
import { Pagination as
|
|
13
|
-
import { ActionMenu as
|
|
3
|
+
import { cn as r, formatDate as re, formatNumber as i, formatPercentage as ie } from "../../utils/helpers.js";
|
|
4
|
+
import { HeadshotmarketingSocialPostStatus as a } from "../../../generated/wspace-types.js";
|
|
5
|
+
import { PageLayout as ae } from "../../components/PageLayout.js";
|
|
6
|
+
import { StatCard as o } from "../../components/StatCard.js";
|
|
7
|
+
import { StatusBadge as s } from "../../components/StatusBadge.js";
|
|
8
|
+
import { EmptyState as oe } from "../../components/EmptyState.js";
|
|
9
|
+
import { FilterBar as se } from "../../components/FilterBar.js";
|
|
10
|
+
import { Modal as c } from "../../components/Modal.js";
|
|
11
|
+
import { QueryStateBoundary as ce } from "../../components/QueryStateBoundary.js";
|
|
12
|
+
import { Pagination as le } from "../../components/Pagination.js";
|
|
13
|
+
import { ActionMenu as l } from "../../components/ActionMenu.js";
|
|
14
|
+
import { TrackedLinksPanel as ue } from "../../components/TrackedLinksPanel.js";
|
|
14
15
|
import "../../components/index.js";
|
|
15
|
-
import { useHeadshotmarketingBootstrap as
|
|
16
|
-
import { usePagination as
|
|
17
|
-
import { toSocialPostModel as
|
|
16
|
+
import { useHeadshotmarketingBootstrap as de } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
17
|
+
import { usePagination as fe } from "../../hooks/usePagination.js";
|
|
18
|
+
import { toSocialPostModel as pe } from "../../utils/socialMapper.js";
|
|
18
19
|
import "../../hooks/index.js";
|
|
19
|
-
import { useEffect as
|
|
20
|
-
import { AlertTriangle as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { EmphasisPanel as
|
|
20
|
+
import { useEffect as me, useMemo as u, useState as d } from "react";
|
|
21
|
+
import { AlertTriangle as he, ExternalLink as f, Eye as ge, Grid3X3 as _e, Heart as ve, List as ye, MessageCircle as p, Pencil as m, Plus as be, RotateCcw as xe, Send as h, Share2 as Se, Trash2 as g } from "lucide-react";
|
|
22
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
23
|
+
import { EmphasisPanel as Ce, PagePurpose as we } from "@burdenoff/fe-libs/ui";
|
|
23
24
|
//#region src/headshotmarketing/pages/social-media/PostsPage.tsx
|
|
24
|
-
var
|
|
25
|
+
var b = {
|
|
25
26
|
instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
|
|
26
27
|
facebook: "bg-status-info-bg text-status-info-text",
|
|
27
28
|
twitter: "bg-status-info-bg text-status-info-text",
|
|
28
29
|
linkedin: "bg-status-info-bg text-status-info-text",
|
|
29
30
|
youtube: "bg-status-error-bg text-status-error-text",
|
|
30
31
|
tiktok: "bg-bg-sunken text-text-secondary"
|
|
31
|
-
},
|
|
32
|
-
published:
|
|
33
|
-
scheduled:
|
|
34
|
-
draft:
|
|
35
|
-
failed:
|
|
32
|
+
}, Te = {
|
|
33
|
+
published: a.Published,
|
|
34
|
+
scheduled: a.Scheduled,
|
|
35
|
+
draft: a.Draft,
|
|
36
|
+
failed: a.Failed
|
|
36
37
|
};
|
|
37
|
-
function
|
|
38
|
-
return !e || e.status !==
|
|
38
|
+
function x(e) {
|
|
39
|
+
return !e || e.status !== a.Failed ? null : `Publishing failed: ${e.errorMessage ?? "the platform rejected the post."}`;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function Ee(e) {
|
|
41
42
|
return Array.from(new Set(e.match(/#\w+/g) ?? []));
|
|
42
43
|
}
|
|
43
44
|
var S = () => {
|
|
44
|
-
let { navigate:
|
|
45
|
+
let { navigate: a, basePath: S } = ne(), { data: C, refetch: De } = de(), [w, Oe] = d(""), [T, ke] = d("all"), [E, Ae] = d("all"), [D, je] = d("newest"), [O, k] = d("grid"), [A, j] = d(null), [Me, M] = d(!1), [Ne, N] = d(!1), [P, Pe] = d(null), [F, I] = d(""), [Fe, L] = d(null), [R, z] = d(null), B = fe({ initialPageSize: 12 }), { limit: Ie, offset: Le, setPage: V, setTotal: H } = B, { data: U, loading: W, error: Re, refetch: G } = t({
|
|
45
46
|
variables: {
|
|
46
47
|
limit: Ie,
|
|
47
48
|
offset: Le,
|
|
48
49
|
search: w.trim() || void 0,
|
|
49
|
-
status: T === "all" ? void 0 :
|
|
50
|
+
status: T === "all" ? void 0 : Te[T]
|
|
50
51
|
},
|
|
51
52
|
notifyOnNetworkStatusChange: !0
|
|
52
|
-
}), [ze] = e(), [Be] = n(), [Ve] = ee(), [He, { loading:
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
}), [ze] = e(), [Be] = n(), [Ve] = ee(), [He, { loading: K }] = te();
|
|
54
|
+
me(() => {
|
|
55
|
+
V(1);
|
|
55
56
|
}, [
|
|
56
57
|
w,
|
|
57
58
|
T,
|
|
58
|
-
|
|
59
|
-
]),
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
let
|
|
59
|
+
V
|
|
60
|
+
]), me(() => {
|
|
61
|
+
H(U?.headshotmarketingSocialPosts.total ?? 0);
|
|
62
|
+
}, [U?.headshotmarketingSocialPosts.total, H]);
|
|
63
|
+
let q = u(() => Object.fromEntries((C?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.accountName])), [C?.headshotmarketingSocialAccounts.items]), J = u(() => Object.fromEntries((C?.headshotmarketingSocialAccounts.items ?? []).map((e) => [e.id, e.platform === "FACEBOOK" ? "facebook" : e.platform === "INSTAGRAM" ? "instagram" : e.platform === "TWITTER" ? "twitter" : e.platform === "LINKEDIN" ? "linkedin" : e.platform === "TIKTOK" ? "tiktok" : e.platform === "YOUTUBE" ? "youtube" : "instagram"])), [C?.headshotmarketingSocialAccounts.items]), Y = u(() => (C?.headshotmarketingSocialPosts.items ?? []).map((e) => pe(e, q, J)), [
|
|
63
64
|
C?.headshotmarketingSocialPosts.items,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
]),
|
|
67
|
-
let e = (
|
|
65
|
+
q,
|
|
66
|
+
J
|
|
67
|
+
]), X = u(() => {
|
|
68
|
+
let e = (U?.headshotmarketingSocialPosts.items ?? []).map((e) => pe(e, q, J));
|
|
68
69
|
return E !== "all" && (e = e.filter((e) => e.platform === E)), [...e].sort((e, t) => D === "newest" ? new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime() : D === "oldest" ? new Date(e.createdAt).getTime() - new Date(t.createdAt).getTime() : D === "engagement" ? t.metrics.engagementRate - e.metrics.engagementRate : 0);
|
|
69
70
|
}, [
|
|
70
|
-
|
|
71
|
-
K,
|
|
71
|
+
U?.headshotmarketingSocialPosts.items,
|
|
72
72
|
q,
|
|
73
|
+
J,
|
|
73
74
|
E,
|
|
74
75
|
D
|
|
75
|
-
]),
|
|
76
|
-
await Promise.all([
|
|
77
|
-
},
|
|
76
|
+
]), Ue = Y.length, We = Y.filter((e) => e.status === "published").length, Ge = Y.filter((e) => e.status === "scheduled").length, Ke = Y.reduce((e, t) => e + t.metrics.likes + t.metrics.comments + t.metrics.shares, 0), Z = Y.filter((e) => e.status === "published"), qe = Z.length > 0 ? Z.reduce((e, t) => e + t.metrics.engagementRate, 0) / Z.length : 0, Q = async () => {
|
|
77
|
+
await Promise.all([G(), De()]);
|
|
78
|
+
}, Je = async (e) => {
|
|
78
79
|
if (window.confirm("Delete this post? This cannot be undone.")) {
|
|
79
|
-
|
|
80
|
+
z(null);
|
|
80
81
|
try {
|
|
81
|
-
await ze({ variables: { id: e.id } }),
|
|
82
|
+
await ze({ variables: { id: e.id } }), A?.id === e.id && M(!1), await Q();
|
|
82
83
|
} catch (e) {
|
|
83
|
-
|
|
84
|
+
z(e instanceof Error ? e.message : "Failed to delete post.");
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
|
-
},
|
|
87
|
-
|
|
87
|
+
}, Ye = async (e) => {
|
|
88
|
+
z(null);
|
|
88
89
|
try {
|
|
89
|
-
let { data: t } = await Be({ variables: { id: e.id } }), n =
|
|
90
|
-
n &&
|
|
90
|
+
let { data: t } = await Be({ variables: { id: e.id } }), n = x(t?.publishHeadshotmarketingSocialPost);
|
|
91
|
+
n && z(n), A?.id === e.id && M(!1), await Q();
|
|
91
92
|
} catch (e) {
|
|
92
|
-
|
|
93
|
+
z(e instanceof Error ? e.message : "Failed to publish post.");
|
|
93
94
|
}
|
|
94
|
-
},
|
|
95
|
-
|
|
95
|
+
}, Xe = async (e) => {
|
|
96
|
+
z(null);
|
|
96
97
|
try {
|
|
97
|
-
let { data: t } = await Ve({ variables: { id: e.id } }), n =
|
|
98
|
-
n &&
|
|
98
|
+
let { data: t } = await Ve({ variables: { id: e.id } }), n = x(t?.retryHeadshotmarketingSocialPost);
|
|
99
|
+
n && z(n), A?.id === e.id && M(!1), await Q();
|
|
99
100
|
} catch (e) {
|
|
100
|
-
|
|
101
|
+
z(e instanceof Error ? e.message : "Failed to retry post.");
|
|
101
102
|
}
|
|
102
|
-
},
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
if (!
|
|
106
|
-
let e =
|
|
103
|
+
}, Ze = (e) => {
|
|
104
|
+
Pe(e), I(e.content), L(null), M(!1), N(!0);
|
|
105
|
+
}, Qe = async () => {
|
|
106
|
+
if (!P) return;
|
|
107
|
+
let e = F.trim();
|
|
107
108
|
if (!e) {
|
|
108
|
-
|
|
109
|
+
L("Post content is required.");
|
|
109
110
|
return;
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
+
L(null);
|
|
112
113
|
try {
|
|
113
114
|
await He({ variables: {
|
|
114
|
-
id:
|
|
115
|
+
id: P.id,
|
|
115
116
|
input: {
|
|
116
117
|
content: e,
|
|
117
|
-
tags:
|
|
118
|
+
tags: Ee(e)
|
|
118
119
|
}
|
|
119
|
-
} }),
|
|
120
|
+
} }), N(!1), await Q();
|
|
120
121
|
} catch (e) {
|
|
121
|
-
|
|
122
|
+
L(e instanceof Error ? e.message : "Failed to save post.");
|
|
122
123
|
}
|
|
123
|
-
},
|
|
124
|
+
}, $e = (e) => [
|
|
124
125
|
{
|
|
125
126
|
key: "edit",
|
|
126
127
|
label: "Edit",
|
|
127
|
-
icon: /* @__PURE__ */
|
|
128
|
-
onClick: () =>
|
|
128
|
+
icon: /* @__PURE__ */ v(m, { className: "h-4 w-4" }),
|
|
129
|
+
onClick: () => Ze(e)
|
|
129
130
|
},
|
|
130
131
|
...e.status === "draft" || e.status === "scheduled" ? [{
|
|
131
132
|
key: "publish",
|
|
132
133
|
label: "Publish now",
|
|
133
|
-
icon: /* @__PURE__ */
|
|
134
|
-
onClick: () => void
|
|
134
|
+
icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" }),
|
|
135
|
+
onClick: () => void Ye(e)
|
|
135
136
|
}] : [],
|
|
136
137
|
...e.status === "failed" ? [{
|
|
137
138
|
key: "retry",
|
|
138
139
|
label: "Retry publish",
|
|
139
|
-
icon: /* @__PURE__ */
|
|
140
|
-
onClick: () => void
|
|
140
|
+
icon: /* @__PURE__ */ v(xe, { className: "h-4 w-4" }),
|
|
141
|
+
onClick: () => void Xe(e)
|
|
141
142
|
}] : [],
|
|
142
143
|
...e.postUrl ? [{
|
|
143
144
|
key: "view",
|
|
144
145
|
label: "View on platform",
|
|
145
|
-
icon: /* @__PURE__ */
|
|
146
|
+
icon: /* @__PURE__ */ v(f, { className: "h-4 w-4" }),
|
|
146
147
|
onClick: () => {
|
|
147
148
|
window.open(e.postUrl ?? "", "_blank", "noopener,noreferrer");
|
|
148
149
|
}
|
|
@@ -150,387 +151,394 @@ var S = () => {
|
|
|
150
151
|
{
|
|
151
152
|
key: "delete",
|
|
152
153
|
label: "Delete",
|
|
153
|
-
icon: /* @__PURE__ */
|
|
154
|
+
icon: /* @__PURE__ */ v(g, { className: "h-4 w-4" }),
|
|
154
155
|
danger: !0,
|
|
155
|
-
onClick: () => void
|
|
156
|
+
onClick: () => void Je(e)
|
|
156
157
|
}
|
|
157
|
-
], $ =
|
|
158
|
-
return /* @__PURE__ */
|
|
158
|
+
], $ = Ue > 0;
|
|
159
|
+
return /* @__PURE__ */ y(ae, {
|
|
159
160
|
title: "Posts",
|
|
160
161
|
description: "Manage all your social media posts",
|
|
161
|
-
actions: /* @__PURE__ */
|
|
162
|
-
onClick: () =>
|
|
162
|
+
actions: /* @__PURE__ */ y("button", {
|
|
163
|
+
onClick: () => a(S + "/social/compose"),
|
|
163
164
|
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",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ v(be, { className: "h-4 w-4" }), "Create Post"]
|
|
165
166
|
}),
|
|
166
167
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ v(we, { children: "Every social post you've drafted, scheduled or published, in one feed. Filter by status or platform, switch between grid and list views, and open any post to see how it performed — so you can learn what resonates and post more of it." }),
|
|
169
|
+
/* @__PURE__ */ v(Ce, { children: /* @__PURE__ */ y("div", {
|
|
169
170
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
|
|
170
171
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ v(o, {
|
|
172
173
|
title: "Total Posts",
|
|
173
|
-
value:
|
|
174
|
-
icon: /* @__PURE__ */
|
|
174
|
+
value: Ue,
|
|
175
|
+
icon: /* @__PURE__ */ v(p, { className: "h-4 w-4" })
|
|
175
176
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ v(o, {
|
|
177
178
|
title: "Published",
|
|
178
|
-
value:
|
|
179
|
-
icon: /* @__PURE__ */
|
|
179
|
+
value: We,
|
|
180
|
+
icon: /* @__PURE__ */ v(ge, { className: "h-4 w-4" })
|
|
180
181
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ v(o, {
|
|
182
183
|
title: "Scheduled",
|
|
183
|
-
value:
|
|
184
|
+
value: Ge,
|
|
184
185
|
change: 12
|
|
185
186
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ v(o, {
|
|
187
188
|
title: "Total Engagement",
|
|
188
|
-
value:
|
|
189
|
+
value: i(Ke),
|
|
189
190
|
change: 8.4
|
|
190
191
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ v(o, {
|
|
192
193
|
title: "Avg Engagement",
|
|
193
|
-
value:
|
|
194
|
+
value: ie(qe),
|
|
194
195
|
change: 1.2
|
|
195
196
|
})
|
|
196
197
|
]
|
|
197
198
|
}) }),
|
|
198
|
-
|
|
199
|
+
R && /* @__PURE__ */ v("div", {
|
|
199
200
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
200
|
-
children:
|
|
201
|
+
children: R
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ v(se, {
|
|
203
204
|
searchValue: w,
|
|
204
|
-
onSearchChange:
|
|
205
|
+
onSearchChange: Oe,
|
|
205
206
|
searchPlaceholder: "Search posts...",
|
|
206
|
-
filters: /* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
filters: /* @__PURE__ */ y(_, { children: [
|
|
208
|
+
/* @__PURE__ */ y("select", {
|
|
208
209
|
value: T,
|
|
209
|
-
onChange: (e) =>
|
|
210
|
+
onChange: (e) => ke(e.target.value),
|
|
210
211
|
className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
|
|
211
212
|
children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ v("option", {
|
|
213
214
|
value: "all",
|
|
214
215
|
children: "All Status"
|
|
215
216
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ v("option", {
|
|
217
218
|
value: "published",
|
|
218
219
|
children: "Published"
|
|
219
220
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ v("option", {
|
|
221
222
|
value: "scheduled",
|
|
222
223
|
children: "Scheduled"
|
|
223
224
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ v("option", {
|
|
225
226
|
value: "draft",
|
|
226
227
|
children: "Draft"
|
|
227
228
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ v("option", {
|
|
229
230
|
value: "failed",
|
|
230
231
|
children: "Failed"
|
|
231
232
|
})
|
|
232
233
|
]
|
|
233
234
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ y("select", {
|
|
235
236
|
value: E,
|
|
236
|
-
onChange: (e) =>
|
|
237
|
+
onChange: (e) => Ae(e.target.value),
|
|
237
238
|
className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
|
|
238
239
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ v("option", {
|
|
240
241
|
value: "all",
|
|
241
242
|
children: "All Platforms"
|
|
242
243
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ v("option", {
|
|
244
245
|
value: "instagram",
|
|
245
246
|
children: "Instagram"
|
|
246
247
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ v("option", {
|
|
248
249
|
value: "facebook",
|
|
249
250
|
children: "Facebook"
|
|
250
251
|
}),
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ v("option", {
|
|
252
253
|
value: "twitter",
|
|
253
254
|
children: "Twitter"
|
|
254
255
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ v("option", {
|
|
256
257
|
value: "linkedin",
|
|
257
258
|
children: "LinkedIn"
|
|
258
259
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ v("option", {
|
|
260
261
|
value: "tiktok",
|
|
261
262
|
children: "TikTok"
|
|
262
263
|
})
|
|
263
264
|
]
|
|
264
265
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ y("select", {
|
|
266
267
|
value: D,
|
|
267
|
-
onChange: (e) =>
|
|
268
|
+
onChange: (e) => je(e.target.value),
|
|
268
269
|
className: "rounded-md border border-border-seam bg-gloss-card shadow-pop px-3 py-2 text-sm text-text-primary",
|
|
269
270
|
children: [
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ v("option", {
|
|
271
272
|
value: "newest",
|
|
272
273
|
children: "Newest"
|
|
273
274
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ v("option", {
|
|
275
276
|
value: "oldest",
|
|
276
277
|
children: "Oldest"
|
|
277
278
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ v("option", {
|
|
279
280
|
value: "engagement",
|
|
280
281
|
children: "Engagement"
|
|
281
282
|
})
|
|
282
283
|
]
|
|
283
284
|
})
|
|
284
285
|
] }),
|
|
285
|
-
actions: /* @__PURE__ */
|
|
286
|
+
actions: /* @__PURE__ */ y("div", {
|
|
286
287
|
className: "flex rounded-md border border-border-subtle",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
288
|
-
onClick: () =>
|
|
288
|
+
children: [/* @__PURE__ */ v("button", {
|
|
289
|
+
onClick: () => k("grid"),
|
|
289
290
|
className: r("p-2", O === "grid" ? "bg-foreground text-background" : "text-text-secondary"),
|
|
290
291
|
"aria-label": "Grid view",
|
|
291
|
-
children: /* @__PURE__ */
|
|
292
|
-
}), /* @__PURE__ */
|
|
293
|
-
onClick: () =>
|
|
292
|
+
children: /* @__PURE__ */ v(_e, { className: "h-4 w-4" })
|
|
293
|
+
}), /* @__PURE__ */ v("button", {
|
|
294
|
+
onClick: () => k("list"),
|
|
294
295
|
className: r("p-2", O === "list" ? "bg-foreground text-background" : "text-text-secondary"),
|
|
295
296
|
"aria-label": "List view",
|
|
296
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ v(ye, { className: "h-4 w-4" })
|
|
297
298
|
})]
|
|
298
299
|
})
|
|
299
300
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
loading:
|
|
301
|
+
/* @__PURE__ */ y(ce, {
|
|
302
|
+
loading: W,
|
|
302
303
|
error: Re,
|
|
303
|
-
onRetry:
|
|
304
|
-
hasData: !!
|
|
305
|
-
children: [
|
|
304
|
+
onRetry: G,
|
|
305
|
+
hasData: !!U,
|
|
306
|
+
children: [X.length === 0 ? /* @__PURE__ */ v(oe, {
|
|
306
307
|
illustration: $ ? "empty-search" : "empty-notifications",
|
|
307
308
|
title: $ ? "No posts match your filters" : "No posts yet",
|
|
308
309
|
description: $ ? "Try a different search term, status or platform." : "Compose your first social post to start building your feed.",
|
|
309
|
-
action: $ ? void 0 : /* @__PURE__ */
|
|
310
|
-
onClick: () =>
|
|
310
|
+
action: $ ? void 0 : /* @__PURE__ */ y("button", {
|
|
311
|
+
onClick: () => a(S + "/social/compose"),
|
|
311
312
|
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",
|
|
312
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ v(be, { className: "h-4 w-4" }), "Create Post"]
|
|
313
314
|
})
|
|
314
|
-
}) : O === "grid" ? /* @__PURE__ */
|
|
315
|
+
}) : O === "grid" ? /* @__PURE__ */ v("div", {
|
|
315
316
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
316
|
-
children:
|
|
317
|
+
children: X.map((e) => /* @__PURE__ */ y("div", {
|
|
317
318
|
onClick: () => {
|
|
318
|
-
|
|
319
|
+
j(e), M(!0);
|
|
319
320
|
},
|
|
320
321
|
className: "cursor-pointer rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 space-y-3 hover:border-foreground/30 transition-colors",
|
|
321
322
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ y("div", {
|
|
323
324
|
className: "flex items-center justify-between",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
325
|
-
className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize",
|
|
325
|
+
children: [/* @__PURE__ */ v("span", {
|
|
326
|
+
className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", b[e.platform]),
|
|
326
327
|
children: e.platform
|
|
327
|
-
}), /* @__PURE__ */
|
|
328
|
+
}), /* @__PURE__ */ y("div", {
|
|
328
329
|
className: "flex items-center gap-1",
|
|
329
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ v(s, { status: e.status }), /* @__PURE__ */ v(l, {
|
|
330
331
|
id: `hm-post-grid-${e.id}`,
|
|
331
|
-
items:
|
|
332
|
+
items: $e(e),
|
|
332
333
|
buttonLabel: "Post actions"
|
|
333
334
|
})]
|
|
334
335
|
})]
|
|
335
336
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ v("p", {
|
|
337
338
|
className: "text-sm text-text-primary line-clamp-3",
|
|
338
339
|
children: e.content
|
|
339
340
|
}),
|
|
340
|
-
e.status === "failed" && e.errorMessage && /* @__PURE__ */
|
|
341
|
+
e.status === "failed" && e.errorMessage && /* @__PURE__ */ y("p", {
|
|
341
342
|
className: "flex items-start gap-1.5 text-xs text-status-error-text",
|
|
342
343
|
"data-testid": "hm-post-error",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
344
|
+
children: [/* @__PURE__ */ v(he, { className: "mt-0.5 h-3 w-3 shrink-0" }), /* @__PURE__ */ v("span", {
|
|
344
345
|
className: "line-clamp-2",
|
|
345
346
|
children: e.errorMessage
|
|
346
347
|
})]
|
|
347
348
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ y("div", {
|
|
349
350
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ v("span", { children: re(e.createdAt) }), e.status === "published" && /* @__PURE__ */ y("div", {
|
|
351
352
|
className: "flex items-center gap-3",
|
|
352
353
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ y("span", {
|
|
354
355
|
className: "flex items-center gap-1",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
356
|
+
children: [/* @__PURE__ */ v(ve, { className: "h-3 w-3" }), i(e.metrics.likes)]
|
|
356
357
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ y("span", {
|
|
358
359
|
className: "flex items-center gap-1",
|
|
359
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ v(p, { className: "h-3 w-3" }), i(e.metrics.comments)]
|
|
360
361
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ y("span", {
|
|
362
363
|
className: "flex items-center gap-1",
|
|
363
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ v(Se, { className: "h-3 w-3" }), i(e.metrics.shares)]
|
|
364
365
|
})
|
|
365
366
|
]
|
|
366
367
|
})]
|
|
367
368
|
})
|
|
368
369
|
]
|
|
369
370
|
}, e.id))
|
|
370
|
-
}) : /* @__PURE__ */
|
|
371
|
+
}) : /* @__PURE__ */ v("div", {
|
|
371
372
|
className: "space-y-2",
|
|
372
|
-
children:
|
|
373
|
+
children: X.map((e) => /* @__PURE__ */ y("div", {
|
|
373
374
|
onClick: () => {
|
|
374
|
-
|
|
375
|
+
j(e), M(!0);
|
|
375
376
|
},
|
|
376
377
|
className: "cursor-pointer flex flex-wrap items-center gap-4 rounded-lg border border-border-seam bg-gloss-card shadow-pop p-4 hover:border-foreground/30 transition-colors",
|
|
377
378
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize whitespace-nowrap",
|
|
379
|
+
/* @__PURE__ */ v("span", {
|
|
380
|
+
className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize whitespace-nowrap", b[e.platform]),
|
|
380
381
|
children: e.platform
|
|
381
382
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ v("p", {
|
|
383
384
|
className: "text-sm text-text-primary flex-1 min-w-[8rem] truncate",
|
|
384
385
|
children: e.content
|
|
385
386
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
-
e.status === "published" && /* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ v(s, { status: e.status }),
|
|
388
|
+
e.status === "published" && /* @__PURE__ */ y("div", {
|
|
388
389
|
className: "flex items-center gap-3 text-xs text-text-secondary",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ y("span", { children: [i(e.metrics.likes), " likes"] }), /* @__PURE__ */ y("span", { children: [i(e.metrics.reach), " reach"] })]
|
|
390
391
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ v("span", {
|
|
392
393
|
className: "text-xs text-text-secondary whitespace-nowrap",
|
|
393
|
-
children:
|
|
394
|
+
children: re(e.createdAt)
|
|
394
395
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ v(l, {
|
|
396
397
|
id: `hm-post-list-${e.id}`,
|
|
397
|
-
items:
|
|
398
|
+
items: $e(e),
|
|
398
399
|
buttonLabel: "Post actions"
|
|
399
400
|
})
|
|
400
401
|
]
|
|
401
402
|
}, e.id))
|
|
402
|
-
}), $ && /* @__PURE__ */
|
|
403
|
-
page:
|
|
404
|
-
pageSize:
|
|
405
|
-
total:
|
|
406
|
-
onPageChange:
|
|
407
|
-
onPageSizeChange:
|
|
408
|
-
disabled:
|
|
403
|
+
}), $ && /* @__PURE__ */ v(le, {
|
|
404
|
+
page: B.page,
|
|
405
|
+
pageSize: B.pageSize,
|
|
406
|
+
total: B.total,
|
|
407
|
+
onPageChange: B.setPage,
|
|
408
|
+
onPageSizeChange: B.setPageSize,
|
|
409
|
+
disabled: W
|
|
409
410
|
})]
|
|
410
411
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
412
|
-
open:
|
|
413
|
-
onClose: () =>
|
|
412
|
+
/* @__PURE__ */ v(c, {
|
|
413
|
+
open: Me,
|
|
414
|
+
onClose: () => M(!1),
|
|
414
415
|
title: "Post Details",
|
|
415
416
|
size: "lg",
|
|
416
|
-
footer:
|
|
417
|
-
/* @__PURE__ */
|
|
417
|
+
footer: A ? /* @__PURE__ */ y(_, { children: [
|
|
418
|
+
/* @__PURE__ */ y("button", {
|
|
418
419
|
type: "button",
|
|
419
|
-
onClick: () =>
|
|
420
|
+
onClick: () => Ze(A),
|
|
420
421
|
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ v(m, { className: "h-4 w-4" }), "Edit"]
|
|
422
423
|
}),
|
|
423
|
-
|
|
424
|
+
A.status === "failed" && /* @__PURE__ */ y("button", {
|
|
424
425
|
type: "button",
|
|
425
|
-
onClick: () => void
|
|
426
|
+
onClick: () => void Xe(A),
|
|
426
427
|
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",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ v(xe, { className: "h-4 w-4" }), "Retry publish"]
|
|
428
429
|
}),
|
|
429
|
-
(
|
|
430
|
+
(A.status === "draft" || A.status === "scheduled") && /* @__PURE__ */ y("button", {
|
|
430
431
|
type: "button",
|
|
431
|
-
onClick: () => void
|
|
432
|
+
onClick: () => void Ye(A),
|
|
432
433
|
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",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ v(h, { className: "h-4 w-4" }), "Publish"]
|
|
434
435
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ y("button", {
|
|
436
437
|
type: "button",
|
|
437
|
-
onClick: () => void
|
|
438
|
+
onClick: () => void Je(A),
|
|
438
439
|
className: "inline-flex items-center gap-2 rounded-md border border-status-error-border px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/40",
|
|
439
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ v(g, { className: "h-4 w-4" }), "Delete"]
|
|
440
441
|
})
|
|
441
442
|
] }) : void 0,
|
|
442
|
-
children:
|
|
443
|
+
children: A && /* @__PURE__ */ y("div", {
|
|
443
444
|
className: "space-y-4",
|
|
444
445
|
children: [
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ y("div", {
|
|
446
447
|
className: "flex flex-wrap items-center gap-3",
|
|
447
448
|
children: [
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize",
|
|
450
|
-
children:
|
|
449
|
+
/* @__PURE__ */ v("span", {
|
|
450
|
+
className: r("rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", b[A.platform]),
|
|
451
|
+
children: A.platform
|
|
451
452
|
}),
|
|
452
|
-
/* @__PURE__ */
|
|
453
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ v(s, { status: A.status }),
|
|
454
|
+
/* @__PURE__ */ y("span", {
|
|
454
455
|
className: "text-xs text-text-secondary",
|
|
455
|
-
children: ["by ",
|
|
456
|
+
children: ["by ", A.author]
|
|
456
457
|
})
|
|
457
458
|
]
|
|
458
459
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ v("p", {
|
|
460
461
|
className: "text-sm text-text-primary whitespace-pre-wrap",
|
|
461
|
-
children:
|
|
462
|
+
children: A.content
|
|
462
463
|
}),
|
|
463
|
-
|
|
464
|
+
A.status === "scheduled" && A.scheduledAt && /* @__PURE__ */ y("p", {
|
|
464
465
|
className: "text-xs text-text-secondary",
|
|
465
466
|
children: [
|
|
466
467
|
"Publishes automatically at",
|
|
467
468
|
" ",
|
|
468
|
-
new Date(
|
|
469
|
+
new Date(A.scheduledAt).toLocaleString()
|
|
469
470
|
]
|
|
470
471
|
}),
|
|
471
|
-
|
|
472
|
+
A.status === "failed" && /* @__PURE__ */ y("div", {
|
|
472
473
|
className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
|
|
473
474
|
"data-testid": "hm-post-detail-error",
|
|
474
475
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ v("p", {
|
|
476
477
|
className: "font-medium",
|
|
477
478
|
children: "Publishing failed"
|
|
478
479
|
}),
|
|
479
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ v("p", {
|
|
480
481
|
className: "mt-1 break-words",
|
|
481
|
-
children:
|
|
482
|
+
children: A.errorMessage ?? "The platform rejected the post."
|
|
482
483
|
}),
|
|
483
|
-
(
|
|
484
|
+
(A.deliveryAttempts ?? 0) > 0 && /* @__PURE__ */ y("p", {
|
|
484
485
|
className: "mt-1 text-xs",
|
|
485
|
-
children: ["Failed attempts: ",
|
|
486
|
+
children: ["Failed attempts: ", A.deliveryAttempts]
|
|
486
487
|
})
|
|
487
488
|
]
|
|
488
489
|
}),
|
|
489
|
-
|
|
490
|
-
href:
|
|
490
|
+
A.postUrl && /* @__PURE__ */ y("a", {
|
|
491
|
+
href: A.postUrl,
|
|
491
492
|
target: "_blank",
|
|
492
493
|
rel: "noopener noreferrer",
|
|
493
494
|
className: "inline-flex items-center gap-1.5 text-sm font-medium text-text-primary underline underline-offset-2 hover:text-text-secondary",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ v(f, { className: "h-4 w-4" }), "View on platform"]
|
|
495
496
|
}),
|
|
496
|
-
|
|
497
|
+
A.status === "published" && /* @__PURE__ */ y("div", {
|
|
497
498
|
className: "grid grid-cols-3 gap-4",
|
|
498
499
|
children: [
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
+
/* @__PURE__ */ y("div", {
|
|
500
501
|
className: "text-center p-3 rounded-md bg-bg-sunken/50",
|
|
501
|
-
children: [/* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ v("p", {
|
|
502
503
|
className: "text-lg font-bold text-text-primary",
|
|
503
|
-
children:
|
|
504
|
-
}), /* @__PURE__ */
|
|
504
|
+
children: i(A.metrics.likes)
|
|
505
|
+
}), /* @__PURE__ */ v("p", {
|
|
505
506
|
className: "text-xs text-text-secondary",
|
|
506
507
|
children: "Likes"
|
|
507
508
|
})]
|
|
508
509
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
+
/* @__PURE__ */ y("div", {
|
|
510
511
|
className: "text-center p-3 rounded-md bg-bg-sunken/50",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ v("p", {
|
|
512
513
|
className: "text-lg font-bold text-text-primary",
|
|
513
|
-
children:
|
|
514
|
-
}), /* @__PURE__ */
|
|
514
|
+
children: i(A.metrics.comments)
|
|
515
|
+
}), /* @__PURE__ */ v("p", {
|
|
515
516
|
className: "text-xs text-text-secondary",
|
|
516
517
|
children: "Comments"
|
|
517
518
|
})]
|
|
518
519
|
}),
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ y("div", {
|
|
520
521
|
className: "text-center p-3 rounded-md bg-bg-sunken/50",
|
|
521
|
-
children: [/* @__PURE__ */
|
|
522
|
+
children: [/* @__PURE__ */ v("p", {
|
|
522
523
|
className: "text-lg font-bold text-text-primary",
|
|
523
|
-
children:
|
|
524
|
-
}), /* @__PURE__ */
|
|
524
|
+
children: i(A.metrics.reach)
|
|
525
|
+
}), /* @__PURE__ */ v("p", {
|
|
525
526
|
className: "text-xs text-text-secondary",
|
|
526
527
|
children: "Reach"
|
|
527
528
|
})]
|
|
528
529
|
})
|
|
529
530
|
]
|
|
530
531
|
}),
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ v(ue, {
|
|
533
|
+
sourceType: "SOCIAL_POST",
|
|
534
|
+
sourceId: A.id,
|
|
535
|
+
title: "Tracked links",
|
|
536
|
+
description: "Links in this post are replaced with tracked URLs when it is published through a connected account, so each click is counted and attributed as a SOCIAL_CLICK touchpoint.",
|
|
537
|
+
emptyMessage: A.status === "published" ? "No tracked links for this post. Posts without links, or published before tracking was enabled, have none." : "Tracked links are created when this post is published."
|
|
538
|
+
}, A.id),
|
|
539
|
+
/* @__PURE__ */ v("div", {
|
|
532
540
|
className: "flex flex-wrap gap-1",
|
|
533
|
-
children:
|
|
541
|
+
children: A.tags.map((e) => /* @__PURE__ */ v("span", {
|
|
534
542
|
className: "rounded-full border border-border-subtle px-2.5 py-0.5 text-xs text-text-secondary",
|
|
535
543
|
children: e.startsWith("#") ? e : `#${e}`
|
|
536
544
|
}, e))
|
|
@@ -538,32 +546,32 @@ var S = () => {
|
|
|
538
546
|
]
|
|
539
547
|
})
|
|
540
548
|
}),
|
|
541
|
-
/* @__PURE__ */
|
|
542
|
-
open:
|
|
543
|
-
onClose: () =>
|
|
549
|
+
/* @__PURE__ */ v(c, {
|
|
550
|
+
open: Ne,
|
|
551
|
+
onClose: () => N(!1),
|
|
544
552
|
title: "Edit Post",
|
|
545
553
|
description: "Update the caption. Hashtags are re-detected automatically.",
|
|
546
554
|
size: "lg",
|
|
547
|
-
footer: /* @__PURE__ */
|
|
555
|
+
footer: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
|
|
548
556
|
type: "button",
|
|
549
|
-
onClick: () =>
|
|
557
|
+
onClick: () => N(!1),
|
|
550
558
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
551
559
|
children: "Cancel"
|
|
552
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ v("button", {
|
|
553
561
|
type: "button",
|
|
554
|
-
onClick:
|
|
555
|
-
disabled:
|
|
562
|
+
onClick: Qe,
|
|
563
|
+
disabled: K,
|
|
556
564
|
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 disabled:opacity-60",
|
|
557
|
-
children:
|
|
565
|
+
children: K ? "Saving..." : "Save changes"
|
|
558
566
|
})] }),
|
|
559
|
-
children: /* @__PURE__ */
|
|
567
|
+
children: /* @__PURE__ */ y("div", {
|
|
560
568
|
className: "space-y-3",
|
|
561
|
-
children: [
|
|
569
|
+
children: [Fe && /* @__PURE__ */ v("div", {
|
|
562
570
|
className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
|
|
563
|
-
children:
|
|
564
|
-
}), /* @__PURE__ */
|
|
565
|
-
value:
|
|
566
|
-
onChange: (e) =>
|
|
571
|
+
children: Fe
|
|
572
|
+
}), /* @__PURE__ */ v("textarea", {
|
|
573
|
+
value: F,
|
|
574
|
+
onChange: (e) => I(e.target.value),
|
|
567
575
|
rows: 6,
|
|
568
576
|
className: "w-full resize-none rounded-md border border-border-subtle bg-bg-surface px-4 py-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
569
577
|
placeholder: "Write your post content..."
|