@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
|
@@ -6659,7 +6659,7 @@ defineBlockAppearancePreset({
|
|
|
6659
6659
|
id: "schedule-details-brand-depth",
|
|
6660
6660
|
target: "events",
|
|
6661
6661
|
label: "Brand-depth schedule details",
|
|
6662
|
-
blockKinds: ["block.event-details"
|
|
6662
|
+
blockKinds: ["block.event-details"],
|
|
6663
6663
|
design: {
|
|
6664
6664
|
sectionSurface: "brand-depth-band",
|
|
6665
6665
|
contentFrame: plainFrame,
|
|
@@ -10950,14 +10950,14 @@ function publicEventPricingType(pricing) {
|
|
|
10950
10950
|
case "single_paid":
|
|
10951
10951
|
case "ticket_types":
|
|
10952
10952
|
case "sliding_scale":
|
|
10953
|
-
case "
|
|
10953
|
+
case "whole_series": return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
10954
10954
|
case "external": return "external";
|
|
10955
10955
|
}
|
|
10956
10956
|
}
|
|
10957
10957
|
function isFreePublicEventPriceDisplay(display) {
|
|
10958
10958
|
switch (display.kind) {
|
|
10959
10959
|
case "free": return true;
|
|
10960
|
-
case "
|
|
10960
|
+
case "whole_series": return display.display.kind === "free";
|
|
10961
10961
|
case "exact":
|
|
10962
10962
|
case "from":
|
|
10963
10963
|
case "range":
|
|
@@ -11198,6 +11198,25 @@ function parseNewsletterSignupDestinationProvider(value) {
|
|
|
11198
11198
|
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
11199
11199
|
}
|
|
11200
11200
|
//#endregion
|
|
11201
|
+
//#region ../core/src/planner.ts
|
|
11202
|
+
/** Default clock for production callers that do not inject time explicitly. */
|
|
11203
|
+
const systemPlanningClock = { now: () => Date.now() };
|
|
11204
|
+
/** Resolve current time as a Date from an explicit Date, injected clock, or system clock. */
|
|
11205
|
+
function resolvePlanningNowDate(input = {}) {
|
|
11206
|
+
if (input.now !== void 0) return input.now;
|
|
11207
|
+
return new Date((input.clock ?? systemPlanningClock).now());
|
|
11208
|
+
}
|
|
11209
|
+
/**
|
|
11210
|
+
* Resolve a Date-compatible planner input.
|
|
11211
|
+
*
|
|
11212
|
+
* Precedence: bare Date, `{ now }`, `{ clock }`, then `systemPlanningClock`.
|
|
11213
|
+
* Explicit Date inputs are returned by reference, not cloned.
|
|
11214
|
+
*/
|
|
11215
|
+
function resolvePlanningDateInput(input = {}) {
|
|
11216
|
+
if (input instanceof Date) return input;
|
|
11217
|
+
return resolvePlanningNowDate(input);
|
|
11218
|
+
}
|
|
11219
|
+
//#endregion
|
|
11201
11220
|
//#region ../core/src/event-series-behaviour.ts
|
|
11202
11221
|
const SURFACE_EVENT_PRESET_VALUES = [
|
|
11203
11222
|
"class",
|
|
@@ -13033,7 +13052,6 @@ const productDetail = (props, children, ...mods) => el("product-detail", props,
|
|
|
13033
13052
|
const cart = (props, children, ...mods) => el("cart", props, children, ...mods);
|
|
13034
13053
|
const checkout = (props, children, ...mods) => el("checkout", props, children, ...mods);
|
|
13035
13054
|
const gifting = (props, children, ...mods) => el("gifting", props, children, ...mods);
|
|
13036
|
-
const courseRegistration = (props, children, ...mods) => el("course-registration", props, children, ...mods);
|
|
13037
13055
|
function bind(from, options) {
|
|
13038
13056
|
return (node) => ({
|
|
13039
13057
|
...node,
|
|
@@ -21072,6 +21090,181 @@ const blockBookingPaymentCollectionOptionSchema = z.union([
|
|
|
21072
21090
|
]);
|
|
21073
21091
|
const blockBookingPaymentTermsSchema = z.object({ allowedOptions: z.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
21074
21092
|
//#endregion
|
|
21093
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
21094
|
+
const blockBookingConsentSchema = z.object({
|
|
21095
|
+
requirementId: z.string(),
|
|
21096
|
+
title: z.string(),
|
|
21097
|
+
agreement: RichTextDocSchema,
|
|
21098
|
+
checkboxLabel: z.string()
|
|
21099
|
+
});
|
|
21100
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
21101
|
+
id: z.string(),
|
|
21102
|
+
label: z.string(),
|
|
21103
|
+
type: z.literal("booking_requirement_consent"),
|
|
21104
|
+
required: z.literal(true),
|
|
21105
|
+
agreement: RichTextDocSchema,
|
|
21106
|
+
checkboxLabel: z.string().min(1)
|
|
21107
|
+
});
|
|
21108
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
21109
|
+
//#endregion
|
|
21110
|
+
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
21111
|
+
function isSaleWindowOpen(option, now) {
|
|
21112
|
+
if (!option.isActive) return false;
|
|
21113
|
+
if (option.saleStartsAt && new Date(option.saleStartsAt) > now) return false;
|
|
21114
|
+
if (option.saleEndsAt && new Date(option.saleEndsAt) < now) return false;
|
|
21115
|
+
return true;
|
|
21116
|
+
}
|
|
21117
|
+
function toExactOrFreeDisplay(amount, currency) {
|
|
21118
|
+
if (amount <= 0) return {
|
|
21119
|
+
kind: "free",
|
|
21120
|
+
currency
|
|
21121
|
+
};
|
|
21122
|
+
return {
|
|
21123
|
+
kind: "exact",
|
|
21124
|
+
amount,
|
|
21125
|
+
currency
|
|
21126
|
+
};
|
|
21127
|
+
}
|
|
21128
|
+
function getSelectableWholeSeriesPricingOptionsForNow(offering, now) {
|
|
21129
|
+
if (offering.pricing.pricingStrategy !== "tiered") return [];
|
|
21130
|
+
return [...offering.pricing.options].filter((option) => isSaleWindowOpen(option, now)).sort((left, right) => {
|
|
21131
|
+
if (left.sortOrder !== right.sortOrder) return left.sortOrder - right.sortOrder;
|
|
21132
|
+
if (left.priceAmount !== right.priceAmount) return left.priceAmount - right.priceAmount;
|
|
21133
|
+
return left.name.localeCompare(right.name);
|
|
21134
|
+
});
|
|
21135
|
+
}
|
|
21136
|
+
function resolveWholeSeriesPricingState(offering, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
21137
|
+
const selection = normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput);
|
|
21138
|
+
const currency = offering.pricing.currency;
|
|
21139
|
+
switch (offering.pricing.pricingStrategy) {
|
|
21140
|
+
case "free": return resolveFreePricing(currency);
|
|
21141
|
+
case "single": return resolveSinglePricing(offering.pricing.singlePriceAmount ?? 0, currency);
|
|
21142
|
+
case "tiered": return resolveTieredPricing(offering, selectedPricingOptionId, selection.nowInput);
|
|
21143
|
+
case "sliding_scale": return resolveSlidingScalePricing(offering, selection.selectedSlidingAmount);
|
|
21144
|
+
}
|
|
21145
|
+
}
|
|
21146
|
+
function normalizePricingSelectionInput(selectedSlidingAmountOrNowInput, nowInput) {
|
|
21147
|
+
return typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? {
|
|
21148
|
+
selectedSlidingAmount: null,
|
|
21149
|
+
nowInput: selectedSlidingAmountOrNowInput
|
|
21150
|
+
} : {
|
|
21151
|
+
selectedSlidingAmount: typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null,
|
|
21152
|
+
nowInput
|
|
21153
|
+
};
|
|
21154
|
+
}
|
|
21155
|
+
function resolveFreePricing(currency) {
|
|
21156
|
+
return {
|
|
21157
|
+
currency,
|
|
21158
|
+
display: {
|
|
21159
|
+
kind: "free",
|
|
21160
|
+
currency
|
|
21161
|
+
},
|
|
21162
|
+
selectableOptions: [],
|
|
21163
|
+
requiresSelection: false,
|
|
21164
|
+
selectedOption: null,
|
|
21165
|
+
slidingScale: null,
|
|
21166
|
+
selectedSlidingAmount: null,
|
|
21167
|
+
selectedPriceAmount: 0,
|
|
21168
|
+
selectedRequiresPayment: false,
|
|
21169
|
+
hasPaidSelection: false,
|
|
21170
|
+
hasFreeSelection: true
|
|
21171
|
+
};
|
|
21172
|
+
}
|
|
21173
|
+
function resolveSinglePricing(amount, currency) {
|
|
21174
|
+
return {
|
|
21175
|
+
currency,
|
|
21176
|
+
display: toExactOrFreeDisplay(amount, currency),
|
|
21177
|
+
selectableOptions: [],
|
|
21178
|
+
requiresSelection: false,
|
|
21179
|
+
selectedOption: null,
|
|
21180
|
+
slidingScale: null,
|
|
21181
|
+
selectedSlidingAmount: null,
|
|
21182
|
+
selectedPriceAmount: amount,
|
|
21183
|
+
selectedRequiresPayment: amount > 0,
|
|
21184
|
+
hasPaidSelection: amount > 0,
|
|
21185
|
+
hasFreeSelection: amount <= 0
|
|
21186
|
+
};
|
|
21187
|
+
}
|
|
21188
|
+
function resolveTieredPricing(offering, selectedPricingOptionId, nowInput) {
|
|
21189
|
+
const currency = offering.pricing.currency;
|
|
21190
|
+
const selectableOptions = getSelectableWholeSeriesPricingOptionsForNow(offering, resolvePlanningDateInput(nowInput));
|
|
21191
|
+
const selectedOption = resolveSelectedTier(selectableOptions, selectedPricingOptionId);
|
|
21192
|
+
return {
|
|
21193
|
+
currency,
|
|
21194
|
+
display: resolveTieredDisplay(selectableOptions.reduce((lowest, option) => lowest === null || option.priceAmount < lowest ? option.priceAmount : lowest, null), selectableOptions.length, currency),
|
|
21195
|
+
selectableOptions,
|
|
21196
|
+
requiresSelection: selectableOptions.length > 1,
|
|
21197
|
+
selectedOption,
|
|
21198
|
+
slidingScale: null,
|
|
21199
|
+
selectedSlidingAmount: null,
|
|
21200
|
+
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
21201
|
+
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
21202
|
+
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
21203
|
+
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
21204
|
+
};
|
|
21205
|
+
}
|
|
21206
|
+
function resolveSelectedTier(options, selectedId) {
|
|
21207
|
+
return (selectedId ? options.find((option) => option.id === selectedId) : null) ?? (options.length === 1 ? options[0] ?? null : null);
|
|
21208
|
+
}
|
|
21209
|
+
function resolveTieredDisplay(lowestAmount, optionCount, currency) {
|
|
21210
|
+
if (lowestAmount === null) return {
|
|
21211
|
+
kind: "unavailable",
|
|
21212
|
+
currency
|
|
21213
|
+
};
|
|
21214
|
+
return optionCount > 1 && lowestAmount > 0 ? {
|
|
21215
|
+
kind: "from",
|
|
21216
|
+
amount: lowestAmount,
|
|
21217
|
+
currency
|
|
21218
|
+
} : toExactOrFreeDisplay(lowestAmount, currency);
|
|
21219
|
+
}
|
|
21220
|
+
function resolveSlidingScalePricing(offering, selectedSlidingAmount) {
|
|
21221
|
+
const currency = offering.pricing.currency;
|
|
21222
|
+
const minAmount = offering.pricing.slidingMinAmount ?? null;
|
|
21223
|
+
const maxAmount = offering.pricing.slidingMaxAmount ?? null;
|
|
21224
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) return unavailableSlidingScale(currency);
|
|
21225
|
+
const selectedAmount = Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
21226
|
+
return {
|
|
21227
|
+
currency,
|
|
21228
|
+
display: {
|
|
21229
|
+
kind: "range",
|
|
21230
|
+
minAmount,
|
|
21231
|
+
maxAmount,
|
|
21232
|
+
currency
|
|
21233
|
+
},
|
|
21234
|
+
selectableOptions: [],
|
|
21235
|
+
requiresSelection: selectedAmount === null,
|
|
21236
|
+
selectedOption: null,
|
|
21237
|
+
slidingScale: {
|
|
21238
|
+
minAmount,
|
|
21239
|
+
maxAmount,
|
|
21240
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null
|
|
21241
|
+
},
|
|
21242
|
+
selectedSlidingAmount: selectedAmount,
|
|
21243
|
+
selectedPriceAmount: selectedAmount,
|
|
21244
|
+
selectedRequiresPayment: (selectedAmount ?? 0) > 0,
|
|
21245
|
+
hasPaidSelection: maxAmount > 0,
|
|
21246
|
+
hasFreeSelection: minAmount === 0
|
|
21247
|
+
};
|
|
21248
|
+
}
|
|
21249
|
+
function unavailableSlidingScale(currency) {
|
|
21250
|
+
return {
|
|
21251
|
+
currency,
|
|
21252
|
+
display: {
|
|
21253
|
+
kind: "unavailable",
|
|
21254
|
+
currency
|
|
21255
|
+
},
|
|
21256
|
+
selectableOptions: [],
|
|
21257
|
+
requiresSelection: true,
|
|
21258
|
+
selectedOption: null,
|
|
21259
|
+
slidingScale: null,
|
|
21260
|
+
selectedSlidingAmount: null,
|
|
21261
|
+
selectedPriceAmount: null,
|
|
21262
|
+
selectedRequiresPayment: false,
|
|
21263
|
+
hasPaidSelection: false,
|
|
21264
|
+
hasFreeSelection: false
|
|
21265
|
+
};
|
|
21266
|
+
}
|
|
21267
|
+
//#endregion
|
|
21075
21268
|
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
21076
21269
|
const wholeSeriesVenueSchema = z.object({
|
|
21077
21270
|
id: z.string(),
|
|
@@ -21131,11 +21324,19 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
21131
21324
|
title: z.string(),
|
|
21132
21325
|
slug: z.string(),
|
|
21133
21326
|
description: z.unknown().nullable(),
|
|
21327
|
+
deliveryMode: z.enum([
|
|
21328
|
+
"in_person",
|
|
21329
|
+
"online",
|
|
21330
|
+
"hybrid"
|
|
21331
|
+
]),
|
|
21332
|
+
waitlistEnabled: z.boolean(),
|
|
21333
|
+
requireGuestDetails: z.boolean(),
|
|
21134
21334
|
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
21135
21335
|
enrollmentOpen: z.boolean(),
|
|
21136
21336
|
pricing: wholeSeriesPricingSchema,
|
|
21137
21337
|
currency: z.string(),
|
|
21138
21338
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
21339
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
21139
21340
|
enrollmentCapacity: z.number().nullable(),
|
|
21140
21341
|
acceptsMemberships: z.boolean(),
|
|
21141
21342
|
status: z.enum([
|
|
@@ -21245,7 +21446,7 @@ const mixedPriceDisplaySchema = z.object({
|
|
|
21245
21446
|
paidToAmount: z.number(),
|
|
21246
21447
|
currency: z.string()
|
|
21247
21448
|
});
|
|
21248
|
-
const
|
|
21449
|
+
const publicWholeSeriesPriceDisplaySchema = z.discriminatedUnion("kind", [
|
|
21249
21450
|
freePriceDisplaySchema,
|
|
21250
21451
|
exactPriceDisplaySchema,
|
|
21251
21452
|
fromPriceDisplaySchema,
|
|
@@ -21263,8 +21464,8 @@ z.discriminatedUnion("kind", [
|
|
|
21263
21464
|
label: z.string()
|
|
21264
21465
|
}),
|
|
21265
21466
|
z.object({
|
|
21266
|
-
kind: z.literal("
|
|
21267
|
-
display:
|
|
21467
|
+
kind: z.literal("whole_series"),
|
|
21468
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
21268
21469
|
})
|
|
21269
21470
|
]);
|
|
21270
21471
|
const publicEventTicketTypePriceDisplaySchema = z.union([
|
|
@@ -21366,10 +21567,10 @@ const publicEventPricingSchema = z.discriminatedUnion("kind", [
|
|
|
21366
21567
|
})
|
|
21367
21568
|
}),
|
|
21368
21569
|
z.object({
|
|
21369
|
-
kind: z.literal("
|
|
21570
|
+
kind: z.literal("whole_series"),
|
|
21370
21571
|
display: z.object({
|
|
21371
|
-
kind: z.literal("
|
|
21372
|
-
display:
|
|
21572
|
+
kind: z.literal("whole_series"),
|
|
21573
|
+
display: publicWholeSeriesPriceDisplaySchema
|
|
21373
21574
|
})
|
|
21374
21575
|
}),
|
|
21375
21576
|
z.object({
|
|
@@ -21453,6 +21654,7 @@ const publicEventSchema = z.object({
|
|
|
21453
21654
|
timeZone: z.string(),
|
|
21454
21655
|
pricing: publicEventPricingSchema,
|
|
21455
21656
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
21657
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
21456
21658
|
accessRestriction: accessRestrictionSchema,
|
|
21457
21659
|
allowedCategoryIds: z.array(z.string()),
|
|
21458
21660
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -21785,7 +21987,8 @@ function resolveEventRegistrationScope(context) {
|
|
|
21785
21987
|
};
|
|
21786
21988
|
return { kind: "unscoped" };
|
|
21787
21989
|
}
|
|
21788
|
-
function
|
|
21990
|
+
function resolveEventRegistrationScopedEvents(events, context) {
|
|
21991
|
+
const scope = resolveEventRegistrationScope(context);
|
|
21789
21992
|
switch (scope.kind) {
|
|
21790
21993
|
case "occurrenceSeries":
|
|
21791
21994
|
case "pageSurfaceSeries": return events.filter((event) => event.seriesId === scope.seriesId);
|
|
@@ -21797,8 +22000,24 @@ function applyEventRegistrationScope(events, scope) {
|
|
|
21797
22000
|
case "unscoped": return [...events];
|
|
21798
22001
|
}
|
|
21799
22002
|
}
|
|
21800
|
-
|
|
21801
|
-
|
|
22003
|
+
//#endregion
|
|
22004
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
22005
|
+
function planEventRegistrationScope(input) {
|
|
22006
|
+
const subject = input.subject;
|
|
22007
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
22008
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
22009
|
+
kind: "context",
|
|
22010
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
22011
|
+
occurrenceContext: input.occurrenceContext,
|
|
22012
|
+
subject
|
|
22013
|
+
})
|
|
22014
|
+
};
|
|
22015
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
22016
|
+
return {
|
|
22017
|
+
kind: "selectedRun",
|
|
22018
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
22019
|
+
offering: selectedRunOffering
|
|
22020
|
+
};
|
|
21802
22021
|
}
|
|
21803
22022
|
//#endregion
|
|
21804
22023
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
@@ -21874,14 +22093,14 @@ function isRecord$4(value) {
|
|
|
21874
22093
|
}
|
|
21875
22094
|
function isPublicEventPricing(value) {
|
|
21876
22095
|
if (!isRecord$4(value) || typeof value.kind !== "string") return false;
|
|
21877
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "
|
|
22096
|
+
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";
|
|
21878
22097
|
}
|
|
21879
22098
|
function isPublicEventTicketType(value) {
|
|
21880
22099
|
return isRecord$4(value) && typeof value.id === "string";
|
|
21881
22100
|
}
|
|
21882
22101
|
function readTicketTypePriceDisplay(value, currency) {
|
|
21883
22102
|
const display = readLegacyPriceDisplay(value, currency);
|
|
21884
|
-
return display.kind === "
|
|
22103
|
+
return display.kind === "whole_series" || display.kind === "external" ? {
|
|
21885
22104
|
kind: "unavailable",
|
|
21886
22105
|
currency
|
|
21887
22106
|
} : display;
|
|
@@ -21939,11 +22158,11 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
21939
22158
|
kind: "unavailable",
|
|
21940
22159
|
currency: displayCurrency
|
|
21941
22160
|
};
|
|
21942
|
-
case "
|
|
21943
|
-
kind: "
|
|
22161
|
+
case "whole_series": return isRecord$4(value.display) ? {
|
|
22162
|
+
kind: "whole_series",
|
|
21944
22163
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
21945
22164
|
} : {
|
|
21946
|
-
kind: "
|
|
22165
|
+
kind: "whole_series",
|
|
21947
22166
|
display: {
|
|
21948
22167
|
kind: "unavailable",
|
|
21949
22168
|
currency: displayCurrency
|
|
@@ -22069,7 +22288,7 @@ function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
|
22069
22288
|
//#endregion
|
|
22070
22289
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationDerivations.ts
|
|
22071
22290
|
function eventMatchesOccurrenceId(event, occurrenceId) {
|
|
22072
|
-
return event.
|
|
22291
|
+
return event.registrationSubject.kind === "occurrence" && (event.registrationSubject.occurrenceId === occurrenceId || event.selectionId === occurrenceId);
|
|
22073
22292
|
}
|
|
22074
22293
|
function findPreSelectedEvent(input) {
|
|
22075
22294
|
const occurrenceContext = input.occurrenceContext;
|
|
@@ -22095,12 +22314,127 @@ function toRegistrationEvent(event) {
|
|
|
22095
22314
|
return {
|
|
22096
22315
|
...event,
|
|
22097
22316
|
pricing: resolveRuntimeEventPricing(event),
|
|
22098
|
-
|
|
22099
|
-
|
|
22317
|
+
selectionId: event.id,
|
|
22318
|
+
registrationSubject: {
|
|
22319
|
+
kind: "occurrence",
|
|
22320
|
+
occurrenceId: event.occurrenceId
|
|
22321
|
+
}
|
|
22100
22322
|
};
|
|
22101
22323
|
}
|
|
22102
22324
|
function toRegistrationEvents(events) {
|
|
22103
|
-
return events.map(toRegistrationEvent);
|
|
22325
|
+
return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
|
|
22326
|
+
}
|
|
22327
|
+
function toWholeSeriesTicketType(option) {
|
|
22328
|
+
return {
|
|
22329
|
+
...option,
|
|
22330
|
+
capacityMode: option.capacityLimit === null ? "unlimited" : "limited",
|
|
22331
|
+
attendanceScope: option.attendanceScope ?? void 0,
|
|
22332
|
+
availability: {
|
|
22333
|
+
kind: "available",
|
|
22334
|
+
remainingCapacity: option.capacityLimit
|
|
22335
|
+
}
|
|
22336
|
+
};
|
|
22337
|
+
}
|
|
22338
|
+
function toWholeSeriesPricing(offering) {
|
|
22339
|
+
const resolved = resolveWholeSeriesPricingState(offering);
|
|
22340
|
+
switch (offering.pricing.pricingStrategy) {
|
|
22341
|
+
case "free": return {
|
|
22342
|
+
kind: "free_registration",
|
|
22343
|
+
currency: offering.currency,
|
|
22344
|
+
display: {
|
|
22345
|
+
kind: "free",
|
|
22346
|
+
currency: offering.currency
|
|
22347
|
+
}
|
|
22348
|
+
};
|
|
22349
|
+
case "single": {
|
|
22350
|
+
const amount = offering.pricing.singlePriceAmount ?? 0;
|
|
22351
|
+
return amount === 0 ? {
|
|
22352
|
+
kind: "free_registration",
|
|
22353
|
+
currency: offering.currency,
|
|
22354
|
+
display: {
|
|
22355
|
+
kind: "free",
|
|
22356
|
+
currency: offering.currency
|
|
22357
|
+
}
|
|
22358
|
+
} : {
|
|
22359
|
+
kind: "single_paid",
|
|
22360
|
+
amount,
|
|
22361
|
+
currency: offering.currency,
|
|
22362
|
+
display: {
|
|
22363
|
+
kind: "exact",
|
|
22364
|
+
amount,
|
|
22365
|
+
currency: offering.currency
|
|
22366
|
+
}
|
|
22367
|
+
};
|
|
22368
|
+
}
|
|
22369
|
+
case "tiered": return {
|
|
22370
|
+
kind: "ticket_types",
|
|
22371
|
+
currency: offering.currency,
|
|
22372
|
+
ticketTypes: resolved.selectableOptions.map((option) => toWholeSeriesTicketType(option)),
|
|
22373
|
+
display: resolved.display
|
|
22374
|
+
};
|
|
22375
|
+
case "sliding_scale": return {
|
|
22376
|
+
kind: "sliding_scale",
|
|
22377
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
22378
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
22379
|
+
suggestedAmount: offering.pricing.slidingSuggestedAmount ?? null,
|
|
22380
|
+
currency: offering.currency,
|
|
22381
|
+
display: {
|
|
22382
|
+
kind: "range",
|
|
22383
|
+
minAmount: offering.pricing.slidingMinAmount ?? 0,
|
|
22384
|
+
maxAmount: offering.pricing.slidingMaxAmount ?? 0,
|
|
22385
|
+
currency: offering.currency
|
|
22386
|
+
}
|
|
22387
|
+
};
|
|
22388
|
+
}
|
|
22389
|
+
}
|
|
22390
|
+
function toAttendanceModes(offering) {
|
|
22391
|
+
return (offering.deliveryMode === "hybrid" ? ["in_person", "online"] : [offering.deliveryMode]).map((mode) => ({
|
|
22392
|
+
mode,
|
|
22393
|
+
capacity: offering.enrollmentCapacity,
|
|
22394
|
+
registeredCount: offering.enrolledCount,
|
|
22395
|
+
availableSpots: offering.availableSpots,
|
|
22396
|
+
waitlistEnabled: offering.waitlistEnabled
|
|
22397
|
+
}));
|
|
22398
|
+
}
|
|
22399
|
+
function toWholeSeriesRegistrationEvent(offering) {
|
|
22400
|
+
const firstSession = offering.sessions[0];
|
|
22401
|
+
const lastSession = offering.sessions[offering.sessions.length - 1];
|
|
22402
|
+
return {
|
|
22403
|
+
selectionId: offering.eventSeriesId,
|
|
22404
|
+
registrationSubject: {
|
|
22405
|
+
kind: "wholeSeries",
|
|
22406
|
+
eventSeriesId: offering.eventSeriesId,
|
|
22407
|
+
sessions: offering.sessions
|
|
22408
|
+
},
|
|
22409
|
+
seriesId: offering.eventSeriesId,
|
|
22410
|
+
title: offering.title,
|
|
22411
|
+
startsAt: firstSession?.startsAt ?? "",
|
|
22412
|
+
endsAt: lastSession?.endsAt ?? firstSession?.endsAt ?? "",
|
|
22413
|
+
bookingAvailability: offering.enrollmentOpen ? { kind: "open" } : {
|
|
22414
|
+
kind: "closed",
|
|
22415
|
+
reason: "enrollment_closed"
|
|
22416
|
+
},
|
|
22417
|
+
deliveryMode: offering.deliveryMode,
|
|
22418
|
+
attendanceModes: toAttendanceModes(offering),
|
|
22419
|
+
capacity: offering.enrollmentCapacity,
|
|
22420
|
+
registeredCount: offering.enrolledCount,
|
|
22421
|
+
availableSpots: offering.availableSpots,
|
|
22422
|
+
waitlistEnabled: offering.waitlistEnabled,
|
|
22423
|
+
venue: offering.venue ? {
|
|
22424
|
+
...offering.venue,
|
|
22425
|
+
location: null
|
|
22426
|
+
} : null,
|
|
22427
|
+
eventCategory: null,
|
|
22428
|
+
teamMembers: offering.teamMembers,
|
|
22429
|
+
status: offering.status,
|
|
22430
|
+
timeZone: firstSession?.timeZone ?? "UTC",
|
|
22431
|
+
pricing: toWholeSeriesPricing(offering),
|
|
22432
|
+
paymentTerms: offering.paymentTerms,
|
|
22433
|
+
consent: offering.consent,
|
|
22434
|
+
requireGuestDetails: offering.requireGuestDetails,
|
|
22435
|
+
acceptsPasses: false,
|
|
22436
|
+
acceptsMemberships: offering.acceptsMemberships
|
|
22437
|
+
};
|
|
22104
22438
|
}
|
|
22105
22439
|
//#endregion
|
|
22106
22440
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
@@ -22126,11 +22460,7 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
22126
22460
|
maxTickets: z.string().optional(),
|
|
22127
22461
|
showVenue: z.boolean().optional(),
|
|
22128
22462
|
showCapacity: z.boolean().optional(),
|
|
22129
|
-
showSessions: z.boolean().optional(),
|
|
22130
|
-
showPrice: z.boolean().optional(),
|
|
22131
22463
|
successMessage: z.string().optional(),
|
|
22132
|
-
waitlistMessage: z.string().optional(),
|
|
22133
|
-
membershipMessage: z.string().optional(),
|
|
22134
22464
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
22135
22465
|
overlayEnabled: z.boolean().optional(),
|
|
22136
22466
|
spamProtectionEnabled: z.boolean().optional(),
|
|
@@ -22200,6 +22530,15 @@ function resolveWholeSeriesOffering(source) {
|
|
|
22200
22530
|
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
22201
22531
|
}
|
|
22202
22532
|
function buildEventRegistrationShellStepLabels(source) {
|
|
22533
|
+
const selectedOffering = resolveWholeSeriesOffering(source);
|
|
22534
|
+
if (selectedOffering) {
|
|
22535
|
+
const selectedEvent = toWholeSeriesRegistrationEvent(selectedOffering);
|
|
22536
|
+
return getWizardStepsForContext(true, resolveEventRequiresPayment({
|
|
22537
|
+
eligibility: null,
|
|
22538
|
+
selectedTicketType: null,
|
|
22539
|
+
event: selectedEvent
|
|
22540
|
+
})).map((step) => shellLabelForRegistrationStep(step, [selectedEvent]));
|
|
22541
|
+
}
|
|
22203
22542
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
22204
22543
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
22205
22544
|
const preSelectedEvent = findPreSelectedEvent({
|
|
@@ -22214,10 +22553,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
22214
22553
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
22215
22554
|
}
|
|
22216
22555
|
function scopeEventRegistrationEvents(source) {
|
|
22217
|
-
|
|
22556
|
+
const scope = planEventRegistrationScope({
|
|
22557
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
22558
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
22218
22559
|
occurrenceContext: source.occurrenceContext,
|
|
22219
22560
|
subject: source.subject
|
|
22220
22561
|
});
|
|
22562
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
22221
22563
|
}
|
|
22222
22564
|
function shellLabelForRegistrationStep(step, events) {
|
|
22223
22565
|
switch (step) {
|
|
@@ -22260,11 +22602,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
22260
22602
|
maxTickets: source.maxTickets ?? void 0,
|
|
22261
22603
|
showVenue: source.showVenue,
|
|
22262
22604
|
showCapacity: source.showCapacity,
|
|
22263
|
-
showSessions: source.showSessions,
|
|
22264
|
-
showPrice: source.showPrice,
|
|
22265
22605
|
successMessage: source.successMessage,
|
|
22266
|
-
waitlistMessage: source.waitlistMessage,
|
|
22267
|
-
membershipMessage: source.membershipMessage,
|
|
22268
22606
|
buttonVariant: source.buttonVariant,
|
|
22269
22607
|
overlayEnabled: source.overlayEnabled,
|
|
22270
22608
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
@@ -22380,24 +22718,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
22380
22718
|
defaultValue: true,
|
|
22381
22719
|
ui: { intent: "display" }
|
|
22382
22720
|
},
|
|
22383
|
-
{
|
|
22384
|
-
id: "showSessions",
|
|
22385
|
-
type: "boolean",
|
|
22386
|
-
label: "Show complete schedule",
|
|
22387
|
-
description: "Display every session for whole-series registrations",
|
|
22388
|
-
required: false,
|
|
22389
|
-
defaultValue: true,
|
|
22390
|
-
ui: { intent: "display" }
|
|
22391
|
-
},
|
|
22392
|
-
{
|
|
22393
|
-
id: "showPrice",
|
|
22394
|
-
type: "boolean",
|
|
22395
|
-
label: "Show price",
|
|
22396
|
-
description: "Display the whole-series price",
|
|
22397
|
-
required: false,
|
|
22398
|
-
defaultValue: true,
|
|
22399
|
-
ui: { intent: "display" }
|
|
22400
|
-
},
|
|
22401
22721
|
{
|
|
22402
22722
|
id: "successMessage",
|
|
22403
22723
|
type: "text",
|
|
@@ -22408,26 +22728,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
22408
22728
|
defaultValue: "Thank you for registering! Check your email for confirmation details.",
|
|
22409
22729
|
maxLength: 500
|
|
22410
22730
|
},
|
|
22411
|
-
{
|
|
22412
|
-
id: "waitlistMessage",
|
|
22413
|
-
type: "text",
|
|
22414
|
-
label: "Waitlist message",
|
|
22415
|
-
description: "Message shown after joining a whole-series waitlist",
|
|
22416
|
-
required: false,
|
|
22417
|
-
multiline: true,
|
|
22418
|
-
defaultValue: "You've been added to the waitlist. We'll email you if a place becomes available.",
|
|
22419
|
-
maxLength: 500
|
|
22420
|
-
},
|
|
22421
|
-
{
|
|
22422
|
-
id: "membershipMessage",
|
|
22423
|
-
type: "text",
|
|
22424
|
-
label: "Membership registration message",
|
|
22425
|
-
description: "Message shown when a whole-series place is covered by membership",
|
|
22426
|
-
required: false,
|
|
22427
|
-
multiline: true,
|
|
22428
|
-
defaultValue: "Registered using your membership. Check your email for session details.",
|
|
22429
|
-
maxLength: 500
|
|
22430
|
-
},
|
|
22431
22731
|
{
|
|
22432
22732
|
id: "buttonText",
|
|
22433
22733
|
type: "text",
|
|
@@ -22459,11 +22759,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
22459
22759
|
} },
|
|
22460
22760
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
22461
22761
|
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
22462
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
22463
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
22464
22762
|
successMessage: { $bind: { from: "content.successMessage" } },
|
|
22465
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
22466
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
22467
22763
|
buttonText: { $bind: {
|
|
22468
22764
|
from: "content.buttonText",
|
|
22469
22765
|
fallback: "Complete Registration"
|
|
@@ -22580,254 +22876,6 @@ const eventRegistrationBlockDefinition = {
|
|
|
22580
22876
|
}
|
|
22581
22877
|
};
|
|
22582
22878
|
//#endregion
|
|
22583
|
-
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
22584
|
-
const courseRegistrationHydrationSchemaShape = {
|
|
22585
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
22586
|
-
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
22587
|
-
showSessions: z.boolean().optional(),
|
|
22588
|
-
showPrice: z.boolean().optional(),
|
|
22589
|
-
showCapacity: z.boolean().optional(),
|
|
22590
|
-
showVenue: z.boolean().optional(),
|
|
22591
|
-
successMessage: z.string().optional(),
|
|
22592
|
-
waitlistMessage: z.string().optional(),
|
|
22593
|
-
membershipMessage: z.string().optional(),
|
|
22594
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
22595
|
-
};
|
|
22596
|
-
const courseRegistrationSourceSchema = z.object({
|
|
22597
|
-
siteId: z.string().optional(),
|
|
22598
|
-
apiBaseUrl: z.string().optional(),
|
|
22599
|
-
portalToken: z.string().nullable().optional(),
|
|
22600
|
-
...courseRegistrationHydrationSchemaShape,
|
|
22601
|
-
className: z.string().nullable().optional(),
|
|
22602
|
-
buttonText: z.string().nullable().optional(),
|
|
22603
|
-
stage: previewStageSchema.optional()
|
|
22604
|
-
});
|
|
22605
|
-
const courseRegistrationDisplaySchema = z.object({
|
|
22606
|
-
kind: z.literal("course-registration"),
|
|
22607
|
-
state: z.literal("shell"),
|
|
22608
|
-
className: z.string().nullable(),
|
|
22609
|
-
summaryButtonText: z.string()
|
|
22610
|
-
});
|
|
22611
|
-
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
22612
|
-
const courseRegistrationRenderSchema = z.object({
|
|
22613
|
-
display: courseRegistrationDisplaySchema,
|
|
22614
|
-
hydration: courseRegistrationHydrationSchema
|
|
22615
|
-
});
|
|
22616
|
-
z.object({
|
|
22617
|
-
siteId: z.string().optional(),
|
|
22618
|
-
apiBaseUrl: z.string().optional(),
|
|
22619
|
-
portalToken: z.string().nullable().optional(),
|
|
22620
|
-
stage: previewStageSchema.optional()
|
|
22621
|
-
});
|
|
22622
|
-
function buildCourseRegistrationDisplay(source) {
|
|
22623
|
-
return {
|
|
22624
|
-
kind: "course-registration",
|
|
22625
|
-
state: "shell",
|
|
22626
|
-
className: source.className ?? null,
|
|
22627
|
-
summaryButtonText: source.buttonText?.trim() || "Sign up"
|
|
22628
|
-
};
|
|
22629
|
-
}
|
|
22630
|
-
const courseRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
22631
|
-
kind: "client-owned",
|
|
22632
|
-
contracts: {
|
|
22633
|
-
source: createZodCodec(courseRegistrationSourceSchema),
|
|
22634
|
-
render: createZodCodec(courseRegistrationRenderSchema)
|
|
22635
|
-
},
|
|
22636
|
-
buildRender: (source) => ({
|
|
22637
|
-
display: buildCourseRegistrationDisplay(source),
|
|
22638
|
-
hydration: {
|
|
22639
|
-
subject: source.subject ?? null,
|
|
22640
|
-
courses: source.courses ?? null,
|
|
22641
|
-
showSessions: source.showSessions,
|
|
22642
|
-
showPrice: source.showPrice,
|
|
22643
|
-
showCapacity: source.showCapacity,
|
|
22644
|
-
showVenue: source.showVenue,
|
|
22645
|
-
successMessage: source.successMessage,
|
|
22646
|
-
waitlistMessage: source.waitlistMessage,
|
|
22647
|
-
membershipMessage: source.membershipMessage,
|
|
22648
|
-
buttonVariant: source.buttonVariant
|
|
22649
|
-
}
|
|
22650
|
-
})
|
|
22651
|
-
});
|
|
22652
|
-
const courseRegistrationBlockDefinition = {
|
|
22653
|
-
manifest: createBlockManifest({
|
|
22654
|
-
id: "block.course-registration",
|
|
22655
|
-
version: "1.0.0",
|
|
22656
|
-
title: "Course Registration",
|
|
22657
|
-
titleSource: "heading",
|
|
22658
|
-
description: "Enrollment form for multi-session courses",
|
|
22659
|
-
category: "interactive",
|
|
22660
|
-
contentSource: { kind: "inline" },
|
|
22661
|
-
tags: [
|
|
22662
|
-
"courses",
|
|
22663
|
-
"enrollment",
|
|
22664
|
-
"booking",
|
|
22665
|
-
"form",
|
|
22666
|
-
"signup",
|
|
22667
|
-
"education"
|
|
22668
|
-
],
|
|
22669
|
-
icon: "GraduationCap",
|
|
22670
|
-
styleTokens: {
|
|
22671
|
-
background: "surface",
|
|
22672
|
-
typography: "body",
|
|
22673
|
-
spacing: "md"
|
|
22674
|
-
},
|
|
22675
|
-
behaviours: {
|
|
22676
|
-
supportsThemeSwitching: true,
|
|
22677
|
-
inlineEditing: false,
|
|
22678
|
-
animation: false,
|
|
22679
|
-
paletteHidden: false
|
|
22680
|
-
},
|
|
22681
|
-
additionalFields: [
|
|
22682
|
-
{
|
|
22683
|
-
id: "heading",
|
|
22684
|
-
type: "text",
|
|
22685
|
-
label: "Heading",
|
|
22686
|
-
description: "Main heading for the registration form",
|
|
22687
|
-
required: false,
|
|
22688
|
-
multiline: false,
|
|
22689
|
-
defaultValue: "Sign up"
|
|
22690
|
-
},
|
|
22691
|
-
{
|
|
22692
|
-
id: "description",
|
|
22693
|
-
type: "richText",
|
|
22694
|
-
label: "Description",
|
|
22695
|
-
description: "Optional introductory text",
|
|
22696
|
-
required: false
|
|
22697
|
-
},
|
|
22698
|
-
{
|
|
22699
|
-
id: "showSessions",
|
|
22700
|
-
type: "boolean",
|
|
22701
|
-
label: "Show sessions",
|
|
22702
|
-
description: "Display the list of course sessions",
|
|
22703
|
-
required: false,
|
|
22704
|
-
defaultValue: true,
|
|
22705
|
-
ui: { intent: "display" }
|
|
22706
|
-
},
|
|
22707
|
-
{
|
|
22708
|
-
id: "showPrice",
|
|
22709
|
-
type: "boolean",
|
|
22710
|
-
label: "Show price",
|
|
22711
|
-
description: "Display the course price",
|
|
22712
|
-
required: false,
|
|
22713
|
-
defaultValue: true,
|
|
22714
|
-
ui: { intent: "display" }
|
|
22715
|
-
},
|
|
22716
|
-
{
|
|
22717
|
-
id: "showCapacity",
|
|
22718
|
-
type: "boolean",
|
|
22719
|
-
label: "Show available spots",
|
|
22720
|
-
description: "Display remaining enrollment capacity",
|
|
22721
|
-
required: false,
|
|
22722
|
-
defaultValue: true,
|
|
22723
|
-
ui: { intent: "display" }
|
|
22724
|
-
},
|
|
22725
|
-
{
|
|
22726
|
-
id: "showVenue",
|
|
22727
|
-
type: "boolean",
|
|
22728
|
-
label: "Show venue",
|
|
22729
|
-
description: "Display venue information",
|
|
22730
|
-
required: false,
|
|
22731
|
-
defaultValue: true,
|
|
22732
|
-
ui: { intent: "display" }
|
|
22733
|
-
},
|
|
22734
|
-
{
|
|
22735
|
-
id: "successMessage",
|
|
22736
|
-
type: "text",
|
|
22737
|
-
label: "Success message",
|
|
22738
|
-
description: "Message shown after successful enrollment",
|
|
22739
|
-
required: false,
|
|
22740
|
-
multiline: true,
|
|
22741
|
-
defaultValue: "You're enrolled! Check your email for confirmation and session details.",
|
|
22742
|
-
maxLength: 500
|
|
22743
|
-
},
|
|
22744
|
-
{
|
|
22745
|
-
id: "waitlistMessage",
|
|
22746
|
-
type: "text",
|
|
22747
|
-
label: "Waitlist message",
|
|
22748
|
-
description: "Message when added to waitlist",
|
|
22749
|
-
required: false,
|
|
22750
|
-
multiline: true,
|
|
22751
|
-
defaultValue: "You've been added to the waitlist. We'll email you a claim link if a spot opens up.",
|
|
22752
|
-
maxLength: 500
|
|
22753
|
-
},
|
|
22754
|
-
{
|
|
22755
|
-
id: "membershipMessage",
|
|
22756
|
-
type: "text",
|
|
22757
|
-
label: "Membership enrollment message",
|
|
22758
|
-
description: "Message when enrolled using a membership",
|
|
22759
|
-
required: false,
|
|
22760
|
-
multiline: true,
|
|
22761
|
-
defaultValue: "Enrolled using your membership! Check your email for session details.",
|
|
22762
|
-
maxLength: 500
|
|
22763
|
-
},
|
|
22764
|
-
{
|
|
22765
|
-
id: "buttonText",
|
|
22766
|
-
type: "text",
|
|
22767
|
-
label: "Submit button text",
|
|
22768
|
-
description: "Text for the enrollment submit button",
|
|
22769
|
-
required: false,
|
|
22770
|
-
multiline: false,
|
|
22771
|
-
defaultValue: "Sign up",
|
|
22772
|
-
maxLength: 40
|
|
22773
|
-
},
|
|
22774
|
-
createButtonVariantField()
|
|
22775
|
-
],
|
|
22776
|
-
layout: [styledSection({
|
|
22777
|
-
baseClass: "",
|
|
22778
|
-
spacing: "spacious",
|
|
22779
|
-
children: sectionContainer([
|
|
22780
|
-
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
22781
|
-
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
22782
|
-
courseRegistration(withApiBindings({
|
|
22783
|
-
subject: { $bind: {
|
|
22784
|
-
from: "$root.subject",
|
|
22785
|
-
fallback: null
|
|
22786
|
-
} },
|
|
22787
|
-
portalToken: { $bind: {
|
|
22788
|
-
from: "$root.portalToken",
|
|
22789
|
-
fallback: null
|
|
22790
|
-
} },
|
|
22791
|
-
showSessions: { $bind: { from: "content.showSessions" } },
|
|
22792
|
-
showPrice: { $bind: { from: "content.showPrice" } },
|
|
22793
|
-
showCapacity: { $bind: { from: "content.showCapacity" } },
|
|
22794
|
-
showVenue: { $bind: { from: "content.showVenue" } },
|
|
22795
|
-
successMessage: { $bind: { from: "content.successMessage" } },
|
|
22796
|
-
waitlistMessage: { $bind: { from: "content.waitlistMessage" } },
|
|
22797
|
-
membershipMessage: { $bind: { from: "content.membershipMessage" } },
|
|
22798
|
-
buttonText: { $bind: {
|
|
22799
|
-
from: "content.buttonText",
|
|
22800
|
-
fallback: "Sign up"
|
|
22801
|
-
} },
|
|
22802
|
-
buttonVariant: { $bind: {
|
|
22803
|
-
from: "content.buttonVariant",
|
|
22804
|
-
fallback: "primary"
|
|
22805
|
-
} },
|
|
22806
|
-
courses: { $bind: { from: "data.courses" } },
|
|
22807
|
-
stage: { $bind: {
|
|
22808
|
-
from: "$root.previewStage",
|
|
22809
|
-
fallback: "published"
|
|
22810
|
-
} }
|
|
22811
|
-
}))
|
|
22812
|
-
], { gap: "lg" })
|
|
22813
|
-
})]
|
|
22814
|
-
}),
|
|
22815
|
-
runtime: courseRegistrationBlockRuntime,
|
|
22816
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
22817
|
-
dataLoaders: { courses: {
|
|
22818
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
22819
|
-
params: {
|
|
22820
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
22821
|
-
limit: "50",
|
|
22822
|
-
stage: { $bind: {
|
|
22823
|
-
from: "$root.previewStage",
|
|
22824
|
-
fallback: "published"
|
|
22825
|
-
} }
|
|
22826
|
-
},
|
|
22827
|
-
mode: "server"
|
|
22828
|
-
} }
|
|
22829
|
-
};
|
|
22830
|
-
//#endregion
|
|
22831
22879
|
//#region ../blocks/src/system/blocks/event-details.ts
|
|
22832
22880
|
/**
|
|
22833
22881
|
* Event Details Block
|
|
@@ -23074,200 +23122,6 @@ const eventDetailsBlockDefinition = {
|
|
|
23074
23122
|
mode: "server"
|
|
23075
23123
|
} }
|
|
23076
23124
|
};
|
|
23077
|
-
const courseDetailsBlockDefinition = {
|
|
23078
|
-
manifest: createBlockManifest({
|
|
23079
|
-
id: "block.course-details",
|
|
23080
|
-
version: "1.0.0",
|
|
23081
|
-
title: "Course Details",
|
|
23082
|
-
titleSource: "heading",
|
|
23083
|
-
description: "Schedule, venue, price, and enrollment status for a course",
|
|
23084
|
-
category: "content",
|
|
23085
|
-
contentSource: { kind: "entries" },
|
|
23086
|
-
tags: [
|
|
23087
|
-
"courses",
|
|
23088
|
-
"schedule",
|
|
23089
|
-
"sessions",
|
|
23090
|
-
"venue",
|
|
23091
|
-
"pricing"
|
|
23092
|
-
],
|
|
23093
|
-
icon: "GraduationCap",
|
|
23094
|
-
styleTokens: {
|
|
23095
|
-
background: "surface",
|
|
23096
|
-
typography: "body",
|
|
23097
|
-
spacing: "md"
|
|
23098
|
-
},
|
|
23099
|
-
behaviours: {
|
|
23100
|
-
supportsThemeSwitching: true,
|
|
23101
|
-
inlineEditing: false,
|
|
23102
|
-
animation: false,
|
|
23103
|
-
paletteHidden: false
|
|
23104
|
-
},
|
|
23105
|
-
additionalFields: [
|
|
23106
|
-
{
|
|
23107
|
-
id: "heading",
|
|
23108
|
-
type: "text",
|
|
23109
|
-
label: "Heading",
|
|
23110
|
-
description: "Optional heading shown above course details",
|
|
23111
|
-
required: false,
|
|
23112
|
-
multiline: false,
|
|
23113
|
-
defaultValue: "Course details"
|
|
23114
|
-
},
|
|
23115
|
-
{
|
|
23116
|
-
id: "showTitle",
|
|
23117
|
-
type: "boolean",
|
|
23118
|
-
label: "Show course title",
|
|
23119
|
-
required: false,
|
|
23120
|
-
defaultValue: false,
|
|
23121
|
-
ui: { intent: "display" }
|
|
23122
|
-
},
|
|
23123
|
-
{
|
|
23124
|
-
id: "showDescription",
|
|
23125
|
-
type: "boolean",
|
|
23126
|
-
label: "Show course description",
|
|
23127
|
-
description: "Render the course description from the bookings course record",
|
|
23128
|
-
required: false,
|
|
23129
|
-
defaultValue: false,
|
|
23130
|
-
ui: { intent: "display" }
|
|
23131
|
-
},
|
|
23132
|
-
{
|
|
23133
|
-
id: "showSessions",
|
|
23134
|
-
type: "boolean",
|
|
23135
|
-
label: "Show sessions",
|
|
23136
|
-
required: false,
|
|
23137
|
-
defaultValue: true,
|
|
23138
|
-
ui: { intent: "display" }
|
|
23139
|
-
},
|
|
23140
|
-
{
|
|
23141
|
-
id: "sessionsLimit",
|
|
23142
|
-
type: "select",
|
|
23143
|
-
label: "Sessions limit",
|
|
23144
|
-
required: false,
|
|
23145
|
-
multiple: false,
|
|
23146
|
-
defaultValue: "10",
|
|
23147
|
-
options: [
|
|
23148
|
-
{
|
|
23149
|
-
value: "3",
|
|
23150
|
-
label: "3 sessions"
|
|
23151
|
-
},
|
|
23152
|
-
{
|
|
23153
|
-
value: "5",
|
|
23154
|
-
label: "5 sessions"
|
|
23155
|
-
},
|
|
23156
|
-
{
|
|
23157
|
-
value: "10",
|
|
23158
|
-
label: "10 sessions"
|
|
23159
|
-
},
|
|
23160
|
-
{
|
|
23161
|
-
value: "all",
|
|
23162
|
-
label: "All sessions"
|
|
23163
|
-
}
|
|
23164
|
-
],
|
|
23165
|
-
ui: { intent: "display" }
|
|
23166
|
-
},
|
|
23167
|
-
{
|
|
23168
|
-
id: "showVenue",
|
|
23169
|
-
type: "boolean",
|
|
23170
|
-
label: "Show venue",
|
|
23171
|
-
required: false,
|
|
23172
|
-
defaultValue: true,
|
|
23173
|
-
ui: { intent: "display" }
|
|
23174
|
-
},
|
|
23175
|
-
{
|
|
23176
|
-
id: "showPrice",
|
|
23177
|
-
type: "boolean",
|
|
23178
|
-
label: "Show price",
|
|
23179
|
-
required: false,
|
|
23180
|
-
defaultValue: true,
|
|
23181
|
-
ui: { intent: "display" }
|
|
23182
|
-
},
|
|
23183
|
-
{
|
|
23184
|
-
id: "showCapacity",
|
|
23185
|
-
type: "boolean",
|
|
23186
|
-
label: "Show capacity",
|
|
23187
|
-
required: false,
|
|
23188
|
-
defaultValue: true,
|
|
23189
|
-
ui: { intent: "display" }
|
|
23190
|
-
},
|
|
23191
|
-
{
|
|
23192
|
-
id: "showEnrollmentStatus",
|
|
23193
|
-
type: "boolean",
|
|
23194
|
-
label: "Show enrollment status",
|
|
23195
|
-
required: false,
|
|
23196
|
-
defaultValue: true,
|
|
23197
|
-
ui: { intent: "display" }
|
|
23198
|
-
},
|
|
23199
|
-
{
|
|
23200
|
-
id: "showMembershipNote",
|
|
23201
|
-
type: "boolean",
|
|
23202
|
-
label: "Show membership note",
|
|
23203
|
-
description: "Indicate when memberships can be used for free enrollment",
|
|
23204
|
-
required: false,
|
|
23205
|
-
defaultValue: true,
|
|
23206
|
-
ui: { intent: "display" }
|
|
23207
|
-
}
|
|
23208
|
-
],
|
|
23209
|
-
layout: [styledSection({
|
|
23210
|
-
baseClass: "",
|
|
23211
|
-
spacing: "spacious",
|
|
23212
|
-
children: sectionContainer([text({ as: "h2" }, bind("content.heading"), when("content.heading")), el("course-details", {
|
|
23213
|
-
subject: { $bind: {
|
|
23214
|
-
from: "$root.subject",
|
|
23215
|
-
fallback: null
|
|
23216
|
-
} },
|
|
23217
|
-
courses: { $bind: { from: "data.courses" } },
|
|
23218
|
-
showTitle: { $bind: {
|
|
23219
|
-
from: "content.showTitle",
|
|
23220
|
-
fallback: false
|
|
23221
|
-
} },
|
|
23222
|
-
showDescription: { $bind: {
|
|
23223
|
-
from: "content.showDescription",
|
|
23224
|
-
fallback: false
|
|
23225
|
-
} },
|
|
23226
|
-
showSessions: { $bind: {
|
|
23227
|
-
from: "content.showSessions",
|
|
23228
|
-
fallback: true
|
|
23229
|
-
} },
|
|
23230
|
-
sessionsLimit: { $bind: {
|
|
23231
|
-
from: "content.sessionsLimit",
|
|
23232
|
-
fallback: "10"
|
|
23233
|
-
} },
|
|
23234
|
-
showVenue: { $bind: {
|
|
23235
|
-
from: "content.showVenue",
|
|
23236
|
-
fallback: true
|
|
23237
|
-
} },
|
|
23238
|
-
showPrice: { $bind: {
|
|
23239
|
-
from: "content.showPrice",
|
|
23240
|
-
fallback: true
|
|
23241
|
-
} },
|
|
23242
|
-
showCapacity: { $bind: {
|
|
23243
|
-
from: "content.showCapacity",
|
|
23244
|
-
fallback: true
|
|
23245
|
-
} },
|
|
23246
|
-
showEnrollmentStatus: { $bind: {
|
|
23247
|
-
from: "content.showEnrollmentStatus",
|
|
23248
|
-
fallback: true
|
|
23249
|
-
} },
|
|
23250
|
-
showMembershipNote: { $bind: {
|
|
23251
|
-
from: "content.showMembershipNote",
|
|
23252
|
-
fallback: true
|
|
23253
|
-
} }
|
|
23254
|
-
})], { gap: "lg" })
|
|
23255
|
-
})]
|
|
23256
|
-
}),
|
|
23257
|
-
dataSchemas: { courses: publicWholeSeriesOfferingsArraySchema.optional() },
|
|
23258
|
-
dataLoaders: { courses: {
|
|
23259
|
-
endpoint: "listPublicWholeSeriesOfferings",
|
|
23260
|
-
params: {
|
|
23261
|
-
siteId: { $bind: { from: "$root.siteId" } },
|
|
23262
|
-
limit: "50",
|
|
23263
|
-
stage: { $bind: {
|
|
23264
|
-
from: "$root.previewStage",
|
|
23265
|
-
fallback: "published"
|
|
23266
|
-
} }
|
|
23267
|
-
},
|
|
23268
|
-
mode: "server"
|
|
23269
|
-
} }
|
|
23270
|
-
};
|
|
23271
23125
|
const eventSpotlightBlockDefinition = {
|
|
23272
23126
|
manifest: createBlockManifest({
|
|
23273
23127
|
id: "block.event-spotlight",
|
|
@@ -25341,6 +25195,68 @@ const recurringScheduleBlockDefinition = {
|
|
|
25341
25195
|
} }
|
|
25342
25196
|
};
|
|
25343
25197
|
//#endregion
|
|
25198
|
+
//#region ../blocks/src/system/types/link.ts
|
|
25199
|
+
const nullableString = z.union([z.string().min(1), z.null()]);
|
|
25200
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
25201
|
+
"page",
|
|
25202
|
+
"content",
|
|
25203
|
+
"pageSurface"
|
|
25204
|
+
];
|
|
25205
|
+
const resolvedInternalLinkKeys = [
|
|
25206
|
+
"entityId",
|
|
25207
|
+
"entityType",
|
|
25208
|
+
"href",
|
|
25209
|
+
"title",
|
|
25210
|
+
"typeLabel"
|
|
25211
|
+
];
|
|
25212
|
+
const internalRouteOnlyLinkSchema = z.object({
|
|
25213
|
+
kind: z.literal("internal"),
|
|
25214
|
+
routeId: z.string().min(1)
|
|
25215
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
25216
|
+
if (!resolvedInternalLinkKeys.some((key) => value[key] != null)) return;
|
|
25217
|
+
ctx.addIssue({
|
|
25218
|
+
code: "custom",
|
|
25219
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
25220
|
+
});
|
|
25221
|
+
});
|
|
25222
|
+
const internalResolvedLinkSchema = z.object({
|
|
25223
|
+
kind: z.literal("internal"),
|
|
25224
|
+
routeId: z.string().min(1),
|
|
25225
|
+
entityId: z.string().min(1),
|
|
25226
|
+
entityType: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
25227
|
+
href: z.string().min(1),
|
|
25228
|
+
title: z.string().min(1),
|
|
25229
|
+
typeLabel: z.string().min(1),
|
|
25230
|
+
contentTypeKey: nullableString.optional(),
|
|
25231
|
+
contentTypeName: nullableString.optional(),
|
|
25232
|
+
updatedAt: nullableString.optional()
|
|
25233
|
+
}).passthrough();
|
|
25234
|
+
const internalLinkSchema = z.union([internalResolvedLinkSchema, internalRouteOnlyLinkSchema]);
|
|
25235
|
+
const externalLinkSchema = z.object({
|
|
25236
|
+
kind: z.literal("external"),
|
|
25237
|
+
href: z.string().min(1)
|
|
25238
|
+
}).passthrough();
|
|
25239
|
+
const customLinkSchema = z.object({
|
|
25240
|
+
kind: z.literal("url"),
|
|
25241
|
+
href: z.string().min(1)
|
|
25242
|
+
}).passthrough();
|
|
25243
|
+
const pageLinkSchema = z.object({
|
|
25244
|
+
kind: z.literal("page"),
|
|
25245
|
+
identifier: z.string().min(1)
|
|
25246
|
+
}).passthrough();
|
|
25247
|
+
const entryLinkSchema = z.object({
|
|
25248
|
+
kind: z.literal("entry"),
|
|
25249
|
+
contentType: z.string().min(1),
|
|
25250
|
+
identifier: z.string().min(1)
|
|
25251
|
+
}).passthrough();
|
|
25252
|
+
z.union([
|
|
25253
|
+
internalLinkSchema,
|
|
25254
|
+
externalLinkSchema,
|
|
25255
|
+
customLinkSchema,
|
|
25256
|
+
pageLinkSchema,
|
|
25257
|
+
entryLinkSchema
|
|
25258
|
+
]);
|
|
25259
|
+
//#endregion
|
|
25344
25260
|
//#region ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
25345
25261
|
const OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT = "Book";
|
|
25346
25262
|
const OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE = "Nothing scheduled just yet.";
|
|
@@ -25430,7 +25346,7 @@ const publicRouteCandidatesSchema = z.object({ routes: z.array(z.object({
|
|
|
25430
25346
|
entityId: z.string(),
|
|
25431
25347
|
path: z.string(),
|
|
25432
25348
|
title: z.string(),
|
|
25433
|
-
kind: z.enum(
|
|
25349
|
+
kind: z.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
25434
25350
|
contentTypeKey: z.string().nullable().optional()
|
|
25435
25351
|
})) });
|
|
25436
25352
|
const groupOverrideFields = [
|
|
@@ -25707,7 +25623,7 @@ const offeringsPreviewManifest = createBlockManifest({
|
|
|
25707
25623
|
fallback: "published"
|
|
25708
25624
|
} },
|
|
25709
25625
|
routeCandidates: { $bind: { from: "data.routeCandidates" } },
|
|
25710
|
-
|
|
25626
|
+
wholeSeriesOfferings: { $bind: { from: "data.wholeSeriesOfferings" } },
|
|
25711
25627
|
...offeringsPreviewEventDataBindings
|
|
25712
25628
|
})
|
|
25713
25629
|
], { gap: "lg" }),
|
|
@@ -25724,7 +25640,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
25724
25640
|
dataSchemas: {
|
|
25725
25641
|
...offeringsPreviewEventDataSchemas,
|
|
25726
25642
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
25727
|
-
|
|
25643
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.optional()
|
|
25728
25644
|
},
|
|
25729
25645
|
dataLoaders: {
|
|
25730
25646
|
...offeringsPreviewEventDataLoaders,
|
|
@@ -25733,7 +25649,7 @@ const offeringsPreviewBlockDefinition = {
|
|
|
25733
25649
|
params: {},
|
|
25734
25650
|
mode: "server"
|
|
25735
25651
|
},
|
|
25736
|
-
|
|
25652
|
+
wholeSeriesOfferings: {
|
|
25737
25653
|
endpoint: "listPublicWholeSeriesOfferings",
|
|
25738
25654
|
params: {
|
|
25739
25655
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
@@ -30700,22 +30616,6 @@ const systemBlockDefinitions = [
|
|
|
30700
30616
|
weight: "standard"
|
|
30701
30617
|
})]
|
|
30702
30618
|
})),
|
|
30703
|
-
withDesignCapability("block.course-registration", courseRegistrationBlockDefinition, sectionOnly(), defineBlockDesignMetadata({
|
|
30704
|
-
flow: conversionFlow,
|
|
30705
|
-
layoutProfiles: [layoutProfile({
|
|
30706
|
-
variantKey: "default",
|
|
30707
|
-
family: "form",
|
|
30708
|
-
weight: "standard"
|
|
30709
|
-
})]
|
|
30710
|
-
})),
|
|
30711
|
-
withDesignCapability("block.course-details", courseDetailsBlockDefinition, scheduleDetailsCapable(), defineBlockDesignMetadata({
|
|
30712
|
-
flow: offeringsFlow,
|
|
30713
|
-
layoutProfiles: [layoutProfile({
|
|
30714
|
-
variantKey: "default",
|
|
30715
|
-
family: "stack",
|
|
30716
|
-
weight: "standard"
|
|
30717
|
-
})]
|
|
30718
|
-
})),
|
|
30719
30619
|
withDesignCapability("block.event-spotlight", eventSpotlightBlockDefinition, eventSpotlightCapable(), defineBlockDesignMetadata({
|
|
30720
30620
|
flow: offeringsFlow,
|
|
30721
30621
|
layoutProfiles: [layoutProfile({
|
|
@@ -31103,32 +31003,6 @@ let cachedBlockSummaries;
|
|
|
31103
31003
|
*/
|
|
31104
31004
|
function getBuiltInContentTypes() {
|
|
31105
31005
|
return [
|
|
31106
|
-
{
|
|
31107
|
-
key: "course",
|
|
31108
|
-
name: "Course",
|
|
31109
|
-
description: "Courses with listing content and long-form details",
|
|
31110
|
-
isRouted: true,
|
|
31111
|
-
fields: [
|
|
31112
|
-
{
|
|
31113
|
-
id: "summary",
|
|
31114
|
-
type: "text",
|
|
31115
|
-
label: "Summary",
|
|
31116
|
-
required: false
|
|
31117
|
-
},
|
|
31118
|
-
{
|
|
31119
|
-
id: "image",
|
|
31120
|
-
type: "media",
|
|
31121
|
-
label: "Listing image",
|
|
31122
|
-
required: false
|
|
31123
|
-
},
|
|
31124
|
-
{
|
|
31125
|
-
id: "body",
|
|
31126
|
-
type: "richText",
|
|
31127
|
-
label: "Details",
|
|
31128
|
-
required: false
|
|
31129
|
-
}
|
|
31130
|
-
]
|
|
31131
|
-
},
|
|
31132
31006
|
{
|
|
31133
31007
|
key: "event",
|
|
31134
31008
|
name: "Event",
|