@odla-ai/chapter 0.60.0 → 0.62.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/README.md +138 -0
- package/dist/{chunk-QNP3UEIL.js → chunk-7CVP6VSO.js} +61 -1
- package/dist/chunk-7CVP6VSO.js.map +1 -0
- package/dist/{chunk-J7ES2OWN.js → chunk-MUUBATZJ.js} +899 -707
- package/dist/chunk-MUUBATZJ.js.map +1 -0
- package/dist/{chunk-D5UR5H6R.js → chunk-ZIYK3OV2.js} +869 -239
- package/dist/chunk-ZIYK3OV2.js.map +1 -0
- package/dist/copy-context-BJUkVUjE.d.ts +364 -0
- package/dist/index.cjs +3847 -3186
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +435 -89
- package/dist/index.d.ts +435 -89
- package/dist/index.js +3851 -3190
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +672 -3
- package/dist/ui/admin/index.js +2 -2
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +49 -3
- package/dist/ui/member/index.d.ts +254 -3
- package/dist/ui/member/index.js +48 -2
- package/dist/worker/index.cjs +1641 -477
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +222 -82
- package/dist/worker/index.d.ts +222 -82
- package/dist/worker/index.js +1572 -408
- package/dist/worker/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-D5UR5H6R.js.map +0 -1
- package/dist/chunk-J7ES2OWN.js.map +0 -1
- package/dist/chunk-QNP3UEIL.js.map +0 -1
- package/dist/copy-context-BP3G1iBd.d.ts +0 -899
package/dist/ui/admin/index.js
CHANGED
|
@@ -44,11 +44,11 @@ import {
|
|
|
44
44
|
networkRecordsWorkspace,
|
|
45
45
|
peopleSection,
|
|
46
46
|
useAdminResource
|
|
47
|
-
} from "../../chunk-
|
|
47
|
+
} from "../../chunk-MUUBATZJ.js";
|
|
48
48
|
import {
|
|
49
49
|
ChapterCopyProvider,
|
|
50
50
|
useChapterCopy
|
|
51
|
-
} from "../../chunk-
|
|
51
|
+
} from "../../chunk-7CVP6VSO.js";
|
|
52
52
|
export {
|
|
53
53
|
APPLICATION_STAGES,
|
|
54
54
|
AdminNote,
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { APPLICATION_STAGES, AdminAccountMenuProps, AdminBuilderLibraryData, AdminChrome, AdminMemberContentData, AdminNote, AdminPage, AdminResource, AdminRouteState, AdminRouteTarget, AdminRouting, AdminSection, AdminSectionContext, AdminWorkspace, AdminWorkspaceFrameProps, AdminWorkspaceNavProps, AdmissionGrantsWorkspace, AvailabilitySectionOptions, BillingSectionOptions, BuilderLibraryAdmin, CandidateStagePanel, CandidateStagePanelProps, ChapterAdmin, ChapterAdminAuthAdapter, ChapterAdminAuthConfig, ChapterAdminAuthLoadContext, ChapterAdminProps, ChapterAdminUser, CollectionSectionOptions, DISPUTE_STATUS_WORDS, DashboardSectionOptions, EmailSectionOptions, LeaderAdmissionAction, LeaderAdmissionActionProps, LeaderNetworkOverview, MeetingsSectionOptions, MemberContentAdmin, MembershipDisputeRow, MembershipDisputes, MembershipPolicyVersions, MembershipPolicyVersionsProps, NamedSeatRecordPanel, NamedSeatRecordPanelProps, NetworkRecordEditor, NetworkRecordsWorkspace, NetworkSeatBilling, NetworkShareActions, NetworkShareActionsProps, Panel, PaymentRecoveryQueue, PeopleSectionOptions, RecordActions, RecordActionsProps, RecordAdmissionPanel, RecordAdmissionPanelProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, builderLibrarySection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource } from './admin/index.js';
|
|
2
|
-
export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-
|
|
3
|
-
export { ADDITIONAL_MEMBER_COPY, AdditionalMemberCopy, AdditionalMemberDraft, AdditionalMemberEditor, AdditionalMemberEditorOptions, AdditionalMemberEditorProps, AdditionalMemberFieldNames, AdditionalMemberFields, AdditionalMemberFieldsProps, AdditionalMemberOffer, AdditionalMemberOptions, ApiFn, BrandStyle, BrandStyleProps, CheckoutSeatEditor, CheckoutSeatEditorContext, GiftCodeRedeemResult, GiftCodeRedeemer, GiftCodeRedeemerCopy, GiftCodeRedeemerProps, GiftOfferCards, GiftOfferCardsMode, GiftOfferCardsProps, GiftPurchases, GiftPurchasesProps, JoinBookingPreload, JoinBookingSimulation, JoinConfig, JoinFlowState, JoinIsland, JoinIslandProps, JoinSimulation, JoinStepRenderContext, JoinSubmitButton, JoinSubmitRenderContext, JoinTier, JoinTierRenderContext, JourneyFrame, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, MemberContentAreaProps, MemberGifts, MemberProvisionalRenderContext, MemberRestart, MembersArea, MembersAreaProps, MembershipCardTokenName, MembershipCards, MembershipCardsMode, MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatInvitationLink, NamedSeatInvitationLinkProps, NamedSeatPurchase, NamedSeatRecipientLine, PaymentPriceLines, PaymentStep, PaymentStepProps, PaymentStepSimulation, RescheduleProps, Rescheduler, Slot, SlotPicker, SlotPickerClasses, SlotPickerProps, SubResponse, TierPlaceholder, additionalMemberSelection, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, loadJoinResume, membershipApplicationHref, namedSeatInvitationMessage, namedSeatInvitationShareable, namedSeatInvitationUrl, tierNeedsPayment, timeLabel, tzShort, useTierSelection } from './member/index.js';
|
|
2
|
+
export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-BJUkVUjE.js';
|
|
3
|
+
export { ADDITIONAL_MEMBER_COPY, AdditionalMemberCopy, AdditionalMemberDraft, AdditionalMemberEditor, AdditionalMemberEditorOptions, AdditionalMemberEditorProps, AdditionalMemberFieldNames, AdditionalMemberFields, AdditionalMemberFieldsProps, AdditionalMemberOffer, AdditionalMemberOptions, ApiFn, BrandStyle, BrandStyleProps, CheckoutSeatEditor, CheckoutSeatEditorContext, DefaultHome, GiftCodeRedeemResult, GiftCodeRedeemer, GiftCodeRedeemerCopy, GiftCodeRedeemerProps, GiftOfferCards, GiftOfferCardsMode, GiftOfferCardsProps, GiftPurchases, GiftPurchasesProps, JoinBookingPreload, JoinBookingSimulation, JoinConfig, JoinFlowState, JoinIsland, JoinIslandProps, JoinSimulation, JoinStepRenderContext, JoinSubmitButton, JoinSubmitRenderContext, JoinTier, JoinTierRenderContext, JourneyFrame, LockedPill, LockedScreen, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, MemberContentAreaProps, MemberGifts, MemberPlaceholderBody, MemberPortal, MemberPortalProps, MemberProfilePage, MemberProfileView, MemberProvisionalRenderContext, MemberRestart, MembersArea, MembersAreaProps, MembershipCardTokenName, MembershipCards, MembershipCardsMode, MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatInvitationLink, NamedSeatInvitationLinkProps, NamedSeatPurchase, NamedSeatRecipientLine, PACKAGED_PORTAL_FEATURES, PROFILE_SEGMENT, PaymentPriceLines, PaymentStep, PaymentStepProps, PaymentStepSimulation, PlaceholderScreen, PortalAvatar, PortalContext, PortalFeature, PortalFeatures, PortalHomeSlots, PortalIcon, PortalMe, PortalMeResponse, PortalNav, PortalPage, PortalRoute, PortalRouting, PortalTile, RescheduleProps, Rescheduler, Slot, SlotPicker, SlotPickerClasses, SlotPickerProps, SubResponse, TierPlaceholder, UpgradeLink, additionalMemberSelection, choosePrompt, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, hrefFor, loadJoinResume, memberMonth, membershipApplicationHref, namedSeatInvitationMessage, namedSeatInvitationShareable, namedSeatInvitationUrl, navTag, placeholderBadge, routeFromLocation, sameRoute, startingPrompts, tierNeedsPayment, timeLabel, tzShort, useTierSelection } from './member/index.js';
|
|
4
4
|
import 'preact';
|
|
5
5
|
import '@odla-ai/crm';
|
|
6
6
|
import '@odla-ai/crm/ui';
|
|
7
|
+
import '@odla-ai/ui/components';
|
package/dist/ui/index.js
CHANGED
|
@@ -2,15 +2,21 @@ import {
|
|
|
2
2
|
ADDITIONAL_MEMBER_COPY,
|
|
3
3
|
AdditionalMemberEditor,
|
|
4
4
|
AdditionalMemberFields,
|
|
5
|
+
DefaultHome,
|
|
5
6
|
GiftCodeRedeemer,
|
|
6
7
|
GiftOfferCards,
|
|
7
8
|
GiftPurchases,
|
|
8
9
|
JoinIsland,
|
|
9
10
|
JoinSubmitButton,
|
|
10
11
|
JourneyFrame,
|
|
12
|
+
LockedPill,
|
|
13
|
+
LockedScreen,
|
|
11
14
|
MEMBERSHIP_CARD_TOKEN_DEFAULTS,
|
|
12
15
|
MemberContentArea,
|
|
13
16
|
MemberGifts,
|
|
17
|
+
MemberPlaceholderBody,
|
|
18
|
+
MemberPortal,
|
|
19
|
+
MemberProfilePage,
|
|
14
20
|
MemberRestart,
|
|
15
21
|
MembersArea,
|
|
16
22
|
MembershipCards,
|
|
@@ -18,27 +24,44 @@ import {
|
|
|
18
24
|
NamedSeatInvitationLink,
|
|
19
25
|
NamedSeatPurchase,
|
|
20
26
|
NamedSeatRecipientLine,
|
|
27
|
+
PACKAGED_PORTAL_FEATURES,
|
|
28
|
+
PROFILE_SEGMENT,
|
|
21
29
|
PaymentStep,
|
|
30
|
+
PlaceholderScreen,
|
|
31
|
+
PortalAvatar,
|
|
32
|
+
PortalIcon,
|
|
33
|
+
PortalNav,
|
|
34
|
+
PortalPage,
|
|
35
|
+
PortalTile,
|
|
22
36
|
Rescheduler,
|
|
23
37
|
SlotPicker,
|
|
24
38
|
TierPlaceholder,
|
|
39
|
+
UpgradeLink,
|
|
25
40
|
additionalMemberSelection,
|
|
41
|
+
choosePrompt,
|
|
26
42
|
dayKey,
|
|
27
43
|
dayLabel,
|
|
28
44
|
fmtDate,
|
|
29
45
|
fmtMoney,
|
|
30
46
|
fullLabel,
|
|
31
47
|
groupSlotsByDay,
|
|
48
|
+
hrefFor,
|
|
32
49
|
loadJoinResume,
|
|
50
|
+
memberMonth,
|
|
33
51
|
membershipApplicationHref,
|
|
34
52
|
namedSeatInvitationMessage,
|
|
35
53
|
namedSeatInvitationShareable,
|
|
36
54
|
namedSeatInvitationUrl,
|
|
55
|
+
navTag,
|
|
56
|
+
placeholderBadge,
|
|
57
|
+
routeFromLocation,
|
|
58
|
+
sameRoute,
|
|
59
|
+
startingPrompts,
|
|
37
60
|
tierNeedsPayment,
|
|
38
61
|
timeLabel,
|
|
39
62
|
tzShort,
|
|
40
63
|
useTierSelection
|
|
41
|
-
} from "../chunk-
|
|
64
|
+
} from "../chunk-ZIYK3OV2.js";
|
|
42
65
|
import {
|
|
43
66
|
APPLICATION_STAGES,
|
|
44
67
|
AdminNote,
|
|
@@ -85,12 +108,12 @@ import {
|
|
|
85
108
|
networkRecordsWorkspace,
|
|
86
109
|
peopleSection,
|
|
87
110
|
useAdminResource
|
|
88
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-MUUBATZJ.js";
|
|
89
112
|
import {
|
|
90
113
|
BrandStyle,
|
|
91
114
|
ChapterCopyProvider,
|
|
92
115
|
useChapterCopy
|
|
93
|
-
} from "../chunk-
|
|
116
|
+
} from "../chunk-7CVP6VSO.js";
|
|
94
117
|
import "../chunk-IVXVECKR.js";
|
|
95
118
|
export {
|
|
96
119
|
ADDITIONAL_MEMBER_COPY,
|
|
@@ -106,6 +129,7 @@ export {
|
|
|
106
129
|
ChapterAdmin,
|
|
107
130
|
ChapterCopyProvider,
|
|
108
131
|
DISPUTE_STATUS_WORDS,
|
|
132
|
+
DefaultHome,
|
|
109
133
|
GiftCodeRedeemer,
|
|
110
134
|
GiftOfferCards,
|
|
111
135
|
GiftPurchases,
|
|
@@ -114,10 +138,15 @@ export {
|
|
|
114
138
|
JourneyFrame,
|
|
115
139
|
LeaderAdmissionAction,
|
|
116
140
|
LeaderNetworkOverview,
|
|
141
|
+
LockedPill,
|
|
142
|
+
LockedScreen,
|
|
117
143
|
MEMBERSHIP_CARD_TOKEN_DEFAULTS,
|
|
118
144
|
MemberContentAdmin,
|
|
119
145
|
MemberContentArea,
|
|
120
146
|
MemberGifts,
|
|
147
|
+
MemberPlaceholderBody,
|
|
148
|
+
MemberPortal,
|
|
149
|
+
MemberProfilePage,
|
|
121
150
|
MemberRestart,
|
|
122
151
|
MembersArea,
|
|
123
152
|
MembershipCards,
|
|
@@ -132,15 +161,24 @@ export {
|
|
|
132
161
|
NetworkRecordsWorkspace,
|
|
133
162
|
NetworkSeatBilling,
|
|
134
163
|
NetworkShareActions,
|
|
164
|
+
PACKAGED_PORTAL_FEATURES,
|
|
165
|
+
PROFILE_SEGMENT,
|
|
135
166
|
Panel,
|
|
136
167
|
PaymentRecoveryQueue,
|
|
137
168
|
PaymentStep,
|
|
169
|
+
PlaceholderScreen,
|
|
170
|
+
PortalAvatar,
|
|
171
|
+
PortalIcon,
|
|
172
|
+
PortalNav,
|
|
173
|
+
PortalPage,
|
|
174
|
+
PortalTile,
|
|
138
175
|
RecordActions,
|
|
139
176
|
RecordAdmissionPanel,
|
|
140
177
|
Rescheduler,
|
|
141
178
|
SlotPicker,
|
|
142
179
|
ThemeWarning,
|
|
143
180
|
TierPlaceholder,
|
|
181
|
+
UpgradeLink,
|
|
144
182
|
additionalMemberSelection,
|
|
145
183
|
adminFetch,
|
|
146
184
|
adminRouteFromUrl,
|
|
@@ -152,6 +190,7 @@ export {
|
|
|
152
190
|
availabilitySection,
|
|
153
191
|
billingSection,
|
|
154
192
|
builderLibrarySection,
|
|
193
|
+
choosePrompt,
|
|
155
194
|
collectionSection,
|
|
156
195
|
dashboardSection,
|
|
157
196
|
dayKey,
|
|
@@ -163,17 +202,24 @@ export {
|
|
|
163
202
|
fmtMoney,
|
|
164
203
|
fullLabel,
|
|
165
204
|
groupSlotsByDay,
|
|
205
|
+
hrefFor,
|
|
166
206
|
loadChapterAdminConfig,
|
|
167
207
|
loadChapterAdminUser,
|
|
168
208
|
loadJoinResume,
|
|
169
209
|
meetingsSection,
|
|
170
210
|
memberContentSection,
|
|
211
|
+
memberMonth,
|
|
171
212
|
membershipApplicationHref,
|
|
172
213
|
namedSeatInvitationMessage,
|
|
173
214
|
namedSeatInvitationShareable,
|
|
174
215
|
namedSeatInvitationUrl,
|
|
216
|
+
navTag,
|
|
175
217
|
networkRecordsWorkspace,
|
|
176
218
|
peopleSection,
|
|
219
|
+
placeholderBadge,
|
|
220
|
+
routeFromLocation,
|
|
221
|
+
sameRoute,
|
|
222
|
+
startingPrompts,
|
|
177
223
|
tierNeedsPayment,
|
|
178
224
|
timeLabel,
|
|
179
225
|
tzShort,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as preact from 'preact';
|
|
2
2
|
import { ComponentChildren, JSX } from 'preact';
|
|
3
|
-
import {
|
|
4
|
-
export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-
|
|
3
|
+
import { e as MemberContentProjection, f as MemberContentPageProjection, P as PortalCopy, g as MemberPageFeatureName, c as ChapterCopy, a as ChapterBrand, h as MemberPageIcon } from '../../copy-context-BJUkVUjE.js';
|
|
4
|
+
export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-BJUkVUjE.js';
|
|
5
|
+
import { ThemeTokenOverrides } from '@odla-ai/ui/components';
|
|
5
6
|
import { FieldType, FieldConditions } from '@odla-ai/crm';
|
|
6
7
|
|
|
7
8
|
/** A bookable slot: a start instant in epoch milliseconds. */
|
|
@@ -105,12 +106,209 @@ interface MemberContentAreaProps {
|
|
|
105
106
|
onUpsell?: (tierId: string, page: MemberContentPageProjection) => void;
|
|
106
107
|
loadingContent?: ComponentChildren;
|
|
107
108
|
emptyContent?: ComponentChildren;
|
|
109
|
+
/**
|
|
110
|
+
* Render an allowed page of kind `feature` (schema version 2). Without it the
|
|
111
|
+
* area shows the page summary; the packaged MemberPortal renders features itself.
|
|
112
|
+
*/
|
|
113
|
+
renderFeature?: (page: MemberContentPageProjection) => ComponentChildren;
|
|
108
114
|
}
|
|
109
115
|
/**
|
|
110
116
|
* Render the exact server-filtered catalog. This component never receives a
|
|
111
117
|
* restricted body: locked access is a wire-level omission, not a CSS gate.
|
|
112
118
|
*/
|
|
113
119
|
declare function MemberContentArea(props: MemberContentAreaProps): preact.JSX.Element;
|
|
120
|
+
/** Badge text for a placeholder page: authored, "Coming in <year>", or "Coming soon". */
|
|
121
|
+
declare const placeholderBadge: (page: Pick<MemberContentPageProjection, "placeholder">) => string;
|
|
122
|
+
/** The open state of a placeholder page: badge, optional body, optional disabled action. */
|
|
123
|
+
declare function MemberPlaceholderBody({ page }: {
|
|
124
|
+
page: MemberContentPageProjection;
|
|
125
|
+
}): preact.JSX.Element;
|
|
126
|
+
|
|
127
|
+
/** Where the portal is: Home, Your Profile, or a catalog page by slug. */
|
|
128
|
+
type PortalRoute = {
|
|
129
|
+
kind: "home";
|
|
130
|
+
} | {
|
|
131
|
+
kind: "profile";
|
|
132
|
+
} | {
|
|
133
|
+
kind: "page";
|
|
134
|
+
slug: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* How portal locations are written. `hash` (`/members/#pass-the-salt`) works on
|
|
138
|
+
* any static host and is the default; `path` (`/members/pass-the-salt`) needs
|
|
139
|
+
* the host to serve the portal for every path under `basePath`.
|
|
140
|
+
*/
|
|
141
|
+
interface PortalRouting {
|
|
142
|
+
mode: "hash" | "path";
|
|
143
|
+
basePath: string;
|
|
144
|
+
}
|
|
145
|
+
/** The profile route's reserved segment. Catalog slugs cannot claim it. */
|
|
146
|
+
declare const PROFILE_SEGMENT = "profile";
|
|
147
|
+
/** Read a route from a location. Unknown shapes resolve to Home. */
|
|
148
|
+
declare function routeFromLocation(location: {
|
|
149
|
+
pathname: string;
|
|
150
|
+
hash: string;
|
|
151
|
+
}, routing: PortalRouting): PortalRoute;
|
|
152
|
+
/** Write a route as an href for this routing mode. */
|
|
153
|
+
declare function hrefFor(route: PortalRoute, routing: PortalRouting): string;
|
|
154
|
+
/** Two routes name the same place. */
|
|
155
|
+
declare const sameRoute: (a: PortalRoute, b: PortalRoute) => boolean;
|
|
156
|
+
|
|
157
|
+
/** The identity block `/api/me` returns under `portal`. */
|
|
158
|
+
interface PortalMe {
|
|
159
|
+
memberId: string;
|
|
160
|
+
tier: {
|
|
161
|
+
id: string;
|
|
162
|
+
name: string;
|
|
163
|
+
} | null;
|
|
164
|
+
memberSince: number | null;
|
|
165
|
+
displayName: string;
|
|
166
|
+
firstName: string | null;
|
|
167
|
+
initials: string;
|
|
168
|
+
location: string | null;
|
|
169
|
+
photoUrl: string | null;
|
|
170
|
+
}
|
|
171
|
+
/** The member's photo, or their initials until they upload one. */
|
|
172
|
+
declare function PortalAvatar({ me, className }: {
|
|
173
|
+
me: Pick<PortalMe, "photoUrl" | "initials">;
|
|
174
|
+
className?: string;
|
|
175
|
+
}): preact.JSX.Element;
|
|
176
|
+
/** Tag a nav item shows: lock when locked, then New, then the placeholder's availability. */
|
|
177
|
+
declare function navTag(page: MemberContentPageProjection, copy: PortalCopy): {
|
|
178
|
+
kind: string;
|
|
179
|
+
text: string;
|
|
180
|
+
} | null;
|
|
181
|
+
interface NavProps {
|
|
182
|
+
content: MemberContentProjection;
|
|
183
|
+
me: PortalMe;
|
|
184
|
+
email: string | null;
|
|
185
|
+
route: PortalRoute;
|
|
186
|
+
copy: PortalCopy;
|
|
187
|
+
adminHref?: string | undefined;
|
|
188
|
+
onNavigate: (route: PortalRoute) => void;
|
|
189
|
+
onSignOut: () => void;
|
|
190
|
+
}
|
|
191
|
+
/** The sidebar on wide screens, and the top bar with its menu on phones. */
|
|
192
|
+
declare function PortalNav(props: NavProps & {
|
|
193
|
+
brand: ComponentChildren;
|
|
194
|
+
sidebarTokens?: ThemeTokenOverrides | undefined;
|
|
195
|
+
menuOpen: boolean;
|
|
196
|
+
onToggleMenu: () => void;
|
|
197
|
+
}): preact.JSX.Element;
|
|
198
|
+
|
|
199
|
+
/** Everything a portal page or slot needs from the shell. */
|
|
200
|
+
interface PortalContext {
|
|
201
|
+
api: ApiFn;
|
|
202
|
+
me: PortalMe;
|
|
203
|
+
email: string | null;
|
|
204
|
+
content: MemberContentProjection;
|
|
205
|
+
copy: PortalCopy;
|
|
206
|
+
navigate: (route: PortalRoute) => void;
|
|
207
|
+
hrefFor: (route: PortalRoute) => string;
|
|
208
|
+
upsellHref?: ((tierId: string, page: MemberContentPageProjection) => string | undefined) | undefined;
|
|
209
|
+
reloadMe: () => Promise<void>;
|
|
210
|
+
}
|
|
211
|
+
/** A packaged or host feature: its page, and optionally its Home panel. */
|
|
212
|
+
interface PortalFeature {
|
|
213
|
+
page: (page: MemberContentPageProjection, ctx: PortalContext) => ComponentChildren;
|
|
214
|
+
home?: (page: MemberContentPageProjection, ctx: PortalContext) => ComponentChildren;
|
|
215
|
+
}
|
|
216
|
+
/** Feature renderers by name. */
|
|
217
|
+
type PortalFeatures = Partial<Record<MemberPageFeatureName, PortalFeature>>;
|
|
218
|
+
/** "Included with … membership" pill for a locked page. */
|
|
219
|
+
declare function LockedPill({ page, ctx }: {
|
|
220
|
+
page: MemberContentPageProjection;
|
|
221
|
+
ctx: PortalContext;
|
|
222
|
+
}): preact.JSX.Element;
|
|
223
|
+
/** The upgrade link for a locked page, when the site supplies a destination. */
|
|
224
|
+
declare function UpgradeLink({ page, ctx, variant }: {
|
|
225
|
+
page: MemberContentPageProjection;
|
|
226
|
+
ctx: PortalContext;
|
|
227
|
+
variant?: "accent";
|
|
228
|
+
}): preact.JSX.Element | null;
|
|
229
|
+
/** A locked page: what it is, and how to get it. Its body never reached the browser. */
|
|
230
|
+
declare function LockedScreen({ page, ctx }: {
|
|
231
|
+
page: MemberContentPageProjection;
|
|
232
|
+
ctx: PortalContext;
|
|
233
|
+
}): preact.JSX.Element;
|
|
234
|
+
/** An announced page that is not open yet. */
|
|
235
|
+
declare function PlaceholderScreen({ page }: {
|
|
236
|
+
page: MemberContentPageProjection;
|
|
237
|
+
}): preact.JSX.Element;
|
|
238
|
+
/** Route a catalog page to its screen: locked, placeholder, feature, or Markdown. */
|
|
239
|
+
declare function PortalPage({ page, ctx, features }: {
|
|
240
|
+
page: MemberContentPageProjection;
|
|
241
|
+
ctx: PortalContext;
|
|
242
|
+
features: PortalFeatures;
|
|
243
|
+
}): preact.JSX.Element;
|
|
244
|
+
/** One coming-soon tile. A locked placeholder shows who it is for. */
|
|
245
|
+
declare function PortalTile({ page, ctx }: {
|
|
246
|
+
page: MemberContentPageProjection;
|
|
247
|
+
ctx: PortalContext;
|
|
248
|
+
}): preact.JSX.Element;
|
|
249
|
+
/** Home slots a site can fill or replace. */
|
|
250
|
+
interface PortalHomeSlots {
|
|
251
|
+
/** Above everything, e.g. a banner for a tier with locked pages. */
|
|
252
|
+
top?: (ctx: PortalContext) => ComponentChildren;
|
|
253
|
+
/** Between the feature panels and the coming-soon tiles. */
|
|
254
|
+
middle?: (ctx: PortalContext) => ComponentChildren;
|
|
255
|
+
/** Replace one tile (return undefined to keep the default). */
|
|
256
|
+
tile?: (page: MemberContentPageProjection, ctx: PortalContext) => ComponentChildren | undefined;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Default Home: site slot, then each feature's Home panel in catalog order
|
|
260
|
+
* (locked panels carry an upgrade overlay), then the placeholders as tiles.
|
|
261
|
+
*/
|
|
262
|
+
declare function DefaultHome({ ctx, features, slots }: {
|
|
263
|
+
ctx: PortalContext;
|
|
264
|
+
features: PortalFeatures;
|
|
265
|
+
slots: PortalHomeSlots;
|
|
266
|
+
}): preact.JSX.Element;
|
|
267
|
+
|
|
268
|
+
/** The `/api/me` fields the portal reads. `portal` is present for an active member of a portal site. */
|
|
269
|
+
interface PortalMeResponse {
|
|
270
|
+
email: string | null;
|
|
271
|
+
authorized?: boolean;
|
|
272
|
+
superAdmin?: boolean;
|
|
273
|
+
portal: PortalMe;
|
|
274
|
+
}
|
|
275
|
+
/** Props for {@link MemberPortal}. */
|
|
276
|
+
interface MemberPortalProps {
|
|
277
|
+
api: ApiFn;
|
|
278
|
+
me: PortalMeResponse;
|
|
279
|
+
signOut: () => void;
|
|
280
|
+
/** Mark and wordmark for the sidebar and the phone bar. */
|
|
281
|
+
brand: ComponentChildren;
|
|
282
|
+
/** Where admins open the console. Shown only to admins. */
|
|
283
|
+
adminHref?: string;
|
|
284
|
+
routing?: Partial<PortalRouting>;
|
|
285
|
+
/** Token roles for the sidebar island. Without them the theme's `.ui-invert` palette applies. */
|
|
286
|
+
sidebarTokens?: ThemeTokenOverrides;
|
|
287
|
+
copy?: PortalCopy;
|
|
288
|
+
/** A site-owned upgrade destination for a locked page's offer. */
|
|
289
|
+
upsellHref?: (tierId: string, page: MemberContentPageProjection) => string | undefined;
|
|
290
|
+
/** Feature renderers; packaged ones are used unless replaced here. */
|
|
291
|
+
features?: PortalFeatures;
|
|
292
|
+
/** Home slots, or a function that replaces Home entirely. */
|
|
293
|
+
home?: PortalHomeSlots | ((ctx: PortalContext, defaultHome: ComponentChildren) => ComponentChildren);
|
|
294
|
+
/** Profile sections: `middle` before "How you found us", `extras` after it (e.g. a gift seat card). */
|
|
295
|
+
profile?: {
|
|
296
|
+
middle?: (ctx: PortalContext) => ComponentChildren;
|
|
297
|
+
extras?: ComponentChildren;
|
|
298
|
+
};
|
|
299
|
+
/** Reload `/api/me` after the member changes their name or photo. */
|
|
300
|
+
reloadMe?: () => Promise<void>;
|
|
301
|
+
/** Preloaded catalog for previews and tests; skips the fetch. */
|
|
302
|
+
initialContent?: MemberContentProjection;
|
|
303
|
+
/** Start route for previews and server rendering. */
|
|
304
|
+
initialRoute?: PortalRoute;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* The signed-in member portal: sidebar (phone menu at 860px and below), header
|
|
308
|
+
* with tier pill and profile button, Home, catalog pages, and Your Profile.
|
|
309
|
+
* Everything gated comes from the server; the portal never decides access.
|
|
310
|
+
*/
|
|
311
|
+
declare function MemberPortal(props: MemberPortalProps): preact.JSX.Element;
|
|
114
312
|
|
|
115
313
|
/** Props for {@link MembersArea}. */
|
|
116
314
|
interface MembersAreaProps {
|
|
@@ -127,6 +325,12 @@ interface MembersAreaProps {
|
|
|
127
325
|
memberPages?: true | Omit<MemberContentAreaProps, "api">;
|
|
128
326
|
/** Resolved member-area copy. */
|
|
129
327
|
copy?: ChapterCopy["members"];
|
|
328
|
+
/**
|
|
329
|
+
* Show an active member the packaged portal (`/api/me` must carry `portal`,
|
|
330
|
+
* i.e. the site enables `memberPortal`). Every other state keeps its screen;
|
|
331
|
+
* gift purchases and the gift seat card move onto Your Profile.
|
|
332
|
+
*/
|
|
333
|
+
portal?: Omit<MemberPortalProps, "api" | "me" | "signOut" | "reloadMe">;
|
|
130
334
|
/** Replace the provisional application card without replacing auth/data load. */
|
|
131
335
|
renderProvisional?: (context: MemberProvisionalRenderContext) => ComponentChildren;
|
|
132
336
|
}
|
|
@@ -860,4 +1064,51 @@ declare function JourneyFrame({ children }: {
|
|
|
860
1064
|
/** A themed application submit control. Pass the disabled state supplied by JoinIsland's renderSubmit slot. */
|
|
861
1065
|
declare function JoinSubmitButton(props: JSX.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
|
|
862
1066
|
|
|
863
|
-
|
|
1067
|
+
interface Prompt {
|
|
1068
|
+
prompt: string;
|
|
1069
|
+
answer: string;
|
|
1070
|
+
}
|
|
1071
|
+
/** `GET /api/member/profile`, as the page reads it. */
|
|
1072
|
+
interface MemberProfileView {
|
|
1073
|
+
revision: number;
|
|
1074
|
+
profile: {
|
|
1075
|
+
preferredName: string | null;
|
|
1076
|
+
location: string | null;
|
|
1077
|
+
prompts: Prompt[];
|
|
1078
|
+
introducedByText: string | null;
|
|
1079
|
+
};
|
|
1080
|
+
referredBy?: {
|
|
1081
|
+
name: string;
|
|
1082
|
+
} | null;
|
|
1083
|
+
promptChoices: string[];
|
|
1084
|
+
maxPrompts: number;
|
|
1085
|
+
photos: boolean;
|
|
1086
|
+
}
|
|
1087
|
+
/** "November 2026" for a membership start, in UTC so every viewer reads the same month. */
|
|
1088
|
+
declare const memberMonth: (at: number) => string;
|
|
1089
|
+
/** Starting prompts: the member's answers, or the site's first choices with empty answers. */
|
|
1090
|
+
declare const startingPrompts: (view: Pick<MemberProfileView, "profile" | "promptChoices" | "maxPrompts">) => Prompt[];
|
|
1091
|
+
/** Choosing another prompt adds it, or swaps out the last one when the member is at the limit. */
|
|
1092
|
+
declare function choosePrompt(prompts: Prompt[], prompt: string, max: number): Prompt[];
|
|
1093
|
+
/** Your Profile. Sections between the prompts and "How you found us" come from `middle`; `extras` follow it. */
|
|
1094
|
+
declare function MemberProfilePage({ ctx, middle, extras }: {
|
|
1095
|
+
ctx: PortalContext;
|
|
1096
|
+
middle?: ComponentChildren;
|
|
1097
|
+
extras?: ComponentChildren;
|
|
1098
|
+
}): preact.JSX.Element;
|
|
1099
|
+
|
|
1100
|
+
declare const PATHS: Record<MemberPageIcon | "lock" | "menu" | "close", string[]>;
|
|
1101
|
+
/** One portal icon, decorative unless given a label. */
|
|
1102
|
+
declare function PortalIcon({ name, size, label }: {
|
|
1103
|
+
name: keyof typeof PATHS;
|
|
1104
|
+
size?: number;
|
|
1105
|
+
label?: string;
|
|
1106
|
+
}): preact.JSX.Element;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Packaged feature renderers, keyed by catalog feature name. A site can
|
|
1110
|
+
* replace any of them through `MemberPortal`'s `features` prop.
|
|
1111
|
+
*/
|
|
1112
|
+
declare const PACKAGED_PORTAL_FEATURES: PortalFeatures;
|
|
1113
|
+
|
|
1114
|
+
export { ADDITIONAL_MEMBER_COPY, type AdditionalMemberCopy, type AdditionalMemberDraft, AdditionalMemberEditor, type AdditionalMemberEditorOptions, type AdditionalMemberEditorProps, type AdditionalMemberFieldNames, AdditionalMemberFields, type AdditionalMemberFieldsProps, type AdditionalMemberOffer, type AdditionalMemberOptions, type ApiFn, BrandStyle, type BrandStyleProps, type CheckoutSeatEditor, type CheckoutSeatEditorContext, DefaultHome, type GiftCodeRedeemResult, GiftCodeRedeemer, type GiftCodeRedeemerCopy, type GiftCodeRedeemerProps, GiftOfferCards, type GiftOfferCardsMode, type GiftOfferCardsProps, GiftPurchases, type GiftPurchasesProps, type JoinBookingPreload, type JoinBookingSimulation, type JoinConfig, type JoinFlowState, JoinIsland, type JoinIslandProps, type JoinSimulation, type JoinStepRenderContext, JoinSubmitButton, type JoinSubmitRenderContext, type JoinTier, type JoinTierRenderContext, JourneyFrame, LockedPill, LockedScreen, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, type MemberContentAreaProps, MemberGifts, MemberPlaceholderBody, MemberPortal, type MemberPortalProps, MemberProfilePage, type MemberProfileView, type MemberProvisionalRenderContext, MemberRestart, MembersArea, type MembersAreaProps, type MembershipCardTokenName, MembershipCards, type MembershipCardsMode, type MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatInvitationLink, type NamedSeatInvitationLinkProps, NamedSeatPurchase, NamedSeatRecipientLine, PACKAGED_PORTAL_FEATURES, PROFILE_SEGMENT, type PaymentPriceLines, PaymentStep, type PaymentStepProps, type PaymentStepSimulation, PlaceholderScreen, PortalAvatar, type PortalContext, type PortalFeature, type PortalFeatures, type PortalHomeSlots, PortalIcon, type PortalMe, type PortalMeResponse, PortalNav, PortalPage, type PortalRoute, type PortalRouting, PortalTile, type RescheduleProps, Rescheduler, type Slot, SlotPicker, type SlotPickerClasses, type SlotPickerProps, type SubResponse, TierPlaceholder, UpgradeLink, additionalMemberSelection, choosePrompt, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, hrefFor, loadJoinResume, memberMonth, membershipApplicationHref, namedSeatInvitationMessage, namedSeatInvitationShareable, namedSeatInvitationUrl, navTag, placeholderBadge, routeFromLocation, sameRoute, startingPrompts, tierNeedsPayment, timeLabel, tzShort, useTierSelection };
|
package/dist/ui/member/index.js
CHANGED
|
@@ -2,15 +2,21 @@ import {
|
|
|
2
2
|
ADDITIONAL_MEMBER_COPY,
|
|
3
3
|
AdditionalMemberEditor,
|
|
4
4
|
AdditionalMemberFields,
|
|
5
|
+
DefaultHome,
|
|
5
6
|
GiftCodeRedeemer,
|
|
6
7
|
GiftOfferCards,
|
|
7
8
|
GiftPurchases,
|
|
8
9
|
JoinIsland,
|
|
9
10
|
JoinSubmitButton,
|
|
10
11
|
JourneyFrame,
|
|
12
|
+
LockedPill,
|
|
13
|
+
LockedScreen,
|
|
11
14
|
MEMBERSHIP_CARD_TOKEN_DEFAULTS,
|
|
12
15
|
MemberContentArea,
|
|
13
16
|
MemberGifts,
|
|
17
|
+
MemberPlaceholderBody,
|
|
18
|
+
MemberPortal,
|
|
19
|
+
MemberProfilePage,
|
|
14
20
|
MemberRestart,
|
|
15
21
|
MembersArea,
|
|
16
22
|
MembershipCards,
|
|
@@ -18,32 +24,49 @@ import {
|
|
|
18
24
|
NamedSeatInvitationLink,
|
|
19
25
|
NamedSeatPurchase,
|
|
20
26
|
NamedSeatRecipientLine,
|
|
27
|
+
PACKAGED_PORTAL_FEATURES,
|
|
28
|
+
PROFILE_SEGMENT,
|
|
21
29
|
PaymentStep,
|
|
30
|
+
PlaceholderScreen,
|
|
31
|
+
PortalAvatar,
|
|
32
|
+
PortalIcon,
|
|
33
|
+
PortalNav,
|
|
34
|
+
PortalPage,
|
|
35
|
+
PortalTile,
|
|
22
36
|
Rescheduler,
|
|
23
37
|
SlotPicker,
|
|
24
38
|
TierPlaceholder,
|
|
39
|
+
UpgradeLink,
|
|
25
40
|
additionalMemberSelection,
|
|
41
|
+
choosePrompt,
|
|
26
42
|
dayKey,
|
|
27
43
|
dayLabel,
|
|
28
44
|
fmtDate,
|
|
29
45
|
fmtMoney,
|
|
30
46
|
fullLabel,
|
|
31
47
|
groupSlotsByDay,
|
|
48
|
+
hrefFor,
|
|
32
49
|
loadJoinResume,
|
|
50
|
+
memberMonth,
|
|
33
51
|
membershipApplicationHref,
|
|
34
52
|
namedSeatInvitationMessage,
|
|
35
53
|
namedSeatInvitationShareable,
|
|
36
54
|
namedSeatInvitationUrl,
|
|
55
|
+
navTag,
|
|
56
|
+
placeholderBadge,
|
|
57
|
+
routeFromLocation,
|
|
58
|
+
sameRoute,
|
|
59
|
+
startingPrompts,
|
|
37
60
|
tierNeedsPayment,
|
|
38
61
|
timeLabel,
|
|
39
62
|
tzShort,
|
|
40
63
|
useTierSelection
|
|
41
|
-
} from "../../chunk-
|
|
64
|
+
} from "../../chunk-ZIYK3OV2.js";
|
|
42
65
|
import {
|
|
43
66
|
BrandStyle,
|
|
44
67
|
ChapterCopyProvider,
|
|
45
68
|
useChapterCopy
|
|
46
|
-
} from "../../chunk-
|
|
69
|
+
} from "../../chunk-7CVP6VSO.js";
|
|
47
70
|
import "../../chunk-IVXVECKR.js";
|
|
48
71
|
export {
|
|
49
72
|
ADDITIONAL_MEMBER_COPY,
|
|
@@ -51,15 +74,21 @@ export {
|
|
|
51
74
|
AdditionalMemberFields,
|
|
52
75
|
BrandStyle,
|
|
53
76
|
ChapterCopyProvider,
|
|
77
|
+
DefaultHome,
|
|
54
78
|
GiftCodeRedeemer,
|
|
55
79
|
GiftOfferCards,
|
|
56
80
|
GiftPurchases,
|
|
57
81
|
JoinIsland,
|
|
58
82
|
JoinSubmitButton,
|
|
59
83
|
JourneyFrame,
|
|
84
|
+
LockedPill,
|
|
85
|
+
LockedScreen,
|
|
60
86
|
MEMBERSHIP_CARD_TOKEN_DEFAULTS,
|
|
61
87
|
MemberContentArea,
|
|
62
88
|
MemberGifts,
|
|
89
|
+
MemberPlaceholderBody,
|
|
90
|
+
MemberPortal,
|
|
91
|
+
MemberProfilePage,
|
|
63
92
|
MemberRestart,
|
|
64
93
|
MembersArea,
|
|
65
94
|
MembershipCards,
|
|
@@ -67,22 +96,39 @@ export {
|
|
|
67
96
|
NamedSeatInvitationLink,
|
|
68
97
|
NamedSeatPurchase,
|
|
69
98
|
NamedSeatRecipientLine,
|
|
99
|
+
PACKAGED_PORTAL_FEATURES,
|
|
100
|
+
PROFILE_SEGMENT,
|
|
70
101
|
PaymentStep,
|
|
102
|
+
PlaceholderScreen,
|
|
103
|
+
PortalAvatar,
|
|
104
|
+
PortalIcon,
|
|
105
|
+
PortalNav,
|
|
106
|
+
PortalPage,
|
|
107
|
+
PortalTile,
|
|
71
108
|
Rescheduler,
|
|
72
109
|
SlotPicker,
|
|
73
110
|
TierPlaceholder,
|
|
111
|
+
UpgradeLink,
|
|
74
112
|
additionalMemberSelection,
|
|
113
|
+
choosePrompt,
|
|
75
114
|
dayKey,
|
|
76
115
|
dayLabel,
|
|
77
116
|
fmtDate,
|
|
78
117
|
fmtMoney,
|
|
79
118
|
fullLabel,
|
|
80
119
|
groupSlotsByDay,
|
|
120
|
+
hrefFor,
|
|
81
121
|
loadJoinResume,
|
|
122
|
+
memberMonth,
|
|
82
123
|
membershipApplicationHref,
|
|
83
124
|
namedSeatInvitationMessage,
|
|
84
125
|
namedSeatInvitationShareable,
|
|
85
126
|
namedSeatInvitationUrl,
|
|
127
|
+
navTag,
|
|
128
|
+
placeholderBadge,
|
|
129
|
+
routeFromLocation,
|
|
130
|
+
sameRoute,
|
|
131
|
+
startingPrompts,
|
|
86
132
|
tierNeedsPayment,
|
|
87
133
|
timeLabel,
|
|
88
134
|
tzShort,
|