@riverbankcms/sdk 0.136.0 → 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 +101 -0
- package/dist/{PreviewEditorSidebar-BU5ZlhQR.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
- package/dist/{PreviewEditorUI-9XkHL-bC.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
- package/dist/{PreviewQueryProvider-wbEpXryy.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CnWmj-2B.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +596 -164
- package/dist/{SiteChromeCustomizeContext-B6d5zkog.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +2888 -1404
- package/dist/_dts/ai/src/contracts/proposals.d.ts +12 -298
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +21 -14
- 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 +1 -4
- package/dist/_dts/api/src/domainConnection.d.ts +41 -0
- package/dist/_dts/api/src/endpoints.d.ts +194 -181
- package/dist/_dts/api/src/index.d.ts +4 -3
- package/dist/_dts/api/src/media.d.ts +19 -2
- 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 +15 -4
- 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/blocks/src/PageRenderer.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +9 -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 +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +34 -22
- 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/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 +7 -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/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/OfferingTitle.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +1 -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/commerce/src/purchase/event-registration-errors.d.ts +57 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +1 -0
- 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/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/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/public-api/contracts.d.ts +2 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- 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/mock-themes/all.d.ts +3 -3
- package/dist/_dts/theme-core/src/schema.d.ts +12 -11
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +10 -0
- 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 -9
- 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 +10 -1
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +7 -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-DCch21a6.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-DIj1T59K.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
- package/dist/client/{EventCombined.client-BWVNlXTx.mjs → EventCombined.client-CwJOxn7A.mjs} +154 -178
- package/dist/client/{EventListing.client-DVFCDe3i.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BY5mIHw9.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
- package/dist/client/{accordion-CK29E8rG.mjs → accordion-MGAO3PuE.mjs} +1 -1
- package/dist/client/{bookingForm-DFvnet-N.mjs → bookingForm-CudlQPUu.mjs} +5 -5
- package/dist/client/bookings.mjs +418 -79
- package/dist/client/capacity-BW00PO7s.mjs +271 -0
- package/dist/client/{carousel-BVU5NQlb.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
- package/dist/client/{cart-BNItcZVa.mjs → cart-Bq5eU0xZ.mjs} +3 -3
- package/dist/client/{checkout-Bu6iCdkP.mjs → checkout-BAFVRdrK.mjs} +3 -3
- package/dist/client/client.mjs +2919 -1918
- package/dist/client/{context-BImarOAq.mjs → context-DCkiHVdD.mjs} +8 -5
- package/dist/client/dates-2RPXHQy4.mjs +264 -0
- package/dist/client/{eventCalendar-DS2h-UXD.mjs → eventCalendar-B0O-hPF7.mjs} +10 -17
- package/dist/client/{eventCombined-Drt4Oq9p.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
- package/dist/client/{eventDetails-Bl2vWgTX.mjs → eventDetails-D8GG2dnD.mjs} +5 -3
- package/dist/client/{eventListing-CS7PHY7v.mjs → eventListing-3ssV_bxz.mjs} +3 -3
- package/dist/client/{eventRegistration-D-j8eNy2.mjs → eventRegistration-bPQo3kVw.mjs} +562 -309
- package/dist/client/{form-RMpoLTyr.mjs → form-qMv8RDkk.mjs} +2 -2
- package/dist/client/{headerSection-BYE3Lb3k.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
- package/dist/client/hooks.mjs +289 -32
- package/dist/client/{locationMap-BxSr7Kkh.mjs → locationMap-0_xlBnNI.mjs} +2 -2
- package/dist/client/{newsletterForm-DerbXwFC.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
- package/dist/client/{productDetail-4SZCLhAf.mjs → productDetail-FBEOM7jW.mjs} +3 -3
- package/dist/client/{productList-D7AP4GNq.mjs → productList-R0OSGhnn.mjs} +3 -3
- package/dist/client/{propsDecoder-pzBeCh14.mjs → propsDecoder-pYvx_Srl.mjs} +88 -380
- package/dist/client/rendering/client.mjs +2616 -1637
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +2710 -1702
- package/dist/client/{scrollToBlock-CduAKf8T.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
- package/dist/client/{shop-Cp5p_kGe.mjs → shop-RUG9DmRE.mjs} +6 -6
- package/dist/client/{shop-commerce-DicXYaYX.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
- package/dist/client/{shop-commerce-store-CGWnpY4K.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
- package/dist/client/{shopShared-BDf9ljkm.mjs → shopShared-vXU1omwJ.mjs} +3 -3
- package/dist/client/{useEventFilters-DeeyGYuk.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +79 -51
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +79 -51
- package/dist/preview-next/middleware.mjs +79 -51
- package/dist/{previewAuthStore-DbqBol0V.mjs → previewAuthStore-L_cKW8Sb.mjs} +79 -51
- package/dist/{sdk-runtime-19MO27F0.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
- package/dist/{separator-DaPLtJ1f.mjs → separator-BIHkie5i.mjs} +1 -1
- package/dist/server/components.mjs +2077 -1274
- package/dist/server/config-validation.mjs +289 -32
- package/dist/server/config.mjs +289 -32
- package/dist/server/data.mjs +289 -32
- package/dist/server/index.mjs +80 -52
- package/dist/server/next.mjs +1822 -1111
- package/dist/server/page-converter.mjs +167 -31
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1988 -1286
- package/dist/server/rendering.mjs +1943 -1182
- package/dist/server/routing.mjs +351 -86
- package/dist/server/server.mjs +293 -128
- package/dist/server/theme-bridge.mjs +52 -8
- package/dist/server/theme.mjs +27 -8
- package/dist/styles/index.css +15 -0
- 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
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,16 +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
29
|
session_id: string | null;
|
|
30
30
|
}>;
|
|
31
|
+
clearReturnParams: () => void;
|
|
31
32
|
scrollToBlock: typeof scrollToBlock;
|
|
32
33
|
cleanupStaleRegistrations: typeof cleanupStaleRegistrations;
|
|
33
34
|
clearPendingRegistration: typeof clearPendingRegistration;
|
|
34
35
|
getPendingRegistration: typeof getPendingRegistration;
|
|
35
36
|
}>;
|
|
36
|
-
export
|
|
37
|
-
|
|
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;
|
|
38
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>>;
|
|
@@ -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';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* People presentation for events: teacher lines and name lists.
|
|
3
|
+
*/
|
|
4
|
+
import type { PublicEvent } from '../../../../blocks/events/shared/types';
|
|
5
|
+
export declare function formatTeamMemberNames(names: readonly string[]): string | null;
|
|
6
|
+
export declare function formatEventTeacherLine(event: PublicEvent): string | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type PublicEventPricing } from '../../../../../../../core/src/index';
|
|
2
|
+
import type { PublicEvent, PublicEventTicketType } from '../../../../blocks/events/shared/types';
|
|
3
|
+
type RuntimeEventPricingSource = {
|
|
4
|
+
destination?: unknown;
|
|
5
|
+
eventDestinationMode?: unknown;
|
|
6
|
+
path?: unknown;
|
|
7
|
+
pricing?: unknown;
|
|
8
|
+
requiresRegistration?: boolean | null;
|
|
9
|
+
pricingType?: unknown;
|
|
10
|
+
price?: unknown;
|
|
11
|
+
currency?: unknown;
|
|
12
|
+
priceDisplay?: unknown;
|
|
13
|
+
pricingMode?: unknown;
|
|
14
|
+
ticketTypes?: unknown;
|
|
15
|
+
};
|
|
16
|
+
export declare function resolveRuntimeEventPricing(event: RuntimeEventPricingSource): PublicEventPricing<PublicEventTicketType>;
|
|
17
|
+
/**
|
|
18
|
+
* Format event price for display.
|
|
19
|
+
* @returns "Free", "£25", "£12 - £25", "Free / £12 - £25", "Course (From £40)", etc.
|
|
20
|
+
*
|
|
21
|
+
* Events render compact amounts (no trailing ".00"); the actual ADT→string
|
|
22
|
+
* mapping lives in `formatBookingPriceDisplay` in @riverbankcms/core so all
|
|
23
|
+
* surfaces stay consistent.
|
|
24
|
+
*/
|
|
25
|
+
export declare function formatEventPrice(event: PublicEvent): string;
|
|
26
|
+
/**
|
|
27
|
+
* Format an event's price directly from its pricing value (without the full
|
|
28
|
+
* event). Same output as {@link formatEventPrice}.
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatEventPriceDisplay(pricing: PublicEventPricing<unknown>): string;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Heading for an offering card or row. Links to the offering's page when one
|
|
4
|
+
* exists so a sold-out or closed offering stays reachable (issue 1372); the
|
|
5
|
+
* `.event-title-link` rule lives in theme-core's event-list.css.
|
|
6
|
+
*/
|
|
7
|
+
export declare function OfferingTitle({ className, path, title, }: Readonly<{
|
|
8
|
+
className: string;
|
|
9
|
+
path: string | null;
|
|
10
|
+
title: string;
|
|
11
|
+
}>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type CalendarDate } from '../../../../../../../calendar/src/index';
|
|
3
3
|
import type { PublicEvent } from '../../../../blocks/events/shared/types';
|
|
4
|
-
import { type WeekCalendarDays } from '
|
|
4
|
+
import { type WeekCalendarDays } from '../domain';
|
|
5
5
|
type WeekAgendaViewProps = {
|
|
6
6
|
days: WeekCalendarDays;
|
|
7
7
|
events: PublicEvent[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ButtonVariant, PublicEvent } from '../../../../blocks/events/shared/types';
|
|
3
3
|
import { type CalendarDate } from '../../../../../../../calendar/src/index';
|
|
4
|
-
import { type WeekCalendarDays, type WeekCalendarViewport } from '
|
|
4
|
+
import { type WeekCalendarDays, type WeekCalendarViewport } from '../domain';
|
|
5
5
|
export type WeekBoardNavigationState = Readonly<{
|
|
6
6
|
rangeLabel: string;
|
|
7
7
|
isCurrentWeek: boolean;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared runtime components and utilities for event blocks
|
|
3
3
|
*/
|
|
4
|
-
export * from '
|
|
4
|
+
export * from '../domain';
|
|
5
|
+
export * from './listingLayout';
|
|
5
6
|
export { EventCard } from './EventCard';
|
|
6
7
|
export { EventCompactRow } from './EventCompactRow';
|
|
7
8
|
export { EmptyState } from './EmptyState';
|
|
8
9
|
export { DateTimeTile } from './DateTimeTile';
|
|
10
|
+
export { OfferingTitle } from './OfferingTitle';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout classes for event listing containers and cards. Presentation
|
|
3
|
+
* plumbing rather than event domain logic, so it lives beside the components.
|
|
4
|
+
*/
|
|
5
|
+
import type { CardOrientation, EventLayout } from '../../../../blocks/events/shared/types';
|
|
6
|
+
/**
|
|
7
|
+
* Column class mappings for grid layouts, derived from the canonical
|
|
8
|
+
* responsive column ladder (see gridUserColumnLadder).
|
|
9
|
+
*/
|
|
10
|
+
export declare const COLUMN_CLASSES: Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Build container class based on layout mode
|
|
13
|
+
* @param layout - 'grid', 'stack', or 'compact'
|
|
14
|
+
* @param columns - Number of columns for grid layout ('2', '3', '4')
|
|
15
|
+
* @returns `rb-*` class string for the container
|
|
16
|
+
*/
|
|
17
|
+
export declare function getContainerClass(layout: EventLayout, columns: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Get card orientation based on layout mode
|
|
20
|
+
* @param layout - 'grid', 'stack', or 'compact'
|
|
21
|
+
* @returns 'horizontal' for stack layout, 'vertical' for grid and compact layouts
|
|
22
|
+
*/
|
|
23
|
+
export declare function getCardOrientation(layout: EventLayout): CardOrientation;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export type EventRegistrationErrorAction = 'none' | 'retry' | 'places' | 'start' | 'details' | 'payment-options' | 'payment-status' | 'portal' | 'event';
|
|
2
|
+
export declare const eventRegistrationErrors: {
|
|
3
|
+
readonly registrationClosed: {
|
|
4
|
+
readonly message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.";
|
|
5
|
+
readonly action: "none";
|
|
6
|
+
};
|
|
7
|
+
readonly paymentUncertain: {
|
|
8
|
+
readonly message: "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.";
|
|
9
|
+
readonly action: "payment-status";
|
|
10
|
+
};
|
|
11
|
+
readonly paymentPageUnavailable: {
|
|
12
|
+
readonly message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.";
|
|
13
|
+
readonly action: "retry";
|
|
14
|
+
};
|
|
15
|
+
readonly paymentUnavailable: {
|
|
16
|
+
readonly message: "Online payment is not available for this event right now. Please contact the organiser for help with booking.";
|
|
17
|
+
readonly action: "none";
|
|
18
|
+
};
|
|
19
|
+
readonly capacityChanged: {
|
|
20
|
+
readonly message: "Sorry, there aren’t enough places left for your selection. Please check the available places and choose again.";
|
|
21
|
+
readonly action: "places";
|
|
22
|
+
};
|
|
23
|
+
readonly selectionChanged: {
|
|
24
|
+
readonly message: "The booking options for this event have changed. Please check the latest options and choose your places again.";
|
|
25
|
+
readonly action: "places";
|
|
26
|
+
};
|
|
27
|
+
readonly registrationPreparationChanged: {
|
|
28
|
+
readonly message: "The booking options for this event have changed. Please check the latest options and choose your places again.";
|
|
29
|
+
readonly action: "places";
|
|
30
|
+
};
|
|
31
|
+
readonly registrationAlreadyExists: {
|
|
32
|
+
readonly message: "You already have a booking for this event. Please check your bookings to see its status. If you need help, contact the organiser.";
|
|
33
|
+
readonly action: "portal";
|
|
34
|
+
};
|
|
35
|
+
readonly holdExpired: {
|
|
36
|
+
readonly message: "Your reservation has timed out. Please check availability and choose your places again.";
|
|
37
|
+
readonly action: "start";
|
|
38
|
+
};
|
|
39
|
+
readonly waitlistUnavailable: {
|
|
40
|
+
readonly message: "Sorry, the waiting list place offered in this invitation is no longer available. Please check the event for available places or contact the organiser for help.";
|
|
41
|
+
readonly action: "event";
|
|
42
|
+
};
|
|
43
|
+
readonly paymentContextMismatch: {
|
|
44
|
+
readonly message: "The payment options for this event have changed. Please check the latest options before continuing.";
|
|
45
|
+
readonly action: "payment-options";
|
|
46
|
+
};
|
|
47
|
+
readonly idempotencyConflict: {
|
|
48
|
+
readonly message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.";
|
|
49
|
+
readonly action: "portal";
|
|
50
|
+
};
|
|
51
|
+
readonly invalidCommitInput: {
|
|
52
|
+
readonly message: "We couldn’t accept your booking details. Please check the information you entered and try again. If this keeps happening, contact the organiser for help.";
|
|
53
|
+
readonly action: "details";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export type EventRegistrationErrorReason = keyof typeof eventRegistrationErrors;
|
|
57
|
+
export declare function parseEventRegistrationErrorReason(value: unknown): EventRegistrationErrorReason | null;
|