@riverbankcms/sdk 0.135.1 → 0.137.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/CHANGELOG.md +114 -0
- package/README.md +4 -8
- package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
- package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +621 -238
- package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +5041 -2407
- package/dist/_dts/ai/src/contracts/proposals.d.ts +18 -850
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +412 -2316
- package/dist/_dts/ai/src/designer/themePatch.d.ts +5 -10
- package/dist/_dts/api/src/accessAdmin.d.ts +1 -9
- package/dist/_dts/api/src/accountApi.d.ts +49 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +7 -4
- package/dist/_dts/api/src/domainConnection.d.ts +41 -0
- package/dist/_dts/api/src/endpoints.d.ts +201 -181
- package/dist/_dts/api/src/index.d.ts +5 -3
- package/dist/_dts/api/src/media.d.ts +19 -2
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
- package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -15
- package/dist/_dts/api/src/sdkMediaContracts.d.ts +40 -0
- package/dist/_dts/api/src/sdkMediaEndpointDefinitions.d.ts +61 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +21 -436
- package/dist/_dts/api/src/siteInfrastructure.d.ts +17 -23
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +7 -21
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +27 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -17
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
- package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +13 -7
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
- package/dist/_dts/blocks/src/definitions.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +49 -0
- package/dist/_dts/blocks/src/pageRendererBlockSupport.d.ts +75 -0
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +2 -0
- package/dist/_dts/blocks/src/server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +47 -21
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +38 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ErrorStep.d.ts +3 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +25 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +8 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/capacity.d.ts +164 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/cta.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +47 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/people.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/pricing.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/OfferingTitle.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listingLayout.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
- package/dist/_dts/calendar/src/grid.d.ts +24 -66
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/calendar/src/timetable.d.ts +5 -9
- package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +57 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
- package/dist/_dts/core/src/slug.d.ts +20 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +8 -40
- package/dist/_dts/db/src/index.d.ts +1 -0
- package/dist/_dts/db/src/utils/postgrestFilter.d.ts +2 -0
- package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +4 -0
- package/dist/_dts/media-core/src/fileDomain.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlSaveRequest.d.ts +51 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +24 -2
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +23 -1
- package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +8 -0
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +7 -2
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/types.d.ts +5 -0
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +25 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -810
- package/dist/_dts/theme-core/src/schema.d.ts +460 -1285
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +223 -1
- package/dist/_dts/theme-core/src/site-styles/headerBrandPresentation.d.ts +63 -0
- package/dist/_dts/theme-core/src/site-styles/headerBytesComparison.d.ts +30 -0
- package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +50 -1
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +48 -38
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerPreferences.d.ts +162 -0
- package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +73 -0
- package/dist/_dts/theme-core/src/site-styles/headerRecompile.d.ts +118 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +25 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +168 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +20 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +43 -2
- package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
- package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-CwJOxn7A.mjs} +274 -278
- package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
- package/dist/client/{accordion-KIDsKTwS.mjs → accordion-MGAO3PuE.mjs} +1 -1
- package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-CudlQPUu.mjs} +5 -5
- package/dist/client/bookings.mjs +476 -98
- package/dist/client/capacity-BW00PO7s.mjs +271 -0
- package/dist/client/{carousel-YwUgyL66.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
- package/dist/client/{cart-BbwuNrUT.mjs → cart-Bq5eU0xZ.mjs} +3 -3
- package/dist/client/{checkout-hp1ucmEY.mjs → checkout-BAFVRdrK.mjs} +3 -3
- package/dist/client/client.mjs +4641 -2721
- package/dist/client/{context-DljQn8L5.mjs → context-DCkiHVdD.mjs} +20 -5
- package/dist/client/dates-2RPXHQy4.mjs +264 -0
- package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-B0O-hPF7.mjs} +261 -126
- package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
- package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-D8GG2dnD.mjs} +7 -4
- package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-3ssV_bxz.mjs} +3 -3
- package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-bPQo3kVw.mjs} +610 -313
- package/dist/client/{form-D2KIyCVJ.mjs → form-qMv8RDkk.mjs} +2 -2
- package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
- package/dist/client/hooks.mjs +2514 -308
- package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-0_xlBnNI.mjs} +2 -2
- package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
- package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-FBEOM7jW.mjs} +3 -3
- package/dist/client/{productList-T4Cii1ot.mjs → productList-R0OSGhnn.mjs} +3 -3
- package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pYvx_Srl.mjs} +179 -401
- package/dist/client/rendering/client.mjs +3496 -2223
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +4400 -2510
- package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
- package/dist/client/{shop-B5zAcKZn.mjs → shop-RUG9DmRE.mjs} +6 -6
- package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
- package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
- package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-vXU1omwJ.mjs} +3 -3
- package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +86 -51
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +86 -51
- package/dist/preview-next/middleware.mjs +86 -51
- package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-L_cKW8Sb.mjs} +86 -51
- package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
- package/dist/{separator-CadhAtI7.mjs → separator-BIHkie5i.mjs} +1 -1
- package/dist/server/components.mjs +4397 -2960
- package/dist/server/config-validation.mjs +354 -145
- package/dist/server/config.mjs +354 -145
- package/dist/server/data.mjs +354 -144
- package/dist/server/index.mjs +201 -55
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +4046 -2611
- package/dist/server/page-converter.mjs +225 -122
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4105 -2636
- package/dist/server/rendering.mjs +4522 -3087
- package/dist/server/routing.mjs +3289 -1637
- package/dist/server/server.mjs +23175 -21079
- package/dist/server/theme-bridge.mjs +708 -272
- package/dist/server/theme.mjs +29 -25
- package/dist/styles/index.css +624 -181
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +0 -48
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +0 -100
- /package/dist/_dts/blocks/src/system/runtime/nodes/events/{shared → domain}/destination.d.ts +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DirectCheckoutCollectionOptionKind, PaymentMethod } from '../../api/types';
|
|
2
|
+
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
2
3
|
import type { EventRegistrationDirectPaymentOption, EventRegistrationDirectPaymentSelectionState } from './eventPaymentOptions';
|
|
3
4
|
import type { EventRegistrationPageSurfaceSubject } from './eventScope';
|
|
4
5
|
import type { EligibilityData, EventTicketSelectionLine, FormData, Guest, GuestErrors, OccurrenceContext, PaymentSelection, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult } from './types';
|
|
@@ -52,6 +53,7 @@ export type EventRegistrationFlowStatus = Readonly<{
|
|
|
52
53
|
}> | Readonly<{
|
|
53
54
|
tag: 'error';
|
|
54
55
|
message: string;
|
|
56
|
+
action?: EventRegistrationErrorAction;
|
|
55
57
|
}>;
|
|
56
58
|
export type EventRegistrationFlowView = Readonly<{
|
|
57
59
|
kind: 'empty';
|
|
@@ -10,7 +10,7 @@ export declare function resolveEventRegistrationSubmitPlan(input: Readonly<{
|
|
|
10
10
|
eventRequiresPayment: boolean;
|
|
11
11
|
canJoinWaitlist?: boolean | null;
|
|
12
12
|
}>): EventRegistrationSubmitPlan;
|
|
13
|
-
export declare function resolveHeadlessEventRegistrationStatus(wizard: Pick<UseEventRegistrationWizardResult, 'step' | 'registrationResult' | 'errorMessage'>): EventRegistrationFlowStatus;
|
|
13
|
+
export declare function resolveHeadlessEventRegistrationStatus(wizard: Pick<UseEventRegistrationWizardResult, 'step' | 'registrationResult' | 'errorMessage'> & Partial<Pick<UseEventRegistrationWizardResult, 'errorAction'>>): EventRegistrationFlowStatus;
|
|
14
14
|
export declare function resolveHeadlessEventRegistrationView(wizard: Readonly<Pick<UseEventRegistrationWizardResult, 'step' | 'scopedEvents' | 'occurrenceContext' | 'registrationResult' | 'errorMessage'> & {
|
|
15
15
|
api: Pick<UseEventRegistrationWizardResult['api'], 'config'>;
|
|
16
16
|
}>): EventRegistrationFlowView;
|
|
@@ -59,6 +59,7 @@ export type UseEligibilityResult = {
|
|
|
59
59
|
creditState: PortalCreditState;
|
|
60
60
|
};
|
|
61
61
|
export declare function useEligibility(params: {
|
|
62
|
+
refreshKey?: number;
|
|
62
63
|
enabled: boolean;
|
|
63
64
|
subject: RegistrationSubject | null;
|
|
64
65
|
attendanceMode?: 'in_person' | 'online' | null;
|
|
@@ -67,6 +68,7 @@ export declare function useEligibility(params: {
|
|
|
67
68
|
subjectEmail: string | null;
|
|
68
69
|
}): UseEligibilityResult;
|
|
69
70
|
export declare function useEligibilityWithDeps(params: {
|
|
71
|
+
refreshKey?: number;
|
|
70
72
|
enabled: boolean;
|
|
71
73
|
subject: RegistrationSubject | null;
|
|
72
74
|
attendanceMode?: 'in_person' | 'online' | null;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
2
|
+
import type { EligibilityData, EventTicketSelectionLine, RegistrationEvent, RegistrationStep } from './types';
|
|
3
|
+
import type { RegistrationFlowAction } from './registrationStateMachine';
|
|
4
|
+
import type { EventRegistrationStatusReference } from '../../api/types';
|
|
5
|
+
export declare function resolveRegistrationRecoveryAction(step: RegistrationStep, action: EventRegistrationErrorAction): EventRegistrationErrorAction;
|
|
6
|
+
export declare function canRecoverToWaitlist(eligibility: EligibilityData | null): boolean;
|
|
7
|
+
export declare function shouldRefreshAfterRegistrationError(step: RegistrationStep, action: EventRegistrationErrorAction, enabled: boolean): boolean;
|
|
8
|
+
export declare function resetRegistrationAfterExpiry(input: Readonly<{
|
|
9
|
+
hasPreSelectedContext: boolean;
|
|
10
|
+
preSelectedEvent: RegistrationEvent | null;
|
|
11
|
+
dispatchFlow: (action: RegistrationFlowAction) => void;
|
|
12
|
+
setSelectedTicketLines: (lines: EventTicketSelectionLine[]) => void;
|
|
13
|
+
setSelectedSlidingAmountInput: (value: string) => void;
|
|
14
|
+
setSelectedAttendanceMode: (mode: 'online' | 'in_person' | null) => void;
|
|
15
|
+
setErrorMessage: (message: string) => void;
|
|
16
|
+
setPendingRegistrationReference: (reference: EventRegistrationStatusReference | null) => void;
|
|
17
|
+
}>): void;
|
|
18
|
+
/** Recovery never starts another payment. Unknown payment outcomes go to the portal. */
|
|
19
|
+
export declare function recoverRegistrationError(action: EventRegistrationErrorAction, handlers: Readonly<{
|
|
20
|
+
canJoinWaitlist?: boolean;
|
|
21
|
+
refreshOptions: () => void;
|
|
22
|
+
clearError: () => void;
|
|
23
|
+
setStep: (step: RegistrationStep) => void;
|
|
24
|
+
reset: () => void;
|
|
25
|
+
}>): void;
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { EligibilityData, PaymentSelection, RegistrationEvent, RegistrationStep, RegistrationSubject } from './types';
|
|
2
2
|
type PortalAuthState = 'checking' | 'authenticated' | 'unauthenticated';
|
|
3
|
+
export declare function getEventSelectionDefaults(event: RegistrationEvent): Readonly<{
|
|
4
|
+
slidingAmountInput: string;
|
|
5
|
+
attendanceMode: 'online' | 'in_person' | null;
|
|
6
|
+
}>;
|
|
3
7
|
export declare function parseCurrencyInputToCents(value: string): number | null;
|
|
4
8
|
export declare function formatCentsAsCurrencyInput(amount: number): string;
|
|
5
9
|
export declare function getSlidingScaleForEvent(event: RegistrationEvent | null): Readonly<{
|
|
@@ -23,15 +23,20 @@ type EventRegistrationStripeReturnOptions = {
|
|
|
23
23
|
};
|
|
24
24
|
export type EventRegistrationStripeReturnDeps = Readonly<{
|
|
25
25
|
usePaymentVerification: typeof usePaymentVerification;
|
|
26
|
-
|
|
26
|
+
readReturnParams: () => Readonly<{
|
|
27
27
|
registration: string | null;
|
|
28
28
|
registration_attempt: string | null;
|
|
29
|
+
session_id: string | null;
|
|
29
30
|
}>;
|
|
31
|
+
clearReturnParams: () => void;
|
|
30
32
|
scrollToBlock: typeof scrollToBlock;
|
|
31
33
|
cleanupStaleRegistrations: typeof cleanupStaleRegistrations;
|
|
32
34
|
clearPendingRegistration: typeof clearPendingRegistration;
|
|
33
35
|
getPendingRegistration: typeof getPendingRegistration;
|
|
34
36
|
}>;
|
|
35
|
-
export
|
|
36
|
-
|
|
37
|
+
export type EventRegistrationStripeReturnResult = ReturnType<typeof usePaymentVerification> & Readonly<{
|
|
38
|
+
retryReturn?: () => void;
|
|
39
|
+
}>;
|
|
40
|
+
export declare function useEventRegistrationStripeReturn(options: EventRegistrationStripeReturnOptions): EventRegistrationStripeReturnResult;
|
|
41
|
+
export declare function useEventRegistrationStripeReturnWithDeps(options: EventRegistrationStripeReturnOptions, deps: EventRegistrationStripeReturnDeps): EventRegistrationStripeReturnResult;
|
|
37
42
|
export {};
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { BlockApiClient } from '../../api';
|
|
2
|
+
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
2
3
|
import { savePendingRegistration } from './sessionStorage';
|
|
3
4
|
import type { EventTicketSelectionLine, FormData, Guest, RegistrationResult, RegistrationStep, PaymentSelection } from './types';
|
|
4
5
|
import type { PaymentMethod } from '../../api/types';
|
|
@@ -37,6 +38,7 @@ export type UseEventRegistrationSubmitInput = {
|
|
|
37
38
|
claimToken: string | null;
|
|
38
39
|
setPendingRegistrationReference: (reference: EventRegistrationStatusReference) => void;
|
|
39
40
|
setStep: (step: RegistrationStep) => void;
|
|
41
|
+
setErrorAction?: (action: EventRegistrationErrorAction) => void;
|
|
40
42
|
setRegistrationResult: (result: RegistrationResult) => void;
|
|
41
43
|
setErrorMessage: (message: string) => void;
|
|
42
44
|
};
|
package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
1
2
|
import type { DiscountContext } from '../../api/types';
|
|
2
3
|
import type { EventTicketSelectionLine, EventRegistrationClientProps, EligibilityData, FormData, Guest, GuestErrors, PaymentSelection, PaymentStepState, PublicEvent, RegistrationEvent, RegistrationResult, RegistrationStep } from './types';
|
|
3
4
|
import { usePortalAuth, useEligibility, useExistingEventRegistration } from './hooks';
|
|
@@ -101,6 +102,7 @@ export declare function useEventRegistrationWizard(options: UseEventRegistration
|
|
|
101
102
|
handleGuestShakeEnd: () => void;
|
|
102
103
|
registrationResult: RegistrationResult | null;
|
|
103
104
|
errorMessage: string;
|
|
105
|
+
errorAction: EventRegistrationErrorAction;
|
|
104
106
|
altchaSolution: string | null;
|
|
105
107
|
setAltchaSolution: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
106
108
|
portalAuthState: import("./hooks").PortalAuthState;
|
|
@@ -141,7 +143,7 @@ export declare function useEventRegistrationWizard(options: UseEventRegistration
|
|
|
141
143
|
discountsAvailableLoading: boolean;
|
|
142
144
|
discountContext: DiscountContext | null;
|
|
143
145
|
shouldShowDiscountToggle: boolean;
|
|
144
|
-
verification: import("
|
|
146
|
+
verification: import("./useEventRegistrationStripeReturn").EventRegistrationStripeReturnResult;
|
|
145
147
|
handleDetailsComplete: () => Promise<EventRegistrationDetailsCompleteResult>;
|
|
146
148
|
handlePaymentSelect: () => Promise<void>;
|
|
147
149
|
handleUseCardInsteadOfPass: () => void;
|
|
@@ -221,6 +223,7 @@ export declare function useEventRegistrationWizardWithDeps(options: UseEventRegi
|
|
|
221
223
|
handleGuestShakeEnd: () => void;
|
|
222
224
|
registrationResult: RegistrationResult | null;
|
|
223
225
|
errorMessage: string;
|
|
226
|
+
errorAction: EventRegistrationErrorAction;
|
|
224
227
|
altchaSolution: string | null;
|
|
225
228
|
setAltchaSolution: import("react").Dispatch<import("react").SetStateAction<string | null>>;
|
|
226
229
|
portalAuthState: import("./hooks").PortalAuthState;
|
|
@@ -261,7 +264,7 @@ export declare function useEventRegistrationWizardWithDeps(options: UseEventRegi
|
|
|
261
264
|
discountsAvailableLoading: boolean;
|
|
262
265
|
discountContext: DiscountContext | null;
|
|
263
266
|
shouldShowDiscountToggle: boolean;
|
|
264
|
-
verification: import("
|
|
267
|
+
verification: import("./useEventRegistrationStripeReturn").EventRegistrationStripeReturnResult;
|
|
265
268
|
handleDetailsComplete: () => Promise<EventRegistrationDetailsCompleteResult>;
|
|
266
269
|
handlePaymentSelect: () => Promise<void>;
|
|
267
270
|
handleUseCardInsteadOfPass: () => void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { type Dispatch, type SetStateAction } from 'react';
|
|
2
2
|
import type { ResolveWaitlistClaimResponse } from '../../api/types';
|
|
3
3
|
import type { EventTicketSelectionLine, FormData, Guest, RegistrationEvent, RegistrationStep } from './types';
|
|
4
|
+
import type { EventRegistrationErrorAction } from '../../../../../../commerce/src/purchase/index';
|
|
4
5
|
export type WaitlistClaimRestorationSetters = Readonly<{
|
|
6
|
+
setErrorAction?: (action: EventRegistrationErrorAction) => void;
|
|
5
7
|
setErrorMessage: Dispatch<SetStateAction<string>>;
|
|
6
8
|
setStep: (step: RegistrationStep) => void;
|
|
7
9
|
setSelectedEvent: Dispatch<SetStateAction<RegistrationEvent | null>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { type EventCalendarInteractiveIslandProps } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type EventCalendarInteractiveIslandProps } from './EventCalendar.interactive';
|
|
3
3
|
export type EventCalendarClientProps = EventCalendarInteractiveIslandProps;
|
|
4
4
|
export declare const EventCalendarClient: React.FC<EventCalendarClientProps>;
|
|
5
5
|
export default EventCalendarClient;
|
|
@@ -56,6 +56,14 @@ export declare const eventCalendarBlockRuntime: Readonly<{
|
|
|
56
56
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
57
57
|
filterEventPresets: string | null;
|
|
58
58
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
59
|
+
calendarContext: Readonly<{
|
|
60
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
61
|
+
initialToday: Readonly<{
|
|
62
|
+
year: number;
|
|
63
|
+
month: number;
|
|
64
|
+
day: number;
|
|
65
|
+
}>;
|
|
66
|
+
}>;
|
|
59
67
|
}>;
|
|
60
68
|
}>;
|
|
61
69
|
contracts: Readonly<{
|
|
@@ -73,6 +81,14 @@ export declare const eventCalendarBlockRuntime: Readonly<{
|
|
|
73
81
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
74
82
|
filterEventPresets: string | null;
|
|
75
83
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
84
|
+
calendarContext: Readonly<{
|
|
85
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
86
|
+
initialToday: Readonly<{
|
|
87
|
+
year: number;
|
|
88
|
+
month: number;
|
|
89
|
+
day: number;
|
|
90
|
+
}>;
|
|
91
|
+
}>;
|
|
76
92
|
}>;
|
|
77
93
|
}>) => unknown;
|
|
78
94
|
decode: (input: unknown) => import("../../../../contracts").DecodeResult<Readonly<{
|
|
@@ -84,6 +100,14 @@ export declare const eventCalendarBlockRuntime: Readonly<{
|
|
|
84
100
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
85
101
|
filterEventPresets: string | null;
|
|
86
102
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
103
|
+
calendarContext: Readonly<{
|
|
104
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
105
|
+
initialToday: Readonly<{
|
|
106
|
+
year: number;
|
|
107
|
+
month: number;
|
|
108
|
+
day: number;
|
|
109
|
+
}>;
|
|
110
|
+
}>;
|
|
87
111
|
}>;
|
|
88
112
|
}>>;
|
|
89
113
|
}>;
|
|
@@ -107,6 +131,14 @@ export declare const eventCalendarInteractiveIslandPropsCodec: Readonly<{
|
|
|
107
131
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
108
132
|
filterEventPresets: string | null;
|
|
109
133
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
134
|
+
calendarContext: Readonly<{
|
|
135
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
136
|
+
initialToday: Readonly<{
|
|
137
|
+
year: number;
|
|
138
|
+
month: number;
|
|
139
|
+
day: number;
|
|
140
|
+
}>;
|
|
141
|
+
}>;
|
|
110
142
|
}>;
|
|
111
143
|
}>>;
|
|
112
144
|
}>) => unknown;
|
|
@@ -127,6 +159,14 @@ export declare const eventCalendarInteractiveIslandPropsCodec: Readonly<{
|
|
|
127
159
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
128
160
|
filterEventPresets: string | null;
|
|
129
161
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
162
|
+
calendarContext: Readonly<{
|
|
163
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
164
|
+
initialToday: Readonly<{
|
|
165
|
+
year: number;
|
|
166
|
+
month: number;
|
|
167
|
+
day: number;
|
|
168
|
+
}>;
|
|
169
|
+
}>;
|
|
130
170
|
}>;
|
|
131
171
|
}>>;
|
|
132
172
|
}>>;
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import type { PublicEvent, ButtonVariant, EventLayout, ColumnOption, WeekStart, CalendarTabViews, FilterAutoShow, CalendarView, EventScheduleScope, EventSurfaceScope } from "../../../blocks/events/shared/types";
|
|
3
3
|
import type { CardRole } from "../../../../../../theme-core/src/cards/index";
|
|
4
4
|
import type { EventCombinedInteractiveIslandProps } from "./EventCombined.interactive";
|
|
5
|
+
import type { EventCollectionHydration } from './shared/eventCollectionContract';
|
|
5
6
|
import { type EventListPaginationAction, type EventPageSize } from "./shared/listOptions";
|
|
6
7
|
export type EventCombinedClientProps = Readonly<{
|
|
7
8
|
events?: PublicEvent[] | null;
|
|
@@ -32,6 +33,7 @@ export type EventCombinedClientProps = Readonly<{
|
|
|
32
33
|
buttonText?: string;
|
|
33
34
|
emptyMessage?: string;
|
|
34
35
|
className?: string;
|
|
36
|
+
calendarContext: EventCollectionHydration['calendarContext'];
|
|
35
37
|
}>;
|
|
36
38
|
export type EventCombinedIslandClientProps = EventCombinedInteractiveIslandProps;
|
|
37
39
|
/**
|
|
@@ -52,6 +52,7 @@ export declare const eventCombinedBlockRuntime: Readonly<{
|
|
|
52
52
|
buttonText?: string;
|
|
53
53
|
emptyMessage?: string;
|
|
54
54
|
className?: string;
|
|
55
|
+
bookingTimeZone?: string;
|
|
55
56
|
}>) => Readonly<{
|
|
56
57
|
display: EventCombinedDisplay;
|
|
57
58
|
hydration: Readonly<{
|
|
@@ -61,6 +62,14 @@ export declare const eventCombinedBlockRuntime: Readonly<{
|
|
|
61
62
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
62
63
|
filterEventPresets: string | null;
|
|
63
64
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
65
|
+
calendarContext: Readonly<{
|
|
66
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
67
|
+
initialToday: Readonly<{
|
|
68
|
+
year: number;
|
|
69
|
+
month: number;
|
|
70
|
+
day: number;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
64
73
|
}>;
|
|
65
74
|
}>;
|
|
66
75
|
contracts: Readonly<{
|
|
@@ -97,6 +106,7 @@ export declare const eventCombinedBlockRuntime: Readonly<{
|
|
|
97
106
|
buttonText?: string;
|
|
98
107
|
emptyMessage?: string;
|
|
99
108
|
className?: string;
|
|
109
|
+
bookingTimeZone?: string;
|
|
100
110
|
}>) => unknown;
|
|
101
111
|
decode: (input: unknown) => import("../../../../contracts").DecodeResult<Readonly<{
|
|
102
112
|
events?: import("../event-registration").PublicEvent[] | null;
|
|
@@ -130,6 +140,7 @@ export declare const eventCombinedBlockRuntime: Readonly<{
|
|
|
130
140
|
buttonText?: string;
|
|
131
141
|
emptyMessage?: string;
|
|
132
142
|
className?: string;
|
|
143
|
+
bookingTimeZone?: string;
|
|
133
144
|
}>>;
|
|
134
145
|
}>;
|
|
135
146
|
render: Readonly<{
|
|
@@ -142,6 +153,14 @@ export declare const eventCombinedBlockRuntime: Readonly<{
|
|
|
142
153
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
143
154
|
filterEventPresets: string | null;
|
|
144
155
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
156
|
+
calendarContext: Readonly<{
|
|
157
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
158
|
+
initialToday: Readonly<{
|
|
159
|
+
year: number;
|
|
160
|
+
month: number;
|
|
161
|
+
day: number;
|
|
162
|
+
}>;
|
|
163
|
+
}>;
|
|
145
164
|
}>;
|
|
146
165
|
}>) => unknown;
|
|
147
166
|
decode: (input: unknown) => import("../../../../contracts").DecodeResult<Readonly<{
|
|
@@ -153,6 +172,14 @@ export declare const eventCombinedBlockRuntime: Readonly<{
|
|
|
153
172
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
154
173
|
filterEventPresets: string | null;
|
|
155
174
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
175
|
+
calendarContext: Readonly<{
|
|
176
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
177
|
+
initialToday: Readonly<{
|
|
178
|
+
year: number;
|
|
179
|
+
month: number;
|
|
180
|
+
day: number;
|
|
181
|
+
}>;
|
|
182
|
+
}>;
|
|
156
183
|
}>;
|
|
157
184
|
}>>;
|
|
158
185
|
}>;
|
|
@@ -176,6 +203,14 @@ export declare const eventCombinedInteractiveIslandPropsCodec: Readonly<{
|
|
|
176
203
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
177
204
|
filterEventPresets: string | null;
|
|
178
205
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
206
|
+
calendarContext: Readonly<{
|
|
207
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
208
|
+
initialToday: Readonly<{
|
|
209
|
+
year: number;
|
|
210
|
+
month: number;
|
|
211
|
+
day: number;
|
|
212
|
+
}>;
|
|
213
|
+
}>;
|
|
179
214
|
}>;
|
|
180
215
|
}>>;
|
|
181
216
|
}>) => unknown;
|
|
@@ -196,6 +231,14 @@ export declare const eventCombinedInteractiveIslandPropsCodec: Readonly<{
|
|
|
196
231
|
eventSurface: import("../../..").EventSurfaceScope;
|
|
197
232
|
filterEventPresets: string | null;
|
|
198
233
|
scheduleScope: import("../../..").EventScheduleScope;
|
|
234
|
+
calendarContext: Readonly<{
|
|
235
|
+
timeZone: import("../../../../../../core/src/index").BookingTimeZone;
|
|
236
|
+
initialToday: Readonly<{
|
|
237
|
+
year: number;
|
|
238
|
+
month: number;
|
|
239
|
+
day: number;
|
|
240
|
+
}>;
|
|
241
|
+
}>;
|
|
199
242
|
}>;
|
|
200
243
|
}>>;
|
|
201
244
|
}>>;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import type { PublicEvent, PublicEventAttendanceMode, PublicEventAttendanceModeAvailability } from '../../../../blocks/events/shared/types';
|
|
2
|
+
/**
|
|
3
|
+
* The four fields capacity maths needs. Satisfied by a `PublicEvent`, by the
|
|
4
|
+
* wizard's `RegistrationEvent`, and by a single attendance-mode availability
|
|
5
|
+
* row, so one helper can answer for the whole event or for one mode.
|
|
6
|
+
*/
|
|
7
|
+
export type EventCapacitySource = Pick<PublicEvent, 'capacity' | 'registeredCount' | 'availableSpots' | 'waitlistEnabled'>;
|
|
8
|
+
export type EventAvailability = {
|
|
9
|
+
/** Remaining spots. `null` when the event has no capacity cap. */
|
|
10
|
+
available: number | null;
|
|
11
|
+
/** True when the event has a cap and no spots remain. */
|
|
12
|
+
isFull: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Compute remaining spots for an event from `availableSpots` with a fallback
|
|
16
|
+
* to `capacity - registeredCount`. Returns `{ available: null, isFull: false }`
|
|
17
|
+
* for uncapped events so call sites can render no capacity indicator at all.
|
|
18
|
+
*
|
|
19
|
+
* The single source of truth for capacity math across event cards, agenda
|
|
20
|
+
* rows, and timetable cells — keep wording variations in the call sites.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getEventAvailability(event: EventCapacitySource): EventAvailability;
|
|
23
|
+
type EventWithAttendanceModes = EventCapacitySource & {
|
|
24
|
+
attendanceModes?: readonly PublicEventAttendanceModeAvailability[] | null;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Pick the capacity row a booking decision should read: the selected
|
|
28
|
+
* attendance mode's availability when the visitor has chosen one and the
|
|
29
|
+
* event publishes it, otherwise the event-level aggregate.
|
|
30
|
+
*
|
|
31
|
+
* The mode row is used wholesale. A mode with `capacity: null` on a capped
|
|
32
|
+
* event is uncapped *by design*: the registration write path applies the
|
|
33
|
+
* same rule via `getEffectiveOccurrenceCapacityForAttendanceMode`, so falling
|
|
34
|
+
* back to the event's `availableSpots` here would block bookings the server
|
|
35
|
+
* accepts. (Waitlist claims are still occurrence-scoped; see issue 1377.)
|
|
36
|
+
*/
|
|
37
|
+
export declare function selectEventCapacitySource(event: EventWithAttendanceModes, attendanceMode?: PublicEventAttendanceMode | null): EventCapacitySource;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the visitor's next step is the waitlist: the source is full *and*
|
|
40
|
+
* a waitlist is open. The one place this is decided — cards, rows, the
|
|
41
|
+
* wizard's steps and its action bar all route through here so they agree,
|
|
42
|
+
* including for producers that omit `availableSpots` and rely on the
|
|
43
|
+
* `capacity - registeredCount` fallback.
|
|
44
|
+
*/
|
|
45
|
+
export declare function canJoinEventWaitlist(event: EventWithAttendanceModes, options?: {
|
|
46
|
+
attendanceMode?: PublicEventAttendanceMode | null;
|
|
47
|
+
}): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Remaining places at or below which an event reads as scarce and the exact
|
|
50
|
+
* count is worth showing. Above it, no number is shown at all: "147 places
|
|
51
|
+
* left" is not something a visitor acts on, and it is the figure most likely
|
|
52
|
+
* to be stale on a cached page.
|
|
53
|
+
*
|
|
54
|
+
* max( min(3, ceil(capacity * 0.25)), ceil(capacity * 0.05) )
|
|
55
|
+
*
|
|
56
|
+
* The 25% arm stops small groups shouting early (3 of 4 is not urgency); the
|
|
57
|
+
* 5% floor stops large events staying silent until three remain.
|
|
58
|
+
* capacity 4 -> 1, 12 -> 3, 40 -> 3, 100 -> 5, 200 -> 10.
|
|
59
|
+
*/
|
|
60
|
+
export declare function lowCapacityThreshold(capacity: number): number;
|
|
61
|
+
/**
|
|
62
|
+
* The remaining-places state every surface renders from. `open` deliberately
|
|
63
|
+
* carries no count: nothing should show one above the threshold, and logic
|
|
64
|
+
* that needs the number (quantity caps) reads {@link getEventAvailability}.
|
|
65
|
+
*/
|
|
66
|
+
export type RemainingPlaces = {
|
|
67
|
+
kind: 'unlimited';
|
|
68
|
+
} | {
|
|
69
|
+
kind: 'open';
|
|
70
|
+
} | {
|
|
71
|
+
kind: 'low';
|
|
72
|
+
remaining: number;
|
|
73
|
+
} | {
|
|
74
|
+
kind: 'full';
|
|
75
|
+
waitlist: boolean;
|
|
76
|
+
};
|
|
77
|
+
export declare function getRemainingPlaces(source: EventCapacitySource): RemainingPlaces;
|
|
78
|
+
export type RemainingPlacesWording = Readonly<{
|
|
79
|
+
/** Label when full with no waitlist. Defaults to "Full". */
|
|
80
|
+
full?: string;
|
|
81
|
+
/** Label when full with a waitlist open. Defaults to "Waitlist". */
|
|
82
|
+
waitlist?: string;
|
|
83
|
+
/** "2 left" instead of "2 places left", for pills and timetable cells. */
|
|
84
|
+
compact?: boolean;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* The one place a remaining-places count becomes text. Returns `null` when
|
|
88
|
+
* nothing should be shown: uncapped events, and capped events above the
|
|
89
|
+
* scarcity threshold. Surfaces that need their own full-state wording pass
|
|
90
|
+
* it in rather than re-deriving the count.
|
|
91
|
+
*/
|
|
92
|
+
export declare function formatRemainingPlaces(source: EventCapacitySource, wording?: RemainingPlacesWording): string | null;
|
|
93
|
+
/**
|
|
94
|
+
* Ticket types publish only what is left, never a total, so the capacity
|
|
95
|
+
* threshold cannot apply. The absolute arm of {@link lowCapacityThreshold}
|
|
96
|
+
* is used on its own: the count shows at three or fewer, otherwise nothing.
|
|
97
|
+
*/
|
|
98
|
+
export declare const TICKET_TYPE_LOW_COUNT = 3;
|
|
99
|
+
export declare function formatTicketTypeRemaining(remainingCapacity: number | null): string | null;
|
|
100
|
+
/** Total capacity as copy ("12 places"), for detail surfaces that state the size of an event. */
|
|
101
|
+
export declare function formatTotalCapacity(capacity: number | null): string | null;
|
|
102
|
+
/**
|
|
103
|
+
* Three-state availability status for compact boards and pills.
|
|
104
|
+
* - `available`: uncapped, or above the scarcity threshold. No label.
|
|
105
|
+
* - `filling`: at or below {@link lowCapacityThreshold}. Label is the compact count.
|
|
106
|
+
* - `waitlist`: full. Label reflects whether a waitlist is open.
|
|
107
|
+
*/
|
|
108
|
+
export type EventAvailabilityStatus = 'available' | 'filling' | 'waitlist';
|
|
109
|
+
export type EventAvailabilityDetail = {
|
|
110
|
+
status: EventAvailabilityStatus;
|
|
111
|
+
/** Remaining spots. `null` when the event has no capacity cap. */
|
|
112
|
+
available: number | null;
|
|
113
|
+
isFull: boolean;
|
|
114
|
+
/** Short pill label, e.g. "2 left", "Waitlist", "Full". `null` when nothing should show. */
|
|
115
|
+
label: string | null;
|
|
116
|
+
};
|
|
117
|
+
export declare function getEventAvailabilityStatus(event: HybridEventCapacitySource): EventAvailabilityDetail;
|
|
118
|
+
/**
|
|
119
|
+
* An event as the browse surfaces see it: the aggregate capacity fields plus
|
|
120
|
+
* the delivery mode and the per-mode rows. `PublicEvent` satisfies it.
|
|
121
|
+
*/
|
|
122
|
+
export type HybridEventCapacitySource = EventWithAttendanceModes & {
|
|
123
|
+
deliveryMode?: PublicEvent['deliveryMode'];
|
|
124
|
+
};
|
|
125
|
+
/** Remaining places for each side of a hybrid event. */
|
|
126
|
+
export type HybridRemainingPlaces = Readonly<{
|
|
127
|
+
inPerson: RemainingPlaces;
|
|
128
|
+
online: RemainingPlaces;
|
|
129
|
+
}>;
|
|
130
|
+
/**
|
|
131
|
+
* Per-mode remaining places for a hybrid event, or `null` when the event is
|
|
132
|
+
* not hybrid or does not publish both rows — in which case the aggregate is
|
|
133
|
+
* all there is and the existing single-label helpers apply.
|
|
134
|
+
*/
|
|
135
|
+
export declare function getHybridAvailability(event: HybridEventCapacitySource): HybridRemainingPlaces | null;
|
|
136
|
+
/**
|
|
137
|
+
* The capacity row a whole-event decision should read: the most open
|
|
138
|
+
* attendance mode of a hybrid event, otherwise the aggregate. A hybrid event
|
|
139
|
+
* is sold out only when both of its modes are, and its waitlist is reachable
|
|
140
|
+
* when either full mode has one open.
|
|
141
|
+
*/
|
|
142
|
+
export declare function selectMostOpenCapacitySource(event: HybridEventCapacitySource): EventCapacitySource;
|
|
143
|
+
/** True when no attendance mode has room. Hybrid-aware; use this for sold-out decisions. */
|
|
144
|
+
export declare function isEventFull(event: HybridEventCapacitySource): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* True when the event is full on every mode and at least one of those full
|
|
147
|
+
* modes has a waitlist open. An event with a mode still bookable is not a
|
|
148
|
+
* waitlist prospect: it should send the visitor to that mode instead.
|
|
149
|
+
*/
|
|
150
|
+
export declare function canJoinEventWaitlistOnAnyMode(event: HybridEventCapacitySource): boolean;
|
|
151
|
+
/**
|
|
152
|
+
* The browse-surface label for an event's remaining places. Single-mode
|
|
153
|
+
* events get exactly the aggregate label {@link formatRemainingPlaces}
|
|
154
|
+
* produces, and so does a hybrid event whose two modes tell the same story.
|
|
155
|
+
* When the modes differ, both sides are named: "available" on a card is a
|
|
156
|
+
* promise the registration wizard would otherwise have to break.
|
|
157
|
+
*
|
|
158
|
+
* Hybrid examples, in person full with 3 online places left:
|
|
159
|
+
* default -> "Online: 3 places left · In person: Full"
|
|
160
|
+
* { full: 'Sold out' } -> "Online: 3 places left · In person: Sold out"
|
|
161
|
+
* { compact: true } -> "Online: 3 left"
|
|
162
|
+
*/
|
|
163
|
+
export declare function formatEventRemainingPlaces(event: HybridEventCapacitySource, wording?: RemainingPlacesWording): string | null;
|
|
164
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Booking call-to-action resolution for events: where an event links to and
|
|
3
|
+
* what the button says. Sold-out and waitlist decisions come from capacity.ts
|
|
4
|
+
* so cards, rows and the wizard never disagree.
|
|
5
|
+
*/
|
|
6
|
+
import type { PublicEvent } from '../../../../blocks/events/shared/types';
|
|
7
|
+
export type ResolvedEventCta = {
|
|
8
|
+
label: string;
|
|
9
|
+
href: string;
|
|
10
|
+
external: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* True when no booking CTA should render (e.g. sold out with no waitlist).
|
|
13
|
+
* This does NOT mean the event is unreachable: cards and rows link the
|
|
14
|
+
* title to the event page regardless, so a hidden CTA is never a dead end.
|
|
15
|
+
*/
|
|
16
|
+
hidden: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare function resolveEventHref(event: PublicEvent): string;
|
|
19
|
+
export declare function resolveEventLinkProps(event: PublicEvent): {
|
|
20
|
+
href: string;
|
|
21
|
+
target?: '_blank';
|
|
22
|
+
rel?: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the CTA state for an event.
|
|
26
|
+
* Shared by EventCard and EventCompactRow to keep sold-out, registration-closed,
|
|
27
|
+
* and course-specific defaults consistent.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveEventCta(event: PublicEvent, buttonText?: string | null): ResolvedEventCta;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date and time presentation for events: the single place an event's
|
|
3
|
+
* timestamps become strings or date buckets. Calendar-grid primitives are
|
|
4
|
+
* re-exported from @riverbankcms/calendar so block code has one import.
|
|
5
|
+
*/
|
|
6
|
+
import type { PublicEvent } from '../../../../blocks/events/shared/types';
|
|
7
|
+
export { DAY_NAMES, MONTH_NAMES } from '../../../../../../../calendar/src/index';
|
|
8
|
+
export type { WeekStart } from '../../../../../../../calendar/src/index';
|
|
9
|
+
type DateTimeFormatOptions = {
|
|
10
|
+
/** When omitted, runtime local timezone is used. */
|
|
11
|
+
timeZone?: string | null;
|
|
12
|
+
locale?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Format date for display.
|
|
16
|
+
* Returns: "Monday, January 15, 2025"
|
|
17
|
+
*/
|
|
18
|
+
export declare function formatDate(isoTimestamp: string, options?: DateTimeFormatOptions): string;
|
|
19
|
+
/**
|
|
20
|
+
* Format time for display.
|
|
21
|
+
* Returns: "10:00 AM"
|
|
22
|
+
*/
|
|
23
|
+
export declare function formatTime(isoTimestamp: string, options?: DateTimeFormatOptions): string;
|
|
24
|
+
export declare function formatEventDateParts(args: {
|
|
25
|
+
startsAt: string;
|
|
26
|
+
endsAt: string;
|
|
27
|
+
timeZone?: string | null;
|
|
28
|
+
locale?: string;
|
|
29
|
+
}): {
|
|
30
|
+
date: string;
|
|
31
|
+
timeRange: string;
|
|
32
|
+
};
|
|
33
|
+
export type EventCompactDateRail = Readonly<{
|
|
34
|
+
weekday: string;
|
|
35
|
+
day: string;
|
|
36
|
+
month: string;
|
|
37
|
+
label: string;
|
|
38
|
+
}>;
|
|
39
|
+
export declare function formatEventCompactDateRail(isoTimestamp: string, options?: DateTimeFormatOptions): EventCompactDateRail;
|
|
40
|
+
export { addDays, addMonths, buildCalendarViewport, formatCalendarTitle, formatDateKey, getEndOfMonth, getMonthCalendarDays, getOrderedDayNames, getStartOfMonth, getWeekCalendarDays, getWeekCalendarDayTuple, isToday, MAX_EVENTS_PER_DAY, shiftCalendarAnchorDate, } from '../../../../../../../calendar/src/index';
|
|
41
|
+
export type { CalendarDate, CalendarViewport, CalendarViewportKind, MonthCalendarViewport, WeekCalendarDays, WeekCalendarViewport, } from '../../../../../../../calendar/src/index';
|
|
42
|
+
/**
|
|
43
|
+
* Group events by their local date (YYYY-MM-DD key in each event's own
|
|
44
|
+
* timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
|
|
45
|
+
* package; preserves the historical `Map<string, PublicEvent[]>` shape.
|
|
46
|
+
*/
|
|
47
|
+
export declare function groupEventsByDate(events: PublicEvent[], calendarTimeZone: string): Map<string, PublicEvent[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event domain helpers: pure functions that turn event data into strings,
|
|
3
|
+
* numbers, hrefs and decisions. One file per concept, no React.
|
|
4
|
+
*
|
|
5
|
+
* If you are about to format a date, a price, a name, a capacity count or a
|
|
6
|
+
* CTA for an event inline in a component, the function belongs here instead.
|
|
7
|
+
* Components in ../shared and the registration wizard import from this barrel.
|
|
8
|
+
*/
|
|
9
|
+
export * from './capacity';
|
|
10
|
+
export * from './cta';
|
|
11
|
+
export * from './dates';
|
|
12
|
+
export * from './destination';
|
|
13
|
+
export * from './people';
|
|
14
|
+
export * from './pricing';
|