@riverbankcms/sdk 0.132.0 → 0.135.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -3
- package/README.md +1 -1
- package/dist/{PreviewEditorSidebar-DKQ5eFK9.mjs → PreviewEditorSidebar-roNY0GVy.mjs} +4 -4
- package/dist/{PreviewEditorUI-CNTcOjCC.mjs → PreviewEditorUI-KboDbEh_.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D51gQaG3.mjs → PreviewQueryProvider-DcgaESkm.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DJu3qu33.mjs → SdkPreviewModeRuntime-DBrF7Caa.mjs} +48 -17
- package/dist/{SiteChromeCustomizeContext-2TzT3vbj.mjs → SiteChromeCustomizeContext-DrIEpJKn.mjs} +4351 -7964
- package/dist/_dts/ai/src/contracts/proposals.d.ts +549 -549
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +234 -234
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +1 -1
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +25 -60
- package/dist/_dts/api/src/bookingOperations.d.ts +111 -173
- 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 +7 -11
- 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/contentRuntime.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +30 -110
- 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/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/participantMessaging.d.ts +2 -2
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- 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 +88 -6
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +1 -1
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +9 -98
- 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 +2 -2
- package/dist/_dts/api/src/sdkThemeWire.d.ts +50 -50
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/siteOperations.d.ts +2 -2
- package/dist/_dts/api/src/types.d.ts +2 -2
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/api/src/{courses.d.ts → wholeSeriesOfferings.d.ts} +43 -95
- package/dist/_dts/blocks/src/client.d.ts +1 -6
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +33 -166
- package/dist/_dts/blocks/src/index.d.ts +3 -2
- 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/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +147 -42
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +46 -24
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +6 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +0 -2
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +5 -4
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/scheduleSummary.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/node/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/appointments.d.ts +2 -11
- 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 +100 -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/multi-step/DynamicFormFields.d.ts +3 -19
- 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/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/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/registrationSurface.d.ts +18 -1
- 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 +24 -9
- 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/validation.d.ts +2 -1
- 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 +40 -18
- 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/BookingConsentAgreement.d.ts +7 -0
- 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 +2 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/checkoutUrls.d.ts +2 -2
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- 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/content-types/schema.d.ts +4 -4
- 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/booking-consent.d.ts +8 -0
- 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/index.d.ts +1 -0
- 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 +899 -2157
- package/dist/_dts/db/src/schemas/forms.d.ts +21 -21
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -4
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +4 -5
- package/dist/_dts/sdk/src/bookings/types.d.ts +8 -60
- package/dist/_dts/sdk/src/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -19
- 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/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +0 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +12 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +72 -72
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +82 -82
- 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/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/client/{usePolling-M5jG675x.mjs → BookingConsentAgreement-BQqwi8Oa.mjs} +180 -4
- package/dist/client/{DiscountCodeDisclosure-DO7llLxm.mjs → DiscountCodeDisclosure-B97aMo0V.mjs} +13 -27
- package/dist/client/{EventCombined.client-xID7zN__.mjs → EventCombined.client-Bs2Iw9Q6.mjs} +3 -3
- package/dist/client/{EventListing.client-CriBslp0.mjs → EventListing.client-C4QUQdmg.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DYmHnM8g.mjs → LeafletStaticMap-CwWRk69M.mjs} +1 -1
- package/dist/client/{accordion-CgFbnnnQ.mjs → accordion-BA0j8Mpw.mjs} +1 -1
- package/dist/client/{bookingForm-dUyGpbxc.mjs → bookingForm-Br2e41H0.mjs} +72 -47
- package/dist/client/bookings.mjs +1987 -2132
- package/dist/client/{carousel-BvBwkUzx.mjs → carousel-B4dmwnpD.mjs} +1 -1
- package/dist/client/{cart-DiZENT2E.mjs → cart-B_ckGW4b.mjs} +3 -3
- package/dist/client/{checkout-Dq13KIgR.mjs → checkout-DAyspHdf.mjs} +3 -3
- package/dist/client/checkoutUrls-BuseL0dw.mjs +189 -0
- package/dist/client/client.mjs +5627 -9543
- package/dist/client/{context-B83PiNzm.mjs → context-DljQn8L5.mjs} +15 -82
- package/dist/client/{eventCalendar-BF0Jatfw.mjs → eventCalendar-pJu3FUod.mjs} +5 -5
- package/dist/client/{eventCombined-BuoCF8je.mjs → eventCombined-B6Kacm9F.mjs} +3 -3
- package/dist/client/{eventDetails-CKwh0S9s.mjs → eventDetails-CaX9z1pv.mjs} +8 -8
- package/dist/client/{eventListing-eUxaWFaB.mjs → eventListing-B9aXPO-I.mjs} +3 -3
- package/dist/client/{eventRegistration-CfkNOkPb.mjs → eventRegistration-CBSovBkg.mjs} +4550 -3671
- package/dist/client/{form-C17H1c_H.mjs → form-Cm0tu_7o.mjs} +2 -2
- package/dist/client/{headerSection-DEwUmrtt.mjs → headerSection-OgRtHeKS.mjs} +2 -2
- package/dist/client/hooks.mjs +535 -694
- package/dist/client/{locationMap-Pf2QwuvW.mjs → locationMap-DmjcYqNM.mjs} +2 -2
- package/dist/client/{newsletterForm-BWQAH5Sv.mjs → newsletterForm-D08OZQAC.mjs} +2 -2
- package/dist/client/{productDetail-BZi1Fa_G.mjs → productDetail-BqZeu2P4.mjs} +3 -3
- package/dist/client/{productList-qq-55DNk.mjs → productList-mNyIF9FG.mjs} +3 -3
- package/dist/client/{propsDecoder-BxmqPKdP.mjs → propsDecoder-DwHXRm9X.mjs} +4850 -4502
- package/dist/client/rendering/client.mjs +59921 -62298
- package/dist/client/rendering/islands.mjs +17 -19
- package/dist/client/rendering.mjs +6226 -10236
- package/dist/client/{scrollToBlock-B3CcKdtG.mjs → scrollToBlock-DtmdM3v-.mjs} +2 -2
- package/dist/client/{shop-DNWJPut5.mjs → shop-CNjZK16F.mjs} +6 -6
- package/dist/client/{shop-commerce-BhvQCosS.mjs → shop-commerce-DkNNao1J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-B04sCNnW.mjs → shop-commerce-store-9WA--zuW.mjs} +1 -1
- package/dist/client/{shopShared-DNNgZlmW.mjs → shopShared-CHCVfccY.mjs} +3 -3
- package/dist/client/{useEventFilters-CUmhE24_.mjs → useEventFilters-DvuaB4ZN.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-BEXb1wqo.mjs → sdk-runtime-3GhW4knb.mjs} +2 -2
- package/dist/{separator-DGMuip1D.mjs → separator-D3bCWYYb.mjs} +1 -1
- package/dist/server/components.mjs +634 -2969
- package/dist/server/config-validation.mjs +535 -694
- package/dist/server/config.mjs +535 -694
- package/dist/server/data.mjs +535 -694
- package/dist/server/index.mjs +41 -162
- package/dist/server/next.mjs +644 -2979
- package/dist/server/page-converter.mjs +435 -561
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +635 -2874
- package/dist/server/rendering.mjs +634 -2969
- package/dist/server/routing.mjs +706 -1138
- package/dist/server/server.mjs +549 -708
- package/dist/server/theme-bridge.mjs +152 -1635
- package/dist/styles/index.css +41 -1348
- package/package.json +2 -2
- 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 -133
- 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 -45
- 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 -323
- 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/StepIndicator-CGixP_LW.mjs +0 -138
- package/dist/client/WholeSeriesRegistrationWizard-BEjzSiOA.mjs +0 -2496
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
- package/dist/client/courseRegistration-CKC5NmyH.mjs +0 -52
- package/dist/client/pricing-CVdvbopJ.mjs +0 -195
package/dist/client/hooks.mjs
CHANGED
|
@@ -755,69 +755,8 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
755
755
|
}
|
|
756
756
|
});
|
|
757
757
|
//#endregion
|
|
758
|
-
//#region ../api/src/
|
|
759
|
-
const
|
|
760
|
-
listCourses: {
|
|
761
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
762
|
-
method: "GET",
|
|
763
|
-
auth: "user",
|
|
764
|
-
responseKind: "json"
|
|
765
|
-
},
|
|
766
|
-
exportCoursesCsv: {
|
|
767
|
-
path: "/sites/{siteId}/bookings/courses/export.csv",
|
|
768
|
-
method: "GET",
|
|
769
|
-
tags: [
|
|
770
|
-
"site-{siteId}",
|
|
771
|
-
"bookings",
|
|
772
|
-
"courses-{siteId}"
|
|
773
|
-
],
|
|
774
|
-
errors: [],
|
|
775
|
-
auth: "user",
|
|
776
|
-
responseKind: "blob"
|
|
777
|
-
},
|
|
778
|
-
createCourse: {
|
|
779
|
-
path: "/sites/{siteId}/bookings/courses",
|
|
780
|
-
method: "POST",
|
|
781
|
-
auth: "user",
|
|
782
|
-
responseKind: "json",
|
|
783
|
-
errors: [
|
|
784
|
-
"validation:invalid_input",
|
|
785
|
-
"resource:not_found",
|
|
786
|
-
"resource:already_exists",
|
|
787
|
-
"resource:conflict",
|
|
788
|
-
"server:internal_error"
|
|
789
|
-
]
|
|
790
|
-
},
|
|
791
|
-
getCourse: {
|
|
792
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
793
|
-
method: "GET",
|
|
794
|
-
auth: "user",
|
|
795
|
-
responseKind: "json"
|
|
796
|
-
},
|
|
797
|
-
updateCourse: {
|
|
798
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
799
|
-
method: "PATCH",
|
|
800
|
-
auth: "user",
|
|
801
|
-
responseKind: "json",
|
|
802
|
-
errors: [
|
|
803
|
-
"validation:invalid_input",
|
|
804
|
-
"resource:not_found",
|
|
805
|
-
"resource:conflict",
|
|
806
|
-
"server:internal_error"
|
|
807
|
-
]
|
|
808
|
-
},
|
|
809
|
-
deleteCourse: {
|
|
810
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}",
|
|
811
|
-
method: "DELETE",
|
|
812
|
-
auth: "user",
|
|
813
|
-
responseKind: "json",
|
|
814
|
-
errors: [
|
|
815
|
-
"validation:invalid_input",
|
|
816
|
-
"resource:not_found",
|
|
817
|
-
"resource:conflict",
|
|
818
|
-
"server:internal_error"
|
|
819
|
-
]
|
|
820
|
-
},
|
|
758
|
+
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
759
|
+
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
821
760
|
deleteEventOffering: {
|
|
822
761
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
823
762
|
method: "DELETE",
|
|
@@ -830,20 +769,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
830
769
|
"server:internal_error"
|
|
831
770
|
]
|
|
832
771
|
},
|
|
833
|
-
|
|
834
|
-
path: "/sites/{siteId}/bookings/
|
|
835
|
-
method: "POST",
|
|
836
|
-
auth: "user",
|
|
837
|
-
responseKind: "json",
|
|
838
|
-
errors: [
|
|
839
|
-
"validation:invalid_input",
|
|
840
|
-
"resource:not_found",
|
|
841
|
-
"resource:already_exists",
|
|
842
|
-
"server:internal_error"
|
|
843
|
-
]
|
|
844
|
-
},
|
|
845
|
-
changeCourseContentOwnership: {
|
|
846
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/content-ownership",
|
|
772
|
+
changeEventSeriesContentOwnership: {
|
|
773
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/content-ownership",
|
|
847
774
|
method: "POST",
|
|
848
775
|
auth: "user",
|
|
849
776
|
responseKind: "json",
|
|
@@ -854,8 +781,8 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
854
781
|
"server:internal_error"
|
|
855
782
|
]
|
|
856
783
|
},
|
|
857
|
-
|
|
858
|
-
path: "/sites/{siteId}/bookings/
|
|
784
|
+
addEventSeriesRegistration: {
|
|
785
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
859
786
|
method: "POST",
|
|
860
787
|
auth: "user",
|
|
861
788
|
responseKind: "json",
|
|
@@ -866,33 +793,21 @@ const COURSE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
866
793
|
"server:internal_error"
|
|
867
794
|
]
|
|
868
795
|
},
|
|
869
|
-
|
|
870
|
-
path: "/sites/{siteId}/bookings/
|
|
796
|
+
listEventSeriesRegistrations: {
|
|
797
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations",
|
|
871
798
|
method: "GET",
|
|
872
799
|
auth: "user",
|
|
873
800
|
responseKind: "json"
|
|
874
801
|
},
|
|
875
|
-
|
|
876
|
-
path: "/sites/{siteId}/bookings/
|
|
802
|
+
exportEventSeriesRegistrationsCsv: {
|
|
803
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/export.csv",
|
|
877
804
|
method: "GET",
|
|
878
805
|
auth: "user",
|
|
879
806
|
errors: [],
|
|
880
807
|
responseKind: "blob"
|
|
881
808
|
},
|
|
882
|
-
|
|
883
|
-
path: "/sites/{siteId}/bookings/
|
|
884
|
-
method: "GET",
|
|
885
|
-
tags: [
|
|
886
|
-
"site-{siteId}",
|
|
887
|
-
"bookings",
|
|
888
|
-
"courses-{courseId}"
|
|
889
|
-
],
|
|
890
|
-
auth: "user",
|
|
891
|
-
responseKind: "blob",
|
|
892
|
-
errors: []
|
|
893
|
-
},
|
|
894
|
-
updateCourseEnrollment: {
|
|
895
|
-
path: "/sites/{siteId}/bookings/courses/{courseId}/enrollments/{enrollmentId}",
|
|
809
|
+
updateEventSeriesRegistration: {
|
|
810
|
+
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}",
|
|
896
811
|
method: "PATCH",
|
|
897
812
|
auth: "user",
|
|
898
813
|
responseKind: "json",
|
|
@@ -1280,71 +1195,35 @@ const PUBLIC_WHOLE_SERIES_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1280
1195
|
errors: ["resource:not_found", "server:internal_error"],
|
|
1281
1196
|
auth: "public",
|
|
1282
1197
|
responseKind: "json"
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
"auth:forbidden",
|
|
1291
|
-
"validation:invalid_input",
|
|
1292
|
-
"resource:not_found",
|
|
1293
|
-
"resource:conflict",
|
|
1294
|
-
"resource:already_exists",
|
|
1295
|
-
"server:internal_error"
|
|
1296
|
-
],
|
|
1297
|
-
auth: "public",
|
|
1298
|
-
responseKind: "json"
|
|
1299
|
-
},
|
|
1300
|
-
checkWholeSeriesEligibility: {
|
|
1301
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/check-eligibility",
|
|
1302
|
-
method: "POST",
|
|
1303
|
-
tags: [TAG_TEMPLATES.publicWholeSeriesOfferings, "course-enrollment"],
|
|
1304
|
-
errors: [
|
|
1305
|
-
"auth:unauthenticated",
|
|
1306
|
-
"resource:not_found",
|
|
1307
|
-
"resource:conflict",
|
|
1308
|
-
"server:internal_error"
|
|
1309
|
-
],
|
|
1310
|
-
auth: "public",
|
|
1311
|
-
responseKind: "json"
|
|
1312
|
-
},
|
|
1313
|
-
createWholeSeriesCheckout: {
|
|
1314
|
-
path: "/public/sites/{siteId}/dated-offerings/whole-series/checkout",
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
//#endregion
|
|
1201
|
+
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1202
|
+
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1203
|
+
getPublicEventRegistrationOptions: {
|
|
1204
|
+
path: "/public/sites/{siteId}/events/registration-options",
|
|
1315
1205
|
method: "POST",
|
|
1316
|
-
tags: [TAG_TEMPLATES.
|
|
1206
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-registration-options"],
|
|
1317
1207
|
auth: "public",
|
|
1318
1208
|
responseKind: "json",
|
|
1319
1209
|
errors: [
|
|
1320
|
-
"auth:unauthenticated",
|
|
1321
1210
|
"validation:invalid_input",
|
|
1322
1211
|
"resource:not_found",
|
|
1323
1212
|
"resource:conflict",
|
|
1324
1213
|
"server:internal_error"
|
|
1325
1214
|
]
|
|
1326
1215
|
},
|
|
1327
|
-
|
|
1328
|
-
path: "/public/sites/{siteId}/
|
|
1216
|
+
resolveEventSubroute: {
|
|
1217
|
+
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1329
1218
|
method: "GET",
|
|
1330
|
-
|
|
1331
|
-
|
|
1219
|
+
revalidate: 60,
|
|
1220
|
+
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1332
1221
|
auth: "public",
|
|
1333
|
-
responseKind: "json"
|
|
1222
|
+
responseKind: "json",
|
|
1223
|
+
errors: []
|
|
1334
1224
|
}
|
|
1335
1225
|
});
|
|
1336
1226
|
//#endregion
|
|
1337
|
-
//#region ../api/src/publicEventEndpointDefinitions.ts
|
|
1338
|
-
const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ resolveEventSubroute: {
|
|
1339
|
-
path: "/public/sites/{siteId}/events/subroutes/resolve",
|
|
1340
|
-
method: "GET",
|
|
1341
|
-
revalidate: 60,
|
|
1342
|
-
tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
|
|
1343
|
-
auth: "public",
|
|
1344
|
-
responseKind: "json",
|
|
1345
|
-
errors: []
|
|
1346
|
-
} });
|
|
1347
|
-
//#endregion
|
|
1348
1227
|
//#region ../api/src/siteApiKeyEndpointDefinitions.ts
|
|
1349
1228
|
const SITE_API_KEY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1350
1229
|
listSiteApiKeys: {
|
|
@@ -1712,7 +1591,7 @@ const SDK_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1712
1591
|
}), 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, {
|
|
1713
1592
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
1714
1593
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
1715
|
-
...
|
|
1594
|
+
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS
|
|
1716
1595
|
}, 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 };
|
|
1717
1596
|
z.object({ refreshToken: z.string().min(1).max(4096) }).strict();
|
|
1718
1597
|
z.object({
|
|
@@ -1888,14 +1767,14 @@ function publicEventPricingType(pricing) {
|
|
|
1888
1767
|
case "single_paid":
|
|
1889
1768
|
case "ticket_types":
|
|
1890
1769
|
case "sliding_scale":
|
|
1891
|
-
case "
|
|
1770
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
1892
1771
|
case "external": return "external";
|
|
1893
1772
|
}
|
|
1894
1773
|
}
|
|
1895
1774
|
function isFreePublicEventPriceDisplay(display) {
|
|
1896
1775
|
switch (display.kind) {
|
|
1897
1776
|
case "free": return true;
|
|
1898
|
-
case "
|
|
1777
|
+
case "whole_series": return display.display.kind === "free";
|
|
1899
1778
|
case "exact":
|
|
1900
1779
|
case "from":
|
|
1901
1780
|
case "range":
|
|
@@ -2184,6 +2063,25 @@ function parseManagementKey(raw) {
|
|
|
2184
2063
|
return ok(createSecretInternal("management-key", raw));
|
|
2185
2064
|
}
|
|
2186
2065
|
//#endregion
|
|
2066
|
+
//#region ../core/src/planner.ts
|
|
2067
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
2068
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
2069
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
2070
|
+
function resolvePlanningNowDate(input = {}) {
|
|
2071
|
+
if (input.now !== void 0) return input.now;
|
|
2072
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
2073
|
+
}
|
|
2074
|
+
/**
|
|
2075
|
+
* Resolve a Date-compatible planner input.
|
|
2076
|
+
*
|
|
2077
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
2078
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
2079
|
+
*/
|
|
2080
|
+
function resolvePlanningDateInput(input = {}) {
|
|
2081
|
+
if (input instanceof Date) return input;
|
|
2082
|
+
return resolvePlanningNowDate(input);
|
|
2083
|
+
}
|
|
2084
|
+
//#endregion
|
|
2187
2085
|
//#region ../core/src/event-series-behaviour.ts
|
|
2188
2086
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
2189
2087
|
"class",
|
|
@@ -2486,6 +2384,68 @@ z.object({
|
|
|
2486
2384
|
monthlyCurrency: z.literal("gbp")
|
|
2487
2385
|
});
|
|
2488
2386
|
//#endregion
|
|
2387
|
+
//#region ../blocks/src/system/types/link.ts
|
|
2388
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
2389
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
2390
|
+
"page",
|
|
2391
|
+
"content",
|
|
2392
|
+
"pageSurface"
|
|
2393
|
+
];
|
|
2394
|
+
const resolvedInternalLinkKeys = [
|
|
2395
|
+
"entityId",
|
|
2396
|
+
"entityType",
|
|
2397
|
+
"href",
|
|
2398
|
+
"title",
|
|
2399
|
+
"typeLabel"
|
|
2400
|
+
];
|
|
2401
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
2402
|
+
kind: z.literal("internal"),
|
|
2403
|
+
routeId: z.string().min(1)
|
|
2404
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
2405
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
2406
|
+
ctx.addIssue({
|
|
2407
|
+
code: "custom",
|
|
2408
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
2409
|
+
});
|
|
2410
|
+
});
|
|
2411
|
+
const internalResolvedLinkSchema = z.object({
|
|
2412
|
+
kind: z.literal("internal"),
|
|
2413
|
+
routeId: z.string().min(1),
|
|
2414
|
+
entityId: z.string().min(1),
|
|
2415
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
2416
|
+
href: z.string().min(1),
|
|
2417
|
+
title: z.string().min(1),
|
|
2418
|
+
typeLabel: z.string().min(1),
|
|
2419
|
+
contentTypeKey: nullableString.optional(),
|
|
2420
|
+
contentTypeName: nullableString.optional(),
|
|
2421
|
+
updatedAt: nullableString.optional()
|
|
2422
|
+
}).passthrough();
|
|
2423
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
2424
|
+
const externalLinkSchema$1 = z.object({
|
|
2425
|
+
kind: z.literal("external"),
|
|
2426
|
+
href: z.string().min(1)
|
|
2427
|
+
}).passthrough();
|
|
2428
|
+
const customLinkSchema$1 = z.object({
|
|
2429
|
+
kind: z.literal("url"),
|
|
2430
|
+
href: z.string().min(1)
|
|
2431
|
+
}).passthrough();
|
|
2432
|
+
const pageLinkSchema$1 = z.object({
|
|
2433
|
+
kind: z.literal("page"),
|
|
2434
|
+
identifier: z.string().min(1)
|
|
2435
|
+
}).passthrough();
|
|
2436
|
+
const entryLinkSchema$1 = z.object({
|
|
2437
|
+
kind: z.literal("entry"),
|
|
2438
|
+
contentType: z.string().min(1),
|
|
2439
|
+
identifier: z.string().min(1)
|
|
2440
|
+
}).passthrough();
|
|
2441
|
+
z.union([
|
|
2442
|
+
internalLinkSchema,
|
|
2443
|
+
externalLinkSchema$1,
|
|
2444
|
+
customLinkSchema$1,
|
|
2445
|
+
pageLinkSchema$1,
|
|
2446
|
+
entryLinkSchema$1
|
|
2447
|
+
]);
|
|
2448
|
+
//#endregion
|
|
2489
2449
|
//#region ../api/src/navigation/contracts.ts
|
|
2490
2450
|
/**
|
|
2491
2451
|
* Canonical navigation/link Zod contracts.
|
|
@@ -2515,7 +2475,7 @@ const internalLinkPayloadSchema = z.object({
|
|
|
2515
2475
|
kind: z.literal("internal"),
|
|
2516
2476
|
routeId: z.string().uuid(),
|
|
2517
2477
|
entityId: z.string().uuid(),
|
|
2518
|
-
entityType: z.enum(
|
|
2478
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
2519
2479
|
href: z.string().min(1),
|
|
2520
2480
|
title: z.string().min(1),
|
|
2521
2481
|
typeLabel: z.string().min(1),
|
|
@@ -10580,7 +10540,7 @@ defineBlockAppearancePreset({
|
|
|
10580
10540
|
id: "schedule-details-brand-depth",
|
|
10581
10541
|
target: "events",
|
|
10582
10542
|
label: "Brand-depth schedule details",
|
|
10583
|
-
blockKinds: ["block.event-details"
|
|
10543
|
+
blockKinds: ["block.event-details"],
|
|
10584
10544
|
design: {
|
|
10585
10545
|
sectionSurface: "brand-depth-band",
|
|
10586
10546
|
contentFrame: plainFrame,
|
|
@@ -16762,7 +16722,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
16762
16722
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
16763
16723
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
16764
16724
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
16765
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
16766
16725
|
function bind(from, options) {
|
|
16767
16726
|
return (node) => ({
|
|
16768
16727
|
...node,
|
|
@@ -26418,12 +26377,12 @@ const RichTextDocSchema = z.object({
|
|
|
26418
26377
|
}).strict();
|
|
26419
26378
|
//#endregion
|
|
26420
26379
|
//#region ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
26421
|
-
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
26422
|
-
const bookingInstalmentPlanSchema = z.union([
|
|
26380
|
+
const bookingDepositRefundPolicySchema$1 = z.enum(["refundable", "non_refundable"]);
|
|
26381
|
+
const bookingInstalmentPlanSchema$1 = z.union([
|
|
26423
26382
|
z.object({
|
|
26424
26383
|
kind: z.literal("deposit_plus_one_remainder"),
|
|
26425
26384
|
depositAmountCents: z.number().int().min(0),
|
|
26426
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26385
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26427
26386
|
remainderDueCount: z.number().int().positive(),
|
|
26428
26387
|
intervalUnit: z.enum([
|
|
26429
26388
|
"day",
|
|
@@ -26434,7 +26393,7 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26434
26393
|
z.object({
|
|
26435
26394
|
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
26436
26395
|
depositAmountCents: z.number().int().min(0),
|
|
26437
|
-
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26396
|
+
depositRefundability: bookingDepositRefundPolicySchema$1,
|
|
26438
26397
|
instalmentCount: z.number().int().positive(),
|
|
26439
26398
|
intervalCount: z.number().int().positive(),
|
|
26440
26399
|
intervalUnit: z.enum([
|
|
@@ -26454,32 +26413,207 @@ const bookingInstalmentPlanSchema = z.union([
|
|
|
26454
26413
|
])
|
|
26455
26414
|
})
|
|
26456
26415
|
]);
|
|
26457
|
-
const bookingFlexibleBalanceDueDateRuleSchema = z.union([z.object({
|
|
26416
|
+
const bookingFlexibleBalanceDueDateRuleSchema$1 = z.union([z.object({
|
|
26458
26417
|
kind: z.literal("relative_to_start_date"),
|
|
26459
26418
|
daysBeforeStart: z.number().int().positive()
|
|
26460
26419
|
}), z.object({
|
|
26461
26420
|
kind: z.literal("fixed_calendar_date"),
|
|
26462
26421
|
dueAt: z.string().datetime()
|
|
26463
26422
|
})]);
|
|
26464
|
-
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
26423
|
+
const bookingFlexibleBalanceConfigSchema$1 = z.object({
|
|
26465
26424
|
upfrontAmountCents: z.number().int().min(0),
|
|
26466
|
-
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
26467
|
-
depositRefundability: bookingDepositRefundPolicySchema
|
|
26425
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema$1,
|
|
26426
|
+
depositRefundability: bookingDepositRefundPolicySchema$1
|
|
26468
26427
|
});
|
|
26469
26428
|
const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
26470
26429
|
z.object({ kind: z.literal("upfront") }),
|
|
26471
26430
|
z.object({ kind: z.literal("deferred_manual") }),
|
|
26472
26431
|
z.object({
|
|
26473
26432
|
kind: z.literal("instalment_plan"),
|
|
26474
|
-
plan: bookingInstalmentPlanSchema
|
|
26433
|
+
plan: bookingInstalmentPlanSchema$1
|
|
26475
26434
|
}),
|
|
26476
26435
|
z.object({
|
|
26477
26436
|
kind: z.literal("flexible_balance"),
|
|
26478
|
-
config: bookingFlexibleBalanceConfigSchema
|
|
26437
|
+
config: bookingFlexibleBalanceConfigSchema$1
|
|
26479
26438
|
})
|
|
26480
26439
|
]);
|
|
26481
26440
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
26482
26441
|
//#endregion
|
|
26442
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
26443
|
+
const blockBookingConsentSchema = z.object({
|
|
26444
|
+
requirementId: z.string(),
|
|
26445
|
+
title: z.string(),
|
|
26446
|
+
agreement: RichTextDocSchema,
|
|
26447
|
+
checkboxLabel: z.string()
|
|
26448
|
+
});
|
|
26449
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
26450
|
+
id: z.string(),
|
|
26451
|
+
label: z.string(),
|
|
26452
|
+
type: z.literal("booking_requirement_consent"),
|
|
26453
|
+
required: z.literal(true),
|
|
26454
|
+
agreement: RichTextDocSchema,
|
|
26455
|
+
checkboxLabel: z.string().min(1)
|
|
26456
|
+
});
|
|
26457
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
26458
|
+
//#endregion
|
|
26459
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
26460
|
+
function isSaleWindowOpen(option, now) {
|
|
26461
|
+
if (!option.isActive) return false;
|
|
26462
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
26463
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
26464
|
+
return true;
|
|
26465
|
+
}
|
|
26466
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
26467
|
+
if (amount <= 0) return {
|
|
26468
|
+
kind: "free",
|
|
26469
|
+
currency
|
|
26470
|
+
};
|
|
26471
|
+
return {
|
|
26472
|
+
kind: "exact",
|
|
26473
|
+
amount,
|
|
26474
|
+
currency
|
|
26475
|
+
};
|
|
26476
|
+
}
|
|
26477
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
26478
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
26479
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
26480
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
26481
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
26482
|
+
return left.name.localeCompare(right.name);
|
|
26483
|
+
});
|
|
26484
|
+
}
|
|
26485
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
26486
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
26487
|
+
const currency = offering.pricing.currency;
|
|
26488
|
+
switch (offering.pricing.pricingStrategy) {
|
|
26489
|
+
case "free": return resolveFreePricing(currency);
|
|
26490
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
26491
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
26492
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
26493
|
+
}
|
|
26494
|
+
}
|
|
26495
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
26496
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
26497
|
+
selectedSlidingAmount: null,
|
|
26498
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
26499
|
+
} : {
|
|
26500
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
26501
|
+
nowInput
|
|
26502
|
+
};
|
|
26503
|
+
}
|
|
26504
|
+
function resolveFreePricing(currency) {
|
|
26505
|
+
return {
|
|
26506
|
+
currency,
|
|
26507
|
+
display: {
|
|
26508
|
+
kind: "free",
|
|
26509
|
+
currency
|
|
26510
|
+
},
|
|
26511
|
+
selectableOptions: [],
|
|
26512
|
+
requiresSelection: false,
|
|
26513
|
+
selectedOption: null,
|
|
26514
|
+
slidingScale: null,
|
|
26515
|
+
selectedSlidingAmount: null,
|
|
26516
|
+
selectedPriceAmount: 0,
|
|
26517
|
+
selectedRequiresPayment: false,
|
|
26518
|
+
hasPaidSelection: false,
|
|
26519
|
+
hasFreeSelection: true
|
|
26520
|
+
};
|
|
26521
|
+
}
|
|
26522
|
+
function resolveSinglePricing(amount, currency) {
|
|
26523
|
+
return {
|
|
26524
|
+
currency,
|
|
26525
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
26526
|
+
selectableOptions: [],
|
|
26527
|
+
requiresSelection: false,
|
|
26528
|
+
selectedOption: null,
|
|
26529
|
+
slidingScale: null,
|
|
26530
|
+
selectedSlidingAmount: null,
|
|
26531
|
+
selectedPriceAmount: amount,
|
|
26532
|
+
selectedRequiresPayment: amount > 0,
|
|
26533
|
+
hasPaidSelection: amount > 0,
|
|
26534
|
+
hasFreeSelection: amount <= 0
|
|
26535
|
+
};
|
|
26536
|
+
}
|
|
26537
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
26538
|
+
const currency = offering.pricing.currency;
|
|
26539
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
26540
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
26541
|
+
return {
|
|
26542
|
+
currency,
|
|
26543
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
26544
|
+
selectableOptions,
|
|
26545
|
+
requiresSelection: selectableOptions.length > 1,
|
|
26546
|
+
selectedOption,
|
|
26547
|
+
slidingScale: null,
|
|
26548
|
+
selectedSlidingAmount: null,
|
|
26549
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
26550
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
26551
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
26552
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
26553
|
+
};
|
|
26554
|
+
}
|
|
26555
|
+
function resolveSelectedTier(options, selectedId) {
|
|
26556
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
26557
|
+
}
|
|
26558
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
26559
|
+
if (lowestAmount === null) return {
|
|
26560
|
+
kind: "unavailable",
|
|
26561
|
+
currency
|
|
26562
|
+
};
|
|
26563
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
26564
|
+
kind: "from",
|
|
26565
|
+
amount: lowestAmount,
|
|
26566
|
+
currency
|
|
26567
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
26568
|
+
}
|
|
26569
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
26570
|
+
const currency = offering.pricing.currency;
|
|
26571
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
26572
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
26573
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
26574
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
26575
|
+
return {
|
|
26576
|
+
currency,
|
|
26577
|
+
display: {
|
|
26578
|
+
kind: "range",
|
|
26579
|
+
minAmount,
|
|
26580
|
+
maxAmount,
|
|
26581
|
+
currency
|
|
26582
|
+
},
|
|
26583
|
+
selectableOptions: [],
|
|
26584
|
+
requiresSelection: selectedAmount === null,
|
|
26585
|
+
selectedOption: null,
|
|
26586
|
+
slidingScale: {
|
|
26587
|
+
minAmount,
|
|
26588
|
+
maxAmount,
|
|
26589
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
26590
|
+
},
|
|
26591
|
+
selectedSlidingAmount: selectedAmount,
|
|
26592
|
+
selectedPriceAmount: selectedAmount,
|
|
26593
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
26594
|
+
hasPaidSelection: maxAmount > 0,
|
|
26595
|
+
hasFreeSelection: minAmount === 0
|
|
26596
|
+
};
|
|
26597
|
+
}
|
|
26598
|
+
function unavailableSlidingScale(currency) {
|
|
26599
|
+
return {
|
|
26600
|
+
currency,
|
|
26601
|
+
display: {
|
|
26602
|
+
kind: "unavailable",
|
|
26603
|
+
currency
|
|
26604
|
+
},
|
|
26605
|
+
selectableOptions: [],
|
|
26606
|
+
requiresSelection: true,
|
|
26607
|
+
selectedOption: null,
|
|
26608
|
+
slidingScale: null,
|
|
26609
|
+
selectedSlidingAmount: null,
|
|
26610
|
+
selectedPriceAmount: null,
|
|
26611
|
+
selectedRequiresPayment: false,
|
|
26612
|
+
hasPaidSelection: false,
|
|
26613
|
+
hasFreeSelection: false
|
|
26614
|
+
};
|
|
26615
|
+
}
|
|
26616
|
+
//#endregion
|
|
26483
26617
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
26484
26618
|
const wholeSeriesVenueSchema = z.object({
|
|
26485
26619
|
id: z.string(),
|
|
@@ -26539,11 +26673,19 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
26539
26673
|
title: z.string(),
|
|
26540
26674
|
slug: z.string(),
|
|
26541
26675
|
description: z.unknown().nullable(),
|
|
26676
|
+
deliveryMode: z.enum([
|
|
26677
|
+
"in_person",
|
|
26678
|
+
"online",
|
|
26679
|
+
"hybrid"
|
|
26680
|
+
]),
|
|
26681
|
+
waitlistEnabled: z.boolean(),
|
|
26682
|
+
requireGuestDetails: z.boolean(),
|
|
26542
26683
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
26543
26684
|
enrollmentOpen: z.boolean(),
|
|
26544
26685
|
pricing: wholeSeriesPricingSchema,
|
|
26545
26686
|
currency: z.string(),
|
|
26546
26687
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26688
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
26547
26689
|
enrollmentCapacity: z.number().nullable(),
|
|
26548
26690
|
acceptsMemberships: z.boolean(),
|
|
26549
26691
|
status: z.enum([
|
|
@@ -26653,7 +26795,7 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
26653
26795
|
paidToAmount: z.number(),
|
|
26654
26796
|
currency: z.string()
|
|
26655
26797
|
});
|
|
26656
|
-
const
|
|
26798
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
26657
26799
|
freePriceDisplaySchema,
|
|
26658
26800
|
exactPriceDisplaySchema,
|
|
26659
26801
|
fromPriceDisplaySchema,
|
|
@@ -26671,8 +26813,8 @@ z.discriminatedUnion("kind", [
|
|
|
26671
26813
|
label: z.string()
|
|
26672
26814
|
}),
|
|
26673
26815
|
z.object({
|
|
26674
|
-
kind: z.literal("
|
|
26675
|
-
display:
|
|
26816
|
+
kind: z.literal("whole_series"),
|
|
26817
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26676
26818
|
})
|
|
26677
26819
|
]);
|
|
26678
26820
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -26774,10 +26916,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
26774
26916
|
})
|
|
26775
26917
|
}),
|
|
26776
26918
|
z.object({
|
|
26777
|
-
kind: z.literal("
|
|
26919
|
+
kind: z.literal("whole_series"),
|
|
26778
26920
|
display: z.object({
|
|
26779
|
-
kind: z.literal("
|
|
26780
|
-
display:
|
|
26921
|
+
kind: z.literal("whole_series"),
|
|
26922
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
26781
26923
|
})
|
|
26782
26924
|
}),
|
|
26783
26925
|
z.object({
|
|
@@ -26861,6 +27003,7 @@ const publicEventSchema = z.object({
|
|
|
26861
27003
|
timeZone: z.string(),
|
|
26862
27004
|
pricing: publicEventPricingSchema,
|
|
26863
27005
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
27006
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
26864
27007
|
accessRestriction: accessRestrictionSchema,
|
|
26865
27008
|
allowedCategoryIds: z.array(z.string()),
|
|
26866
27009
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -27193,7 +27336,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
27193
27336
|
};
|
|
27194
27337
|
return { kind: "unscoped" };
|
|
27195
27338
|
}
|
|
27196
|
-
function
|
|
27339
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
27340
|
+
const scope = resolveEventRegistrationScope(context);
|
|
27197
27341
|
switch (scope.kind) {
|
|
27198
27342
|
case "occurrenceSeries":
|
|
27199
27343
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -27205,8 +27349,24 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
27205
27349
|
case "unscoped": return [...events];
|
|
27206
27350
|
}
|
|
27207
27351
|
}
|
|
27208
|
-
|
|
27209
|
-
|
|
27352
|
+
//#endregion
|
|
27353
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
27354
|
+
function planEventRegistrationScope(input) {
|
|
27355
|
+
const subject = input.subject;
|
|
27356
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
27357
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
27358
|
+
kind: "context",
|
|
27359
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
27360
|
+
occurrenceContext: input.occurrenceContext,
|
|
27361
|
+
subject
|
|
27362
|
+
})
|
|
27363
|
+
};
|
|
27364
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
27365
|
+
return {
|
|
27366
|
+
kind: "selectedRun",
|
|
27367
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
27368
|
+
offering: selectedRunOffering
|
|
27369
|
+
};
|
|
27210
27370
|
}
|
|
27211
27371
|
//#endregion
|
|
27212
27372
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
@@ -27282,14 +27442,14 @@ function isRecord$6(value) {
|
|
|
27282
27442
|
}
|
|
27283
27443
|
function isPublicEventPricing(value) {
|
|
27284
27444
|
if (!isRecord$6(value) || typeof value.kind !== "string") return false;
|
|
27285
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
27445
|
+
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";
|
|
27286
27446
|
}
|
|
27287
27447
|
function isPublicEventTicketType(value) {
|
|
27288
27448
|
return isRecord$6(value) && typeof value.id === "string";
|
|
27289
27449
|
}
|
|
27290
27450
|
function readTicketTypePriceDisplay(value, currency) {
|
|
27291
27451
|
const display = readLegacyPriceDisplay(value, currency);
|
|
27292
|
-
return display.kind === "
|
|
27452
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
27293
27453
|
kind: "unavailable",
|
|
27294
27454
|
currency
|
|
27295
27455
|
} : display;
|
|
@@ -27347,11 +27507,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27347
27507
|
kind: "unavailable",
|
|
27348
27508
|
currency: displayCurrency
|
|
27349
27509
|
};
|
|
27350
|
-
case "
|
|
27351
|
-
kind: "
|
|
27510
|
+
case "whole_series": return isRecord$6(value.display) ? {
|
|
27511
|
+
kind: "whole_series",
|
|
27352
27512
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
27353
27513
|
} : {
|
|
27354
|
-
kind: "
|
|
27514
|
+
kind: "whole_series",
|
|
27355
27515
|
display: {
|
|
27356
27516
|
kind: "unavailable",
|
|
27357
27517
|
currency: displayCurrency
|
|
@@ -27477,7 +27637,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
27477
27637
|
//#endregion
|
|
27478
27638
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
27479
27639
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
27480
|
-
return event.
|
|
27640
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
27481
27641
|
}
|
|
27482
27642
|
function findPreSelectedEvent(input) {
|
|
27483
27643
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -27503,12 +27663,127 @@ function toRegistrationEvent(event) {
|
|
|
27503
27663
|
return {
|
|
27504
27664
|
...event,
|
|
27505
27665
|
pricing: resolveRuntimeEventPricing(event),
|
|
27506
|
-
|
|
27507
|
-
|
|
27666
|
+
selectionId: event.id,
|
|
27667
|
+
registrationSubject: {
|
|
27668
|
+
kind: "occurrence",
|
|
27669
|
+
occurrenceId: event.occurrenceId
|
|
27670
|
+
}
|
|
27508
27671
|
};
|
|
27509
27672
|
}
|
|
27510
27673
|
function toRegistrationEvents(events) {
|
|
27511
|
-
return events.map(toRegistrationEvent);
|
|
27674
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
27675
|
+
}
|
|
27676
|
+
function toWholeSeriesTicketType(option) {
|
|
27677
|
+
return {
|
|
27678
|
+
...option,
|
|
27679
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
27680
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
27681
|
+
availability: {
|
|
27682
|
+
kind: "available",
|
|
27683
|
+
remainingCapacity: option.capacityLimit
|
|
27684
|
+
}
|
|
27685
|
+
};
|
|
27686
|
+
}
|
|
27687
|
+
function toWholeSeriesPricing(offering) {
|
|
27688
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
27689
|
+
switch (offering.pricing.pricingStrategy) {
|
|
27690
|
+
case "free": return {
|
|
27691
|
+
kind: "free_registration",
|
|
27692
|
+
currency: offering.currency,
|
|
27693
|
+
display: {
|
|
27694
|
+
kind: "free",
|
|
27695
|
+
currency: offering.currency
|
|
27696
|
+
}
|
|
27697
|
+
};
|
|
27698
|
+
case "single": {
|
|
27699
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
27700
|
+
return amount === 0 ? {
|
|
27701
|
+
kind: "free_registration",
|
|
27702
|
+
currency: offering.currency,
|
|
27703
|
+
display: {
|
|
27704
|
+
kind: "free",
|
|
27705
|
+
currency: offering.currency
|
|
27706
|
+
}
|
|
27707
|
+
} : {
|
|
27708
|
+
kind: "single_paid",
|
|
27709
|
+
amount,
|
|
27710
|
+
currency: offering.currency,
|
|
27711
|
+
display: {
|
|
27712
|
+
kind: "exact",
|
|
27713
|
+
amount,
|
|
27714
|
+
currency: offering.currency
|
|
27715
|
+
}
|
|
27716
|
+
};
|
|
27717
|
+
}
|
|
27718
|
+
case "tiered": return {
|
|
27719
|
+
kind: "ticket_types",
|
|
27720
|
+
currency: offering.currency,
|
|
27721
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
27722
|
+
display: resolved.display
|
|
27723
|
+
};
|
|
27724
|
+
case "sliding_scale": return {
|
|
27725
|
+
kind: "sliding_scale",
|
|
27726
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27727
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27728
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
27729
|
+
currency: offering.currency,
|
|
27730
|
+
display: {
|
|
27731
|
+
kind: "range",
|
|
27732
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
27733
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
27734
|
+
currency: offering.currency
|
|
27735
|
+
}
|
|
27736
|
+
};
|
|
27737
|
+
}
|
|
27738
|
+
}
|
|
27739
|
+
function toAttendanceModes(offering) {
|
|
27740
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
27741
|
+
mode,
|
|
27742
|
+
capacity: offering.enrollmentCapacity,
|
|
27743
|
+
registeredCount: offering.enrolledCount,
|
|
27744
|
+
availableSpots: offering.availableSpots,
|
|
27745
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
27746
|
+
}));
|
|
27747
|
+
}
|
|
27748
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
27749
|
+
const firstSession = offering.sessions[0];
|
|
27750
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
27751
|
+
return {
|
|
27752
|
+
selectionId: offering.eventSeriesId,
|
|
27753
|
+
registrationSubject: {
|
|
27754
|
+
kind: "wholeSeries",
|
|
27755
|
+
eventSeriesId: offering.eventSeriesId,
|
|
27756
|
+
sessions: offering.sessions
|
|
27757
|
+
},
|
|
27758
|
+
seriesId: offering.eventSeriesId,
|
|
27759
|
+
title: offering.title,
|
|
27760
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
27761
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
27762
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
27763
|
+
kind: "closed",
|
|
27764
|
+
reason: "enrollment_closed"
|
|
27765
|
+
},
|
|
27766
|
+
deliveryMode: offering.deliveryMode,
|
|
27767
|
+
attendanceModes: toAttendanceModes(offering),
|
|
27768
|
+
capacity: offering.enrollmentCapacity,
|
|
27769
|
+
registeredCount: offering.enrolledCount,
|
|
27770
|
+
availableSpots: offering.availableSpots,
|
|
27771
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
27772
|
+
venue: offering.venue ? {
|
|
27773
|
+
...offering.venue,
|
|
27774
|
+
location: null
|
|
27775
|
+
} : null,
|
|
27776
|
+
eventCategory: null,
|
|
27777
|
+
teamMembers: offering.teamMembers,
|
|
27778
|
+
status: offering.status,
|
|
27779
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
27780
|
+
pricing: toWholeSeriesPricing(offering),
|
|
27781
|
+
paymentTerms: offering.paymentTerms,
|
|
27782
|
+
consent: offering.consent,
|
|
27783
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
27784
|
+
acceptsPasses: false,
|
|
27785
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
27786
|
+
};
|
|
27512
27787
|
}
|
|
27513
27788
|
//#endregion
|
|
27514
27789
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -27534,11 +27809,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
27534
27809
|
maxTickets: z.string().optional(),
|
|
27535
27810
|
showVenue: z.boolean().optional(),
|
|
27536
27811
|
showCapacity: z.boolean().optional(),
|
|
27537
|
-
showSessions: z.boolean().optional(),
|
|
27538
|
-
showPrice: z.boolean().optional(),
|
|
27539
27812
|
successMessage: z.string().optional(),
|
|
27540
|
-
waitlistMessage: z.string().optional(),
|
|
27541
|
-
membershipMessage: z.string().optional(),
|
|
27542
27813
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27543
27814
|
overlayEnabled: z.boolean().optional(),
|
|
27544
27815
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -27608,6 +27879,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
27608
27879
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
27609
27880
|
}
|
|
27610
27881
|
function buildEventRegistrationShellStepLabels(source) {
|
|
27882
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
27883
|
+
if (selectedOffering) {
|
|
27884
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
27885
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
27886
|
+
eligibility: null,
|
|
27887
|
+
selectedTicketType: null,
|
|
27888
|
+
event: selectedEvent
|
|
27889
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
27890
|
+
}
|
|
27611
27891
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
27612
27892
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
27613
27893
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -27622,10 +27902,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
27622
27902
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
27623
27903
|
}
|
|
27624
27904
|
function scopeEventRegistrationEvents(source) {
|
|
27625
|
-
|
|
27905
|
+
const scope = planEventRegistrationScope({
|
|
27906
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
27907
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
27626
27908
|
occurrenceContext: source.occurrenceContext,
|
|
27627
27909
|
subject: source.subject
|
|
27628
27910
|
});
|
|
27911
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
27629
27912
|
}
|
|
27630
27913
|
function shellLabelForRegistrationStep(step, events) {
|
|
27631
27914
|
switch (step) {
|
|
@@ -27668,11 +27951,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27668
27951
|
maxTickets: source.maxTickets ?? void 0,
|
|
27669
27952
|
showVenue: source.showVenue,
|
|
27670
27953
|
showCapacity: source.showCapacity,
|
|
27671
|
-
showSessions: source.showSessions,
|
|
27672
|
-
showPrice: source.showPrice,
|
|
27673
27954
|
successMessage: source.successMessage,
|
|
27674
|
-
waitlistMessage: source.waitlistMessage,
|
|
27675
|
-
membershipMessage: source.membershipMessage,
|
|
27676
27955
|
buttonVariant: source.buttonVariant,
|
|
27677
27956
|
overlayEnabled: source.overlayEnabled,
|
|
27678
27957
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -27788,24 +28067,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27788
28067
|
defaultValue: true,
|
|
27789
28068
|
ui: { intent: "display" }
|
|
27790
28069
|
},
|
|
27791
|
-
{
|
|
27792
|
-
id: "showSessions",
|
|
27793
|
-
type: "boolean",
|
|
27794
|
-
label: "Show complete schedule",
|
|
27795
|
-
description: "Display every session for whole-series registrations",
|
|
27796
|
-
required: false,
|
|
27797
|
-
defaultValue: true,
|
|
27798
|
-
ui: { intent: "display" }
|
|
27799
|
-
},
|
|
27800
|
-
{
|
|
27801
|
-
id: "showPrice",
|
|
27802
|
-
type: "boolean",
|
|
27803
|
-
label: "Show price",
|
|
27804
|
-
description: "Display the whole-series price",
|
|
27805
|
-
required: false,
|
|
27806
|
-
defaultValue: true,
|
|
27807
|
-
ui: { intent: "display" }
|
|
27808
|
-
},
|
|
27809
28070
|
{
|
|
27810
28071
|
id: "successMessage",
|
|
27811
28072
|
type: "text",
|
|
@@ -27816,26 +28077,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27816
28077
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
27817
28078
|
maxLength: 500
|
|
27818
28079
|
},
|
|
27819
|
-
{
|
|
27820
|
-
id: "waitlistMessage",
|
|
27821
|
-
type: "text",
|
|
27822
|
-
label: "Waitlist message",
|
|
27823
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
27824
|
-
required: false,
|
|
27825
|
-
multiline: true,
|
|
27826
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
27827
|
-
maxLength: 500
|
|
27828
|
-
},
|
|
27829
|
-
{
|
|
27830
|
-
id: "membershipMessage",
|
|
27831
|
-
type: "text",
|
|
27832
|
-
label: "Membership registration message",
|
|
27833
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
27834
|
-
required: false,
|
|
27835
|
-
multiline: true,
|
|
27836
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
27837
|
-
maxLength: 500
|
|
27838
|
-
},
|
|
27839
28080
|
{
|
|
27840
28081
|
id: "buttonText",
|
|
27841
28082
|
type: "text",
|
|
@@ -27867,11 +28108,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
27867
28108
|
} },
|
|
27868
28109
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
27869
28110
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
27870
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
27871
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
27872
28111
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
27873
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
27874
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
27875
28112
|
buttonText: { $bind: {
|
|
27876
28113
|
from: "content.buttonText",
|
|
27877
28114
|
fallback: "Complete Registration"
|
|
@@ -27988,254 +28225,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
27988
28225
|
}
|
|
27989
28226
|
};
|
|
27990
28227
|
//#endregion
|
|
27991
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27992
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
27993
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
27994
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
27995
|
-
showSessions: z.boolean().optional(),
|
|
27996
|
-
showPrice: z.boolean().optional(),
|
|
27997
|
-
showCapacity: z.boolean().optional(),
|
|
27998
|
-
showVenue: z.boolean().optional(),
|
|
27999
|
-
successMessage: z.string().optional(),
|
|
28000
|
-
waitlistMessage: z.string().optional(),
|
|
28001
|
-
membershipMessage: z.string().optional(),
|
|
28002
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
28003
|
-
};
|
|
28004
|
-
const courseRegistrationSourceSchema = z.object({
|
|
28005
|
-
siteId: z.string().optional(),
|
|
28006
|
-
apiBaseUrl: z.string().optional(),
|
|
28007
|
-
portalToken: z.string().nullable().optional(),
|
|
28008
|
-
...courseRegistrationHydrationSchemaShape,
|
|
28009
|
-
className: z.string().nullable().optional(),
|
|
28010
|
-
buttonText: z.string().nullable().optional(),
|
|
28011
|
-
stage: previewStageSchema.optional()
|
|
28012
|
-
});
|
|
28013
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
28014
|
-
kind: z.literal("course-registration"),
|
|
28015
|
-
state: z.literal("shell"),
|
|
28016
|
-
className: z.string().nullable(),
|
|
28017
|
-
summaryButtonText: z.string()
|
|
28018
|
-
});
|
|
28019
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
28020
|
-
const courseRegistrationRenderSchema = z.object({
|
|
28021
|
-
display: courseRegistrationDisplaySchema,
|
|
28022
|
-
hydration: courseRegistrationHydrationSchema
|
|
28023
|
-
});
|
|
28024
|
-
z.object({
|
|
28025
|
-
siteId: z.string().optional(),
|
|
28026
|
-
apiBaseUrl: z.string().optional(),
|
|
28027
|
-
portalToken: z.string().nullable().optional(),
|
|
28028
|
-
stage: previewStageSchema.optional()
|
|
28029
|
-
});
|
|
28030
|
-
function buildCourseRegistrationDisplay(source) {
|
|
28031
|
-
return {
|
|
28032
|
-
kind: "course-registration",
|
|
28033
|
-
state: "shell",
|
|
28034
|
-
className: source.className ?? null,
|
|
28035
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
28036
|
-
};
|
|
28037
|
-
}
|
|
28038
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
28039
|
-
kind: "client-owned",
|
|
28040
|
-
contracts: {
|
|
28041
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
28042
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
28043
|
-
},
|
|
28044
|
-
buildRender: (source) => ({
|
|
28045
|
-
display: buildCourseRegistrationDisplay(source),
|
|
28046
|
-
hydration: {
|
|
28047
|
-
subject: source.subject ?? null,
|
|
28048
|
-
courses: source.courses ?? null,
|
|
28049
|
-
showSessions: source.showSessions,
|
|
28050
|
-
showPrice: source.showPrice,
|
|
28051
|
-
showCapacity: source.showCapacity,
|
|
28052
|
-
showVenue: source.showVenue,
|
|
28053
|
-
successMessage: source.successMessage,
|
|
28054
|
-
waitlistMessage: source.waitlistMessage,
|
|
28055
|
-
membershipMessage: source.membershipMessage,
|
|
28056
|
-
buttonVariant: source.buttonVariant
|
|
28057
|
-
}
|
|
28058
|
-
})
|
|
28059
|
-
});
|
|
28060
|
-
const courseRegistrationBlockDefinition = {
|
|
28061
|
-
manifest: createBlockManifest({
|
|
28062
|
-
id: "block.course-registration",
|
|
28063
|
-
version: "1.0.0",
|
|
28064
|
-
title: "Course Registration",
|
|
28065
|
-
titleSource: "heading",
|
|
28066
|
-
description: "Enrollment form for multi-session courses",
|
|
28067
|
-
category: "interactive",
|
|
28068
|
-
contentSource: { kind: "inline" },
|
|
28069
|
-
tags: [
|
|
28070
|
-
"courses",
|
|
28071
|
-
"enrollment",
|
|
28072
|
-
"booking",
|
|
28073
|
-
"form",
|
|
28074
|
-
"signup",
|
|
28075
|
-
"education"
|
|
28076
|
-
],
|
|
28077
|
-
icon: "GraduationCap",
|
|
28078
|
-
styleTokens: {
|
|
28079
|
-
background: "surface",
|
|
28080
|
-
typography: "body",
|
|
28081
|
-
spacing: "md"
|
|
28082
|
-
},
|
|
28083
|
-
behaviours: {
|
|
28084
|
-
supportsThemeSwitching: true,
|
|
28085
|
-
inlineEditing: false,
|
|
28086
|
-
animation: false,
|
|
28087
|
-
paletteHidden: false
|
|
28088
|
-
},
|
|
28089
|
-
additionalFields: [
|
|
28090
|
-
{
|
|
28091
|
-
id: "heading",
|
|
28092
|
-
type: "text",
|
|
28093
|
-
label: "Heading",
|
|
28094
|
-
description: "Main heading for the registration form",
|
|
28095
|
-
required: false,
|
|
28096
|
-
multiline: false,
|
|
28097
|
-
defaultValue: "Sign up"
|
|
28098
|
-
},
|
|
28099
|
-
{
|
|
28100
|
-
id: "description",
|
|
28101
|
-
type: "richText",
|
|
28102
|
-
label: "Description",
|
|
28103
|
-
description: "Optional introductory text",
|
|
28104
|
-
required: false
|
|
28105
|
-
},
|
|
28106
|
-
{
|
|
28107
|
-
id: "showSessions",
|
|
28108
|
-
type: "boolean",
|
|
28109
|
-
label: "Show sessions",
|
|
28110
|
-
description: "Display the list of course sessions",
|
|
28111
|
-
required: false,
|
|
28112
|
-
defaultValue: true,
|
|
28113
|
-
ui: { intent: "display" }
|
|
28114
|
-
},
|
|
28115
|
-
{
|
|
28116
|
-
id: "showPrice",
|
|
28117
|
-
type: "boolean",
|
|
28118
|
-
label: "Show price",
|
|
28119
|
-
description: "Display the course price",
|
|
28120
|
-
required: false,
|
|
28121
|
-
defaultValue: true,
|
|
28122
|
-
ui: { intent: "display" }
|
|
28123
|
-
},
|
|
28124
|
-
{
|
|
28125
|
-
id: "showCapacity",
|
|
28126
|
-
type: "boolean",
|
|
28127
|
-
label: "Show available spots",
|
|
28128
|
-
description: "Display remaining enrollment capacity",
|
|
28129
|
-
required: false,
|
|
28130
|
-
defaultValue: true,
|
|
28131
|
-
ui: { intent: "display" }
|
|
28132
|
-
},
|
|
28133
|
-
{
|
|
28134
|
-
id: "showVenue",
|
|
28135
|
-
type: "boolean",
|
|
28136
|
-
label: "Show venue",
|
|
28137
|
-
description: "Display venue information",
|
|
28138
|
-
required: false,
|
|
28139
|
-
defaultValue: true,
|
|
28140
|
-
ui: { intent: "display" }
|
|
28141
|
-
},
|
|
28142
|
-
{
|
|
28143
|
-
id: "successMessage",
|
|
28144
|
-
type: "text",
|
|
28145
|
-
label: "Success message",
|
|
28146
|
-
description: "Message shown after successful enrollment",
|
|
28147
|
-
required: false,
|
|
28148
|
-
multiline: true,
|
|
28149
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
28150
|
-
maxLength: 500
|
|
28151
|
-
},
|
|
28152
|
-
{
|
|
28153
|
-
id: "waitlistMessage",
|
|
28154
|
-
type: "text",
|
|
28155
|
-
label: "Waitlist message",
|
|
28156
|
-
description: "Message when added to waitlist",
|
|
28157
|
-
required: false,
|
|
28158
|
-
multiline: true,
|
|
28159
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
28160
|
-
maxLength: 500
|
|
28161
|
-
},
|
|
28162
|
-
{
|
|
28163
|
-
id: "membershipMessage",
|
|
28164
|
-
type: "text",
|
|
28165
|
-
label: "Membership enrollment message",
|
|
28166
|
-
description: "Message when enrolled using a membership",
|
|
28167
|
-
required: false,
|
|
28168
|
-
multiline: true,
|
|
28169
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
28170
|
-
maxLength: 500
|
|
28171
|
-
},
|
|
28172
|
-
{
|
|
28173
|
-
id: "buttonText",
|
|
28174
|
-
type: "text",
|
|
28175
|
-
label: "Submit button text",
|
|
28176
|
-
description: "Text for the enrollment submit button",
|
|
28177
|
-
required: false,
|
|
28178
|
-
multiline: false,
|
|
28179
|
-
defaultValue: "Sign up",
|
|
28180
|
-
maxLength: 40
|
|
28181
|
-
},
|
|
28182
|
-
createButtonVariantField()
|
|
28183
|
-
],
|
|
28184
|
-
layout: [styledSection({
|
|
28185
|
-
baseClass: "",
|
|
28186
|
-
spacing: "spacious",
|
|
28187
|
-
children: sectionContainer([
|
|
28188
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
28189
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
28190
|
-
courseRegistration(withApiBindings({
|
|
28191
|
-
subject: { $bind: {
|
|
28192
|
-
from: "$root.subject",
|
|
28193
|
-
fallback: null
|
|
28194
|
-
} },
|
|
28195
|
-
portalToken: { $bind: {
|
|
28196
|
-
from: "$root.portalToken",
|
|
28197
|
-
fallback: null
|
|
28198
|
-
} },
|
|
28199
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
28200
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
28201
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
28202
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
28203
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
28204
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
28205
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
28206
|
-
buttonText: { $bind: {
|
|
28207
|
-
from: "content.buttonText",
|
|
28208
|
-
fallback: "Sign up"
|
|
28209
|
-
} },
|
|
28210
|
-
buttonVariant: { $bind: {
|
|
28211
|
-
from: "content.buttonVariant",
|
|
28212
|
-
fallback: "primary"
|
|
28213
|
-
} },
|
|
28214
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28215
|
-
stage: { $bind: {
|
|
28216
|
-
from: "$root.previewStage",
|
|
28217
|
-
fallback: "published"
|
|
28218
|
-
} }
|
|
28219
|
-
}))
|
|
28220
|
-
], { gap: "lg" })
|
|
28221
|
-
})]
|
|
28222
|
-
}),
|
|
28223
|
-
runtime: courseRegistrationBlockRuntime,
|
|
28224
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28225
|
-
dataLoaders: { courses: {
|
|
28226
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28227
|
-
params: {
|
|
28228
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28229
|
-
limit: "50",
|
|
28230
|
-
stage: { $bind: {
|
|
28231
|
-
from: "$root.previewStage",
|
|
28232
|
-
fallback: "published"
|
|
28233
|
-
} }
|
|
28234
|
-
},
|
|
28235
|
-
mode: "server"
|
|
28236
|
-
} }
|
|
28237
|
-
};
|
|
28238
|
-
//#endregion
|
|
28239
28228
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
28240
28229
|
/**
|
|
28241
28230
|
* Event Details Block
|
|
@@ -28482,200 +28471,6 @@ const eventDetailsBlockDefinition = {
|
|
|
28482
28471
|
mode: "server"
|
|
28483
28472
|
} }
|
|
28484
28473
|
};
|
|
28485
|
-
const courseDetailsBlockDefinition = {
|
|
28486
|
-
manifest: createBlockManifest({
|
|
28487
|
-
id: "block.course-details",
|
|
28488
|
-
version: "1.0.0",
|
|
28489
|
-
title: "Course Details",
|
|
28490
|
-
titleSource: "heading",
|
|
28491
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
28492
|
-
category: "content",
|
|
28493
|
-
contentSource: { kind: "entries" },
|
|
28494
|
-
tags: [
|
|
28495
|
-
"courses",
|
|
28496
|
-
"schedule",
|
|
28497
|
-
"sessions",
|
|
28498
|
-
"venue",
|
|
28499
|
-
"pricing"
|
|
28500
|
-
],
|
|
28501
|
-
icon: "GraduationCap",
|
|
28502
|
-
styleTokens: {
|
|
28503
|
-
background: "surface",
|
|
28504
|
-
typography: "body",
|
|
28505
|
-
spacing: "md"
|
|
28506
|
-
},
|
|
28507
|
-
behaviours: {
|
|
28508
|
-
supportsThemeSwitching: true,
|
|
28509
|
-
inlineEditing: false,
|
|
28510
|
-
animation: false,
|
|
28511
|
-
paletteHidden: false
|
|
28512
|
-
},
|
|
28513
|
-
additionalFields: [
|
|
28514
|
-
{
|
|
28515
|
-
id: "heading",
|
|
28516
|
-
type: "text",
|
|
28517
|
-
label: "Heading",
|
|
28518
|
-
description: "Optional heading shown above course details",
|
|
28519
|
-
required: false,
|
|
28520
|
-
multiline: false,
|
|
28521
|
-
defaultValue: "Course details"
|
|
28522
|
-
},
|
|
28523
|
-
{
|
|
28524
|
-
id: "showTitle",
|
|
28525
|
-
type: "boolean",
|
|
28526
|
-
label: "Show course title",
|
|
28527
|
-
required: false,
|
|
28528
|
-
defaultValue: false,
|
|
28529
|
-
ui: { intent: "display" }
|
|
28530
|
-
},
|
|
28531
|
-
{
|
|
28532
|
-
id: "showDescription",
|
|
28533
|
-
type: "boolean",
|
|
28534
|
-
label: "Show course description",
|
|
28535
|
-
description: "Render the course description from the bookings course record",
|
|
28536
|
-
required: false,
|
|
28537
|
-
defaultValue: false,
|
|
28538
|
-
ui: { intent: "display" }
|
|
28539
|
-
},
|
|
28540
|
-
{
|
|
28541
|
-
id: "showSessions",
|
|
28542
|
-
type: "boolean",
|
|
28543
|
-
label: "Show sessions",
|
|
28544
|
-
required: false,
|
|
28545
|
-
defaultValue: true,
|
|
28546
|
-
ui: { intent: "display" }
|
|
28547
|
-
},
|
|
28548
|
-
{
|
|
28549
|
-
id: "sessionsLimit",
|
|
28550
|
-
type: "select",
|
|
28551
|
-
label: "Sessions limit",
|
|
28552
|
-
required: false,
|
|
28553
|
-
multiple: false,
|
|
28554
|
-
defaultValue: "10",
|
|
28555
|
-
options: [
|
|
28556
|
-
{
|
|
28557
|
-
value: "3",
|
|
28558
|
-
label: "3 sessions"
|
|
28559
|
-
},
|
|
28560
|
-
{
|
|
28561
|
-
value: "5",
|
|
28562
|
-
label: "5 sessions"
|
|
28563
|
-
},
|
|
28564
|
-
{
|
|
28565
|
-
value: "10",
|
|
28566
|
-
label: "10 sessions"
|
|
28567
|
-
},
|
|
28568
|
-
{
|
|
28569
|
-
value: "all",
|
|
28570
|
-
label: "All sessions"
|
|
28571
|
-
}
|
|
28572
|
-
],
|
|
28573
|
-
ui: { intent: "display" }
|
|
28574
|
-
},
|
|
28575
|
-
{
|
|
28576
|
-
id: "showVenue",
|
|
28577
|
-
type: "boolean",
|
|
28578
|
-
label: "Show venue",
|
|
28579
|
-
required: false,
|
|
28580
|
-
defaultValue: true,
|
|
28581
|
-
ui: { intent: "display" }
|
|
28582
|
-
},
|
|
28583
|
-
{
|
|
28584
|
-
id: "showPrice",
|
|
28585
|
-
type: "boolean",
|
|
28586
|
-
label: "Show price",
|
|
28587
|
-
required: false,
|
|
28588
|
-
defaultValue: true,
|
|
28589
|
-
ui: { intent: "display" }
|
|
28590
|
-
},
|
|
28591
|
-
{
|
|
28592
|
-
id: "showCapacity",
|
|
28593
|
-
type: "boolean",
|
|
28594
|
-
label: "Show capacity",
|
|
28595
|
-
required: false,
|
|
28596
|
-
defaultValue: true,
|
|
28597
|
-
ui: { intent: "display" }
|
|
28598
|
-
},
|
|
28599
|
-
{
|
|
28600
|
-
id: "showEnrollmentStatus",
|
|
28601
|
-
type: "boolean",
|
|
28602
|
-
label: "Show enrollment status",
|
|
28603
|
-
required: false,
|
|
28604
|
-
defaultValue: true,
|
|
28605
|
-
ui: { intent: "display" }
|
|
28606
|
-
},
|
|
28607
|
-
{
|
|
28608
|
-
id: "showMembershipNote",
|
|
28609
|
-
type: "boolean",
|
|
28610
|
-
label: "Show membership note",
|
|
28611
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
28612
|
-
required: false,
|
|
28613
|
-
defaultValue: true,
|
|
28614
|
-
ui: { intent: "display" }
|
|
28615
|
-
}
|
|
28616
|
-
],
|
|
28617
|
-
layout: [styledSection({
|
|
28618
|
-
baseClass: "",
|
|
28619
|
-
spacing: "spacious",
|
|
28620
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
28621
|
-
subject: { $bind: {
|
|
28622
|
-
from: "$root.subject",
|
|
28623
|
-
fallback: null
|
|
28624
|
-
} },
|
|
28625
|
-
courses: { $bind: { from: "data.courses" } },
|
|
28626
|
-
showTitle: { $bind: {
|
|
28627
|
-
from: "content.showTitle",
|
|
28628
|
-
fallback: false
|
|
28629
|
-
} },
|
|
28630
|
-
showDescription: { $bind: {
|
|
28631
|
-
from: "content.showDescription",
|
|
28632
|
-
fallback: false
|
|
28633
|
-
} },
|
|
28634
|
-
showSessions: { $bind: {
|
|
28635
|
-
from: "content.showSessions",
|
|
28636
|
-
fallback: true
|
|
28637
|
-
} },
|
|
28638
|
-
sessionsLimit: { $bind: {
|
|
28639
|
-
from: "content.sessionsLimit",
|
|
28640
|
-
fallback: "10"
|
|
28641
|
-
} },
|
|
28642
|
-
showVenue: { $bind: {
|
|
28643
|
-
from: "content.showVenue",
|
|
28644
|
-
fallback: true
|
|
28645
|
-
} },
|
|
28646
|
-
showPrice: { $bind: {
|
|
28647
|
-
from: "content.showPrice",
|
|
28648
|
-
fallback: true
|
|
28649
|
-
} },
|
|
28650
|
-
showCapacity: { $bind: {
|
|
28651
|
-
from: "content.showCapacity",
|
|
28652
|
-
fallback: true
|
|
28653
|
-
} },
|
|
28654
|
-
showEnrollmentStatus: { $bind: {
|
|
28655
|
-
from: "content.showEnrollmentStatus",
|
|
28656
|
-
fallback: true
|
|
28657
|
-
} },
|
|
28658
|
-
showMembershipNote: { $bind: {
|
|
28659
|
-
from: "content.showMembershipNote",
|
|
28660
|
-
fallback: true
|
|
28661
|
-
} }
|
|
28662
|
-
})], { gap: "lg" })
|
|
28663
|
-
})]
|
|
28664
|
-
}),
|
|
28665
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
28666
|
-
dataLoaders: { courses: {
|
|
28667
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
28668
|
-
params: {
|
|
28669
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
28670
|
-
limit: "50",
|
|
28671
|
-
stage: { $bind: {
|
|
28672
|
-
from: "$root.previewStage",
|
|
28673
|
-
fallback: "published"
|
|
28674
|
-
} }
|
|
28675
|
-
},
|
|
28676
|
-
mode: "server"
|
|
28677
|
-
} }
|
|
28678
|
-
};
|
|
28679
28474
|
const eventSpotlightBlockDefinition = {
|
|
28680
28475
|
manifest: createBlockManifest({
|
|
28681
28476
|
id: "block.event-spotlight",
|
|
@@ -31062,7 +30857,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
31062
30857
|
entityId: z.string(),
|
|
31063
30858
|
path: z.string(),
|
|
31064
30859
|
title: z.string(),
|
|
31065
|
-
kind: z.enum(
|
|
30860
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
31066
30861
|
contentTypeKey: z.string().nullable().optional()
|
|
31067
30862
|
})) });
|
|
31068
30863
|
const groupOverrideFields = [
|
|
@@ -31339,7 +31134,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
31339
31134
|
fallback: "published"
|
|
31340
31135
|
} },
|
|
31341
31136
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
31342
|
-
|
|
31137
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
31343
31138
|
...offeringsPreviewEventDataBindings
|
|
31344
31139
|
})
|
|
31345
31140
|
], { gap: "lg" }),
|
|
@@ -31356,7 +31151,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31356
31151
|
dataSchemas: {
|
|
31357
31152
|
...offeringsPreviewEventDataSchemas,
|
|
31358
31153
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
31359
|
-
|
|
31154
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
31360
31155
|
},
|
|
31361
31156
|
dataLoaders: {
|
|
31362
31157
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -31365,7 +31160,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
31365
31160
|
params: {},
|
|
31366
31161
|
mode: "server"
|
|
31367
31162
|
},
|
|
31368
|
-
|
|
31163
|
+
wholeSeriesOfferings: {
|
|
31369
31164
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
31370
31165
|
params: {
|
|
31371
31166
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -36332,22 +36127,6 @@ const systemBlockDefinitions = [
|
|
|
36332
36127
|
weight: "standard"
|
|
36333
36128
|
})]
|
|
36334
36129
|
})),
|
|
36335
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
36336
|
-
flow: conversionFlow,
|
|
36337
|
-
layoutProfiles: [layoutProfile({
|
|
36338
|
-
variantKey: "default",
|
|
36339
|
-
family: "form",
|
|
36340
|
-
weight: "standard"
|
|
36341
|
-
})]
|
|
36342
|
-
})),
|
|
36343
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
36344
|
-
flow: offeringsFlow,
|
|
36345
|
-
layoutProfiles: [layoutProfile({
|
|
36346
|
-
variantKey: "default",
|
|
36347
|
-
family: "stack",
|
|
36348
|
-
weight: "standard"
|
|
36349
|
-
})]
|
|
36350
|
-
})),
|
|
36351
36130
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
36352
36131
|
flow: offeringsFlow,
|
|
36353
36132
|
layoutProfiles: [layoutProfile({
|
|
@@ -38406,6 +38185,68 @@ function parsePublicProductCategorySelector(value) {
|
|
|
38406
38185
|
};
|
|
38407
38186
|
}
|
|
38408
38187
|
//#endregion
|
|
38188
|
+
//#region ../api/src/bookingPaymentTermSchemas.ts
|
|
38189
|
+
const bookingDepositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
38190
|
+
const bookingInstalmentPlanSchema = z.discriminatedUnion("kind", [
|
|
38191
|
+
z.object({
|
|
38192
|
+
kind: z.literal("deposit_plus_one_remainder"),
|
|
38193
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
38194
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
38195
|
+
remainderDueCount: z.number().int().positive(),
|
|
38196
|
+
intervalUnit: z.enum([
|
|
38197
|
+
"day",
|
|
38198
|
+
"week",
|
|
38199
|
+
"month"
|
|
38200
|
+
])
|
|
38201
|
+
}),
|
|
38202
|
+
z.object({
|
|
38203
|
+
kind: z.literal("deposit_plus_scheduled_instalments"),
|
|
38204
|
+
depositAmountCents: z.number().int().nonnegative(),
|
|
38205
|
+
depositRefundability: bookingDepositRefundPolicySchema,
|
|
38206
|
+
instalmentCount: z.number().int().positive(),
|
|
38207
|
+
intervalCount: z.number().int().positive(),
|
|
38208
|
+
intervalUnit: z.enum([
|
|
38209
|
+
"day",
|
|
38210
|
+
"week",
|
|
38211
|
+
"month"
|
|
38212
|
+
])
|
|
38213
|
+
}),
|
|
38214
|
+
z.object({
|
|
38215
|
+
kind: z.literal("equal_scheduled_instalments"),
|
|
38216
|
+
instalmentCount: z.number().int().positive(),
|
|
38217
|
+
intervalCount: z.number().int().positive(),
|
|
38218
|
+
intervalUnit: z.enum([
|
|
38219
|
+
"day",
|
|
38220
|
+
"week",
|
|
38221
|
+
"month"
|
|
38222
|
+
])
|
|
38223
|
+
})
|
|
38224
|
+
]);
|
|
38225
|
+
const bookingFlexibleBalanceDueDateRuleSchema = z.discriminatedUnion("kind", [z.object({
|
|
38226
|
+
kind: z.literal("relative_to_start_date"),
|
|
38227
|
+
daysBeforeStart: z.number().int().positive()
|
|
38228
|
+
}), z.object({
|
|
38229
|
+
kind: z.literal("fixed_calendar_date"),
|
|
38230
|
+
dueAt: z.string().datetime()
|
|
38231
|
+
})]);
|
|
38232
|
+
const bookingFlexibleBalanceConfigSchema = z.object({
|
|
38233
|
+
upfrontAmountCents: z.number().int().nonnegative(),
|
|
38234
|
+
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
38235
|
+
depositRefundability: bookingDepositRefundPolicySchema
|
|
38236
|
+
});
|
|
38237
|
+
z.discriminatedUnion("kind", [
|
|
38238
|
+
z.object({ kind: z.literal("upfront") }),
|
|
38239
|
+
z.object({ kind: z.literal("deferred_manual") }),
|
|
38240
|
+
z.object({
|
|
38241
|
+
kind: z.literal("instalment_plan"),
|
|
38242
|
+
plan: bookingInstalmentPlanSchema
|
|
38243
|
+
}),
|
|
38244
|
+
z.object({
|
|
38245
|
+
kind: z.literal("flexible_balance"),
|
|
38246
|
+
config: bookingFlexibleBalanceConfigSchema
|
|
38247
|
+
})
|
|
38248
|
+
]);
|
|
38249
|
+
//#endregion
|
|
38409
38250
|
//#region ../api/src/aiPlayground.ts
|
|
38410
38251
|
/**
|
|
38411
38252
|
* RFC-6902 JSON Patch Operations
|