@riverbankcms/sdk 0.130.2 → 0.134.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 +13 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DfRhJPFQ.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-Dppxcr_g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-8CyGCXir.mjs} +91 -21
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-DVMTMvqA.mjs} +6896 -4335
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1105 -533
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +363 -276
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -9
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -19
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +31 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -14
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/bookings.d.ts +2 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -2
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +2 -2
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +469 -349
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +91 -1
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +32 -0
- package/dist/_dts/api/src/giftingDashboard.d.ts +117 -0
- package/dist/_dts/api/src/giftingEndpointDefinitions.d.ts +124 -0
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -0
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +28 -13
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +3 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -3
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +9 -32
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +25 -0
- package/dist/_dts/api/src/sdkThemeCatalogContracts.d.ts +20 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +64 -54
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -10
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +2 -3
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -116
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/subroutes/fold.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/index.d.ts +0 -3
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +2 -50
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +1 -929
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -97
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +39 -6
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -20
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -9
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +84 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -11
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/DynamicFormFields.d.ts +3 -19
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +45 -72
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +22 -37
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +19 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +25 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +75 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +21 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +6 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/validation.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/MembershipHero.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/CourseRegistrationErrorBoundary.d.ts → event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts} +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/index.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/types.d.ts +18 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseEligibility.d.ts → event-registration/whole-series/useWholeSeriesEligibility.d.ts} +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseRegistrationPortal.d.ts → event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts} +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +185 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseWaitlistSelection.d.ts → event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts} +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/utils.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.contract.d.ts +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/courseRegistrationViewState.d.ts → event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts} +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/wizardSteps.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -54
- 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 +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalCloseButton.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +51 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingConsentAgreement.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +30 -11
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +15 -4
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -4
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +13 -0
- package/dist/_dts/commerce/src/purchase/cancellationPolicy.d.ts +7 -0
- package/dist/_dts/commerce/src/purchase/canonicalRefundPlanner.d.ts +48 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/checkoutDiscountContextPlanning.d.ts +80 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/checkoutOrderItemProjection.d.ts +22 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentFlow.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +30 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +53 -0
- package/dist/_dts/commerce/src/purchase/checkoutQuantity.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +76 -0
- package/dist/_dts/commerce/src/purchase/checkoutSettlement.d.ts +46 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +125 -0
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +91 -0
- package/dist/_dts/commerce/src/purchase/discountApplication.d.ts +74 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/order-number.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/orderCancellationPlan.d.ts +19 -0
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +71 -0
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +120 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +81 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentResult.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/orderHistoryLedgerFilters.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderHistorySource.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentAdminSettlement.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +44 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +24 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +151 -0
- package/dist/_dts/commerce/src/purchase/orderItemSupport.d.ts +14 -0
- package/dist/_dts/commerce/src/purchase/orderListFilters.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentLinkPlanning.d.ts +60 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentReceipt.d.ts +184 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +135 -0
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +102 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPlanning.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPolicy.d.ts +36 -0
- package/dist/_dts/commerce/src/purchase/orderTotals.d.ts +23 -0
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/pendingCheckoutSessionClaim.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +27 -0
- package/dist/_dts/commerce/src/purchase/protectedDepositRefundPolicy.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/refundPolicy.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/result.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +97 -0
- package/dist/_dts/commerce/src/purchase/shopRefundPlanning.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +31 -0
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +168 -0
- package/dist/_dts/commerce/src/shop/shipmentEligibility.d.ts +14 -0
- package/dist/_dts/commerce/src/utils/assertNever.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -4
- package/dist/_dts/core/src/booking-consent.d.ts +8 -0
- package/dist/_dts/core/src/booking-vertical-catalog.d.ts +741 -0
- package/dist/_dts/core/src/booking-vertical-config.d.ts +66 -0
- package/dist/_dts/core/src/booking-vertical-definitions.d.ts +68 -0
- package/dist/_dts/{api/src/bookingVerticalPreset.d.ts → core/src/booking-vertical-preset.d.ts} +1 -1
- package/dist/_dts/core/src/booking-verticals.d.ts +98 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-pricing.d.ts +5 -0
- package/dist/_dts/core/src/event-series-behaviour.d.ts +16 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -3
- package/dist/_dts/db/src/schemas/forms.d.ts +25 -25
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -4
- package/dist/_dts/media-core/src/fileUploadCompletion.d.ts +3 -0
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +2 -0
- package/dist/_dts/media-core/src/identifiers.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaWriteNormalizer.d.ts +2 -6
- package/dist/_dts/media-core/src/types.d.ts +2 -1
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/media-editor/src/index.d.ts +2 -2
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +1 -22
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +0 -9
- package/dist/_dts/preview-next/src/client/preview/ButtonHoverRoleControls.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfiguratorWarningNotice.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +7 -89
- package/dist/_dts/sdk/src/client/eventSubrouteReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/client/types.d.ts +12 -5
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/next/pageMetadataProjection.d.ts +7 -0
- package/dist/_dts/sdk/src/next/resolveEventPageSubroute.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -38
- package/dist/_dts/sdk/src/public-api/eventSubrouteContracts.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +44 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +4 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +7 -3
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/buttonSurfaceContext.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/contextualHover.d.ts +41 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonHoverTreatment.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +21 -4
- package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +92 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +10 -150
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +57 -102
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +50 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +41 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +7 -29
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +90 -75
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +98 -110
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +13 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → BookingConsentAgreement-BxgpGEFD.mjs} +26 -4
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-CfuPOHD0.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-DB8Qfzi-.mjs} +37 -49
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-DD4X8hp4.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-QhgIBQbv.mjs} +1 -1
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-DwtC7bCs.mjs} +1460 -1247
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-DFXpLvwg.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-sI05d3lk.mjs} +73 -47
- package/dist/client/bookings.mjs +1719 -706
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-wjyWTZCh.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DCwdpA4i.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-DTDW3l0R.mjs} +3 -3
- package/dist/client/checkoutUrls-DQYC_Br-.mjs +187 -0
- package/dist/client/client.mjs +6830 -3672
- package/dist/client/{context-B83PiNzm.mjs → context-TSK1CGx8.mjs} +1 -14
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-A-Tg7qw_.mjs} +11 -5
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-B0Zg-i_w.mjs} +41 -44
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-B8Y2wizd.mjs} +3 -3
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-DPDOwURJ.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-CjBcmSLn.mjs} +3 -3
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CK30HsAq.mjs} +730 -190
- package/dist/client/{form-BA4t3kKU.mjs → form-CUXfsABE.mjs} +2 -2
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-N-mN3rjr.mjs} +2 -2
- package/dist/client/hooks.mjs +1418 -484
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-oiIDQMBt.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-CkQ2tTrM.mjs} +2 -2
- package/dist/client/pricing-Caa0QWzh.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-CnidyrsN.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-CttYcS_S.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-CeUMxI9a.mjs} +677 -350
- package/dist/client/rendering/client.mjs +6075 -4150
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7589 -4388
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-lPr1oqxB.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DXQtMo2O.mjs} +6 -6
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-quDL411J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-Dnu-8Iub.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-BWPUURvG.mjs} +3 -3
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-DRhWp2_5.mjs} +196 -7
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-UN4WKnaM.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +247 -60
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +247 -60
- package/dist/preview-next/middleware.mjs +247 -60
- package/dist/{previewAuthStore-CX1C_KJ4.mjs → previewAuthStore-BFKd4LrN.mjs} +247 -60
- package/dist/{sdk-runtime-5CcPAI14.mjs → sdk-runtime-Ca5RD78X.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-CMhj6BTi.mjs} +1 -1
- package/dist/server/components.mjs +3578 -1614
- package/dist/server/config-validation.mjs +1418 -485
- package/dist/server/config.mjs +1418 -485
- package/dist/server/data.mjs +1418 -484
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3761 -1794
- package/dist/server/page-converter.mjs +911 -261
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3580 -1613
- package/dist/server/rendering.mjs +3578 -1614
- package/dist/server/routing.mjs +1687 -689
- package/dist/server/server.mjs +1458 -563
- package/dist/server/theme-bridge.mjs +1996 -935
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +2 -2
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +0 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +0 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +0 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +0 -102
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-BiqIMgZk.mjs +0 -174
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PortalAuthSidebar.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/SuccessStep.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/WaitlistStep.d.ts +0 -0
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as buildBookingPaymentSelectionViewModel, t as usePolling } from "./usePolling-
|
|
3
|
-
import {
|
|
4
|
-
import { n as useBlockApi, t as BlockApiProvider } from "./context-
|
|
2
|
+
import { n as buildBookingPaymentSelectionViewModel, r as resolveFlexibleBalanceInitialPaymentCents, t as usePolling } from "./usePolling-UN4WKnaM.mjs";
|
|
3
|
+
import { $ as themeButtonClassName, C as getWizardStepsForContext, Et as assertNever, Ft as formatBookingDateTime, Ht as toBookingTimeZone, Jt as publicEventPricingType, Kt as publicEventPricingCurrency, Lt as formatBookingTime, Pt as formatBookingDate, Q as resolveEventRegistrationScopedEvents, S as getStepNumber, Ut as toScheduledBookingDateTime, Xt as publicEventTicketTypes, Yt as publicEventScalarPrice, Zt as formatCurrencyAmount, _ as findPreSelectedEvent, b as resolveRegistrationTarget, g as findEventByOccurrenceId, h as toRegistrationEvents, q as resolveRuntimeEventPricing, qt as publicEventPricingMode, t as defineIslandPropsDecoder, v as resolveDiscountContext, w as planEventRegistrationSurface, x as WIZARD_STEPS, y as resolveEventRequiresPayment, z as formatEventPriceDisplay } from "./propsDecoder-CeUMxI9a.mjs";
|
|
4
|
+
import { n as useBlockApi, t as BlockApiProvider } from "./context-TSK1CGx8.mjs";
|
|
5
5
|
import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
|
|
6
|
-
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-
|
|
7
|
-
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-
|
|
8
|
-
import { n as
|
|
6
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-lPr1oqxB.mjs";
|
|
7
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-CfuPOHD0.mjs";
|
|
8
|
+
import { i as formatPrice, n as StepIndicator$1, r as SpinnerNode, t as BookingConsentAgreement } from "./BookingConsentAgreement-BxgpGEFD.mjs";
|
|
9
9
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
10
10
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
|
|
11
|
-
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-
|
|
11
|
+
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-DQYC_Br-.mjs";
|
|
12
12
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
|
|
13
13
|
import { t as consumeSearchParam } from "./urlParams-D71VXFGx.mjs";
|
|
14
|
-
import { a as
|
|
14
|
+
import { a as MagicLinkForm, i as useWaitlistClaim, n as LoggedInAsUser, o as WholeSeriesRegistrationErrorBoundary, r as logoutPortal, s as ClockIcon, t as WholeSeriesRegistrationWizard } from "./WholeSeriesRegistrationWizard-DwtC7bCs.mjs";
|
|
15
15
|
import { t as CrossIcon } from "./CrossIcon-Dn1KRKW5.mjs";
|
|
16
16
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
17
17
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
18
18
|
import { t as createLucideIcon } from "./createLucideIcon-PaLVMov4.mjs";
|
|
19
19
|
import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
|
|
20
|
-
import { n as filterPassesForEvent, t as filterMembershipsForEvent } from "./eventProductEligibility-AVxyCB1u.mjs";
|
|
21
20
|
import React, { useCallback, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
|
|
21
|
+
import { z } from "zod";
|
|
22
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
23
23
|
import { createPortal } from "react-dom";
|
|
24
|
+
//#region ../core/src/money-input.ts
|
|
25
|
+
function unsafeAsNonNegativeCents(value) {
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Normalizes a derived amount to non-negative whole cents. This intentionally
|
|
30
|
+
* clamps negatives to zero; use parseNonNegativeCents for validation.
|
|
31
|
+
*/
|
|
32
|
+
function toNonNegativeCents(value) {
|
|
33
|
+
return unsafeAsNonNegativeCents(Math.max(0, Math.trunc(value)));
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
24
36
|
//#region ../blocks/src/system/runtime/shared/components/SelectableOptionCard.tsx
|
|
25
37
|
function SelectableOptionCard(props) {
|
|
26
38
|
const { baseClassName, selectedClassName, disabledClassName, iconClassName, labelClassName, detailClassName, icon, label, detail, selected, disabled, tooltip, extraClassNames = [], onClick, renderCheck, renderDisabledTooltip } = props;
|
|
@@ -134,6 +146,19 @@ const Ticket = createLucideIcon("ticket", [
|
|
|
134
146
|
key: "1wjjxi"
|
|
135
147
|
}]
|
|
136
148
|
]);
|
|
149
|
+
/**
|
|
150
|
+
* @license lucide-react v1.21.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/
|
|
155
|
+
const Wallet = createLucideIcon("wallet", [["path", {
|
|
156
|
+
d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",
|
|
157
|
+
key: "18etb6"
|
|
158
|
+
}], ["path", {
|
|
159
|
+
d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",
|
|
160
|
+
key: "xoc0q4"
|
|
161
|
+
}]]);
|
|
137
162
|
//#endregion
|
|
138
163
|
//#region ../blocks/src/system/runtime/nodes/event-registration/StepIndicator.tsx
|
|
139
164
|
/**
|
|
@@ -366,6 +391,264 @@ function missingPaymentSelection() {
|
|
|
366
391
|
message: "Select a payment option to continue."
|
|
367
392
|
};
|
|
368
393
|
}
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region ../commerce/src/purchase/checkoutPaymentFlow.ts
|
|
396
|
+
function planCheckoutPaymentFlow(options) {
|
|
397
|
+
const amountDueCents = toNonNegativeCents(options.amountDueCents);
|
|
398
|
+
const discountCents = toNonNegativeCents(options.discountCents);
|
|
399
|
+
const availableCreditCents = toNonNegativeCents(options.availableCreditCents);
|
|
400
|
+
const minimumStripeChargeCents = toNonNegativeCents(options.minimumStripeChargeCents ?? 0);
|
|
401
|
+
if (amountDueCents <= 0) return {
|
|
402
|
+
kind: "bypass",
|
|
403
|
+
bypassReason: discountCents > 0 ? "discount_free" : "free",
|
|
404
|
+
reserveCreditCents: 0
|
|
405
|
+
};
|
|
406
|
+
if (!options.creditCurrencyMatches || availableCreditCents <= 0) return {
|
|
407
|
+
kind: "stripe",
|
|
408
|
+
reserveCreditCents: toNonNegativeCents(0)
|
|
409
|
+
};
|
|
410
|
+
if (availableCreditCents >= amountDueCents) return {
|
|
411
|
+
kind: "store_credit_only",
|
|
412
|
+
reserveCreditCents: amountDueCents
|
|
413
|
+
};
|
|
414
|
+
return {
|
|
415
|
+
kind: "stripe",
|
|
416
|
+
reserveCreditCents: planMixedPaymentCreditReservation({
|
|
417
|
+
amountDueCents,
|
|
418
|
+
availableCreditCents,
|
|
419
|
+
minimumStripeChargeCents
|
|
420
|
+
})
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
function planMixedPaymentCreditReservation(input) {
|
|
424
|
+
const chargeAfterFullCredit = input.amountDueCents - input.availableCreditCents;
|
|
425
|
+
if (input.minimumStripeChargeCents <= 0 || chargeAfterFullCredit <= 0 || chargeAfterFullCredit >= input.minimumStripeChargeCents) return input.availableCreditCents;
|
|
426
|
+
if (input.amountDueCents < input.minimumStripeChargeCents) return toNonNegativeCents(0);
|
|
427
|
+
return toNonNegativeCents(input.amountDueCents - input.minimumStripeChargeCents);
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Apply site credit to a flexible-balance booking before card payment.
|
|
431
|
+
*
|
|
432
|
+
* Credit first reduces the configured payment due now. Once that payment is
|
|
433
|
+
* covered, any remaining credit reduces the later balance. If a partial credit
|
|
434
|
+
* application would leave a positive card charge below Stripe's minimum, less
|
|
435
|
+
* credit is used so the configured payment can still be collected.
|
|
436
|
+
*/
|
|
437
|
+
function planFlexibleBalanceCreditFirst(input) {
|
|
438
|
+
const totalCents = toNonNegativeCents(input.totalAfterDiscountCents);
|
|
439
|
+
const configuredDueNowCents = toNonNegativeCents(Math.min(input.configuredPaymentDueNowCents, totalCents));
|
|
440
|
+
const availableCreditCents = toNonNegativeCents(input.creditCurrencyMatches ? input.availableCreditCents : 0);
|
|
441
|
+
const minimumStripeChargeCents = toNonNegativeCents(input.minimumStripeChargeCents ?? 0);
|
|
442
|
+
if (availableCreditCents >= totalCents && totalCents > 0) return {
|
|
443
|
+
kind: "credit_only",
|
|
444
|
+
reserveCreditCents: totalCents,
|
|
445
|
+
cardDueNowCents: toNonNegativeCents(0),
|
|
446
|
+
laterBalanceCents: toNonNegativeCents(0)
|
|
447
|
+
};
|
|
448
|
+
let reserveCreditCents = toNonNegativeCents(Math.min(availableCreditCents, totalCents));
|
|
449
|
+
if (reserveCreditCents >= configuredDueNowCents) return {
|
|
450
|
+
kind: "flexible_balance",
|
|
451
|
+
reserveCreditCents,
|
|
452
|
+
cardDueNowCents: toNonNegativeCents(0),
|
|
453
|
+
laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents)
|
|
454
|
+
};
|
|
455
|
+
const plannedCardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
|
|
456
|
+
if (plannedCardDueNowCents > 0 && plannedCardDueNowCents < minimumStripeChargeCents) {
|
|
457
|
+
if (configuredDueNowCents < minimumStripeChargeCents) return {
|
|
458
|
+
kind: "card_below_minimum",
|
|
459
|
+
reserveCreditCents: toNonNegativeCents(0),
|
|
460
|
+
cardDueNowCents: configuredDueNowCents,
|
|
461
|
+
laterBalanceCents: toNonNegativeCents(totalCents - configuredDueNowCents)
|
|
462
|
+
};
|
|
463
|
+
reserveCreditCents = toNonNegativeCents(configuredDueNowCents - minimumStripeChargeCents);
|
|
464
|
+
}
|
|
465
|
+
const cardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
|
|
466
|
+
return {
|
|
467
|
+
kind: "flexible_balance",
|
|
468
|
+
reserveCreditCents,
|
|
469
|
+
cardDueNowCents,
|
|
470
|
+
laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents - cardDueNowCents)
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
//#endregion
|
|
474
|
+
//#region ../commerce/src/purchase/settlement.ts
|
|
475
|
+
function normalizeCurrencyCode(raw) {
|
|
476
|
+
const normalized = raw.trim().toUpperCase();
|
|
477
|
+
if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
|
|
478
|
+
return normalized;
|
|
479
|
+
}
|
|
480
|
+
//#endregion
|
|
481
|
+
//#region ../commerce/src/purchase/checkoutSessionMetadata.ts
|
|
482
|
+
const datedOfferingSharedEngineMetadataShape = {
|
|
483
|
+
datedOfferingEngineContractVersion: z.literal("shared_v1"),
|
|
484
|
+
datedOfferingEngineRouteKind: z.literal("shared_whole_series_registration"),
|
|
485
|
+
datedOfferingCapacityHoldId: z.string().uuid(),
|
|
486
|
+
datedOfferingCapacityHoldAuditRef: z.string().uuid(),
|
|
487
|
+
customerId: z.string().uuid(),
|
|
488
|
+
eventSeriesId: z.string().uuid()
|
|
489
|
+
};
|
|
490
|
+
z.object(datedOfferingSharedEngineMetadataShape);
|
|
491
|
+
const orderCheckoutSessionMetadataBaseShape = {
|
|
492
|
+
type: z.literal("order"),
|
|
493
|
+
site_id: z.string().uuid(),
|
|
494
|
+
order_id: z.string().uuid().optional(),
|
|
495
|
+
customer_email: z.string().email(),
|
|
496
|
+
customer_name: z.string().optional(),
|
|
497
|
+
product_id: z.string().uuid().optional(),
|
|
498
|
+
attendee_id: z.string().uuid().optional(),
|
|
499
|
+
occurrence_id: z.string().uuid().optional(),
|
|
500
|
+
tickets_count: z.string().optional(),
|
|
501
|
+
notes: z.string().optional(),
|
|
502
|
+
discount_redemption_id: z.string().uuid().optional(),
|
|
503
|
+
discount_code_id: z.string().uuid().optional(),
|
|
504
|
+
discount_code: z.string().optional(),
|
|
505
|
+
discount_public_label: z.string().optional(),
|
|
506
|
+
credit_reservation_id: z.string().uuid().optional(),
|
|
507
|
+
credit_reserved_cents: z.string().optional(),
|
|
508
|
+
discount_code_amount_cents: z.string().optional(),
|
|
509
|
+
order_payment_reason: z.enum([
|
|
510
|
+
"instalment_payoff",
|
|
511
|
+
"flexible_balance_initial",
|
|
512
|
+
"flexible_balance_paydown"
|
|
513
|
+
]).optional(),
|
|
514
|
+
order_payment_plan_id: z.string().uuid().optional(),
|
|
515
|
+
order_flexible_balance_contract_id: z.string().uuid().optional()
|
|
516
|
+
};
|
|
517
|
+
const absentDatedOfferingSharedEngineMetadataShape = {
|
|
518
|
+
datedOfferingEngineContractVersion: z.never().optional(),
|
|
519
|
+
datedOfferingEngineRouteKind: z.never().optional(),
|
|
520
|
+
datedOfferingCapacityHoldId: z.never().optional(),
|
|
521
|
+
datedOfferingCapacityHoldAuditRef: z.never().optional(),
|
|
522
|
+
customerId: z.never().optional(),
|
|
523
|
+
eventSeriesId: z.never().optional()
|
|
524
|
+
};
|
|
525
|
+
const LegacyOrderCheckoutSessionMetadataSchema = z.object({
|
|
526
|
+
...orderCheckoutSessionMetadataBaseShape,
|
|
527
|
+
...absentDatedOfferingSharedEngineMetadataShape
|
|
528
|
+
});
|
|
529
|
+
const SharedDatedOfferingOrderCheckoutSessionMetadataSchema = z.object({
|
|
530
|
+
...orderCheckoutSessionMetadataBaseShape,
|
|
531
|
+
...datedOfferingSharedEngineMetadataShape
|
|
532
|
+
});
|
|
533
|
+
z.union([SharedDatedOfferingOrderCheckoutSessionMetadataSchema, LegacyOrderCheckoutSessionMetadataSchema]);
|
|
534
|
+
toNonNegativeCents(0);
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region ../commerce/src/purchase/stripeMinimumCharge.ts
|
|
537
|
+
const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
|
|
538
|
+
GBP: 30,
|
|
539
|
+
USD: 50,
|
|
540
|
+
EUR: 50,
|
|
541
|
+
AED: 200,
|
|
542
|
+
AUD: 50,
|
|
543
|
+
BGN: 100,
|
|
544
|
+
BRL: 50,
|
|
545
|
+
CAD: 50,
|
|
546
|
+
CHF: 50,
|
|
547
|
+
CZK: 1500,
|
|
548
|
+
DKK: 250,
|
|
549
|
+
HKD: 400,
|
|
550
|
+
HUF: 17500,
|
|
551
|
+
JPY: 50,
|
|
552
|
+
MXN: 1e3,
|
|
553
|
+
MYR: 200,
|
|
554
|
+
NOK: 300,
|
|
555
|
+
NZD: 50,
|
|
556
|
+
PLN: 200,
|
|
557
|
+
RON: 200,
|
|
558
|
+
SEK: 300,
|
|
559
|
+
SGD: 50,
|
|
560
|
+
THB: 1e3
|
|
561
|
+
};
|
|
562
|
+
function isStripeMinimumChargeCurrency(currency) {
|
|
563
|
+
return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
|
|
564
|
+
}
|
|
565
|
+
function getStripeMinimumChargeRequirement(rawCurrency) {
|
|
566
|
+
let currency;
|
|
567
|
+
try {
|
|
568
|
+
currency = normalizeCurrencyCode(rawCurrency);
|
|
569
|
+
} catch {
|
|
570
|
+
return null;
|
|
571
|
+
}
|
|
572
|
+
const currencyKey = currency;
|
|
573
|
+
if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
|
|
574
|
+
return {
|
|
575
|
+
currency,
|
|
576
|
+
minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.ts
|
|
581
|
+
function calculateEventRegistrationPreviewTotal(input) {
|
|
582
|
+
const discountCents = input.manualDiscountCode.trim() ? 0 : input.automaticDiscount?.computedAmountCents ?? 0;
|
|
583
|
+
return Math.max(0, input.subtotalCents - Math.max(0, discountCents));
|
|
584
|
+
}
|
|
585
|
+
function buildEventRegistrationSiteCreditPreview(input) {
|
|
586
|
+
if (!input.option) return { kind: "not_applicable" };
|
|
587
|
+
switch (input.creditState.kind) {
|
|
588
|
+
case "not_authenticated": return { kind: "not_authenticated" };
|
|
589
|
+
case "loading": return { kind: "loading" };
|
|
590
|
+
case "unavailable": return { kind: "unavailable" };
|
|
591
|
+
case "loaded": break;
|
|
592
|
+
}
|
|
593
|
+
const summary = input.creditState.credit?.summary;
|
|
594
|
+
if (!summary || summary.availableCents <= 0) return { kind: "no_credit" };
|
|
595
|
+
if (summary.currency.toUpperCase() !== input.currency.toUpperCase()) return {
|
|
596
|
+
kind: "currency_mismatch",
|
|
597
|
+
availableCreditCents: summary.availableCents,
|
|
598
|
+
creditCurrency: summary.currency
|
|
599
|
+
};
|
|
600
|
+
const minimumChargeCents = getStripeMinimumChargeRequirement(input.currency)?.minimumAmountCents ?? null;
|
|
601
|
+
if (input.option.kind === "upfront") {
|
|
602
|
+
const plan = planCheckoutPaymentFlow({
|
|
603
|
+
amountDueCents: input.option.totalCents,
|
|
604
|
+
discountCents: 0,
|
|
605
|
+
availableCreditCents: summary.availableCents,
|
|
606
|
+
creditCurrencyMatches: true,
|
|
607
|
+
minimumStripeChargeCents: minimumChargeCents
|
|
608
|
+
});
|
|
609
|
+
const appliedCreditCents = plan.reserveCreditCents;
|
|
610
|
+
return {
|
|
611
|
+
kind: "applied",
|
|
612
|
+
outcome: plan.kind === "store_credit_only" ? "credit_only" : "mixed",
|
|
613
|
+
availableCreditCents: summary.availableCents,
|
|
614
|
+
appliedCreditCents,
|
|
615
|
+
cardDueNowCents: Math.max(0, input.option.totalCents - appliedCreditCents),
|
|
616
|
+
laterBalanceCents: 0,
|
|
617
|
+
remainingCreditCents: Math.max(0, summary.availableCents - appliedCreditCents),
|
|
618
|
+
manualDiscountPending: input.manualDiscountPending
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
const plan = planFlexibleBalanceCreditFirst({
|
|
622
|
+
totalAfterDiscountCents: input.option.totalCents,
|
|
623
|
+
configuredPaymentDueNowCents: input.option.configuredPaymentDueNowCents,
|
|
624
|
+
availableCreditCents: summary.availableCents,
|
|
625
|
+
creditCurrencyMatches: true,
|
|
626
|
+
minimumStripeChargeCents: minimumChargeCents
|
|
627
|
+
});
|
|
628
|
+
if (plan.kind === "card_below_minimum") return { kind: "not_applicable" };
|
|
629
|
+
return {
|
|
630
|
+
kind: "applied",
|
|
631
|
+
outcome: plan.kind === "credit_only" ? "credit_only" : "mixed",
|
|
632
|
+
availableCreditCents: summary.availableCents,
|
|
633
|
+
appliedCreditCents: plan.reserveCreditCents,
|
|
634
|
+
cardDueNowCents: plan.cardDueNowCents,
|
|
635
|
+
laterBalanceCents: plan.laterBalanceCents,
|
|
636
|
+
remainingCreditCents: Math.max(0, summary.availableCents - plan.reserveCreditCents),
|
|
637
|
+
manualDiscountPending: input.manualDiscountPending
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
function buildSelectedSiteCreditPreview(input) {
|
|
641
|
+
const selectedKind = input.selectionState.kind === "valid" ? input.selectionState.selection.collectionOptionKind : null;
|
|
642
|
+
const option = input.options.find((candidate) => candidate.kind === selectedKind) ?? null;
|
|
643
|
+
return buildEventRegistrationSiteCreditPreview({
|
|
644
|
+
...input,
|
|
645
|
+
currency: input.eligibility?.currency ?? "GBP",
|
|
646
|
+
option
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
function resolveDirectPaymentTotalCents(explicitTotalCents, eligibility) {
|
|
650
|
+
return explicitTotalCents ?? eligibility?.price ?? 0;
|
|
651
|
+
}
|
|
369
652
|
/**
|
|
370
653
|
* Format date for display
|
|
371
654
|
*/
|
|
@@ -1082,13 +1365,72 @@ const GuestDetailsSection = ({ guests, errors, onChange, shake = false, onShakeE
|
|
|
1082
1365
|
};
|
|
1083
1366
|
//#endregion
|
|
1084
1367
|
//#region ../blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.tsx
|
|
1368
|
+
function EventConsentField({ consent, error, formData, idBase, onChange }) {
|
|
1369
|
+
const errorId = `${idBase}-consent-error`;
|
|
1370
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1371
|
+
className: "er-field",
|
|
1372
|
+
children: [
|
|
1373
|
+
/* @__PURE__ */ jsx(BookingConsentAgreement, {
|
|
1374
|
+
agreement: consent.agreement,
|
|
1375
|
+
title: consent.title,
|
|
1376
|
+
titleId: `${idBase}-consent-title`
|
|
1377
|
+
}),
|
|
1378
|
+
/* @__PURE__ */ jsxs("label", {
|
|
1379
|
+
className: "er-label rb-flex rb-items-start rb-gap-2 rb-cursor-pointer",
|
|
1380
|
+
children: [
|
|
1381
|
+
/* @__PURE__ */ jsx("input", {
|
|
1382
|
+
"aria-describedby": error ? errorId : void 0,
|
|
1383
|
+
className: "form-checkbox rb-mt-0.5",
|
|
1384
|
+
checked: formData.consentAccepted === true,
|
|
1385
|
+
onChange: (event) => onChange({
|
|
1386
|
+
...formData,
|
|
1387
|
+
consentAccepted: event.target.checked
|
|
1388
|
+
}),
|
|
1389
|
+
type: "checkbox"
|
|
1390
|
+
}),
|
|
1391
|
+
consent.checkboxLabel,
|
|
1392
|
+
" ",
|
|
1393
|
+
/* @__PURE__ */ jsx("span", {
|
|
1394
|
+
className: "er-required",
|
|
1395
|
+
children: "*"
|
|
1396
|
+
})
|
|
1397
|
+
]
|
|
1398
|
+
}),
|
|
1399
|
+
error ? /* @__PURE__ */ jsx(FieldValidationMessage, {
|
|
1400
|
+
id: errorId,
|
|
1401
|
+
className: "er-error",
|
|
1402
|
+
children: error
|
|
1403
|
+
}) : null
|
|
1404
|
+
]
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
function resolveGuestDetailsChangeHandler(requireGuestDetails, ticketsCount, onGuestsChange) {
|
|
1408
|
+
return requireGuestDetails && ticketsCount > 1 && onGuestsChange ? onGuestsChange : null;
|
|
1409
|
+
}
|
|
1410
|
+
function NotesField({ id, onChange, value }) {
|
|
1411
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1412
|
+
className: "er-field",
|
|
1413
|
+
children: [/* @__PURE__ */ jsx("label", {
|
|
1414
|
+
className: "er-label",
|
|
1415
|
+
htmlFor: id,
|
|
1416
|
+
children: "Notes"
|
|
1417
|
+
}), /* @__PURE__ */ jsx("textarea", {
|
|
1418
|
+
id,
|
|
1419
|
+
value,
|
|
1420
|
+
onChange: (event) => onChange(event.target.value),
|
|
1421
|
+
className: "er-input",
|
|
1422
|
+
placeholder: "Any special requirements or notes (optional)",
|
|
1423
|
+
rows: 3
|
|
1424
|
+
})]
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1085
1427
|
/**
|
|
1086
1428
|
* Attendee Details Step
|
|
1087
1429
|
*
|
|
1088
1430
|
* Collects attendee information: name, email, phone, and notes.
|
|
1089
1431
|
* Validates required fields and displays errors.
|
|
1090
1432
|
*/
|
|
1091
|
-
const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd }) => {
|
|
1433
|
+
const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent }) => {
|
|
1092
1434
|
const idBase = useId();
|
|
1093
1435
|
const nameId = `${idBase}-name`;
|
|
1094
1436
|
const emailId = `${idBase}-email`;
|
|
@@ -1104,7 +1446,7 @@ const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false,
|
|
|
1104
1446
|
message: errors.email,
|
|
1105
1447
|
messageId: emailErrorId
|
|
1106
1448
|
});
|
|
1107
|
-
const
|
|
1449
|
+
const guestDetailsChangeHandler = resolveGuestDetailsChangeHandler(requireGuestDetails, ticketsCount, onGuestsChange);
|
|
1108
1450
|
return /* @__PURE__ */ jsxs("div", {
|
|
1109
1451
|
className: "rb-reg-stack er-stack",
|
|
1110
1452
|
children: [
|
|
@@ -1197,29 +1539,26 @@ const AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false,
|
|
|
1197
1539
|
placeholder: "(optional)"
|
|
1198
1540
|
})]
|
|
1199
1541
|
}),
|
|
1200
|
-
/* @__PURE__ */
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
})
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
rows: 3
|
|
1216
|
-
})]
|
|
1217
|
-
})
|
|
1542
|
+
/* @__PURE__ */ jsx(NotesField, {
|
|
1543
|
+
id: notesId,
|
|
1544
|
+
value: formData.notes,
|
|
1545
|
+
onChange: (notes) => onChange({
|
|
1546
|
+
...formData,
|
|
1547
|
+
notes
|
|
1548
|
+
})
|
|
1549
|
+
}),
|
|
1550
|
+
consent ? /* @__PURE__ */ jsx(EventConsentField, {
|
|
1551
|
+
consent,
|
|
1552
|
+
error: errors.consentAccepted,
|
|
1553
|
+
formData,
|
|
1554
|
+
idBase,
|
|
1555
|
+
onChange
|
|
1556
|
+
}) : null
|
|
1218
1557
|
] }),
|
|
1219
|
-
|
|
1558
|
+
guestDetailsChangeHandler && /* @__PURE__ */ jsx(GuestDetailsSection, {
|
|
1220
1559
|
guests,
|
|
1221
1560
|
errors: guestErrors,
|
|
1222
|
-
onChange:
|
|
1561
|
+
onChange: guestDetailsChangeHandler,
|
|
1223
1562
|
shake: guestSectionShake,
|
|
1224
1563
|
onShakeEnd: onGuestShakeEnd
|
|
1225
1564
|
})
|
|
@@ -1275,7 +1614,7 @@ function buildEventRegistrationPaymentOptionsViewModel(input) {
|
|
|
1275
1614
|
return {
|
|
1276
1615
|
mode: selection.mode,
|
|
1277
1616
|
sectionTitle: selection.sectionTitle,
|
|
1278
|
-
options: selection.options.map((option) => toEventDirectPaymentOption(option, selection.mode))
|
|
1617
|
+
options: selection.options.map((option, index) => toEventDirectPaymentOption(option, supportedOptions[index] ?? DEFAULT_EVENT_DIRECT_PAYMENT_OPTION, selection.mode, input.totalPriceCents))
|
|
1279
1618
|
};
|
|
1280
1619
|
}
|
|
1281
1620
|
function selectSupportedEventDirectPaymentOptions(paymentTerms) {
|
|
@@ -1285,17 +1624,24 @@ function selectSupportedEventDirectPaymentOptions(paymentTerms) {
|
|
|
1285
1624
|
function isSupportedEventDirectPaymentOption(option) {
|
|
1286
1625
|
return option.kind === "upfront" || option.kind === "flexible_balance";
|
|
1287
1626
|
}
|
|
1288
|
-
function toEventDirectPaymentOption(option, mode) {
|
|
1627
|
+
function toEventDirectPaymentOption(option, sourceOption, mode, totalCents) {
|
|
1289
1628
|
switch (option.kind) {
|
|
1290
1629
|
case "upfront": return {
|
|
1291
1630
|
...option,
|
|
1292
1631
|
kind: "upfront",
|
|
1293
|
-
label: mode === "choice_required" ? "Pay in full now" : "Pay by card"
|
|
1632
|
+
label: mode === "choice_required" ? "Pay in full now" : "Pay by card",
|
|
1633
|
+
totalCents,
|
|
1634
|
+
configuredPaymentDueNowCents: totalCents
|
|
1294
1635
|
};
|
|
1295
1636
|
case "flexible_balance": return {
|
|
1296
1637
|
...option,
|
|
1297
1638
|
kind: "flexible_balance",
|
|
1298
|
-
label: "Pay deposit now"
|
|
1639
|
+
label: "Pay deposit now",
|
|
1640
|
+
totalCents,
|
|
1641
|
+
configuredPaymentDueNowCents: sourceOption.kind === "flexible_balance" ? resolveFlexibleBalanceInitialPaymentCents({
|
|
1642
|
+
totalAmountCents: totalCents,
|
|
1643
|
+
config: sourceOption.config
|
|
1644
|
+
}) : totalCents
|
|
1299
1645
|
};
|
|
1300
1646
|
case "deferred_manual":
|
|
1301
1647
|
case "instalment_plan": throw new Error(`Unsupported event registration payment option: ${option.kind}`);
|
|
@@ -1323,6 +1669,86 @@ function resolveEventRegistrationDirectPaymentSelection(input) {
|
|
|
1323
1669
|
};
|
|
1324
1670
|
}
|
|
1325
1671
|
//#endregion
|
|
1672
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.tsx
|
|
1673
|
+
function SiteCreditPreviewPanel(props) {
|
|
1674
|
+
const { preview } = props;
|
|
1675
|
+
if (preview.kind === "not_authenticated" || preview.kind === "not_applicable" || preview.kind === "no_credit") return null;
|
|
1676
|
+
if (preview.kind === "loading") return /* @__PURE__ */ jsx("div", {
|
|
1677
|
+
className: "er-payment-summary",
|
|
1678
|
+
"aria-live": "polite",
|
|
1679
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1680
|
+
className: "er-text er-text--muted",
|
|
1681
|
+
children: "Checking your site credit..."
|
|
1682
|
+
})
|
|
1683
|
+
});
|
|
1684
|
+
if (preview.kind === "unavailable") return /* @__PURE__ */ jsx("div", {
|
|
1685
|
+
className: "er-payment-summary",
|
|
1686
|
+
role: "status",
|
|
1687
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1688
|
+
className: "er-text er-text--muted",
|
|
1689
|
+
children: "We couldn't check your site credit just now. We'll check again before payment."
|
|
1690
|
+
})
|
|
1691
|
+
});
|
|
1692
|
+
if (preview.kind === "currency_mismatch") return /* @__PURE__ */ jsxs("div", {
|
|
1693
|
+
className: "er-payment-summary",
|
|
1694
|
+
role: "status",
|
|
1695
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
1696
|
+
className: "er-title",
|
|
1697
|
+
children: "Your site credit"
|
|
1698
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
1699
|
+
className: "er-text er-text--muted",
|
|
1700
|
+
children: [
|
|
1701
|
+
"You have",
|
|
1702
|
+
" ",
|
|
1703
|
+
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
1704
|
+
" ",
|
|
1705
|
+
"in site credit, but it can't be used for this",
|
|
1706
|
+
" ",
|
|
1707
|
+
props.currency.toUpperCase(),
|
|
1708
|
+
" booking."
|
|
1709
|
+
]
|
|
1710
|
+
})]
|
|
1711
|
+
});
|
|
1712
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1713
|
+
className: "er-payment-summary",
|
|
1714
|
+
"aria-live": "polite",
|
|
1715
|
+
children: [
|
|
1716
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1717
|
+
className: "er-title",
|
|
1718
|
+
children: "Your site credit"
|
|
1719
|
+
}),
|
|
1720
|
+
/* @__PURE__ */ jsxs("p", {
|
|
1721
|
+
className: "er-text",
|
|
1722
|
+
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
1723
|
+
}),
|
|
1724
|
+
/* @__PURE__ */ jsx("p", {
|
|
1725
|
+
className: "er-text er-text--success",
|
|
1726
|
+
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
1727
|
+
}),
|
|
1728
|
+
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
1729
|
+
className: "er-text er-text--muted",
|
|
1730
|
+
children: [
|
|
1731
|
+
"Remaining balance after today:",
|
|
1732
|
+
" ",
|
|
1733
|
+
formatPrice(preview.laterBalanceCents, props.currency)
|
|
1734
|
+
]
|
|
1735
|
+
}),
|
|
1736
|
+
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
1737
|
+
className: "er-text er-text--muted",
|
|
1738
|
+
children: [
|
|
1739
|
+
"Credit left afterwards:",
|
|
1740
|
+
" ",
|
|
1741
|
+
formatPrice(preview.remainingCreditCents, props.currency)
|
|
1742
|
+
]
|
|
1743
|
+
}),
|
|
1744
|
+
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
1745
|
+
className: "er-text er-text--muted",
|
|
1746
|
+
children: "We'll recalculate these amounts after your discount code is checked."
|
|
1747
|
+
})
|
|
1748
|
+
]
|
|
1749
|
+
});
|
|
1750
|
+
}
|
|
1751
|
+
//#endregion
|
|
1326
1752
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.tsx
|
|
1327
1753
|
/**
|
|
1328
1754
|
* Payment Selection Step Component
|
|
@@ -1372,15 +1798,51 @@ function formatDirectPaymentOptionDetail(option) {
|
|
|
1372
1798
|
function isDirectPaymentOptionSelected(option, selectionState) {
|
|
1373
1799
|
return selectionState.kind === "valid" && selectionState.selection.collectionOptionKind === option.kind;
|
|
1374
1800
|
}
|
|
1801
|
+
function resolveDirectPaymentLabel(option, selectionState, preview) {
|
|
1802
|
+
if (!isDirectPaymentOptionSelected(option, selectionState)) return option.label;
|
|
1803
|
+
if (preview.kind !== "applied") return option.label;
|
|
1804
|
+
return preview.outcome === "credit_only" ? "Pay with site credit" : "Use site credit + card";
|
|
1805
|
+
}
|
|
1806
|
+
function DirectPaymentIcon(props) {
|
|
1807
|
+
return props.selected && props.preview.kind === "applied" ? /* @__PURE__ */ jsx(Wallet, {
|
|
1808
|
+
size: 24,
|
|
1809
|
+
"aria-hidden": "true"
|
|
1810
|
+
}) : /* @__PURE__ */ jsx(CreditCard, {
|
|
1811
|
+
size: 24,
|
|
1812
|
+
"aria-hidden": "true"
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
function DirectPaymentTiles(props) {
|
|
1816
|
+
return props.options.map((option) => {
|
|
1817
|
+
const selected = isDirectPaymentOptionSelected(option, props.selectionState);
|
|
1818
|
+
return /* @__PURE__ */ jsx(PaymentTile, {
|
|
1819
|
+
icon: /* @__PURE__ */ jsx(DirectPaymentIcon, {
|
|
1820
|
+
selected,
|
|
1821
|
+
preview: props.preview
|
|
1822
|
+
}),
|
|
1823
|
+
label: resolveDirectPaymentLabel(option, props.selectionState, props.preview),
|
|
1824
|
+
detail: formatDirectPaymentOptionDetail(option),
|
|
1825
|
+
selected,
|
|
1826
|
+
onClick: () => props.onSelectionChange({
|
|
1827
|
+
method: "stripe",
|
|
1828
|
+
collectionOptionKind: option.kind
|
|
1829
|
+
})
|
|
1830
|
+
}, option.kind);
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1375
1833
|
/**
|
|
1376
1834
|
* Label for the button that acts on the chosen payment method.
|
|
1377
1835
|
*
|
|
1378
1836
|
* A pass redemption spends a credit the moment it is pressed, so the label
|
|
1379
1837
|
* names the pass instead of describing the step.
|
|
1380
1838
|
*/
|
|
1381
|
-
function resolvePaymentButtonText(method) {
|
|
1839
|
+
function resolvePaymentButtonText(method, siteCreditPreview, eligibility) {
|
|
1840
|
+
const currency = eligibility?.currency ?? "GBP";
|
|
1382
1841
|
switch (method) {
|
|
1383
|
-
case "stripe":
|
|
1842
|
+
case "stripe":
|
|
1843
|
+
if (siteCreditPreview.kind !== "applied") return "Continue to Payment";
|
|
1844
|
+
if (siteCreditPreview.cardDueNowCents > 0) return `Pay ${formatPrice(siteCreditPreview.cardDueNowCents, currency)} by card`;
|
|
1845
|
+
return `Book with ${formatPrice(siteCreditPreview.appliedCreditCents, currency)} site credit`;
|
|
1384
1846
|
case "pass": return "Book using class pass";
|
|
1385
1847
|
case "pass_bundle":
|
|
1386
1848
|
case "membership_bundle": return "Purchase & Register";
|
|
@@ -1389,6 +1851,17 @@ function resolvePaymentButtonText(method) {
|
|
|
1389
1851
|
case null: return "Complete Registration";
|
|
1390
1852
|
}
|
|
1391
1853
|
}
|
|
1854
|
+
function canContinueWithPaymentSelection(selection, directPaymentSelection) {
|
|
1855
|
+
switch (selection.method) {
|
|
1856
|
+
case "stripe": return directPaymentSelection.kind === "valid";
|
|
1857
|
+
case "pass": return Boolean(selection.passId);
|
|
1858
|
+
case "membership": return Boolean(selection.membershipId);
|
|
1859
|
+
case "pass_bundle": return Boolean(selection.bundlePassId);
|
|
1860
|
+
case "membership_bundle": return Boolean(selection.bundleMembershipId);
|
|
1861
|
+
case "free": return true;
|
|
1862
|
+
case null: return false;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1392
1865
|
/**
|
|
1393
1866
|
* Payment Selection Step
|
|
1394
1867
|
*
|
|
@@ -1396,10 +1869,10 @@ function resolvePaymentButtonText(method) {
|
|
|
1396
1869
|
* Fetches eligible passes/memberships using the user's email.
|
|
1397
1870
|
* Also shows available passes/memberships for purchase (upsell).
|
|
1398
1871
|
*/
|
|
1399
|
-
const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, isAuthenticated = false, selectedSelection, onSelectionChange, eligibility, eligibilityLoading, eligibilityError = null, onRequestLogin, onStateChange }) => {
|
|
1872
|
+
const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, isAuthenticated = false, creditState = { kind: "not_authenticated" }, directPaymentTotalCents, manualDiscountPending = false, selectedSelection, onSelectionChange, eligibility, eligibilityLoading, eligibilityError = null, onRequestLogin, onStateChange }) => {
|
|
1400
1873
|
const occurrenceId = occurrenceContext?.id ?? event?.registrationOccurrenceId;
|
|
1401
1874
|
const selectedMethod = selectedSelection.method;
|
|
1402
|
-
const totalPrice = eligibility
|
|
1875
|
+
const totalPrice = resolveDirectPaymentTotalCents(directPaymentTotalCents, eligibility);
|
|
1403
1876
|
const canShowDirectPaymentOptions = Boolean(eligibility?.eligible && eligibility.canPayDirectly && eligibility.price);
|
|
1404
1877
|
const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventRegistrationPaymentOptionsViewModel({
|
|
1405
1878
|
eventTitle: event?.title ?? "Event",
|
|
@@ -1413,15 +1886,14 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
|
|
|
1413
1886
|
selection: selectedSelection
|
|
1414
1887
|
});
|
|
1415
1888
|
const directPaymentFallbackKind = (directPaymentSelectionState.kind === "invalid" ? directPaymentSelectionState.fallbackSelection : null)?.collectionOptionKind;
|
|
1416
|
-
const
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
})();
|
|
1889
|
+
const siteCreditPreview = buildSelectedSiteCreditPreview({
|
|
1890
|
+
options: directPaymentOptions,
|
|
1891
|
+
selectionState: directPaymentSelectionState,
|
|
1892
|
+
eligibility,
|
|
1893
|
+
creditState,
|
|
1894
|
+
manualDiscountPending
|
|
1895
|
+
});
|
|
1896
|
+
const canContinue = canContinueWithPaymentSelection(selectedSelection, directPaymentSelectionState);
|
|
1425
1897
|
useEffect(() => {
|
|
1426
1898
|
if (!directPaymentFallbackKind) return;
|
|
1427
1899
|
onSelectionChange({
|
|
@@ -1429,7 +1901,11 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
|
|
|
1429
1901
|
collectionOptionKind: directPaymentFallbackKind
|
|
1430
1902
|
});
|
|
1431
1903
|
}, [directPaymentFallbackKind, onSelectionChange]);
|
|
1432
|
-
const getButtonText = useCallback(() => resolvePaymentButtonText(selectedMethod), [
|
|
1904
|
+
const getButtonText = useCallback(() => resolvePaymentButtonText(selectedMethod, siteCreditPreview, eligibility), [
|
|
1905
|
+
selectedMethod,
|
|
1906
|
+
siteCreditPreview,
|
|
1907
|
+
eligibility
|
|
1908
|
+
]);
|
|
1433
1909
|
useEffect(() => {
|
|
1434
1910
|
if (!onStateChange) return;
|
|
1435
1911
|
let status = "ready";
|
|
@@ -1572,98 +2048,98 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
|
|
|
1572
2048
|
const isMultiTicket = areEntitlementsDisabledForTicketCount(ticketsCount);
|
|
1573
2049
|
return /* @__PURE__ */ jsxs("div", {
|
|
1574
2050
|
className: "rb-reg-stack er-stack",
|
|
1575
|
-
children: [
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
selected: isDirectPaymentOptionSelected(option, directPaymentSelectionState),
|
|
1589
|
-
onClick: () => onSelectionChange({
|
|
1590
|
-
method: "stripe",
|
|
1591
|
-
collectionOptionKind: option.kind
|
|
1592
|
-
})
|
|
1593
|
-
}, option.kind)) }),
|
|
1594
|
-
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
1595
|
-
icon: /* @__PURE__ */ jsx(Ticket, {
|
|
1596
|
-
size: 24,
|
|
1597
|
-
"aria-hidden": "true"
|
|
1598
|
-
}),
|
|
1599
|
-
label: pass.passName,
|
|
1600
|
-
detail: `${pass.creditsRemaining} credit${pass.creditsRemaining !== 1 ? "s" : ""}`,
|
|
1601
|
-
selected: selectedMethod === "pass" && selectedSelection.passId === pass.id,
|
|
1602
|
-
disabled: isMultiTicket,
|
|
1603
|
-
tooltip: isMultiTicket ? "Only available for single-ticket bookings" : void 0,
|
|
1604
|
-
onClick: () => onSelectionChange({
|
|
1605
|
-
method: "pass",
|
|
1606
|
-
passId: pass.id,
|
|
1607
|
-
productName: pass.passName
|
|
1608
|
-
})
|
|
1609
|
-
}, pass.id)),
|
|
1610
|
-
isAuthenticated && eligibility.eligibleMemberships.map((membership) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
1611
|
-
icon: /* @__PURE__ */ jsx(Star, {
|
|
1612
|
-
size: 24,
|
|
1613
|
-
"aria-hidden": "true"
|
|
1614
|
-
}),
|
|
1615
|
-
label: membership.membershipName,
|
|
1616
|
-
detail: "Active",
|
|
1617
|
-
selected: selectedMethod === "membership" && selectedSelection.membershipId === membership.id,
|
|
1618
|
-
disabled: isMultiTicket,
|
|
1619
|
-
tooltip: isMultiTicket ? "Only available for single-ticket bookings" : void 0,
|
|
1620
|
-
onClick: () => onSelectionChange({
|
|
1621
|
-
method: "membership",
|
|
1622
|
-
membershipId: membership.id,
|
|
1623
|
-
productName: membership.membershipName
|
|
1624
|
-
})
|
|
1625
|
-
}, membership.id)),
|
|
1626
|
-
eligibility.availablePasses.map((pass) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
1627
|
-
icon: /* @__PURE__ */ jsx(Ticket, {
|
|
1628
|
-
size: 24,
|
|
1629
|
-
"aria-hidden": "true"
|
|
1630
|
-
}),
|
|
1631
|
-
label: pass.name,
|
|
1632
|
-
detail: `${pass.creditsTotal} for ${formatPrice(pass.price, pass.currency)}`,
|
|
1633
|
-
selected: selectedMethod === "pass_bundle" && selectedSelection.bundlePassId === pass.id,
|
|
1634
|
-
disabled: isMultiTicket,
|
|
1635
|
-
tooltip: isMultiTicket ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : pass.description ?? void 0,
|
|
1636
|
-
upsell: true,
|
|
1637
|
-
onClick: () => onSelectionChange({
|
|
1638
|
-
method: "pass_bundle",
|
|
1639
|
-
bundlePassId: pass.id,
|
|
1640
|
-
productName: pass.name,
|
|
1641
|
-
productPrice: pass.price,
|
|
1642
|
-
productCurrency: pass.currency
|
|
1643
|
-
})
|
|
1644
|
-
}, pass.id)),
|
|
1645
|
-
eligibility.availableMemberships.map((membership) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
1646
|
-
icon: /* @__PURE__ */ jsx(Star, {
|
|
1647
|
-
size: 24,
|
|
1648
|
-
"aria-hidden": "true"
|
|
2051
|
+
children: [
|
|
2052
|
+
/* @__PURE__ */ jsx("h3", {
|
|
2053
|
+
className: "er-title",
|
|
2054
|
+
children: "Payment Options"
|
|
2055
|
+
}),
|
|
2056
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2057
|
+
className: "er-payment-tiles",
|
|
2058
|
+
children: [
|
|
2059
|
+
canShowDirectPaymentOptions && /* @__PURE__ */ jsx(DirectPaymentTiles, {
|
|
2060
|
+
options: directPaymentOptions,
|
|
2061
|
+
selectionState: directPaymentSelectionState,
|
|
2062
|
+
preview: siteCreditPreview,
|
|
2063
|
+
onSelectionChange
|
|
1649
2064
|
}),
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
2065
|
+
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2066
|
+
icon: /* @__PURE__ */ jsx(Ticket, {
|
|
2067
|
+
size: 24,
|
|
2068
|
+
"aria-hidden": "true"
|
|
2069
|
+
}),
|
|
2070
|
+
label: pass.passName,
|
|
2071
|
+
detail: `${pass.creditsRemaining} credit${pass.creditsRemaining !== 1 ? "s" : ""}`,
|
|
2072
|
+
selected: selectedMethod === "pass" && selectedSelection.passId === pass.id,
|
|
2073
|
+
disabled: isMultiTicket,
|
|
2074
|
+
tooltip: isMultiTicket ? "Only available for single-ticket bookings" : void 0,
|
|
2075
|
+
onClick: () => onSelectionChange({
|
|
2076
|
+
method: "pass",
|
|
2077
|
+
passId: pass.id,
|
|
2078
|
+
productName: pass.passName
|
|
2079
|
+
})
|
|
2080
|
+
}, pass.id)),
|
|
2081
|
+
isAuthenticated && eligibility.eligibleMemberships.map((membership) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2082
|
+
icon: /* @__PURE__ */ jsx(Star, {
|
|
2083
|
+
size: 24,
|
|
2084
|
+
"aria-hidden": "true"
|
|
2085
|
+
}),
|
|
2086
|
+
label: membership.membershipName,
|
|
2087
|
+
detail: "Active",
|
|
2088
|
+
selected: selectedMethod === "membership" && selectedSelection.membershipId === membership.id,
|
|
2089
|
+
disabled: isMultiTicket,
|
|
2090
|
+
tooltip: isMultiTicket ? "Only available for single-ticket bookings" : void 0,
|
|
2091
|
+
onClick: () => onSelectionChange({
|
|
2092
|
+
method: "membership",
|
|
2093
|
+
membershipId: membership.id,
|
|
2094
|
+
productName: membership.membershipName
|
|
2095
|
+
})
|
|
2096
|
+
}, membership.id)),
|
|
2097
|
+
eligibility.availablePasses.map((pass) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2098
|
+
icon: /* @__PURE__ */ jsx(Ticket, {
|
|
2099
|
+
size: 24,
|
|
2100
|
+
"aria-hidden": "true"
|
|
2101
|
+
}),
|
|
2102
|
+
label: pass.name,
|
|
2103
|
+
detail: `${pass.creditsTotal} for ${formatPrice(pass.price, pass.currency)}`,
|
|
2104
|
+
selected: selectedMethod === "pass_bundle" && selectedSelection.bundlePassId === pass.id,
|
|
2105
|
+
disabled: isMultiTicket,
|
|
2106
|
+
tooltip: isMultiTicket ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : pass.description ?? void 0,
|
|
2107
|
+
upsell: true,
|
|
2108
|
+
onClick: () => onSelectionChange({
|
|
2109
|
+
method: "pass_bundle",
|
|
2110
|
+
bundlePassId: pass.id,
|
|
2111
|
+
productName: pass.name,
|
|
2112
|
+
productPrice: pass.price,
|
|
2113
|
+
productCurrency: pass.currency
|
|
2114
|
+
})
|
|
2115
|
+
}, pass.id)),
|
|
2116
|
+
eligibility.availableMemberships.map((membership) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2117
|
+
icon: /* @__PURE__ */ jsx(Star, {
|
|
2118
|
+
size: 24,
|
|
2119
|
+
"aria-hidden": "true"
|
|
2120
|
+
}),
|
|
2121
|
+
label: membership.name,
|
|
2122
|
+
detail: `${formatPrice(membership.price, membership.currency)}/${membership.interval}`,
|
|
2123
|
+
selected: selectedMethod === "membership_bundle" && selectedSelection.bundleMembershipId === membership.id,
|
|
2124
|
+
disabled: isMultiTicket,
|
|
2125
|
+
tooltip: isMultiTicket ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : membership.description ?? void 0,
|
|
2126
|
+
upsell: true,
|
|
2127
|
+
onClick: () => onSelectionChange({
|
|
2128
|
+
method: "membership_bundle",
|
|
2129
|
+
bundleMembershipId: membership.id,
|
|
2130
|
+
productName: membership.name,
|
|
2131
|
+
productPrice: membership.price,
|
|
2132
|
+
productCurrency: membership.currency,
|
|
2133
|
+
productInterval: membership.interval
|
|
2134
|
+
})
|
|
2135
|
+
}, membership.id))
|
|
2136
|
+
]
|
|
2137
|
+
}),
|
|
2138
|
+
/* @__PURE__ */ jsx(SiteCreditPreviewPanel, {
|
|
2139
|
+
preview: siteCreditPreview,
|
|
2140
|
+
currency: eligibility.currency
|
|
2141
|
+
})
|
|
2142
|
+
]
|
|
1667
2143
|
});
|
|
1668
2144
|
};
|
|
1669
2145
|
//#endregion
|
|
@@ -1854,6 +2330,9 @@ const VerifyingTimeoutStep = ({ onCheckAgain, supportEmail }) => {
|
|
|
1854
2330
|
};
|
|
1855
2331
|
//#endregion
|
|
1856
2332
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardContent.tsx
|
|
2333
|
+
function getWizardConsent(wizard) {
|
|
2334
|
+
return (wizard.selectedEvent ?? wizard.preSelectedEvent)?.consent ?? null;
|
|
2335
|
+
}
|
|
1857
2336
|
function EventRegistrationWizardContent(props) {
|
|
1858
2337
|
const { wizard } = props;
|
|
1859
2338
|
const showSpamProtection = props.showSpamProtection ?? isSpamProtectionEnabled();
|
|
@@ -1933,7 +2412,8 @@ function EventRegistrationWizardContent(props) {
|
|
|
1933
2412
|
onGuestsChange: wizard.setGuests,
|
|
1934
2413
|
guestErrors: wizard.guestErrors,
|
|
1935
2414
|
guestSectionShake: wizard.guestSectionShake,
|
|
1936
|
-
onGuestShakeEnd: wizard.handleGuestShakeEnd
|
|
2415
|
+
onGuestShakeEnd: wizard.handleGuestShakeEnd,
|
|
2416
|
+
consent: getWizardConsent(wizard)
|
|
1937
2417
|
}),
|
|
1938
2418
|
showSpamProtection && /* @__PURE__ */ jsx("div", {
|
|
1939
2419
|
className: "er-altcha",
|
|
@@ -1952,6 +2432,13 @@ function EventRegistrationWizardContent(props) {
|
|
|
1952
2432
|
ticketsCount: wizard.ticketsCount,
|
|
1953
2433
|
email: wizard.formData.email,
|
|
1954
2434
|
isAuthenticated: wizard.portalAuthState === "authenticated",
|
|
2435
|
+
creditState: wizard.portalCreditState,
|
|
2436
|
+
directPaymentTotalCents: calculateEventRegistrationPreviewTotal({
|
|
2437
|
+
subtotalCents: wizard.ticketSelectionSubtotalCents,
|
|
2438
|
+
manualDiscountCode: wizard.discountCode,
|
|
2439
|
+
automaticDiscount: wizard.autoAppliedDiscount
|
|
2440
|
+
}),
|
|
2441
|
+
manualDiscountPending: wizard.discountCode.trim().length > 0,
|
|
1955
2442
|
selectedSelection: wizard.paymentSelection,
|
|
1956
2443
|
onSelectionChange: wizard.handlePaymentSelectionChange,
|
|
1957
2444
|
eligibility: wizard.eligibility,
|
|
@@ -2294,11 +2781,21 @@ function EventRegistrationSummaryBar(props) {
|
|
|
2294
2781
|
}
|
|
2295
2782
|
//#endregion
|
|
2296
2783
|
//#region ../blocks/src/system/runtime/nodes/event-registration/validation.ts
|
|
2297
|
-
function
|
|
2784
|
+
function createInitialRegistrationFormData() {
|
|
2785
|
+
return {
|
|
2786
|
+
name: "",
|
|
2787
|
+
email: "",
|
|
2788
|
+
phone: "",
|
|
2789
|
+
notes: "",
|
|
2790
|
+
consentAccepted: false
|
|
2791
|
+
};
|
|
2792
|
+
}
|
|
2793
|
+
function validateFormData(formData, requiresConsent = false) {
|
|
2298
2794
|
const errors = {};
|
|
2299
2795
|
if (!formData.name.trim()) errors.name = "Name is required";
|
|
2300
2796
|
if (!formData.email.trim()) errors.email = "Email is required";
|
|
2301
2797
|
else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(formData.email)) errors.email = "Invalid email address";
|
|
2798
|
+
if (requiresConsent && formData.consentAccepted !== true) errors.consentAccepted = "Please read and accept the agreement before continuing.";
|
|
2302
2799
|
return errors;
|
|
2303
2800
|
}
|
|
2304
2801
|
//#endregion
|
|
@@ -2355,6 +2852,15 @@ function existingRegistrationLookupReducer(state, action) {
|
|
|
2355
2852
|
* Custom hooks for portal authentication and eligibility checking.
|
|
2356
2853
|
* Extracted from the main EventRegistrationClient for better separation of concerns.
|
|
2357
2854
|
*/
|
|
2855
|
+
function scopePortalCreditStateToSubject(state, subjectEmail) {
|
|
2856
|
+
if (!subjectEmail) return { kind: "not_authenticated" };
|
|
2857
|
+
if (state.kind === "not_authenticated") return state;
|
|
2858
|
+
const normalizedSubject = subjectEmail.trim().toLowerCase();
|
|
2859
|
+
return state.subjectEmail === normalizedSubject ? state : {
|
|
2860
|
+
kind: "loading",
|
|
2861
|
+
subjectEmail: normalizedSubject
|
|
2862
|
+
};
|
|
2863
|
+
}
|
|
2358
2864
|
const eventRegistrationHooksDeps = { useBlockApi };
|
|
2359
2865
|
/**
|
|
2360
2866
|
* Hook for managing portal authentication state.
|
|
@@ -2369,27 +2875,54 @@ function usePortalAuthWithDeps(deps) {
|
|
|
2369
2875
|
const api = deps.useBlockApi();
|
|
2370
2876
|
const [authState, setAuthState] = useState("checking");
|
|
2371
2877
|
const [profile, setProfile] = useState(null);
|
|
2878
|
+
const [creditState, setCreditState] = useState({ kind: "not_authenticated" });
|
|
2372
2879
|
useEffect(() => {
|
|
2373
2880
|
let cancelled = false;
|
|
2374
2881
|
async function checkPortalAuth() {
|
|
2375
2882
|
if ((api.config.authOverrides?.portal ?? api.config.auth).type !== "bearer") {
|
|
2376
2883
|
setAuthState("unauthenticated");
|
|
2884
|
+
setProfile(null);
|
|
2885
|
+
setCreditState({ kind: "not_authenticated" });
|
|
2377
2886
|
return;
|
|
2378
2887
|
}
|
|
2379
2888
|
setAuthState("checking");
|
|
2889
|
+
setProfile(null);
|
|
2890
|
+
setCreditState({ kind: "not_authenticated" });
|
|
2380
2891
|
try {
|
|
2381
2892
|
const me = await api.getPortalProfile();
|
|
2382
2893
|
if (cancelled) return;
|
|
2383
|
-
|
|
2384
|
-
setProfile({
|
|
2894
|
+
const nextProfile = {
|
|
2385
2895
|
email: me.profile.email,
|
|
2386
2896
|
name: me.profile.name,
|
|
2387
2897
|
phone: me.profile.phone || ""
|
|
2898
|
+
};
|
|
2899
|
+
const subjectEmail = nextProfile.email.trim().toLowerCase();
|
|
2900
|
+
setProfile(nextProfile);
|
|
2901
|
+
setCreditState({
|
|
2902
|
+
kind: "loading",
|
|
2903
|
+
subjectEmail
|
|
2388
2904
|
});
|
|
2905
|
+
setAuthState("authenticated");
|
|
2906
|
+
try {
|
|
2907
|
+
const credit = await api.getPortalCredit();
|
|
2908
|
+
if (cancelled) return;
|
|
2909
|
+
setCreditState({
|
|
2910
|
+
kind: "loaded",
|
|
2911
|
+
subjectEmail,
|
|
2912
|
+
credit
|
|
2913
|
+
});
|
|
2914
|
+
} catch {
|
|
2915
|
+
if (cancelled) return;
|
|
2916
|
+
setCreditState({
|
|
2917
|
+
kind: "unavailable",
|
|
2918
|
+
subjectEmail
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2389
2921
|
} catch {
|
|
2390
2922
|
if (cancelled) return;
|
|
2391
2923
|
setAuthState("unauthenticated");
|
|
2392
2924
|
setProfile(null);
|
|
2925
|
+
setCreditState({ kind: "not_authenticated" });
|
|
2393
2926
|
}
|
|
2394
2927
|
}
|
|
2395
2928
|
checkPortalAuth();
|
|
@@ -2409,6 +2942,7 @@ function usePortalAuthWithDeps(deps) {
|
|
|
2409
2942
|
isAuthenticated: authState === "authenticated",
|
|
2410
2943
|
isChecking: authState === "checking",
|
|
2411
2944
|
profile,
|
|
2945
|
+
creditState: scopePortalCreditStateToSubject(creditState, authState === "authenticated" ? profile?.email ?? null : null),
|
|
2412
2946
|
logout
|
|
2413
2947
|
};
|
|
2414
2948
|
}
|
|
@@ -2917,6 +3451,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
2917
3451
|
name: options.formData.name.trim(),
|
|
2918
3452
|
phone: options.formData.phone.trim() || void 0,
|
|
2919
3453
|
notes: options.formData.notes.trim() || void 0,
|
|
3454
|
+
consentAccepted: options.formData.consentAccepted,
|
|
2920
3455
|
altchaSolution: options.altchaSolution,
|
|
2921
3456
|
paymentMethod: method,
|
|
2922
3457
|
customerPassId: method === "pass" ? passId : void 0,
|
|
@@ -3053,12 +3588,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3053
3588
|
const step = flowState.step;
|
|
3054
3589
|
const paymentSelection = flowState.paymentSelection;
|
|
3055
3590
|
const [selectedEvent, setSelectedEvent] = useState(preSelectedEvent ?? null);
|
|
3056
|
-
const [formData, setFormData] = useState(
|
|
3057
|
-
name: "",
|
|
3058
|
-
email: "",
|
|
3059
|
-
phone: "",
|
|
3060
|
-
notes: ""
|
|
3061
|
-
});
|
|
3591
|
+
const [formData, setFormData] = useState(createInitialRegistrationFormData);
|
|
3062
3592
|
const [errors, setErrors] = useState({});
|
|
3063
3593
|
const [guests, setGuests] = useState([]);
|
|
3064
3594
|
const [guestErrors, setGuestErrors] = useState({});
|
|
@@ -3072,7 +3602,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3072
3602
|
const [registrationResult, setRegistrationResult] = useState(null);
|
|
3073
3603
|
const [errorMessage, setErrorMessage] = useState("");
|
|
3074
3604
|
const [altchaSolution, setAltchaSolution] = useState(null);
|
|
3075
|
-
const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
|
|
3605
|
+
const { authState: portalAuthState, profile: portalProfile, creditState: portalCreditState } = deps.usePortalAuth();
|
|
3076
3606
|
const waitlistClaim = deps.useWaitlistClaim();
|
|
3077
3607
|
const [showMagicLinkModal, setShowMagicLinkModal] = useState(false);
|
|
3078
3608
|
const [pendingAttendeeId, setPendingAttendeeId] = useState(null);
|
|
@@ -3356,7 +3886,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3356
3886
|
guests
|
|
3357
3887
|
]);
|
|
3358
3888
|
const validateForm = () => {
|
|
3359
|
-
const newErrors = validateFormData(formData);
|
|
3889
|
+
const newErrors = validateFormData(formData, Boolean(currentEvent?.consent));
|
|
3360
3890
|
setErrors(newErrors);
|
|
3361
3891
|
const newGuestErrors = {};
|
|
3362
3892
|
if (requireGuestDetails && guests.length > 0) {
|
|
@@ -3545,6 +4075,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3545
4075
|
});
|
|
3546
4076
|
const handleEventSelect = (event) => {
|
|
3547
4077
|
setSelectedEvent(event);
|
|
4078
|
+
setFormData((current) => ({
|
|
4079
|
+
...current,
|
|
4080
|
+
consentAccepted: false
|
|
4081
|
+
}));
|
|
3548
4082
|
const slidingScale = getSlidingScaleForEvent(event);
|
|
3549
4083
|
setSelectedSlidingAmountInput(slidingScale?.suggestedAmount !== null && slidingScale?.suggestedAmount !== void 0 ? formatCentsAsCurrencyInput(slidingScale.suggestedAmount) : "");
|
|
3550
4084
|
setSelectedAttendanceMode((event.deliveryMode ?? "in_person") === "hybrid" ? null : (event.deliveryMode ?? "in_person") === "online" ? "online" : "in_person");
|
|
@@ -3625,6 +4159,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3625
4159
|
setAltchaSolution,
|
|
3626
4160
|
portalAuthState,
|
|
3627
4161
|
portalProfile,
|
|
4162
|
+
portalCreditState,
|
|
3628
4163
|
showMagicLinkModal,
|
|
3629
4164
|
setShowMagicLinkModal,
|
|
3630
4165
|
handleLogout,
|
|
@@ -3667,8 +4202,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3667
4202
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx
|
|
3668
4203
|
const EVENT_PORTAL_AUTH_COPY = {
|
|
3669
4204
|
membership: {
|
|
3670
|
-
title: "
|
|
3671
|
-
description: "Log in to use
|
|
4205
|
+
title: "Already have an account?",
|
|
4206
|
+
description: "Log in to use any site credit, passes or memberships linked to your email.",
|
|
3672
4207
|
buttonText: "Email me a login link →"
|
|
3673
4208
|
},
|
|
3674
4209
|
"waitlist-claim": {
|
|
@@ -3704,7 +4239,7 @@ function formatTicketTypePrice(ticketType, currency) {
|
|
|
3704
4239
|
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
3705
4240
|
}
|
|
3706
4241
|
function EventRegistrationWizard(props) {
|
|
3707
|
-
const { occurrenceContext, subject, events, maxTickets = "5", showVenue = true, showCapacity = true, successMessage = "Thank you for registering! Check your email for confirmation details.", waitlistMessage: _waitlistMessage = "You've been added to the waitlist. We'll email you a claim link if a spot opens up.", buttonText = "Complete Registration", buttonVariant = "primary", className, spamProtectionEnabled, supportEmail
|
|
4242
|
+
const { occurrenceContext, subject, events, maxTickets = "5", showVenue = true, showCapacity = true, successMessage = "Thank you for registering! Check your email for confirmation details.", waitlistMessage: _waitlistMessage = "You've been added to the waitlist. We'll email you a claim link if a spot opens up.", buttonText = "Complete Registration", buttonVariant = "primary", className, spamProtectionEnabled, supportEmail } = props;
|
|
3708
4243
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
|
|
3709
4244
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
3710
4245
|
const buttonClass = themeButtonClassName({
|
|
@@ -3794,13 +4329,11 @@ function EventRegistrationWizard(props) {
|
|
|
3794
4329
|
const summaryPriceLabel = summaryEvent ? formatEventPriceDisplay(summaryEvent.pricing) : null;
|
|
3795
4330
|
const summaryAvailabilityLabel = summaryEvent?.availableSpots === null || summaryEvent?.availableSpots === void 0 ? null : summaryEvent.availableSpots > 0 ? `${summaryEvent.availableSpots} spots left` : summaryEvent.waitlistEnabled ? "Waitlist available" : "Fully booked";
|
|
3796
4331
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
3797
|
-
const selectedProductEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
3798
|
-
const hasPassOrMembershipProducts = filterPassesForEvent(sitePasses?.passes, selectedProductEvent).length > 0 || filterMembershipsForEvent(siteMemberships?.memberships, selectedProductEvent).length > 0;
|
|
3799
4332
|
const portalAuthCopy = waitlistClaimRequiresPortalLogin ? {
|
|
3800
4333
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
3801
4334
|
description: wizard.waitlistClaim.loginMessage ?? "Log in to continue with your waitlist claim."
|
|
3802
4335
|
} : EVENT_PORTAL_AUTH_COPY.membership;
|
|
3803
|
-
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" &&
|
|
4336
|
+
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && summaryEventPricingType !== "free";
|
|
3804
4337
|
const renderRegistrationSurface = (variant) => /* @__PURE__ */ jsxs("div", {
|
|
3805
4338
|
className: `rb-reg-surface er-container${variant === "overlay" ? " er-container--overlay" : ""}`,
|
|
3806
4339
|
children: [
|
|
@@ -4002,30 +4535,6 @@ function EventRegistrationWizard(props) {
|
|
|
4002
4535
|
});
|
|
4003
4536
|
}
|
|
4004
4537
|
//#endregion
|
|
4005
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
4006
|
-
function planEventRegistrationSurface(input) {
|
|
4007
|
-
const scopedEvents = resolveEventRegistrationScopedEvents(input.events, {
|
|
4008
|
-
occurrenceContext: input.occurrenceContext,
|
|
4009
|
-
subject: input.subject
|
|
4010
|
-
});
|
|
4011
|
-
const bookingScopes = new Set(scopedEvents.map((event) => event.bookingScope));
|
|
4012
|
-
if (!input.occurrenceContext && !input.subject && bookingScopes.has("single_occurrence")) return {
|
|
4013
|
-
kind: "occurrence",
|
|
4014
|
-
events: scopedEvents.filter((event) => event.bookingScope === "single_occurrence")
|
|
4015
|
-
};
|
|
4016
|
-
if (bookingScopes.size === 0 || bookingScopes.has("single_occurrence")) return bookingScopes.has("whole_series") ? { kind: "mixedBookingScopes" } : {
|
|
4017
|
-
kind: "occurrence",
|
|
4018
|
-
events: scopedEvents
|
|
4019
|
-
};
|
|
4020
|
-
const requiredSeriesIds = new Set(scopedEvents.map((event) => event.seriesId));
|
|
4021
|
-
const offerings = input.wholeSeriesOfferings.filter((offering) => requiredSeriesIds.has(offering.eventSeriesId));
|
|
4022
|
-
const loadedSeriesIds = new Set(offerings.map((offering) => offering.eventSeriesId));
|
|
4023
|
-
return [...requiredSeriesIds].every((seriesId) => loadedSeriesIds.has(seriesId)) && offerings.length > 0 ? {
|
|
4024
|
-
kind: "wholeSeries",
|
|
4025
|
-
offerings
|
|
4026
|
-
} : { kind: "unavailableWholeSeries" };
|
|
4027
|
-
}
|
|
4028
|
-
//#endregion
|
|
4029
4538
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
|
|
4030
4539
|
function isPastOccurrence(startsAt) {
|
|
4031
4540
|
if (!startsAt) return false;
|
|
@@ -4068,26 +4577,53 @@ function PastOccurrenceNotice(props) {
|
|
|
4068
4577
|
});
|
|
4069
4578
|
}
|
|
4070
4579
|
//#endregion
|
|
4580
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.tsx
|
|
4581
|
+
function RegistrationClosedState({ title, body }) {
|
|
4582
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4583
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
4584
|
+
className: "rb-reg-surface er-container er-registration-closed",
|
|
4585
|
+
role: "status",
|
|
4586
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4587
|
+
className: "rb-reg-stack er-stack",
|
|
4588
|
+
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
4589
|
+
/* @__PURE__ */ jsx("p", {
|
|
4590
|
+
className: "er-registration-shell__eyebrow",
|
|
4591
|
+
children: "Registration"
|
|
4592
|
+
}),
|
|
4593
|
+
/* @__PURE__ */ jsx("h3", {
|
|
4594
|
+
className: "er-title er-registration-shell__title",
|
|
4595
|
+
children: title
|
|
4596
|
+
}),
|
|
4597
|
+
/* @__PURE__ */ jsx("p", {
|
|
4598
|
+
className: "er-text er-text--muted",
|
|
4599
|
+
children: body
|
|
4600
|
+
})
|
|
4601
|
+
] })
|
|
4602
|
+
})
|
|
4603
|
+
});
|
|
4604
|
+
}
|
|
4605
|
+
//#endregion
|
|
4071
4606
|
//#region ../blocks/src/system/runtime/nodes/event-registration.client.tsx
|
|
4072
|
-
function toEventRegistrationClientProps(props) {
|
|
4607
|
+
function toEventRegistrationClientProps(props, display) {
|
|
4073
4608
|
return {
|
|
4074
4609
|
...props.render.hydration,
|
|
4075
|
-
buttonText:
|
|
4076
|
-
className:
|
|
4610
|
+
buttonText: display.summaryButtonText,
|
|
4611
|
+
className: display.className ?? void 0
|
|
4077
4612
|
};
|
|
4078
4613
|
}
|
|
4079
4614
|
const EventRegistrationClient = (clientProps) => {
|
|
4080
4615
|
const surface = planEventRegistrationSurface({
|
|
4081
4616
|
events: clientProps.events ?? [],
|
|
4082
|
-
wholeSeriesOfferings: clientProps.
|
|
4617
|
+
wholeSeriesOfferings: clientProps.wholeSeriesOfferings ?? [],
|
|
4618
|
+
wholeSeriesOffering: clientProps.wholeSeriesOffering,
|
|
4083
4619
|
occurrenceContext: clientProps.occurrenceContext,
|
|
4084
4620
|
subject: clientProps.subject
|
|
4085
4621
|
});
|
|
4086
|
-
if (surface.kind === "wholeSeries") return /* @__PURE__ */ jsx(
|
|
4622
|
+
if (surface.kind === "wholeSeries") return /* @__PURE__ */ jsx(WholeSeriesRegistrationErrorBoundary, {
|
|
4087
4623
|
className: clientProps.className,
|
|
4088
|
-
children: /* @__PURE__ */ jsx(
|
|
4624
|
+
children: /* @__PURE__ */ jsx(WholeSeriesRegistrationWizard, {
|
|
4089
4625
|
subject: clientProps.subject,
|
|
4090
|
-
|
|
4626
|
+
runs: [...surface.offerings],
|
|
4091
4627
|
showSessions: clientProps.showSessions,
|
|
4092
4628
|
showPrice: clientProps.showPrice,
|
|
4093
4629
|
showCapacity: clientProps.showCapacity,
|
|
@@ -4114,7 +4650,11 @@ const EventRegistrationClient = (clientProps) => {
|
|
|
4114
4650
|
return /* @__PURE__ */ jsx(EventRegistrationWizard, { ...clientProps });
|
|
4115
4651
|
};
|
|
4116
4652
|
const EventRegistrationIslandClient = (props) => {
|
|
4117
|
-
return /* @__PURE__ */ jsx(
|
|
4653
|
+
if (props.render.display.state === "registration-closed") return /* @__PURE__ */ jsx(RegistrationClosedState, {
|
|
4654
|
+
title: props.render.display.titleText,
|
|
4655
|
+
body: props.render.display.bodyText
|
|
4656
|
+
});
|
|
4657
|
+
return /* @__PURE__ */ jsx(EventRegistrationClient, { ...toEventRegistrationClientProps(props, props.render.display) });
|
|
4118
4658
|
};
|
|
4119
4659
|
//#endregion
|
|
4120
4660
|
//#region src/rendering/islands/enhancers/eventRegistration.tsx
|