@riverbankcms/sdk 0.134.0 → 0.135.1
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 +4 -3
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DfRhJPFQ.mjs → PreviewEditorSidebar-D4p_5TdY.mjs} +4 -4
- package/dist/{PreviewEditorUI-Dppxcr_g.mjs → PreviewEditorUI-D0cRoTX1.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D51gQaG3.mjs → PreviewQueryProvider-DcgaESkm.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-8CyGCXir.mjs → SdkPreviewModeRuntime-BKLtM3Nz.mjs} +5 -5
- package/dist/{SiteChromeCustomizeContext-DVMTMvqA.mjs → SiteChromeCustomizeContext-61X2m7QV.mjs} +4105 -8035
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +15 -15
- package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +25 -60
- package/dist/_dts/api/src/bookingOperations.d.ts +111 -161
- package/dist/_dts/api/src/bookingPaymentTermSchemas.d.ts +123 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +13 -13
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +4 -4
- package/dist/_dts/api/src/bookingSessionSummaryTypes.d.ts +34 -0
- package/dist/_dts/api/src/bookings.d.ts +5 -9
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +7 -7
- package/dist/_dts/api/src/communications.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +29 -109
- package/dist/_dts/api/src/eventManagementContracts.d.ts +1 -1
- package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +43 -0
- package/dist/_dts/api/src/index.d.ts +3 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/participantMessaging.d.ts +2 -2
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +32 -28
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +85 -5
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +1 -1
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +9 -100
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +7 -6
- package/dist/_dts/api/src/publicWholeSeriesEndpointDefinitions.d.ts +0 -32
- package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +1 -1
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/siteOperations.d.ts +2 -2
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/{courses.d.ts → wholeSeriesOfferings.d.ts} +43 -95
- package/dist/_dts/blocks/src/client.d.ts +0 -5
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +5 -94
- package/dist/_dts/blocks/src/portal/dateFormatting.d.ts +3 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +17 -20
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +147 -42
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +35 -10
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/scheduleSummary.d.ts +3 -3
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +9 -12
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +2 -44
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/core.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +99 -59
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/shop.d.ts +19 -16
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -247
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +13 -126
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/constants.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +1 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +7 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventScope.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +7 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +53 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +10 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +20 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +5 -56
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/waitlistClaimRestoration.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +6 -22
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DateTimeTile.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +16 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +6 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +1 -13
- package/dist/_dts/blocks/src/system/runtime/shared/components/LoggedInAsUser.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/MembershipHero.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/StateIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/checkoutUrls.d.ts +2 -2
- package/dist/_dts/commerce/src/index.d.ts +16 -0
- package/dist/_dts/commerce/src/money.d.ts +122 -0
- package/dist/_dts/commerce/src/moneyContracts.d.ts +178 -0
- package/dist/_dts/commerce/src/moneyDateUtils.d.ts +22 -0
- package/dist/_dts/commerce/src/moneyPayments.d.ts +59 -0
- package/dist/_dts/commerce/src/moneyPlanningTime.d.ts +4 -0
- package/dist/_dts/commerce/src/moneyReceiptReadModel.d.ts +68 -0
- package/dist/_dts/commerce/src/moneyReport.d.ts +105 -0
- package/dist/_dts/commerce/src/moneyReportBreakdowns.d.ts +3 -0
- package/dist/_dts/commerce/src/moneyReportKindFilter.d.ts +4 -0
- package/dist/_dts/commerce/src/moneyReportPage.d.ts +132 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +3 -3
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +6 -25
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +4 -4
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +11 -11
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +1 -1
- package/dist/_dts/commerce/src/purchase/types.d.ts +12 -8
- package/dist/_dts/commerce/src/shop/digitalFulfillment.d.ts +111 -0
- package/dist/_dts/commerce/src/shop/fulfillmentStatus.d.ts +10 -0
- package/dist/_dts/commerce/src/shop/inventoryRestore.d.ts +13 -0
- package/dist/_dts/commerce/src/shop/shippingAddress.d.ts +18 -0
- package/dist/_dts/commerce/src/types/json.d.ts +3 -0
- package/dist/_dts/commerce/src/utils/isPlainRecord.d.ts +1 -0
- package/dist/_dts/commerce/src/waitlists.d.ts +172 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +0 -30
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +2 -39
- package/dist/_dts/content-model/src/metadataConfig.d.ts +0 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -68
- package/dist/_dts/core/src/branded.d.ts +3 -3
- package/dist/_dts/core/src/event-pricing.d.ts +6 -6
- package/dist/_dts/core/src/participants.d.ts +17 -17
- package/dist/_dts/core/src/rectification.d.ts +1 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +890 -2154
- package/dist/_dts/sdk/src/bookings/index.d.ts +4 -5
- package/dist/_dts/sdk/src/bookings/types.d.ts +34 -4
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +4 -6
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +0 -2
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +1 -1
- package/dist/client/{usePolling-UN4WKnaM.mjs → BookingConsentAgreement-Bz9znbpn.mjs} +180 -4
- package/dist/client/{DiscountCodeDisclosure-CfuPOHD0.mjs → DiscountCodeDisclosure-35Ru8yB9.mjs} +13 -27
- package/dist/client/{EventCombined.client-DB8Qfzi-.mjs → EventCombined.client-BKB0ZxRR.mjs} +3 -3
- package/dist/client/{EventListing.client-DD4X8hp4.mjs → EventListing.client-Dx8I21ok.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-QhgIBQbv.mjs → LeafletStaticMap-CEWx-Bhe.mjs} +1 -1
- package/dist/client/{accordion-DFXpLvwg.mjs → accordion-KIDsKTwS.mjs} +1 -1
- package/dist/client/{bookingForm-sI05d3lk.mjs → bookingForm-D96Rmp-5.mjs} +6 -7
- package/dist/client/bookings.mjs +913 -1906
- package/dist/client/{carousel-wjyWTZCh.mjs → carousel-YwUgyL66.mjs} +1 -1
- package/dist/client/{cart-DCwdpA4i.mjs → cart-BbwuNrUT.mjs} +3 -3
- package/dist/client/{checkout-DTDW3l0R.mjs → checkout-hp1ucmEY.mjs} +3 -3
- package/dist/client/{checkoutUrls-DQYC_Br-.mjs → checkoutUrls-BuseL0dw.mjs} +4 -2
- package/dist/client/client.mjs +5109 -9333
- package/dist/client/{context-TSK1CGx8.mjs → context-DljQn8L5.mjs} +15 -69
- package/dist/client/{eventCalendar-B0Zg-i_w.mjs → eventCalendar-DU4iNLpo.mjs} +5 -5
- package/dist/client/{eventCombined-B8Y2wizd.mjs → eventCombined-CZuupW8m.mjs} +3 -3
- package/dist/client/{eventDetails-DPDOwURJ.mjs → eventDetails-DPQWwCIi.mjs} +8 -8
- package/dist/client/{eventListing-CjBcmSLn.mjs → eventListing-C7oMidwS.mjs} +3 -3
- package/dist/client/{eventRegistration-CK30HsAq.mjs → eventRegistration-zEiunlUs.mjs} +4522 -3690
- package/dist/client/{form-CUXfsABE.mjs → form-D2KIyCVJ.mjs} +2 -2
- package/dist/client/{headerSection-N-mN3rjr.mjs → headerSection-CK5uChUK.mjs} +2 -2
- package/dist/client/hooks.mjs +459 -714
- package/dist/client/{locationMap-oiIDQMBt.mjs → locationMap-DLQNH1ln.mjs} +2 -2
- package/dist/client/{newsletterForm-CkQ2tTrM.mjs → newsletterForm-ZuhIG7fZ.mjs} +2 -2
- package/dist/client/{productDetail-CnidyrsN.mjs → productDetail-7hIcGeae.mjs} +3 -3
- package/dist/client/{productList-CttYcS_S.mjs → productList-T4Cii1ot.mjs} +3 -3
- package/dist/client/{propsDecoder-CeUMxI9a.mjs → propsDecoder-mB0aC_Fi.mjs} +4702 -4458
- package/dist/client/rendering/client.mjs +59617 -62260
- package/dist/client/rendering/islands.mjs +17 -19
- package/dist/client/rendering.mjs +5389 -9707
- package/dist/client/{scrollToBlock-lPr1oqxB.mjs → scrollToBlock-Du5mHgvL.mjs} +2 -2
- package/dist/client/{shop-DXQtMo2O.mjs → shop-B5zAcKZn.mjs} +6 -6
- package/dist/client/{shop-commerce-quDL411J.mjs → shop-commerce-BKBZB6l5.mjs} +6 -6
- package/dist/client/{shop-commerce-store-Dnu-8Iub.mjs → shop-commerce-store-Cq4qlNtQ.mjs} +1 -1
- package/dist/client/{shopShared-BWPUURvG.mjs → shopShared-DYGzEs9D.mjs} +3 -3
- package/dist/client/{useEventFilters-DRhWp2_5.mjs → useEventFilters-Bphkda8m.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +40 -161
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +40 -161
- package/dist/preview-next/middleware.mjs +40 -161
- package/dist/{previewAuthStore-BFKd4LrN.mjs → previewAuthStore-C7ksxt5b.mjs} +40 -161
- package/dist/{sdk-runtime-Ca5RD78X.mjs → sdk-runtime-BbIC8G4J.mjs} +2 -2
- package/dist/{separator-CMhj6BTi.mjs → separator-CadhAtI7.mjs} +1 -1
- package/dist/server/components.mjs +558 -2962
- package/dist/server/config-validation.mjs +459 -714
- package/dist/server/config.mjs +459 -714
- package/dist/server/data.mjs +459 -714
- package/dist/server/index.mjs +41 -162
- package/dist/server/next.mjs +572 -2976
- package/dist/server/page-converter.mjs +360 -582
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +569 -2879
- package/dist/server/rendering.mjs +558 -2962
- package/dist/server/routing.mjs +603 -1087
- package/dist/server/server.mjs +473 -728
- package/dist/server/theme-bridge.mjs +41 -1524
- package/dist/styles/index.css +41 -1348
- package/package.json +1 -1
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +0 -99
- package/dist/_dts/blocks/src/client/course-registration.d.ts +0 -5
- package/dist/_dts/blocks/src/system/blocks/course-details.d.ts +0 -134
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +0 -130
- 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 +0 -2
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +0 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +0 -135
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +0 -28
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/logic.d.ts +0 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/runs.d.ts +0 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/view.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details.server.d.ts +0 -20
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +0 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +0 -181
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.server.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/CoursePricingDisplay.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/BookingModeStep.d.ts +0 -32
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/CheckIcon.d.ts +0 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/ErrorStep.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/MembershipHero.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/PaymentFailedStep.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/PortalAuthSidebar.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/SuccessStep.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/VerifyingTimeoutStep.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WaitlistStep.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts +0 -25
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +0 -46
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/index.d.ts +0 -18
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +0 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/types.d.ts +0 -105
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesEligibility.d.ts +0 -24
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +0 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts +0 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +0 -185
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/utils.d.ts +0 -43
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/whole-series-registration.headless.contract.d.ts +0 -325
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/whole-series-registration.headless.planning.d.ts +0 -27
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts +0 -21
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wizardSteps.d.ts +0 -30
- package/dist/_dts/sdk/src/rendering/islands/enhancers/courseRegistration.d.ts +0 -3
- package/dist/_dts/theme-core/src/blocks/vars/course-details.d.ts +0 -16
- package/dist/_dts/theme-core/src/blocks/vars/course-registration.d.ts +0 -21
- package/dist/client/BookingConsentAgreement-BxgpGEFD.mjs +0 -160
- package/dist/client/WholeSeriesRegistrationWizard-DwtC7bCs.mjs +0 -2546
- package/dist/client/courseRegistration-A-Tg7qw_.mjs +0 -52
- package/dist/client/pricing-Caa0QWzh.mjs +0 -195
package/dist/server/server.mjs
CHANGED
|
@@ -804,69 +804,8 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
804
804
|
}
|
|
805
805
|
});
|
|
806
806
|
//#endregion
|
|
807
|
-
//#region ../api/src/
|
|
808
|
-
const
|
|
809
|
-
listCourses: {
|
|
810
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
811
|
-
method: "GET",
|
|
812
|
-
auth: "user",
|
|
813
|
-
responseKind: "json"
|
|
814
|
-
},
|
|
815
|
-
exportCoursesCsv: {
|
|
816
|
-
path: "/sites/{siteId}/bookings/courses/export.csv",
|
|
817
|
-
method: "GET",
|
|
818
|
-
tags: [
|
|
819
|
-
"site-{siteId}",
|
|
820
|
-
"bookings",
|
|
821
|
-
"courses-{siteId}"
|
|
822
|
-
],
|
|
823
|
-
errors: [],
|
|
824
|
-
auth: "user",
|
|
825
|
-
responseKind: "blob"
|
|
826
|
-
},
|
|
827
|
-
createCourse: {
|
|
828
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
829
|
-
method: "POST",
|
|
830
|
-
auth: "user",
|
|
831
|
-
responseKind: "json",
|
|
832
|
-
errors: [
|
|
833
|
-
"validation:invalid_input",
|
|
834
|
-
"resource:not_found",
|
|
835
|
-
"resource:already_exists",
|
|
836
|
-
"resource:conflict",
|
|
837
|
-
"server:internal_error"
|
|
838
|
-
]
|
|
839
|
-
},
|
|
840
|
-
getCourse: {
|
|
841
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
842
|
-
method: "GET",
|
|
843
|
-
auth: "user",
|
|
844
|
-
responseKind: "json"
|
|
845
|
-
},
|
|
846
|
-
updateCourse: {
|
|
847
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
848
|
-
method: "PATCH",
|
|
849
|
-
auth: "user",
|
|
850
|
-
responseKind: "json",
|
|
851
|
-
errors: [
|
|
852
|
-
"validation:invalid_input",
|
|
853
|
-
"resource:not_found",
|
|
854
|
-
"resource:conflict",
|
|
855
|
-
"server:internal_error"
|
|
856
|
-
]
|
|
857
|
-
},
|
|
858
|
-
deleteCourse: {
|
|
859
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
860
|
-
method: "DELETE",
|
|
861
|
-
auth: "user",
|
|
862
|
-
responseKind: "json",
|
|
863
|
-
errors: [
|
|
864
|
-
"validation:invalid_input",
|
|
865
|
-
"resource:not_found",
|
|
866
|
-
"resource:conflict",
|
|
867
|
-
"server:internal_error"
|
|
868
|
-
]
|
|
869
|
-
},
|
|
807
|
+
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
808
|
+
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
870
809
|
deleteEventOffering: {
|
|
871
810
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
872
811
|
method: "DELETE",
|
|
@@ -879,20 +818,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
879
818
|
"server:internal_error"
|
|
880
819
|
]
|
|
881
820
|
},
|
|
882
|
-
|
|
883
|
-
path: "/sites/{siteId}/bookings/
|
|
884
|
-
method: "POST",
|
|
885
|
-
auth: "user",
|
|
886
|
-
responseKind: "json",
|
|
887
|
-
errors: [
|
|
888
|
-
"validation:invalid_input",
|
|
889
|
-
"resource:not_found",
|
|
890
|
-
"resource:already_exists",
|
|
891
|
-
"server:internal_error"
|
|
892
|
-
]
|
|
893
|
-
},
|
|
894
|
-
changeCourseContentOwnership: {
|
|
895
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/content-ownership",
|
|
821
|
+
changeEventSeriesContentOwnership: {
|
|
822
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/content-ownership",
|
|
896
823
|
method: "POST",
|
|
897
824
|
auth: "user",
|
|
898
825
|
responseKind: "json",
|
|
@@ -903,8 +830,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
903
830
|
"server:internal_error"
|
|
904
831
|
]
|
|
905
832
|
},
|
|
906
|
-
|
|
907
|
-
path: "/sites/{siteId}/bookings/
|
|
833
|
+
addEventSeriesRegistration: {
|
|
834
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
908
835
|
method: "POST",
|
|
909
836
|
auth: "user",
|
|
910
837
|
responseKind: "json",
|
|
@@ -915,33 +842,21 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
915
842
|
"server:internal_error"
|
|
916
843
|
]
|
|
917
844
|
},
|
|
918
|
-
|
|
919
|
-
path: "/sites/{siteId}/bookings/
|
|
845
|
+
listEventSeriesRegistrations: {
|
|
846
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
920
847
|
method: "GET",
|
|
921
848
|
auth: "user",
|
|
922
849
|
responseKind: "json"
|
|
923
850
|
},
|
|
924
|
-
|
|
925
|
-
path: "/sites/{siteId}/bookings/
|
|
851
|
+
exportEventSeriesRegistrationsCsv: {
|
|
852
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/export.csv",
|
|
926
853
|
method: "GET",
|
|
927
854
|
auth: "user",
|
|
928
855
|
errors: [],
|
|
929
856
|
responseKind: "blob"
|
|
930
857
|
},
|
|
931
|
-
|
|
932
|
-
path: "/sites/{siteId}/bookings/
|
|
933
|
-
method: "GET",
|
|
934
|
-
tags: [
|
|
935
|
-
"site-{siteId}",
|
|
936
|
-
"bookings",
|
|
937
|
-
"courses-{courseId}"
|
|
938
|
-
],
|
|
939
|
-
auth: "user",
|
|
940
|
-
responseKind: "blob",
|
|
941
|
-
errors: []
|
|
942
|
-
},
|
|
943
|
-
updateCourseEnrollment: {
|
|
944
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/enrollments/{enrollmentId}",
|
|
858
|
+
updateEventSeriesRegistration: {
|
|
859
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
945
860
|
method: "PATCH",
|
|
946
861
|
auth: "user",
|
|
947
862
|
responseKind: "json",
|
|
@@ -1329,71 +1244,35 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1329
1244
|
errors: ["resource:not_found", "server:internal_error"],
|
|
1330
1245
|
auth: "public",
|
|
1331
1246
|
responseKind: "json"
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
"auth:forbidden",
|
|
1340
|
-
"validation:invalid_input",
|
|
1341
|
-
"resource:not_found",
|
|
1342
|
-
"resource:conflict",
|
|
1343
|
-
"resource:already_exists",
|
|
1344
|
-
"server:internal_error"
|
|
1345
|
-
],
|
|
1346
|
-
auth: "public",
|
|
1347
|
-
responseKind: "json"
|
|
1348
|
-
},
|
|
1349
|
-
checkWholeSeriesEligibility: {
|
|
1350
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/check-eligibility",
|
|
1351
|
-
method: "POST",
|
|
1352
|
-
tags: [TAG_TEMPLATES.publicWholeSeriesOfferings, "course-enrollment"],
|
|
1353
|
-
errors: [
|
|
1354
|
-
"auth:unauthenticated",
|
|
1355
|
-
"resource:not_found",
|
|
1356
|
-
"resource:conflict",
|
|
1357
|
-
"server:internal_error"
|
|
1358
|
-
],
|
|
1359
|
-
auth: "public",
|
|
1360
|
-
responseKind: "json"
|
|
1361
|
-
},
|
|
1362
|
-
createWholeSeriesCheckout: {
|
|
1363
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
1247
|
+
}
|
|
1248
|
+
});
|
|
1249
|
+
//#endregion
|
|
1250
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1251
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1252
|
+
getPublicEventRegistrationOptions: {
|
|
1253
|
+
path: "/public/sites/{siteId}/events/registration-options",
|
|
1364
1254
|
method: "POST",
|
|
1365
|
-
tags: [TAG_TEMPLATES.
|
|
1255
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration-options"],
|
|
1366
1256
|
auth: "public",
|
|
1367
1257
|
responseKind: "json",
|
|
1368
1258
|
errors: [
|
|
1369
|
-
"auth:unauthenticated",
|
|
1370
1259
|
"validation:invalid_input",
|
|
1371
1260
|
"resource:not_found",
|
|
1372
1261
|
"resource:conflict",
|
|
1373
1262
|
"server:internal_error"
|
|
1374
1263
|
]
|
|
1375
1264
|
},
|
|
1376
|
-
|
|
1377
|
-
path: "/public/sites/{siteId}/
|
|
1265
|
+
resolveEventSubroute: {
|
|
1266
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1378
1267
|
method: "GET",
|
|
1379
|
-
|
|
1380
|
-
|
|
1268
|
+
revalidate: 60,
|
|
1269
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1381
1270
|
auth: "public",
|
|
1382
|
-
responseKind: "json"
|
|
1271
|
+
responseKind: "json",
|
|
1272
|
+
errors: []
|
|
1383
1273
|
}
|
|
1384
1274
|
});
|
|
1385
1275
|
//#endregion
|
|
1386
|
-
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1387
|
-
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1388
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1389
|
-
method: "GET",
|
|
1390
|
-
revalidate: 60,
|
|
1391
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1392
|
-
auth: "public",
|
|
1393
|
-
responseKind: "json",
|
|
1394
|
-
errors: []
|
|
1395
|
-
} });
|
|
1396
|
-
//#endregion
|
|
1397
1276
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1398
1277
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1399
1278
|
listSiteApiKeys: {
|
|
@@ -2290,7 +2169,7 @@ const API_ENDPOINTS$1 = {
|
|
|
2290
2169
|
},
|
|
2291
2170
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
2292
2171
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
2293
|
-
...
|
|
2172
|
+
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS,
|
|
2294
2173
|
getSite: {
|
|
2295
2174
|
path: "/sites",
|
|
2296
2175
|
method: "GET",
|
|
@@ -5604,13 +5483,13 @@ const API_ENDPOINTS$1 = {
|
|
|
5604
5483
|
"server:internal_error"
|
|
5605
5484
|
]
|
|
5606
5485
|
},
|
|
5607
|
-
|
|
5608
|
-
path: "/sites/{siteId}/bookings/
|
|
5486
|
+
refundEventSeriesRegistration: {
|
|
5487
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/refund",
|
|
5609
5488
|
method: "POST",
|
|
5610
5489
|
tags: [
|
|
5611
5490
|
"site-{siteId}",
|
|
5612
|
-
"
|
|
5613
|
-
"
|
|
5491
|
+
"event-series-{seriesId}",
|
|
5492
|
+
"event-series-registration-{registrationId}",
|
|
5614
5493
|
"bookings"
|
|
5615
5494
|
],
|
|
5616
5495
|
auth: "user",
|
|
@@ -5633,13 +5512,13 @@ const API_ENDPOINTS$1 = {
|
|
|
5633
5512
|
auth: "user",
|
|
5634
5513
|
responseKind: "json"
|
|
5635
5514
|
},
|
|
5636
|
-
|
|
5637
|
-
path: "/sites/{siteId}/bookings/
|
|
5515
|
+
listEventSeriesRegistrationRefunds: {
|
|
5516
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/refunds",
|
|
5638
5517
|
method: "GET",
|
|
5639
5518
|
tags: [
|
|
5640
5519
|
"site-{siteId}",
|
|
5641
|
-
"
|
|
5642
|
-
"
|
|
5520
|
+
"event-series-{seriesId}",
|
|
5521
|
+
"event-series-registration-{registrationId}",
|
|
5643
5522
|
"bookings"
|
|
5644
5523
|
],
|
|
5645
5524
|
auth: "user",
|
|
@@ -7328,14 +7207,14 @@ const API_ENDPOINTS$1 = {
|
|
|
7328
7207
|
errors: ["server:internal_error"]
|
|
7329
7208
|
},
|
|
7330
7209
|
portalGetWholeSeriesBookingQuestions: {
|
|
7331
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7210
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions",
|
|
7332
7211
|
method: "GET",
|
|
7333
7212
|
auth: "public",
|
|
7334
7213
|
responseKind: "json",
|
|
7335
7214
|
errors: ["resource:not_found", "server:internal_error"]
|
|
7336
7215
|
},
|
|
7337
7216
|
portalUpdateWholeSeriesBookingQuestions: {
|
|
7338
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7217
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions",
|
|
7339
7218
|
method: "PUT",
|
|
7340
7219
|
auth: "public",
|
|
7341
7220
|
responseKind: "json",
|
|
@@ -7346,7 +7225,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7346
7225
|
]
|
|
7347
7226
|
},
|
|
7348
7227
|
portalCreateWholeSeriesBookingQuestionsUploadUrl: {
|
|
7349
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7228
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions/upload-url",
|
|
7350
7229
|
method: "POST",
|
|
7351
7230
|
auth: "public",
|
|
7352
7231
|
responseKind: "json",
|
|
@@ -7357,7 +7236,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7357
7236
|
]
|
|
7358
7237
|
},
|
|
7359
7238
|
portalFinalizeWholeSeriesBookingQuestionsUpload: {
|
|
7360
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7239
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/booking-questions/upload",
|
|
7361
7240
|
method: "POST",
|
|
7362
7241
|
auth: "public",
|
|
7363
7242
|
responseKind: "json",
|
|
@@ -7368,7 +7247,7 @@ const API_ENDPOINTS$1 = {
|
|
|
7368
7247
|
]
|
|
7369
7248
|
},
|
|
7370
7249
|
portalCancelWholeSeriesRegistration: {
|
|
7371
|
-
path: "/portal/dated-offerings/whole-series/{
|
|
7250
|
+
path: "/portal/dated-offerings/whole-series/{registrationId}/cancel",
|
|
7372
7251
|
method: "POST",
|
|
7373
7252
|
auth: "public",
|
|
7374
7253
|
responseKind: "json",
|
|
@@ -8196,7 +8075,7 @@ var SimpleCache = class {
|
|
|
8196
8075
|
* 1. This constant
|
|
8197
8076
|
* 2. The "version" field in package.json
|
|
8198
8077
|
*/
|
|
8199
|
-
const SDK_VERSION = "0.
|
|
8078
|
+
const SDK_VERSION = "0.135.1";
|
|
8200
8079
|
//#endregion
|
|
8201
8080
|
//#region src/client/error.ts
|
|
8202
8081
|
let _Symbol$for;
|
|
@@ -10795,14 +10674,14 @@ function publicEventPricingType(pricing) {
|
|
|
10795
10674
|
case "single_paid":
|
|
10796
10675
|
case "ticket_types":
|
|
10797
10676
|
case "sliding_scale":
|
|
10798
|
-
case "
|
|
10677
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
10799
10678
|
case "external": return "external";
|
|
10800
10679
|
}
|
|
10801
10680
|
}
|
|
10802
10681
|
function isFreePublicEventPriceDisplay(display) {
|
|
10803
10682
|
switch (display.kind) {
|
|
10804
10683
|
case "free": return true;
|
|
10805
|
-
case "
|
|
10684
|
+
case "whole_series": return display.display.kind === "free";
|
|
10806
10685
|
case "exact":
|
|
10807
10686
|
case "from":
|
|
10808
10687
|
case "range":
|
|
@@ -11091,6 +10970,25 @@ function parseManagementKey(raw) {
|
|
|
11091
10970
|
return ok$1(createSecretInternal("management-key", raw));
|
|
11092
10971
|
}
|
|
11093
10972
|
//#endregion
|
|
10973
|
+
//#region ../core/src/planner.ts
|
|
10974
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
10975
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
10976
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
10977
|
+
function resolvePlanningNowDate(input = {}) {
|
|
10978
|
+
if (input.now !== void 0) return input.now;
|
|
10979
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
10980
|
+
}
|
|
10981
|
+
/**
|
|
10982
|
+
* Resolve a Date-compatible planner input.
|
|
10983
|
+
*
|
|
10984
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
10985
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
10986
|
+
*/
|
|
10987
|
+
function resolvePlanningDateInput(input = {}) {
|
|
10988
|
+
if (input instanceof Date) return input;
|
|
10989
|
+
return resolvePlanningNowDate(input);
|
|
10990
|
+
}
|
|
10991
|
+
//#endregion
|
|
11094
10992
|
//#region ../core/src/event-series-behaviour.ts
|
|
11095
10993
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
11096
10994
|
"class",
|
|
@@ -19550,7 +19448,7 @@ defineBlockAppearancePreset({
|
|
|
19550
19448
|
id: "schedule-details-brand-depth",
|
|
19551
19449
|
target: "events",
|
|
19552
19450
|
label: "Brand-depth schedule details",
|
|
19553
|
-
blockKinds: ["block.event-details"
|
|
19451
|
+
blockKinds: ["block.event-details"],
|
|
19554
19452
|
design: {
|
|
19555
19453
|
sectionSurface: "brand-depth-band",
|
|
19556
19454
|
contentFrame: plainFrame,
|
|
@@ -25732,7 +25630,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
25732
25630
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
25733
25631
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
25734
25632
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
25735
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
25736
25633
|
function bind(from, options) {
|
|
25737
25634
|
return (node) => ({
|
|
25738
25635
|
...node,
|
|
@@ -35402,12 +35299,12 @@ function isRichTextDoc(value) {
|
|
|
35402
35299
|
}
|
|
35403
35300
|
//#endregion
|
|
35404
35301
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
35405
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
35406
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
35302
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
35303
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
35407
35304
|
z.object({
|
|
35408
35305
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
35409
35306
|
depositAmountCents: z.number().int().min(0),
|
|
35410
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
35307
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
35411
35308
|
remainderDueCount: z.number().int().positive(),
|
|
35412
35309
|
intervalUnit: z.enum([
|
|
35413
35310
|
"day",
|
|
@@ -35418,7 +35315,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
35418
35315
|
z.object({
|
|
35419
35316
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
35420
35317
|
depositAmountCents: z.number().int().min(0),
|
|
35421
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
35318
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
35422
35319
|
instalmentCount: z.number().int().positive(),
|
|
35423
35320
|
intervalCount: z.number().int().positive(),
|
|
35424
35321
|
intervalUnit: z.enum([
|
|
@@ -35438,28 +35335,28 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
35438
35335
|
])
|
|
35439
35336
|
})
|
|
35440
35337
|
]);
|
|
35441
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
35338
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
35442
35339
|
kind: z.literal("relative_to_start_date"),
|
|
35443
35340
|
daysBeforeStart: z.number().int().positive()
|
|
35444
35341
|
}), z.object({
|
|
35445
35342
|
kind: z.literal("fixed_calendar_date"),
|
|
35446
35343
|
dueAt: z.string().datetime()
|
|
35447
35344
|
})]);
|
|
35448
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
35345
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
35449
35346
|
upfrontAmountCents: z.number().int().min(0),
|
|
35450
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
35451
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
35347
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
35348
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
35452
35349
|
});
|
|
35453
35350
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
35454
35351
|
z.object({ kind: z.literal("upfront") }),
|
|
35455
35352
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
35456
35353
|
z.object({
|
|
35457
35354
|
kind: z.literal("instalment_plan"),
|
|
35458
|
-
plan: bookingInstalmentPlanSchema
|
|
35355
|
+
plan: bookingInstalmentPlanSchema$1
|
|
35459
35356
|
}),
|
|
35460
35357
|
z.object({
|
|
35461
35358
|
kind: z.literal("flexible_balance"),
|
|
35462
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
35359
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
35463
35360
|
})
|
|
35464
35361
|
]);
|
|
35465
35362
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
@@ -35481,6 +35378,164 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
35481
35378
|
});
|
|
35482
35379
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
35483
35380
|
//#endregion
|
|
35381
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
35382
|
+
function isSaleWindowOpen(option, now) {
|
|
35383
|
+
if (!option.isActive) return false;
|
|
35384
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
35385
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
35386
|
+
return true;
|
|
35387
|
+
}
|
|
35388
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
35389
|
+
if (amount <= 0) return {
|
|
35390
|
+
kind: "free",
|
|
35391
|
+
currency
|
|
35392
|
+
};
|
|
35393
|
+
return {
|
|
35394
|
+
kind: "exact",
|
|
35395
|
+
amount,
|
|
35396
|
+
currency
|
|
35397
|
+
};
|
|
35398
|
+
}
|
|
35399
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
35400
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
35401
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
35402
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
35403
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
35404
|
+
return left.name.localeCompare(right.name);
|
|
35405
|
+
});
|
|
35406
|
+
}
|
|
35407
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
35408
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
35409
|
+
const currency = offering.pricing.currency;
|
|
35410
|
+
switch (offering.pricing.pricingStrategy) {
|
|
35411
|
+
case "free": return resolveFreePricing(currency);
|
|
35412
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
35413
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
35414
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
35415
|
+
}
|
|
35416
|
+
}
|
|
35417
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
35418
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
35419
|
+
selectedSlidingAmount: null,
|
|
35420
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
35421
|
+
} : {
|
|
35422
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
35423
|
+
nowInput
|
|
35424
|
+
};
|
|
35425
|
+
}
|
|
35426
|
+
function resolveFreePricing(currency) {
|
|
35427
|
+
return {
|
|
35428
|
+
currency,
|
|
35429
|
+
display: {
|
|
35430
|
+
kind: "free",
|
|
35431
|
+
currency
|
|
35432
|
+
},
|
|
35433
|
+
selectableOptions: [],
|
|
35434
|
+
requiresSelection: false,
|
|
35435
|
+
selectedOption: null,
|
|
35436
|
+
slidingScale: null,
|
|
35437
|
+
selectedSlidingAmount: null,
|
|
35438
|
+
selectedPriceAmount: 0,
|
|
35439
|
+
selectedRequiresPayment: false,
|
|
35440
|
+
hasPaidSelection: false,
|
|
35441
|
+
hasFreeSelection: true
|
|
35442
|
+
};
|
|
35443
|
+
}
|
|
35444
|
+
function resolveSinglePricing(amount, currency) {
|
|
35445
|
+
return {
|
|
35446
|
+
currency,
|
|
35447
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
35448
|
+
selectableOptions: [],
|
|
35449
|
+
requiresSelection: false,
|
|
35450
|
+
selectedOption: null,
|
|
35451
|
+
slidingScale: null,
|
|
35452
|
+
selectedSlidingAmount: null,
|
|
35453
|
+
selectedPriceAmount: amount,
|
|
35454
|
+
selectedRequiresPayment: amount > 0,
|
|
35455
|
+
hasPaidSelection: amount > 0,
|
|
35456
|
+
hasFreeSelection: amount <= 0
|
|
35457
|
+
};
|
|
35458
|
+
}
|
|
35459
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
35460
|
+
const currency = offering.pricing.currency;
|
|
35461
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
35462
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
35463
|
+
return {
|
|
35464
|
+
currency,
|
|
35465
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
35466
|
+
selectableOptions,
|
|
35467
|
+
requiresSelection: selectableOptions.length > 1,
|
|
35468
|
+
selectedOption,
|
|
35469
|
+
slidingScale: null,
|
|
35470
|
+
selectedSlidingAmount: null,
|
|
35471
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
35472
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
35473
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
35474
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
35475
|
+
};
|
|
35476
|
+
}
|
|
35477
|
+
function resolveSelectedTier(options, selectedId) {
|
|
35478
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
35479
|
+
}
|
|
35480
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
35481
|
+
if (lowestAmount === null) return {
|
|
35482
|
+
kind: "unavailable",
|
|
35483
|
+
currency
|
|
35484
|
+
};
|
|
35485
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
35486
|
+
kind: "from",
|
|
35487
|
+
amount: lowestAmount,
|
|
35488
|
+
currency
|
|
35489
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
35490
|
+
}
|
|
35491
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
35492
|
+
const currency = offering.pricing.currency;
|
|
35493
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
35494
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
35495
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
35496
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
35497
|
+
return {
|
|
35498
|
+
currency,
|
|
35499
|
+
display: {
|
|
35500
|
+
kind: "range",
|
|
35501
|
+
minAmount,
|
|
35502
|
+
maxAmount,
|
|
35503
|
+
currency
|
|
35504
|
+
},
|
|
35505
|
+
selectableOptions: [],
|
|
35506
|
+
requiresSelection: selectedAmount === null,
|
|
35507
|
+
selectedOption: null,
|
|
35508
|
+
slidingScale: {
|
|
35509
|
+
minAmount,
|
|
35510
|
+
maxAmount,
|
|
35511
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
35512
|
+
},
|
|
35513
|
+
selectedSlidingAmount: selectedAmount,
|
|
35514
|
+
selectedPriceAmount: selectedAmount,
|
|
35515
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
35516
|
+
hasPaidSelection: maxAmount > 0,
|
|
35517
|
+
hasFreeSelection: minAmount === 0
|
|
35518
|
+
};
|
|
35519
|
+
}
|
|
35520
|
+
function unavailableSlidingScale(currency) {
|
|
35521
|
+
return {
|
|
35522
|
+
currency,
|
|
35523
|
+
display: {
|
|
35524
|
+
kind: "unavailable",
|
|
35525
|
+
currency
|
|
35526
|
+
},
|
|
35527
|
+
selectableOptions: [],
|
|
35528
|
+
requiresSelection: true,
|
|
35529
|
+
selectedOption: null,
|
|
35530
|
+
slidingScale: null,
|
|
35531
|
+
selectedSlidingAmount: null,
|
|
35532
|
+
selectedPriceAmount: null,
|
|
35533
|
+
selectedRequiresPayment: false,
|
|
35534
|
+
hasPaidSelection: false,
|
|
35535
|
+
hasFreeSelection: false
|
|
35536
|
+
};
|
|
35537
|
+
}
|
|
35538
|
+
//#endregion
|
|
35484
35539
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
35485
35540
|
const wholeSeriesVenueSchema = z.object({
|
|
35486
35541
|
id: z.string(),
|
|
@@ -35540,6 +35595,13 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
35540
35595
|
title: z.string(),
|
|
35541
35596
|
slug: z.string(),
|
|
35542
35597
|
description: z.unknown().nullable(),
|
|
35598
|
+
deliveryMode: z.enum([
|
|
35599
|
+
"in_person",
|
|
35600
|
+
"online",
|
|
35601
|
+
"hybrid"
|
|
35602
|
+
]),
|
|
35603
|
+
waitlistEnabled: z.boolean(),
|
|
35604
|
+
requireGuestDetails: z.boolean(),
|
|
35543
35605
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
35544
35606
|
enrollmentOpen: z.boolean(),
|
|
35545
35607
|
pricing: wholeSeriesPricingSchema,
|
|
@@ -35655,10 +35717,11 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
35655
35717
|
paidToAmount: z.number(),
|
|
35656
35718
|
currency: z.string()
|
|
35657
35719
|
});
|
|
35658
|
-
const
|
|
35720
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
35659
35721
|
freePriceDisplaySchema,
|
|
35660
35722
|
exactPriceDisplaySchema,
|
|
35661
35723
|
fromPriceDisplaySchema,
|
|
35724
|
+
rangePriceDisplaySchema,
|
|
35662
35725
|
unavailablePriceDisplaySchema
|
|
35663
35726
|
]);
|
|
35664
35727
|
z.discriminatedUnion("kind", [
|
|
@@ -35673,8 +35736,8 @@ z.discriminatedUnion("kind", [
|
|
|
35673
35736
|
label: z.string()
|
|
35674
35737
|
}),
|
|
35675
35738
|
z.object({
|
|
35676
|
-
kind: z.literal("
|
|
35677
|
-
display:
|
|
35739
|
+
kind: z.literal("whole_series"),
|
|
35740
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
35678
35741
|
})
|
|
35679
35742
|
]);
|
|
35680
35743
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -35776,10 +35839,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
35776
35839
|
})
|
|
35777
35840
|
}),
|
|
35778
35841
|
z.object({
|
|
35779
|
-
kind: z.literal("
|
|
35842
|
+
kind: z.literal("whole_series"),
|
|
35780
35843
|
display: z.object({
|
|
35781
|
-
kind: z.literal("
|
|
35782
|
-
display:
|
|
35844
|
+
kind: z.literal("whole_series"),
|
|
35845
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
35783
35846
|
})
|
|
35784
35847
|
}),
|
|
35785
35848
|
z.object({
|
|
@@ -36196,7 +36259,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
36196
36259
|
};
|
|
36197
36260
|
return { kind: "unscoped" };
|
|
36198
36261
|
}
|
|
36199
|
-
function
|
|
36262
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
36263
|
+
const scope = resolveEventRegistrationScope(context);
|
|
36200
36264
|
switch (scope.kind) {
|
|
36201
36265
|
case "occurrenceSeries":
|
|
36202
36266
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -36208,9 +36272,6 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
36208
36272
|
case "unscoped": return [...events];
|
|
36209
36273
|
}
|
|
36210
36274
|
}
|
|
36211
|
-
function resolveEventRegistrationScopedEvents(events, context) {
|
|
36212
|
-
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
36213
|
-
}
|
|
36214
36275
|
//#endregion
|
|
36215
36276
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
36216
36277
|
function planEventRegistrationScope(input) {
|
|
@@ -36304,14 +36365,14 @@ function isRecord$9(value) {
|
|
|
36304
36365
|
}
|
|
36305
36366
|
function isPublicEventPricing(value) {
|
|
36306
36367
|
if (!isRecord$9(value) || typeof value.kind !== "string") return false;
|
|
36307
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
36368
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "whole_series" || value.kind === "external";
|
|
36308
36369
|
}
|
|
36309
36370
|
function isPublicEventTicketType(value) {
|
|
36310
36371
|
return isRecord$9(value) && typeof value.id === "string";
|
|
36311
36372
|
}
|
|
36312
36373
|
function readTicketTypePriceDisplay(value, currency) {
|
|
36313
36374
|
const display = readLegacyPriceDisplay(value, currency);
|
|
36314
|
-
return display.kind === "
|
|
36375
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
36315
36376
|
kind: "unavailable",
|
|
36316
36377
|
currency
|
|
36317
36378
|
} : display;
|
|
@@ -36369,11 +36430,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
36369
36430
|
kind: "unavailable",
|
|
36370
36431
|
currency: displayCurrency
|
|
36371
36432
|
};
|
|
36372
|
-
case "
|
|
36373
|
-
kind: "
|
|
36433
|
+
case "whole_series": return isRecord$9(value.display) ? {
|
|
36434
|
+
kind: "whole_series",
|
|
36374
36435
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
36375
36436
|
} : {
|
|
36376
|
-
kind: "
|
|
36437
|
+
kind: "whole_series",
|
|
36377
36438
|
display: {
|
|
36378
36439
|
kind: "unavailable",
|
|
36379
36440
|
currency: displayCurrency
|
|
@@ -36499,7 +36560,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
36499
36560
|
//#endregion
|
|
36500
36561
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
36501
36562
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
36502
|
-
return event.
|
|
36563
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
36503
36564
|
}
|
|
36504
36565
|
function findPreSelectedEvent(input) {
|
|
36505
36566
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -36525,12 +36586,127 @@ function toRegistrationEvent(event) {
|
|
|
36525
36586
|
return {
|
|
36526
36587
|
...event,
|
|
36527
36588
|
pricing: resolveRuntimeEventPricing(event),
|
|
36528
|
-
|
|
36529
|
-
|
|
36589
|
+
selectionId: event.id,
|
|
36590
|
+
registrationSubject: {
|
|
36591
|
+
kind: "occurrence",
|
|
36592
|
+
occurrenceId: event.occurrenceId
|
|
36593
|
+
}
|
|
36530
36594
|
};
|
|
36531
36595
|
}
|
|
36532
36596
|
function toRegistrationEvents(events) {
|
|
36533
|
-
return events.map(toRegistrationEvent);
|
|
36597
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
36598
|
+
}
|
|
36599
|
+
function toWholeSeriesTicketType(option) {
|
|
36600
|
+
return {
|
|
36601
|
+
...option,
|
|
36602
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
36603
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
36604
|
+
availability: {
|
|
36605
|
+
kind: "available",
|
|
36606
|
+
remainingCapacity: option.capacityLimit
|
|
36607
|
+
}
|
|
36608
|
+
};
|
|
36609
|
+
}
|
|
36610
|
+
function toWholeSeriesPricing(offering) {
|
|
36611
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
36612
|
+
switch (offering.pricing.pricingStrategy) {
|
|
36613
|
+
case "free": return {
|
|
36614
|
+
kind: "free_registration",
|
|
36615
|
+
currency: offering.currency,
|
|
36616
|
+
display: {
|
|
36617
|
+
kind: "free",
|
|
36618
|
+
currency: offering.currency
|
|
36619
|
+
}
|
|
36620
|
+
};
|
|
36621
|
+
case "single": {
|
|
36622
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
36623
|
+
return amount === 0 ? {
|
|
36624
|
+
kind: "free_registration",
|
|
36625
|
+
currency: offering.currency,
|
|
36626
|
+
display: {
|
|
36627
|
+
kind: "free",
|
|
36628
|
+
currency: offering.currency
|
|
36629
|
+
}
|
|
36630
|
+
} : {
|
|
36631
|
+
kind: "single_paid",
|
|
36632
|
+
amount,
|
|
36633
|
+
currency: offering.currency,
|
|
36634
|
+
display: {
|
|
36635
|
+
kind: "exact",
|
|
36636
|
+
amount,
|
|
36637
|
+
currency: offering.currency
|
|
36638
|
+
}
|
|
36639
|
+
};
|
|
36640
|
+
}
|
|
36641
|
+
case "tiered": return {
|
|
36642
|
+
kind: "ticket_types",
|
|
36643
|
+
currency: offering.currency,
|
|
36644
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
36645
|
+
display: resolved.display
|
|
36646
|
+
};
|
|
36647
|
+
case "sliding_scale": return {
|
|
36648
|
+
kind: "sliding_scale",
|
|
36649
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
36650
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
36651
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
36652
|
+
currency: offering.currency,
|
|
36653
|
+
display: {
|
|
36654
|
+
kind: "range",
|
|
36655
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
36656
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
36657
|
+
currency: offering.currency
|
|
36658
|
+
}
|
|
36659
|
+
};
|
|
36660
|
+
}
|
|
36661
|
+
}
|
|
36662
|
+
function toAttendanceModes(offering) {
|
|
36663
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
36664
|
+
mode,
|
|
36665
|
+
capacity: offering.enrollmentCapacity,
|
|
36666
|
+
registeredCount: offering.enrolledCount,
|
|
36667
|
+
availableSpots: offering.availableSpots,
|
|
36668
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
36669
|
+
}));
|
|
36670
|
+
}
|
|
36671
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
36672
|
+
const firstSession = offering.sessions[0];
|
|
36673
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
36674
|
+
return {
|
|
36675
|
+
selectionId: offering.eventSeriesId,
|
|
36676
|
+
registrationSubject: {
|
|
36677
|
+
kind: "wholeSeries",
|
|
36678
|
+
eventSeriesId: offering.eventSeriesId,
|
|
36679
|
+
sessions: offering.sessions
|
|
36680
|
+
},
|
|
36681
|
+
seriesId: offering.eventSeriesId,
|
|
36682
|
+
title: offering.title,
|
|
36683
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
36684
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
36685
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
36686
|
+
kind: "closed",
|
|
36687
|
+
reason: "enrollment_closed"
|
|
36688
|
+
},
|
|
36689
|
+
deliveryMode: offering.deliveryMode,
|
|
36690
|
+
attendanceModes: toAttendanceModes(offering),
|
|
36691
|
+
capacity: offering.enrollmentCapacity,
|
|
36692
|
+
registeredCount: offering.enrolledCount,
|
|
36693
|
+
availableSpots: offering.availableSpots,
|
|
36694
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
36695
|
+
venue: offering.venue ? {
|
|
36696
|
+
...offering.venue,
|
|
36697
|
+
location: null
|
|
36698
|
+
} : null,
|
|
36699
|
+
eventCategory: null,
|
|
36700
|
+
teamMembers: offering.teamMembers,
|
|
36701
|
+
status: offering.status,
|
|
36702
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
36703
|
+
pricing: toWholeSeriesPricing(offering),
|
|
36704
|
+
paymentTerms: offering.paymentTerms,
|
|
36705
|
+
consent: offering.consent,
|
|
36706
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
36707
|
+
acceptsPasses: false,
|
|
36708
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
36709
|
+
};
|
|
36534
36710
|
}
|
|
36535
36711
|
//#endregion
|
|
36536
36712
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -36556,11 +36732,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
36556
36732
|
maxTickets: z.string().optional(),
|
|
36557
36733
|
showVenue: z.boolean().optional(),
|
|
36558
36734
|
showCapacity: z.boolean().optional(),
|
|
36559
|
-
showSessions: z.boolean().optional(),
|
|
36560
|
-
showPrice: z.boolean().optional(),
|
|
36561
36735
|
successMessage: z.string().optional(),
|
|
36562
|
-
waitlistMessage: z.string().optional(),
|
|
36563
|
-
membershipMessage: z.string().optional(),
|
|
36564
36736
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
36565
36737
|
overlayEnabled: z.boolean().optional(),
|
|
36566
36738
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -36630,6 +36802,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
36630
36802
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
36631
36803
|
}
|
|
36632
36804
|
function buildEventRegistrationShellStepLabels(source) {
|
|
36805
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
36806
|
+
if (selectedOffering) {
|
|
36807
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
36808
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
36809
|
+
eligibility: null,
|
|
36810
|
+
selectedTicketType: null,
|
|
36811
|
+
event: selectedEvent
|
|
36812
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
36813
|
+
}
|
|
36633
36814
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
36634
36815
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
36635
36816
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -36644,13 +36825,16 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
36644
36825
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
36645
36826
|
}
|
|
36646
36827
|
function scopeEventRegistrationEvents(source) {
|
|
36828
|
+
return toRegistrationEvents(scopeEventRegistrationSourceEvents(source));
|
|
36829
|
+
}
|
|
36830
|
+
function scopeEventRegistrationSourceEvents(source) {
|
|
36647
36831
|
const scope = planEventRegistrationScope({
|
|
36648
|
-
events:
|
|
36832
|
+
events: source.events ?? [],
|
|
36649
36833
|
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
36650
36834
|
occurrenceContext: source.occurrenceContext,
|
|
36651
36835
|
subject: source.subject
|
|
36652
36836
|
});
|
|
36653
|
-
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
36837
|
+
return scope.kind === "invalidSelectedRun" ? [] : [...scope.events];
|
|
36654
36838
|
}
|
|
36655
36839
|
function shellLabelForRegistrationStep(step, events) {
|
|
36656
36840
|
switch (step) {
|
|
@@ -36682,30 +36866,29 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
36682
36866
|
source: createZodCodec(eventRegistrationSourceSchema),
|
|
36683
36867
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
36684
36868
|
},
|
|
36685
|
-
buildRender: (source) =>
|
|
36686
|
-
|
|
36687
|
-
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
|
|
36691
|
-
|
|
36692
|
-
|
|
36693
|
-
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
36705
|
-
|
|
36706
|
-
|
|
36707
|
-
|
|
36708
|
-
})
|
|
36869
|
+
buildRender: (source) => {
|
|
36870
|
+
const events = source.events == null ? null : scopeEventRegistrationSourceEvents(source);
|
|
36871
|
+
return {
|
|
36872
|
+
display: buildEventRegistrationDisplay(source),
|
|
36873
|
+
hydration: {
|
|
36874
|
+
occurrenceContext: source.occurrenceContext ?? null,
|
|
36875
|
+
subject: source.subject ?? null,
|
|
36876
|
+
events,
|
|
36877
|
+
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
36878
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
36879
|
+
maxTickets: source.maxTickets ?? void 0,
|
|
36880
|
+
showVenue: source.showVenue,
|
|
36881
|
+
showCapacity: source.showCapacity,
|
|
36882
|
+
successMessage: source.successMessage,
|
|
36883
|
+
buttonVariant: source.buttonVariant,
|
|
36884
|
+
overlayEnabled: source.overlayEnabled,
|
|
36885
|
+
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
36886
|
+
supportEmail: source.supportEmail,
|
|
36887
|
+
sitePasses: source.sitePasses ?? null,
|
|
36888
|
+
siteMemberships: source.siteMemberships ?? null
|
|
36889
|
+
}
|
|
36890
|
+
};
|
|
36891
|
+
}
|
|
36709
36892
|
});
|
|
36710
36893
|
function normalizeEventRegistrationEventInput(value) {
|
|
36711
36894
|
if (!isRecord$8(value)) return value;
|
|
@@ -36813,24 +36996,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
36813
36996
|
defaultValue: true,
|
|
36814
36997
|
ui: { intent: "display" }
|
|
36815
36998
|
},
|
|
36816
|
-
{
|
|
36817
|
-
id: "showSessions",
|
|
36818
|
-
type: "boolean",
|
|
36819
|
-
label: "Show complete schedule",
|
|
36820
|
-
description: "Display every session for whole-series registrations",
|
|
36821
|
-
required: false,
|
|
36822
|
-
defaultValue: true,
|
|
36823
|
-
ui: { intent: "display" }
|
|
36824
|
-
},
|
|
36825
|
-
{
|
|
36826
|
-
id: "showPrice",
|
|
36827
|
-
type: "boolean",
|
|
36828
|
-
label: "Show price",
|
|
36829
|
-
description: "Display the whole-series price",
|
|
36830
|
-
required: false,
|
|
36831
|
-
defaultValue: true,
|
|
36832
|
-
ui: { intent: "display" }
|
|
36833
|
-
},
|
|
36834
36999
|
{
|
|
36835
37000
|
id: "successMessage",
|
|
36836
37001
|
type: "text",
|
|
@@ -36841,26 +37006,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
36841
37006
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
36842
37007
|
maxLength: 500
|
|
36843
37008
|
},
|
|
36844
|
-
{
|
|
36845
|
-
id: "waitlistMessage",
|
|
36846
|
-
type: "text",
|
|
36847
|
-
label: "Waitlist message",
|
|
36848
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
36849
|
-
required: false,
|
|
36850
|
-
multiline: true,
|
|
36851
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
36852
|
-
maxLength: 500
|
|
36853
|
-
},
|
|
36854
|
-
{
|
|
36855
|
-
id: "membershipMessage",
|
|
36856
|
-
type: "text",
|
|
36857
|
-
label: "Membership registration message",
|
|
36858
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
36859
|
-
required: false,
|
|
36860
|
-
multiline: true,
|
|
36861
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
36862
|
-
maxLength: 500
|
|
36863
|
-
},
|
|
36864
37009
|
{
|
|
36865
37010
|
id: "buttonText",
|
|
36866
37011
|
type: "text",
|
|
@@ -36892,11 +37037,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
36892
37037
|
} },
|
|
36893
37038
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
36894
37039
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
36895
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
36896
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
36897
37040
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
36898
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
36899
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
36900
37041
|
buttonText: { $bind: {
|
|
36901
37042
|
from: "content.buttonText",
|
|
36902
37043
|
fallback: "Complete Registration"
|
|
@@ -37013,254 +37154,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
37013
37154
|
}
|
|
37014
37155
|
};
|
|
37015
37156
|
//#endregion
|
|
37016
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
37017
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
37018
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
37019
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
37020
|
-
showSessions: z.boolean().optional(),
|
|
37021
|
-
showPrice: z.boolean().optional(),
|
|
37022
|
-
showCapacity: z.boolean().optional(),
|
|
37023
|
-
showVenue: z.boolean().optional(),
|
|
37024
|
-
successMessage: z.string().optional(),
|
|
37025
|
-
waitlistMessage: z.string().optional(),
|
|
37026
|
-
membershipMessage: z.string().optional(),
|
|
37027
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
37028
|
-
};
|
|
37029
|
-
const courseRegistrationSourceSchema = z.object({
|
|
37030
|
-
siteId: z.string().optional(),
|
|
37031
|
-
apiBaseUrl: z.string().optional(),
|
|
37032
|
-
portalToken: z.string().nullable().optional(),
|
|
37033
|
-
...courseRegistrationHydrationSchemaShape,
|
|
37034
|
-
className: z.string().nullable().optional(),
|
|
37035
|
-
buttonText: z.string().nullable().optional(),
|
|
37036
|
-
stage: previewStageSchema.optional()
|
|
37037
|
-
});
|
|
37038
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
37039
|
-
kind: z.literal("course-registration"),
|
|
37040
|
-
state: z.literal("shell"),
|
|
37041
|
-
className: z.string().nullable(),
|
|
37042
|
-
summaryButtonText: z.string()
|
|
37043
|
-
});
|
|
37044
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
37045
|
-
const courseRegistrationRenderSchema = z.object({
|
|
37046
|
-
display: courseRegistrationDisplaySchema,
|
|
37047
|
-
hydration: courseRegistrationHydrationSchema
|
|
37048
|
-
});
|
|
37049
|
-
z.object({
|
|
37050
|
-
siteId: z.string().optional(),
|
|
37051
|
-
apiBaseUrl: z.string().optional(),
|
|
37052
|
-
portalToken: z.string().nullable().optional(),
|
|
37053
|
-
stage: previewStageSchema.optional()
|
|
37054
|
-
});
|
|
37055
|
-
function buildCourseRegistrationDisplay(source) {
|
|
37056
|
-
return {
|
|
37057
|
-
kind: "course-registration",
|
|
37058
|
-
state: "shell",
|
|
37059
|
-
className: source.className ?? null,
|
|
37060
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
37061
|
-
};
|
|
37062
|
-
}
|
|
37063
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
37064
|
-
kind: "client-owned",
|
|
37065
|
-
contracts: {
|
|
37066
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
37067
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
37068
|
-
},
|
|
37069
|
-
buildRender: (source) => ({
|
|
37070
|
-
display: buildCourseRegistrationDisplay(source),
|
|
37071
|
-
hydration: {
|
|
37072
|
-
subject: source.subject ?? null,
|
|
37073
|
-
courses: source.courses ?? null,
|
|
37074
|
-
showSessions: source.showSessions,
|
|
37075
|
-
showPrice: source.showPrice,
|
|
37076
|
-
showCapacity: source.showCapacity,
|
|
37077
|
-
showVenue: source.showVenue,
|
|
37078
|
-
successMessage: source.successMessage,
|
|
37079
|
-
waitlistMessage: source.waitlistMessage,
|
|
37080
|
-
membershipMessage: source.membershipMessage,
|
|
37081
|
-
buttonVariant: source.buttonVariant
|
|
37082
|
-
}
|
|
37083
|
-
})
|
|
37084
|
-
});
|
|
37085
|
-
const courseRegistrationBlockDefinition = {
|
|
37086
|
-
manifest: createBlockManifest({
|
|
37087
|
-
id: "block.course-registration",
|
|
37088
|
-
version: "1.0.0",
|
|
37089
|
-
title: "Course Registration",
|
|
37090
|
-
titleSource: "heading",
|
|
37091
|
-
description: "Enrollment form for multi-session courses",
|
|
37092
|
-
category: "interactive",
|
|
37093
|
-
contentSource: { kind: "inline" },
|
|
37094
|
-
tags: [
|
|
37095
|
-
"courses",
|
|
37096
|
-
"enrollment",
|
|
37097
|
-
"booking",
|
|
37098
|
-
"form",
|
|
37099
|
-
"signup",
|
|
37100
|
-
"education"
|
|
37101
|
-
],
|
|
37102
|
-
icon: "GraduationCap",
|
|
37103
|
-
styleTokens: {
|
|
37104
|
-
background: "surface",
|
|
37105
|
-
typography: "body",
|
|
37106
|
-
spacing: "md"
|
|
37107
|
-
},
|
|
37108
|
-
behaviours: {
|
|
37109
|
-
supportsThemeSwitching: true,
|
|
37110
|
-
inlineEditing: false,
|
|
37111
|
-
animation: false,
|
|
37112
|
-
paletteHidden: false
|
|
37113
|
-
},
|
|
37114
|
-
additionalFields: [
|
|
37115
|
-
{
|
|
37116
|
-
id: "heading",
|
|
37117
|
-
type: "text",
|
|
37118
|
-
label: "Heading",
|
|
37119
|
-
description: "Main heading for the registration form",
|
|
37120
|
-
required: false,
|
|
37121
|
-
multiline: false,
|
|
37122
|
-
defaultValue: "Sign up"
|
|
37123
|
-
},
|
|
37124
|
-
{
|
|
37125
|
-
id: "description",
|
|
37126
|
-
type: "richText",
|
|
37127
|
-
label: "Description",
|
|
37128
|
-
description: "Optional introductory text",
|
|
37129
|
-
required: false
|
|
37130
|
-
},
|
|
37131
|
-
{
|
|
37132
|
-
id: "showSessions",
|
|
37133
|
-
type: "boolean",
|
|
37134
|
-
label: "Show sessions",
|
|
37135
|
-
description: "Display the list of course sessions",
|
|
37136
|
-
required: false,
|
|
37137
|
-
defaultValue: true,
|
|
37138
|
-
ui: { intent: "display" }
|
|
37139
|
-
},
|
|
37140
|
-
{
|
|
37141
|
-
id: "showPrice",
|
|
37142
|
-
type: "boolean",
|
|
37143
|
-
label: "Show price",
|
|
37144
|
-
description: "Display the course price",
|
|
37145
|
-
required: false,
|
|
37146
|
-
defaultValue: true,
|
|
37147
|
-
ui: { intent: "display" }
|
|
37148
|
-
},
|
|
37149
|
-
{
|
|
37150
|
-
id: "showCapacity",
|
|
37151
|
-
type: "boolean",
|
|
37152
|
-
label: "Show available spots",
|
|
37153
|
-
description: "Display remaining enrollment capacity",
|
|
37154
|
-
required: false,
|
|
37155
|
-
defaultValue: true,
|
|
37156
|
-
ui: { intent: "display" }
|
|
37157
|
-
},
|
|
37158
|
-
{
|
|
37159
|
-
id: "showVenue",
|
|
37160
|
-
type: "boolean",
|
|
37161
|
-
label: "Show venue",
|
|
37162
|
-
description: "Display venue information",
|
|
37163
|
-
required: false,
|
|
37164
|
-
defaultValue: true,
|
|
37165
|
-
ui: { intent: "display" }
|
|
37166
|
-
},
|
|
37167
|
-
{
|
|
37168
|
-
id: "successMessage",
|
|
37169
|
-
type: "text",
|
|
37170
|
-
label: "Success message",
|
|
37171
|
-
description: "Message shown after successful enrollment",
|
|
37172
|
-
required: false,
|
|
37173
|
-
multiline: true,
|
|
37174
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
37175
|
-
maxLength: 500
|
|
37176
|
-
},
|
|
37177
|
-
{
|
|
37178
|
-
id: "waitlistMessage",
|
|
37179
|
-
type: "text",
|
|
37180
|
-
label: "Waitlist message",
|
|
37181
|
-
description: "Message when added to waitlist",
|
|
37182
|
-
required: false,
|
|
37183
|
-
multiline: true,
|
|
37184
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
37185
|
-
maxLength: 500
|
|
37186
|
-
},
|
|
37187
|
-
{
|
|
37188
|
-
id: "membershipMessage",
|
|
37189
|
-
type: "text",
|
|
37190
|
-
label: "Membership enrollment message",
|
|
37191
|
-
description: "Message when enrolled using a membership",
|
|
37192
|
-
required: false,
|
|
37193
|
-
multiline: true,
|
|
37194
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
37195
|
-
maxLength: 500
|
|
37196
|
-
},
|
|
37197
|
-
{
|
|
37198
|
-
id: "buttonText",
|
|
37199
|
-
type: "text",
|
|
37200
|
-
label: "Submit button text",
|
|
37201
|
-
description: "Text for the enrollment submit button",
|
|
37202
|
-
required: false,
|
|
37203
|
-
multiline: false,
|
|
37204
|
-
defaultValue: "Sign up",
|
|
37205
|
-
maxLength: 40
|
|
37206
|
-
},
|
|
37207
|
-
createButtonVariantField()
|
|
37208
|
-
],
|
|
37209
|
-
layout: [styledSection({
|
|
37210
|
-
baseClass: "",
|
|
37211
|
-
spacing: "spacious",
|
|
37212
|
-
children: sectionContainer([
|
|
37213
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
37214
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
37215
|
-
courseRegistration(withApiBindings({
|
|
37216
|
-
subject: { $bind: {
|
|
37217
|
-
from: "$root.subject",
|
|
37218
|
-
fallback: null
|
|
37219
|
-
} },
|
|
37220
|
-
portalToken: { $bind: {
|
|
37221
|
-
from: "$root.portalToken",
|
|
37222
|
-
fallback: null
|
|
37223
|
-
} },
|
|
37224
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
37225
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
37226
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
37227
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
37228
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
37229
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
37230
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
37231
|
-
buttonText: { $bind: {
|
|
37232
|
-
from: "content.buttonText",
|
|
37233
|
-
fallback: "Sign up"
|
|
37234
|
-
} },
|
|
37235
|
-
buttonVariant: { $bind: {
|
|
37236
|
-
from: "content.buttonVariant",
|
|
37237
|
-
fallback: "primary"
|
|
37238
|
-
} },
|
|
37239
|
-
courses: { $bind: { from: "data.courses" } },
|
|
37240
|
-
stage: { $bind: {
|
|
37241
|
-
from: "$root.previewStage",
|
|
37242
|
-
fallback: "published"
|
|
37243
|
-
} }
|
|
37244
|
-
}))
|
|
37245
|
-
], { gap: "lg" })
|
|
37246
|
-
})]
|
|
37247
|
-
}),
|
|
37248
|
-
runtime: courseRegistrationBlockRuntime,
|
|
37249
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
37250
|
-
dataLoaders: { courses: {
|
|
37251
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
37252
|
-
params: {
|
|
37253
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
37254
|
-
limit: "50",
|
|
37255
|
-
stage: { $bind: {
|
|
37256
|
-
from: "$root.previewStage",
|
|
37257
|
-
fallback: "published"
|
|
37258
|
-
} }
|
|
37259
|
-
},
|
|
37260
|
-
mode: "server"
|
|
37261
|
-
} }
|
|
37262
|
-
};
|
|
37263
|
-
//#endregion
|
|
37264
37157
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
37265
37158
|
/**
|
|
37266
37159
|
* Event Details Block
|
|
@@ -37507,200 +37400,6 @@ const eventDetailsBlockDefinition = {
|
|
|
37507
37400
|
mode: "server"
|
|
37508
37401
|
} }
|
|
37509
37402
|
};
|
|
37510
|
-
const courseDetailsBlockDefinition = {
|
|
37511
|
-
manifest: createBlockManifest({
|
|
37512
|
-
id: "block.course-details",
|
|
37513
|
-
version: "1.0.0",
|
|
37514
|
-
title: "Course Details",
|
|
37515
|
-
titleSource: "heading",
|
|
37516
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
37517
|
-
category: "content",
|
|
37518
|
-
contentSource: { kind: "entries" },
|
|
37519
|
-
tags: [
|
|
37520
|
-
"courses",
|
|
37521
|
-
"schedule",
|
|
37522
|
-
"sessions",
|
|
37523
|
-
"venue",
|
|
37524
|
-
"pricing"
|
|
37525
|
-
],
|
|
37526
|
-
icon: "GraduationCap",
|
|
37527
|
-
styleTokens: {
|
|
37528
|
-
background: "surface",
|
|
37529
|
-
typography: "body",
|
|
37530
|
-
spacing: "md"
|
|
37531
|
-
},
|
|
37532
|
-
behaviours: {
|
|
37533
|
-
supportsThemeSwitching: true,
|
|
37534
|
-
inlineEditing: false,
|
|
37535
|
-
animation: false,
|
|
37536
|
-
paletteHidden: false
|
|
37537
|
-
},
|
|
37538
|
-
additionalFields: [
|
|
37539
|
-
{
|
|
37540
|
-
id: "heading",
|
|
37541
|
-
type: "text",
|
|
37542
|
-
label: "Heading",
|
|
37543
|
-
description: "Optional heading shown above course details",
|
|
37544
|
-
required: false,
|
|
37545
|
-
multiline: false,
|
|
37546
|
-
defaultValue: "Course details"
|
|
37547
|
-
},
|
|
37548
|
-
{
|
|
37549
|
-
id: "showTitle",
|
|
37550
|
-
type: "boolean",
|
|
37551
|
-
label: "Show course title",
|
|
37552
|
-
required: false,
|
|
37553
|
-
defaultValue: false,
|
|
37554
|
-
ui: { intent: "display" }
|
|
37555
|
-
},
|
|
37556
|
-
{
|
|
37557
|
-
id: "showDescription",
|
|
37558
|
-
type: "boolean",
|
|
37559
|
-
label: "Show course description",
|
|
37560
|
-
description: "Render the course description from the bookings course record",
|
|
37561
|
-
required: false,
|
|
37562
|
-
defaultValue: false,
|
|
37563
|
-
ui: { intent: "display" }
|
|
37564
|
-
},
|
|
37565
|
-
{
|
|
37566
|
-
id: "showSessions",
|
|
37567
|
-
type: "boolean",
|
|
37568
|
-
label: "Show sessions",
|
|
37569
|
-
required: false,
|
|
37570
|
-
defaultValue: true,
|
|
37571
|
-
ui: { intent: "display" }
|
|
37572
|
-
},
|
|
37573
|
-
{
|
|
37574
|
-
id: "sessionsLimit",
|
|
37575
|
-
type: "select",
|
|
37576
|
-
label: "Sessions limit",
|
|
37577
|
-
required: false,
|
|
37578
|
-
multiple: false,
|
|
37579
|
-
defaultValue: "10",
|
|
37580
|
-
options: [
|
|
37581
|
-
{
|
|
37582
|
-
value: "3",
|
|
37583
|
-
label: "3 sessions"
|
|
37584
|
-
},
|
|
37585
|
-
{
|
|
37586
|
-
value: "5",
|
|
37587
|
-
label: "5 sessions"
|
|
37588
|
-
},
|
|
37589
|
-
{
|
|
37590
|
-
value: "10",
|
|
37591
|
-
label: "10 sessions"
|
|
37592
|
-
},
|
|
37593
|
-
{
|
|
37594
|
-
value: "all",
|
|
37595
|
-
label: "All sessions"
|
|
37596
|
-
}
|
|
37597
|
-
],
|
|
37598
|
-
ui: { intent: "display" }
|
|
37599
|
-
},
|
|
37600
|
-
{
|
|
37601
|
-
id: "showVenue",
|
|
37602
|
-
type: "boolean",
|
|
37603
|
-
label: "Show venue",
|
|
37604
|
-
required: false,
|
|
37605
|
-
defaultValue: true,
|
|
37606
|
-
ui: { intent: "display" }
|
|
37607
|
-
},
|
|
37608
|
-
{
|
|
37609
|
-
id: "showPrice",
|
|
37610
|
-
type: "boolean",
|
|
37611
|
-
label: "Show price",
|
|
37612
|
-
required: false,
|
|
37613
|
-
defaultValue: true,
|
|
37614
|
-
ui: { intent: "display" }
|
|
37615
|
-
},
|
|
37616
|
-
{
|
|
37617
|
-
id: "showCapacity",
|
|
37618
|
-
type: "boolean",
|
|
37619
|
-
label: "Show capacity",
|
|
37620
|
-
required: false,
|
|
37621
|
-
defaultValue: true,
|
|
37622
|
-
ui: { intent: "display" }
|
|
37623
|
-
},
|
|
37624
|
-
{
|
|
37625
|
-
id: "showEnrollmentStatus",
|
|
37626
|
-
type: "boolean",
|
|
37627
|
-
label: "Show enrollment status",
|
|
37628
|
-
required: false,
|
|
37629
|
-
defaultValue: true,
|
|
37630
|
-
ui: { intent: "display" }
|
|
37631
|
-
},
|
|
37632
|
-
{
|
|
37633
|
-
id: "showMembershipNote",
|
|
37634
|
-
type: "boolean",
|
|
37635
|
-
label: "Show membership note",
|
|
37636
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
37637
|
-
required: false,
|
|
37638
|
-
defaultValue: true,
|
|
37639
|
-
ui: { intent: "display" }
|
|
37640
|
-
}
|
|
37641
|
-
],
|
|
37642
|
-
layout: [styledSection({
|
|
37643
|
-
baseClass: "",
|
|
37644
|
-
spacing: "spacious",
|
|
37645
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
37646
|
-
subject: { $bind: {
|
|
37647
|
-
from: "$root.subject",
|
|
37648
|
-
fallback: null
|
|
37649
|
-
} },
|
|
37650
|
-
courses: { $bind: { from: "data.courses" } },
|
|
37651
|
-
showTitle: { $bind: {
|
|
37652
|
-
from: "content.showTitle",
|
|
37653
|
-
fallback: false
|
|
37654
|
-
} },
|
|
37655
|
-
showDescription: { $bind: {
|
|
37656
|
-
from: "content.showDescription",
|
|
37657
|
-
fallback: false
|
|
37658
|
-
} },
|
|
37659
|
-
showSessions: { $bind: {
|
|
37660
|
-
from: "content.showSessions",
|
|
37661
|
-
fallback: true
|
|
37662
|
-
} },
|
|
37663
|
-
sessionsLimit: { $bind: {
|
|
37664
|
-
from: "content.sessionsLimit",
|
|
37665
|
-
fallback: "10"
|
|
37666
|
-
} },
|
|
37667
|
-
showVenue: { $bind: {
|
|
37668
|
-
from: "content.showVenue",
|
|
37669
|
-
fallback: true
|
|
37670
|
-
} },
|
|
37671
|
-
showPrice: { $bind: {
|
|
37672
|
-
from: "content.showPrice",
|
|
37673
|
-
fallback: true
|
|
37674
|
-
} },
|
|
37675
|
-
showCapacity: { $bind: {
|
|
37676
|
-
from: "content.showCapacity",
|
|
37677
|
-
fallback: true
|
|
37678
|
-
} },
|
|
37679
|
-
showEnrollmentStatus: { $bind: {
|
|
37680
|
-
from: "content.showEnrollmentStatus",
|
|
37681
|
-
fallback: true
|
|
37682
|
-
} },
|
|
37683
|
-
showMembershipNote: { $bind: {
|
|
37684
|
-
from: "content.showMembershipNote",
|
|
37685
|
-
fallback: true
|
|
37686
|
-
} }
|
|
37687
|
-
})], { gap: "lg" })
|
|
37688
|
-
})]
|
|
37689
|
-
}),
|
|
37690
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
37691
|
-
dataLoaders: { courses: {
|
|
37692
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
37693
|
-
params: {
|
|
37694
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
37695
|
-
limit: "50",
|
|
37696
|
-
stage: { $bind: {
|
|
37697
|
-
from: "$root.previewStage",
|
|
37698
|
-
fallback: "published"
|
|
37699
|
-
} }
|
|
37700
|
-
},
|
|
37701
|
-
mode: "server"
|
|
37702
|
-
} }
|
|
37703
|
-
};
|
|
37704
37403
|
const eventSpotlightBlockDefinition = {
|
|
37705
37404
|
manifest: createBlockManifest({
|
|
37706
37405
|
id: "block.event-spotlight",
|
|
@@ -40364,7 +40063,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
40364
40063
|
fallback: "published"
|
|
40365
40064
|
} },
|
|
40366
40065
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
40367
|
-
|
|
40066
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
40368
40067
|
...offeringsPreviewEventDataBindings
|
|
40369
40068
|
})
|
|
40370
40069
|
], { gap: "lg" }),
|
|
@@ -40381,7 +40080,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
40381
40080
|
dataSchemas: {
|
|
40382
40081
|
...offeringsPreviewEventDataSchemas,
|
|
40383
40082
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
40384
|
-
|
|
40083
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
40385
40084
|
},
|
|
40386
40085
|
dataLoaders: {
|
|
40387
40086
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -40390,7 +40089,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
40390
40089
|
params: {},
|
|
40391
40090
|
mode: "server"
|
|
40392
40091
|
},
|
|
40393
|
-
|
|
40092
|
+
wholeSeriesOfferings: {
|
|
40394
40093
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
40395
40094
|
params: {
|
|
40396
40095
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -45377,22 +45076,6 @@ const systemBlockDefinitions = [
|
|
|
45377
45076
|
weight: "standard"
|
|
45378
45077
|
})]
|
|
45379
45078
|
})),
|
|
45380
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
45381
|
-
flow: conversionFlow,
|
|
45382
|
-
layoutProfiles: [layoutProfile({
|
|
45383
|
-
variantKey: "default",
|
|
45384
|
-
family: "form",
|
|
45385
|
-
weight: "standard"
|
|
45386
|
-
})]
|
|
45387
|
-
})),
|
|
45388
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
45389
|
-
flow: offeringsFlow,
|
|
45390
|
-
layoutProfiles: [layoutProfile({
|
|
45391
|
-
variantKey: "default",
|
|
45392
|
-
family: "stack",
|
|
45393
|
-
weight: "standard"
|
|
45394
|
-
})]
|
|
45395
|
-
})),
|
|
45396
45079
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
45397
45080
|
flow: offeringsFlow,
|
|
45398
45081
|
layoutProfiles: [layoutProfile({
|
|
@@ -47419,6 +47102,68 @@ function collectText(node) {
|
|
|
47419
47102
|
return (node.content ?? []).map(collectText).join("");
|
|
47420
47103
|
}
|
|
47421
47104
|
//#endregion
|
|
47105
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
47106
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
47107
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
47108
|
+
z.object({
|
|
47109
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
47110
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
47111
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
47112
|
+
remainderDueCount: z.number().int().positive(),
|
|
47113
|
+
intervalUnit: z.enum([
|
|
47114
|
+
"day",
|
|
47115
|
+
"week",
|
|
47116
|
+
"month"
|
|
47117
|
+
])
|
|
47118
|
+
}),
|
|
47119
|
+
z.object({
|
|
47120
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
47121
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
47122
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
47123
|
+
instalmentCount: z.number().int().positive(),
|
|
47124
|
+
intervalCount: z.number().int().positive(),
|
|
47125
|
+
intervalUnit: z.enum([
|
|
47126
|
+
"day",
|
|
47127
|
+
"week",
|
|
47128
|
+
"month"
|
|
47129
|
+
])
|
|
47130
|
+
}),
|
|
47131
|
+
z.object({
|
|
47132
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
47133
|
+
instalmentCount: z.number().int().positive(),
|
|
47134
|
+
intervalCount: z.number().int().positive(),
|
|
47135
|
+
intervalUnit: z.enum([
|
|
47136
|
+
"day",
|
|
47137
|
+
"week",
|
|
47138
|
+
"month"
|
|
47139
|
+
])
|
|
47140
|
+
})
|
|
47141
|
+
]);
|
|
47142
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
47143
|
+
kind: z.literal("relative_to_start_date"),
|
|
47144
|
+
daysBeforeStart: z.number().int().positive()
|
|
47145
|
+
}), z.object({
|
|
47146
|
+
kind: z.literal("fixed_calendar_date"),
|
|
47147
|
+
dueAt: z.string().datetime()
|
|
47148
|
+
})]);
|
|
47149
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
47150
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
47151
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
47152
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
47153
|
+
});
|
|
47154
|
+
z.discriminatedUnion("kind", [
|
|
47155
|
+
z.object({ kind: z.literal("upfront") }),
|
|
47156
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
47157
|
+
z.object({
|
|
47158
|
+
kind: z.literal("instalment_plan"),
|
|
47159
|
+
plan: bookingInstalmentPlanSchema
|
|
47160
|
+
}),
|
|
47161
|
+
z.object({
|
|
47162
|
+
kind: z.literal("flexible_balance"),
|
|
47163
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
47164
|
+
})
|
|
47165
|
+
]);
|
|
47166
|
+
//#endregion
|
|
47422
47167
|
//#region ../api/src/aiPlayground.ts
|
|
47423
47168
|
/**
|
|
47424
47169
|
* RFC-6902 JSON Patch Operations
|