@tribe-nest/forge 3.60.0 → 3.63.0
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/package.json +5 -2
- package/src/contexts/CartContext.tsx +34 -1
- package/src/contexts/PublicAuthContext.tsx +15 -3
- package/src/data/queries/_tests/metaSignals.spec.tsx +130 -0
- package/src/data/queries/useAccount.ts +33 -2
- package/src/data/queries/useAnalytics.ts +6 -6
- package/src/data/queries/useCallChat.ts +2 -2
- package/src/data/queries/useChat.ts +10 -1
- package/src/data/queries/useCheckouts.ts +2 -1
- package/src/data/queries/useCoachingAvailability.ts +10 -1
- package/src/data/queries/useCommunities.ts +2 -0
- package/src/data/queries/useCommunity.ts +362 -18
- package/src/data/queries/useCommunityAgent.ts +247 -0
- package/src/data/queries/useCommunityCalendar.ts +150 -0
- package/src/data/queries/useCommunityClassroom.ts +75 -0
- package/src/data/queries/useCommunityMembers.ts +108 -0
- package/src/data/queries/useCommunityModeration.ts +327 -0
- package/src/data/queries/useCommunityWiki.ts +137 -0
- package/src/data/queries/useCourses.ts +2 -0
- package/src/data/queries/useEmailSignIn.ts +79 -0
- package/src/data/queries/useEvents.ts +6 -1
- package/src/data/queries/useForms.ts +5 -1
- package/src/data/queries/useLeadMagnet.ts +6 -2
- package/src/data/queries/useMyBookings.ts +24 -1
- package/src/data/queries/useMyTickets.ts +24 -1
- package/src/data/queries/useNotifications.ts +6 -2
- package/src/data/queries/useOrders.ts +2 -1
- package/src/data/queries/usePWA.ts +111 -35
- package/src/data/queries/useSiteApp.ts +130 -0
- package/src/data/queries/useSubscriptions.ts +6 -1
- package/src/i18n/de.json +746 -1
- package/src/i18n/en.json +746 -1
- package/src/index.ts +20 -0
- package/src/runtime/pages.spec.ts +5 -0
- package/src/runtime/pages.ts +32 -6
- package/src/seo/_tests/seo.spec.ts +326 -0
- package/src/seo/applySeoToHead.ts +98 -0
- package/src/seo/index.ts +9 -0
- package/src/seo/resolve.ts +211 -0
- package/src/seo/seoHead.ts +61 -0
- package/src/seo/siteSeoHead.ts +97 -0
- package/src/seo/types.ts +99 -0
- package/src/server/_tests/siteBootstrap.spec.ts +65 -0
- package/src/server/index.ts +33 -4
- package/src/types/models.ts +11 -0
- package/src/ui/analytics/ForgeAnalytics.tsx +134 -34
- package/src/ui/analytics/PageMetaPixel.tsx +23 -8
- package/src/ui/analytics/_tests/ForgeAnalytics.meta.spec.tsx +129 -0
- package/src/ui/analytics/_tests/ForgeAnalytics.webVitals.spec.tsx +129 -0
- package/src/ui/analytics/_tests/metaCommerceEvents.spec.tsx +159 -0
- package/src/ui/analytics/useMetaEvents.ts +78 -0
- package/src/ui/headless/_tests/communityAgent.spec.tsx +519 -0
- package/src/ui/headless/_tests/communityCalendar.spec.tsx +195 -0
- package/src/ui/headless/_tests/communityClassroom.spec.tsx +120 -0
- package/src/ui/headless/_tests/communityHarness.tsx +10 -3
- package/src/ui/headless/_tests/communityMembers.spec.tsx +316 -0
- package/src/ui/headless/_tests/communityPoll.spec.tsx +389 -0
- package/src/ui/headless/_tests/memberHomeBar.spec.ts +84 -0
- package/src/ui/headless/_tests/siteAppBar.spec.ts +83 -0
- package/src/ui/headless/_tests/siteAppHarness.ts +19 -0
- package/src/ui/headless/_tests/siteAppHome.spec.ts +226 -0
- package/src/ui/headless/_tests/siteAppPrompts.spec.ts +185 -0
- package/src/ui/headless/_tests/useCommunityJoin.spec.tsx +228 -14
- package/src/ui/headless/_tests/useCommunityMembership.spec.tsx +29 -1
- package/src/ui/headless/_tests/useCommunityModeration.spec.tsx +420 -0
- package/src/ui/headless/_tests/useCommunityReads.spec.tsx +11 -2
- package/src/ui/headless/_tests/useCommunityWiki.spec.tsx +224 -0
- package/src/ui/headless/_tests/useSiteApp.spec.tsx +52 -0
- package/src/ui/headless/_tests/wikiMediaImage.spec.tsx +132 -0
- package/src/ui/headless/auth/useEmailCodeSignIn.ts +186 -0
- package/src/ui/headless/auth/useSignupForm.ts +20 -1
- package/src/ui/headless/chat/useChatAttachmentUpload.ts +9 -6
- package/src/ui/headless/chat/useChatRoom.ts +35 -1
- package/src/ui/headless/communities/index.ts +41 -0
- package/src/ui/headless/communities/useCommunityCalendar.ts +156 -0
- package/src/ui/headless/communities/useCommunityClassroom.ts +84 -0
- package/src/ui/headless/communities/useCommunityHome.ts +3 -0
- package/src/ui/headless/communities/useCommunityJoin.ts +73 -23
- package/src/ui/headless/communities/useCommunityMembership.ts +48 -2
- package/src/ui/headless/communities/useCommunityWiki.ts +266 -0
- package/src/ui/headless/community/communityPoll.ts +297 -0
- package/src/ui/headless/community/countries.ts +123 -0
- package/src/ui/headless/community/index.ts +81 -1
- package/src/ui/headless/community/linkPreview.ts +71 -0
- package/src/ui/headless/community/richLexical.ts +27 -2
- package/src/ui/headless/community/useCommunityAgent.ts +285 -0
- package/src/ui/headless/community/useCommunityMembers.ts +175 -0
- package/src/ui/headless/community/useCommunityModeration.ts +300 -0
- package/src/ui/headless/community/useCommunitySpaceFeed.ts +22 -4
- package/src/ui/headless/community/useCommunityThread.ts +16 -3
- package/src/ui/headless/community/useMentionComposer.ts +17 -9
- package/src/ui/headless/community/useRichMentionComposer.ts +21 -5
- package/src/ui/headless/downloads/index.ts +8 -0
- package/src/ui/headless/downloads/useDownloadPage.ts +134 -0
- package/src/ui/headless/index.ts +13 -0
- package/src/ui/headless/memberHome/index.ts +10 -0
- package/src/ui/headless/memberHome/memberHomeBar.ts +91 -0
- package/src/ui/headless/memberHome/useMemberHomeNav.ts +56 -18
- package/src/ui/headless/portal/index.ts +57 -0
- package/src/ui/headless/portal/usePortal.ts +274 -0
- package/src/ui/headless/portal/usePortalFiles.ts +68 -0
- package/src/ui/headless/portal/usePortalMessages.ts +189 -0
- package/src/ui/headless/portal/usePortalPreview.ts +142 -0
- package/src/ui/headless/siteApp/appBar.ts +102 -0
- package/src/ui/headless/siteApp/appHome.ts +344 -0
- package/src/ui/headless/siteApp/appPrompts.ts +229 -0
- package/src/ui/headless/siteApp/index.ts +58 -0
- package/src/ui/headless/siteApp/useAppHome.ts +210 -0
- package/src/ui/headless/siteApp/useAppInstallRequest.ts +16 -0
- package/src/ui/headless/work/index.ts +2 -0
- package/src/ui/headless/work/useWorkPortal.ts +37 -26
- package/src/ui/index.ts +11 -0
- package/src/ui/styled/AccountDashboard.tsx +712 -352
- package/src/ui/styled/AiAgentWidget.tsx +13 -1
- package/src/ui/styled/ChatRoom.tsx +126 -16
- package/src/ui/styled/Checkout.tsx +8 -0
- package/src/ui/styled/CheckoutConfirmation.tsx +8 -0
- package/src/ui/styled/CoachingConfirmation.tsx +8 -0
- package/src/ui/styled/CoachingDetail.tsx +2 -0
- package/src/ui/styled/CourseConfirmation.tsx +5 -0
- package/src/ui/styled/CourseDetail.tsx +2 -0
- package/src/ui/styled/DownloadPage.tsx +263 -0
- package/src/ui/styled/EventConfirmation.tsx +10 -0
- package/src/ui/styled/EventDetail.tsx +10 -0
- package/src/ui/styled/FilmLibrary.tsx +22 -9
- package/src/ui/styled/MusicLinkPage.tsx +5 -5
- package/src/ui/styled/ProductDetail.tsx +12 -0
- package/src/ui/styled/PwaRegistration.tsx +5 -1
- package/src/ui/styled/SignupForm.tsx +18 -3
- package/src/ui/styled/_tests/AccountDashboardBookingCall.spec.tsx +5 -5
- package/src/ui/styled/_tests/AccountNotifications.spec.tsx +135 -0
- package/src/ui/styled/_tests/DownloadPage.spec.tsx +68 -0
- package/src/ui/styled/app/AppBar.tsx +298 -0
- package/src/ui/styled/app/AppHome.tsx +1139 -0
- package/src/ui/styled/app/AppHomeMark.tsx +66 -0
- package/src/ui/styled/app/AppPrompts.tsx +464 -0
- package/src/ui/styled/app/_tests/AppBar.spec.tsx +96 -0
- package/src/ui/styled/app/_tests/AppHome.spec.tsx +209 -0
- package/src/ui/styled/app/_tests/AppPrompts.spec.tsx +232 -0
- package/src/ui/styled/app/index.ts +7 -0
- package/src/ui/styled/chat/ChatThreadPanel.tsx +29 -4
- package/src/ui/styled/chat/MessageBubble.tsx +43 -6
- package/src/ui/styled/communities/CommunityAbout.tsx +6 -1
- package/src/ui/styled/communities/CommunityCalendar.tsx +484 -0
- package/src/ui/styled/communities/CommunityClassroom.tsx +302 -0
- package/src/ui/styled/communities/CommunityHome.tsx +134 -11
- package/src/ui/styled/communities/CommunityJoinSheet.tsx +119 -19
- package/src/ui/styled/communities/CommunityMembershipMenu.tsx +168 -52
- package/src/ui/styled/communities/CommunityPublicWiki.tsx +75 -0
- package/src/ui/styled/communities/CommunityWiki.tsx +289 -0
- package/src/ui/styled/communities/MyMembershipsList.tsx +31 -5
- package/src/ui/styled/communities/_tests/CommunityAppHome.spec.tsx +92 -0
- package/src/ui/styled/communities/_tests/CommunityClassroomCalendar.spec.tsx +453 -0
- package/src/ui/styled/communities/_tests/CommunityMobile.spec.tsx +399 -0
- package/src/ui/styled/communities/_tests/CommunityWiki.spec.tsx +223 -0
- package/src/ui/styled/communities/index.ts +9 -0
- package/src/ui/styled/communities/shared.tsx +39 -11
- package/src/ui/styled/community/CommunityAgent.tsx +286 -0
- package/src/ui/styled/community/CommunityComposer.tsx +266 -15
- package/src/ui/styled/community/CommunityFeed.tsx +50 -1
- package/src/ui/styled/community/CommunityLinkPreview.tsx +159 -0
- package/src/ui/styled/community/CommunityMemberGlobe.tsx +171 -0
- package/src/ui/styled/community/CommunityMemberProfile.tsx +137 -4
- package/src/ui/styled/community/CommunityMembers.tsx +387 -0
- package/src/ui/styled/community/CommunityModeration.tsx +587 -0
- package/src/ui/styled/community/CommunityModerationState.tsx +127 -0
- package/src/ui/styled/community/CommunityModeratorMenu.tsx +317 -0
- package/src/ui/styled/community/CommunityNotifications.tsx +52 -6
- package/src/ui/styled/community/CommunityPollCard.tsx +250 -0
- package/src/ui/styled/community/CommunityPostCard.tsx +110 -34
- package/src/ui/styled/community/CommunityPostDetail.tsx +157 -71
- package/src/ui/styled/community/CommunityRichText.tsx +177 -32
- package/src/ui/styled/community/CommunitySpaces.tsx +49 -14
- package/src/ui/styled/community/_tests/CommunityAgent.spec.tsx +571 -0
- package/src/ui/styled/community/_tests/CommunityLinkPreview.spec.tsx +167 -0
- package/src/ui/styled/community/_tests/CommunityMembers.spec.tsx +137 -0
- package/src/ui/styled/community/_tests/CommunityModeration.spec.tsx +291 -0
- package/src/ui/styled/community/_tests/CommunityPoll.spec.tsx +386 -0
- package/src/ui/styled/community/index.ts +37 -2
- package/src/ui/styled/forge-utilities.css +234 -0
- package/src/ui/styled/members/CallRecordingActions.tsx +182 -0
- package/src/ui/styled/members/MemberCallsCalendar.tsx +13 -158
- package/src/ui/styled/members/MemberHomeLayout.tsx +295 -15
- package/src/ui/styled/members/MemberPostsFeed.tsx +3 -2
- package/src/ui/styled/members/index.ts +8 -0
- package/src/ui/styled/portal/PortalAccountSection.tsx +61 -0
- package/src/ui/styled/portal/PortalActivity.tsx +167 -0
- package/src/ui/styled/portal/PortalBilling.tsx +197 -0
- package/src/ui/styled/portal/PortalFiles.tsx +279 -0
- package/src/ui/styled/portal/PortalHome.tsx +401 -0
- package/src/ui/styled/portal/PortalMessages.tsx +300 -0
- package/src/ui/styled/portal/PortalPreviewBanner.tsx +75 -0
- package/src/ui/styled/portal/PortalProjects.tsx +407 -0
- package/src/ui/styled/portal/PortalShell.tsx +397 -0
- package/src/ui/styled/portal/_tests/PortalAppHome.spec.tsx +90 -0
- package/src/ui/styled/portal/_tests/PortalFiles.spec.tsx +159 -0
- package/src/ui/styled/portal/_tests/PortalHome.spec.tsx +148 -0
- package/src/ui/styled/portal/_tests/PortalMessages.spec.tsx +168 -0
- package/src/ui/styled/portal/_tests/PortalPreviewBanner.spec.tsx +132 -0
- package/src/ui/styled/portal/_tests/portalNav.spec.ts +123 -0
- package/src/ui/styled/portal/index.ts +13 -0
- package/src/ui/styled/portal/portalNav.ts +260 -0
- package/src/ui/styled/portal/shared.tsx +206 -0
- package/src/ui/styled/work/WorkInviteAccept.tsx +228 -168
- package/src/ui/styled/work/WorkPortalProjects.tsx +68 -120
- package/src/ui/styled/work/WorkProjectDocuments.tsx +99 -128
- package/src/ui/styled/work/WorkProjectInvoices.tsx +91 -86
- package/src/ui/styled/work/WorkProjectReport.tsx +11 -17
- package/src/ui/styled/work/WorkReportBody.tsx +223 -248
- package/src/ui/styled/work/WorkTaskAttachments.tsx +23 -29
- package/src/ui/styled/work/WorkTaskComments.tsx +75 -102
- package/src/ui/styled/work/WorkTaskDetail.tsx +48 -59
- package/src/ui/styled/work/WorkTokenReport.tsx +8 -16
- package/src/ui/styled/work/index.ts +1 -1
- package/src/utils/_tests/landing.spec.ts +39 -0
- package/src/utils/_tests/metaEvents.spec.ts +264 -0
- package/src/utils/_tests/structuredDataSeo.spec.ts +247 -0
- package/src/utils/landing.ts +36 -10
- package/src/utils/metaEvents.ts +302 -0
- package/src/utils/structuredData.ts +339 -1
|
@@ -6,22 +6,25 @@ import {
|
|
|
6
6
|
useLeaveCommunitySpace,
|
|
7
7
|
type CommunitySpace,
|
|
8
8
|
} from "../../../data/queries/useCommunity";
|
|
9
|
+
import { useForgeT } from "../../../i18n";
|
|
9
10
|
import { Loading } from "../Loading";
|
|
10
11
|
|
|
11
12
|
export interface CommunitySpacesProps {
|
|
12
|
-
/** Open a space
|
|
13
|
+
/** Open a space: routes to the space feed. Never called for a level-locked space. */
|
|
13
14
|
onOpenSpace: (space: CommunitySpace) => void;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
* The gated space list. The API
|
|
18
|
+
* The gated space list. The API returns the spaces the member's tiers open
|
|
18
19
|
* (open spaces + spaces gated to one of their active tiers), so a tier badge
|
|
19
|
-
* marks members-only spaces
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* marks members-only spaces. A space above the member's level is listed too,
|
|
21
|
+
* locked ("Unlocks at level N") and not a way in. Each open card also carries
|
|
22
|
+
* the joined-member count and a Join/Joined toggle: tiers govern access,
|
|
23
|
+
* joining opts into new-post notifications.
|
|
22
24
|
*/
|
|
23
25
|
export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
24
26
|
const t = useThemeTokens();
|
|
27
|
+
const tr = useForgeT();
|
|
25
28
|
const { data: spaces = [], isLoading } = useCommunitySpaces();
|
|
26
29
|
const joinSpace = useJoinCommunitySpace();
|
|
27
30
|
const leaveSpace = useLeaveCommunitySpace();
|
|
@@ -46,15 +49,25 @@ export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
|
46
49
|
const gated = (space.tiers?.length ?? 0) > 0;
|
|
47
50
|
const memberCount = Number(space.memberCount ?? 0);
|
|
48
51
|
const joinBusy = joinSpace.isPending || leaveSpace.isPending;
|
|
52
|
+
// Above the member's level: listed so they can see what their next
|
|
53
|
+
// level opens, but not a way in (the server refuses its feed too).
|
|
54
|
+
const levelLocked = !!space.levelLocked;
|
|
55
|
+
const opens = levelLocked
|
|
56
|
+
? {}
|
|
57
|
+
: {
|
|
58
|
+
role: "button" as const,
|
|
59
|
+
tabIndex: 0,
|
|
60
|
+
onClick: () => onOpenSpace(space),
|
|
61
|
+
onKeyDown: (e: React.KeyboardEvent) => {
|
|
62
|
+
if (e.key === "Enter" || e.key === " ") onOpenSpace(space);
|
|
63
|
+
},
|
|
64
|
+
};
|
|
49
65
|
return (
|
|
50
66
|
<div
|
|
51
67
|
key={space.id}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
onKeyDown={(e) => {
|
|
56
|
-
if (e.key === "Enter" || e.key === " ") onOpenSpace(space);
|
|
57
|
-
}}
|
|
68
|
+
data-testid="community-space-row"
|
|
69
|
+
data-level-locked={levelLocked ? "true" : undefined}
|
|
70
|
+
{...opens}
|
|
58
71
|
style={{
|
|
59
72
|
display: "flex",
|
|
60
73
|
alignItems: "center",
|
|
@@ -63,9 +76,9 @@ export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
|
63
76
|
borderRadius: t.cornerRadius,
|
|
64
77
|
background: t.surface,
|
|
65
78
|
padding: "14px 16px",
|
|
66
|
-
cursor: "pointer",
|
|
79
|
+
cursor: levelLocked ? "default" : "pointer",
|
|
67
80
|
textAlign: "left",
|
|
68
|
-
color: t.text,
|
|
81
|
+
color: levelLocked ? t.muted : t.text,
|
|
69
82
|
width: "100%",
|
|
70
83
|
}}
|
|
71
84
|
>
|
|
@@ -83,7 +96,7 @@ export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
|
83
96
|
flexShrink: 0,
|
|
84
97
|
}}
|
|
85
98
|
>
|
|
86
|
-
<Hash size={18} />
|
|
99
|
+
{levelLocked ? <Lock size={18} /> : <Hash size={18} />}
|
|
87
100
|
</span>
|
|
88
101
|
|
|
89
102
|
<span style={{ flex: 1, minWidth: 0 }}>
|
|
@@ -108,6 +121,26 @@ export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
|
108
121
|
{space.tiers.map((tier) => tier.name).join(", ")}
|
|
109
122
|
</span>
|
|
110
123
|
)}
|
|
124
|
+
{levelLocked && (
|
|
125
|
+
<span
|
|
126
|
+
data-testid="community-space-level-lock"
|
|
127
|
+
style={{
|
|
128
|
+
display: "inline-flex",
|
|
129
|
+
alignItems: "center",
|
|
130
|
+
gap: 4,
|
|
131
|
+
fontSize: 11,
|
|
132
|
+
fontWeight: 600,
|
|
133
|
+
color: t.text,
|
|
134
|
+
background: `${t.text}0d`,
|
|
135
|
+
borderRadius: 999,
|
|
136
|
+
padding: "1px 8px",
|
|
137
|
+
whiteSpace: "nowrap",
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
<Lock size={10} aria-hidden />
|
|
141
|
+
{tr("forge.community_spaces.unlocks_at_level", { level: space.minLevel ?? 1 })}
|
|
142
|
+
</span>
|
|
143
|
+
)}
|
|
111
144
|
</span>
|
|
112
145
|
{space.description && (
|
|
113
146
|
<span
|
|
@@ -143,6 +176,7 @@ export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
|
143
176
|
{`${space.postCount ?? 0} ${Number(space.postCount ?? 0) === 1 ? "post" : "posts"}`}
|
|
144
177
|
</span>
|
|
145
178
|
|
|
179
|
+
{!levelLocked && (
|
|
146
180
|
<button
|
|
147
181
|
onClick={(e) => {
|
|
148
182
|
e.stopPropagation();
|
|
@@ -166,6 +200,7 @@ export function CommunitySpaces({ onOpenSpace }: CommunitySpacesProps) {
|
|
|
166
200
|
>
|
|
167
201
|
{space.isJoined ? "Joined" : "Join"}
|
|
168
202
|
</button>
|
|
203
|
+
)}
|
|
169
204
|
</div>
|
|
170
205
|
);
|
|
171
206
|
})}
|