@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/config.mjs
CHANGED
|
@@ -798,69 +798,8 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
798
798
|
}
|
|
799
799
|
});
|
|
800
800
|
//#endregion
|
|
801
|
-
//#region ../api/src/
|
|
802
|
-
const
|
|
803
|
-
listCourses: {
|
|
804
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
805
|
-
method: "GET",
|
|
806
|
-
auth: "user",
|
|
807
|
-
responseKind: "json"
|
|
808
|
-
},
|
|
809
|
-
exportCoursesCsv: {
|
|
810
|
-
path: "/sites/{siteId}/bookings/courses/export.csv",
|
|
811
|
-
method: "GET",
|
|
812
|
-
tags: [
|
|
813
|
-
"site-{siteId}",
|
|
814
|
-
"bookings",
|
|
815
|
-
"courses-{siteId}"
|
|
816
|
-
],
|
|
817
|
-
errors: [],
|
|
818
|
-
auth: "user",
|
|
819
|
-
responseKind: "blob"
|
|
820
|
-
},
|
|
821
|
-
createCourse: {
|
|
822
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
823
|
-
method: "POST",
|
|
824
|
-
auth: "user",
|
|
825
|
-
responseKind: "json",
|
|
826
|
-
errors: [
|
|
827
|
-
"validation:invalid_input",
|
|
828
|
-
"resource:not_found",
|
|
829
|
-
"resource:already_exists",
|
|
830
|
-
"resource:conflict",
|
|
831
|
-
"server:internal_error"
|
|
832
|
-
]
|
|
833
|
-
},
|
|
834
|
-
getCourse: {
|
|
835
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
836
|
-
method: "GET",
|
|
837
|
-
auth: "user",
|
|
838
|
-
responseKind: "json"
|
|
839
|
-
},
|
|
840
|
-
updateCourse: {
|
|
841
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
842
|
-
method: "PATCH",
|
|
843
|
-
auth: "user",
|
|
844
|
-
responseKind: "json",
|
|
845
|
-
errors: [
|
|
846
|
-
"validation:invalid_input",
|
|
847
|
-
"resource:not_found",
|
|
848
|
-
"resource:conflict",
|
|
849
|
-
"server:internal_error"
|
|
850
|
-
]
|
|
851
|
-
},
|
|
852
|
-
deleteCourse: {
|
|
853
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
854
|
-
method: "DELETE",
|
|
855
|
-
auth: "user",
|
|
856
|
-
responseKind: "json",
|
|
857
|
-
errors: [
|
|
858
|
-
"validation:invalid_input",
|
|
859
|
-
"resource:not_found",
|
|
860
|
-
"resource:conflict",
|
|
861
|
-
"server:internal_error"
|
|
862
|
-
]
|
|
863
|
-
},
|
|
801
|
+
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
802
|
+
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
864
803
|
deleteEventOffering: {
|
|
865
804
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
866
805
|
method: "DELETE",
|
|
@@ -873,20 +812,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
873
812
|
"server:internal_error"
|
|
874
813
|
]
|
|
875
814
|
},
|
|
876
|
-
|
|
877
|
-
path: "/sites/{siteId}/bookings/
|
|
878
|
-
method: "POST",
|
|
879
|
-
auth: "user",
|
|
880
|
-
responseKind: "json",
|
|
881
|
-
errors: [
|
|
882
|
-
"validation:invalid_input",
|
|
883
|
-
"resource:not_found",
|
|
884
|
-
"resource:already_exists",
|
|
885
|
-
"server:internal_error"
|
|
886
|
-
]
|
|
887
|
-
},
|
|
888
|
-
changeCourseContentOwnership: {
|
|
889
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/content-ownership",
|
|
815
|
+
changeEventSeriesContentOwnership: {
|
|
816
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/content-ownership",
|
|
890
817
|
method: "POST",
|
|
891
818
|
auth: "user",
|
|
892
819
|
responseKind: "json",
|
|
@@ -897,8 +824,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
897
824
|
"server:internal_error"
|
|
898
825
|
]
|
|
899
826
|
},
|
|
900
|
-
|
|
901
|
-
path: "/sites/{siteId}/bookings/
|
|
827
|
+
addEventSeriesRegistration: {
|
|
828
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
902
829
|
method: "POST",
|
|
903
830
|
auth: "user",
|
|
904
831
|
responseKind: "json",
|
|
@@ -909,33 +836,21 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
909
836
|
"server:internal_error"
|
|
910
837
|
]
|
|
911
838
|
},
|
|
912
|
-
|
|
913
|
-
path: "/sites/{siteId}/bookings/
|
|
839
|
+
listEventSeriesRegistrations: {
|
|
840
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
914
841
|
method: "GET",
|
|
915
842
|
auth: "user",
|
|
916
843
|
responseKind: "json"
|
|
917
844
|
},
|
|
918
|
-
|
|
919
|
-
path: "/sites/{siteId}/bookings/
|
|
845
|
+
exportEventSeriesRegistrationsCsv: {
|
|
846
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/export.csv",
|
|
920
847
|
method: "GET",
|
|
921
848
|
auth: "user",
|
|
922
849
|
errors: [],
|
|
923
850
|
responseKind: "blob"
|
|
924
851
|
},
|
|
925
|
-
|
|
926
|
-
path: "/sites/{siteId}/bookings/
|
|
927
|
-
method: "GET",
|
|
928
|
-
tags: [
|
|
929
|
-
"site-{siteId}",
|
|
930
|
-
"bookings",
|
|
931
|
-
"courses-{courseId}"
|
|
932
|
-
],
|
|
933
|
-
auth: "user",
|
|
934
|
-
responseKind: "blob",
|
|
935
|
-
errors: []
|
|
936
|
-
},
|
|
937
|
-
updateCourseEnrollment: {
|
|
938
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/enrollments/{enrollmentId}",
|
|
852
|
+
updateEventSeriesRegistration: {
|
|
853
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
939
854
|
method: "PATCH",
|
|
940
855
|
auth: "user",
|
|
941
856
|
responseKind: "json",
|
|
@@ -1323,71 +1238,35 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1323
1238
|
errors: ["resource:not_found", "server:internal_error"],
|
|
1324
1239
|
auth: "public",
|
|
1325
1240
|
responseKind: "json"
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
"auth:forbidden",
|
|
1334
|
-
"validation:invalid_input",
|
|
1335
|
-
"resource:not_found",
|
|
1336
|
-
"resource:conflict",
|
|
1337
|
-
"resource:already_exists",
|
|
1338
|
-
"server:internal_error"
|
|
1339
|
-
],
|
|
1340
|
-
auth: "public",
|
|
1341
|
-
responseKind: "json"
|
|
1342
|
-
},
|
|
1343
|
-
checkWholeSeriesEligibility: {
|
|
1344
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/check-eligibility",
|
|
1345
|
-
method: "POST",
|
|
1346
|
-
tags: [TAG_TEMPLATES.publicWholeSeriesOfferings, "course-enrollment"],
|
|
1347
|
-
errors: [
|
|
1348
|
-
"auth:unauthenticated",
|
|
1349
|
-
"resource:not_found",
|
|
1350
|
-
"resource:conflict",
|
|
1351
|
-
"server:internal_error"
|
|
1352
|
-
],
|
|
1353
|
-
auth: "public",
|
|
1354
|
-
responseKind: "json"
|
|
1355
|
-
},
|
|
1356
|
-
createWholeSeriesCheckout: {
|
|
1357
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
//#endregion
|
|
1244
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1245
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1246
|
+
getPublicEventRegistrationOptions: {
|
|
1247
|
+
path: "/public/sites/{siteId}/events/registration-options",
|
|
1358
1248
|
method: "POST",
|
|
1359
|
-
tags: [TAG_TEMPLATES.
|
|
1249
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration-options"],
|
|
1360
1250
|
auth: "public",
|
|
1361
1251
|
responseKind: "json",
|
|
1362
1252
|
errors: [
|
|
1363
|
-
"auth:unauthenticated",
|
|
1364
1253
|
"validation:invalid_input",
|
|
1365
1254
|
"resource:not_found",
|
|
1366
1255
|
"resource:conflict",
|
|
1367
1256
|
"server:internal_error"
|
|
1368
1257
|
]
|
|
1369
1258
|
},
|
|
1370
|
-
|
|
1371
|
-
path: "/public/sites/{siteId}/
|
|
1259
|
+
resolveEventSubroute: {
|
|
1260
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1372
1261
|
method: "GET",
|
|
1373
|
-
|
|
1374
|
-
|
|
1262
|
+
revalidate: 60,
|
|
1263
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1375
1264
|
auth: "public",
|
|
1376
|
-
responseKind: "json"
|
|
1265
|
+
responseKind: "json",
|
|
1266
|
+
errors: []
|
|
1377
1267
|
}
|
|
1378
1268
|
});
|
|
1379
1269
|
//#endregion
|
|
1380
|
-
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1381
|
-
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1382
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1383
|
-
method: "GET",
|
|
1384
|
-
revalidate: 60,
|
|
1385
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1386
|
-
auth: "public",
|
|
1387
|
-
responseKind: "json",
|
|
1388
|
-
errors: []
|
|
1389
|
-
} });
|
|
1390
|
-
//#endregion
|
|
1391
1270
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1392
1271
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1393
1272
|
listSiteApiKeys: {
|
|
@@ -1755,7 +1634,7 @@ const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1755
1634
|
}), TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, { ...SITE_API_KEY_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings, {
|
|
1756
1635
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1757
1636
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1758
|
-
...
|
|
1637
|
+
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
1759
1638
|
}, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteById, TAG_TEMPLATES.siteBySlug, TAG_TEMPLATES.siteByDomain, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.workflowRunById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.routeById, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.site, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.navigationItemById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteNavigation, TAG_TEMPLATES.navigationMenuById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteSettings, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteRedirects, TAG_TEMPLATES.siteRouteOutcomes, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.formSubmissionsBySlug, TAG_TEMPLATES.formById, TAG_TEMPLATES.siteForms, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEventFilters, { ...PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS }, TAG_TEMPLATES.publicTeamMembers, TAG_TEMPLATES.publicWholeSeriesOfferings, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicPasses, TAG_TEMPLATES.publicMemberships, TAG_TEMPLATES.publicProducts, TAG_TEMPLATES.publicShop, TAG_TEMPLATES.publicCheckout, TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, TAG_TEMPLATES.publicEvents, { ...EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS }, { ...SDK_ENDPOINT_DEFINITIONS }, { ...SDK_ENTRY_READ_ENDPOINTS };
|
|
1760
1639
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1761
1640
|
z.object({
|
|
@@ -1931,14 +1810,14 @@ function publicEventPricingType(pricing) {
|
|
|
1931
1810
|
case "single_paid":
|
|
1932
1811
|
case "ticket_types":
|
|
1933
1812
|
case "sliding_scale":
|
|
1934
|
-
case "
|
|
1813
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
1935
1814
|
case "external": return "external";
|
|
1936
1815
|
}
|
|
1937
1816
|
}
|
|
1938
1817
|
function isFreePublicEventPriceDisplay(display) {
|
|
1939
1818
|
switch (display.kind) {
|
|
1940
1819
|
case "free": return true;
|
|
1941
|
-
case "
|
|
1820
|
+
case "whole_series": return display.display.kind === "free";
|
|
1942
1821
|
case "exact":
|
|
1943
1822
|
case "from":
|
|
1944
1823
|
case "range":
|
|
@@ -2259,6 +2138,25 @@ function parseManagementKey(raw) {
|
|
|
2259
2138
|
return ok(createSecretInternal("management-key", raw));
|
|
2260
2139
|
}
|
|
2261
2140
|
//#endregion
|
|
2141
|
+
//#region ../core/src/planner.ts
|
|
2142
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
2143
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
2144
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
2145
|
+
function resolvePlanningNowDate(input = {}) {
|
|
2146
|
+
if (input.now !== void 0) return input.now;
|
|
2147
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
2148
|
+
}
|
|
2149
|
+
/**
|
|
2150
|
+
* Resolve a Date-compatible planner input.
|
|
2151
|
+
*
|
|
2152
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
2153
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
2154
|
+
*/
|
|
2155
|
+
function resolvePlanningDateInput(input = {}) {
|
|
2156
|
+
if (input instanceof Date) return input;
|
|
2157
|
+
return resolvePlanningNowDate(input);
|
|
2158
|
+
}
|
|
2159
|
+
//#endregion
|
|
2262
2160
|
//#region ../core/src/event-series-behaviour.ts
|
|
2263
2161
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2264
2162
|
"class",
|
|
@@ -10718,7 +10616,7 @@ defineBlockAppearancePreset({
|
|
|
10718
10616
|
id: "schedule-details-brand-depth",
|
|
10719
10617
|
target: "events",
|
|
10720
10618
|
label: "Brand-depth schedule details",
|
|
10721
|
-
blockKinds: ["block.event-details"
|
|
10619
|
+
blockKinds: ["block.event-details"],
|
|
10722
10620
|
design: {
|
|
10723
10621
|
sectionSurface: "brand-depth-band",
|
|
10724
10622
|
contentFrame: plainFrame,
|
|
@@ -16917,7 +16815,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
16917
16815
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
16918
16816
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
16919
16817
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
16920
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
16921
16818
|
function bind(from, options) {
|
|
16922
16819
|
return (node) => ({
|
|
16923
16820
|
...node,
|
|
@@ -26558,12 +26455,12 @@ const RichTextDocSchema = z.object({
|
|
|
26558
26455
|
}).strict();
|
|
26559
26456
|
//#endregion
|
|
26560
26457
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
26561
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
26562
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
26458
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
26459
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
26563
26460
|
z.object({
|
|
26564
26461
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
26565
26462
|
depositAmountCents: z.number().int().min(0),
|
|
26566
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26463
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26567
26464
|
remainderDueCount: z.number().int().positive(),
|
|
26568
26465
|
intervalUnit: z.enum([
|
|
26569
26466
|
"day",
|
|
@@ -26574,7 +26471,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26574
26471
|
z.object({
|
|
26575
26472
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
26576
26473
|
depositAmountCents: z.number().int().min(0),
|
|
26577
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26474
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26578
26475
|
instalmentCount: z.number().int().positive(),
|
|
26579
26476
|
intervalCount: z.number().int().positive(),
|
|
26580
26477
|
intervalUnit: z.enum([
|
|
@@ -26594,28 +26491,28 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26594
26491
|
])
|
|
26595
26492
|
})
|
|
26596
26493
|
]);
|
|
26597
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
26494
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
26598
26495
|
kind: z.literal("relative_to_start_date"),
|
|
26599
26496
|
daysBeforeStart: z.number().int().positive()
|
|
26600
26497
|
}), z.object({
|
|
26601
26498
|
kind: z.literal("fixed_calendar_date"),
|
|
26602
26499
|
dueAt: z.string().datetime()
|
|
26603
26500
|
})]);
|
|
26604
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
26501
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
26605
26502
|
upfrontAmountCents: z.number().int().min(0),
|
|
26606
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
26607
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
26503
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
26504
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
26608
26505
|
});
|
|
26609
26506
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
26610
26507
|
z.object({ kind: z.literal("upfront") }),
|
|
26611
26508
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
26612
26509
|
z.object({
|
|
26613
26510
|
kind: z.literal("instalment_plan"),
|
|
26614
|
-
plan: bookingInstalmentPlanSchema
|
|
26511
|
+
plan: bookingInstalmentPlanSchema$1
|
|
26615
26512
|
}),
|
|
26616
26513
|
z.object({
|
|
26617
26514
|
kind: z.literal("flexible_balance"),
|
|
26618
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
26515
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
26619
26516
|
})
|
|
26620
26517
|
]);
|
|
26621
26518
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
@@ -26637,6 +26534,164 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
26637
26534
|
});
|
|
26638
26535
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26639
26536
|
//#endregion
|
|
26537
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
26538
|
+
function isSaleWindowOpen(option, now) {
|
|
26539
|
+
if (!option.isActive) return false;
|
|
26540
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
26541
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
26542
|
+
return true;
|
|
26543
|
+
}
|
|
26544
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
26545
|
+
if (amount <= 0) return {
|
|
26546
|
+
kind: "free",
|
|
26547
|
+
currency
|
|
26548
|
+
};
|
|
26549
|
+
return {
|
|
26550
|
+
kind: "exact",
|
|
26551
|
+
amount,
|
|
26552
|
+
currency
|
|
26553
|
+
};
|
|
26554
|
+
}
|
|
26555
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
26556
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
26557
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
26558
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
26559
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
26560
|
+
return left.name.localeCompare(right.name);
|
|
26561
|
+
});
|
|
26562
|
+
}
|
|
26563
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
26564
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
26565
|
+
const currency = offering.pricing.currency;
|
|
26566
|
+
switch (offering.pricing.pricingStrategy) {
|
|
26567
|
+
case "free": return resolveFreePricing(currency);
|
|
26568
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
26569
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
26570
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
26571
|
+
}
|
|
26572
|
+
}
|
|
26573
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
26574
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
26575
|
+
selectedSlidingAmount: null,
|
|
26576
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
26577
|
+
} : {
|
|
26578
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
26579
|
+
nowInput
|
|
26580
|
+
};
|
|
26581
|
+
}
|
|
26582
|
+
function resolveFreePricing(currency) {
|
|
26583
|
+
return {
|
|
26584
|
+
currency,
|
|
26585
|
+
display: {
|
|
26586
|
+
kind: "free",
|
|
26587
|
+
currency
|
|
26588
|
+
},
|
|
26589
|
+
selectableOptions: [],
|
|
26590
|
+
requiresSelection: false,
|
|
26591
|
+
selectedOption: null,
|
|
26592
|
+
slidingScale: null,
|
|
26593
|
+
selectedSlidingAmount: null,
|
|
26594
|
+
selectedPriceAmount: 0,
|
|
26595
|
+
selectedRequiresPayment: false,
|
|
26596
|
+
hasPaidSelection: false,
|
|
26597
|
+
hasFreeSelection: true
|
|
26598
|
+
};
|
|
26599
|
+
}
|
|
26600
|
+
function resolveSinglePricing(amount, currency) {
|
|
26601
|
+
return {
|
|
26602
|
+
currency,
|
|
26603
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
26604
|
+
selectableOptions: [],
|
|
26605
|
+
requiresSelection: false,
|
|
26606
|
+
selectedOption: null,
|
|
26607
|
+
slidingScale: null,
|
|
26608
|
+
selectedSlidingAmount: null,
|
|
26609
|
+
selectedPriceAmount: amount,
|
|
26610
|
+
selectedRequiresPayment: amount > 0,
|
|
26611
|
+
hasPaidSelection: amount > 0,
|
|
26612
|
+
hasFreeSelection: amount <= 0
|
|
26613
|
+
};
|
|
26614
|
+
}
|
|
26615
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
26616
|
+
const currency = offering.pricing.currency;
|
|
26617
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
26618
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
26619
|
+
return {
|
|
26620
|
+
currency,
|
|
26621
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
26622
|
+
selectableOptions,
|
|
26623
|
+
requiresSelection: selectableOptions.length > 1,
|
|
26624
|
+
selectedOption,
|
|
26625
|
+
slidingScale: null,
|
|
26626
|
+
selectedSlidingAmount: null,
|
|
26627
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
26628
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
26629
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
26630
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
26631
|
+
};
|
|
26632
|
+
}
|
|
26633
|
+
function resolveSelectedTier(options, selectedId) {
|
|
26634
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
26635
|
+
}
|
|
26636
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
26637
|
+
if (lowestAmount === null) return {
|
|
26638
|
+
kind: "unavailable",
|
|
26639
|
+
currency
|
|
26640
|
+
};
|
|
26641
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
26642
|
+
kind: "from",
|
|
26643
|
+
amount: lowestAmount,
|
|
26644
|
+
currency
|
|
26645
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
26646
|
+
}
|
|
26647
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
26648
|
+
const currency = offering.pricing.currency;
|
|
26649
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
26650
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
26651
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
26652
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
26653
|
+
return {
|
|
26654
|
+
currency,
|
|
26655
|
+
display: {
|
|
26656
|
+
kind: "range",
|
|
26657
|
+
minAmount,
|
|
26658
|
+
maxAmount,
|
|
26659
|
+
currency
|
|
26660
|
+
},
|
|
26661
|
+
selectableOptions: [],
|
|
26662
|
+
requiresSelection: selectedAmount === null,
|
|
26663
|
+
selectedOption: null,
|
|
26664
|
+
slidingScale: {
|
|
26665
|
+
minAmount,
|
|
26666
|
+
maxAmount,
|
|
26667
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
26668
|
+
},
|
|
26669
|
+
selectedSlidingAmount: selectedAmount,
|
|
26670
|
+
selectedPriceAmount: selectedAmount,
|
|
26671
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
26672
|
+
hasPaidSelection: maxAmount > 0,
|
|
26673
|
+
hasFreeSelection: minAmount === 0
|
|
26674
|
+
};
|
|
26675
|
+
}
|
|
26676
|
+
function unavailableSlidingScale(currency) {
|
|
26677
|
+
return {
|
|
26678
|
+
currency,
|
|
26679
|
+
display: {
|
|
26680
|
+
kind: "unavailable",
|
|
26681
|
+
currency
|
|
26682
|
+
},
|
|
26683
|
+
selectableOptions: [],
|
|
26684
|
+
requiresSelection: true,
|
|
26685
|
+
selectedOption: null,
|
|
26686
|
+
slidingScale: null,
|
|
26687
|
+
selectedSlidingAmount: null,
|
|
26688
|
+
selectedPriceAmount: null,
|
|
26689
|
+
selectedRequiresPayment: false,
|
|
26690
|
+
hasPaidSelection: false,
|
|
26691
|
+
hasFreeSelection: false
|
|
26692
|
+
};
|
|
26693
|
+
}
|
|
26694
|
+
//#endregion
|
|
26640
26695
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26641
26696
|
const wholeSeriesVenueSchema = z.object({
|
|
26642
26697
|
id: z.string(),
|
|
@@ -26696,6 +26751,13 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
26696
26751
|
title: z.string(),
|
|
26697
26752
|
slug: z.string(),
|
|
26698
26753
|
description: z.unknown().nullable(),
|
|
26754
|
+
deliveryMode: z.enum([
|
|
26755
|
+
"in_person",
|
|
26756
|
+
"online",
|
|
26757
|
+
"hybrid"
|
|
26758
|
+
]),
|
|
26759
|
+
waitlistEnabled: z.boolean(),
|
|
26760
|
+
requireGuestDetails: z.boolean(),
|
|
26699
26761
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
26700
26762
|
enrollmentOpen: z.boolean(),
|
|
26701
26763
|
pricing: wholeSeriesPricingSchema,
|
|
@@ -26811,10 +26873,11 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
26811
26873
|
paidToAmount: z.number(),
|
|
26812
26874
|
currency: z.string()
|
|
26813
26875
|
});
|
|
26814
|
-
const
|
|
26876
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
26815
26877
|
freePriceDisplaySchema,
|
|
26816
26878
|
exactPriceDisplaySchema,
|
|
26817
26879
|
fromPriceDisplaySchema,
|
|
26880
|
+
rangePriceDisplaySchema,
|
|
26818
26881
|
unavailablePriceDisplaySchema
|
|
26819
26882
|
]);
|
|
26820
26883
|
z.discriminatedUnion("kind", [
|
|
@@ -26829,8 +26892,8 @@ z.discriminatedUnion("kind", [
|
|
|
26829
26892
|
label: z.string()
|
|
26830
26893
|
}),
|
|
26831
26894
|
z.object({
|
|
26832
|
-
kind: z.literal("
|
|
26833
|
-
display:
|
|
26895
|
+
kind: z.literal("whole_series"),
|
|
26896
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26834
26897
|
})
|
|
26835
26898
|
]);
|
|
26836
26899
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -26932,10 +26995,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
26932
26995
|
})
|
|
26933
26996
|
}),
|
|
26934
26997
|
z.object({
|
|
26935
|
-
kind: z.literal("
|
|
26998
|
+
kind: z.literal("whole_series"),
|
|
26936
26999
|
display: z.object({
|
|
26937
|
-
kind: z.literal("
|
|
26938
|
-
display:
|
|
27000
|
+
kind: z.literal("whole_series"),
|
|
27001
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26939
27002
|
})
|
|
26940
27003
|
}),
|
|
26941
27004
|
z.object({
|
|
@@ -27352,7 +27415,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
27352
27415
|
};
|
|
27353
27416
|
return { kind: "unscoped" };
|
|
27354
27417
|
}
|
|
27355
|
-
function
|
|
27418
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27419
|
+
const scope = resolveEventRegistrationScope(context);
|
|
27356
27420
|
switch (scope.kind) {
|
|
27357
27421
|
case "occurrenceSeries":
|
|
27358
27422
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -27364,9 +27428,6 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
27364
27428
|
case "unscoped": return [...events];
|
|
27365
27429
|
}
|
|
27366
27430
|
}
|
|
27367
|
-
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27368
|
-
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
27369
|
-
}
|
|
27370
27431
|
//#endregion
|
|
27371
27432
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27372
27433
|
function planEventRegistrationScope(input) {
|
|
@@ -27460,14 +27521,14 @@ function isRecord$4(value) {
|
|
|
27460
27521
|
}
|
|
27461
27522
|
function isPublicEventPricing(value) {
|
|
27462
27523
|
if (!isRecord$4(value) || typeof value.kind !== "string") return false;
|
|
27463
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
27524
|
+
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";
|
|
27464
27525
|
}
|
|
27465
27526
|
function isPublicEventTicketType(value) {
|
|
27466
27527
|
return isRecord$4(value) && typeof value.id === "string";
|
|
27467
27528
|
}
|
|
27468
27529
|
function readTicketTypePriceDisplay(value, currency) {
|
|
27469
27530
|
const display = readLegacyPriceDisplay(value, currency);
|
|
27470
|
-
return display.kind === "
|
|
27531
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
27471
27532
|
kind: "unavailable",
|
|
27472
27533
|
currency
|
|
27473
27534
|
} : display;
|
|
@@ -27525,11 +27586,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27525
27586
|
kind: "unavailable",
|
|
27526
27587
|
currency: displayCurrency
|
|
27527
27588
|
};
|
|
27528
|
-
case "
|
|
27529
|
-
kind: "
|
|
27589
|
+
case "whole_series": return isRecord$4(value.display) ? {
|
|
27590
|
+
kind: "whole_series",
|
|
27530
27591
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
27531
27592
|
} : {
|
|
27532
|
-
kind: "
|
|
27593
|
+
kind: "whole_series",
|
|
27533
27594
|
display: {
|
|
27534
27595
|
kind: "unavailable",
|
|
27535
27596
|
currency: displayCurrency
|
|
@@ -27655,7 +27716,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
27655
27716
|
//#endregion
|
|
27656
27717
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
27657
27718
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
27658
|
-
return event.
|
|
27719
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
27659
27720
|
}
|
|
27660
27721
|
function findPreSelectedEvent(input) {
|
|
27661
27722
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -27681,12 +27742,127 @@ function toRegistrationEvent(event) {
|
|
|
27681
27742
|
return {
|
|
27682
27743
|
...event,
|
|
27683
27744
|
pricing: resolveRuntimeEventPricing(event),
|
|
27684
|
-
|
|
27685
|
-
|
|
27745
|
+
selectionId: event.id,
|
|
27746
|
+
registrationSubject: {
|
|
27747
|
+
kind: "occurrence",
|
|
27748
|
+
occurrenceId: event.occurrenceId
|
|
27749
|
+
}
|
|
27686
27750
|
};
|
|
27687
27751
|
}
|
|
27688
27752
|
function toRegistrationEvents(events) {
|
|
27689
|
-
return events.map(toRegistrationEvent);
|
|
27753
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
27754
|
+
}
|
|
27755
|
+
function toWholeSeriesTicketType(option) {
|
|
27756
|
+
return {
|
|
27757
|
+
...option,
|
|
27758
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
27759
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
27760
|
+
availability: {
|
|
27761
|
+
kind: "available",
|
|
27762
|
+
remainingCapacity: option.capacityLimit
|
|
27763
|
+
}
|
|
27764
|
+
};
|
|
27765
|
+
}
|
|
27766
|
+
function toWholeSeriesPricing(offering) {
|
|
27767
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
27768
|
+
switch (offering.pricing.pricingStrategy) {
|
|
27769
|
+
case "free": return {
|
|
27770
|
+
kind: "free_registration",
|
|
27771
|
+
currency: offering.currency,
|
|
27772
|
+
display: {
|
|
27773
|
+
kind: "free",
|
|
27774
|
+
currency: offering.currency
|
|
27775
|
+
}
|
|
27776
|
+
};
|
|
27777
|
+
case "single": {
|
|
27778
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
27779
|
+
return amount === 0 ? {
|
|
27780
|
+
kind: "free_registration",
|
|
27781
|
+
currency: offering.currency,
|
|
27782
|
+
display: {
|
|
27783
|
+
kind: "free",
|
|
27784
|
+
currency: offering.currency
|
|
27785
|
+
}
|
|
27786
|
+
} : {
|
|
27787
|
+
kind: "single_paid",
|
|
27788
|
+
amount,
|
|
27789
|
+
currency: offering.currency,
|
|
27790
|
+
display: {
|
|
27791
|
+
kind: "exact",
|
|
27792
|
+
amount,
|
|
27793
|
+
currency: offering.currency
|
|
27794
|
+
}
|
|
27795
|
+
};
|
|
27796
|
+
}
|
|
27797
|
+
case "tiered": return {
|
|
27798
|
+
kind: "ticket_types",
|
|
27799
|
+
currency: offering.currency,
|
|
27800
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
27801
|
+
display: resolved.display
|
|
27802
|
+
};
|
|
27803
|
+
case "sliding_scale": return {
|
|
27804
|
+
kind: "sliding_scale",
|
|
27805
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27806
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27807
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
27808
|
+
currency: offering.currency,
|
|
27809
|
+
display: {
|
|
27810
|
+
kind: "range",
|
|
27811
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27812
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27813
|
+
currency: offering.currency
|
|
27814
|
+
}
|
|
27815
|
+
};
|
|
27816
|
+
}
|
|
27817
|
+
}
|
|
27818
|
+
function toAttendanceModes(offering) {
|
|
27819
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
27820
|
+
mode,
|
|
27821
|
+
capacity: offering.enrollmentCapacity,
|
|
27822
|
+
registeredCount: offering.enrolledCount,
|
|
27823
|
+
availableSpots: offering.availableSpots,
|
|
27824
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
27825
|
+
}));
|
|
27826
|
+
}
|
|
27827
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
27828
|
+
const firstSession = offering.sessions[0];
|
|
27829
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
27830
|
+
return {
|
|
27831
|
+
selectionId: offering.eventSeriesId,
|
|
27832
|
+
registrationSubject: {
|
|
27833
|
+
kind: "wholeSeries",
|
|
27834
|
+
eventSeriesId: offering.eventSeriesId,
|
|
27835
|
+
sessions: offering.sessions
|
|
27836
|
+
},
|
|
27837
|
+
seriesId: offering.eventSeriesId,
|
|
27838
|
+
title: offering.title,
|
|
27839
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
27840
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
27841
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
27842
|
+
kind: "closed",
|
|
27843
|
+
reason: "enrollment_closed"
|
|
27844
|
+
},
|
|
27845
|
+
deliveryMode: offering.deliveryMode,
|
|
27846
|
+
attendanceModes: toAttendanceModes(offering),
|
|
27847
|
+
capacity: offering.enrollmentCapacity,
|
|
27848
|
+
registeredCount: offering.enrolledCount,
|
|
27849
|
+
availableSpots: offering.availableSpots,
|
|
27850
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
27851
|
+
venue: offering.venue ? {
|
|
27852
|
+
...offering.venue,
|
|
27853
|
+
location: null
|
|
27854
|
+
} : null,
|
|
27855
|
+
eventCategory: null,
|
|
27856
|
+
teamMembers: offering.teamMembers,
|
|
27857
|
+
status: offering.status,
|
|
27858
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
27859
|
+
pricing: toWholeSeriesPricing(offering),
|
|
27860
|
+
paymentTerms: offering.paymentTerms,
|
|
27861
|
+
consent: offering.consent,
|
|
27862
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
27863
|
+
acceptsPasses: false,
|
|
27864
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
27865
|
+
};
|
|
27690
27866
|
}
|
|
27691
27867
|
//#endregion
|
|
27692
27868
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -27712,11 +27888,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
27712
27888
|
maxTickets: z.string().optional(),
|
|
27713
27889
|
showVenue: z.boolean().optional(),
|
|
27714
27890
|
showCapacity: z.boolean().optional(),
|
|
27715
|
-
showSessions: z.boolean().optional(),
|
|
27716
|
-
showPrice: z.boolean().optional(),
|
|
27717
27891
|
successMessage: z.string().optional(),
|
|
27718
|
-
waitlistMessage: z.string().optional(),
|
|
27719
|
-
membershipMessage: z.string().optional(),
|
|
27720
27892
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27721
27893
|
overlayEnabled: z.boolean().optional(),
|
|
27722
27894
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -27786,6 +27958,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
27786
27958
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27787
27959
|
}
|
|
27788
27960
|
function buildEventRegistrationShellStepLabels(source) {
|
|
27961
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
27962
|
+
if (selectedOffering) {
|
|
27963
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
27964
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
27965
|
+
eligibility: null,
|
|
27966
|
+
selectedTicketType: null,
|
|
27967
|
+
event: selectedEvent
|
|
27968
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
27969
|
+
}
|
|
27789
27970
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
27790
27971
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
27791
27972
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -27800,13 +27981,16 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
27800
27981
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
27801
27982
|
}
|
|
27802
27983
|
function scopeEventRegistrationEvents(source) {
|
|
27984
|
+
return toRegistrationEvents(scopeEventRegistrationSourceEvents(source));
|
|
27985
|
+
}
|
|
27986
|
+
function scopeEventRegistrationSourceEvents(source) {
|
|
27803
27987
|
const scope = planEventRegistrationScope({
|
|
27804
|
-
events:
|
|
27988
|
+
events: source.events ?? [],
|
|
27805
27989
|
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
27806
27990
|
occurrenceContext: source.occurrenceContext,
|
|
27807
27991
|
subject: source.subject
|
|
27808
27992
|
});
|
|
27809
|
-
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
27993
|
+
return scope.kind === "invalidSelectedRun" ? [] : [...scope.events];
|
|
27810
27994
|
}
|
|
27811
27995
|
function shellLabelForRegistrationStep(step, events) {
|
|
27812
27996
|
switch (step) {
|
|
@@ -27838,30 +28022,29 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27838
28022
|
source: createZodCodec(eventRegistrationSourceSchema),
|
|
27839
28023
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
27840
28024
|
},
|
|
27841
|
-
buildRender: (source) =>
|
|
27842
|
-
|
|
27843
|
-
|
|
27844
|
-
|
|
27845
|
-
|
|
27846
|
-
|
|
27847
|
-
|
|
27848
|
-
|
|
27849
|
-
|
|
27850
|
-
|
|
27851
|
-
|
|
27852
|
-
|
|
27853
|
-
|
|
27854
|
-
|
|
27855
|
-
|
|
27856
|
-
|
|
27857
|
-
|
|
27858
|
-
|
|
27859
|
-
|
|
27860
|
-
|
|
27861
|
-
|
|
27862
|
-
|
|
27863
|
-
|
|
27864
|
-
})
|
|
28025
|
+
buildRender: (source) => {
|
|
28026
|
+
const events = source.events == null ? null : scopeEventRegistrationSourceEvents(source);
|
|
28027
|
+
return {
|
|
28028
|
+
display: buildEventRegistrationDisplay(source),
|
|
28029
|
+
hydration: {
|
|
28030
|
+
occurrenceContext: source.occurrenceContext ?? null,
|
|
28031
|
+
subject: source.subject ?? null,
|
|
28032
|
+
events,
|
|
28033
|
+
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
28034
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
28035
|
+
maxTickets: source.maxTickets ?? void 0,
|
|
28036
|
+
showVenue: source.showVenue,
|
|
28037
|
+
showCapacity: source.showCapacity,
|
|
28038
|
+
successMessage: source.successMessage,
|
|
28039
|
+
buttonVariant: source.buttonVariant,
|
|
28040
|
+
overlayEnabled: source.overlayEnabled,
|
|
28041
|
+
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
28042
|
+
supportEmail: source.supportEmail,
|
|
28043
|
+
sitePasses: source.sitePasses ?? null,
|
|
28044
|
+
siteMemberships: source.siteMemberships ?? null
|
|
28045
|
+
}
|
|
28046
|
+
};
|
|
28047
|
+
}
|
|
27865
28048
|
});
|
|
27866
28049
|
function normalizeEventRegistrationEventInput(value) {
|
|
27867
28050
|
if (!isRecord$3(value)) return value;
|
|
@@ -27969,24 +28152,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27969
28152
|
defaultValue: true,
|
|
27970
28153
|
ui: { intent: "display" }
|
|
27971
28154
|
},
|
|
27972
|
-
{
|
|
27973
|
-
id: "showSessions",
|
|
27974
|
-
type: "boolean",
|
|
27975
|
-
label: "Show complete schedule",
|
|
27976
|
-
description: "Display every session for whole-series registrations",
|
|
27977
|
-
required: false,
|
|
27978
|
-
defaultValue: true,
|
|
27979
|
-
ui: { intent: "display" }
|
|
27980
|
-
},
|
|
27981
|
-
{
|
|
27982
|
-
id: "showPrice",
|
|
27983
|
-
type: "boolean",
|
|
27984
|
-
label: "Show price",
|
|
27985
|
-
description: "Display the whole-series price",
|
|
27986
|
-
required: false,
|
|
27987
|
-
defaultValue: true,
|
|
27988
|
-
ui: { intent: "display" }
|
|
27989
|
-
},
|
|
27990
28155
|
{
|
|
27991
28156
|
id: "successMessage",
|
|
27992
28157
|
type: "text",
|
|
@@ -27997,26 +28162,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27997
28162
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
27998
28163
|
maxLength: 500
|
|
27999
28164
|
},
|
|
28000
|
-
{
|
|
28001
|
-
id: "waitlistMessage",
|
|
28002
|
-
type: "text",
|
|
28003
|
-
label: "Waitlist message",
|
|
28004
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
28005
|
-
required: false,
|
|
28006
|
-
multiline: true,
|
|
28007
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
28008
|
-
maxLength: 500
|
|
28009
|
-
},
|
|
28010
|
-
{
|
|
28011
|
-
id: "membershipMessage",
|
|
28012
|
-
type: "text",
|
|
28013
|
-
label: "Membership registration message",
|
|
28014
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
28015
|
-
required: false,
|
|
28016
|
-
multiline: true,
|
|
28017
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
28018
|
-
maxLength: 500
|
|
28019
|
-
},
|
|
28020
28165
|
{
|
|
28021
28166
|
id: "buttonText",
|
|
28022
28167
|
type: "text",
|
|
@@ -28048,11 +28193,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
28048
28193
|
} },
|
|
28049
28194
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28050
28195
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
28051
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
28052
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
28053
28196
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
28054
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
28055
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
28056
28197
|
buttonText: { $bind: {
|
|
28057
28198
|
from: "content.buttonText",
|
|
28058
28199
|
fallback: "Complete Registration"
|
|
@@ -28169,254 +28310,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
28169
28310
|
}
|
|
28170
28311
|
};
|
|
28171
28312
|
//#endregion
|
|
28172
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
28173
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
28174
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
28175
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
28176
|
-
showSessions: z.boolean().optional(),
|
|
28177
|
-
showPrice: z.boolean().optional(),
|
|
28178
|
-
showCapacity: z.boolean().optional(),
|
|
28179
|
-
showVenue: z.boolean().optional(),
|
|
28180
|
-
successMessage: z.string().optional(),
|
|
28181
|
-
waitlistMessage: z.string().optional(),
|
|
28182
|
-
membershipMessage: z.string().optional(),
|
|
28183
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28184
|
-
};
|
|
28185
|
-
const courseRegistrationSourceSchema = z.object({
|
|
28186
|
-
siteId: z.string().optional(),
|
|
28187
|
-
apiBaseUrl: z.string().optional(),
|
|
28188
|
-
portalToken: z.string().nullable().optional(),
|
|
28189
|
-
...courseRegistrationHydrationSchemaShape,
|
|
28190
|
-
className: z.string().nullable().optional(),
|
|
28191
|
-
buttonText: z.string().nullable().optional(),
|
|
28192
|
-
stage: previewStageSchema.optional()
|
|
28193
|
-
});
|
|
28194
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
28195
|
-
kind: z.literal("course-registration"),
|
|
28196
|
-
state: z.literal("shell"),
|
|
28197
|
-
className: z.string().nullable(),
|
|
28198
|
-
summaryButtonText: z.string()
|
|
28199
|
-
});
|
|
28200
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
28201
|
-
const courseRegistrationRenderSchema = z.object({
|
|
28202
|
-
display: courseRegistrationDisplaySchema,
|
|
28203
|
-
hydration: courseRegistrationHydrationSchema
|
|
28204
|
-
});
|
|
28205
|
-
z.object({
|
|
28206
|
-
siteId: z.string().optional(),
|
|
28207
|
-
apiBaseUrl: z.string().optional(),
|
|
28208
|
-
portalToken: z.string().nullable().optional(),
|
|
28209
|
-
stage: previewStageSchema.optional()
|
|
28210
|
-
});
|
|
28211
|
-
function buildCourseRegistrationDisplay(source) {
|
|
28212
|
-
return {
|
|
28213
|
-
kind: "course-registration",
|
|
28214
|
-
state: "shell",
|
|
28215
|
-
className: source.className ?? null,
|
|
28216
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
28217
|
-
};
|
|
28218
|
-
}
|
|
28219
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
28220
|
-
kind: "client-owned",
|
|
28221
|
-
contracts: {
|
|
28222
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
28223
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
28224
|
-
},
|
|
28225
|
-
buildRender: (source) => ({
|
|
28226
|
-
display: buildCourseRegistrationDisplay(source),
|
|
28227
|
-
hydration: {
|
|
28228
|
-
subject: source.subject ?? null,
|
|
28229
|
-
courses: source.courses ?? null,
|
|
28230
|
-
showSessions: source.showSessions,
|
|
28231
|
-
showPrice: source.showPrice,
|
|
28232
|
-
showCapacity: source.showCapacity,
|
|
28233
|
-
showVenue: source.showVenue,
|
|
28234
|
-
successMessage: source.successMessage,
|
|
28235
|
-
waitlistMessage: source.waitlistMessage,
|
|
28236
|
-
membershipMessage: source.membershipMessage,
|
|
28237
|
-
buttonVariant: source.buttonVariant
|
|
28238
|
-
}
|
|
28239
|
-
})
|
|
28240
|
-
});
|
|
28241
|
-
const courseRegistrationBlockDefinition = {
|
|
28242
|
-
manifest: createBlockManifest({
|
|
28243
|
-
id: "block.course-registration",
|
|
28244
|
-
version: "1.0.0",
|
|
28245
|
-
title: "Course Registration",
|
|
28246
|
-
titleSource: "heading",
|
|
28247
|
-
description: "Enrollment form for multi-session courses",
|
|
28248
|
-
category: "interactive",
|
|
28249
|
-
contentSource: { kind: "inline" },
|
|
28250
|
-
tags: [
|
|
28251
|
-
"courses",
|
|
28252
|
-
"enrollment",
|
|
28253
|
-
"booking",
|
|
28254
|
-
"form",
|
|
28255
|
-
"signup",
|
|
28256
|
-
"education"
|
|
28257
|
-
],
|
|
28258
|
-
icon: "GraduationCap",
|
|
28259
|
-
styleTokens: {
|
|
28260
|
-
background: "surface",
|
|
28261
|
-
typography: "body",
|
|
28262
|
-
spacing: "md"
|
|
28263
|
-
},
|
|
28264
|
-
behaviours: {
|
|
28265
|
-
supportsThemeSwitching: true,
|
|
28266
|
-
inlineEditing: false,
|
|
28267
|
-
animation: false,
|
|
28268
|
-
paletteHidden: false
|
|
28269
|
-
},
|
|
28270
|
-
additionalFields: [
|
|
28271
|
-
{
|
|
28272
|
-
id: "heading",
|
|
28273
|
-
type: "text",
|
|
28274
|
-
label: "Heading",
|
|
28275
|
-
description: "Main heading for the registration form",
|
|
28276
|
-
required: false,
|
|
28277
|
-
multiline: false,
|
|
28278
|
-
defaultValue: "Sign up"
|
|
28279
|
-
},
|
|
28280
|
-
{
|
|
28281
|
-
id: "description",
|
|
28282
|
-
type: "richText",
|
|
28283
|
-
label: "Description",
|
|
28284
|
-
description: "Optional introductory text",
|
|
28285
|
-
required: false
|
|
28286
|
-
},
|
|
28287
|
-
{
|
|
28288
|
-
id: "showSessions",
|
|
28289
|
-
type: "boolean",
|
|
28290
|
-
label: "Show sessions",
|
|
28291
|
-
description: "Display the list of course sessions",
|
|
28292
|
-
required: false,
|
|
28293
|
-
defaultValue: true,
|
|
28294
|
-
ui: { intent: "display" }
|
|
28295
|
-
},
|
|
28296
|
-
{
|
|
28297
|
-
id: "showPrice",
|
|
28298
|
-
type: "boolean",
|
|
28299
|
-
label: "Show price",
|
|
28300
|
-
description: "Display the course price",
|
|
28301
|
-
required: false,
|
|
28302
|
-
defaultValue: true,
|
|
28303
|
-
ui: { intent: "display" }
|
|
28304
|
-
},
|
|
28305
|
-
{
|
|
28306
|
-
id: "showCapacity",
|
|
28307
|
-
type: "boolean",
|
|
28308
|
-
label: "Show available spots",
|
|
28309
|
-
description: "Display remaining enrollment capacity",
|
|
28310
|
-
required: false,
|
|
28311
|
-
defaultValue: true,
|
|
28312
|
-
ui: { intent: "display" }
|
|
28313
|
-
},
|
|
28314
|
-
{
|
|
28315
|
-
id: "showVenue",
|
|
28316
|
-
type: "boolean",
|
|
28317
|
-
label: "Show venue",
|
|
28318
|
-
description: "Display venue information",
|
|
28319
|
-
required: false,
|
|
28320
|
-
defaultValue: true,
|
|
28321
|
-
ui: { intent: "display" }
|
|
28322
|
-
},
|
|
28323
|
-
{
|
|
28324
|
-
id: "successMessage",
|
|
28325
|
-
type: "text",
|
|
28326
|
-
label: "Success message",
|
|
28327
|
-
description: "Message shown after successful enrollment",
|
|
28328
|
-
required: false,
|
|
28329
|
-
multiline: true,
|
|
28330
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
28331
|
-
maxLength: 500
|
|
28332
|
-
},
|
|
28333
|
-
{
|
|
28334
|
-
id: "waitlistMessage",
|
|
28335
|
-
type: "text",
|
|
28336
|
-
label: "Waitlist message",
|
|
28337
|
-
description: "Message when added to waitlist",
|
|
28338
|
-
required: false,
|
|
28339
|
-
multiline: true,
|
|
28340
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
28341
|
-
maxLength: 500
|
|
28342
|
-
},
|
|
28343
|
-
{
|
|
28344
|
-
id: "membershipMessage",
|
|
28345
|
-
type: "text",
|
|
28346
|
-
label: "Membership enrollment message",
|
|
28347
|
-
description: "Message when enrolled using a membership",
|
|
28348
|
-
required: false,
|
|
28349
|
-
multiline: true,
|
|
28350
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
28351
|
-
maxLength: 500
|
|
28352
|
-
},
|
|
28353
|
-
{
|
|
28354
|
-
id: "buttonText",
|
|
28355
|
-
type: "text",
|
|
28356
|
-
label: "Submit button text",
|
|
28357
|
-
description: "Text for the enrollment submit button",
|
|
28358
|
-
required: false,
|
|
28359
|
-
multiline: false,
|
|
28360
|
-
defaultValue: "Sign up",
|
|
28361
|
-
maxLength: 40
|
|
28362
|
-
},
|
|
28363
|
-
createButtonVariantField()
|
|
28364
|
-
],
|
|
28365
|
-
layout: [styledSection({
|
|
28366
|
-
baseClass: "",
|
|
28367
|
-
spacing: "spacious",
|
|
28368
|
-
children: sectionContainer([
|
|
28369
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28370
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28371
|
-
courseRegistration(withApiBindings({
|
|
28372
|
-
subject: { $bind: {
|
|
28373
|
-
from: "$root.subject",
|
|
28374
|
-
fallback: null
|
|
28375
|
-
} },
|
|
28376
|
-
portalToken: { $bind: {
|
|
28377
|
-
from: "$root.portalToken",
|
|
28378
|
-
fallback: null
|
|
28379
|
-
} },
|
|
28380
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
28381
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
28382
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
28383
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28384
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
28385
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
28386
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
28387
|
-
buttonText: { $bind: {
|
|
28388
|
-
from: "content.buttonText",
|
|
28389
|
-
fallback: "Sign up"
|
|
28390
|
-
} },
|
|
28391
|
-
buttonVariant: { $bind: {
|
|
28392
|
-
from: "content.buttonVariant",
|
|
28393
|
-
fallback: "primary"
|
|
28394
|
-
} },
|
|
28395
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28396
|
-
stage: { $bind: {
|
|
28397
|
-
from: "$root.previewStage",
|
|
28398
|
-
fallback: "published"
|
|
28399
|
-
} }
|
|
28400
|
-
}))
|
|
28401
|
-
], { gap: "lg" })
|
|
28402
|
-
})]
|
|
28403
|
-
}),
|
|
28404
|
-
runtime: courseRegistrationBlockRuntime,
|
|
28405
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28406
|
-
dataLoaders: { courses: {
|
|
28407
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28408
|
-
params: {
|
|
28409
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28410
|
-
limit: "50",
|
|
28411
|
-
stage: { $bind: {
|
|
28412
|
-
from: "$root.previewStage",
|
|
28413
|
-
fallback: "published"
|
|
28414
|
-
} }
|
|
28415
|
-
},
|
|
28416
|
-
mode: "server"
|
|
28417
|
-
} }
|
|
28418
|
-
};
|
|
28419
|
-
//#endregion
|
|
28420
28313
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
28421
28314
|
/**
|
|
28422
28315
|
* Event Details Block
|
|
@@ -28663,200 +28556,6 @@ const eventDetailsBlockDefinition = {
|
|
|
28663
28556
|
mode: "server"
|
|
28664
28557
|
} }
|
|
28665
28558
|
};
|
|
28666
|
-
const courseDetailsBlockDefinition = {
|
|
28667
|
-
manifest: createBlockManifest({
|
|
28668
|
-
id: "block.course-details",
|
|
28669
|
-
version: "1.0.0",
|
|
28670
|
-
title: "Course Details",
|
|
28671
|
-
titleSource: "heading",
|
|
28672
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
28673
|
-
category: "content",
|
|
28674
|
-
contentSource: { kind: "entries" },
|
|
28675
|
-
tags: [
|
|
28676
|
-
"courses",
|
|
28677
|
-
"schedule",
|
|
28678
|
-
"sessions",
|
|
28679
|
-
"venue",
|
|
28680
|
-
"pricing"
|
|
28681
|
-
],
|
|
28682
|
-
icon: "GraduationCap",
|
|
28683
|
-
styleTokens: {
|
|
28684
|
-
background: "surface",
|
|
28685
|
-
typography: "body",
|
|
28686
|
-
spacing: "md"
|
|
28687
|
-
},
|
|
28688
|
-
behaviours: {
|
|
28689
|
-
supportsThemeSwitching: true,
|
|
28690
|
-
inlineEditing: false,
|
|
28691
|
-
animation: false,
|
|
28692
|
-
paletteHidden: false
|
|
28693
|
-
},
|
|
28694
|
-
additionalFields: [
|
|
28695
|
-
{
|
|
28696
|
-
id: "heading",
|
|
28697
|
-
type: "text",
|
|
28698
|
-
label: "Heading",
|
|
28699
|
-
description: "Optional heading shown above course details",
|
|
28700
|
-
required: false,
|
|
28701
|
-
multiline: false,
|
|
28702
|
-
defaultValue: "Course details"
|
|
28703
|
-
},
|
|
28704
|
-
{
|
|
28705
|
-
id: "showTitle",
|
|
28706
|
-
type: "boolean",
|
|
28707
|
-
label: "Show course title",
|
|
28708
|
-
required: false,
|
|
28709
|
-
defaultValue: false,
|
|
28710
|
-
ui: { intent: "display" }
|
|
28711
|
-
},
|
|
28712
|
-
{
|
|
28713
|
-
id: "showDescription",
|
|
28714
|
-
type: "boolean",
|
|
28715
|
-
label: "Show course description",
|
|
28716
|
-
description: "Render the course description from the bookings course record",
|
|
28717
|
-
required: false,
|
|
28718
|
-
defaultValue: false,
|
|
28719
|
-
ui: { intent: "display" }
|
|
28720
|
-
},
|
|
28721
|
-
{
|
|
28722
|
-
id: "showSessions",
|
|
28723
|
-
type: "boolean",
|
|
28724
|
-
label: "Show sessions",
|
|
28725
|
-
required: false,
|
|
28726
|
-
defaultValue: true,
|
|
28727
|
-
ui: { intent: "display" }
|
|
28728
|
-
},
|
|
28729
|
-
{
|
|
28730
|
-
id: "sessionsLimit",
|
|
28731
|
-
type: "select",
|
|
28732
|
-
label: "Sessions limit",
|
|
28733
|
-
required: false,
|
|
28734
|
-
multiple: false,
|
|
28735
|
-
defaultValue: "10",
|
|
28736
|
-
options: [
|
|
28737
|
-
{
|
|
28738
|
-
value: "3",
|
|
28739
|
-
label: "3 sessions"
|
|
28740
|
-
},
|
|
28741
|
-
{
|
|
28742
|
-
value: "5",
|
|
28743
|
-
label: "5 sessions"
|
|
28744
|
-
},
|
|
28745
|
-
{
|
|
28746
|
-
value: "10",
|
|
28747
|
-
label: "10 sessions"
|
|
28748
|
-
},
|
|
28749
|
-
{
|
|
28750
|
-
value: "all",
|
|
28751
|
-
label: "All sessions"
|
|
28752
|
-
}
|
|
28753
|
-
],
|
|
28754
|
-
ui: { intent: "display" }
|
|
28755
|
-
},
|
|
28756
|
-
{
|
|
28757
|
-
id: "showVenue",
|
|
28758
|
-
type: "boolean",
|
|
28759
|
-
label: "Show venue",
|
|
28760
|
-
required: false,
|
|
28761
|
-
defaultValue: true,
|
|
28762
|
-
ui: { intent: "display" }
|
|
28763
|
-
},
|
|
28764
|
-
{
|
|
28765
|
-
id: "showPrice",
|
|
28766
|
-
type: "boolean",
|
|
28767
|
-
label: "Show price",
|
|
28768
|
-
required: false,
|
|
28769
|
-
defaultValue: true,
|
|
28770
|
-
ui: { intent: "display" }
|
|
28771
|
-
},
|
|
28772
|
-
{
|
|
28773
|
-
id: "showCapacity",
|
|
28774
|
-
type: "boolean",
|
|
28775
|
-
label: "Show capacity",
|
|
28776
|
-
required: false,
|
|
28777
|
-
defaultValue: true,
|
|
28778
|
-
ui: { intent: "display" }
|
|
28779
|
-
},
|
|
28780
|
-
{
|
|
28781
|
-
id: "showEnrollmentStatus",
|
|
28782
|
-
type: "boolean",
|
|
28783
|
-
label: "Show enrollment status",
|
|
28784
|
-
required: false,
|
|
28785
|
-
defaultValue: true,
|
|
28786
|
-
ui: { intent: "display" }
|
|
28787
|
-
},
|
|
28788
|
-
{
|
|
28789
|
-
id: "showMembershipNote",
|
|
28790
|
-
type: "boolean",
|
|
28791
|
-
label: "Show membership note",
|
|
28792
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
28793
|
-
required: false,
|
|
28794
|
-
defaultValue: true,
|
|
28795
|
-
ui: { intent: "display" }
|
|
28796
|
-
}
|
|
28797
|
-
],
|
|
28798
|
-
layout: [styledSection({
|
|
28799
|
-
baseClass: "",
|
|
28800
|
-
spacing: "spacious",
|
|
28801
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
28802
|
-
subject: { $bind: {
|
|
28803
|
-
from: "$root.subject",
|
|
28804
|
-
fallback: null
|
|
28805
|
-
} },
|
|
28806
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28807
|
-
showTitle: { $bind: {
|
|
28808
|
-
from: "content.showTitle",
|
|
28809
|
-
fallback: false
|
|
28810
|
-
} },
|
|
28811
|
-
showDescription: { $bind: {
|
|
28812
|
-
from: "content.showDescription",
|
|
28813
|
-
fallback: false
|
|
28814
|
-
} },
|
|
28815
|
-
showSessions: { $bind: {
|
|
28816
|
-
from: "content.showSessions",
|
|
28817
|
-
fallback: true
|
|
28818
|
-
} },
|
|
28819
|
-
sessionsLimit: { $bind: {
|
|
28820
|
-
from: "content.sessionsLimit",
|
|
28821
|
-
fallback: "10"
|
|
28822
|
-
} },
|
|
28823
|
-
showVenue: { $bind: {
|
|
28824
|
-
from: "content.showVenue",
|
|
28825
|
-
fallback: true
|
|
28826
|
-
} },
|
|
28827
|
-
showPrice: { $bind: {
|
|
28828
|
-
from: "content.showPrice",
|
|
28829
|
-
fallback: true
|
|
28830
|
-
} },
|
|
28831
|
-
showCapacity: { $bind: {
|
|
28832
|
-
from: "content.showCapacity",
|
|
28833
|
-
fallback: true
|
|
28834
|
-
} },
|
|
28835
|
-
showEnrollmentStatus: { $bind: {
|
|
28836
|
-
from: "content.showEnrollmentStatus",
|
|
28837
|
-
fallback: true
|
|
28838
|
-
} },
|
|
28839
|
-
showMembershipNote: { $bind: {
|
|
28840
|
-
from: "content.showMembershipNote",
|
|
28841
|
-
fallback: true
|
|
28842
|
-
} }
|
|
28843
|
-
})], { gap: "lg" })
|
|
28844
|
-
})]
|
|
28845
|
-
}),
|
|
28846
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28847
|
-
dataLoaders: { courses: {
|
|
28848
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28849
|
-
params: {
|
|
28850
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28851
|
-
limit: "50",
|
|
28852
|
-
stage: { $bind: {
|
|
28853
|
-
from: "$root.previewStage",
|
|
28854
|
-
fallback: "published"
|
|
28855
|
-
} }
|
|
28856
|
-
},
|
|
28857
|
-
mode: "server"
|
|
28858
|
-
} }
|
|
28859
|
-
};
|
|
28860
28559
|
const eventSpotlightBlockDefinition = {
|
|
28861
28560
|
manifest: createBlockManifest({
|
|
28862
28561
|
id: "block.event-spotlight",
|
|
@@ -31296,7 +30995,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
31296
30995
|
fallback: "published"
|
|
31297
30996
|
} },
|
|
31298
30997
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
31299
|
-
|
|
30998
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
31300
30999
|
...offeringsPreviewEventDataBindings
|
|
31301
31000
|
})
|
|
31302
31001
|
], { gap: "lg" }),
|
|
@@ -31313,7 +31012,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31313
31012
|
dataSchemas: {
|
|
31314
31013
|
...offeringsPreviewEventDataSchemas,
|
|
31315
31014
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
31316
|
-
|
|
31015
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
31317
31016
|
},
|
|
31318
31017
|
dataLoaders: {
|
|
31319
31018
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31322,7 +31021,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31322
31021
|
params: {},
|
|
31323
31022
|
mode: "server"
|
|
31324
31023
|
},
|
|
31325
|
-
|
|
31024
|
+
wholeSeriesOfferings: {
|
|
31326
31025
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
31327
31026
|
params: {
|
|
31328
31027
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -36289,22 +35988,6 @@ const systemBlockDefinitions = [
|
|
|
36289
35988
|
weight: "standard"
|
|
36290
35989
|
})]
|
|
36291
35990
|
})),
|
|
36292
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
36293
|
-
flow: conversionFlow,
|
|
36294
|
-
layoutProfiles: [layoutProfile({
|
|
36295
|
-
variantKey: "default",
|
|
36296
|
-
family: "form",
|
|
36297
|
-
weight: "standard"
|
|
36298
|
-
})]
|
|
36299
|
-
})),
|
|
36300
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
36301
|
-
flow: offeringsFlow,
|
|
36302
|
-
layoutProfiles: [layoutProfile({
|
|
36303
|
-
variantKey: "default",
|
|
36304
|
-
family: "stack",
|
|
36305
|
-
weight: "standard"
|
|
36306
|
-
})]
|
|
36307
|
-
})),
|
|
36308
35991
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
36309
35992
|
flow: offeringsFlow,
|
|
36310
35993
|
layoutProfiles: [layoutProfile({
|
|
@@ -37879,6 +37562,68 @@ function collectText(node) {
|
|
|
37879
37562
|
return (node.content ?? []).map(collectText).join("");
|
|
37880
37563
|
}
|
|
37881
37564
|
//#endregion
|
|
37565
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
37566
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
37567
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
37568
|
+
z.object({
|
|
37569
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
37570
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
37571
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
37572
|
+
remainderDueCount: z.number().int().positive(),
|
|
37573
|
+
intervalUnit: z.enum([
|
|
37574
|
+
"day",
|
|
37575
|
+
"week",
|
|
37576
|
+
"month"
|
|
37577
|
+
])
|
|
37578
|
+
}),
|
|
37579
|
+
z.object({
|
|
37580
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
37581
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
37582
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
37583
|
+
instalmentCount: z.number().int().positive(),
|
|
37584
|
+
intervalCount: z.number().int().positive(),
|
|
37585
|
+
intervalUnit: z.enum([
|
|
37586
|
+
"day",
|
|
37587
|
+
"week",
|
|
37588
|
+
"month"
|
|
37589
|
+
])
|
|
37590
|
+
}),
|
|
37591
|
+
z.object({
|
|
37592
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
37593
|
+
instalmentCount: z.number().int().positive(),
|
|
37594
|
+
intervalCount: z.number().int().positive(),
|
|
37595
|
+
intervalUnit: z.enum([
|
|
37596
|
+
"day",
|
|
37597
|
+
"week",
|
|
37598
|
+
"month"
|
|
37599
|
+
])
|
|
37600
|
+
})
|
|
37601
|
+
]);
|
|
37602
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
37603
|
+
kind: z.literal("relative_to_start_date"),
|
|
37604
|
+
daysBeforeStart: z.number().int().positive()
|
|
37605
|
+
}), z.object({
|
|
37606
|
+
kind: z.literal("fixed_calendar_date"),
|
|
37607
|
+
dueAt: z.string().datetime()
|
|
37608
|
+
})]);
|
|
37609
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
37610
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
37611
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
37612
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
37613
|
+
});
|
|
37614
|
+
z.discriminatedUnion("kind", [
|
|
37615
|
+
z.object({ kind: z.literal("upfront") }),
|
|
37616
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
37617
|
+
z.object({
|
|
37618
|
+
kind: z.literal("instalment_plan"),
|
|
37619
|
+
plan: bookingInstalmentPlanSchema
|
|
37620
|
+
}),
|
|
37621
|
+
z.object({
|
|
37622
|
+
kind: z.literal("flexible_balance"),
|
|
37623
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
37624
|
+
})
|
|
37625
|
+
]);
|
|
37626
|
+
//#endregion
|
|
37882
37627
|
//#region ../api/src/navigationMenuValidation.ts
|
|
37883
37628
|
function hasChildren(item) {
|
|
37884
37629
|
return Array.isArray(item.children) && item.children.length > 0;
|