@riverbankcms/sdk 0.130.2 → 0.132.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 +3 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DKQ5eFK9.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-CNTcOjCC.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-DJu3qu33.mjs} +48 -9
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-2TzT3vbj.mjs} +6417 -4184
- package/dist/_dts/ai/src/contracts/proposals.d.ts +723 -151
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +151 -64
- 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/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -1
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +466 -346
- 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/dashboardBookingsNav.d.ts +3 -4
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +25 -12
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -2
- 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 +16 -6
- 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 +1 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +26 -44
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- 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 +6 -6
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +2 -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 +81 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +1 -1
- 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 +21 -36
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- 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/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 +3 -3
- 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 +2 -0
- 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 +45 -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 +5 -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 +19 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +12 -12
- 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/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/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 +3 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +72 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -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-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/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/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- 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 +5 -19
- 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/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 +29 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +3 -25
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -6
- package/dist/_dts/theme-core/src/schema.d.ts +21 -33
- 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/compilationPlan.d.ts +21 -0
- 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/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-DO7llLxm.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-xID7zN__.mjs} +36 -48
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-CriBslp0.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-DYmHnM8g.mjs} +1 -1
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → StepIndicator-CGixP_LW.mjs} +2 -2
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-BEjzSiOA.mjs} +1408 -1245
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-CgFbnnnQ.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-dUyGpbxc.mjs} +5 -5
- package/dist/client/bookings.mjs +635 -471
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-BvBwkUzx.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DiZENT2E.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-Dq13KIgR.mjs} +3 -3
- package/dist/client/client.mjs +6291 -3452
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-CKC5NmyH.mjs} +10 -4
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-BF0Jatfw.mjs} +40 -43
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-BuoCF8je.mjs} +2 -2
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-CKwh0S9s.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-eUxaWFaB.mjs} +2 -2
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CfkNOkPb.mjs} +625 -132
- package/dist/client/{form-BA4t3kKU.mjs → form-C17H1c_H.mjs} +1 -1
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-DEwUmrtt.mjs} +2 -2
- package/dist/client/hooks.mjs +1312 -481
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-Pf2QwuvW.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-BWQAH5Sv.mjs} +1 -1
- package/dist/client/pricing-CVdvbopJ.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-BZi1Fa_G.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-qq-55DNk.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-BxmqPKdP.mjs} +412 -196
- package/dist/client/rendering/client.mjs +5685 -4037
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7006 -4124
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-B3CcKdtG.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DNWJPut5.mjs} +5 -5
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-BhvQCosS.mjs} +4 -4
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-B04sCNnW.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-DNNgZlmW.mjs} +2 -2
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-CUmhE24_.mjs} +195 -6
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-M5jG675x.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-BEXb1wqo.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-DGMuip1D.mjs} +1 -1
- package/dist/server/components.mjs +3461 -1577
- package/dist/server/config-validation.mjs +1312 -482
- package/dist/server/config.mjs +1312 -482
- package/dist/server/data.mjs +1312 -481
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3576 -1689
- package/dist/server/page-converter.mjs +797 -250
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3461 -1576
- package/dist/server/rendering.mjs +3461 -1577
- package/dist/server/routing.mjs +1555 -616
- package/dist/server/server.mjs +1352 -560
- package/dist/server/theme-bridge.mjs +1992 -931
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +1 -1
- 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/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 {
|
|
2
|
+
import { n as buildBookingPaymentSelectionViewModel, r as resolveFlexibleBalanceInitialPaymentCents, t as usePolling } from "./usePolling-M5jG675x.mjs";
|
|
3
|
+
import { $ as resolveEventRegistrationScopedEvents, At as formatBookingDate, C as getWizardStepsForContext, Gt as publicEventScalarPrice, Ht as publicEventPricingCurrency, K as resolveRuntimeEventPricing, Kt as publicEventTicketTypes, Nt as formatBookingTime, R as formatEventPriceDisplay, Rt as toBookingTimeZone, S as getStepNumber, St as assertNever, Ut as publicEventPricingMode, Wt as publicEventPricingType, _ as findPreSelectedEvent, b as resolveRegistrationTarget, et as themeButtonClassName, g as findEventByOccurrenceId, h as toRegistrationEvents, jt as formatBookingDateTime, qt as formatCurrencyAmount, t as defineIslandPropsDecoder, v as resolveDiscountContext, x as WIZARD_STEPS, y as resolveEventRequiresPayment, zt as toScheduledBookingDateTime } from "./propsDecoder-BxmqPKdP.mjs";
|
|
4
4
|
import { n as useBlockApi, t as BlockApiProvider } from "./context-B83PiNzm.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 SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-
|
|
6
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-B3CcKdtG.mjs";
|
|
7
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-DO7llLxm.mjs";
|
|
8
|
+
import { n as SpinnerNode, r as formatPrice, t as StepIndicator$1 } from "./StepIndicator-CGixP_LW.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
11
|
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-Ct8Mxna3.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-BEjzSiOA.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
|
*/
|
|
@@ -1275,7 +1558,7 @@ function buildEventRegistrationPaymentOptionsViewModel(input) {
|
|
|
1275
1558
|
return {
|
|
1276
1559
|
mode: selection.mode,
|
|
1277
1560
|
sectionTitle: selection.sectionTitle,
|
|
1278
|
-
options: selection.options.map((option) => toEventDirectPaymentOption(option, selection.mode))
|
|
1561
|
+
options: selection.options.map((option, index) => toEventDirectPaymentOption(option, supportedOptions[index] ?? DEFAULT_EVENT_DIRECT_PAYMENT_OPTION, selection.mode, input.totalPriceCents))
|
|
1279
1562
|
};
|
|
1280
1563
|
}
|
|
1281
1564
|
function selectSupportedEventDirectPaymentOptions(paymentTerms) {
|
|
@@ -1285,17 +1568,24 @@ function selectSupportedEventDirectPaymentOptions(paymentTerms) {
|
|
|
1285
1568
|
function isSupportedEventDirectPaymentOption(option) {
|
|
1286
1569
|
return option.kind === "upfront" || option.kind === "flexible_balance";
|
|
1287
1570
|
}
|
|
1288
|
-
function toEventDirectPaymentOption(option, mode) {
|
|
1571
|
+
function toEventDirectPaymentOption(option, sourceOption, mode, totalCents) {
|
|
1289
1572
|
switch (option.kind) {
|
|
1290
1573
|
case "upfront": return {
|
|
1291
1574
|
...option,
|
|
1292
1575
|
kind: "upfront",
|
|
1293
|
-
label: mode === "choice_required" ? "Pay in full now" : "Pay by card"
|
|
1576
|
+
label: mode === "choice_required" ? "Pay in full now" : "Pay by card",
|
|
1577
|
+
totalCents,
|
|
1578
|
+
configuredPaymentDueNowCents: totalCents
|
|
1294
1579
|
};
|
|
1295
1580
|
case "flexible_balance": return {
|
|
1296
1581
|
...option,
|
|
1297
1582
|
kind: "flexible_balance",
|
|
1298
|
-
label: "Pay deposit now"
|
|
1583
|
+
label: "Pay deposit now",
|
|
1584
|
+
totalCents,
|
|
1585
|
+
configuredPaymentDueNowCents: sourceOption.kind === "flexible_balance" ? resolveFlexibleBalanceInitialPaymentCents({
|
|
1586
|
+
totalAmountCents: totalCents,
|
|
1587
|
+
config: sourceOption.config
|
|
1588
|
+
}) : totalCents
|
|
1299
1589
|
};
|
|
1300
1590
|
case "deferred_manual":
|
|
1301
1591
|
case "instalment_plan": throw new Error(`Unsupported event registration payment option: ${option.kind}`);
|
|
@@ -1323,6 +1613,86 @@ function resolveEventRegistrationDirectPaymentSelection(input) {
|
|
|
1323
1613
|
};
|
|
1324
1614
|
}
|
|
1325
1615
|
//#endregion
|
|
1616
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.tsx
|
|
1617
|
+
function SiteCreditPreviewPanel(props) {
|
|
1618
|
+
const { preview } = props;
|
|
1619
|
+
if (preview.kind === "not_authenticated" || preview.kind === "not_applicable" || preview.kind === "no_credit") return null;
|
|
1620
|
+
if (preview.kind === "loading") return /* @__PURE__ */ jsx("div", {
|
|
1621
|
+
className: "er-payment-summary",
|
|
1622
|
+
"aria-live": "polite",
|
|
1623
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1624
|
+
className: "er-text er-text--muted",
|
|
1625
|
+
children: "Checking your site credit..."
|
|
1626
|
+
})
|
|
1627
|
+
});
|
|
1628
|
+
if (preview.kind === "unavailable") return /* @__PURE__ */ jsx("div", {
|
|
1629
|
+
className: "er-payment-summary",
|
|
1630
|
+
role: "status",
|
|
1631
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1632
|
+
className: "er-text er-text--muted",
|
|
1633
|
+
children: "We couldn't check your site credit just now. We'll check again before payment."
|
|
1634
|
+
})
|
|
1635
|
+
});
|
|
1636
|
+
if (preview.kind === "currency_mismatch") return /* @__PURE__ */ jsxs("div", {
|
|
1637
|
+
className: "er-payment-summary",
|
|
1638
|
+
role: "status",
|
|
1639
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
1640
|
+
className: "er-title",
|
|
1641
|
+
children: "Your site credit"
|
|
1642
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
1643
|
+
className: "er-text er-text--muted",
|
|
1644
|
+
children: [
|
|
1645
|
+
"You have",
|
|
1646
|
+
" ",
|
|
1647
|
+
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
1648
|
+
" ",
|
|
1649
|
+
"in site credit, but it can't be used for this",
|
|
1650
|
+
" ",
|
|
1651
|
+
props.currency.toUpperCase(),
|
|
1652
|
+
" booking."
|
|
1653
|
+
]
|
|
1654
|
+
})]
|
|
1655
|
+
});
|
|
1656
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1657
|
+
className: "er-payment-summary",
|
|
1658
|
+
"aria-live": "polite",
|
|
1659
|
+
children: [
|
|
1660
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1661
|
+
className: "er-title",
|
|
1662
|
+
children: "Your site credit"
|
|
1663
|
+
}),
|
|
1664
|
+
/* @__PURE__ */ jsxs("p", {
|
|
1665
|
+
className: "er-text",
|
|
1666
|
+
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
1667
|
+
}),
|
|
1668
|
+
/* @__PURE__ */ jsx("p", {
|
|
1669
|
+
className: "er-text er-text--success",
|
|
1670
|
+
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.`
|
|
1671
|
+
}),
|
|
1672
|
+
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
1673
|
+
className: "er-text er-text--muted",
|
|
1674
|
+
children: [
|
|
1675
|
+
"Remaining balance after today:",
|
|
1676
|
+
" ",
|
|
1677
|
+
formatPrice(preview.laterBalanceCents, props.currency)
|
|
1678
|
+
]
|
|
1679
|
+
}),
|
|
1680
|
+
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
1681
|
+
className: "er-text er-text--muted",
|
|
1682
|
+
children: [
|
|
1683
|
+
"Credit left afterwards:",
|
|
1684
|
+
" ",
|
|
1685
|
+
formatPrice(preview.remainingCreditCents, props.currency)
|
|
1686
|
+
]
|
|
1687
|
+
}),
|
|
1688
|
+
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
1689
|
+
className: "er-text er-text--muted",
|
|
1690
|
+
children: "We'll recalculate these amounts after your discount code is checked."
|
|
1691
|
+
})
|
|
1692
|
+
]
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
//#endregion
|
|
1326
1696
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.tsx
|
|
1327
1697
|
/**
|
|
1328
1698
|
* Payment Selection Step Component
|
|
@@ -1372,15 +1742,51 @@ function formatDirectPaymentOptionDetail(option) {
|
|
|
1372
1742
|
function isDirectPaymentOptionSelected(option, selectionState) {
|
|
1373
1743
|
return selectionState.kind === "valid" && selectionState.selection.collectionOptionKind === option.kind;
|
|
1374
1744
|
}
|
|
1745
|
+
function resolveDirectPaymentLabel(option, selectionState, preview) {
|
|
1746
|
+
if (!isDirectPaymentOptionSelected(option, selectionState)) return option.label;
|
|
1747
|
+
if (preview.kind !== "applied") return option.label;
|
|
1748
|
+
return preview.outcome === "credit_only" ? "Pay with site credit" : "Use site credit + card";
|
|
1749
|
+
}
|
|
1750
|
+
function DirectPaymentIcon(props) {
|
|
1751
|
+
return props.selected && props.preview.kind === "applied" ? /* @__PURE__ */ jsx(Wallet, {
|
|
1752
|
+
size: 24,
|
|
1753
|
+
"aria-hidden": "true"
|
|
1754
|
+
}) : /* @__PURE__ */ jsx(CreditCard, {
|
|
1755
|
+
size: 24,
|
|
1756
|
+
"aria-hidden": "true"
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
function DirectPaymentTiles(props) {
|
|
1760
|
+
return props.options.map((option) => {
|
|
1761
|
+
const selected = isDirectPaymentOptionSelected(option, props.selectionState);
|
|
1762
|
+
return /* @__PURE__ */ jsx(PaymentTile, {
|
|
1763
|
+
icon: /* @__PURE__ */ jsx(DirectPaymentIcon, {
|
|
1764
|
+
selected,
|
|
1765
|
+
preview: props.preview
|
|
1766
|
+
}),
|
|
1767
|
+
label: resolveDirectPaymentLabel(option, props.selectionState, props.preview),
|
|
1768
|
+
detail: formatDirectPaymentOptionDetail(option),
|
|
1769
|
+
selected,
|
|
1770
|
+
onClick: () => props.onSelectionChange({
|
|
1771
|
+
method: "stripe",
|
|
1772
|
+
collectionOptionKind: option.kind
|
|
1773
|
+
})
|
|
1774
|
+
}, option.kind);
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1375
1777
|
/**
|
|
1376
1778
|
* Label for the button that acts on the chosen payment method.
|
|
1377
1779
|
*
|
|
1378
1780
|
* A pass redemption spends a credit the moment it is pressed, so the label
|
|
1379
1781
|
* names the pass instead of describing the step.
|
|
1380
1782
|
*/
|
|
1381
|
-
function resolvePaymentButtonText(method) {
|
|
1783
|
+
function resolvePaymentButtonText(method, siteCreditPreview, eligibility) {
|
|
1784
|
+
const currency = eligibility?.currency ?? "GBP";
|
|
1382
1785
|
switch (method) {
|
|
1383
|
-
case "stripe":
|
|
1786
|
+
case "stripe":
|
|
1787
|
+
if (siteCreditPreview.kind !== "applied") return "Continue to Payment";
|
|
1788
|
+
if (siteCreditPreview.cardDueNowCents > 0) return `Pay ${formatPrice(siteCreditPreview.cardDueNowCents, currency)} by card`;
|
|
1789
|
+
return `Book with ${formatPrice(siteCreditPreview.appliedCreditCents, currency)} site credit`;
|
|
1384
1790
|
case "pass": return "Book using class pass";
|
|
1385
1791
|
case "pass_bundle":
|
|
1386
1792
|
case "membership_bundle": return "Purchase & Register";
|
|
@@ -1389,6 +1795,17 @@ function resolvePaymentButtonText(method) {
|
|
|
1389
1795
|
case null: return "Complete Registration";
|
|
1390
1796
|
}
|
|
1391
1797
|
}
|
|
1798
|
+
function canContinueWithPaymentSelection(selection, directPaymentSelection) {
|
|
1799
|
+
switch (selection.method) {
|
|
1800
|
+
case "stripe": return directPaymentSelection.kind === "valid";
|
|
1801
|
+
case "pass": return Boolean(selection.passId);
|
|
1802
|
+
case "membership": return Boolean(selection.membershipId);
|
|
1803
|
+
case "pass_bundle": return Boolean(selection.bundlePassId);
|
|
1804
|
+
case "membership_bundle": return Boolean(selection.bundleMembershipId);
|
|
1805
|
+
case "free": return true;
|
|
1806
|
+
case null: return false;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1392
1809
|
/**
|
|
1393
1810
|
* Payment Selection Step
|
|
1394
1811
|
*
|
|
@@ -1396,10 +1813,10 @@ function resolvePaymentButtonText(method) {
|
|
|
1396
1813
|
* Fetches eligible passes/memberships using the user's email.
|
|
1397
1814
|
* Also shows available passes/memberships for purchase (upsell).
|
|
1398
1815
|
*/
|
|
1399
|
-
const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, isAuthenticated = false, selectedSelection, onSelectionChange, eligibility, eligibilityLoading, eligibilityError = null, onRequestLogin, onStateChange }) => {
|
|
1816
|
+
const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, isAuthenticated = false, creditState = { kind: "not_authenticated" }, directPaymentTotalCents, manualDiscountPending = false, selectedSelection, onSelectionChange, eligibility, eligibilityLoading, eligibilityError = null, onRequestLogin, onStateChange }) => {
|
|
1400
1817
|
const occurrenceId = occurrenceContext?.id ?? event?.registrationOccurrenceId;
|
|
1401
1818
|
const selectedMethod = selectedSelection.method;
|
|
1402
|
-
const totalPrice = eligibility
|
|
1819
|
+
const totalPrice = resolveDirectPaymentTotalCents(directPaymentTotalCents, eligibility);
|
|
1403
1820
|
const canShowDirectPaymentOptions = Boolean(eligibility?.eligible && eligibility.canPayDirectly && eligibility.price);
|
|
1404
1821
|
const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventRegistrationPaymentOptionsViewModel({
|
|
1405
1822
|
eventTitle: event?.title ?? "Event",
|
|
@@ -1413,15 +1830,14 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
|
|
|
1413
1830
|
selection: selectedSelection
|
|
1414
1831
|
});
|
|
1415
1832
|
const directPaymentFallbackKind = (directPaymentSelectionState.kind === "invalid" ? directPaymentSelectionState.fallbackSelection : null)?.collectionOptionKind;
|
|
1416
|
-
const
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
})();
|
|
1833
|
+
const siteCreditPreview = buildSelectedSiteCreditPreview({
|
|
1834
|
+
options: directPaymentOptions,
|
|
1835
|
+
selectionState: directPaymentSelectionState,
|
|
1836
|
+
eligibility,
|
|
1837
|
+
creditState,
|
|
1838
|
+
manualDiscountPending
|
|
1839
|
+
});
|
|
1840
|
+
const canContinue = canContinueWithPaymentSelection(selectedSelection, directPaymentSelectionState);
|
|
1425
1841
|
useEffect(() => {
|
|
1426
1842
|
if (!directPaymentFallbackKind) return;
|
|
1427
1843
|
onSelectionChange({
|
|
@@ -1429,7 +1845,11 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
|
|
|
1429
1845
|
collectionOptionKind: directPaymentFallbackKind
|
|
1430
1846
|
});
|
|
1431
1847
|
}, [directPaymentFallbackKind, onSelectionChange]);
|
|
1432
|
-
const getButtonText = useCallback(() => resolvePaymentButtonText(selectedMethod), [
|
|
1848
|
+
const getButtonText = useCallback(() => resolvePaymentButtonText(selectedMethod, siteCreditPreview, eligibility), [
|
|
1849
|
+
selectedMethod,
|
|
1850
|
+
siteCreditPreview,
|
|
1851
|
+
eligibility
|
|
1852
|
+
]);
|
|
1433
1853
|
useEffect(() => {
|
|
1434
1854
|
if (!onStateChange) return;
|
|
1435
1855
|
let status = "ready";
|
|
@@ -1572,98 +1992,98 @@ const PaymentSelectionStep = ({ event, occurrenceContext, ticketsCount, email, i
|
|
|
1572
1992
|
const isMultiTicket = areEntitlementsDisabledForTicketCount(ticketsCount);
|
|
1573
1993
|
return /* @__PURE__ */ jsxs("div", {
|
|
1574
1994
|
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"
|
|
1995
|
+
children: [
|
|
1996
|
+
/* @__PURE__ */ jsx("h3", {
|
|
1997
|
+
className: "er-title",
|
|
1998
|
+
children: "Payment Options"
|
|
1999
|
+
}),
|
|
2000
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2001
|
+
className: "er-payment-tiles",
|
|
2002
|
+
children: [
|
|
2003
|
+
canShowDirectPaymentOptions && /* @__PURE__ */ jsx(DirectPaymentTiles, {
|
|
2004
|
+
options: directPaymentOptions,
|
|
2005
|
+
selectionState: directPaymentSelectionState,
|
|
2006
|
+
preview: siteCreditPreview,
|
|
2007
|
+
onSelectionChange
|
|
1649
2008
|
}),
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
2009
|
+
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2010
|
+
icon: /* @__PURE__ */ jsx(Ticket, {
|
|
2011
|
+
size: 24,
|
|
2012
|
+
"aria-hidden": "true"
|
|
2013
|
+
}),
|
|
2014
|
+
label: pass.passName,
|
|
2015
|
+
detail: `${pass.creditsRemaining} credit${pass.creditsRemaining !== 1 ? "s" : ""}`,
|
|
2016
|
+
selected: selectedMethod === "pass" && selectedSelection.passId === pass.id,
|
|
2017
|
+
disabled: isMultiTicket,
|
|
2018
|
+
tooltip: isMultiTicket ? "Only available for single-ticket bookings" : void 0,
|
|
2019
|
+
onClick: () => onSelectionChange({
|
|
2020
|
+
method: "pass",
|
|
2021
|
+
passId: pass.id,
|
|
2022
|
+
productName: pass.passName
|
|
2023
|
+
})
|
|
2024
|
+
}, pass.id)),
|
|
2025
|
+
isAuthenticated && eligibility.eligibleMemberships.map((membership) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2026
|
+
icon: /* @__PURE__ */ jsx(Star, {
|
|
2027
|
+
size: 24,
|
|
2028
|
+
"aria-hidden": "true"
|
|
2029
|
+
}),
|
|
2030
|
+
label: membership.membershipName,
|
|
2031
|
+
detail: "Active",
|
|
2032
|
+
selected: selectedMethod === "membership" && selectedSelection.membershipId === membership.id,
|
|
2033
|
+
disabled: isMultiTicket,
|
|
2034
|
+
tooltip: isMultiTicket ? "Only available for single-ticket bookings" : void 0,
|
|
2035
|
+
onClick: () => onSelectionChange({
|
|
2036
|
+
method: "membership",
|
|
2037
|
+
membershipId: membership.id,
|
|
2038
|
+
productName: membership.membershipName
|
|
2039
|
+
})
|
|
2040
|
+
}, membership.id)),
|
|
2041
|
+
eligibility.availablePasses.map((pass) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2042
|
+
icon: /* @__PURE__ */ jsx(Ticket, {
|
|
2043
|
+
size: 24,
|
|
2044
|
+
"aria-hidden": "true"
|
|
2045
|
+
}),
|
|
2046
|
+
label: pass.name,
|
|
2047
|
+
detail: `${pass.creditsTotal} for ${formatPrice(pass.price, pass.currency)}`,
|
|
2048
|
+
selected: selectedMethod === "pass_bundle" && selectedSelection.bundlePassId === pass.id,
|
|
2049
|
+
disabled: isMultiTicket,
|
|
2050
|
+
tooltip: isMultiTicket ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : pass.description ?? void 0,
|
|
2051
|
+
upsell: true,
|
|
2052
|
+
onClick: () => onSelectionChange({
|
|
2053
|
+
method: "pass_bundle",
|
|
2054
|
+
bundlePassId: pass.id,
|
|
2055
|
+
productName: pass.name,
|
|
2056
|
+
productPrice: pass.price,
|
|
2057
|
+
productCurrency: pass.currency
|
|
2058
|
+
})
|
|
2059
|
+
}, pass.id)),
|
|
2060
|
+
eligibility.availableMemberships.map((membership) => /* @__PURE__ */ jsx(PaymentTile, {
|
|
2061
|
+
icon: /* @__PURE__ */ jsx(Star, {
|
|
2062
|
+
size: 24,
|
|
2063
|
+
"aria-hidden": "true"
|
|
2064
|
+
}),
|
|
2065
|
+
label: membership.name,
|
|
2066
|
+
detail: `${formatPrice(membership.price, membership.currency)}/${membership.interval}`,
|
|
2067
|
+
selected: selectedMethod === "membership_bundle" && selectedSelection.bundleMembershipId === membership.id,
|
|
2068
|
+
disabled: isMultiTicket,
|
|
2069
|
+
tooltip: isMultiTicket ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : membership.description ?? void 0,
|
|
2070
|
+
upsell: true,
|
|
2071
|
+
onClick: () => onSelectionChange({
|
|
2072
|
+
method: "membership_bundle",
|
|
2073
|
+
bundleMembershipId: membership.id,
|
|
2074
|
+
productName: membership.name,
|
|
2075
|
+
productPrice: membership.price,
|
|
2076
|
+
productCurrency: membership.currency,
|
|
2077
|
+
productInterval: membership.interval
|
|
2078
|
+
})
|
|
2079
|
+
}, membership.id))
|
|
2080
|
+
]
|
|
2081
|
+
}),
|
|
2082
|
+
/* @__PURE__ */ jsx(SiteCreditPreviewPanel, {
|
|
2083
|
+
preview: siteCreditPreview,
|
|
2084
|
+
currency: eligibility.currency
|
|
2085
|
+
})
|
|
2086
|
+
]
|
|
1667
2087
|
});
|
|
1668
2088
|
};
|
|
1669
2089
|
//#endregion
|
|
@@ -1952,6 +2372,13 @@ function EventRegistrationWizardContent(props) {
|
|
|
1952
2372
|
ticketsCount: wizard.ticketsCount,
|
|
1953
2373
|
email: wizard.formData.email,
|
|
1954
2374
|
isAuthenticated: wizard.portalAuthState === "authenticated",
|
|
2375
|
+
creditState: wizard.portalCreditState,
|
|
2376
|
+
directPaymentTotalCents: calculateEventRegistrationPreviewTotal({
|
|
2377
|
+
subtotalCents: wizard.ticketSelectionSubtotalCents,
|
|
2378
|
+
manualDiscountCode: wizard.discountCode,
|
|
2379
|
+
automaticDiscount: wizard.autoAppliedDiscount
|
|
2380
|
+
}),
|
|
2381
|
+
manualDiscountPending: wizard.discountCode.trim().length > 0,
|
|
1955
2382
|
selectedSelection: wizard.paymentSelection,
|
|
1956
2383
|
onSelectionChange: wizard.handlePaymentSelectionChange,
|
|
1957
2384
|
eligibility: wizard.eligibility,
|
|
@@ -2355,6 +2782,15 @@ function existingRegistrationLookupReducer(state, action) {
|
|
|
2355
2782
|
* Custom hooks for portal authentication and eligibility checking.
|
|
2356
2783
|
* Extracted from the main EventRegistrationClient for better separation of concerns.
|
|
2357
2784
|
*/
|
|
2785
|
+
function scopePortalCreditStateToSubject(state, subjectEmail) {
|
|
2786
|
+
if (!subjectEmail) return { kind: "not_authenticated" };
|
|
2787
|
+
if (state.kind === "not_authenticated") return state;
|
|
2788
|
+
const normalizedSubject = subjectEmail.trim().toLowerCase();
|
|
2789
|
+
return state.subjectEmail === normalizedSubject ? state : {
|
|
2790
|
+
kind: "loading",
|
|
2791
|
+
subjectEmail: normalizedSubject
|
|
2792
|
+
};
|
|
2793
|
+
}
|
|
2358
2794
|
const eventRegistrationHooksDeps = { useBlockApi };
|
|
2359
2795
|
/**
|
|
2360
2796
|
* Hook for managing portal authentication state.
|
|
@@ -2369,27 +2805,54 @@ function usePortalAuthWithDeps(deps) {
|
|
|
2369
2805
|
const api = deps.useBlockApi();
|
|
2370
2806
|
const [authState, setAuthState] = useState("checking");
|
|
2371
2807
|
const [profile, setProfile] = useState(null);
|
|
2808
|
+
const [creditState, setCreditState] = useState({ kind: "not_authenticated" });
|
|
2372
2809
|
useEffect(() => {
|
|
2373
2810
|
let cancelled = false;
|
|
2374
2811
|
async function checkPortalAuth() {
|
|
2375
2812
|
if ((api.config.authOverrides?.portal ?? api.config.auth).type !== "bearer") {
|
|
2376
2813
|
setAuthState("unauthenticated");
|
|
2814
|
+
setProfile(null);
|
|
2815
|
+
setCreditState({ kind: "not_authenticated" });
|
|
2377
2816
|
return;
|
|
2378
2817
|
}
|
|
2379
2818
|
setAuthState("checking");
|
|
2819
|
+
setProfile(null);
|
|
2820
|
+
setCreditState({ kind: "not_authenticated" });
|
|
2380
2821
|
try {
|
|
2381
2822
|
const me = await api.getPortalProfile();
|
|
2382
2823
|
if (cancelled) return;
|
|
2383
|
-
|
|
2384
|
-
setProfile({
|
|
2824
|
+
const nextProfile = {
|
|
2385
2825
|
email: me.profile.email,
|
|
2386
2826
|
name: me.profile.name,
|
|
2387
2827
|
phone: me.profile.phone || ""
|
|
2828
|
+
};
|
|
2829
|
+
const subjectEmail = nextProfile.email.trim().toLowerCase();
|
|
2830
|
+
setProfile(nextProfile);
|
|
2831
|
+
setCreditState({
|
|
2832
|
+
kind: "loading",
|
|
2833
|
+
subjectEmail
|
|
2388
2834
|
});
|
|
2835
|
+
setAuthState("authenticated");
|
|
2836
|
+
try {
|
|
2837
|
+
const credit = await api.getPortalCredit();
|
|
2838
|
+
if (cancelled) return;
|
|
2839
|
+
setCreditState({
|
|
2840
|
+
kind: "loaded",
|
|
2841
|
+
subjectEmail,
|
|
2842
|
+
credit
|
|
2843
|
+
});
|
|
2844
|
+
} catch {
|
|
2845
|
+
if (cancelled) return;
|
|
2846
|
+
setCreditState({
|
|
2847
|
+
kind: "unavailable",
|
|
2848
|
+
subjectEmail
|
|
2849
|
+
});
|
|
2850
|
+
}
|
|
2389
2851
|
} catch {
|
|
2390
2852
|
if (cancelled) return;
|
|
2391
2853
|
setAuthState("unauthenticated");
|
|
2392
2854
|
setProfile(null);
|
|
2855
|
+
setCreditState({ kind: "not_authenticated" });
|
|
2393
2856
|
}
|
|
2394
2857
|
}
|
|
2395
2858
|
checkPortalAuth();
|
|
@@ -2409,6 +2872,7 @@ function usePortalAuthWithDeps(deps) {
|
|
|
2409
2872
|
isAuthenticated: authState === "authenticated",
|
|
2410
2873
|
isChecking: authState === "checking",
|
|
2411
2874
|
profile,
|
|
2875
|
+
creditState: scopePortalCreditStateToSubject(creditState, authState === "authenticated" ? profile?.email ?? null : null),
|
|
2412
2876
|
logout
|
|
2413
2877
|
};
|
|
2414
2878
|
}
|
|
@@ -3072,7 +3536,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3072
3536
|
const [registrationResult, setRegistrationResult] = useState(null);
|
|
3073
3537
|
const [errorMessage, setErrorMessage] = useState("");
|
|
3074
3538
|
const [altchaSolution, setAltchaSolution] = useState(null);
|
|
3075
|
-
const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
|
|
3539
|
+
const { authState: portalAuthState, profile: portalProfile, creditState: portalCreditState } = deps.usePortalAuth();
|
|
3076
3540
|
const waitlistClaim = deps.useWaitlistClaim();
|
|
3077
3541
|
const [showMagicLinkModal, setShowMagicLinkModal] = useState(false);
|
|
3078
3542
|
const [pendingAttendeeId, setPendingAttendeeId] = useState(null);
|
|
@@ -3625,6 +4089,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3625
4089
|
setAltchaSolution,
|
|
3626
4090
|
portalAuthState,
|
|
3627
4091
|
portalProfile,
|
|
4092
|
+
portalCreditState,
|
|
3628
4093
|
showMagicLinkModal,
|
|
3629
4094
|
setShowMagicLinkModal,
|
|
3630
4095
|
handleLogout,
|
|
@@ -3667,8 +4132,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
3667
4132
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx
|
|
3668
4133
|
const EVENT_PORTAL_AUTH_COPY = {
|
|
3669
4134
|
membership: {
|
|
3670
|
-
title: "
|
|
3671
|
-
description: "Log in to use
|
|
4135
|
+
title: "Already have an account?",
|
|
4136
|
+
description: "Log in to use any site credit, passes or memberships linked to your email.",
|
|
3672
4137
|
buttonText: "Email me a login link →"
|
|
3673
4138
|
},
|
|
3674
4139
|
"waitlist-claim": {
|
|
@@ -3704,7 +4169,7 @@ function formatTicketTypePrice(ticketType, currency) {
|
|
|
3704
4169
|
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
3705
4170
|
}
|
|
3706
4171
|
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
|
|
4172
|
+
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
4173
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
|
|
3709
4174
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
3710
4175
|
const buttonClass = themeButtonClassName({
|
|
@@ -3794,13 +4259,11 @@ function EventRegistrationWizard(props) {
|
|
|
3794
4259
|
const summaryPriceLabel = summaryEvent ? formatEventPriceDisplay(summaryEvent.pricing) : null;
|
|
3795
4260
|
const summaryAvailabilityLabel = summaryEvent?.availableSpots === null || summaryEvent?.availableSpots === void 0 ? null : summaryEvent.availableSpots > 0 ? `${summaryEvent.availableSpots} spots left` : summaryEvent.waitlistEnabled ? "Waitlist available" : "Fully booked";
|
|
3796
4261
|
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
4262
|
const portalAuthCopy = waitlistClaimRequiresPortalLogin ? {
|
|
3800
4263
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
3801
4264
|
description: wizard.waitlistClaim.loginMessage ?? "Log in to continue with your waitlist claim."
|
|
3802
4265
|
} : EVENT_PORTAL_AUTH_COPY.membership;
|
|
3803
|
-
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" &&
|
|
4266
|
+
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && summaryEventPricingType !== "free";
|
|
3804
4267
|
const renderRegistrationSurface = (variant) => /* @__PURE__ */ jsxs("div", {
|
|
3805
4268
|
className: `rb-reg-surface er-container${variant === "overlay" ? " er-container--overlay" : ""}`,
|
|
3806
4269
|
children: [
|
|
@@ -4068,12 +4531,38 @@ function PastOccurrenceNotice(props) {
|
|
|
4068
4531
|
});
|
|
4069
4532
|
}
|
|
4070
4533
|
//#endregion
|
|
4534
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.tsx
|
|
4535
|
+
function RegistrationClosedState({ title, body }) {
|
|
4536
|
+
return /* @__PURE__ */ jsx("div", {
|
|
4537
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
4538
|
+
className: "rb-reg-surface er-container er-registration-closed",
|
|
4539
|
+
role: "status",
|
|
4540
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
4541
|
+
className: "rb-reg-stack er-stack",
|
|
4542
|
+
children: /* @__PURE__ */ jsxs("div", { children: [
|
|
4543
|
+
/* @__PURE__ */ jsx("p", {
|
|
4544
|
+
className: "er-registration-shell__eyebrow",
|
|
4545
|
+
children: "Registration"
|
|
4546
|
+
}),
|
|
4547
|
+
/* @__PURE__ */ jsx("h3", {
|
|
4548
|
+
className: "er-title er-registration-shell__title",
|
|
4549
|
+
children: title
|
|
4550
|
+
}),
|
|
4551
|
+
/* @__PURE__ */ jsx("p", {
|
|
4552
|
+
className: "er-text er-text--muted",
|
|
4553
|
+
children: body
|
|
4554
|
+
})
|
|
4555
|
+
] })
|
|
4556
|
+
})
|
|
4557
|
+
});
|
|
4558
|
+
}
|
|
4559
|
+
//#endregion
|
|
4071
4560
|
//#region ../blocks/src/system/runtime/nodes/event-registration.client.tsx
|
|
4072
|
-
function toEventRegistrationClientProps(props) {
|
|
4561
|
+
function toEventRegistrationClientProps(props, display) {
|
|
4073
4562
|
return {
|
|
4074
4563
|
...props.render.hydration,
|
|
4075
|
-
buttonText:
|
|
4076
|
-
className:
|
|
4564
|
+
buttonText: display.summaryButtonText,
|
|
4565
|
+
className: display.className ?? void 0
|
|
4077
4566
|
};
|
|
4078
4567
|
}
|
|
4079
4568
|
const EventRegistrationClient = (clientProps) => {
|
|
@@ -4083,11 +4572,11 @@ const EventRegistrationClient = (clientProps) => {
|
|
|
4083
4572
|
occurrenceContext: clientProps.occurrenceContext,
|
|
4084
4573
|
subject: clientProps.subject
|
|
4085
4574
|
});
|
|
4086
|
-
if (surface.kind === "wholeSeries") return /* @__PURE__ */ jsx(
|
|
4575
|
+
if (surface.kind === "wholeSeries") return /* @__PURE__ */ jsx(WholeSeriesRegistrationErrorBoundary, {
|
|
4087
4576
|
className: clientProps.className,
|
|
4088
|
-
children: /* @__PURE__ */ jsx(
|
|
4577
|
+
children: /* @__PURE__ */ jsx(WholeSeriesRegistrationWizard, {
|
|
4089
4578
|
subject: clientProps.subject,
|
|
4090
|
-
|
|
4579
|
+
runs: [...surface.offerings],
|
|
4091
4580
|
showSessions: clientProps.showSessions,
|
|
4092
4581
|
showPrice: clientProps.showPrice,
|
|
4093
4582
|
showCapacity: clientProps.showCapacity,
|
|
@@ -4114,7 +4603,11 @@ const EventRegistrationClient = (clientProps) => {
|
|
|
4114
4603
|
return /* @__PURE__ */ jsx(EventRegistrationWizard, { ...clientProps });
|
|
4115
4604
|
};
|
|
4116
4605
|
const EventRegistrationIslandClient = (props) => {
|
|
4117
|
-
return /* @__PURE__ */ jsx(
|
|
4606
|
+
if (props.render.display.state === "registration-closed") return /* @__PURE__ */ jsx(RegistrationClosedState, {
|
|
4607
|
+
title: props.render.display.titleText,
|
|
4608
|
+
body: props.render.display.bodyText
|
|
4609
|
+
});
|
|
4610
|
+
return /* @__PURE__ */ jsx(EventRegistrationClient, { ...toEventRegistrationClientProps(props, props.render.display) });
|
|
4118
4611
|
};
|
|
4119
4612
|
//#endregion
|
|
4120
4613
|
//#region src/rendering/islands/enhancers/eventRegistration.tsx
|