@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
|
@@ -754,69 +754,8 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
754
754
|
}
|
|
755
755
|
});
|
|
756
756
|
//#endregion
|
|
757
|
-
//#region ../api/src/
|
|
758
|
-
const
|
|
759
|
-
listCourses: {
|
|
760
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
761
|
-
method: "GET",
|
|
762
|
-
auth: "user",
|
|
763
|
-
responseKind: "json"
|
|
764
|
-
},
|
|
765
|
-
exportCoursesCsv: {
|
|
766
|
-
path: "/sites/{siteId}/bookings/courses/export.csv",
|
|
767
|
-
method: "GET",
|
|
768
|
-
tags: [
|
|
769
|
-
"site-{siteId}",
|
|
770
|
-
"bookings",
|
|
771
|
-
"courses-{siteId}"
|
|
772
|
-
],
|
|
773
|
-
errors: [],
|
|
774
|
-
auth: "user",
|
|
775
|
-
responseKind: "blob"
|
|
776
|
-
},
|
|
777
|
-
createCourse: {
|
|
778
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
779
|
-
method: "POST",
|
|
780
|
-
auth: "user",
|
|
781
|
-
responseKind: "json",
|
|
782
|
-
errors: [
|
|
783
|
-
"validation:invalid_input",
|
|
784
|
-
"resource:not_found",
|
|
785
|
-
"resource:already_exists",
|
|
786
|
-
"resource:conflict",
|
|
787
|
-
"server:internal_error"
|
|
788
|
-
]
|
|
789
|
-
},
|
|
790
|
-
getCourse: {
|
|
791
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
792
|
-
method: "GET",
|
|
793
|
-
auth: "user",
|
|
794
|
-
responseKind: "json"
|
|
795
|
-
},
|
|
796
|
-
updateCourse: {
|
|
797
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
798
|
-
method: "PATCH",
|
|
799
|
-
auth: "user",
|
|
800
|
-
responseKind: "json",
|
|
801
|
-
errors: [
|
|
802
|
-
"validation:invalid_input",
|
|
803
|
-
"resource:not_found",
|
|
804
|
-
"resource:conflict",
|
|
805
|
-
"server:internal_error"
|
|
806
|
-
]
|
|
807
|
-
},
|
|
808
|
-
deleteCourse: {
|
|
809
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
810
|
-
method: "DELETE",
|
|
811
|
-
auth: "user",
|
|
812
|
-
responseKind: "json",
|
|
813
|
-
errors: [
|
|
814
|
-
"validation:invalid_input",
|
|
815
|
-
"resource:not_found",
|
|
816
|
-
"resource:conflict",
|
|
817
|
-
"server:internal_error"
|
|
818
|
-
]
|
|
819
|
-
},
|
|
757
|
+
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
758
|
+
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
820
759
|
deleteEventOffering: {
|
|
821
760
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
822
761
|
method: "DELETE",
|
|
@@ -829,20 +768,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
829
768
|
"server:internal_error"
|
|
830
769
|
]
|
|
831
770
|
},
|
|
832
|
-
|
|
833
|
-
path: "/sites/{siteId}/bookings/
|
|
834
|
-
method: "POST",
|
|
835
|
-
auth: "user",
|
|
836
|
-
responseKind: "json",
|
|
837
|
-
errors: [
|
|
838
|
-
"validation:invalid_input",
|
|
839
|
-
"resource:not_found",
|
|
840
|
-
"resource:already_exists",
|
|
841
|
-
"server:internal_error"
|
|
842
|
-
]
|
|
843
|
-
},
|
|
844
|
-
changeCourseContentOwnership: {
|
|
845
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/content-ownership",
|
|
771
|
+
changeEventSeriesContentOwnership: {
|
|
772
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/content-ownership",
|
|
846
773
|
method: "POST",
|
|
847
774
|
auth: "user",
|
|
848
775
|
responseKind: "json",
|
|
@@ -853,8 +780,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
853
780
|
"server:internal_error"
|
|
854
781
|
]
|
|
855
782
|
},
|
|
856
|
-
|
|
857
|
-
path: "/sites/{siteId}/bookings/
|
|
783
|
+
addEventSeriesRegistration: {
|
|
784
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
858
785
|
method: "POST",
|
|
859
786
|
auth: "user",
|
|
860
787
|
responseKind: "json",
|
|
@@ -865,33 +792,21 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
865
792
|
"server:internal_error"
|
|
866
793
|
]
|
|
867
794
|
},
|
|
868
|
-
|
|
869
|
-
path: "/sites/{siteId}/bookings/
|
|
795
|
+
listEventSeriesRegistrations: {
|
|
796
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
870
797
|
method: "GET",
|
|
871
798
|
auth: "user",
|
|
872
799
|
responseKind: "json"
|
|
873
800
|
},
|
|
874
|
-
|
|
875
|
-
path: "/sites/{siteId}/bookings/
|
|
801
|
+
exportEventSeriesRegistrationsCsv: {
|
|
802
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/export.csv",
|
|
876
803
|
method: "GET",
|
|
877
804
|
auth: "user",
|
|
878
805
|
errors: [],
|
|
879
806
|
responseKind: "blob"
|
|
880
807
|
},
|
|
881
|
-
|
|
882
|
-
path: "/sites/{siteId}/bookings/
|
|
883
|
-
method: "GET",
|
|
884
|
-
tags: [
|
|
885
|
-
"site-{siteId}",
|
|
886
|
-
"bookings",
|
|
887
|
-
"courses-{courseId}"
|
|
888
|
-
],
|
|
889
|
-
auth: "user",
|
|
890
|
-
responseKind: "blob",
|
|
891
|
-
errors: []
|
|
892
|
-
},
|
|
893
|
-
updateCourseEnrollment: {
|
|
894
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/enrollments/{enrollmentId}",
|
|
808
|
+
updateEventSeriesRegistration: {
|
|
809
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
895
810
|
method: "PATCH",
|
|
896
811
|
auth: "user",
|
|
897
812
|
responseKind: "json",
|
|
@@ -1279,71 +1194,35 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1279
1194
|
errors: ["resource:not_found", "server:internal_error"],
|
|
1280
1195
|
auth: "public",
|
|
1281
1196
|
responseKind: "json"
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
"auth:forbidden",
|
|
1290
|
-
"validation:invalid_input",
|
|
1291
|
-
"resource:not_found",
|
|
1292
|
-
"resource:conflict",
|
|
1293
|
-
"resource:already_exists",
|
|
1294
|
-
"server:internal_error"
|
|
1295
|
-
],
|
|
1296
|
-
auth: "public",
|
|
1297
|
-
responseKind: "json"
|
|
1298
|
-
},
|
|
1299
|
-
checkWholeSeriesEligibility: {
|
|
1300
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/check-eligibility",
|
|
1301
|
-
method: "POST",
|
|
1302
|
-
tags: [TAG_TEMPLATES.publicWholeSeriesOfferings, "course-enrollment"],
|
|
1303
|
-
errors: [
|
|
1304
|
-
"auth:unauthenticated",
|
|
1305
|
-
"resource:not_found",
|
|
1306
|
-
"resource:conflict",
|
|
1307
|
-
"server:internal_error"
|
|
1308
|
-
],
|
|
1309
|
-
auth: "public",
|
|
1310
|
-
responseKind: "json"
|
|
1311
|
-
},
|
|
1312
|
-
createWholeSeriesCheckout: {
|
|
1313
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
//#endregion
|
|
1200
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1201
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1202
|
+
getPublicEventRegistrationOptions: {
|
|
1203
|
+
path: "/public/sites/{siteId}/events/registration-options",
|
|
1314
1204
|
method: "POST",
|
|
1315
|
-
tags: [TAG_TEMPLATES.
|
|
1205
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration-options"],
|
|
1316
1206
|
auth: "public",
|
|
1317
1207
|
responseKind: "json",
|
|
1318
1208
|
errors: [
|
|
1319
|
-
"auth:unauthenticated",
|
|
1320
1209
|
"validation:invalid_input",
|
|
1321
1210
|
"resource:not_found",
|
|
1322
1211
|
"resource:conflict",
|
|
1323
1212
|
"server:internal_error"
|
|
1324
1213
|
]
|
|
1325
1214
|
},
|
|
1326
|
-
|
|
1327
|
-
path: "/public/sites/{siteId}/
|
|
1215
|
+
resolveEventSubroute: {
|
|
1216
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1328
1217
|
method: "GET",
|
|
1329
|
-
|
|
1330
|
-
|
|
1218
|
+
revalidate: 60,
|
|
1219
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1331
1220
|
auth: "public",
|
|
1332
|
-
responseKind: "json"
|
|
1221
|
+
responseKind: "json",
|
|
1222
|
+
errors: []
|
|
1333
1223
|
}
|
|
1334
1224
|
});
|
|
1335
1225
|
//#endregion
|
|
1336
|
-
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1337
|
-
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1338
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1339
|
-
method: "GET",
|
|
1340
|
-
revalidate: 60,
|
|
1341
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1342
|
-
auth: "public",
|
|
1343
|
-
responseKind: "json",
|
|
1344
|
-
errors: []
|
|
1345
|
-
} });
|
|
1346
|
-
//#endregion
|
|
1347
1226
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1348
1227
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1349
1228
|
listSiteApiKeys: {
|
|
@@ -1711,7 +1590,7 @@ const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1711
1590
|
}), 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, {
|
|
1712
1591
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1713
1592
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1714
|
-
...
|
|
1593
|
+
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
1715
1594
|
}, 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 };
|
|
1716
1595
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1717
1596
|
z.object({
|
|
@@ -1887,14 +1766,14 @@ function publicEventPricingType(pricing) {
|
|
|
1887
1766
|
case "single_paid":
|
|
1888
1767
|
case "ticket_types":
|
|
1889
1768
|
case "sliding_scale":
|
|
1890
|
-
case "
|
|
1769
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
1891
1770
|
case "external": return "external";
|
|
1892
1771
|
}
|
|
1893
1772
|
}
|
|
1894
1773
|
function isFreePublicEventPriceDisplay(display) {
|
|
1895
1774
|
switch (display.kind) {
|
|
1896
1775
|
case "free": return true;
|
|
1897
|
-
case "
|
|
1776
|
+
case "whole_series": return display.display.kind === "free";
|
|
1898
1777
|
case "exact":
|
|
1899
1778
|
case "from":
|
|
1900
1779
|
case "range":
|
|
@@ -2183,6 +2062,25 @@ function parseManagementKey(raw) {
|
|
|
2183
2062
|
return ok(createSecretInternal("management-key", raw));
|
|
2184
2063
|
}
|
|
2185
2064
|
//#endregion
|
|
2065
|
+
//#region ../core/src/planner.ts
|
|
2066
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
2067
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
2068
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
2069
|
+
function resolvePlanningNowDate(input = {}) {
|
|
2070
|
+
if (input.now !== void 0) return input.now;
|
|
2071
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
2072
|
+
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Resolve a Date-compatible planner input.
|
|
2075
|
+
*
|
|
2076
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
2077
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
2078
|
+
*/
|
|
2079
|
+
function resolvePlanningDateInput(input = {}) {
|
|
2080
|
+
if (input instanceof Date) return input;
|
|
2081
|
+
return resolvePlanningNowDate(input);
|
|
2082
|
+
}
|
|
2083
|
+
//#endregion
|
|
2186
2084
|
//#region ../core/src/event-series-behaviour.ts
|
|
2187
2085
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2188
2086
|
"class",
|
|
@@ -10642,7 +10540,7 @@ defineBlockAppearancePreset({
|
|
|
10642
10540
|
id: "schedule-details-brand-depth",
|
|
10643
10541
|
target: "events",
|
|
10644
10542
|
label: "Brand-depth schedule details",
|
|
10645
|
-
blockKinds: ["block.event-details"
|
|
10543
|
+
blockKinds: ["block.event-details"],
|
|
10646
10544
|
design: {
|
|
10647
10545
|
sectionSurface: "brand-depth-band",
|
|
10648
10546
|
contentFrame: plainFrame,
|
|
@@ -16841,7 +16739,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
16841
16739
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
16842
16740
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
16843
16741
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
16844
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
16845
16742
|
function bind(from, options) {
|
|
16846
16743
|
return (node) => ({
|
|
16847
16744
|
...node,
|
|
@@ -26482,12 +26379,12 @@ const RichTextDocSchema = z.object({
|
|
|
26482
26379
|
}).strict();
|
|
26483
26380
|
//#endregion
|
|
26484
26381
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
26485
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
26486
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
26382
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
26383
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
26487
26384
|
z.object({
|
|
26488
26385
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
26489
26386
|
depositAmountCents: z.number().int().min(0),
|
|
26490
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26387
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26491
26388
|
remainderDueCount: z.number().int().positive(),
|
|
26492
26389
|
intervalUnit: z.enum([
|
|
26493
26390
|
"day",
|
|
@@ -26498,7 +26395,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26498
26395
|
z.object({
|
|
26499
26396
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
26500
26397
|
depositAmountCents: z.number().int().min(0),
|
|
26501
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26398
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26502
26399
|
instalmentCount: z.number().int().positive(),
|
|
26503
26400
|
intervalCount: z.number().int().positive(),
|
|
26504
26401
|
intervalUnit: z.enum([
|
|
@@ -26518,28 +26415,28 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26518
26415
|
])
|
|
26519
26416
|
})
|
|
26520
26417
|
]);
|
|
26521
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
26418
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
26522
26419
|
kind: z.literal("relative_to_start_date"),
|
|
26523
26420
|
daysBeforeStart: z.number().int().positive()
|
|
26524
26421
|
}), z.object({
|
|
26525
26422
|
kind: z.literal("fixed_calendar_date"),
|
|
26526
26423
|
dueAt: z.string().datetime()
|
|
26527
26424
|
})]);
|
|
26528
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
26425
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
26529
26426
|
upfrontAmountCents: z.number().int().min(0),
|
|
26530
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
26531
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
26427
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
26428
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
26532
26429
|
});
|
|
26533
26430
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
26534
26431
|
z.object({ kind: z.literal("upfront") }),
|
|
26535
26432
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
26536
26433
|
z.object({
|
|
26537
26434
|
kind: z.literal("instalment_plan"),
|
|
26538
|
-
plan: bookingInstalmentPlanSchema
|
|
26435
|
+
plan: bookingInstalmentPlanSchema$1
|
|
26539
26436
|
}),
|
|
26540
26437
|
z.object({
|
|
26541
26438
|
kind: z.literal("flexible_balance"),
|
|
26542
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
26439
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
26543
26440
|
})
|
|
26544
26441
|
]);
|
|
26545
26442
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
@@ -26561,6 +26458,164 @@ const bookingRequirementConsentFieldSchema = z.object({
|
|
|
26561
26458
|
});
|
|
26562
26459
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26563
26460
|
//#endregion
|
|
26461
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
26462
|
+
function isSaleWindowOpen(option, now) {
|
|
26463
|
+
if (!option.isActive) return false;
|
|
26464
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
26465
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
26466
|
+
return true;
|
|
26467
|
+
}
|
|
26468
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
26469
|
+
if (amount <= 0) return {
|
|
26470
|
+
kind: "free",
|
|
26471
|
+
currency
|
|
26472
|
+
};
|
|
26473
|
+
return {
|
|
26474
|
+
kind: "exact",
|
|
26475
|
+
amount,
|
|
26476
|
+
currency
|
|
26477
|
+
};
|
|
26478
|
+
}
|
|
26479
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
26480
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
26481
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
26482
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
26483
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
26484
|
+
return left.name.localeCompare(right.name);
|
|
26485
|
+
});
|
|
26486
|
+
}
|
|
26487
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
26488
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
26489
|
+
const currency = offering.pricing.currency;
|
|
26490
|
+
switch (offering.pricing.pricingStrategy) {
|
|
26491
|
+
case "free": return resolveFreePricing(currency);
|
|
26492
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
26493
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
26494
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
26495
|
+
}
|
|
26496
|
+
}
|
|
26497
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
26498
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
26499
|
+
selectedSlidingAmount: null,
|
|
26500
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
26501
|
+
} : {
|
|
26502
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
26503
|
+
nowInput
|
|
26504
|
+
};
|
|
26505
|
+
}
|
|
26506
|
+
function resolveFreePricing(currency) {
|
|
26507
|
+
return {
|
|
26508
|
+
currency,
|
|
26509
|
+
display: {
|
|
26510
|
+
kind: "free",
|
|
26511
|
+
currency
|
|
26512
|
+
},
|
|
26513
|
+
selectableOptions: [],
|
|
26514
|
+
requiresSelection: false,
|
|
26515
|
+
selectedOption: null,
|
|
26516
|
+
slidingScale: null,
|
|
26517
|
+
selectedSlidingAmount: null,
|
|
26518
|
+
selectedPriceAmount: 0,
|
|
26519
|
+
selectedRequiresPayment: false,
|
|
26520
|
+
hasPaidSelection: false,
|
|
26521
|
+
hasFreeSelection: true
|
|
26522
|
+
};
|
|
26523
|
+
}
|
|
26524
|
+
function resolveSinglePricing(amount, currency) {
|
|
26525
|
+
return {
|
|
26526
|
+
currency,
|
|
26527
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
26528
|
+
selectableOptions: [],
|
|
26529
|
+
requiresSelection: false,
|
|
26530
|
+
selectedOption: null,
|
|
26531
|
+
slidingScale: null,
|
|
26532
|
+
selectedSlidingAmount: null,
|
|
26533
|
+
selectedPriceAmount: amount,
|
|
26534
|
+
selectedRequiresPayment: amount > 0,
|
|
26535
|
+
hasPaidSelection: amount > 0,
|
|
26536
|
+
hasFreeSelection: amount <= 0
|
|
26537
|
+
};
|
|
26538
|
+
}
|
|
26539
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
26540
|
+
const currency = offering.pricing.currency;
|
|
26541
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
26542
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
26543
|
+
return {
|
|
26544
|
+
currency,
|
|
26545
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
26546
|
+
selectableOptions,
|
|
26547
|
+
requiresSelection: selectableOptions.length > 1,
|
|
26548
|
+
selectedOption,
|
|
26549
|
+
slidingScale: null,
|
|
26550
|
+
selectedSlidingAmount: null,
|
|
26551
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
26552
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
26553
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
26554
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
26555
|
+
};
|
|
26556
|
+
}
|
|
26557
|
+
function resolveSelectedTier(options, selectedId) {
|
|
26558
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
26559
|
+
}
|
|
26560
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
26561
|
+
if (lowestAmount === null) return {
|
|
26562
|
+
kind: "unavailable",
|
|
26563
|
+
currency
|
|
26564
|
+
};
|
|
26565
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
26566
|
+
kind: "from",
|
|
26567
|
+
amount: lowestAmount,
|
|
26568
|
+
currency
|
|
26569
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
26570
|
+
}
|
|
26571
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
26572
|
+
const currency = offering.pricing.currency;
|
|
26573
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
26574
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
26575
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
26576
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
26577
|
+
return {
|
|
26578
|
+
currency,
|
|
26579
|
+
display: {
|
|
26580
|
+
kind: "range",
|
|
26581
|
+
minAmount,
|
|
26582
|
+
maxAmount,
|
|
26583
|
+
currency
|
|
26584
|
+
},
|
|
26585
|
+
selectableOptions: [],
|
|
26586
|
+
requiresSelection: selectedAmount === null,
|
|
26587
|
+
selectedOption: null,
|
|
26588
|
+
slidingScale: {
|
|
26589
|
+
minAmount,
|
|
26590
|
+
maxAmount,
|
|
26591
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
26592
|
+
},
|
|
26593
|
+
selectedSlidingAmount: selectedAmount,
|
|
26594
|
+
selectedPriceAmount: selectedAmount,
|
|
26595
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
26596
|
+
hasPaidSelection: maxAmount > 0,
|
|
26597
|
+
hasFreeSelection: minAmount === 0
|
|
26598
|
+
};
|
|
26599
|
+
}
|
|
26600
|
+
function unavailableSlidingScale(currency) {
|
|
26601
|
+
return {
|
|
26602
|
+
currency,
|
|
26603
|
+
display: {
|
|
26604
|
+
kind: "unavailable",
|
|
26605
|
+
currency
|
|
26606
|
+
},
|
|
26607
|
+
selectableOptions: [],
|
|
26608
|
+
requiresSelection: true,
|
|
26609
|
+
selectedOption: null,
|
|
26610
|
+
slidingScale: null,
|
|
26611
|
+
selectedSlidingAmount: null,
|
|
26612
|
+
selectedPriceAmount: null,
|
|
26613
|
+
selectedRequiresPayment: false,
|
|
26614
|
+
hasPaidSelection: false,
|
|
26615
|
+
hasFreeSelection: false
|
|
26616
|
+
};
|
|
26617
|
+
}
|
|
26618
|
+
//#endregion
|
|
26564
26619
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26565
26620
|
const wholeSeriesVenueSchema = z.object({
|
|
26566
26621
|
id: z.string(),
|
|
@@ -26620,6 +26675,13 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
26620
26675
|
title: z.string(),
|
|
26621
26676
|
slug: z.string(),
|
|
26622
26677
|
description: z.unknown().nullable(),
|
|
26678
|
+
deliveryMode: z.enum([
|
|
26679
|
+
"in_person",
|
|
26680
|
+
"online",
|
|
26681
|
+
"hybrid"
|
|
26682
|
+
]),
|
|
26683
|
+
waitlistEnabled: z.boolean(),
|
|
26684
|
+
requireGuestDetails: z.boolean(),
|
|
26623
26685
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
26624
26686
|
enrollmentOpen: z.boolean(),
|
|
26625
26687
|
pricing: wholeSeriesPricingSchema,
|
|
@@ -26735,10 +26797,11 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
26735
26797
|
paidToAmount: z.number(),
|
|
26736
26798
|
currency: z.string()
|
|
26737
26799
|
});
|
|
26738
|
-
const
|
|
26800
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
26739
26801
|
freePriceDisplaySchema,
|
|
26740
26802
|
exactPriceDisplaySchema,
|
|
26741
26803
|
fromPriceDisplaySchema,
|
|
26804
|
+
rangePriceDisplaySchema,
|
|
26742
26805
|
unavailablePriceDisplaySchema
|
|
26743
26806
|
]);
|
|
26744
26807
|
z.discriminatedUnion("kind", [
|
|
@@ -26753,8 +26816,8 @@ z.discriminatedUnion("kind", [
|
|
|
26753
26816
|
label: z.string()
|
|
26754
26817
|
}),
|
|
26755
26818
|
z.object({
|
|
26756
|
-
kind: z.literal("
|
|
26757
|
-
display:
|
|
26819
|
+
kind: z.literal("whole_series"),
|
|
26820
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26758
26821
|
})
|
|
26759
26822
|
]);
|
|
26760
26823
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -26856,10 +26919,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
26856
26919
|
})
|
|
26857
26920
|
}),
|
|
26858
26921
|
z.object({
|
|
26859
|
-
kind: z.literal("
|
|
26922
|
+
kind: z.literal("whole_series"),
|
|
26860
26923
|
display: z.object({
|
|
26861
|
-
kind: z.literal("
|
|
26862
|
-
display:
|
|
26924
|
+
kind: z.literal("whole_series"),
|
|
26925
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26863
26926
|
})
|
|
26864
26927
|
}),
|
|
26865
26928
|
z.object({
|
|
@@ -27276,7 +27339,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
27276
27339
|
};
|
|
27277
27340
|
return { kind: "unscoped" };
|
|
27278
27341
|
}
|
|
27279
|
-
function
|
|
27342
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27343
|
+
const scope = resolveEventRegistrationScope(context);
|
|
27280
27344
|
switch (scope.kind) {
|
|
27281
27345
|
case "occurrenceSeries":
|
|
27282
27346
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -27288,9 +27352,6 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
27288
27352
|
case "unscoped": return [...events];
|
|
27289
27353
|
}
|
|
27290
27354
|
}
|
|
27291
|
-
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27292
|
-
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
27293
|
-
}
|
|
27294
27355
|
//#endregion
|
|
27295
27356
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27296
27357
|
function planEventRegistrationScope(input) {
|
|
@@ -27384,14 +27445,14 @@ function isRecord$4(value) {
|
|
|
27384
27445
|
}
|
|
27385
27446
|
function isPublicEventPricing(value) {
|
|
27386
27447
|
if (!isRecord$4(value) || typeof value.kind !== "string") return false;
|
|
27387
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
27448
|
+
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";
|
|
27388
27449
|
}
|
|
27389
27450
|
function isPublicEventTicketType(value) {
|
|
27390
27451
|
return isRecord$4(value) && typeof value.id === "string";
|
|
27391
27452
|
}
|
|
27392
27453
|
function readTicketTypePriceDisplay(value, currency) {
|
|
27393
27454
|
const display = readLegacyPriceDisplay(value, currency);
|
|
27394
|
-
return display.kind === "
|
|
27455
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
27395
27456
|
kind: "unavailable",
|
|
27396
27457
|
currency
|
|
27397
27458
|
} : display;
|
|
@@ -27449,11 +27510,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27449
27510
|
kind: "unavailable",
|
|
27450
27511
|
currency: displayCurrency
|
|
27451
27512
|
};
|
|
27452
|
-
case "
|
|
27453
|
-
kind: "
|
|
27513
|
+
case "whole_series": return isRecord$4(value.display) ? {
|
|
27514
|
+
kind: "whole_series",
|
|
27454
27515
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
27455
27516
|
} : {
|
|
27456
|
-
kind: "
|
|
27517
|
+
kind: "whole_series",
|
|
27457
27518
|
display: {
|
|
27458
27519
|
kind: "unavailable",
|
|
27459
27520
|
currency: displayCurrency
|
|
@@ -27579,7 +27640,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
27579
27640
|
//#endregion
|
|
27580
27641
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
27581
27642
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
27582
|
-
return event.
|
|
27643
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
27583
27644
|
}
|
|
27584
27645
|
function findPreSelectedEvent(input) {
|
|
27585
27646
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -27605,12 +27666,127 @@ function toRegistrationEvent(event) {
|
|
|
27605
27666
|
return {
|
|
27606
27667
|
...event,
|
|
27607
27668
|
pricing: resolveRuntimeEventPricing(event),
|
|
27608
|
-
|
|
27609
|
-
|
|
27669
|
+
selectionId: event.id,
|
|
27670
|
+
registrationSubject: {
|
|
27671
|
+
kind: "occurrence",
|
|
27672
|
+
occurrenceId: event.occurrenceId
|
|
27673
|
+
}
|
|
27610
27674
|
};
|
|
27611
27675
|
}
|
|
27612
27676
|
function toRegistrationEvents(events) {
|
|
27613
|
-
return events.map(toRegistrationEvent);
|
|
27677
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
27678
|
+
}
|
|
27679
|
+
function toWholeSeriesTicketType(option) {
|
|
27680
|
+
return {
|
|
27681
|
+
...option,
|
|
27682
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
27683
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
27684
|
+
availability: {
|
|
27685
|
+
kind: "available",
|
|
27686
|
+
remainingCapacity: option.capacityLimit
|
|
27687
|
+
}
|
|
27688
|
+
};
|
|
27689
|
+
}
|
|
27690
|
+
function toWholeSeriesPricing(offering) {
|
|
27691
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
27692
|
+
switch (offering.pricing.pricingStrategy) {
|
|
27693
|
+
case "free": return {
|
|
27694
|
+
kind: "free_registration",
|
|
27695
|
+
currency: offering.currency,
|
|
27696
|
+
display: {
|
|
27697
|
+
kind: "free",
|
|
27698
|
+
currency: offering.currency
|
|
27699
|
+
}
|
|
27700
|
+
};
|
|
27701
|
+
case "single": {
|
|
27702
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
27703
|
+
return amount === 0 ? {
|
|
27704
|
+
kind: "free_registration",
|
|
27705
|
+
currency: offering.currency,
|
|
27706
|
+
display: {
|
|
27707
|
+
kind: "free",
|
|
27708
|
+
currency: offering.currency
|
|
27709
|
+
}
|
|
27710
|
+
} : {
|
|
27711
|
+
kind: "single_paid",
|
|
27712
|
+
amount,
|
|
27713
|
+
currency: offering.currency,
|
|
27714
|
+
display: {
|
|
27715
|
+
kind: "exact",
|
|
27716
|
+
amount,
|
|
27717
|
+
currency: offering.currency
|
|
27718
|
+
}
|
|
27719
|
+
};
|
|
27720
|
+
}
|
|
27721
|
+
case "tiered": return {
|
|
27722
|
+
kind: "ticket_types",
|
|
27723
|
+
currency: offering.currency,
|
|
27724
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
27725
|
+
display: resolved.display
|
|
27726
|
+
};
|
|
27727
|
+
case "sliding_scale": return {
|
|
27728
|
+
kind: "sliding_scale",
|
|
27729
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27730
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27731
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
27732
|
+
currency: offering.currency,
|
|
27733
|
+
display: {
|
|
27734
|
+
kind: "range",
|
|
27735
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27736
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27737
|
+
currency: offering.currency
|
|
27738
|
+
}
|
|
27739
|
+
};
|
|
27740
|
+
}
|
|
27741
|
+
}
|
|
27742
|
+
function toAttendanceModes(offering) {
|
|
27743
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
27744
|
+
mode,
|
|
27745
|
+
capacity: offering.enrollmentCapacity,
|
|
27746
|
+
registeredCount: offering.enrolledCount,
|
|
27747
|
+
availableSpots: offering.availableSpots,
|
|
27748
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
27749
|
+
}));
|
|
27750
|
+
}
|
|
27751
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
27752
|
+
const firstSession = offering.sessions[0];
|
|
27753
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
27754
|
+
return {
|
|
27755
|
+
selectionId: offering.eventSeriesId,
|
|
27756
|
+
registrationSubject: {
|
|
27757
|
+
kind: "wholeSeries",
|
|
27758
|
+
eventSeriesId: offering.eventSeriesId,
|
|
27759
|
+
sessions: offering.sessions
|
|
27760
|
+
},
|
|
27761
|
+
seriesId: offering.eventSeriesId,
|
|
27762
|
+
title: offering.title,
|
|
27763
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
27764
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
27765
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
27766
|
+
kind: "closed",
|
|
27767
|
+
reason: "enrollment_closed"
|
|
27768
|
+
},
|
|
27769
|
+
deliveryMode: offering.deliveryMode,
|
|
27770
|
+
attendanceModes: toAttendanceModes(offering),
|
|
27771
|
+
capacity: offering.enrollmentCapacity,
|
|
27772
|
+
registeredCount: offering.enrolledCount,
|
|
27773
|
+
availableSpots: offering.availableSpots,
|
|
27774
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
27775
|
+
venue: offering.venue ? {
|
|
27776
|
+
...offering.venue,
|
|
27777
|
+
location: null
|
|
27778
|
+
} : null,
|
|
27779
|
+
eventCategory: null,
|
|
27780
|
+
teamMembers: offering.teamMembers,
|
|
27781
|
+
status: offering.status,
|
|
27782
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
27783
|
+
pricing: toWholeSeriesPricing(offering),
|
|
27784
|
+
paymentTerms: offering.paymentTerms,
|
|
27785
|
+
consent: offering.consent,
|
|
27786
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
27787
|
+
acceptsPasses: false,
|
|
27788
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
27789
|
+
};
|
|
27614
27790
|
}
|
|
27615
27791
|
//#endregion
|
|
27616
27792
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -27636,11 +27812,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
27636
27812
|
maxTickets: z.string().optional(),
|
|
27637
27813
|
showVenue: z.boolean().optional(),
|
|
27638
27814
|
showCapacity: z.boolean().optional(),
|
|
27639
|
-
showSessions: z.boolean().optional(),
|
|
27640
|
-
showPrice: z.boolean().optional(),
|
|
27641
27815
|
successMessage: z.string().optional(),
|
|
27642
|
-
waitlistMessage: z.string().optional(),
|
|
27643
|
-
membershipMessage: z.string().optional(),
|
|
27644
27816
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27645
27817
|
overlayEnabled: z.boolean().optional(),
|
|
27646
27818
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -27710,6 +27882,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
27710
27882
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27711
27883
|
}
|
|
27712
27884
|
function buildEventRegistrationShellStepLabels(source) {
|
|
27885
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
27886
|
+
if (selectedOffering) {
|
|
27887
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
27888
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
27889
|
+
eligibility: null,
|
|
27890
|
+
selectedTicketType: null,
|
|
27891
|
+
event: selectedEvent
|
|
27892
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
27893
|
+
}
|
|
27713
27894
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
27714
27895
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
27715
27896
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -27724,13 +27905,16 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
27724
27905
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
27725
27906
|
}
|
|
27726
27907
|
function scopeEventRegistrationEvents(source) {
|
|
27908
|
+
return toRegistrationEvents(scopeEventRegistrationSourceEvents(source));
|
|
27909
|
+
}
|
|
27910
|
+
function scopeEventRegistrationSourceEvents(source) {
|
|
27727
27911
|
const scope = planEventRegistrationScope({
|
|
27728
|
-
events:
|
|
27912
|
+
events: source.events ?? [],
|
|
27729
27913
|
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
27730
27914
|
occurrenceContext: source.occurrenceContext,
|
|
27731
27915
|
subject: source.subject
|
|
27732
27916
|
});
|
|
27733
|
-
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
27917
|
+
return scope.kind === "invalidSelectedRun" ? [] : [...scope.events];
|
|
27734
27918
|
}
|
|
27735
27919
|
function shellLabelForRegistrationStep(step, events) {
|
|
27736
27920
|
switch (step) {
|
|
@@ -27762,30 +27946,29 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27762
27946
|
source: createZodCodec(eventRegistrationSourceSchema),
|
|
27763
27947
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
27764
27948
|
},
|
|
27765
|
-
buildRender: (source) =>
|
|
27766
|
-
|
|
27767
|
-
|
|
27768
|
-
|
|
27769
|
-
|
|
27770
|
-
|
|
27771
|
-
|
|
27772
|
-
|
|
27773
|
-
|
|
27774
|
-
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
|
|
27779
|
-
|
|
27780
|
-
|
|
27781
|
-
|
|
27782
|
-
|
|
27783
|
-
|
|
27784
|
-
|
|
27785
|
-
|
|
27786
|
-
|
|
27787
|
-
|
|
27788
|
-
})
|
|
27949
|
+
buildRender: (source) => {
|
|
27950
|
+
const events = source.events == null ? null : scopeEventRegistrationSourceEvents(source);
|
|
27951
|
+
return {
|
|
27952
|
+
display: buildEventRegistrationDisplay(source),
|
|
27953
|
+
hydration: {
|
|
27954
|
+
occurrenceContext: source.occurrenceContext ?? null,
|
|
27955
|
+
subject: source.subject ?? null,
|
|
27956
|
+
events,
|
|
27957
|
+
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
27958
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
27959
|
+
maxTickets: source.maxTickets ?? void 0,
|
|
27960
|
+
showVenue: source.showVenue,
|
|
27961
|
+
showCapacity: source.showCapacity,
|
|
27962
|
+
successMessage: source.successMessage,
|
|
27963
|
+
buttonVariant: source.buttonVariant,
|
|
27964
|
+
overlayEnabled: source.overlayEnabled,
|
|
27965
|
+
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
27966
|
+
supportEmail: source.supportEmail,
|
|
27967
|
+
sitePasses: source.sitePasses ?? null,
|
|
27968
|
+
siteMemberships: source.siteMemberships ?? null
|
|
27969
|
+
}
|
|
27970
|
+
};
|
|
27971
|
+
}
|
|
27789
27972
|
});
|
|
27790
27973
|
function normalizeEventRegistrationEventInput(value) {
|
|
27791
27974
|
if (!isRecord$3(value)) return value;
|
|
@@ -27893,24 +28076,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27893
28076
|
defaultValue: true,
|
|
27894
28077
|
ui: { intent: "display" }
|
|
27895
28078
|
},
|
|
27896
|
-
{
|
|
27897
|
-
id: "showSessions",
|
|
27898
|
-
type: "boolean",
|
|
27899
|
-
label: "Show complete schedule",
|
|
27900
|
-
description: "Display every session for whole-series registrations",
|
|
27901
|
-
required: false,
|
|
27902
|
-
defaultValue: true,
|
|
27903
|
-
ui: { intent: "display" }
|
|
27904
|
-
},
|
|
27905
|
-
{
|
|
27906
|
-
id: "showPrice",
|
|
27907
|
-
type: "boolean",
|
|
27908
|
-
label: "Show price",
|
|
27909
|
-
description: "Display the whole-series price",
|
|
27910
|
-
required: false,
|
|
27911
|
-
defaultValue: true,
|
|
27912
|
-
ui: { intent: "display" }
|
|
27913
|
-
},
|
|
27914
28079
|
{
|
|
27915
28080
|
id: "successMessage",
|
|
27916
28081
|
type: "text",
|
|
@@ -27921,26 +28086,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27921
28086
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
27922
28087
|
maxLength: 500
|
|
27923
28088
|
},
|
|
27924
|
-
{
|
|
27925
|
-
id: "waitlistMessage",
|
|
27926
|
-
type: "text",
|
|
27927
|
-
label: "Waitlist message",
|
|
27928
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
27929
|
-
required: false,
|
|
27930
|
-
multiline: true,
|
|
27931
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
27932
|
-
maxLength: 500
|
|
27933
|
-
},
|
|
27934
|
-
{
|
|
27935
|
-
id: "membershipMessage",
|
|
27936
|
-
type: "text",
|
|
27937
|
-
label: "Membership registration message",
|
|
27938
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
27939
|
-
required: false,
|
|
27940
|
-
multiline: true,
|
|
27941
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
27942
|
-
maxLength: 500
|
|
27943
|
-
},
|
|
27944
28089
|
{
|
|
27945
28090
|
id: "buttonText",
|
|
27946
28091
|
type: "text",
|
|
@@ -27972,11 +28117,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
27972
28117
|
} },
|
|
27973
28118
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
27974
28119
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
27975
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
27976
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
27977
28120
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
27978
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
27979
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
27980
28121
|
buttonText: { $bind: {
|
|
27981
28122
|
from: "content.buttonText",
|
|
27982
28123
|
fallback: "Complete Registration"
|
|
@@ -28093,254 +28234,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
28093
28234
|
}
|
|
28094
28235
|
};
|
|
28095
28236
|
//#endregion
|
|
28096
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
28097
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
28098
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
28099
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
28100
|
-
showSessions: z.boolean().optional(),
|
|
28101
|
-
showPrice: z.boolean().optional(),
|
|
28102
|
-
showCapacity: z.boolean().optional(),
|
|
28103
|
-
showVenue: z.boolean().optional(),
|
|
28104
|
-
successMessage: z.string().optional(),
|
|
28105
|
-
waitlistMessage: z.string().optional(),
|
|
28106
|
-
membershipMessage: z.string().optional(),
|
|
28107
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28108
|
-
};
|
|
28109
|
-
const courseRegistrationSourceSchema = z.object({
|
|
28110
|
-
siteId: z.string().optional(),
|
|
28111
|
-
apiBaseUrl: z.string().optional(),
|
|
28112
|
-
portalToken: z.string().nullable().optional(),
|
|
28113
|
-
...courseRegistrationHydrationSchemaShape,
|
|
28114
|
-
className: z.string().nullable().optional(),
|
|
28115
|
-
buttonText: z.string().nullable().optional(),
|
|
28116
|
-
stage: previewStageSchema.optional()
|
|
28117
|
-
});
|
|
28118
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
28119
|
-
kind: z.literal("course-registration"),
|
|
28120
|
-
state: z.literal("shell"),
|
|
28121
|
-
className: z.string().nullable(),
|
|
28122
|
-
summaryButtonText: z.string()
|
|
28123
|
-
});
|
|
28124
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
28125
|
-
const courseRegistrationRenderSchema = z.object({
|
|
28126
|
-
display: courseRegistrationDisplaySchema,
|
|
28127
|
-
hydration: courseRegistrationHydrationSchema
|
|
28128
|
-
});
|
|
28129
|
-
z.object({
|
|
28130
|
-
siteId: z.string().optional(),
|
|
28131
|
-
apiBaseUrl: z.string().optional(),
|
|
28132
|
-
portalToken: z.string().nullable().optional(),
|
|
28133
|
-
stage: previewStageSchema.optional()
|
|
28134
|
-
});
|
|
28135
|
-
function buildCourseRegistrationDisplay(source) {
|
|
28136
|
-
return {
|
|
28137
|
-
kind: "course-registration",
|
|
28138
|
-
state: "shell",
|
|
28139
|
-
className: source.className ?? null,
|
|
28140
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
28141
|
-
};
|
|
28142
|
-
}
|
|
28143
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
28144
|
-
kind: "client-owned",
|
|
28145
|
-
contracts: {
|
|
28146
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
28147
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
28148
|
-
},
|
|
28149
|
-
buildRender: (source) => ({
|
|
28150
|
-
display: buildCourseRegistrationDisplay(source),
|
|
28151
|
-
hydration: {
|
|
28152
|
-
subject: source.subject ?? null,
|
|
28153
|
-
courses: source.courses ?? null,
|
|
28154
|
-
showSessions: source.showSessions,
|
|
28155
|
-
showPrice: source.showPrice,
|
|
28156
|
-
showCapacity: source.showCapacity,
|
|
28157
|
-
showVenue: source.showVenue,
|
|
28158
|
-
successMessage: source.successMessage,
|
|
28159
|
-
waitlistMessage: source.waitlistMessage,
|
|
28160
|
-
membershipMessage: source.membershipMessage,
|
|
28161
|
-
buttonVariant: source.buttonVariant
|
|
28162
|
-
}
|
|
28163
|
-
})
|
|
28164
|
-
});
|
|
28165
|
-
const courseRegistrationBlockDefinition = {
|
|
28166
|
-
manifest: createBlockManifest({
|
|
28167
|
-
id: "block.course-registration",
|
|
28168
|
-
version: "1.0.0",
|
|
28169
|
-
title: "Course Registration",
|
|
28170
|
-
titleSource: "heading",
|
|
28171
|
-
description: "Enrollment form for multi-session courses",
|
|
28172
|
-
category: "interactive",
|
|
28173
|
-
contentSource: { kind: "inline" },
|
|
28174
|
-
tags: [
|
|
28175
|
-
"courses",
|
|
28176
|
-
"enrollment",
|
|
28177
|
-
"booking",
|
|
28178
|
-
"form",
|
|
28179
|
-
"signup",
|
|
28180
|
-
"education"
|
|
28181
|
-
],
|
|
28182
|
-
icon: "GraduationCap",
|
|
28183
|
-
styleTokens: {
|
|
28184
|
-
background: "surface",
|
|
28185
|
-
typography: "body",
|
|
28186
|
-
spacing: "md"
|
|
28187
|
-
},
|
|
28188
|
-
behaviours: {
|
|
28189
|
-
supportsThemeSwitching: true,
|
|
28190
|
-
inlineEditing: false,
|
|
28191
|
-
animation: false,
|
|
28192
|
-
paletteHidden: false
|
|
28193
|
-
},
|
|
28194
|
-
additionalFields: [
|
|
28195
|
-
{
|
|
28196
|
-
id: "heading",
|
|
28197
|
-
type: "text",
|
|
28198
|
-
label: "Heading",
|
|
28199
|
-
description: "Main heading for the registration form",
|
|
28200
|
-
required: false,
|
|
28201
|
-
multiline: false,
|
|
28202
|
-
defaultValue: "Sign up"
|
|
28203
|
-
},
|
|
28204
|
-
{
|
|
28205
|
-
id: "description",
|
|
28206
|
-
type: "richText",
|
|
28207
|
-
label: "Description",
|
|
28208
|
-
description: "Optional introductory text",
|
|
28209
|
-
required: false
|
|
28210
|
-
},
|
|
28211
|
-
{
|
|
28212
|
-
id: "showSessions",
|
|
28213
|
-
type: "boolean",
|
|
28214
|
-
label: "Show sessions",
|
|
28215
|
-
description: "Display the list of course sessions",
|
|
28216
|
-
required: false,
|
|
28217
|
-
defaultValue: true,
|
|
28218
|
-
ui: { intent: "display" }
|
|
28219
|
-
},
|
|
28220
|
-
{
|
|
28221
|
-
id: "showPrice",
|
|
28222
|
-
type: "boolean",
|
|
28223
|
-
label: "Show price",
|
|
28224
|
-
description: "Display the course price",
|
|
28225
|
-
required: false,
|
|
28226
|
-
defaultValue: true,
|
|
28227
|
-
ui: { intent: "display" }
|
|
28228
|
-
},
|
|
28229
|
-
{
|
|
28230
|
-
id: "showCapacity",
|
|
28231
|
-
type: "boolean",
|
|
28232
|
-
label: "Show available spots",
|
|
28233
|
-
description: "Display remaining enrollment capacity",
|
|
28234
|
-
required: false,
|
|
28235
|
-
defaultValue: true,
|
|
28236
|
-
ui: { intent: "display" }
|
|
28237
|
-
},
|
|
28238
|
-
{
|
|
28239
|
-
id: "showVenue",
|
|
28240
|
-
type: "boolean",
|
|
28241
|
-
label: "Show venue",
|
|
28242
|
-
description: "Display venue information",
|
|
28243
|
-
required: false,
|
|
28244
|
-
defaultValue: true,
|
|
28245
|
-
ui: { intent: "display" }
|
|
28246
|
-
},
|
|
28247
|
-
{
|
|
28248
|
-
id: "successMessage",
|
|
28249
|
-
type: "text",
|
|
28250
|
-
label: "Success message",
|
|
28251
|
-
description: "Message shown after successful enrollment",
|
|
28252
|
-
required: false,
|
|
28253
|
-
multiline: true,
|
|
28254
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
28255
|
-
maxLength: 500
|
|
28256
|
-
},
|
|
28257
|
-
{
|
|
28258
|
-
id: "waitlistMessage",
|
|
28259
|
-
type: "text",
|
|
28260
|
-
label: "Waitlist message",
|
|
28261
|
-
description: "Message when added to waitlist",
|
|
28262
|
-
required: false,
|
|
28263
|
-
multiline: true,
|
|
28264
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
28265
|
-
maxLength: 500
|
|
28266
|
-
},
|
|
28267
|
-
{
|
|
28268
|
-
id: "membershipMessage",
|
|
28269
|
-
type: "text",
|
|
28270
|
-
label: "Membership enrollment message",
|
|
28271
|
-
description: "Message when enrolled using a membership",
|
|
28272
|
-
required: false,
|
|
28273
|
-
multiline: true,
|
|
28274
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
28275
|
-
maxLength: 500
|
|
28276
|
-
},
|
|
28277
|
-
{
|
|
28278
|
-
id: "buttonText",
|
|
28279
|
-
type: "text",
|
|
28280
|
-
label: "Submit button text",
|
|
28281
|
-
description: "Text for the enrollment submit button",
|
|
28282
|
-
required: false,
|
|
28283
|
-
multiline: false,
|
|
28284
|
-
defaultValue: "Sign up",
|
|
28285
|
-
maxLength: 40
|
|
28286
|
-
},
|
|
28287
|
-
createButtonVariantField()
|
|
28288
|
-
],
|
|
28289
|
-
layout: [styledSection({
|
|
28290
|
-
baseClass: "",
|
|
28291
|
-
spacing: "spacious",
|
|
28292
|
-
children: sectionContainer([
|
|
28293
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28294
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28295
|
-
courseRegistration(withApiBindings({
|
|
28296
|
-
subject: { $bind: {
|
|
28297
|
-
from: "$root.subject",
|
|
28298
|
-
fallback: null
|
|
28299
|
-
} },
|
|
28300
|
-
portalToken: { $bind: {
|
|
28301
|
-
from: "$root.portalToken",
|
|
28302
|
-
fallback: null
|
|
28303
|
-
} },
|
|
28304
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
28305
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
28306
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
28307
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28308
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
28309
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
28310
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
28311
|
-
buttonText: { $bind: {
|
|
28312
|
-
from: "content.buttonText",
|
|
28313
|
-
fallback: "Sign up"
|
|
28314
|
-
} },
|
|
28315
|
-
buttonVariant: { $bind: {
|
|
28316
|
-
from: "content.buttonVariant",
|
|
28317
|
-
fallback: "primary"
|
|
28318
|
-
} },
|
|
28319
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28320
|
-
stage: { $bind: {
|
|
28321
|
-
from: "$root.previewStage",
|
|
28322
|
-
fallback: "published"
|
|
28323
|
-
} }
|
|
28324
|
-
}))
|
|
28325
|
-
], { gap: "lg" })
|
|
28326
|
-
})]
|
|
28327
|
-
}),
|
|
28328
|
-
runtime: courseRegistrationBlockRuntime,
|
|
28329
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28330
|
-
dataLoaders: { courses: {
|
|
28331
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28332
|
-
params: {
|
|
28333
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28334
|
-
limit: "50",
|
|
28335
|
-
stage: { $bind: {
|
|
28336
|
-
from: "$root.previewStage",
|
|
28337
|
-
fallback: "published"
|
|
28338
|
-
} }
|
|
28339
|
-
},
|
|
28340
|
-
mode: "server"
|
|
28341
|
-
} }
|
|
28342
|
-
};
|
|
28343
|
-
//#endregion
|
|
28344
28237
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
28345
28238
|
/**
|
|
28346
28239
|
* Event Details Block
|
|
@@ -28587,200 +28480,6 @@ const eventDetailsBlockDefinition = {
|
|
|
28587
28480
|
mode: "server"
|
|
28588
28481
|
} }
|
|
28589
28482
|
};
|
|
28590
|
-
const courseDetailsBlockDefinition = {
|
|
28591
|
-
manifest: createBlockManifest({
|
|
28592
|
-
id: "block.course-details",
|
|
28593
|
-
version: "1.0.0",
|
|
28594
|
-
title: "Course Details",
|
|
28595
|
-
titleSource: "heading",
|
|
28596
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
28597
|
-
category: "content",
|
|
28598
|
-
contentSource: { kind: "entries" },
|
|
28599
|
-
tags: [
|
|
28600
|
-
"courses",
|
|
28601
|
-
"schedule",
|
|
28602
|
-
"sessions",
|
|
28603
|
-
"venue",
|
|
28604
|
-
"pricing"
|
|
28605
|
-
],
|
|
28606
|
-
icon: "GraduationCap",
|
|
28607
|
-
styleTokens: {
|
|
28608
|
-
background: "surface",
|
|
28609
|
-
typography: "body",
|
|
28610
|
-
spacing: "md"
|
|
28611
|
-
},
|
|
28612
|
-
behaviours: {
|
|
28613
|
-
supportsThemeSwitching: true,
|
|
28614
|
-
inlineEditing: false,
|
|
28615
|
-
animation: false,
|
|
28616
|
-
paletteHidden: false
|
|
28617
|
-
},
|
|
28618
|
-
additionalFields: [
|
|
28619
|
-
{
|
|
28620
|
-
id: "heading",
|
|
28621
|
-
type: "text",
|
|
28622
|
-
label: "Heading",
|
|
28623
|
-
description: "Optional heading shown above course details",
|
|
28624
|
-
required: false,
|
|
28625
|
-
multiline: false,
|
|
28626
|
-
defaultValue: "Course details"
|
|
28627
|
-
},
|
|
28628
|
-
{
|
|
28629
|
-
id: "showTitle",
|
|
28630
|
-
type: "boolean",
|
|
28631
|
-
label: "Show course title",
|
|
28632
|
-
required: false,
|
|
28633
|
-
defaultValue: false,
|
|
28634
|
-
ui: { intent: "display" }
|
|
28635
|
-
},
|
|
28636
|
-
{
|
|
28637
|
-
id: "showDescription",
|
|
28638
|
-
type: "boolean",
|
|
28639
|
-
label: "Show course description",
|
|
28640
|
-
description: "Render the course description from the bookings course record",
|
|
28641
|
-
required: false,
|
|
28642
|
-
defaultValue: false,
|
|
28643
|
-
ui: { intent: "display" }
|
|
28644
|
-
},
|
|
28645
|
-
{
|
|
28646
|
-
id: "showSessions",
|
|
28647
|
-
type: "boolean",
|
|
28648
|
-
label: "Show sessions",
|
|
28649
|
-
required: false,
|
|
28650
|
-
defaultValue: true,
|
|
28651
|
-
ui: { intent: "display" }
|
|
28652
|
-
},
|
|
28653
|
-
{
|
|
28654
|
-
id: "sessionsLimit",
|
|
28655
|
-
type: "select",
|
|
28656
|
-
label: "Sessions limit",
|
|
28657
|
-
required: false,
|
|
28658
|
-
multiple: false,
|
|
28659
|
-
defaultValue: "10",
|
|
28660
|
-
options: [
|
|
28661
|
-
{
|
|
28662
|
-
value: "3",
|
|
28663
|
-
label: "3 sessions"
|
|
28664
|
-
},
|
|
28665
|
-
{
|
|
28666
|
-
value: "5",
|
|
28667
|
-
label: "5 sessions"
|
|
28668
|
-
},
|
|
28669
|
-
{
|
|
28670
|
-
value: "10",
|
|
28671
|
-
label: "10 sessions"
|
|
28672
|
-
},
|
|
28673
|
-
{
|
|
28674
|
-
value: "all",
|
|
28675
|
-
label: "All sessions"
|
|
28676
|
-
}
|
|
28677
|
-
],
|
|
28678
|
-
ui: { intent: "display" }
|
|
28679
|
-
},
|
|
28680
|
-
{
|
|
28681
|
-
id: "showVenue",
|
|
28682
|
-
type: "boolean",
|
|
28683
|
-
label: "Show venue",
|
|
28684
|
-
required: false,
|
|
28685
|
-
defaultValue: true,
|
|
28686
|
-
ui: { intent: "display" }
|
|
28687
|
-
},
|
|
28688
|
-
{
|
|
28689
|
-
id: "showPrice",
|
|
28690
|
-
type: "boolean",
|
|
28691
|
-
label: "Show price",
|
|
28692
|
-
required: false,
|
|
28693
|
-
defaultValue: true,
|
|
28694
|
-
ui: { intent: "display" }
|
|
28695
|
-
},
|
|
28696
|
-
{
|
|
28697
|
-
id: "showCapacity",
|
|
28698
|
-
type: "boolean",
|
|
28699
|
-
label: "Show capacity",
|
|
28700
|
-
required: false,
|
|
28701
|
-
defaultValue: true,
|
|
28702
|
-
ui: { intent: "display" }
|
|
28703
|
-
},
|
|
28704
|
-
{
|
|
28705
|
-
id: "showEnrollmentStatus",
|
|
28706
|
-
type: "boolean",
|
|
28707
|
-
label: "Show enrollment status",
|
|
28708
|
-
required: false,
|
|
28709
|
-
defaultValue: true,
|
|
28710
|
-
ui: { intent: "display" }
|
|
28711
|
-
},
|
|
28712
|
-
{
|
|
28713
|
-
id: "showMembershipNote",
|
|
28714
|
-
type: "boolean",
|
|
28715
|
-
label: "Show membership note",
|
|
28716
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
28717
|
-
required: false,
|
|
28718
|
-
defaultValue: true,
|
|
28719
|
-
ui: { intent: "display" }
|
|
28720
|
-
}
|
|
28721
|
-
],
|
|
28722
|
-
layout: [styledSection({
|
|
28723
|
-
baseClass: "",
|
|
28724
|
-
spacing: "spacious",
|
|
28725
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
28726
|
-
subject: { $bind: {
|
|
28727
|
-
from: "$root.subject",
|
|
28728
|
-
fallback: null
|
|
28729
|
-
} },
|
|
28730
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28731
|
-
showTitle: { $bind: {
|
|
28732
|
-
from: "content.showTitle",
|
|
28733
|
-
fallback: false
|
|
28734
|
-
} },
|
|
28735
|
-
showDescription: { $bind: {
|
|
28736
|
-
from: "content.showDescription",
|
|
28737
|
-
fallback: false
|
|
28738
|
-
} },
|
|
28739
|
-
showSessions: { $bind: {
|
|
28740
|
-
from: "content.showSessions",
|
|
28741
|
-
fallback: true
|
|
28742
|
-
} },
|
|
28743
|
-
sessionsLimit: { $bind: {
|
|
28744
|
-
from: "content.sessionsLimit",
|
|
28745
|
-
fallback: "10"
|
|
28746
|
-
} },
|
|
28747
|
-
showVenue: { $bind: {
|
|
28748
|
-
from: "content.showVenue",
|
|
28749
|
-
fallback: true
|
|
28750
|
-
} },
|
|
28751
|
-
showPrice: { $bind: {
|
|
28752
|
-
from: "content.showPrice",
|
|
28753
|
-
fallback: true
|
|
28754
|
-
} },
|
|
28755
|
-
showCapacity: { $bind: {
|
|
28756
|
-
from: "content.showCapacity",
|
|
28757
|
-
fallback: true
|
|
28758
|
-
} },
|
|
28759
|
-
showEnrollmentStatus: { $bind: {
|
|
28760
|
-
from: "content.showEnrollmentStatus",
|
|
28761
|
-
fallback: true
|
|
28762
|
-
} },
|
|
28763
|
-
showMembershipNote: { $bind: {
|
|
28764
|
-
from: "content.showMembershipNote",
|
|
28765
|
-
fallback: true
|
|
28766
|
-
} }
|
|
28767
|
-
})], { gap: "lg" })
|
|
28768
|
-
})]
|
|
28769
|
-
}),
|
|
28770
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28771
|
-
dataLoaders: { courses: {
|
|
28772
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28773
|
-
params: {
|
|
28774
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28775
|
-
limit: "50",
|
|
28776
|
-
stage: { $bind: {
|
|
28777
|
-
from: "$root.previewStage",
|
|
28778
|
-
fallback: "published"
|
|
28779
|
-
} }
|
|
28780
|
-
},
|
|
28781
|
-
mode: "server"
|
|
28782
|
-
} }
|
|
28783
|
-
};
|
|
28784
28483
|
const eventSpotlightBlockDefinition = {
|
|
28785
28484
|
manifest: createBlockManifest({
|
|
28786
28485
|
id: "block.event-spotlight",
|
|
@@ -31220,7 +30919,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
31220
30919
|
fallback: "published"
|
|
31221
30920
|
} },
|
|
31222
30921
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
31223
|
-
|
|
30922
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
31224
30923
|
...offeringsPreviewEventDataBindings
|
|
31225
30924
|
})
|
|
31226
30925
|
], { gap: "lg" }),
|
|
@@ -31237,7 +30936,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31237
30936
|
dataSchemas: {
|
|
31238
30937
|
...offeringsPreviewEventDataSchemas,
|
|
31239
30938
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
31240
|
-
|
|
30939
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
31241
30940
|
},
|
|
31242
30941
|
dataLoaders: {
|
|
31243
30942
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31246,7 +30945,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31246
30945
|
params: {},
|
|
31247
30946
|
mode: "server"
|
|
31248
30947
|
},
|
|
31249
|
-
|
|
30948
|
+
wholeSeriesOfferings: {
|
|
31250
30949
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
31251
30950
|
params: {
|
|
31252
30951
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -36213,22 +35912,6 @@ const systemBlockDefinitions = [
|
|
|
36213
35912
|
weight: "standard"
|
|
36214
35913
|
})]
|
|
36215
35914
|
})),
|
|
36216
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
36217
|
-
flow: conversionFlow,
|
|
36218
|
-
layoutProfiles: [layoutProfile({
|
|
36219
|
-
variantKey: "default",
|
|
36220
|
-
family: "form",
|
|
36221
|
-
weight: "standard"
|
|
36222
|
-
})]
|
|
36223
|
-
})),
|
|
36224
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
36225
|
-
flow: offeringsFlow,
|
|
36226
|
-
layoutProfiles: [layoutProfile({
|
|
36227
|
-
variantKey: "default",
|
|
36228
|
-
family: "stack",
|
|
36229
|
-
weight: "standard"
|
|
36230
|
-
})]
|
|
36231
|
-
})),
|
|
36232
35915
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
36233
35916
|
flow: offeringsFlow,
|
|
36234
35917
|
layoutProfiles: [layoutProfile({
|
|
@@ -37803,6 +37486,68 @@ function collectText(node) {
|
|
|
37803
37486
|
return (node.content ?? []).map(collectText).join("");
|
|
37804
37487
|
}
|
|
37805
37488
|
//#endregion
|
|
37489
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
37490
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
37491
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
37492
|
+
z.object({
|
|
37493
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
37494
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
37495
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
37496
|
+
remainderDueCount: z.number().int().positive(),
|
|
37497
|
+
intervalUnit: z.enum([
|
|
37498
|
+
"day",
|
|
37499
|
+
"week",
|
|
37500
|
+
"month"
|
|
37501
|
+
])
|
|
37502
|
+
}),
|
|
37503
|
+
z.object({
|
|
37504
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
37505
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
37506
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
37507
|
+
instalmentCount: z.number().int().positive(),
|
|
37508
|
+
intervalCount: z.number().int().positive(),
|
|
37509
|
+
intervalUnit: z.enum([
|
|
37510
|
+
"day",
|
|
37511
|
+
"week",
|
|
37512
|
+
"month"
|
|
37513
|
+
])
|
|
37514
|
+
}),
|
|
37515
|
+
z.object({
|
|
37516
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
37517
|
+
instalmentCount: z.number().int().positive(),
|
|
37518
|
+
intervalCount: z.number().int().positive(),
|
|
37519
|
+
intervalUnit: z.enum([
|
|
37520
|
+
"day",
|
|
37521
|
+
"week",
|
|
37522
|
+
"month"
|
|
37523
|
+
])
|
|
37524
|
+
})
|
|
37525
|
+
]);
|
|
37526
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
37527
|
+
kind: z.literal("relative_to_start_date"),
|
|
37528
|
+
daysBeforeStart: z.number().int().positive()
|
|
37529
|
+
}), z.object({
|
|
37530
|
+
kind: z.literal("fixed_calendar_date"),
|
|
37531
|
+
dueAt: z.string().datetime()
|
|
37532
|
+
})]);
|
|
37533
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
37534
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
37535
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
37536
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
37537
|
+
});
|
|
37538
|
+
z.discriminatedUnion("kind", [
|
|
37539
|
+
z.object({ kind: z.literal("upfront") }),
|
|
37540
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
37541
|
+
z.object({
|
|
37542
|
+
kind: z.literal("instalment_plan"),
|
|
37543
|
+
plan: bookingInstalmentPlanSchema
|
|
37544
|
+
}),
|
|
37545
|
+
z.object({
|
|
37546
|
+
kind: z.literal("flexible_balance"),
|
|
37547
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
37548
|
+
})
|
|
37549
|
+
]);
|
|
37550
|
+
//#endregion
|
|
37806
37551
|
//#region ../api/src/navigationMenuValidation.ts
|
|
37807
37552
|
function hasChildren(item) {
|
|
37808
37553
|
return Array.isArray(item.children) && item.children.length > 0;
|