@riverbankcms/sdk 0.130.2 → 0.134.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 +13 -3
- package/dist/{PreviewEditorSidebar-BY-1QdE2.mjs → PreviewEditorSidebar-DfRhJPFQ.mjs} +351 -95
- package/dist/{PreviewEditorUI-BS34jI9_.mjs → PreviewEditorUI-Dppxcr_g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BD0kOjtI.mjs → PreviewQueryProvider-D51gQaG3.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-B1pWnhu-.mjs → SdkPreviewModeRuntime-8CyGCXir.mjs} +91 -21
- package/dist/{SiteChromeCustomizeContext-BhUG_72i.mjs → SiteChromeCustomizeContext-DVMTMvqA.mjs} +6896 -4335
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1105 -533
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +363 -276
- 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 +13 -9
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +8 -19
- package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +31 -2
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -14
- package/dist/_dts/api/src/bookingVerticals.d.ts +1 -140
- package/dist/_dts/api/src/bookings.d.ts +2 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +45 -12
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -2
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +2 -2
- package/dist/_dts/api/src/courses.d.ts +1 -19
- package/dist/_dts/api/src/endpoints.d.ts +469 -349
- package/dist/_dts/api/src/event-destination-policy.d.ts +1 -1
- package/dist/_dts/api/src/eventManagementContracts.d.ts +91 -1
- package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +32 -0
- package/dist/_dts/api/src/giftingDashboard.d.ts +117 -0
- package/dist/_dts/api/src/giftingEndpointDefinitions.d.ts +124 -0
- package/dist/_dts/api/src/index.d.ts +4 -4
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/media.d.ts +1 -0
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +3 -4
- 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/publicBookingService.d.ts +15 -0
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +11 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +28 -13
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +2 -0
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +3 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -3
- package/dist/_dts/api/src/sdkBookingVerticalContracts.d.ts +29 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +9 -32
- package/dist/_dts/api/src/sdkEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/sdkSettingsContracts.d.ts +25 -0
- package/dist/_dts/api/src/sdkThemeCatalogContracts.d.ts +20 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +64 -54
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/siteOnboarding.d.ts +3 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -10
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +0 -3
- package/dist/_dts/api/src/types.d.ts +2 -3
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/blocks/src/PageRenderer.d.ts +2 -13
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +9 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +54 -116
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- 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/subroutes/fold.d.ts +2 -1
- 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 +2 -50
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +1 -929
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -97
- package/dist/_dts/blocks/src/system/blocks/event-details.d.ts +39 -6
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -3
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -20
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -9
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/pricing.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +84 -0
- 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 +3 -2
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +7 -8
- 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/validation-constants.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/courses.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/blockComposition.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 +45 -72
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +22 -37
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessWholeSeriesRegistrationFlow.d.ts +6 -6
- 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/course-page-surface-scope.d.ts +2 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +19 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +25 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/presentation.d.ts +75 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -2
- 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/PaymentSelectionStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +21 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/siteCreditPreview.d.ts +51 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +6 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/validation.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/MembershipHero.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/StepIndicator.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationActiveSteps.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/CourseRegistrationErrorBoundary.d.ts → event-registration/whole-series/WholeSeriesRegistrationErrorBoundary.d.ts} +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationTerminalContent.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/WholeSeriesRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +46 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/index.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/presentation.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/pricing.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/types.d.ts +18 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseEligibility.d.ts → event-registration/whole-series/useWholeSeriesEligibility.d.ts} +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesPaymentVerification.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationActions.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseRegistrationPortal.d.ts → event-registration/whole-series/useWholeSeriesRegistrationPortal.d.ts} +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationSelection.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/useWholeSeriesRegistrationWizard.d.ts +185 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/useCourseWaitlistSelection.d.ts → event-registration/whole-series/useWholeSeriesWaitlistSelection.d.ts} +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/utils.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.contract.d.ts +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/whole-series-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/wholeSeriesPageSurfaceScope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration/courseRegistrationViewState.d.ts → event-registration/whole-series/wholeSeriesRegistrationViewState.d.ts} +7 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/wizardSteps.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +12 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalCloseButton.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +51 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +1 -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 +12 -12
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/boxStyleClassNames.d.ts +30 -11
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +15 -4
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -4
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +13 -0
- package/dist/_dts/commerce/src/purchase/cancellationPolicy.d.ts +7 -0
- package/dist/_dts/commerce/src/purchase/canonicalRefundPlanner.d.ts +48 -0
- package/dist/_dts/commerce/src/purchase/checkoutCollectionPlan.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/checkoutCommitPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/checkoutDiscountContextPlanning.d.ts +80 -0
- package/dist/_dts/commerce/src/purchase/checkoutErrorCodes.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/checkoutOrderItemProjection.d.ts +22 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentFlow.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentPlanPlanning.d.ts +30 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTermPlanning.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/checkoutPaymentTerms.d.ts +53 -0
- package/dist/_dts/commerce/src/purchase/checkoutQuantity.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/checkoutSessionMetadata.d.ts +76 -0
- package/dist/_dts/commerce/src/purchase/checkoutSettlement.d.ts +46 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeFinalizationPlanning.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/checkoutStripeSessionPlanning.d.ts +125 -0
- package/dist/_dts/commerce/src/purchase/checkoutValidatedItemPlanning.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +91 -0
- package/dist/_dts/commerce/src/purchase/discountApplication.d.ts +74 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +55 -0
- package/dist/_dts/commerce/src/purchase/oneTimeCheckoutPlanning.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/order-number.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/orderCancellationPlan.d.ts +19 -0
- package/dist/_dts/commerce/src/purchase/orderCompletionEmailPlan.d.ts +71 -0
- package/dist/_dts/commerce/src/purchase/orderConfirmationPlanning.d.ts +120 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentPlan.d.ts +81 -0
- package/dist/_dts/commerce/src/purchase/orderFulfillmentResult.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/orderHistoryLedgerFilters.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/orderHistorySource.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentAdminSettlement.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentClosure.d.ts +29 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentLifecycle.d.ts +44 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPayoff.d.ts +24 -0
- package/dist/_dts/commerce/src/purchase/orderInstalmentPlan.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +151 -0
- package/dist/_dts/commerce/src/purchase/orderItemSupport.d.ts +14 -0
- package/dist/_dts/commerce/src/purchase/orderListFilters.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentLinkPlanning.d.ts +60 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentReceipt.d.ts +184 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +135 -0
- package/dist/_dts/commerce/src/purchase/orderPlanningTypes.d.ts +102 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPlanning.d.ts +50 -0
- package/dist/_dts/commerce/src/purchase/orderRefundPolicy.d.ts +36 -0
- package/dist/_dts/commerce/src/purchase/orderTotals.d.ts +23 -0
- package/dist/_dts/commerce/src/purchase/orderTypes.d.ts +39 -0
- package/dist/_dts/commerce/src/purchase/pendingCheckoutSessionClaim.d.ts +1 -0
- package/dist/_dts/commerce/src/purchase/persistedCheckoutLines.d.ts +27 -0
- package/dist/_dts/commerce/src/purchase/protectedDepositRefundPolicy.d.ts +86 -0
- package/dist/_dts/commerce/src/purchase/refundPolicy.d.ts +8 -0
- package/dist/_dts/commerce/src/purchase/refundRailSplit.d.ts +40 -0
- package/dist/_dts/commerce/src/purchase/result.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +97 -0
- package/dist/_dts/commerce/src/purchase/shopRefundPlanning.d.ts +43 -0
- package/dist/_dts/commerce/src/purchase/stateTransitions.d.ts +31 -0
- package/dist/_dts/commerce/src/purchase/stripeMinimumCharge.d.ts +10 -0
- package/dist/_dts/commerce/src/purchase/types.d.ts +168 -0
- package/dist/_dts/commerce/src/shop/shipmentEligibility.d.ts +14 -0
- package/dist/_dts/commerce/src/utils/assertNever.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +4 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -4
- package/dist/_dts/core/src/booking-consent.d.ts +8 -0
- package/dist/_dts/core/src/booking-vertical-catalog.d.ts +741 -0
- package/dist/_dts/core/src/booking-vertical-config.d.ts +66 -0
- package/dist/_dts/core/src/booking-vertical-definitions.d.ts +68 -0
- package/dist/_dts/{api/src/bookingVerticalPreset.d.ts → core/src/booking-vertical-preset.d.ts} +1 -1
- package/dist/_dts/core/src/booking-verticals.d.ts +98 -0
- package/dist/_dts/core/src/event-page-selection.d.ts +22 -0
- package/dist/_dts/core/src/event-pricing.d.ts +5 -0
- package/dist/_dts/core/src/event-series-behaviour.d.ts +16 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -3
- package/dist/_dts/db/src/schemas/forms.d.ts +25 -25
- 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/fileUploadCompletion.d.ts +3 -0
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +2 -0
- package/dist/_dts/media-core/src/identifiers.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaWriteNormalizer.d.ts +2 -6
- package/dist/_dts/media-core/src/types.d.ts +2 -1
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/media-editor/src/index.d.ts +2 -2
- package/dist/_dts/media-editor/src/mediaSelection.d.ts +1 -22
- package/dist/_dts/media-editor/src/useMediaSelection.d.ts +0 -9
- package/dist/_dts/preview-next/src/client/preview/ButtonHoverRoleControls.d.ts +10 -0
- package/dist/_dts/preview-next/src/client/preview/ButtonStylePicker.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfiguratorWarningNotice.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +7 -89
- package/dist/_dts/sdk/src/client/eventSubrouteReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/client/types.d.ts +12 -5
- package/dist/_dts/sdk/src/components.d.ts +1 -1
- 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/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -13
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -16
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/next/pageMetadataProjection.d.ts +7 -0
- package/dist/_dts/sdk/src/next/resolveEventPageSubroute.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -38
- package/dist/_dts/sdk/src/public-api/eventSubrouteContracts.d.ts +12 -0
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +44 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/entrySubroutes.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/resolveOccurrence.d.ts +4 -3
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +7 -3
- 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/buttons/buttonSurfaceContext.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/contextualHover.d.ts +41 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonColourStates.d.ts +3 -0
- package/dist/_dts/theme-core/src/buttons/resolveButtonHoverTreatment.d.ts +14 -0
- package/dist/_dts/theme-core/src/buttons/styles/domain.d.ts +21 -4
- package/dist/_dts/theme-core/src/buttons/styles/recipes/flatInk.d.ts +92 -0
- package/dist/_dts/theme-core/src/buttons/styles/recipes/staticRecipes.d.ts +10 -150
- package/dist/_dts/theme-core/src/buttons/styles/registry.d.ts +57 -102
- package/dist/_dts/theme-core/src/buttons/styles/selection.d.ts +50 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +41 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +7 -29
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +90 -75
- 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 +98 -110
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/buttonSelectionCompiler.d.ts +18 -0
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +21 -0
- 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/site-styles/previewCompiler.d.ts +2 -11
- package/dist/_dts/theme-core/src/site-styles/selectionFallbackWarning.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +13 -1
- 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/_dts/ui/src/navigation-tabs.d.ts +2 -0
- package/dist/client/{StepIndicator-CLjQhkDb.mjs → BookingConsentAgreement-BxgpGEFD.mjs} +26 -4
- package/dist/client/{DiscountCodeDisclosure-BPZ-yfGI.mjs → DiscountCodeDisclosure-CfuPOHD0.mjs} +12 -12
- package/dist/client/{EventCombined.client-Cjt3kKYR.mjs → EventCombined.client-DB8Qfzi-.mjs} +37 -49
- package/dist/client/{EventListing.client-DY9dn6Fh.mjs → EventListing.client-DD4X8hp4.mjs} +2 -2
- package/dist/client/{LeafletStaticMap--2c61XYn.mjs → LeafletStaticMap-QhgIBQbv.mjs} +1 -1
- package/dist/client/{CourseRegistrationWizard-DGW9F0SQ.mjs → WholeSeriesRegistrationWizard-DwtC7bCs.mjs} +1460 -1247
- package/dist/client/{accordion-_boYwHHi.mjs → accordion-DFXpLvwg.mjs} +1 -1
- package/dist/client/{bookingForm--AqEfyBX.mjs → bookingForm-sI05d3lk.mjs} +73 -47
- package/dist/client/bookings.mjs +1719 -706
- package/dist/client/{carousel-CVI2dqZr.mjs → carousel-wjyWTZCh.mjs} +1 -1
- package/dist/client/{cart-DR6IiPz9.mjs → cart-DCwdpA4i.mjs} +3 -3
- package/dist/client/{checkout-CsrGAfQt.mjs → checkout-DTDW3l0R.mjs} +3 -3
- package/dist/client/checkoutUrls-DQYC_Br-.mjs +187 -0
- package/dist/client/client.mjs +6830 -3672
- package/dist/client/{context-B83PiNzm.mjs → context-TSK1CGx8.mjs} +1 -14
- package/dist/client/{courseRegistration-aNJVaLa3.mjs → courseRegistration-A-Tg7qw_.mjs} +11 -5
- package/dist/client/{eventCalendar-OZ7h59VN.mjs → eventCalendar-B0Zg-i_w.mjs} +41 -44
- package/dist/client/{eventCombined-BbJ6bFKz.mjs → eventCombined-B8Y2wizd.mjs} +3 -3
- package/dist/client/{eventDetails-BLyUBiCT.mjs → eventDetails-DPDOwURJ.mjs} +276 -94
- package/dist/client/{eventListing-DuP1yhBS.mjs → eventListing-CjBcmSLn.mjs} +3 -3
- package/dist/client/{eventRegistration-BXyECPa-.mjs → eventRegistration-CK30HsAq.mjs} +730 -190
- package/dist/client/{form-BA4t3kKU.mjs → form-CUXfsABE.mjs} +2 -2
- package/dist/client/{headerSection-CpNaJxhW.mjs → headerSection-N-mN3rjr.mjs} +2 -2
- package/dist/client/hooks.mjs +1418 -484
- package/dist/client/{locationMap-3HGMCL7_.mjs → locationMap-oiIDQMBt.mjs} +2 -2
- package/dist/client/{newsletterForm-C2s6Mw67.mjs → newsletterForm-CkQ2tTrM.mjs} +2 -2
- package/dist/client/pricing-Caa0QWzh.mjs +195 -0
- package/dist/client/{productDetail-C9joWhdE.mjs → productDetail-CnidyrsN.mjs} +3 -3
- package/dist/client/{productList-CjzdU3pB.mjs → productList-CttYcS_S.mjs} +3 -3
- package/dist/client/{propsDecoder-CBPGXEYX.mjs → propsDecoder-CeUMxI9a.mjs} +677 -350
- package/dist/client/rendering/client.mjs +6075 -4150
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +7589 -4388
- package/dist/client/{scrollToBlock-DZ73aEX6.mjs → scrollToBlock-lPr1oqxB.mjs} +1 -1
- package/dist/client/{shop-CQRai7hj.mjs → shop-DXQtMo2O.mjs} +6 -6
- package/dist/client/{shop-commerce-hP9UboOx.mjs → shop-commerce-quDL411J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-DiD5a32e.mjs → shop-commerce-store-Dnu-8Iub.mjs} +1 -1
- package/dist/client/{shopShared-DP8DXTkF.mjs → shopShared-BWPUURvG.mjs} +3 -3
- package/dist/client/{useEventFilters-pF_OJNQP.mjs → useEventFilters-DRhWp2_5.mjs} +196 -7
- package/dist/client/{usePolling-Cls91SD2.mjs → usePolling-UN4WKnaM.mjs} +3 -3
- package/dist/preview-next/before-render.mjs +247 -60
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +247 -60
- package/dist/preview-next/middleware.mjs +247 -60
- package/dist/{previewAuthStore-CX1C_KJ4.mjs → previewAuthStore-BFKd4LrN.mjs} +247 -60
- package/dist/{sdk-runtime-5CcPAI14.mjs → sdk-runtime-Ca5RD78X.mjs} +2 -2
- package/dist/{separator-BXlYN_gr.mjs → separator-CMhj6BTi.mjs} +1 -1
- package/dist/server/components.mjs +3578 -1614
- package/dist/server/config-validation.mjs +1418 -485
- package/dist/server/config.mjs +1418 -485
- package/dist/server/data.mjs +1418 -484
- package/dist/server/index.mjs +289 -81
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +3761 -1794
- package/dist/server/page-converter.mjs +911 -261
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3580 -1613
- package/dist/server/rendering.mjs +3578 -1614
- package/dist/server/routing.mjs +1687 -689
- package/dist/server/server.mjs +1458 -563
- package/dist/server/theme-bridge.mjs +1996 -935
- package/dist/server/theme.mjs +346 -133
- package/dist/styles/index.css +1602 -796
- package/package.json +2 -2
- package/dist/_dts/api/src/bookingVerticalCatalog.d.ts +0 -746
- package/dist/_dts/api/src/eventSeriesPresentationPreset.d.ts +0 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +0 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +0 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +0 -45
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/pricing.d.ts +0 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCoursePaymentVerification.d.ts +0 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationActions.d.ts +0 -35
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationSelection.d.ts +0 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +0 -102
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
- package/dist/client/eventProductEligibility-AVxyCB1u.mjs +0 -50
- package/dist/client/pricing-BiqIMgZk.mjs +0 -174
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/PortalAuthSidebar.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/SuccessStep.d.ts +0 -0
- /package/dist/_dts/blocks/src/system/runtime/nodes/{course-registration → event-registration/whole-series}/WaitlistStep.d.ts +0 -0
|
@@ -115,6 +115,7 @@ function formatCoursePriceDisplayLabel(display, options) {
|
|
|
115
115
|
case "exact": return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
116
116
|
case "from": return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
117
117
|
case "range": return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
|
|
118
|
+
case "mixed": return display.paidToAmount > display.paidFromAmount ? `Course (Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)})` : `Course (Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)})`;
|
|
118
119
|
default: return assertNever$2(display);
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -485,6 +486,16 @@ function parseNewsletterSignupDestinationProvider(value) {
|
|
|
485
486
|
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
486
487
|
}
|
|
487
488
|
//#endregion
|
|
489
|
+
//#region ../core/src/event-series-behaviour.ts
|
|
490
|
+
const SURFACE_EVENT_PRESET_VALUES = [
|
|
491
|
+
"class",
|
|
492
|
+
"course",
|
|
493
|
+
"term",
|
|
494
|
+
"workshop",
|
|
495
|
+
"retreat",
|
|
496
|
+
"performance"
|
|
497
|
+
];
|
|
498
|
+
//#endregion
|
|
488
499
|
//#region ../blocks/src/contracts/runtime.ts
|
|
489
500
|
function decodeSuccess(value) {
|
|
490
501
|
return {
|
|
@@ -654,6 +665,117 @@ function err(error) {
|
|
|
654
665
|
function assertNever$1(value, message) {
|
|
655
666
|
throw new Error(message ?? `Unexpected value: ${String(value)}`);
|
|
656
667
|
}
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region ../blocks/src/lib/typeGuards.ts
|
|
670
|
+
/**
|
|
671
|
+
* Strict record guard: excludes null, primitives, and arrays.
|
|
672
|
+
*/
|
|
673
|
+
function isRecord$5(value) {
|
|
674
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
675
|
+
}
|
|
676
|
+
//#endregion
|
|
677
|
+
//#region ../blocks/src/system/manifest/richTextSchema.ts
|
|
678
|
+
/**
|
|
679
|
+
* Shared Rich Text Schema
|
|
680
|
+
*
|
|
681
|
+
* This module provides a single source of truth for TipTap rich text validation
|
|
682
|
+
* across both the block-form editor and the block rendering system.
|
|
683
|
+
*
|
|
684
|
+
* Rich-text fields use one canonical root shape:
|
|
685
|
+
* `{ type: 'doc', content: [...] }`.
|
|
686
|
+
*/
|
|
687
|
+
/**
|
|
688
|
+
* TipTap document node schema (recursive structure)
|
|
689
|
+
*
|
|
690
|
+
* Supports the full TipTap document structure including:
|
|
691
|
+
* - type: Node type (e.g., 'doc', 'paragraph', 'text')
|
|
692
|
+
* - content: Nested array of child nodes
|
|
693
|
+
* - text: Text content for text nodes
|
|
694
|
+
* - attrs: Node attributes (e.g., alignment, color)
|
|
695
|
+
* - marks: Text formatting marks (e.g., bold, italic)
|
|
696
|
+
*/
|
|
697
|
+
const TipTapMarkSchema = z.object({
|
|
698
|
+
type: z.string().min(1),
|
|
699
|
+
attrs: z.record(z.string(), z.unknown()).optional()
|
|
700
|
+
}).strict();
|
|
701
|
+
const TipTapNodeSchema = z.lazy(() => z.object({
|
|
702
|
+
type: z.string().min(1),
|
|
703
|
+
content: z.array(TipTapNodeSchema).optional(),
|
|
704
|
+
text: z.string().optional(),
|
|
705
|
+
attrs: z.record(z.string(), z.unknown()).optional(),
|
|
706
|
+
marks: z.array(TipTapMarkSchema).optional()
|
|
707
|
+
}).strict().superRefine((node, ctx) => {
|
|
708
|
+
if (node.type === "doc") ctx.addIssue({
|
|
709
|
+
code: "custom",
|
|
710
|
+
path: ["type"],
|
|
711
|
+
message: "Document nodes are only valid at the rich-text root"
|
|
712
|
+
});
|
|
713
|
+
if (node.type === "text") {
|
|
714
|
+
if (node.text === void 0 || node.text.length === 0) ctx.addIssue({
|
|
715
|
+
code: "custom",
|
|
716
|
+
path: ["text"],
|
|
717
|
+
message: "Text nodes require a non-empty text value"
|
|
718
|
+
});
|
|
719
|
+
if (node.content !== void 0) ctx.addIssue({
|
|
720
|
+
code: "custom",
|
|
721
|
+
path: ["content"],
|
|
722
|
+
message: "Text nodes cannot contain child nodes"
|
|
723
|
+
});
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
if (node.text !== void 0) ctx.addIssue({
|
|
727
|
+
code: "custom",
|
|
728
|
+
path: ["text"],
|
|
729
|
+
message: "Only text nodes can contain a text value"
|
|
730
|
+
});
|
|
731
|
+
}));
|
|
732
|
+
/**
|
|
733
|
+
* Canonical schema for a TipTap rich-text document root.
|
|
734
|
+
*
|
|
735
|
+
* Stricter than {@link TipTapNodeSchema}: `type` is literally `'doc'` and
|
|
736
|
+
* `content` is required (possibly empty). This is the shape every producer
|
|
737
|
+
* (dummy content, editor output, migrations) must emit, and the shape every
|
|
738
|
+
* non-legacy consumer can rely on.
|
|
739
|
+
*
|
|
740
|
+
*/
|
|
741
|
+
const RichTextDocSchema = z.object({
|
|
742
|
+
type: z.literal("doc"),
|
|
743
|
+
content: z.array(TipTapNodeSchema)
|
|
744
|
+
}).strict();
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region ../blocks/src/system/blocks/shared/bookingConsent.ts
|
|
747
|
+
const BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX = "booking_requirement_consent_";
|
|
748
|
+
function toBookingRequirementConsentFieldId(requirementId) {
|
|
749
|
+
return `${BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX}${requirementId}`;
|
|
750
|
+
}
|
|
751
|
+
function isBookingRequirementConsentFieldId(value) {
|
|
752
|
+
return value.startsWith(BOOKING_REQUIREMENT_CONSENT_FIELD_PREFIX);
|
|
753
|
+
}
|
|
754
|
+
function toBookingRequirementConsentField(consent) {
|
|
755
|
+
return {
|
|
756
|
+
id: toBookingRequirementConsentFieldId(consent.requirementId),
|
|
757
|
+
label: consent.title,
|
|
758
|
+
type: "booking_requirement_consent",
|
|
759
|
+
required: true,
|
|
760
|
+
agreement: consent.agreement,
|
|
761
|
+
checkboxLabel: consent.checkboxLabel
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
const blockBookingConsentSchema = z.object({
|
|
765
|
+
requirementId: z.string(),
|
|
766
|
+
title: z.string(),
|
|
767
|
+
agreement: RichTextDocSchema,
|
|
768
|
+
checkboxLabel: z.string()
|
|
769
|
+
});
|
|
770
|
+
const bookingRequirementConsentFieldSchema = z.object({
|
|
771
|
+
id: z.string(),
|
|
772
|
+
label: z.string(),
|
|
773
|
+
type: z.literal("booking_requirement_consent"),
|
|
774
|
+
required: z.literal(true),
|
|
775
|
+
agreement: RichTextDocSchema,
|
|
776
|
+
checkboxLabel: z.string().min(1)
|
|
777
|
+
});
|
|
778
|
+
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
657
779
|
const BOOKING_FORM_DATA_RESERVED_KEYS = /* @__PURE__ */ new Set([
|
|
658
780
|
"serviceId",
|
|
659
781
|
"resourceId",
|
|
@@ -665,6 +787,28 @@ const BOOKING_FORM_DATA_RESERVED_KEYS = /* @__PURE__ */ new Set([
|
|
|
665
787
|
"selectedAppointmentPackageId"
|
|
666
788
|
]);
|
|
667
789
|
//#endregion
|
|
790
|
+
//#region ../blocks/src/system/runtime/nodes/booking-form.consent.ts
|
|
791
|
+
function resolveSelectedAppointmentConsent(service) {
|
|
792
|
+
return service?.consent ? {
|
|
793
|
+
kind: "required-for-selected-service",
|
|
794
|
+
field: toBookingRequirementConsentField(service.consent)
|
|
795
|
+
} : { kind: "not-applicable" };
|
|
796
|
+
}
|
|
797
|
+
function projectSelectedAppointmentConsentIntoForm(form, selectedConsent) {
|
|
798
|
+
if (!form) return null;
|
|
799
|
+
const sourceFields = form.schema?.fields ?? [];
|
|
800
|
+
const baseFields = sourceFields.filter((field) => field.type !== "booking_requirement_consent");
|
|
801
|
+
const fields = selectedConsent.kind === "required-for-selected-service" ? [...baseFields, selectedConsent.field] : baseFields;
|
|
802
|
+
if (selectedConsent.kind === "not-applicable" && baseFields.length === sourceFields.length) return form;
|
|
803
|
+
return {
|
|
804
|
+
...form,
|
|
805
|
+
schema: {
|
|
806
|
+
...form.schema,
|
|
807
|
+
fields
|
|
808
|
+
}
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
//#endregion
|
|
668
812
|
//#region ../blocks/src/system/runtime/nodes/booking-form.state.ts
|
|
669
813
|
function toTrimmedString(value) {
|
|
670
814
|
const trimmed = value?.trim();
|
|
@@ -781,12 +925,12 @@ function resolveBookingSiteId(siteId, form) {
|
|
|
781
925
|
return siteId || form?.siteId || "";
|
|
782
926
|
}
|
|
783
927
|
function normalizeBookingFormConfig(form) {
|
|
784
|
-
if (!isRecord$
|
|
928
|
+
if (!isRecord$4(form)) return null;
|
|
785
929
|
const id = readNonEmptyString(form.id);
|
|
786
930
|
const name = readNonEmptyString(form.name);
|
|
787
931
|
if (!id || !name) return null;
|
|
788
|
-
const schemaSource = isRecord$
|
|
789
|
-
const settingsSource = isRecord$
|
|
932
|
+
const schemaSource = isRecord$4(form.schema) ? form.schema : isRecord$4(form.schemaJson) ? form.schemaJson : null;
|
|
933
|
+
const settingsSource = isRecord$4(form.settings) ? form.settings : isRecord$4(form.settingsJson) ? form.settingsJson : null;
|
|
790
934
|
return {
|
|
791
935
|
id,
|
|
792
936
|
name,
|
|
@@ -806,8 +950,8 @@ function normalizeBookingServices(services) {
|
|
|
806
950
|
};
|
|
807
951
|
if (!services) return [];
|
|
808
952
|
if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
|
|
809
|
-
if (isRecord$
|
|
810
|
-
return isRecord$
|
|
953
|
+
if (isRecord$4(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
954
|
+
return isRecord$4(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
811
955
|
}
|
|
812
956
|
function normalizeBookingSchema(value) {
|
|
813
957
|
if (!value) return void 0;
|
|
@@ -818,7 +962,7 @@ function normalizeBookingSchema(value) {
|
|
|
818
962
|
};
|
|
819
963
|
}
|
|
820
964
|
function readBookingFormField(value) {
|
|
821
|
-
if (!isRecord$
|
|
965
|
+
if (!isRecord$4(value)) return null;
|
|
822
966
|
const id = readNonEmptyString(value.id);
|
|
823
967
|
const label = readNonEmptyString(value.label);
|
|
824
968
|
const type = readBookingFieldType(value.type);
|
|
@@ -847,7 +991,6 @@ function readBookingFieldType(value) {
|
|
|
847
991
|
case "select":
|
|
848
992
|
case "radio":
|
|
849
993
|
case "checkbox":
|
|
850
|
-
case "booking_requirement_consent":
|
|
851
994
|
case "tel":
|
|
852
995
|
case "url":
|
|
853
996
|
case "number":
|
|
@@ -862,7 +1005,7 @@ function readBookingFieldOptions(value) {
|
|
|
862
1005
|
return options.length > 0 ? options : void 0;
|
|
863
1006
|
}
|
|
864
1007
|
function readBookingFieldOption(value) {
|
|
865
|
-
if (!isRecord$
|
|
1008
|
+
if (!isRecord$4(value)) return null;
|
|
866
1009
|
const optionValue = readNonEmptyString(value.value);
|
|
867
1010
|
const label = readNonEmptyString(value.label);
|
|
868
1011
|
return optionValue && label ? {
|
|
@@ -882,7 +1025,7 @@ function normalizeBookingSettings(value) {
|
|
|
882
1025
|
};
|
|
883
1026
|
}
|
|
884
1027
|
function isBookingFormService(value) {
|
|
885
|
-
return isRecord$
|
|
1028
|
+
return isRecord$4(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
886
1029
|
}
|
|
887
1030
|
function collectBookingCustomFields(data) {
|
|
888
1031
|
const customFields = {};
|
|
@@ -932,7 +1075,7 @@ function readStringArray(value) {
|
|
|
932
1075
|
const strings = value.filter((item) => typeof item === "string");
|
|
933
1076
|
return strings.length > 0 ? strings : void 0;
|
|
934
1077
|
}
|
|
935
|
-
function isRecord$
|
|
1078
|
+
function isRecord$4(value) {
|
|
936
1079
|
return typeof value === "object" && value !== null;
|
|
937
1080
|
}
|
|
938
1081
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -1141,6 +1284,15 @@ const bookingFieldOptionSchema = z.object({
|
|
|
1141
1284
|
value: z.string(),
|
|
1142
1285
|
label: z.string()
|
|
1143
1286
|
});
|
|
1287
|
+
const standardBookingFieldRules = {
|
|
1288
|
+
options: z.array(bookingFieldOptionSchema).optional(),
|
|
1289
|
+
multiple: z.boolean().optional(),
|
|
1290
|
+
minLength: z.number().optional(),
|
|
1291
|
+
maxLength: z.number().optional(),
|
|
1292
|
+
pattern: z.string().optional(),
|
|
1293
|
+
min: z.number().optional(),
|
|
1294
|
+
max: z.number().optional()
|
|
1295
|
+
};
|
|
1144
1296
|
const bookingFieldSchema = z.object({
|
|
1145
1297
|
id: z.string(),
|
|
1146
1298
|
label: z.string(),
|
|
@@ -1151,7 +1303,6 @@ const bookingFieldSchema = z.object({
|
|
|
1151
1303
|
"select",
|
|
1152
1304
|
"radio",
|
|
1153
1305
|
"checkbox",
|
|
1154
|
-
"booking_requirement_consent",
|
|
1155
1306
|
"tel",
|
|
1156
1307
|
"url",
|
|
1157
1308
|
"number",
|
|
@@ -1161,13 +1312,7 @@ const bookingFieldSchema = z.object({
|
|
|
1161
1312
|
required: z.boolean().optional(),
|
|
1162
1313
|
placeholder: z.string().optional(),
|
|
1163
1314
|
helpText: z.string().optional(),
|
|
1164
|
-
|
|
1165
|
-
multiple: z.boolean().optional(),
|
|
1166
|
-
minLength: z.number().optional(),
|
|
1167
|
-
maxLength: z.number().optional(),
|
|
1168
|
-
pattern: z.string().optional(),
|
|
1169
|
-
min: z.number().optional(),
|
|
1170
|
-
max: z.number().optional()
|
|
1315
|
+
...standardBookingFieldRules
|
|
1171
1316
|
});
|
|
1172
1317
|
const bookingSettingsSchema = z.object({
|
|
1173
1318
|
type: z.literal("booking"),
|
|
@@ -1273,7 +1418,8 @@ const bookingServiceSchema = z.object({
|
|
|
1273
1418
|
priceAmount: z.number().nullable().optional(),
|
|
1274
1419
|
priceCurrency: z.string().nullable().optional(),
|
|
1275
1420
|
paymentTerms: blockBookingPaymentTermsSchema.optional(),
|
|
1276
|
-
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional()
|
|
1421
|
+
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
|
|
1422
|
+
consent: blockBookingConsentSchema.optional()
|
|
1277
1423
|
});
|
|
1278
1424
|
const bookingServicesSourceSchema = z.union([
|
|
1279
1425
|
z.array(bookingServiceSchema),
|
|
@@ -1391,19 +1537,13 @@ const bookingFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
1391
1537
|
})
|
|
1392
1538
|
});
|
|
1393
1539
|
//#endregion
|
|
1394
|
-
//#region ../blocks/src/system/blocks/
|
|
1395
|
-
|
|
1396
|
-
* Zod schema for course venue data
|
|
1397
|
-
*/
|
|
1398
|
-
const courseVenueSchema = z.object({
|
|
1540
|
+
//#region ../blocks/src/system/blocks/events/whole-series/schemas.ts
|
|
1541
|
+
const wholeSeriesVenueSchema = z.object({
|
|
1399
1542
|
id: z.string(),
|
|
1400
1543
|
name: z.string(),
|
|
1401
1544
|
address: z.string().nullable()
|
|
1402
1545
|
});
|
|
1403
|
-
|
|
1404
|
-
* Zod schema for course session (occurrence) data
|
|
1405
|
-
*/
|
|
1406
|
-
const courseSessionSchema = z.object({
|
|
1546
|
+
const wholeSeriesSessionSchema = z.object({
|
|
1407
1547
|
id: z.string(),
|
|
1408
1548
|
startsAt: z.string(),
|
|
1409
1549
|
endsAt: z.string(),
|
|
@@ -1411,14 +1551,14 @@ const courseSessionSchema = z.object({
|
|
|
1411
1551
|
capacityOverride: z.number().nullable().optional(),
|
|
1412
1552
|
overrides: z.record(z.string(), z.unknown()).nullable().optional()
|
|
1413
1553
|
});
|
|
1414
|
-
const
|
|
1554
|
+
const wholeSeriesTeamMemberSummarySchema = z.object({
|
|
1415
1555
|
id: z.string(),
|
|
1416
1556
|
name: z.string(),
|
|
1417
1557
|
roleLabel: z.string().nullable(),
|
|
1418
1558
|
summary: z.string().nullable(),
|
|
1419
1559
|
profilePath: z.string().nullable()
|
|
1420
1560
|
});
|
|
1421
|
-
const
|
|
1561
|
+
const wholeSeriesPricingOptionSchema = z.object({
|
|
1422
1562
|
id: z.string(),
|
|
1423
1563
|
name: z.string(),
|
|
1424
1564
|
description: z.string().nullable(),
|
|
@@ -1434,7 +1574,7 @@ const coursePricingOptionSchema = z.object({
|
|
|
1434
1574
|
"both"
|
|
1435
1575
|
]).nullable().optional()
|
|
1436
1576
|
});
|
|
1437
|
-
const
|
|
1577
|
+
const wholeSeriesPricingSchema = z.object({
|
|
1438
1578
|
bookingRequirement: z.enum(["none", "required"]),
|
|
1439
1579
|
pricingStrategy: z.enum([
|
|
1440
1580
|
"free",
|
|
@@ -1448,22 +1588,20 @@ const coursePricingSchema = z.object({
|
|
|
1448
1588
|
slidingMaxAmount: z.number().nullable().optional(),
|
|
1449
1589
|
slidingSuggestedAmount: z.number().nullable().optional(),
|
|
1450
1590
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1451
|
-
options: z.array(
|
|
1591
|
+
options: z.array(wholeSeriesPricingOptionSchema)
|
|
1452
1592
|
});
|
|
1453
|
-
/**
|
|
1454
|
-
* Zod schema for public course data
|
|
1455
|
-
*/
|
|
1456
1593
|
const publicWholeSeriesOfferingSchema = z.object({
|
|
1457
1594
|
eventSeriesId: z.string(),
|
|
1458
1595
|
eventOfferingId: z.string(),
|
|
1459
1596
|
title: z.string(),
|
|
1460
1597
|
slug: z.string(),
|
|
1461
1598
|
description: z.unknown().nullable(),
|
|
1462
|
-
teamMembers: z.array(
|
|
1599
|
+
teamMembers: z.array(wholeSeriesTeamMemberSummarySchema).optional(),
|
|
1463
1600
|
enrollmentOpen: z.boolean(),
|
|
1464
|
-
pricing:
|
|
1601
|
+
pricing: wholeSeriesPricingSchema,
|
|
1465
1602
|
currency: z.string(),
|
|
1466
1603
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
1604
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
1467
1605
|
enrollmentCapacity: z.number().nullable(),
|
|
1468
1606
|
acceptsMemberships: z.boolean(),
|
|
1469
1607
|
status: z.enum([
|
|
@@ -1474,12 +1612,10 @@ const publicWholeSeriesOfferingSchema = z.object({
|
|
|
1474
1612
|
sessionsCount: z.number(),
|
|
1475
1613
|
enrolledCount: z.number(),
|
|
1476
1614
|
availableSpots: z.number().nullable(),
|
|
1477
|
-
sessions: z.array(
|
|
1478
|
-
venue:
|
|
1615
|
+
sessions: z.array(wholeSeriesSessionSchema),
|
|
1616
|
+
venue: wholeSeriesVenueSchema.nullable()
|
|
1479
1617
|
});
|
|
1480
|
-
|
|
1481
|
-
const publicCourseSchema = publicWholeSeriesOfferingSchema;
|
|
1482
|
-
const publicCoursesArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
1618
|
+
const publicWholeSeriesOfferingsArraySchema = z.array(publicWholeSeriesOfferingSchema);
|
|
1483
1619
|
//#endregion
|
|
1484
1620
|
//#region ../blocks/src/system/constants/events.ts
|
|
1485
1621
|
const eventCalendarDisplayModeValues = [
|
|
@@ -1531,6 +1667,12 @@ const opaqueButtonColourTokenSchema = themeColorTokenSchema.refine((value) => pa
|
|
|
1531
1667
|
if (token === null) throw new Error("Invariant: opaque button token passed its schema");
|
|
1532
1668
|
return token;
|
|
1533
1669
|
});
|
|
1670
|
+
const contextualButtonHoverSchema = z.strictObject({
|
|
1671
|
+
kind: z.literal("shade-shift"),
|
|
1672
|
+
seedToken: opaqueButtonColourTokenSchema,
|
|
1673
|
+
fallbackDirection: z.enum(["lighter", "darker"]),
|
|
1674
|
+
preferredToken: opaqueButtonColourTokenSchema.optional()
|
|
1675
|
+
});
|
|
1534
1676
|
const buttonShadeAmountSchema = z.number().finite().min(0).max(900).multipleOf(100);
|
|
1535
1677
|
const buttonShadowIntensitySchema = z.enum([
|
|
1536
1678
|
"subtle",
|
|
@@ -1870,6 +2012,7 @@ const buttonVariantSchema = z.strictObject({
|
|
|
1870
2012
|
shadow: variantShadowSchema.optional(),
|
|
1871
2013
|
border: buttonBorderSchema.optional(),
|
|
1872
2014
|
hoverBackgroundToken: opaqueButtonColourTokenSchema.optional(),
|
|
2015
|
+
contextualHover: contextualButtonHoverSchema.optional(),
|
|
1873
2016
|
effects: variantEffectsSchema.optional(),
|
|
1874
2017
|
sizes: variantSizeOverridesSchema.optional(),
|
|
1875
2018
|
affordance: buttonVariantAffordanceSchema.optional()
|
|
@@ -2017,8 +2160,8 @@ const openCardRoleValue = "open";
|
|
|
2017
2160
|
*/
|
|
2018
2161
|
const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
2019
2162
|
/**
|
|
2020
|
-
* The closed
|
|
2021
|
-
*
|
|
2163
|
+
* The closed role vocabulary Looks and blocks use for surfaced and boxless
|
|
2164
|
+
* card choices.
|
|
2022
2165
|
*
|
|
2023
2166
|
* - `none` — no site-style card surface; the block's own composition and
|
|
2024
2167
|
* the author's own card fields govern the item. This is *not*
|
|
@@ -2030,11 +2173,6 @@ const surfaceCardRoleValues = [...cardVariantRoleValues, openCardRoleValue];
|
|
|
2030
2173
|
* - `alternative` — the statement card carrying the site's personality
|
|
2031
2174
|
*/
|
|
2032
2175
|
const cardRoleValues = [...surfaceCardRoleValues, boxlessCardVariantValue];
|
|
2033
|
-
const legacyCardVariantRoleAliases = {
|
|
2034
|
-
variant1: "alternative",
|
|
2035
|
-
variant2: "alternative",
|
|
2036
|
-
statement: "alternative"
|
|
2037
|
-
};
|
|
2038
2176
|
const cardSpacingSchema = z.enum([
|
|
2039
2177
|
"none",
|
|
2040
2178
|
"compact",
|
|
@@ -2064,21 +2202,20 @@ const gradientDirectionSchema = z.enum([
|
|
|
2064
2202
|
"to-br",
|
|
2065
2203
|
"to-bl"
|
|
2066
2204
|
]);
|
|
2067
|
-
|
|
2205
|
+
z.enum(cardVariantRoleValues);
|
|
2068
2206
|
const surfaceCardRoleSchema = z.enum(surfaceCardRoleValues);
|
|
2069
2207
|
const cardRoleSchema = z.enum(cardRoleValues);
|
|
2070
|
-
/**
|
|
2071
|
-
* Historical name for the role vocabulary as it reaches box styles. Widened to
|
|
2072
|
-
* the full `CardRole` set — old values keep parsing, `open` now parses too.
|
|
2073
|
-
*/
|
|
2074
|
-
const boxStylesCardVariantSchema = cardRoleSchema;
|
|
2075
2208
|
function isCardVariantRole(value) {
|
|
2076
2209
|
return typeof value === "string" && cardVariantRoleValues.includes(value);
|
|
2077
2210
|
}
|
|
2078
2211
|
function normalizeCardVariantRole(value) {
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2212
|
+
return isCardVariantRole(value) ? value : null;
|
|
2213
|
+
}
|
|
2214
|
+
/** The one untrusted-input boundary for the closed role vocabulary. */
|
|
2215
|
+
function normalizeCardRole(value) {
|
|
2216
|
+
if (value === "none") return boxlessCardVariantValue;
|
|
2217
|
+
if (value === "open") return openCardRoleValue;
|
|
2218
|
+
return normalizeCardVariantRole(value);
|
|
2082
2219
|
}
|
|
2083
2220
|
const PRIORITY_ROLE_INFERENCE = {
|
|
2084
2221
|
1: "default",
|
|
@@ -3376,7 +3513,7 @@ const boxBackgroundSchema = z.discriminatedUnion("type", [
|
|
|
3376
3513
|
})
|
|
3377
3514
|
]);
|
|
3378
3515
|
function normalizeAuthoringOpacity(value) {
|
|
3379
|
-
if (!isRecord$
|
|
3516
|
+
if (!isRecord$3(value)) return value;
|
|
3380
3517
|
return {
|
|
3381
3518
|
...value,
|
|
3382
3519
|
opacity: normalizeOpacity(value.opacity)
|
|
@@ -3385,7 +3522,7 @@ function normalizeAuthoringOpacity(value) {
|
|
|
3385
3522
|
function normalizeOpacity(value) {
|
|
3386
3523
|
return typeof value === "number" && value > 1 && value <= 100 ? value / 100 : value;
|
|
3387
3524
|
}
|
|
3388
|
-
function isRecord$
|
|
3525
|
+
function isRecord$3(value) {
|
|
3389
3526
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3390
3527
|
}
|
|
3391
3528
|
//#endregion
|
|
@@ -3581,8 +3718,7 @@ const cardStylesOverrideSchema = z.object({
|
|
|
3581
3718
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
3582
3719
|
raised: z.boolean().nullable().optional(),
|
|
3583
3720
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
3584
|
-
role: cardRoleSchema.nullable().optional()
|
|
3585
|
-
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
3721
|
+
role: cardRoleSchema.nullable().optional()
|
|
3586
3722
|
});
|
|
3587
3723
|
const blockStyleOverridesSchema = z.object({
|
|
3588
3724
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
@@ -4211,13 +4347,7 @@ function shadeBackgroundEffect(config) {
|
|
|
4211
4347
|
buttonSizeNameSchema.options;
|
|
4212
4348
|
//#endregion
|
|
4213
4349
|
//#region ../theme-core/src/buttons/styles/domain.ts
|
|
4214
|
-
const PUBLIC_BUTTON_ROLES =
|
|
4215
|
-
"primary",
|
|
4216
|
-
"secondary",
|
|
4217
|
-
"outline",
|
|
4218
|
-
"ghost",
|
|
4219
|
-
"accent"
|
|
4220
|
-
];
|
|
4350
|
+
const PUBLIC_BUTTON_ROLES = VARIANT_ROLES;
|
|
4221
4351
|
function defineButtonStyleRecipe(recipe) {
|
|
4222
4352
|
return recipe;
|
|
4223
4353
|
}
|
|
@@ -4313,6 +4443,14 @@ const BUTTON_STYLE_IDS = [
|
|
|
4313
4443
|
"quiet-arrow"
|
|
4314
4444
|
];
|
|
4315
4445
|
const quietArrowParametersSchema = z.object({ secondaryTreatment: z.enum(["outlined", "solid-accent"]) }).strict();
|
|
4446
|
+
const flatInkHoverTreatmentSchema = z.enum([
|
|
4447
|
+
"contextual",
|
|
4448
|
+
"secondary",
|
|
4449
|
+
"accent"
|
|
4450
|
+
]);
|
|
4451
|
+
const flatInkHoverPreferencesShape = Object.fromEntries(VARIANT_ROLES.map((role) => [role, flatInkHoverTreatmentSchema.optional()]));
|
|
4452
|
+
const flatInkHoverPreferencesSchema = z.strictObject(flatInkHoverPreferencesShape);
|
|
4453
|
+
const flatInkParametersSchema = z.strictObject({ hoverPreferences: flatInkHoverPreferencesSchema.optional() });
|
|
4316
4454
|
const emptyParametersSchema$1 = z.object({}).strict();
|
|
4317
4455
|
function selectionBranch(styleId, parameters) {
|
|
4318
4456
|
return z.object({
|
|
@@ -4327,7 +4465,7 @@ z.discriminatedUnion("styleId", [
|
|
|
4327
4465
|
selectionBranch("editorial-link", emptyParametersSchema$1),
|
|
4328
4466
|
selectionBranch("pebble", emptyParametersSchema$1),
|
|
4329
4467
|
selectionBranch("ink-stamp", emptyParametersSchema$1),
|
|
4330
|
-
selectionBranch("flat-ink",
|
|
4468
|
+
selectionBranch("flat-ink", flatInkParametersSchema),
|
|
4331
4469
|
selectionBranch("brushed-wash", emptyParametersSchema$1),
|
|
4332
4470
|
selectionBranch("showtime-pill", emptyParametersSchema$1),
|
|
4333
4471
|
selectionBranch("joy-stamp", emptyParametersSchema$1),
|
|
@@ -4464,6 +4602,189 @@ const quietArrowRecipe = defineButtonStyleRecipe({
|
|
|
4464
4602
|
})
|
|
4465
4603
|
});
|
|
4466
4604
|
//#endregion
|
|
4605
|
+
//#region ../theme-core/src/buttons/styles/recipes/flatInk.ts
|
|
4606
|
+
const contextualRoleConfig = {
|
|
4607
|
+
primary: {
|
|
4608
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("primary"),
|
|
4609
|
+
fallbackDirection: "darker"
|
|
4610
|
+
},
|
|
4611
|
+
secondary: {
|
|
4612
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
4613
|
+
fallbackDirection: "darker"
|
|
4614
|
+
},
|
|
4615
|
+
outline: {
|
|
4616
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
4617
|
+
fallbackDirection: "darker"
|
|
4618
|
+
},
|
|
4619
|
+
ghost: {
|
|
4620
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("surfaceAlt"),
|
|
4621
|
+
fallbackDirection: "darker"
|
|
4622
|
+
},
|
|
4623
|
+
accent: {
|
|
4624
|
+
contextualSeedToken: unsafeAsOpaqueButtonColourToken("accent"),
|
|
4625
|
+
fallbackDirection: "darker"
|
|
4626
|
+
}
|
|
4627
|
+
};
|
|
4628
|
+
const hoverControl = {
|
|
4629
|
+
kind: "button-hover-by-role",
|
|
4630
|
+
parameter: "hoverPreferences",
|
|
4631
|
+
label: "Button hover",
|
|
4632
|
+
roles: contextualRoleConfig,
|
|
4633
|
+
options: [
|
|
4634
|
+
{
|
|
4635
|
+
value: "contextual",
|
|
4636
|
+
label: "Contextual shade shift"
|
|
4637
|
+
},
|
|
4638
|
+
{
|
|
4639
|
+
value: "secondary",
|
|
4640
|
+
label: "Secondary button colour"
|
|
4641
|
+
},
|
|
4642
|
+
{
|
|
4643
|
+
value: "accent",
|
|
4644
|
+
label: "Accent button colour"
|
|
4645
|
+
}
|
|
4646
|
+
]
|
|
4647
|
+
};
|
|
4648
|
+
const lift = { effectId: "lift" };
|
|
4649
|
+
const flatInkRecipe = defineButtonStyleRecipe({
|
|
4650
|
+
id: "flat-ink",
|
|
4651
|
+
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
4652
|
+
tags: {
|
|
4653
|
+
tone: "classic",
|
|
4654
|
+
energy: "calm",
|
|
4655
|
+
motion: "subtle",
|
|
4656
|
+
era: "editorial"
|
|
4657
|
+
},
|
|
4658
|
+
parameterSchema: flatInkParametersSchema,
|
|
4659
|
+
defaultParameters: {},
|
|
4660
|
+
controls: [hoverControl],
|
|
4661
|
+
defineSystem: (parameters) => ({
|
|
4662
|
+
global: {
|
|
4663
|
+
cornerStyle: "rounded",
|
|
4664
|
+
textTransform: "none",
|
|
4665
|
+
fontWeight: 600,
|
|
4666
|
+
typography: "body",
|
|
4667
|
+
letterSpacing: "tight",
|
|
4668
|
+
paddingPreset: "default",
|
|
4669
|
+
hoverTransform: "lift",
|
|
4670
|
+
hoverColor: "none"
|
|
4671
|
+
},
|
|
4672
|
+
sizes: {
|
|
4673
|
+
sm: {
|
|
4674
|
+
padding: "0.625rem 1.125rem",
|
|
4675
|
+
fontSize: "text-sm"
|
|
4676
|
+
},
|
|
4677
|
+
md: { padding: "0.8125rem 1.375rem" },
|
|
4678
|
+
lg: {
|
|
4679
|
+
padding: "0.9375rem 1.625rem",
|
|
4680
|
+
fontSize: "text-lg"
|
|
4681
|
+
},
|
|
4682
|
+
xl: {
|
|
4683
|
+
padding: "1.0625rem 2rem",
|
|
4684
|
+
fontSize: "text-xl"
|
|
4685
|
+
}
|
|
4686
|
+
},
|
|
4687
|
+
roles: {
|
|
4688
|
+
primary: {
|
|
4689
|
+
kind: "complete",
|
|
4690
|
+
appearance: {
|
|
4691
|
+
background: {
|
|
4692
|
+
type: "solid",
|
|
4693
|
+
colorToken: unsafeAsOpaqueButtonColourToken("primary")
|
|
4694
|
+
},
|
|
4695
|
+
borderRadius: "rounded-lg",
|
|
4696
|
+
affordance: { iconId: "ArrowRight" },
|
|
4697
|
+
...hoverAppearance("primary", parameters, [lift, {
|
|
4698
|
+
effectId: "background-on-hover",
|
|
4699
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("secondary") }
|
|
4700
|
+
}])
|
|
4701
|
+
}
|
|
4702
|
+
},
|
|
4703
|
+
secondary: {
|
|
4704
|
+
kind: "complete",
|
|
4705
|
+
appearance: {
|
|
4706
|
+
background: {
|
|
4707
|
+
type: "surface",
|
|
4708
|
+
role: "link"
|
|
4709
|
+
},
|
|
4710
|
+
borderRadius: "rounded-lg",
|
|
4711
|
+
border: { widthClass: "border" },
|
|
4712
|
+
...hoverAppearance("secondary", parameters, [lift, {
|
|
4713
|
+
effectId: "background-on-hover",
|
|
4714
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
4715
|
+
}])
|
|
4716
|
+
}
|
|
4717
|
+
},
|
|
4718
|
+
outline: {
|
|
4719
|
+
kind: "complete",
|
|
4720
|
+
appearance: {
|
|
4721
|
+
background: {
|
|
4722
|
+
type: "surface",
|
|
4723
|
+
role: "link"
|
|
4724
|
+
},
|
|
4725
|
+
borderRadius: "rounded-lg",
|
|
4726
|
+
border: { widthClass: "border" },
|
|
4727
|
+
...hoverAppearance("outline", parameters, [lift, {
|
|
4728
|
+
effectId: "background-on-hover",
|
|
4729
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surfaceAlt") }
|
|
4730
|
+
}])
|
|
4731
|
+
}
|
|
4732
|
+
},
|
|
4733
|
+
ghost: {
|
|
4734
|
+
kind: "complete",
|
|
4735
|
+
appearance: {
|
|
4736
|
+
background: {
|
|
4737
|
+
type: "surface",
|
|
4738
|
+
role: "link"
|
|
4739
|
+
},
|
|
4740
|
+
borderRadius: "rounded-lg",
|
|
4741
|
+
...hoverAppearance("ghost", parameters, [lift])
|
|
4742
|
+
}
|
|
4743
|
+
},
|
|
4744
|
+
accent: {
|
|
4745
|
+
kind: "complete",
|
|
4746
|
+
appearance: {
|
|
4747
|
+
background: {
|
|
4748
|
+
type: "solid",
|
|
4749
|
+
colorToken: unsafeAsOpaqueButtonColourToken("accent")
|
|
4750
|
+
},
|
|
4751
|
+
borderRadius: "rounded-lg",
|
|
4752
|
+
affordance: { iconId: "ArrowRight" },
|
|
4753
|
+
...hoverAppearance("accent", parameters, [lift])
|
|
4754
|
+
}
|
|
4755
|
+
}
|
|
4756
|
+
}
|
|
4757
|
+
})
|
|
4758
|
+
});
|
|
4759
|
+
function hoverAppearance(role, parameters, recommended) {
|
|
4760
|
+
const preference = parameters.hoverPreferences?.[role];
|
|
4761
|
+
if (preference === void 0) return { effects: { hover: [...recommended] } };
|
|
4762
|
+
if (preference === "contextual") {
|
|
4763
|
+
const config = contextualRoleConfig[role];
|
|
4764
|
+
return {
|
|
4765
|
+
effects: { hover: [lift] },
|
|
4766
|
+
contextualHover: {
|
|
4767
|
+
kind: "shade-shift",
|
|
4768
|
+
seedToken: config.contextualSeedToken,
|
|
4769
|
+
fallbackDirection: config.fallbackDirection
|
|
4770
|
+
}
|
|
4771
|
+
};
|
|
4772
|
+
}
|
|
4773
|
+
const config = contextualRoleConfig[role];
|
|
4774
|
+
return {
|
|
4775
|
+
effects: { hover: [lift] },
|
|
4776
|
+
contextualHover: {
|
|
4777
|
+
kind: "shade-shift",
|
|
4778
|
+
seedToken: config.contextualSeedToken,
|
|
4779
|
+
fallbackDirection: config.fallbackDirection,
|
|
4780
|
+
preferredToken: unsafeAsOpaqueButtonColourToken(paletteRole(preference))
|
|
4781
|
+
}
|
|
4782
|
+
};
|
|
4783
|
+
}
|
|
4784
|
+
function paletteRole(preference) {
|
|
4785
|
+
return preference;
|
|
4786
|
+
}
|
|
4787
|
+
//#endregion
|
|
4467
4788
|
//#region ../theme-core/src/buttons/styles/recipes/defineStaticButtonStyleRecipe.ts
|
|
4468
4789
|
const emptyParametersSchema = z.object({}).strict();
|
|
4469
4790
|
function defineStaticButtonStyleRecipe(input) {
|
|
@@ -5207,142 +5528,7 @@ const inkStampRecipe = defineStaticButtonStyleRecipe({
|
|
|
5207
5528
|
},
|
|
5208
5529
|
xl: {
|
|
5209
5530
|
padding: "1.125rem 2.75rem",
|
|
5210
|
-
fontSize: "text-lg"
|
|
5211
|
-
}
|
|
5212
|
-
},
|
|
5213
|
-
roles: {
|
|
5214
|
-
primary: {
|
|
5215
|
-
kind: "complete",
|
|
5216
|
-
appearance: {
|
|
5217
|
-
background: {
|
|
5218
|
-
type: "solid",
|
|
5219
|
-
colorToken: "primary"
|
|
5220
|
-
},
|
|
5221
|
-
borderRadius: "rounded-md",
|
|
5222
|
-
effects: {
|
|
5223
|
-
hover: [{
|
|
5224
|
-
effectId: "drop-shadow",
|
|
5225
|
-
options: { intensity: "medium" }
|
|
5226
|
-
}, {
|
|
5227
|
-
effectId: "scale-up",
|
|
5228
|
-
options: { scale: "1.02" }
|
|
5229
|
-
}],
|
|
5230
|
-
active: [{
|
|
5231
|
-
effectId: "scale-down",
|
|
5232
|
-
options: { scale: "0.98" }
|
|
5233
|
-
}]
|
|
5234
|
-
}
|
|
5235
|
-
}
|
|
5236
|
-
},
|
|
5237
|
-
secondary: {
|
|
5238
|
-
kind: "complete",
|
|
5239
|
-
appearance: {
|
|
5240
|
-
background: {
|
|
5241
|
-
type: "surface",
|
|
5242
|
-
role: "link"
|
|
5243
|
-
},
|
|
5244
|
-
borderRadius: "rounded-md",
|
|
5245
|
-
border: { widthClass: "border-2" },
|
|
5246
|
-
effects: { hover: [{
|
|
5247
|
-
effectId: "background-on-hover",
|
|
5248
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5249
|
-
}] }
|
|
5250
|
-
}
|
|
5251
|
-
},
|
|
5252
|
-
outline: {
|
|
5253
|
-
kind: "complete",
|
|
5254
|
-
appearance: {
|
|
5255
|
-
background: {
|
|
5256
|
-
type: "surface",
|
|
5257
|
-
role: "link"
|
|
5258
|
-
},
|
|
5259
|
-
borderRadius: "rounded-md",
|
|
5260
|
-
border: { widthClass: "border-2" },
|
|
5261
|
-
effects: { hover: [{
|
|
5262
|
-
effectId: "background-on-hover",
|
|
5263
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5264
|
-
}] }
|
|
5265
|
-
}
|
|
5266
|
-
},
|
|
5267
|
-
ghost: {
|
|
5268
|
-
kind: "complete",
|
|
5269
|
-
appearance: {
|
|
5270
|
-
background: {
|
|
5271
|
-
type: "surface",
|
|
5272
|
-
role: "link"
|
|
5273
|
-
},
|
|
5274
|
-
borderRadius: "rounded-none",
|
|
5275
|
-
sizes: {
|
|
5276
|
-
sm: {
|
|
5277
|
-
padding: "0.375rem 0",
|
|
5278
|
-
fontSize: "text-xs"
|
|
5279
|
-
},
|
|
5280
|
-
md: {
|
|
5281
|
-
padding: "0.5rem 0",
|
|
5282
|
-
fontSize: "text-sm"
|
|
5283
|
-
},
|
|
5284
|
-
lg: {
|
|
5285
|
-
padding: "0.625rem 0",
|
|
5286
|
-
fontSize: "text-base"
|
|
5287
|
-
},
|
|
5288
|
-
xl: {
|
|
5289
|
-
padding: "0.75rem 0",
|
|
5290
|
-
fontSize: "text-lg"
|
|
5291
|
-
}
|
|
5292
|
-
},
|
|
5293
|
-
effects: { base: [{
|
|
5294
|
-
effectId: "border-bottom-grow",
|
|
5295
|
-
options: {
|
|
5296
|
-
height: 1,
|
|
5297
|
-
origin: "left"
|
|
5298
|
-
}
|
|
5299
|
-
}] }
|
|
5300
|
-
}
|
|
5301
|
-
},
|
|
5302
|
-
accent: {
|
|
5303
|
-
kind: "derive",
|
|
5304
|
-
from: "primary",
|
|
5305
|
-
overrides: { background: {
|
|
5306
|
-
type: "solid",
|
|
5307
|
-
colorToken: "accent"
|
|
5308
|
-
} }
|
|
5309
|
-
}
|
|
5310
|
-
}
|
|
5311
|
-
}
|
|
5312
|
-
});
|
|
5313
|
-
const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
5314
|
-
id: "flat-ink",
|
|
5315
|
-
accessibilityLabel: "Flat rounded buttons with arrow affordances",
|
|
5316
|
-
tags: {
|
|
5317
|
-
tone: "classic",
|
|
5318
|
-
energy: "calm",
|
|
5319
|
-
motion: "subtle",
|
|
5320
|
-
era: "editorial"
|
|
5321
|
-
},
|
|
5322
|
-
system: {
|
|
5323
|
-
global: {
|
|
5324
|
-
cornerStyle: "rounded",
|
|
5325
|
-
textTransform: "none",
|
|
5326
|
-
fontWeight: 600,
|
|
5327
|
-
typography: "body",
|
|
5328
|
-
letterSpacing: "tight",
|
|
5329
|
-
paddingPreset: "default",
|
|
5330
|
-
hoverTransform: "lift",
|
|
5331
|
-
hoverColor: "none"
|
|
5332
|
-
},
|
|
5333
|
-
sizes: {
|
|
5334
|
-
sm: {
|
|
5335
|
-
padding: "0.625rem 1.125rem",
|
|
5336
|
-
fontSize: "text-sm"
|
|
5337
|
-
},
|
|
5338
|
-
md: { padding: "0.8125rem 1.375rem" },
|
|
5339
|
-
lg: {
|
|
5340
|
-
padding: "0.9375rem 1.625rem",
|
|
5341
|
-
fontSize: "text-lg"
|
|
5342
|
-
},
|
|
5343
|
-
xl: {
|
|
5344
|
-
padding: "1.0625rem 2rem",
|
|
5345
|
-
fontSize: "text-xl"
|
|
5531
|
+
fontSize: "text-lg"
|
|
5346
5532
|
}
|
|
5347
5533
|
},
|
|
5348
5534
|
roles: {
|
|
@@ -5353,12 +5539,20 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5353
5539
|
type: "solid",
|
|
5354
5540
|
colorToken: "primary"
|
|
5355
5541
|
},
|
|
5356
|
-
borderRadius: "rounded-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5542
|
+
borderRadius: "rounded-md",
|
|
5543
|
+
effects: {
|
|
5544
|
+
hover: [{
|
|
5545
|
+
effectId: "drop-shadow",
|
|
5546
|
+
options: { intensity: "medium" }
|
|
5547
|
+
}, {
|
|
5548
|
+
effectId: "scale-up",
|
|
5549
|
+
options: { scale: "1.02" }
|
|
5550
|
+
}],
|
|
5551
|
+
active: [{
|
|
5552
|
+
effectId: "scale-down",
|
|
5553
|
+
options: { scale: "0.98" }
|
|
5554
|
+
}]
|
|
5555
|
+
}
|
|
5362
5556
|
}
|
|
5363
5557
|
},
|
|
5364
5558
|
secondary: {
|
|
@@ -5368,11 +5562,11 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5368
5562
|
type: "surface",
|
|
5369
5563
|
role: "link"
|
|
5370
5564
|
},
|
|
5371
|
-
borderRadius: "rounded-
|
|
5372
|
-
border: { widthClass: "border" },
|
|
5373
|
-
effects: { hover: [{
|
|
5565
|
+
borderRadius: "rounded-md",
|
|
5566
|
+
border: { widthClass: "border-2" },
|
|
5567
|
+
effects: { hover: [{
|
|
5374
5568
|
effectId: "background-on-hover",
|
|
5375
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("
|
|
5569
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5376
5570
|
}] }
|
|
5377
5571
|
}
|
|
5378
5572
|
},
|
|
@@ -5383,11 +5577,11 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5383
5577
|
type: "surface",
|
|
5384
5578
|
role: "link"
|
|
5385
5579
|
},
|
|
5386
|
-
borderRadius: "rounded-
|
|
5387
|
-
border: { widthClass: "border" },
|
|
5388
|
-
effects: { hover: [{
|
|
5580
|
+
borderRadius: "rounded-md",
|
|
5581
|
+
border: { widthClass: "border-2" },
|
|
5582
|
+
effects: { hover: [{
|
|
5389
5583
|
effectId: "background-on-hover",
|
|
5390
|
-
options: { colorToken: unsafeAsOpaqueButtonColourToken("
|
|
5584
|
+
options: { colorToken: unsafeAsOpaqueButtonColourToken("surface") }
|
|
5391
5585
|
}] }
|
|
5392
5586
|
}
|
|
5393
5587
|
},
|
|
@@ -5398,21 +5592,41 @@ const flatInkRecipe = defineStaticButtonStyleRecipe({
|
|
|
5398
5592
|
type: "surface",
|
|
5399
5593
|
role: "link"
|
|
5400
5594
|
},
|
|
5401
|
-
borderRadius: "rounded-
|
|
5402
|
-
|
|
5595
|
+
borderRadius: "rounded-none",
|
|
5596
|
+
sizes: {
|
|
5597
|
+
sm: {
|
|
5598
|
+
padding: "0.375rem 0",
|
|
5599
|
+
fontSize: "text-xs"
|
|
5600
|
+
},
|
|
5601
|
+
md: {
|
|
5602
|
+
padding: "0.5rem 0",
|
|
5603
|
+
fontSize: "text-sm"
|
|
5604
|
+
},
|
|
5605
|
+
lg: {
|
|
5606
|
+
padding: "0.625rem 0",
|
|
5607
|
+
fontSize: "text-base"
|
|
5608
|
+
},
|
|
5609
|
+
xl: {
|
|
5610
|
+
padding: "0.75rem 0",
|
|
5611
|
+
fontSize: "text-lg"
|
|
5612
|
+
}
|
|
5613
|
+
},
|
|
5614
|
+
effects: { base: [{
|
|
5615
|
+
effectId: "border-bottom-grow",
|
|
5616
|
+
options: {
|
|
5617
|
+
height: 1,
|
|
5618
|
+
origin: "left"
|
|
5619
|
+
}
|
|
5620
|
+
}] }
|
|
5403
5621
|
}
|
|
5404
5622
|
},
|
|
5405
5623
|
accent: {
|
|
5406
|
-
kind: "
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
borderRadius: "rounded-lg",
|
|
5413
|
-
affordance: { iconId: "ArrowRight" },
|
|
5414
|
-
effects: { hover: [{ effectId: "lift" }] }
|
|
5415
|
-
}
|
|
5624
|
+
kind: "derive",
|
|
5625
|
+
from: "primary",
|
|
5626
|
+
overrides: { background: {
|
|
5627
|
+
type: "solid",
|
|
5628
|
+
colorToken: "accent"
|
|
5629
|
+
} }
|
|
5416
5630
|
}
|
|
5417
5631
|
}
|
|
5418
5632
|
}
|
|
@@ -5930,13 +6144,9 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
5930
6144
|
}
|
|
5931
6145
|
//#endregion
|
|
5932
6146
|
//#region ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
5933
|
-
const
|
|
5934
|
-
siteId: z.string().optional(),
|
|
5935
|
-
apiBaseUrl: z.string().optional(),
|
|
5936
|
-
portalToken: z.string().nullable().optional(),
|
|
6147
|
+
const courseRegistrationHydrationSchemaShape = {
|
|
5937
6148
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
5938
|
-
courses: z.array(
|
|
5939
|
-
className: z.string().nullable().optional(),
|
|
6149
|
+
courses: z.array(publicWholeSeriesOfferingSchema).nullable().optional(),
|
|
5940
6150
|
showSessions: z.boolean().optional(),
|
|
5941
6151
|
showPrice: z.boolean().optional(),
|
|
5942
6152
|
showCapacity: z.boolean().optional(),
|
|
@@ -5944,8 +6154,15 @@ const courseRegistrationSourceSchema = z.object({
|
|
|
5944
6154
|
successMessage: z.string().optional(),
|
|
5945
6155
|
waitlistMessage: z.string().optional(),
|
|
5946
6156
|
membershipMessage: z.string().optional(),
|
|
6157
|
+
buttonVariant: registrationButtonVariantSchema.optional()
|
|
6158
|
+
};
|
|
6159
|
+
const courseRegistrationSourceSchema = z.object({
|
|
6160
|
+
siteId: z.string().optional(),
|
|
6161
|
+
apiBaseUrl: z.string().optional(),
|
|
6162
|
+
portalToken: z.string().nullable().optional(),
|
|
6163
|
+
...courseRegistrationHydrationSchemaShape,
|
|
6164
|
+
className: z.string().nullable().optional(),
|
|
5947
6165
|
buttonText: z.string().nullable().optional(),
|
|
5948
|
-
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
5949
6166
|
stage: previewStageSchema.optional()
|
|
5950
6167
|
});
|
|
5951
6168
|
const courseRegistrationDisplaySchema = z.object({
|
|
@@ -5954,18 +6171,7 @@ const courseRegistrationDisplaySchema = z.object({
|
|
|
5954
6171
|
className: z.string().nullable(),
|
|
5955
6172
|
summaryButtonText: z.string()
|
|
5956
6173
|
});
|
|
5957
|
-
const courseRegistrationHydrationSchema = z.object(
|
|
5958
|
-
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
5959
|
-
courses: z.array(publicCourseSchema).nullable().optional(),
|
|
5960
|
-
showSessions: z.boolean().optional(),
|
|
5961
|
-
showPrice: z.boolean().optional(),
|
|
5962
|
-
showCapacity: z.boolean().optional(),
|
|
5963
|
-
showVenue: z.boolean().optional(),
|
|
5964
|
-
successMessage: z.string().optional(),
|
|
5965
|
-
waitlistMessage: z.string().optional(),
|
|
5966
|
-
membershipMessage: z.string().optional(),
|
|
5967
|
-
buttonVariant: registrationButtonVariantSchema.optional()
|
|
5968
|
-
});
|
|
6174
|
+
const courseRegistrationHydrationSchema = z.object(courseRegistrationHydrationSchemaShape);
|
|
5969
6175
|
const courseRegistrationRenderSchema = z.object({
|
|
5970
6176
|
display: courseRegistrationDisplaySchema,
|
|
5971
6177
|
hydration: courseRegistrationHydrationSchema
|
|
@@ -6019,83 +6225,6 @@ const courseRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCod
|
|
|
6019
6225
|
})
|
|
6020
6226
|
});
|
|
6021
6227
|
//#endregion
|
|
6022
|
-
//#region ../blocks/src/lib/typeGuards.ts
|
|
6023
|
-
/**
|
|
6024
|
-
* Strict record guard: excludes null, primitives, and arrays.
|
|
6025
|
-
*/
|
|
6026
|
-
function isRecord$3(value) {
|
|
6027
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6028
|
-
}
|
|
6029
|
-
//#endregion
|
|
6030
|
-
//#region ../blocks/src/system/manifest/richTextSchema.ts
|
|
6031
|
-
/**
|
|
6032
|
-
* Shared Rich Text Schema
|
|
6033
|
-
*
|
|
6034
|
-
* This module provides a single source of truth for TipTap rich text validation
|
|
6035
|
-
* across both the block-form editor and the block rendering system.
|
|
6036
|
-
*
|
|
6037
|
-
* Rich-text fields use one canonical root shape:
|
|
6038
|
-
* `{ type: 'doc', content: [...] }`.
|
|
6039
|
-
*/
|
|
6040
|
-
/**
|
|
6041
|
-
* TipTap document node schema (recursive structure)
|
|
6042
|
-
*
|
|
6043
|
-
* Supports the full TipTap document structure including:
|
|
6044
|
-
* - type: Node type (e.g., 'doc', 'paragraph', 'text')
|
|
6045
|
-
* - content: Nested array of child nodes
|
|
6046
|
-
* - text: Text content for text nodes
|
|
6047
|
-
* - attrs: Node attributes (e.g., alignment, color)
|
|
6048
|
-
* - marks: Text formatting marks (e.g., bold, italic)
|
|
6049
|
-
*/
|
|
6050
|
-
const TipTapMarkSchema = z.object({
|
|
6051
|
-
type: z.string().min(1),
|
|
6052
|
-
attrs: z.record(z.string(), z.unknown()).optional()
|
|
6053
|
-
}).strict();
|
|
6054
|
-
const TipTapNodeSchema = z.lazy(() => z.object({
|
|
6055
|
-
type: z.string().min(1),
|
|
6056
|
-
content: z.array(TipTapNodeSchema).optional(),
|
|
6057
|
-
text: z.string().optional(),
|
|
6058
|
-
attrs: z.record(z.string(), z.unknown()).optional(),
|
|
6059
|
-
marks: z.array(TipTapMarkSchema).optional()
|
|
6060
|
-
}).strict().superRefine((node, ctx) => {
|
|
6061
|
-
if (node.type === "doc") ctx.addIssue({
|
|
6062
|
-
code: "custom",
|
|
6063
|
-
path: ["type"],
|
|
6064
|
-
message: "Document nodes are only valid at the rich-text root"
|
|
6065
|
-
});
|
|
6066
|
-
if (node.type === "text") {
|
|
6067
|
-
if (node.text === void 0 || node.text.length === 0) ctx.addIssue({
|
|
6068
|
-
code: "custom",
|
|
6069
|
-
path: ["text"],
|
|
6070
|
-
message: "Text nodes require a non-empty text value"
|
|
6071
|
-
});
|
|
6072
|
-
if (node.content !== void 0) ctx.addIssue({
|
|
6073
|
-
code: "custom",
|
|
6074
|
-
path: ["content"],
|
|
6075
|
-
message: "Text nodes cannot contain child nodes"
|
|
6076
|
-
});
|
|
6077
|
-
return;
|
|
6078
|
-
}
|
|
6079
|
-
if (node.text !== void 0) ctx.addIssue({
|
|
6080
|
-
code: "custom",
|
|
6081
|
-
path: ["text"],
|
|
6082
|
-
message: "Only text nodes can contain a text value"
|
|
6083
|
-
});
|
|
6084
|
-
}));
|
|
6085
|
-
/**
|
|
6086
|
-
* Canonical schema for a TipTap rich-text document root.
|
|
6087
|
-
*
|
|
6088
|
-
* Stricter than {@link TipTapNodeSchema}: `type` is literally `'doc'` and
|
|
6089
|
-
* `content` is required (possibly empty). This is the shape every producer
|
|
6090
|
-
* (dummy content, editor output, migrations) must emit, and the shape every
|
|
6091
|
-
* non-legacy consumer can rely on.
|
|
6092
|
-
*
|
|
6093
|
-
*/
|
|
6094
|
-
const RichTextDocSchema = z.object({
|
|
6095
|
-
type: z.literal("doc"),
|
|
6096
|
-
content: z.array(TipTapNodeSchema)
|
|
6097
|
-
}).strict();
|
|
6098
|
-
//#endregion
|
|
6099
6228
|
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
6100
6229
|
const eventPresetSchema = z.enum([
|
|
6101
6230
|
"event",
|
|
@@ -6398,6 +6527,7 @@ const publicEventSchema = z.object({
|
|
|
6398
6527
|
timeZone: z.string(),
|
|
6399
6528
|
pricing: publicEventPricingSchema,
|
|
6400
6529
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
6530
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
6401
6531
|
accessRestriction: accessRestrictionSchema,
|
|
6402
6532
|
allowedCategoryIds: z.array(z.string()),
|
|
6403
6533
|
requireGuestDetails: z.boolean().optional(),
|
|
@@ -6405,7 +6535,7 @@ const publicEventSchema = z.object({
|
|
|
6405
6535
|
acceptsMemberships: z.boolean().optional(),
|
|
6406
6536
|
wholeSeries: z.object({
|
|
6407
6537
|
eventSeriesId: z.string(),
|
|
6408
|
-
pricing:
|
|
6538
|
+
pricing: wholeSeriesPricingSchema,
|
|
6409
6539
|
currency: z.string(),
|
|
6410
6540
|
enrollmentOpen: z.boolean()
|
|
6411
6541
|
}).nullable().optional()
|
|
@@ -6429,14 +6559,7 @@ function normalizeIdList(parts) {
|
|
|
6429
6559
|
}
|
|
6430
6560
|
//#endregion
|
|
6431
6561
|
//#region ../blocks/src/system/blocks/events/shared/filtering.ts
|
|
6432
|
-
const eventSurfacePresetValues =
|
|
6433
|
-
"course",
|
|
6434
|
-
"term",
|
|
6435
|
-
"class",
|
|
6436
|
-
"workshop",
|
|
6437
|
-
"retreat",
|
|
6438
|
-
"performance"
|
|
6439
|
-
];
|
|
6562
|
+
const eventSurfacePresetValues = SURFACE_EVENT_PRESET_VALUES;
|
|
6440
6563
|
const eventSurfaceScopeValues = [
|
|
6441
6564
|
"all",
|
|
6442
6565
|
"regularClassSchedule",
|
|
@@ -7202,6 +7325,7 @@ const eventCollectionSourceSchemaShape = {
|
|
|
7202
7325
|
showVenue: z.boolean().nullable().optional(),
|
|
7203
7326
|
showMap: z.boolean().nullable().optional(),
|
|
7204
7327
|
showCapacity: z.boolean().nullable().optional(),
|
|
7328
|
+
cardRole: cardRoleSchema.optional(),
|
|
7205
7329
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
7206
7330
|
buttonText: z.string().optional(),
|
|
7207
7331
|
emptyMessage: z.string().optional(),
|
|
@@ -7229,6 +7353,7 @@ const eventCollectionDisplaySchemaShape = {
|
|
|
7229
7353
|
showVenue: z.boolean(),
|
|
7230
7354
|
showMap: z.boolean(),
|
|
7231
7355
|
showCapacity: z.boolean(),
|
|
7356
|
+
cardRole: cardRoleSchema,
|
|
7232
7357
|
buttonVariant: eventButtonVariantSchema,
|
|
7233
7358
|
buttonText: z.string(),
|
|
7234
7359
|
emptyMessage: z.string()
|
|
@@ -7278,6 +7403,7 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
7278
7403
|
showVenue: source.showVenue ?? true,
|
|
7279
7404
|
showMap: source.showMap ?? true,
|
|
7280
7405
|
showCapacity: source.showCapacity ?? true,
|
|
7406
|
+
cardRole: source.cardRole ?? "default",
|
|
7281
7407
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
7282
7408
|
buttonText: source.buttonText ?? "Book",
|
|
7283
7409
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled."
|
|
@@ -7303,7 +7429,7 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
7303
7429
|
emptyMessage: display.emptyMessage,
|
|
7304
7430
|
loadingMessage: "Loading events…",
|
|
7305
7431
|
containerClass: getContainerClass(display.listLayout, display.listColumns),
|
|
7306
|
-
|
|
7432
|
+
cardRole: display.cardRole,
|
|
7307
7433
|
buttonVariant: display.buttonVariant,
|
|
7308
7434
|
buttonText: display.buttonText,
|
|
7309
7435
|
showVenue: display.showVenue,
|
|
@@ -7315,8 +7441,6 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
7315
7441
|
}
|
|
7316
7442
|
//#endregion
|
|
7317
7443
|
//#region ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
7318
|
-
const legacyEventCardVariantSchema = z.enum(["variant1", "variant2"]);
|
|
7319
|
-
const eventCardVariantInputSchema = z.union([cardVariantRoleSchema, legacyEventCardVariantSchema]);
|
|
7320
7444
|
const cardOrientationSchema = z.enum(["vertical", "horizontal"]);
|
|
7321
7445
|
const eventSurfaceScopeSchema = z.enum(eventSurfaceScopeValues);
|
|
7322
7446
|
const eventScheduleScopeSchema = z.enum(eventScheduleScopeValues);
|
|
@@ -7331,7 +7455,7 @@ const eventListingSourceSchema = z.object({
|
|
|
7331
7455
|
paginationMode: z.enum(["loadMore", "seeAllLink"]).optional(),
|
|
7332
7456
|
seeAllUrl: z.string().optional(),
|
|
7333
7457
|
loadMoreText: z.string().optional(),
|
|
7334
|
-
|
|
7458
|
+
cardRole: cardRoleSchema.optional(),
|
|
7335
7459
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
7336
7460
|
buttonText: z.string().optional(),
|
|
7337
7461
|
showVenue: z.boolean().optional(),
|
|
@@ -7353,7 +7477,7 @@ const eventListingDisplaySchema = z.object({
|
|
|
7353
7477
|
emptyMessage: z.string(),
|
|
7354
7478
|
loadingMessage: z.string(),
|
|
7355
7479
|
containerClass: z.string(),
|
|
7356
|
-
|
|
7480
|
+
cardRole: cardRoleSchema,
|
|
7357
7481
|
buttonVariant: eventButtonVariantSchema,
|
|
7358
7482
|
buttonText: z.string(),
|
|
7359
7483
|
showVenue: z.boolean(),
|
|
@@ -7410,7 +7534,7 @@ const eventListingInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
7410
7534
|
emptyMessage: source.emptyMessage ?? "No upcoming events scheduled.",
|
|
7411
7535
|
loadingMessage: "Loading events…",
|
|
7412
7536
|
containerClass: getContainerClass(layout, source.columns ?? "3"),
|
|
7413
|
-
|
|
7537
|
+
cardRole: source.cardRole ?? "default",
|
|
7414
7538
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
7415
7539
|
buttonText: source.buttonText ?? "Book",
|
|
7416
7540
|
showVenue: source.showVenue ?? true,
|
|
@@ -7845,6 +7969,104 @@ function createBackgroundOverlayNode(path, className = "background-overlay rb-ab
|
|
|
7845
7969
|
//#endregion
|
|
7846
7970
|
//#region ../blocks/src/system/spacing.ts
|
|
7847
7971
|
/**
|
|
7972
|
+
* Type-safe spacing system for sections and containers.
|
|
7973
|
+
*
|
|
7974
|
+
* This module provides:
|
|
7975
|
+
* - Semantic spacing values (none, compact, cozy, medium, comfortable, spacious)
|
|
7976
|
+
* - Type-safe mappings to CSS class tokens
|
|
7977
|
+
* - Runtime validation via type guards
|
|
7978
|
+
* - Separate handling for section (vertical) vs container (all-sides) spacing
|
|
7979
|
+
*
|
|
7980
|
+
* Type Safety Guarantees:
|
|
7981
|
+
* - Type is derived from data (single source of truth)
|
|
7982
|
+
* - Maps are validated for completeness at compile time
|
|
7983
|
+
* - Runtime validation available via isSemanticSpacing()
|
|
7984
|
+
*/
|
|
7985
|
+
/**
|
|
7986
|
+
* Single source of truth for semantic spacing values.
|
|
7987
|
+
* The SemanticSpacing type is derived from this array to ensure they stay in sync.
|
|
7988
|
+
*
|
|
7989
|
+
* Adding a new spacing value:
|
|
7990
|
+
* 1. Add it to this array
|
|
7991
|
+
* 2. TypeScript will error until you update both spacing maps
|
|
7992
|
+
* 3. No way to get out of sync
|
|
7993
|
+
*/
|
|
7994
|
+
const SEMANTIC_SPACING_VALUES = [
|
|
7995
|
+
"none",
|
|
7996
|
+
"compact",
|
|
7997
|
+
"cozy",
|
|
7998
|
+
"medium",
|
|
7999
|
+
"comfortable",
|
|
8000
|
+
"spacious"
|
|
8001
|
+
];
|
|
8002
|
+
/**
|
|
8003
|
+
* Runtime type guard for validating spacing values.
|
|
8004
|
+
* Use this at system boundaries where data enters from external sources.
|
|
8005
|
+
*
|
|
8006
|
+
* @param value - Unknown value to validate
|
|
8007
|
+
* @returns true if value is a valid SemanticSpacing, with type narrowing
|
|
8008
|
+
*
|
|
8009
|
+
* @example
|
|
8010
|
+
* const userInput = 'medium';
|
|
8011
|
+
* if (isSemanticSpacing(userInput)) {
|
|
8012
|
+
* // TypeScript knows userInput is SemanticSpacing here
|
|
8013
|
+
* const classes = resolveSpacing(userInput, 'y');
|
|
8014
|
+
* }
|
|
8015
|
+
*/
|
|
8016
|
+
function isSemanticSpacing(value) {
|
|
8017
|
+
return typeof value === "string" && SEMANTIC_SPACING_VALUES.includes(value);
|
|
8018
|
+
}
|
|
8019
|
+
/**
|
|
8020
|
+
* Type-safe mapping from semantic spacing to CSS classes for sections (y-axis).
|
|
8021
|
+
*
|
|
8022
|
+
* Sections use vertical padding only to control spacing between blocks.
|
|
8023
|
+
* Horizontal padding (px-6) is handled separately via baseClass.
|
|
8024
|
+
*
|
|
8025
|
+
* The `satisfies` operator ensures all SemanticSpacing values are present at compile time.
|
|
8026
|
+
* TypeScript will error if any spacing value is missing or if extra keys exist.
|
|
8027
|
+
*/
|
|
8028
|
+
const SECTION_SPACING_MAP = {
|
|
8029
|
+
none: "rb-section-pad-none",
|
|
8030
|
+
compact: "rb-section-pad-compact",
|
|
8031
|
+
cozy: "rb-section-pad-cozy",
|
|
8032
|
+
medium: "rb-section-pad-medium",
|
|
8033
|
+
comfortable: "rb-section-pad-comfortable",
|
|
8034
|
+
spacious: "rb-section-pad-spacious"
|
|
8035
|
+
};
|
|
8036
|
+
/**
|
|
8037
|
+
* Type-safe mapping from semantic spacing to CSS classes for containers (all sides).
|
|
8038
|
+
*
|
|
8039
|
+
* Containers use padding on all sides for internal content spacing.
|
|
8040
|
+
*
|
|
8041
|
+
* The `satisfies` operator ensures all SemanticSpacing values are present at compile time.
|
|
8042
|
+
*/
|
|
8043
|
+
const CONTAINER_SPACING_MAP = {
|
|
8044
|
+
none: "rb-container-pad-none",
|
|
8045
|
+
compact: "rb-container-pad-compact",
|
|
8046
|
+
cozy: "rb-container-pad-cozy",
|
|
8047
|
+
medium: "rb-container-pad-medium",
|
|
8048
|
+
comfortable: "rb-container-pad-comfortable",
|
|
8049
|
+
spacious: "rb-container-pad-spacious"
|
|
8050
|
+
};
|
|
8051
|
+
/**
|
|
8052
|
+
* Resolve semantic spacing to CSS classes based on axis.
|
|
8053
|
+
*
|
|
8054
|
+
* This function guarantees that valid SemanticSpacing values always return a result.
|
|
8055
|
+
* Since spacing is typed, there's no need for fallback logic.
|
|
8056
|
+
*
|
|
8057
|
+
* @param spacing - Semantic spacing value (validated at compile time)
|
|
8058
|
+
* @param axis - Which axis to apply padding ('y' for sections, 'all' for containers)
|
|
8059
|
+
* @returns CSS class token string
|
|
8060
|
+
*
|
|
8061
|
+
* @example
|
|
8062
|
+
* resolveSpacing('medium', 'y') // => 'rb-section-pad-medium'
|
|
8063
|
+
* resolveSpacing('medium', 'all') // => 'rb-container-pad-medium'
|
|
8064
|
+
* resolveSpacing('compact') // => 'rb-section-pad-compact' (defaults to 'y' axis)
|
|
8065
|
+
*/
|
|
8066
|
+
function resolveSpacing(spacing, axis = "y") {
|
|
8067
|
+
return (axis === "y" ? SECTION_SPACING_MAP : CONTAINER_SPACING_MAP)[spacing];
|
|
8068
|
+
}
|
|
8069
|
+
/**
|
|
7848
8070
|
* Default spacing value for sections when not explicitly configured.
|
|
7849
8071
|
*/
|
|
7850
8072
|
const DEFAULT_SECTION_SPACING = "medium";
|
|
@@ -9739,6 +9961,22 @@ createBlockManifest({
|
|
|
9739
9961
|
defaultValue: true,
|
|
9740
9962
|
ui: { intent: "display" }
|
|
9741
9963
|
},
|
|
9964
|
+
{
|
|
9965
|
+
id: "showTitle",
|
|
9966
|
+
type: "boolean",
|
|
9967
|
+
label: "Show event title",
|
|
9968
|
+
required: false,
|
|
9969
|
+
defaultValue: false,
|
|
9970
|
+
ui: { intent: "display" }
|
|
9971
|
+
},
|
|
9972
|
+
{
|
|
9973
|
+
id: "showDescription",
|
|
9974
|
+
type: "boolean",
|
|
9975
|
+
label: "Show event description",
|
|
9976
|
+
required: false,
|
|
9977
|
+
defaultValue: false,
|
|
9978
|
+
ui: { intent: "display" }
|
|
9979
|
+
},
|
|
9742
9980
|
{
|
|
9743
9981
|
id: "showMap",
|
|
9744
9982
|
type: "boolean",
|
|
@@ -9775,10 +10013,22 @@ createBlockManifest({
|
|
|
9775
10013
|
{
|
|
9776
10014
|
value: "10",
|
|
9777
10015
|
label: "10 dates"
|
|
10016
|
+
},
|
|
10017
|
+
{
|
|
10018
|
+
value: "all",
|
|
10019
|
+
label: "All dates"
|
|
9778
10020
|
}
|
|
9779
10021
|
],
|
|
9780
10022
|
ui: { intent: "display" }
|
|
9781
10023
|
},
|
|
10024
|
+
{
|
|
10025
|
+
id: "showCapacity",
|
|
10026
|
+
type: "boolean",
|
|
10027
|
+
label: "Show capacity",
|
|
10028
|
+
required: false,
|
|
10029
|
+
defaultValue: false,
|
|
10030
|
+
ui: { intent: "display" }
|
|
10031
|
+
},
|
|
9782
10032
|
{
|
|
9783
10033
|
id: "showCost",
|
|
9784
10034
|
type: "boolean",
|
|
@@ -9821,6 +10071,8 @@ createBlockManifest({
|
|
|
9821
10071
|
} },
|
|
9822
10072
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
9823
10073
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
10074
|
+
showTitle: { $bind: { from: "content.showTitle" } },
|
|
10075
|
+
showDescription: { $bind: { from: "content.showDescription" } },
|
|
9824
10076
|
showMap: { $bind: { from: "content.showMap" } },
|
|
9825
10077
|
showOtherDates: { $bind: { from: "content.showOtherDates" } },
|
|
9826
10078
|
otherDatesLimit: { $bind: {
|
|
@@ -9831,6 +10083,10 @@ createBlockManifest({
|
|
|
9831
10083
|
from: "content.showCost",
|
|
9832
10084
|
fallback: true
|
|
9833
10085
|
} },
|
|
10086
|
+
showCapacity: { $bind: {
|
|
10087
|
+
from: "content.showCapacity",
|
|
10088
|
+
fallback: false
|
|
10089
|
+
} },
|
|
9834
10090
|
showAcceptedPasses: { $bind: {
|
|
9835
10091
|
from: "content.showAcceptedPasses",
|
|
9836
10092
|
fallback: true
|
|
@@ -9925,6 +10181,9 @@ const eventDetailsIslandSchema = z.object({
|
|
|
9925
10181
|
showOtherDates: z.boolean().optional(),
|
|
9926
10182
|
otherDatesLimit: z.string().optional(),
|
|
9927
10183
|
showCost: z.boolean().optional(),
|
|
10184
|
+
showTitle: z.boolean().optional(),
|
|
10185
|
+
showDescription: z.boolean().optional(),
|
|
10186
|
+
showCapacity: z.boolean().optional(),
|
|
9928
10187
|
showAcceptedPasses: z.boolean().optional(),
|
|
9929
10188
|
showAcceptedMemberships: z.boolean().optional(),
|
|
9930
10189
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
@@ -10113,6 +10372,54 @@ const eventCombinedInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
10113
10372
|
})
|
|
10114
10373
|
});
|
|
10115
10374
|
//#endregion
|
|
10375
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
10376
|
+
function planEventRegistrationScope(input) {
|
|
10377
|
+
const subject = input.subject;
|
|
10378
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
10379
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
10380
|
+
kind: "context",
|
|
10381
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
10382
|
+
occurrenceContext: input.occurrenceContext,
|
|
10383
|
+
subject
|
|
10384
|
+
})
|
|
10385
|
+
};
|
|
10386
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
10387
|
+
return {
|
|
10388
|
+
kind: "selectedRun",
|
|
10389
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
10390
|
+
offering: selectedRunOffering
|
|
10391
|
+
};
|
|
10392
|
+
}
|
|
10393
|
+
function planEventRegistrationSurface(input) {
|
|
10394
|
+
const scope = planEventRegistrationScope(input);
|
|
10395
|
+
if (scope.kind === "invalidSelectedRun") return { kind: "unavailableWholeSeries" };
|
|
10396
|
+
const scopedEvents = scope.events;
|
|
10397
|
+
const bookingScopes = new Set(scopedEvents.map((event) => event.bookingScope));
|
|
10398
|
+
if (scope.kind === "selectedRun") {
|
|
10399
|
+
if (bookingScopes.size !== 1 || !bookingScopes.has("whole_series")) return { kind: "unavailableWholeSeries" };
|
|
10400
|
+
return {
|
|
10401
|
+
kind: "wholeSeries",
|
|
10402
|
+
offerings: [scope.offering]
|
|
10403
|
+
};
|
|
10404
|
+
}
|
|
10405
|
+
if (!input.occurrenceContext && !input.subject && bookingScopes.has("single_occurrence")) return {
|
|
10406
|
+
kind: "occurrence",
|
|
10407
|
+
events: scopedEvents.filter((event) => event.bookingScope === "single_occurrence")
|
|
10408
|
+
};
|
|
10409
|
+
if (bookingScopes.size === 0 || bookingScopes.has("single_occurrence")) return bookingScopes.has("whole_series") ? { kind: "mixedBookingScopes" } : {
|
|
10410
|
+
kind: "occurrence",
|
|
10411
|
+
events: scopedEvents
|
|
10412
|
+
};
|
|
10413
|
+
const requiredSeriesIds = new Set(scopedEvents.map((event) => event.seriesId));
|
|
10414
|
+
const wholeSeriesOffering = input.wholeSeriesOffering;
|
|
10415
|
+
const offerings = (wholeSeriesOffering ? [wholeSeriesOffering, ...input.wholeSeriesOfferings.filter((offering) => offering.eventSeriesId !== wholeSeriesOffering.eventSeriesId)] : input.wholeSeriesOfferings).filter((offering) => requiredSeriesIds.has(offering.eventSeriesId));
|
|
10416
|
+
const loadedSeriesIds = new Set(offerings.map((offering) => offering.eventSeriesId));
|
|
10417
|
+
return [...requiredSeriesIds].every((seriesId) => loadedSeriesIds.has(seriesId)) && offerings.length > 0 ? {
|
|
10418
|
+
kind: "wholeSeries",
|
|
10419
|
+
offerings
|
|
10420
|
+
} : { kind: "unavailableWholeSeries" };
|
|
10421
|
+
}
|
|
10422
|
+
//#endregion
|
|
10116
10423
|
//#region ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
10117
10424
|
/**
|
|
10118
10425
|
* Steps that are part of the main wizard and should show the step indicator
|
|
@@ -10233,8 +10540,8 @@ const eventRegistrationHydrationSchemaShape = {
|
|
|
10233
10540
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
10234
10541
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
10235
10542
|
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
10236
|
-
wholeSeriesOfferings:
|
|
10237
|
-
wholeSeriesOffering:
|
|
10543
|
+
wholeSeriesOfferings: publicWholeSeriesOfferingsArraySchema.nullable().optional(),
|
|
10544
|
+
wholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
10238
10545
|
maxTickets: z.string().optional(),
|
|
10239
10546
|
showVenue: z.boolean().optional(),
|
|
10240
10547
|
showCapacity: z.boolean().optional(),
|
|
@@ -10256,12 +10563,13 @@ const eventRegistrationSourceSchema = z.object({
|
|
|
10256
10563
|
portalToken: z.string().nullable().optional(),
|
|
10257
10564
|
previewToken: z.string().nullable().optional(),
|
|
10258
10565
|
...eventRegistrationHydrationSchemaShape,
|
|
10566
|
+
subjectWholeSeriesOffering: publicWholeSeriesOfferingSchema.nullable().optional(),
|
|
10259
10567
|
className: z.string().nullable().optional(),
|
|
10260
10568
|
buttonText: z.string().nullable().optional(),
|
|
10261
10569
|
maxTickets: z.string().nullable().optional(),
|
|
10262
10570
|
stage: previewStageSchema.optional()
|
|
10263
10571
|
});
|
|
10264
|
-
const eventRegistrationDisplaySchema = z.object({
|
|
10572
|
+
const eventRegistrationDisplaySchema = z.discriminatedUnion("state", [z.object({
|
|
10265
10573
|
kind: z.literal("event-registration"),
|
|
10266
10574
|
state: z.literal("generic-shell"),
|
|
10267
10575
|
className: z.string().nullable(),
|
|
@@ -10269,7 +10577,13 @@ const eventRegistrationDisplaySchema = z.object({
|
|
|
10269
10577
|
bodyText: z.string(),
|
|
10270
10578
|
stepLabels: z.array(z.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
10271
10579
|
summaryButtonText: z.string()
|
|
10272
|
-
})
|
|
10580
|
+
}), z.object({
|
|
10581
|
+
kind: z.literal("event-registration"),
|
|
10582
|
+
state: z.literal("registration-closed"),
|
|
10583
|
+
className: z.string().nullable(),
|
|
10584
|
+
titleText: z.string(),
|
|
10585
|
+
bodyText: z.string()
|
|
10586
|
+
})]);
|
|
10273
10587
|
const eventRegistrationHydrationSchema = z.object(eventRegistrationHydrationSchemaShape);
|
|
10274
10588
|
const eventRegistrationRenderSchema = z.object({
|
|
10275
10589
|
display: eventRegistrationDisplaySchema,
|
|
@@ -10284,6 +10598,13 @@ const eventRegistrationIslandMetaCodec = createZodCodec(z.object({
|
|
|
10284
10598
|
}));
|
|
10285
10599
|
const eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "portalToken", "previewToken", "stage");
|
|
10286
10600
|
function buildEventRegistrationDisplay(source) {
|
|
10601
|
+
if (resolveWholeSeriesOffering(source)?.enrollmentOpen === false) return {
|
|
10602
|
+
kind: "event-registration",
|
|
10603
|
+
state: "registration-closed",
|
|
10604
|
+
className: source.className ?? null,
|
|
10605
|
+
titleText: "Registration closed",
|
|
10606
|
+
bodyText: "This run is no longer open for bookings."
|
|
10607
|
+
};
|
|
10287
10608
|
const stepLabels = buildEventRegistrationShellStepLabels(source);
|
|
10288
10609
|
return {
|
|
10289
10610
|
kind: "event-registration",
|
|
@@ -10295,6 +10616,9 @@ function buildEventRegistrationDisplay(source) {
|
|
|
10295
10616
|
summaryButtonText: source.buttonText?.trim() || "Register"
|
|
10296
10617
|
};
|
|
10297
10618
|
}
|
|
10619
|
+
function resolveWholeSeriesOffering(source) {
|
|
10620
|
+
return source.wholeSeriesOffering ?? source.subjectWholeSeriesOffering ?? null;
|
|
10621
|
+
}
|
|
10298
10622
|
function buildEventRegistrationShellStepLabels(source) {
|
|
10299
10623
|
const scopedEvents = scopeEventRegistrationEvents(source);
|
|
10300
10624
|
if (scopedEvents.length === 0) return EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS;
|
|
@@ -10310,10 +10634,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
10310
10634
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
10311
10635
|
}
|
|
10312
10636
|
function scopeEventRegistrationEvents(source) {
|
|
10313
|
-
|
|
10637
|
+
const scope = planEventRegistrationScope({
|
|
10638
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
10639
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
10314
10640
|
occurrenceContext: source.occurrenceContext,
|
|
10315
10641
|
subject: source.subject
|
|
10316
10642
|
});
|
|
10643
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
10317
10644
|
}
|
|
10318
10645
|
function shellLabelForRegistrationStep(step, events) {
|
|
10319
10646
|
switch (step) {
|
|
@@ -10352,7 +10679,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
10352
10679
|
subject: source.subject ?? null,
|
|
10353
10680
|
events: source.events ?? null,
|
|
10354
10681
|
wholeSeriesOfferings: source.wholeSeriesOfferings ?? null,
|
|
10355
|
-
wholeSeriesOffering: source
|
|
10682
|
+
wholeSeriesOffering: resolveWholeSeriesOffering(source),
|
|
10356
10683
|
maxTickets: source.maxTickets ?? void 0,
|
|
10357
10684
|
showVenue: source.showVenue,
|
|
10358
10685
|
showCapacity: source.showCapacity,
|
|
@@ -11842,4 +12169,4 @@ function defineIslandPropsDecoder(kind) {
|
|
|
11842
12169
|
};
|
|
11843
12170
|
}
|
|
11844
12171
|
//#endregion
|
|
11845
|
-
export {
|
|
12172
|
+
export { themeButtonClassName as $, buildEventRuntimeFilters as A, okWith as At, formatEventTeacherLine as B, parseBookingLocalDate as Bt, getWizardStepsForContext as C, isBookingRequirementConsentFieldId as Ct, SEMANTIC_SPACING_VALUES as D, clearWorkflowFeedback as Dt, staticHeaderChromeRuntime as E, assertNever$1 as Et, formatDate as F, formatBookingDateTime as Ft, resolveEventCta as G, formatBookingPriceDisplay as Gt, getCardOrientation as H, toBookingTimeZone as Ht, formatEventCompactDateRail as I, formatBookingInstant as It, getEventAvailability as J, publicEventPricingType as Jt, resolveEventLinkProps as K, publicEventPricingCurrency as Kt, formatEventDateParts as L, formatBookingTime as Lt, normalizeCsvIds as M, reportWorkflowSuccess as Mt, normalizeCsvString as N, addLocalScheduleDays as Nt, isSemanticSpacing as O, err as Ot, normalizeOptionalId as P, formatBookingDate as Pt, resolveEventRegistrationScopedEvents as Q, assertNever$2 as Qt, formatEventPrice as R, formatLocalScheduleDate as Rt, getStepNumber as S, BOOKING_FORM_DATA_RESERVED_KEYS as St, buildEventCalendarListingRender as T, isRecord$5 as Tt, getContainerClass as U, toScheduledBookingDateTime as Ut, formatTime as V, resolveBookingTimeZoneId as Vt, groupEventsByDate as W, parseEventPageSurfaceSubject as Wt, getLocalDateKey as X, publicEventTicketTypes as Xt, getEventAvailabilityStatus as Y, publicEventScalarPrice as Yt, getLocalMinuteOfDay as Z, formatCurrencyAmount as Zt, findPreSelectedEvent as _, resolveBookingSiteId as _t, buildProductDetailDisplay as a, logger as at, resolveRegistrationTarget as b, projectSelectedAppointmentConsentIntoForm as bt, EMPTY_COMMERCE_CART_STATE as c, formatBookingSubmissionPreparationError as ct, deriveCommerceCheckoutState as d, getBookingSuccessMessage as dt, boxBackgroundSchema as et, parseStoredCommerceCartState as f, isBookingServiceSlidingAmountInRange as ft, findEventByOccurrenceId as g, resolveBookingPaymentStep as gt, toRegistrationEvents as h, resolveAppointmentCheckoutVerificationState as ht, buildProductCardDisplay as i, normalizeCardRole as it, getEventRuntimeFiltersKey as j, reportWorkflowError as jt, resolveSpacing as k, ok as kt, buildPassCartItem as l, getBookingRedirectStateFromLocation as lt, reduceCommerceCart as m, prepareBookingSubmission as mt, getShopDisplayForItems as n, resolveOnColorForThemeToken as nt, formatCommercePrice as o, deriveBookingFormViewState as ot, productItemKey as p, parseBookingCurrencyInputToCents as pt, resolveRuntimeEventPricing as q, publicEventPricingMode as qt, buildCartDisplay as r, resolveTokenOrCssColorValue as rt, formatInterval as s, formatBookingCentsAsCurrencyInput as st, defineIslandPropsDecoder as t, isCssColorLiteral as tt, buildProductCartItem as u, getBookingServiceSlidingScale as ut, resolveDiscountContext as v, resolveDefaultBookingServiceId as vt, planEventRegistrationSurface as w, RichTextDocSchema as wt, WIZARD_STEPS as x, resolveSelectedAppointmentConsent as xt, resolveEventRequiresPayment as y, toSelectedCollectionOptionKind as yt, formatEventPriceDisplay as z, getBookingLocalDateKey as zt };
|