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