@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,23 +1,23 @@
|
|
|
1
1
|
import { useCreateHeadshotmarketingSocialAccountMutation as e, useDeleteHeadshotmarketingSocialAccountMutation as t, useDisconnectHeadshotmarketingSocialAccountMutation as n, useUpdateHeadshotmarketingSocialAccountMutation as r } from "../../../generated/wspace-operations.js";
|
|
2
|
-
import { HeadshotmarketingSocialAccountStatus as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { PageLayout as
|
|
5
|
-
import { StatCard as
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { Modal as
|
|
8
|
-
import { QueryStateBoundary as
|
|
2
|
+
import { HeadshotmarketingSocialAccountStatus as ee, HeadshotmarketingSocialPlatform as i } from "../../../generated/wspace-types.js";
|
|
3
|
+
import { cn as a, formatNumber as o, formatPercentage as te } from "../../utils/helpers.js";
|
|
4
|
+
import { PageLayout as ne } from "../../components/PageLayout.js";
|
|
5
|
+
import { StatCard as s } from "../../components/StatCard.js";
|
|
6
|
+
import { EmptyState as c } from "../../components/EmptyState.js";
|
|
7
|
+
import { Modal as l } from "../../components/Modal.js";
|
|
8
|
+
import { QueryStateBoundary as u } from "../../components/QueryStateBoundary.js";
|
|
9
9
|
import { toSocialAccountModel as d } from "../../utils/socialMapper.js";
|
|
10
10
|
import { useHeadshotmarketingBootstrap as f } from "../../hooks/useHeadshotmarketingBootstrap.js";
|
|
11
11
|
import { summarizeSocialAccounts as p } from "../../utils/socialAccountStats.js";
|
|
12
12
|
import "../../components/index.js";
|
|
13
13
|
import "../../hooks/index.js";
|
|
14
|
-
import { useSocialConnect as
|
|
15
|
-
import { connectableProviderFor as
|
|
16
|
-
import { SocialAccountCard as
|
|
17
|
-
import { useMemo as
|
|
18
|
-
import { CheckCircle as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { EmphasisPanel as
|
|
14
|
+
import { useSocialConnect as re } from "./useSocialConnect.js";
|
|
15
|
+
import { connectableProviderFor as m } from "./socialConnect.js";
|
|
16
|
+
import { SocialAccountCard as ie } from "./SocialAccountCard.js";
|
|
17
|
+
import { useMemo as h, useState as g } from "react";
|
|
18
|
+
import { CheckCircle as ae, FileText as oe, Link2 as se, Loader2 as ce, Plus as le, RefreshCw as _, TrendingUp as v, Users as y } from "lucide-react";
|
|
19
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
20
|
+
import { EmphasisPanel as C, PagePurpose as ue, ThemedSelect as de, useConfirm as fe } from "@burdenoff/fe-libs/ui";
|
|
21
21
|
// src/headshotmarketing/pages/social-media/AccountsPage.tsx
|
|
22
22
|
var pe = {
|
|
23
23
|
instagram: "bg-[var(--color-accent-soft)] text-action-primary-bg",
|
|
@@ -27,13 +27,13 @@ var pe = {
|
|
|
27
27
|
youtube: "bg-status-error-bg text-status-error-text",
|
|
28
28
|
tiktok: "bg-bg-sunken text-text-secondary"
|
|
29
29
|
}, me = {
|
|
30
|
-
facebook:
|
|
31
|
-
instagram:
|
|
32
|
-
twitter:
|
|
33
|
-
linkedin:
|
|
34
|
-
youtube:
|
|
35
|
-
tiktok:
|
|
36
|
-
},
|
|
30
|
+
facebook: i.Facebook,
|
|
31
|
+
instagram: i.Instagram,
|
|
32
|
+
twitter: i.Twitter,
|
|
33
|
+
linkedin: i.Linkedin,
|
|
34
|
+
youtube: i.Youtube,
|
|
35
|
+
tiktok: i.Tiktok
|
|
36
|
+
}, w = [
|
|
37
37
|
{
|
|
38
38
|
key: "instagram",
|
|
39
39
|
label: "Instagram",
|
|
@@ -65,212 +65,217 @@ var pe = {
|
|
|
65
65
|
description: "Short-form video content"
|
|
66
66
|
}
|
|
67
67
|
];
|
|
68
|
-
function
|
|
68
|
+
function T(e) {
|
|
69
69
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
70
70
|
}
|
|
71
|
-
var
|
|
71
|
+
var E = {
|
|
72
72
|
platform: "instagram",
|
|
73
73
|
accountName: "",
|
|
74
74
|
profileUrl: "",
|
|
75
75
|
followerCount: ""
|
|
76
|
-
},
|
|
77
|
-
let { data:
|
|
78
|
-
await
|
|
79
|
-
}), [
|
|
80
|
-
let e =
|
|
81
|
-
return e ?
|
|
76
|
+
}, D = () => {
|
|
77
|
+
let i = fe(), { data: D, loading: O, error: k, refetch: A } = f(), [j, { loading: M }] = e(), [N] = r(), [P] = n(), [F] = t(), { connect: I, connecting: L, error: R, clearError: he } = re(async () => {
|
|
78
|
+
await A();
|
|
79
|
+
}), [z, B] = g(!1), [ge, V] = g(!1), [H, U] = g(E), [W, G] = g(null), [K, q] = g(null), J = h(() => (D?.headshotmarketingSocialAccounts.items ?? []).map((e) => d(e)), [D?.headshotmarketingSocialAccounts.items]), Y = h(() => p(J), [J]), [X, _e] = g(""), Z = h(() => {
|
|
80
|
+
let e = X.trim().toLowerCase();
|
|
81
|
+
return e ? J.filter((t) => [
|
|
82
82
|
t.displayName,
|
|
83
83
|
t.handle,
|
|
84
84
|
t.platform
|
|
85
|
-
].some((t) => t.toLowerCase().includes(e))) :
|
|
86
|
-
}, [
|
|
87
|
-
|
|
85
|
+
].some((t) => t.toLowerCase().includes(e))) : J;
|
|
86
|
+
}, [X, J]), ve = async () => {
|
|
87
|
+
B(!0), q(null);
|
|
88
88
|
try {
|
|
89
|
-
await
|
|
89
|
+
await A();
|
|
90
90
|
} finally {
|
|
91
|
-
|
|
91
|
+
B(!1);
|
|
92
92
|
}
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
...
|
|
93
|
+
}, Q = (e) => {
|
|
94
|
+
U({
|
|
95
|
+
...E,
|
|
96
96
|
platform: e ?? "instagram"
|
|
97
|
-
}),
|
|
98
|
-
},
|
|
99
|
-
let e =
|
|
97
|
+
}), G(null), V(!0);
|
|
98
|
+
}, ye = async () => {
|
|
99
|
+
let e = H.accountName.trim();
|
|
100
100
|
if (!e) {
|
|
101
|
-
|
|
101
|
+
G("Account name is required.");
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
|
-
let t =
|
|
104
|
+
let t = H.followerCount ? Number(H.followerCount) : void 0;
|
|
105
105
|
if (t !== void 0 && (Number.isNaN(t) || t < 0)) {
|
|
106
|
-
|
|
106
|
+
G("Follower count must be a positive number.");
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
G(null);
|
|
110
110
|
let n = {
|
|
111
|
-
platform: me[
|
|
111
|
+
platform: me[H.platform],
|
|
112
112
|
accountName: e,
|
|
113
|
-
platformAccountId: `${
|
|
114
|
-
profileUrl:
|
|
113
|
+
platformAccountId: `${H.platform}-${T(e) || "account"}-${Date.now().toString(36)}`,
|
|
114
|
+
profileUrl: H.profileUrl.trim() || void 0,
|
|
115
115
|
followerCount: t
|
|
116
116
|
};
|
|
117
117
|
try {
|
|
118
|
-
await
|
|
118
|
+
await j({ variables: { input: n } }), await A(), V(!1), U(E);
|
|
119
119
|
} catch (e) {
|
|
120
|
-
|
|
120
|
+
G(e instanceof Error ? e.message : "Failed to add account.");
|
|
121
121
|
}
|
|
122
|
-
},
|
|
123
|
-
|
|
122
|
+
}, be = async (e) => {
|
|
123
|
+
q(null);
|
|
124
124
|
try {
|
|
125
|
-
await
|
|
125
|
+
await N({ variables: {
|
|
126
126
|
id: e,
|
|
127
|
-
input: { status:
|
|
128
|
-
} }), await
|
|
127
|
+
input: { status: ee.Connected }
|
|
128
|
+
} }), await A();
|
|
129
129
|
} catch (e) {
|
|
130
|
-
|
|
130
|
+
q(e instanceof Error ? e.message : "Failed to connect account.");
|
|
131
131
|
}
|
|
132
|
-
},
|
|
133
|
-
|
|
132
|
+
}, xe = async (e) => {
|
|
133
|
+
q(null);
|
|
134
134
|
try {
|
|
135
|
-
await
|
|
135
|
+
await P({ variables: { id: e } }), await A();
|
|
136
136
|
} catch (e) {
|
|
137
|
-
|
|
137
|
+
q(e instanceof Error ? e.message : "Failed to disconnect account.");
|
|
138
138
|
}
|
|
139
|
-
},
|
|
140
|
-
if (
|
|
141
|
-
|
|
139
|
+
}, Se = async (e, t) => {
|
|
140
|
+
if (await i({
|
|
141
|
+
title: `Remove ${t}?`,
|
|
142
|
+
description: "This disconnects the account and deletes its record.",
|
|
143
|
+
tone: "danger",
|
|
144
|
+
confirmLabel: "Remove"
|
|
145
|
+
})) {
|
|
146
|
+
q(null);
|
|
142
147
|
try {
|
|
143
|
-
await
|
|
148
|
+
await F({ variables: { id: e } }), await A();
|
|
144
149
|
} catch (e) {
|
|
145
|
-
|
|
150
|
+
q(e instanceof Error ? e.message : "Failed to remove account.");
|
|
146
151
|
}
|
|
147
152
|
}
|
|
148
153
|
}, $ = (e) => {
|
|
149
|
-
|
|
150
|
-
let t =
|
|
151
|
-
|
|
154
|
+
he();
|
|
155
|
+
let t = J.find((t) => t.platform === e);
|
|
156
|
+
m(e) ? I(e, t ? { existingAccountId: t.id } : {}) : t && !t.connected ? be(t.id) : Q(e);
|
|
152
157
|
};
|
|
153
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ S(ne, {
|
|
154
159
|
title: "Connected Accounts",
|
|
155
160
|
description: "Manage your social media platform connections",
|
|
156
|
-
actions: /* @__PURE__ */
|
|
161
|
+
actions: /* @__PURE__ */ S("div", {
|
|
157
162
|
className: "flex flex-wrap items-center gap-2",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
-
onClick:
|
|
160
|
-
disabled:
|
|
161
|
-
className:
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
-
}), /* @__PURE__ */
|
|
164
|
-
onClick: () =>
|
|
163
|
+
children: [/* @__PURE__ */ S("button", {
|
|
164
|
+
onClick: ve,
|
|
165
|
+
disabled: z || O,
|
|
166
|
+
className: a("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", (z || O) && "opacity-50 cursor-not-allowed"),
|
|
167
|
+
children: [/* @__PURE__ */ x(_, { className: a("h-4 w-4", (z || O) && "animate-spin") }), z ? "Syncing..." : "Sync All"]
|
|
168
|
+
}), /* @__PURE__ */ S("button", {
|
|
169
|
+
onClick: () => Q(),
|
|
165
170
|
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",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ x(le, { className: "h-4 w-4" }), "Add manually"]
|
|
167
172
|
})]
|
|
168
173
|
}),
|
|
169
174
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ S(ue, { children: [
|
|
171
176
|
"Connect the social platforms you post to. Use",
|
|
172
177
|
" ",
|
|
173
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ x("span", {
|
|
174
179
|
className: "font-medium",
|
|
175
180
|
children: "Connect with…"
|
|
176
181
|
}),
|
|
177
182
|
" to authorize an account through the platform's own sign-in — posts then publish through the live platform API. Manual entries let you track accounts you haven't authorized yet."
|
|
178
183
|
] }),
|
|
179
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ x(C, { children: /* @__PURE__ */ S("div", {
|
|
180
185
|
className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
|
|
181
186
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ x(s, {
|
|
183
188
|
title: "Total Accounts",
|
|
184
|
-
value:
|
|
185
|
-
icon: /* @__PURE__ */
|
|
189
|
+
value: o(Y.totalAccounts),
|
|
190
|
+
icon: /* @__PURE__ */ x(se, { className: "h-4 w-4" })
|
|
186
191
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ x(s, {
|
|
188
193
|
title: "Total Followers",
|
|
189
|
-
value:
|
|
190
|
-
icon: /* @__PURE__ */
|
|
194
|
+
value: o(Y.totalFollowers),
|
|
195
|
+
icon: /* @__PURE__ */ x(y, { className: "h-4 w-4" })
|
|
191
196
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ x(s, {
|
|
193
198
|
title: "Total Posts",
|
|
194
|
-
value:
|
|
195
|
-
icon: /* @__PURE__ */
|
|
199
|
+
value: o(Y.totalPosts),
|
|
200
|
+
icon: /* @__PURE__ */ x(oe, { className: "h-4 w-4" })
|
|
196
201
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ x(s, {
|
|
198
203
|
title: "Avg Engagement",
|
|
199
|
-
value:
|
|
200
|
-
icon: /* @__PURE__ */
|
|
204
|
+
value: Y.avgEngagementRate === null ? "—" : te(Y.avgEngagementRate),
|
|
205
|
+
icon: /* @__PURE__ */ x(v, { className: "h-4 w-4" })
|
|
201
206
|
})
|
|
202
207
|
]
|
|
203
208
|
}) }),
|
|
204
|
-
|
|
209
|
+
R && /* @__PURE__ */ x("div", {
|
|
205
210
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
206
|
-
children:
|
|
211
|
+
children: R
|
|
207
212
|
}),
|
|
208
|
-
|
|
213
|
+
K && /* @__PURE__ */ x("div", {
|
|
209
214
|
className: "rounded-lg border border-status-error-border/30 bg-status-error-bg/10 px-4 py-3 text-sm text-status-error-text",
|
|
210
|
-
children:
|
|
215
|
+
children: K
|
|
211
216
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
loading:
|
|
214
|
-
error:
|
|
215
|
-
onRetry:
|
|
216
|
-
hasData: !!
|
|
217
|
-
children: [/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ S(u, {
|
|
218
|
+
loading: O,
|
|
219
|
+
error: k,
|
|
220
|
+
onRetry: A,
|
|
221
|
+
hasData: !!D,
|
|
222
|
+
children: [/* @__PURE__ */ S("section", {
|
|
218
223
|
"aria-label": "Connected accounts",
|
|
219
224
|
className: "space-y-3",
|
|
220
|
-
children: [
|
|
225
|
+
children: [J.length > 0 && /* @__PURE__ */ x("input", {
|
|
221
226
|
type: "search",
|
|
222
|
-
value:
|
|
223
|
-
onChange: (e) =>
|
|
227
|
+
value: X,
|
|
228
|
+
onChange: (e) => _e(e.target.value),
|
|
224
229
|
placeholder: "Search accounts...",
|
|
225
230
|
"aria-label": "Search accounts",
|
|
226
231
|
className: "w-full max-w-xs rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
227
|
-
}),
|
|
232
|
+
}), Z.length > 0 ? /* @__PURE__ */ x("div", {
|
|
228
233
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",
|
|
229
|
-
children:
|
|
230
|
-
let t =
|
|
231
|
-
return /* @__PURE__ */
|
|
234
|
+
children: Z.map((e) => {
|
|
235
|
+
let t = m(e.platform);
|
|
236
|
+
return /* @__PURE__ */ x(ie, {
|
|
232
237
|
account: e,
|
|
233
|
-
connecting:
|
|
238
|
+
connecting: L?.platform === e.platform,
|
|
234
239
|
reconnectLabel: t ? `Connect with ${t.label}` : "Reconnect",
|
|
235
240
|
onReconnect: () => $(e.platform),
|
|
236
|
-
onDisconnect: () => void
|
|
237
|
-
onRemove: () => void
|
|
241
|
+
onDisconnect: () => void xe(e.id),
|
|
242
|
+
onRemove: () => void Se(e.id, e.displayName)
|
|
238
243
|
}, e.id);
|
|
239
244
|
})
|
|
240
|
-
}) : /* @__PURE__ */
|
|
241
|
-
icon: /* @__PURE__ */
|
|
242
|
-
title:
|
|
243
|
-
description:
|
|
245
|
+
}) : /* @__PURE__ */ x(c, {
|
|
246
|
+
icon: /* @__PURE__ */ x(y, { className: "h-8 w-8" }),
|
|
247
|
+
title: J.length > 0 ? "No accounts match your search" : "No connected accounts yet",
|
|
248
|
+
description: J.length > 0 ? "Try a different name, handle or platform." : "Connect a social account to start posting and tracking performance."
|
|
244
249
|
})]
|
|
245
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ S("div", {
|
|
246
251
|
className: "rounded-lg border border-border-seam bg-gloss-card shadow-pop p-6",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
248
253
|
className: "text-sm font-semibold text-text-primary mb-4",
|
|
249
254
|
children: "Available Platforms"
|
|
250
|
-
}), /* @__PURE__ */
|
|
255
|
+
}), /* @__PURE__ */ x("div", {
|
|
251
256
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-6",
|
|
252
|
-
children:
|
|
253
|
-
let t =
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
className:
|
|
257
|
+
children: w.map((e) => {
|
|
258
|
+
let t = J.find((t) => t.platform === e.key)?.connected ?? !1, n = L?.platform === e.key, r = m(e.key);
|
|
259
|
+
return /* @__PURE__ */ S("div", {
|
|
260
|
+
className: a("rounded-lg border p-4 text-center transition-colors", t ? "border-status-success-border bg-status-success-bg/50" : "border-border-subtle bg-bg-surface hover:border-foreground/30"),
|
|
256
261
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
className:
|
|
262
|
+
/* @__PURE__ */ x("span", {
|
|
263
|
+
className: a("inline-block rounded-full px-2.5 py-1 text-xs font-medium capitalize mb-2", pe[e.key]),
|
|
259
264
|
children: e.label
|
|
260
265
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ x("p", {
|
|
262
267
|
className: "text-xs text-text-secondary mb-2",
|
|
263
268
|
children: e.description
|
|
264
269
|
}),
|
|
265
|
-
t ? /* @__PURE__ */
|
|
270
|
+
t ? /* @__PURE__ */ S("span", {
|
|
266
271
|
className: "inline-flex items-center gap-1 text-xs text-status-success-text font-medium",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
268
|
-
}) : /* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ x(ae, { className: "h-3 w-3" }), "Connected"]
|
|
273
|
+
}) : /* @__PURE__ */ S("button", {
|
|
269
274
|
type: "button",
|
|
270
275
|
onClick: () => $(e.key),
|
|
271
276
|
disabled: n,
|
|
272
277
|
className: "inline-flex items-center gap-1 text-xs text-text-primary font-medium underline hover:no-underline disabled:opacity-60 disabled:no-underline",
|
|
273
|
-
children: [n && /* @__PURE__ */
|
|
278
|
+
children: [n && /* @__PURE__ */ x(ce, { className: "h-3 w-3 animate-spin" }), n ? "Connecting..." : r ? `Connect with ${r.label}` : "Add manually"]
|
|
274
279
|
})
|
|
275
280
|
]
|
|
276
281
|
}, e.key);
|
|
@@ -278,58 +283,58 @@ var w = {
|
|
|
278
283
|
})]
|
|
279
284
|
})]
|
|
280
285
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
open:
|
|
283
|
-
onClose: () =>
|
|
286
|
+
/* @__PURE__ */ x(l, {
|
|
287
|
+
open: ge,
|
|
288
|
+
onClose: () => V(!1),
|
|
284
289
|
title: "Add Social Account",
|
|
285
290
|
description: "Track an account manually. To publish through a platform, use “Connect with…” instead.",
|
|
286
291
|
size: "md",
|
|
287
|
-
footer: /* @__PURE__ */
|
|
292
|
+
footer: /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
|
|
288
293
|
type: "button",
|
|
289
|
-
onClick: () =>
|
|
294
|
+
onClick: () => V(!1),
|
|
290
295
|
className: "rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
|
|
291
296
|
children: "Cancel"
|
|
292
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ x("button", {
|
|
293
298
|
type: "button",
|
|
294
|
-
onClick:
|
|
295
|
-
disabled:
|
|
299
|
+
onClick: ye,
|
|
300
|
+
disabled: M,
|
|
296
301
|
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",
|
|
297
|
-
children:
|
|
302
|
+
children: M ? "Adding..." : "Add Account"
|
|
298
303
|
})] }),
|
|
299
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ S("div", {
|
|
300
305
|
className: "space-y-4",
|
|
301
306
|
children: [
|
|
302
|
-
|
|
307
|
+
W && /* @__PURE__ */ x("div", {
|
|
303
308
|
className: "rounded-md border border-status-error-border/30 bg-status-error-bg/10 px-3 py-2 text-sm text-status-error-text",
|
|
304
|
-
children:
|
|
309
|
+
children: W
|
|
305
310
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ S("label", {
|
|
307
312
|
className: "block",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ x("span", {
|
|
309
314
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
310
315
|
children: "Platform"
|
|
311
|
-
}), /* @__PURE__ */
|
|
312
|
-
value:
|
|
313
|
-
onChange: (e) =>
|
|
316
|
+
}), /* @__PURE__ */ x(de, {
|
|
317
|
+
value: H.platform,
|
|
318
|
+
onChange: (e) => U((t) => ({
|
|
314
319
|
...t,
|
|
315
320
|
platform: e.target.value
|
|
316
321
|
})),
|
|
317
322
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
318
|
-
children:
|
|
323
|
+
children: w.map((e) => /* @__PURE__ */ x("option", {
|
|
319
324
|
value: e.key,
|
|
320
325
|
children: e.label
|
|
321
326
|
}, e.key))
|
|
322
327
|
})]
|
|
323
328
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ S("label", {
|
|
325
330
|
className: "block",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ x("span", {
|
|
327
332
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
328
333
|
children: "Account name"
|
|
329
|
-
}), /* @__PURE__ */
|
|
334
|
+
}), /* @__PURE__ */ x("input", {
|
|
330
335
|
type: "text",
|
|
331
|
-
value:
|
|
332
|
-
onChange: (e) =>
|
|
336
|
+
value: H.accountName,
|
|
337
|
+
onChange: (e) => U((t) => ({
|
|
333
338
|
...t,
|
|
334
339
|
accountName: e.target.value
|
|
335
340
|
})),
|
|
@@ -337,22 +342,22 @@ var w = {
|
|
|
337
342
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
338
343
|
})]
|
|
339
344
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ S("label", {
|
|
341
346
|
className: "block",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ S("span", {
|
|
343
348
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
344
349
|
children: [
|
|
345
350
|
"Profile URL / handle",
|
|
346
351
|
" ",
|
|
347
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ x("span", {
|
|
348
353
|
className: "text-text-secondary",
|
|
349
354
|
children: "(optional)"
|
|
350
355
|
})
|
|
351
356
|
]
|
|
352
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ x("input", {
|
|
353
358
|
type: "text",
|
|
354
|
-
value:
|
|
355
|
-
onChange: (e) =>
|
|
359
|
+
value: H.profileUrl,
|
|
360
|
+
onChange: (e) => U((t) => ({
|
|
356
361
|
...t,
|
|
357
362
|
profileUrl: e.target.value
|
|
358
363
|
})),
|
|
@@ -360,19 +365,19 @@ var w = {
|
|
|
360
365
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
361
366
|
})]
|
|
362
367
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ S("label", {
|
|
364
369
|
className: "block",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ S("span", {
|
|
366
371
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
367
|
-
children: ["Followers ", /* @__PURE__ */
|
|
372
|
+
children: ["Followers ", /* @__PURE__ */ x("span", {
|
|
368
373
|
className: "text-text-secondary",
|
|
369
374
|
children: "(optional)"
|
|
370
375
|
})]
|
|
371
|
-
}), /* @__PURE__ */
|
|
376
|
+
}), /* @__PURE__ */ x("input", {
|
|
372
377
|
type: "number",
|
|
373
378
|
min: 0,
|
|
374
|
-
value:
|
|
375
|
-
onChange: (e) =>
|
|
379
|
+
value: H.followerCount,
|
|
380
|
+
onChange: (e) => U((t) => ({
|
|
376
381
|
...t,
|
|
377
382
|
followerCount: e.target.value
|
|
378
383
|
})),
|
|
@@ -386,6 +391,6 @@ var w = {
|
|
|
386
391
|
]
|
|
387
392
|
});
|
|
388
393
|
};
|
|
389
|
-
export {
|
|
394
|
+
export { D as AccountsPage };
|
|
390
395
|
|
|
391
396
|
//# sourceMappingURL=AccountsPage.js.map
|